@fhss-web-team/frontend-utils 0.0.5 → 1.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/README.md +10 -54
- package/fesm2022/fhss-web-team-frontend-utils.mjs +132 -67
- package/fesm2022/fhss-web-team-frontend-utils.mjs.map +1 -1
- package/lib/components/user-management/user-management.component.d.ts +26 -0
- package/lib/components/user-management/user-management.types.d.ts +15 -0
- package/lib/services/auth/auth.service.d.ts +24 -45
- package/lib/signals/fetch-signal/fetch-signal.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
package/README.md
CHANGED
|
@@ -1,63 +1,19 @@
|
|
|
1
1
|
# FrontendUtils
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@fhss-web-team/frontend-utils` is a shared Angular library for reusable components, services, and signals used across FHSS websites.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This package is designed for use in Angular applications and includes integration with Keycloak for authentication.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 📆 Installation
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
ng generate component component-name
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
9
|
+
Install the package and its required peer dependencies:
|
|
14
10
|
|
|
15
11
|
```bash
|
|
16
|
-
|
|
12
|
+
npm install @fhss-web-team/frontend-utils
|
|
17
13
|
```
|
|
18
14
|
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
ng build frontend-utils
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
-
|
|
29
|
-
### Publishing the Library
|
|
30
|
-
|
|
31
|
-
Once the project is built, you can publish your library by following these steps:
|
|
32
|
-
|
|
33
|
-
1. Navigate to the `dist` directory:
|
|
34
|
-
```bash
|
|
35
|
-
cd dist/frontend-utils
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
-
```bash
|
|
40
|
-
npm publish
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Running unit tests
|
|
44
|
-
|
|
45
|
-
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
ng test
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Running end-to-end tests
|
|
52
|
-
|
|
53
|
-
For end-to-end (e2e) testing, run:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
ng e2e
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
60
|
-
|
|
61
|
-
## Additional Resources
|
|
62
|
-
|
|
63
|
-
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
15
|
+
## 🚀 Usage
|
|
16
|
+
Refer to each directory’s `README.md` for specific exports and usage patterns:
|
|
17
|
+
- [Components](./src/lib/components/README.md)
|
|
18
|
+
- [Services](./src/lib/services/README.md)
|
|
19
|
+
- [Signals](./src/lib/signals/README.md)
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, inject, computed, Injectable, input, signal, effect } from '@angular/core';
|
|
2
|
+
import { Component, inject, computed, Injectable, input, signal, effect, ViewChild } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/router';
|
|
4
4
|
import { RouterModule } from '@angular/router';
|
|
5
5
|
import { KEYCLOAK_EVENT_SIGNAL } from 'keycloak-angular';
|
|
6
6
|
import Keycloak from 'keycloak-js';
|
|
7
|
+
import * as i1$1 from '@angular/material/table';
|
|
8
|
+
import { MatTableModule } from '@angular/material/table';
|
|
9
|
+
import * as i3 from '@angular/material/paginator';
|
|
10
|
+
import { MatPaginatorModule, MatPaginator } from '@angular/material/paginator';
|
|
11
|
+
import * as i2 from '@angular/material/sort';
|
|
12
|
+
import { MatSortModule, MatSort } from '@angular/material/sort';
|
|
13
|
+
import { DatePipe } from '@angular/common';
|
|
14
|
+
import * as i4 from '@angular/forms';
|
|
15
|
+
import { FormsModule } from '@angular/forms';
|
|
16
|
+
import * as i5 from '@angular/material/input';
|
|
17
|
+
import { MatInputModule } from '@angular/material/input';
|
|
18
|
+
import * as i6 from '@angular/material/select';
|
|
19
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
7
20
|
|
|
8
21
|
class ByuFooterComponent {
|
|
9
22
|
currentYear = new Date().getFullYear(); // Automatically updates the year
|
|
@@ -16,13 +29,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
16
29
|
}] });
|
|
17
30
|
|
|
18
31
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* See https://www.keycloak.org/securing-apps/javascript-adapter
|
|
32
|
+
* AuthService provides a wrapper around the Keycloak JavaScript adapter, exposing its properties and methods
|
|
33
|
+
* as Angular signals for reactive programming. It simplifies authentication, token management, and role-based access control.
|
|
22
34
|
*/
|
|
23
35
|
class AuthService {
|
|
24
36
|
keycloak = inject(Keycloak);
|
|
25
37
|
keycloakSignal = inject(KEYCLOAK_EVENT_SIGNAL);
|
|
38
|
+
/**
|
|
39
|
+
* Initiates the login process. Optionally stores a route to redirect to after login.
|
|
40
|
+
* @param nextRoute - The route to navigate to after successful login.
|
|
41
|
+
*/
|
|
26
42
|
login = (nextRoute) => {
|
|
27
43
|
if (nextRoute) {
|
|
28
44
|
sessionStorage.setItem('nextRoute', nextRoute);
|
|
@@ -31,134 +47,109 @@ class AuthService {
|
|
|
31
47
|
redirectUri: window.location.origin + '/auth-callback',
|
|
32
48
|
});
|
|
33
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* Logs the user out of the application.
|
|
52
|
+
* @param options - Optional logout options.
|
|
53
|
+
*/
|
|
34
54
|
logout = (options) => this.keycloak.logout(options);
|
|
35
55
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* Is `true` if the user is authenticated, `false` otherwise.
|
|
56
|
+
* Signal indicating whether the user is authenticated.
|
|
57
|
+
* Returns `true` if authenticated, `false` otherwise.
|
|
39
58
|
*/
|
|
40
59
|
authenticated = computed(() => {
|
|
41
60
|
this.keycloakSignal();
|
|
42
61
|
return this.keycloak.authenticated;
|
|
43
62
|
});
|
|
44
63
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* The base64 encoded token that can be sent in the `Authorization` header in requests to services.
|
|
64
|
+
* Signal for the base64-encoded token used in the `Authorization` header.
|
|
48
65
|
*/
|
|
49
66
|
token = computed(() => {
|
|
50
67
|
this.keycloakSignal();
|
|
51
68
|
return this.keycloak.token;
|
|
52
69
|
});
|
|
53
70
|
/**
|
|
54
|
-
*
|
|
71
|
+
* Signal for the Bearer token, prefixed with "Bearer ".
|
|
55
72
|
*/
|
|
56
73
|
bearerToken = computed(() => (this.token() ? 'Bearer ' + this.token() : undefined));
|
|
57
74
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* The parsed token as a JavaScript object.
|
|
75
|
+
* Signal for the parsed token as a JavaScript object.
|
|
61
76
|
*/
|
|
62
77
|
tokenParsed = computed(() => {
|
|
63
78
|
this.keycloakSignal();
|
|
64
79
|
return this.keycloak.tokenParsed;
|
|
65
80
|
});
|
|
66
81
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* The user id.
|
|
82
|
+
* Signal for the user ID (Keycloak subject).
|
|
70
83
|
*/
|
|
71
84
|
userId = computed(() => {
|
|
72
85
|
this.keycloakSignal();
|
|
73
86
|
return this.keycloak.subject;
|
|
74
87
|
});
|
|
75
88
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* The base64 encoded ID token.
|
|
89
|
+
* Signal for the base64-encoded ID token.
|
|
79
90
|
*/
|
|
80
91
|
idToken = computed(() => {
|
|
81
92
|
this.keycloakSignal();
|
|
82
93
|
return this.keycloak.idToken;
|
|
83
94
|
});
|
|
84
95
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* The parsed id token as a JavaScript object.
|
|
96
|
+
* Signal for the parsed ID token as a JavaScript object.
|
|
88
97
|
*/
|
|
89
98
|
idTokenParsed = computed(() => {
|
|
90
99
|
this.keycloakSignal();
|
|
91
100
|
return this.keycloak.idTokenParsed;
|
|
92
101
|
});
|
|
93
102
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* The realm roles associated with the token.
|
|
103
|
+
* Signal for the realm roles associated with the token.
|
|
97
104
|
*/
|
|
98
105
|
realmAccess = computed(() => {
|
|
99
106
|
this.keycloakSignal();
|
|
100
107
|
return this.keycloak.realmAccess;
|
|
101
108
|
});
|
|
102
109
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* The resource roles associated with the token.
|
|
110
|
+
* Signal for the resource roles associated with the token.
|
|
106
111
|
*/
|
|
107
112
|
resourceAccess = computed(() => {
|
|
108
113
|
this.keycloakSignal();
|
|
109
114
|
return this.keycloak.resourceAccess;
|
|
110
115
|
});
|
|
111
116
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* The base64 encoded refresh token that can be used to retrieve a new token.
|
|
117
|
+
* Signal for the base64-encoded refresh token.
|
|
115
118
|
*/
|
|
116
119
|
refreshToken = computed(() => {
|
|
117
120
|
this.keycloakSignal();
|
|
118
121
|
return this.keycloak.refreshToken;
|
|
119
122
|
});
|
|
120
123
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* The parsed refresh token as a JavaScript object.
|
|
124
|
+
* Signal for the parsed refresh token as a JavaScript object.
|
|
124
125
|
*/
|
|
125
126
|
refreshTokenParsed = computed(() => {
|
|
126
127
|
this.keycloakSignal();
|
|
127
128
|
return this.keycloak.refreshTokenParsed;
|
|
128
129
|
});
|
|
129
130
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* The estimated time difference between the browser time and the Keycloak server in seconds.
|
|
133
|
-
* This value is just an estimation, but is accurate enough when determining if a token is expired or not.
|
|
131
|
+
* Signal for the estimated time difference between the browser and Keycloak server in seconds.
|
|
134
132
|
*/
|
|
135
133
|
timeSkew = computed(() => {
|
|
136
134
|
this.keycloakSignal();
|
|
137
135
|
return this.keycloak.timeSkew;
|
|
138
136
|
});
|
|
139
137
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* Response mode passed in init (default value is fragment).
|
|
138
|
+
* Signal for the response mode passed during initialization.
|
|
143
139
|
*/
|
|
144
140
|
responseMode = computed(() => {
|
|
145
141
|
this.keycloakSignal();
|
|
146
142
|
return this.keycloak.responseMode;
|
|
147
143
|
});
|
|
148
144
|
/**
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* Flow passed in init.
|
|
145
|
+
* Signal for the flow type used during initialization.
|
|
152
146
|
*/
|
|
153
147
|
flow = computed(() => {
|
|
154
148
|
this.keycloakSignal();
|
|
155
149
|
return this.keycloak.flow;
|
|
156
150
|
});
|
|
157
151
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
* Response type sent to Keycloak with login requests. This is determined based on the flow value used during initialization,
|
|
161
|
-
* but can be overridden by setting this value.
|
|
152
|
+
* Signal for the response type sent to Keycloak during login requests.
|
|
162
153
|
*/
|
|
163
154
|
responseType = computed(() => {
|
|
164
155
|
this.keycloakSignal();
|
|
@@ -198,6 +189,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
198
189
|
args: [{ selector: 'byu-header', imports: [RouterModule], template: "<header>\n <div class=\"top\" >\n <img class=\"logo\" src=\"/BYU_monogram_white@2x.png\" alt=\"BYU\">\n <div class=\"titles\"> \n <div class=\"breadcrumbs\">\n @for (breadcrumb of config()?.breadcrumbs; track breadcrumb.text){\n <a [href]=\"breadcrumb.path\" >{{ breadcrumb.text }}</a>\n }\n </div>\n <a [routerLink]=\"config()?.title?.path\" class=\"title\">{{ config()?.title?.text }}</a>\n <a [routerLink]=\"config()?.subtitle?.path\" class=\"subtitle\">{{ config()?.subtitle?.text }}</a>\n </div>\n <div class=\"signin\">\n <p>{{ this.auth.tokenParsed()?.['given_name'] ?? '' }}</p>\n <svg class=\"signin-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n <path fill=\"currentcolor\" d=\"M50 95c-26 0-34-18-34-18 3-12 8-18 17-18 5 5 10 7 17 7s12-2 17-7c9 0 14 6 17 18 0 0-7 18-34 18z\"></path>\n <circle cx=\"50\" cy=\"50\" r=\"45\" fill=\"none\" stroke=\"currentcolor\" stroke-width=\"10\"></circle>\n <circle fill=\"currentcolor\" cx=\"50\" cy=\"40\" r=\"20\"></circle>\n </svg>\n @if (auth.authenticated()) {\n <a class=\"signin-link\" (click)=\"auth.logout()\">Sign Out</a>\n } @else {\n <a class=\"signin-link\" (click)=\"auth.login()\">Sign In</a>\n }\n </div>\n </div>\n <div class=\"bottom\">\n <nav>\n @for (menuItem of config()?.menu; track menuItem.text){>\n @if (isHeaderLink(menuItem)) {\n <li class = \"nav-item\">\n <a class=\"nav-item-content\" [routerLink]=\"menuItem.path\">{{ menuItem.text }}</a>\n </li>\n } @else {\n <li class=\"nav-item dropdown\" (click)=\"toggleDropdown(menuItem.text)\">\n <div class=\"nav-item-content\" >{{ menuItem.text }}</div>\n @if (openDropdownText === menuItem.text) {\n <ul class = \"dropdown-item-menu\"> \n @for(dropItem of menuItem.items; track dropItem.text){\n <li class = \"dropdown-item\">\n <a class=\"dropdown-item-content\" [routerLink]=\"dropItem.path\">{{ dropItem.text }}</a>\n </li>\n }\n </ul>\n }\n </li>\n }\n }\n </nav>\n </div>\n</header>\n", styles: ["header{font-family:HCo Ringside Narrow SSm,Open Sans,Helvetica,Arial,sans-serif;color:#fff}header .top{background-color:#002e5d;display:flex;align-items:center;padding:13px 16px;gap:16px}header .top .logo{width:100px}header .top .titles{display:flex;flex-direction:column;gap:8px;padding-left:30px;border-left:1px solid rgba(255,255,255,.25)}header .top .titles .breadcrumbs{display:flex;flex-direction:row}header .top .titles .breadcrumbs a{color:#a6abb1;text-decoration:none;font-size:16px}header .top .titles .breadcrumbs a:not(:first-child){padding-left:10px}header .top .titles .breadcrumbs a:not(:last-child){padding-right:10px;border-right:1px solid rgba(255,255,255,.25)}header .top .titles .breadcrumbs a:hover{color:#fff}header .top .titles .title{color:inherit;font-size:24px;font-weight:500;text-decoration:none}header .top .titles .subtitle{color:inherit;font-size:16px;font-weight:500;text-decoration:none}header .top .signin{display:flex;align-items:center;gap:10px;font-size:16px;margin-left:auto}header .top .signin .signin-icon{display:flex;margin-left:auto;margin-right:0;align-items:center;height:20px;width:20px}header .top .signin .signin-link{color:#fff;text-decoration:none;cursor:pointer}header .bottom{box-shadow:0 3px 10px #ccc5c580}header .bottom nav{display:flex;flex-direction:row;padding-left:124px}header .bottom nav .nav-item{display:block;list-style:none;transition:all .25s;text-decoration:none}header .bottom nav .nav-item:hover{box-shadow:inset 0 -5px #002e5d;background-color:#f1f1f1}header .bottom nav .nav-item .nav-item-content{margin:5px;display:inline-block;padding:11px 22px;text-decoration:none;color:#002e5d}header .bottom nav .nav-item.dropdown{position:relative}header .bottom nav .nav-item.dropdown .dropdown-item-menu{position:absolute;background:#fff;z-index:1000;top:100%;width:min-content;margin:-5px;padding:0;box-shadow:0 3px 3px #ccc5c5bf}header .bottom nav .nav-item.dropdown .dropdown-item-menu .dropdown-item:hover{background-color:#f1f1f1}header .bottom nav .nav-item.dropdown .dropdown-item-menu .dropdown-item .dropdown-item-content{margin:10px;display:inline-block;text-decoration:none;text-wrap:nowrap;color:#002e5d;padding:11px 22px}\n"] }]
|
|
199
190
|
}] });
|
|
200
191
|
|
|
192
|
+
const debounced = (inputSignal, wait = 400) => {
|
|
193
|
+
const debouncedSignal = signal(inputSignal());
|
|
194
|
+
const setSignal = debounce((value) => debouncedSignal.set(value), wait);
|
|
195
|
+
effect(() => {
|
|
196
|
+
setSignal(inputSignal());
|
|
197
|
+
});
|
|
198
|
+
return debouncedSignal;
|
|
199
|
+
};
|
|
200
|
+
const debounce = (callback, wait) => {
|
|
201
|
+
let timeoutId;
|
|
202
|
+
return (...args) => {
|
|
203
|
+
window.clearTimeout(timeoutId);
|
|
204
|
+
timeoutId = window.setTimeout(() => {
|
|
205
|
+
callback(...args);
|
|
206
|
+
}, wait);
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
|
|
201
210
|
/**
|
|
202
211
|
* Reads the underlying value from a MaybeSignal.
|
|
203
212
|
*
|
|
@@ -368,23 +377,79 @@ fetchSignal.delete.text = createHelper('DELETE', textTransformer);
|
|
|
368
377
|
fetchSignal.delete.blob = createHelper('DELETE', blobTransformer);
|
|
369
378
|
fetchSignal.delete.arrayBuffer = createHelper('DELETE', arrayBufferTransformer);
|
|
370
379
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
380
|
+
class UserManagementComponent {
|
|
381
|
+
auth = inject(AuthService);
|
|
382
|
+
displayedColumns = [
|
|
383
|
+
'netId',
|
|
384
|
+
'preferredFirstName',
|
|
385
|
+
'preferredLastName',
|
|
386
|
+
'roles',
|
|
387
|
+
'accountType',
|
|
388
|
+
'created',
|
|
389
|
+
];
|
|
390
|
+
accountTypeOptions = ['NonBYU', 'Student', 'Employee'];
|
|
391
|
+
paginator;
|
|
392
|
+
sort;
|
|
393
|
+
search = signal('');
|
|
394
|
+
accountTypes = signal([
|
|
395
|
+
'NonBYU',
|
|
396
|
+
'Student',
|
|
397
|
+
'Employee',
|
|
398
|
+
]);
|
|
399
|
+
sortBy = signal('netId');
|
|
400
|
+
sortDirection = signal('asc');
|
|
401
|
+
pageCount = signal(5);
|
|
402
|
+
pageOffset = signal(0);
|
|
403
|
+
getUsers = fetchSignal(() => ({
|
|
404
|
+
url: '/api/user-management',
|
|
405
|
+
params: {
|
|
406
|
+
search: debounced(this.search)(),
|
|
407
|
+
account_types: this.accountTypes().join(','),
|
|
408
|
+
sort_by: this.sortBy(),
|
|
409
|
+
sort_direction: this.sortDirection(),
|
|
410
|
+
page_count: this.pageCount(),
|
|
411
|
+
page_offset: this.pageOffset(),
|
|
412
|
+
// created_after: this.createdAfter().toISOString(),
|
|
413
|
+
// created_before: this.createdBefore().toISOString(),
|
|
414
|
+
},
|
|
415
|
+
headers: {
|
|
416
|
+
Authorization: this.auth.bearerToken() ?? '',
|
|
417
|
+
},
|
|
418
|
+
}), true);
|
|
419
|
+
ngAfterViewInit() {
|
|
420
|
+
// write the observables from the sort and the paging to the signals
|
|
421
|
+
this.sort.sortChange.subscribe(({ active, direction }) => {
|
|
422
|
+
this.sortBy.set(active);
|
|
423
|
+
this.sortDirection.set(direction);
|
|
424
|
+
this.pageOffset.set(0);
|
|
425
|
+
this.paginator.pageIndex = 0;
|
|
426
|
+
});
|
|
427
|
+
this.paginator.page.subscribe(({ pageIndex, pageSize }) => {
|
|
428
|
+
this.pageOffset.set(pageIndex * pageSize);
|
|
429
|
+
this.pageCount.set(pageSize);
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: UserManagementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
433
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: UserManagementComponent, isStandalone: true, selector: "app-user-management", viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], ngImport: i0, template: "<mat-form-field>\n <mat-label>Search for User</mat-label>\n <input matInput [(ngModel)]=\"search\">\n</mat-form-field>\n<mat-form-field>\n <mat-label>Account Type</mat-label>\n <mat-select multiple [(ngModel)]=\"accountTypes\">\n @for (accountType of accountTypeOptions; track accountType) {\n <mat-option [value]=\"accountType\">{{accountType}}</mat-option>\n }\n </mat-select>\n</mat-form-field>\n\n<table mat-table [dataSource]=\"getUsers.persistentValue()?.data ?? []\" matSort matSortActive=\"netId\" matSortDisableClear matSortDirection=\"asc\">\n <!-- NetID Column -->\n <ng-container matColumnDef=\"netId\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>NetID</th>\n <td mat-cell *matCellDef=\"let user\">{{user.netId}}</td>\n </ng-container>\n\n <!-- First Name Column -->\n <ng-container matColumnDef=\"preferredFirstName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>First Name</th>\n <td mat-cell *matCellDef=\"let user\">{{user.preferredFirstName}}</td>\n </ng-container>\n\n <!-- Last Name Column -->\n <ng-container matColumnDef=\"preferredLastName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Last Name</th>\n <td mat-cell *matCellDef=\"let user\">{{user.preferredLastName}}</td>\n </ng-container>\n\n <!-- Roles Column -->\n <ng-container matColumnDef=\"roles\">\n <th mat-header-cell *matHeaderCellDef>Roles</th>\n <td mat-cell *matCellDef=\"let user\">{{user.roles.join(', ')}}</td>\n </ng-container>\n\n <!-- Account Type Column -->\n <ng-container matColumnDef=\"accountType\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Account Type</th>\n <td mat-cell *matCellDef=\"let user\">{{user.accountType}}</td>\n </ng-container>\n\n <!-- Created Column -->\n <ng-container matColumnDef=\"created\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n Created\n </th>\n <td mat-cell *matCellDef=\"let user\">{{user.created | date}}</td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n</table>\n\n<mat-paginator [length]=\"getUsers.persistentValue()?.totalCount\" [pageSize]=\"pageCount()\" [pageSizeOptions]=\"[5, 10, 20]\" showFirstLastButtons></mat-paginator>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i2.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i2.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i3.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] });
|
|
434
|
+
}
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: UserManagementComponent, decorators: [{
|
|
436
|
+
type: Component,
|
|
437
|
+
args: [{ selector: 'app-user-management', imports: [
|
|
438
|
+
MatTableModule,
|
|
439
|
+
MatSortModule,
|
|
440
|
+
MatPaginatorModule,
|
|
441
|
+
DatePipe,
|
|
442
|
+
FormsModule,
|
|
443
|
+
MatInputModule,
|
|
444
|
+
MatSelectModule,
|
|
445
|
+
], template: "<mat-form-field>\n <mat-label>Search for User</mat-label>\n <input matInput [(ngModel)]=\"search\">\n</mat-form-field>\n<mat-form-field>\n <mat-label>Account Type</mat-label>\n <mat-select multiple [(ngModel)]=\"accountTypes\">\n @for (accountType of accountTypeOptions; track accountType) {\n <mat-option [value]=\"accountType\">{{accountType}}</mat-option>\n }\n </mat-select>\n</mat-form-field>\n\n<table mat-table [dataSource]=\"getUsers.persistentValue()?.data ?? []\" matSort matSortActive=\"netId\" matSortDisableClear matSortDirection=\"asc\">\n <!-- NetID Column -->\n <ng-container matColumnDef=\"netId\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>NetID</th>\n <td mat-cell *matCellDef=\"let user\">{{user.netId}}</td>\n </ng-container>\n\n <!-- First Name Column -->\n <ng-container matColumnDef=\"preferredFirstName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>First Name</th>\n <td mat-cell *matCellDef=\"let user\">{{user.preferredFirstName}}</td>\n </ng-container>\n\n <!-- Last Name Column -->\n <ng-container matColumnDef=\"preferredLastName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Last Name</th>\n <td mat-cell *matCellDef=\"let user\">{{user.preferredLastName}}</td>\n </ng-container>\n\n <!-- Roles Column -->\n <ng-container matColumnDef=\"roles\">\n <th mat-header-cell *matHeaderCellDef>Roles</th>\n <td mat-cell *matCellDef=\"let user\">{{user.roles.join(', ')}}</td>\n </ng-container>\n\n <!-- Account Type Column -->\n <ng-container matColumnDef=\"accountType\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Account Type</th>\n <td mat-cell *matCellDef=\"let user\">{{user.accountType}}</td>\n </ng-container>\n\n <!-- Created Column -->\n <ng-container matColumnDef=\"created\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n Created\n </th>\n <td mat-cell *matCellDef=\"let user\">{{user.created | date}}</td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n</table>\n\n<mat-paginator [length]=\"getUsers.persistentValue()?.totalCount\" [pageSize]=\"pageCount()\" [pageSizeOptions]=\"[5, 10, 20]\" showFirstLastButtons></mat-paginator>\n" }]
|
|
446
|
+
}], propDecorators: { paginator: [{
|
|
447
|
+
type: ViewChild,
|
|
448
|
+
args: [MatPaginator]
|
|
449
|
+
}], sort: [{
|
|
450
|
+
type: ViewChild,
|
|
451
|
+
args: [MatSort]
|
|
452
|
+
}] } });
|
|
388
453
|
|
|
389
454
|
/**
|
|
390
455
|
* Components
|
|
@@ -394,5 +459,5 @@ const debounce = (callback, wait) => {
|
|
|
394
459
|
* Generated bundle index. Do not edit.
|
|
395
460
|
*/
|
|
396
461
|
|
|
397
|
-
export { AuthService, ByuFooterComponent, ByuHeaderComponent, debounced, fetchSignal, readMaybeSignal };
|
|
462
|
+
export { AuthService, ByuFooterComponent, ByuHeaderComponent, UserManagementComponent, debounced, fetchSignal, readMaybeSignal };
|
|
398
463
|
//# sourceMappingURL=fhss-web-team-frontend-utils.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fhss-web-team-frontend-utils.mjs","sources":["../../../projects/frontend-utils/src/lib/components/byu-footer/byu-footer.component.ts","../../../projects/frontend-utils/src/lib/components/byu-footer/byu-footer.component.html","../../../projects/frontend-utils/src/lib/services/auth/auth.service.ts","../../../projects/frontend-utils/src/lib/components/byu-header/byu-header.component.ts","../../../projects/frontend-utils/src/lib/components/byu-header/byu-header.component.html","../../../projects/frontend-utils/src/lib/signals/fetch-signal/fetch-signal.ts","../../../projects/frontend-utils/src/lib/signals/debounced/debounced.ts","../../../projects/frontend-utils/src/public-api.ts","../../../projects/frontend-utils/src/fhss-web-team-frontend-utils.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'byu-footer',\n imports: [],\n templateUrl: './byu-footer.component.html',\n styleUrl: './byu-footer.component.scss'\n})\nexport class ByuFooterComponent {\n currentYear: number = new Date().getFullYear(); // Automatically updates the year\n}\n","<footer>\n <p class=\"title\"><a href=\"https://www.byu.edu/\">BRIGHAM YOUNG UNIVERSITY</a></p>\n <p>Provo, UT 84602, USA | © {{ currentYear }} All rights reserved.</p>\n <p>\n <a href=\"https://privacy.byu.edu/privacy-notice\">Privacy Notice</a> |\n <a href=\"https://privacy.byu.edu/cookie-prefs\">Cookie Preferences</a>\n </p>\n</footer>\n \n\n","import { Injectable, inject, computed } from '@angular/core';\nimport { KEYCLOAK_EVENT_SIGNAL } from 'keycloak-angular';\nimport Keycloak, {\n KeycloakFlow,\n KeycloakLoginOptions,\n KeycloakLogoutOptions,\n KeycloakResourceAccess,\n KeycloakResponseMode,\n KeycloakResponseType,\n KeycloakRoles,\n KeycloakTokenParsed,\n} from 'keycloak-js';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * FIXME: Finish the wrapper for all properties and methods\n *\n * See https://www.keycloak.org/securing-apps/javascript-adapter\n */\nexport class AuthService {\n private keycloak = inject(Keycloak);\n private keycloakSignal = inject(KEYCLOAK_EVENT_SIGNAL);\n\n login = (nextRoute?: string) => {\n if (nextRoute) {\n sessionStorage.setItem('nextRoute', nextRoute);\n }\n this.keycloak.login({\n redirectUri: window.location.origin + '/auth-callback',\n });\n };\n logout = (options?: KeycloakLogoutOptions) => this.keycloak.logout(options);\n\n /**\n * A signal for the keycloak-js authenticated property\n *\n * Is `true` if the user is authenticated, `false` otherwise.\n */\n authenticated = computed<boolean | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.authenticated;\n });\n\n /**\n * A signal for the keycloak-js token property\n *\n * The base64 encoded token that can be sent in the `Authorization` header in requests to services.\n */\n token = computed<string | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.token;\n });\n\n /**\n * A signal that will return the Bearer Token for use in the Authorization header\n */\n bearerToken = computed<string | undefined>(() => (this.token() ? 'Bearer ' + this.token() : undefined));\n\n /**\n * A signal for the keycloak-js tokenParsed property\n *\n * The parsed token as a JavaScript object.\n */\n tokenParsed = computed<KeycloakTokenParsed | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.tokenParsed;\n });\n\n /**\n * A signal for the keycloak-js subject property\n *\n * The user id.\n */\n userId = computed<string | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.subject;\n });\n\n /**\n * A signal for the keycloak-js idToken property\n *\n * The base64 encoded ID token.\n */\n idToken = computed<string | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.idToken;\n });\n\n /**\n * A signal for the keycloak-js idTokenParsed property\n *\n * The parsed id token as a JavaScript object.\n */\n idTokenParsed = computed<KeycloakTokenParsed | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.idTokenParsed;\n });\n\n /**\n * A signal for the keycloak-js realmAccess property\n *\n * The realm roles associated with the token.\n */\n realmAccess = computed<KeycloakRoles | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.realmAccess;\n });\n\n /**\n * A signal for the keycloak-js resourceAccess property\n *\n * The resource roles associated with the token.\n */\n resourceAccess = computed<KeycloakResourceAccess | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.resourceAccess;\n });\n\n /**\n * A signal for the keycloak-js refreshToken property\n *\n * The base64 encoded refresh token that can be used to retrieve a new token.\n */\n refreshToken = computed<string | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.refreshToken;\n });\n\n /**\n * A signal for the keycloak-js refreshTokenParsed property\n *\n * The parsed refresh token as a JavaScript object.\n */\n refreshTokenParsed = computed<KeycloakTokenParsed | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.refreshTokenParsed;\n });\n\n /**\n * A signal for the keycloak-js timeSkew property\n *\n * The estimated time difference between the browser time and the Keycloak server in seconds.\n * This value is just an estimation, but is accurate enough when determining if a token is expired or not.\n */\n timeSkew = computed<number | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.timeSkew;\n });\n\n /**\n * A signal for the keycloak-js responseMode property\n *\n * Response mode passed in init (default value is fragment).\n */\n responseMode = computed<KeycloakResponseMode | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.responseMode;\n });\n\n /**\n * A signal for the keycloak-js flow property\n *\n * Flow passed in init.\n */\n flow = computed<KeycloakFlow | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.flow;\n });\n\n /**\n * A signal for the keycloak-js responseType property\n *\n * Response type sent to Keycloak with login requests. This is determined based on the flow value used during initialization,\n * but can be overridden by setting this value.\n */\n responseType = computed<KeycloakResponseType | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.responseType;\n });\n}\n","import { Component, input, inject } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { AuthService } from '../../services/auth/auth.service';\n\ntype HeaderLink = {\n text: string;\n path: string;\n};\n\n// A HeaderMenu can be either a simple link with path,\n// OR a menu group with nested items\ntype HeaderMenu = HeaderLink | {\n text: string;\n items: HeaderLink[];\n}\n\nexport type HeaderConfig = {\n title: HeaderLink;\n subtitle?: HeaderLink;\n breadcrumbs?: HeaderLink[];\n menu?: HeaderMenu[];\n}\n\n@Component({\n selector: 'byu-header',\n imports: [RouterModule],\n templateUrl: './byu-header.component.html',\n styleUrl: './byu-header.component.scss'\n})\nexport class ByuHeaderComponent {\n auth = inject(AuthService)\n config = input<HeaderConfig>();\n\n isHeaderLink(item: HeaderMenu): item is HeaderLink {\n return 'path' in item;\n }\n\n // Track which dropdown is open (null means none are open)\n openDropdownText: string | null = null;\n \n // Toggle function — if clicking the same dropdown, close it; otherwise open it\n toggleDropdown(text: string) {\n this.openDropdownText = this.openDropdownText === text ? null : text;\n }\n \n // Check if a given dropdown is currently open\n isOpen(text: string): boolean {\n return this.openDropdownText === text;\n }\n}\n","<header>\n <div class=\"top\" >\n <img class=\"logo\" src=\"/BYU_monogram_white@2x.png\" alt=\"BYU\">\n <div class=\"titles\"> \n <div class=\"breadcrumbs\">\n @for (breadcrumb of config()?.breadcrumbs; track breadcrumb.text){\n <a [href]=\"breadcrumb.path\" >{{ breadcrumb.text }}</a>\n }\n </div>\n <a [routerLink]=\"config()?.title?.path\" class=\"title\">{{ config()?.title?.text }}</a>\n <a [routerLink]=\"config()?.subtitle?.path\" class=\"subtitle\">{{ config()?.subtitle?.text }}</a>\n </div>\n <div class=\"signin\">\n <p>{{ this.auth.tokenParsed()?.['given_name'] ?? '' }}</p>\n <svg class=\"signin-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n <path fill=\"currentcolor\" d=\"M50 95c-26 0-34-18-34-18 3-12 8-18 17-18 5 5 10 7 17 7s12-2 17-7c9 0 14 6 17 18 0 0-7 18-34 18z\"></path>\n <circle cx=\"50\" cy=\"50\" r=\"45\" fill=\"none\" stroke=\"currentcolor\" stroke-width=\"10\"></circle>\n <circle fill=\"currentcolor\" cx=\"50\" cy=\"40\" r=\"20\"></circle>\n </svg>\n @if (auth.authenticated()) {\n <a class=\"signin-link\" (click)=\"auth.logout()\">Sign Out</a>\n } @else {\n <a class=\"signin-link\" (click)=\"auth.login()\">Sign In</a>\n }\n </div>\n </div>\n <div class=\"bottom\">\n <nav>\n @for (menuItem of config()?.menu; track menuItem.text){>\n @if (isHeaderLink(menuItem)) {\n <li class = \"nav-item\">\n <a class=\"nav-item-content\" [routerLink]=\"menuItem.path\">{{ menuItem.text }}</a>\n </li>\n } @else {\n <li class=\"nav-item dropdown\" (click)=\"toggleDropdown(menuItem.text)\">\n <div class=\"nav-item-content\" >{{ menuItem.text }}</div>\n @if (openDropdownText === menuItem.text) {\n <ul class = \"dropdown-item-menu\"> \n @for(dropItem of menuItem.items; track dropItem.text){\n <li class = \"dropdown-item\">\n <a class=\"dropdown-item-content\" [routerLink]=\"dropItem.path\">{{ dropItem.text }}</a>\n </li>\n }\n </ul>\n }\n </li>\n }\n }\n </nav>\n </div>\n</header>\n","import { computed, effect, signal, Signal } from '@angular/core';\n\n//\n// Generic utility types\n//\ntype JsonValue =\n | string\n | number\n | boolean\n | null\n | JsonArray\n | JsonObject;\ntype JsonObject = { [key: string]: JsonValue };\ntype JsonArray = JsonValue[];\ntype Json = JsonObject | JsonArray;\nexport type Maybe<T> = T | undefined | null;\ntype HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\ntype DefaultError = { code?: string, message?: string, details?: Json };\n\n/**\n * A value that may be a plain value of type `T` or a reactive `Signal<T>`.\n *\n * This is useful in APIs that accept either static or reactive values,\n * allowing flexibility while maintaining type safety.\n *\n * Use `unwrapSignal` to extract the underlying value in a uniform way.\n *\n * @template T The underlying value type.\n */\nexport type MaybeSignal<T> = T | Signal<T>;\n/**\n * Reads the underlying value from a MaybeSignal.\n *\n * This function is designed for use with reactive APIs (like fetchSignal) where it's important\n * that Angular's computed methods register the dependency. If the input is a Signal, invoking it \n * not only returns its current value but also tracks the signal for reactivity. If the input is \n * a plain value, it simply returns that value.\n *\n * @template T The type of the value.\n * @param value A plain value or a Signal that yields the value.\n * @returns The current value, with dependency tracking enabled if the input is a Signal.\n */\nexport function readMaybeSignal<T>(value: MaybeSignal<T>): T {\n return typeof value === 'function' ? (value as Function)() : value;\n}\n\n//\n// Fetch Request\n//\ntype FetchSignalRequest = {\n url: string;\n body?: unknown;\n params?: Record<string, string | number | boolean | undefined>;\n headers?: Record<string, string>;\n};\n\n//\n// A function that transforms the raw fetch Response to the desired type.\n//\ntype ResponseTransformer<T> = (response: Response) => Promise<T>;\n\n/**\n * Represents the reactive result of an HTTP fetch request.\n */\nexport type FetchSignal<Response, Error = DefaultError> = {\n value: Signal<Maybe<Response>>;\n persistentValue: Signal<Maybe<Response>>;\n isLoading: Signal<boolean>;\n error: Signal<Maybe<Error>>;\n statusCode: Signal<Maybe<number>>;\n headers: Signal<Maybe<Record<string, string>>>;\n refresh: (abortSignal?: AbortSignal) => void;\n};\n\n/**\n * Creates a reactive fetch signal.\n *\n * The request function can include Signals for properties. These are unwrapped in the refresh function.\n */\nfunction createFetchSignal<Response, Error>(\n request: () => (FetchSignalRequest),\n method: HttpMethod,\n transform: ResponseTransformer<Response>,\n autoRefresh: Boolean\n): FetchSignal<Response, Error> {\n // Use a computed signal so that any changes to Signals in the request object trigger updates.\n const currentRequest = computed(request);\n\n const value = signal<Maybe<Response>>(undefined);\n const persistentValue = signal<Maybe<Response>>(undefined);\n const isLoading = signal<boolean>(false);\n const error = signal<Maybe<Error>>(undefined);\n const statusCode = signal<Maybe<number>>(undefined);\n const headers = signal<Maybe<Record<string, string>>>(undefined);\n\n const refresh = async (abortSignal?: AbortSignal) => {\n // Reset signals for a fresh request.\n value.set(undefined);\n isLoading.set(true);\n error.set(undefined);\n statusCode.set(undefined);\n headers.set(undefined);\n\n // Unwrap the current request.\n const req = currentRequest();\n const url = req.url;\n const params = req.params\n const requestHeaders = req.headers;\n const body = req.body;\n\n // Build URL with query parameters.\n let uri = url;\n if (params) {\n const searchParams = new URLSearchParams();\n for (const key in params) {\n if (params[key] !== undefined) searchParams.append(key, String(params[key]));\n }\n uri += (uri.includes('?') ? '&' : '?') + searchParams.toString();\n }\n\n try {\n const response = await fetch(uri, {\n method,\n headers: requestHeaders,\n // Only include a body if one is provided.\n body: body !== undefined ? JSON.stringify(body) : undefined,\n signal: abortSignal\n });\n\n statusCode.set(response.status);\n\n // Extract response headers.\n const headersObj: Record<string, string> = {};\n response.headers.forEach((val, key) => {\n headersObj[key] = val;\n });\n headers.set(headersObj);\n\n // if the response is ok, transform the body\n if (response.ok) {\n value.set(await transform(response));\n error.set(null);\n } else {\n // try to parse the error as json\n // set the error to null if this fails\n try { error.set(await response.json()) }\n catch { error.set(null) }\n finally { value.set(null) }\n }\n } catch (err: any) {\n // if the request is aborted, ignore the error\n if (err.name !== 'AbortError') {\n console.error(err);\n }\n error.set(null);\n value.set(null);\n } finally {\n persistentValue.set(value());\n isLoading.set(false);\n }\n };\n\n if (autoRefresh) {\n effect((onCleanup) => {\n // read the current request to trigger re-run of this effect\n currentRequest();\n\n // pass abort signal to refresh on cleanup of effect\n const controller = new AbortController();\n onCleanup(() => controller.abort());\n\n // call refresh with this abort controller\n refresh(controller.signal);\n })\n }\n\n return { value, persistentValue, isLoading, error, statusCode, headers, refresh };\n}\n\n\n//\n// The chainable API factory type.\n// Note that the default fetchSignal() (and its .json, etc.) are for GET,\n// while .post, .put, .patch require a request with a body.\n// The .delete chain is similar to GET in that no body is expected.\n//\ntype FetchSignalFactory = {\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n\n get: {\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n };\n\n post: {\n /**\n * Initiates a reactive HTTP POST request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP POST request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP POST request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP POST request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP POST request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP POST request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP POST request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP POST request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP POST request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP POST request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n };\n\n put: {\n /**\n * Initiates a reactive HTTP PUT request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PUT request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PUT request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PUT request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PUT request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PUT request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n };\n\n patch: {\n /**\n * Initiates a reactive HTTP PATCH request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PATCH request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PATCH request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PATCH request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PATCH request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PATCH request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n };\n\n delete: {\n /**\n * Initiates a reactive HTTP DELETE request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP DELETE request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP DELETE request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP DELETE request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP DELETE request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP DELETE request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n };\n};\n\n\n//\n// Helpers for attaching response transforms for GET/DELETE (which don’t include a body).\n//\nconst createHelper = <Response, Error>(\n method: HttpMethod,\n transform: ResponseTransformer<Response>\n) => (request: () => FetchSignalRequest, autoRefresh: boolean = false): FetchSignal<Response, Error> =>\n createFetchSignal<Response, Error>(request, method, transform, autoRefresh);\n\n// Transforms\nconst jsonTransformer = (response: Response) => response.json();\nconst textTransformer = (response: Response) => response.text();\nconst blobTransformer = (response: Response) => response.blob();\nconst arrayBufferTransformer = (response: Response) => response.arrayBuffer();\n\n//\n// Build the defaults - GET chain\n//\nconst fetchSignal = createHelper('GET', jsonTransformer) as FetchSignalFactory;\nfetchSignal.json = createHelper('GET', jsonTransformer);\nfetchSignal.text = createHelper('GET', textTransformer);\nfetchSignal.blob = createHelper('GET', blobTransformer);\nfetchSignal.arrayBuffer = createHelper('GET', arrayBufferTransformer);\n\n//\n// Build the GET chain\n//\nfetchSignal.get = createHelper('GET', jsonTransformer) as FetchSignalFactory['get'];\nfetchSignal.get.json = createHelper('GET', jsonTransformer);\nfetchSignal.get.text = createHelper('GET', textTransformer);\nfetchSignal.get.blob = createHelper('GET', blobTransformer);\nfetchSignal.get.arrayBuffer = createHelper('GET', arrayBufferTransformer);\n\n//\n// Build the POST chain.\n//\nfetchSignal.post = createHelper('POST', jsonTransformer) as FetchSignalFactory['post'];\nfetchSignal.post.json = createHelper('POST', jsonTransformer);\nfetchSignal.post.text = createHelper('POST', textTransformer);\nfetchSignal.post.blob = createHelper('POST', blobTransformer);\nfetchSignal.post.arrayBuffer = createHelper('POST', arrayBufferTransformer);\n\n//\n// Build the PUT chain.\n//\nfetchSignal.put = createHelper('PUT', jsonTransformer) as FetchSignalFactory['put'];\nfetchSignal.put.json = createHelper('PUT', jsonTransformer);\nfetchSignal.put.text = createHelper('PUT', textTransformer);\nfetchSignal.put.blob = createHelper('PUT', blobTransformer);\nfetchSignal.put.arrayBuffer = createHelper('PUT', arrayBufferTransformer);\n\n//\n// Build the PATCH chain.\n//\nfetchSignal.patch = createHelper('PATCH', jsonTransformer) as FetchSignalFactory['patch'];\nfetchSignal.patch.json = createHelper('PATCH', jsonTransformer);\nfetchSignal.patch.text = createHelper('PATCH', textTransformer);\nfetchSignal.patch.blob = createHelper('PATCH', blobTransformer);\nfetchSignal.patch.arrayBuffer = createHelper('PATCH', arrayBufferTransformer);\n\n//\n// Build the DELETE chain\n//\nfetchSignal.delete = createHelper('DELETE', jsonTransformer) as FetchSignalFactory['delete'];\nfetchSignal.delete.json = createHelper('DELETE', jsonTransformer);\nfetchSignal.delete.text = createHelper('DELETE', textTransformer);\nfetchSignal.delete.blob = createHelper('DELETE', blobTransformer);\nfetchSignal.delete.arrayBuffer = createHelper('DELETE', arrayBufferTransformer);\n\nexport { fetchSignal };\n","import { effect, signal, Signal } from \"@angular/core\";\n\nexport const debounced = <T>(inputSignal: Signal<T>, wait: number = 400) => {\n const debouncedSignal = signal<T>(inputSignal());\n const setSignal = debounce((value) => debouncedSignal.set(value), wait);\n\n effect(() => {\n setSignal(inputSignal())\n })\n\n return debouncedSignal;\n}\n\nconst debounce = (callback: (...args: any[]) => void, wait: number) => {\n let timeoutId: number | undefined;\n return (...args: any[]) => {\n window.clearTimeout(timeoutId);\n timeoutId = window.setTimeout(() => {\n callback(...args);\n }, wait);\n };\n}","/**\n * Components\n */\nexport * from './lib/components/byu-footer/byu-footer.component'\nexport * from './lib/components/byu-header/byu-header.component'\n\n/**\n * Services\n */\nexport * from './lib/services/auth/auth.service'\n\n/**\n * Signals\n */\nexport * from './lib/signals/fetch-signal/fetch-signal'\nexport * from './lib/signals/debounced/debounced'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAQa,kBAAkB,CAAA;IAC7B,WAAW,GAAW,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;uGADpC,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,sECR/B,6WAUA,EAAA,MAAA,EAAA,CAAA,+cAAA,CAAA,EAAA,CAAA;;2FDFa,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,WACb,EAAE,EAAA,QAAA,EAAA,6WAAA,EAAA,MAAA,EAAA,CAAA,+cAAA,CAAA,EAAA;;;AEYb;;;;AAIG;MACU,WAAW,CAAA;AACd,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,IAAA,cAAc,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAEtD,IAAA,KAAK,GAAG,CAAC,SAAkB,KAAI;QAC7B,IAAI,SAAS,EAAE;AACb,YAAA,cAAc,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC;;AAEhD,QAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;AAClB,YAAA,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,gBAAgB;AACv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end-utils.mjs","sources":["../../../projects/frontend-utils/src/lib/components/byu-footer/byu-footer.component.ts","../../../projects/frontend-utils/src/lib/components/byu-footer/byu-footer.component.html","../../../projects/frontend-utils/src/lib/services/auth/auth.service.ts","../../../projects/frontend-utils/src/lib/components/byu-header/byu-header.component.ts","../../../projects/frontend-utils/src/lib/components/byu-header/byu-header.component.html","../../../projects/frontend-utils/src/lib/signals/debounced/debounced.ts","../../../projects/frontend-utils/src/lib/signals/fetch-signal/fetch-signal.ts","../../../projects/frontend-utils/src/lib/components/user-management/user-management.component.ts","../../../projects/frontend-utils/src/lib/components/user-management/user-management.component.html","../../../projects/frontend-utils/src/public-api.ts","../../../projects/frontend-utils/src/fhss-web-team-frontend-utils.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'byu-footer',\n imports: [],\n templateUrl: './byu-footer.component.html',\n styleUrl: './byu-footer.component.scss'\n})\nexport class ByuFooterComponent {\n currentYear: number = new Date().getFullYear(); // Automatically updates the year\n}\n","<footer>\n <p class=\"title\"><a href=\"https://www.byu.edu/\">BRIGHAM YOUNG UNIVERSITY</a></p>\n <p>Provo, UT 84602, USA | © {{ currentYear }} All rights reserved.</p>\n <p>\n <a href=\"https://privacy.byu.edu/privacy-notice\">Privacy Notice</a> |\n <a href=\"https://privacy.byu.edu/cookie-prefs\">Cookie Preferences</a>\n </p>\n</footer>\n \n\n","import { Injectable, inject, computed } from '@angular/core';\nimport { KEYCLOAK_EVENT_SIGNAL } from 'keycloak-angular';\nimport Keycloak, {\n KeycloakFlow,\n KeycloakLoginOptions,\n KeycloakLogoutOptions,\n KeycloakResourceAccess,\n KeycloakResponseMode,\n KeycloakResponseType,\n KeycloakRoles,\n KeycloakTokenParsed,\n} from 'keycloak-js';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * AuthService provides a wrapper around the Keycloak JavaScript adapter, exposing its properties and methods\n * as Angular signals for reactive programming. It simplifies authentication, token management, and role-based access control.\n */\nexport class AuthService {\n private keycloak = inject(Keycloak);\n private keycloakSignal = inject(KEYCLOAK_EVENT_SIGNAL);\n\n /**\n * Initiates the login process. Optionally stores a route to redirect to after login.\n * @param nextRoute - The route to navigate to after successful login.\n */\n login = (nextRoute?: string) => {\n if (nextRoute) {\n sessionStorage.setItem('nextRoute', nextRoute);\n }\n this.keycloak.login({\n redirectUri: window.location.origin + '/auth-callback',\n });\n };\n\n /**\n * Logs the user out of the application.\n * @param options - Optional logout options.\n */\n logout = (options?: KeycloakLogoutOptions) => this.keycloak.logout(options);\n\n /**\n * Signal indicating whether the user is authenticated.\n * Returns `true` if authenticated, `false` otherwise.\n */\n authenticated = computed<boolean | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.authenticated;\n });\n\n /**\n * Signal for the base64-encoded token used in the `Authorization` header.\n */\n token = computed<string | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.token;\n });\n\n /**\n * Signal for the Bearer token, prefixed with \"Bearer \".\n */\n bearerToken = computed<string | undefined>(() => (this.token() ? 'Bearer ' + this.token() : undefined));\n\n /**\n * Signal for the parsed token as a JavaScript object.\n */\n tokenParsed = computed<KeycloakTokenParsed | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.tokenParsed;\n });\n\n /**\n * Signal for the user ID (Keycloak subject).\n */\n userId = computed<string | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.subject;\n });\n\n /**\n * Signal for the base64-encoded ID token.\n */\n idToken = computed<string | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.idToken;\n });\n\n /**\n * Signal for the parsed ID token as a JavaScript object.\n */\n idTokenParsed = computed<KeycloakTokenParsed | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.idTokenParsed;\n });\n\n /**\n * Signal for the realm roles associated with the token.\n */\n realmAccess = computed<KeycloakRoles | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.realmAccess;\n });\n\n /**\n * Signal for the resource roles associated with the token.\n */\n resourceAccess = computed<KeycloakResourceAccess | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.resourceAccess;\n });\n\n /**\n * Signal for the base64-encoded refresh token.\n */\n refreshToken = computed<string | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.refreshToken;\n });\n\n /**\n * Signal for the parsed refresh token as a JavaScript object.\n */\n refreshTokenParsed = computed<KeycloakTokenParsed | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.refreshTokenParsed;\n });\n\n /**\n * Signal for the estimated time difference between the browser and Keycloak server in seconds.\n */\n timeSkew = computed<number | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.timeSkew;\n });\n\n /**\n * Signal for the response mode passed during initialization.\n */\n responseMode = computed<KeycloakResponseMode | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.responseMode;\n });\n\n /**\n * Signal for the flow type used during initialization.\n */\n flow = computed<KeycloakFlow | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.flow;\n });\n\n /**\n * Signal for the response type sent to Keycloak during login requests.\n */\n responseType = computed<KeycloakResponseType | undefined>(() => {\n this.keycloakSignal();\n return this.keycloak.responseType;\n });\n}\n","import { Component, input, inject } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { AuthService } from '../../services/auth/auth.service';\n\ntype HeaderLink = {\n text: string;\n path: string;\n};\n\n// A HeaderMenu can be either a simple link with path,\n// OR a menu group with nested items\ntype HeaderMenu = HeaderLink | {\n text: string;\n items: HeaderLink[];\n}\n\nexport type HeaderConfig = {\n title: HeaderLink;\n subtitle?: HeaderLink;\n breadcrumbs?: HeaderLink[];\n menu?: HeaderMenu[];\n}\n\n@Component({\n selector: 'byu-header',\n imports: [RouterModule],\n templateUrl: './byu-header.component.html',\n styleUrl: './byu-header.component.scss'\n})\nexport class ByuHeaderComponent {\n auth = inject(AuthService)\n config = input<HeaderConfig>();\n\n isHeaderLink(item: HeaderMenu): item is HeaderLink {\n return 'path' in item;\n }\n\n // Track which dropdown is open (null means none are open)\n openDropdownText: string | null = null;\n \n // Toggle function — if clicking the same dropdown, close it; otherwise open it\n toggleDropdown(text: string) {\n this.openDropdownText = this.openDropdownText === text ? null : text;\n }\n \n // Check if a given dropdown is currently open\n isOpen(text: string): boolean {\n return this.openDropdownText === text;\n }\n}\n","<header>\n <div class=\"top\" >\n <img class=\"logo\" src=\"/BYU_monogram_white@2x.png\" alt=\"BYU\">\n <div class=\"titles\"> \n <div class=\"breadcrumbs\">\n @for (breadcrumb of config()?.breadcrumbs; track breadcrumb.text){\n <a [href]=\"breadcrumb.path\" >{{ breadcrumb.text }}</a>\n }\n </div>\n <a [routerLink]=\"config()?.title?.path\" class=\"title\">{{ config()?.title?.text }}</a>\n <a [routerLink]=\"config()?.subtitle?.path\" class=\"subtitle\">{{ config()?.subtitle?.text }}</a>\n </div>\n <div class=\"signin\">\n <p>{{ this.auth.tokenParsed()?.['given_name'] ?? '' }}</p>\n <svg class=\"signin-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n <path fill=\"currentcolor\" d=\"M50 95c-26 0-34-18-34-18 3-12 8-18 17-18 5 5 10 7 17 7s12-2 17-7c9 0 14 6 17 18 0 0-7 18-34 18z\"></path>\n <circle cx=\"50\" cy=\"50\" r=\"45\" fill=\"none\" stroke=\"currentcolor\" stroke-width=\"10\"></circle>\n <circle fill=\"currentcolor\" cx=\"50\" cy=\"40\" r=\"20\"></circle>\n </svg>\n @if (auth.authenticated()) {\n <a class=\"signin-link\" (click)=\"auth.logout()\">Sign Out</a>\n } @else {\n <a class=\"signin-link\" (click)=\"auth.login()\">Sign In</a>\n }\n </div>\n </div>\n <div class=\"bottom\">\n <nav>\n @for (menuItem of config()?.menu; track menuItem.text){>\n @if (isHeaderLink(menuItem)) {\n <li class = \"nav-item\">\n <a class=\"nav-item-content\" [routerLink]=\"menuItem.path\">{{ menuItem.text }}</a>\n </li>\n } @else {\n <li class=\"nav-item dropdown\" (click)=\"toggleDropdown(menuItem.text)\">\n <div class=\"nav-item-content\" >{{ menuItem.text }}</div>\n @if (openDropdownText === menuItem.text) {\n <ul class = \"dropdown-item-menu\"> \n @for(dropItem of menuItem.items; track dropItem.text){\n <li class = \"dropdown-item\">\n <a class=\"dropdown-item-content\" [routerLink]=\"dropItem.path\">{{ dropItem.text }}</a>\n </li>\n }\n </ul>\n }\n </li>\n }\n }\n </nav>\n </div>\n</header>\n","import { effect, signal, Signal } from \"@angular/core\";\n\nexport const debounced = <T>(inputSignal: Signal<T>, wait: number = 400) => {\n const debouncedSignal = signal<T>(inputSignal());\n const setSignal = debounce((value) => debouncedSignal.set(value), wait);\n\n effect(() => {\n setSignal(inputSignal())\n })\n\n return debouncedSignal;\n}\n\nconst debounce = (callback: (...args: any[]) => void, wait: number) => {\n let timeoutId: number | undefined;\n return (...args: any[]) => {\n window.clearTimeout(timeoutId);\n timeoutId = window.setTimeout(() => {\n callback(...args);\n }, wait);\n };\n}","import { computed, effect, signal, Signal } from '@angular/core';\n\n//\n// Generic utility types\n//\ntype JsonValue =\n | string\n | number\n | boolean\n | null\n | JsonArray\n | JsonObject;\nexport type JsonObject = { [key: string]: JsonValue }; // this is exported because the builder's typing gets mad if it isn't\ntype JsonArray = JsonValue[];\ntype Json = JsonObject | JsonArray;\nexport type Maybe<T> = T | undefined | null;\ntype HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\ntype DefaultError = { code?: string, message?: string, details?: Json };\n\n/**\n * A value that may be a plain value of type `T` or a reactive `Signal<T>`.\n *\n * This is useful in APIs that accept either static or reactive values,\n * allowing flexibility while maintaining type safety.\n *\n * Use `unwrapSignal` to extract the underlying value in a uniform way.\n *\n * @template T The underlying value type.\n */\nexport type MaybeSignal<T> = T | Signal<T>;\n/**\n * Reads the underlying value from a MaybeSignal.\n *\n * This function is designed for use with reactive APIs (like fetchSignal) where it's important\n * that Angular's computed methods register the dependency. If the input is a Signal, invoking it \n * not only returns its current value but also tracks the signal for reactivity. If the input is \n * a plain value, it simply returns that value.\n *\n * @template T The type of the value.\n * @param value A plain value or a Signal that yields the value.\n * @returns The current value, with dependency tracking enabled if the input is a Signal.\n */\nexport function readMaybeSignal<T>(value: MaybeSignal<T>): T {\n return typeof value === 'function' ? (value as Function)() : value;\n}\n\n//\n// Fetch Request\n//\ntype FetchSignalRequest = {\n url: string;\n body?: unknown;\n params?: Record<string, string | number | boolean | undefined>;\n headers?: Record<string, string>;\n};\n\n//\n// A function that transforms the raw fetch Response to the desired type.\n//\ntype ResponseTransformer<T> = (response: Response) => Promise<T>;\n\n/**\n * Represents the reactive result of an HTTP fetch request.\n */\nexport type FetchSignal<Response, Error = DefaultError> = {\n value: Signal<Maybe<Response>>;\n persistentValue: Signal<Maybe<Response>>;\n isLoading: Signal<boolean>;\n error: Signal<Maybe<Error>>;\n statusCode: Signal<Maybe<number>>;\n headers: Signal<Maybe<Record<string, string>>>;\n refresh: (abortSignal?: AbortSignal) => void;\n};\n\n/**\n * Creates a reactive fetch signal.\n *\n * The request function can include Signals for properties. These are unwrapped in the refresh function.\n */\nfunction createFetchSignal<Response, Error>(\n request: () => (FetchSignalRequest),\n method: HttpMethod,\n transform: ResponseTransformer<Response>,\n autoRefresh: Boolean\n): FetchSignal<Response, Error> {\n // Use a computed signal so that any changes to Signals in the request object trigger updates.\n const currentRequest = computed(request);\n\n const value = signal<Maybe<Response>>(undefined);\n const persistentValue = signal<Maybe<Response>>(undefined);\n const isLoading = signal<boolean>(false);\n const error = signal<Maybe<Error>>(undefined);\n const statusCode = signal<Maybe<number>>(undefined);\n const headers = signal<Maybe<Record<string, string>>>(undefined);\n\n const refresh = async (abortSignal?: AbortSignal) => {\n // Reset signals for a fresh request.\n value.set(undefined);\n isLoading.set(true);\n error.set(undefined);\n statusCode.set(undefined);\n headers.set(undefined);\n\n // Unwrap the current request.\n const req = currentRequest();\n const url = req.url;\n const params = req.params\n const requestHeaders = req.headers;\n const body = req.body;\n\n // Build URL with query parameters.\n let uri = url;\n if (params) {\n const searchParams = new URLSearchParams();\n for (const key in params) {\n if (params[key] !== undefined) searchParams.append(key, String(params[key]));\n }\n uri += (uri.includes('?') ? '&' : '?') + searchParams.toString();\n }\n\n try {\n const response = await fetch(uri, {\n method,\n headers: requestHeaders,\n // Only include a body if one is provided.\n body: body !== undefined ? JSON.stringify(body) : undefined,\n signal: abortSignal\n });\n\n statusCode.set(response.status);\n\n // Extract response headers.\n const headersObj: Record<string, string> = {};\n response.headers.forEach((val, key) => {\n headersObj[key] = val;\n });\n headers.set(headersObj);\n\n // if the response is ok, transform the body\n if (response.ok) {\n value.set(await transform(response));\n error.set(null);\n } else {\n // try to parse the error as json\n // set the error to null if this fails\n try { error.set(await response.json()) }\n catch { error.set(null) }\n finally { value.set(null) }\n }\n } catch (err: any) {\n // if the request is aborted, ignore the error\n if (err.name !== 'AbortError') {\n console.error(err);\n }\n error.set(null);\n value.set(null);\n } finally {\n persistentValue.set(value());\n isLoading.set(false);\n }\n };\n\n if (autoRefresh) {\n effect((onCleanup) => {\n // read the current request to trigger re-run of this effect\n currentRequest();\n\n // pass abort signal to refresh on cleanup of effect\n const controller = new AbortController();\n onCleanup(() => controller.abort());\n\n // call refresh with this abort controller\n refresh(controller.signal);\n })\n }\n\n return { value, persistentValue, isLoading, error, statusCode, headers, refresh };\n}\n\n\n//\n// The chainable API factory type.\n// Note that the default fetchSignal() (and its .json, etc.) are for GET,\n// while .post, .put, .patch require a request with a body.\n// The .delete chain is similar to GET in that no body is expected.\n//\ntype FetchSignalFactory = {\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n\n get: {\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP GET request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP GET request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n };\n\n post: {\n /**\n * Initiates a reactive HTTP POST request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP POST request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP POST request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP POST request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP POST request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP POST request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP POST request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP POST request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP POST request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP POST request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n };\n\n put: {\n /**\n * Initiates a reactive HTTP PUT request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PUT request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PUT request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PUT request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PUT request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PUT request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n };\n\n patch: {\n /**\n * Initiates a reactive HTTP PATCH request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PATCH request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PATCH request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PATCH request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PATCH request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP PATCH request, which must include a body.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n };\n\n delete: {\n /**\n * Initiates a reactive HTTP DELETE request using the provided request configuration.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP DELETE request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.\n */\n <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean): FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as JSON.\n *\n * @template Response - The expected response type.\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP DELETE request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the JSON-parsed response.\n */\n json: <Response extends Json, Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Response, Error>;\n\n /**\n * Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as plain text.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP DELETE request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the text response.\n */\n text: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<string, Error>;\n\n /**\n * Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as a Blob.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP DELETE request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the Blob response.\n */\n blob: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<Blob, Error>;\n\n /**\n * Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as an ArrayBuffer.\n *\n * @template Error - The expected error shape (defaults to `DefaultError`).\n * @param request - The configuration object for the HTTP DELETE request.\n * @param autoRefresh - whether or not the request should be automatically refreshed when the request input signals have changed value\n * @returns A `FetchSignal` object with the ArrayBuffer response.\n */\n arrayBuffer: <Error extends Json = DefaultError>(request: () => FetchSignalRequest, autoRefresh?: boolean) => FetchSignal<ArrayBuffer, Error>;\n };\n};\n\n\n//\n// Helpers for attaching response transforms for GET/DELETE (which don’t include a body).\n//\nconst createHelper = <Response, Error>(\n method: HttpMethod,\n transform: ResponseTransformer<Response>\n) => (request: () => FetchSignalRequest, autoRefresh: boolean = false): FetchSignal<Response, Error> =>\n createFetchSignal<Response, Error>(request, method, transform, autoRefresh);\n\n// Transforms\nconst jsonTransformer = (response: Response) => response.json();\nconst textTransformer = (response: Response) => response.text();\nconst blobTransformer = (response: Response) => response.blob();\nconst arrayBufferTransformer = (response: Response) => response.arrayBuffer();\n\n//\n// Build the defaults - GET chain\n//\nconst fetchSignal = createHelper('GET', jsonTransformer) as FetchSignalFactory;\nfetchSignal.json = createHelper('GET', jsonTransformer);\nfetchSignal.text = createHelper('GET', textTransformer);\nfetchSignal.blob = createHelper('GET', blobTransformer);\nfetchSignal.arrayBuffer = createHelper('GET', arrayBufferTransformer);\n\n//\n// Build the GET chain\n//\nfetchSignal.get = createHelper('GET', jsonTransformer) as FetchSignalFactory['get'];\nfetchSignal.get.json = createHelper('GET', jsonTransformer);\nfetchSignal.get.text = createHelper('GET', textTransformer);\nfetchSignal.get.blob = createHelper('GET', blobTransformer);\nfetchSignal.get.arrayBuffer = createHelper('GET', arrayBufferTransformer);\n\n//\n// Build the POST chain.\n//\nfetchSignal.post = createHelper('POST', jsonTransformer) as FetchSignalFactory['post'];\nfetchSignal.post.json = createHelper('POST', jsonTransformer);\nfetchSignal.post.text = createHelper('POST', textTransformer);\nfetchSignal.post.blob = createHelper('POST', blobTransformer);\nfetchSignal.post.arrayBuffer = createHelper('POST', arrayBufferTransformer);\n\n//\n// Build the PUT chain.\n//\nfetchSignal.put = createHelper('PUT', jsonTransformer) as FetchSignalFactory['put'];\nfetchSignal.put.json = createHelper('PUT', jsonTransformer);\nfetchSignal.put.text = createHelper('PUT', textTransformer);\nfetchSignal.put.blob = createHelper('PUT', blobTransformer);\nfetchSignal.put.arrayBuffer = createHelper('PUT', arrayBufferTransformer);\n\n//\n// Build the PATCH chain.\n//\nfetchSignal.patch = createHelper('PATCH', jsonTransformer) as FetchSignalFactory['patch'];\nfetchSignal.patch.json = createHelper('PATCH', jsonTransformer);\nfetchSignal.patch.text = createHelper('PATCH', textTransformer);\nfetchSignal.patch.blob = createHelper('PATCH', blobTransformer);\nfetchSignal.patch.arrayBuffer = createHelper('PATCH', arrayBufferTransformer);\n\n//\n// Build the DELETE chain\n//\nfetchSignal.delete = createHelper('DELETE', jsonTransformer) as FetchSignalFactory['delete'];\nfetchSignal.delete.json = createHelper('DELETE', jsonTransformer);\nfetchSignal.delete.text = createHelper('DELETE', textTransformer);\nfetchSignal.delete.blob = createHelper('DELETE', blobTransformer);\nfetchSignal.delete.arrayBuffer = createHelper('DELETE', arrayBufferTransformer);\n\nexport { fetchSignal };\n","import { Component, inject, Signal, signal, ViewChild } from '@angular/core';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';\nimport { MatSort, MatSortModule } from '@angular/material/sort';\nimport { DatePipe } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { debounced } from '../../signals/debounced/debounced';\nimport { AuthService } from '../../services/auth/auth.service';\nimport { fetchSignal } from '../../signals/fetch-signal/fetch-signal';\nimport { GetUsersAccountTypes, GetUsersResponse, GetUsersSortBy, GetUsersSortDirection } from './user-management.types';\n\n@Component({\n selector: 'app-user-management',\n imports: [\n MatTableModule,\n MatSortModule,\n MatPaginatorModule,\n DatePipe,\n FormsModule,\n MatInputModule,\n MatSelectModule,\n ],\n templateUrl: './user-management.component.html',\n styleUrl: './user-management.component.scss',\n})\nexport class UserManagementComponent {\n auth = inject(AuthService);\n\n displayedColumns: string[] = [\n 'netId',\n 'preferredFirstName',\n 'preferredLastName',\n 'roles',\n 'accountType',\n 'created',\n ];\n accountTypeOptions = ['NonBYU', 'Student', 'Employee'];\n\n @ViewChild(MatPaginator) paginator!: MatPaginator;\n @ViewChild(MatSort) sort!: MatSort;\n\n search = signal('');\n accountTypes = signal<GetUsersAccountTypes>([\n 'NonBYU',\n 'Student',\n 'Employee',\n ]);\n sortBy = signal<GetUsersSortBy>('netId');\n sortDirection = signal<GetUsersSortDirection>('asc');\n pageCount = signal(5);\n pageOffset = signal(0);\n\n getUsers = fetchSignal<GetUsersResponse>(\n () => ({\n url: '/api/user-management',\n params: {\n search: debounced(this.search)(),\n account_types: this.accountTypes().join(','),\n sort_by: this.sortBy(),\n sort_direction: this.sortDirection(),\n page_count: this.pageCount(),\n page_offset: this.pageOffset(),\n // created_after: this.createdAfter().toISOString(),\n // created_before: this.createdBefore().toISOString(),\n },\n headers: {\n Authorization: this.auth.bearerToken() ?? '',\n },\n }),\n true\n );\n\n ngAfterViewInit() {\n // write the observables from the sort and the paging to the signals\n this.sort.sortChange.subscribe(({ active, direction }) => {\n this.sortBy.set(active as GetUsersSortBy);\n this.sortDirection.set(direction);\n this.pageOffset.set(0);\n this.paginator.pageIndex = 0;\n });\n this.paginator.page.subscribe(({ pageIndex, pageSize }) => {\n this.pageOffset.set(pageIndex * pageSize);\n this.pageCount.set(pageSize);\n });\n }\n}\n","<mat-form-field>\n <mat-label>Search for User</mat-label>\n <input matInput [(ngModel)]=\"search\">\n</mat-form-field>\n<mat-form-field>\n <mat-label>Account Type</mat-label>\n <mat-select multiple [(ngModel)]=\"accountTypes\">\n @for (accountType of accountTypeOptions; track accountType) {\n <mat-option [value]=\"accountType\">{{accountType}}</mat-option>\n }\n </mat-select>\n</mat-form-field>\n\n<table mat-table [dataSource]=\"getUsers.persistentValue()?.data ?? []\" matSort matSortActive=\"netId\" matSortDisableClear matSortDirection=\"asc\">\n <!-- NetID Column -->\n <ng-container matColumnDef=\"netId\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>NetID</th>\n <td mat-cell *matCellDef=\"let user\">{{user.netId}}</td>\n </ng-container>\n\n <!-- First Name Column -->\n <ng-container matColumnDef=\"preferredFirstName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>First Name</th>\n <td mat-cell *matCellDef=\"let user\">{{user.preferredFirstName}}</td>\n </ng-container>\n\n <!-- Last Name Column -->\n <ng-container matColumnDef=\"preferredLastName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Last Name</th>\n <td mat-cell *matCellDef=\"let user\">{{user.preferredLastName}}</td>\n </ng-container>\n\n <!-- Roles Column -->\n <ng-container matColumnDef=\"roles\">\n <th mat-header-cell *matHeaderCellDef>Roles</th>\n <td mat-cell *matCellDef=\"let user\">{{user.roles.join(', ')}}</td>\n </ng-container>\n\n <!-- Account Type Column -->\n <ng-container matColumnDef=\"accountType\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Account Type</th>\n <td mat-cell *matCellDef=\"let user\">{{user.accountType}}</td>\n </ng-container>\n\n <!-- Created Column -->\n <ng-container matColumnDef=\"created\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n Created\n </th>\n <td mat-cell *matCellDef=\"let user\">{{user.created | date}}</td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n</table>\n\n<mat-paginator [length]=\"getUsers.persistentValue()?.totalCount\" [pageSize]=\"pageCount()\" [pageSizeOptions]=\"[5, 10, 20]\" showFirstLastButtons></mat-paginator>\n","/**\n * Components\n */\nexport * from './lib/components/byu-footer/byu-footer.component'\nexport * from './lib/components/byu-header/byu-header.component'\nexport * from './lib/components/user-management/user-management.component'\n\n/**\n * Services\n */\nexport * from './lib/services/auth/auth.service'\n\n/**\n * Signals\n */\nexport * from './lib/signals/fetch-signal/fetch-signal'\nexport * from './lib/signals/debounced/debounced'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;MAQa,kBAAkB,CAAA;IAC7B,WAAW,GAAW,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;uGADpC,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,sECR/B,6WAUA,EAAA,MAAA,EAAA,CAAA,+cAAA,CAAA,EAAA,CAAA;;2FDFa,kBAAkB,EAAA,UAAA,EAAA,C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AAA,sxEAAA,EAAA;8BAiBwB,SAAS,EAAA,CAAA;sBAAjC,SAAS;uBAAC,YAAY;gBACH,IAAI,EAAA,CAAA;sBAAvB,SAAS;uBAAC,OAAO;;;AEzCpB;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MatPaginator } from '@angular/material/paginator';
|
|
2
|
+
import { MatSort } from '@angular/material/sort';
|
|
3
|
+
import { AuthService } from '../../services/auth/auth.service';
|
|
4
|
+
import { GetUsersAccountTypes, GetUsersResponse, GetUsersSortBy, GetUsersSortDirection } from './user-management.types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class UserManagementComponent {
|
|
7
|
+
auth: AuthService;
|
|
8
|
+
displayedColumns: string[];
|
|
9
|
+
accountTypeOptions: string[];
|
|
10
|
+
paginator: MatPaginator;
|
|
11
|
+
sort: MatSort;
|
|
12
|
+
search: import("@angular/core").WritableSignal<string>;
|
|
13
|
+
accountTypes: import("@angular/core").WritableSignal<GetUsersAccountTypes>;
|
|
14
|
+
sortBy: import("@angular/core").WritableSignal<GetUsersSortBy>;
|
|
15
|
+
sortDirection: import("@angular/core").WritableSignal<GetUsersSortDirection>;
|
|
16
|
+
pageCount: import("@angular/core").WritableSignal<number>;
|
|
17
|
+
pageOffset: import("@angular/core").WritableSignal<number>;
|
|
18
|
+
getUsers: import("@fhss-web-team/frontend-utils").FetchSignal<GetUsersResponse, {
|
|
19
|
+
code?: string;
|
|
20
|
+
message?: string;
|
|
21
|
+
details?: (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | import("@fhss-web-team/frontend-utils").JsonObject | null)[] | import("@fhss-web-team/frontend-utils").JsonObject | null)[] | import("@fhss-web-team/frontend-utils").JsonObject | null)[] | import("@fhss-web-team/frontend-utils").JsonObject | null)[] | import("@fhss-web-team/frontend-utils").JsonObject | null)[] | import("@fhss-web-team/frontend-utils").JsonObject | null)[] | import("@fhss-web-team/frontend-utils").JsonObject | null)[] | import("@fhss-web-team/frontend-utils").JsonObject | null)[] | import("@fhss-web-team/frontend-utils").JsonObject | null)[] | import("@fhss-web-team/frontend-utils").JsonObject | null)[] | import("@fhss-web-team/frontend-utils").JsonObject | null)[] | import("@fhss-web-team/frontend-utils").JsonObject;
|
|
22
|
+
}>;
|
|
23
|
+
ngAfterViewInit(): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserManagementComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserManagementComponent, "app-user-management", never, {}, {}, never, never, true, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type GetUsersResponse = {
|
|
2
|
+
totalCount: number;
|
|
3
|
+
data: {
|
|
4
|
+
id: string;
|
|
5
|
+
netId: string;
|
|
6
|
+
accountType: string;
|
|
7
|
+
preferredFirstName: string;
|
|
8
|
+
preferredLastName: string;
|
|
9
|
+
roles: string[];
|
|
10
|
+
created: string;
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
export type GetUsersAccountTypes = ('NonBYU' | 'Student' | 'Employee')[];
|
|
14
|
+
export type GetUsersSortBy = 'netId' | 'accountType' | 'preferredFirstName' | 'preferredLastName' | 'created';
|
|
15
|
+
export type GetUsersSortDirection = 'asc' | 'desc' | '';
|
|
@@ -3,96 +3,75 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
export declare class AuthService {
|
|
4
4
|
private keycloak;
|
|
5
5
|
private keycloakSignal;
|
|
6
|
+
/**
|
|
7
|
+
* Initiates the login process. Optionally stores a route to redirect to after login.
|
|
8
|
+
* @param nextRoute - The route to navigate to after successful login.
|
|
9
|
+
*/
|
|
6
10
|
login: (nextRoute?: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Logs the user out of the application.
|
|
13
|
+
* @param options - Optional logout options.
|
|
14
|
+
*/
|
|
7
15
|
logout: (options?: KeycloakLogoutOptions) => Promise<void>;
|
|
8
16
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Is `true` if the user is authenticated, `false` otherwise.
|
|
17
|
+
* Signal indicating whether the user is authenticated.
|
|
18
|
+
* Returns `true` if authenticated, `false` otherwise.
|
|
12
19
|
*/
|
|
13
20
|
authenticated: import("@angular/core").Signal<boolean | undefined>;
|
|
14
21
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* The base64 encoded token that can be sent in the `Authorization` header in requests to services.
|
|
22
|
+
* Signal for the base64-encoded token used in the `Authorization` header.
|
|
18
23
|
*/
|
|
19
24
|
token: import("@angular/core").Signal<string | undefined>;
|
|
20
25
|
/**
|
|
21
|
-
*
|
|
26
|
+
* Signal for the Bearer token, prefixed with "Bearer ".
|
|
22
27
|
*/
|
|
23
28
|
bearerToken: import("@angular/core").Signal<string | undefined>;
|
|
24
29
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* The parsed token as a JavaScript object.
|
|
30
|
+
* Signal for the parsed token as a JavaScript object.
|
|
28
31
|
*/
|
|
29
32
|
tokenParsed: import("@angular/core").Signal<KeycloakTokenParsed | undefined>;
|
|
30
33
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* The user id.
|
|
34
|
+
* Signal for the user ID (Keycloak subject).
|
|
34
35
|
*/
|
|
35
36
|
userId: import("@angular/core").Signal<string | undefined>;
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* The base64 encoded ID token.
|
|
38
|
+
* Signal for the base64-encoded ID token.
|
|
40
39
|
*/
|
|
41
40
|
idToken: import("@angular/core").Signal<string | undefined>;
|
|
42
41
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* The parsed id token as a JavaScript object.
|
|
42
|
+
* Signal for the parsed ID token as a JavaScript object.
|
|
46
43
|
*/
|
|
47
44
|
idTokenParsed: import("@angular/core").Signal<KeycloakTokenParsed | undefined>;
|
|
48
45
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* The realm roles associated with the token.
|
|
46
|
+
* Signal for the realm roles associated with the token.
|
|
52
47
|
*/
|
|
53
48
|
realmAccess: import("@angular/core").Signal<KeycloakRoles | undefined>;
|
|
54
49
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* The resource roles associated with the token.
|
|
50
|
+
* Signal for the resource roles associated with the token.
|
|
58
51
|
*/
|
|
59
52
|
resourceAccess: import("@angular/core").Signal<KeycloakResourceAccess | undefined>;
|
|
60
53
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* The base64 encoded refresh token that can be used to retrieve a new token.
|
|
54
|
+
* Signal for the base64-encoded refresh token.
|
|
64
55
|
*/
|
|
65
56
|
refreshToken: import("@angular/core").Signal<string | undefined>;
|
|
66
57
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* The parsed refresh token as a JavaScript object.
|
|
58
|
+
* Signal for the parsed refresh token as a JavaScript object.
|
|
70
59
|
*/
|
|
71
60
|
refreshTokenParsed: import("@angular/core").Signal<KeycloakTokenParsed | undefined>;
|
|
72
61
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* The estimated time difference between the browser time and the Keycloak server in seconds.
|
|
76
|
-
* This value is just an estimation, but is accurate enough when determining if a token is expired or not.
|
|
62
|
+
* Signal for the estimated time difference between the browser and Keycloak server in seconds.
|
|
77
63
|
*/
|
|
78
64
|
timeSkew: import("@angular/core").Signal<number | undefined>;
|
|
79
65
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* Response mode passed in init (default value is fragment).
|
|
66
|
+
* Signal for the response mode passed during initialization.
|
|
83
67
|
*/
|
|
84
68
|
responseMode: import("@angular/core").Signal<KeycloakResponseMode | undefined>;
|
|
85
69
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* Flow passed in init.
|
|
70
|
+
* Signal for the flow type used during initialization.
|
|
89
71
|
*/
|
|
90
72
|
flow: import("@angular/core").Signal<KeycloakFlow | undefined>;
|
|
91
73
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* Response type sent to Keycloak with login requests. This is determined based on the flow value used during initialization,
|
|
95
|
-
* but can be overridden by setting this value.
|
|
74
|
+
* Signal for the response type sent to Keycloak during login requests.
|
|
96
75
|
*/
|
|
97
76
|
responseType: import("@angular/core").Signal<KeycloakResponseType | undefined>;
|
|
98
77
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED