@zambon-dev/ui 1.12.0 → 1.13.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.
@@ -1 +1 @@
1
- {"version":3,"file":"zambon-dev-ui-shared.mjs","names":[],"sources":["../../../../libs/ui/src/shared/auth/components/language-selector/language-selector.component.ts","../../../../libs/ui/src/shared/auth/components/language-selector/language-selector.component.html","../../../../libs/ui/src/shared/services/authentication.service.ts","../../../../libs/ui/src/shared/models/external-content.ts","../../../../libs/ui/src/shared/models/operations-history.ts","../../../../libs/ui/src/shared/services/external-content.service.ts","../../../../libs/ui/src/shared/services/external-url-resolver.service.ts","../../../../libs/ui/src/shared/services/notifications.service.ts","../../../../libs/ui/src/shared/services/operations-history.service.ts","../../../../libs/ui/src/shared/services/services-history.service.ts","../../../../libs/ui/src/shared/auth/components/login/login.component.ts","../../../../libs/ui/src/shared/auth/components/login/login.component.html","../../../../libs/ui/src/shared/layouts/login-layout/login-layout.component.ts","../../../../libs/ui/src/shared/layouts/login-layout/login-layout.component.html","../../../../libs/ui/src/shared/layouts/top-bar/brand/brand.component.ts","../../../../libs/ui/src/shared/layouts/top-bar/brand/brand.component.html","../../../../libs/ui/src/shared/layouts/top-bar/environment-badge/environment-badge.component.ts","../../../../libs/ui/src/shared/layouts/top-bar/environment-badge/environment-badge.component.html","../../../../libs/ui/src/shared/layouts/top-bar/notifications/notifications.component.ts","../../../../libs/ui/src/shared/layouts/top-bar/notifications/notifications.component.html","../../../../libs/ui/src/shared/theme/theme.service.ts","../../../../libs/ui/src/shared/theme/theme-switch.component.ts","../../../../libs/ui/src/shared/theme/theme-switch.component.html","../../../../libs/ui/src/shared/layouts/top-bar/user-profile/user-profile.component.ts","../../../../libs/ui/src/shared/layouts/top-bar/user-profile/user-profile.component.html","../../../../libs/ui/src/shared/layouts/top-bar/top-bar.component.ts","../../../../libs/ui/src/shared/layouts/top-bar/top-bar.component.html","../../../../libs/ui/src/shared/layouts/main-layout/main-layout.component.ts","../../../../libs/ui/src/shared/layouts/main-layout/main-layout.component.html","../../../../libs/ui/src/shared/auth/auth.module.ts","../../../../libs/ui/src/shared/auth/guards/auth-guard.ts","../../../../libs/ui/src/shared/auth/interceptors/auth-interceptors.ts","../../../../libs/ui/src/shared/components/filters-base.ts","../../../../libs/ui/src/shared/datasets/operations-history.dataset.ts","../../../../libs/ui/src/shared/datasets/services-history.dataset.ts","../../../../libs/ui/src/shared/features/external-content/external-content.component.ts","../../../../libs/ui/src/shared/features/external-content/external-content.component.html","../../../../libs/ui/src/shared/features/external-content/external-content.routes.ts","../../../../libs/ui/src/shared/features/operations-history/operations-history-fields.ts","../../../../libs/ui/src/shared/features/operations-history/operations-history-modal/operations-history-modal.component.ts","../../../../libs/ui/src/shared/features/operations-history/operations-history-modal/operations-history-modal.component.html","../../../../libs/ui/src/shared/features/operations-history/operations-history-child-list/operations-history-child-list.component.ts","../../../../libs/ui/src/shared/features/operations-history/operations-history-child-list/operations-history-child-list.component.html","../../../../libs/ui/src/shared/pipes/bypass-html-sanitizer.pipe.ts","../../../../libs/ui/src/shared/pipes/enum-text.pipe.ts","../../../../libs/ui/src/shared/pipes/utc-date.pipe.ts","../../../../libs/ui/src/shared/features/services-history/services-history-child-list/services-history-child-list.component.ts","../../../../libs/ui/src/shared/features/services-history/services-history-child-list/services-history-child-list.component.html","../../../../libs/ui/src/shared/features/services-history/services-history-filter/services-history-filter.component.ts","../../../../libs/ui/src/shared/features/services-history/services-history-filter/services-history-filter.component.html","../../../../libs/ui/src/shared/features/services-history/services-history-view/services-history-view.component.ts","../../../../libs/ui/src/shared/features/services-history/services-history-view/services-history-view.component.html","../../../../libs/ui/src/shared/i18n/shared-i18n.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n HostListener,\n inject,\n input,\n InputSignal,\n signal,\n Signal,\n viewChild,\n WritableSignal,\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\nimport { LangChangeEvent, TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { map } from 'rxjs';\n\n@Component({\n selector: 'shared-language-selector',\n templateUrl: './language-selector.component.html',\n styleUrls: ['./language-selector.component.scss'],\n imports: [ButtonComponent, TranslatePipe],\n})\nexport class LanguageSelectorComponent {\n //#region ViewChilds, Inputs, Outputs\n public readonly dropdown: Signal<ElementRef<HTMLDivElement> | undefined> =\n viewChild<ElementRef<HTMLDivElement>>('dropdown');\n\n /** When true, the toggle shows the current language's flag (light-gray button) instead of text. */\n public readonly showFlag: InputSignal<boolean> = input(false);\n\n public readonly title: InputSignal<string> = input('LanguageSelector-Title');\n //#endregion\n\n //#region Variables\n private translate: TranslateService = inject(TranslateService);\n\n protected languages: string[] = this.translate.getLangs();\n\n // A signal rather than a field: the list is also closed from a window click handler, which\n // is not a binding on this view and so marks nothing.\n protected readonly showDropdown: WritableSignal<boolean> = signal(false);\n\n /**\n * `TranslateService.currentLang` is a plain field. The flag on the toggle and the tick beside\n * the chosen entry are read from it, and switching language changed neither until something\n * else happened to refresh this view. Mirrored from the service's own event instead.\n */\n private readonly currentLang: Signal<string> = toSignal(\n this.translate.onLangChange.pipe(map((event: LangChangeEvent) => event.lang)),\n { initialValue: this.translate.currentLang },\n );\n //#endregion\n\n //#region Properties\n public get selectedLanguage(): string {\n return this.currentLang();\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n public onDropdownClick(): void {\n this.showDropdown.update((isShown: boolean) => !isShown);\n }\n\n public onSelectLanguage(language: string): void {\n localStorage.setItem('language', language);\n this.translate.use(language);\n this.showDropdown.set(false);\n }\n //#endregion\n\n //#region Public methods\n //#endregion\n\n //#region Private methods\n @HostListener('window:click', ['$event'])\n protected documentClick(event: MouseEvent): void {\n if (this.showDropdown()) {\n let target: HTMLElement = <HTMLElement>event.target;\n while (target !== null && target.tagName?.toUpperCase() !== 'BODY') {\n if (target === this.dropdown()?.nativeElement) {\n return;\n }\n target = <HTMLElement>target.parentElement;\n }\n this.showDropdown.set(false);\n }\n }\n //#endregion\n}\n","<div #dropdown class=\"dropdown right\" [class.show]=\"showDropdown()\">\n <lib-button\n intent=\"ghost\"\n [class.lang-flag-toggle]=\"showFlag()\"\n [ariaLabel]=\"showFlag() ? (title() | translate) : undefined\"\n (click)=\"onDropdownClick()\"\n >\n @if (showFlag()) {\n <span class=\"flag flag-{{ selectedLanguage }}\"></span>\n } @else {\n {{ title() | translate }}\n }\n </lib-button>\n\n <ul>\n @for (lang of languages; track lang) {\n <li>\n <button\n type=\"button\"\n class=\"dropdown-item\"\n [class.selected]=\"lang === selectedLanguage\"\n (click)=\"onSelectLanguage(lang)\"\n >\n <span class=\"flag flag-{{ lang }}\"></span>\n <span class=\"dropdown-label\">{{ 'Language-' + lang | translate }}</span>\n </button>\n </li>\n }\n </ul>\n</div>\n","import { HttpClient, HttpErrorResponse } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { JwtHelperService } from '@auth0/angular-jwt';\nimport { APP_CONFIG, AppConfig, AuthService, TabService } from '@zambon-dev/ui/framework';\nimport { Observable, catchError, interval, map, mergeMap, tap } from 'rxjs';\nimport { IAuthResponse, ICurrentUserInfo } from '../models';\n\n/**\n * Signs users in against the API's `Authentication` endpoints and keeps their token, refresh token\n * and user info in browser storage. The shared login, layouts, guard and interceptor rely on it.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthenticationService extends AuthService {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n /** Name of the action that grants administrator rights. */\n public adminAction = 'AdministrativeMaster';\n\n private config: AppConfig = inject(APP_CONFIG);\n\n private readonly BASE_URL: string = `${this.config.BASE_URL}/Authentication`;\n private http: HttpClient = inject(HttpClient);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n constructor() {\n super(inject(JwtHelperService), inject(TabService));\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /**\n * Signs in and stores the session; `rememberMe` keeps it after the browser closes. Fails with\n * `InvalidUsernamePassword` or `InternalServerError`, which are translation keys.\n */\n public authenticate(model: { username: string; password: string; rememberMe: boolean }): Observable<void> {\n return this.http.post<IAuthResponse>(`${this.BASE_URL}/SignIn`, model).pipe(\n map((res: IAuthResponse) => {\n this.setStorage('username', res.username, model.rememberMe);\n this.setStorage('token', res.token, model.rememberMe);\n this.setStorage('refreshToken', res.refreshToken, model.rememberMe);\n this.setStorage('userInfo', window.btoa(JSON.stringify(res as ICurrentUserInfo)), model.rememberMe);\n }),\n catchError((error: HttpErrorResponse) =>\n interval(1000).pipe(\n mergeMap(() => {\n switch (error.status) {\n case 401:\n throw 'InvalidUsernamePassword';\n default:\n throw 'InternalServerError';\n }\n }),\n ),\n ),\n );\n }\n\n /** Loads the actions the signed-in user is allowed to perform. */\n public getActions(): Observable<string[]> {\n return this.http.post<string[]>(`${this.BASE_URL}/GetActions`, {});\n }\n\n /** Returns the stored information about the signed-in user, or `null` when signed out. */\n public getUserInfo(): ICurrentUserInfo | null {\n const userInfo: string | null = this.userInfo;\n if (userInfo) {\n return JSON.parse(window.atob(userInfo)) as ICurrentUserInfo;\n }\n return null;\n }\n\n /** Exchanges the refresh token for a new token, stores it and emits it. */\n public tryRefreshToken(): Observable<string> {\n return this.http\n .post<IAuthResponse>(`${this.BASE_URL}/RefreshToken`, {\n username: this.username ?? '',\n refreshToken: this.refreshToken ?? '',\n })\n .pipe(\n tap((res: IAuthResponse) => {\n this.setStorage('token', res.token);\n this.setStorage('refreshToken', res.refreshToken);\n this.setStorage('userInfo', window.btoa(JSON.stringify(res as ICurrentUserInfo)));\n }),\n map((res: IAuthResponse) => res.token ?? ''),\n );\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { InjectionToken } from '@angular/core';\n\n/** First segment of the route that hosts embedded external content. */\nexport const EXTERNAL_CONTENT_ROUTE_PATH = 'external-content';\n\n/**\n * Flat projection of an external menu item, used to restore an embedded tab.\n *\n * Deliberately not a `SidebarMenu`: that class carries a `parent` back-reference, so it is a\n * circular structure that `JSON.stringify` refuses, and holding one would pin the whole menu tree.\n */\nexport interface IExternalContentEntry {\n id: number;\n label: string;\n url: string;\n}\n\nexport class ExternalContentConfigs {\n /**\n * Origins an embedded menu item may point at, for example `['https://reports.example.com']`.\n * Empty — the default — allows any `http`/`https` origin.\n *\n * Populating it is the single highest-value control here after the scheme check: it narrows a\n * compromised menu row from \"frame anything on the internet\" to \"frame one of our report hosts\".\n */\n public allowedOrigins: string[] = [];\n\n /** Milliseconds to wait for the frame's first `load` before hinting that framing may be refused. */\n public slowFrameHintDelay = 5000;\n\n constructor(options: Partial<ExternalContentConfigs> = {}) {\n Object.assign(this, options);\n }\n}\n\nexport const EXTERNAL_CONTENT_CONFIGS: InjectionToken<ExternalContentConfigs> =\n new InjectionToken<ExternalContentConfigs>('Embedded external content configuration', {\n providedIn: 'root',\n factory: () => new ExternalContentConfigs(),\n });\n","import { InjectionToken } from '@angular/core';\n\n/** What kind of value an audited field holds, as ZWebAPI reports it. */\nexport type OperationsHistoryFieldType = 'boolean' | 'date' | 'enum' | 'key' | 'number' | 'other' | 'text' | 'time';\n\n/** One field of an audited record, before and after an operation. */\nexport interface IOperationsHistoryField {\n /** Whether the operation wrote this field. A creation writes every field, a deletion removes every one. */\n isChanged: boolean;\n /** Bookkeeping rather than data: the key, the audit columns, the concurrency token. */\n isSystem: boolean;\n /** The property name, as the backend declares it (`FullName`). */\n name: string;\n /** The value after the operation; `null` for a deletion, or when the backend could not rebuild it. */\n newValue?: unknown;\n /** The value before the operation; `null` for a creation, or when the backend could not rebuild it. */\n oldValue?: unknown;\n type: OperationsHistoryFieldType;\n}\n\nexport interface IOperationsHistoryList {\n /** Capitalised `ID` is intentional: the backend property is `EntityID`, and the camelCase\n * serialization policy only lowercases a leading run of capitals — so the trailing ones survive. */\n entityID?: number;\n entityName?: string;\n /**\n * Every field of the record, before and after the operation. Sent by ZWebAPI 1.17 and later;\n * without it only the fields the operation wrote are known, from `oldValues` and `newValues`.\n */\n fields?: IOperationsHistoryField[];\n id: number;\n newValues?: string;\n oldValues?: string;\n operationType?: string;\n tableName?: string;\n}\n\n/**\n * Turns an audited field into the label the audit shows for it.\n *\n * The result goes through the translation pipe, so it may be a translation key. A key with no\n * translation shows as itself, which is why the default returns readable text rather than a key.\n */\nexport type OperationsHistoryFieldLabel = (fieldName: string, entityName: string | undefined) => string;\n\n/**\n * Splits a PascalCase or camelCase property name into words, keeping acronyms whole.\n *\n * @param fieldName The property name.\n * @returns The name as words, with only the first capitalised.\n */\nexport function humanizeFieldName(fieldName: string): string {\n const words: string[] = fieldName.match(/[A-Z]{2,}(?=[A-Z][a-z]|\\d|$)|[A-Z]?[a-z]+|[A-Z]+|\\d+/g) ?? [fieldName];\n\n return words\n .map((word: string, index: number) => {\n if (word.length > 1 && word === word.toUpperCase()) {\n return word;\n }\n return index === 0 ? word.charAt(0).toUpperCase() + word.slice(1) : word.toLowerCase();\n })\n .join(' ');\n}\n\n/**\n * Labels the fields of the audit's change details.\n *\n * The default splits the property name into words: `FullName` reads \"Full name\" and\n * `RecordID` reads \"Record ID\". Provide a function to use the application's own field labels:\n *\n * ```ts\n * { provide: OPERATIONS_HISTORY_FIELD_LABEL, useValue: (field, entity) => `${entity}-Field-${field}` }\n * ```\n */\nexport const OPERATIONS_HISTORY_FIELD_LABEL: InjectionToken<OperationsHistoryFieldLabel> =\n new InjectionToken<OperationsHistoryFieldLabel>('Audited field label', {\n providedIn: 'root',\n factory: () => humanizeFieldName,\n });\n","import { inject, Injectable } from '@angular/core';\nimport { SidebarMenu, SidebarService } from '@zambon-dev/ui/library';\nimport { catchError, map, Observable, of, take } from 'rxjs';\nimport { EXTERNAL_CONTENT_ROUTE_PATH, IExternalContentEntry } from '../models';\n\n/**\n * Remembers which external destination sits behind an embedded tab's `/external-content/:menuID`\n * route, and resolves it back when the view is created.\n *\n * The destination never travels in the route, so the id has to be resolved to a URL somehow. That\n * happens in three steps, cheapest first:\n *\n * 1. the in-memory registry — the item was clicked in this browsing session;\n * 2. `sessionStorage` — the user pressed F5 on the embedded tab;\n * 3. the application's `SidebarService.getMenuFromUrl()` — a cold deep link.\n *\n * Step 3 reuses the abstract hook every application already implements, so nothing new is required\n * of a consumer: an application whose menu endpoint cannot resolve `/external-content/:id` simply\n * gets the unavailable state on a cold deep link, which is the documented behaviour.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ExternalContentService {\n //#region Variables\n private readonly maxEntries: number = 20;\n private readonly storageKey: string = 'zambon.externalContent';\n\n private registry: Map<number, IExternalContentEntry> = new Map<number, IExternalContentEntry>();\n private sidebarService: SidebarService = inject(SidebarService);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Public methods\n /** Resolves the destination behind an embedded tab, or `undefined` when it cannot be recovered. */\n public find(menuID: number): Observable<IExternalContentEntry | undefined> {\n const known: IExternalContentEntry | undefined = this.registry.get(menuID) ?? this.readFromStorage(menuID);\n\n if (known) {\n return of(known);\n }\n\n return this.sidebarService.getMenuFromUrl(`/${EXTERNAL_CONTENT_ROUTE_PATH}/${menuID}`).pipe(\n take(1),\n map((menu: SidebarMenu) => (!!menu && !!menu.url ? this.toEntry(menu) : undefined)),\n // A menu endpoint that does not know this route shape answers 404, which is an expected\n // outcome here rather than a failure: the view falls back to its unavailable state.\n catchError(() => of(undefined)),\n );\n }\n\n /** Remembers a menu so its embedded tab survives a page refresh. */\n public register(menu: SidebarMenu): void {\n const entry: IExternalContentEntry = this.toEntry(menu);\n\n this.registry.set(entry.id, entry);\n this.writeToStorage(entry);\n }\n //#endregion\n\n //#region Private methods\n private readAllFromStorage(): IExternalContentEntry[] {\n try {\n const raw: string | null = window.sessionStorage.getItem(this.storageKey);\n\n if (!raw) {\n return [];\n }\n\n const parsed: unknown = JSON.parse(raw);\n\n return Array.isArray(parsed) ? <IExternalContentEntry[]>parsed : [];\n } catch {\n // A poisoned or unavailable storage entry must never take the application down; the view\n // degrades to asking the user to reopen the item from the menu.\n return [];\n }\n }\n\n private readFromStorage(menuID: number): IExternalContentEntry | undefined {\n const entry: IExternalContentEntry | undefined = this.readAllFromStorage().find(\n (candidate: IExternalContentEntry) => candidate?.id === menuID,\n );\n\n if (!!entry && !!entry.url) {\n this.registry.set(entry.id, entry);\n return entry;\n }\n\n return undefined;\n }\n\n private toEntry(menu: SidebarMenu): IExternalContentEntry {\n return {\n id: menu.id,\n label: menu.label,\n url: menu.url ?? '',\n };\n }\n\n private writeToStorage(entry: IExternalContentEntry): void {\n try {\n const entries: IExternalContentEntry[] = [\n entry,\n ...this.readAllFromStorage().filter((candidate: IExternalContentEntry) => candidate?.id !== entry.id),\n ].slice(0, this.maxEntries);\n\n window.sessionStorage.setItem(this.storageKey, JSON.stringify(entries));\n } catch {\n // Storage can be unavailable (private mode, blocked site data). Losing refresh support is\n // acceptable; failing the click is not.\n }\n }\n //#endregion\n}\n","import { inject, Injectable } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ICurrentUserInfo } from '../models';\nimport { AuthenticationService } from './authentication.service';\n\n/**\n * Resolves the runtime placeholders in an external menu URL, and vets the result before it is\n * handed to the browser.\n *\n * Placeholder syntax is `{name}`, case-sensitive, drawn from a **closed** set:\n *\n * | Token | Source |\n * |--------------|-----------------------------------------------------|\n * | `{email}` | `ICurrentUserInfo.email` |\n * | `{language}` | `TranslateService.currentLang`, then `defaultLang` |\n * | `{userId}` | `ICurrentUserInfo.userID` |\n * | `{userName}` | `ICurrentUserInfo.username` |\n *\n * The set is closed by construction rather than reflected off the stored user info, and that is a\n * security property, not a style choice: `AuthenticationService` persists the entire sign-in\n * response under `userInfo`, tokens included, so a reflective implementation would let a menu URL\n * configured as `?t={token}` hand the JWT to a third party. No authentication token is ever\n * substituted.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ExternalUrlResolverService {\n //#region Variables\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n private translate: TranslateService = inject(TranslateService);\n\n /** Placeholder grammar, used only to *detect* tokens this version does not know. */\n private readonly unknownPlaceholderPattern: RegExp = /\\{[A-Za-z][A-Za-z0-9_]*\\}/g;\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Public methods\n /**\n * Whether `url` is an absolute `http`/`https` address.\n *\n * Rejects relative paths, malformed values, protocol-relative `//host/path` (which throws\n * without a base), and the schemes that would execute rather than navigate: `javascript:`,\n * `data:`, `blob:`, `file:`.\n */\n public isAllowed(url: string): boolean {\n let parsed: URL;\n\n try {\n parsed = new URL(url);\n } catch {\n return false;\n }\n\n return parsed.protocol === 'http:' || parsed.protocol === 'https:';\n }\n\n /**\n * Substitutes every known placeholder, URL-encoding each value.\n *\n * Because every value is percent-encoded, a placeholder must occupy one *whole* value — a full\n * path segment, or a full query-parameter value. Encoding is what stops a display name that\n * contains `&` from injecting an extra query parameter into the destination.\n *\n * A known placeholder with no value becomes an empty string; an unrecognized `{…}` is left\n * exactly as configured, so a report URL that legitimately contains braces is not corrupted.\n */\n public resolve(url: string): string {\n if (!url || url.indexOf('{') === -1) {\n return url;\n }\n\n const values: Map<string, string> = this.getPlaceholderValues();\n\n let resolved: string = url;\n\n values.forEach((value: string, token: string) => {\n if (resolved.indexOf(token) === -1) {\n return;\n }\n\n if (value.length === 0) {\n console.warn(\n `External URL placeholder ${token} has no value for the current user; substituting an empty string.`,\n url,\n );\n }\n\n // split/join rather than String.replace: replace() interprets `$&` and `$1` in the\n // replacement text, and without a global regex it would only swap the first occurrence.\n resolved = resolved.split(token).join(encodeURIComponent(value));\n });\n\n this.warnAboutUnknownPlaceholders(url, resolved);\n\n return resolved;\n }\n //#endregion\n\n //#region Private methods\n private getPlaceholderValues(): Map<string, string> {\n const user: ICurrentUserInfo | null = this.authenticationService.getUserInfo();\n\n return new Map<string, string>([\n ['{email}', user?.email ?? ''],\n ['{language}', this.translate.currentLang || this.translate.defaultLang || ''],\n ['{userId}', user?.userID?.toString() ?? ''],\n ['{userName}', user?.username ?? ''],\n ]);\n }\n\n private warnAboutUnknownPlaceholders(url: string, resolved: string): void {\n const unknown: string[] = resolved.match(this.unknownPlaceholderPattern) ?? [];\n\n if (unknown.length > 0) {\n console.warn(\n `External URL contains unrecognized placeholders and was left as configured: ${unknown.join(', ')}`,\n url,\n );\n }\n }\n //#endregion\n}\n","import { inject, Injectable } from '@angular/core';\nimport { HubConnection, HubConnectionBuilder, HubConnectionState } from '@microsoft/signalr';\nimport { APP_CONFIG, AppConfig, AuthService } from '@zambon-dev/ui/framework';\nimport { BehaviorSubject, map, Observable } from 'rxjs';\nimport { INotification } from '../models';\n\n/**\n * Streams top-bar notifications from a SignalR hub.\n *\n * The hub is configured via `AppConfig.notificationsEnabled` and `AppConfig.notificationsUrl`.\n * When enabled, {@link start} opens a connection (authenticated with the current JWT) and\n * listens for the server to push the notification list via the `ReceiveNotifications` client\n * method. Consuming apps do not interact with this service directly — the top bar drives it.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class NotificationsService {\n //#region Variables\n private authService: AuthService = inject(AuthService);\n private config: AppConfig = inject(APP_CONFIG);\n\n private connection?: HubConnection;\n private notifications$: BehaviorSubject<INotification[]> = new BehaviorSubject<INotification[]>([]);\n //#endregion\n\n //#region Properties\n /** Whether the notifications feature is enabled (toggled on and given a hub URL). */\n public get isEnabled(): boolean {\n return this.config.notificationsEnabled && this.config.notificationsUrl.length > 0;\n }\n //#endregion\n\n //#region Public methods\n /** Emits the current list of notifications. */\n public getNotifications(): Observable<INotification[]> {\n return this.notifications$.asObservable();\n }\n\n /** Emits the number of unread notifications. */\n public getUnreadCount(): Observable<number> {\n return this.notifications$.pipe(\n map((notifications: INotification[]) => notifications.filter((n: INotification) => !n.isRead).length),\n );\n }\n\n /** Marks every notification as read and notifies the hub. */\n public markAllAsRead(): void {\n this.notifications$.next(this.notifications$.value.map((n: INotification) => ({ ...n, isRead: true })));\n\n if (this.connection?.state === HubConnectionState.Connected) {\n this.connection.invoke('MarkAllAsRead').catch((error: unknown) => {\n console.error('Failed to mark notifications as read on the hub.', error);\n });\n }\n }\n\n /** Marks a single notification as read (optimistically; the server reconciles on the next push). */\n public markAsRead(notification: INotification): void {\n this.notifications$.next(\n this.notifications$.value.map((n: INotification) => (n === notification ? { ...n, isRead: true } : n)),\n );\n }\n\n /** Opens the SignalR connection and starts receiving notifications. Idempotent and a no-op when disabled. */\n public start(): void {\n if (!this.isEnabled || !!this.connection) {\n return;\n }\n\n this.connection = new HubConnectionBuilder()\n .withUrl(this.config.notificationsUrl, {\n accessTokenFactory: () => this.authService.token ?? '',\n })\n .withAutomaticReconnect()\n .build();\n\n this.connection.on('ReceiveNotifications', (notifications: INotification[]) => {\n this.notifications$.next(notifications ?? []);\n });\n\n this.connection.start().catch((error: unknown) => {\n console.error('Failed to connect to the notifications hub.', error);\n });\n }\n\n /** Closes the SignalR connection. */\n public async stop(): Promise<void> {\n if (this.connection) {\n await this.connection.stop();\n this.connection = undefined;\n }\n }\n //#endregion\n}\n","import { HttpClient } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\nimport { IListParameters } from '@zambon-dev/ui/library';\nimport { Observable } from 'rxjs';\nimport { IOperationsHistoryList } from '../models';\n\n/** Loads the field-level operations of one change set from the audit API. */\n@Injectable({\n providedIn: 'root',\n})\nexport class OperationsHistoryService {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n private config: AppConfig = inject(APP_CONFIG);\n private http: HttpClient = inject(HttpClient);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /**\n * Lists the operations of change set `serviceHistoryID` on the record `entityID` under the API\n * controller `controllerName`, filtered and paged by `parameters`.\n */\n public list(\n controllerName: string,\n entityID: number,\n serviceHistoryID: number,\n parameters: IListParameters,\n ): Observable<IOperationsHistoryList[]> {\n return this.http.post<IOperationsHistoryList[]>(\n `${this.config.BASE_URL}/${controllerName}/${entityID}/Audit/${serviceHistoryID}`,\n parameters,\n );\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { HttpClient } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\nimport { IListParameters } from '@zambon-dev/ui/library';\nimport { Observable } from 'rxjs';\nimport { IServicesHistoryList } from '../models';\n\n/** Loads the change sets (services) recorded for a record from the audit API. */\n@Injectable({\n providedIn: 'root',\n})\nexport class ServicesHistoryService {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n private config: AppConfig = inject(APP_CONFIG);\n private http: HttpClient = inject(HttpClient);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /**\n * Lists the change sets of the record `entityID` under the API controller `controllerName`,\n * filtered and paged by `parameters`.\n */\n public list(\n controllerName: string,\n entityID: number,\n parameters: IListParameters,\n ): Observable<IServicesHistoryList[]> {\n return this.http.post<IServicesHistoryList[]>(\n `${this.config.BASE_URL}/${controllerName}/${entityID}/Audit`,\n parameters,\n );\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { Component, ElementRef, inject, OnInit, signal, Signal, viewChild, WritableSignal } from '@angular/core';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { Router, RouterModule } from '@angular/router';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\nimport { finalize, tap } from 'rxjs';\nimport { AuthenticationService } from '../../../services';\nimport { LanguageSelectorComponent } from '../language-selector/language-selector.component';\n\n/**\n * Sign-in form with username, password and \"remember me\". On success it navigates to the\n * `returnUrl` query parameter, or to `/`; on failure it shows the error and clears the password.\n */\n@Component({\n selector: 'shared-login',\n templateUrl: './login.component.html',\n styleUrls: ['./login.component.scss'],\n imports: [ButtonComponent, LanguageSelectorComponent, ReactiveFormsModule, RouterModule, TranslatePipe],\n})\nexport class LoginComponent implements OnInit {\n //#region ViewChilds, Inputs, Outputs\n /** The username field, focused again after a failed sign-in. */\n public readonly username: Signal<ElementRef<HTMLInputElement> | undefined> =\n viewChild<ElementRef<HTMLInputElement>>('username');\n //#endregion\n\n //#region Variables\n protected form!: FormGroup;\n // A signal holding one object, replaced rather than edited: every one of these is rendered --\n // the validation banner, the button's spinner, its success tick -- and each is written from\n // inside the authentication stream, where nothing marks this view.\n protected readonly formState: WritableSignal<{\n error: string | null;\n loading: boolean;\n success: boolean;\n }> = signal({\n error: null,\n loading: false,\n success: false,\n });\n\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n private config: AppConfig = inject(APP_CONFIG);\n private formBuilder: FormBuilder = inject(FormBuilder);\n private router: Router = inject(Router);\n //#endregion\n\n //#region Properties\n /** Company line under the title, when the application supplies one. */\n protected get companyName(): string {\n return this.config.companyName;\n }\n\n /** The sign-in logo, falling back to the top bar's. Nothing is drawn when neither is set. */\n protected get logoUrl(): string | undefined {\n return this.config.loginLogoUrl ?? this.config.logoUrl;\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n\n public ngOnInit(): void {\n this.form = this.formBuilder.group({\n password: ['', Validators.required],\n rememberMe: [false, { nonNullable: true }],\n username: ['', Validators.required],\n });\n }\n //#endregion\n\n //#region Event handlers\n /** Validates the form and signs in with the entered credentials. */\n public onSubmit(): void {\n this.form.markAllAsTouched();\n\n if (this.form.valid) {\n this.form.disable();\n\n this.formState.update((state) => ({ ...state, error: null, loading: true }));\n\n this.authenticationService\n .authenticate({\n username: this.form.get('username')?.value.toString() ?? '',\n password: this.form.get('password')?.value.toString() ?? '',\n rememberMe: this.form.get('rememberMe')?.value ?? false,\n })\n .pipe(\n tap(() => this.formState.update((state) => ({ ...state, success: true }))),\n finalize(() => this.formState.update((state) => ({ ...state, loading: false }))),\n )\n .subscribe({\n next: () => {\n const params: URLSearchParams = new URLSearchParams(window.location.search);\n\n this.router.navigate([params.get('returnUrl') ?? '/']);\n },\n error: (e: string) => {\n this.form.enable();\n\n this.form.controls['password'].setValue('');\n this.form.controls['password'].markAsUntouched();\n\n this.username()?.nativeElement.focus();\n\n const error: string = e === 'InvalidUsernamePassword' ? 'invalid' : 'internalServerError';\n this.formState.update((state) => ({ ...state, error }));\n },\n });\n }\n }\n //#endregion\n\n //#region Public methods\n /** A field is only shown as wrong once the user has been given a chance to fill it. */\n protected isInvalid(field: string): boolean {\n const control = this.form.get(field);\n return !!control && control.touched && control.invalid;\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","<div class=\"login-card\">\n @if (logoUrl) {\n <img class=\"login-logo\" [src]=\"logoUrl\" alt=\"\" />\n }\n\n <h1 class=\"login-title\">{{ 'Login-Title' | translate }}</h1>\n @if (companyName) {\n <p class=\"login-subtitle\">{{ companyName }}</p>\n }\n\n <form class=\"login-form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" novalidate>\n @if (formState().error) {\n <p class=\"login-error\" role=\"alert\">\n @if (formState().error === 'invalid') {\n {{ 'Login-Errors-Invalid' | translate }}\n } @else {\n {{ 'Login-Errors-InternalServerError' | translate }}\n }\n </p>\n }\n\n <div class=\"login-field\">\n <label class=\"login-label\" for=\"username\">{{ 'Login-Username' | translate }}</label>\n <div class=\"login-control\" [class.invalid]=\"isInvalid('username')\">\n <i class=\"fa-solid fa-user fa-fw\" aria-hidden=\"true\"></i>\n <input\n #username\n id=\"username\"\n type=\"text\"\n formControlName=\"username\"\n autocomplete=\"username\"\n [attr.aria-invalid]=\"isInvalid('username') ? 'true' : null\"\n [placeholder]=\"'Login-Username' | translate\"\n />\n </div>\n @if (isInvalid('username')) {\n <span class=\"login-validation\">{{ 'Login-Username-Required' | translate }}</span>\n }\n </div>\n\n <div class=\"login-field\">\n <label class=\"login-label\" for=\"password\">{{ 'Login-Password' | translate }}</label>\n <div class=\"login-control\" [class.invalid]=\"isInvalid('password')\">\n <i class=\"fa-solid fa-key fa-fw\" aria-hidden=\"true\"></i>\n <input\n id=\"password\"\n type=\"password\"\n formControlName=\"password\"\n autocomplete=\"current-password\"\n [attr.aria-invalid]=\"isInvalid('password') ? 'true' : null\"\n [placeholder]=\"'Login-Password' | translate\"\n />\n </div>\n @if (isInvalid('password')) {\n <span class=\"login-validation\">{{ 'Login-Password-Required' | translate }}</span>\n }\n </div>\n\n <div class=\"login-options\">\n <label class=\"login-remember\">\n <input id=\"rememberMe\" type=\"checkbox\" class=\"form-input\" formControlName=\"rememberMe\" />\n <span>{{ 'Login-RememberMe' | translate }}</span>\n </label>\n\n <shared-language-selector title=\"Login-SelectLanguage\"></shared-language-selector>\n </div>\n\n <lib-button\n class=\"login-submit\"\n type=\"submit\"\n intent=\"primary\"\n icon=\"fa-solid fa-right-to-bracket\"\n [loading]=\"formState().loading\"\n [success]=\"formState().success\"\n >\n {{ 'Login-SignIn' | translate }}\n </lib-button>\n </form>\n</div>\n\n<footer class=\"login-footer\">\n <span [innerHTML]=\"'Login-Copyright' | translate\"></span>\n <span>{{ 'Login-DesignBy' | translate }}</span>\n</footer>\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\n\n/**\n * Page layout for the sign-in screen: the configured `loginBackgroundUrl` behind a router outlet\n * and any projected content, which hold the login form.\n */\n@Component({\n selector: 'shared-login-layout',\n templateUrl: './login-layout.component.html',\n styleUrls: ['./login-layout.component.scss'],\n imports: [RouterModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n // The configuration is fixed for the application's lifetime, so this never has to change.\n '[class.has-background]': '!!backgroundUrl',\n },\n})\nexport class LoginLayoutComponent {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n //#region Variables\n private config: AppConfig = inject(APP_CONFIG);\n //#endregion\n //#region Properties\n /** Optional photograph behind the card. Absent leaves the app backdrop showing. */\n protected get backgroundUrl(): string | undefined {\n return this.config.loginBackgroundUrl;\n }\n //#endregion\n //#region Constructor and Angular life cycle methods\n //#endregion\n //#region Event handlers\n //#endregion\n //#region Public methods\n //#endregion\n //#region Private methods\n //#endregion\n}\n","@if (backgroundUrl) {\n <div class=\"background\" [style.background-image]=\"'url(' + backgroundUrl + ')'\"></div>\n}\n\n<div class=\"login-container\">\n <router-outlet></router-outlet>\n\n <!-- Projected content renders beside the outlet, so the layout can host a sign-in screen that is\n not reached through the router. Without it, a child placed inside this element was silently\n dropped -- which is what the Storybook story had been doing. -->\n <ng-content></ng-content>\n</div>\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\n\n/** Logo, application name and company name from the app configuration, shown in the top bar. */\n@Component({\n selector: 'shared-brand',\n templateUrl: './brand.component.html',\n styleUrls: ['./brand.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrandComponent {\n //#region Variables\n private config: AppConfig = inject(APP_CONFIG);\n //#endregion\n\n //#region Properties\n protected get appName(): string {\n return this.config.appName;\n }\n\n protected get companyName(): string {\n return this.config.companyName;\n }\n\n protected get logoUrl(): string | undefined {\n return this.config.logoUrl;\n }\n //#endregion\n}\n","<div class=\"brand\">\n @if (logoUrl) {\n <img class=\"brand-logo\" [src]=\"logoUrl\" [alt]=\"appName\" />\n }\n\n <div class=\"brand-text\">\n <span class=\"brand-app\">{{ appName }}</span>\n @if (companyName) {\n <span class=\"brand-company\">{{ companyName }}</span>\n }\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\n\n/**\n * Badge naming the configured environment, e.g. `DEV`, `QA` or `STG`, each in its own colour.\n * Hidden in `PROD` and when no environment is configured.\n */\n@Component({\n selector: 'shared-environment-badge',\n templateUrl: './environment-badge.component.html',\n styleUrls: ['./environment-badge.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EnvironmentBadgeComponent {\n //#region Variables\n private config: AppConfig = inject(APP_CONFIG);\n //#endregion\n\n //#region Properties\n /** CSS modifier class for the current environment, falling back to a neutral style. */\n protected get badgeClass(): string {\n const colorByEnvironment: Record<string, string> = {\n DEV: 'env-dev',\n QA: 'env-qa',\n STG: 'env-stg',\n };\n return colorByEnvironment[this.environment] ?? 'env-neutral';\n }\n\n /** Normalized environment key (uppercase, trimmed). */\n protected get environment(): string {\n return (this.config.environment ?? '').trim().toUpperCase();\n }\n\n /** The badge is hidden in production and when no environment is configured. */\n protected get isVisible(): boolean {\n return this.environment.length > 0 && this.environment !== 'PROD';\n }\n //#endregion\n}\n","@if (isVisible) {\n <span class=\"env-badge {{ badgeClass }}\">\n <span class=\"env-dot\"></span>\n <span class=\"env-label\">{{ environment }}</span>\n </span>\n}\n","import { AsyncPipe } from '@angular/common';\nimport {\n Component,\n ElementRef,\n HostListener,\n inject,\n OnInit,\n signal,\n Signal,\n viewChild,\n WritableSignal,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { Observable } from 'rxjs';\nimport { INotification } from '../../../models';\nimport { NotificationsService } from '../../../services';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\n\n/**\n * Bell with an unread count that opens a list of notifications. Clicking one marks it as read\n * and follows its link: external URLs open in a new window, others navigate in the app.\n */\n@Component({\n selector: 'shared-notifications',\n templateUrl: './notifications.component.html',\n styleUrls: ['./notifications.component.scss'],\n imports: [AsyncPipe, ButtonComponent, TranslatePipe],\n})\nexport class NotificationsComponent implements OnInit {\n //#region ViewChilds, Inputs, Outputs\n /** The open notifications panel; clicks inside it do not close it. */\n public readonly dropdown: Signal<ElementRef<HTMLDivElement> | undefined> =\n viewChild<ElementRef<HTMLDivElement>>('dropdown');\n //#endregion\n\n //#region Variables\n private notificationsService: NotificationsService = inject(NotificationsService);\n private router: Router = inject(Router);\n\n protected notifications$: Observable<INotification[]> = this.notificationsService.getNotifications();\n // A signal rather than a field: the panel is also closed from a window click handler, which\n // is not a binding on this view and so marks nothing.\n protected readonly showDropdown: WritableSignal<boolean> = signal(false);\n protected unreadCount$: Observable<number> = this.notificationsService.getUnreadCount();\n //#endregion\n\n //#region Properties\n /** Whether the notifications feature is enabled; when false the bell is not rendered. */\n public get isEnabled(): boolean {\n return this.notificationsService.isEnabled;\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n public ngOnInit(): void {\n this.notificationsService.start();\n }\n //#endregion\n\n //#region Event handlers\n /** Opens or closes the notifications panel. */\n public onDropdownClick(): void {\n this.showDropdown.update((isShown: boolean) => !isShown);\n }\n\n /** Marks every notification as read. */\n public onMarkAllAsRead(): void {\n this.notificationsService.markAllAsRead();\n }\n\n /** Marks the notification as read, closes the panel and follows its `callToActionUrl`, if any. */\n public onNotificationClick(notification: INotification): void {\n this.notificationsService.markAsRead(notification);\n this.showDropdown.set(false);\n\n const url: string | undefined = notification.callToActionUrl;\n if (!url) {\n return;\n }\n\n if (/^https?:\\/\\//i.test(url)) {\n window.open(url, '_blank', 'noopener');\n } else {\n this.router.navigateByUrl(url);\n }\n }\n //#endregion\n\n //#region Private methods\n @HostListener('window:click', ['$event'])\n protected documentClick(event: MouseEvent): void {\n if (this.showDropdown()) {\n let target: HTMLElement = <HTMLElement>event.target;\n while (target !== null && target.tagName?.toUpperCase() !== 'BODY') {\n if (target === this.dropdown()?.nativeElement) {\n return;\n }\n target = <HTMLElement>target.parentElement;\n }\n this.showDropdown.set(false);\n }\n }\n //#endregion\n}\n","@if (isEnabled) {\n <div #dropdown class=\"notifications\">\n <lib-button\n class=\"notifications-toggle\"\n intent=\"ghost\"\n icon=\"fa-solid fa-bell\"\n [ariaLabel]=\"'TopBar-Notifications-Title' | translate\"\n (click)=\"onDropdownClick()\"\n ></lib-button>\n\n @if (unreadCount$ | async; as count) {\n <span class=\"notifications-badge\">{{ count }}</span>\n }\n\n @if (showDropdown()) {\n <div class=\"notifications-panel\">\n @let items = (notifications$ | async) ?? [];\n\n <div class=\"notifications-header\">\n <span>{{ 'TopBar-Notifications-Title' | translate }}</span>\n @if (items.length > 0) {\n <button type=\"button\" class=\"notifications-mark-all\" (click)=\"onMarkAllAsRead()\">\n {{ 'TopBar-Notifications-MarkAllRead' | translate }}\n </button>\n }\n </div>\n\n @if (items.length > 0) {\n <ul class=\"notifications-list\">\n @for (item of items; track $index) {\n <li class=\"notifications-item\" [class.unread]=\"!item.isRead\">\n <button\n type=\"button\"\n class=\"notifications-item-btn\"\n [class.has-cta]=\"!!item.callToActionUrl\"\n (click)=\"onNotificationClick(item)\"\n >\n <span class=\"notifications-item-icon\"><i class=\"{{ item.icon }}\"></i></span>\n <span class=\"notifications-item-body\">\n <span class=\"notifications-item-title\">{{ item.title }}</span>\n <span class=\"notifications-item-description\">{{ item.description }}</span>\n </span>\n @if (item.callToActionUrl) {\n <i class=\"notifications-item-cta fa-solid fa-chevron-right\"></i>\n }\n </button>\n </li>\n }\n </ul>\n } @else {\n <div class=\"notifications-empty\">{{ 'TopBar-Notifications-Empty' | translate }}</div>\n }\n </div>\n }\n </div>\n}\n","import { DOCUMENT, Injectable, computed, effect, inject, signal } from '@angular/core';\n\n/** What the user chose. `system` follows the operating system and keeps following it. */\nexport type ThemePreference = 'light' | 'dark' | 'system';\n\n/** What the stylesheet is actually asked for. The CSS never sees `system`. */\nexport type ResolvedTheme = 'light' | 'dark';\n\n/** Key the preference is stored under, and the one the pre-paint snippet has to read. */\nexport const THEME_STORAGE_KEY = 'zambon-theme';\n\n/** Attribute on `<html>` the token layer keys off. */\nconst THEME_ATTRIBUTE = 'data-theme';\n\nconst SYSTEM_DARK_QUERY = '(prefers-color-scheme: dark)';\n\n/**\n * Owns the light/dark choice and writes it to `<html>`.\n *\n * The CSS switch is an attribute rather than `prefers-color-scheme` so that a user can pick light on\n * a dark machine. Once this service exists it always writes the attribute; with nothing stored it\n * keeps whatever the page already set, and falls back to light. Following the operating system is\n * still a supported choice --\n * it is resolved here, in TypeScript, and written out as a concrete `light` or `dark`. That is why\n * `theme.css` holds one dark block instead of two that would have to be kept identical.\n *\n * The attribute is normally written before this service exists, by the snippet in `index.html`\n * documented in the design-tokens guide -- an Angular service cannot run before the first paint,\n * and a frame of the wrong theme is worse than no theme. This picks up from there.\n */\n@Injectable({ providedIn: 'root' })\nexport class ThemeService {\n //#region Variables\n private readonly document = inject(DOCUMENT);\n private readonly preferenceState = signal<ThemePreference>(this.readStoredPreference());\n private readonly systemPrefersDark = signal<boolean>(this.readSystemPrefersDark());\n //#endregion\n\n //#region Properties\n /** What the user chose, including `system`. */\n public readonly preference = this.preferenceState.asReadonly();\n\n /** What is actually applied right now. `system` is already resolved here. */\n public readonly resolved = computed<ResolvedTheme>(() => {\n const preference = this.preferenceState();\n if (preference !== 'system') {\n return preference;\n }\n return this.systemPrefersDark() ? 'dark' : 'light';\n });\n //#endregion\n\n constructor() {\n this.watchSystemPreference();\n\n // Writes on creation as well as on every later change, so a mismatch between the pre-paint\n // snippet and the stored preference is corrected rather than left on screen.\n effect(() => {\n this.document.documentElement.setAttribute(THEME_ATTRIBUTE, this.resolved());\n });\n }\n\n //#region Methods\n /** Records a choice and applies it. Persisting is best-effort: a blocked store is not an error. */\n public setPreference(preference: ThemePreference): void {\n this.preferenceState.set(preference);\n\n try {\n this.document.defaultView?.localStorage.setItem(THEME_STORAGE_KEY, preference);\n } catch {\n // Private mode, or storage disabled by policy. The choice still applies for this session.\n }\n }\n\n /** Steps light -> dark -> system -> light, which is what a single-button switch needs. */\n public cyclePreference(): void {\n const order: ThemePreference[] = ['light', 'dark', 'system'];\n const next = order[(order.indexOf(this.preferenceState()) + 1) % order.length];\n this.setPreference(next);\n }\n //#endregion\n\n //#region Private methods\n private readStoredPreference(): ThemePreference {\n try {\n const stored = this.document.defaultView?.localStorage.getItem(THEME_STORAGE_KEY);\n if (stored === 'light' || stored === 'dark' || stored === 'system') {\n return stored;\n }\n } catch {\n // Unreadable storage is the same as no stored choice.\n }\n\n // Nothing stored: honour whatever is already on <html> rather than assuming light. That\n // attribute is what the pre-paint snippet decided, and an application that hardcodes\n // `data-theme=\"dark\"` and never offers a switch means it -- this used to overwrite both\n // the moment the first screen containing the switch rendered.\n const existing = this.document.documentElement.getAttribute(THEME_ATTRIBUTE);\n return existing === 'dark' || existing === 'light' ? existing : 'light';\n }\n\n private readSystemPrefersDark(): boolean {\n return this.document.defaultView?.matchMedia?.(SYSTEM_DARK_QUERY).matches ?? false;\n }\n\n /**\n * Keeps following the operating system after the first read. Without this, choosing `system` and\n * then switching the machine to dark would leave the application on light until a reload.\n */\n private watchSystemPreference(): void {\n const query = this.document.defaultView?.matchMedia?.(SYSTEM_DARK_QUERY);\n query?.addEventListener('change', (event) => this.systemPrefersDark.set(event.matches));\n }\n //#endregion\n}\n","import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\nimport { ThemePreference, ThemeService } from './theme.service';\n\n/**\n * The top bar's light/dark control.\n *\n * One button stepping light -> dark -> system rather than three, because the bar is tight and this\n * is not a setting people change often. The icon shows the choice that is in force, not the one a\n * click would bring: a control that displays its own next state cannot be read at a glance.\n *\n * It has no stylesheet: a ghost `lib-button` is already the icon-button treatment, and a second\n * copy of it here would drift from the one in the top bar beside it.\n */\n@Component({\n selector: 'shared-theme-switch',\n templateUrl: './theme-switch.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ButtonComponent, TranslatePipe],\n})\nexport class ThemeSwitchComponent {\n //#region Variables\n private readonly theme = inject(ThemeService);\n //#endregion\n\n //#region Properties\n /** The choice in force, including `system`. */\n protected readonly preference = this.theme.preference;\n\n /** Full Font Awesome classes for the current choice -- the style prefix is not optional. */\n protected readonly icon = computed<string>(() => {\n const byPreference: Record<ThemePreference, string> = {\n light: 'fa-solid fa-sun',\n dark: 'fa-solid fa-moon',\n system: 'fa-solid fa-circle-half-stroke',\n };\n return byPreference[this.preference()];\n });\n\n /** Translation key naming the current choice, used for the label and the tooltip. */\n protected readonly label = computed<string>(() => {\n const byPreference: Record<ThemePreference, string> = {\n light: 'TopBar-Theme-Light',\n dark: 'TopBar-Theme-Dark',\n system: 'TopBar-Theme-System',\n };\n return byPreference[this.preference()];\n });\n //#endregion\n\n //#region Event handlers\n protected onClick(): void {\n this.theme.cyclePreference();\n }\n //#endregion\n}\n","<lib-button\n intent=\"ghost\"\n [icon]=\"icon()\"\n [ariaLabel]=\"label() | translate\"\n [title]=\"label() | translate\"\n (click)=\"onClick()\"\n></lib-button>\n","import { Component, inject, OnInit, signal, WritableSignal } from '@angular/core';\nimport { ICurrentUserInfo } from '../../../models';\nimport { AuthenticationService } from '../../../services';\n\n/** Signed-in user's picture, name and position in the top bar. Shows initials when there is no picture. */\n@Component({\n selector: 'shared-user-profile',\n templateUrl: './user-profile.component.html',\n styleUrls: ['./user-profile.component.scss'],\n})\nexport class UserProfileComponent implements OnInit {\n //#region Variables\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n\n // A signal rather than a field: the top bar renders the name and the avatar, and this is\n // only filled in ngOnInit -- after the first pass has already been and gone.\n protected readonly user: WritableSignal<ICurrentUserInfo | null> = signal(null);\n //#endregion\n\n //#region Properties\n /** Up to two uppercase initials derived from the user's name, used when no picture is set. */\n protected get initials(): string {\n const parts: string[] = this.name\n .trim()\n .split(/\\s+/)\n .filter((p: string) => p.length > 0);\n if (parts.length === 0) {\n return '';\n }\n\n const first: string = parts[0].charAt(0);\n const last: string = parts.length > 1 ? parts[parts.length - 1].charAt(0) : '';\n return (first + last).toUpperCase();\n }\n\n protected get name(): string {\n return this.user()?.name ?? '';\n }\n\n protected get pictureUrl(): string | undefined {\n return this.user()?.pictureUrl;\n }\n\n protected get position(): string {\n return this.user()?.position ?? '';\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n public ngOnInit(): void {\n this.user.set(this.authenticationService.getUserInfo());\n }\n //#endregion\n}\n","<div class=\"user-profile\">\n <div class=\"user-text\">\n <span class=\"user-name\">{{ name }}</span>\n @if (position) {\n <span class=\"user-position\">{{ position }}</span>\n }\n </div>\n\n <div class=\"user-avatar\">\n @if (pictureUrl) {\n <img class=\"user-avatar-img\" [src]=\"pictureUrl\" [alt]=\"name\" />\n } @else {\n <span class=\"user-avatar-initials\">{{ initials }}</span>\n }\n </div>\n</div>\n","import { Component, output, OutputEmitterRef } from '@angular/core';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { LanguageSelectorComponent } from '../../auth/components/language-selector/language-selector.component';\nimport { BrandComponent } from './brand/brand.component';\nimport { EnvironmentBadgeComponent } from './environment-badge/environment-badge.component';\nimport { NotificationsComponent } from './notifications/notifications.component';\nimport { ThemeSwitchComponent } from '../../theme/theme-switch.component';\nimport { UserProfileComponent } from './user-profile/user-profile.component';\n\n/**\n * Bar across the top of the app with the brand, environment badge, notifications, theme and\n * language switches, user profile and a logout button.\n */\n@Component({\n selector: 'shared-top-bar',\n templateUrl: './top-bar.component.html',\n styleUrls: ['./top-bar.component.scss'],\n imports: [\n BrandComponent,\n ButtonComponent,\n EnvironmentBadgeComponent,\n LanguageSelectorComponent,\n NotificationsComponent,\n ThemeSwitchComponent,\n TranslatePipe,\n UserProfileComponent,\n ],\n})\nexport class TopBarComponent {\n //#region ViewChilds, Inputs, Outputs\n /** Emitted when the logout button is clicked. */\n public readonly logout: OutputEmitterRef<void> = output<void>();\n //#endregion\n\n //#region Event handlers\n /** Emits `logout`. */\n public onLogoutClick(): void {\n this.logout.emit();\n }\n //#endregion\n}\n","<div class=\"top-bar\">\n <div class=\"top-bar-section top-bar-start\">\n <shared-brand></shared-brand>\n <shared-environment-badge></shared-environment-badge>\n </div>\n\n <div class=\"top-bar-section top-bar-end\">\n <div class=\"top-bar-actions\">\n <shared-notifications></shared-notifications>\n <shared-language-selector [showFlag]=\"true\"></shared-language-selector>\n <shared-theme-switch></shared-theme-switch>\n </div>\n\n <div class=\"top-bar-identity\">\n <shared-user-profile></shared-user-profile>\n\n <lib-button\n class=\"top-bar-logout\"\n intent=\"ghost\"\n icon=\"fa-solid fa-arrow-right-from-bracket\"\n [ariaLabel]=\"'Main-Logout' | translate\"\n (click)=\"onLogoutClick()\"\n ></lib-button>\n </div>\n </div>\n</div>\n","import { Component, inject, OnDestroy, OnInit, Signal, viewChild } from '@angular/core';\nimport { Router, RouterModule } from '@angular/router';\nimport { APP_CONFIG, ITab, Tab, TabsComponent, TabService } from '@zambon-dev/ui/framework';\nimport {\n ModalComponent,\n SidebarComponent,\n SidebarMenu,\n SidebarMenuOpenMode,\n SidebarService,\n toSidebarMenuOpenMode,\n} from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { Subject, take, takeUntil } from 'rxjs';\nimport { EXTERNAL_CONTENT_ROUTE_PATH } from '../../models';\nimport { AuthenticationService, ExternalContentService, ExternalUrlResolverService } from '../../services';\nimport { TopBarComponent } from '../top-bar';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\n\n/**\n * Application shell after sign-in: top bar, sidebar menu and tabs. Menu items open as tabs,\n * embedded pages or new browser windows, and logging out asks for confirmation first.\n */\n@Component({\n selector: 'shared-main-layout',\n templateUrl: './main-layout.component.html',\n styleUrls: ['./main-layout.component.scss'],\n imports: [\n ButtonComponent,\n ModalComponent,\n RouterModule,\n SidebarComponent,\n TabsComponent,\n TopBarComponent,\n TranslatePipe,\n ],\n})\nexport class MainLayoutComponent implements OnInit, OnDestroy {\n //#region ViewChilds, Inputs, Outputs\n private readonly logoutModal: Signal<ModalComponent | undefined> = viewChild<ModalComponent>('logoutModal');\n //#endregion\n\n //#region Variables\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private externalContentService: ExternalContentService = inject(ExternalContentService);\n private externalUrlResolverService: ExternalUrlResolverService = inject(ExternalUrlResolverService);\n private router: Router = inject(Router);\n private sidebarService: SidebarService = inject(SidebarService);\n private tabService: TabService = inject(TabService);\n\n /** Application version (from AppConfig) projected into the sidebar footer. */\n protected appVersion: string = inject(APP_CONFIG).version;\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n\n public ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n public ngOnInit(): void {\n const url: string = this.router.url;\n\n if (url !== '/' && !this.tabService.isUrlOpen(url)) {\n this.sidebarService\n .getMenuFromUrl(url)\n .pipe(take(1))\n .subscribe({\n next: (item: SidebarMenu) => {\n if (item) {\n this.tabService.updateTabTitle(url, item.label);\n }\n },\n // A deep-linked title is best-effort. Menu endpoints answer 404 for a URL they do not\n // know -- the embedded-content route among them -- and that must not surface as an\n // unhandled rejection.\n error: () => undefined,\n });\n }\n\n this.sidebarService.menuExternalUrlSelected\n .pipe(takeUntil(this.destroy$))\n .subscribe((item: SidebarMenu) => this.openExternalMenu(item));\n\n this.sidebarService.menuUrlSelected.pipe(takeUntil(this.destroy$)).subscribe((item: SidebarMenu) => {\n const tab: ITab = new Tab({\n title: item.label,\n url: item.url,\n });\n this.tabService.openTab(tab);\n });\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /** Opens the logout confirmation modal. */\n public onLogoutClick(): void {\n this.logoutModal()?.toggleModal();\n }\n\n /** Signs out, clearing the stored session and closing every tab, then navigates to `/login`. */\n public onLogoutConfirm(): void {\n this.authenticationService.signOut();\n this.router.navigate(['/login']);\n }\n //#endregion\n\n //#region Private methods\n private openExternalMenu(item: SidebarMenu): void {\n const rawUrl: string = item.url ?? '';\n\n if (rawUrl.length === 0) {\n return;\n }\n\n if (toSidebarMenuOpenMode(item.openMode) === SidebarMenuOpenMode.ExternalEmbedded) {\n // The tab has to be a real Angular route, so the destination travels by menu id and is\n // resolved by ExternalContentComponent. A `?url=` query string would collapse every\n // embedded tab into one -- TabService and CustomReuseStrategy key tabs on path segments\n // only -- and would also let anyone frame an arbitrary site inside our own chrome.\n this.externalContentService.register(item);\n\n const tab: ITab = new Tab({\n title: item.label,\n url: `/${EXTERNAL_CONTENT_ROUTE_PATH}/${item.id}`,\n });\n this.tabService.openTab(tab);\n\n return;\n }\n\n const url: string = this.externalUrlResolverService.resolve(rawUrl);\n\n if (!this.externalUrlResolverService.isAllowed(url)) {\n console.error(`Sidebar menu \"${item.label}\" points to an unsupported external address and was not opened.`, url);\n return;\n }\n\n window.open(url, '_blank', 'noopener,noreferrer');\n }\n //#endregion\n}\n","<div class=\"main-container\">\n <div class=\"sidebar-region\">\n <lib-sidebar>\n @if (appVersion) {\n <span>v{{ appVersion }}</span>\n }\n </lib-sidebar>\n </div>\n\n <shared-top-bar class=\"toolbar\" (logout)=\"onLogoutClick()\"></shared-top-bar>\n\n <div class=\"content\">\n <framework-tabs>\n <router-outlet></router-outlet>\n </framework-tabs>\n </div>\n</div>\n\n<lib-modal #logoutModal position=\"top\" size=\"xl\" [closeButtonText]=\"'Main-Logout-Modal-Message-Cancel' | translate\">\n <div body>\n <h5>{{ 'Main-Logout-Modal-Message' | translate }}</h5>\n </div>\n <div footer>\n <lib-button intent=\"danger\" (click)=\"onLogoutConfirm()\">\n {{ 'Main-Logout-Modal-Message-Confirm' | translate }}\n </lib-button>\n </div>\n</lib-modal>\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { LoginLayoutComponent } from '../layouts';\nimport { LoginComponent } from './components';\n\nconst routes: Routes = [\n {\n path: '',\n component: LoginLayoutComponent,\n children: [\n { path: '', redirectTo: 'login', pathMatch: 'full' },\n { path: 'login', component: LoginComponent },\n ],\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n})\nexport class SharedAuthModule {}\n","import { inject, Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';\nimport { AuthenticationService } from '../../services';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGuard implements CanActivate {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n private router: Router = inject(Router);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n public canActivate(_: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n if (!this.authenticationService.isAuthenticated) {\n this.router.navigate(['/login'], { queryParams: { returnUrl: state.url } });\n return false;\n }\n return true;\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { JwtInterceptor } from '@auth0/angular-jwt';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\nimport { catchError, Observable, shareReplay, switchMap, tap } from 'rxjs';\nimport { AuthenticationService } from '../../services';\n\n@Injectable()\nexport class AuthInterceptor implements HttpInterceptor {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n private config: AppConfig = inject(APP_CONFIG);\n private jwtInterceptor: JwtInterceptor = inject(JwtInterceptor);\n private refreshToken$?: Observable<string>;\n private router: Router = inject(Router);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n public intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {\n if (\n request.url.indexOf(this.config.BASE_URL) >= 0 &&\n !this.jwtInterceptor.isDisallowedRoute(request) &&\n this.authenticationService.isTokenExpired\n ) {\n if (!this.refreshToken$) {\n this.refreshToken$ = this.authenticationService.tryRefreshToken().pipe(\n shareReplay(),\n tap(() => {\n this.refreshToken$ = undefined;\n }),\n );\n }\n\n return this.refreshToken$!.pipe(\n switchMap((token: string) => {\n return next.handle(request.clone({ setHeaders: { authorization: `Bearer ${token}` } }));\n }),\n catchError((err: HttpErrorResponse) => {\n if (err.status === 401) {\n this.authenticationService.signOut();\n this.router.navigate(['/login']);\n }\n throw err;\n }),\n );\n }\n return next.handle(request);\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { Component, inject, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { ButtonFiltersComponent } from '@zambon-dev/ui/framework';\nimport { Subject } from 'rxjs';\n\n/**\n * Base class for a ribbon filter panel. Subclasses build the filter form in `formSetup()` and place\n * a `framework-button-filters` in their template, which applies the form to the grid.\n */\n// No strategy on purpose: Angular never inherits `changeDetection`, so one declared here would\n// describe a class that is never instantiated, while every subclass compiles to whatever it\n// declares -- which in v22 means OnPush. Correctness comes from the state below notifying\n// Angular, never from this decorator. See docs/guides/reactivity.md.\n@Component({ template: '' })\nexport abstract class FiltersBase implements OnInit, OnDestroy {\n //#region ViewChilds, Inputs, Outputs\n @ViewChild(ButtonFiltersComponent) protected buttonFilters?: ButtonFiltersComponent;\n //#endregion\n\n //#region Variables\n protected destroy$: Subject<boolean> = new Subject<boolean>();\n protected filterForm!: FormGroup;\n protected formBuilder: FormBuilder = inject(FormBuilder);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n\n public ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n public ngOnInit(): void {\n this.filterForm = this.formSetup();\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /** Fills the filter form with the given values and applies them through the filters button. */\n public setFilters(filters: { [key: string]: any }): void {\n this.filterForm.patchValue(filters);\n\n setTimeout(() => {\n if (this.buttonFilters) {\n this.buttonFilters.setFilters(filters);\n }\n });\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n\n //#region Abstract methods\n protected abstract formSetup(): FormGroup<any>;\n //#endregion\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DataGridDataset, IGridColumn, IListParameters } from '@zambon-dev/ui/library';\nimport { Observable, of } from 'rxjs';\nimport { IOperationsHistoryList } from '../models';\nimport { OperationsHistoryService } from '../services';\n\n@Injectable()\nexport class OperationsHistoryDataset extends DataGridDataset {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n public override columns: IGridColumn[] = [{ field: '', headerName: '' }];\n public controllerName?: string;\n\n protected operationsHistoryService: OperationsHistoryService = inject(OperationsHistoryService);\n\n private _serviceID?: number | undefined;\n //#endregion\n\n //#region Properties\n public set serviceId(value: number | undefined) {\n if (this._serviceID !== value) {\n this._serviceID = value;\n this.refresh();\n }\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n constructor() {\n super();\n\n this.configs.hideColumnHeaders = true;\n this.configs.showMessageOnEmpty = false;\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n public getData(params: IListParameters): Observable<IOperationsHistoryList[]> {\n this.configs.showMessageOnEmpty = !!this._serviceID;\n\n return !!this.parentEntityId && !!this.controllerName && !!this._serviceID\n ? this.operationsHistoryService.list(this.controllerName, this.parentEntityId, this._serviceID, params)\n : of<IOperationsHistoryList[]>([]);\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DataGridDataset, IGridColumn, IListParameters } from '@zambon-dev/ui/library';\nimport { Observable, of } from 'rxjs';\nimport { IServicesHistoryList } from '../models';\nimport { ServicesHistoryService } from '../services';\n\n@Injectable()\nexport class ServicesHistoryDataset extends DataGridDataset {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n public override columns: IGridColumn[] = [{ field: '', headerName: '' }];\n\n public controllerName?: string;\n\n protected servicesHistoryService: ServicesHistoryService = inject(ServicesHistoryService);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n constructor() {\n super();\n\n this.configs.hideColumnHeaders = true;\n this.configs.rowHeight = 52;\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n public getData(params: IListParameters): Observable<IServicesHistoryList[]> {\n return !!this.parentEntityId && !!this.controllerName\n ? this.servicesHistoryService.list(this.controllerName, this.parentEntityId, this.withUtcPeriod(params))\n : of<IServicesHistoryList[]>([]);\n }\n //#endregion\n\n //#region Private methods\n /**\n * Widens the picked dates to whole local days and sends them as UTC instants.\n *\n * A date input yields `YYYY-MM-DD` -- no time, no zone -- while the history stores UTC instants\n * and the backend compares what it is given. Sent as they are, \"from the 5th to the 5th\" is the\n * single instant at midnight and matches nothing, and in a zone behind UTC it does not even\n * cover the right day.\n *\n * Done here rather than in the filter form because the form is what the modal shows: reopening\n * it patches these values straight back into the fields, which have to keep reading as the dates\n * the person picked. This is the boundary where the request is built, so it is also the last\n * point that sees every caller.\n */\n private withUtcPeriod(params: IListParameters): IListParameters {\n const filters: { [key: string]: string } | undefined = params.filters;\n\n if (!filters?.['changedOnFrom'] && !filters?.['changedOnTo']) {\n return params;\n }\n\n const converted: { [key: string]: string } = { ...filters };\n\n if (filters['changedOnFrom']) {\n converted['changedOnFrom'] = ServicesHistoryDataset.toUtcInstant(filters['changedOnFrom'], 'start');\n }\n\n if (filters['changedOnTo']) {\n converted['changedOnTo'] = ServicesHistoryDataset.toUtcInstant(filters['changedOnTo'], 'end');\n }\n\n return { ...params, filters: converted };\n }\n\n /**\n * The UTC wall clock of one end of a local day, written without a zone designator.\n *\n * Without one on purpose. `DateTime.TryParse` on the server reads a trailing `Z` as an instant\n * and hands back the *machine's* local time for it, so the same request would mean different\n * things on a server in UTC and one in UTC-3, and the stored column is plain UTC either way.\n * Dropping the designator leaves the numbers alone, which is what the column holds.\n */\n private static toUtcInstant(value: string, edge: 'start' | 'end'): string {\n const [year, month, day]: number[] = value.split('-').map(Number);\n\n // Left alone when it is not the date input's own format: a value set from somewhere else is\n // already whatever its caller meant.\n if ([year, month, day].some((part: number) => Number.isNaN(part))) {\n return value;\n }\n\n const instant: Date =\n edge === 'start' ? new Date(year, month - 1, day, 0, 0, 0, 0) : new Date(year, month - 1, day, 23, 59, 59, 999);\n\n return instant.toISOString().replace(/Z$/, '');\n }\n //#endregion\n}\n","import { Component, DOCUMENT, inject, OnDestroy, OnInit, signal, WritableSignal } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\nimport { ActivatedRoute } from '@angular/router';\nimport { ButtonComponent, TabService, TabViewBase } from '@zambon-dev/ui/framework';\nimport { RibbonGroupComponent } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { take, takeUntil } from 'rxjs';\nimport { EXTERNAL_CONTENT_CONFIGS, ExternalContentConfigs, IExternalContentEntry } from '../../models';\nimport { ExternalContentService, ExternalUrlResolverService } from '../../services';\n\n/**\n * Displays an external destination inside an application tab.\n *\n * Routed as `/external-content/:menuID` — the destination itself never travels in the URL, so no\n * one can hand-craft a link that makes the application frame an arbitrary site.\n *\n * A `TabViewBase` like any other screen, so its actions live in the ribbon rather than in a\n * bar of its own: it must be routed under `DefaultTabViewComponent`, which is what renders the\n * `#ribbon` template this view publishes. Use the exported `externalContentRoutes`.\n */\n@Component({\n selector: 'shared-external-content',\n templateUrl: './external-content.component.html',\n styleUrls: ['./external-content.component.scss'],\n imports: [ButtonComponent, RibbonGroupComponent, TranslatePipe],\n})\nexport class ExternalContentComponent extends TabViewBase implements OnInit, OnDestroy {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n // Signals, every one: this whole screen is decided after the first paint, by a lookup that\n // resolves, a frame that loads or fails to, and a timeout that gives up waiting. None of\n // those is a binding on this view, so as fields they changed nothing on screen.\n protected readonly frameUrl: WritableSignal<SafeResourceUrl | undefined> = signal(undefined);\n protected readonly isBlocked: WritableSignal<boolean> = signal(false);\n protected readonly isFrameLoading: WritableSignal<boolean> = signal(false);\n protected readonly isInsecure: WritableSignal<boolean> = signal(false);\n protected readonly isSlow: WritableSignal<boolean> = signal(false);\n protected readonly isUnavailable: WritableSignal<boolean> = signal(false);\n protected readonly label: WritableSignal<string> = signal('');\n protected readonly resolvedUrl: WritableSignal<string> = signal('');\n\n private activatedRoute: ActivatedRoute = inject(ActivatedRoute);\n private configs: ExternalContentConfigs = inject(EXTERNAL_CONTENT_CONFIGS);\n private document: Document = inject(DOCUMENT);\n private externalContentService: ExternalContentService = inject(ExternalContentService);\n private externalUrlResolverService: ExternalUrlResolverService = inject(ExternalUrlResolverService);\n private sanitizer: DomSanitizer = inject(DomSanitizer);\n private slowHintTimeout?: ReturnType<typeof setTimeout>;\n private tabService: TabService = inject(TabService);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n constructor() {\n super();\n }\n\n public override ngOnDestroy(): void {\n this.clearSlowHint();\n\n super.ngOnDestroy();\n }\n\n public ngOnInit(): void {\n const menuID = Number(this.activatedRoute.snapshot.paramMap.get('menuID'));\n\n if (!menuID) {\n this.isUnavailable.set(true);\n this.loading = false;\n\n return;\n }\n\n this.externalContentService\n .find(menuID)\n .pipe(take(1), takeUntil(this.destroy$))\n .subscribe((entry: IExternalContentEntry | undefined) => this.show(entry));\n }\n //#endregion\n\n //#region Event handlers\n protected onFrameLoad(): void {\n this.clearSlowHint();\n\n this.isFrameLoading.set(false);\n this.isSlow.set(false);\n }\n\n protected onOpenInNewTab(): void {\n window.open(this.resolvedUrl(), '_blank', 'noopener,noreferrer');\n }\n\n protected onReload(): void {\n const url: SafeResourceUrl | undefined = this.frameUrl();\n\n if (!url || this.isFrameLoading()) {\n return;\n }\n\n // The frame is cross-origin, so its location cannot be touched from here: destroying the\n // element and building a new one is the only way to make it navigate again. That also clears\n // the previous render, which is the point -- otherwise a reload leaves the old content on\n // screen and the user cannot tell whether anything happened.\n //\n // The rebuild has to wait for a macrotask, not a microtask. Angular coalesces changes within a\n // change-detection cycle, so setting frameUrl back before the next tick means @if sees the\n // value go A -> undefined -> A and never toggles: the element is never destroyed, nothing\n // navigates, no `load` ever fires, and the view spins until the timeout gives up. Yielding to\n // a timeout lets a cycle run with the frame unmounted, which is what really tears it down.\n this.frameUrl.set(undefined);\n this.isFrameLoading.set(true);\n\n setTimeout(() => this.displayFrame(url));\n }\n //#endregion\n\n //#region Public methods\n //#endregion\n\n //#region Private methods\n private clearSlowHint(): void {\n if (this.slowHintTimeout !== undefined) {\n clearTimeout(this.slowHintTimeout);\n this.slowHintTimeout = undefined;\n }\n }\n\n private isMixedContent(url: string): boolean {\n // A browser refuses to embed an http:// frame in an https:// page, unconditionally: an iframe\n // is active mixed content. Nothing on this side can permit it -- no attribute, no header, and\n // not CSP, which only ever restricts further. Left alone the frame renders empty, so this is\n // checked up front to say so instead.\n //\n // Unlike a site refusing to be framed, this one IS knowable before trying: both protocols are\n // in hand. `new URL` cannot throw here -- isAllowed has already parsed the same string -- and\n // it normalises the scheme's case, which a prefix test would not.\n return this.document.location.protocol === 'https:' && new URL(url).protocol === 'http:';\n }\n\n private isOriginAllowed(url: string): boolean {\n if (this.configs.allowedOrigins.length === 0) {\n return true;\n }\n\n try {\n return this.configs.allowedOrigins.indexOf(new URL(url).origin) !== -1;\n } catch {\n return false;\n }\n }\n\n private show(entry: IExternalContentEntry | undefined): void {\n // TabViewBase starts every screen loading so its ribbon buttons begin disabled; every exit\n // from here has to clear it or they never become usable.\n this.loading = false;\n\n if (!entry || !entry.url) {\n this.isUnavailable.set(true);\n\n return;\n }\n\n this.label.set(entry.label);\n\n // MainLayoutComponent only resolves a deep-linked title through getMenuFromUrl, and a Tab\n // starts with isTitleLoading true, so a tab re-created by TabsComponent after a refresh would\n // spin forever if nothing set its title. Setting it here is idempotent.\n this.tabService.updateActiveTabRootTitle(entry.label);\n\n // Order matters: resolve, then validate, then trust. What we vet has to be exactly what the\n // browser receives, and a placeholder is substituted before the scheme can be inspected.\n const url: string = this.externalUrlResolverService.resolve(entry.url);\n\n if (!this.externalUrlResolverService.isAllowed(url) || !this.isOriginAllowed(url)) {\n console.error(\n `Embedded menu item \"${entry.label}\" points to an address that is not allowed and was not displayed.`,\n url,\n );\n this.isBlocked.set(true);\n\n return;\n }\n\n // Set before the mixed-content check, not after: that state still offers 'open in a new\n // browser tab', and the button reads this to decide whether it has anywhere to go.\n this.resolvedUrl.set(url);\n\n if (this.isMixedContent(url)) {\n this.isInsecure.set(true);\n\n return;\n }\n\n // Trusted once, into a field. From a getter or a pipe this would hand back a new\n // SafeResourceUrl on every change-detection pass, and Angular would re-set the iframe's src\n // and reload the destination each time.\n this.displayFrame(this.sanitizer.bypassSecurityTrustResourceUrl(url));\n }\n\n private displayFrame(url: SafeResourceUrl): void {\n this.isFrameLoading.set(true);\n this.frameUrl.set(url);\n\n this.startSlowHint();\n }\n\n private startSlowHint(): void {\n this.clearSlowHint();\n\n // Not detection, and it must never be turned into one: whether a site refuses to be framed\n // (X-Frame-Options, CSP frame-ancestors) is not observable from JavaScript. A refused frame\n // usually fires `load` immediately and renders the browser's own error page, in which case\n // this hint never appears -- the ribbon's \"open in a new browser tab\" button is the actual\n // way out, and it is always present.\n this.slowHintTimeout = setTimeout(() => {\n // Stop claiming it is loading. A destination that never reports `load` -- a refused frame\n // among them -- would otherwise spin forever and keep the actions disabled; hand the\n // controls back and let the hint do the explaining.\n this.isFrameLoading.set(false);\n this.isSlow.set(true);\n }, this.configs.slowFrameHintDelay);\n }\n //#endregion\n}\n","<!-- Published to DefaultTabViewComponent through TabViewService, so the actions sit in the\n application's ribbon like every other screen's. -->\n<ng-template #ribbon>\n <lib-ribbon-group [label]=\"'RibbonGroup-Page' | translate\">\n <!-- Same icon and label as framework-button-refresh, so reloading a report reads as the\n same action as refreshing a grid. `loading` is what spins it while the frame loads. -->\n <framework-button\n icon=\"fa-sync-alt\"\n label=\"Button-Refresh\"\n [disabled]=\"!resolvedUrl() || isInsecure()\"\n [loading]=\"isFrameLoading()\"\n (action)=\"onReload()\"\n >\n </framework-button>\n\n <framework-button\n icon=\"fa-arrow-up-right-from-square\"\n label=\"ExternalContent-OpenInNewTab\"\n [disabled]=\"!resolvedUrl()\"\n (action)=\"onOpenInNewTab()\"\n >\n </framework-button>\n </lib-ribbon-group>\n</ng-template>\n\n@if (isUnavailable()) {\n <div class=\"external-content-message\">\n <i class=\"fa-solid fa-link-slash\"></i>\n <span class=\"external-content-message-title\">{{ 'ExternalContent-Unavailable-Title' | translate }}</span>\n <span>{{ 'ExternalContent-Unavailable-Message' | translate }}</span>\n </div>\n} @else if (isInsecure()) {\n <div class=\"external-content-message\">\n <i class=\"fa-solid fa-shield-halved\"></i>\n <span class=\"external-content-message-title\">{{ 'ExternalContent-Insecure-Title' | translate }}</span>\n <span>{{ 'ExternalContent-Insecure-Message' | translate }}</span>\n </div>\n} @else if (isBlocked()) {\n <div class=\"external-content-message\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n <span class=\"external-content-message-title\">{{ 'ExternalContent-Blocked-Title' | translate }}</span>\n <span>{{ 'ExternalContent-Blocked-Message' | translate }}</span>\n </div>\n} @else {\n @if (isSlow()) {\n <div class=\"external-content-hint\">{{ 'ExternalContent-SlowHint' | translate }}</div>\n }\n @if (frameUrl() || isFrameLoading()) {\n <!--\n The container stays mounted across a reload, which briefly clears frameUrl, so the panel\n does not flicker out and back. What goes away is the frame itself, on purpose.\n\n sandbox and referrerpolicy are STATIC attributes on purpose. Angular rejects `sandbox`\n as a binding on an <iframe> outright (NG0910) — it may only be a static attribute — and\n the whole element then fails to render.\n\n The token list is fixed for every destination, and deliberately not configurable per\n menu item:\n - allow-same-origin keeps the frame in the destination's own origin so its cookies and\n storage work; without it an SSO'd report will not render. It grants no access to ours,\n provided the destination is cross-origin -- never point an embedded item at this\n application's own origin, use an internal route for that.\n - allow-top-navigation is absent on purpose: a framed site must not be able to navigate\n the whole application away.\n - allow-popups-to-escape-sandbox keeps print and download popups usable.\n -->\n <div class=\"external-content-frame-container\">\n @if (isFrameLoading()) {\n <div class=\"external-content-loading\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n\n <span>{{ 'Loading' | translate }}</span>\n </div>\n }\n @if (frameUrl()) {\n <iframe\n class=\"external-content-frame\"\n sandbox=\"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads\"\n referrerpolicy=\"strict-origin-when-cross-origin\"\n [src]=\"frameUrl()\"\n [attr.title]=\"label() | translate\"\n (load)=\"onFrameLoad()\"\n >\n </iframe>\n }\n </div>\n }\n}\n","import { Routes } from '@angular/router';\nimport { DefaultTabViewComponent, FRAMEWORK_VIEW_TYPE, FrameworkViewType } from '@zambon-dev/ui/framework';\nimport { EXTERNAL_CONTENT_ROUTE_PATH } from '../../models';\nimport { ExternalContentComponent } from './external-content.component';\n\n/**\n * Route table for embedded external content. Spread it into `MainLayoutComponent`'s children:\n *\n * ```ts\n * { path: '', component: MainLayoutComponent, canActivate: [AuthGuard], children: [\n * ...externalContentRoutes,\n * // the application's own features\n * ] }\n * ```\n *\n * Three things about the shape are load-bearing and must not be \"simplified\" away:\n *\n * - The path is nested one segment per route. `RouteHelper.getRouteURL` and\n * `CustomReuseStrategy.getUrlFromRoute` collect segments walking up the parent chain and then\n * reverse the flat list, so a route declared `'external-content/:menuID'` rebuilds as\n * `/:menuID/external-content` and every tab URL is wrong.\n * - `DefaultTabViewComponent` hosts the view. It is what renders the `#ribbon` template the\n * component publishes, so dropping it leaves the Reload and Open-in-a-new-browser-tab actions\n * with nowhere to appear.\n * - `FRAMEWORK_VIEW_TYPE` must be present. `TabsComponent` re-creates the tab after a page refresh\n * by looking for a `Details` or `List` view in the activated route tree, and navigates to `/`\n * when it finds neither — the embedded tab would vanish on F5.\n */\nexport const externalContentRoutes: Routes = [\n {\n path: EXTERNAL_CONTENT_ROUTE_PATH,\n children: [\n {\n path: ':menuID',\n component: DefaultTabViewComponent,\n data: { [FRAMEWORK_VIEW_TYPE]: FrameworkViewType.List },\n children: [{ path: '', component: ExternalContentComponent }],\n },\n ],\n },\n];\n","import { formatDate, formatNumber } from '@angular/common';\nimport { IOperationsHistoryField, IOperationsHistoryList, OperationsHistoryFieldType } from '../../models';\n\n/** A value ready to show: either text as it is, or a translation key. */\nexport interface IOperationsHistoryValue {\n isKey: boolean;\n text: string;\n}\n\nconst EMPTY_VALUE: IOperationsHistoryValue = { isKey: true, text: 'OperationsHistory-Value-Empty' };\nconst ISO_DATE = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}/;\n\n/**\n * Every field an operation shows.\n *\n * ZWebAPI 1.17 and later send the whole record, rebuilt from its history. An older backend sends\n * only what the operation wrote, as two JSON objects; those are read as the changed fields, with\n * their kind of value guessed from the value itself.\n *\n * @param operation The operation, or nothing.\n * @returns The fields, in the order the backend declares them.\n */\nexport function getOperationFields(operation: IOperationsHistoryList | null | undefined): IOperationsHistoryField[] {\n if (!operation) {\n return [];\n }\n\n if (operation.fields && operation.fields.length > 0) {\n return operation.fields;\n }\n\n const oldValues: Record<string, unknown> = parseValues(operation.oldValues);\n const newValues: Record<string, unknown> = parseValues(operation.newValues);\n const names: string[] = [...new Set([...Object.keys(oldValues), ...Object.keys(newValues)])];\n\n return names.map((name: string): IOperationsHistoryField => ({\n isChanged: true,\n isSystem: false,\n name,\n newValue: name in newValues ? newValues[name] : null,\n oldValue: name in oldValues ? oldValues[name] : null,\n type: guessType(name in newValues ? newValues[name] : oldValues[name]),\n }));\n}\n\n/**\n * How many data fields an operation changed, leaving bookkeeping out.\n *\n * @param operation The operation.\n * @returns The count.\n */\nexport function countChangedFields(operation: IOperationsHistoryList | null | undefined): number {\n return getOperationFields(operation).filter((field: IOperationsHistoryField) => field.isChanged && !field.isSystem)\n .length;\n}\n\n/**\n * Formats a field's value for the user.\n *\n * Dates follow the locale, with the time left out when it is midnight; numbers are grouped;\n * booleans and empty values become translation keys.\n *\n * @param value The value as the backend sent it.\n * @param type What kind of value the field holds.\n * @param locale The locale to format in.\n * @returns The text to show, or the key to translate.\n */\nexport function formatFieldValue(\n value: unknown,\n type: OperationsHistoryFieldType,\n locale: string,\n): IOperationsHistoryValue {\n if (value === null || value === undefined || value === '') {\n return EMPTY_VALUE;\n }\n\n if (typeof value === 'boolean') {\n return { isKey: true, text: value ? 'OperationsHistory-Value-Yes' : 'OperationsHistory-Value-No' };\n }\n\n if (type === 'date' && (typeof value === 'string' || typeof value === 'number')) {\n const date: Date = new Date(value);\n if (!isNaN(date.getTime())) {\n const isMidnight: boolean = date.getHours() === 0 && date.getMinutes() === 0 && date.getSeconds() === 0;\n return { isKey: false, text: formatDate(date, isMidnight ? 'shortDate' : 'short', locale) };\n }\n }\n\n if (type === 'number' && typeof value === 'number') {\n return { isKey: false, text: formatNumber(value, locale, '1.0-6') };\n }\n\n if (typeof value === 'object') {\n return { isKey: false, text: JSON.stringify(value) };\n }\n\n return { isKey: false, text: String(value) };\n}\n\nfunction guessType(value: unknown): OperationsHistoryFieldType {\n switch (typeof value) {\n case 'boolean':\n return 'boolean';\n case 'number':\n return 'number';\n case 'string':\n return ISO_DATE.test(value) ? 'date' : 'text';\n default:\n return 'other';\n }\n}\n\nfunction parseValues(json: string | undefined): Record<string, unknown> {\n if (!json?.trim()) {\n return {};\n }\n\n try {\n const parsed: unknown = JSON.parse(json);\n return parsed !== null && typeof parsed === 'object' && !Array.isArray(parsed)\n ? <Record<string, unknown>>parsed\n : {};\n } catch {\n return {};\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n computed,\n inject,\n input,\n InputSignal,\n LOCALE_ID,\n signal,\n Signal,\n viewChild,\n WritableSignal,\n} from '@angular/core';\nimport { ModalBase } from '@zambon-dev/ui/framework';\nimport { ModalComponent } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport {\n IOperationsHistoryField,\n IOperationsHistoryList,\n OPERATIONS_HISTORY_FIELD_LABEL,\n OperationsHistoryFieldLabel,\n} from '../../../models';\nimport { formatFieldValue, getOperationFields, IOperationsHistoryValue } from '../operations-history-fields';\n\n/** One line of the change details. */\ninterface IOperationsHistoryRow {\n isChanged: boolean;\n isSystem: boolean;\n label: string;\n name: string;\n newValue: IOperationsHistoryValue;\n oldValue: IOperationsHistoryValue;\n}\n\n/**\n * Modal listing what one operation changed, field by field, with the value before and after.\n * It can also list the unchanged and system fields when the backend sends the full record.\n */\n@Component({\n selector: 'shared-operations-history-modal',\n templateUrl: './operations-history-modal.component.html',\n styleUrls: ['./operations-history-modal.component.scss'],\n imports: [ModalComponent, NgTemplateOutlet, TranslatePipe],\n})\nexport class OperationsHistoryModalComponent extends ModalBase {\n //#region ViewChilds, Inputs, Outputs\n private readonly modal: Signal<ModalComponent | undefined> = viewChild(ModalComponent);\n\n /**\n * Values after the change, as an object of field names to values.\n *\n * @deprecated Bind `operation` instead, which also carries the whole record. Read only when\n * `operation` is not bound.\n */\n public readonly newValues: InputSignal<object | null | undefined> = input<object | null>();\n\n /**\n * Values before the change, as an object of field names to values.\n *\n * @deprecated Bind `operation` instead, which also carries the whole record. Read only when\n * `operation` is not bound.\n */\n public readonly oldValues: InputSignal<object | null | undefined> = input<object | null>();\n\n /** The operation whose changes the modal shows. */\n public readonly operation: InputSignal<IOperationsHistoryList | null | undefined> =\n input<IOperationsHistoryList | null>();\n //#endregion\n\n //#region Variables\n /** Whether the unchanged fields are listed too, rather than only what the operation changed. */\n protected readonly showAllFields: WritableSignal<boolean> = signal(false);\n\n /** Whether the bookkeeping fields are listed, when every field is. */\n protected readonly showSystemFields: WritableSignal<boolean> = signal(false);\n\n private readonly fieldLabel: OperationsHistoryFieldLabel = inject(OPERATIONS_HISTORY_FIELD_LABEL);\n private readonly locale: string = inject(LOCALE_ID);\n //#endregion\n\n //#region Properties\n /** Whether the modal is open. */\n public readonly isModalShown: Signal<boolean> = computed(() => this.modal()?.isOpen() ?? false);\n\n /** The operation shown, built from the deprecated inputs when `operation` is not bound. */\n protected readonly currentOperation: Signal<IOperationsHistoryList | null> = computed(() => {\n const operation: IOperationsHistoryList | null | undefined = this.operation();\n if (operation) {\n return operation;\n }\n\n const oldValues: object | null | undefined = this.oldValues();\n const newValues: object | null | undefined = this.newValues();\n if (!oldValues && !newValues) {\n return null;\n }\n\n return { id: 0, newValues: JSON.stringify(newValues ?? {}), oldValues: JSON.stringify(oldValues ?? {}) };\n });\n\n /** Only a backend that rebuilds the record sends the unchanged fields, so only then can they be listed. */\n protected readonly hasFullRecord: Signal<boolean> = computed(\n () => (this.currentOperation()?.fields?.length ?? 0) > 0,\n );\n\n protected readonly isAdded: Signal<boolean> = computed(() => this.currentOperation()?.operationType === 'Added');\n\n protected readonly isDeleted: Signal<boolean> = computed(() => this.currentOperation()?.operationType === 'Deleted');\n\n protected readonly operationLabel: Signal<string> = computed(() => {\n const operationType: string | undefined = this.currentOperation()?.operationType;\n return operationType ? `OperationsHistory-Operation-${operationType}` : '';\n });\n\n /** Data fields: the changed ones, or every one when asked. */\n protected readonly dataRows: Signal<IOperationsHistoryRow[]> = computed(() =>\n this.rows().filter((row: IOperationsHistoryRow) => !row.isSystem && (row.isChanged || this.showAllFields())),\n );\n\n /** Bookkeeping fields, listed apart and only when every field is. */\n protected readonly systemRows: Signal<IOperationsHistoryRow[]> = computed(() =>\n this.showAllFields() ? this.rows().filter((row: IOperationsHistoryRow) => row.isSystem) : [],\n );\n\n private readonly rows: Signal<IOperationsHistoryRow[]> = computed(() => {\n const operation: IOperationsHistoryList | null = this.currentOperation();\n\n return getOperationFields(operation).map((field: IOperationsHistoryField): IOperationsHistoryRow => ({\n isChanged: field.isChanged,\n isSystem: field.isSystem,\n label: this.fieldLabel(field.name, operation?.entityName),\n name: field.name,\n newValue: formatFieldValue(field.newValue, field.type, this.locale),\n oldValue: formatFieldValue(field.oldValue, field.type, this.locale),\n }));\n });\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n protected onShowAllFieldsChanged(event: Event): void {\n this.showAllFields.set((<HTMLInputElement>event.target).checked);\n }\n\n protected onSystemFieldsToggled(): void {\n this.showSystemFields.update((isShown: boolean) => !isShown);\n }\n //#endregion\n\n //#region Public methods\n /** Opens the modal when it is closed, and closes it when it is open. */\n public toggle(): void {\n this.modal()?.toggleModal();\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","<lib-modal size=\"6xl\" [title]=\"'OperationsHistory-Modal-Title' | translate\">\n <div body class=\"changes\">\n @if (currentOperation(); as operation) {\n <div class=\"summary\">\n @if (operationLabel()) {\n <span\n class=\"operation\"\n [class.added]=\"isAdded()\"\n [class.deleted]=\"isDeleted()\"\n [class.modified]=\"operation.operationType === 'Modified'\"\n >\n {{ operationLabel() | translate }}\n </span>\n }\n\n <span class=\"entity\">\n {{ operation.entityName }}\n @if (operation.entityID) {\n <span class=\"record\">#{{ operation.entityID }}</span>\n }\n </span>\n\n <label class=\"show-all\" [class.disabled]=\"!hasFullRecord()\">\n <input\n type=\"checkbox\"\n [checked]=\"showAllFields()\"\n [disabled]=\"!hasFullRecord()\"\n (change)=\"onShowAllFieldsChanged($event)\"\n />\n {{ 'OperationsHistory-Modal-ShowAllFields' | translate }}\n </label>\n </div>\n\n @if (dataRows().length === 0 && systemRows().length === 0) {\n <p class=\"empty\">{{ 'OperationsHistory-Modal-NoChanges' | translate }}</p>\n } @else {\n <div class=\"table-scroller\">\n <table class=\"fields\">\n <thead>\n <tr>\n <th scope=\"col\">{{ 'OperationsHistory-Modal-Field' | translate }}</th>\n @if (!isAdded()) {\n <th scope=\"col\">{{ 'OperationsHistory-Modal-Before' | translate }}</th>\n }\n @if (!isDeleted()) {\n <th scope=\"col\">{{ 'OperationsHistory-Modal-After' | translate }}</th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of dataRows(); track row.name) {\n <ng-container *ngTemplateOutlet=\"fieldRow; context: { $implicit: row }\"></ng-container>\n }\n </tbody>\n\n @if (systemRows().length > 0) {\n <tbody class=\"system\">\n <tr>\n <th scope=\"rowgroup\" [attr.colspan]=\"isAdded() || isDeleted() ? 2 : 3\">\n <button\n type=\"button\"\n class=\"system-toggle\"\n [attr.aria-expanded]=\"showSystemFields()\"\n (click)=\"onSystemFieldsToggled()\"\n >\n <i\n class=\"fa-solid\"\n aria-hidden=\"true\"\n [class.fa-chevron-down]=\"showSystemFields()\"\n [class.fa-chevron-right]=\"!showSystemFields()\"\n ></i>\n {{ 'OperationsHistory-Modal-SystemFields' | translate }} ({{ systemRows().length }})\n </button>\n </th>\n </tr>\n\n @if (showSystemFields()) {\n @for (row of systemRows(); track row.name) {\n <ng-container *ngTemplateOutlet=\"fieldRow; context: { $implicit: row }\"></ng-container>\n }\n }\n </tbody>\n }\n </table>\n </div>\n }\n }\n </div>\n</lib-modal>\n\n<ng-template #fieldRow let-row>\n <tr [class.changed]=\"row.isChanged && !isAdded() && !isDeleted()\">\n <th scope=\"row\">\n {{ row.label | translate }}\n @if (row.isChanged && !isAdded() && !isDeleted()) {\n <span class=\"visually-hidden\">({{ 'OperationsHistory-Modal-Changed' | translate }})</span>\n }\n </th>\n\n @if (!isAdded()) {\n <td class=\"before\">\n @if (row.isChanged && !isDeleted()) {\n <del>\n <span class=\"marker\" aria-hidden=\"true\">−</span>\n {{ row.oldValue.isKey ? (row.oldValue.text | translate) : row.oldValue.text }}\n </del>\n } @else {\n {{ row.oldValue.isKey ? (row.oldValue.text | translate) : row.oldValue.text }}\n }\n </td>\n }\n\n @if (!isDeleted()) {\n <td class=\"after\">\n @if (row.isChanged && !isAdded()) {\n <ins>\n <span class=\"marker\" aria-hidden=\"true\">+</span>\n {{ row.newValue.isKey ? (row.newValue.text | translate) : row.newValue.text }}\n </ins>\n } @else {\n {{ row.newValue.isKey ? (row.newValue.text | translate) : row.newValue.text }}\n }\n </td>\n }\n </tr>\n</ng-template>\n","import { AfterViewInit, Component, Input, signal, Signal, TemplateRef, viewChild, WritableSignal } from '@angular/core';\nimport { ChildList } from '@zambon-dev/ui/framework';\nimport { DataGridComponent, DataGridDataset } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { OperationsHistoryDataset } from '../../../datasets';\nimport { IOperationsHistoryList } from '../../../models';\nimport { countChangedFields } from '../operations-history-fields';\nimport { OperationsHistoryModalComponent } from '../operations-history-modal/operations-history-modal.component';\n\n/**\n * Grid of the operations (added, modified or deleted entities) inside one change set. Clicking an\n * operation opens a modal with its field-by-field changes.\n */\n@Component({\n selector: 'shared-operations-history-child-list',\n templateUrl: './operations-history-child-list.component.html',\n styleUrls: ['./operations-history-child-list.component.scss'],\n imports: [DataGridComponent, OperationsHistoryModalComponent, TranslatePipe],\n providers: [{ provide: DataGridDataset, useClass: OperationsHistoryDataset }],\n})\nexport class OperationsHistoryChildListComponent extends ChildList<any> implements AfterViewInit {\n //#region ViewChilds, Inputs, Outputs\n private readonly modal: Signal<OperationsHistoryModalComponent | undefined> = viewChild(\n OperationsHistoryModalComponent,\n );\n private readonly operationTemplate: Signal<TemplateRef<any> | undefined> =\n viewChild<TemplateRef<any>>('operationTemplate');\n\n /** API controller of the audited entity, e.g. `Employees`. The grid loads nothing until it is set. */\n @Input() public set controllerName(value: string) {\n (<OperationsHistoryDataset>this.dataGridDataset).controllerName = value;\n }\n\n /**\n * Filters to send with the list.\n *\n * The audit view applies its filters to the services grid and hands the same set here, because\n * one of them -- whether to list only the audited record's own operations -- belongs to this\n * list. The rest mean nothing to it, and the backend reads only what it recognises.\n *\n * `setFilters` refreshes the grid itself. With no service selected the dataset answers with an\n * empty list rather than calling the backend, so a refresh then costs nothing.\n */\n @Input() public set filters(value: { [key: string]: string } | undefined) {\n this.dataGridDataset.setFilters(value);\n }\n\n /** ID of the change set whose operations are listed. With none, the grid stays empty. */\n @Input() public set serviceID(value: number | undefined) {\n (<OperationsHistoryDataset>this.dataGridDataset).serviceId = value;\n }\n //#endregion\n\n //#region Variables\n // Signals: they are bound into the modal and are filled when a row is picked, which the grid\n // reports through a callback rather than a binding on this view.\n /**\n * New values of the selected operation, parsed from JSON, or `null` when none is selected.\n *\n * @deprecated Read `selectedOperation` instead, which also carries the whole record.\n */\n public readonly selectedNewValues: WritableSignal<any | null> = signal(null);\n /**\n * Old values of the selected operation, parsed from JSON, or `null` when none is selected.\n *\n * @deprecated Read `selectedOperation` instead, which also carries the whole record.\n */\n public readonly selectedOldValues: WritableSignal<any | null> = signal(null);\n /** The operation selected in the grid, or `null` when none is selected. */\n public readonly selectedOperation: WritableSignal<IOperationsHistoryList | null> = signal(null);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n public ngAfterViewInit(): void {\n this.dataGridDataset.columns[0].template = this.operationTemplate();\n }\n //#endregion\n\n //#region Event handlers\n /** How many data fields an operation changed, for the summary beside it. */\n protected changedFieldsOf(operation: IOperationsHistoryList): number {\n return countChangedFields(operation);\n }\n\n /** Opens the change details modal for the selected operation, unless it is already open. */\n public openModal(): void {\n const modal: OperationsHistoryModalComponent | undefined = this.modal();\n if (modal && !modal.isModalShown()) {\n modal.toggle();\n }\n }\n //#endregion\n\n //#region Public methods\n /** Updates `selectedOperation` from the grid's selection. */\n public override selectedRowChanged(): void {\n super.selectedRowChanged();\n\n if (this.dataGridDataset.hasSelectedRows) {\n const key: string = this.dataGridDataset.selectedRowKeys[0];\n\n const data: IOperationsHistoryList = this.dataGridDataset.getRowData(key);\n this.selectedOperation.set(data);\n this.selectedOldValues.set(parseJson(data.oldValues));\n this.selectedNewValues.set(parseJson(data.newValues));\n }\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n\n/** Parses stored values, reading a missing or malformed one as nothing rather than throwing. */\nfunction parseJson(json: string | undefined): unknown {\n if (!json?.trim()) {\n return null;\n }\n\n try {\n return JSON.parse(json);\n } catch {\n return null;\n }\n}\n","<lib-data-grid [lazyLoadRows]=\"true\"> </lib-data-grid>\n\n<ng-template #operationTemplate let-rowData=\"rowData\">\n <div\n class=\"operation-content\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"openModal()\"\n (keydown.enter)=\"openModal()\"\n (keydown.space)=\"openModal(); $event.preventDefault()\"\n >\n <span\n class=\"operation\"\n [class.added]=\"rowData.operationType === 'Added'\"\n [class.deleted]=\"rowData.operationType === 'Deleted'\"\n [class.modified]=\"rowData.operationType === 'Modified'\"\n [class.unchanged]=\"rowData.operationType === 'Unchanged'\"\n >\n {{ 'OperationsHistory-Operation-' + rowData.operationType | translate }}\n </span>\n {{ rowData.entityName }}\n @if (rowData.operationType === 'Modified') {\n <span class=\"changed-count\">\n {{ 'OperationsHistory-List-ChangedFields' | translate: { count: changedFieldsOf(rowData) } }}\n </span>\n }\n </div>\n</ng-template>\n\n<shared-operations-history-modal [operation]=\"selectedOperation()\"> </shared-operations-history-modal>\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n/**\n * Pipe that bypasses Angular's built-in HTML sanitization.\n *\n * **WARNING: This pipe introduces XSS (Cross-Site Scripting) risk.**\n * It marks the provided HTML string as trusted, meaning Angular will\n * render it without any sanitization. Malicious content such as\n * `<script>` tags, inline event handlers (`onerror`, `onclick`, etc.),\n * and `javascript:` URLs will be executed in the user's browser.\n *\n * ### Safe usage\n * - Server-rendered HTML from **trusted, internal APIs** that never\n * include user-generated content (e.g., admin-authored rich text\n * that is sanitized server-side before storage).\n * - Static HTML snippets defined in application code.\n *\n * ### Unsafe usage (DO NOT use for these)\n * - Any value that originates from user input (form fields, query\n * params, URL fragments, file uploads).\n * - Third-party API responses whose content you do not control.\n * - Database fields that may contain unsanitized user submissions.\n *\n * @example\n * // Safe — trusted server content\n * <div [innerHTML]=\"trustedServerHtml | bypassHtmlSanitizer\"></div>\n *\n * // UNSAFE — user-provided content (use Angular’s default sanitization instead)\n * <div [innerHTML]=\"comment.body | bypassHtmlSanitizer\"></div> // ❌ XSS risk\n * <div [innerHTML]=\"comment.body\"></div> // ✅ Angular sanitizes automatically\n */\n@Pipe({\n name: 'bypassHtmlSanitizer',\n})\nexport class BypassHtmlSanitizerPipe implements PipeTransform {\n private sanitizer: DomSanitizer = inject(DomSanitizer);\n\n public transform(html: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Turns a numeric enum value into the name of its member, e.g. `{{ status | enumLabel: Status }}`.\n * Returns an empty string when the value or the enum is missing, or the value is not in the enum.\n */\n@Pipe({\n name: 'enumLabel',\n})\nexport class EnumLabelPipe implements PipeTransform {\n public transform(value?: number, enumType?: any): string {\n if (value === undefined || enumType === undefined) {\n return '';\n }\n\n const keys: string[] = Object.keys(enumType).filter((key: string) => !isNaN(Number(enumType[key])));\n const values: number[] = keys.map((key: string) => enumType[key]);\n\n const index: number = values.indexOf(value);\n if (index >= 0) {\n return keys[index];\n }\n return '';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Reads a date the API sent in UTC without a timezone marker and returns it as the right instant.\n * Values that already carry `Z` or an offset are kept as they are; empty or invalid values give\n * `null`. Chain it before `date`, e.g. `{{ value | utcDate | date }}`.\n */\n@Pipe({\n name: 'utcDate',\n})\nexport class UtcDatePipe implements PipeTransform {\n private static readonly timeZoneMarker: RegExp = /(?:Z|[+-]\\d{2}:?\\d{2})$/i;\n\n transform(value?: Date | string): Date | null {\n if (!value) {\n return null;\n }\n\n const newDate: Date = new Date(value);\n if (Number.isNaN(newDate.getTime())) {\n return null;\n }\n\n // A value that declares its zone has already been parsed as the right instant.\n if (typeof value === 'string' && UtcDatePipe.timeZoneMarker.test(value.trim())) {\n return newDate;\n }\n\n // The API serializes UTC values without a timezone marker, so Date parses them as local time.\n // Shifting by the offset re-reads those parts as UTC, which keeps both the time and the day\n // correct on either side of Greenwich.\n return new Date(newDate.getTime() - newDate.getTimezoneOffset() * 60000);\n }\n}\n","import { DatePipe } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n Input,\n OnInit,\n output,\n OutputEmitterRef,\n signal,\n Signal,\n TemplateRef,\n viewChild,\n WritableSignal,\n} from '@angular/core';\nimport { ChildList } from '@zambon-dev/ui/framework';\nimport { DataGridComponent } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { takeUntil } from 'rxjs';\nimport { ServicesHistoryDataset } from '../../../datasets';\nimport { UtcDatePipe } from '../../../pipes';\n\n/**\n * Grid of the change sets (services) recorded for the current record, with who made each one and\n * when. Needs a `ServicesHistoryDataset` provided above it, as `ServicesHistoryViewComponent` does.\n */\n@Component({\n selector: 'shared-services-history-child-list',\n templateUrl: './services-history-child-list.component.html',\n styleUrls: ['./services-history-child-list.component.scss'],\n imports: [DataGridComponent, DatePipe, UtcDatePipe, TranslatePipe],\n // No DataGridDataset provider of its own: ServicesHistoryViewComponent provides one, so that the\n // ribbon's buttons and this grid share a single instance. Used anywhere else, this component\n // needs a ServicesHistoryDataset provided above it.\n})\nexport class ServicesHistoryChildListComponent extends ChildList<any> implements AfterViewInit, OnInit {\n //#region ViewChilds, Inputs, Outputs\n private readonly serviceTemplate: Signal<TemplateRef<any> | undefined> =\n viewChild<TemplateRef<any>>('serviceTemplate');\n\n /** API controller of the audited entity, e.g. `Employees`. The grid loads nothing until it is set. */\n @Input() public set controllerName(value: string) {\n (<ServicesHistoryDataset>this.dataGridDataset).controllerName = value;\n }\n\n /** Re-emits the grid's own filter changes, for a sibling list that has to follow them. */\n public readonly filtersChanged: OutputEmitterRef<{ [key: string]: string } | undefined> = output<\n { [key: string]: string } | undefined\n >();\n //#endregion\n\n //#region Variables\n /** ID of the service selected in the grid, or `undefined` when none is selected. */\n // A signal: it is bound into the operations list beside this one, and both the row callback\n // and the grid's load event write it from outside any binding on this view.\n public readonly selectedServiceID: WritableSignal<number | undefined> = signal(undefined);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n public ngAfterViewInit(): void {\n this.dataGridDataset.columns[0].template = this.serviceTemplate();\n }\n\n public override ngOnInit(): void {\n super.ngOnInit();\n\n this.dataGridDataset.filtersChanged\n .pipe(takeUntil(this.destroy$))\n .subscribe((filters: { [key: string]: string } | undefined) => this.filtersChanged.emit(filters));\n\n // Reloading clears the grid's selection but would leave the last chosen service behind, and\n // the operations list beside it still showing that service's rows -- a service the new filters\n // may not even list any more. Dropped here so the two panels never disagree.\n this.dataGridDataset.loadStarted.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.selectedServiceID.set(undefined);\n });\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /** Updates `selectedServiceID` from the grid's selection. */\n public override selectedRowChanged(): void {\n super.selectedRowChanged();\n\n if (this.dataGridDataset.hasSelectedRows) {\n const selectedKey: string = this.dataGridDataset.selectedRowKeys[0];\n this.selectedServiceID.set(this.dataGridDataset.getRowID(selectedKey));\n }\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","<lib-data-grid [lazyLoadRows]=\"true\"> </lib-data-grid>\n\n<ng-template #serviceTemplate let-rowData=\"rowData\">\n <div class=\"service-content\">\n <div class=\"icon\">\n <i class=\"fa-solid fa-circle fa-lg\"></i>\n </div>\n <div class=\"information\">\n <div class=\"service-name\">\n {{ rowData.name }}\n </div>\n <div class=\"details\">\n <span class=\"datetime\"\n ><i class=\"fa-solid fa-clock\"></i>\n {{ rowData.changedOn | utcDate | date: ('Format-DateTime' | translate) }}</span\n >\n <span class=\"user\"><i class=\"fa-solid fa-user\"></i> {{ rowData.changedByName }}</span>\n </div>\n </div>\n </div>\n</ng-template>\n","import { Component, computed, input, InputSignal, OnInit, Signal } from '@angular/core';\nimport { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { ButtonFiltersComponent } from '@zambon-dev/ui/framework';\nimport { CatalogSelectComponent, FormGroupComponent, FormInputGroupComponent } from '@zambon-dev/ui/library';\nimport { takeUntil } from 'rxjs';\nimport { FiltersBase } from '../../../components';\n\n/**\n * Ribbon filter for the services history grid: change name, author, date range and whether to show\n * only changes made to the current record. A date range picked backwards is corrected automatically.\n */\n@Component({\n selector: 'shared-services-history-filter',\n templateUrl: './services-history-filter.component.html',\n styleUrls: ['./services-history-filter.component.scss'],\n imports: [\n ButtonFiltersComponent,\n CatalogSelectComponent,\n FormGroupComponent,\n FormInputGroupComponent,\n FormsModule,\n ReactiveFormsModule,\n ],\n})\nexport class ServicesHistoryFilterComponent extends FiltersBase implements OnInit {\n //#region ViewChilds, Inputs, Outputs\n /**\n * Catalog that resolves the people who can appear as the author of a change.\n *\n * There is no such catalog in this library -- who a user is belongs to the application -- so the\n * author filter is offered only when one is supplied.\n */\n public readonly usersCatalogEndpoint: InputSignal<string | undefined> = input<string>();\n //#endregion\n\n //#region Variables\n //#endregion\n\n //#region Properties\n protected readonly hasUsersCatalog: Signal<boolean> = computed(() => !!this.usersCatalogEndpoint());\n\n private get changedOnFromControl(): FormControl {\n return <FormControl>this.filterForm.get('changedOnFrom');\n }\n\n private get changedOnToControl(): FormControl {\n return <FormControl>this.filterForm.get('changedOnTo');\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n public override ngOnInit(): void {\n super.ngOnInit();\n\n // A range that reads backwards returns nothing and explains nothing, so the bound that did not\n // just change follows the one that did, rather than leaving the person to spot it.\n this.changedOnFromControl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((from: string | null) => {\n const to: string | null = this.changedOnToControl.value;\n if (!!from && !!to && to < from) {\n this.changedOnToControl.setValue(from);\n }\n });\n\n this.changedOnToControl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((to: string | null) => {\n const from: string | null = this.changedOnFromControl.value;\n if (!!from && !!to && to < from) {\n this.changedOnFromControl.setValue(to);\n }\n });\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n //#endregion\n\n //#region Private methods\n /**\n * The control names are the filter names the backend reads, case insensitively: `name`,\n * `changedByID`, `changedOnFrom`, `changedOnTo` and `onlyCurrentEntity` reach `AuditFilters` in\n * ZWebAPI. The two dates are sent as picked and turned into UTC instants by\n * {@link ServicesHistoryDataset}, which is the boundary where the request is built.\n */\n protected override formSetup(): FormGroup<any> {\n return this.formBuilder.group({\n changedByID: [null],\n changedOnFrom: [null],\n changedOnTo: [null],\n name: [null],\n onlyCurrentEntity: [false, { nonNullable: true }],\n });\n }\n //#endregion\n}\n","<framework-button-filters modalSize=\"2xl\" modalTitle=\"ServicesHistory-Filters-Title\" [formGroup]=\"filterForm\">\n <lib-form-group label=\"ServicesHistory-FormGroup-Service\">\n <lib-form-input-group controlName=\"name\" label=\"ServicesHistory-Field-Name\" [autofocus]=\"true\" [maxLength]=\"200\">\n </lib-form-input-group>\n\n @if (hasUsersCatalog()) {\n <lib-catalog-select\n controlName=\"changedByID\"\n displayControlName=\"changedByName\"\n label=\"ServicesHistory-Field-ChangedBy\"\n [readOnly]=\"false\"\n [searchEndpoint]=\"usersCatalogEndpoint()!\"\n >\n </lib-catalog-select>\n }\n </lib-form-group>\n\n <lib-form-group label=\"ServicesHistory-FormGroup-Period\">\n <lib-form-input-group controlName=\"changedOnFrom\" label=\"ServicesHistory-Field-ChangedOnFrom\" [type]=\"'date'\">\n </lib-form-input-group>\n\n <lib-form-input-group controlName=\"changedOnTo\" label=\"ServicesHistory-Field-ChangedOnTo\" [type]=\"'date'\">\n </lib-form-input-group>\n </lib-form-group>\n\n <lib-form-group label=\"ServicesHistory-FormGroup-Operations\">\n <lib-form-input-group\n controlName=\"onlyCurrentEntity\"\n label=\"ServicesHistory-Field-OnlyCurrentEntity\"\n notes=\"ServicesHistory-Field-OnlyCurrentEntity-Notes\"\n [type]=\"'checkbox'\"\n >\n </lib-form-input-group>\n </lib-form-group>\n</framework-button-filters>\n","import { Component, inject, model, ModelSignal, signal, WritableSignal } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { ButtonRefreshComponent, TabViewBase } from '@zambon-dev/ui/framework';\nimport { DataGridDataset, DataProviderService, RibbonGroupComponent } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { take } from 'rxjs';\nimport { ServicesHistoryDataset } from '../../../datasets';\nimport { OperationsHistoryChildListComponent } from '../../operations-history';\nimport { ServicesHistoryChildListComponent } from '../services-history-child-list/services-history-child-list.component';\nimport { ServicesHistoryFilterComponent } from '../services-history-filter/services-history-filter.component';\n\n/**\n * Tab view of a record's change history: the services grid beside the operations of the selected\n * service, with refresh and filter buttons in the ribbon. Unbound inputs are read from route data.\n */\n@Component({\n selector: 'shared-services-history-view',\n templateUrl: './services-history-view.component.html',\n styleUrls: ['./services-history-view.component.scss'],\n imports: [\n ButtonRefreshComponent,\n OperationsHistoryChildListComponent,\n RibbonGroupComponent,\n ServicesHistoryChildListComponent,\n ServicesHistoryFilterComponent,\n TranslatePipe,\n ],\n // The services grid is provided here rather than inside its child list so that the ribbon's\n // refresh and filter buttons, which resolve DataGridDataset from their own injector, reach the\n // same instance the grid reads. The operations child list still provides its own, which shadows\n // this one within its subtree, so it is unaffected.\n providers: [{ provide: DataGridDataset, useClass: ServicesHistoryDataset }],\n})\nexport class ServicesHistoryViewComponent extends TabViewBase {\n //#region ViewChilds, Inputs, Outputs\n // Models rather than inputs: the constructor fills the first two from route data when a host\n // has not bound them, and the entity id arrives from the data provider's stream.\n /** API controller of the audited entity, e.g. `Employees`. Falls back to the route's `controllerName` data. */\n public readonly controllerName: ModelSignal<string> = model('');\n\n /** ID of the audited record. Filled from the data provider's model when one is available. */\n public readonly entityID: ModelSignal<number | undefined> = model<number>();\n\n /**\n * Catalog resolving the people who can appear as the author of a change, for the filter.\n *\n * Supplied through the route's `usersCatalogEndpoint` data, or bound directly. Without it the\n * author filter is not offered -- see {@link ServicesHistoryFilterComponent}.\n */\n public readonly usersCatalogEndpoint: ModelSignal<string | undefined> = model<string>();\n //#endregion\n\n //#region Variables\n /**\n * The filters applied to the services grid, forwarded to the operations grid.\n *\n * Only `onlyCurrentEntity` means anything to the operations list, and the backend reads only what\n * it recognises, so the set is passed whole rather than picked apart here: a filter added later\n * then reaches both lists without this having to learn about it.\n */\n protected readonly operationsFilters: WritableSignal<{ [key: string]: string } | undefined> = signal(undefined);\n\n private activatedRoute: ActivatedRoute = inject(ActivatedRoute);\n private dataProviderService: DataProviderService<any> | null = inject(DataProviderService, { optional: true });\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n constructor() {\n super();\n\n if (this.activatedRoute.snapshot.data['controllerName']) {\n this.controllerName.set(this.activatedRoute.snapshot.data['controllerName']);\n }\n\n if (this.activatedRoute.snapshot.data['usersCatalogEndpoint']) {\n this.usersCatalogEndpoint.set(this.activatedRoute.snapshot.data['usersCatalogEndpoint']);\n }\n\n if (this.dataProviderService) {\n this.dataProviderService\n .getModel$()\n .pipe(take(1))\n .subscribe((model: any) => {\n this.entityID.set(model.id);\n });\n }\n }\n //#endregion\n\n //#region Event handlers\n protected onFiltersChanged(filters?: { [key: string]: string }): void {\n this.operationsFilters.set(filters);\n }\n //#endregion\n\n //#region Public methods\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","<ng-template #ribbon>\n <lib-ribbon-group [label]=\"'RibbonGroup-General' | translate\">\n <framework-button-refresh></framework-button-refresh>\n\n <shared-services-history-filter [usersCatalogEndpoint]=\"usersCatalogEndpoint()\"> </shared-services-history-filter>\n </lib-ribbon-group>\n</ng-template>\n\n<div class=\"history-container\">\n <div class=\"service-history-container\">\n <shared-services-history-child-list\n #service\n [controllerName]=\"controllerName()\"\n (filtersChanged)=\"onFiltersChanged($event)\"\n >\n </shared-services-history-child-list>\n </div>\n\n <div class=\"operations-history-container\">\n <shared-operations-history-child-list\n [controllerName]=\"controllerName()\"\n [filters]=\"operationsFilters()\"\n [serviceID]=\"service.selectedServiceID()\"\n >\n </shared-operations-history-child-list>\n </div>\n</div>\n","import { HttpBackend } from '@angular/common/http';\nimport { EnvironmentProviders, Provider } from '@angular/core';\nimport { provideTranslateService, TranslateLoader } from '@ngx-translate/core';\nimport { MultiTranslateHttpLoader, TranslationResource } from 'ngx-translate-multi-http-loader';\n\nimport { AngularAssetPattern } from '@zambon-dev/ui/library';\n\nexport const ZAMBON_SHARED_I18N_ASSET_PATH = 'assets/i18n/zambon-dev/shared';\n\nexport const ZAMBON_SHARED_I18N_ASSET: AngularAssetPattern = {\n glob: '**/*.json',\n input: 'node_modules/@zambon-dev/ui/i18n/shared',\n output: ZAMBON_SHARED_I18N_ASSET_PATH,\n};\n\nexport const ZAMBON_SHARED_I18N_RESOURCES: TranslationResource[] = [\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/external-content/`, suffix: '.json' },\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/language-selector/`, suffix: '.json' },\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/login/`, suffix: '.json' },\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/operations-history/`, suffix: '.json' },\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/services-history/`, suffix: '.json' },\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/top-bar/`, suffix: '.json' },\n];\n\nexport interface ZambonSharedTranslateConfig {\n defaultLanguage?: string;\n appResources?: (string | TranslationResource)[];\n}\n\nexport function createZambonSharedTranslateLoader(\n httpBackend: HttpBackend,\n appResources: (string | TranslationResource)[] = [],\n): MultiTranslateHttpLoader {\n return new MultiTranslateHttpLoader(httpBackend, [...ZAMBON_SHARED_I18N_RESOURCES, ...appResources]);\n}\n\nexport function provideZambonSharedTranslateLoader(appResources: (string | TranslationResource)[] = []): Provider {\n return {\n provide: TranslateLoader,\n useFactory: (httpBackend: HttpBackend) => createZambonSharedTranslateLoader(httpBackend, appResources),\n deps: [HttpBackend],\n };\n}\n\nexport function provideZambonSharedTranslateService(config: ZambonSharedTranslateConfig = {}): EnvironmentProviders {\n return provideTranslateService({\n defaultLanguage: config.defaultLanguage,\n loader: provideZambonSharedTranslateLoader(config.appResources),\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,IAAa,4BAAb,MAAa,0BAAyB;CAEpB,WACd,UAAsC,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAGnC,WAAiC,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAE7C,QAA6B,MAAM,0BAAyB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAIpE,YAA8B,OAAO,gBAAgB;CAEnD,YAAsB,KAAK,UAAU,SAAQ;CAIpC,eAAwC,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAOvD,cAA8B,SAC7C,KAAK,UAAU,aAAa,KAAK,KAAK,UAA2B,MAAM,IAAI,CAAC,GAC5E,EAAE,cAAc,KAAK,UAAU,YAAW,CAAE;CAK9C,IAAW,mBAAgB;EACzB,OAAO,KAAK,YAAW;CACzB;CAOO,kBAAe;EACpB,KAAK,aAAa,QAAQ,YAAqB,CAAC,OAAO;CACzD;CAEO,iBAAiB,UAAgB;EACtC,aAAa,QAAQ,YAAY,QAAQ;EACzC,KAAK,UAAU,IAAI,QAAQ;EAC3B,KAAK,aAAa,IAAI,KAAK;CAC7B;CAQU,cAAc,OAAiB;EACvC,IAAI,KAAK,aAAY,GAAI;GACvB,IAAI,SAAmC,MAAM;GAC7C,OAAO,WAAW,QAAQ,OAAO,SAAS,YAAW,MAAO,QAAQ;IAClE,IAAI,WAAW,KAAK,SAAQ,CAAE,EAAE,eAC9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MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAA8B,SAG/B;IACP;IACA;IACA;IACA;IACA;IACA;GACD;GAAA,WAKU,CAAC;IAAE,SAAS;IAAiB,UAAU;GAAsB,CAAE;GAAC,UAAA;GAAA,QAAA,CAAA,k6BAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AExB7E,MAAa,gCAAgC;AAE7C,MAAa,2BAAgD;CAC3D,MAAM;CACN,OAAO;CACP,QAAQ;AACT;AAED,MAAa,+BAAsD;CACjE;EAAE,QAAQ,IAAI,8BAA6B;EAAsB,QAAQ;CAAO;CAChF;EAAE,QAAQ,IAAI,8BAA6B;EAAuB,QAAQ;CAAO;CACjF;EAAE,QAAQ,IAAI,8BAA6B;EAAW,QAAQ;CAAO;CACrE;EAAE,QAAQ,IAAI,8BAA6B;EAAwB,QAAQ;CAAO;CAClF;EAAE,QAAQ,IAAI,8BAA6B;EAAsB,QAAQ;CAAO;CAChF;EAAE,QAAQ,IAAI,8BAA6B;EAAa,QAAQ;CAAO;AACxE;AAOD,SAAgB,kCACd,aACA,eAAiD,CAAA,GAAE;CAEnD,OAAO,IAAI,yBAAyB,aAAa,CAAC,GAAG,8BAA8B,GAAG,YAAY,CAAC;AACrG;AAEA,SAAgB,mCAAmC,eAAiD,CAAA,GAAE;CACpG,OAAO;EACL,SAAS;EACT,aAAa,gBAA6B,kCAAkC,aAAa,YAAY;EACrG,MAAM,CAAC,WAAW;CACnB;AACH;AAEA,SAAgB,oCAAoC,SAAsC,CAAA,GAAE;CAC1F,OAAO,wBAAwB;EAC7B,iBAAiB,OAAO;EACxB,QAAQ,mCAAmC,OAAO,YAAY;CAC/D,CAAA;AACH"}
1
+ {"version":3,"file":"zambon-dev-ui-shared.mjs","names":[],"sources":["../../../../libs/ui/src/shared/auth/components/language-selector/language-selector.component.ts","../../../../libs/ui/src/shared/auth/components/language-selector/language-selector.component.html","../../../../libs/ui/src/shared/services/authentication.service.ts","../../../../libs/ui/src/shared/models/external-content.ts","../../../../libs/ui/src/shared/models/operations-history.ts","../../../../libs/ui/src/shared/services/external-content.service.ts","../../../../libs/ui/src/shared/services/external-url-resolver.service.ts","../../../../libs/ui/src/shared/services/notifications.service.ts","../../../../libs/ui/src/shared/services/operations-history.service.ts","../../../../libs/ui/src/shared/services/services-history.service.ts","../../../../libs/ui/src/shared/auth/components/login/login.component.ts","../../../../libs/ui/src/shared/auth/components/login/login.component.html","../../../../libs/ui/src/shared/layouts/login-layout/login-layout.component.ts","../../../../libs/ui/src/shared/layouts/login-layout/login-layout.component.html","../../../../libs/ui/src/shared/layouts/top-bar/brand/brand.component.ts","../../../../libs/ui/src/shared/layouts/top-bar/brand/brand.component.html","../../../../libs/ui/src/shared/layouts/top-bar/environment-badge/environment-badge.component.ts","../../../../libs/ui/src/shared/layouts/top-bar/environment-badge/environment-badge.component.html","../../../../libs/ui/src/shared/layouts/top-bar/notifications/notifications.component.ts","../../../../libs/ui/src/shared/layouts/top-bar/notifications/notifications.component.html","../../../../libs/ui/src/shared/theme/theme.service.ts","../../../../libs/ui/src/shared/theme/theme-switch.component.ts","../../../../libs/ui/src/shared/theme/theme-switch.component.html","../../../../libs/ui/src/shared/layouts/top-bar/user-profile/user-profile.component.ts","../../../../libs/ui/src/shared/layouts/top-bar/user-profile/user-profile.component.html","../../../../libs/ui/src/shared/layouts/top-bar/top-bar.component.ts","../../../../libs/ui/src/shared/layouts/top-bar/top-bar.component.html","../../../../libs/ui/src/shared/layouts/main-layout/main-layout.component.ts","../../../../libs/ui/src/shared/layouts/main-layout/main-layout.component.html","../../../../libs/ui/src/shared/auth/auth.module.ts","../../../../libs/ui/src/shared/auth/guards/auth-guard.ts","../../../../libs/ui/src/shared/auth/interceptors/auth-interceptors.ts","../../../../libs/ui/src/shared/components/filters-base.ts","../../../../libs/ui/src/shared/datasets/operations-history.dataset.ts","../../../../libs/ui/src/shared/datasets/services-history.dataset.ts","../../../../libs/ui/src/shared/features/external-content/external-content.component.ts","../../../../libs/ui/src/shared/features/external-content/external-content.component.html","../../../../libs/ui/src/shared/features/external-content/external-content.routes.ts","../../../../libs/ui/src/shared/features/operations-history/operations-history-fields.ts","../../../../libs/ui/src/shared/features/operations-history/operations-history-modal/operations-history-modal.component.ts","../../../../libs/ui/src/shared/features/operations-history/operations-history-modal/operations-history-modal.component.html","../../../../libs/ui/src/shared/features/operations-history/operations-history-child-list/operations-history-child-list.component.ts","../../../../libs/ui/src/shared/features/operations-history/operations-history-child-list/operations-history-child-list.component.html","../../../../libs/ui/src/shared/pipes/bypass-html-sanitizer.pipe.ts","../../../../libs/ui/src/shared/pipes/enum-text.pipe.ts","../../../../libs/ui/src/shared/pipes/utc-date.pipe.ts","../../../../libs/ui/src/shared/features/services-history/services-history-child-list/services-history-child-list.component.ts","../../../../libs/ui/src/shared/features/services-history/services-history-child-list/services-history-child-list.component.html","../../../../libs/ui/src/shared/features/services-history/services-history-filter/services-history-filter.component.ts","../../../../libs/ui/src/shared/features/services-history/services-history-filter/services-history-filter.component.html","../../../../libs/ui/src/shared/features/services-history/services-history-view/services-history-view.component.ts","../../../../libs/ui/src/shared/features/services-history/services-history-view/services-history-view.component.html","../../../../libs/ui/src/shared/i18n/shared-i18n.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n HostListener,\n inject,\n input,\n InputSignal,\n signal,\n Signal,\n viewChild,\n WritableSignal,\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\nimport { LangChangeEvent, TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { map } from 'rxjs';\n\n@Component({\n selector: 'shared-language-selector',\n templateUrl: './language-selector.component.html',\n styleUrls: ['./language-selector.component.scss'],\n imports: [ButtonComponent, TranslatePipe],\n})\nexport class LanguageSelectorComponent {\n //#region ViewChilds, Inputs, Outputs\n public readonly dropdown: Signal<ElementRef<HTMLDivElement> | undefined> =\n viewChild<ElementRef<HTMLDivElement>>('dropdown');\n\n /** When true, the toggle shows the current language's flag (light-gray button) instead of text. */\n public readonly showFlag: InputSignal<boolean> = input(false);\n\n public readonly title: InputSignal<string> = input('LanguageSelector-Title');\n //#endregion\n\n //#region Variables\n private translate: TranslateService = inject(TranslateService);\n\n protected languages: string[] = this.translate.getLangs();\n\n // A signal rather than a field: the list is also closed from a window click handler, which\n // is not a binding on this view and so marks nothing.\n protected readonly showDropdown: WritableSignal<boolean> = signal(false);\n\n /**\n * `TranslateService.currentLang` is a plain field. The flag on the toggle and the tick beside\n * the chosen entry are read from it, and switching language changed neither until something\n * else happened to refresh this view. Mirrored from the service's own event instead.\n */\n private readonly currentLang: Signal<string> = toSignal(\n this.translate.onLangChange.pipe(map((event: LangChangeEvent) => event.lang)),\n { initialValue: this.translate.currentLang },\n );\n //#endregion\n\n //#region Properties\n public get selectedLanguage(): string {\n return this.currentLang();\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n public onDropdownClick(): void {\n this.showDropdown.update((isShown: boolean) => !isShown);\n }\n\n public onSelectLanguage(language: string): void {\n localStorage.setItem('language', language);\n this.translate.use(language);\n this.showDropdown.set(false);\n }\n //#endregion\n\n //#region Public methods\n //#endregion\n\n //#region Private methods\n @HostListener('window:click', ['$event'])\n protected documentClick(event: MouseEvent): void {\n if (this.showDropdown()) {\n let target: HTMLElement = <HTMLElement>event.target;\n while (target !== null && target.tagName?.toUpperCase() !== 'BODY') {\n if (target === this.dropdown()?.nativeElement) {\n return;\n }\n target = <HTMLElement>target.parentElement;\n }\n this.showDropdown.set(false);\n }\n }\n //#endregion\n}\n","<div #dropdown class=\"dropdown right\" [class.show]=\"showDropdown()\">\n <lib-button\n intent=\"ghost\"\n [class.lang-flag-toggle]=\"showFlag()\"\n [ariaLabel]=\"showFlag() ? (title() | translate) : undefined\"\n (click)=\"onDropdownClick()\"\n >\n @if (showFlag()) {\n <span class=\"flag flag-{{ selectedLanguage }}\"></span>\n } @else {\n {{ title() | translate }}\n }\n </lib-button>\n\n <ul>\n @for (lang of languages; track lang) {\n <li>\n <button\n type=\"button\"\n class=\"dropdown-item\"\n [class.selected]=\"lang === selectedLanguage\"\n (click)=\"onSelectLanguage(lang)\"\n >\n <span class=\"flag flag-{{ lang }}\"></span>\n <span class=\"dropdown-label\">{{ 'Language-' + lang | translate }}</span>\n </button>\n </li>\n }\n </ul>\n</div>\n","import { HttpClient, HttpErrorResponse } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { JwtHelperService } from '@auth0/angular-jwt';\nimport { APP_CONFIG, AppConfig, AuthService, TabService } from '@zambon-dev/ui/framework';\nimport { Observable, catchError, interval, map, mergeMap, tap } from 'rxjs';\nimport { IAuthResponse, ICurrentUserInfo } from '../models';\n\n/**\n * Signs users in against the API's `Authentication` endpoints and keeps their token, refresh token\n * and user info in browser storage. The shared login, layouts, guard and interceptor rely on it.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthenticationService extends AuthService {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n /** Name of the action that grants administrator rights. */\n public adminAction = 'AdministrativeMaster';\n\n private config: AppConfig = inject(APP_CONFIG);\n\n private readonly BASE_URL: string = `${this.config.BASE_URL}/Authentication`;\n private http: HttpClient = inject(HttpClient);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n constructor() {\n super(inject(JwtHelperService), inject(TabService));\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /**\n * Signs in and stores the session; `rememberMe` keeps it after the browser closes. Fails with\n * `InvalidUsernamePassword` or `InternalServerError`, which are translation keys.\n */\n public authenticate(model: { username: string; password: string; rememberMe: boolean }): Observable<void> {\n return this.http.post<IAuthResponse>(`${this.BASE_URL}/SignIn`, model).pipe(\n map((res: IAuthResponse) => {\n this.setStorage('username', res.username, model.rememberMe);\n this.setStorage('token', res.token, model.rememberMe);\n this.setStorage('refreshToken', res.refreshToken, model.rememberMe);\n this.setStorage('userInfo', window.btoa(JSON.stringify(res as ICurrentUserInfo)), model.rememberMe);\n }),\n catchError((error: HttpErrorResponse) =>\n interval(1000).pipe(\n mergeMap(() => {\n switch (error.status) {\n case 401:\n throw 'InvalidUsernamePassword';\n default:\n throw 'InternalServerError';\n }\n }),\n ),\n ),\n );\n }\n\n /** Loads the actions the signed-in user is allowed to perform. */\n public getActions(): Observable<string[]> {\n return this.http.post<string[]>(`${this.BASE_URL}/GetActions`, {});\n }\n\n /** Returns the stored information about the signed-in user, or `null` when signed out. */\n public getUserInfo(): ICurrentUserInfo | null {\n const userInfo: string | null = this.userInfo;\n if (userInfo) {\n return JSON.parse(window.atob(userInfo)) as ICurrentUserInfo;\n }\n return null;\n }\n\n /** Exchanges the refresh token for a new token, stores it and emits it. */\n public tryRefreshToken(): Observable<string> {\n return this.http\n .post<IAuthResponse>(`${this.BASE_URL}/RefreshToken`, {\n username: this.username ?? '',\n refreshToken: this.refreshToken ?? '',\n })\n .pipe(\n tap((res: IAuthResponse) => {\n this.setStorage('token', res.token);\n this.setStorage('refreshToken', res.refreshToken);\n this.setStorage('userInfo', window.btoa(JSON.stringify(res as ICurrentUserInfo)));\n }),\n map((res: IAuthResponse) => res.token ?? ''),\n );\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { InjectionToken } from '@angular/core';\n\n/** First segment of the route that hosts embedded external content. */\nexport const EXTERNAL_CONTENT_ROUTE_PATH = 'external-content';\n\n/**\n * Flat projection of an external menu item, used to restore an embedded tab.\n *\n * Deliberately not a `SidebarMenu`: that class carries a `parent` back-reference, so it is a\n * circular structure that `JSON.stringify` refuses, and holding one would pin the whole menu tree.\n */\nexport interface IExternalContentEntry {\n id: number;\n label: string;\n url: string;\n}\n\nexport class ExternalContentConfigs {\n /**\n * Origins an embedded menu item may point at, for example `['https://reports.example.com']`.\n * Empty — the default — allows any `http`/`https` origin.\n *\n * Populating it is the single highest-value control here after the scheme check: it narrows a\n * compromised menu row from \"frame anything on the internet\" to \"frame one of our report hosts\".\n */\n public allowedOrigins: string[] = [];\n\n /** Milliseconds to wait for the frame's first `load` before hinting that framing may be refused. */\n public slowFrameHintDelay = 5000;\n\n constructor(options: Partial<ExternalContentConfigs> = {}) {\n Object.assign(this, options);\n }\n}\n\nexport const EXTERNAL_CONTENT_CONFIGS: InjectionToken<ExternalContentConfigs> =\n new InjectionToken<ExternalContentConfigs>('Embedded external content configuration', {\n providedIn: 'root',\n factory: () => new ExternalContentConfigs(),\n });\n","import { InjectionToken } from '@angular/core';\n\n/** What kind of value an audited field holds, as ZWebAPI reports it. */\nexport type OperationsHistoryFieldType = 'boolean' | 'date' | 'enum' | 'key' | 'number' | 'other' | 'text' | 'time';\n\n/** One field of an audited record, before and after an operation. */\nexport interface IOperationsHistoryField {\n /** Whether the operation wrote this field. A creation writes every field, a deletion removes every one. */\n isChanged: boolean;\n /** Bookkeeping rather than data: the key, the audit columns, the concurrency token. */\n isSystem: boolean;\n /** The property name, as the backend declares it (`FullName`). */\n name: string;\n /** The value after the operation; `null` for a deletion, or when the backend could not rebuild it. */\n newValue?: unknown;\n /** The value before the operation; `null` for a creation, or when the backend could not rebuild it. */\n oldValue?: unknown;\n type: OperationsHistoryFieldType;\n}\n\nexport interface IOperationsHistoryList {\n /** Capitalised `ID` is intentional: the backend property is `EntityID`, and the camelCase\n * serialization policy only lowercases a leading run of capitals — so the trailing ones survive. */\n entityID?: number;\n entityName?: string;\n /**\n * Every field of the record, before and after the operation. Sent by ZWebAPI 1.17 and later;\n * without it only the fields the operation wrote are known, from `oldValues` and `newValues`.\n */\n fields?: IOperationsHistoryField[];\n id: number;\n newValues?: string;\n oldValues?: string;\n operationType?: string;\n tableName?: string;\n}\n\n/**\n * Turns an audited field into the label the audit shows for it.\n *\n * The result goes through the translation pipe, so it may be a translation key. A key with no\n * translation shows as itself, which is why the default returns readable text rather than a key.\n */\nexport type OperationsHistoryFieldLabel = (fieldName: string, entityName: string | undefined) => string;\n\n/**\n * Splits a PascalCase or camelCase property name into words, keeping acronyms whole.\n *\n * @param fieldName The property name.\n * @returns The name as words, with only the first capitalised.\n */\nexport function humanizeFieldName(fieldName: string): string {\n const words: string[] = fieldName.match(/[A-Z]{2,}(?=[A-Z][a-z]|\\d|$)|[A-Z]?[a-z]+|[A-Z]+|\\d+/g) ?? [fieldName];\n\n return words\n .map((word: string, index: number) => {\n if (word.length > 1 && word === word.toUpperCase()) {\n return word;\n }\n return index === 0 ? word.charAt(0).toUpperCase() + word.slice(1) : word.toLowerCase();\n })\n .join(' ');\n}\n\n/**\n * Labels the fields of the audit's change details.\n *\n * The default splits the property name into words: `FullName` reads \"Full name\" and\n * `RecordID` reads \"Record ID\". Provide a function to use the application's own field labels:\n *\n * ```ts\n * { provide: OPERATIONS_HISTORY_FIELD_LABEL, useValue: (field, entity) => `${entity}-Field-${field}` }\n * ```\n */\nexport const OPERATIONS_HISTORY_FIELD_LABEL: InjectionToken<OperationsHistoryFieldLabel> =\n new InjectionToken<OperationsHistoryFieldLabel>('Audited field label', {\n providedIn: 'root',\n factory: () => humanizeFieldName,\n });\n","import { inject, Injectable } from '@angular/core';\nimport { SidebarMenu, SidebarService } from '@zambon-dev/ui/library';\nimport { catchError, map, Observable, of, take } from 'rxjs';\nimport { EXTERNAL_CONTENT_ROUTE_PATH, IExternalContentEntry } from '../models';\n\n/**\n * Remembers which external destination sits behind an embedded tab's `/external-content/:menuID`\n * route, and resolves it back when the view is created.\n *\n * The destination never travels in the route, so the id has to be resolved to a URL somehow. That\n * happens in three steps, cheapest first:\n *\n * 1. the in-memory registry — the item was clicked in this browsing session;\n * 2. `sessionStorage` — the user pressed F5 on the embedded tab;\n * 3. the application's `SidebarService.getMenuFromUrl()` — a cold deep link.\n *\n * Step 3 reuses the abstract hook every application already implements, so nothing new is required\n * of a consumer: an application whose menu endpoint cannot resolve `/external-content/:id` simply\n * gets the unavailable state on a cold deep link, which is the documented behaviour.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ExternalContentService {\n //#region Variables\n private readonly maxEntries: number = 20;\n private readonly storageKey: string = 'zambon.externalContent';\n\n private registry: Map<number, IExternalContentEntry> = new Map<number, IExternalContentEntry>();\n private sidebarService: SidebarService = inject(SidebarService);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Public methods\n /** Resolves the destination behind an embedded tab, or `undefined` when it cannot be recovered. */\n public find(menuID: number): Observable<IExternalContentEntry | undefined> {\n const known: IExternalContentEntry | undefined = this.registry.get(menuID) ?? this.readFromStorage(menuID);\n\n if (known) {\n return of(known);\n }\n\n return this.sidebarService.getMenuFromUrl(`/${EXTERNAL_CONTENT_ROUTE_PATH}/${menuID}`).pipe(\n take(1),\n map((menu: SidebarMenu) => (!!menu && !!menu.url ? this.toEntry(menu) : undefined)),\n // A menu endpoint that does not know this route shape answers 404, which is an expected\n // outcome here rather than a failure: the view falls back to its unavailable state.\n catchError(() => of(undefined)),\n );\n }\n\n /** Remembers a menu so its embedded tab survives a page refresh. */\n public register(menu: SidebarMenu): void {\n const entry: IExternalContentEntry = this.toEntry(menu);\n\n this.registry.set(entry.id, entry);\n this.writeToStorage(entry);\n }\n //#endregion\n\n //#region Private methods\n private readAllFromStorage(): IExternalContentEntry[] {\n try {\n const raw: string | null = window.sessionStorage.getItem(this.storageKey);\n\n if (!raw) {\n return [];\n }\n\n const parsed: unknown = JSON.parse(raw);\n\n return Array.isArray(parsed) ? <IExternalContentEntry[]>parsed : [];\n } catch {\n // A poisoned or unavailable storage entry must never take the application down; the view\n // degrades to asking the user to reopen the item from the menu.\n return [];\n }\n }\n\n private readFromStorage(menuID: number): IExternalContentEntry | undefined {\n const entry: IExternalContentEntry | undefined = this.readAllFromStorage().find(\n (candidate: IExternalContentEntry) => candidate?.id === menuID,\n );\n\n if (!!entry && !!entry.url) {\n this.registry.set(entry.id, entry);\n return entry;\n }\n\n return undefined;\n }\n\n private toEntry(menu: SidebarMenu): IExternalContentEntry {\n return {\n id: menu.id,\n label: menu.label,\n url: menu.url ?? '',\n };\n }\n\n private writeToStorage(entry: IExternalContentEntry): void {\n try {\n const entries: IExternalContentEntry[] = [\n entry,\n ...this.readAllFromStorage().filter((candidate: IExternalContentEntry) => candidate?.id !== entry.id),\n ].slice(0, this.maxEntries);\n\n window.sessionStorage.setItem(this.storageKey, JSON.stringify(entries));\n } catch {\n // Storage can be unavailable (private mode, blocked site data). Losing refresh support is\n // acceptable; failing the click is not.\n }\n }\n //#endregion\n}\n","import { inject, Injectable } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ICurrentUserInfo } from '../models';\nimport { AuthenticationService } from './authentication.service';\n\n/**\n * Resolves the runtime placeholders in an external menu URL, and vets the result before it is\n * handed to the browser.\n *\n * Placeholder syntax is `{name}`, case-sensitive, drawn from a **closed** set:\n *\n * | Token | Source |\n * |--------------|-----------------------------------------------------|\n * | `{email}` | `ICurrentUserInfo.email` |\n * | `{language}` | `TranslateService.currentLang`, then `defaultLang` |\n * | `{userId}` | `ICurrentUserInfo.userID` |\n * | `{userName}` | `ICurrentUserInfo.username` |\n *\n * The set is closed by construction rather than reflected off the stored user info, and that is a\n * security property, not a style choice: `AuthenticationService` persists the entire sign-in\n * response under `userInfo`, tokens included, so a reflective implementation would let a menu URL\n * configured as `?t={token}` hand the JWT to a third party. No authentication token is ever\n * substituted.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ExternalUrlResolverService {\n //#region Variables\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n private translate: TranslateService = inject(TranslateService);\n\n /** Placeholder grammar, used only to *detect* tokens this version does not know. */\n private readonly unknownPlaceholderPattern: RegExp = /\\{[A-Za-z][A-Za-z0-9_]*\\}/g;\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Public methods\n /**\n * Whether `url` is an absolute `http`/`https` address.\n *\n * Rejects relative paths, malformed values, protocol-relative `//host/path` (which throws\n * without a base), and the schemes that would execute rather than navigate: `javascript:`,\n * `data:`, `blob:`, `file:`.\n */\n public isAllowed(url: string): boolean {\n let parsed: URL;\n\n try {\n parsed = new URL(url);\n } catch {\n return false;\n }\n\n return parsed.protocol === 'http:' || parsed.protocol === 'https:';\n }\n\n /**\n * Substitutes every known placeholder, URL-encoding each value.\n *\n * Because every value is percent-encoded, a placeholder must occupy one *whole* value — a full\n * path segment, or a full query-parameter value. Encoding is what stops a display name that\n * contains `&` from injecting an extra query parameter into the destination.\n *\n * A known placeholder with no value becomes an empty string; an unrecognized `{…}` is left\n * exactly as configured, so a report URL that legitimately contains braces is not corrupted.\n */\n public resolve(url: string): string {\n if (!url || url.indexOf('{') === -1) {\n return url;\n }\n\n const values: Map<string, string> = this.getPlaceholderValues();\n\n let resolved: string = url;\n\n values.forEach((value: string, token: string) => {\n if (resolved.indexOf(token) === -1) {\n return;\n }\n\n if (value.length === 0) {\n console.warn(\n `External URL placeholder ${token} has no value for the current user; substituting an empty string.`,\n url,\n );\n }\n\n // split/join rather than String.replace: replace() interprets `$&` and `$1` in the\n // replacement text, and without a global regex it would only swap the first occurrence.\n resolved = resolved.split(token).join(encodeURIComponent(value));\n });\n\n this.warnAboutUnknownPlaceholders(url, resolved);\n\n return resolved;\n }\n //#endregion\n\n //#region Private methods\n private getPlaceholderValues(): Map<string, string> {\n const user: ICurrentUserInfo | null = this.authenticationService.getUserInfo();\n\n return new Map<string, string>([\n ['{email}', user?.email ?? ''],\n ['{language}', this.translate.currentLang || this.translate.defaultLang || ''],\n ['{userId}', user?.userID?.toString() ?? ''],\n ['{userName}', user?.username ?? ''],\n ]);\n }\n\n private warnAboutUnknownPlaceholders(url: string, resolved: string): void {\n const unknown: string[] = resolved.match(this.unknownPlaceholderPattern) ?? [];\n\n if (unknown.length > 0) {\n console.warn(\n `External URL contains unrecognized placeholders and was left as configured: ${unknown.join(', ')}`,\n url,\n );\n }\n }\n //#endregion\n}\n","import { inject, Injectable } from '@angular/core';\nimport { HubConnection, HubConnectionBuilder, HubConnectionState } from '@microsoft/signalr';\nimport { APP_CONFIG, AppConfig, AuthService } from '@zambon-dev/ui/framework';\nimport { BehaviorSubject, map, Observable } from 'rxjs';\nimport { INotification } from '../models';\n\n/**\n * Streams top-bar notifications from a SignalR hub.\n *\n * The hub is configured via `AppConfig.notificationsEnabled` and `AppConfig.notificationsUrl`.\n * When enabled, {@link start} opens a connection (authenticated with the current JWT) and\n * listens for the server to push the notification list via the `ReceiveNotifications` client\n * method. Consuming apps do not interact with this service directly — the top bar drives it.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class NotificationsService {\n //#region Variables\n private authService: AuthService = inject(AuthService);\n private config: AppConfig = inject(APP_CONFIG);\n\n private connection?: HubConnection;\n private notifications$: BehaviorSubject<INotification[]> = new BehaviorSubject<INotification[]>([]);\n //#endregion\n\n //#region Properties\n /** Whether the notifications feature is enabled (toggled on and given a hub URL). */\n public get isEnabled(): boolean {\n return this.config.notificationsEnabled && this.config.notificationsUrl.length > 0;\n }\n //#endregion\n\n //#region Public methods\n /** Emits the current list of notifications. */\n public getNotifications(): Observable<INotification[]> {\n return this.notifications$.asObservable();\n }\n\n /** Emits the number of unread notifications. */\n public getUnreadCount(): Observable<number> {\n return this.notifications$.pipe(\n map((notifications: INotification[]) => notifications.filter((n: INotification) => !n.isRead).length),\n );\n }\n\n /** Marks every notification as read and notifies the hub. */\n public markAllAsRead(): void {\n this.notifications$.next(this.notifications$.value.map((n: INotification) => ({ ...n, isRead: true })));\n\n if (this.connection?.state === HubConnectionState.Connected) {\n this.connection.invoke('MarkAllAsRead').catch((error: unknown) => {\n console.error('Failed to mark notifications as read on the hub.', error);\n });\n }\n }\n\n /** Marks a single notification as read (optimistically; the server reconciles on the next push). */\n public markAsRead(notification: INotification): void {\n this.notifications$.next(\n this.notifications$.value.map((n: INotification) => (n === notification ? { ...n, isRead: true } : n)),\n );\n }\n\n /** Opens the SignalR connection and starts receiving notifications. Idempotent and a no-op when disabled. */\n public start(): void {\n if (!this.isEnabled || !!this.connection) {\n return;\n }\n\n this.connection = new HubConnectionBuilder()\n .withUrl(this.config.notificationsUrl, {\n accessTokenFactory: () => this.authService.token ?? '',\n })\n .withAutomaticReconnect()\n .build();\n\n this.connection.on('ReceiveNotifications', (notifications: INotification[]) => {\n this.notifications$.next(notifications ?? []);\n });\n\n this.connection.start().catch((error: unknown) => {\n console.error('Failed to connect to the notifications hub.', error);\n });\n }\n\n /** Closes the SignalR connection. */\n public async stop(): Promise<void> {\n if (this.connection) {\n await this.connection.stop();\n this.connection = undefined;\n }\n }\n //#endregion\n}\n","import { HttpClient } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\nimport { IListParameters } from '@zambon-dev/ui/library';\nimport { Observable } from 'rxjs';\nimport { IOperationsHistoryList } from '../models';\n\n/** Loads the field-level operations of one change set from the audit API. */\n@Injectable({\n providedIn: 'root',\n})\nexport class OperationsHistoryService {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n private config: AppConfig = inject(APP_CONFIG);\n private http: HttpClient = inject(HttpClient);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /**\n * Lists the operations of change set `serviceHistoryID` on the record `entityID` under the API\n * controller `controllerName`, filtered and paged by `parameters`.\n */\n public list(\n controllerName: string,\n entityID: number,\n serviceHistoryID: number,\n parameters: IListParameters,\n ): Observable<IOperationsHistoryList[]> {\n return this.http.post<IOperationsHistoryList[]>(\n `${this.config.BASE_URL}/${controllerName}/${entityID}/Audit/${serviceHistoryID}`,\n parameters,\n );\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { HttpClient } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\nimport { IListParameters } from '@zambon-dev/ui/library';\nimport { Observable } from 'rxjs';\nimport { IServicesHistoryList } from '../models';\n\n/** Loads the change sets (services) recorded for a record from the audit API. */\n@Injectable({\n providedIn: 'root',\n})\nexport class ServicesHistoryService {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n private config: AppConfig = inject(APP_CONFIG);\n private http: HttpClient = inject(HttpClient);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /**\n * Lists the change sets of the record `entityID` under the API controller `controllerName`,\n * filtered and paged by `parameters`.\n */\n public list(\n controllerName: string,\n entityID: number,\n parameters: IListParameters,\n ): Observable<IServicesHistoryList[]> {\n return this.http.post<IServicesHistoryList[]>(\n `${this.config.BASE_URL}/${controllerName}/${entityID}/Audit`,\n parameters,\n );\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { Component, ElementRef, inject, OnInit, signal, Signal, viewChild, WritableSignal } from '@angular/core';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { Router, RouterModule } from '@angular/router';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\nimport { finalize, tap } from 'rxjs';\nimport { AuthenticationService } from '../../../services';\nimport { LanguageSelectorComponent } from '../language-selector/language-selector.component';\n\n/**\n * Sign-in form with username, password and \"remember me\". On success it navigates to the\n * `returnUrl` query parameter, or to `/`; on failure it shows the error and clears the password.\n */\n@Component({\n selector: 'shared-login',\n templateUrl: './login.component.html',\n styleUrls: ['./login.component.scss'],\n imports: [ButtonComponent, LanguageSelectorComponent, ReactiveFormsModule, RouterModule, TranslatePipe],\n})\nexport class LoginComponent implements OnInit {\n //#region ViewChilds, Inputs, Outputs\n /** The username field, focused again after a failed sign-in. */\n public readonly username: Signal<ElementRef<HTMLInputElement> | undefined> =\n viewChild<ElementRef<HTMLInputElement>>('username');\n //#endregion\n\n //#region Variables\n protected form!: FormGroup;\n // A signal holding one object, replaced rather than edited: every one of these is rendered --\n // the validation banner, the button's spinner, its success tick -- and each is written from\n // inside the authentication stream, where nothing marks this view.\n protected readonly formState: WritableSignal<{\n error: string | null;\n loading: boolean;\n success: boolean;\n }> = signal({\n error: null,\n loading: false,\n success: false,\n });\n\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n private config: AppConfig = inject(APP_CONFIG);\n private formBuilder: FormBuilder = inject(FormBuilder);\n private router: Router = inject(Router);\n //#endregion\n\n //#region Properties\n /** Company line under the title, when the application supplies one. */\n protected get companyName(): string {\n return this.config.companyName;\n }\n\n /** The sign-in logo, falling back to the top bar's. Nothing is drawn when neither is set. */\n protected get logoUrl(): string | undefined {\n return this.config.loginLogoUrl ?? this.config.logoUrl;\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n\n public ngOnInit(): void {\n this.form = this.formBuilder.group({\n password: ['', Validators.required],\n rememberMe: [false, { nonNullable: true }],\n username: ['', Validators.required],\n });\n }\n //#endregion\n\n //#region Event handlers\n /** Validates the form and signs in with the entered credentials. */\n public onSubmit(): void {\n this.form.markAllAsTouched();\n\n if (this.form.valid) {\n this.form.disable();\n\n this.formState.update((state) => ({ ...state, error: null, loading: true }));\n\n this.authenticationService\n .authenticate({\n username: this.form.get('username')?.value.toString() ?? '',\n password: this.form.get('password')?.value.toString() ?? '',\n rememberMe: this.form.get('rememberMe')?.value ?? false,\n })\n .pipe(\n tap(() => this.formState.update((state) => ({ ...state, success: true }))),\n finalize(() => this.formState.update((state) => ({ ...state, loading: false }))),\n )\n .subscribe({\n next: () => {\n const params: URLSearchParams = new URLSearchParams(window.location.search);\n\n this.router.navigate([params.get('returnUrl') ?? '/']);\n },\n error: (e: string) => {\n this.form.enable();\n\n this.form.controls['password'].setValue('');\n this.form.controls['password'].markAsUntouched();\n\n this.username()?.nativeElement.focus();\n\n const error: string = e === 'InvalidUsernamePassword' ? 'invalid' : 'internalServerError';\n this.formState.update((state) => ({ ...state, error }));\n },\n });\n }\n }\n //#endregion\n\n //#region Public methods\n /** A field is only shown as wrong once the user has been given a chance to fill it. */\n protected isInvalid(field: string): boolean {\n const control = this.form.get(field);\n return !!control && control.touched && control.invalid;\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","<div class=\"login-card\">\n @if (logoUrl) {\n <img class=\"login-logo\" [src]=\"logoUrl\" alt=\"\" />\n }\n\n <h1 class=\"login-title\">{{ 'Login-Title' | translate }}</h1>\n @if (companyName) {\n <p class=\"login-subtitle\">{{ companyName }}</p>\n }\n\n <form class=\"login-form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" novalidate>\n @if (formState().error) {\n <p class=\"login-error\" role=\"alert\">\n @if (formState().error === 'invalid') {\n {{ 'Login-Errors-Invalid' | translate }}\n } @else {\n {{ 'Login-Errors-InternalServerError' | translate }}\n }\n </p>\n }\n\n <div class=\"login-field\">\n <label class=\"login-label\" for=\"username\">{{ 'Login-Username' | translate }}</label>\n <div class=\"login-control\" [class.invalid]=\"isInvalid('username')\">\n <i class=\"fa-solid fa-user fa-fw\" aria-hidden=\"true\"></i>\n <input\n #username\n id=\"username\"\n type=\"text\"\n formControlName=\"username\"\n autocomplete=\"username\"\n [attr.aria-invalid]=\"isInvalid('username') ? 'true' : null\"\n [placeholder]=\"'Login-Username' | translate\"\n />\n </div>\n @if (isInvalid('username')) {\n <span class=\"login-validation\">{{ 'Login-Username-Required' | translate }}</span>\n }\n </div>\n\n <div class=\"login-field\">\n <label class=\"login-label\" for=\"password\">{{ 'Login-Password' | translate }}</label>\n <div class=\"login-control\" [class.invalid]=\"isInvalid('password')\">\n <i class=\"fa-solid fa-key fa-fw\" aria-hidden=\"true\"></i>\n <input\n id=\"password\"\n type=\"password\"\n formControlName=\"password\"\n autocomplete=\"current-password\"\n [attr.aria-invalid]=\"isInvalid('password') ? 'true' : null\"\n [placeholder]=\"'Login-Password' | translate\"\n />\n </div>\n @if (isInvalid('password')) {\n <span class=\"login-validation\">{{ 'Login-Password-Required' | translate }}</span>\n }\n </div>\n\n <div class=\"login-options\">\n <label class=\"login-remember\">\n <input id=\"rememberMe\" type=\"checkbox\" class=\"form-input\" formControlName=\"rememberMe\" />\n <span>{{ 'Login-RememberMe' | translate }}</span>\n </label>\n\n <shared-language-selector title=\"Login-SelectLanguage\"></shared-language-selector>\n </div>\n\n <lib-button\n class=\"login-submit\"\n type=\"submit\"\n intent=\"primary\"\n icon=\"fa-solid fa-right-to-bracket\"\n [loading]=\"formState().loading\"\n [success]=\"formState().success\"\n >\n {{ 'Login-SignIn' | translate }}\n </lib-button>\n </form>\n</div>\n\n<footer class=\"login-footer\">\n <span [innerHTML]=\"'Login-Copyright' | translate\"></span>\n <span>{{ 'Login-DesignBy' | translate }}</span>\n</footer>\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\n\n/**\n * Page layout for the sign-in screen: the configured `loginBackgroundUrl` behind a router outlet\n * and any projected content, which hold the login form.\n */\n@Component({\n selector: 'shared-login-layout',\n templateUrl: './login-layout.component.html',\n styleUrls: ['./login-layout.component.scss'],\n imports: [RouterModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n // The configuration is fixed for the application's lifetime, so this never has to change.\n '[class.has-background]': '!!backgroundUrl',\n },\n})\nexport class LoginLayoutComponent {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n //#region Variables\n private config: AppConfig = inject(APP_CONFIG);\n //#endregion\n //#region Properties\n /** Optional photograph behind the card. Absent leaves the app backdrop showing. */\n protected get backgroundUrl(): string | undefined {\n return this.config.loginBackgroundUrl;\n }\n //#endregion\n //#region Constructor and Angular life cycle methods\n //#endregion\n //#region Event handlers\n //#endregion\n //#region Public methods\n //#endregion\n //#region Private methods\n //#endregion\n}\n","@if (backgroundUrl) {\n <div class=\"background\" [style.background-image]=\"'url(' + backgroundUrl + ')'\"></div>\n}\n\n<div class=\"login-container\">\n <router-outlet></router-outlet>\n\n <!-- Projected content renders beside the outlet, so the layout can host a sign-in screen that is\n not reached through the router. Without it, a child placed inside this element was silently\n dropped -- which is what the Storybook story had been doing. -->\n <ng-content></ng-content>\n</div>\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\n\n/** Logo, application name and company name from the app configuration, shown in the top bar. */\n@Component({\n selector: 'shared-brand',\n templateUrl: './brand.component.html',\n styleUrls: ['./brand.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrandComponent {\n //#region Variables\n private config: AppConfig = inject(APP_CONFIG);\n //#endregion\n\n //#region Properties\n protected get appName(): string {\n return this.config.appName;\n }\n\n protected get companyName(): string {\n return this.config.companyName;\n }\n\n protected get logoUrl(): string | undefined {\n return this.config.logoUrl;\n }\n //#endregion\n}\n","<div class=\"brand\">\n @if (logoUrl) {\n <img class=\"brand-logo\" [src]=\"logoUrl\" [alt]=\"appName\" />\n }\n\n <div class=\"brand-text\">\n <span class=\"brand-app\">{{ appName }}</span>\n @if (companyName) {\n <span class=\"brand-company\">{{ companyName }}</span>\n }\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\n\n/**\n * Badge naming the configured environment, e.g. `DEV`, `QA` or `STG`, each in its own colour.\n * Hidden in `PROD` and when no environment is configured.\n */\n@Component({\n selector: 'shared-environment-badge',\n templateUrl: './environment-badge.component.html',\n styleUrls: ['./environment-badge.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EnvironmentBadgeComponent {\n //#region Variables\n private config: AppConfig = inject(APP_CONFIG);\n //#endregion\n\n //#region Properties\n /** CSS modifier class for the current environment, falling back to a neutral style. */\n protected get badgeClass(): string {\n const colorByEnvironment: Record<string, string> = {\n DEV: 'env-dev',\n QA: 'env-qa',\n STG: 'env-stg',\n };\n return colorByEnvironment[this.environment] ?? 'env-neutral';\n }\n\n /** Normalized environment key (uppercase, trimmed). */\n protected get environment(): string {\n return (this.config.environment ?? '').trim().toUpperCase();\n }\n\n /** The badge is hidden in production and when no environment is configured. */\n protected get isVisible(): boolean {\n return this.environment.length > 0 && this.environment !== 'PROD';\n }\n //#endregion\n}\n","@if (isVisible) {\n <span class=\"env-badge {{ badgeClass }}\">\n <span class=\"env-dot\"></span>\n <span class=\"env-label\">{{ environment }}</span>\n </span>\n}\n","import { AsyncPipe } from '@angular/common';\nimport {\n Component,\n ElementRef,\n HostListener,\n inject,\n OnInit,\n signal,\n Signal,\n viewChild,\n WritableSignal,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { Observable } from 'rxjs';\nimport { INotification } from '../../../models';\nimport { NotificationsService } from '../../../services';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\n\n/**\n * Bell with an unread count that opens a list of notifications. Clicking one marks it as read\n * and follows its link: external URLs open in a new window, others navigate in the app.\n */\n@Component({\n selector: 'shared-notifications',\n templateUrl: './notifications.component.html',\n styleUrls: ['./notifications.component.scss'],\n imports: [AsyncPipe, ButtonComponent, TranslatePipe],\n})\nexport class NotificationsComponent implements OnInit {\n //#region ViewChilds, Inputs, Outputs\n /** The open notifications panel; clicks inside it do not close it. */\n public readonly dropdown: Signal<ElementRef<HTMLDivElement> | undefined> =\n viewChild<ElementRef<HTMLDivElement>>('dropdown');\n //#endregion\n\n //#region Variables\n private notificationsService: NotificationsService = inject(NotificationsService);\n private router: Router = inject(Router);\n\n protected notifications$: Observable<INotification[]> = this.notificationsService.getNotifications();\n // A signal rather than a field: the panel is also closed from a window click handler, which\n // is not a binding on this view and so marks nothing.\n protected readonly showDropdown: WritableSignal<boolean> = signal(false);\n protected unreadCount$: Observable<number> = this.notificationsService.getUnreadCount();\n //#endregion\n\n //#region Properties\n /** Whether the notifications feature is enabled; when false the bell is not rendered. */\n public get isEnabled(): boolean {\n return this.notificationsService.isEnabled;\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n public ngOnInit(): void {\n this.notificationsService.start();\n }\n //#endregion\n\n //#region Event handlers\n /** Opens or closes the notifications panel. */\n public onDropdownClick(): void {\n this.showDropdown.update((isShown: boolean) => !isShown);\n }\n\n /** Marks every notification as read. */\n public onMarkAllAsRead(): void {\n this.notificationsService.markAllAsRead();\n }\n\n /** Marks the notification as read, closes the panel and follows its `callToActionUrl`, if any. */\n public onNotificationClick(notification: INotification): void {\n this.notificationsService.markAsRead(notification);\n this.showDropdown.set(false);\n\n const url: string | undefined = notification.callToActionUrl;\n if (!url) {\n return;\n }\n\n if (/^https?:\\/\\//i.test(url)) {\n window.open(url, '_blank', 'noopener');\n } else {\n this.router.navigateByUrl(url);\n }\n }\n //#endregion\n\n //#region Private methods\n @HostListener('window:click', ['$event'])\n protected documentClick(event: MouseEvent): void {\n if (this.showDropdown()) {\n let target: HTMLElement = <HTMLElement>event.target;\n while (target !== null && target.tagName?.toUpperCase() !== 'BODY') {\n if (target === this.dropdown()?.nativeElement) {\n return;\n }\n target = <HTMLElement>target.parentElement;\n }\n this.showDropdown.set(false);\n }\n }\n //#endregion\n}\n","@if (isEnabled) {\n <div #dropdown class=\"notifications\">\n <lib-button\n class=\"notifications-toggle\"\n intent=\"ghost\"\n icon=\"fa-solid fa-bell\"\n [ariaLabel]=\"'TopBar-Notifications-Title' | translate\"\n (click)=\"onDropdownClick()\"\n ></lib-button>\n\n @if (unreadCount$ | async; as count) {\n <span class=\"notifications-badge\">{{ count }}</span>\n }\n\n @if (showDropdown()) {\n <div class=\"notifications-panel\">\n @let items = (notifications$ | async) ?? [];\n\n <div class=\"notifications-header\">\n <span>{{ 'TopBar-Notifications-Title' | translate }}</span>\n @if (items.length > 0) {\n <button type=\"button\" class=\"notifications-mark-all\" (click)=\"onMarkAllAsRead()\">\n {{ 'TopBar-Notifications-MarkAllRead' | translate }}\n </button>\n }\n </div>\n\n @if (items.length > 0) {\n <ul class=\"notifications-list\">\n @for (item of items; track $index) {\n <li class=\"notifications-item\" [class.unread]=\"!item.isRead\">\n <button\n type=\"button\"\n class=\"notifications-item-btn\"\n [class.has-cta]=\"!!item.callToActionUrl\"\n (click)=\"onNotificationClick(item)\"\n >\n <span class=\"notifications-item-icon\"><i class=\"{{ item.icon }}\"></i></span>\n <span class=\"notifications-item-body\">\n <span class=\"notifications-item-title\">{{ item.title }}</span>\n <span class=\"notifications-item-description\">{{ item.description }}</span>\n </span>\n @if (item.callToActionUrl) {\n <i class=\"notifications-item-cta fa-solid fa-chevron-right\"></i>\n }\n </button>\n </li>\n }\n </ul>\n } @else {\n <div class=\"notifications-empty\">{{ 'TopBar-Notifications-Empty' | translate }}</div>\n }\n </div>\n }\n </div>\n}\n","import { DOCUMENT, Injectable, computed, effect, inject, signal } from '@angular/core';\n\n/** What the user chose. `system` follows the operating system and keeps following it. */\nexport type ThemePreference = 'light' | 'dark' | 'system';\n\n/** What the stylesheet is actually asked for. The CSS never sees `system`. */\nexport type ResolvedTheme = 'light' | 'dark';\n\n/** Key the preference is stored under, and the one the pre-paint snippet has to read. */\nexport const THEME_STORAGE_KEY = 'zambon-theme';\n\n/** Attribute on `<html>` the token layer keys off. */\nconst THEME_ATTRIBUTE = 'data-theme';\n\nconst SYSTEM_DARK_QUERY = '(prefers-color-scheme: dark)';\n\n/**\n * Owns the light/dark choice and writes it to `<html>`.\n *\n * The CSS switch is an attribute rather than `prefers-color-scheme` so that a user can pick light on\n * a dark machine. Once this service exists it always writes the attribute; with nothing stored it\n * keeps whatever the page already set, and falls back to light. Following the operating system is\n * still a supported choice --\n * it is resolved here, in TypeScript, and written out as a concrete `light` or `dark`. That is why\n * `theme.css` holds one dark block instead of two that would have to be kept identical.\n *\n * The attribute is normally written before this service exists, by the snippet in `index.html`\n * documented in the design-tokens guide -- an Angular service cannot run before the first paint,\n * and a frame of the wrong theme is worse than no theme. This picks up from there.\n */\n@Injectable({ providedIn: 'root' })\nexport class ThemeService {\n //#region Variables\n private readonly document = inject(DOCUMENT);\n private readonly preferenceState = signal<ThemePreference>(this.readStoredPreference());\n private readonly systemPrefersDark = signal<boolean>(this.readSystemPrefersDark());\n //#endregion\n\n //#region Properties\n /** What the user chose, including `system`. */\n public readonly preference = this.preferenceState.asReadonly();\n\n /** What is actually applied right now. `system` is already resolved here. */\n public readonly resolved = computed<ResolvedTheme>(() => {\n const preference = this.preferenceState();\n if (preference !== 'system') {\n return preference;\n }\n return this.systemPrefersDark() ? 'dark' : 'light';\n });\n //#endregion\n\n constructor() {\n this.watchSystemPreference();\n\n // Writes on creation as well as on every later change, so a mismatch between the pre-paint\n // snippet and the stored preference is corrected rather than left on screen.\n effect(() => {\n this.document.documentElement.setAttribute(THEME_ATTRIBUTE, this.resolved());\n });\n }\n\n //#region Methods\n /** Records a choice and applies it. Persisting is best-effort: a blocked store is not an error. */\n public setPreference(preference: ThemePreference): void {\n this.preferenceState.set(preference);\n\n try {\n this.document.defaultView?.localStorage.setItem(THEME_STORAGE_KEY, preference);\n } catch {\n // Private mode, or storage disabled by policy. The choice still applies for this session.\n }\n }\n\n /** Steps light -> dark -> system -> light, which is what a single-button switch needs. */\n public cyclePreference(): void {\n const order: ThemePreference[] = ['light', 'dark', 'system'];\n const next = order[(order.indexOf(this.preferenceState()) + 1) % order.length];\n this.setPreference(next);\n }\n //#endregion\n\n //#region Private methods\n private readStoredPreference(): ThemePreference {\n try {\n const stored = this.document.defaultView?.localStorage.getItem(THEME_STORAGE_KEY);\n if (stored === 'light' || stored === 'dark' || stored === 'system') {\n return stored;\n }\n } catch {\n // Unreadable storage is the same as no stored choice.\n }\n\n // Nothing stored: honour whatever is already on <html> rather than assuming light. That\n // attribute is what the pre-paint snippet decided, and an application that hardcodes\n // `data-theme=\"dark\"` and never offers a switch means it -- this used to overwrite both\n // the moment the first screen containing the switch rendered.\n const existing = this.document.documentElement.getAttribute(THEME_ATTRIBUTE);\n return existing === 'dark' || existing === 'light' ? existing : 'light';\n }\n\n private readSystemPrefersDark(): boolean {\n return this.document.defaultView?.matchMedia?.(SYSTEM_DARK_QUERY).matches ?? false;\n }\n\n /**\n * Keeps following the operating system after the first read. Without this, choosing `system` and\n * then switching the machine to dark would leave the application on light until a reload.\n */\n private watchSystemPreference(): void {\n const query = this.document.defaultView?.matchMedia?.(SYSTEM_DARK_QUERY);\n query?.addEventListener('change', (event) => this.systemPrefersDark.set(event.matches));\n }\n //#endregion\n}\n","import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\nimport { ThemePreference, ThemeService } from './theme.service';\n\n/**\n * The top bar's light/dark control.\n *\n * One button stepping light -> dark -> system rather than three, because the bar is tight and this\n * is not a setting people change often. The icon shows the choice that is in force, not the one a\n * click would bring: a control that displays its own next state cannot be read at a glance.\n *\n * It has no stylesheet: a ghost `lib-button` is already the icon-button treatment, and a second\n * copy of it here would drift from the one in the top bar beside it.\n */\n@Component({\n selector: 'shared-theme-switch',\n templateUrl: './theme-switch.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ButtonComponent, TranslatePipe],\n})\nexport class ThemeSwitchComponent {\n //#region Variables\n private readonly theme = inject(ThemeService);\n //#endregion\n\n //#region Properties\n /** The choice in force, including `system`. */\n protected readonly preference = this.theme.preference;\n\n /** Full Font Awesome classes for the current choice -- the style prefix is not optional. */\n protected readonly icon = computed<string>(() => {\n const byPreference: Record<ThemePreference, string> = {\n light: 'fa-solid fa-sun',\n dark: 'fa-solid fa-moon',\n system: 'fa-solid fa-circle-half-stroke',\n };\n return byPreference[this.preference()];\n });\n\n /** Translation key naming the current choice, used for the label and the tooltip. */\n protected readonly label = computed<string>(() => {\n const byPreference: Record<ThemePreference, string> = {\n light: 'TopBar-Theme-Light',\n dark: 'TopBar-Theme-Dark',\n system: 'TopBar-Theme-System',\n };\n return byPreference[this.preference()];\n });\n //#endregion\n\n //#region Event handlers\n protected onClick(): void {\n this.theme.cyclePreference();\n }\n //#endregion\n}\n","<lib-button\n intent=\"ghost\"\n [icon]=\"icon()\"\n [ariaLabel]=\"label() | translate\"\n [title]=\"label() | translate\"\n (click)=\"onClick()\"\n></lib-button>\n","import { Component, inject, OnInit, signal, WritableSignal } from '@angular/core';\nimport { ICurrentUserInfo } from '../../../models';\nimport { AuthenticationService } from '../../../services';\n\n/** Signed-in user's picture, name and position in the top bar. Shows initials when there is no picture. */\n@Component({\n selector: 'shared-user-profile',\n templateUrl: './user-profile.component.html',\n styleUrls: ['./user-profile.component.scss'],\n})\nexport class UserProfileComponent implements OnInit {\n //#region Variables\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n\n // A signal rather than a field: the top bar renders the name and the avatar, and this is\n // only filled in ngOnInit -- after the first pass has already been and gone.\n protected readonly user: WritableSignal<ICurrentUserInfo | null> = signal(null);\n //#endregion\n\n //#region Properties\n /** Up to two uppercase initials derived from the user's name, used when no picture is set. */\n protected get initials(): string {\n const parts: string[] = this.name\n .trim()\n .split(/\\s+/)\n .filter((p: string) => p.length > 0);\n if (parts.length === 0) {\n return '';\n }\n\n const first: string = parts[0].charAt(0);\n const last: string = parts.length > 1 ? parts[parts.length - 1].charAt(0) : '';\n return (first + last).toUpperCase();\n }\n\n protected get name(): string {\n return this.user()?.name ?? '';\n }\n\n protected get pictureUrl(): string | undefined {\n return this.user()?.pictureUrl;\n }\n\n protected get position(): string {\n return this.user()?.position ?? '';\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n public ngOnInit(): void {\n this.user.set(this.authenticationService.getUserInfo());\n }\n //#endregion\n}\n","<div class=\"user-profile\">\n <div class=\"user-text\">\n <span class=\"user-name\">{{ name }}</span>\n @if (position) {\n <span class=\"user-position\">{{ position }}</span>\n }\n </div>\n\n <div class=\"user-avatar\">\n @if (pictureUrl) {\n <img class=\"user-avatar-img\" [src]=\"pictureUrl\" [alt]=\"name\" />\n } @else {\n <span class=\"user-avatar-initials\">{{ initials }}</span>\n }\n </div>\n</div>\n","import { Component, output, OutputEmitterRef } from '@angular/core';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { LanguageSelectorComponent } from '../../auth/components/language-selector/language-selector.component';\nimport { BrandComponent } from './brand/brand.component';\nimport { EnvironmentBadgeComponent } from './environment-badge/environment-badge.component';\nimport { NotificationsComponent } from './notifications/notifications.component';\nimport { ThemeSwitchComponent } from '../../theme/theme-switch.component';\nimport { UserProfileComponent } from './user-profile/user-profile.component';\n\n/**\n * Bar across the top of the app with the brand, environment badge, notifications, theme and\n * language switches, user profile and a logout button.\n */\n@Component({\n selector: 'shared-top-bar',\n templateUrl: './top-bar.component.html',\n styleUrls: ['./top-bar.component.scss'],\n imports: [\n BrandComponent,\n ButtonComponent,\n EnvironmentBadgeComponent,\n LanguageSelectorComponent,\n NotificationsComponent,\n ThemeSwitchComponent,\n TranslatePipe,\n UserProfileComponent,\n ],\n})\nexport class TopBarComponent {\n //#region ViewChilds, Inputs, Outputs\n /** Emitted when the logout button is clicked. */\n public readonly logout: OutputEmitterRef<void> = output<void>();\n //#endregion\n\n //#region Event handlers\n /** Emits `logout`. */\n public onLogoutClick(): void {\n this.logout.emit();\n }\n //#endregion\n}\n","<div class=\"top-bar\">\n <div class=\"top-bar-section top-bar-start\">\n <shared-brand></shared-brand>\n <shared-environment-badge></shared-environment-badge>\n </div>\n\n <div class=\"top-bar-section top-bar-end\">\n <div class=\"top-bar-actions\">\n <shared-notifications></shared-notifications>\n <shared-language-selector [showFlag]=\"true\"></shared-language-selector>\n <shared-theme-switch></shared-theme-switch>\n </div>\n\n <div class=\"top-bar-identity\">\n <shared-user-profile></shared-user-profile>\n\n <lib-button\n class=\"top-bar-logout\"\n intent=\"ghost\"\n icon=\"fa-solid fa-arrow-right-from-bracket\"\n [ariaLabel]=\"'Main-Logout' | translate\"\n (click)=\"onLogoutClick()\"\n ></lib-button>\n </div>\n </div>\n</div>\n","import { Component, inject, OnDestroy, OnInit, Signal, viewChild } from '@angular/core';\nimport { Router, RouterModule } from '@angular/router';\nimport { APP_CONFIG, ITab, Tab, TabsComponent, TabService } from '@zambon-dev/ui/framework';\nimport {\n ModalComponent,\n SidebarComponent,\n SidebarMenu,\n SidebarMenuOpenMode,\n SidebarService,\n toSidebarMenuOpenMode,\n} from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { Subject, take, takeUntil } from 'rxjs';\nimport { EXTERNAL_CONTENT_ROUTE_PATH } from '../../models';\nimport { AuthenticationService, ExternalContentService, ExternalUrlResolverService } from '../../services';\nimport { TopBarComponent } from '../top-bar';\nimport { ButtonComponent } from '@zambon-dev/ui/library';\n\n/**\n * Application shell after sign-in: top bar, sidebar menu and tabs. Menu items open as tabs,\n * embedded pages or new browser windows, and logging out asks for confirmation first.\n */\n@Component({\n selector: 'shared-main-layout',\n templateUrl: './main-layout.component.html',\n styleUrls: ['./main-layout.component.scss'],\n imports: [\n ButtonComponent,\n ModalComponent,\n RouterModule,\n SidebarComponent,\n TabsComponent,\n TopBarComponent,\n TranslatePipe,\n ],\n})\nexport class MainLayoutComponent implements OnInit, OnDestroy {\n //#region ViewChilds, Inputs, Outputs\n private readonly logoutModal: Signal<ModalComponent | undefined> = viewChild<ModalComponent>('logoutModal');\n //#endregion\n\n //#region Variables\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n private destroy$: Subject<boolean> = new Subject<boolean>();\n private externalContentService: ExternalContentService = inject(ExternalContentService);\n private externalUrlResolverService: ExternalUrlResolverService = inject(ExternalUrlResolverService);\n private router: Router = inject(Router);\n private sidebarService: SidebarService = inject(SidebarService);\n private tabService: TabService = inject(TabService);\n\n /** Application version (from AppConfig) projected into the sidebar footer. */\n protected appVersion: string = inject(APP_CONFIG).version;\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n\n public ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n public ngOnInit(): void {\n const url: string = this.router.url;\n\n if (url !== '/' && !this.tabService.isUrlOpen(url)) {\n this.sidebarService\n .getMenuFromUrl(url)\n .pipe(take(1))\n .subscribe({\n next: (item: SidebarMenu) => {\n if (item) {\n this.tabService.updateTabTitle(url, item.label);\n }\n },\n // A deep-linked title is best-effort. Menu endpoints answer 404 for a URL they do not\n // know -- the embedded-content route among them -- and that must not surface as an\n // unhandled rejection.\n error: () => undefined,\n });\n }\n\n this.sidebarService.menuExternalUrlSelected\n .pipe(takeUntil(this.destroy$))\n .subscribe((item: SidebarMenu) => this.openExternalMenu(item));\n\n this.sidebarService.menuUrlSelected.pipe(takeUntil(this.destroy$)).subscribe((item: SidebarMenu) => {\n const tab: ITab = new Tab({\n title: item.label,\n url: item.url,\n });\n this.tabService.openTab(tab);\n });\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /** Opens the logout confirmation modal. */\n public onLogoutClick(): void {\n this.logoutModal()?.toggleModal();\n }\n\n /** Signs out, clearing the stored session and closing every tab, then navigates to `/login`. */\n public onLogoutConfirm(): void {\n this.authenticationService.signOut();\n this.router.navigate(['/login']);\n }\n //#endregion\n\n //#region Private methods\n private openExternalMenu(item: SidebarMenu): void {\n const rawUrl: string = item.url ?? '';\n\n if (rawUrl.length === 0) {\n return;\n }\n\n if (toSidebarMenuOpenMode(item.openMode) === SidebarMenuOpenMode.ExternalEmbedded) {\n // The tab has to be a real Angular route, so the destination travels by menu id and is\n // resolved by ExternalContentComponent. A `?url=` query string would collapse every\n // embedded tab into one -- TabService and CustomReuseStrategy key tabs on path segments\n // only -- and would also let anyone frame an arbitrary site inside our own chrome.\n this.externalContentService.register(item);\n\n const tab: ITab = new Tab({\n title: item.label,\n url: `/${EXTERNAL_CONTENT_ROUTE_PATH}/${item.id}`,\n });\n this.tabService.openTab(tab);\n\n return;\n }\n\n const url: string = this.externalUrlResolverService.resolve(rawUrl);\n\n if (!this.externalUrlResolverService.isAllowed(url)) {\n console.error(`Sidebar menu \"${item.label}\" points to an unsupported external address and was not opened.`, url);\n return;\n }\n\n window.open(url, '_blank', 'noopener,noreferrer');\n }\n //#endregion\n}\n","<div class=\"main-container\">\n <div class=\"sidebar-region\">\n <lib-sidebar>\n @if (appVersion) {\n <span>v{{ appVersion }}</span>\n }\n </lib-sidebar>\n </div>\n\n <shared-top-bar class=\"toolbar\" (logout)=\"onLogoutClick()\"></shared-top-bar>\n\n <div class=\"content\">\n <framework-tabs>\n <router-outlet></router-outlet>\n </framework-tabs>\n </div>\n</div>\n\n<lib-modal #logoutModal position=\"top\" size=\"xl\" [closeButtonText]=\"'Main-Logout-Modal-Message-Cancel' | translate\">\n <div body>\n <h5>{{ 'Main-Logout-Modal-Message' | translate }}</h5>\n </div>\n <div footer>\n <lib-button intent=\"danger\" (click)=\"onLogoutConfirm()\">\n {{ 'Main-Logout-Modal-Message-Confirm' | translate }}\n </lib-button>\n </div>\n</lib-modal>\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { LoginLayoutComponent } from '../layouts';\nimport { LoginComponent } from './components';\n\nconst routes: Routes = [\n {\n path: '',\n component: LoginLayoutComponent,\n children: [\n { path: '', redirectTo: 'login', pathMatch: 'full' },\n { path: 'login', component: LoginComponent },\n ],\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n})\nexport class SharedAuthModule {}\n","import { inject, Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';\nimport { AuthenticationService } from '../../services';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGuard implements CanActivate {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n private router: Router = inject(Router);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n public canActivate(_: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n if (!this.authenticationService.isAuthenticated) {\n this.router.navigate(['/login'], { queryParams: { returnUrl: state.url } });\n return false;\n }\n return true;\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { JwtInterceptor } from '@auth0/angular-jwt';\nimport { APP_CONFIG, AppConfig } from '@zambon-dev/ui/framework';\nimport { catchError, Observable, shareReplay, switchMap, tap } from 'rxjs';\nimport { AuthenticationService } from '../../services';\n\n@Injectable()\nexport class AuthInterceptor implements HttpInterceptor {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n private authenticationService: AuthenticationService = inject(AuthenticationService);\n private config: AppConfig = inject(APP_CONFIG);\n private jwtInterceptor: JwtInterceptor = inject(JwtInterceptor);\n private refreshToken$?: Observable<string>;\n private router: Router = inject(Router);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n public intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {\n if (\n request.url.indexOf(this.config.BASE_URL) >= 0 &&\n !this.jwtInterceptor.isDisallowedRoute(request) &&\n this.authenticationService.isTokenExpired\n ) {\n if (!this.refreshToken$) {\n this.refreshToken$ = this.authenticationService.tryRefreshToken().pipe(\n shareReplay(),\n tap(() => {\n this.refreshToken$ = undefined;\n }),\n );\n }\n\n return this.refreshToken$!.pipe(\n switchMap((token: string) => {\n return next.handle(request.clone({ setHeaders: { authorization: `Bearer ${token}` } }));\n }),\n catchError((err: HttpErrorResponse) => {\n if (err.status === 401) {\n this.authenticationService.signOut();\n this.router.navigate(['/login']);\n }\n throw err;\n }),\n );\n }\n return next.handle(request);\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { Component, inject, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { ButtonFiltersComponent } from '@zambon-dev/ui/framework';\nimport { Subject } from 'rxjs';\n\n/**\n * Base class for a ribbon filter panel. Subclasses build the filter form in `formSetup()` and place\n * a `framework-button-filters` in their template, which applies the form to the grid.\n */\n// No strategy on purpose: Angular never inherits `changeDetection`, so one declared here would\n// describe a class that is never instantiated, while every subclass compiles to whatever it\n// declares -- which in v22 means OnPush. Correctness comes from the state below notifying\n// Angular, never from this decorator. See docs/guides/reactivity.md.\n@Component({ template: '' })\nexport abstract class FiltersBase implements OnInit, OnDestroy {\n //#region ViewChilds, Inputs, Outputs\n @ViewChild(ButtonFiltersComponent) protected buttonFilters?: ButtonFiltersComponent;\n //#endregion\n\n //#region Variables\n protected destroy$: Subject<boolean> = new Subject<boolean>();\n protected filterForm!: FormGroup;\n protected formBuilder: FormBuilder = inject(FormBuilder);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n\n public ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n public ngOnInit(): void {\n this.filterForm = this.formSetup();\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /** Fills the filter form with the given values and applies them through the filters button. */\n public setFilters(filters: { [key: string]: any }): void {\n this.filterForm.patchValue(filters);\n\n setTimeout(() => {\n if (this.buttonFilters) {\n this.buttonFilters.setFilters(filters);\n }\n });\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n\n //#region Abstract methods\n protected abstract formSetup(): FormGroup<any>;\n //#endregion\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DataGridDataset, IGridColumn, IListParameters } from '@zambon-dev/ui/library';\nimport { Observable, of } from 'rxjs';\nimport { IOperationsHistoryList } from '../models';\nimport { OperationsHistoryService } from '../services';\n\n@Injectable()\nexport class OperationsHistoryDataset extends DataGridDataset {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n public override columns: IGridColumn[] = [{ field: '', headerName: '' }];\n public controllerName?: string;\n\n protected operationsHistoryService: OperationsHistoryService = inject(OperationsHistoryService);\n\n private _serviceID?: number | undefined;\n //#endregion\n\n //#region Properties\n public set serviceId(value: number | undefined) {\n if (this._serviceID !== value) {\n this._serviceID = value;\n this.refresh();\n }\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n constructor() {\n super();\n\n this.configs.hideColumnHeaders = true;\n this.configs.showMessageOnEmpty = false;\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n public getData(params: IListParameters): Observable<IOperationsHistoryList[]> {\n this.configs.showMessageOnEmpty = !!this._serviceID;\n\n return !!this.parentEntityId && !!this.controllerName && !!this._serviceID\n ? this.operationsHistoryService.list(this.controllerName, this.parentEntityId, this._serviceID, params)\n : of<IOperationsHistoryList[]>([]);\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DataGridDataset, IGridColumn, IListParameters } from '@zambon-dev/ui/library';\nimport { Observable, of } from 'rxjs';\nimport { IServicesHistoryList } from '../models';\nimport { ServicesHistoryService } from '../services';\n\n@Injectable()\nexport class ServicesHistoryDataset extends DataGridDataset {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n public override columns: IGridColumn[] = [{ field: '', headerName: '' }];\n\n public controllerName?: string;\n\n protected servicesHistoryService: ServicesHistoryService = inject(ServicesHistoryService);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n constructor() {\n super();\n\n this.configs.hideColumnHeaders = true;\n this.configs.rowHeight = 52;\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n public getData(params: IListParameters): Observable<IServicesHistoryList[]> {\n return !!this.parentEntityId && !!this.controllerName\n ? this.servicesHistoryService.list(this.controllerName, this.parentEntityId, this.withUtcPeriod(params))\n : of<IServicesHistoryList[]>([]);\n }\n //#endregion\n\n //#region Private methods\n /**\n * Widens the picked dates to whole local days and sends them as UTC instants.\n *\n * A date input yields `YYYY-MM-DD` -- no time, no zone -- while the history stores UTC instants\n * and the backend compares what it is given. Sent as they are, \"from the 5th to the 5th\" is the\n * single instant at midnight and matches nothing, and in a zone behind UTC it does not even\n * cover the right day.\n *\n * Done here rather than in the filter form because the form is what the modal shows: reopening\n * it patches these values straight back into the fields, which have to keep reading as the dates\n * the person picked. This is the boundary where the request is built, so it is also the last\n * point that sees every caller.\n */\n private withUtcPeriod(params: IListParameters): IListParameters {\n const filters: { [key: string]: string } | undefined = params.filters;\n\n if (!filters?.['changedOnFrom'] && !filters?.['changedOnTo']) {\n return params;\n }\n\n const converted: { [key: string]: string } = { ...filters };\n\n if (filters['changedOnFrom']) {\n converted['changedOnFrom'] = ServicesHistoryDataset.toUtcInstant(filters['changedOnFrom'], 'start');\n }\n\n if (filters['changedOnTo']) {\n converted['changedOnTo'] = ServicesHistoryDataset.toUtcInstant(filters['changedOnTo'], 'end');\n }\n\n return { ...params, filters: converted };\n }\n\n /**\n * The UTC wall clock of one end of a local day, written without a zone designator.\n *\n * Without one on purpose. `DateTime.TryParse` on the server reads a trailing `Z` as an instant\n * and hands back the *machine's* local time for it, so the same request would mean different\n * things on a server in UTC and one in UTC-3, and the stored column is plain UTC either way.\n * Dropping the designator leaves the numbers alone, which is what the column holds.\n */\n private static toUtcInstant(value: string, edge: 'start' | 'end'): string {\n const [year, month, day]: number[] = value.split('-').map(Number);\n\n // Left alone when it is not the date input's own format: a value set from somewhere else is\n // already whatever its caller meant.\n if ([year, month, day].some((part: number) => Number.isNaN(part))) {\n return value;\n }\n\n const instant: Date =\n edge === 'start' ? new Date(year, month - 1, day, 0, 0, 0, 0) : new Date(year, month - 1, day, 23, 59, 59, 999);\n\n return instant.toISOString().replace(/Z$/, '');\n }\n //#endregion\n}\n","import { Component, DOCUMENT, inject, OnDestroy, OnInit, signal, WritableSignal } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\nimport { ActivatedRoute } from '@angular/router';\nimport { ButtonComponent, TabService, TabViewBase } from '@zambon-dev/ui/framework';\nimport { RibbonGroupComponent } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { take, takeUntil } from 'rxjs';\nimport { EXTERNAL_CONTENT_CONFIGS, ExternalContentConfigs, IExternalContentEntry } from '../../models';\nimport { ExternalContentService, ExternalUrlResolverService } from '../../services';\n\n/**\n * Displays an external destination inside an application tab.\n *\n * Routed as `/external-content/:menuID` — the destination itself never travels in the URL, so no\n * one can hand-craft a link that makes the application frame an arbitrary site.\n *\n * A `TabViewBase` like any other screen, so its actions live in the ribbon rather than in a\n * bar of its own: it must be routed under `DefaultTabViewComponent`, which is what renders the\n * `#ribbon` template this view publishes. Use the exported `externalContentRoutes`.\n */\n@Component({\n selector: 'shared-external-content',\n templateUrl: './external-content.component.html',\n styleUrls: ['./external-content.component.scss'],\n imports: [ButtonComponent, RibbonGroupComponent, TranslatePipe],\n})\nexport class ExternalContentComponent extends TabViewBase implements OnInit, OnDestroy {\n //#region ViewChilds, Inputs, Outputs\n //#endregion\n\n //#region Variables\n // Signals, every one: this whole screen is decided after the first paint, by a lookup that\n // resolves, a frame that loads or fails to, and a timeout that gives up waiting. None of\n // those is a binding on this view, so as fields they changed nothing on screen.\n protected readonly frameUrl: WritableSignal<SafeResourceUrl | undefined> = signal(undefined);\n protected readonly isBlocked: WritableSignal<boolean> = signal(false);\n protected readonly isFrameLoading: WritableSignal<boolean> = signal(false);\n protected readonly isInsecure: WritableSignal<boolean> = signal(false);\n protected readonly isSlow: WritableSignal<boolean> = signal(false);\n protected readonly isUnavailable: WritableSignal<boolean> = signal(false);\n protected readonly label: WritableSignal<string> = signal('');\n protected readonly resolvedUrl: WritableSignal<string> = signal('');\n\n private activatedRoute: ActivatedRoute = inject(ActivatedRoute);\n private configs: ExternalContentConfigs = inject(EXTERNAL_CONTENT_CONFIGS);\n private document: Document = inject(DOCUMENT);\n private externalContentService: ExternalContentService = inject(ExternalContentService);\n private externalUrlResolverService: ExternalUrlResolverService = inject(ExternalUrlResolverService);\n private sanitizer: DomSanitizer = inject(DomSanitizer);\n private slowHintTimeout?: ReturnType<typeof setTimeout>;\n private tabService: TabService = inject(TabService);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n constructor() {\n super();\n }\n\n public override ngOnDestroy(): void {\n this.clearSlowHint();\n\n super.ngOnDestroy();\n }\n\n public ngOnInit(): void {\n const menuID = Number(this.activatedRoute.snapshot.paramMap.get('menuID'));\n\n if (!menuID) {\n this.isUnavailable.set(true);\n this.loading = false;\n\n return;\n }\n\n this.externalContentService\n .find(menuID)\n .pipe(take(1), takeUntil(this.destroy$))\n .subscribe((entry: IExternalContentEntry | undefined) => this.show(entry));\n }\n //#endregion\n\n //#region Event handlers\n protected onFrameLoad(): void {\n this.clearSlowHint();\n\n this.isFrameLoading.set(false);\n this.isSlow.set(false);\n }\n\n protected onOpenInNewTab(): void {\n window.open(this.resolvedUrl(), '_blank', 'noopener,noreferrer');\n }\n\n protected onReload(): void {\n const url: SafeResourceUrl | undefined = this.frameUrl();\n\n if (!url || this.isFrameLoading()) {\n return;\n }\n\n // The frame is cross-origin, so its location cannot be touched from here: destroying the\n // element and building a new one is the only way to make it navigate again. That also clears\n // the previous render, which is the point -- otherwise a reload leaves the old content on\n // screen and the user cannot tell whether anything happened.\n //\n // The rebuild has to wait for a macrotask, not a microtask. Angular coalesces changes within a\n // change-detection cycle, so setting frameUrl back before the next tick means @if sees the\n // value go A -> undefined -> A and never toggles: the element is never destroyed, nothing\n // navigates, no `load` ever fires, and the view spins until the timeout gives up. Yielding to\n // a timeout lets a cycle run with the frame unmounted, which is what really tears it down.\n this.frameUrl.set(undefined);\n this.isFrameLoading.set(true);\n\n setTimeout(() => this.displayFrame(url));\n }\n //#endregion\n\n //#region Public methods\n //#endregion\n\n //#region Private methods\n private clearSlowHint(): void {\n if (this.slowHintTimeout !== undefined) {\n clearTimeout(this.slowHintTimeout);\n this.slowHintTimeout = undefined;\n }\n }\n\n private isMixedContent(url: string): boolean {\n // A browser refuses to embed an http:// frame in an https:// page, unconditionally: an iframe\n // is active mixed content. Nothing on this side can permit it -- no attribute, no header, and\n // not CSP, which only ever restricts further. Left alone the frame renders empty, so this is\n // checked up front to say so instead.\n //\n // Unlike a site refusing to be framed, this one IS knowable before trying: both protocols are\n // in hand. `new URL` cannot throw here -- isAllowed has already parsed the same string -- and\n // it normalises the scheme's case, which a prefix test would not.\n return this.document.location.protocol === 'https:' && new URL(url).protocol === 'http:';\n }\n\n private isOriginAllowed(url: string): boolean {\n if (this.configs.allowedOrigins.length === 0) {\n return true;\n }\n\n try {\n return this.configs.allowedOrigins.indexOf(new URL(url).origin) !== -1;\n } catch {\n return false;\n }\n }\n\n private show(entry: IExternalContentEntry | undefined): void {\n // TabViewBase starts every screen loading so its ribbon buttons begin disabled; every exit\n // from here has to clear it or they never become usable.\n this.loading = false;\n\n if (!entry || !entry.url) {\n this.isUnavailable.set(true);\n\n return;\n }\n\n this.label.set(entry.label);\n\n // MainLayoutComponent only resolves a deep-linked title through getMenuFromUrl, and a Tab\n // starts with isTitleLoading true, so a tab re-created by TabsComponent after a refresh would\n // spin forever if nothing set its title. Setting it here is idempotent.\n this.tabService.updateActiveTabRootTitle(entry.label);\n\n // Order matters: resolve, then validate, then trust. What we vet has to be exactly what the\n // browser receives, and a placeholder is substituted before the scheme can be inspected.\n const url: string = this.externalUrlResolverService.resolve(entry.url);\n\n if (!this.externalUrlResolverService.isAllowed(url) || !this.isOriginAllowed(url)) {\n console.error(\n `Embedded menu item \"${entry.label}\" points to an address that is not allowed and was not displayed.`,\n url,\n );\n this.isBlocked.set(true);\n\n return;\n }\n\n // Set before the mixed-content check, not after: that state still offers 'open in a new\n // browser tab', and the button reads this to decide whether it has anywhere to go.\n this.resolvedUrl.set(url);\n\n if (this.isMixedContent(url)) {\n this.isInsecure.set(true);\n\n return;\n }\n\n // Trusted once, into a field. From a getter or a pipe this would hand back a new\n // SafeResourceUrl on every change-detection pass, and Angular would re-set the iframe's src\n // and reload the destination each time.\n this.displayFrame(this.sanitizer.bypassSecurityTrustResourceUrl(url));\n }\n\n private displayFrame(url: SafeResourceUrl): void {\n this.isFrameLoading.set(true);\n this.frameUrl.set(url);\n\n this.startSlowHint();\n }\n\n private startSlowHint(): void {\n this.clearSlowHint();\n\n // Not detection, and it must never be turned into one: whether a site refuses to be framed\n // (X-Frame-Options, CSP frame-ancestors) is not observable from JavaScript. A refused frame\n // usually fires `load` immediately and renders the browser's own error page, in which case\n // this hint never appears -- the ribbon's \"open in a new browser tab\" button is the actual\n // way out, and it is always present.\n this.slowHintTimeout = setTimeout(() => {\n // Stop claiming it is loading. A destination that never reports `load` -- a refused frame\n // among them -- would otherwise spin forever and keep the actions disabled; hand the\n // controls back and let the hint do the explaining.\n this.isFrameLoading.set(false);\n this.isSlow.set(true);\n }, this.configs.slowFrameHintDelay);\n }\n //#endregion\n}\n","<!-- Published to DefaultTabViewComponent through TabViewService, so the actions sit in the\n application's ribbon like every other screen's. -->\n<ng-template #ribbon>\n <lib-ribbon-group [label]=\"'RibbonGroup-Page' | translate\">\n <!-- Same icon and label as framework-button-refresh, so reloading a report reads as the\n same action as refreshing a grid. `loading` is what spins it while the frame loads. -->\n <framework-button\n icon=\"fa-sync-alt\"\n label=\"Button-Refresh\"\n [disabled]=\"!resolvedUrl() || isInsecure()\"\n [loading]=\"isFrameLoading()\"\n (action)=\"onReload()\"\n >\n </framework-button>\n\n <framework-button\n icon=\"fa-arrow-up-right-from-square\"\n label=\"ExternalContent-OpenInNewTab\"\n [disabled]=\"!resolvedUrl()\"\n (action)=\"onOpenInNewTab()\"\n >\n </framework-button>\n </lib-ribbon-group>\n</ng-template>\n\n@if (isUnavailable()) {\n <div class=\"external-content-message\">\n <i class=\"fa-solid fa-link-slash\"></i>\n <span class=\"external-content-message-title\">{{ 'ExternalContent-Unavailable-Title' | translate }}</span>\n <span>{{ 'ExternalContent-Unavailable-Message' | translate }}</span>\n </div>\n} @else if (isInsecure()) {\n <div class=\"external-content-message\">\n <i class=\"fa-solid fa-shield-halved\"></i>\n <span class=\"external-content-message-title\">{{ 'ExternalContent-Insecure-Title' | translate }}</span>\n <span>{{ 'ExternalContent-Insecure-Message' | translate }}</span>\n </div>\n} @else if (isBlocked()) {\n <div class=\"external-content-message\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n <span class=\"external-content-message-title\">{{ 'ExternalContent-Blocked-Title' | translate }}</span>\n <span>{{ 'ExternalContent-Blocked-Message' | translate }}</span>\n </div>\n} @else {\n @if (isSlow()) {\n <div class=\"external-content-hint\">{{ 'ExternalContent-SlowHint' | translate }}</div>\n }\n @if (frameUrl() || isFrameLoading()) {\n <!--\n The container stays mounted across a reload, which briefly clears frameUrl, so the panel\n does not flicker out and back. What goes away is the frame itself, on purpose.\n\n sandbox and referrerpolicy are STATIC attributes on purpose. Angular rejects `sandbox`\n as a binding on an <iframe> outright (NG0910) — it may only be a static attribute — and\n the whole element then fails to render.\n\n The token list is fixed for every destination, and deliberately not configurable per\n menu item:\n - allow-same-origin keeps the frame in the destination's own origin so its cookies and\n storage work; without it an SSO'd report will not render. It grants no access to ours,\n provided the destination is cross-origin -- never point an embedded item at this\n application's own origin, use an internal route for that.\n - allow-top-navigation is absent on purpose: a framed site must not be able to navigate\n the whole application away.\n - allow-popups-to-escape-sandbox keeps print and download popups usable.\n -->\n <div class=\"external-content-frame-container\">\n @if (isFrameLoading()) {\n <div class=\"external-content-loading\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n\n <span>{{ 'Loading' | translate }}</span>\n </div>\n }\n @if (frameUrl()) {\n <iframe\n class=\"external-content-frame\"\n sandbox=\"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads\"\n referrerpolicy=\"strict-origin-when-cross-origin\"\n [src]=\"frameUrl()\"\n [attr.title]=\"label() | translate\"\n (load)=\"onFrameLoad()\"\n >\n </iframe>\n }\n </div>\n }\n}\n","import { Routes } from '@angular/router';\nimport { DefaultTabViewComponent, FRAMEWORK_VIEW_TYPE, FrameworkViewType } from '@zambon-dev/ui/framework';\nimport { EXTERNAL_CONTENT_ROUTE_PATH } from '../../models';\nimport { ExternalContentComponent } from './external-content.component';\n\n/**\n * Route table for embedded external content. Spread it into `MainLayoutComponent`'s children:\n *\n * ```ts\n * { path: '', component: MainLayoutComponent, canActivate: [AuthGuard], children: [\n * ...externalContentRoutes,\n * // the application's own features\n * ] }\n * ```\n *\n * Three things about the shape are load-bearing and must not be \"simplified\" away:\n *\n * - The path is nested one segment per route. `RouteHelper.getRouteURL` and\n * `CustomReuseStrategy.getUrlFromRoute` collect segments walking up the parent chain and then\n * reverse the flat list, so a route declared `'external-content/:menuID'` rebuilds as\n * `/:menuID/external-content` and every tab URL is wrong.\n * - `DefaultTabViewComponent` hosts the view. It is what renders the `#ribbon` template the\n * component publishes, so dropping it leaves the Reload and Open-in-a-new-browser-tab actions\n * with nowhere to appear.\n * - `FRAMEWORK_VIEW_TYPE` must be present. `TabsComponent` re-creates the tab after a page refresh\n * by looking for a `Details` or `List` view in the activated route tree, and navigates to `/`\n * when it finds neither — the embedded tab would vanish on F5.\n */\nexport const externalContentRoutes: Routes = [\n {\n path: EXTERNAL_CONTENT_ROUTE_PATH,\n children: [\n {\n path: ':menuID',\n component: DefaultTabViewComponent,\n data: { [FRAMEWORK_VIEW_TYPE]: FrameworkViewType.List },\n children: [{ path: '', component: ExternalContentComponent }],\n },\n ],\n },\n];\n","import { formatDate, formatNumber } from '@angular/common';\nimport { IOperationsHistoryField, IOperationsHistoryList, OperationsHistoryFieldType } from '../../models';\n\n/** A value ready to show: either text as it is, or a translation key. */\nexport interface IOperationsHistoryValue {\n isKey: boolean;\n text: string;\n}\n\nconst EMPTY_VALUE: IOperationsHistoryValue = { isKey: true, text: 'OperationsHistory-Value-Empty' };\nconst ISO_DATE = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}/;\n\n/**\n * Every field an operation shows.\n *\n * ZWebAPI 1.17 and later send the whole record, rebuilt from its history. An older backend sends\n * only what the operation wrote, as two JSON objects; those are read as the changed fields, with\n * their kind of value guessed from the value itself.\n *\n * @param operation The operation, or nothing.\n * @returns The fields, in the order the backend declares them.\n */\nexport function getOperationFields(operation: IOperationsHistoryList | null | undefined): IOperationsHistoryField[] {\n if (!operation) {\n return [];\n }\n\n if (operation.fields && operation.fields.length > 0) {\n return operation.fields;\n }\n\n const oldValues: Record<string, unknown> = parseValues(operation.oldValues);\n const newValues: Record<string, unknown> = parseValues(operation.newValues);\n const names: string[] = [...new Set([...Object.keys(oldValues), ...Object.keys(newValues)])];\n\n return names.map((name: string): IOperationsHistoryField => ({\n isChanged: true,\n isSystem: false,\n name,\n newValue: name in newValues ? newValues[name] : null,\n oldValue: name in oldValues ? oldValues[name] : null,\n type: guessType(name in newValues ? newValues[name] : oldValues[name]),\n }));\n}\n\n/**\n * How many data fields an operation changed, leaving bookkeeping out.\n *\n * @param operation The operation.\n * @returns The count.\n */\nexport function countChangedFields(operation: IOperationsHistoryList | null | undefined): number {\n return getOperationFields(operation).filter((field: IOperationsHistoryField) => field.isChanged && !field.isSystem)\n .length;\n}\n\n/**\n * Formats a field's value for the user.\n *\n * Dates follow the locale, with the time left out when it is midnight; numbers are grouped;\n * booleans and empty values become translation keys.\n *\n * @param value The value as the backend sent it.\n * @param type What kind of value the field holds.\n * @param locale The locale to format in.\n * @returns The text to show, or the key to translate.\n */\nexport function formatFieldValue(\n value: unknown,\n type: OperationsHistoryFieldType,\n locale: string,\n): IOperationsHistoryValue {\n if (value === null || value === undefined || value === '') {\n return EMPTY_VALUE;\n }\n\n if (typeof value === 'boolean') {\n return { isKey: true, text: value ? 'OperationsHistory-Value-Yes' : 'OperationsHistory-Value-No' };\n }\n\n if (type === 'date' && (typeof value === 'string' || typeof value === 'number')) {\n const date: Date = new Date(value);\n if (!isNaN(date.getTime())) {\n const isMidnight: boolean = date.getHours() === 0 && date.getMinutes() === 0 && date.getSeconds() === 0;\n return { isKey: false, text: formatDate(date, isMidnight ? 'shortDate' : 'short', locale) };\n }\n }\n\n if (type === 'number' && typeof value === 'number') {\n return { isKey: false, text: formatNumber(value, locale, '1.0-6') };\n }\n\n if (typeof value === 'object') {\n return { isKey: false, text: JSON.stringify(value) };\n }\n\n return { isKey: false, text: String(value) };\n}\n\nfunction guessType(value: unknown): OperationsHistoryFieldType {\n switch (typeof value) {\n case 'boolean':\n return 'boolean';\n case 'number':\n return 'number';\n case 'string':\n return ISO_DATE.test(value) ? 'date' : 'text';\n default:\n return 'other';\n }\n}\n\nfunction parseValues(json: string | undefined): Record<string, unknown> {\n if (!json?.trim()) {\n return {};\n }\n\n try {\n const parsed: unknown = JSON.parse(json);\n return parsed !== null && typeof parsed === 'object' && !Array.isArray(parsed)\n ? <Record<string, unknown>>parsed\n : {};\n } catch {\n return {};\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n computed,\n inject,\n input,\n InputSignal,\n LOCALE_ID,\n signal,\n Signal,\n viewChild,\n WritableSignal,\n} from '@angular/core';\nimport { ModalBase } from '@zambon-dev/ui/framework';\nimport { ModalComponent } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport {\n IOperationsHistoryField,\n IOperationsHistoryList,\n OPERATIONS_HISTORY_FIELD_LABEL,\n OperationsHistoryFieldLabel,\n} from '../../../models';\nimport { formatFieldValue, getOperationFields, IOperationsHistoryValue } from '../operations-history-fields';\n\n/** One line of the change details. */\ninterface IOperationsHistoryRow {\n isChanged: boolean;\n isSystem: boolean;\n label: string;\n name: string;\n newValue: IOperationsHistoryValue;\n oldValue: IOperationsHistoryValue;\n}\n\n/**\n * Modal listing what one operation changed, field by field, with the value before and after.\n * It can also list the unchanged and system fields when the backend sends the full record.\n */\n@Component({\n selector: 'shared-operations-history-modal',\n templateUrl: './operations-history-modal.component.html',\n styleUrls: ['./operations-history-modal.component.scss'],\n imports: [ModalComponent, NgTemplateOutlet, TranslatePipe],\n})\nexport class OperationsHistoryModalComponent extends ModalBase {\n //#region ViewChilds, Inputs, Outputs\n private readonly modal: Signal<ModalComponent | undefined> = viewChild(ModalComponent);\n\n /**\n * Values after the change, as an object of field names to values.\n *\n * @deprecated Bind `operation` instead, which also carries the whole record. Read only when\n * `operation` is not bound.\n */\n public readonly newValues: InputSignal<object | null | undefined> = input<object | null>();\n\n /**\n * Values before the change, as an object of field names to values.\n *\n * @deprecated Bind `operation` instead, which also carries the whole record. Read only when\n * `operation` is not bound.\n */\n public readonly oldValues: InputSignal<object | null | undefined> = input<object | null>();\n\n /** The operation whose changes the modal shows. */\n public readonly operation: InputSignal<IOperationsHistoryList | null | undefined> =\n input<IOperationsHistoryList | null>();\n //#endregion\n\n //#region Variables\n /** Whether the unchanged fields are listed too, rather than only what the operation changed. */\n protected readonly showAllFields: WritableSignal<boolean> = signal(false);\n\n /** Whether the bookkeeping fields are listed, when every field is. */\n protected readonly showSystemFields: WritableSignal<boolean> = signal(false);\n\n private readonly fieldLabel: OperationsHistoryFieldLabel = inject(OPERATIONS_HISTORY_FIELD_LABEL);\n private readonly locale: string = inject(LOCALE_ID);\n //#endregion\n\n //#region Properties\n /** Whether the modal is open. */\n public readonly isModalShown: Signal<boolean> = computed(() => this.modal()?.isOpen() ?? false);\n\n /** The operation shown, built from the deprecated inputs when `operation` is not bound. */\n protected readonly currentOperation: Signal<IOperationsHistoryList | null> = computed(() => {\n const operation: IOperationsHistoryList | null | undefined = this.operation();\n if (operation) {\n return operation;\n }\n\n const oldValues: object | null | undefined = this.oldValues();\n const newValues: object | null | undefined = this.newValues();\n if (!oldValues && !newValues) {\n return null;\n }\n\n return { id: 0, newValues: JSON.stringify(newValues ?? {}), oldValues: JSON.stringify(oldValues ?? {}) };\n });\n\n /** Only a backend that rebuilds the record sends the unchanged fields, so only then can they be listed. */\n protected readonly hasFullRecord: Signal<boolean> = computed(\n () => (this.currentOperation()?.fields?.length ?? 0) > 0,\n );\n\n protected readonly isAdded: Signal<boolean> = computed(() => this.currentOperation()?.operationType === 'Added');\n\n protected readonly isDeleted: Signal<boolean> = computed(() => this.currentOperation()?.operationType === 'Deleted');\n\n protected readonly operationLabel: Signal<string> = computed(() => {\n const operationType: string | undefined = this.currentOperation()?.operationType;\n return operationType ? `OperationsHistory-Operation-${operationType}` : '';\n });\n\n /** Data fields: the changed ones, or every one when asked. */\n protected readonly dataRows: Signal<IOperationsHistoryRow[]> = computed(() =>\n this.rows().filter((row: IOperationsHistoryRow) => !row.isSystem && (row.isChanged || this.showAllFields())),\n );\n\n /** Bookkeeping fields, listed apart and only when every field is. */\n protected readonly systemRows: Signal<IOperationsHistoryRow[]> = computed(() =>\n this.showAllFields() ? this.rows().filter((row: IOperationsHistoryRow) => row.isSystem) : [],\n );\n\n private readonly rows: Signal<IOperationsHistoryRow[]> = computed(() => {\n const operation: IOperationsHistoryList | null = this.currentOperation();\n\n return getOperationFields(operation).map((field: IOperationsHistoryField): IOperationsHistoryRow => ({\n isChanged: field.isChanged,\n isSystem: field.isSystem,\n label: this.fieldLabel(field.name, operation?.entityName),\n name: field.name,\n newValue: formatFieldValue(field.newValue, field.type, this.locale),\n oldValue: formatFieldValue(field.oldValue, field.type, this.locale),\n }));\n });\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n //#endregion\n\n //#region Event handlers\n protected onShowAllFieldsChanged(event: Event): void {\n this.showAllFields.set((<HTMLInputElement>event.target).checked);\n }\n\n protected onSystemFieldsToggled(): void {\n this.showSystemFields.update((isShown: boolean) => !isShown);\n }\n //#endregion\n\n //#region Public methods\n /** Opens the modal when it is closed, and closes it when it is open. */\n public toggle(): void {\n this.modal()?.toggleModal();\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","<lib-modal size=\"6xl\" [title]=\"'OperationsHistory-Modal-Title' | translate\">\n <div body class=\"changes\">\n @if (currentOperation(); as operation) {\n <div class=\"summary\">\n @if (operationLabel()) {\n <span\n class=\"operation\"\n [class.added]=\"isAdded()\"\n [class.deleted]=\"isDeleted()\"\n [class.modified]=\"operation.operationType === 'Modified'\"\n >\n {{ operationLabel() | translate }}\n </span>\n }\n\n <span class=\"entity\">\n {{ operation.entityName }}\n @if (operation.entityID) {\n <span class=\"record\">#{{ operation.entityID }}</span>\n }\n </span>\n\n <label class=\"show-all\" [class.disabled]=\"!hasFullRecord()\">\n <input\n type=\"checkbox\"\n [checked]=\"showAllFields()\"\n [disabled]=\"!hasFullRecord()\"\n (change)=\"onShowAllFieldsChanged($event)\"\n />\n {{ 'OperationsHistory-Modal-ShowAllFields' | translate }}\n </label>\n </div>\n\n @if (dataRows().length === 0 && systemRows().length === 0) {\n <p class=\"empty\">{{ 'OperationsHistory-Modal-NoChanges' | translate }}</p>\n } @else {\n <div class=\"table-scroller\">\n <table class=\"fields\">\n <thead>\n <tr>\n <th scope=\"col\">{{ 'OperationsHistory-Modal-Field' | translate }}</th>\n @if (!isAdded()) {\n <th scope=\"col\">{{ 'OperationsHistory-Modal-Before' | translate }}</th>\n }\n @if (!isDeleted()) {\n <th scope=\"col\">{{ 'OperationsHistory-Modal-After' | translate }}</th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of dataRows(); track row.name) {\n <ng-container *ngTemplateOutlet=\"fieldRow; context: { $implicit: row }\"></ng-container>\n }\n </tbody>\n\n @if (systemRows().length > 0) {\n <tbody class=\"system\">\n <tr>\n <th scope=\"rowgroup\" [attr.colspan]=\"isAdded() || isDeleted() ? 2 : 3\">\n <button\n type=\"button\"\n class=\"system-toggle\"\n [attr.aria-expanded]=\"showSystemFields()\"\n (click)=\"onSystemFieldsToggled()\"\n >\n <i\n class=\"fa-solid\"\n aria-hidden=\"true\"\n [class.fa-chevron-down]=\"showSystemFields()\"\n [class.fa-chevron-right]=\"!showSystemFields()\"\n ></i>\n {{ 'OperationsHistory-Modal-SystemFields' | translate }} ({{ systemRows().length }})\n </button>\n </th>\n </tr>\n\n @if (showSystemFields()) {\n @for (row of systemRows(); track row.name) {\n <ng-container *ngTemplateOutlet=\"fieldRow; context: { $implicit: row }\"></ng-container>\n }\n }\n </tbody>\n }\n </table>\n </div>\n }\n }\n </div>\n</lib-modal>\n\n<ng-template #fieldRow let-row>\n <tr [class.changed]=\"row.isChanged && !isAdded() && !isDeleted()\">\n <th scope=\"row\">\n {{ row.label | translate }}\n @if (row.isChanged && !isAdded() && !isDeleted()) {\n <span class=\"visually-hidden\">({{ 'OperationsHistory-Modal-Changed' | translate }})</span>\n }\n </th>\n\n @if (!isAdded()) {\n <td class=\"before\">\n @if (row.isChanged && !isDeleted()) {\n <del>\n <span class=\"marker\" aria-hidden=\"true\">−</span>\n {{ row.oldValue.isKey ? (row.oldValue.text | translate) : row.oldValue.text }}\n </del>\n } @else {\n {{ row.oldValue.isKey ? (row.oldValue.text | translate) : row.oldValue.text }}\n }\n </td>\n }\n\n @if (!isDeleted()) {\n <td class=\"after\">\n @if (row.isChanged && !isAdded()) {\n <ins>\n <span class=\"marker\" aria-hidden=\"true\">+</span>\n {{ row.newValue.isKey ? (row.newValue.text | translate) : row.newValue.text }}\n </ins>\n } @else {\n {{ row.newValue.isKey ? (row.newValue.text | translate) : row.newValue.text }}\n }\n </td>\n }\n </tr>\n</ng-template>\n","import { AfterViewInit, Component, Input, signal, Signal, TemplateRef, viewChild, WritableSignal } from '@angular/core';\nimport { ChildList } from '@zambon-dev/ui/framework';\nimport { DataGridComponent, DataGridDataset } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { OperationsHistoryDataset } from '../../../datasets';\nimport { IOperationsHistoryList } from '../../../models';\nimport { countChangedFields } from '../operations-history-fields';\nimport { OperationsHistoryModalComponent } from '../operations-history-modal/operations-history-modal.component';\n\n/**\n * Grid of the operations (added, modified or deleted entities) inside one change set. Clicking an\n * operation opens a modal with its field-by-field changes.\n */\n@Component({\n selector: 'shared-operations-history-child-list',\n templateUrl: './operations-history-child-list.component.html',\n styleUrls: ['./operations-history-child-list.component.scss'],\n imports: [DataGridComponent, OperationsHistoryModalComponent, TranslatePipe],\n providers: [{ provide: DataGridDataset, useClass: OperationsHistoryDataset }],\n})\nexport class OperationsHistoryChildListComponent extends ChildList<any> implements AfterViewInit {\n //#region ViewChilds, Inputs, Outputs\n private readonly modal: Signal<OperationsHistoryModalComponent | undefined> = viewChild(\n OperationsHistoryModalComponent,\n );\n private readonly operationTemplate: Signal<TemplateRef<any> | undefined> =\n viewChild<TemplateRef<any>>('operationTemplate');\n\n /** API controller of the audited entity, e.g. `Employees`. The grid loads nothing until it is set. */\n @Input() public set controllerName(value: string) {\n (<OperationsHistoryDataset>this.dataGridDataset).controllerName = value;\n }\n\n /**\n * Filters to send with the list.\n *\n * The audit view applies its filters to the services grid and hands the same set here, because\n * one of them -- whether to list only the audited record's own operations -- belongs to this\n * list. The rest mean nothing to it, and the backend reads only what it recognises.\n *\n * `setFilters` refreshes the grid itself. With no service selected the dataset answers with an\n * empty list rather than calling the backend, so a refresh then costs nothing.\n */\n @Input() public set filters(value: { [key: string]: string } | undefined) {\n this.dataGridDataset.setFilters(value);\n }\n\n /** ID of the change set whose operations are listed. With none, the grid stays empty. */\n @Input() public set serviceID(value: number | undefined) {\n (<OperationsHistoryDataset>this.dataGridDataset).serviceId = value;\n }\n //#endregion\n\n //#region Variables\n // Signals: they are bound into the modal and are filled when a row is picked, which the grid\n // reports through a callback rather than a binding on this view.\n /**\n * New values of the selected operation, parsed from JSON, or `null` when none is selected.\n *\n * @deprecated Read `selectedOperation` instead, which also carries the whole record.\n */\n public readonly selectedNewValues: WritableSignal<any | null> = signal(null);\n /**\n * Old values of the selected operation, parsed from JSON, or `null` when none is selected.\n *\n * @deprecated Read `selectedOperation` instead, which also carries the whole record.\n */\n public readonly selectedOldValues: WritableSignal<any | null> = signal(null);\n /** The operation selected in the grid, or `null` when none is selected. */\n public readonly selectedOperation: WritableSignal<IOperationsHistoryList | null> = signal(null);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n public ngAfterViewInit(): void {\n this.dataGridDataset.columns[0].template = this.operationTemplate();\n }\n //#endregion\n\n //#region Event handlers\n /** How many data fields an operation changed, for the summary beside it. */\n protected changedFieldsOf(operation: IOperationsHistoryList): number {\n return countChangedFields(operation);\n }\n\n /** Opens the change details modal for the selected operation, unless it is already open. */\n public openModal(): void {\n const modal: OperationsHistoryModalComponent | undefined = this.modal();\n if (modal && !modal.isModalShown()) {\n modal.toggle();\n }\n }\n //#endregion\n\n //#region Public methods\n /** Updates `selectedOperation` from the grid's selection. */\n public override selectedRowChanged(): void {\n super.selectedRowChanged();\n\n if (this.dataGridDataset.hasSelectedRows) {\n const key: string = this.dataGridDataset.selectedRowKeys[0];\n\n const data: IOperationsHistoryList = this.dataGridDataset.getRowData(key);\n this.selectedOperation.set(data);\n this.selectedOldValues.set(parseJson(data.oldValues));\n this.selectedNewValues.set(parseJson(data.newValues));\n }\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n\n/** Parses stored values, reading a missing or malformed one as nothing rather than throwing. */\nfunction parseJson(json: string | undefined): unknown {\n if (!json?.trim()) {\n return null;\n }\n\n try {\n return JSON.parse(json);\n } catch {\n return null;\n }\n}\n","<lib-data-grid [lazyLoadRows]=\"true\"> </lib-data-grid>\n\n<ng-template #operationTemplate let-rowData=\"rowData\">\n <div\n class=\"operation-content\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"openModal()\"\n (keydown.enter)=\"openModal()\"\n (keydown.space)=\"openModal(); $event.preventDefault()\"\n >\n <span\n class=\"operation\"\n [class.added]=\"rowData.operationType === 'Added'\"\n [class.deleted]=\"rowData.operationType === 'Deleted'\"\n [class.modified]=\"rowData.operationType === 'Modified'\"\n [class.unchanged]=\"rowData.operationType === 'Unchanged'\"\n >\n {{ 'OperationsHistory-Operation-' + rowData.operationType | translate }}\n </span>\n {{ rowData.entityName }}\n @if (rowData.operationType === 'Modified') {\n <span class=\"changed-count\">\n {{ 'OperationsHistory-List-ChangedFields' | translate: { count: changedFieldsOf(rowData) } }}\n </span>\n }\n </div>\n</ng-template>\n\n<shared-operations-history-modal [operation]=\"selectedOperation()\"> </shared-operations-history-modal>\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n/**\n * Pipe that bypasses Angular's built-in HTML sanitization.\n *\n * **WARNING: This pipe introduces XSS (Cross-Site Scripting) risk.**\n * It marks the provided HTML string as trusted, meaning Angular will\n * render it without any sanitization. Malicious content such as\n * `<script>` tags, inline event handlers (`onerror`, `onclick`, etc.),\n * and `javascript:` URLs will be executed in the user's browser.\n *\n * ### Safe usage\n * - Server-rendered HTML from **trusted, internal APIs** that never\n * include user-generated content (e.g., admin-authored rich text\n * that is sanitized server-side before storage).\n * - Static HTML snippets defined in application code.\n *\n * ### Unsafe usage (DO NOT use for these)\n * - Any value that originates from user input (form fields, query\n * params, URL fragments, file uploads).\n * - Third-party API responses whose content you do not control.\n * - Database fields that may contain unsanitized user submissions.\n *\n * @example\n * // Safe — trusted server content\n * <div [innerHTML]=\"trustedServerHtml | bypassHtmlSanitizer\"></div>\n *\n * // UNSAFE — user-provided content (use Angular’s default sanitization instead)\n * <div [innerHTML]=\"comment.body | bypassHtmlSanitizer\"></div> // ❌ XSS risk\n * <div [innerHTML]=\"comment.body\"></div> // ✅ Angular sanitizes automatically\n */\n@Pipe({\n name: 'bypassHtmlSanitizer',\n})\nexport class BypassHtmlSanitizerPipe implements PipeTransform {\n private sanitizer: DomSanitizer = inject(DomSanitizer);\n\n public transform(html: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Turns a numeric enum value into the name of its member, e.g. `{{ status | enumLabel: Status }}`.\n * Returns an empty string when the value or the enum is missing, or the value is not in the enum.\n */\n@Pipe({\n name: 'enumLabel',\n})\nexport class EnumLabelPipe implements PipeTransform {\n public transform(value?: number, enumType?: any): string {\n if (value === undefined || enumType === undefined) {\n return '';\n }\n\n const keys: string[] = Object.keys(enumType).filter((key: string) => !isNaN(Number(enumType[key])));\n const values: number[] = keys.map((key: string) => enumType[key]);\n\n const index: number = values.indexOf(value);\n if (index >= 0) {\n return keys[index];\n }\n return '';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { parseIsoValue } from '@zambon-dev/ui/library';\n\n/**\n * Reads a date the API sent in UTC without a timezone marker and returns it as the right instant.\n * Values that already carry `Z` or an offset are kept as they are. A date with no time, such as\n * `2026-12-05`, is a calendar day and comes back as the start of that day in local time. Empty or\n * invalid values give `null`. Chain it before `date`, e.g. `{{ value | utcDate | date }}`.\n */\n@Pipe({\n name: 'utcDate',\n})\nexport class UtcDatePipe implements PipeTransform {\n private static readonly timeZoneMarker: RegExp = /(?:Z|[+-]\\d{2}:?\\d{2})$/i;\n private static readonly dateOnly: RegExp = /^\\d{4}-\\d{2}-\\d{2}$/;\n\n transform(value?: Date | string): Date | null {\n if (!value) {\n return null;\n }\n\n // A calendar day, not an instant. The browser reads it as UTC midnight, which the `date` pipe\n // would show as the day before anywhere west of Greenwich, such as in Brazil. The data grid's\n // parser reads it as that day in local time, and gives null for a day the calendar lacks.\n if (typeof value === 'string' && UtcDatePipe.dateOnly.test(value.trim())) {\n return parseIsoValue(value.trim());\n }\n\n const newDate: Date = new Date(value);\n if (Number.isNaN(newDate.getTime())) {\n return null;\n }\n\n // A value that declares its zone has already been parsed as the right instant.\n if (typeof value === 'string' && UtcDatePipe.timeZoneMarker.test(value.trim())) {\n return newDate;\n }\n\n // The API serializes UTC values without a timezone marker, so Date parses them as local time.\n // Shifting by the offset re-reads those parts as UTC, which keeps both the time and the day\n // correct on either side of Greenwich.\n return new Date(newDate.getTime() - newDate.getTimezoneOffset() * 60000);\n }\n}\n","import { DatePipe } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n Input,\n OnInit,\n output,\n OutputEmitterRef,\n signal,\n Signal,\n TemplateRef,\n viewChild,\n WritableSignal,\n} from '@angular/core';\nimport { ChildList } from '@zambon-dev/ui/framework';\nimport { DataGridComponent } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { takeUntil } from 'rxjs';\nimport { ServicesHistoryDataset } from '../../../datasets';\nimport { UtcDatePipe } from '../../../pipes';\n\n/**\n * Grid of the change sets (services) recorded for the current record, with who made each one and\n * when. Needs a `ServicesHistoryDataset` provided above it, as `ServicesHistoryViewComponent` does.\n */\n@Component({\n selector: 'shared-services-history-child-list',\n templateUrl: './services-history-child-list.component.html',\n styleUrls: ['./services-history-child-list.component.scss'],\n imports: [DataGridComponent, DatePipe, UtcDatePipe, TranslatePipe],\n // No DataGridDataset provider of its own: ServicesHistoryViewComponent provides one, so that the\n // ribbon's buttons and this grid share a single instance. Used anywhere else, this component\n // needs a ServicesHistoryDataset provided above it.\n})\nexport class ServicesHistoryChildListComponent extends ChildList<any> implements AfterViewInit, OnInit {\n //#region ViewChilds, Inputs, Outputs\n private readonly serviceTemplate: Signal<TemplateRef<any> | undefined> =\n viewChild<TemplateRef<any>>('serviceTemplate');\n\n /** API controller of the audited entity, e.g. `Employees`. The grid loads nothing until it is set. */\n @Input() public set controllerName(value: string) {\n (<ServicesHistoryDataset>this.dataGridDataset).controllerName = value;\n }\n\n /** Re-emits the grid's own filter changes, for a sibling list that has to follow them. */\n public readonly filtersChanged: OutputEmitterRef<{ [key: string]: string } | undefined> = output<\n { [key: string]: string } | undefined\n >();\n //#endregion\n\n //#region Variables\n /** ID of the service selected in the grid, or `undefined` when none is selected. */\n // A signal: it is bound into the operations list beside this one, and both the row callback\n // and the grid's load event write it from outside any binding on this view.\n public readonly selectedServiceID: WritableSignal<number | undefined> = signal(undefined);\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n public ngAfterViewInit(): void {\n this.dataGridDataset.columns[0].template = this.serviceTemplate();\n }\n\n public override ngOnInit(): void {\n super.ngOnInit();\n\n this.dataGridDataset.filtersChanged\n .pipe(takeUntil(this.destroy$))\n .subscribe((filters: { [key: string]: string } | undefined) => this.filtersChanged.emit(filters));\n\n // Reloading clears the grid's selection but would leave the last chosen service behind, and\n // the operations list beside it still showing that service's rows -- a service the new filters\n // may not even list any more. Dropped here so the two panels never disagree.\n this.dataGridDataset.loadStarted.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.selectedServiceID.set(undefined);\n });\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n /** Updates `selectedServiceID` from the grid's selection. */\n public override selectedRowChanged(): void {\n super.selectedRowChanged();\n\n if (this.dataGridDataset.hasSelectedRows) {\n const selectedKey: string = this.dataGridDataset.selectedRowKeys[0];\n this.selectedServiceID.set(this.dataGridDataset.getRowID(selectedKey));\n }\n }\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","<lib-data-grid [lazyLoadRows]=\"true\"> </lib-data-grid>\n\n<ng-template #serviceTemplate let-rowData=\"rowData\">\n <div class=\"service-content\">\n <div class=\"icon\">\n <i class=\"fa-solid fa-circle fa-lg\"></i>\n </div>\n <div class=\"information\">\n <div class=\"service-name\">\n {{ rowData.name }}\n </div>\n <div class=\"details\">\n <span class=\"datetime\"\n ><i class=\"fa-solid fa-clock\"></i>\n {{ rowData.changedOn | utcDate | date: ('Format-DateTime' | translate) }}</span\n >\n <span class=\"user\"><i class=\"fa-solid fa-user\"></i> {{ rowData.changedByName }}</span>\n </div>\n </div>\n </div>\n</ng-template>\n","import { Component, computed, input, InputSignal, OnInit, Signal } from '@angular/core';\nimport { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { ButtonFiltersComponent } from '@zambon-dev/ui/framework';\nimport { CatalogSelectComponent, FormGroupComponent, FormInputGroupComponent } from '@zambon-dev/ui/library';\nimport { takeUntil } from 'rxjs';\nimport { FiltersBase } from '../../../components';\n\n/**\n * Ribbon filter for the services history grid: change name, author, date range and whether to show\n * only changes made to the current record. A date range picked backwards is corrected automatically.\n */\n@Component({\n selector: 'shared-services-history-filter',\n templateUrl: './services-history-filter.component.html',\n styleUrls: ['./services-history-filter.component.scss'],\n imports: [\n ButtonFiltersComponent,\n CatalogSelectComponent,\n FormGroupComponent,\n FormInputGroupComponent,\n FormsModule,\n ReactiveFormsModule,\n ],\n})\nexport class ServicesHistoryFilterComponent extends FiltersBase implements OnInit {\n //#region ViewChilds, Inputs, Outputs\n /**\n * Catalog that resolves the people who can appear as the author of a change.\n *\n * There is no such catalog in this library -- who a user is belongs to the application -- so the\n * author filter is offered only when one is supplied.\n */\n public readonly usersCatalogEndpoint: InputSignal<string | undefined> = input<string>();\n //#endregion\n\n //#region Variables\n //#endregion\n\n //#region Properties\n protected readonly hasUsersCatalog: Signal<boolean> = computed(() => !!this.usersCatalogEndpoint());\n\n private get changedOnFromControl(): FormControl {\n return <FormControl>this.filterForm.get('changedOnFrom');\n }\n\n private get changedOnToControl(): FormControl {\n return <FormControl>this.filterForm.get('changedOnTo');\n }\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n public override ngOnInit(): void {\n super.ngOnInit();\n\n // A range that reads backwards returns nothing and explains nothing, so the bound that did not\n // just change follows the one that did, rather than leaving the person to spot it.\n this.changedOnFromControl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((from: string | null) => {\n const to: string | null = this.changedOnToControl.value;\n if (!!from && !!to && to < from) {\n this.changedOnToControl.setValue(from);\n }\n });\n\n this.changedOnToControl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((to: string | null) => {\n const from: string | null = this.changedOnFromControl.value;\n if (!!from && !!to && to < from) {\n this.changedOnFromControl.setValue(to);\n }\n });\n }\n //#endregion\n\n //#region Event handlers\n //#endregion\n\n //#region Public methods\n //#endregion\n\n //#region Private methods\n /**\n * The control names are the filter names the backend reads, case insensitively: `name`,\n * `changedByID`, `changedOnFrom`, `changedOnTo` and `onlyCurrentEntity` reach `AuditFilters` in\n * ZWebAPI. The two dates are sent as picked and turned into UTC instants by\n * {@link ServicesHistoryDataset}, which is the boundary where the request is built.\n */\n protected override formSetup(): FormGroup<any> {\n return this.formBuilder.group({\n changedByID: [null],\n changedOnFrom: [null],\n changedOnTo: [null],\n name: [null],\n onlyCurrentEntity: [false, { nonNullable: true }],\n });\n }\n //#endregion\n}\n","<framework-button-filters modalSize=\"2xl\" modalTitle=\"ServicesHistory-Filters-Title\" [formGroup]=\"filterForm\">\n <lib-form-group label=\"ServicesHistory-FormGroup-Service\">\n <lib-form-input-group controlName=\"name\" label=\"ServicesHistory-Field-Name\" [autofocus]=\"true\" [maxLength]=\"200\">\n </lib-form-input-group>\n\n @if (hasUsersCatalog()) {\n <lib-catalog-select\n controlName=\"changedByID\"\n displayControlName=\"changedByName\"\n label=\"ServicesHistory-Field-ChangedBy\"\n [readOnly]=\"false\"\n [searchEndpoint]=\"usersCatalogEndpoint()!\"\n >\n </lib-catalog-select>\n }\n </lib-form-group>\n\n <lib-form-group label=\"ServicesHistory-FormGroup-Period\">\n <lib-form-input-group controlName=\"changedOnFrom\" label=\"ServicesHistory-Field-ChangedOnFrom\" [type]=\"'date'\">\n </lib-form-input-group>\n\n <lib-form-input-group controlName=\"changedOnTo\" label=\"ServicesHistory-Field-ChangedOnTo\" [type]=\"'date'\">\n </lib-form-input-group>\n </lib-form-group>\n\n <lib-form-group label=\"ServicesHistory-FormGroup-Operations\">\n <lib-form-input-group\n controlName=\"onlyCurrentEntity\"\n label=\"ServicesHistory-Field-OnlyCurrentEntity\"\n notes=\"ServicesHistory-Field-OnlyCurrentEntity-Notes\"\n [type]=\"'checkbox'\"\n >\n </lib-form-input-group>\n </lib-form-group>\n</framework-button-filters>\n","import { Component, inject, model, ModelSignal, signal, WritableSignal } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { ButtonRefreshComponent, TabViewBase } from '@zambon-dev/ui/framework';\nimport { DataGridDataset, DataProviderService, RibbonGroupComponent } from '@zambon-dev/ui/library';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { take } from 'rxjs';\nimport { ServicesHistoryDataset } from '../../../datasets';\nimport { OperationsHistoryChildListComponent } from '../../operations-history';\nimport { ServicesHistoryChildListComponent } from '../services-history-child-list/services-history-child-list.component';\nimport { ServicesHistoryFilterComponent } from '../services-history-filter/services-history-filter.component';\n\n/**\n * Tab view of a record's change history: the services grid beside the operations of the selected\n * service, with refresh and filter buttons in the ribbon. Unbound inputs are read from route data.\n */\n@Component({\n selector: 'shared-services-history-view',\n templateUrl: './services-history-view.component.html',\n styleUrls: ['./services-history-view.component.scss'],\n imports: [\n ButtonRefreshComponent,\n OperationsHistoryChildListComponent,\n RibbonGroupComponent,\n ServicesHistoryChildListComponent,\n ServicesHistoryFilterComponent,\n TranslatePipe,\n ],\n // The services grid is provided here rather than inside its child list so that the ribbon's\n // refresh and filter buttons, which resolve DataGridDataset from their own injector, reach the\n // same instance the grid reads. The operations child list still provides its own, which shadows\n // this one within its subtree, so it is unaffected.\n providers: [{ provide: DataGridDataset, useClass: ServicesHistoryDataset }],\n})\nexport class ServicesHistoryViewComponent extends TabViewBase {\n //#region ViewChilds, Inputs, Outputs\n // Models rather than inputs: the constructor fills the first two from route data when a host\n // has not bound them, and the entity id arrives from the data provider's stream.\n /** API controller of the audited entity, e.g. `Employees`. Falls back to the route's `controllerName` data. */\n public readonly controllerName: ModelSignal<string> = model('');\n\n /** ID of the audited record. Filled from the data provider's model when one is available. */\n public readonly entityID: ModelSignal<number | undefined> = model<number>();\n\n /**\n * Catalog resolving the people who can appear as the author of a change, for the filter.\n *\n * Supplied through the route's `usersCatalogEndpoint` data, or bound directly. Without it the\n * author filter is not offered -- see {@link ServicesHistoryFilterComponent}.\n */\n public readonly usersCatalogEndpoint: ModelSignal<string | undefined> = model<string>();\n //#endregion\n\n //#region Variables\n /**\n * The filters applied to the services grid, forwarded to the operations grid.\n *\n * Only `onlyCurrentEntity` means anything to the operations list, and the backend reads only what\n * it recognises, so the set is passed whole rather than picked apart here: a filter added later\n * then reaches both lists without this having to learn about it.\n */\n protected readonly operationsFilters: WritableSignal<{ [key: string]: string } | undefined> = signal(undefined);\n\n private activatedRoute: ActivatedRoute = inject(ActivatedRoute);\n private dataProviderService: DataProviderService<any> | null = inject(DataProviderService, { optional: true });\n //#endregion\n\n //#region Properties\n //#endregion\n\n //#region Constructor and Angular life cycle methods\n constructor() {\n super();\n\n if (this.activatedRoute.snapshot.data['controllerName']) {\n this.controllerName.set(this.activatedRoute.snapshot.data['controllerName']);\n }\n\n if (this.activatedRoute.snapshot.data['usersCatalogEndpoint']) {\n this.usersCatalogEndpoint.set(this.activatedRoute.snapshot.data['usersCatalogEndpoint']);\n }\n\n if (this.dataProviderService) {\n this.dataProviderService\n .getModel$()\n .pipe(take(1))\n .subscribe((model: any) => {\n this.entityID.set(model.id);\n });\n }\n }\n //#endregion\n\n //#region Event handlers\n protected onFiltersChanged(filters?: { [key: string]: string }): void {\n this.operationsFilters.set(filters);\n }\n //#endregion\n\n //#region Public methods\n //#endregion\n\n //#region Private methods\n //#endregion\n}\n","<ng-template #ribbon>\n <lib-ribbon-group [label]=\"'RibbonGroup-General' | translate\">\n <framework-button-refresh></framework-button-refresh>\n\n <shared-services-history-filter [usersCatalogEndpoint]=\"usersCatalogEndpoint()\"> </shared-services-history-filter>\n </lib-ribbon-group>\n</ng-template>\n\n<div class=\"history-container\">\n <div class=\"service-history-container\">\n <shared-services-history-child-list\n #service\n [controllerName]=\"controllerName()\"\n (filtersChanged)=\"onFiltersChanged($event)\"\n >\n </shared-services-history-child-list>\n </div>\n\n <div class=\"operations-history-container\">\n <shared-operations-history-child-list\n [controllerName]=\"controllerName()\"\n [filters]=\"operationsFilters()\"\n [serviceID]=\"service.selectedServiceID()\"\n >\n </shared-operations-history-child-list>\n </div>\n</div>\n","import { HttpBackend } from '@angular/common/http';\nimport { EnvironmentProviders, Provider } from '@angular/core';\nimport { provideTranslateService, TranslateLoader } from '@ngx-translate/core';\nimport { MultiTranslateHttpLoader, TranslationResource } from 'ngx-translate-multi-http-loader';\n\nimport { AngularAssetPattern } from '@zambon-dev/ui/library';\n\nexport const ZAMBON_SHARED_I18N_ASSET_PATH = 'assets/i18n/zambon-dev/shared';\n\nexport const ZAMBON_SHARED_I18N_ASSET: AngularAssetPattern = {\n glob: '**/*.json',\n input: 'node_modules/@zambon-dev/ui/i18n/shared',\n output: ZAMBON_SHARED_I18N_ASSET_PATH,\n};\n\nexport const ZAMBON_SHARED_I18N_RESOURCES: TranslationResource[] = [\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/external-content/`, suffix: '.json' },\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/language-selector/`, suffix: '.json' },\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/login/`, suffix: '.json' },\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/operations-history/`, suffix: '.json' },\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/services-history/`, suffix: '.json' },\n { prefix: `/${ZAMBON_SHARED_I18N_ASSET_PATH}/top-bar/`, suffix: '.json' },\n];\n\nexport interface ZambonSharedTranslateConfig {\n defaultLanguage?: string;\n appResources?: (string | TranslationResource)[];\n}\n\nexport function createZambonSharedTranslateLoader(\n httpBackend: HttpBackend,\n appResources: (string | TranslationResource)[] = [],\n): MultiTranslateHttpLoader {\n return new MultiTranslateHttpLoader(httpBackend, [...ZAMBON_SHARED_I18N_RESOURCES, ...appResources]);\n}\n\nexport function provideZambonSharedTranslateLoader(appResources: (string | TranslationResource)[] = []): Provider {\n return {\n provide: TranslateLoader,\n useFactory: (httpBackend: HttpBackend) => createZambonSharedTranslateLoader(httpBackend, appResources),\n deps: [HttpBackend],\n };\n}\n\nexport function provideZambonSharedTranslateService(config: ZambonSharedTranslateConfig = {}): EnvironmentProviders {\n return provideTranslateService({\n defaultLanguage: config.defaultLanguage,\n loader: provideZambonSharedTranslateLoader(config.appResources),\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,IAAa,4BAAb,MAAa,0BAAyB;CAEpB,WACd,UAAsC,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAGnC,WAAiC,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAE7C,QAA6B,MAAM,0BAAyB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAIpE,YAA8B,OAAO,gBAAgB;CAEnD,YAAsB,KAAK,UAAU,SAAQ;CAIpC,eAAwC,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAOvD,cAA8B,SAC7C,KAAK,UAAU,aAAa,KAAK,KAAK,UAA2B,MAAM,IAAI,CAAC,GAC5E,EAAE,cAAc,KAAK,UAAU,YAAW,CAAE;CAK9C,IAAW,mBAAgB;EACzB,OAAO,KAAK,YAAW;CACzB;CAOO,kBAAe;EACpB,KAAK,aAAa,QAAQ,YAAqB,CAAC,OAAO;CACzD;CAEO,iBAAiB,UAAgB;EACtC,aAAa,QAAQ,YAAY,QAAQ;EACzC,KAAK,UAAU,IAAI,QAAQ;EAC3B,KAAK,aAAa,IAAI,KAAK;CAC7B;CAQU,cAAc,OAAiB;EACvC,IAAI,KAAK,aAAY,GAAI;GACvB,IAAI,SAAmC,MAAM;GAC7C,OAAO,WAAW,QAAQ,OAAO,SAAS,YAAW,MAAO,QAAQ;IAClE,IAAI,WA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