@poadio/ui-angular 0.13.0 → 0.14.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poadio/ui-angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^21.2.0",
|
|
6
6
|
"@angular/core": "^21.2.0",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"rxjs": "^7.8.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@poadio/ui-core": "^0.
|
|
23
|
+
"@poadio/ui-core": "^0.3.0",
|
|
24
24
|
"tslib": "^2.3.0"
|
|
25
25
|
},
|
|
26
26
|
"sideEffects": false,
|
|
@@ -2,7 +2,7 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { Signal, InjectionToken, EnvironmentProviders, Provider, ElementRef, TemplateRef, ViewContainerRef, Injector, ComponentRef, OnDestroy, AfterViewInit, Type } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
4
4
|
import * as _poadio_ui_core from '@poadio/ui-core';
|
|
5
|
-
import { UiMessages, UiMessageRef as UiMessageRef$1, UiParams, UiMessageKey, FieldControlProps, NumberState, PasswordState, ColorFormat, ColorHsva, ColorRgba, colorFormat, colorHslToRgb, colorHsvToRgb, colorParse, colorRgbToHsl, colorRgbToHsv, ColorpickerPart, RatingState, RatingEvent, InplaceState, InplaceEvent, SwitchState, CheckboxState, RadioGroupState, RadioItem, ToggleButtonState, SelectGroupItem, SelectOptionItem, SelectState, SelectContext, SelectEvent, SelectStep, StepState, MenuState, DayCell as DayCell$1, FloatingSide, ToastSeverity, ToastItem as ToastItem$1 } from '@poadio/ui-core';
|
|
5
|
+
import { UiMessages, UiMessageRef as UiMessageRef$1, UiParams, UiMessageKey, FieldControlProps, NumberState, PasswordState, ColorFormat, ColorHsva, ColorRgba, colorFormat, colorHslToRgb, colorHsvToRgb, colorParse, colorRgbToHsl, colorRgbToHsv, ColorpickerPart, RatingState, RatingEvent, InplaceState, InplaceEvent, SwitchState, CheckboxState, RadioGroupState, RadioItem, ToggleButtonState, SelectGroupItem, SelectOptionItem, SelectState, SelectContext, SelectEvent, SelectStep, TableFilterMatchMode, StepState, MenuState, TablePanelDraft, DayCell as DayCell$1, FloatingSide, ToastSeverity, ToastItem as ToastItem$1 } from '@poadio/ui-core';
|
|
6
6
|
export { POAD_ICONS, POAD_ICONS_CEREMA, POAD_ICONS_CORE, POAD_ICONS_DATA, POAD_ICONS_FILES, POAD_ICONS_GEO, POAD_ICONS_UI, POAD_ICON_ALIASES, POAD_ICON_CATEGORIES, UI_EN, UI_FR, UiMessageKey, UiMessages, UiParams, addDays, addMonths, addYears, compareDay, daysInMonth, endOfMonth, formatDate, isBetweenDay, isSameDay, isSameMonth, isValidDate, isoOf, isoWeek, localeDateFormat, monthNames, pad2, parseIso, parseWithFormat, startOfDay, startOfMonth, toDate, uiFirstDayOfWeek, uiFormat, uiInterpolate, uiPickForm, uiPlaceholders, uiUses12Hours, weekdayNames } from '@poadio/ui-core';
|
|
7
7
|
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
8
8
|
import { SafeHtml, SafeResourceUrl } from '@angular/platform-browser';
|
|
@@ -1634,7 +1634,8 @@ interface PoadSortMeta {
|
|
|
1634
1634
|
field: string;
|
|
1635
1635
|
order: 1 | -1;
|
|
1636
1636
|
}
|
|
1637
|
-
|
|
1637
|
+
/** Les 19 modes de filtre (`TableFilterMatchMode` du socle). */
|
|
1638
|
+
type PoadFilterMatchMode = TableFilterMatchMode;
|
|
1638
1639
|
interface PoadFilterMeta {
|
|
1639
1640
|
value: unknown;
|
|
1640
1641
|
matchMode?: PoadFilterMatchMode;
|
|
@@ -1657,6 +1658,10 @@ interface PoadLazyLoadEvent {
|
|
|
1657
1658
|
declare function poadCompare(a: unknown, b: unknown): number;
|
|
1658
1659
|
/** Tri stable multi-critères (ne mute pas) : `tableSortRows` du socle, langue de l'environnement d'exécution. */
|
|
1659
1660
|
declare function poadSortData<T>(data: readonly T[], metas: PoadSortMeta[]): T[];
|
|
1661
|
+
/**
|
|
1662
|
+
* Test d'un filtre de colonne sur une valeur : `tableMatch` du socle (19 modes, texte sans accents ni casse, dates au
|
|
1663
|
+
* jour), langue de l'environnement d'exécution (la table, elle, filtre dans la langue de la bibliothèque).
|
|
1664
|
+
*/
|
|
1660
1665
|
declare function poadMatch(value: unknown, filter: unknown, mode?: PoadFilterMatchMode): boolean;
|
|
1661
1666
|
/** Prédicat de filtre ligne (filtre global sur `globalFields` + filtres par colonne) ; null si aucun filtre actif. */
|
|
1662
1667
|
declare function poadRowPredicate<T>(globalFilter: string, globalFields: string[], filters: PoadFilters): ((row: T) => boolean) | null;
|
|
@@ -1933,7 +1938,8 @@ declare class PoadColumnComponent {
|
|
|
1933
1938
|
|
|
1934
1939
|
/**
|
|
1935
1940
|
* <poad-filter-chip label="Statut" value="en ligne, en pause" active removable (removed)="…" (clicked)="…"/>
|
|
1936
|
-
* Chip de filtre de la barre d'outils (pointillé inactif = « + Filtre », plein accent quand actif).
|
|
1941
|
+
* Chip de filtre de la barre d'outils (pointillé inactif = « + Filtre », plein accent quand actif). Tranche 2 de la table :
|
|
1942
|
+
* feuille partagée `@poadio/ui-core/filter-chip.css` (encapsulation désactivée), même DOM que `PoadFilterChip` d'ui-react.
|
|
1937
1943
|
* @atelier ajustement=naturel icone=filter largeur=2 hauteur=1 pose-label=Filtre
|
|
1938
1944
|
*/
|
|
1939
1945
|
declare class PoadFilterChipComponent {
|
|
@@ -1961,7 +1967,7 @@ interface PoadPageEvent {
|
|
|
1961
1967
|
* <poad-paginator [(first)]="first" [(rows)]="rows" [totalRecords]="42" [rowsPerPageOptions]="[10,25,50]" (pageChange)="…"/>
|
|
1962
1968
|
* Remplace p-paginator. Réutilisé par poad-table. `currentPageReportTemplate` (défaut = catalogue `paginator.report`) : {first} {last} {totalRecords} {currentPage} {totalPages} {rows}.
|
|
1963
1969
|
* Calculs (pages, liens avec ellipses, rapport, changement de taille) : machine `paginator` de @poadio/ui-core ; style
|
|
1964
|
-
* partagé : `@poadio/ui-core/paginator.css` (encapsulation désactivée).
|
|
1970
|
+
* partagé : `@poadio/ui-core/paginator.css` (encapsulation désactivée). Taille de page : liste déroulante `poad-select`.
|
|
1965
1971
|
* @atelier icone=arrow-left-right hauteur=1
|
|
1966
1972
|
* @atelier-exemple totalRecords 120
|
|
1967
1973
|
* @atelier-exemple rows 10
|
|
@@ -1974,6 +1980,11 @@ declare class PoadPaginatorComponent {
|
|
|
1974
1980
|
readonly rowsPerPageOptions: _angular_core.InputSignal<number[]>;
|
|
1975
1981
|
/** Non défini = message `paginator.rowsPerPage` du catalogue. */
|
|
1976
1982
|
readonly rowsPerPageLabel: _angular_core.InputSignal<string | undefined>;
|
|
1983
|
+
/** Tailles proposées, pour la liste déroulante (`poad-select`, pas de `<select>` natif). */
|
|
1984
|
+
protected readonly rppOptions: _angular_core.Signal<{
|
|
1985
|
+
label: string;
|
|
1986
|
+
value: number;
|
|
1987
|
+
}[]>;
|
|
1977
1988
|
protected readonly rowsPerPageText: _angular_core.Signal<string>;
|
|
1978
1989
|
readonly pageLinks: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
1979
1990
|
readonly showCurrentPageReport: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -2272,7 +2283,7 @@ interface PoadFilterOperator {
|
|
|
2272
2283
|
}
|
|
2273
2284
|
/** Libellé d'un opérateur dans la langue courante. */
|
|
2274
2285
|
declare function poadOperatorLabel(op: PoadFilterOperator, i18n: Pick<UiI18n, 't'>): string;
|
|
2275
|
-
/** Opérateurs disponibles par type de filtre (ligne de filtres sous l'en-tête, façon AG Grid). */
|
|
2286
|
+
/** Opérateurs disponibles par type de filtre (ligne de filtres sous l'en-tête, façon AG Grid) : ceux du socle. */
|
|
2276
2287
|
declare const POAD_FILTER_OPERATORS: Record<PoadFilterKind, PoadFilterOperator[]>;
|
|
2277
2288
|
declare function poadFilterKindOf(c: PoadColumnComponent): PoadFilterKind;
|
|
2278
2289
|
declare function poadFilterOperators(c: PoadColumnComponent): PoadFilterOperator[];
|
|
@@ -3470,6 +3481,7 @@ declare class PoadTableComponent<T = Record<string, unknown>> extends PoadTableB
|
|
|
3470
3481
|
private readonly colDefs;
|
|
3471
3482
|
private def;
|
|
3472
3483
|
private readonly globalFields;
|
|
3484
|
+
/** Prédicat des filtres (modèle du socle : recherche globale + filtres de colonne, langue de la bibliothèque) ; aucun en `lazy`. */
|
|
3473
3485
|
private readonly rowPredicate;
|
|
3474
3486
|
/** Adaptateur de nœuds (arbre / groupé), null en mode plat. */
|
|
3475
3487
|
readonly adapter: _angular_core.Signal<PoadTreeAdapter<T> | null>;
|
|
@@ -3477,10 +3489,10 @@ declare class PoadTableComponent<T = Record<string, unknown>> extends PoadTableB
|
|
|
3477
3489
|
private readonly expandedGroupSet;
|
|
3478
3490
|
/** Nœuds visibles (mode hiérarchique). */
|
|
3479
3491
|
readonly nodes: _angular_core.Signal<PoadTreeNode<T>[]>;
|
|
3492
|
+
/** Pipeline du socle : filtre → tri → page (en hiérarchique, l'adaptateur a déjà filtré et trié ; rien de local en lazy). */
|
|
3493
|
+
private readonly view;
|
|
3480
3494
|
/** Données filtrées (identiques à `value` en lazy ; en hiérarchique : lignes conservées à plat). */
|
|
3481
3495
|
readonly filteredData: _angular_core.Signal<T[]>;
|
|
3482
|
-
/** Données triées (à plat, ordre d'affichage). */
|
|
3483
|
-
private readonly view;
|
|
3484
3496
|
readonly sortedData: _angular_core.Signal<T[]>;
|
|
3485
3497
|
/** Lignes affichées (page courante ; en hiérarchique : lignes réelles visibles). */
|
|
3486
3498
|
/** Pagination locale active (désactivée en virtual scroll). */
|
|
@@ -3529,6 +3541,8 @@ declare class PoadTableComponent<T = Record<string, unknown>> extends PoadTableB
|
|
|
3529
3541
|
protected readonly grandTotal: _angular_core.Signal<Record<string, unknown>>;
|
|
3530
3542
|
protected readonly showGrandTotalRow: _angular_core.Signal<boolean>;
|
|
3531
3543
|
protected readonly activeFilterCount: _angular_core.Signal<number>;
|
|
3544
|
+
/** Pied « N lignes · M filtrées · K sélectionnées » (textes du catalogue). */
|
|
3545
|
+
protected readonly rowCountText: _angular_core.Signal<string>;
|
|
3532
3546
|
private readonly treeColumnId;
|
|
3533
3547
|
private readonly selectedKeys;
|
|
3534
3548
|
readonly selectedCount: _angular_core.Signal<number>;
|
|
@@ -3574,9 +3588,12 @@ declare class PoadTableComponent<T = Record<string, unknown>> extends PoadTableB
|
|
|
3574
3588
|
sort(c: PoadColumnComponent, event?: Event): void;
|
|
3575
3589
|
/** Écrit l'état de tri (champ, ordre, liste), l'émet, et redemande les données en `lazy`. */
|
|
3576
3590
|
private applySort;
|
|
3591
|
+
/** Lance `apply` tout de suite, ou après le délai des filtres (`filterDelay`, la dernière frappe l'emporte). */
|
|
3592
|
+
private debounce;
|
|
3577
3593
|
protected onSearch(text: string, immediate?: boolean): void;
|
|
3578
3594
|
protected filterValue(c: PoadColumnComponent): unknown;
|
|
3579
3595
|
protected filterFn(c: PoadColumnComponent): (value: unknown, matchMode?: PoadFilterMatchMode) => void;
|
|
3596
|
+
private debounceColumn;
|
|
3580
3597
|
protected setFilterDebounced(c: PoadColumnComponent, v: unknown): void;
|
|
3581
3598
|
/** Pose un filtre de colonne (matchMode : explicite > opérateur courant de la colonne > défaut selon le type). */
|
|
3582
3599
|
setFilter(c: PoadColumnComponent, value: unknown, matchMode?: PoadFilterMatchMode): void;
|
|
@@ -3656,6 +3673,11 @@ declare class PoadTableComponent<T = Record<string, unknown>> extends PoadTableB
|
|
|
3656
3673
|
protected readonly inMenu: _angular_core.Signal<PoadMenuComponent | undefined>;
|
|
3657
3674
|
protected readonly inMenuItems: _angular_core.Signal<PoadMenuItem[]>;
|
|
3658
3675
|
protected filterKind(c: PoadColumnComponent): _poadio_ui_angular.PoadFilterKind;
|
|
3676
|
+
/** Oui / non d'un filtre booléen (liste déroulante de la bibliothèque, libellés du catalogue). */
|
|
3677
|
+
protected readonly booleanOptions: _angular_core.Signal<{
|
|
3678
|
+
label: string;
|
|
3679
|
+
value: boolean;
|
|
3680
|
+
}[]>;
|
|
3659
3681
|
protected filterOp(c: PoadColumnComponent): PoadFilterOperator;
|
|
3660
3682
|
protected opLabel(op: PoadFilterOperator): string;
|
|
3661
3683
|
protected hasColFilter(c: PoadColumnComponent): boolean;
|
|
@@ -3847,13 +3869,8 @@ declare class PoadTableSelection<T> {
|
|
|
3847
3869
|
|
|
3848
3870
|
type PoadTablePanelTab = 'columns' | 'filters' | 'groups' | 'values';
|
|
3849
3871
|
type PoadAggregateFn = 'sum' | 'avg' | 'min' | 'max' | 'count';
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
a: unknown;
|
|
3853
|
-
b: unknown;
|
|
3854
|
-
set: Set<unknown>;
|
|
3855
|
-
open: boolean;
|
|
3856
|
-
}
|
|
3872
|
+
/** Brouillon de l'éditeur d'une colonne (modèle `tablePanelDraft…` du socle). */
|
|
3873
|
+
type FilterDraft = TablePanelDraft;
|
|
3857
3874
|
/**
|
|
3858
3875
|
* Panneau latéral d'une poad-table (style AG Grid) : rail d'onglets verticaux + contenu.
|
|
3859
3876
|
* Colonnes : recherche, « tout », liste ordonnable (drag) et cochable ; Groupes : zone de dépôt + chips ;
|
|
@@ -3865,6 +3882,9 @@ interface FilterDraft {
|
|
|
3865
3882
|
* </div>
|
|
3866
3883
|
* ou dans `<poad-split ratio="1fr auto">` / `<poad-sidebar>` de la couche layout.
|
|
3867
3884
|
* Sous `md` (fenêtre) le panneau devient un overlay à droite, fermé par défaut.
|
|
3885
|
+
* Tranche 2 de la table : modèle `table.panel` d'@poadio/ui-core (onglets du rail, motif « tabs » de WAI-ARIA à focus
|
|
3886
|
+
* itinérant — ↑ ↓ Début Fin entre onglets, Entrée / Espace ouvre ou referme —, colonnes, brouillons des filtres) ;
|
|
3887
|
+
* feuille partagée `@poadio/ui-core/table-panel.css` (encapsulation désactivée).
|
|
3868
3888
|
* @atelier icone=table-properties
|
|
3869
3889
|
*/
|
|
3870
3890
|
declare class PoadTablePanelComponent<T = unknown> {
|
|
@@ -3883,6 +3903,7 @@ declare class PoadTablePanelComponent<T = unknown> {
|
|
|
3883
3903
|
readonly groupsChange: _angular_core.OutputEmitterRef<string[]>;
|
|
3884
3904
|
readonly aggregatesChange: _angular_core.OutputEmitterRef<PoadAggregates<T>>;
|
|
3885
3905
|
readonly filtersChange: _angular_core.OutputEmitterRef<PoadFilters>;
|
|
3906
|
+
private readonly host;
|
|
3886
3907
|
protected readonly bodyId: string;
|
|
3887
3908
|
protected readonly colsListId: string;
|
|
3888
3909
|
protected readonly groupsListId: string;
|
|
@@ -3890,18 +3911,17 @@ declare class PoadTablePanelComponent<T = unknown> {
|
|
|
3890
3911
|
protected readonly pickerOpen: _angular_core.WritableSignal<boolean>;
|
|
3891
3912
|
protected readonly pickField: _angular_core.WritableSignal<unknown>;
|
|
3892
3913
|
protected readonly pickFn: _angular_core.WritableSignal<unknown>;
|
|
3893
|
-
private ops;
|
|
3894
3914
|
protected readonly textOps: _angular_core.Signal<{
|
|
3895
3915
|
label: string;
|
|
3896
|
-
value:
|
|
3916
|
+
value: _poadio_ui_core.TableFilterMatchMode;
|
|
3897
3917
|
}[]>;
|
|
3898
3918
|
protected readonly numOps: _angular_core.Signal<{
|
|
3899
3919
|
label: string;
|
|
3900
|
-
value:
|
|
3920
|
+
value: _poadio_ui_core.TableFilterMatchMode;
|
|
3901
3921
|
}[]>;
|
|
3902
3922
|
protected readonly dateOps: _angular_core.Signal<{
|
|
3903
3923
|
label: string;
|
|
3904
|
-
value:
|
|
3924
|
+
value: _poadio_ui_core.TableFilterMatchMode;
|
|
3905
3925
|
}[]>;
|
|
3906
3926
|
protected readonly boolOpts: _angular_core.Signal<{
|
|
3907
3927
|
label: string;
|
|
@@ -3920,6 +3940,21 @@ declare class PoadTablePanelComponent<T = unknown> {
|
|
|
3920
3940
|
label: string;
|
|
3921
3941
|
icon: string;
|
|
3922
3942
|
};
|
|
3943
|
+
protected tabProps(t: PoadTablePanelTab): {
|
|
3944
|
+
readonly id: `${string}-tab-columns` | `${string}-tab-filters` | `${string}-tab-groups` | `${string}-tab-values`;
|
|
3945
|
+
readonly role: "tab";
|
|
3946
|
+
readonly 'aria-selected': "true" | "false";
|
|
3947
|
+
readonly 'aria-controls': string;
|
|
3948
|
+
readonly tabindex: 0 | -1;
|
|
3949
|
+
readonly selected: boolean;
|
|
3950
|
+
};
|
|
3951
|
+
protected readonly bodyProps: _angular_core.Signal<{
|
|
3952
|
+
readonly id: string;
|
|
3953
|
+
readonly role: "tabpanel";
|
|
3954
|
+
readonly 'aria-labelledby': `${string}-tab-columns` | `${string}-tab-filters` | `${string}-tab-groups` | `${string}-tab-values`;
|
|
3955
|
+
}>;
|
|
3956
|
+
/** ↑ ↓ Début Fin entre les onglets du rail (le focus suit ; Entrée / Espace ouvre l'onglet). */
|
|
3957
|
+
protected onTabKey(index: number, e: KeyboardEvent): void;
|
|
3923
3958
|
/** Sections Groupes/Valeurs affichées sous l'onglet Colonnes quand elles ne sont PAS des onglets à part. */
|
|
3924
3959
|
protected has(t: PoadTablePanelTab): boolean;
|
|
3925
3960
|
protected onTab(t: PoadTablePanelTab): void;
|
|
@@ -3929,6 +3964,7 @@ declare class PoadTablePanelComponent<T = unknown> {
|
|
|
3929
3964
|
protected readonly orderedCols: _angular_core.Signal<PoadColumnComponent[]>;
|
|
3930
3965
|
protected readonly toggleableCols: _angular_core.Signal<PoadColumnComponent[]>;
|
|
3931
3966
|
protected readonly filteredCols: _angular_core.Signal<PoadColumnComponent[]>;
|
|
3967
|
+
private readonly allState;
|
|
3932
3968
|
protected readonly visibleCount: _angular_core.Signal<number>;
|
|
3933
3969
|
protected readonly allVisible: _angular_core.Signal<boolean>;
|
|
3934
3970
|
protected readonly someVisible: _angular_core.Signal<boolean>;
|
|
@@ -3961,8 +3997,8 @@ declare class PoadTablePanelComponent<T = unknown> {
|
|
|
3961
3997
|
removeAgg(field: string): void;
|
|
3962
3998
|
protected readonly filterableCols: _angular_core.Signal<PoadColumnComponent[]>;
|
|
3963
3999
|
protected readonly activeFilterCount: _angular_core.Signal<number>;
|
|
4000
|
+
private def;
|
|
3964
4001
|
protected kindOf(c: PoadColumnComponent): 'text' | 'number' | 'date' | 'select' | 'boolean';
|
|
3965
|
-
private defaultOp;
|
|
3966
4002
|
protected draft(c: PoadColumnComponent): FilterDraft;
|
|
3967
4003
|
private patch;
|
|
3968
4004
|
private syncDrafts;
|