@gnggln/ng-ui-system 1.0.0-alpha.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/esm2022/gnggln-ng-ui-system.mjs +5 -0
- package/esm2022/lib/components/accordion/accordion.component.mjs +353 -0
- package/esm2022/lib/components/accordion/accordion.types.mjs +6 -0
- package/esm2022/lib/components/accordion/index.mjs +2 -0
- package/esm2022/lib/components/base-layout/base-layout.component.mjs +218 -0
- package/esm2022/lib/components/base-layout/base-layout.types.mjs +6 -0
- package/esm2022/lib/components/base-layout/index.mjs +14 -0
- package/esm2022/lib/components/button/button-area.component.mjs +196 -0
- package/esm2022/lib/components/button/button.component.mjs +164 -0
- package/esm2022/lib/components/button/button.types.mjs +6 -0
- package/esm2022/lib/components/button/index.mjs +16 -0
- package/esm2022/lib/components/crud-table/crud-table.component.mjs +789 -0
- package/esm2022/lib/components/crud-table/crud-table.types.mjs +6 -0
- package/esm2022/lib/components/crud-table/index.mjs +16 -0
- package/esm2022/lib/components/form-builder/adapters/it-date-adapter.mjs +82 -0
- package/esm2022/lib/components/form-builder/directives/currency-input.directive.mjs +184 -0
- package/esm2022/lib/components/form-builder/form-builder.component.mjs +824 -0
- package/esm2022/lib/components/form-builder/form-wizard.component.mjs +510 -0
- package/esm2022/lib/components/form-builder/index.mjs +19 -0
- package/esm2022/lib/components/form-builder/services/form-condition.service.mjs +132 -0
- package/esm2022/lib/components/form-builder/services/form-validation.service.mjs +381 -0
- package/esm2022/lib/components/form-builder/services/location.service.mjs +140 -0
- package/esm2022/lib/components/form-builder/services/wizard-sync.service.mjs +84 -0
- package/esm2022/lib/components/form-builder/sub-components/error-summary/form-error-summary.component.mjs +161 -0
- package/esm2022/lib/components/form-builder/sub-components/file-input/file-input.component.mjs +310 -0
- package/esm2022/lib/components/form-builder/sub-components/specifica-territoriale/specifica-territoriale.component.mjs +648 -0
- package/esm2022/lib/components/form-builder/sub-components/table-territoriale/table-territoriale.component.mjs +432 -0
- package/esm2022/lib/components/form-builder/types/condition.types.mjs +6 -0
- package/esm2022/lib/components/form-builder/types/field.types.mjs +6 -0
- package/esm2022/lib/components/form-builder/types/index.mjs +2 -0
- package/esm2022/lib/components/form-builder/types/schema.types.mjs +6 -0
- package/esm2022/lib/components/form-builder/types/territoriale.types.mjs +6 -0
- package/esm2022/lib/components/form-builder/types/validation.types.mjs +6 -0
- package/esm2022/lib/components/form-builder-editor/form-builder-editor.component.mjs +730 -0
- package/esm2022/lib/components/form-builder-editor/form-builder-editor.service.mjs +56 -0
- package/esm2022/lib/components/form-builder-editor/index.mjs +21 -0
- package/esm2022/lib/components/form-builder-editor/services/editor-persistence.service.mjs +190 -0
- package/esm2022/lib/components/form-builder-editor/services/editor-state.service.mjs +324 -0
- package/esm2022/lib/components/form-builder-editor/services/field-factory.service.mjs +188 -0
- package/esm2022/lib/components/form-builder-editor/sub-components/condition-editor/condition-editor.component.mjs +667 -0
- package/esm2022/lib/components/form-builder-editor/sub-components/editor-toolbar/editor-toolbar.component.mjs +317 -0
- package/esm2022/lib/components/form-builder-editor/sub-components/field-config-panel/field-config-panel.component.mjs +611 -0
- package/esm2022/lib/components/form-builder-editor/sub-components/field-palette/field-palette.component.mjs +267 -0
- package/esm2022/lib/components/form-builder-editor/sub-components/form-values-panel/form-values-panel.component.mjs +276 -0
- package/esm2022/lib/components/form-builder-editor/sub-components/options-editor/options-editor.component.mjs +323 -0
- package/esm2022/lib/components/form-builder-editor/sub-components/preview-container/preview-container.component.mjs +238 -0
- package/esm2022/lib/components/form-builder-editor/sub-components/section-editor/section-editor.component.mjs +472 -0
- package/esm2022/lib/components/form-builder-editor/sub-components/validation-editor/validation-editor.component.mjs +473 -0
- package/esm2022/lib/components/form-builder-editor/types/editor.types.mjs +6 -0
- package/esm2022/lib/components/layout-builder/index.mjs +18 -0
- package/esm2022/lib/components/layout-builder/layout-builder.component.mjs +1730 -0
- package/esm2022/lib/components/layout-builder/layout-builder.types.mjs +9 -0
- package/esm2022/lib/components/layout-builder/layout.service.mjs +239 -0
- package/esm2022/lib/components/modal/confirm-dialog.component.mjs +151 -0
- package/esm2022/lib/components/modal/index.mjs +4 -0
- package/esm2022/lib/components/modal/modal.component.mjs +139 -0
- package/esm2022/lib/components/modal/modal.service.mjs +194 -0
- package/esm2022/lib/components/modal/modal.types.mjs +6 -0
- package/esm2022/lib/components/page-header/breadcrumb.service.mjs +242 -0
- package/esm2022/lib/components/page-header/index.mjs +20 -0
- package/esm2022/lib/components/page-header/page-header.component.mjs +243 -0
- package/esm2022/lib/components/page-header/page-header.types.mjs +21 -0
- package/esm2022/lib/components/table/index.mjs +2 -0
- package/esm2022/lib/components/table/paginated-table.component.mjs +407 -0
- package/esm2022/lib/components/table/table.types.mjs +6 -0
- package/esm2022/lib/core/types/index.mjs +6 -0
- package/esm2022/lib/core/utils/index.mjs +53 -0
- package/esm2022/lib/sources/location-data.opt.json +8942 -0
- package/esm2022/lib/sources/nazioni.opt.json +215 -0
- package/esm2022/public-api.mjs +34 -0
- package/fesm2022/gnggln-ng-ui-system.mjs +55752 -0
- package/fesm2022/gnggln-ng-ui-system.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/accordion/accordion.component.d.ts +118 -0
- package/lib/components/accordion/accordion.types.d.ts +62 -0
- package/lib/components/accordion/index.d.ts +2 -0
- package/lib/components/base-layout/base-layout.component.d.ts +83 -0
- package/lib/components/base-layout/base-layout.types.d.ts +26 -0
- package/lib/components/base-layout/index.d.ts +13 -0
- package/lib/components/button/button-area.component.d.ts +88 -0
- package/lib/components/button/button.component.d.ts +55 -0
- package/lib/components/button/button.types.d.ts +70 -0
- package/lib/components/button/index.d.ts +15 -0
- package/lib/components/crud-table/crud-table.component.d.ts +143 -0
- package/lib/components/crud-table/crud-table.types.d.ts +207 -0
- package/lib/components/crud-table/index.d.ts +15 -0
- package/lib/components/form-builder/adapters/it-date-adapter.d.ts +32 -0
- package/lib/components/form-builder/directives/currency-input.directive.d.ts +48 -0
- package/lib/components/form-builder/form-builder.component.d.ts +183 -0
- package/lib/components/form-builder/form-wizard.component.d.ts +87 -0
- package/lib/components/form-builder/index.d.ts +13 -0
- package/lib/components/form-builder/services/form-condition.service.d.ts +46 -0
- package/lib/components/form-builder/services/form-validation.service.d.ts +63 -0
- package/lib/components/form-builder/services/location.service.d.ts +83 -0
- package/lib/components/form-builder/services/wizard-sync.service.d.ts +63 -0
- package/lib/components/form-builder/sub-components/error-summary/form-error-summary.component.d.ts +28 -0
- package/lib/components/form-builder/sub-components/file-input/file-input.component.d.ts +41 -0
- package/lib/components/form-builder/sub-components/specifica-territoriale/specifica-territoriale.component.d.ts +145 -0
- package/lib/components/form-builder/sub-components/table-territoriale/table-territoriale.component.d.ts +108 -0
- package/lib/components/form-builder/types/condition.types.d.ts +51 -0
- package/lib/components/form-builder/types/field.types.d.ts +288 -0
- package/lib/components/form-builder/types/index.d.ts +5 -0
- package/lib/components/form-builder/types/schema.types.d.ts +227 -0
- package/lib/components/form-builder/types/territoriale.types.d.ts +170 -0
- package/lib/components/form-builder/types/validation.types.d.ts +174 -0
- package/lib/components/form-builder-editor/form-builder-editor.component.d.ts +117 -0
- package/lib/components/form-builder-editor/form-builder-editor.service.d.ts +38 -0
- package/lib/components/form-builder-editor/index.d.ts +15 -0
- package/lib/components/form-builder-editor/services/editor-persistence.service.d.ts +42 -0
- package/lib/components/form-builder-editor/services/editor-state.service.d.ts +66 -0
- package/lib/components/form-builder-editor/services/field-factory.service.d.ts +28 -0
- package/lib/components/form-builder-editor/sub-components/condition-editor/condition-editor.component.d.ts +139 -0
- package/lib/components/form-builder-editor/sub-components/editor-toolbar/editor-toolbar.component.d.ts +43 -0
- package/lib/components/form-builder-editor/sub-components/field-config-panel/field-config-panel.component.d.ts +83 -0
- package/lib/components/form-builder-editor/sub-components/field-palette/field-palette.component.d.ts +40 -0
- package/lib/components/form-builder-editor/sub-components/form-values-panel/form-values-panel.component.d.ts +51 -0
- package/lib/components/form-builder-editor/sub-components/options-editor/options-editor.component.d.ts +63 -0
- package/lib/components/form-builder-editor/sub-components/preview-container/preview-container.component.d.ts +68 -0
- package/lib/components/form-builder-editor/sub-components/section-editor/section-editor.component.d.ts +82 -0
- package/lib/components/form-builder-editor/sub-components/validation-editor/validation-editor.component.d.ts +112 -0
- package/lib/components/form-builder-editor/types/editor.types.d.ts +124 -0
- package/lib/components/layout-builder/index.d.ts +16 -0
- package/lib/components/layout-builder/layout-builder.component.d.ts +85 -0
- package/lib/components/layout-builder/layout-builder.types.d.ts +436 -0
- package/lib/components/layout-builder/layout.service.d.ts +100 -0
- package/lib/components/modal/confirm-dialog.component.d.ts +46 -0
- package/lib/components/modal/index.d.ts +4 -0
- package/lib/components/modal/modal.component.d.ts +44 -0
- package/lib/components/modal/modal.service.d.ts +93 -0
- package/lib/components/modal/modal.types.d.ts +110 -0
- package/lib/components/page-header/breadcrumb.service.d.ts +96 -0
- package/lib/components/page-header/index.d.ts +16 -0
- package/lib/components/page-header/page-header.component.d.ts +59 -0
- package/lib/components/page-header/page-header.types.d.ts +96 -0
- package/lib/components/table/index.d.ts +2 -0
- package/lib/components/table/paginated-table.component.d.ts +85 -0
- package/lib/components/table/table.types.d.ts +81 -0
- package/lib/core/types/index.d.ts +57 -0
- package/lib/core/utils/index.d.ts +29 -0
- package/package.json +44 -0
- package/public-api.d.ts +22 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { UiConfirmDialogData, UiModalOpenConfig } from './modal.types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Servizio per aprire modali e dialoghi di conferma.
|
|
8
|
+
*
|
|
9
|
+
* Gestisce lo stacking intelligente: una modale regolare puo
|
|
10
|
+
* ospitare al massimo un dialogo di conferma sopra di se.
|
|
11
|
+
* Non e possibile stackare due modali regolari.
|
|
12
|
+
*
|
|
13
|
+
* @usageNotes
|
|
14
|
+
*
|
|
15
|
+
* ### Aprire una modale personalizzata
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const ref = this.modalService.open(MyDialogComponent, {
|
|
18
|
+
* size: 'lg',
|
|
19
|
+
* data: { userId: 123 },
|
|
20
|
+
* });
|
|
21
|
+
*
|
|
22
|
+
* ref.afterClosed().subscribe(result => {
|
|
23
|
+
* console.log('Risultato:', result);
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* ### Conferma rapida
|
|
28
|
+
* ```typescript
|
|
29
|
+
* this.modalService.confirm('Confermi questa azione?')
|
|
30
|
+
* .subscribe(ok => { if (ok) this.procedi(); });
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* ### Preset di conferma
|
|
34
|
+
* ```typescript
|
|
35
|
+
* this.modalService.confirmDelete('Progetto Alpha')
|
|
36
|
+
* .subscribe(ok => { if (ok) this.elimina(); });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare class UiModalService {
|
|
40
|
+
/** @internal Istanza MatDialog per la gestione overlay. */
|
|
41
|
+
private readonly dialog;
|
|
42
|
+
/** @internal Stack delle modali regolari aperte. */
|
|
43
|
+
private _modalStack;
|
|
44
|
+
/** @internal Traccia se un dialogo di conferma e attualmente aperto. */
|
|
45
|
+
private _confirmOpen;
|
|
46
|
+
/**
|
|
47
|
+
* Apre una modale con un componente personalizzato.
|
|
48
|
+
*
|
|
49
|
+
* Il componente aperto puo iniettare `MAT_DIALOG_DATA` per accedere
|
|
50
|
+
* ai dati e `MatDialogRef` per chiudere la modale.
|
|
51
|
+
*
|
|
52
|
+
* @param component - Componente standalone da renderizzare nella modale
|
|
53
|
+
* @param config - Configurazione (dimensione, dati, comportamento)
|
|
54
|
+
* @returns Riferimento alla modale aperta
|
|
55
|
+
*/
|
|
56
|
+
open<T, D = unknown, R = unknown>(component: Type<T>, config?: UiModalOpenConfig<D>): MatDialogRef<T, R>;
|
|
57
|
+
/**
|
|
58
|
+
* Apre un dialogo di conferma.
|
|
59
|
+
*
|
|
60
|
+
* Accetta una stringa semplice (messaggio) o un oggetto di
|
|
61
|
+
* configurazione completo. Puo essere aperto sopra una modale
|
|
62
|
+
* esistente (stacking consentito).
|
|
63
|
+
*
|
|
64
|
+
* @param messageOrConfig - Messaggio o configurazione completa
|
|
65
|
+
* @returns Observable che emette `true` se confermato, `false` se annullato
|
|
66
|
+
*/
|
|
67
|
+
confirm(messageOrConfig: string | UiConfirmDialogData): Observable<boolean>;
|
|
68
|
+
/**
|
|
69
|
+
* Scorciatoia: conferma eliminazione.
|
|
70
|
+
* Variante `delete` con icona cestino e pulsante warn.
|
|
71
|
+
*
|
|
72
|
+
* @param itemName - Nome opzionale dell'elemento da eliminare
|
|
73
|
+
*/
|
|
74
|
+
confirmDelete(itemName?: string): Observable<boolean>;
|
|
75
|
+
/**
|
|
76
|
+
* Scorciatoia: conferma abbandono modifiche.
|
|
77
|
+
* Variante `warn` con icona avviso.
|
|
78
|
+
*/
|
|
79
|
+
confirmDiscard(): Observable<boolean>;
|
|
80
|
+
/**
|
|
81
|
+
* Scorciatoia: conferma salvataggio.
|
|
82
|
+
* Variante `confirm` con icona check.
|
|
83
|
+
*/
|
|
84
|
+
confirmSave(): Observable<boolean>;
|
|
85
|
+
/** Chiude tutte le modali e dialoghi aperti. */
|
|
86
|
+
closeAll(): void;
|
|
87
|
+
/** Indica se ci sono modali o dialoghi attualmente aperti. */
|
|
88
|
+
get hasOpenDialogs(): boolean;
|
|
89
|
+
/** Numero di modali regolari attualmente aperte. */
|
|
90
|
+
get openModalCount(): number;
|
|
91
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiModalService, never>;
|
|
92
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UiModalService>;
|
|
93
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ng-ui-system/modal
|
|
3
|
+
* Tipi e interfacce per UiModal, UiConfirmDialog e UiModalService.
|
|
4
|
+
*/
|
|
5
|
+
import { UiVariant, UiIconName } from '../../core/types';
|
|
6
|
+
export { UiVariant, UiIconName };
|
|
7
|
+
/**
|
|
8
|
+
* Dimensioni predefinite della modale.
|
|
9
|
+
*
|
|
10
|
+
* | Valore | Larghezza | Caso d'uso |
|
|
11
|
+
* |--------------|-----------|-----------------------------------|
|
|
12
|
+
* | `sm` | 400px | Confirm, messaggi brevi |
|
|
13
|
+
* | `md` | 560px | Form semplici, dettagli |
|
|
14
|
+
* | `lg` | 720px | Form complessi, tabelle interne |
|
|
15
|
+
* | `xl` | 900px | Dashboard modali, preview |
|
|
16
|
+
* | `fullscreen` | 95vw | Operazioni a schermo intero |
|
|
17
|
+
*/
|
|
18
|
+
export type UiModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';
|
|
19
|
+
/**
|
|
20
|
+
* Configurazione strutturale della modale.
|
|
21
|
+
* Passata come `@Input()` al componente `UiModalComponent`.
|
|
22
|
+
*
|
|
23
|
+
* @usageNotes
|
|
24
|
+
* ### Utilizzo base
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const config: UiModalConfig = {
|
|
27
|
+
* title: 'Modifica utente',
|
|
28
|
+
* size: 'md',
|
|
29
|
+
* };
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export interface UiModalConfig {
|
|
33
|
+
/** Titolo visualizzato nell'header della modale. */
|
|
34
|
+
title?: string;
|
|
35
|
+
/** Dimensione della modale. @default 'md' */
|
|
36
|
+
size?: UiModalSize;
|
|
37
|
+
/** Mostra il pulsante di chiusura nell'header. @default true */
|
|
38
|
+
showCloseButton?: boolean;
|
|
39
|
+
/** Impedisce la chiusura tramite backdrop click o tasto Escape. @default false */
|
|
40
|
+
disableClose?: boolean;
|
|
41
|
+
/** Nasconde l'area footer della modale. @default false */
|
|
42
|
+
hideFooter?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Configurazione per aprire una modale tramite `UiModalService.open()`.
|
|
46
|
+
*
|
|
47
|
+
* @usageNotes
|
|
48
|
+
* ```typescript
|
|
49
|
+
* this.modalService.open(MyComponent, {
|
|
50
|
+
* size: 'lg',
|
|
51
|
+
* data: { userId: 123 },
|
|
52
|
+
* disableClose: true,
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export interface UiModalOpenConfig<D = unknown> {
|
|
57
|
+
/** Dimensione della modale. @default 'md' */
|
|
58
|
+
size?: UiModalSize;
|
|
59
|
+
/** Dati da iniettare nel componente aperto tramite MAT_DIALOG_DATA. */
|
|
60
|
+
data?: D;
|
|
61
|
+
/** Impedisce la chiusura tramite backdrop click o tasto Escape. @default false */
|
|
62
|
+
disableClose?: boolean;
|
|
63
|
+
/** Classe CSS aggiuntiva per il pannello overlay. */
|
|
64
|
+
panelClass?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Varianti semantiche del dialogo di conferma.
|
|
68
|
+
*
|
|
69
|
+
* | Variante | Icona default | Colore pulsante | Caso d'uso |
|
|
70
|
+
* |-----------|-------------------|----------------|---------------------------|
|
|
71
|
+
* | `confirm` | `check-circle` | `primary` | Conferma azione positiva |
|
|
72
|
+
* | `delete` | `trash-2` | `warn` | Eliminazione irreversibile |
|
|
73
|
+
* | `warn` | `alert-triangle` | `warn` | Avviso con conferma |
|
|
74
|
+
* | `info` | `info` | `primary` | Informazione con azione |
|
|
75
|
+
*/
|
|
76
|
+
export type UiConfirmVariant = 'confirm' | 'delete' | 'warn' | 'info';
|
|
77
|
+
/**
|
|
78
|
+
* Configurazione per il dialogo di conferma.
|
|
79
|
+
* Passata a `UiModalService.confirm()`.
|
|
80
|
+
*
|
|
81
|
+
* @usageNotes
|
|
82
|
+
* ### Conferma semplice (solo stringa)
|
|
83
|
+
* ```typescript
|
|
84
|
+
* this.modalService.confirm('Sei sicuro di voler procedere?');
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* ### Conferma configurata
|
|
88
|
+
* ```typescript
|
|
89
|
+
* this.modalService.confirm({
|
|
90
|
+
* title: 'Elimina elemento',
|
|
91
|
+
* message: 'Questa azione non puo essere annullata.',
|
|
92
|
+
* variant: 'delete',
|
|
93
|
+
* confirmText: 'Elimina',
|
|
94
|
+
* });
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export interface UiConfirmDialogData {
|
|
98
|
+
/** Titolo del dialogo. */
|
|
99
|
+
title?: string;
|
|
100
|
+
/** Messaggio principale del dialogo. */
|
|
101
|
+
message: string;
|
|
102
|
+
/** Testo del pulsante di conferma. @default 'Conferma' */
|
|
103
|
+
confirmText?: string;
|
|
104
|
+
/** Testo del pulsante di annullamento. @default 'Annulla' */
|
|
105
|
+
cancelText?: string;
|
|
106
|
+
/** Variante semantica che determina icona e colore. @default 'confirm' */
|
|
107
|
+
variant?: UiConfirmVariant;
|
|
108
|
+
/** Icona personalizzata (sovrascrive quella della variante). */
|
|
109
|
+
icon?: UiIconName;
|
|
110
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ActivatedRoute } from '@angular/router';
|
|
2
|
+
import { UiBreadcrumbItem } from './page-header.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Service that builds a nested breadcrumb trail from Angular route configuration.
|
|
6
|
+
*
|
|
7
|
+
* Routes must define `data.id`, `data.title`, and optionally `data.breadcrumbs`
|
|
8
|
+
* (an array of parent route IDs) for the chain to resolve correctly.
|
|
9
|
+
*
|
|
10
|
+
* Supports lazy-loaded routes: the internal route map is rebuilt automatically
|
|
11
|
+
* whenever new routes are loaded via `NavigationEnd`.
|
|
12
|
+
*
|
|
13
|
+
* Label resolution for route parameters (`:param`) is delegated to an injectable
|
|
14
|
+
* `UiLabelResolverFn` via the `UI_BREADCRUMB_LABEL_RESOLVER` token.
|
|
15
|
+
*
|
|
16
|
+
* @usageNotes
|
|
17
|
+
* ### Route configuration
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const routes: Routes = [
|
|
20
|
+
* {
|
|
21
|
+
* path: 'users',
|
|
22
|
+
* data: { id: 'users', title: 'Utenti' },
|
|
23
|
+
* children: [
|
|
24
|
+
* {
|
|
25
|
+
* path: ':userId',
|
|
26
|
+
* data: { id: 'user-detail', title: ':userId', breadcrumbs: ['users'] },
|
|
27
|
+
* component: UserDetailComponent,
|
|
28
|
+
* },
|
|
29
|
+
* ],
|
|
30
|
+
* },
|
|
31
|
+
* ];
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* ### Custom label resolver
|
|
35
|
+
* ```typescript
|
|
36
|
+
* providers: [
|
|
37
|
+
* {
|
|
38
|
+
* provide: UI_BREADCRUMB_LABEL_RESOLVER,
|
|
39
|
+
* useValue: (name: string, value: string) =>
|
|
40
|
+
* name === 'userId' ? `User #${value}` : value,
|
|
41
|
+
* },
|
|
42
|
+
* ]
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare class UiBreadcrumbService {
|
|
46
|
+
private readonly router;
|
|
47
|
+
private readonly labelResolver;
|
|
48
|
+
/** @internal Map of route ID → breadcrumb configuration. */
|
|
49
|
+
private breadcrumbMap;
|
|
50
|
+
/** @internal Tracks route count to detect lazy-loaded route additions. */
|
|
51
|
+
private lastRouteConfigLength;
|
|
52
|
+
/** @internal Last computed breadcrumbs for navigateBack. */
|
|
53
|
+
private lastBreadcrumbs;
|
|
54
|
+
constructor();
|
|
55
|
+
/**
|
|
56
|
+
* Computes the breadcrumb trail for the currently active route.
|
|
57
|
+
*
|
|
58
|
+
* @param route - The root `ActivatedRoute` (typically injected in the component).
|
|
59
|
+
* @returns Ordered array of breadcrumb items from root to current route.
|
|
60
|
+
*/
|
|
61
|
+
getBreadcrumbsForRoute(route: ActivatedRoute): UiBreadcrumbItem[];
|
|
62
|
+
/**
|
|
63
|
+
* Navigates to the previous breadcrumb (parent route).
|
|
64
|
+
* Falls back to `fallbackUrl` (default: `/`) when no parent exists.
|
|
65
|
+
*/
|
|
66
|
+
navigateBack(fallbackUrl?: string): void;
|
|
67
|
+
/** @internal Collects all route params from the full path (including parents). */
|
|
68
|
+
private collectParamsFromPath;
|
|
69
|
+
/** @internal Rebuilds the map only when new lazy routes appear. */
|
|
70
|
+
private rebuildRouteMapIfNeeded;
|
|
71
|
+
/** @internal Recursively counts routes including lazy-loaded children. */
|
|
72
|
+
private countRoutes;
|
|
73
|
+
/** @internal Clears and rebuilds the full route → breadcrumb map. */
|
|
74
|
+
private rebuildRouteMap;
|
|
75
|
+
/** @internal Recursively walks route tree to build the breadcrumb map. */
|
|
76
|
+
private buildRouteMap;
|
|
77
|
+
/** @internal Builds the full breadcrumb chain for a route by its ID. */
|
|
78
|
+
private buildBreadcrumbChain;
|
|
79
|
+
/** @internal Resolves parent breadcrumbs from ordered parent IDs. */
|
|
80
|
+
private getParentChain;
|
|
81
|
+
/**
|
|
82
|
+
* @internal Resolves `:param` placeholders in a label using
|
|
83
|
+
* the injected label resolver function.
|
|
84
|
+
*/
|
|
85
|
+
private resolveLabel;
|
|
86
|
+
/** @internal Resolves `:param` placeholders in a path and creates a URL. */
|
|
87
|
+
private resolveUrl;
|
|
88
|
+
/** @internal Normalizes path by collapsing double slashes and trimming trailing slash. */
|
|
89
|
+
private normalizePath;
|
|
90
|
+
/** @internal Removes query parameters from a URL. */
|
|
91
|
+
private stripQueryParams;
|
|
92
|
+
/** @internal Caches the fully resolved URL for a route ID. */
|
|
93
|
+
private saveFullPath;
|
|
94
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiBreadcrumbService, never>;
|
|
95
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UiBreadcrumbService>;
|
|
96
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ng-ui-system — Page Header entry point.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```typescript
|
|
6
|
+
* import {
|
|
7
|
+
* UiPageHeaderComponent,
|
|
8
|
+
* UiBreadcrumbService,
|
|
9
|
+
* UiBreadcrumbItem,
|
|
10
|
+
* UI_BREADCRUMB_LABEL_RESOLVER,
|
|
11
|
+
* } from 'ng-ui-system';
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export { UiPageHeaderComponent } from './page-header.component';
|
|
15
|
+
export { UiBreadcrumbService } from './breadcrumb.service';
|
|
16
|
+
export { UiBreadcrumbItem, UiBreadcrumbConfig, UiLabelResolverFn, UI_BREADCRUMB_LABEL_RESOLVER, } from './page-header.types';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { UiBreadcrumbItem } from './page-header.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Page header component that renders a breadcrumb navigation trail
|
|
6
|
+
* and a page title. Integrates with `UiBreadcrumbService` to
|
|
7
|
+
* automatically derive breadcrumbs from Angular route configuration.
|
|
8
|
+
*
|
|
9
|
+
* The breadcrumb trail is generated from route `data` properties:
|
|
10
|
+
* - `data.id` — unique route identifier
|
|
11
|
+
* - `data.title` — display label
|
|
12
|
+
* - `data.breadcrumbs` — ordered array of parent route IDs
|
|
13
|
+
*
|
|
14
|
+
* @selector ui-page-header
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```html
|
|
18
|
+
* <!-- Auto breadcrumbs from route data -->
|
|
19
|
+
* <ui-page-header />
|
|
20
|
+
*
|
|
21
|
+
* <!-- With explicit title override -->
|
|
22
|
+
* <ui-page-header title="Custom Title" />
|
|
23
|
+
*
|
|
24
|
+
* <!-- With document title update -->
|
|
25
|
+
* <ui-page-header [updateDocumentTitle]="true" titleSuffix=" | My App" />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class UiPageHeaderComponent implements OnInit {
|
|
29
|
+
/** Override the auto-detected page title. When empty, title is derived from the last breadcrumb. */
|
|
30
|
+
title: string;
|
|
31
|
+
/** Route path for the Home breadcrumb link. */
|
|
32
|
+
homeRoute: string;
|
|
33
|
+
/** Whether to display the Home link at the start of the trail. */
|
|
34
|
+
showHome: boolean;
|
|
35
|
+
/** When `true`, updates `document.title` on each navigation. */
|
|
36
|
+
updateDocumentTitle: boolean;
|
|
37
|
+
/** Suffix appended to `document.title` (e.g. `' | My App'`). Only used when `updateDocumentTitle` is `true`. */
|
|
38
|
+
titleSuffix: string;
|
|
39
|
+
/** @internal */
|
|
40
|
+
breadcrumbs: UiBreadcrumbItem[];
|
|
41
|
+
private readonly router;
|
|
42
|
+
private readonly activatedRoute;
|
|
43
|
+
private readonly titleService;
|
|
44
|
+
private readonly breadcrumbService;
|
|
45
|
+
private readonly destroyRef;
|
|
46
|
+
private readonly cdr;
|
|
47
|
+
/** Resolved page title: explicit `title` input wins, otherwise last breadcrumb label. */
|
|
48
|
+
get displayTitle(): string;
|
|
49
|
+
ngOnInit(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Navigates to the previous breadcrumb (parent route).
|
|
52
|
+
* @param fallbackUrl - URL to navigate to when no parent exists (default: homeRoute).
|
|
53
|
+
*/
|
|
54
|
+
navigateBack(fallbackUrl?: string): void;
|
|
55
|
+
/** @internal */
|
|
56
|
+
private refresh;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiPageHeaderComponent, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiPageHeaderComponent, "ui-page-header", never, { "title": { "alias": "title"; "required": false; }; "homeRoute": { "alias": "homeRoute"; "required": false; }; "showHome": { "alias": "showHome"; "required": false; }; "updateDocumentTitle": { "alias": "updateDocumentTitle"; "required": false; }; "titleSuffix": { "alias": "titleSuffix"; "required": false; }; }, {}, never, never, true, never>;
|
|
59
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ng-ui-system/page-header
|
|
3
|
+
* Types and interfaces for UiPageHeader and UiBreadcrumbService.
|
|
4
|
+
*/
|
|
5
|
+
import { InjectionToken } from '@angular/core';
|
|
6
|
+
/**
|
|
7
|
+
* Single breadcrumb item rendered in the navigation trail.
|
|
8
|
+
*
|
|
9
|
+
* @usageNotes
|
|
10
|
+
* ### Structure
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const item: UiBreadcrumbItem = {
|
|
13
|
+
* label: 'Dashboard',
|
|
14
|
+
* url: '/dashboard',
|
|
15
|
+
* isLast: false,
|
|
16
|
+
* };
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export interface UiBreadcrumbItem {
|
|
20
|
+
/** Display text for the breadcrumb link. */
|
|
21
|
+
label: string;
|
|
22
|
+
/** Navigation URL (Angular Router path). */
|
|
23
|
+
url: string;
|
|
24
|
+
/** Whether this is the last (current) breadcrumb in the trail. */
|
|
25
|
+
isLast: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Internal route configuration stored by UiBreadcrumbService.
|
|
29
|
+
* Built from Angular route `data` properties.
|
|
30
|
+
*
|
|
31
|
+
* @usageNotes
|
|
32
|
+
* ### Route data convention
|
|
33
|
+
* ```typescript
|
|
34
|
+
* {
|
|
35
|
+
* path: 'users/:userId',
|
|
36
|
+
* data: {
|
|
37
|
+
* id: 'user-detail',
|
|
38
|
+
* title: 'Dettaglio utente',
|
|
39
|
+
* breadcrumbs: ['users-list'],
|
|
40
|
+
* },
|
|
41
|
+
* component: UserDetailComponent,
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export interface UiBreadcrumbConfig {
|
|
46
|
+
/** Unique route identifier (from `route.data.id`). */
|
|
47
|
+
id: string;
|
|
48
|
+
/** Resolved route path pattern (may contain `:param` placeholders). */
|
|
49
|
+
path: string;
|
|
50
|
+
/** Display label (from `route.data.title` or fallback). */
|
|
51
|
+
label: string;
|
|
52
|
+
/** Ordered array of parent route IDs for building the breadcrumb chain. */
|
|
53
|
+
parentIds: string[];
|
|
54
|
+
/** Fully resolved URL captured at navigation time. */
|
|
55
|
+
fullPath?: string;
|
|
56
|
+
/** Raw route data metadata. */
|
|
57
|
+
metadata?: Record<string, any>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Function signature for resolving route parameter values to human-readable labels.
|
|
61
|
+
*
|
|
62
|
+
* Consumers can provide a custom implementation via `UI_BREADCRUMB_LABEL_RESOLVER`
|
|
63
|
+
* to translate cryptic parameter values (e.g. UUIDs, slugs) into user-friendly text.
|
|
64
|
+
*
|
|
65
|
+
* @param paramName - The route parameter name (e.g. `'userId'`).
|
|
66
|
+
* @param paramValue - The raw parameter value from the URL (e.g. `'abc-123'`).
|
|
67
|
+
* @returns A human-readable label, or the original value if no mapping exists.
|
|
68
|
+
*
|
|
69
|
+
* @usageNotes
|
|
70
|
+
* ### Custom resolver
|
|
71
|
+
* ```typescript
|
|
72
|
+
* const myResolver: UiLabelResolverFn = (name, value) => {
|
|
73
|
+
* if (name === 'status') {
|
|
74
|
+
* return { pending: 'In attesa', active: 'Attivo' }[value] ?? value;
|
|
75
|
+
* }
|
|
76
|
+
* return value;
|
|
77
|
+
* };
|
|
78
|
+
*
|
|
79
|
+
* providers: [
|
|
80
|
+
* { provide: UI_BREADCRUMB_LABEL_RESOLVER, useValue: myResolver },
|
|
81
|
+
* ]
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export type UiLabelResolverFn = (paramName: string, paramValue: string) => string;
|
|
85
|
+
/**
|
|
86
|
+
* Injection token for providing a custom label resolver to UiBreadcrumbService.
|
|
87
|
+
*
|
|
88
|
+
* When not provided, parameters are displayed as-is (identity function).
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* // In your app.config.ts or module providers:
|
|
93
|
+
* { provide: UI_BREADCRUMB_LABEL_RESOLVER, useValue: myLabelResolver }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export declare const UI_BREADCRUMB_LABEL_RESOLVER: InjectionToken<UiLabelResolverFn>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
+
import { PageEvent } from '@angular/material/paginator';
|
|
3
|
+
import { UiTableColumn, UiTableSortEvent, UiTablePageEvent } from './table.types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Tabella paginata standalone con ordinamento, colonne sticky,
|
|
7
|
+
* ellipsis automatica, stato di caricamento e template personalizzabili.
|
|
8
|
+
*
|
|
9
|
+
* Progettata per paginazione server-side: emette eventi di cambio pagina
|
|
10
|
+
* e ordinamento che il componente genitore gestisce per il recupero dati.
|
|
11
|
+
*
|
|
12
|
+
* @selector ui-paginated-table
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```html
|
|
16
|
+
* <ui-paginated-table
|
|
17
|
+
* [data]="users"
|
|
18
|
+
* [columns]="columns"
|
|
19
|
+
* [totalItems]="totalUsers"
|
|
20
|
+
* [pageSize]="10"
|
|
21
|
+
* [loading]="isLoading"
|
|
22
|
+
* (pageChange)="onPageChange($event)"
|
|
23
|
+
* (sortChange)="onSort($event)"
|
|
24
|
+
* (rowClick)="onUserClick($event)"
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class UiPaginatedTableComponent {
|
|
29
|
+
/** @internal Identificatore univoco per l'istanza. */
|
|
30
|
+
readonly tableId: string;
|
|
31
|
+
/** Array di righe da visualizzare nella pagina corrente. */
|
|
32
|
+
data: Record<string, any>[];
|
|
33
|
+
/** Definizione delle colonne della tabella. */
|
|
34
|
+
columns: UiTableColumn[];
|
|
35
|
+
/** Numero totale di elementi (per la paginazione server-side). */
|
|
36
|
+
totalItems: number;
|
|
37
|
+
/** Numero di righe per pagina. */
|
|
38
|
+
pageSize: number;
|
|
39
|
+
/** Opzioni selezionabili per il numero di righe per pagina. */
|
|
40
|
+
pageSizeOptions: number[];
|
|
41
|
+
/** Indice della pagina corrente (0-based). */
|
|
42
|
+
pageIndex: number;
|
|
43
|
+
/** Mostra il paginatore sotto la tabella. */
|
|
44
|
+
showPaginator: boolean;
|
|
45
|
+
/** Mostra l'overlay di caricamento sopra la tabella. */
|
|
46
|
+
loading: boolean;
|
|
47
|
+
/** Messaggio visualizzato quando non ci sono dati. */
|
|
48
|
+
emptyMessage: string;
|
|
49
|
+
/** Template personalizzato per lo stato vuoto. */
|
|
50
|
+
emptyTemplate: TemplateRef<unknown> | null;
|
|
51
|
+
/** Emesso quando l'utente cambia pagina o numero di righe. */
|
|
52
|
+
pageChange: EventEmitter<UiTablePageEvent>;
|
|
53
|
+
/** Emesso quando l'utente ordina una colonna. */
|
|
54
|
+
sortChange: EventEmitter<UiTableSortEvent>;
|
|
55
|
+
/** Emesso quando l'utente clicca su una riga. */
|
|
56
|
+
rowClick: EventEmitter<Record<string, any>>;
|
|
57
|
+
/** @internal Colonna attualmente ordinata. */
|
|
58
|
+
currentSortColumn: string | null;
|
|
59
|
+
/** @internal Direzione ordinamento corrente. */
|
|
60
|
+
currentSortDirection: 'asc' | 'desc' | null;
|
|
61
|
+
/** @internal Gestisce il click su un'intestazione di colonna. */
|
|
62
|
+
onHeaderClick(col: UiTableColumn): void;
|
|
63
|
+
/** @internal Indica se la colonna e attualmente ordinata. */
|
|
64
|
+
isColumnSorted(col: UiTableColumn): boolean;
|
|
65
|
+
/** @internal Attributo aria-sort per accessibilita. */
|
|
66
|
+
getAriaSort(col: UiTableColumn): string | null;
|
|
67
|
+
/** @internal Gestisce il cambio pagina dal MatPaginator. */
|
|
68
|
+
onPageChange(event: PageEvent): void;
|
|
69
|
+
/** @internal Gestisce il click su una riga. */
|
|
70
|
+
onRowClick(row: Record<string, any>): void;
|
|
71
|
+
/** @internal Track function per il loop @for sulle righe. */
|
|
72
|
+
trackRow(index: number, row: Record<string, any>): unknown;
|
|
73
|
+
/** @internal Verifica se il testo deve essere troncato. */
|
|
74
|
+
shouldTruncate(value: unknown, col: UiTableColumn): boolean;
|
|
75
|
+
/** @internal Tronca il testo con ellipsis. */
|
|
76
|
+
truncateText(value: unknown, col: UiTableColumn): string;
|
|
77
|
+
/** @internal Classi CSS per l'header di colonna. */
|
|
78
|
+
getHeaderClasses(col: UiTableColumn): string;
|
|
79
|
+
/** @internal Classi CSS per una cella. */
|
|
80
|
+
getCellClasses(col: UiTableColumn): string;
|
|
81
|
+
/** @internal Calcola la prossima direzione nel ciclo asc -> desc -> null. */
|
|
82
|
+
private nextSortDirection;
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiPaginatedTableComponent, never>;
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiPaginatedTableComponent, "ui-paginated-table", never, { "data": { "alias": "data"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; }, { "pageChange": "pageChange"; "sortChange": "sortChange"; "rowClick": "rowClick"; }, never, never, true, never>;
|
|
85
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ng-ui-system/table
|
|
3
|
+
* Tipi e interfacce per UiPaginatedTable.
|
|
4
|
+
*/
|
|
5
|
+
import { TemplateRef } from '@angular/core';
|
|
6
|
+
/**
|
|
7
|
+
* Definizione di una colonna della tabella.
|
|
8
|
+
*
|
|
9
|
+
* @usageNotes
|
|
10
|
+
* ### Colonna testuale semplice
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const col: UiTableColumn = {
|
|
13
|
+
* property: 'name',
|
|
14
|
+
* header: 'Nome',
|
|
15
|
+
* sortable: true,
|
|
16
|
+
* };
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* ### Colonna con template personalizzato
|
|
20
|
+
* ```typescript
|
|
21
|
+
* const col: UiTableColumn = {
|
|
22
|
+
* property: 'status',
|
|
23
|
+
* header: 'Stato',
|
|
24
|
+
* template: statusTemplate,
|
|
25
|
+
* };
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export interface UiTableColumn {
|
|
29
|
+
/** Chiave della proprieta nell'oggetto riga. */
|
|
30
|
+
property: string;
|
|
31
|
+
/** Testo dell'intestazione della colonna. */
|
|
32
|
+
header: string;
|
|
33
|
+
/**
|
|
34
|
+
* Template personalizzato per la cella.
|
|
35
|
+
* Il contesto fornisce `$implicit` (riga) e `column` (definizione colonna).
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```html
|
|
39
|
+
* <ng-template #statusTpl let-row>
|
|
40
|
+
* <span [class]="'badge--' + row.status">{{ row.status }}</span>
|
|
41
|
+
* </ng-template>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
template?: TemplateRef<unknown>;
|
|
45
|
+
/** Rende la colonna ordinabile con click sull'header. @default false */
|
|
46
|
+
sortable?: boolean;
|
|
47
|
+
/** Tipo di ordinamento per la logica client-side. @default 'text' */
|
|
48
|
+
sortType?: 'text' | 'number' | 'date';
|
|
49
|
+
/** Fissa la colonna a destra durante lo scroll orizzontale. @default false */
|
|
50
|
+
sticky?: boolean;
|
|
51
|
+
/** Tronca il testo oltre maxLength caratteri con ellipsis e tooltip. @default false */
|
|
52
|
+
ellipsis?: boolean;
|
|
53
|
+
/** Lunghezza massima del testo prima dell'ellipsis. @default 50 */
|
|
54
|
+
maxLength?: number;
|
|
55
|
+
/** Larghezza CSS personalizzata della colonna (es. '120px', '20%'). */
|
|
56
|
+
width?: string;
|
|
57
|
+
/** Allineamento del testo nella colonna. @default 'left' */
|
|
58
|
+
align?: 'left' | 'center' | 'right';
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Evento di ordinamento emesso quando l'utente clicca su un'intestazione ordinabile.
|
|
62
|
+
*/
|
|
63
|
+
export interface UiTableSortEvent {
|
|
64
|
+
/** Proprieta della colonna ordinata. */
|
|
65
|
+
column: string;
|
|
66
|
+
/** Direzione dell'ordinamento. `null` indica ordinamento rimosso. */
|
|
67
|
+
direction: 'asc' | 'desc' | null;
|
|
68
|
+
/** Tipo di ordinamento della colonna. */
|
|
69
|
+
sortType: 'text' | 'number' | 'date';
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Evento di cambio pagina emesso dal paginatore.
|
|
73
|
+
*/
|
|
74
|
+
export interface UiTablePageEvent {
|
|
75
|
+
/** Indice della pagina corrente (0-based). */
|
|
76
|
+
pageIndex: number;
|
|
77
|
+
/** Numero di righe per pagina. */
|
|
78
|
+
pageSize: number;
|
|
79
|
+
/** Numero totale di elementi. */
|
|
80
|
+
length: number;
|
|
81
|
+
}
|