@ngx-smz/layout 21.10.0-next.28 → 21.10.0-next.29

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.
Files changed (43) hide show
  1. package/fesm2022/ngx-smz-layout-layout-configurator.entry-Dm9Xx7YB.mjs +101 -0
  2. package/fesm2022/ngx-smz-layout-layout-configurator.entry-Dm9Xx7YB.mjs.map +1 -0
  3. package/fesm2022/{ngx-smz-layout-layout-errors.entry-Bpp0Hw8y.mjs → ngx-smz-layout-layout-errors.entry-CQuwiz8W.mjs} +3 -3
  4. package/fesm2022/{ngx-smz-layout-layout-errors.entry-Bpp0Hw8y.mjs.map → ngx-smz-layout-layout-errors.entry-CQuwiz8W.mjs.map} +1 -1
  5. package/fesm2022/ngx-smz-layout-layout-footer.entry-BmXVGvze.mjs +135 -0
  6. package/fesm2022/ngx-smz-layout-layout-footer.entry-BmXVGvze.mjs.map +1 -0
  7. package/fesm2022/{ngx-smz-layout-layout-gallery.fixtures-yel7nOYX.mjs → ngx-smz-layout-layout-gallery.fixtures-BgO9_ncI.mjs} +34 -7
  8. package/fesm2022/ngx-smz-layout-layout-gallery.fixtures-BgO9_ncI.mjs.map +1 -0
  9. package/fesm2022/ngx-smz-layout-layout-menu.entry-DdTLZvao.mjs +237 -0
  10. package/fesm2022/ngx-smz-layout-layout-menu.entry-DdTLZvao.mjs.map +1 -0
  11. package/fesm2022/ngx-smz-layout-layout-shell.entry-qgGO3ZqB.mjs +205 -0
  12. package/fesm2022/ngx-smz-layout-layout-shell.entry-qgGO3ZqB.mjs.map +1 -0
  13. package/fesm2022/{ngx-smz-layout-layout-topbar.entry-CfSpHt5E.mjs → ngx-smz-layout-layout-topbar.entry-Bg3BEgJa.mjs} +158 -7
  14. package/fesm2022/ngx-smz-layout-layout-topbar.entry-Bg3BEgJa.mjs.map +1 -0
  15. package/fesm2022/{ngx-smz-layout-ngx-smz-layout-BEHAEWgI.mjs → ngx-smz-layout-ngx-smz-layout-CvjM-0jw.mjs} +945 -309
  16. package/fesm2022/ngx-smz-layout-ngx-smz-layout-CvjM-0jw.mjs.map +1 -0
  17. package/fesm2022/ngx-smz-layout.mjs +1 -1
  18. package/package.json +1 -1
  19. package/resources/layout/_core.scss +90 -4
  20. package/resources/layout/_footer.scss +1 -1
  21. package/resources/layout/_main.scss +10 -2
  22. package/resources/layout/_menu.scss +203 -34
  23. package/resources/layout/_mixins.scss +9 -8
  24. package/resources/layout/_preloading.scss +167 -5
  25. package/resources/layout/_responsive.scss +51 -15
  26. package/resources/layout/_topbar.scss +72 -34
  27. package/resources/layout/_typography.scss +14 -14
  28. package/resources/layout/_utils.scss +2 -2
  29. package/resources/layout/gallery-stage.scss +1 -1
  30. package/resources/layout/variables/_common.scss +9 -5
  31. package/resources/layout/variables/_dark.scss +0 -2
  32. package/resources/layout/variables/_legacy-common.scss +10 -8
  33. package/resources/layout/variables/_light.scss +0 -2
  34. package/types/ngx-smz-layout.d.ts +381 -52
  35. package/fesm2022/ngx-smz-layout-layout-footer.entry-CbNgTe0l.mjs +0 -51
  36. package/fesm2022/ngx-smz-layout-layout-footer.entry-CbNgTe0l.mjs.map +0 -1
  37. package/fesm2022/ngx-smz-layout-layout-gallery.fixtures-yel7nOYX.mjs.map +0 -1
  38. package/fesm2022/ngx-smz-layout-layout-menu.entry-BAzglN_V.mjs +0 -99
  39. package/fesm2022/ngx-smz-layout-layout-menu.entry-BAzglN_V.mjs.map +0 -1
  40. package/fesm2022/ngx-smz-layout-layout-shell.entry-CWxnFneU.mjs +0 -78
  41. package/fesm2022/ngx-smz-layout-layout-shell.entry-CWxnFneU.mjs.map +0 -1
  42. package/fesm2022/ngx-smz-layout-layout-topbar.entry-CfSpHt5E.mjs.map +0 -1
  43. package/fesm2022/ngx-smz-layout-ngx-smz-layout-BEHAEWgI.mjs.map +0 -1
@@ -1,10 +1,11 @@
1
- import * as i0 from '@angular/core';
2
- import { ComponentRef, Signal, ElementRef, OnDestroy, Renderer2, WritableSignal, InjectionToken, EnvironmentProviders } from '@angular/core';
1
+ import * as _ngx_smz_layout from '@ngx-smz/layout';
2
+ import * as _angular_core from '@angular/core';
3
+ import { ComponentRef, Signal, TemplateRef, Type, ElementRef, OnDestroy, Renderer2, WritableSignal, InjectionToken, EnvironmentProviders } from '@angular/core';
3
4
  import { Router, Routes } from '@angular/router';
4
5
  import * as rxjs from 'rxjs';
5
- import { Subscription } from 'rxjs';
6
+ import { Observable, Subscription } from 'rxjs';
6
7
  import { ComponentType } from '@angular/cdk/overlay';
7
- import { SmzUiMenuItem } from '@ngx-smz/ui-kit';
8
+ import { SmzUiMenuItem, SmzTemplateDirective, SmzToastPosition } from '@ngx-smz/ui-kit';
8
9
  import { SmzGalleryManifestEntry, SmzGalleryEntry } from '@ngx-smz/core';
9
10
 
10
11
  interface LayoutConfig {
@@ -12,7 +13,16 @@ interface LayoutConfig {
12
13
  primary?: string;
13
14
  surface?: string | undefined | null;
14
15
  darkTheme?: boolean;
16
+ /**
17
+ * Modo do menu: `static` (padrão, sidebar fixa), `overlay` (sidebar sobre o conteúdo), `horizontal` (barra abaixo
18
+ * da topbar, com os grupos abrindo em painel) ou `slim` (sidebar estreita só com ícones; rótulo e submenu aparecem
19
+ * ao lado do item). Abaixo do ponto de quebra do menu (992px) todos os modos viram a gaveta.
20
+ */
15
21
  menuMode?: string;
22
+ /** Largura da sidebar (`16rem`, `280px`…). Sem valor, vale o token `layout.sidebar.width` do tema. */
23
+ sidebarWidth?: string;
24
+ /** Largura da sidebar no menu `slim`. Sem valor, vale o token `layout.sidebar.slim.width` do tema. */
25
+ sidebarSlimWidth?: string;
16
26
  /** When false, the sidebar is not rendered and main content uses full width. Defaults to true. */
17
27
  showSidebar?: boolean;
18
28
  }
@@ -29,8 +39,8 @@ interface MenuChangeEvent {
29
39
  }
30
40
  declare class LayoutService {
31
41
  private readonly config;
32
- layoutConfig: i0.WritableSignal<LayoutConfig>;
33
- layoutState: i0.WritableSignal<LayoutState>;
42
+ layoutConfig: _angular_core.WritableSignal<LayoutConfig>;
43
+ layoutState: _angular_core.WritableSignal<LayoutState>;
34
44
  private configUpdate;
35
45
  private overlayOpen;
36
46
  private menuSource;
@@ -39,13 +49,13 @@ declare class LayoutService {
39
49
  resetSource$: rxjs.Observable<unknown>;
40
50
  configUpdate$: rxjs.Observable<LayoutConfig>;
41
51
  overlayOpen$: rxjs.Observable<null>;
42
- theme: i0.Signal<"light" | "dark">;
43
- isSidebarActive: i0.Signal<boolean>;
44
- isDarkTheme: i0.Signal<boolean>;
45
- getPrimary: i0.Signal<string>;
46
- getSurface: i0.Signal<string>;
47
- isOverlay: i0.Signal<boolean>;
48
- transitionComplete: i0.WritableSignal<boolean>;
52
+ theme: _angular_core.Signal<"light" | "dark">;
53
+ isSidebarActive: _angular_core.Signal<boolean>;
54
+ isDarkTheme: _angular_core.Signal<boolean>;
55
+ getPrimary: _angular_core.Signal<string>;
56
+ getSurface: _angular_core.Signal<string>;
57
+ isOverlay: _angular_core.Signal<boolean>;
58
+ transitionComplete: _angular_core.WritableSignal<boolean>;
49
59
  private initialized;
50
60
  constructor();
51
61
  private handleDarkModeTransition;
@@ -58,8 +68,8 @@ declare class LayoutService {
58
68
  onConfigUpdate(): void;
59
69
  onMenuStateChange(event: MenuChangeEvent): void;
60
70
  reset(): void;
61
- static ɵfac: i0.ɵɵFactoryDeclaration<LayoutService, never>;
62
- static ɵprov: i0.ɵɵInjectableDeclaration<LayoutService>;
71
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LayoutService, never>;
72
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<LayoutService>;
63
73
  }
64
74
 
65
75
  interface InjectableContentEntity {
@@ -87,7 +97,7 @@ declare class NavigationService {
87
97
  private location;
88
98
  private history;
89
99
  private isPopping;
90
- readonly canGoBack: i0.Signal<boolean>;
100
+ readonly canGoBack: _angular_core.Signal<boolean>;
91
101
  private loggingService;
92
102
  private logger;
93
103
  constructor();
@@ -95,8 +105,8 @@ declare class NavigationService {
95
105
  canGoBackSignal(): boolean;
96
106
  /** Volta um passo: remove do history e chama Location.back() */
97
107
  goBack(): void;
98
- static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
99
- static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
108
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NavigationService, never>;
109
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<NavigationService>;
100
110
  }
101
111
 
102
112
  declare class PageTitleService {
@@ -104,26 +114,42 @@ declare class PageTitleService {
104
114
  private loggingService;
105
115
  private logger;
106
116
  private titleSignal;
107
- readonly title: i0.Signal<string>;
108
- readonly hasTitle: i0.Signal<boolean>;
117
+ readonly title: _angular_core.Signal<string>;
118
+ readonly hasTitle: _angular_core.Signal<boolean>;
109
119
  constructor();
110
120
  /** Percorre recursivamente o snapshot até a rota mais interna */
111
121
  private getDeepestSnapshot;
112
122
  /** Lê o title do data da rota mais interna */
113
123
  private updateTitle;
114
- static ɵfac: i0.ɵɵFactoryDeclaration<PageTitleService, never>;
115
- static ɵprov: i0.ɵɵInjectableDeclaration<PageTitleService>;
124
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PageTitleService, never>;
125
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<PageTitleService>;
116
126
  }
117
127
 
128
+ /**
129
+ * Valor que a topbar aceita em três formas: fixo, `Signal` ou `Observable`. O app entrega o que já tem
130
+ * (um seletor do seu estado de autenticação, um `computed`, um texto fixo) e a casca não conhece o formato desse estado.
131
+ */
132
+ type TopbarValue<T> = T | Signal<T> | Observable<T>;
133
+
118
134
  declare class AppTopbar {
119
135
  data: Signal<Topbar>;
120
136
  layoutService: LayoutService;
121
137
  navigationService: NavigationService;
122
138
  pageTitleService: PageTitleService;
139
+ /** Conteúdo extra da topbar (`<ng-template smzTemplate="headerExtras">` em `<app-layout>`), nas duas orientações. */
140
+ readonly headerExtras: _angular_core.InputSignal<TemplateRef<unknown>>;
141
+ /** Variante do conteúdo extra com a tela em paisagem; tem precedência sobre `headerExtras`. */
142
+ readonly headerExtrasLandscape: _angular_core.InputSignal<TemplateRef<unknown>>;
143
+ /** Variante do conteúdo extra com a tela em retrato; tem precedência sobre `headerExtras`. */
144
+ readonly headerExtrasPortrait: _angular_core.InputSignal<TemplateRef<unknown>>;
145
+ protected readonly notificationsComponent: Type<unknown>;
146
+ protected readonly notificationsAvailable: boolean;
147
+ private readonly portrait;
148
+ protected readonly extrasTemplate: Signal<TemplateRef<unknown>>;
123
149
  toggleDarkMode(): void;
124
150
  handleMissingImage(event: Event, placeholder: string): void;
125
- static ɵfac: i0.ɵɵFactoryDeclaration<AppTopbar, never>;
126
- static ɵcmp: i0.ɵɵComponentDeclaration<AppTopbar, "app-topbar", never, {}, {}, never, never, true, never>;
151
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppTopbar, never>;
152
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppTopbar, "app-topbar", never, { "headerExtras": { "alias": "headerExtras"; "required": false; "isSignal": true; }; "headerExtrasLandscape": { "alias": "headerExtrasLandscape"; "required": false; "isSignal": true; }; "headerExtrasPortrait": { "alias": "headerExtrasPortrait"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
127
153
  }
128
154
  interface Topbar {
129
155
  showMenuToggle?: boolean;
@@ -132,6 +158,12 @@ interface Topbar {
132
158
  showDarkModeToggle?: boolean;
133
159
  /** When false, hides profile/feature menus on the right of the topbar. Defaults to visible when omitted. */
134
160
  showProfileMenu?: boolean;
161
+ /**
162
+ * Mostra o sino de notificações do core (`smz-ui-notifications`) antes do perfil. Desligado por padrão.
163
+ * Exige o que o sino exige: `provideSmzUi()` com as notificações configuradas (`rbkUtils.notifications`) e o
164
+ * estado `ui.notifications` registrado. Sem a configuração do core, o sino não é criado.
165
+ */
166
+ showNotifications?: boolean;
135
167
  logoPath?: {
136
168
  light?: string;
137
169
  dark?: string;
@@ -144,6 +176,24 @@ interface Topbar {
144
176
  label?: string;
145
177
  tooltip?: string;
146
178
  menuItems?: SmzUiMenuItem[];
179
+ /**
180
+ * Nome do usuário, mostrado ao lado do avatar ou do ícone (antigo `usernameProperty`). Aceita texto fixo,
181
+ * `Signal` ou `Observable`: a casca não lê o estado de autenticação do app, o app entrega o valor.
182
+ * O avatar segue em `avatar` (antigos `useAvatar` e `avatarProperty`): sem valor, a topbar mostra o ícone.
183
+ *
184
+ * @example
185
+ * ```ts
186
+ * features: [{
187
+ * icon: signal('fa-solid fa-user'),
188
+ * profileMessage: 'Olá, ',
189
+ * username: inject(Store).select(AuthenticationSelectors.username),
190
+ * menuItems: profileItems,
191
+ * }]
192
+ * ```
193
+ */
194
+ username?: TopbarValue<string>;
195
+ /** Mensagem escrita antes do nome do usuário (antigo `profileMessage`, por exemplo `'Olá, '`). */
196
+ profileMessage?: TopbarValue<string>;
147
197
  }[];
148
198
  menuItems?: {
149
199
  icon?: string;
@@ -151,15 +201,84 @@ interface Topbar {
151
201
  tooltip?: string;
152
202
  routerLink?: string;
153
203
  callback?: () => void;
204
+ /**
205
+ * Componente injetado no lugar do botão.
206
+ *
207
+ * @example
208
+ * Troca de tenant com o `smz-tenant-switch` do core:
209
+ * ```ts
210
+ * menuItems: [{ component: { component: SmzTenantSwitchComponent, inputs: [], outputs: [] } }]
211
+ * ```
212
+ */
154
213
  component?: InjectableComponent<unknown>;
155
214
  }[];
156
215
  }
157
216
 
217
+ /**
218
+ * Painel do menu. As classes `layout-sidebar-horizontal` e `layout-sidebar-slim` acompanham `menuMode` e só mudam o
219
+ * desenho acima do ponto de quebra do menu (`_menu.scss`); abaixo dele o painel é sempre a gaveta. As larguras da
220
+ * configuração (`sidebarWidth`, `sidebarSlimWidth`) sobrescrevem aqui os tokens `layout.sidebar.width` e
221
+ * `layout.sidebar.slim.width`.
222
+ */
158
223
  declare class AppSidebar {
159
224
  el: ElementRef;
225
+ protected readonly layoutService: LayoutService;
160
226
  constructor(el: ElementRef);
161
- static ɵfac: i0.ɵɵFactoryDeclaration<AppSidebar, never>;
162
- static ɵcmp: i0.ɵɵComponentDeclaration<AppSidebar, "app-sidebar", never, {}, {}, never, never, true, never>;
227
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppSidebar, never>;
228
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppSidebar, "app-sidebar", never, {}, {}, never, never, true, never>;
229
+ }
230
+
231
+ /**
232
+ * Peças da casca que a rota mostra:
233
+ * - `full`: topbar, menu e rodapé (padrão);
234
+ * - `menu-only`: só o menu;
235
+ * - `topbar-only`: só a topbar;
236
+ * - `none`: só o conteúdo da rota.
237
+ *
238
+ * Como nos layouts do core, o rodapé só aparece em `full`.
239
+ */
240
+ type LayoutRouteMode = 'full' | 'menu-only' | 'topbar-only' | 'none';
241
+ /**
242
+ * Layout por rota, lido de `data.layout`:
243
+ *
244
+ * ```ts
245
+ * { path: 'mapa', component: MapaPage, data: { layout: { mode: 'topbar-only', contentPadding: '0' } } }
246
+ * ```
247
+ *
248
+ * O `data.layout` das rotas pai vale para as filhas; a filha sobrescreve campo a campo.
249
+ */
250
+ interface LayoutRouteData {
251
+ /** Peças da casca visíveis na rota. Padrão: `full`. */
252
+ mode?: LayoutRouteMode;
253
+ /** Esconde o rodapé na rota. Padrão: `false`. */
254
+ hideFooter?: boolean;
255
+ /** `padding` CSS da área de conteúdo na rota (`'0'`, `'1rem 2rem'`). Sem o campo vale o espaçamento da casca. */
256
+ contentPadding?: string;
257
+ /** Classes acrescentadas à área de conteúdo (`.layout-main`) na rota. */
258
+ contentStyleClass?: string;
259
+ }
260
+ /**
261
+ * Layout da rota ativa para o `<app-layout>`. Sem `data.layout` em nenhuma rota, a casca renderiza inteira.
262
+ *
263
+ * Fora do roteador (testes, galeria, uma tela que precisa trocar a casca sem navegar), {@link set} impõe um layout
264
+ * no lugar do que vem da rota; `set(null)` devolve o controle à rota.
265
+ */
266
+ declare class RouteLayoutService {
267
+ private readonly router;
268
+ private readonly fromRoute;
269
+ private readonly forced;
270
+ /** Layout em vigor, com os padrões preenchidos (`mode: 'full'`, `hideFooter: false`, `contentStyleClass: ''`). */
271
+ readonly layout: _angular_core.Signal<LayoutRouteData>;
272
+ readonly showTopbar: _angular_core.Signal<boolean>;
273
+ readonly showSidebar: _angular_core.Signal<boolean>;
274
+ readonly showFooter: _angular_core.Signal<boolean>;
275
+ constructor();
276
+ /** Impõe um layout no lugar do `data.layout` da rota; `null` volta a ler a rota. */
277
+ set(layout: LayoutRouteData | null): void;
278
+ /** Junta o `data.layout` da raiz até a rota ativa mais profunda do outlet principal. */
279
+ private readRoute;
280
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RouteLayoutService, never>;
281
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<RouteLayoutService>;
163
282
  }
164
283
 
165
284
  declare class AppLayout implements OnDestroy {
@@ -170,15 +289,26 @@ declare class AppLayout implements OnDestroy {
170
289
  menuOutsideClickListener: (() => void) | null;
171
290
  appSidebar: AppSidebar;
172
291
  appTopBar: AppTopbar;
292
+ /**
293
+ * Templates projetados pelo app em `<app-layout>` com `ng-template[smzTemplate]`: `headerExtras`,
294
+ * `headerExtrasLandscape`, `headerExtrasPortrait` (topbar) e `footerExtras` (rodapé).
295
+ */
296
+ readonly slotTemplates: _angular_core.Signal<readonly SmzTemplateDirective[]>;
297
+ /** Layout da rota ativa (`data.layout`): peças visíveis, espaçamento e classes da área de conteúdo. */
298
+ readonly routeLayout: RouteLayoutService;
299
+ /** Peças opcionais da casca (`loader`, `toast`, `assistance`); só são montadas quando configuradas. */
300
+ protected readonly shell: _ngx_smz_layout.SmzUILayoutConfigType;
173
301
  constructor(layoutService: LayoutService, renderer: Renderer2, router: Router);
302
+ /** Template de slot projetado com o nome dado, ou `undefined`. */
303
+ slot(name: string): TemplateRef<unknown> | undefined;
174
304
  isOutsideClicked(event: MouseEvent): boolean;
175
305
  hideMenu(): void;
176
306
  blockBodyScroll(): void;
177
307
  unblockBodyScroll(): void;
178
308
  get containerClass(): Record<string, boolean>;
179
309
  ngOnDestroy(): void;
180
- static ɵfac: i0.ɵɵFactoryDeclaration<AppLayout, never>;
181
- static ɵcmp: i0.ɵɵComponentDeclaration<AppLayout, "app-layout", never, {}, {}, never, never, true, never>;
310
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppLayout, never>;
311
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppLayout, "app-layout", never, {}, {}, ["slotTemplates"], never, true, never>;
182
312
  }
183
313
 
184
314
  interface Footer {
@@ -192,6 +322,122 @@ interface Footer {
192
322
  };
193
323
  version?: string;
194
324
  copyright?: string;
325
+ /** Texto livre à esquerda, depois do logotipo. Some em telas estreitas, como nos layouts antigos. */
326
+ leftSideText?: string;
327
+ /** Texto livre à direita, antes do conteúdo extra e das imagens. Some em telas estreitas. */
328
+ rightSideText?: string;
329
+ /** Imagens de marca à direita (URLs), na ordem dada, depois do logotipo da direita. Somem em telas estreitas. */
330
+ rightSideImages?: string[];
331
+ /** Classe aplicada a cada imagem de `rightSideImages`. Padrão: `max-w-24`. */
332
+ rightSideImageStyleClass?: string;
333
+ }
334
+
335
+ /** Canto da tela em que o botão flutuante da assistência fica. */
336
+ type LayoutAssistanceButtonPosition = 'left-top' | 'left-center' | 'left-bottom' | 'right-top' | 'right-center' | 'right-bottom';
337
+ /** Assistência montada pela casca (`configureSmzUILayout().withAssistance(...)`): botão flutuante e painel lateral. */
338
+ interface LayoutAssistance {
339
+ /** Mostra o botão flutuante. Padrão: `true` (a assistência só existe quando configurada). */
340
+ isEnabled?: boolean;
341
+ /** Abre o painel. Padrão: `false`; a casca atualiza o campo quando o painel abre e fecha. */
342
+ isVisible?: boolean;
343
+ /** Posição do botão flutuante. Padrão: `right-bottom`. */
344
+ buttonPosition?: LayoutAssistanceButtonPosition;
345
+ /** Lado em que o painel abre. Padrão: `right`. */
346
+ position?: 'left' | 'right';
347
+ /** Classe do ícone do botão. Padrão: `fa-solid fa-gear`. */
348
+ icon?: string;
349
+ /** Título do painel e rótulo acessível do botão. Padrão: `Assistência`. */
350
+ title?: string;
351
+ /** Mostra no painel os ajustes da casca (modo do menu e tema escuro). Padrão: `true`. */
352
+ showLayoutOptions?: boolean;
353
+ /** Componente do app desenhado no painel, abaixo dos ajustes da casca. */
354
+ component?: Type<unknown>;
355
+ }
356
+ /**
357
+ * Assistência da casca: botão flutuante que abre um painel lateral (`ui-drawer`) com os ajustes da casca e, se o
358
+ * app informar, um componente próprio.
359
+ */
360
+ declare class AppAssistance {
361
+ protected readonly menuModeOptions: {
362
+ label: string;
363
+ value: string;
364
+ }[];
365
+ private readonly layoutService;
366
+ private readonly config;
367
+ /** Painel aberto pelo botão; vale quando a configuração não é um signal gravável do app. */
368
+ private readonly opened;
369
+ protected readonly enabled: _angular_core.Signal<boolean>;
370
+ protected readonly visible: _angular_core.Signal<boolean>;
371
+ protected readonly buttonPosition: _angular_core.Signal<LayoutAssistanceButtonPosition>;
372
+ protected readonly position: _angular_core.Signal<"left" | "right">;
373
+ protected readonly icon: _angular_core.Signal<string>;
374
+ protected readonly title: _angular_core.Signal<string>;
375
+ protected readonly showLayoutOptions: _angular_core.Signal<boolean>;
376
+ protected readonly component: _angular_core.Signal<Type<unknown>>;
377
+ protected readonly menuMode: _angular_core.Signal<string>;
378
+ protected readonly darkTheme: _angular_core.Signal<boolean>;
379
+ protected setVisible(visible: boolean): void;
380
+ protected onMenuModeChange(menuMode: string): void;
381
+ protected onDarkThemeChange(darkTheme: boolean): void;
382
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppAssistance, never>;
383
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppAssistance, "app-assistance", never, {}, {}, never, never, true, never>;
384
+ }
385
+
386
+ /**
387
+ * Visibilidade do loader montado pelo `<app-layout>` (`configureSmzUILayout().withLoader(...)`).
388
+ *
389
+ * A casca chama {@link startInitial} ao nascer: o loader fica visível até a primeira navegação terminar. Depois
390
+ * disso o app pode usar {@link show} e {@link hide} em cargas longas.
391
+ */
392
+ declare class LayoutLoaderService {
393
+ private readonly router;
394
+ private readonly state;
395
+ private timer;
396
+ readonly visible: _angular_core.Signal<boolean>;
397
+ /**
398
+ * Mostra o loader. Com `timeout` (ms) maior que zero, ele se esconde sozinho ao fim do prazo, mesmo que ninguém
399
+ * chame {@link hide}.
400
+ */
401
+ show(timeout?: number): void;
402
+ hide(): void;
403
+ /**
404
+ * Loader inicial: visível até a primeira navegação terminar (com sucesso, cancelada ou com erro). Se o roteador
405
+ * já navegou quando a casca nasce, não faz nada.
406
+ */
407
+ startInitial(timeout?: number): void;
408
+ private clearTimer;
409
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LayoutLoaderService, never>;
410
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<LayoutLoaderService>;
411
+ }
412
+
413
+ /** Desenho do indicador do loader: grade de nove cubos ou quadrado girando. */
414
+ type LayoutLoaderType = 'cube' | 'square';
415
+ /** Loader montado pela casca (`configureSmzUILayout().withLoader(...)`). */
416
+ interface LayoutLoader {
417
+ /** Desenho do indicador. Padrão: `cube`. */
418
+ type?: LayoutLoaderType;
419
+ /** Título ao lado do indicador. Padrão: `Carregando...`. */
420
+ title?: string;
421
+ /** Mensagem abaixo do título. Padrão: `Aguarde por favor`. */
422
+ message?: string;
423
+ /** Prazo (ms) para o loader inicial se esconder sozinho se a primeira navegação não terminar. Sem prazo por padrão. */
424
+ timeout?: number;
425
+ }
426
+ /**
427
+ * Loader da casca: cobre a tela enquanto o app inicia (até a primeira navegação terminar) e sempre que o app chama
428
+ * `LayoutLoaderService.show()`. Usa a tela de pré-carregamento de `_preloading.scss` com uma caixa no centro.
429
+ */
430
+ declare class AppLoader {
431
+ protected readonly loaderService: LayoutLoaderService;
432
+ protected readonly cubes: number[];
433
+ protected readonly segments: number[];
434
+ private readonly config;
435
+ protected readonly type: _angular_core.Signal<LayoutLoaderType>;
436
+ protected readonly title: _angular_core.Signal<string>;
437
+ protected readonly message: _angular_core.Signal<string>;
438
+ constructor();
439
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppLoader, never>;
440
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppLoader, "app-loader", never, {}, {}, never, never, true, never>;
195
441
  }
196
442
 
197
443
  interface SmzUILayoutConfigType {
@@ -201,6 +447,17 @@ interface SmzUILayoutConfigType {
201
447
  layout: WritableSignal<LayoutConfig>;
202
448
  state: WritableSignal<LayoutState>;
203
449
  hasClaim?: (claims: string[]) => boolean;
450
+ /** Loader montado pela casca. Sem o campo, `<app-layout>` não monta loader. */
451
+ loader?: WritableSignal<LayoutLoader>;
452
+ /** Toast (`<ui-toast>`) montado pela casca. Sem o campo, `<app-layout>` não monta toast. */
453
+ toast?: WritableSignal<LayoutToast>;
454
+ /** Assistência (botão flutuante e painel lateral) montada pela casca. Sem o campo, não há assistência. */
455
+ assistance?: WritableSignal<LayoutAssistance>;
456
+ }
457
+ /** Toast montado pela casca (`configureSmzUILayout().withToast(...)`). */
458
+ interface LayoutToast {
459
+ /** Posição da pilha de mensagens. Padrão: `bottom-right`, a mesma do `smz-ui-outlet` do core. */
460
+ position?: SmzToastPosition;
204
461
  }
205
462
  declare class SmzUILayout {
206
463
  /**
@@ -211,15 +468,15 @@ declare class SmzUILayout {
211
468
  * Menu prepared for shells such as Hephaestus: entries denied by {@link SmzUILayoutConfigType.hasClaim}
212
469
  * use `visible: false` so templates only need visibility rules.
213
470
  */
214
- readonly sidebar: i0.Signal<SmzUiMenuItem[]>;
471
+ readonly sidebar: _angular_core.Signal<SmzUiMenuItem[]>;
215
472
  private layoutFeature;
216
473
  footer: WritableSignal<Footer>;
217
474
  topbar: WritableSignal<Topbar>;
218
475
  layout: WritableSignal<LayoutConfig>;
219
476
  state: WritableSignal<LayoutState>;
220
477
  setConfig(config: SmzUILayoutConfigType): void;
221
- static ɵfac: i0.ɵɵFactoryDeclaration<SmzUILayout, never>;
222
- static ɵprov: i0.ɵɵInjectableDeclaration<SmzUILayout>;
478
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SmzUILayout, never>;
479
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<SmzUILayout>;
223
480
  }
224
481
 
225
482
  declare const SMZ_UI_LAYOUT_CONFIG: InjectionToken<SmzUILayoutConfigType>;
@@ -252,6 +509,10 @@ declare class SmzUILayoutProvisionBuilder {
252
509
  private topbarSignal?;
253
510
  private layoutSignal?;
254
511
  private layoutStateSignal?;
512
+ private menuOptions?;
513
+ private loaderSignal?;
514
+ private toastSignal?;
515
+ private assistanceSignal?;
255
516
  private hasGranularSlots;
256
517
  private assertNotUsingFeaturesFactory;
257
518
  /**
@@ -261,12 +522,80 @@ declare class SmzUILayoutProvisionBuilder {
261
522
  */
262
523
  withFeatures(factory: () => SmzUILayoutConfigType[]): this;
263
524
  withSidebar(sidebar: WritableSignal<SmzUiMenuItem[]>): this;
525
+ /**
526
+ * Rodapé: logotipos, `version`, `copyright`, texto livre dos dois lados (`leftSideText`, `rightSideText`) e
527
+ * imagens de marca à direita (`rightSideImages`, `rightSideImageStyleClass`).
528
+ * Conteúdo próprio do app entra por `<ng-template smzTemplate="footerExtras">` dentro de `<app-layout>`.
529
+ */
264
530
  withFooter(footer: WritableSignal<Footer>): this;
531
+ /**
532
+ * Topbar: marca, ações (`menuItems`), perfil (`features`, com `username` e `profileMessage`) e o sino de
533
+ * notificações do core (`showNotifications`, desligado por padrão).
534
+ * Conteúdo próprio do app entra por `<ng-template smzTemplate="headerExtras">` dentro de `<app-layout>`
535
+ * (ou `headerExtrasLandscape` / `headerExtrasPortrait` para variar por orientação), ou como componente em
536
+ * `menuItems[].component`.
537
+ *
538
+ * @example
539
+ * Troca de tenant na topbar, com o `smz-tenant-switch` do `@ngx-smz/core`:
540
+ * ```ts
541
+ * export const appTopbar = signal<Topbar>({
542
+ * showMenuToggle: true,
543
+ * menuItems: [{ component: { component: SmzTenantSwitchComponent, inputs: [], outputs: [] } }],
544
+ * });
545
+ *
546
+ * configureSmzUILayout().withTopbar(appTopbar) // …
547
+ * ```
548
+ * Ou por template, quando o componente precisa de contexto da tela:
549
+ * ```html
550
+ * <app-layout>
551
+ * <ng-template smzTemplate="headerExtras"><smz-tenant-switch /></ng-template>
552
+ * </app-layout>
553
+ * ```
554
+ */
265
555
  withTopbar(topbar: WritableSignal<Topbar>): this;
266
556
  /** Writable layout chrome config (preset, theme flags, menu mode, …). */
267
557
  withLayout(layout: WritableSignal<LayoutConfig>): this;
268
558
  /** Writable overlay / sidebar UI state for the Prime layout shell. */
269
559
  withLayoutState(state: WritableSignal<LayoutState>): this;
560
+ /**
561
+ * Loader montado pelo `<app-layout>`: cobre a tela até a primeira navegação terminar e sempre que o app chama
562
+ * `LayoutLoaderService.show()`. Opcional; sem esta chamada a casca não monta loader.
563
+ * Aceita o valor ou um signal gravável (`type`: `cube` ou `square`, `title`, `message`, `timeout` em ms).
564
+ */
565
+ withLoader(loader?: LayoutLoader | WritableSignal<LayoutLoader>): this;
566
+ /**
567
+ * Toast (`<ui-toast>`) montado pelo `<app-layout>`, com a posição da configuração (padrão `bottom-right`).
568
+ * Opcional; não chame se o app já monta o próprio `<ui-toast>` ou usa o `smz-ui-outlet` do core, para não
569
+ * mostrar cada mensagem duas vezes.
570
+ */
571
+ withToast(toast?: LayoutToast | WritableSignal<LayoutToast>): this;
572
+ /**
573
+ * Assistência montada pelo `<app-layout>`: botão flutuante (`buttonPosition`) que abre um painel lateral
574
+ * (`position`) com os ajustes da casca e, se informado, um componente do app (`component`).
575
+ * Opcional; sem esta chamada a casca não monta assistência.
576
+ */
577
+ withAssistance(assistance?: LayoutAssistance | WritableSignal<LayoutAssistance>): this;
578
+ /**
579
+ * Modo do menu e larguras da sidebar, gravados no signal de `.withLayout()` (os mesmos campos de `LayoutConfig`
580
+ * podem ser informados direto nele). Opcional; sem esta chamada o menu segue `static` com a largura do tema.
581
+ *
582
+ * - `menuMode`: `static`, `overlay`, `horizontal` (barra abaixo da topbar) ou `slim` (só ícones, com rótulo e
583
+ * submenu ao lado do item). Abaixo de 992px todos viram a gaveta.
584
+ * - `sidebarWidth`: largura da sidebar; sobrescreve o token `layout.sidebar.width`.
585
+ * - `sidebarSlimWidth`: largura da sidebar no menu `slim`; sobrescreve o token `layout.sidebar.slim.width`.
586
+ *
587
+ * @example
588
+ * ```ts
589
+ * configureSmzUILayout()
590
+ * .withLayout(appLayout)
591
+ * .withMenu({ menuMode: 'slim', sidebarWidth: '16rem', sidebarSlimWidth: '5rem' })
592
+ * ```
593
+ */
594
+ withMenu(options: {
595
+ menuMode?: 'static' | 'overlay' | 'horizontal' | 'slim';
596
+ sidebarWidth?: string;
597
+ sidebarSlimWidth?: string;
598
+ }): this;
270
599
  /**
271
600
  * Runs during app bootstrap (injection context). Use `inject()` to resolve services,
272
601
  * then return the predicate assigned to `SMZ_UI_LAYOUT_CONFIG.hasClaim`.
@@ -287,10 +616,10 @@ declare function provideSmzUILayout(initializers: () => SmzUILayoutConfigType[],
287
616
 
288
617
  declare class AppFloatingConfigurator {
289
618
  LayoutService: LayoutService;
290
- isDarkTheme: i0.Signal<boolean>;
619
+ isDarkTheme: _angular_core.Signal<boolean>;
291
620
  toggleDarkMode(): void;
292
- static ɵfac: i0.ɵɵFactoryDeclaration<AppFloatingConfigurator, never>;
293
- static ɵcmp: i0.ɵɵComponentDeclaration<AppFloatingConfigurator, "app-floating-configurator", never, {}, {}, never, never, true, never>;
621
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppFloatingConfigurator, never>;
622
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppFloatingConfigurator, "app-floating-configurator", never, {}, {}, never, never, true, never>;
294
623
  }
295
624
 
296
625
  interface ErrorPageButton {
@@ -331,28 +660,28 @@ interface ErrorPagesConfig {
331
660
  };
332
661
  }
333
662
  declare class ErrorPagesConfigService {
334
- readonly config: i0.WritableSignal<ErrorPagesConfig>;
663
+ readonly config: _angular_core.WritableSignal<ErrorPagesConfig>;
335
664
  updateConfig(newConfig: Partial<ErrorPagesConfig>): void;
336
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorPagesConfigService, never>;
337
- static ɵprov: i0.ɵɵInjectableDeclaration<ErrorPagesConfigService>;
665
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ErrorPagesConfigService, never>;
666
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ErrorPagesConfigService>;
338
667
  }
339
668
 
340
669
  declare class AccessPageComponent {
341
670
  readonly config: ErrorPagesConfig;
342
- static ɵfac: i0.ɵɵFactoryDeclaration<AccessPageComponent, never>;
343
- static ɵcmp: i0.ɵɵComponentDeclaration<AccessPageComponent, "app-access", never, {}, {}, never, never, true, never>;
671
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccessPageComponent, never>;
672
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccessPageComponent, "app-access", never, {}, {}, never, never, true, never>;
344
673
  }
345
674
 
346
675
  declare class ErrorPageComponent {
347
676
  readonly config: ErrorPagesConfig;
348
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorPageComponent, never>;
349
- static ɵcmp: i0.ɵɵComponentDeclaration<ErrorPageComponent, "app-error", never, {}, {}, never, never, true, never>;
677
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ErrorPageComponent, never>;
678
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ErrorPageComponent, "app-error", never, {}, {}, never, never, true, never>;
350
679
  }
351
680
 
352
681
  declare class NotfoundPageComponent {
353
682
  readonly config: ErrorPagesConfig;
354
- static ɵfac: i0.ɵɵFactoryDeclaration<NotfoundPageComponent, never>;
355
- static ɵcmp: i0.ɵɵComponentDeclaration<NotfoundPageComponent, "app-notfound", never, {}, {}, never, never, true, never>;
683
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NotfoundPageComponent, never>;
684
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NotfoundPageComponent, "app-notfound", never, {}, {}, never, never, true, never>;
356
685
  }
357
686
 
358
687
  declare const ErrorsRoutes: Routes;
@@ -375,8 +704,8 @@ interface SmzLayoutLoggingConfigType {
375
704
  declare class SmzLayoutLogging {
376
705
  logging: WritableSignal<LoggingConfig>;
377
706
  setConfig(config: SmzLayoutLoggingConfigType): void;
378
- static ɵfac: i0.ɵɵFactoryDeclaration<SmzLayoutLogging, never>;
379
- static ɵprov: i0.ɵɵInjectableDeclaration<SmzLayoutLogging>;
707
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SmzLayoutLogging, never>;
708
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<SmzLayoutLogging>;
380
709
  }
381
710
 
382
711
  declare const SMZ_LAYOUT_LOGGING_CONFIG: InjectionToken<SmzLayoutLoggingConfigType>;
@@ -393,9 +722,9 @@ declare class LoggingService {
393
722
  private enabled;
394
723
  private levelRank;
395
724
  /** expose current settings */
396
- readonly isEnabled: i0.Signal<boolean>;
397
- readonly currentLevel: i0.Signal<"error" | "debug" | "info" | "warn">;
398
- readonly activeScopes: i0.Signal<string[]>;
725
+ readonly isEnabled: _angular_core.Signal<boolean>;
726
+ readonly currentLevel: _angular_core.Signal<"error" | "debug" | "info" | "warn">;
727
+ readonly activeScopes: _angular_core.Signal<string[]>;
399
728
  /** toggle logging global */
400
729
  enable(): void;
401
730
  disable(): void;
@@ -410,8 +739,8 @@ declare class LoggingService {
410
739
  * owner agora é um LoggingScope ou string
411
740
  */
412
741
  scoped(owner: LoggingScope | string): ScopedLogger;
413
- static ɵfac: i0.ɵɵFactoryDeclaration<LoggingService, never>;
414
- static ɵprov: i0.ɵɵInjectableDeclaration<LoggingService>;
742
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LoggingService, never>;
743
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<LoggingService>;
415
744
  }
416
745
 
417
746
  /** Manifesto das entradas de `@ngx-smz/layout` na galeria do Design System: dado puro (o import acima é só de tipo). */
@@ -423,5 +752,5 @@ declare const LAYOUT_GALLERY_MANIFEST: SmzGalleryManifestEntry[];
423
752
  */
424
753
  declare const SMZ_LAYOUT_GALLERY_ENTRIES: SmzGalleryEntry[];
425
754
 
426
- export { AccessPageComponent, AppFloatingConfigurator, AppLayout, ErrorPageComponent, ErrorPagesConfigService, ErrorsRoutes, LAYOUT_GALLERY_MANIFEST, LayoutService, LoggingScope, LoggingService, NotfoundPageComponent, SMZ_LAYOUT_GALLERY_ENTRIES, SMZ_LAYOUT_LOGGING_CONFIG, SMZ_UI_LAYOUT_CONFIG, SmzLayoutLogging, SmzUILayout, SmzUILayoutProvisionBuilder, configureSmzUILayout, provideSmzLayoutLogging, provideSmzUILayout };
427
- export type { Footer, LayoutConfig, LayoutState, LoggingConfig, ScopedLogger, SmzLayoutLoggingConfigType, SmzUILayoutConfigType, Topbar };
755
+ export { AccessPageComponent, AppAssistance, AppFloatingConfigurator, AppLayout, AppLoader, ErrorPageComponent, ErrorPagesConfigService, ErrorsRoutes, LAYOUT_GALLERY_MANIFEST, LayoutLoaderService, LayoutService, LoggingScope, LoggingService, NotfoundPageComponent, RouteLayoutService, SMZ_LAYOUT_GALLERY_ENTRIES, SMZ_LAYOUT_LOGGING_CONFIG, SMZ_UI_LAYOUT_CONFIG, SmzLayoutLogging, SmzUILayout, SmzUILayoutProvisionBuilder, configureSmzUILayout, provideSmzLayoutLogging, provideSmzUILayout };
756
+ export type { Footer, LayoutAssistance, LayoutAssistanceButtonPosition, LayoutConfig, LayoutLoader, LayoutLoaderType, LayoutRouteData, LayoutRouteMode, LayoutState, LayoutToast, LoggingConfig, ScopedLogger, SmzLayoutLoggingConfigType, SmzUILayoutConfigType, Topbar, TopbarValue };