@zambon-dev/ui 1.4.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -15
- package/LICENSE +21 -0
- package/README.md +55 -54
- package/fesm2022/zambon-dev-ui-framework.mjs +751 -13
- package/fesm2022/zambon-dev-ui-framework.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-library.mjs +2188 -57
- package/fesm2022/zambon-dev-ui-library.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-shared.mjs +446 -446
- package/fesm2022/zambon-dev-ui-shared.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-testing.mjs.map +1 -1
- package/i18n/framework/en.json +14 -1
- package/i18n/framework/pt.json +14 -1
- package/i18n/shared/top-bar/en.json +4 -0
- package/i18n/shared/top-bar/pt.json +4 -0
- package/package.json +14 -9
- package/styles/theme.css +15 -6
- package/styles/variables.scss +3 -3
- package/types/zambon-dev-ui-framework.d.ts +703 -27
- package/types/zambon-dev-ui-library.d.ts +1058 -3
- package/types/zambon-dev-ui-shared.d.ts +180 -10
- package/types/zambon-dev-ui-testing.d.ts +1 -0
|
@@ -1,14 +1,75 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { AfterViewInit, ElementRef, EnvironmentProviders, InjectionToken, InputSignal, ModelSignal, OnDestroy, OnInit, OutputEmitterRef, PipeTransform, Provider, Signal, WritableSignal } from "@angular/core";
|
|
3
|
+
import { FormBuilder, FormGroup } from "@angular/forms";
|
|
3
4
|
import * as i1 from "@angular/router";
|
|
4
5
|
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, Routes } from "@angular/router";
|
|
5
6
|
import { HttpBackend, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from "@angular/common/http";
|
|
6
7
|
import { Observable, Subject } from "rxjs";
|
|
7
|
-
import { FormBuilder, FormGroup } from "@angular/forms";
|
|
8
8
|
import { AuthService, ButtonFiltersComponent, ChildList, ModalBase, TabViewBase } from "@zambon-dev/ui/framework";
|
|
9
9
|
import { AngularAssetPattern, DataGridDataset, IGridColumn, IListParameters, SidebarMenu } from "@zambon-dev/ui/library";
|
|
10
10
|
import { SafeHtml, SafeResourceUrl } from "@angular/platform-browser";
|
|
11
11
|
import { MultiTranslateHttpLoader, TranslationResource } from "ngx-translate-multi-http-loader";
|
|
12
|
+
declare class LanguageSelectorComponent {
|
|
13
|
+
readonly dropdown: Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
14
|
+
/** When true, the toggle shows the current language's flag (light-gray button) instead of text. */
|
|
15
|
+
readonly showFlag: InputSignal<boolean>;
|
|
16
|
+
readonly title: InputSignal<string>;
|
|
17
|
+
private translate;
|
|
18
|
+
protected languages: string[];
|
|
19
|
+
protected readonly showDropdown: WritableSignal<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* `TranslateService.currentLang` is a plain field. The flag on the toggle and the tick beside
|
|
22
|
+
* the chosen entry are read from it, and switching language changed neither until something
|
|
23
|
+
* else happened to refresh this view. Mirrored from the service's own event instead.
|
|
24
|
+
*/
|
|
25
|
+
private readonly currentLang;
|
|
26
|
+
get selectedLanguage(): string;
|
|
27
|
+
onDropdownClick(): void;
|
|
28
|
+
onSelectLanguage(language: string): void;
|
|
29
|
+
protected documentClick(event: MouseEvent): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LanguageSelectorComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LanguageSelectorComponent, "shared-language-selector", never, {
|
|
32
|
+
"showFlag": {
|
|
33
|
+
"alias": "showFlag";
|
|
34
|
+
"required": false;
|
|
35
|
+
"isSignal": true;
|
|
36
|
+
};
|
|
37
|
+
"title": {
|
|
38
|
+
"alias": "title";
|
|
39
|
+
"required": false;
|
|
40
|
+
"isSignal": true;
|
|
41
|
+
};
|
|
42
|
+
}, {}, never, never, true, never>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Sign-in form with username, password and "remember me". On success it navigates to the
|
|
46
|
+
* `returnUrl` query parameter, or to `/`; on failure it shows the error and clears the password.
|
|
47
|
+
*/
|
|
48
|
+
export declare class LoginComponent implements OnInit {
|
|
49
|
+
/** The username field, focused again after a failed sign-in. */
|
|
50
|
+
readonly username: Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
51
|
+
protected form: FormGroup;
|
|
52
|
+
protected readonly formState: WritableSignal<{
|
|
53
|
+
error: string | null;
|
|
54
|
+
loading: boolean;
|
|
55
|
+
success: boolean;
|
|
56
|
+
}>;
|
|
57
|
+
private authenticationService;
|
|
58
|
+
private config;
|
|
59
|
+
private formBuilder;
|
|
60
|
+
private router;
|
|
61
|
+
/** Company line under the title, when the application supplies one. */
|
|
62
|
+
protected get companyName(): string;
|
|
63
|
+
/** The sign-in logo, falling back to the top bar's. Nothing is drawn when neither is set. */
|
|
64
|
+
protected get logoUrl(): string | undefined;
|
|
65
|
+
ngOnInit(): void;
|
|
66
|
+
/** Validates the form and signs in with the entered credentials. */
|
|
67
|
+
onSubmit(): void;
|
|
68
|
+
/** A field is only shown as wrong once the user has been given a chance to fill it. */
|
|
69
|
+
protected isInvalid(field: string): boolean;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
|
|
71
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "shared-login", never, {}, {}, never, never, true, never>;
|
|
72
|
+
}
|
|
12
73
|
export declare class SharedAuthModule {
|
|
13
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedAuthModule, never>;
|
|
14
75
|
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedAuthModule, never, [typeof i1.RouterModule], never>;
|
|
@@ -31,6 +92,10 @@ export declare class AuthInterceptor implements HttpInterceptor {
|
|
|
31
92
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthInterceptor, never>;
|
|
32
93
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
33
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Base class for a ribbon filter panel. Subclasses build the filter form in `formSetup()` and place
|
|
97
|
+
* a `framework-button-filters` in their template, which applies the form to the grid.
|
|
98
|
+
*/
|
|
34
99
|
export declare abstract class FiltersBase implements OnInit, OnDestroy {
|
|
35
100
|
protected buttonFilters?: ButtonFiltersComponent;
|
|
36
101
|
protected destroy$: Subject<boolean>;
|
|
@@ -38,6 +103,7 @@ export declare abstract class FiltersBase implements OnInit, OnDestroy {
|
|
|
38
103
|
protected formBuilder: FormBuilder;
|
|
39
104
|
ngOnDestroy(): void;
|
|
40
105
|
ngOnInit(): void;
|
|
106
|
+
/** Fills the filter form with the given values and applies them through the filters button. */
|
|
41
107
|
setFilters(filters: {
|
|
42
108
|
[key: string]: any;
|
|
43
109
|
}): void;
|
|
@@ -121,7 +187,7 @@ export interface IOperationsHistoryField {
|
|
|
121
187
|
isChanged: boolean;
|
|
122
188
|
/** Bookkeeping rather than data: the key, the audit columns, the concurrency token. */
|
|
123
189
|
isSystem: boolean;
|
|
124
|
-
/** The property name, as the backend declares it (`
|
|
190
|
+
/** The property name, as the backend declares it (`FullName`). */
|
|
125
191
|
name: string;
|
|
126
192
|
/** The value after the operation; `null` for a deletion, or when the backend could not rebuild it. */
|
|
127
193
|
newValue?: unknown;
|
|
@@ -162,8 +228,8 @@ export declare function humanizeFieldName(fieldName: string): string;
|
|
|
162
228
|
/**
|
|
163
229
|
* Labels the fields of the audit's change details.
|
|
164
230
|
*
|
|
165
|
-
* The default splits the property name into words: `
|
|
166
|
-
* `
|
|
231
|
+
* The default splits the property name into words: `FullName` reads "Full name" and
|
|
232
|
+
* `RecordID` reads "Record ID". Provide a function to use the application's own field labels:
|
|
167
233
|
*
|
|
168
234
|
* ```ts
|
|
169
235
|
* { provide: OPERATIONS_HISTORY_FIELD_LABEL, useValue: (field, entity) => `${entity}-Field-${field}` }
|
|
@@ -176,19 +242,31 @@ export interface IServicesHistoryList {
|
|
|
176
242
|
id: number;
|
|
177
243
|
name: string;
|
|
178
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* Signs users in against the API's `Authentication` endpoints and keeps their token, refresh token
|
|
247
|
+
* and user info in browser storage. The shared login, layouts, guard and interceptor rely on it.
|
|
248
|
+
*/
|
|
179
249
|
export declare class AuthenticationService extends AuthService {
|
|
250
|
+
/** Name of the action that grants administrator rights. */
|
|
180
251
|
adminAction: string;
|
|
181
252
|
private config;
|
|
182
253
|
private readonly BASE_URL;
|
|
183
254
|
private http;
|
|
184
255
|
constructor();
|
|
256
|
+
/**
|
|
257
|
+
* Signs in and stores the session; `rememberMe` keeps it after the browser closes. Fails with
|
|
258
|
+
* `InvalidUsernamePassword` or `InternalServerError`, which are translation keys.
|
|
259
|
+
*/
|
|
185
260
|
authenticate(model: {
|
|
186
261
|
username: string;
|
|
187
262
|
password: string;
|
|
188
263
|
rememberMe: boolean;
|
|
189
264
|
}): Observable<void>;
|
|
265
|
+
/** Loads the actions the signed-in user is allowed to perform. */
|
|
190
266
|
getActions(): Observable<string[]>;
|
|
267
|
+
/** Returns the stored information about the signed-in user, or `null` when signed out. */
|
|
191
268
|
getUserInfo(): ICurrentUserInfo | null;
|
|
269
|
+
/** Exchanges the refresh token for a new token, stores it and emits it. */
|
|
192
270
|
tryRefreshToken(): Observable<string>;
|
|
193
271
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationService, never>;
|
|
194
272
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
@@ -302,16 +380,26 @@ export declare class NotificationsService {
|
|
|
302
380
|
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationsService, never>;
|
|
303
381
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
304
382
|
}
|
|
383
|
+
/** Loads the field-level operations of one change set from the audit API. */
|
|
305
384
|
export declare class OperationsHistoryService {
|
|
306
385
|
private config;
|
|
307
386
|
private http;
|
|
387
|
+
/**
|
|
388
|
+
* Lists the operations of change set `serviceHistoryID` on the record `entityID` under the API
|
|
389
|
+
* controller `controllerName`, filtered and paged by `parameters`.
|
|
390
|
+
*/
|
|
308
391
|
list(controllerName: string, entityID: number, serviceHistoryID: number, parameters: IListParameters): Observable<IOperationsHistoryList[]>;
|
|
309
392
|
static ɵfac: i0.ɵɵFactoryDeclaration<OperationsHistoryService, never>;
|
|
310
393
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
311
394
|
}
|
|
395
|
+
/** Loads the change sets (services) recorded for a record from the audit API. */
|
|
312
396
|
export declare class ServicesHistoryService {
|
|
313
397
|
private config;
|
|
314
398
|
private http;
|
|
399
|
+
/**
|
|
400
|
+
* Lists the change sets of the record `entityID` under the API controller `controllerName`,
|
|
401
|
+
* filtered and paged by `parameters`.
|
|
402
|
+
*/
|
|
315
403
|
list(controllerName: string, entityID: number, parameters: IListParameters): Observable<IServicesHistoryList[]>;
|
|
316
404
|
static ɵfac: i0.ɵɵFactoryDeclaration<ServicesHistoryService, never>;
|
|
317
405
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
@@ -425,9 +513,14 @@ export declare class ExternalContentComponent extends TabViewBase implements OnI
|
|
|
425
513
|
* when it finds neither — the embedded tab would vanish on F5.
|
|
426
514
|
*/
|
|
427
515
|
export declare const externalContentRoutes: Routes;
|
|
516
|
+
/**
|
|
517
|
+
* Grid of the operations (added, modified or deleted entities) inside one change set. Clicking an
|
|
518
|
+
* operation opens a modal with its field-by-field changes.
|
|
519
|
+
*/
|
|
428
520
|
export declare class OperationsHistoryChildListComponent extends ChildList<any> implements AfterViewInit {
|
|
429
521
|
private readonly modal;
|
|
430
522
|
private readonly operationTemplate;
|
|
523
|
+
/** API controller of the audited entity, e.g. `Employees`. The grid loads nothing until it is set. */
|
|
431
524
|
set controllerName(value: string);
|
|
432
525
|
/**
|
|
433
526
|
* Filters to send with the list.
|
|
@@ -442,16 +535,28 @@ export declare class OperationsHistoryChildListComponent extends ChildList<any>
|
|
|
442
535
|
set filters(value: {
|
|
443
536
|
[key: string]: string;
|
|
444
537
|
} | undefined);
|
|
538
|
+
/** ID of the change set whose operations are listed. With none, the grid stays empty. */
|
|
445
539
|
set serviceID(value: number | undefined);
|
|
446
|
-
/**
|
|
540
|
+
/**
|
|
541
|
+
* New values of the selected operation, parsed from JSON, or `null` when none is selected.
|
|
542
|
+
*
|
|
543
|
+
* @deprecated Read `selectedOperation` instead, which also carries the whole record.
|
|
544
|
+
*/
|
|
447
545
|
readonly selectedNewValues: WritableSignal<any | null>;
|
|
448
|
-
/**
|
|
546
|
+
/**
|
|
547
|
+
* Old values of the selected operation, parsed from JSON, or `null` when none is selected.
|
|
548
|
+
*
|
|
549
|
+
* @deprecated Read `selectedOperation` instead, which also carries the whole record.
|
|
550
|
+
*/
|
|
449
551
|
readonly selectedOldValues: WritableSignal<any | null>;
|
|
552
|
+
/** The operation selected in the grid, or `null` when none is selected. */
|
|
450
553
|
readonly selectedOperation: WritableSignal<IOperationsHistoryList | null>;
|
|
451
554
|
ngAfterViewInit(): void;
|
|
452
555
|
/** How many data fields an operation changed, for the summary beside it. */
|
|
453
556
|
protected changedFieldsOf(operation: IOperationsHistoryList): number;
|
|
557
|
+
/** Opens the change details modal for the selected operation, unless it is already open. */
|
|
454
558
|
openModal(): void;
|
|
559
|
+
/** Updates `selectedOperation` from the grid's selection. */
|
|
455
560
|
selectedRowChanged(): void;
|
|
456
561
|
static ɵfac: i0.ɵɵFactoryDeclaration<OperationsHistoryChildListComponent, never>;
|
|
457
562
|
static ɵcmp: i0.ɵɵComponentDeclaration<OperationsHistoryChildListComponent, "shared-operations-history-child-list", never, {
|
|
@@ -513,14 +618,22 @@ interface IOperationsHistoryRow {
|
|
|
513
618
|
newValue: IOperationsHistoryValue;
|
|
514
619
|
oldValue: IOperationsHistoryValue;
|
|
515
620
|
}
|
|
621
|
+
/**
|
|
622
|
+
* Modal listing what one operation changed, field by field, with the value before and after.
|
|
623
|
+
* It can also list the unchanged and system fields when the backend sends the full record.
|
|
624
|
+
*/
|
|
516
625
|
export declare class OperationsHistoryModalComponent extends ModalBase {
|
|
517
626
|
private readonly modal;
|
|
518
627
|
/**
|
|
628
|
+
* Values after the change, as an object of field names to values.
|
|
629
|
+
*
|
|
519
630
|
* @deprecated Bind `operation` instead, which also carries the whole record. Read only when
|
|
520
631
|
* `operation` is not bound.
|
|
521
632
|
*/
|
|
522
633
|
readonly newValues: InputSignal<object | null | undefined>;
|
|
523
634
|
/**
|
|
635
|
+
* Values before the change, as an object of field names to values.
|
|
636
|
+
*
|
|
524
637
|
* @deprecated Bind `operation` instead, which also carries the whole record. Read only when
|
|
525
638
|
* `operation` is not bound.
|
|
526
639
|
*/
|
|
@@ -533,7 +646,7 @@ export declare class OperationsHistoryModalComponent extends ModalBase {
|
|
|
533
646
|
protected readonly showSystemFields: WritableSignal<boolean>;
|
|
534
647
|
private readonly fieldLabel;
|
|
535
648
|
private readonly locale;
|
|
536
|
-
/**
|
|
649
|
+
/** Whether the modal is open. */
|
|
537
650
|
readonly isModalShown: Signal<boolean>;
|
|
538
651
|
/** The operation shown, built from the deprecated inputs when `operation` is not bound. */
|
|
539
652
|
protected readonly currentOperation: Signal<IOperationsHistoryList | null>;
|
|
@@ -549,6 +662,7 @@ export declare class OperationsHistoryModalComponent extends ModalBase {
|
|
|
549
662
|
private readonly rows;
|
|
550
663
|
protected onShowAllFieldsChanged(event: Event): void;
|
|
551
664
|
protected onSystemFieldsToggled(): void;
|
|
665
|
+
/** Opens the modal when it is closed, and closes it when it is open. */
|
|
552
666
|
toggle(): void;
|
|
553
667
|
static ɵfac: i0.ɵɵFactoryDeclaration<OperationsHistoryModalComponent, never>;
|
|
554
668
|
static ɵcmp: i0.ɵɵComponentDeclaration<OperationsHistoryModalComponent, "shared-operations-history-modal", never, {
|
|
@@ -569,16 +683,23 @@ export declare class OperationsHistoryModalComponent extends ModalBase {
|
|
|
569
683
|
};
|
|
570
684
|
}, {}, never, never, true, never>;
|
|
571
685
|
}
|
|
686
|
+
/**
|
|
687
|
+
* Grid of the change sets (services) recorded for the current record, with who made each one and
|
|
688
|
+
* when. Needs a `ServicesHistoryDataset` provided above it, as `ServicesHistoryViewComponent` does.
|
|
689
|
+
*/
|
|
572
690
|
export declare class ServicesHistoryChildListComponent extends ChildList<any> implements AfterViewInit, OnInit {
|
|
573
691
|
private readonly serviceTemplate;
|
|
692
|
+
/** API controller of the audited entity, e.g. `Employees`. The grid loads nothing until it is set. */
|
|
574
693
|
set controllerName(value: string);
|
|
575
694
|
/** Re-emits the grid's own filter changes, for a sibling list that has to follow them. */
|
|
576
695
|
readonly filtersChanged: OutputEmitterRef<{
|
|
577
696
|
[key: string]: string;
|
|
578
697
|
} | undefined>;
|
|
698
|
+
/** ID of the service selected in the grid, or `undefined` when none is selected. */
|
|
579
699
|
readonly selectedServiceID: WritableSignal<number | undefined>;
|
|
580
700
|
ngAfterViewInit(): void;
|
|
581
701
|
ngOnInit(): void;
|
|
702
|
+
/** Updates `selectedServiceID` from the grid's selection. */
|
|
582
703
|
selectedRowChanged(): void;
|
|
583
704
|
static ɵfac: i0.ɵɵFactoryDeclaration<ServicesHistoryChildListComponent, never>;
|
|
584
705
|
static ɵcmp: i0.ɵɵComponentDeclaration<ServicesHistoryChildListComponent, "shared-services-history-child-list", never, {
|
|
@@ -590,6 +711,10 @@ export declare class ServicesHistoryChildListComponent extends ChildList<any> im
|
|
|
590
711
|
"filtersChanged": "filtersChanged";
|
|
591
712
|
}, never, never, true, never>;
|
|
592
713
|
}
|
|
714
|
+
/**
|
|
715
|
+
* Ribbon filter for the services history grid: change name, author, date range and whether to show
|
|
716
|
+
* only changes made to the current record. A date range picked backwards is corrected automatically.
|
|
717
|
+
*/
|
|
593
718
|
export declare class ServicesHistoryFilterComponent extends FiltersBase implements OnInit {
|
|
594
719
|
/**
|
|
595
720
|
* Catalog that resolves the people who can appear as the author of a change.
|
|
@@ -618,8 +743,14 @@ export declare class ServicesHistoryFilterComponent extends FiltersBase implemen
|
|
|
618
743
|
};
|
|
619
744
|
}, {}, never, never, true, never>;
|
|
620
745
|
}
|
|
746
|
+
/**
|
|
747
|
+
* Tab view of a record's change history: the services grid beside the operations of the selected
|
|
748
|
+
* service, with refresh and filter buttons in the ribbon. Unbound inputs are read from route data.
|
|
749
|
+
*/
|
|
621
750
|
export declare class ServicesHistoryViewComponent extends TabViewBase {
|
|
751
|
+
/** API controller of the audited entity, e.g. `Employees`. Falls back to the route's `controllerName` data. */
|
|
622
752
|
readonly controllerName: ModelSignal<string>;
|
|
753
|
+
/** ID of the audited record. Filled from the data provider's model when one is available. */
|
|
623
754
|
readonly entityID: ModelSignal<number | undefined>;
|
|
624
755
|
/**
|
|
625
756
|
* Catalog resolving the people who can appear as the author of a change, for the filter.
|
|
@@ -677,6 +808,10 @@ export interface ZambonSharedTranslateConfig {
|
|
|
677
808
|
export declare function createZambonSharedTranslateLoader(httpBackend: HttpBackend, appResources?: (string | TranslationResource)[]): MultiTranslateHttpLoader;
|
|
678
809
|
export declare function provideZambonSharedTranslateLoader(appResources?: (string | TranslationResource)[]): Provider;
|
|
679
810
|
export declare function provideZambonSharedTranslateService(config?: ZambonSharedTranslateConfig): EnvironmentProviders;
|
|
811
|
+
/**
|
|
812
|
+
* Page layout for the sign-in screen: the configured `loginBackgroundUrl` behind a router outlet
|
|
813
|
+
* and any projected content, which hold the login form.
|
|
814
|
+
*/
|
|
680
815
|
export declare class LoginLayoutComponent {
|
|
681
816
|
private config;
|
|
682
817
|
/** Optional photograph behind the card. Absent leaves the app backdrop showing. */
|
|
@@ -684,6 +819,10 @@ export declare class LoginLayoutComponent {
|
|
|
684
819
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoginLayoutComponent, never>;
|
|
685
820
|
static ɵcmp: i0.ɵɵComponentDeclaration<LoginLayoutComponent, "shared-login-layout", never, {}, {}, never, ["*"], true, never>;
|
|
686
821
|
}
|
|
822
|
+
/**
|
|
823
|
+
* Application shell after sign-in: top bar, sidebar menu and tabs. Menu items open as tabs,
|
|
824
|
+
* embedded pages or new browser windows, and logging out asks for confirmation first.
|
|
825
|
+
*/
|
|
687
826
|
export declare class MainLayoutComponent implements OnInit, OnDestroy {
|
|
688
827
|
private readonly logoutModal;
|
|
689
828
|
private authenticationService;
|
|
@@ -697,12 +836,15 @@ export declare class MainLayoutComponent implements OnInit, OnDestroy {
|
|
|
697
836
|
protected appVersion: string;
|
|
698
837
|
ngOnDestroy(): void;
|
|
699
838
|
ngOnInit(): void;
|
|
839
|
+
/** Opens the logout confirmation modal. */
|
|
700
840
|
onLogoutClick(): void;
|
|
841
|
+
/** Signs out, clearing the stored session and closing every tab, then navigates to `/login`. */
|
|
701
842
|
onLogoutConfirm(): void;
|
|
702
843
|
private openExternalMenu;
|
|
703
844
|
static ɵfac: i0.ɵɵFactoryDeclaration<MainLayoutComponent, never>;
|
|
704
845
|
static ɵcmp: i0.ɵɵComponentDeclaration<MainLayoutComponent, "shared-main-layout", never, {}, {}, never, never, true, never>;
|
|
705
846
|
}
|
|
847
|
+
/** Logo, application name and company name from the app configuration, shown in the top bar. */
|
|
706
848
|
export declare class BrandComponent {
|
|
707
849
|
private config;
|
|
708
850
|
protected get appName(): string;
|
|
@@ -711,6 +853,10 @@ export declare class BrandComponent {
|
|
|
711
853
|
static ɵfac: i0.ɵɵFactoryDeclaration<BrandComponent, never>;
|
|
712
854
|
static ɵcmp: i0.ɵɵComponentDeclaration<BrandComponent, "shared-brand", never, {}, {}, never, never, true, never>;
|
|
713
855
|
}
|
|
856
|
+
/**
|
|
857
|
+
* Badge naming the configured environment, e.g. `DEV`, `QA` or `STG`, each in its own colour.
|
|
858
|
+
* Hidden in `PROD` and when no environment is configured.
|
|
859
|
+
*/
|
|
714
860
|
export declare class EnvironmentBadgeComponent {
|
|
715
861
|
private config;
|
|
716
862
|
/** CSS modifier class for the current environment, falling back to a neutral style. */
|
|
@@ -722,7 +868,12 @@ export declare class EnvironmentBadgeComponent {
|
|
|
722
868
|
static ɵfac: i0.ɵɵFactoryDeclaration<EnvironmentBadgeComponent, never>;
|
|
723
869
|
static ɵcmp: i0.ɵɵComponentDeclaration<EnvironmentBadgeComponent, "shared-environment-badge", never, {}, {}, never, never, true, never>;
|
|
724
870
|
}
|
|
871
|
+
/**
|
|
872
|
+
* Bell with an unread count that opens a list of notifications. Clicking one marks it as read
|
|
873
|
+
* and follows its link: external URLs open in a new window, others navigate in the app.
|
|
874
|
+
*/
|
|
725
875
|
export declare class NotificationsComponent implements OnInit {
|
|
876
|
+
/** The open notifications panel; clicks inside it do not close it. */
|
|
726
877
|
readonly dropdown: Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
727
878
|
private notificationsService;
|
|
728
879
|
private router;
|
|
@@ -732,22 +883,31 @@ export declare class NotificationsComponent implements OnInit {
|
|
|
732
883
|
/** Whether the notifications feature is enabled; when false the bell is not rendered. */
|
|
733
884
|
get isEnabled(): boolean;
|
|
734
885
|
ngOnInit(): void;
|
|
886
|
+
/** Opens or closes the notifications panel. */
|
|
735
887
|
onDropdownClick(): void;
|
|
888
|
+
/** Marks every notification as read. */
|
|
736
889
|
onMarkAllAsRead(): void;
|
|
890
|
+
/** Marks the notification as read, closes the panel and follows its `callToActionUrl`, if any. */
|
|
737
891
|
onNotificationClick(notification: INotification): void;
|
|
738
892
|
protected documentClick(event: MouseEvent): void;
|
|
739
893
|
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationsComponent, never>;
|
|
740
894
|
static ɵcmp: i0.ɵɵComponentDeclaration<NotificationsComponent, "shared-notifications", never, {}, {}, never, never, true, never>;
|
|
741
895
|
}
|
|
896
|
+
/**
|
|
897
|
+
* Bar across the top of the app with the brand, environment badge, notifications, theme and
|
|
898
|
+
* language switches, user profile and a logout button.
|
|
899
|
+
*/
|
|
742
900
|
export declare class TopBarComponent {
|
|
743
901
|
/** Emitted when the logout button is clicked. */
|
|
744
902
|
readonly logout: OutputEmitterRef<void>;
|
|
903
|
+
/** Emits `logout`. */
|
|
745
904
|
onLogoutClick(): void;
|
|
746
905
|
static ɵfac: i0.ɵɵFactoryDeclaration<TopBarComponent, never>;
|
|
747
906
|
static ɵcmp: i0.ɵɵComponentDeclaration<TopBarComponent, "shared-top-bar", never, {}, {
|
|
748
907
|
"logout": "logout";
|
|
749
908
|
}, never, never, true, never>;
|
|
750
909
|
}
|
|
910
|
+
/** Signed-in user's picture, name and position in the top bar. Shows initials when there is no picture. */
|
|
751
911
|
export declare class UserProfileComponent implements OnInit {
|
|
752
912
|
private authenticationService;
|
|
753
913
|
protected readonly user: WritableSignal<ICurrentUserInfo | null>;
|
|
@@ -795,11 +955,20 @@ export declare class BypassHtmlSanitizerPipe implements PipeTransform {
|
|
|
795
955
|
static ɵfac: i0.ɵɵFactoryDeclaration<BypassHtmlSanitizerPipe, never>;
|
|
796
956
|
static ɵpipe: i0.ɵɵPipeDeclaration<BypassHtmlSanitizerPipe, "bypassHtmlSanitizer", true>;
|
|
797
957
|
}
|
|
958
|
+
/**
|
|
959
|
+
* Turns a numeric enum value into the name of its member, e.g. `{{ status | enumLabel: Status }}`.
|
|
960
|
+
* Returns an empty string when the value or the enum is missing, or the value is not in the enum.
|
|
961
|
+
*/
|
|
798
962
|
export declare class EnumLabelPipe implements PipeTransform {
|
|
799
963
|
transform(value?: number, enumType?: any): string;
|
|
800
964
|
static ɵfac: i0.ɵɵFactoryDeclaration<EnumLabelPipe, never>;
|
|
801
965
|
static ɵpipe: i0.ɵɵPipeDeclaration<EnumLabelPipe, "enumLabel", true>;
|
|
802
966
|
}
|
|
967
|
+
/**
|
|
968
|
+
* Reads a date the API sent in UTC without a timezone marker and returns it as the right instant.
|
|
969
|
+
* Values that already carry `Z` or an offset are kept as they are; empty or invalid values give
|
|
970
|
+
* `null`. Chain it before `date`, e.g. `{{ value | utcDate | date }}`.
|
|
971
|
+
*/
|
|
803
972
|
export declare class UtcDatePipe implements PipeTransform {
|
|
804
973
|
private static readonly timeZoneMarker;
|
|
805
974
|
transform(value?: Date | string): Date | null;
|
|
@@ -815,9 +984,10 @@ export declare const THEME_STORAGE_KEY = "zambon-theme";
|
|
|
815
984
|
/**
|
|
816
985
|
* Owns the light/dark choice and writes it to `<html>`.
|
|
817
986
|
*
|
|
818
|
-
* The CSS switch is an attribute rather than `prefers-color-scheme` so that
|
|
819
|
-
*
|
|
820
|
-
*
|
|
987
|
+
* The CSS switch is an attribute rather than `prefers-color-scheme` so that a user can pick light on
|
|
988
|
+
* a dark machine. Once this service exists it always writes the attribute; with nothing stored it
|
|
989
|
+
* keeps whatever the page already set, and falls back to light. Following the operating system is
|
|
990
|
+
* still a supported choice --
|
|
821
991
|
* it is resolved here, in TypeScript, and written out as a concrete `light` or `dark`. That is why
|
|
822
992
|
* `theme.css` holds one dark block instead of two that would have to be kept identical.
|
|
823
993
|
*
|
|
@@ -13,6 +13,7 @@ import { ComponentFixture } from "@angular/core/testing";
|
|
|
13
13
|
* `TestBed.createComponent` + `fixture.detectChanges()` cannot express.
|
|
14
14
|
*/
|
|
15
15
|
export declare class InertHostComponent {
|
|
16
|
+
/** Where the component under test is created, e.g. `host.outlet().createComponent(MyComponent)`. */
|
|
16
17
|
readonly outlet: import("@angular/core").Signal<ViewContainerRef>;
|
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<InertHostComponent, never>;
|
|
18
19
|
static ɵcmp: i0.ɵɵComponentDeclaration<InertHostComponent, "lib-inert-host", never, {}, {}, never, never, true, never>;
|