@byuhbll/components 4.0.0 → 4.0.2

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.
@@ -4,6 +4,27 @@ import { TokenPayload } from '../models/token-payload';
4
4
  import { JwtPayload } from 'jwt-decode';
5
5
  import { PersonSummary } from './models/person-summary';
6
6
  import * as i0 from "@angular/core";
7
+ /**
8
+ * @todo: Refactor: my recommendation would be to allow a user to be passed into this component via an input instead of the users coming from an API call based on the JWT passed in. This might look something like:
9
+ * ```
10
+ * @Input() user: {
11
+ * primary_position_type_display?: string
12
+ * undergrad_graduate_status?: string
13
+ * restricted?: boolean
14
+ * is_retired?: boolean
15
+ * is_employee?: boolean
16
+ * primary_position_type?: string
17
+ * }
18
+ * ```
19
+ * Accepting all properties that are used in this component without needing to bring in the user type explicitly. Or the properties on this user object could be made even more general as to not be tied at all to any specific type.
20
+ *
21
+ * Something similar could be done with `accountStatuses`. I'd recommend the consuming application prepare arrays of strings to be passed into inputs of `accountsOk`, `accountsBlocked`, and `accountsNone`, that are then passed into and displayed in the template.
22
+ *
23
+ * The idea behind these revisions is that there is less business logic baked into this component, as it's role is just one of presentation. It will also avoid multiple API calls for the same data in our big Angular apps.
24
+ *
25
+ * Best of luck,
26
+ * Paul
27
+ */
7
28
  export declare class ImpersonationBannerComponent {
8
29
  private http;
9
30
  accessTokenPayload: import("@angular/core").InputSignal<TokenPayload>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byuhbll/components",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0"