common-header-lib 0.20.10 → 0.20.11

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 CHANGED
@@ -1,214 +1,323 @@
1
- # common-header-lib
2
-
3
- Angular 20 shared header library for the Arcon platform. Provides the application header bar, LOB selector, user sidebar, notification panel, mailbox panel, waffle (9-dots) app panel, general configuration drawer, and all supporting services.
4
-
5
- Current published version: **0.20.10**
6
-
7
- ---
8
-
9
- ## What's New
10
-
11
- ### 0.20.10
12
-
13
- - **Subject filter "Contains" dropdown padding fixed** — in the mail table's Subject column-filter popover, the match-mode dropdown's label lost its `0 10px` padding and `13px` font size to competing PrimeNG/host styles, so the text sat against the control's edge. Both values are now `!important`. The rule stays scoped to `.lib-ui.mail-filter-overlay`, so no host-app dropdown is affected.
14
-
15
- ### 0.20.9
16
-
17
- Merge commit `9ae222452a0190e8197898c217b703d746c8d957` (MR !18, from `742084b`).
18
-
19
- - **Mail table column-resize line is blue** — the vertical guide shown while dragging a mail-table column edge (PrimeNG's `.p-datatable-column-resize-indicator`) used the host theme's primary color (green in some hosts). It now uses the mail UI accent `#0073EA`. Scoped to `.mail-table` with a compile-time SCSS value — no CSS variable or PrimeNG theme token is changed, so host-app tables keep their own color.
20
-
21
- ### 0.20.8
22
-
23
- - **`showLobChangeConfirmation` input** (default `false`) — gates whether picking a new LOB from the dropdown shows a confirmation dialog. Previously this was always shown; now it's opt-in via `[showLobChangeConfirmation]="true"`. Default behavior commits the LOB change immediately on selection. `setCustomLobId()` is unaffected — it never showed a dialog regardless of this input.
24
- - **Badges clickable** — the mailbox and notification unread-count badges now open the same panel as their icon buttons.
25
- - **Notification redirect (CI-24494)** — each notification row opens that event's pending approvals in Identity Hub in a new tab (`{baseURL}/xaccess/api/WorkspaceGeneric/workflownotify?eventName=…`). Rows are keyboard-operable (Enter/Space) with a translated `aria-label`. Only events with `PendingCount > 0` are listed; a hint line sits above the list and an empty-state message shows when nothing is pending.
26
- - **Vaulted View Password (CI-24670)** — if the `OpenServicePwd` response carries `isVaulted: true`, the dialog shows the backend's message (from `sshKeyPassPhrase`), an "Acknowledge" header and a single OK button instead of the password, Copy and Vault controls. A missing/false `isVaulted` keeps the previous behavior.
27
- - **Mailbox Asset/DI details (CI-26604)** — the Subject column splits at `(UTC)` into a bold title line and a secondary asset/DI line. The table also gets a sticky header, resizable columns, and a server-side Subject "contains" filter (sent as `filters: [{ field: 'subject', operator: 'contains', value }]` in the `MailBox` request body, only when a value is entered).
28
- - **Mail UI accent** — the mail table and its filter popover use `#0073EA` (resize handle hover, filter states, Apply button, focus borders, 3px read-row bar) via local SCSS variables. `--primary-color` is not changed, so the rest of the header and host apps are unaffected. The filter popover is appended to `<body>` by PrimeNG and is scoped with its own `lib-ui mail-filter-overlay` class (PrimeNG `pt` API), so its styles never reach host-app tables.
29
- - **Fixes** — a failed `MailBox` request now shows the "something went wrong" page instead of a misleading "No mails match the applied filters"; the filter icon no longer gets clipped at the column edge; View Password button is re-checked in code so removing `disabled` in dev tools can't open it; eye icon no longer overlaps the password or Copy button; certificate Download button always visible; 9-dots focus race fixed.
30
- - **i18n** — 7 new `Generic_lib` keys (`New`, `EventRequests`, `NoPendingEventRequests`, `NotificationRedirectHint`, `Ok`, `Acknowledge`, `NoMatchingMails`) in all 8 languages. de/es/fr/hi/ja/ko text should get native-speaker review.
31
-
32
- ### 0.20.7
33
-
34
- - **LOB dropdown truncation**: long LOB names now truncate with an ellipsis instead of overflowing the 140px trigger untruncated. Also fixes a vertical-centering regression the ellipsis fix introduced (PrimeNG's own un-overridden `.p-select-label` padding was fighting the new `line-height`-based centering) and adds `margin-left: 8px` for spacing.
35
- - **Mail pagination dropdown regression fixed**: the rows-per-page dropdown inside the mailbox's paginator was falling back to raw, unstyled PrimeNG defaults instead of this library's theme. Root cause: `UserMailboxComponent`'s `.mail-content` wrapper never received the `lib-ui` marker class added by the 0.20.4 dialog-scoping pass — a gap in that original commit, not a new leak.
36
- - **Comprehensive Jasmine/Karma test suite** added across the library and the test app (previously the Karma harness didn't execute any tests at all — a test-infrastructure-only fix, no production code affected). Found and fixed 4 real defects along the way: `LandingpgConfigComponent.ngOnInit()` ordering, a missing null-guard in `ViewPasswordPopupComponent` that could throw if dialog data was malformed, a leaked polling interval in `EventService.checkMFA()`, and a no-op call in `DateDiffPipe`. Removed one confirmed-dead method (`LoggedInUserInfo.setPrivateKeyFromBigInts`).
37
- - **`library-integration-guide.md`**: documented a known issue where the Workspace API's `/workflow/api/Workflow/Workflow/` endpoint returns 503, with an interceptor workaround to prevent it from being misclassified as a session/auth error.
38
-
39
- ### 0.20.6
40
-
41
- - **9-dots app panel keyboard navigation**: full WAI-ARIA APG roving-focus grid — Arrow keys + Home/End move between app tiles, `aria-haspopup="dialog"` on the trigger. Tab past the last tile continues the user's forward tab traversal to the next page element instead of looping back onto the trigger; Shift+Tab out the front still returns to the trigger.
42
- - **General Configuration tab buttons** now carry `aria-pressed`.
43
- - **New `_accessibility.scss`**: the library's WCAG 2.4.7 focus-visible ring is now properly scoped to `.lib-ui` — previously an unscoped rule in `common-header-lib.component.scss` leaked its focus styling onto every focusable element on the host page (`ViewEncapsulation.None`).
44
- - **Dropdown focus ring fixed**: PrimeNG's `p-select` puts keyboard-focus handling on an inner label span, not the outer box containing the dropdown chevron, so the ring previously stopped short of the chevron. Redirected via `:has(.p-select-label:focus-visible)` so the ring wraps the whole control; also removed a "double border" artifact from a pre-existing `.p-focus` rule.
45
- - **`lib-ui` added to `SidePopupComponent` and `ConfirmDialogComponent`** — both were missing this marker class, so their contents fell back to the browser's raw default focus outline instead of this library's own ring.
46
- - **Dialogs now render inside `<lib-app-header>` instead of `<body>`**: the LOB confirmation dialog, General Configuration, and Password/View Password dialogs previously escaped to `<body>`, so a consuming app could not target/style them with a scoped CSS selector. New `DialogHostService` gives them a reference to `<lib-app-header>`'s own host element to append into instead. `SidePopupComponent` already rendered inline and is unaffected.
47
- - **`SliceToTwoPipe` fix**: hyphens are now treated as a name separator alongside spaces and underscores — `"Amit-Wagh"` previously produced `"AM"` instead of the correct `"AW"`.
48
-
49
- ### 0.20.5
50
-
51
- - **Dialog dragging disabled** — the LOB change confirmation dialog and both `DialogService`-opened dialogs (General Configuration, Password/View Password) now have dragging explicitly disabled. PrimeNG defaults `ConfirmDialog` to `draggable=true`, and `DynamicDialogConfig`'s class-field default of `draggable=false` is never applied by `DialogService.open()` (it forwards the caller's plain config object, and PrimeNG's own template checks `!== false`, so `undefined` resolved to draggable). `SidePopupComponent` was already non-draggable.
52
- - **Password/View Password dialog border-radius** consolidated to a single rule on the dialog root (`overflow: hidden`), replacing separate top/bottom-corner overrides that could go out of sync.
53
- - **Toast title**: `Generic_lib.Successful` now reads "Success" in English (other 7 languages unchanged; word choice already matched "Success" there).
54
- - **Mailbox table**: removed the icon column (mail/flag/lock icons served no function) — table is now 4 columns.
55
- - **i18n key rename**: `ArconLearningCenter` → `ArconCIResourceCenter`, displayed as "ARCON CI Resource Center" (English) across all 8 language files. The sidebar menu item's icon and click behavior are unchanged — only the label.
56
- - **9-dots app panel accessibility**: the waffle popover now moves focus to the first app tile on open, traps Tab/Shift+Tab within the tiles while open, and restores focus to the 9-dots button on close.
57
- - **Mailbox "read" row**: recolored to background `#CCE5FF` with a `#0073EA` left border (previously border-only).
58
- - **`_mailbox.scss` scoping fix**: `.p-datatable-table` and `.p-paginator-page.p-paginator-page-selected` are now scoped under `.mail-content`, closing a global-leak gap the 0.20.4 dialog-scoping pass did not cover.
59
- - **Deferred**: `appendTo="body"` for `SidePopupComponent` was requested but held back pending the parent project's specific DOM-placement symptom — no change shipped this release.
60
-
61
- ### 0.20.4
62
-
63
- - **Dialog/PrimeNG style scoping (breaking-leak fix)** — `_dialogs.scss` and `_primeng.scss` used to override PrimeNG's own global classes (`.p-dialog`, `.p-confirmdialog`, `.p-select`, `.p-inputtext`, `.p-multiselect`, `.p-checkbox`, `.p-tooltip`, etc.) with no library-specific scoping, so a host application's own unrelated PrimeNG dialogs/controls inherited this library's styling. Every one of those overrides is now scoped behind one of two marker classes the library applies to its own elements:
64
- - `lib-dialog` — applied to every dialog-family root the library renders (`SidePopupComponent`, `ConfirmDialogComponent`, and the `DialogService` configs for General Configuration / View Password).
65
- - `lib-ui` — applied to the header's own root and the same dialog roots, covering everything else (selects, inputs, tooltips, etc.).
66
- - Host applications are unaffected unless they happen to use those exact marker classes themselves.
67
- - **LOB change confirmation dialog gets its own class** — the confirm-change-of-LOB dialog now carries `lib-lob-change-confirm-dialog`, so a parent project can target it directly even though it renders outside the component's own DOM (a plain ancestor selector wouldn't otherwise reach it). The header shows by default; a host application that wants it hidden adds its own `.lib-lob-change-confirm-dialog .p-dialog-header { display: none !important; }`. Its close (X) button has a transparent background/border by default, scoped to this dialog only.
68
- - **New input: `lobReadOnly`** (`boolean`, default `false`) — makes the LOB dropdown non-interactive without hiding it (independent of `EnableLOB`, which controls visibility). Enforced at every layer that can mutate the LOB — the dropdown, the confirm dialog, `setCustomLobId()`, and the internal persistence service — not just a disabled attribute, so it holds up against dev-tools tampering including editing `localStorage` and reloading the page. See `library-integration-guide.md` for the full behavior and its documented limits.
69
- - **`SidePopupComponent` / `ConfirmDialogComponent`** each gained an optional `styleClass` input so consumers can layer additional classes onto the underlying `p-dialog`/`p-confirmDialog` root (backward compatible).
70
- - **Demo app** (`src/app/app.component.ts` in this workspace) now includes a working example of the `setCustomLobId()` public method via a `@ViewChild('libAppHeaderRef')` reference, matching the pattern documented in `library-integration-guide.md`.
71
-
72
- ### 0.20.3
73
-
74
- - Added the **Proxy Access Token** feature as a new tab inside `GeneralConfigurationComponent` (`ProxyAccessTokenConfigurationComponent`) — generate/regenerate a proxy access token, copy it, and download SSL/TLS certificates per database type.
75
-
76
- ---
77
-
78
- ## Architecture
79
-
80
- ### Entry point
81
-
82
- `src/public-api.ts` — exports the module, all components, services, pipes, and models consumed by host applications.
83
-
84
- ### Module
85
-
86
- `CommonHeaderLibModule` — declares and exports all components. Import this in your host `AppModule`.
87
-
88
- ### Main component
89
-
90
- `CommonHeaderLibComponent` — selector `lib-app-header`. Thin coordinator that composes all child components and wires the two component-scoped services.
91
-
92
- ```html
93
- <lib-app-header
94
- [EnableLOB]="true"
95
- [showAllLOB]="false"
96
- (lobSelected)="onLobSelected($event)"
97
- (timezoneDetails)="onTimezone($event)"
98
- (getBgImage)="onBgImage($event)"
99
- ></lib-app-header>
100
- ```
101
-
102
- ### Child components
103
-
104
- | Component | Selector | Responsibility |
105
- |---|---|---|
106
- | `AppPanelComponent` | `app-app-panel` | 9-dots waffle popover, app list, per-app pre-connection validation |
107
- | `NotificationPanelComponent` | `app-notification-panel` | Notification sidebar, event-wise count, SignalR sync |
108
- | `UserSidebarComponent` | `app-user-sidebar` | User profile drawer, password change, logout |
109
- | `UserMailboxComponent` | `app-user-mailbox` | Mail inbox with data table and pagination |
110
- | `GeneralConfigurationComponent` | `app-general-configuration` | Settings drawer — timezone, landing page, language |
111
- | `ViewPasswordPopupComponent` | `app-viewpassword-popup` | View stored password dialog |
112
- | `SidePopupComponent` | `app-side-popup` | Reusable PrimeNG drawer wrapper |
113
- | `ConfirmDialogComponent` | `app-confirm-dialog` | Reusable confirmation dialog wrapper |
114
- | `NoServiceMyAccessPgComponent` | `app-no-service-my-access-pg` | Empty / error state placeholder |
115
- | `NgTranslationComponent` | `app-ng-translation` | Language switcher |
116
- | `GridPaginationComponent` | `app-grid-pagination` | Reusable paginator |
117
-
118
- ### Component-scoped services
119
-
120
- These are provided directly on `CommonHeaderLibComponent` (`providers: [HeaderDataService, LobService]`) — they live and die with the component instance.
121
-
122
- | Service | Responsibility |
123
- |---|---|
124
- | `HeaderDataService` | `forkJoin` data loading (logo, user info, timezone, notification count, email count), SignalR / timezone / email / translate listeners, all header state as Angular signals |
125
- | `LobService` | LOB list fetch, localStorage pre-selection restore, confirm / revert / validate LOB change |
126
-
127
- ### Other services (singleton, provided in root or module)
128
-
129
- `HttpCommonService`, `HttpGeneralConfigService`, `RestLoginFormService`, `RestSignalrService`, `EventService`, `ToastMsgService`, `StorageService`, `CookieStorageManagerService`, `EncrpDataService`, `EncryptDecryptRsaService`, `AsyncPasswordcheckService`, `VaptValidationService`
130
-
131
- ---
132
-
133
- ## Inputs & Outputs
134
-
135
- ### `CommonHeaderLibComponent`
136
-
137
- | Name | Type | Direction | Description |
138
- |---|---|---|---|
139
- | `EnableLOB` | `boolean` | Input | Show/hide the LOB dropdown |
140
- | `showAllLOB` | `boolean` | Input | Include "All LOBs" option in the list |
141
- | `lobReadOnly` | `boolean` | Input | *(new in 0.20.4)* Make the LOB dropdown non-interactive without hiding it — see `library-integration-guide.md` |
142
- | `lobSelected` | `LobSelectedEvent` | Output | Fired when the user confirms a LOB change |
143
- | `timezoneDetails` | `TimezoneEvent` | Output | Fired when the user saves a timezone |
144
- | `getBgImage` | `any` | Output | Fired when a background image is configured |
145
-
146
- ---
147
-
148
- ## Angular patterns used
149
-
150
- - `input()` / `output()` / `model()` signal-based bindings (Angular 17+)
151
- - `viewChild.required()` signal queries
152
- - `inject()` for all dependency injection (no constructor injection)
153
- - `effect()` + `untracked()` for reactive side effects
154
- - `takeUntilDestroyed(DestroyRef)` for subscription teardown
155
- - `ChangeDetectionStrategy.OnPush` on all components
156
- - `ViewEncapsulation.None` on all components (styles are global, scoped by class names)
157
- - `forkJoin` for parallel API calls on header init
158
- - Bridge-signal pattern: services expose `signal<T>` that the component's `effect()` watches to emit `output()` events
159
-
160
- ---
161
-
162
- ## SCSS structure
163
-
164
- All global styles are in `src/scss/`. The main component imports `styles.scss` which forwards all partials.
165
-
166
- | File | Contents |
167
- |---|---|
168
- | `styles.scss` | Orchestrator — `@use` of all partials |
169
- | `common-color.scss` | CSS custom properties (design tokens) |
170
- | `_primeng.scss` | PrimeNG component overrides |
171
- | `_dialogs.scss` | Modal and dialog overrides |
172
- | `_sidebar.scss` | Sidebar layout |
173
- | `_mailbox.scss` | Mail table and pagination |
174
- | `_toast.scss` | ngx-toastr styles |
175
- | `_utilities.scss` | Shared utility classes |
176
-
177
- Component-specific styles live alongside each component in their own `.component.scss` file (`ViewEncapsulation.None`).
178
-
179
- ---
180
-
181
- ## Security notes
182
-
183
- - The HTTP interceptor (`http-error-interceptor.service.ts`) rejects **all** outbound requests when the `001-SAC-GEC` key is absent from localStorage and throws `Unauthorized`. This is intentional security design — do not remove or bypass it.
184
- - The AES encryption key stored in localStorage is provided by the host platform and is required to run the library. This is an accepted design decision.
185
- - `lobReadOnly` (0.20.4) is a defense-in-depth client-side guard, not an absolute one — see `library-integration-guide.md` for exactly what it does and does not protect against.
186
-
187
- ---
188
-
189
- ## Build
190
-
191
- ```bash
192
- ng build common-header-lib
193
- # Output: dist/common-header-lib
194
- ```
195
-
196
- ## Publish
197
-
198
- ```bash
199
- ng build common-header-lib
200
- cd dist/common-header-lib
201
- npm publish
202
- ```
203
-
204
- ## Generate a new component
205
-
206
- ```bash
207
- ng generate component component-name --project common-header-lib
208
- ```
209
-
210
- ## Unit tests
211
-
212
- ```bash
213
- ng test common-header-lib
214
- ```
1
+ # common-header-lib
2
+
3
+ Angular 20 shared header library for the Arcon platform. Provides the application header bar, LOB selector, user sidebar, notification panel, mailbox panel, waffle (9-dots) app panel, general configuration drawer, and all supporting services.
4
+
5
+ Current published version: **0.20.11**
6
+
7
+ ---
8
+
9
+ ## What's New
10
+
11
+ ### 0.20.11
12
+
13
+ - **Session-end routing (`SessionEndService`, CI-26608)** — new exported service that decides where the user goes when a session ends, so the header and every host app follow one rule.
14
+ - The header's Logout button calls the logout API, then `SessionEndService.redirect(result)`. This replaces the old `identity` check, which sent default-identity-provider users to the login page (signing them straight back in) and Windows users to a `/logout` router path most host apps do not have.
15
+ - Host apps should call `SessionEndService.endSession()` from their HTTP interceptor (302 / 401 / 419 or a missing token) and from their 403 page. It calls `xaccess/api/SecureAccess/cookiesUpdation` once (parallel failures are deduplicated), clears local and session storage, and redirects.
16
+ - Destination: `loginMethod` 1 → login page (`origin/#/login`), 2 → `origin/#/logout?mode=windowsAuth`, 3 → `origin/#/logout?mode=defaultIdp`. Without a valid `loginMethod` — the logout API does not send it, only `cookiesUpdation` does — `identity`, then `ssoDefaultLogin` decide; otherwise the login page.
17
+ - Also exported: `readSessionEndAction`, `loginPageUrl`, `logoutScreenUrl` and the `SessionEndAction` type.
18
+ - Host-app usage and examples: see [Session end in host applications](#session-end-in-host-applications-sessionendservice).
19
+ - **SSO / MFA logout via `spRoute` (CI-15352, CSP-safe per CI-25594)** — when the logout response carries `spRoute` (the identity provider's auto-submit logout page), the header replays its form in the same window without executing the response HTML (new internal `ExternalFormPostService`; `javascript:`/`data:` form actions are refused), so it also works under `script-src 'self'`. The session-end redirect is skipped in that case: from a host app it navigates to another page, which would cancel the form submission. Without `spRoute`, logout is unchanged.
20
+ - **Mail table header stays pinned, with its borders** — PrimeNG 20 puts an inline `overflow: auto` on the table container, which made the sticky header scroll away with the rows; `.mail-table` sets it back to `overflow: visible`. The table also moved from `border-collapse: collapse` to `separate`, with the frame and row lines drawn on the cells: collapsed borders do not move with a sticky header, so its top border scrolled away and row text showed above it. Mail table only.
21
+ - **Notification panel spacing matches the Workspace UI** — header height (48px), title, close-button and content padding, and the hint position now match the Workspace notification sidebar; the close icon is the same `close.svg`. The ticket icon keeps its 40px circle when an event name wraps to two lines. Notification panel only.
22
+ - **Class rename: `changingContent` → `lib-changing-content`** — the mailbox overlay wrapper now follows the library's `lib-` class prefix. Host apps that styled `.changingContent` must switch to `.lib-changing-content`.
23
+ - **Focus ring corners** — the `.lib-ui :focus-visible` ring now has `border-radius: 4px` on every focusable element inside the header.
24
+
25
+ ### 0.20.10
26
+
27
+ - **Subject filter "Contains" dropdown padding fixed** — in the mail table's Subject column-filter popover, the match-mode dropdown's label lost its `0 10px` padding and `13px` font size to competing PrimeNG/host styles, so the text sat against the control's edge. Both values are now `!important`. The rule stays scoped to `.lib-ui.mail-filter-overlay`, so no host-app dropdown is affected.
28
+
29
+ ### 0.20.9
30
+
31
+ Merge commit `9ae222452a0190e8197898c217b703d746c8d957` (MR !18, from `742084b`).
32
+
33
+ - **Mail table column-resize line is blue** — the vertical guide shown while dragging a mail-table column edge (PrimeNG's `.p-datatable-column-resize-indicator`) used the host theme's primary color (green in some hosts). It now uses the mail UI accent `#0073EA`. Scoped to `.mail-table` with a compile-time SCSS value — no CSS variable or PrimeNG theme token is changed, so host-app tables keep their own color.
34
+
35
+ ### 0.20.8
36
+
37
+ - **`showLobChangeConfirmation` input** (default `false`) — gates whether picking a new LOB from the dropdown shows a confirmation dialog. Previously this was always shown; now it's opt-in via `[showLobChangeConfirmation]="true"`. Default behavior commits the LOB change immediately on selection. `setCustomLobId()` is unaffected — it never showed a dialog regardless of this input.
38
+ - **Badges clickable** — the mailbox and notification unread-count badges now open the same panel as their icon buttons.
39
+ - **Notification redirect (CI-24494)** — each notification row opens that event's pending approvals in Identity Hub in a new tab (`{baseURL}/xaccess/api/WorkspaceGeneric/workflownotify?eventName=…`). Rows are keyboard-operable (Enter/Space) with a translated `aria-label`. Only events with `PendingCount > 0` are listed; a hint line sits above the list and an empty-state message shows when nothing is pending.
40
+ - **Vaulted View Password (CI-24670)** — if the `OpenServicePwd` response carries `isVaulted: true`, the dialog shows the backend's message (from `sshKeyPassPhrase`), an "Acknowledge" header and a single OK button instead of the password, Copy and Vault controls. A missing/false `isVaulted` keeps the previous behavior.
41
+ - **Mailbox Asset/DI details (CI-26604)** — the Subject column splits at `(UTC)` into a bold title line and a secondary asset/DI line. The table also gets a sticky header, resizable columns, and a server-side Subject "contains" filter (sent as `filters: [{ field: 'subject', operator: 'contains', value }]` in the `MailBox` request body, only when a value is entered).
42
+ - **Mail UI accent** — the mail table and its filter popover use `#0073EA` (resize handle hover, filter states, Apply button, focus borders, 3px read-row bar) via local SCSS variables. `--primary-color` is not changed, so the rest of the header and host apps are unaffected. The filter popover is appended to `<body>` by PrimeNG and is scoped with its own `lib-ui mail-filter-overlay` class (PrimeNG `pt` API), so its styles never reach host-app tables.
43
+ - **Fixes** — a failed `MailBox` request now shows the "something went wrong" page instead of a misleading "No mails match the applied filters"; the filter icon no longer gets clipped at the column edge; View Password button is re-checked in code so removing `disabled` in dev tools can't open it; eye icon no longer overlaps the password or Copy button; certificate Download button always visible; 9-dots focus race fixed.
44
+ - **i18n** — 7 new `Generic_lib` keys (`New`, `EventRequests`, `NoPendingEventRequests`, `NotificationRedirectHint`, `Ok`, `Acknowledge`, `NoMatchingMails`) in all 8 languages. de/es/fr/hi/ja/ko text should get native-speaker review.
45
+
46
+ ### 0.20.7
47
+
48
+ - **LOB dropdown truncation**: long LOB names now truncate with an ellipsis instead of overflowing the 140px trigger untruncated. Also fixes a vertical-centering regression the ellipsis fix introduced (PrimeNG's own un-overridden `.p-select-label` padding was fighting the new `line-height`-based centering) and adds `margin-left: 8px` for spacing.
49
+ - **Mail pagination dropdown regression fixed**: the rows-per-page dropdown inside the mailbox's paginator was falling back to raw, unstyled PrimeNG defaults instead of this library's theme. Root cause: `UserMailboxComponent`'s `.mail-content` wrapper never received the `lib-ui` marker class added by the 0.20.4 dialog-scoping pass — a gap in that original commit, not a new leak.
50
+ - **Comprehensive Jasmine/Karma test suite** added across the library and the test app (previously the Karma harness didn't execute any tests at all — a test-infrastructure-only fix, no production code affected). Found and fixed 4 real defects along the way: `LandingpgConfigComponent.ngOnInit()` ordering, a missing null-guard in `ViewPasswordPopupComponent` that could throw if dialog data was malformed, a leaked polling interval in `EventService.checkMFA()`, and a no-op call in `DateDiffPipe`. Removed one confirmed-dead method (`LoggedInUserInfo.setPrivateKeyFromBigInts`).
51
+ - **`library-integration-guide.md`**: documented a known issue where the Workspace API's `/workflow/api/Workflow/Workflow/` endpoint returns 503, with an interceptor workaround to prevent it from being misclassified as a session/auth error.
52
+
53
+ ### 0.20.6
54
+
55
+ - **9-dots app panel keyboard navigation**: full WAI-ARIA APG roving-focus grid — Arrow keys + Home/End move between app tiles, `aria-haspopup="dialog"` on the trigger. Tab past the last tile continues the user's forward tab traversal to the next page element instead of looping back onto the trigger; Shift+Tab out the front still returns to the trigger.
56
+ - **General Configuration tab buttons** now carry `aria-pressed`.
57
+ - **New `_accessibility.scss`**: the library's WCAG 2.4.7 focus-visible ring is now properly scoped to `.lib-ui` — previously an unscoped rule in `common-header-lib.component.scss` leaked its focus styling onto every focusable element on the host page (`ViewEncapsulation.None`).
58
+ - **Dropdown focus ring fixed**: PrimeNG's `p-select` puts keyboard-focus handling on an inner label span, not the outer box containing the dropdown chevron, so the ring previously stopped short of the chevron. Redirected via `:has(.p-select-label:focus-visible)` so the ring wraps the whole control; also removed a "double border" artifact from a pre-existing `.p-focus` rule.
59
+ - **`lib-ui` added to `SidePopupComponent` and `ConfirmDialogComponent`** — both were missing this marker class, so their contents fell back to the browser's raw default focus outline instead of this library's own ring.
60
+ - **Dialogs now render inside `<lib-app-header>` instead of `<body>`**: the LOB confirmation dialog, General Configuration, and Password/View Password dialogs previously escaped to `<body>`, so a consuming app could not target/style them with a scoped CSS selector. New `DialogHostService` gives them a reference to `<lib-app-header>`'s own host element to append into instead. `SidePopupComponent` already rendered inline and is unaffected.
61
+ - **`SliceToTwoPipe` fix**: hyphens are now treated as a name separator alongside spaces and underscores — `"Amit-Wagh"` previously produced `"AM"` instead of the correct `"AW"`.
62
+
63
+ ### 0.20.5
64
+
65
+ - **Dialog dragging disabled** — the LOB change confirmation dialog and both `DialogService`-opened dialogs (General Configuration, Password/View Password) now have dragging explicitly disabled. PrimeNG defaults `ConfirmDialog` to `draggable=true`, and `DynamicDialogConfig`'s class-field default of `draggable=false` is never applied by `DialogService.open()` (it forwards the caller's plain config object, and PrimeNG's own template checks `!== false`, so `undefined` resolved to draggable). `SidePopupComponent` was already non-draggable.
66
+ - **Password/View Password dialog border-radius** consolidated to a single rule on the dialog root (`overflow: hidden`), replacing separate top/bottom-corner overrides that could go out of sync.
67
+ - **Toast title**: `Generic_lib.Successful` now reads "Success" in English (other 7 languages unchanged; word choice already matched "Success" there).
68
+ - **Mailbox table**: removed the icon column (mail/flag/lock icons served no function) — table is now 4 columns.
69
+ - **i18n key rename**: `ArconLearningCenter` → `ArconCIResourceCenter`, displayed as "ARCON CI Resource Center" (English) across all 8 language files. The sidebar menu item's icon and click behavior are unchanged — only the label.
70
+ - **9-dots app panel accessibility**: the waffle popover now moves focus to the first app tile on open, traps Tab/Shift+Tab within the tiles while open, and restores focus to the 9-dots button on close.
71
+ - **Mailbox "read" row**: recolored to background `#CCE5FF` with a `#0073EA` left border (previously border-only).
72
+ - **`_mailbox.scss` scoping fix**: `.p-datatable-table` and `.p-paginator-page.p-paginator-page-selected` are now scoped under `.mail-content`, closing a global-leak gap the 0.20.4 dialog-scoping pass did not cover.
73
+ - **Deferred**: `appendTo="body"` for `SidePopupComponent` was requested but held back pending the parent project's specific DOM-placement symptom — no change shipped this release.
74
+
75
+ ### 0.20.4
76
+
77
+ - **Dialog/PrimeNG style scoping (breaking-leak fix)** — `_dialogs.scss` and `_primeng.scss` used to override PrimeNG's own global classes (`.p-dialog`, `.p-confirmdialog`, `.p-select`, `.p-inputtext`, `.p-multiselect`, `.p-checkbox`, `.p-tooltip`, etc.) with no library-specific scoping, so a host application's own unrelated PrimeNG dialogs/controls inherited this library's styling. Every one of those overrides is now scoped behind one of two marker classes the library applies to its own elements:
78
+ - `lib-dialog` — applied to every dialog-family root the library renders (`SidePopupComponent`, `ConfirmDialogComponent`, and the `DialogService` configs for General Configuration / View Password).
79
+ - `lib-ui` — applied to the header's own root and the same dialog roots, covering everything else (selects, inputs, tooltips, etc.).
80
+ - Host applications are unaffected unless they happen to use those exact marker classes themselves.
81
+ - **LOB change confirmation dialog gets its own class** — the confirm-change-of-LOB dialog now carries `lib-lob-change-confirm-dialog`, so a parent project can target it directly even though it renders outside the component's own DOM (a plain ancestor selector wouldn't otherwise reach it). The header shows by default; a host application that wants it hidden adds its own `.lib-lob-change-confirm-dialog .p-dialog-header { display: none !important; }`. Its close (X) button has a transparent background/border by default, scoped to this dialog only.
82
+ - **New input: `lobReadOnly`** (`boolean`, default `false`) — makes the LOB dropdown non-interactive without hiding it (independent of `EnableLOB`, which controls visibility). Enforced at every layer that can mutate the LOB — the dropdown, the confirm dialog, `setCustomLobId()`, and the internal persistence service — not just a disabled attribute, so it holds up against dev-tools tampering including editing `localStorage` and reloading the page. See `library-integration-guide.md` for the full behavior and its documented limits.
83
+ - **`SidePopupComponent` / `ConfirmDialogComponent`** each gained an optional `styleClass` input so consumers can layer additional classes onto the underlying `p-dialog`/`p-confirmDialog` root (backward compatible).
84
+ - **Demo app** (`src/app/app.component.ts` in this workspace) now includes a working example of the `setCustomLobId()` public method via a `@ViewChild('libAppHeaderRef')` reference, matching the pattern documented in `library-integration-guide.md`.
85
+
86
+ ### 0.20.3
87
+
88
+ - Added the **Proxy Access Token** feature as a new tab inside `GeneralConfigurationComponent` (`ProxyAccessTokenConfigurationComponent`) — generate/regenerate a proxy access token, copy it, and download SSL/TLS certificates per database type.
89
+
90
+ ---
91
+
92
+ ## Architecture
93
+
94
+ ### Entry point
95
+
96
+ `src/public-api.ts` — exports the module, all components, services, pipes, and models consumed by host applications.
97
+
98
+ ### Module
99
+
100
+ `CommonHeaderLibModule` — declares and exports all components. Import this in your host `AppModule`.
101
+
102
+ ### Main component
103
+
104
+ `CommonHeaderLibComponent` — selector `lib-app-header`. Thin coordinator that composes all child components and wires the two component-scoped services.
105
+
106
+ ```html
107
+ <lib-app-header
108
+ [EnableLOB]="true"
109
+ [showAllLOB]="false"
110
+ (lobSelected)="onLobSelected($event)"
111
+ (timezoneDetails)="onTimezone($event)"
112
+ (getBgImage)="onBgImage($event)"
113
+ ></lib-app-header>
114
+ ```
115
+
116
+ ### Child components
117
+
118
+ | Component | Selector | Responsibility |
119
+ |---|---|---|
120
+ | `AppPanelComponent` | `app-app-panel` | 9-dots waffle popover, app list, per-app pre-connection validation |
121
+ | `NotificationPanelComponent` | `app-notification-panel` | Notification sidebar, event-wise count, SignalR sync |
122
+ | `UserSidebarComponent` | `app-user-sidebar` | User profile drawer, password change, logout |
123
+ | `UserMailboxComponent` | `app-user-mailbox` | Mail inbox with data table and pagination |
124
+ | `GeneralConfigurationComponent` | `app-general-configuration` | Settings drawer — timezone, landing page, language |
125
+ | `ViewPasswordPopupComponent` | `app-viewpassword-popup` | View stored password dialog |
126
+ | `SidePopupComponent` | `app-side-popup` | Reusable PrimeNG drawer wrapper |
127
+ | `ConfirmDialogComponent` | `app-confirm-dialog` | Reusable confirmation dialog wrapper |
128
+ | `NoServiceMyAccessPgComponent` | `app-no-service-my-access-pg` | Empty / error state placeholder |
129
+ | `NgTranslationComponent` | `app-ng-translation` | Language switcher |
130
+ | `GridPaginationComponent` | `app-grid-pagination` | Reusable paginator |
131
+
132
+ ### Component-scoped services
133
+
134
+ These are provided directly on `CommonHeaderLibComponent` (`providers: [HeaderDataService, LobService]`) — they live and die with the component instance.
135
+
136
+ | Service | Responsibility |
137
+ |---|---|
138
+ | `HeaderDataService` | `forkJoin` data loading (logo, user info, timezone, notification count, email count), SignalR / timezone / email / translate listeners, all header state as Angular signals |
139
+ | `LobService` | LOB list fetch, localStorage pre-selection restore, confirm / revert / validate LOB change |
140
+
141
+ ### Other services (singleton, provided in root or module)
142
+
143
+ `HttpCommonService`, `HttpGeneralConfigService`, `RestLoginFormService`, `RestSignalrService`, `EventService`, `ToastMsgService`, `StorageService`, `CookieStorageManagerService`, `EncrpDataService`, `EncryptDecryptRsaService`, `AsyncPasswordcheckService`, `VaptValidationService`, `SessionEndService` (exported for host apps — see 0.20.11), `ExternalFormPostService` (internal, `spRoute` logout)
144
+
145
+ ---
146
+
147
+ ## Inputs & Outputs
148
+
149
+ ### `CommonHeaderLibComponent`
150
+
151
+ | Name | Type | Direction | Description |
152
+ |---|---|---|---|
153
+ | `EnableLOB` | `boolean` | Input | Show/hide the LOB dropdown |
154
+ | `showAllLOB` | `boolean` | Input | Include "All LOBs" option in the list |
155
+ | `lobReadOnly` | `boolean` | Input | *(new in 0.20.4)* Make the LOB dropdown non-interactive without hiding it — see `library-integration-guide.md` |
156
+ | `lobSelected` | `LobSelectedEvent` | Output | Fired when the user confirms a LOB change |
157
+ | `timezoneDetails` | `TimezoneEvent` | Output | Fired when the user saves a timezone |
158
+ | `getBgImage` | `any` | Output | Fired when a background image is configured |
159
+
160
+ ---
161
+
162
+ ## Session end in host applications (`SessionEndService`)
163
+
164
+ The header handles its own **Logout** button. When the session **expires**, though, it is the host application that notices: its API calls fail in its own HTTP interceptor and never reach the header. In those places call `SessionEndService.endSession()` instead of redirecting yourself, so every module sends the user to the same place.
165
+
166
+ ### When to call it
167
+
168
+ | Where in the host app | When |
169
+ |---|---|
170
+ | HTTP interceptor | A response means the session has ended: 302, 401 or 419 (or the token is missing) |
171
+ | 403 error page | After its countdown, instead of going to the login page |
172
+
173
+ Do **not** call it for the header's Logout button — the header already does that through the same service.
174
+
175
+ ### What it does
176
+
177
+ 1. `POST {page origin}/xaccess/api/SecureAccess/cookiesUpdation` with `{ actiontype: 'd', keys: ['-100'] }` (delete all server-side cookies) — the same call host apps made before.
178
+ 2. On a `success` response it clears `localStorage` and `sessionStorage`, then sends the user where `result` says:
179
+
180
+ | `result` | Destination |
181
+ |---|---|
182
+ | `loginMethod: 1` | Login page — `{origin}/#/login` |
183
+ | `loginMethod: 2` | Logout screen — `{origin}/#/logout?mode=windowsAuth` |
184
+ | `loginMethod: 3` | Logout screen — `{origin}/#/logout?mode=defaultIdp` |
185
+ | no valid `loginMethod` | `identity: true` → Windows logout screen; else `ssoDefaultLogin: true` → default-IDP logout screen; else the login page |
186
+
187
+ 3. A response that is not `success` → storage cleared, login page. If the call itself fails → login page, storage left as is.
188
+
189
+ The navigation is a full page load to the site root (the Workspace UI's login / logout pages), not a router navigation inside the host app.
190
+
191
+ It runs **once per page**: several requests failing together (e.g. five parallel calls getting 401) cause one `cookiesUpdation` call and one redirect. Later calls do nothing — including the one your interceptor makes if `cookiesUpdation` itself gets a 401, so there is no loop.
192
+
193
+ ### Requirements
194
+
195
+ - `HttpClient` provided in the host app (`provideHttpClient(...)`). The `cookiesUpdation` call goes through the host's own interceptors.
196
+ - The call uses the **page's origin**, not the `_WAU` Web API URL.
197
+
198
+ ### Example — HTTP interceptor (Angular 20, functional)
199
+
200
+ ```ts
201
+ import { HttpErrorResponse, HttpInterceptorFn } from '@angular/common/http';
202
+ import { inject } from '@angular/core';
203
+ import { catchError, throwError } from 'rxjs';
204
+ import { SessionEndService } from 'common-header-lib';
205
+
206
+ /** Responses that mean the session has ended. */
207
+ const SESSION_ENDED_STATUSES = [302, 401, 419];
208
+
209
+ export const sessionEndInterceptor: HttpInterceptorFn = (req, next) => {
210
+ const sessionEnd = inject(SessionEndService);
211
+ return next(req).pipe(
212
+ catchError((error: HttpErrorResponse) => {
213
+ if (SESSION_ENDED_STATUSES.includes(error.status)) {
214
+ sessionEnd.endSession();
215
+ }
216
+ return throwError(() => error);
217
+ }),
218
+ );
219
+ };
220
+ ```
221
+
222
+ ```ts
223
+ // app.config.ts (standalone) — next to the library's own interceptor
224
+ provideHttpClient(withInterceptors([httpErrorInterceptor, sessionEndInterceptor])),
225
+ ```
226
+
227
+ If the host already has an interceptor with this check, keep its status check and replace its own redirect (the old `if (identity) … else …` block) with `sessionEnd.endSession()`. In an NgModule host with a class-based interceptor (`HTTP_INTERCEPTORS`), inject `SessionEndService` the same way and call the same method.
228
+
229
+ ### Example — 403 page
230
+
231
+ ```ts
232
+ import { inject } from '@angular/core';
233
+ import { SessionEndService } from 'common-header-lib';
234
+
235
+ export class ForbiddenPageComponent {
236
+ private readonly sessionEnd = inject(SessionEndService);
237
+
238
+ // When the countdown reaches zero (instead of navigating to the login page):
239
+ private onCountdownFinished(): void {
240
+ this.sessionEnd.endSession();
241
+ }
242
+ }
243
+ ```
244
+
245
+ ### Lower-level exports
246
+
247
+ For a host that needs the decision without the navigation:
248
+
249
+ | Export | Purpose |
250
+ |---|---|
251
+ | `readSessionEndAction(result)` | Returns `'login'`, `'windowsAuth'` or `'defaultIdp'` for a `cookiesUpdation` / logout `result` |
252
+ | `loginPageUrl(origin)` / `logoutScreenUrl(origin, mode)` | The destination URLs above |
253
+ | `SessionEndService.redirect(result)` | Navigates for a `result` you already have (what the header's Logout uses) |
254
+
255
+ ---
256
+
257
+ ## Angular patterns used
258
+
259
+ - `input()` / `output()` / `model()` signal-based bindings (Angular 17+)
260
+ - `viewChild.required()` signal queries
261
+ - `inject()` for all dependency injection (no constructor injection)
262
+ - `effect()` + `untracked()` for reactive side effects
263
+ - `takeUntilDestroyed(DestroyRef)` for subscription teardown
264
+ - `ChangeDetectionStrategy.OnPush` on all components
265
+ - `ViewEncapsulation.None` on all components (styles are global, scoped by class names)
266
+ - `forkJoin` for parallel API calls on header init
267
+ - Bridge-signal pattern: services expose `signal<T>` that the component's `effect()` watches to emit `output()` events
268
+
269
+ ---
270
+
271
+ ## SCSS structure
272
+
273
+ All global styles are in `src/scss/`. The main component imports `styles.scss` which forwards all partials.
274
+
275
+ | File | Contents |
276
+ |---|---|
277
+ | `styles.scss` | Orchestrator — `@use` of all partials |
278
+ | `common-color.scss` | CSS custom properties (design tokens) |
279
+ | `_primeng.scss` | PrimeNG component overrides |
280
+ | `_dialogs.scss` | Modal and dialog overrides |
281
+ | `_sidebar.scss` | Sidebar layout |
282
+ | `_mailbox.scss` | Mail table and pagination |
283
+ | `_toast.scss` | ngx-toastr styles |
284
+ | `_utilities.scss` | Shared utility classes |
285
+
286
+ Component-specific styles live alongside each component in their own `.component.scss` file (`ViewEncapsulation.None`).
287
+
288
+ ---
289
+
290
+ ## Security notes
291
+
292
+ - The HTTP interceptor (`http-error-interceptor.service.ts`) rejects **all** outbound requests when the `001-SAC-GEC` key is absent from localStorage and throws `Unauthorized`. This is intentional security design — do not remove or bypass it.
293
+ - The AES encryption key stored in localStorage is provided by the host platform and is required to run the library. This is an accepted design decision.
294
+ - `lobReadOnly` (0.20.4) is a defense-in-depth client-side guard, not an absolute one — see `library-integration-guide.md` for exactly what it does and does not protect against.
295
+
296
+ ---
297
+
298
+ ## Build
299
+
300
+ ```bash
301
+ ng build common-header-lib
302
+ # Output: dist/common-header-lib
303
+ ```
304
+
305
+ ## Publish
306
+
307
+ ```bash
308
+ ng build common-header-lib
309
+ cd dist/common-header-lib
310
+ npm publish
311
+ ```
312
+
313
+ ## Generate a new component
314
+
315
+ ```bash
316
+ ng generate component component-name --project common-header-lib
317
+ ```
318
+
319
+ ## Unit tests
320
+
321
+ ```bash
322
+ ng test common-header-lib
323
+ ```