@poadio/ui-angular 0.0.0-stage → 0.12.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,98 @@
1
1
  {
2
2
  "name": "@poadio/ui-angular",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.12.0",
4
+ "peerDependencies": {
5
+ "@angular/common": "^21.2.0",
6
+ "@angular/core": "^21.2.0",
7
+ "@angular/cdk": "^21.2.0",
8
+ "@angular/forms": "^21.2.0",
9
+ "@angular/router": "^21.2.0",
10
+ "@angular/platform-browser": "^21.2.0",
11
+ "maplibre-gl": ">=4.0.0",
12
+ "chart.js": ">=4.0.0",
13
+ "monaco-editor": "^0.52.0",
14
+ "@editorjs/editorjs": "^2.31.0",
15
+ "@editorjs/header": "^2.8.0",
16
+ "@editorjs/underline": "^1.2.0",
17
+ "@editorjs/delimiter": "^1.4.0",
18
+ "@calumk/editorjs-codecup": "^1.3.0",
19
+ "editorjs-alert": "^1.1.0",
20
+ "rxjs": "^7.8.0"
21
+ },
22
+ "dependencies": {
23
+ "@poadio/ui-core": "^0.1.0",
24
+ "tslib": "^2.3.0"
25
+ },
26
+ "sideEffects": false,
27
+ "peerDependenciesMeta": {
28
+ "maplibre-gl": {
29
+ "optional": true
30
+ },
31
+ "chart.js": {
32
+ "optional": true
33
+ },
34
+ "monaco-editor": {
35
+ "optional": true
36
+ },
37
+ "@editorjs/editorjs": {
38
+ "optional": true
39
+ },
40
+ "@editorjs/header": {
41
+ "optional": true
42
+ },
43
+ "@editorjs/underline": {
44
+ "optional": true
45
+ },
46
+ "@editorjs/delimiter": {
47
+ "optional": true
48
+ },
49
+ "@calumk/editorjs-codecup": {
50
+ "optional": true
51
+ },
52
+ "editorjs-alert": {
53
+ "optional": true
54
+ }
55
+ },
56
+ "description": "Angular component library of poad (fork of @cadriciel/ui 0.10.0 + @cadriciel/core 0.2.0): forms, grid-level table, responsive layout, overlays, MapLibre map, planning (taskboard), in-house icons. Secondary entry point @poadio/ui-angular/core (MenuService, ThemeService…).",
57
+ "license": "MIT",
58
+ "author": "poad — Stéphane Zuccatti",
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "git+https://github.com/poadio/ui.git",
62
+ "directory": "packages/ui-angular"
63
+ },
64
+ "keywords": [
65
+ "angular",
66
+ "components",
67
+ "ui",
68
+ "poad",
69
+ "i18n",
70
+ "maplibre",
71
+ "table"
72
+ ],
73
+ "publishConfig": {
74
+ "access": "public"
75
+ },
76
+ "exports": {
77
+ "./styles/tokens.scss": "./styles/tokens.scss",
78
+ "./styles/base.scss": "./styles/base.scss",
79
+ "./package.json": {
80
+ "default": "./package.json"
81
+ },
82
+ ".": {
83
+ "types": "./types/poadio-ui-angular.d.ts",
84
+ "default": "./fesm2022/poadio-ui-angular.mjs"
85
+ },
86
+ "./core": {
87
+ "types": "./types/poadio-ui-angular-core.d.ts",
88
+ "default": "./fesm2022/poadio-ui-angular-core.mjs"
89
+ }
90
+ },
91
+ "homepage": "https://github.com/poadio/ui/tree/main/packages/ui-angular#readme",
92
+ "bugs": {
93
+ "url": "https://github.com/poadio/ui/issues"
94
+ },
95
+ "module": "fesm2022/poadio-ui-angular.mjs",
96
+ "typings": "types/poadio-ui-angular.d.ts",
97
+ "type": "module"
6
98
  }
@@ -0,0 +1,5 @@
1
+ /* ui-angular — base : reset ciblé + focus + motion. Importé UNE fois (styles.scss du studio). */
2
+ @import '@angular/cdk/overlay-prebuilt.css';
3
+ @import './tokens';
4
+ /* Focus, mouvement réduit et `.poad-input` : source unique dans @poadio/ui-core (`base.css`, CSS pur, inclus par Sass). */
5
+ @import '@poadio/ui-core/base';
@@ -0,0 +1,7 @@
1
+ /*
2
+ * ui-angular — tokens `--poad-*` et thèmes clair / sombre.
3
+ * La source unique est @poadio/ui-core (`tokens.css`, CSS pur) : ce fichier ne fait que l'inclure, pour que
4
+ * `@use '@poadio/ui-angular/styles/tokens'` continue de fonctionner. Sans extension, Sass INCLUT le CSS
5
+ * (avec `.css`, il laisserait un `@import` à résoudre par le navigateur).
6
+ */
7
+ @import '@poadio/ui-core/tokens';
@@ -0,0 +1,510 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, WritableSignal, Signal } from '@angular/core';
3
+ import { HttpClient, HttpResponse, HttpEvent } from '@angular/common/http';
4
+ import * as rxjs from 'rxjs';
5
+ import { Observable, Subject, OperatorFunction } from 'rxjs';
6
+
7
+ interface CadricielAuthEnvironment {
8
+ orionUrl?: string;
9
+ clientId?: string;
10
+ redirectUri?: string;
11
+ deconnexionUri?: string;
12
+ redirectPage?: string;
13
+ homePath?: string;
14
+ serverApiUrl?: string;
15
+ }
16
+ declare const CADRICIEL_CORE_CONFIG: InjectionToken<CadricielAuthEnvironment>;
17
+ declare const CADRICIEL_AUTH_ENV: InjectionToken<CadricielAuthEnvironment>;
18
+
19
+ declare class ApplicationConfigService {
20
+ private _endpointPrefix;
21
+ private _endpointPrefixApiOpen;
22
+ get endpointPrefix(): string;
23
+ set endpointPrefix(value: string);
24
+ get endpointPrefixApiOpen(): string;
25
+ set endpointPrefixApiOpen(value: string);
26
+ getEndpointFor(api: string): string;
27
+ getEndpointForApiOpen(api: string): string;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationConfigService, never>;
29
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationConfigService>;
30
+ }
31
+
32
+ interface User {
33
+ email: string;
34
+ nom: string;
35
+ prenom: string;
36
+ id: number;
37
+ idDirectionCourante: number;
38
+ roleActifList: string[];
39
+ cadriciel: string;
40
+ nbDirections: number;
41
+ family_name?: string;
42
+ given_name?: string;
43
+ }
44
+
45
+ interface Claims {
46
+ name: string;
47
+ preferred_username: string;
48
+ department: string;
49
+ given_name: string;
50
+ family_name: string;
51
+ email: string;
52
+ adminDisplayName: string;
53
+ }
54
+
55
+ declare class UserService {
56
+ private httpClient;
57
+ private applicationConfigService;
58
+ get info(): any;
59
+ private _currentUser;
60
+ readonly currentUser: i0.Signal<User | undefined>;
61
+ setCurrentUser(value: User | undefined): void;
62
+ constructor(httpClient: HttpClient, applicationConfigService: ApplicationConfigService);
63
+ getCurrentUser(): Observable<HttpResponse<User>>;
64
+ getAvatar(): Observable<HttpResponse<Blob>>;
65
+ userHasRole(...roles: any[]): boolean;
66
+ addInfoFromClaims(identityClaims: Claims): void;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
68
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
69
+ }
70
+
71
+ declare class RealtimeService {
72
+ private config;
73
+ private wsBaseUrl;
74
+ private sockets;
75
+ private messageSubjects;
76
+ constructor(config: CadricielAuthEnvironment);
77
+ /**
78
+ * Ouvre un canal WebSocket et retourne un objet contrôleur pour ce canal.
79
+ */
80
+ channel(channel: string, params?: {
81
+ [key: string]: any;
82
+ }, isEdge?: boolean): ChannelController;
83
+ private connect;
84
+ private resolveWsBaseUrl;
85
+ static ɵfac: i0.ɵɵFactoryDeclaration<RealtimeService, [{ optional: true; }]>;
86
+ static ɵprov: i0.ɵɵInjectableDeclaration<RealtimeService>;
87
+ }
88
+ /**
89
+ * Contrôleur pour interagir avec un canal WebSocket spécifique.
90
+ */
91
+ declare class ChannelController {
92
+ private channel;
93
+ private sockets;
94
+ private messageSubjects;
95
+ constructor(channel: string, sockets: {
96
+ [channel: string]: WebSocket;
97
+ }, messageSubjects: {
98
+ [channel: string]: Subject<any>;
99
+ });
100
+ /**
101
+ * Écoute les événements spécifiques sur le canal.
102
+ */
103
+ on(eventType: string, callback: (data: any) => void): ChannelController;
104
+ /**
105
+ * Envoie un message sur ce canal.
106
+ */
107
+ send(type: string, payload?: any): void;
108
+ /**
109
+ * Ferme la connexion pour ce canal.
110
+ */
111
+ disconnect(): void;
112
+ private getSubject;
113
+ }
114
+
115
+ type AggregateFunction = 'min' | 'max' | 'avg' | 'sum' | 'count';
116
+ interface Aggregate {
117
+ function: AggregateFunction;
118
+ column: string;
119
+ alias: string;
120
+ }
121
+ type AggregateResult<T extends Record<string, any>> = {
122
+ [K in keyof T]: T[K];
123
+ };
124
+ /**
125
+ * CLASSE AGGREGATE BUILDER (optionnelle)
126
+ *
127
+ * Permet une construction fluide et type-safe des agrégations
128
+ */
129
+ declare class AggregateBuilder<T extends Indexable, R = any> {
130
+ private queryService;
131
+ private aggregates;
132
+ private groupByColumns;
133
+ private havingCondition?;
134
+ constructor(queryService: QueryService<T>);
135
+ min(column: string, alias: string): this;
136
+ max(column: string, alias: string): this;
137
+ avg(column: string, alias: string): this;
138
+ sum(column: string, alias: string): this;
139
+ count(column: string, alias: string): this;
140
+ groupBy(columns: string[]): this;
141
+ having(condition: string): this;
142
+ execute(): Observable<R>;
143
+ }
144
+ interface Indexable {
145
+ [key: string]: any;
146
+ }
147
+ type ComparisonOperator = 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'like' | 'ilike' | 'in' | 'is' | 'not.is';
148
+ type LogicalOperator = 'and' | 'or';
149
+ interface Condition {
150
+ field: string;
151
+ operator: ComparisonOperator;
152
+ value: any;
153
+ }
154
+ interface ConditionGroup {
155
+ operator: LogicalOperator;
156
+ conditions: (Condition | ConditionGroup)[];
157
+ }
158
+ declare class QueryService<T extends Indexable = any> {
159
+ private http;
160
+ private realtime?;
161
+ private config?;
162
+ private baseUrl;
163
+ private schemaName;
164
+ private tableName;
165
+ private params;
166
+ private whereStack;
167
+ private selectFields;
168
+ private includeRelations;
169
+ private orderByFields;
170
+ constructor(http: HttpClient, realtime?: RealtimeService | undefined, config?: CadricielAuthEnvironment | undefined);
171
+ private resolveModelsBaseUrl;
172
+ private clone;
173
+ from(schemaTable: string): QueryService<T>;
174
+ on(events: 'INSERT' | 'UPDATE' | 'DELETE' | '*' | string | Array<'INSERT' | 'UPDATE' | 'DELETE'>, callback: (payload: any) => void): QueryService<T>;
175
+ select(...fields: string[]): QueryService<T>;
176
+ limit(limit: number): QueryService<T>;
177
+ offset(offset: number): QueryService<T>;
178
+ where(field: string, operator: ComparisonOperator, value: any): QueryService<T>;
179
+ and(...conditions: Condition[]): QueryService<T>;
180
+ or(...conditions: Condition[]): QueryService<T>;
181
+ include(...relations: string[]): QueryService<T>;
182
+ orderBy(field: string, direction?: 'asc' | 'desc'): QueryService<T>;
183
+ clearOrderBy(): QueryService<T>;
184
+ clearSelect(): QueryService<T>;
185
+ clearInclude(): QueryService<T>;
186
+ clearWhere(): QueryService<T>;
187
+ private buildWhereString;
188
+ private prepareRequest;
189
+ findOne(): Observable<T | null>;
190
+ count(): Observable<number>;
191
+ asObservable(): Observable<T[]>;
192
+ pipe<R extends Indexable>(operations: OperatorFunction<T[], any>[]): QueryService<R>;
193
+ forEach(fn: (value: T[]) => void): void;
194
+ subscribe(callback: {
195
+ next: (data: T[]) => void;
196
+ error?: (err: any) => void;
197
+ complete?: () => void;
198
+ }): void;
199
+ first(): Observable<T | undefined>;
200
+ insert(data: T): Observable<T>;
201
+ insertMany(dataArray: T[]): Observable<T[]>;
202
+ update(id: number | string, data: Partial<T>): Observable<T>;
203
+ patch(id: number | string, data: Partial<T>): Observable<T>;
204
+ updateWhere(data: Partial<T>): Observable<{
205
+ affectedCount: number;
206
+ }>;
207
+ upsert(data: T): Observable<T>;
208
+ delete(id: number | string): Observable<any>;
209
+ deleteWhere(): Observable<{
210
+ affectedCount: number;
211
+ }>;
212
+ /**
213
+ * Exécute des fonctions d'agrégation SQL (MIN, MAX, AVG, SUM, COUNT)
214
+ *
215
+ * @param aggregates - Chaîne d'agrégations au format "function:column->alias" séparées par virgule
216
+ * Exemples:
217
+ * - "min:date->min_date,max:date->max_date"
218
+ * - "sum:amount->total,count:*->count,avg:amount->average"
219
+ *
220
+ * @param groupBy - (Optionnel) Colonnes pour GROUP BY
221
+ * Exemple: ['user_id', 'status']
222
+ *
223
+ * @param having - (Optionnel) Condition HAVING (utiliser les alias définis dans aggregates)
224
+ * Exemple: "total > 1000"
225
+ *
226
+ * @returns Observable<T> - Sans GROUP BY: retourne un objet unique
227
+ * Avec GROUP BY: retourne un tableau d'objets
228
+ */
229
+ aggregate$<R = any>(aggregates: string, groupBy?: string[], having?: string): Observable<R>;
230
+ /**
231
+ * Valide le format de la chaîne d'agrégations
232
+ * @private
233
+ */
234
+ private validateAggregates;
235
+ /**
236
+ * Exécute des agrégations avec un builder fluide
237
+ */
238
+ aggregateBuilder<R = any>(): AggregateBuilder<T, R>;
239
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryService<any>, [null, { optional: true; }, { optional: true; }]>;
240
+ static ɵprov: i0.ɵɵInjectableDeclaration<QueryService<any>>;
241
+ }
242
+
243
+ declare class WsService {
244
+ private http;
245
+ private applicationConfigService;
246
+ private baseUrl;
247
+ constructor(http: HttpClient, applicationConfigService: ApplicationConfigService);
248
+ setBaseUrl(url: string): this;
249
+ get<T>(params?: any): Observable<T>;
250
+ blob(params?: any): Observable<Blob>;
251
+ downloadWithProgress(params?: any): Observable<HttpEvent<Blob>>;
252
+ buildUrl(params?: Record<string, any>): string;
253
+ post<T>(body: any): Observable<T>;
254
+ put<T>(id: string | number, body: any): Observable<T>;
255
+ patch<T>(id: string | number, body: any): Observable<T>;
256
+ delete<T>(target: string | number | Record<string, any>): Observable<T>;
257
+ static ɵfac: i0.ɵɵFactoryDeclaration<WsService, never>;
258
+ static ɵprov: i0.ɵɵInjectableDeclaration<WsService>;
259
+ }
260
+
261
+ /**
262
+ * Contrat de stockage attendu par `angular-oauth2-oidc` (`OAuthStorage`), recopié ici
263
+ * à l'identique pour que ce point d'entrée ne dépende pas de cette bibliothèque : le
264
+ * typage étant structurel, `{ provide: OAuthStorage, useClass: MyStorageService }`
265
+ * reste valide dans l'application.
266
+ */
267
+ interface OAuthStorageLike {
268
+ getItem(key: string): string | null;
269
+ removeItem(key: string): void;
270
+ setItem(key: string, data: string): void;
271
+ }
272
+ declare class MyStorageService implements OAuthStorageLike {
273
+ getItem(key: string): string | null;
274
+ removeItem(key: string): void;
275
+ setItem(key: string, data: string): void;
276
+ static ɵfac: i0.ɵɵFactoryDeclaration<MyStorageService, never>;
277
+ static ɵprov: i0.ɵɵInjectableDeclaration<MyStorageService>;
278
+ }
279
+
280
+ declare class MyFilesService {
281
+ private ws;
282
+ constructor(ws: WsService);
283
+ files: {
284
+ list: () => rxjs.Observable<unknown>;
285
+ save: (id: string, item: any) => rxjs.Observable<unknown>;
286
+ delete: (id: string) => rxjs.Observable<unknown>;
287
+ };
288
+ upload: {
289
+ authorize: () => rxjs.Observable<unknown>;
290
+ };
291
+ static ɵfac: i0.ɵɵFactoryDeclaration<MyFilesService, never>;
292
+ static ɵprov: i0.ɵɵInjectableDeclaration<MyFilesService>;
293
+ }
294
+
295
+ declare class CadricielService {
296
+ private queryService;
297
+ private realtime;
298
+ private wservice;
299
+ private filesService;
300
+ private appConfig;
301
+ private http;
302
+ private config?;
303
+ files: {
304
+ list: () => Observable<unknown>;
305
+ save: (id: string, item: any) => Observable<unknown>;
306
+ delete: (id: string) => Observable<unknown>;
307
+ };
308
+ upload: {
309
+ authorize: () => Observable<unknown>;
310
+ };
311
+ constructor(queryService: QueryService, realtime: RealtimeService, wservice: WsService, filesService: MyFilesService, appConfig: ApplicationConfigService, http: HttpClient, config?: CadricielAuthEnvironment | undefined);
312
+ from<T extends Indexable = any>(table: string): QueryService<T>;
313
+ rpc(functionName: string, params?: any): Observable<any>;
314
+ channel(channel: string, params?: {
315
+ [key: string]: any;
316
+ }): ChannelController;
317
+ ws(url: string): WsService;
318
+ private getApiRoot;
319
+ static ɵfac: i0.ɵɵFactoryDeclaration<CadricielService, [null, null, null, null, null, null, { optional: true; }]>;
320
+ static ɵprov: i0.ɵɵInjectableDeclaration<CadricielService>;
321
+ }
322
+
323
+ /**
324
+ * Mode de thème demandé par l'utilisateur.
325
+ * `system` suit la préférence du système d'exploitation et la met à jour à chaud.
326
+ */
327
+ type ThemeMode = 'light' | 'dark' | 'system';
328
+ /**
329
+ * Classe posée sur `<html>` quand le thème sombre est actif.
330
+ * Alignée sur `@poadio/ui-angular` (styles/tokens.scss) : les composants de la
331
+ * bibliothèque ne lisent que `--poad-*`, redéfinies sous `.theme-dark`.
332
+ */
333
+ declare const THEME_DARK_CLASS = "theme-dark";
334
+ /**
335
+ * Source de vérité du thème clair/sombre de l'application.
336
+ *
337
+ * Indépendant du layout : n'importe quel layout, ou aucun, peut l'utiliser.
338
+ * Le choix de l'utilisateur est persisté ; à défaut, la préférence système
339
+ * s'applique et reste suivie tant que le mode vaut `system`.
340
+ */
341
+ declare class ThemeService {
342
+ /** Mode demandé : `light`, `dark`, ou `system` (défaut). */
343
+ readonly mode: WritableSignal<ThemeMode>;
344
+ /** Préférence système courante, suivie à chaud. */
345
+ private readonly systemPrefersDark;
346
+ /** Thème effectivement appliqué, une fois le mode résolu. */
347
+ readonly isDark: Signal<boolean>;
348
+ private injector;
349
+ private applied;
350
+ constructor();
351
+ /**
352
+ * Pose le mode par défaut du projet.
353
+ * Sans effet si l'utilisateur a déjà exprimé un choix (valeur persistée),
354
+ * afin qu'une configuration projet n'écrase jamais une préférence.
355
+ */
356
+ initialize(defaultMode?: ThemeMode | null): void;
357
+ /** Fixe le mode et le persiste. */
358
+ set(mode: ThemeMode): void;
359
+ /**
360
+ * Bascule entre clair et sombre.
361
+ * Depuis `system`, bascule vers l'inverse de ce qui est affiché — le geste
362
+ * de l'utilisateur produit toujours un changement visible.
363
+ */
364
+ toggle(): void;
365
+ /** Revient au suivi de la préférence système et oublie le choix persisté. */
366
+ useSystem(): void;
367
+ private watchSystemPreference;
368
+ private apply;
369
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
370
+ static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
371
+ }
372
+
373
+ /**
374
+ * Contrat de layout — partagé par TOUS les layouts, quelle que soit leur implémentation.
375
+ *
376
+ * Ce fichier ne décrit que ce que l'APPLICATION exprime et ce qu'un layout INTERPRÈTE.
377
+ * L'état interne d'un layout (menu replié, sous-menu ouvert, transition en cours…)
378
+ * n'a pas sa place ici : il appartient au layout qui l'implémente, et disparaît avec lui.
379
+ */
380
+ /** Modes de menu reconnus par les layouts fournis. */
381
+ type KnownMenuMode = 'static' | 'overlay' | 'slim' | 'slim-plus';
382
+ /**
383
+ * Mode de menu demandé. Un layout peut définir ses propres modes ;
384
+ * il déclare ceux qu'il sait rendre via {@link LayoutCapabilities.menuModes}.
385
+ */
386
+ type MenuMode = KnownMenuMode | (string & {});
387
+ /** Entrée de la barre d'outils (menu profil, actions d'en-tête…). */
388
+ interface ToolbarItem {
389
+ label?: string;
390
+ /** Nom d'icône (ex. `user`), pas une classe CSS. */
391
+ icon?: string;
392
+ command?: (event?: any) => void;
393
+ url?: string;
394
+ routerLink?: any[];
395
+ items?: ToolbarItem[];
396
+ visible?: boolean;
397
+ disabled?: boolean;
398
+ separator?: boolean;
399
+ badge?: string;
400
+ /**
401
+ * Identifiant stable de l'action, préféré à une comparaison de libellé.
402
+ * Un layout déclenche `logout` sur `id: 'logout'`, jamais sur `label === 'Logout'`.
403
+ */
404
+ id?: string;
405
+ /** @deprecated Vestige de thématisation par classe — utiliser les tokens `--poad-*`. */
406
+ badgeClass?: string;
407
+ }
408
+ interface ToolbarConfig {
409
+ leftItems?: ToolbarItem[];
410
+ rightItems?: ToolbarItem[];
411
+ }
412
+ /**
413
+ * Configuration applicative du layout.
414
+ *
415
+ * Tous les champs sont optionnels : un layout minimal peut n'en honorer aucun,
416
+ * et l'application ne doit jamais supposer qu'un champ a été pris en compte —
417
+ * elle interroge {@link LayoutCapabilities}.
418
+ */
419
+ interface LayoutConfig {
420
+ /** Thème initial du projet. Sans effet si l'utilisateur a déjà choisi. */
421
+ defaultTheme?: ThemeMode;
422
+ /** Couleur d'accent CSS ; alimente `--poad-accent`. */
423
+ accent?: string;
424
+ menuMode?: MenuMode;
425
+ logoUrl?: string;
426
+ logoAlt?: string;
427
+ miniLogoUrl?: string;
428
+ appName?: string;
429
+ appDescription?: string;
430
+ appVersion?: string;
431
+ showBreadcrumb?: boolean;
432
+ showFooter?: boolean;
433
+ showSearch?: boolean;
434
+ showSettings?: boolean;
435
+ toolbarConfig?: ToolbarConfig;
436
+ }
437
+ /**
438
+ * Ce qu'un layout déclare savoir rendre.
439
+ *
440
+ * Rend explicite un contrat jusqu'ici implicite : sans déclaration, une
441
+ * application activait un réglage que le layout ignorait en silence.
442
+ */
443
+ interface LayoutCapabilities {
444
+ /** Clé du layout, identique au nom de fichier `<nom>.layout.ts`. */
445
+ readonly name: string;
446
+ readonly menu?: boolean;
447
+ readonly menuModes?: readonly MenuMode[];
448
+ readonly breadcrumb?: boolean;
449
+ readonly footer?: boolean;
450
+ readonly search?: boolean;
451
+ readonly toolbar?: boolean;
452
+ readonly tabs?: boolean;
453
+ /** Le layout offre-t-il un point d'entrée pour basculer le thème ? */
454
+ readonly themeToggle?: boolean;
455
+ }
456
+ /** Capacités d'un layout qui ne rend rien d'autre qu'un `<router-outlet>`. */
457
+ declare const EMPTY_LAYOUT_CAPABILITIES: LayoutCapabilities;
458
+
459
+ /**
460
+ * Entrée de menu de navigation.
461
+ *
462
+ * Forme alignée sur `PoadMenuItem` de `@poadio/ui-angular` : un tableau d'`AppMenuItem`
463
+ * se passe directement à `<poad-menu>` / `<poad-menubar>` sans adaptation.
464
+ * `icon` est un NOM d'icône (`user`, `settings`), jamais une classe CSS.
465
+ */
466
+ interface AppMenuItem {
467
+ label: string;
468
+ icon?: string;
469
+ routerLink?: string | any[];
470
+ queryParams?: Record<string, unknown>;
471
+ url?: string;
472
+ target?: string;
473
+ /** Action déclenchée au clic, quand l'entrée ne navigue pas. */
474
+ command?: (event?: {
475
+ item: AppMenuItem;
476
+ originalEvent?: Event;
477
+ }) => void;
478
+ items?: AppMenuItem[];
479
+ separator?: boolean;
480
+ disabled?: boolean;
481
+ visible?: boolean;
482
+ /** Identifiant stable, pour cibler une entrée sans dépendre de son libellé. */
483
+ id?: string;
484
+ /** Infobulle. */
485
+ title?: string;
486
+ badge?: string | number;
487
+ /** @deprecated Vestige de thématisation par classe — utiliser les tokens `--poad-*`. */
488
+ badgeClass?: string;
489
+ }
490
+
491
+ /**
492
+ * Menu de navigation de l'application, partagé par tous les layouts.
493
+ *
494
+ * `items` est un signal : un layout qui le lit se met à jour tout seul quand le
495
+ * menu change. `getMenu()` reste disponible, mais renvoie un instantané — un
496
+ * layout qui l'appelle une fois à l'initialisation ne verra aucune mise à jour.
497
+ */
498
+ declare class MenuService {
499
+ private readonly menuItems;
500
+ /** Menu courant, réactif. À privilégier dans un layout. */
501
+ readonly items: Signal<AppMenuItem[]>;
502
+ /** Instantané du menu courant. Préférer {@link items} pour un rendu réactif. */
503
+ getMenu(): AppMenuItem[];
504
+ setMenu(items: AppMenuItem[]): void;
505
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuService, never>;
506
+ static ɵprov: i0.ɵɵInjectableDeclaration<MenuService>;
507
+ }
508
+
509
+ export { AggregateBuilder, ApplicationConfigService, CADRICIEL_AUTH_ENV, CADRICIEL_CORE_CONFIG, CadricielService, ChannelController, EMPTY_LAYOUT_CAPABILITIES, MenuService, MyFilesService, MyStorageService, QueryService, RealtimeService, THEME_DARK_CLASS, ThemeService, UserService, WsService };
510
+ export type { Aggregate, AggregateFunction, AggregateResult, AppMenuItem, CadricielAuthEnvironment, Claims, ComparisonOperator, Condition, ConditionGroup, Indexable, KnownMenuMode, LayoutCapabilities, LayoutConfig, LogicalOperator, MenuMode, OAuthStorageLike, ThemeMode, ToolbarConfig, ToolbarItem, User };