@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,14 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, computed, Injectable, InjectionToken, provideAppInitializer, inject, makeEnvironmentProviders, effect, Component, EventEmitter, Output, Input, Directive, HostBinding, ViewChild } from '@angular/core';
3
- import * as i3 from '@angular/common';
4
- import { CommonModule, Location } from '@angular/common';
5
- import * as i1 from '@angular/router';
6
- import { Router, NavigationEnd, RouterModule } from '@angular/router';
7
- import { Subject, filter as filter$1 } from 'rxjs';
8
- import * as i2 from '@angular/forms';
2
+ import { signal, computed, Injectable, InjectionToken, provideAppInitializer, inject, makeEnvironmentProviders, isSignal, effect, Component, EventEmitter, Output, Input, Directive, ChangeDetectionStrategy, input, HostBinding, ElementRef, contentChildren, ViewChild } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+ import { Location, CommonModule, NgTemplateOutlet, NgComponentOutlet } from '@angular/common';
5
+ import * as i1$2 from '@angular/router';
6
+ import { Router, NavigationEnd, RouterModule, NavigationCancel, NavigationError } from '@angular/router';
7
+ import { Subject, switchMap, isObservable, of, map, Subscription, filter as filter$1, take } from 'rxjs';
8
+ import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
9
+ import { BreakpointObserver } from '@angular/cdk/layout';
10
+ import * as i1 from '@angular/forms';
9
11
  import { FormsModule } from '@angular/forms';
10
- import { SmzThemeService, SmzSelectButtonComponent, SmzStyleClassDirective, SmzTooltipDirective, SmzMenuListComponent, SmzButtonComponent, SmzRippleDirective } from '@ngx-smz/ui-kit';
12
+ import { SmzThemeService, SmzSelectButtonComponent, SmzStyleClassDirective, SmzTooltipDirective, SmzMenuListComponent, SmzButtonComponent, SmzRippleDirective, SmzDrawerComponent, SmzToggleSwitchComponent, SmzTemplateDirective, smzFindTemplate, SmzToastContainerComponent } from '@ngx-smz/ui-kit';
11
13
  import { takeWhile, filter } from 'rxjs/operators';
14
+ import * as i1$1 from '@ngx-smz/core';
15
+ import { GlobalInjector, SmzNotificationsModule } from '@ngx-smz/core';
12
16
  import { trigger, state, style, transition, animate } from '@angular/animations';
13
17
 
14
18
  /**
@@ -141,6 +145,10 @@ class SmzUILayoutProvisionBuilder {
141
145
  topbarSignal;
142
146
  layoutSignal;
143
147
  layoutStateSignal;
148
+ menuOptions;
149
+ loaderSignal;
150
+ toastSignal;
151
+ assistanceSignal;
144
152
  hasGranularSlots() {
145
153
  return (this.sidebarSignal != null ||
146
154
  this.footerSignal != null ||
@@ -170,11 +178,40 @@ class SmzUILayoutProvisionBuilder {
170
178
  this.sidebarSignal = sidebar;
171
179
  return this;
172
180
  }
181
+ /**
182
+ * Rodapé: logotipos, `version`, `copyright`, texto livre dos dois lados (`leftSideText`, `rightSideText`) e
183
+ * imagens de marca à direita (`rightSideImages`, `rightSideImageStyleClass`).
184
+ * Conteúdo próprio do app entra por `<ng-template smzTemplate="footerExtras">` dentro de `<app-layout>`.
185
+ */
173
186
  withFooter(footer) {
174
187
  this.assertNotUsingFeaturesFactory('withFooter');
175
188
  this.footerSignal = footer;
176
189
  return this;
177
190
  }
191
+ /**
192
+ * Topbar: marca, ações (`menuItems`), perfil (`features`, com `username` e `profileMessage`) e o sino de
193
+ * notificações do core (`showNotifications`, desligado por padrão).
194
+ * Conteúdo próprio do app entra por `<ng-template smzTemplate="headerExtras">` dentro de `<app-layout>`
195
+ * (ou `headerExtrasLandscape` / `headerExtrasPortrait` para variar por orientação), ou como componente em
196
+ * `menuItems[].component`.
197
+ *
198
+ * @example
199
+ * Troca de tenant na topbar, com o `smz-tenant-switch` do `@ngx-smz/core`:
200
+ * ```ts
201
+ * export const appTopbar = signal<Topbar>({
202
+ * showMenuToggle: true,
203
+ * menuItems: [{ component: { component: SmzTenantSwitchComponent, inputs: [], outputs: [] } }],
204
+ * });
205
+ *
206
+ * configureSmzUILayout().withTopbar(appTopbar) // …
207
+ * ```
208
+ * Ou por template, quando o componente precisa de contexto da tela:
209
+ * ```html
210
+ * <app-layout>
211
+ * <ng-template smzTemplate="headerExtras"><smz-tenant-switch /></ng-template>
212
+ * </app-layout>
213
+ * ```
214
+ */
178
215
  withTopbar(topbar) {
179
216
  this.assertNotUsingFeaturesFactory('withTopbar');
180
217
  this.topbarSignal = topbar;
@@ -192,6 +229,57 @@ class SmzUILayoutProvisionBuilder {
192
229
  this.layoutStateSignal = state;
193
230
  return this;
194
231
  }
232
+ /**
233
+ * Loader montado pelo `<app-layout>`: cobre a tela até a primeira navegação terminar e sempre que o app chama
234
+ * `LayoutLoaderService.show()`. Opcional; sem esta chamada a casca não monta loader.
235
+ * Aceita o valor ou um signal gravável (`type`: `cube` ou `square`, `title`, `message`, `timeout` em ms).
236
+ */
237
+ withLoader(loader = {}) {
238
+ this.assertNotUsingFeaturesFactory('withLoader');
239
+ this.loaderSignal = isSignal(loader) ? loader : signal(loader);
240
+ return this;
241
+ }
242
+ /**
243
+ * Toast (`<ui-toast>`) montado pelo `<app-layout>`, com a posição da configuração (padrão `bottom-right`).
244
+ * 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
245
+ * mostrar cada mensagem duas vezes.
246
+ */
247
+ withToast(toast = {}) {
248
+ this.assertNotUsingFeaturesFactory('withToast');
249
+ this.toastSignal = isSignal(toast) ? toast : signal(toast);
250
+ return this;
251
+ }
252
+ /**
253
+ * Assistência montada pelo `<app-layout>`: botão flutuante (`buttonPosition`) que abre um painel lateral
254
+ * (`position`) com os ajustes da casca e, se informado, um componente do app (`component`).
255
+ * Opcional; sem esta chamada a casca não monta assistência.
256
+ */
257
+ withAssistance(assistance = {}) {
258
+ this.assertNotUsingFeaturesFactory('withAssistance');
259
+ this.assistanceSignal = isSignal(assistance) ? assistance : signal(assistance);
260
+ return this;
261
+ }
262
+ /**
263
+ * Modo do menu e larguras da sidebar, gravados no signal de `.withLayout()` (os mesmos campos de `LayoutConfig`
264
+ * podem ser informados direto nele). Opcional; sem esta chamada o menu segue `static` com a largura do tema.
265
+ *
266
+ * - `menuMode`: `static`, `overlay`, `horizontal` (barra abaixo da topbar) ou `slim` (só ícones, com rótulo e
267
+ * submenu ao lado do item). Abaixo de 992px todos viram a gaveta.
268
+ * - `sidebarWidth`: largura da sidebar; sobrescreve o token `layout.sidebar.width`.
269
+ * - `sidebarSlimWidth`: largura da sidebar no menu `slim`; sobrescreve o token `layout.sidebar.slim.width`.
270
+ *
271
+ * @example
272
+ * ```ts
273
+ * configureSmzUILayout()
274
+ * .withLayout(appLayout)
275
+ * .withMenu({ menuMode: 'slim', sidebarWidth: '16rem', sidebarSlimWidth: '5rem' })
276
+ * ```
277
+ */
278
+ withMenu(options) {
279
+ this.assertNotUsingFeaturesFactory('withMenu');
280
+ this.menuOptions = { ...this.menuOptions, ...options };
281
+ return this;
282
+ }
195
283
  /**
196
284
  * Runs during app bootstrap (injection context). Use `inject()` to resolve services,
197
285
  * then return the predicate assigned to `SMZ_UI_LAYOUT_CONFIG.hasClaim`.
@@ -224,6 +312,10 @@ class SmzUILayoutProvisionBuilder {
224
312
  if (missingSteps.length > 0) {
225
313
  throw new Error(`configureSmzUILayout(): provide layout signals or call .withFeatures(...). Missing: ${missingSteps.join(', ')}`);
226
314
  }
315
+ if (this.menuOptions != null) {
316
+ const menuOptions = this.menuOptions;
317
+ this.layoutSignal.update((layout) => ({ ...layout, ...menuOptions }));
318
+ }
227
319
  const feature = {
228
320
  sidebar: this.sidebarSignal,
229
321
  footer: this.footerSignal,
@@ -231,6 +323,15 @@ class SmzUILayoutProvisionBuilder {
231
323
  layout: this.layoutSignal,
232
324
  state: this.layoutStateSignal
233
325
  };
326
+ if (this.loaderSignal != null) {
327
+ feature.loader = this.loaderSignal;
328
+ }
329
+ if (this.toastSignal != null) {
330
+ feature.toast = this.toastSignal;
331
+ }
332
+ if (this.assistanceSignal != null) {
333
+ feature.assistance = this.assistanceSignal;
334
+ }
234
335
  return createSmzUILayoutEnvironmentProviders([feature], this.menuAuthorizationFactory);
235
336
  }
236
337
  }
@@ -364,26 +465,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
364
465
  }]
365
466
  }], ctorParameters: () => [] });
366
467
 
367
- /* Paletas do Tailwind usadas pelo seletor de cor primaria do configurador. */
368
- const PRIMARY_PALETTES = {
369
- emerald: { 50: '#ecfdf5', 100: '#d1fae5', 200: '#a7f3d0', 300: '#6ee7b7', 400: '#34d399', 500: '#10b981', 600: '#059669', 700: '#047857', 800: '#065f46', 900: '#064e3b', 950: '#022c22' },
370
- green: { 50: '#f0fdf4', 100: '#dcfce7', 200: '#bbf7d0', 300: '#86efac', 400: '#4ade80', 500: '#22c55e', 600: '#16a34a', 700: '#15803d', 800: '#166534', 900: '#14532d', 950: '#052e16' },
371
- lime: { 50: '#f7fee7', 100: '#ecfccb', 200: '#d9f99d', 300: '#bef264', 400: '#a3e635', 500: '#84cc16', 600: '#65a30d', 700: '#4d7c0f', 800: '#3f6212', 900: '#365314', 950: '#1a2e05' },
372
- orange: { 50: '#fff7ed', 100: '#ffedd5', 200: '#fed7aa', 300: '#fdba74', 400: '#fb923c', 500: '#f97316', 600: '#ea580c', 700: '#c2410c', 800: '#9a3412', 900: '#7c2d12', 950: '#431407' },
373
- amber: { 50: '#fffbeb', 100: '#fef3c7', 200: '#fde68a', 300: '#fcd34d', 400: '#fbbf24', 500: '#f59e0b', 600: '#d97706', 700: '#b45309', 800: '#92400e', 900: '#78350f', 950: '#451a03' },
374
- yellow: { 50: '#fefce8', 100: '#fef9c3', 200: '#fef08a', 300: '#fde047', 400: '#facc15', 500: '#eab308', 600: '#ca8a04', 700: '#a16207', 800: '#854d0e', 900: '#713f12', 950: '#422006' },
375
- teal: { 50: '#f0fdfa', 100: '#ccfbf1', 200: '#99f6e4', 300: '#5eead4', 400: '#2dd4bf', 500: '#14b8a6', 600: '#0d9488', 700: '#0f766e', 800: '#115e59', 900: '#134e4a', 950: '#042f2e' },
376
- cyan: { 50: '#ecfeff', 100: '#cffafe', 200: '#a5f3fc', 300: '#67e8f9', 400: '#22d3ee', 500: '#06b6d4', 600: '#0891b2', 700: '#0e7490', 800: '#155e75', 900: '#164e63', 950: '#083344' },
377
- sky: { 50: '#f0f9ff', 100: '#e0f2fe', 200: '#bae6fd', 300: '#7dd3fc', 400: '#38bdf8', 500: '#0ea5e9', 600: '#0284c7', 700: '#0369a1', 800: '#075985', 900: '#0c4a6e', 950: '#082f49' },
378
- blue: { 50: '#eff6ff', 100: '#dbeafe', 200: '#bfdbfe', 300: '#93c5fd', 400: '#60a5fa', 500: '#3b82f6', 600: '#2563eb', 700: '#1d4ed8', 800: '#1e40af', 900: '#1e3a8a', 950: '#172554' },
379
- indigo: { 50: '#eef2ff', 100: '#e0e7ff', 200: '#c7d2fe', 300: '#a5b4fc', 400: '#818cf8', 500: '#6366f1', 600: '#4f46e5', 700: '#4338ca', 800: '#3730a3', 900: '#312e81', 950: '#1e1b4b' },
380
- violet: { 50: '#f5f3ff', 100: '#ede9fe', 200: '#ddd6fe', 300: '#c4b5fd', 400: '#a78bfa', 500: '#8b5cf6', 600: '#7c3aed', 700: '#6d28d9', 800: '#5b21b6', 900: '#4c1d95', 950: '#2e1065' },
381
- purple: { 50: '#faf5ff', 100: '#f3e8ff', 200: '#e9d5ff', 300: '#d8b4fe', 400: '#c084fc', 500: '#a855f7', 600: '#9333ea', 700: '#7e22ce', 800: '#6b21a8', 900: '#581c87', 950: '#3b0764' },
382
- fuchsia: { 50: '#fdf4ff', 100: '#fae8ff', 200: '#f5d0fe', 300: '#f0abfc', 400: '#e879f9', 500: '#d946ef', 600: '#c026d3', 700: '#a21caf', 800: '#86198f', 900: '#701a75', 950: '#4a044e' },
383
- pink: { 50: '#fdf2f8', 100: '#fce7f3', 200: '#fbcfe8', 300: '#f9a8d4', 400: '#f472b6', 500: '#ec4899', 600: '#db2777', 700: '#be185d', 800: '#9d174d', 900: '#831843', 950: '#500724' },
384
- rose: { 50: '#fff1f2', 100: '#ffe4e6', 200: '#fecdd3', 300: '#fda4af', 400: '#fb7185', 500: '#f43f5e', 600: '#e11d48', 700: '#be123c', 800: '#9f1239', 900: '#881337', 950: '#4c0519' },
385
- };
468
+ /*
469
+ * Paletas que o configurador oferece. As cores moram na camada primitiva do catálogo de tokens do Design System
470
+ * (`<paleta>.<tom>`, por exemplo `emerald.500`), e não mais neste arquivo: aqui ficam só os nomes e o papel de
471
+ * cada tom. O tema do app troca um tom em `defineSmzTheme({ primitive: { emerald: { 500: '…' } } })`.
472
+ */
473
+ /** Tons de uma paleta do catálogo. */
474
+ const PALETTE_SHADES = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
475
+ /** Paletas do seletor de cor primária, na ordem em que aparecem. */
476
+ const PRIMARY_PALETTE_NAMES = [
477
+ 'emerald', 'green', 'lime', 'orange', 'amber', 'yellow', 'teal', 'cyan',
478
+ 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose',
479
+ ];
480
+ /** Paletas do seletor de superfície, na ordem em que aparecem. */
481
+ const SURFACE_PALETTE_NAMES = ['slate', 'gray', 'zinc', 'neutral', 'stone', 'soho', 'viva', 'ocean'];
482
+ /** Opção de cor primária sem paleta própria: usa os tons escuros (modo claro) ou claros (modo escuro) de `slate`. */
483
+ const NOIR_PALETTE_NAME = 'noir';
484
+ /** Caminho, no catálogo de tokens, de um tom de uma paleta: `emerald.500`. */
485
+ const paletteTokenPath = (name, shade) => `${name}.${shade}`;
486
+ const reference = (name, shade) => `{${paletteTokenPath(name, shade)}}`;
487
+ const role = (name, light, dark) => ({ light: reference(name, light), dark: reference(name, dark) });
488
+ /**
489
+ * Os tons de uma paleta com as referências resolvidas. `resolve` é o `SmzThemeService.resolve` (tema aplicado).
490
+ * As paletas de superfície levam também o tom `0`, que é o branco do catálogo.
491
+ */
492
+ function resolvePalette(name, resolve, withWhite = false) {
493
+ const palette = withWhite ? { 0: resolve('white') } : {};
494
+ for (const shade of PALETTE_SHADES)
495
+ palette[shade] = resolve(paletteTokenPath(name, shade));
496
+ return palette;
497
+ }
498
+ /**
499
+ * Tokens semânticos que uma escolha de cor primária define, por caminho. Modo claro: tons 500/600/700;
500
+ * modo escuro: 400/300/200. O texto sobre a primária volta ao padrão do catálogo (branco no claro, `slate.900` no escuro).
501
+ */
502
+ function primaryPaletteRoles(name) {
503
+ if (name == null || (name !== NOIR_PALETTE_NAME && !PRIMARY_PALETTE_NAMES.includes(name)))
504
+ return {};
505
+ const noir = name === NOIR_PALETTE_NAME;
506
+ const base = noir ? role('slate', 900, 50) : role(name, 500, 400);
507
+ return {
508
+ 'color.primary.default': base,
509
+ 'color.primary.hover': noir ? role('slate', 800, 200) : role(name, 600, 300),
510
+ 'color.primary.active': noir ? role('slate', 700, 300) : role(name, 700, 200),
511
+ 'color.primary.contrast': { light: '{white}', dark: reference('slate', 900) },
512
+ 'color.focus': base,
513
+ };
514
+ }
515
+ /** Tokens semânticos que uma escolha de superfície define, por caminho: fundos, texto e bordas saem da mesma paleta. */
516
+ function surfacePaletteRoles(name) {
517
+ if (name == null || !SURFACE_PALETTE_NAMES.includes(name))
518
+ return {};
519
+ return {
520
+ 'color.surface.0': role(name, 50, 950),
521
+ 'color.surface.1': { light: '{white}', dark: reference(name, 900) },
522
+ 'color.surface.2': { light: '{white}', dark: reference(name, 800) },
523
+ 'color.surface.3': role(name, 100, 700),
524
+ 'color.fg.default': role(name, 900, 50),
525
+ 'color.fg.muted': role(name, 600, 300),
526
+ 'color.fg.subtle': role(name, 400, 400),
527
+ 'color.line.default': role(name, 200, 700),
528
+ 'color.line.strong': role(name, 300, 600),
529
+ };
530
+ }
386
531
 
532
+ /**
533
+ * O que o configurador escreveu no tema, por token. Fica por serviço de tema, e não por instância, porque o
534
+ * configurador da topbar e o flutuante aplicam a mesma configuração.
535
+ */
536
+ const APPLIED = new WeakMap();
537
+ const sameOverride = (a, b) => a?.light === b?.light && a?.dark === b?.dark;
387
538
  class AppConfigurator {
388
539
  router = inject(Router);
389
540
  layoutService = inject(LayoutService);
@@ -394,159 +545,28 @@ class AppConfigurator {
394
545
  { label: 'Overlay', value: 'overlay' }
395
546
  ];
396
547
  constructor() {
397
- // Reaplica cor primaria e superficie quando o modo claro/escuro muda (as sobrescritas inline vencem o CSS do tema).
548
+ // Aplica cor primária e superfície no tema quando a configuração muda. Os valores valem para os dois modos:
549
+ // a troca de claro/escuro não precisa reaplicar nada.
398
550
  effect(() => {
399
- // Reading the signal registers the dependency: any config change (dark theme, primary, surface) re-applies the colors.
551
+ // A leitura do sinal registra a dependência: qualquer mudança da configuração passa por `applyCurrent`.
400
552
  this.layoutService.layoutConfig();
401
553
  queueMicrotask(() => this.applyCurrent());
402
554
  });
403
555
  }
404
- surfaces = [
405
- {
406
- name: 'slate',
407
- palette: {
408
- 0: '#ffffff',
409
- 50: '#f8fafc',
410
- 100: '#f1f5f9',
411
- 200: '#e2e8f0',
412
- 300: '#cbd5e1',
413
- 400: '#94a3b8',
414
- 500: '#64748b',
415
- 600: '#475569',
416
- 700: '#334155',
417
- 800: '#1e293b',
418
- 900: '#0f172a',
419
- 950: '#020617'
420
- }
421
- },
422
- {
423
- name: 'gray',
424
- palette: {
425
- 0: '#ffffff',
426
- 50: '#f9fafb',
427
- 100: '#f3f4f6',
428
- 200: '#e5e7eb',
429
- 300: '#d1d5db',
430
- 400: '#9ca3af',
431
- 500: '#6b7280',
432
- 600: '#4b5563',
433
- 700: '#374151',
434
- 800: '#1f2937',
435
- 900: '#111827',
436
- 950: '#030712'
437
- }
438
- },
439
- {
440
- name: 'zinc',
441
- palette: {
442
- 0: '#ffffff',
443
- 50: '#fafafa',
444
- 100: '#f4f4f5',
445
- 200: '#e4e4e7',
446
- 300: '#d4d4d8',
447
- 400: '#a1a1aa',
448
- 500: '#71717a',
449
- 600: '#52525b',
450
- 700: '#3f3f46',
451
- 800: '#27272a',
452
- 900: '#18181b',
453
- 950: '#09090b'
454
- }
455
- },
456
- {
457
- name: 'neutral',
458
- palette: {
459
- 0: '#ffffff',
460
- 50: '#fafafa',
461
- 100: '#f5f5f5',
462
- 200: '#e5e5e5',
463
- 300: '#d4d4d4',
464
- 400: '#a3a3a3',
465
- 500: '#737373',
466
- 600: '#525252',
467
- 700: '#404040',
468
- 800: '#262626',
469
- 900: '#171717',
470
- 950: '#0a0a0a'
471
- }
472
- },
473
- {
474
- name: 'stone',
475
- palette: {
476
- 0: '#ffffff',
477
- 50: '#fafaf9',
478
- 100: '#f5f5f4',
479
- 200: '#e7e5e4',
480
- 300: '#d6d3d1',
481
- 400: '#a8a29e',
482
- 500: '#78716c',
483
- 600: '#57534e',
484
- 700: '#44403c',
485
- 800: '#292524',
486
- 900: '#1c1917',
487
- 950: '#0c0a09'
488
- }
489
- },
490
- {
491
- name: 'soho',
492
- palette: {
493
- 0: '#ffffff',
494
- 50: '#ececec',
495
- 100: '#dedfdf',
496
- 200: '#c4c4c6',
497
- 300: '#adaeb0',
498
- 400: '#97979b',
499
- 500: '#7f8084',
500
- 600: '#6a6b70',
501
- 700: '#55565b',
502
- 800: '#3f4046',
503
- 900: '#2c2c34',
504
- 950: '#16161d'
505
- }
506
- },
507
- {
508
- name: 'viva',
509
- palette: {
510
- 0: '#ffffff',
511
- 50: '#f3f3f3',
512
- 100: '#e7e7e8',
513
- 200: '#cfd0d0',
514
- 300: '#b7b8b9',
515
- 400: '#9fa1a1',
516
- 500: '#87898a',
517
- 600: '#6e7173',
518
- 700: '#565a5b',
519
- 800: '#3e4244',
520
- 900: '#262b2c',
521
- 950: '#0e1315'
522
- }
523
- },
524
- {
525
- name: 'ocean',
526
- palette: {
527
- 0: '#ffffff',
528
- 50: '#fbfcfc',
529
- 100: '#F7F9F8',
530
- 200: '#EFF3F2',
531
- 300: '#DADEDD',
532
- 400: '#B1B7B6',
533
- 500: '#828787',
534
- 600: '#5F7274',
535
- 700: '#415B61',
536
- 800: '#29444E',
537
- 900: '#183240',
538
- 950: '#0c1920'
539
- }
540
- }
541
- ];
556
+ resolveToken = (path) => this.theme.resolve(path);
557
+ /** Paletas de superfície, com os tons resolvidos no tema aplicado (primitivos `<paleta>.<tom>` do catálogo). */
558
+ surfacePalettes = computed(() => SURFACE_PALETTE_NAMES.map((name) => ({ name, palette: resolvePalette(name, this.resolveToken, true) })), ...(ngDevMode ? [{ debugName: "surfacePalettes" }] : /* istanbul ignore next */ []));
559
+ get surfaces() {
560
+ return this.surfacePalettes();
561
+ }
542
562
  selectedPrimaryColor = computed(() => this.layoutService.layoutConfig().primary, ...(ngDevMode ? [{ debugName: "selectedPrimaryColor" }] : /* istanbul ignore next */ []));
543
563
  selectedSurfaceColor = computed(() => this.layoutService.layoutConfig().surface, ...(ngDevMode ? [{ debugName: "selectedSurfaceColor" }] : /* istanbul ignore next */ []));
544
564
  menuMode = computed(() => this.layoutService.layoutConfig().menuMode, ...(ngDevMode ? [{ debugName: "menuMode" }] : /* istanbul ignore next */ []));
545
- primaryColors = computed(() => {
546
- const palettes = [{ name: 'noir', palette: {} }];
547
- Object.entries(PRIMARY_PALETTES).forEach(([name, palette]) => palettes.push({ name, palette }));
548
- return palettes;
549
- }, ...(ngDevMode ? [{ debugName: "primaryColors" }] : /* istanbul ignore next */ []));
565
+ /** Opções de cor primária: `noir` (sem paleta própria) e as paletas do catálogo, com os tons resolvidos no tema aplicado. */
566
+ primaryColors = computed(() => [
567
+ { name: NOIR_PALETTE_NAME, palette: {} },
568
+ ...PRIMARY_PALETTE_NAMES.map((name) => ({ name, palette: resolvePalette(name, this.resolveToken) })),
569
+ ], ...(ngDevMode ? [{ debugName: "primaryColors" }] : /* istanbul ignore next */ []));
550
570
  updateColors(event, type, color) {
551
571
  if (type === 'primary') {
552
572
  this.layoutService.layoutConfig.update((state) => ({ ...state, primary: color.name }));
@@ -559,123 +579,132 @@ class AppConfigurator {
559
579
  onMenuModeChange(event) {
560
580
  this.layoutService.layoutConfig.update((prev) => ({ ...prev, menuMode: event }));
561
581
  }
582
+ /**
583
+ * Leva a escolha de cor primária e de superfície para o tema aplicado (`SmzThemeService.setTheme`), como
584
+ * sobrescrita dos tokens semânticos com referências aos primitivos da paleta (`{emerald.500}`).
585
+ *
586
+ * Só mexe nos tokens que o próprio configurador escreveu: o resto do tema do app, o que outro código alterou
587
+ * depois e as variáveis postas por `setColors`/`setVariable` ficam como estão. Sem escolha (ou com um nome que
588
+ * não é de paleta), o token volta ao que o tema definia antes.
589
+ */
562
590
  applyCurrent() {
563
591
  const config = this.layoutService.layoutConfig();
564
- const dark = !!config.darkTheme;
565
- this.theme.reset();
566
- const primary = this.primaryColors().find((c) => c.name === config.primary);
567
- if (primary?.name === 'noir') {
568
- this.theme.setPrimaryPalette(dark ? { 500: '#f8fafc', 400: '#f8fafc', 300: '#e2e8f0', 200: '#cbd5e1', 600: '#1e293b', 700: '#334155' } : { 500: '#0f172a', 600: '#1e293b', 700: '#334155' }, dark);
569
- }
570
- else if (primary?.palette && Object.keys(primary.palette).length) {
571
- this.theme.setPrimaryPalette(primary.palette, dark);
572
- }
573
- const surface = this.surfaces.find((s) => s.name === config.surface)?.palette;
574
- if (surface) {
575
- const p = surface;
576
- this.theme.setColors(dark
577
- ? { 'surface-0': p[950], 'surface-1': p[900], 'surface-2': p[800], 'surface-3': p[700], fg: p[50], 'fg-muted': p[300], 'fg-subtle': p[400], line: p[700], 'line-strong': p[600] }
578
- : { 'surface-0': p[50], 'surface-1': p[0], 'surface-2': p[0], 'surface-3': p[100], fg: p[900], 'fg-muted': p[600], 'fg-subtle': p[400], line: p[200], 'line-strong': p[300] });
579
- }
592
+ const wanted = { ...primaryPaletteRoles(config.primary), ...surfacePaletteRoles(config.surface) };
593
+ const current = this.theme.theme();
594
+ const overrides = { ...current.overrides };
595
+ const applied = APPLIED.get(this.theme) ?? new Map();
596
+ APPLIED.set(this.theme, applied);
597
+ // Desfaz a escolha anterior. Token que já não vale o que o configurador escreveu foi alterado por outro: fica.
598
+ for (const [path, entry] of applied) {
599
+ if (!sameOverride(overrides[path], entry.written))
600
+ continue;
601
+ if (entry.previous == null)
602
+ delete overrides[path];
603
+ else
604
+ overrides[path] = entry.previous;
605
+ }
606
+ applied.clear();
607
+ for (const [path, value] of Object.entries(wanted)) {
608
+ applied.set(path, { previous: overrides[path], written: value });
609
+ overrides[path] = { ...value };
610
+ }
611
+ const paths = new Set([...Object.keys(current.overrides), ...Object.keys(overrides)]);
612
+ if ([...paths].every((path) => sameOverride(overrides[path], current.overrides[path])))
613
+ return;
614
+ this.theme.setTheme({ ...current, overrides });
580
615
  }
581
616
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppConfigurator, deps: [], target: i0.ɵɵFactoryTarget.Component });
582
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppConfigurator, isStandalone: true, selector: "app-configurator", host: { classAttribute: "hidden absolute top-[3.25rem] right-0 w-72 p-4 bg-surface-0 dark:bg-surface-900 border border-surface rounded-border origin-top shadow-[0px_3px_5px_rgba(0,0,0,0.02),0px_0px_2px_rgba(0,0,0,0.05),0px_1px_4px_rgba(0,0,0,0.08)]" }, ngImport: i0, template: `
617
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppConfigurator, isStandalone: true, selector: "app-configurator", host: { classAttribute: "hidden absolute top-ui-configurator-offset right-0 w-72 p-4 bg-ui-surface-1 border border-ui-line rounded-control origin-top shadow-ui-configurator" }, ngImport: i0, template: `
583
618
  <div class="flex flex-col gap-4">
584
619
  <div>
585
- <span class="text-sm text-muted-color font-semibold">Primary</span>
620
+ <span class="text-ui-md leading-5 text-ui-fg-muted font-ui-configurator-label">Primary</span>
586
621
  <div class="pt-2 flex gap-2 flex-wrap justify-start">
587
622
  @for (primaryColor of primaryColors(); track primaryColor.name) {
588
623
  <button
589
624
  type="button"
590
625
  [title]="primaryColor.name"
591
626
  (click)="updateColors($event, 'primary', primaryColor)"
592
- [ngClass]="{ 'outline-primary': primaryColor.name === selectedPrimaryColor() }"
593
- class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
594
- [style]="{
595
- 'background-color': primaryColor?.name === 'noir' ? 'var(--text-color)' : primaryColor?.palette?.['500']
596
- }"
627
+ [class.outline-ui-primary]="primaryColor.name === selectedPrimaryColor()"
628
+ [class.bg-ui-fg]="primaryColor.name === 'noir'"
629
+ class="border-none w-5 h-5 rounded-pill p-0 cursor-pointer outline-none outline-offset-1"
630
+ [style.background]="primaryColor.palette?.['500']"
597
631
  ></button>
598
632
  }
599
633
  </div>
600
634
  </div>
601
635
  <div>
602
- <span class="text-sm text-muted-color font-semibold">Surface</span>
636
+ <span class="text-ui-md leading-5 text-ui-fg-muted font-ui-configurator-label">Surface</span>
603
637
  <div class="pt-2 flex gap-2 flex-wrap justify-start">
604
638
  @for (surface of surfaces; track surface.name) {
605
639
  <button
606
640
  type="button"
607
641
  [title]="surface.name"
608
642
  (click)="updateColors($event, 'surface', surface)"
609
- [ngClass]="{ 'outline-primary': selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : layoutService.layoutConfig().darkTheme ? surface.name === 'zinc' : surface.name === 'slate' }"
610
- class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
611
- [style]="{
612
- 'background-color': surface?.name === 'noir' ? 'var(--text-color)' : surface?.palette?.['500']
613
- }"
643
+ [class.outline-ui-primary]="selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : layoutService.layoutConfig().darkTheme ? surface.name === 'zinc' : surface.name === 'slate'"
644
+ class="border-none w-5 h-5 rounded-pill p-0 cursor-pointer outline-none outline-offset-1"
645
+ [style.background]="surface.palette?.['500']"
614
646
  ></button>
615
647
  }
616
648
  </div>
617
649
  </div>
618
650
  @if (showMenuModeButton()) {
619
651
  <div class="flex flex-col gap-2">
620
- <span class="text-sm text-muted-color font-semibold">Menu Mode</span>
652
+ <span class="text-ui-md leading-5 text-ui-fg-muted font-ui-configurator-label">Menu Mode</span>
621
653
  <ui-select-button [ngModel]="menuMode()" (ngModelChange)="onMenuModeChange($event)" [options]="menuModeOptions" [allowEmpty]="false" size="small"></ui-select-button>
622
654
  </div>
623
655
  }
624
656
  </div>
625
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SmzSelectButtonComponent, selector: "ui-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "multiple", "allowEmpty", "size", "styleClass", "appendTo"], outputs: ["changed"] }] });
657
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SmzSelectButtonComponent, selector: "ui-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "multiple", "allowEmpty", "size", "styleClass", "appendTo"], outputs: ["changed"] }] });
626
658
  }
627
659
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppConfigurator, decorators: [{
628
660
  type: Component,
629
661
  args: [{
630
662
  selector: 'app-configurator',
631
663
  standalone: true,
632
- imports: [CommonModule, FormsModule, SmzSelectButtonComponent],
664
+ imports: [FormsModule, SmzSelectButtonComponent],
633
665
  template: `
634
666
  <div class="flex flex-col gap-4">
635
667
  <div>
636
- <span class="text-sm text-muted-color font-semibold">Primary</span>
668
+ <span class="text-ui-md leading-5 text-ui-fg-muted font-ui-configurator-label">Primary</span>
637
669
  <div class="pt-2 flex gap-2 flex-wrap justify-start">
638
670
  @for (primaryColor of primaryColors(); track primaryColor.name) {
639
671
  <button
640
672
  type="button"
641
673
  [title]="primaryColor.name"
642
674
  (click)="updateColors($event, 'primary', primaryColor)"
643
- [ngClass]="{ 'outline-primary': primaryColor.name === selectedPrimaryColor() }"
644
- class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
645
- [style]="{
646
- 'background-color': primaryColor?.name === 'noir' ? 'var(--text-color)' : primaryColor?.palette?.['500']
647
- }"
675
+ [class.outline-ui-primary]="primaryColor.name === selectedPrimaryColor()"
676
+ [class.bg-ui-fg]="primaryColor.name === 'noir'"
677
+ class="border-none w-5 h-5 rounded-pill p-0 cursor-pointer outline-none outline-offset-1"
678
+ [style.background]="primaryColor.palette?.['500']"
648
679
  ></button>
649
680
  }
650
681
  </div>
651
682
  </div>
652
683
  <div>
653
- <span class="text-sm text-muted-color font-semibold">Surface</span>
684
+ <span class="text-ui-md leading-5 text-ui-fg-muted font-ui-configurator-label">Surface</span>
654
685
  <div class="pt-2 flex gap-2 flex-wrap justify-start">
655
686
  @for (surface of surfaces; track surface.name) {
656
687
  <button
657
688
  type="button"
658
689
  [title]="surface.name"
659
690
  (click)="updateColors($event, 'surface', surface)"
660
- [ngClass]="{ 'outline-primary': selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : layoutService.layoutConfig().darkTheme ? surface.name === 'zinc' : surface.name === 'slate' }"
661
- class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
662
- [style]="{
663
- 'background-color': surface?.name === 'noir' ? 'var(--text-color)' : surface?.palette?.['500']
664
- }"
691
+ [class.outline-ui-primary]="selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : layoutService.layoutConfig().darkTheme ? surface.name === 'zinc' : surface.name === 'slate'"
692
+ class="border-none w-5 h-5 rounded-pill p-0 cursor-pointer outline-none outline-offset-1"
693
+ [style.background]="surface.palette?.['500']"
665
694
  ></button>
666
695
  }
667
696
  </div>
668
697
  </div>
669
698
  @if (showMenuModeButton()) {
670
699
  <div class="flex flex-col gap-2">
671
- <span class="text-sm text-muted-color font-semibold">Menu Mode</span>
700
+ <span class="text-ui-md leading-5 text-ui-fg-muted font-ui-configurator-label">Menu Mode</span>
672
701
  <ui-select-button [ngModel]="menuMode()" (ngModelChange)="onMenuModeChange($event)" [options]="menuModeOptions" [allowEmpty]="false" size="small"></ui-select-button>
673
702
  </div>
674
703
  }
675
704
  </div>
676
705
  `,
677
706
  host: {
678
- class: 'hidden absolute top-[3.25rem] right-0 w-72 p-4 bg-surface-0 dark:bg-surface-900 border border-surface rounded-border origin-top shadow-[0px_3px_5px_rgba(0,0,0,0.02),0px_0px_2px_rgba(0,0,0,0.05),0px_1px_4px_rgba(0,0,0,0.08)]'
707
+ class: 'hidden absolute top-ui-configurator-offset right-0 w-72 p-4 bg-ui-surface-1 border border-ui-line rounded-control origin-top shadow-ui-configurator'
679
708
  }
680
709
  }]
681
710
  }], ctorParameters: () => [] });
@@ -1038,11 +1067,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1038
1067
  args: [{ providedIn: 'root' }]
1039
1068
  }], ctorParameters: () => [] });
1040
1069
 
1070
+ /**
1071
+ * O sino do core (`smz-ui-notifications`) lê a configuração de `provideSmzUi()` (`rbkUtils.notifications`) e o estado
1072
+ * `ui.notifications` do NGXS. Sem a configuração do core o módulo de notificações falha ao nascer; a topbar só cria o
1073
+ * sino quando esta função devolve `true`.
1074
+ */
1075
+ function smzTopbarNotificationsAvailable() {
1076
+ return GlobalInjector.config?.rbkUtils?.notifications != null;
1077
+ }
1078
+ /**
1079
+ * Sino de notificações do core dentro da topbar (`topbar.showNotifications`).
1080
+ *
1081
+ * A topbar cria este componente por `ngComponentOutlet`, fora dos seus `imports`: assim o `SmzNotificationsModule`
1082
+ * (que lê a configuração do core no construtor) só é instanciado nos apps que ligam o recurso.
1083
+ */
1084
+ class AppTopbarNotifications {
1085
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppTopbarNotifications, deps: [], target: i0.ɵɵFactoryTarget.Component });
1086
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: AppTopbarNotifications, isStandalone: true, selector: "app-topbar-notifications", host: { attributes: { "data-smz-part": "notifications" }, classAttribute: "layout-topbar-notifications" }, ngImport: i0, template: '<smz-ui-notifications></smz-ui-notifications>', isInline: true, dependencies: [{ kind: "ngmodule", type: SmzNotificationsModule }, { kind: "component", type: i1$1.SmzNotificationsComponent, selector: "smz-ui-notifications" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1087
+ }
1088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppTopbarNotifications, decorators: [{
1089
+ type: Component,
1090
+ args: [{
1091
+ selector: 'app-topbar-notifications',
1092
+ standalone: true,
1093
+ changeDetection: ChangeDetectionStrategy.OnPush,
1094
+ imports: [SmzNotificationsModule],
1095
+ host: { class: 'layout-topbar-notifications', 'data-smz-part': 'notifications' },
1096
+ template: '<smz-ui-notifications></smz-ui-notifications>',
1097
+ }]
1098
+ }] });
1099
+
1100
+ /** Lê um {@link TopbarValue} como signal. Precisa de contexto de injeção (campo de classe ou construtor). */
1101
+ function topbarValueSignal(source) {
1102
+ const emitted = toSignal(toObservable(source).pipe(switchMap((value) => (isObservable(value) ? value : of(null)))), { initialValue: null });
1103
+ return computed(() => {
1104
+ const value = source();
1105
+ if (isObservable(value)) {
1106
+ return emitted() ?? '';
1107
+ }
1108
+ return (isSignal(value) ? value() : value) ?? '';
1109
+ });
1110
+ }
1111
+ /**
1112
+ * Texto do perfil na topbar: a mensagem seguida do nome do usuário (`Olá, Maria`), como nos layouts antigos
1113
+ * (`profileMessage` + `usernameProperty`). Fica ao lado do avatar ou do ícone e abre o mesmo menu.
1114
+ */
1115
+ class AppTopbarProfileText {
1116
+ message = input(undefined, ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
1117
+ username = input(undefined, ...(ngDevMode ? [{ debugName: "username" }] : /* istanbul ignore next */ []));
1118
+ messageText = topbarValueSignal(this.message);
1119
+ usernameText = topbarValueSignal(this.username);
1120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppTopbarProfileText, deps: [], target: i0.ɵɵFactoryTarget.Component });
1121
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", type: AppTopbarProfileText, isStandalone: true, selector: "app-topbar-profile-text", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, username: { classPropertyName: "username", publicName: "username", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: '<span data-smz-part="profile-message">{{ messageText() }}</span><span data-smz-part="profile-username">{{ usernameText() }}</span>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1122
+ }
1123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppTopbarProfileText, decorators: [{
1124
+ type: Component,
1125
+ args: [{
1126
+ selector: 'app-topbar-profile-text',
1127
+ standalone: true,
1128
+ changeDetection: ChangeDetectionStrategy.OnPush,
1129
+ host: { class: 'contents' },
1130
+ template: '<span data-smz-part="profile-message">{{ messageText() }}</span><span data-smz-part="profile-username">{{ usernameText() }}</span>',
1131
+ }]
1132
+ }], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], username: [{ type: i0.Input, args: [{ isSignal: true, alias: "username", required: false }] }] } });
1133
+
1041
1134
  class AppTopbar {
1042
1135
  data = inject(SMZ_UI_LAYOUT_CONFIG).topbar;
1043
1136
  layoutService = inject(LayoutService);
1044
1137
  navigationService = inject(NavigationService);
1045
1138
  pageTitleService = inject(PageTitleService);
1139
+ /** Conteúdo extra da topbar (`<ng-template smzTemplate="headerExtras">` em `<app-layout>`), nas duas orientações. */
1140
+ headerExtras = input(undefined, ...(ngDevMode ? [{ debugName: "headerExtras" }] : /* istanbul ignore next */ []));
1141
+ /** Variante do conteúdo extra com a tela em paisagem; tem precedência sobre `headerExtras`. */
1142
+ headerExtrasLandscape = input(undefined, ...(ngDevMode ? [{ debugName: "headerExtrasLandscape" }] : /* istanbul ignore next */ []));
1143
+ /** Variante do conteúdo extra com a tela em retrato; tem precedência sobre `headerExtras`. */
1144
+ headerExtrasPortrait = input(undefined, ...(ngDevMode ? [{ debugName: "headerExtrasPortrait" }] : /* istanbul ignore next */ []));
1145
+ notificationsComponent = AppTopbarNotifications;
1146
+ notificationsAvailable = smzTopbarNotificationsAvailable();
1147
+ portrait = toSignal(inject(BreakpointObserver).observe('(orientation: portrait)').pipe(map((state) => state.matches)), { initialValue: false });
1148
+ extrasTemplate = computed(() => (this.portrait() ? this.headerExtrasPortrait() : this.headerExtrasLandscape()) ?? this.headerExtras(), ...(ngDevMode ? [{ debugName: "extrasTemplate" }] : /* istanbul ignore next */ []));
1046
1149
  toggleDarkMode() {
1047
1150
  this.layoutService.layoutConfig.update((state) => ({ ...state, darkTheme: !state.darkTheme }));
1048
1151
  }
@@ -1050,7 +1153,7 @@ class AppTopbar {
1050
1153
  event.target.src = placeholder;
1051
1154
  }
1052
1155
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppTopbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
1053
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppTopbar, isStandalone: true, selector: "app-topbar", ngImport: i0, template: `
1156
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppTopbar, isStandalone: true, selector: "app-topbar", inputs: { headerExtras: { classPropertyName: "headerExtras", publicName: "headerExtras", isSignal: true, isRequired: false, transformFunction: null }, headerExtrasLandscape: { classPropertyName: "headerExtrasLandscape", publicName: "headerExtrasLandscape", isSignal: true, isRequired: false, transformFunction: null }, headerExtrasPortrait: { classPropertyName: "headerExtrasPortrait", publicName: "headerExtrasPortrait", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1054
1157
  @if (data(); as topbar) {
1055
1158
  <div class="layout-topbar">
1056
1159
  <div class="layout-topbar-logo-container">
@@ -1087,6 +1190,11 @@ class AppTopbar {
1087
1190
  }
1088
1191
  </div>
1089
1192
  <div class="layout-topbar-right-actions">
1193
+ @if (extrasTemplate(); as extras) {
1194
+ <div class="layout-topbar-extras" data-smz-part="extras">
1195
+ <ng-container [ngTemplateOutlet]="extras"></ng-container>
1196
+ </div>
1197
+ }
1090
1198
  <button class="layout-topbar-menu-button layout-topbar-action" smzStyleClass="@next" enterFromClass="hidden" enterActiveClass="animate-scalein" leaveToClass="hidden" leaveActiveClass="animate-fadeout" [hideOnOutsideClick]="true">
1091
1199
  <i class="fa-solid fa-ellipsis-vertical"></i>
1092
1200
  </button>
@@ -1120,11 +1228,20 @@ class AppTopbar {
1120
1228
  <app-configurator></app-configurator>
1121
1229
  </div>
1122
1230
  }
1231
+ @if (topbar.showNotifications === true && notificationsAvailable) {
1232
+ <ng-container [ngComponentOutlet]="notificationsComponent"></ng-container>
1233
+ }
1123
1234
  @if (topbar.showProfileMenu !== false) {
1124
1235
  @for (feature of topbar.features; track feature) {
1125
1236
  <ui-menu #menu [model]="feature.menuItems" [popup]="true"></ui-menu>
1237
+ @if (feature.username != null || feature.profileMessage != null) {
1238
+ <button type="button" class="layout-topbar-profile-text" data-smz-part="profile-text" (click)="menu.toggle($event)">
1239
+ <app-topbar-profile-text [message]="feature.profileMessage" [username]="feature.username"></app-topbar-profile-text>
1240
+ </button>
1241
+ }
1126
1242
  @if (feature.avatar && feature.avatar() != null) {
1127
- <img [src]="feature.avatar()" [alt]="feature.label" class="layout-topbar-action w-8 h-8 rounded-full" (click)="menu.toggle($event)" [smzTooltip]="feature.tooltip" (error)="handleMissingImage($event, feature.placeholder)"/>
1243
+ <img [src]="feature.avatar()" [alt]="feature.label" class="layout-topbar-action w-8 h-8 rounded-ui-layout-topbar-avatar"
1244
+ (click)="menu.toggle($event)" [smzTooltip]="feature.tooltip" (error)="handleMissingImage($event, feature.placeholder)"/>
1128
1245
  }
1129
1246
  @else {
1130
1247
  <button type="button" class="layout-topbar-action" (click)="menu.toggle($event)" [smzTooltip]="feature.tooltip">
@@ -1136,14 +1253,14 @@ class AppTopbar {
1136
1253
  </div>
1137
1254
  </div>
1138
1255
  </div>
1139
- }`, isInline: true, dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: SmzStyleClassDirective, selector: "[smzStyleClass]", inputs: ["smzStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass"] }, { kind: "component", type: AppConfigurator, selector: "app-configurator" }, { kind: "directive", type: ComponentInjectorDirective, selector: "ng-template[componentInjector]", inputs: ["componentInjector", "context"], outputs: ["componentCreated"] }, { kind: "directive", type: SmzTooltipDirective, selector: "[smzTooltip]", inputs: ["smzTooltip", "tooltipPosition", "showDelay", "hideDelay", "tooltipEvent", "escape", "tooltipStyleClass", "tooltipZIndex", "tooltipDisabled", "tooltipTitle", "tooltipShortcut", "tooltipVariant", "tooltipSeverity", "tooltipArrow", "tooltipOnOverflow", "tooltipOptions", "appendTo"] }, { kind: "component", type: SmzMenuListComponent, selector: "ui-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "appendTo", "baseZIndex"], outputs: ["shown", "hidden"] }] });
1256
+ }`, isInline: true, dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SmzStyleClassDirective, selector: "[smzStyleClass]", inputs: ["smzStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass"] }, { kind: "component", type: AppConfigurator, selector: "app-configurator" }, { kind: "directive", type: ComponentInjectorDirective, selector: "ng-template[componentInjector]", inputs: ["componentInjector", "context"], outputs: ["componentCreated"] }, { kind: "directive", type: SmzTooltipDirective, selector: "[smzTooltip]", inputs: ["smzTooltip", "tooltipPosition", "showDelay", "hideDelay", "tooltipEvent", "escape", "tooltipStyleClass", "tooltipZIndex", "tooltipDisabled", "tooltipTitle", "tooltipShortcut", "tooltipVariant", "tooltipSeverity", "tooltipArrow", "tooltipOnOverflow", "tooltipOptions", "appendTo"] }, { kind: "component", type: SmzMenuListComponent, selector: "ui-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "appendTo", "baseZIndex"], outputs: ["shown", "hidden"] }, { kind: "component", type: AppTopbarProfileText, selector: "app-topbar-profile-text", inputs: ["message", "username"] }] });
1140
1257
  }
1141
1258
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppTopbar, decorators: [{
1142
1259
  type: Component,
1143
1260
  args: [{
1144
1261
  selector: 'app-topbar',
1145
1262
  standalone: true,
1146
- imports: [RouterModule, CommonModule, SmzStyleClassDirective, AppConfigurator, ComponentInjectorDirective, SmzTooltipDirective, SmzMenuListComponent, SmzButtonComponent],
1263
+ imports: [RouterModule, CommonModule, SmzStyleClassDirective, AppConfigurator, ComponentInjectorDirective, SmzTooltipDirective, SmzMenuListComponent, SmzButtonComponent, AppTopbarProfileText],
1147
1264
  template: `
1148
1265
  @if (data(); as topbar) {
1149
1266
  <div class="layout-topbar">
@@ -1181,6 +1298,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1181
1298
  }
1182
1299
  </div>
1183
1300
  <div class="layout-topbar-right-actions">
1301
+ @if (extrasTemplate(); as extras) {
1302
+ <div class="layout-topbar-extras" data-smz-part="extras">
1303
+ <ng-container [ngTemplateOutlet]="extras"></ng-container>
1304
+ </div>
1305
+ }
1184
1306
  <button class="layout-topbar-menu-button layout-topbar-action" smzStyleClass="@next" enterFromClass="hidden" enterActiveClass="animate-scalein" leaveToClass="hidden" leaveActiveClass="animate-fadeout" [hideOnOutsideClick]="true">
1185
1307
  <i class="fa-solid fa-ellipsis-vertical"></i>
1186
1308
  </button>
@@ -1214,11 +1336,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1214
1336
  <app-configurator></app-configurator>
1215
1337
  </div>
1216
1338
  }
1339
+ @if (topbar.showNotifications === true && notificationsAvailable) {
1340
+ <ng-container [ngComponentOutlet]="notificationsComponent"></ng-container>
1341
+ }
1217
1342
  @if (topbar.showProfileMenu !== false) {
1218
1343
  @for (feature of topbar.features; track feature) {
1219
1344
  <ui-menu #menu [model]="feature.menuItems" [popup]="true"></ui-menu>
1345
+ @if (feature.username != null || feature.profileMessage != null) {
1346
+ <button type="button" class="layout-topbar-profile-text" data-smz-part="profile-text" (click)="menu.toggle($event)">
1347
+ <app-topbar-profile-text [message]="feature.profileMessage" [username]="feature.username"></app-topbar-profile-text>
1348
+ </button>
1349
+ }
1220
1350
  @if (feature.avatar && feature.avatar() != null) {
1221
- <img [src]="feature.avatar()" [alt]="feature.label" class="layout-topbar-action w-8 h-8 rounded-full" (click)="menu.toggle($event)" [smzTooltip]="feature.tooltip" (error)="handleMissingImage($event, feature.placeholder)"/>
1351
+ <img [src]="feature.avatar()" [alt]="feature.label" class="layout-topbar-action w-8 h-8 rounded-ui-layout-topbar-avatar"
1352
+ (click)="menu.toggle($event)" [smzTooltip]="feature.tooltip" (error)="handleMissingImage($event, feature.placeholder)"/>
1222
1353
  }
1223
1354
  @else {
1224
1355
  <button type="button" class="layout-topbar-action" (click)="menu.toggle($event)" [smzTooltip]="feature.tooltip">
@@ -1232,6 +1363,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1232
1363
  </div>
1233
1364
  }`
1234
1365
  }]
1366
+ }], propDecorators: { headerExtras: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerExtras", required: false }] }], headerExtrasLandscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerExtrasLandscape", required: false }] }], headerExtrasPortrait: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerExtrasPortrait", required: false }] }] } });
1367
+
1368
+ /**
1369
+ * Largura a partir da qual o menu deixa de ser gaveta. É o mesmo ponto de quebra, literal, das media queries de
1370
+ * `resources/layout/_responsive.scss` e `_menu.scss`: mudá-lo exige trocar os três lugares.
1371
+ */
1372
+ const DESKTOP_QUERY = '(min-width: 992px)';
1373
+ let desktopViewport = null;
1374
+ /** Sinal compartilhado: `true` enquanto a viewport está acima do ponto de quebra do menu. */
1375
+ function menuDesktopViewport() {
1376
+ if (desktopViewport == null) {
1377
+ const query = window.matchMedia(DESKTOP_QUERY);
1378
+ const state = signal(query.matches, ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
1379
+ query.addEventListener('change', (event) => state.set(event.matches));
1380
+ desktopViewport = state.asReadonly();
1381
+ }
1382
+ return desktopViewport;
1383
+ }
1384
+ /**
1385
+ * Nível do menu cujos filhos abrem em painel flutuante, em vez de expandir no lugar:
1386
+ * `0` (os grupos da raiz) no menu horizontal, `1` (os itens de cada grupo) no menu slim e `-1` quando não há painel
1387
+ * flutuante (menu `static` ou `overlay`, ou qualquer modo abaixo do ponto de quebra, em que o menu vira gaveta).
1388
+ */
1389
+ function menuFlyoutLevel(menuMode, desktop) {
1390
+ if (!desktop) {
1391
+ return -1;
1392
+ }
1393
+ if (menuMode === 'horizontal') {
1394
+ return 0;
1395
+ }
1396
+ return menuMode === 'slim' ? 1 : -1;
1397
+ }
1398
+ /** Canal de um `app-menu` para fechar os painéis flutuantes dos seus itens (clique fora, navegação, item final). */
1399
+ class MenuFlyoutController {
1400
+ closeSource = new Subject();
1401
+ close$ = this.closeSource.asObservable();
1402
+ closeAll() {
1403
+ this.closeSource.next();
1404
+ }
1405
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MenuFlyoutController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1406
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MenuFlyoutController });
1407
+ }
1408
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MenuFlyoutController, decorators: [{
1409
+ type: Injectable
1235
1410
  }] });
1236
1411
 
1237
1412
  class AppMenuitem {
@@ -1242,9 +1417,16 @@ class AppMenuitem {
1242
1417
  root;
1243
1418
  parentKey;
1244
1419
  active = false;
1420
+ /** Painel flutuante deste item aberto por clique (menu horizontal e slim). Começa em `item.expanded`. */
1421
+ flyoutOpen = false;
1422
+ /** A rota ativa é este item ou um descendente dele. */
1423
+ routeActive = false;
1245
1424
  menuSourceSubscription;
1246
1425
  menuResetSubscription;
1247
1426
  key = '';
1427
+ flyouts = inject(MenuFlyoutController, { optional: true });
1428
+ desktop = menuDesktopViewport();
1429
+ subscriptions = new Subscription();
1248
1430
  constructor(router, layoutService) {
1249
1431
  this.router = router;
1250
1432
  this.layoutService = layoutService;
@@ -1252,25 +1434,44 @@ class AppMenuitem {
1252
1434
  Promise.resolve(null).then(() => {
1253
1435
  if (value.routeEvent) {
1254
1436
  this.active = value.key === this.key || value.key.startsWith(this.key + '-') ? true : false;
1437
+ this.routeActive = this.active;
1255
1438
  }
1256
1439
  else {
1257
1440
  if (value.key !== this.key && !value.key.startsWith(this.key + '-')) {
1258
1441
  this.active = false;
1442
+ this.flyoutOpen = false;
1259
1443
  }
1260
1444
  }
1261
1445
  });
1262
1446
  });
1263
1447
  this.menuResetSubscription = this.layoutService.resetSource$.subscribe(() => {
1264
1448
  this.active = false;
1449
+ this.flyoutOpen = false;
1265
1450
  });
1266
- this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe(() => {
1451
+ this.subscriptions.add(this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe(() => {
1452
+ // Navegar fecha o painel flutuante, como no menu horizontal dos layouts antigos.
1453
+ this.flyoutOpen = false;
1267
1454
  if (this.item.routerLink) {
1268
1455
  this.updateActiveStateFromRoute();
1269
1456
  }
1270
- });
1457
+ }));
1458
+ if (this.flyouts != null) {
1459
+ this.subscriptions.add(this.flyouts.close$.subscribe(() => {
1460
+ this.flyoutOpen = false;
1461
+ }));
1462
+ }
1463
+ }
1464
+ /** Nível do item na árvore: `0` para os grupos da raiz. */
1465
+ get level() {
1466
+ return this.key.split('-').length - 1;
1467
+ }
1468
+ /** Os filhos deste item abrem em painel flutuante (grupo da raiz no menu horizontal, item de grupo no slim). */
1469
+ get flyout() {
1470
+ return menuFlyoutLevel(this.layoutService.layoutConfig().menuMode, this.desktop()) === this.level;
1271
1471
  }
1272
1472
  ngOnInit() {
1273
1473
  this.key = this.parentKey ? this.parentKey + '-' + this.index : String(this.index);
1474
+ this.flyoutOpen = this.item.expanded === true;
1274
1475
  if (this.item.routerLink) {
1275
1476
  this.updateActiveStateFromRoute();
1276
1477
  }
@@ -1294,14 +1495,27 @@ class AppMenuitem {
1294
1495
  // toggle active state
1295
1496
  if (this.item.items) {
1296
1497
  this.active = !this.active;
1498
+ if (this.flyout) {
1499
+ this.flyoutOpen = !this.flyoutOpen;
1500
+ }
1501
+ }
1502
+ else if (this.insideFlyout) {
1503
+ // Item final dentro de um painel flutuante: a ação fecha os painéis.
1504
+ this.flyouts?.closeAll();
1297
1505
  }
1298
1506
  this.layoutService.onMenuStateChange({ key: this.key });
1299
1507
  }
1300
1508
  get submenuAnimation() {
1301
- return this.root ? 'expanded' : this.active ? 'expanded' : 'collapsed';
1509
+ // Com painel flutuante a lista fica sempre na altura natural: quem a mostra ou esconde é o CSS.
1510
+ return this.root || this.flyout ? 'expanded' : this.active ? 'expanded' : 'collapsed';
1302
1511
  }
1303
1512
  get activeClass() {
1304
- return this.active && !this.root;
1513
+ // No painel flutuante a rota ativa não abre nada sozinha: só o clique (ou `item.expanded`).
1514
+ return this.flyout ? this.flyoutOpen : this.active && !this.root;
1515
+ }
1516
+ get insideFlyout() {
1517
+ const flyoutLevel = menuFlyoutLevel(this.layoutService.layoutConfig().menuMode, this.desktop());
1518
+ return flyoutLevel >= 0 && this.level > flyoutLevel;
1305
1519
  }
1306
1520
  ngOnDestroy() {
1307
1521
  if (this.menuSourceSubscription) {
@@ -1310,9 +1524,10 @@ class AppMenuitem {
1310
1524
  if (this.menuResetSubscription) {
1311
1525
  this.menuResetSubscription.unsubscribe();
1312
1526
  }
1527
+ this.subscriptions.unsubscribe();
1313
1528
  }
1314
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppMenuitem, deps: [{ token: i1.Router }, { token: LayoutService }], target: i0.ɵɵFactoryTarget.Component });
1315
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppMenuitem, isStandalone: true, selector: "[app-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, host: { properties: { "class.layout-root-menuitem": "this.root", "class.active-menuitem": "this.activeClass" } }, ngImport: i0, template: `
1529
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppMenuitem, deps: [{ token: i1$2.Router }, { token: LayoutService }], target: i0.ɵɵFactoryTarget.Component });
1530
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppMenuitem, isStandalone: true, selector: "[app-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, host: { properties: { "class.layout-root-menuitem": "this.root", "class.layout-menuitem-route-active": "this.routeActive", "class.active-menuitem": "this.activeClass" } }, ngImport: i0, template: `
1316
1531
  <ng-container>
1317
1532
  @if (root && item.visible !== false) {
1318
1533
  <div class="layout-menuitem-root-text">{{ item.label }}</div>
@@ -1352,6 +1567,10 @@ class AppMenuitem {
1352
1567
  </a>
1353
1568
  }
1354
1569
 
1570
+ @if (flyout && !root && item.visible !== false) {
1571
+ <span class="layout-menuitem-flyout-label">{{ item.label }}</span>
1572
+ }
1573
+
1355
1574
  @if (item.items && item.visible !== false) {
1356
1575
  <ul [@children]="submenuAnimation">
1357
1576
  @for (child of item.items; track child; let i = $index) {
@@ -1362,7 +1581,7 @@ class AppMenuitem {
1362
1581
  </ul>
1363
1582
  }
1364
1583
  </ng-container>
1365
- `, isInline: true, dependencies: [{ kind: "component", type: AppMenuitem, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: SmzRippleDirective, selector: "[smzRipple]" }], animations: [
1584
+ `, isInline: true, dependencies: [{ kind: "component", type: AppMenuitem, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: SmzRippleDirective, selector: "[smzRipple]" }], animations: [
1366
1585
  trigger('children', [
1367
1586
  state('collapsed', style({
1368
1587
  height: '0'
@@ -1420,6 +1639,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1420
1639
  </a>
1421
1640
  }
1422
1641
 
1642
+ @if (flyout && !root && item.visible !== false) {
1643
+ <span class="layout-menuitem-flyout-label">{{ item.label }}</span>
1644
+ }
1645
+
1423
1646
  @if (item.items && item.visible !== false) {
1424
1647
  <ul [@children]="submenuAnimation">
1425
1648
  @for (child of item.items; track child; let i = $index) {
@@ -1444,7 +1667,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1444
1667
  ],
1445
1668
  // providers: [LayoutService]
1446
1669
  }]
1447
- }], ctorParameters: () => [{ type: i1.Router }, { type: LayoutService }], propDecorators: { item: [{
1670
+ }], ctorParameters: () => [{ type: i1$2.Router }, { type: LayoutService }], propDecorators: { item: [{
1448
1671
  type: Input
1449
1672
  }], index: [{
1450
1673
  type: Input
@@ -1455,6 +1678,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1455
1678
  args: ['class.layout-root-menuitem']
1456
1679
  }], parentKey: [{
1457
1680
  type: Input
1681
+ }], routeActive: [{
1682
+ type: HostBinding,
1683
+ args: ['class.layout-menuitem-route-active']
1458
1684
  }], activeClass: [{
1459
1685
  type: HostBinding,
1460
1686
  args: ['class.active-menuitem']
@@ -1462,8 +1688,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1462
1688
 
1463
1689
  class AppMenu {
1464
1690
  model = inject(SmzUILayout).sidebar;
1691
+ host = inject(ElementRef);
1692
+ layoutService = inject(LayoutService);
1693
+ flyouts = inject(MenuFlyoutController);
1694
+ desktop = menuDesktopViewport();
1695
+ /** Menu horizontal e slim: um clique fora do menu fecha os painéis flutuantes abertos por clique. */
1696
+ closeFlyoutsFromOutside(event) {
1697
+ if (menuFlyoutLevel(this.layoutService.layoutConfig().menuMode, this.desktop()) < 0) {
1698
+ return;
1699
+ }
1700
+ if (!this.host.nativeElement.contains(event.target)) {
1701
+ this.flyouts.closeAll();
1702
+ }
1703
+ }
1465
1704
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
1466
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppMenu, isStandalone: true, selector: "app-menu", ngImport: i0, template: `<ul class="layout-menu">
1705
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppMenu, isStandalone: true, selector: "app-menu", host: { listeners: { "document:click": "closeFlyoutsFromOutside($event)" } }, providers: [MenuFlyoutController], ngImport: i0, template: `<ul class="layout-menu">
1467
1706
  @for (item of model(); track item; let i = $index) {
1468
1707
  @if (!item.separator && item.visible !== false) {
1469
1708
  <li app-menuitem [item]="item" [index]="i" [root]="true"></li>
@@ -1480,6 +1719,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1480
1719
  selector: 'app-menu',
1481
1720
  standalone: true,
1482
1721
  imports: [AppMenuitem, RouterModule],
1722
+ providers: [MenuFlyoutController],
1723
+ host: { '(document:click)': 'closeFlyoutsFromOutside($event)' },
1483
1724
  template: `<ul class="layout-menu">
1484
1725
  @for (item of model(); track item; let i = $index) {
1485
1726
  @if (!item.separator && item.visible !== false) {
@@ -1493,13 +1734,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1493
1734
  }]
1494
1735
  }] });
1495
1736
 
1737
+ /**
1738
+ * Painel do menu. As classes `layout-sidebar-horizontal` e `layout-sidebar-slim` acompanham `menuMode` e só mudam o
1739
+ * desenho acima do ponto de quebra do menu (`_menu.scss`); abaixo dele o painel é sempre a gaveta. As larguras da
1740
+ * configuração (`sidebarWidth`, `sidebarSlimWidth`) sobrescrevem aqui os tokens `layout.sidebar.width` e
1741
+ * `layout.sidebar.slim.width`.
1742
+ */
1496
1743
  class AppSidebar {
1497
1744
  el;
1745
+ layoutService = inject(LayoutService);
1498
1746
  constructor(el) {
1499
1747
  this.el = el;
1500
1748
  }
1501
1749
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppSidebar, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1502
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: AppSidebar, isStandalone: true, selector: "app-sidebar", ngImport: i0, template: ` <div class="layout-sidebar">
1750
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: AppSidebar, isStandalone: true, selector: "app-sidebar", ngImport: i0, template: ` <div class="layout-sidebar"
1751
+ [class.layout-sidebar-horizontal]="layoutService.layoutConfig().menuMode === 'horizontal'"
1752
+ [class.layout-sidebar-slim]="layoutService.layoutConfig().menuMode === 'slim'"
1753
+ [style.--smz-layout-sidebar-width]="layoutService.layoutConfig().sidebarWidth"
1754
+ [style.--smz-layout-sidebar-slim-width]="layoutService.layoutConfig().sidebarSlimWidth">
1503
1755
  <app-menu></app-menu>
1504
1756
  </div>`, isInline: true, dependencies: [{ kind: "component", type: AppMenu, selector: "app-menu" }] });
1505
1757
  }
@@ -1509,7 +1761,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1509
1761
  selector: 'app-sidebar',
1510
1762
  standalone: true,
1511
1763
  imports: [AppMenu],
1512
- template: ` <div class="layout-sidebar">
1764
+ template: ` <div class="layout-sidebar"
1765
+ [class.layout-sidebar-horizontal]="layoutService.layoutConfig().menuMode === 'horizontal'"
1766
+ [class.layout-sidebar-slim]="layoutService.layoutConfig().menuMode === 'slim'"
1767
+ [style.--smz-layout-sidebar-width]="layoutService.layoutConfig().sidebarWidth"
1768
+ [style.--smz-layout-sidebar-slim-width]="layoutService.layoutConfig().sidebarSlimWidth">
1513
1769
  <app-menu></app-menu>
1514
1770
  </div>`
1515
1771
  }]
@@ -1518,67 +1774,401 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1518
1774
  class AppFooter {
1519
1775
  data = inject(SMZ_UI_LAYOUT_CONFIG).footer;
1520
1776
  layoutService = inject(LayoutService);
1777
+ /** Conteúdo extra do rodapé (`<ng-template smzTemplate="footerExtras">` em `<app-layout>`), depois do texto da direita. */
1778
+ footerExtras = input(undefined, ...(ngDevMode ? [{ debugName: "footerExtras" }] : /* istanbul ignore next */ []));
1521
1779
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
1522
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppFooter, isStandalone: true, selector: "app-footer", ngImport: i0, template: `
1780
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppFooter, isStandalone: true, selector: "app-footer", inputs: { footerExtras: { classPropertyName: "footerExtras", publicName: "footerExtras", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1523
1781
  @if (data(); as footer) {
1524
- <div class="flex items-center justify-between px-0 py-4 gap-4 border-t border-surface-border">
1782
+ <div class="flex items-center justify-between px-0 py-4 gap-4 border-t border-ui-layout-footer">
1525
1783
  @if (footer.leftLogoPath?.light && !layoutService.isDarkTheme()) {
1526
1784
  <img [src]="footer.leftLogoPath?.light" [alt]="footer.leftLogoPath?.light" class="max-h-7" />
1527
1785
  }
1528
1786
  @if (footer.leftLogoPath?.dark && layoutService.isDarkTheme()) {
1529
1787
  <img [src]="footer.leftLogoPath?.dark" [alt]="footer.leftLogoPath?.dark" class="max-h-7" />
1530
1788
  }
1789
+ @if (footer.leftSideText) {
1790
+ <span class="hidden lg:inline font-ui-layout-footer text-ui-layout-footer-size leading-5" data-smz-part="left-text">{{ footer.leftSideText }}</span>
1791
+ }
1531
1792
  <div class="flex-1"></div>
1793
+ @if (footer.rightSideText) {
1794
+ <span class="hidden lg:inline font-ui-layout-footer text-ui-layout-footer-size leading-5" data-smz-part="right-text">{{ footer.rightSideText }}</span>
1795
+ }
1796
+ @if (footerExtras(); as extras) {
1797
+ <div class="flex items-center gap-4" data-smz-part="extras">
1798
+ <ng-container [ngTemplateOutlet]="extras"></ng-container>
1799
+ </div>
1800
+ }
1532
1801
  @if (footer.rightLogoPath?.light && !layoutService.isDarkTheme()) {
1533
1802
  <img [src]="footer.rightLogoPath?.light" [alt]="footer.rightLogoPath?.light" class="max-h-7" />
1534
1803
  }
1535
1804
  @if (footer.rightLogoPath?.dark && layoutService.isDarkTheme()) {
1536
1805
  <img [src]="footer.rightLogoPath?.dark" [alt]="footer.rightLogoPath?.dark" class="max-h-7" />
1537
1806
  }
1807
+ @for (image of footer.rightSideImages; track $index) {
1808
+ <img [src]="image" alt="" class="hidden lg:block max-h-7 object-contain" [class]="footer.rightSideImageStyleClass ?? 'max-w-24'" data-smz-part="right-image" />
1809
+ }
1538
1810
  @if (footer.version) {
1539
- <span class="font-medium text-sm">{{ footer.version }}</span>
1811
+ <span class="font-ui-layout-footer text-ui-layout-footer-size leading-5">{{ footer.version }}</span>
1540
1812
  }
1541
1813
  @if (footer.copyright) {
1542
- <span class="font-medium text-sm">{{ footer.copyright }}</span>
1814
+ <span class="font-ui-layout-footer text-ui-layout-footer-size leading-5">{{ footer.copyright }}</span>
1543
1815
  }
1544
1816
  </div>
1545
1817
  }
1546
- `, isInline: true });
1818
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1547
1819
  }
1548
1820
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppFooter, decorators: [{
1549
1821
  type: Component,
1550
1822
  args: [{
1551
1823
  standalone: true,
1552
1824
  selector: 'app-footer',
1553
- imports: [],
1825
+ imports: [NgTemplateOutlet],
1554
1826
  template: `
1555
1827
  @if (data(); as footer) {
1556
- <div class="flex items-center justify-between px-0 py-4 gap-4 border-t border-surface-border">
1828
+ <div class="flex items-center justify-between px-0 py-4 gap-4 border-t border-ui-layout-footer">
1557
1829
  @if (footer.leftLogoPath?.light && !layoutService.isDarkTheme()) {
1558
1830
  <img [src]="footer.leftLogoPath?.light" [alt]="footer.leftLogoPath?.light" class="max-h-7" />
1559
1831
  }
1560
1832
  @if (footer.leftLogoPath?.dark && layoutService.isDarkTheme()) {
1561
1833
  <img [src]="footer.leftLogoPath?.dark" [alt]="footer.leftLogoPath?.dark" class="max-h-7" />
1562
1834
  }
1835
+ @if (footer.leftSideText) {
1836
+ <span class="hidden lg:inline font-ui-layout-footer text-ui-layout-footer-size leading-5" data-smz-part="left-text">{{ footer.leftSideText }}</span>
1837
+ }
1563
1838
  <div class="flex-1"></div>
1839
+ @if (footer.rightSideText) {
1840
+ <span class="hidden lg:inline font-ui-layout-footer text-ui-layout-footer-size leading-5" data-smz-part="right-text">{{ footer.rightSideText }}</span>
1841
+ }
1842
+ @if (footerExtras(); as extras) {
1843
+ <div class="flex items-center gap-4" data-smz-part="extras">
1844
+ <ng-container [ngTemplateOutlet]="extras"></ng-container>
1845
+ </div>
1846
+ }
1564
1847
  @if (footer.rightLogoPath?.light && !layoutService.isDarkTheme()) {
1565
1848
  <img [src]="footer.rightLogoPath?.light" [alt]="footer.rightLogoPath?.light" class="max-h-7" />
1566
1849
  }
1567
1850
  @if (footer.rightLogoPath?.dark && layoutService.isDarkTheme()) {
1568
1851
  <img [src]="footer.rightLogoPath?.dark" [alt]="footer.rightLogoPath?.dark" class="max-h-7" />
1569
1852
  }
1853
+ @for (image of footer.rightSideImages; track $index) {
1854
+ <img [src]="image" alt="" class="hidden lg:block max-h-7 object-contain" [class]="footer.rightSideImageStyleClass ?? 'max-w-24'" data-smz-part="right-image" />
1855
+ }
1570
1856
  @if (footer.version) {
1571
- <span class="font-medium text-sm">{{ footer.version }}</span>
1857
+ <span class="font-ui-layout-footer text-ui-layout-footer-size leading-5">{{ footer.version }}</span>
1572
1858
  }
1573
1859
  @if (footer.copyright) {
1574
- <span class="font-medium text-sm">{{ footer.copyright }}</span>
1860
+ <span class="font-ui-layout-footer text-ui-layout-footer-size leading-5">{{ footer.copyright }}</span>
1575
1861
  }
1576
1862
  </div>
1577
1863
  }
1578
1864
  `
1579
1865
  }]
1866
+ }], propDecorators: { footerExtras: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerExtras", required: false }] }] } });
1867
+
1868
+ const MODES = ['full', 'menu-only', 'topbar-only', 'none'];
1869
+ /**
1870
+ * Layout da rota ativa para o `<app-layout>`. Sem `data.layout` em nenhuma rota, a casca renderiza inteira.
1871
+ *
1872
+ * Fora do roteador (testes, galeria, uma tela que precisa trocar a casca sem navegar), {@link set} impõe um layout
1873
+ * no lugar do que vem da rota; `set(null)` devolve o controle à rota.
1874
+ */
1875
+ class RouteLayoutService {
1876
+ router = inject(Router);
1877
+ fromRoute = signal(this.readRoute(), ...(ngDevMode ? [{ debugName: "fromRoute" }] : /* istanbul ignore next */ []));
1878
+ forced = signal(null, ...(ngDevMode ? [{ debugName: "forced" }] : /* istanbul ignore next */ []));
1879
+ /** Layout em vigor, com os padrões preenchidos (`mode: 'full'`, `hideFooter: false`, `contentStyleClass: ''`). */
1880
+ layout = computed(() => {
1881
+ const data = this.forced() ?? this.fromRoute();
1882
+ return {
1883
+ mode: data.mode != null && MODES.includes(data.mode) ? data.mode : 'full',
1884
+ hideFooter: data.hideFooter ?? false,
1885
+ contentPadding: data.contentPadding || undefined,
1886
+ contentStyleClass: data.contentStyleClass ?? '',
1887
+ };
1888
+ }, ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
1889
+ showTopbar = computed(() => this.layout().mode === 'full' || this.layout().mode === 'topbar-only', ...(ngDevMode ? [{ debugName: "showTopbar" }] : /* istanbul ignore next */ []));
1890
+ showSidebar = computed(() => this.layout().mode === 'full' || this.layout().mode === 'menu-only', ...(ngDevMode ? [{ debugName: "showSidebar" }] : /* istanbul ignore next */ []));
1891
+ showFooter = computed(() => this.layout().mode === 'full' && !this.layout().hideFooter, ...(ngDevMode ? [{ debugName: "showFooter" }] : /* istanbul ignore next */ []));
1892
+ constructor() {
1893
+ this.router.events
1894
+ .pipe(filter$1((event) => event instanceof NavigationEnd), takeUntilDestroyed())
1895
+ .subscribe(() => this.fromRoute.set(this.readRoute()));
1896
+ }
1897
+ /** Impõe um layout no lugar do `data.layout` da rota; `null` volta a ler a rota. */
1898
+ set(layout) {
1899
+ this.forced.set(layout);
1900
+ }
1901
+ /** Junta o `data.layout` da raiz até a rota ativa mais profunda do outlet principal. */
1902
+ readRoute() {
1903
+ let merged = {};
1904
+ let route = this.router.routerState.snapshot.root;
1905
+ while (route != null) {
1906
+ const layout = route.data?.['layout'];
1907
+ if (layout != null && typeof layout === 'object') {
1908
+ merged = { ...merged, ...layout };
1909
+ }
1910
+ route = route.firstChild;
1911
+ }
1912
+ return merged;
1913
+ }
1914
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: RouteLayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1915
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: RouteLayoutService, providedIn: 'root' });
1916
+ }
1917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: RouteLayoutService, decorators: [{
1918
+ type: Injectable,
1919
+ args: [{ providedIn: 'root' }]
1920
+ }], ctorParameters: () => [] });
1921
+
1922
+ /**
1923
+ * Assistência da casca: botão flutuante que abre um painel lateral (`ui-drawer`) com os ajustes da casca e, se o
1924
+ * app informar, um componente próprio.
1925
+ */
1926
+ class AppAssistance {
1927
+ menuModeOptions = [
1928
+ { label: 'Estático', value: 'static' },
1929
+ { label: 'Overlay', value: 'overlay' },
1930
+ ];
1931
+ layoutService = inject(LayoutService);
1932
+ config = inject(SMZ_UI_LAYOUT_CONFIG).assistance;
1933
+ /** Painel aberto pelo botão; vale quando a configuração não é um signal gravável do app. */
1934
+ opened = signal(false, ...(ngDevMode ? [{ debugName: "opened" }] : /* istanbul ignore next */ []));
1935
+ enabled = computed(() => this.config != null && this.config().isEnabled !== false, ...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
1936
+ visible = computed(() => this.config?.().isVisible ?? this.opened(), ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
1937
+ buttonPosition = computed(() => this.config?.().buttonPosition ?? 'right-bottom', ...(ngDevMode ? [{ debugName: "buttonPosition" }] : /* istanbul ignore next */ []));
1938
+ position = computed(() => (this.config?.().position === 'left' ? 'left' : 'right'), ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
1939
+ icon = computed(() => this.config?.().icon ?? 'fa-solid fa-gear', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
1940
+ title = computed(() => this.config?.().title ?? 'Assistência', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
1941
+ showLayoutOptions = computed(() => this.config?.().showLayoutOptions !== false, ...(ngDevMode ? [{ debugName: "showLayoutOptions" }] : /* istanbul ignore next */ []));
1942
+ component = computed(() => this.config?.().component ?? null, ...(ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []));
1943
+ menuMode = computed(() => this.layoutService.layoutConfig().menuMode, ...(ngDevMode ? [{ debugName: "menuMode" }] : /* istanbul ignore next */ []));
1944
+ darkTheme = computed(() => this.layoutService.layoutConfig().darkTheme === true, ...(ngDevMode ? [{ debugName: "darkTheme" }] : /* istanbul ignore next */ []));
1945
+ setVisible(visible) {
1946
+ this.opened.set(visible);
1947
+ this.config?.update((prev) => (prev.isVisible === visible ? prev : { ...prev, isVisible: visible }));
1948
+ }
1949
+ onMenuModeChange(menuMode) {
1950
+ this.layoutService.layoutConfig.update((prev) => ({ ...prev, menuMode }));
1951
+ }
1952
+ onDarkThemeChange(darkTheme) {
1953
+ this.layoutService.layoutConfig.update((prev) => ({ ...prev, darkTheme }));
1954
+ }
1955
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppAssistance, deps: [], target: i0.ɵɵFactoryTarget.Component });
1956
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppAssistance, isStandalone: true, selector: "app-assistance", ngImport: i0, template: `
1957
+ @if (enabled()) {
1958
+ <button
1959
+ type="button"
1960
+ class="layout-assistance-button"
1961
+ data-smz-part="assistance-button"
1962
+ [attr.data-position]="buttonPosition()"
1963
+ [attr.aria-label]="title()"
1964
+ [attr.aria-expanded]="visible()"
1965
+ (click)="setVisible(true)"
1966
+ >
1967
+ <i [class]="icon()" aria-hidden="true"></i>
1968
+ </button>
1969
+ <ui-drawer [visible]="visible()" (visibleChange)="setVisible($event)" [position]="position()" [header]="title()">
1970
+ @if (visible()) {
1971
+ <div class="flex flex-col gap-4 p-4" data-smz-part="assistance-panel">
1972
+ @if (showLayoutOptions()) {
1973
+ <div class="flex flex-col gap-2">
1974
+ <span class="text-ui-md leading-5 text-ui-fg-muted">Modo do menu</span>
1975
+ <ui-select-button [ngModel]="menuMode()" (ngModelChange)="onMenuModeChange($event)" [options]="menuModeOptions" [allowEmpty]="false" size="small"></ui-select-button>
1976
+ </div>
1977
+ <label class="flex items-center justify-between gap-4">
1978
+ <span class="text-ui-md leading-5 text-ui-fg-muted">Tema escuro</span>
1979
+ <ui-toggle-switch [ngModel]="darkTheme()" (ngModelChange)="onDarkThemeChange($event)"></ui-toggle-switch>
1980
+ </label>
1981
+ }
1982
+ @if (component(); as content) {
1983
+ <ng-container [ngComponentOutlet]="content" />
1984
+ }
1985
+ </div>
1986
+ }
1987
+ </ui-drawer>
1988
+ }
1989
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: SmzDrawerComponent, selector: "ui-drawer", inputs: ["visible", "position", "fullScreen", "header", "modal", "dismissible", "closeOnEscape", "showCloseIcon", "style", "styleClass", "blockScroll", "ariaCloseLabel", "appendTo"], outputs: ["visibleChange", "shown", "hidden"] }, { kind: "component", type: SmzSelectButtonComponent, selector: "ui-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "multiple", "allowEmpty", "size", "styleClass", "appendTo"], outputs: ["changed"] }, { kind: "component", type: SmzToggleSwitchComponent, selector: "ui-toggle-switch", inputs: ["name"], outputs: ["changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1990
+ }
1991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppAssistance, decorators: [{
1992
+ type: Component,
1993
+ args: [{
1994
+ selector: 'app-assistance',
1995
+ standalone: true,
1996
+ changeDetection: ChangeDetectionStrategy.OnPush,
1997
+ imports: [FormsModule, NgComponentOutlet, SmzDrawerComponent, SmzSelectButtonComponent, SmzToggleSwitchComponent],
1998
+ template: `
1999
+ @if (enabled()) {
2000
+ <button
2001
+ type="button"
2002
+ class="layout-assistance-button"
2003
+ data-smz-part="assistance-button"
2004
+ [attr.data-position]="buttonPosition()"
2005
+ [attr.aria-label]="title()"
2006
+ [attr.aria-expanded]="visible()"
2007
+ (click)="setVisible(true)"
2008
+ >
2009
+ <i [class]="icon()" aria-hidden="true"></i>
2010
+ </button>
2011
+ <ui-drawer [visible]="visible()" (visibleChange)="setVisible($event)" [position]="position()" [header]="title()">
2012
+ @if (visible()) {
2013
+ <div class="flex flex-col gap-4 p-4" data-smz-part="assistance-panel">
2014
+ @if (showLayoutOptions()) {
2015
+ <div class="flex flex-col gap-2">
2016
+ <span class="text-ui-md leading-5 text-ui-fg-muted">Modo do menu</span>
2017
+ <ui-select-button [ngModel]="menuMode()" (ngModelChange)="onMenuModeChange($event)" [options]="menuModeOptions" [allowEmpty]="false" size="small"></ui-select-button>
2018
+ </div>
2019
+ <label class="flex items-center justify-between gap-4">
2020
+ <span class="text-ui-md leading-5 text-ui-fg-muted">Tema escuro</span>
2021
+ <ui-toggle-switch [ngModel]="darkTheme()" (ngModelChange)="onDarkThemeChange($event)"></ui-toggle-switch>
2022
+ </label>
2023
+ }
2024
+ @if (component(); as content) {
2025
+ <ng-container [ngComponentOutlet]="content" />
2026
+ }
2027
+ </div>
2028
+ }
2029
+ </ui-drawer>
2030
+ }
2031
+ `,
2032
+ }]
2033
+ }] });
2034
+
2035
+ /**
2036
+ * Visibilidade do loader montado pelo `<app-layout>` (`configureSmzUILayout().withLoader(...)`).
2037
+ *
2038
+ * A casca chama {@link startInitial} ao nascer: o loader fica visível até a primeira navegação terminar. Depois
2039
+ * disso o app pode usar {@link show} e {@link hide} em cargas longas.
2040
+ */
2041
+ class LayoutLoaderService {
2042
+ router = inject(Router);
2043
+ state = signal(false, ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
2044
+ timer = null;
2045
+ visible = this.state.asReadonly();
2046
+ /**
2047
+ * Mostra o loader. Com `timeout` (ms) maior que zero, ele se esconde sozinho ao fim do prazo, mesmo que ninguém
2048
+ * chame {@link hide}.
2049
+ */
2050
+ show(timeout) {
2051
+ this.clearTimer();
2052
+ this.state.set(true);
2053
+ if (timeout != null && timeout > 0) {
2054
+ this.timer = setTimeout(() => this.hide(), timeout);
2055
+ }
2056
+ }
2057
+ hide() {
2058
+ this.clearTimer();
2059
+ this.state.set(false);
2060
+ }
2061
+ /**
2062
+ * Loader inicial: visível até a primeira navegação terminar (com sucesso, cancelada ou com erro). Se o roteador
2063
+ * já navegou quando a casca nasce, não faz nada.
2064
+ */
2065
+ startInitial(timeout) {
2066
+ if (this.router.navigated) {
2067
+ return;
2068
+ }
2069
+ this.show(timeout);
2070
+ this.router.events
2071
+ .pipe(filter$1((event) => event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError), take(1))
2072
+ .subscribe(() => this.hide());
2073
+ }
2074
+ clearTimer() {
2075
+ if (this.timer != null) {
2076
+ clearTimeout(this.timer);
2077
+ this.timer = null;
2078
+ }
2079
+ }
2080
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutLoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2081
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutLoaderService, providedIn: 'root' });
2082
+ }
2083
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutLoaderService, decorators: [{
2084
+ type: Injectable,
2085
+ args: [{ providedIn: 'root' }]
1580
2086
  }] });
1581
2087
 
2088
+ const CUBES = [1, 2, 3, 4, 5, 6, 7, 8, 9];
2089
+ const SEGMENTS = [1, 2, 3, 4];
2090
+ /**
2091
+ * Loader da casca: cobre a tela enquanto o app inicia (até a primeira navegação terminar) e sempre que o app chama
2092
+ * `LayoutLoaderService.show()`. Usa a tela de pré-carregamento de `_preloading.scss` com uma caixa no centro.
2093
+ */
2094
+ class AppLoader {
2095
+ loaderService = inject(LayoutLoaderService);
2096
+ cubes = CUBES;
2097
+ segments = SEGMENTS;
2098
+ config = inject(SMZ_UI_LAYOUT_CONFIG).loader;
2099
+ type = computed(() => (this.config?.().type === 'square' ? 'square' : 'cube'), ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
2100
+ title = computed(() => this.config?.().title ?? 'Carregando...', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
2101
+ message = computed(() => this.config?.().message ?? 'Aguarde por favor', ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
2102
+ constructor() {
2103
+ this.loaderService.startInitial(this.config?.().timeout);
2104
+ }
2105
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });
2106
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppLoader, isStandalone: true, selector: "app-loader", ngImport: i0, template: `
2107
+ @if (loaderService.visible()) {
2108
+ <div class="preloader preloader-shell" role="status" aria-live="polite" data-smz-part="loader" [attr.data-type]="type()">
2109
+ <div class="preloader-box" data-smz-part="box">
2110
+ <div class="preloader-spinner" data-smz-part="spinner" aria-hidden="true">
2111
+ @if (type() === 'square') {
2112
+ <div class="preloader-square">
2113
+ @for (segment of segments; track segment) {
2114
+ <div class="preloader-square-holder"><div class="preloader-square-segment"></div></div>
2115
+ }
2116
+ </div>
2117
+ }
2118
+ @else {
2119
+ <div class="preloader-cube-grid">
2120
+ @for (cube of cubes; track cube) {
2121
+ <div class="preloader-cube"></div>
2122
+ }
2123
+ </div>
2124
+ }
2125
+ </div>
2126
+ <div class="preloader-text">
2127
+ <span class="preloader-title" data-smz-part="title">{{ title() }}</span>
2128
+ <span class="preloader-message" data-smz-part="message">{{ message() }}</span>
2129
+ </div>
2130
+ </div>
2131
+ </div>
2132
+ }
2133
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2134
+ }
2135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppLoader, decorators: [{
2136
+ type: Component,
2137
+ args: [{
2138
+ selector: 'app-loader',
2139
+ standalone: true,
2140
+ changeDetection: ChangeDetectionStrategy.OnPush,
2141
+ template: `
2142
+ @if (loaderService.visible()) {
2143
+ <div class="preloader preloader-shell" role="status" aria-live="polite" data-smz-part="loader" [attr.data-type]="type()">
2144
+ <div class="preloader-box" data-smz-part="box">
2145
+ <div class="preloader-spinner" data-smz-part="spinner" aria-hidden="true">
2146
+ @if (type() === 'square') {
2147
+ <div class="preloader-square">
2148
+ @for (segment of segments; track segment) {
2149
+ <div class="preloader-square-holder"><div class="preloader-square-segment"></div></div>
2150
+ }
2151
+ </div>
2152
+ }
2153
+ @else {
2154
+ <div class="preloader-cube-grid">
2155
+ @for (cube of cubes; track cube) {
2156
+ <div class="preloader-cube"></div>
2157
+ }
2158
+ </div>
2159
+ }
2160
+ </div>
2161
+ <div class="preloader-text">
2162
+ <span class="preloader-title" data-smz-part="title">{{ title() }}</span>
2163
+ <span class="preloader-message" data-smz-part="message">{{ message() }}</span>
2164
+ </div>
2165
+ </div>
2166
+ </div>
2167
+ }
2168
+ `,
2169
+ }]
2170
+ }], ctorParameters: () => [] });
2171
+
1582
2172
  class AppLayout {
1583
2173
  layoutService;
1584
2174
  renderer;
@@ -1587,6 +2177,15 @@ class AppLayout {
1587
2177
  menuOutsideClickListener;
1588
2178
  appSidebar;
1589
2179
  appTopBar;
2180
+ /**
2181
+ * Templates projetados pelo app em `<app-layout>` com `ng-template[smzTemplate]`: `headerExtras`,
2182
+ * `headerExtrasLandscape`, `headerExtrasPortrait` (topbar) e `footerExtras` (rodapé).
2183
+ */
2184
+ slotTemplates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "slotTemplates" }] : /* istanbul ignore next */ []));
2185
+ /** Layout da rota ativa (`data.layout`): peças visíveis, espaçamento e classes da área de conteúdo. */
2186
+ routeLayout = inject(RouteLayoutService);
2187
+ /** Peças opcionais da casca (`loader`, `toast`, `assistance`); só são montadas quando configuradas. */
2188
+ shell = inject(SMZ_UI_LAYOUT_CONFIG);
1590
2189
  constructor(layoutService, renderer, router) {
1591
2190
  this.layoutService = layoutService;
1592
2191
  this.renderer = renderer;
@@ -1607,6 +2206,10 @@ class AppLayout {
1607
2206
  this.hideMenu();
1608
2207
  });
1609
2208
  }
2209
+ /** Template de slot projetado com o nome dado, ou `undefined`. */
2210
+ slot(name) {
2211
+ return smzFindTemplate(this.slotTemplates(), name);
2212
+ }
1610
2213
  isOutsideClicked(event) {
1611
2214
  const sidebarEl = document.querySelector('.layout-sidebar');
1612
2215
  const topbarEl = document.querySelector('.layout-menu-button');
@@ -1641,10 +2244,14 @@ class AppLayout {
1641
2244
  return {
1642
2245
  'layout-overlay': this.layoutService.layoutConfig().menuMode === 'overlay',
1643
2246
  'layout-static': this.layoutService.layoutConfig().menuMode === 'static',
2247
+ 'layout-horizontal': this.layoutService.layoutConfig().menuMode === 'horizontal',
2248
+ 'layout-slim': this.layoutService.layoutConfig().menuMode === 'slim',
1644
2249
  'layout-static-inactive': this.layoutService.layoutState().staticMenuDesktopInactive && this.layoutService.layoutConfig().menuMode === 'static',
1645
2250
  'layout-overlay-active': this.layoutService.layoutState().overlayMenuActive,
1646
2251
  'layout-mobile-active': this.layoutService.layoutState().staticMenuMobileActive,
1647
- 'layout-sidebar-hidden': this.layoutService.layoutConfig().showSidebar === false
2252
+ 'layout-sidebar-hidden': this.layoutService.layoutConfig().showSidebar === false || !this.routeLayout.showSidebar(),
2253
+ 'layout-topbar-hidden': !this.routeLayout.showTopbar(),
2254
+ 'layout-route-padding': this.routeLayout.layout().contentPadding != null
1648
2255
  };
1649
2256
  }
1650
2257
  ngOnDestroy() {
@@ -1655,48 +2262,74 @@ class AppLayout {
1655
2262
  this.menuOutsideClickListener();
1656
2263
  }
1657
2264
  }
1658
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppLayout, deps: [{ token: LayoutService }, { token: i0.Renderer2 }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
1659
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppLayout, isStandalone: true, selector: "app-layout", viewQueries: [{ propertyName: "appSidebar", first: true, predicate: AppSidebar, descendants: true }, { propertyName: "appTopBar", first: true, predicate: AppTopbar, descendants: true }], ngImport: i0, template: `<div class="layout-wrapper" [ngClass]="containerClass">
1660
- <app-topbar></app-topbar>
1661
- @if (layoutService.layoutConfig().showSidebar !== false) {
2265
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppLayout, deps: [{ token: LayoutService }, { token: i0.Renderer2 }, { token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component });
2266
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppLayout, isStandalone: true, selector: "app-layout", queries: [{ propertyName: "slotTemplates", predicate: SmzTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "appSidebar", first: true, predicate: AppSidebar, descendants: true }, { propertyName: "appTopBar", first: true, predicate: AppTopbar, descendants: true }], ngImport: i0, template: `<div class="layout-wrapper" [ngClass]="containerClass" [style.--smz-layout-sidebar-width]="layoutService.layoutConfig().sidebarWidth" [style.--smz-layout-sidebar-slim-width]="layoutService.layoutConfig().sidebarSlimWidth">
2267
+ @if (routeLayout.showTopbar()) {
2268
+ <app-topbar [headerExtras]="slot('headerExtras')" [headerExtrasLandscape]="slot('headerExtrasLandscape')" [headerExtrasPortrait]="slot('headerExtrasPortrait')"></app-topbar>
2269
+ }
2270
+ @if (routeLayout.showSidebar() && layoutService.layoutConfig().showSidebar !== false) {
1662
2271
  <app-sidebar></app-sidebar>
1663
2272
  }
1664
2273
  <div class="layout-main-container">
1665
- <div class="layout-main relative">
2274
+ <div class="layout-main relative" [ngClass]="routeLayout.layout().contentStyleClass" [style.padding]="routeLayout.layout().contentPadding">
1666
2275
  <router-outlet></router-outlet>
1667
2276
  </div>
1668
- <app-footer></app-footer>
2277
+ @if (routeLayout.showFooter()) {
2278
+ <app-footer [footerExtras]="slot('footerExtras')"></app-footer>
2279
+ }
1669
2280
  </div>
1670
2281
  <div class="layout-mask animate-fadein"></div>
1671
- </div> `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AppTopbar, selector: "app-topbar" }, { kind: "component", type: AppSidebar, selector: "app-sidebar" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: AppFooter, selector: "app-footer" }] });
2282
+ @if (shell.assistance != null) {
2283
+ <app-assistance></app-assistance>
2284
+ }
2285
+ @if (shell.toast != null) {
2286
+ <ui-toast [position]="shell.toast().position ?? 'bottom-right'"></ui-toast>
2287
+ }
2288
+ @if (shell.loader != null) {
2289
+ <app-loader></app-loader>
2290
+ }
2291
+ </div> `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AppTopbar, selector: "app-topbar", inputs: ["headerExtras", "headerExtrasLandscape", "headerExtrasPortrait"] }, { kind: "component", type: AppSidebar, selector: "app-sidebar" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: AppFooter, selector: "app-footer", inputs: ["footerExtras"] }, { kind: "component", type: AppAssistance, selector: "app-assistance" }, { kind: "component", type: AppLoader, selector: "app-loader" }, { kind: "component", type: SmzToastContainerComponent, selector: "ui-toast", inputs: ["position", "key", "life", "lifeBySeverity", "showProgress", "pauseOnHover", "maxVisible", "style", "styleClass"] }] });
1672
2292
  }
1673
2293
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppLayout, decorators: [{
1674
2294
  type: Component,
1675
2295
  args: [{
1676
2296
  selector: 'app-layout',
1677
2297
  standalone: true,
1678
- imports: [CommonModule, AppTopbar, AppSidebar, RouterModule, AppFooter],
1679
- template: `<div class="layout-wrapper" [ngClass]="containerClass">
1680
- <app-topbar></app-topbar>
1681
- @if (layoutService.layoutConfig().showSidebar !== false) {
2298
+ imports: [CommonModule, AppTopbar, AppSidebar, RouterModule, AppFooter, AppAssistance, AppLoader, SmzToastContainerComponent],
2299
+ template: `<div class="layout-wrapper" [ngClass]="containerClass" [style.--smz-layout-sidebar-width]="layoutService.layoutConfig().sidebarWidth" [style.--smz-layout-sidebar-slim-width]="layoutService.layoutConfig().sidebarSlimWidth">
2300
+ @if (routeLayout.showTopbar()) {
2301
+ <app-topbar [headerExtras]="slot('headerExtras')" [headerExtrasLandscape]="slot('headerExtrasLandscape')" [headerExtrasPortrait]="slot('headerExtrasPortrait')"></app-topbar>
2302
+ }
2303
+ @if (routeLayout.showSidebar() && layoutService.layoutConfig().showSidebar !== false) {
1682
2304
  <app-sidebar></app-sidebar>
1683
2305
  }
1684
2306
  <div class="layout-main-container">
1685
- <div class="layout-main relative">
2307
+ <div class="layout-main relative" [ngClass]="routeLayout.layout().contentStyleClass" [style.padding]="routeLayout.layout().contentPadding">
1686
2308
  <router-outlet></router-outlet>
1687
2309
  </div>
1688
- <app-footer></app-footer>
2310
+ @if (routeLayout.showFooter()) {
2311
+ <app-footer [footerExtras]="slot('footerExtras')"></app-footer>
2312
+ }
1689
2313
  </div>
1690
2314
  <div class="layout-mask animate-fadein"></div>
2315
+ @if (shell.assistance != null) {
2316
+ <app-assistance></app-assistance>
2317
+ }
2318
+ @if (shell.toast != null) {
2319
+ <ui-toast [position]="shell.toast().position ?? 'bottom-right'"></ui-toast>
2320
+ }
2321
+ @if (shell.loader != null) {
2322
+ <app-loader></app-loader>
2323
+ }
1691
2324
  </div> `
1692
2325
  }]
1693
- }], ctorParameters: () => [{ type: LayoutService }, { type: i0.Renderer2 }, { type: i1.Router }], propDecorators: { appSidebar: [{
2326
+ }], ctorParameters: () => [{ type: LayoutService }, { type: i0.Renderer2 }, { type: i1$2.Router }], propDecorators: { appSidebar: [{
1694
2327
  type: ViewChild,
1695
2328
  args: [AppSidebar]
1696
2329
  }], appTopBar: [{
1697
2330
  type: ViewChild,
1698
2331
  args: [AppTopbar]
1699
- }] } });
2332
+ }], slotTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SmzTemplateDirective), { isSignal: true }] }] } });
1700
2333
 
1701
2334
  class AppFloatingConfigurator {
1702
2335
  LayoutService = inject(LayoutService);
@@ -1808,11 +2441,11 @@ class AccessPageComponent {
1808
2441
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AccessPageComponent, isStandalone: true, selector: "app-access", ngImport: i0, template: `
1809
2442
  <div class="relative m-0 flex flex-wrap h-screen w-screen items-center justify-center overflow-hidden p-0">
1810
2443
 
1811
- <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-surface-ground p-2">
2444
+ <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-ui-layout-errors p-2">
1812
2445
  <div class="flex flex-wrap w-8/12 flex-none items-center -mt-2 -mx-2">
1813
- <div class="w-full flex-none p-0 text-[5em] font-bold leading-tight text-text-color">{{ config.access.title }}</div>
1814
- <div class="w-4/12 flex-none mb-[2em] w-[30%] rounded border-b-4 border-solid border-b-[#f44336] p-0"></div>
1815
- <div class="w-full flex-none mb-[2em] max-w-prose p-0 text-[1.4em] font-medium leading-relaxed text-text-color">{{ config.access.message }}</div>
2446
+ <div class="w-full flex-none p-0 text-ui-layout-errors-title-size font-ui-layout-errors-title leading-tight text-ui-layout-errors">{{ config.access.title }}</div>
2447
+ <div class="w-4/12 flex-none mb-ui-layout-errors-accent w-ui-layout-errors-accent rounded-ui-layout-errors-accent border-b-ui-layout-errors-accent-width border-solid border-b-ui-layout-errors-accent p-0"></div>
2448
+ <div class="w-full flex-none mb-ui-layout-errors-subtitle max-w-prose p-0 text-ui-layout-errors-subtitle-size font-ui-layout-errors-subtitle leading-relaxed text-ui-layout-errors">{{ config.access.message }}</div>
1816
2449
  <div class="flex flex-wrap items-center justify-start gap-2">
1817
2450
  @for (button of config.access.buttons; track button) {
1818
2451
  <button smzButton [label]="button.label" [routerLink]="button.url" (click)="button.command()" class="mt-8" [severity]="button.severity"></button>
@@ -1825,7 +2458,7 @@ class AccessPageComponent {
1825
2458
  <img class="m-0 h-screen w-full object-cover p-0" [src]="config.access.backgroundPath" alt="" />
1826
2459
  </div>
1827
2460
  </div>
1828
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
2461
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
1829
2462
  }
1830
2463
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AccessPageComponent, decorators: [{
1831
2464
  type: Component,
@@ -1836,11 +2469,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1836
2469
  template: `
1837
2470
  <div class="relative m-0 flex flex-wrap h-screen w-screen items-center justify-center overflow-hidden p-0">
1838
2471
 
1839
- <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-surface-ground p-2">
2472
+ <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-ui-layout-errors p-2">
1840
2473
  <div class="flex flex-wrap w-8/12 flex-none items-center -mt-2 -mx-2">
1841
- <div class="w-full flex-none p-0 text-[5em] font-bold leading-tight text-text-color">{{ config.access.title }}</div>
1842
- <div class="w-4/12 flex-none mb-[2em] w-[30%] rounded border-b-4 border-solid border-b-[#f44336] p-0"></div>
1843
- <div class="w-full flex-none mb-[2em] max-w-prose p-0 text-[1.4em] font-medium leading-relaxed text-text-color">{{ config.access.message }}</div>
2474
+ <div class="w-full flex-none p-0 text-ui-layout-errors-title-size font-ui-layout-errors-title leading-tight text-ui-layout-errors">{{ config.access.title }}</div>
2475
+ <div class="w-4/12 flex-none mb-ui-layout-errors-accent w-ui-layout-errors-accent rounded-ui-layout-errors-accent border-b-ui-layout-errors-accent-width border-solid border-b-ui-layout-errors-accent p-0"></div>
2476
+ <div class="w-full flex-none mb-ui-layout-errors-subtitle max-w-prose p-0 text-ui-layout-errors-subtitle-size font-ui-layout-errors-subtitle leading-relaxed text-ui-layout-errors">{{ config.access.message }}</div>
1844
2477
  <div class="flex flex-wrap items-center justify-start gap-2">
1845
2478
  @for (button of config.access.buttons; track button) {
1846
2479
  <button smzButton [label]="button.label" [routerLink]="button.url" (click)="button.command()" class="mt-8" [severity]="button.severity"></button>
@@ -1863,11 +2496,11 @@ class ErrorPageComponent {
1863
2496
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: ErrorPageComponent, isStandalone: true, selector: "app-error", ngImport: i0, template: `
1864
2497
  <div class="relative m-0 flex flex-wrap h-screen w-screen items-center justify-center overflow-hidden p-0">
1865
2498
 
1866
- <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-surface-ground p-2">
2499
+ <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-ui-layout-errors p-2">
1867
2500
  <div class="flex flex-wrap w-8/12 flex-none items-center -mt-2 -mx-2">
1868
- <div class="w-full flex-none p-0 text-[5em] font-bold leading-tight text-text-color">{{ config.error.title }}</div>
1869
- <div class="w-4/12 flex-none mb-[2em] w-[30%] rounded border-b-4 border-solid border-b-[#f44336] p-0"></div>
1870
- <div class="w-full flex-none mb-[2em] max-w-prose p-0 text-[1.4em] font-medium leading-relaxed text-text-color">{{ config.error.message }}</div>
2501
+ <div class="w-full flex-none p-0 text-ui-layout-errors-title-size font-ui-layout-errors-title leading-tight text-ui-layout-errors">{{ config.error.title }}</div>
2502
+ <div class="w-4/12 flex-none mb-ui-layout-errors-accent w-ui-layout-errors-accent rounded-ui-layout-errors-accent border-b-ui-layout-errors-accent-width border-solid border-b-ui-layout-errors-accent p-0"></div>
2503
+ <div class="w-full flex-none mb-ui-layout-errors-subtitle max-w-prose p-0 text-ui-layout-errors-subtitle-size font-ui-layout-errors-subtitle leading-relaxed text-ui-layout-errors">{{ config.error.message }}</div>
1871
2504
  <div class="flex flex-wrap items-center justify-start gap-2">
1872
2505
  @for (button of config.error.buttons; track button) {
1873
2506
  <button smzButton [label]="button.label" [routerLink]="button.url" (click)="button.command()" class="mt-8" [severity]="button.severity"></button>
@@ -1880,7 +2513,7 @@ class ErrorPageComponent {
1880
2513
  <img class="m-0 h-screen w-full object-cover p-0" [src]="config.error.backgroundPath" alt="" />
1881
2514
  </div>
1882
2515
  </div>
1883
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
2516
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
1884
2517
  }
1885
2518
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ErrorPageComponent, decorators: [{
1886
2519
  type: Component,
@@ -1891,11 +2524,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1891
2524
  template: `
1892
2525
  <div class="relative m-0 flex flex-wrap h-screen w-screen items-center justify-center overflow-hidden p-0">
1893
2526
 
1894
- <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-surface-ground p-2">
2527
+ <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-ui-layout-errors p-2">
1895
2528
  <div class="flex flex-wrap w-8/12 flex-none items-center -mt-2 -mx-2">
1896
- <div class="w-full flex-none p-0 text-[5em] font-bold leading-tight text-text-color">{{ config.error.title }}</div>
1897
- <div class="w-4/12 flex-none mb-[2em] w-[30%] rounded border-b-4 border-solid border-b-[#f44336] p-0"></div>
1898
- <div class="w-full flex-none mb-[2em] max-w-prose p-0 text-[1.4em] font-medium leading-relaxed text-text-color">{{ config.error.message }}</div>
2529
+ <div class="w-full flex-none p-0 text-ui-layout-errors-title-size font-ui-layout-errors-title leading-tight text-ui-layout-errors">{{ config.error.title }}</div>
2530
+ <div class="w-4/12 flex-none mb-ui-layout-errors-accent w-ui-layout-errors-accent rounded-ui-layout-errors-accent border-b-ui-layout-errors-accent-width border-solid border-b-ui-layout-errors-accent p-0"></div>
2531
+ <div class="w-full flex-none mb-ui-layout-errors-subtitle max-w-prose p-0 text-ui-layout-errors-subtitle-size font-ui-layout-errors-subtitle leading-relaxed text-ui-layout-errors">{{ config.error.message }}</div>
1899
2532
  <div class="flex flex-wrap items-center justify-start gap-2">
1900
2533
  @for (button of config.error.buttons; track button) {
1901
2534
  <button smzButton [label]="button.label" [routerLink]="button.url" (click)="button.command()" class="mt-8" [severity]="button.severity"></button>
@@ -1918,27 +2551,27 @@ class NotfoundPageComponent {
1918
2551
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: NotfoundPageComponent, isStandalone: true, selector: "app-notfound", ngImport: i0, template: `
1919
2552
  <div class="relative m-0 flex flex-wrap h-screen w-screen items-center justify-center overflow-hidden p-0">
1920
2553
 
1921
- <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-surface-ground p-2">
2554
+ <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-ui-layout-errors p-2">
1922
2555
  <div class="grid grid-cols-12 w-8/12 flex-none items-center gap-4 pb-2">
1923
- <div class="col-span-12 p-0 text-[5em] font-bold leading-tight text-text-color min-w-0">{{ config.notfound.code }}</div>
1924
- <div class="col-span-4 mb-[2em] w-[30%] rounded border-b-4 border-solid border-b-[#f44336] p-0 min-w-0"></div>
1925
- <div class="col-span-12 mb-2 p-0 text-[1.4em] font-medium leading-relaxed text-text-color min-w-0">{{ config.notfound.title }}</div>
1926
- <div class="col-span-12 mb-8 max-w-prose p-0 text-base font-medium leading-relaxed text-text-color min-w-0">{{ config.notfound.message }}</div>
2556
+ <div class="col-span-12 p-0 text-ui-layout-errors-title-size font-ui-layout-errors-title leading-tight text-ui-layout-errors min-w-0">{{ config.notfound.code }}</div>
2557
+ <div class="col-span-4 mb-ui-layout-errors-accent w-ui-layout-errors-accent rounded-ui-layout-errors-accent border-b-ui-layout-errors-accent-width border-solid border-b-ui-layout-errors-accent p-0 min-w-0"></div>
2558
+ <div class="col-span-12 mb-2 p-0 text-ui-layout-errors-subtitle-size font-ui-layout-errors-subtitle leading-relaxed text-ui-layout-errors min-w-0">{{ config.notfound.title }}</div>
2559
+ <div class="col-span-12 mb-8 max-w-prose p-0 text-ui-layout-errors-text-size font-ui-layout-errors-text leading-relaxed text-ui-layout-errors min-w-0">{{ config.notfound.message }}</div>
1927
2560
 
1928
2561
  @for (link of config.notfound.links; track link.url) {
1929
2562
  <a
1930
2563
  [routerLink]="link.url"
1931
- class="col-span-12 flex w-full items-center border-0 border-b border-solid border-surface-border py-6 last:border-b-0 no-underline min-w-0"
2564
+ class="col-span-12 flex w-full items-center border-0 border-b border-solid border-ui-layout-errors-link py-6 last:border-b-0 no-underline min-w-0"
1932
2565
  >
1933
2566
  <span
1934
- class="flex h-14 w-14 shrink-0 items-center justify-center rounded-lg border-2 border-solid border-primary-color text-primary-color"
2567
+ class="flex h-14 w-14 shrink-0 items-center justify-center rounded-ui-layout-errors-link-icon border-2 border-solid border-ui-layout-errors-link-icon text-ui-layout-errors-link-icon"
1935
2568
  >
1936
- <i class="text-2xl" [class]="link.icon"></i>
2569
+ <i class="text-ui-layout-errors-link-icon-size leading-8" [class]="link.icon"></i>
1937
2570
  </span>
1938
2571
 
1939
2572
  <span class="ml-6 flex min-w-0 flex-col">
1940
- <span class="mb-0 block font-medium text-text-color lg:text-xl">{{ link.title }}</span>
1941
- <span class="text-text-color-secondary lg:text-xl">{{ link.description }}</span>
2573
+ <span class="mb-0 block font-ui-layout-errors-link text-ui-layout-errors lg:text-ui-layout-errors-link-size lg:leading-7">{{ link.title }}</span>
2574
+ <span class="text-ui-layout-errors-link-description lg:text-ui-layout-errors-link-size lg:leading-7">{{ link.description }}</span>
1942
2575
  </span>
1943
2576
  </a>
1944
2577
  }
@@ -1959,7 +2592,7 @@ class NotfoundPageComponent {
1959
2592
  />
1960
2593
  </div>
1961
2594
  </div>
1962
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }] });
2595
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }] });
1963
2596
  }
1964
2597
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotfoundPageComponent, decorators: [{
1965
2598
  type: Component,
@@ -1970,27 +2603,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
1970
2603
  template: `
1971
2604
  <div class="relative m-0 flex flex-wrap h-screen w-screen items-center justify-center overflow-hidden p-0">
1972
2605
 
1973
- <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-surface-ground p-2">
2606
+ <div class="flex flex-wrap justify-center items-center w-full flex-none lg:w-6/12 h-full bg-ui-layout-errors p-2">
1974
2607
  <div class="grid grid-cols-12 w-8/12 flex-none items-center gap-4 pb-2">
1975
- <div class="col-span-12 p-0 text-[5em] font-bold leading-tight text-text-color min-w-0">{{ config.notfound.code }}</div>
1976
- <div class="col-span-4 mb-[2em] w-[30%] rounded border-b-4 border-solid border-b-[#f44336] p-0 min-w-0"></div>
1977
- <div class="col-span-12 mb-2 p-0 text-[1.4em] font-medium leading-relaxed text-text-color min-w-0">{{ config.notfound.title }}</div>
1978
- <div class="col-span-12 mb-8 max-w-prose p-0 text-base font-medium leading-relaxed text-text-color min-w-0">{{ config.notfound.message }}</div>
2608
+ <div class="col-span-12 p-0 text-ui-layout-errors-title-size font-ui-layout-errors-title leading-tight text-ui-layout-errors min-w-0">{{ config.notfound.code }}</div>
2609
+ <div class="col-span-4 mb-ui-layout-errors-accent w-ui-layout-errors-accent rounded-ui-layout-errors-accent border-b-ui-layout-errors-accent-width border-solid border-b-ui-layout-errors-accent p-0 min-w-0"></div>
2610
+ <div class="col-span-12 mb-2 p-0 text-ui-layout-errors-subtitle-size font-ui-layout-errors-subtitle leading-relaxed text-ui-layout-errors min-w-0">{{ config.notfound.title }}</div>
2611
+ <div class="col-span-12 mb-8 max-w-prose p-0 text-ui-layout-errors-text-size font-ui-layout-errors-text leading-relaxed text-ui-layout-errors min-w-0">{{ config.notfound.message }}</div>
1979
2612
 
1980
2613
  @for (link of config.notfound.links; track link.url) {
1981
2614
  <a
1982
2615
  [routerLink]="link.url"
1983
- class="col-span-12 flex w-full items-center border-0 border-b border-solid border-surface-border py-6 last:border-b-0 no-underline min-w-0"
2616
+ class="col-span-12 flex w-full items-center border-0 border-b border-solid border-ui-layout-errors-link py-6 last:border-b-0 no-underline min-w-0"
1984
2617
  >
1985
2618
  <span
1986
- class="flex h-14 w-14 shrink-0 items-center justify-center rounded-lg border-2 border-solid border-primary-color text-primary-color"
2619
+ class="flex h-14 w-14 shrink-0 items-center justify-center rounded-ui-layout-errors-link-icon border-2 border-solid border-ui-layout-errors-link-icon text-ui-layout-errors-link-icon"
1987
2620
  >
1988
- <i class="text-2xl" [class]="link.icon"></i>
2621
+ <i class="text-ui-layout-errors-link-icon-size leading-8" [class]="link.icon"></i>
1989
2622
  </span>
1990
2623
 
1991
2624
  <span class="ml-6 flex min-w-0 flex-col">
1992
- <span class="mb-0 block font-medium text-text-color lg:text-xl">{{ link.title }}</span>
1993
- <span class="text-text-color-secondary lg:text-xl">{{ link.description }}</span>
2625
+ <span class="mb-0 block font-ui-layout-errors-link text-ui-layout-errors lg:text-ui-layout-errors-link-size lg:leading-7">{{ link.title }}</span>
2626
+ <span class="text-ui-layout-errors-link-description lg:text-ui-layout-errors-link-size lg:leading-7">{{ link.description }}</span>
1994
2627
  </span>
1995
2628
  </a>
1996
2629
  }
@@ -2023,19 +2656,22 @@ const ErrorsRoutes = [
2023
2656
 
2024
2657
  /** Manifesto das entradas de `@ngx-smz/layout` na galeria do Design System: dado puro (o import acima é só de tipo). */
2025
2658
  const LAYOUT_GALLERY_MANIFEST = [
2026
- { id: 'layout-shell', label: 'Layout: shell', group: 'layout', scenes: ['static-inactive', 'overlay', 'overlay-active', 'no-sidebar'] },
2027
- { id: 'layout-topbar', label: 'Layout: topbar', group: 'layout' },
2028
- { id: 'layout-menu', label: 'Layout: menu lateral', group: 'layout' },
2029
- { id: 'layout-footer', label: 'Layout: rodapé', group: 'layout' },
2659
+ { id: 'layout-shell', label: 'Layout: shell', group: 'layout', scenes: ['static-inactive', 'overlay', 'overlay-active', 'no-sidebar', 'menu-horizontal', 'menu-slim', 'sidebar-width', 'content', 'preloader',
2660
+ 'loader', 'loader-square', 'route-full', 'route-topbar-only', 'route-menu-only', 'assistance'] },
2661
+ { id: 'layout-topbar', label: 'Layout: topbar', group: 'layout', scenes: ['slots', 'profile', 'notifications'] },
2662
+ { id: 'layout-menu', label: 'Layout: menu lateral', group: 'layout', scenes: ['horizontal', 'horizontal-open', 'slim', 'slim-hover', 'widths'] },
2663
+ { id: 'layout-footer', label: 'Layout: rodapé', group: 'layout', scenes: ['texts-and-images', 'slot'] },
2664
+ { id: 'layout-configurator', label: 'Layout: configurador', group: 'layout' },
2030
2665
  { id: 'layout-errors', label: 'Layout: páginas de erro', group: 'layout', scenes: ['error-buttons', 'access', 'notfound', 'notfound-links'] },
2031
2666
  ];
2032
2667
 
2033
2668
  const LAYOUT_GALLERY_LOADERS = {
2034
- 'layout-shell': () => import('./ngx-smz-layout-layout-shell.entry-CWxnFneU.mjs').then((m) => m.LayoutShellGalleryEntryComponent),
2035
- 'layout-topbar': () => import('./ngx-smz-layout-layout-topbar.entry-CfSpHt5E.mjs').then((m) => m.LayoutTopbarGalleryEntryComponent),
2036
- 'layout-menu': () => import('./ngx-smz-layout-layout-menu.entry-BAzglN_V.mjs').then((m) => m.LayoutMenuGalleryEntryComponent),
2037
- 'layout-footer': () => import('./ngx-smz-layout-layout-footer.entry-CbNgTe0l.mjs').then((m) => m.LayoutFooterGalleryEntryComponent),
2038
- 'layout-errors': () => import('./ngx-smz-layout-layout-errors.entry-Bpp0Hw8y.mjs').then((m) => m.LayoutErrorsGalleryEntryComponent),
2669
+ 'layout-shell': () => import('./ngx-smz-layout-layout-shell.entry-qgGO3ZqB.mjs').then((m) => m.LayoutShellGalleryEntryComponent),
2670
+ 'layout-topbar': () => import('./ngx-smz-layout-layout-topbar.entry-Bg3BEgJa.mjs').then((m) => m.LayoutTopbarGalleryEntryComponent),
2671
+ 'layout-menu': () => import('./ngx-smz-layout-layout-menu.entry-DdTLZvao.mjs').then((m) => m.LayoutMenuGalleryEntryComponent),
2672
+ 'layout-footer': () => import('./ngx-smz-layout-layout-footer.entry-BmXVGvze.mjs').then((m) => m.LayoutFooterGalleryEntryComponent),
2673
+ 'layout-configurator': () => import('./ngx-smz-layout-layout-configurator.entry-Dm9Xx7YB.mjs').then((m) => m.LayoutConfiguratorGalleryEntryComponent),
2674
+ 'layout-errors': () => import('./ngx-smz-layout-layout-errors.entry-CQuwiz8W.mjs').then((m) => m.LayoutErrorsGalleryEntryComponent),
2039
2675
  };
2040
2676
  /**
2041
2677
  * Entradas de `@ngx-smz/layout` para a galeria do Design System. Registro no app:
@@ -2054,5 +2690,5 @@ const SMZ_LAYOUT_GALLERY_ENTRIES = LAYOUT_GALLERY_MANIFEST.map((entry) => ({
2054
2690
  * Generated bundle index. Do not edit.
2055
2691
  */
2056
2692
 
2057
- export { AccessPageComponent as A, ErrorPageComponent as E, LayoutService as L, NotfoundPageComponent as N, PageTitleService as P, SMZ_UI_LAYOUT_CONFIG as S, AppFooter as a, AppSidebar as b, AppTopbar as c, AppLayout as d, SmzUILayout as e, NavigationService as f, ErrorPagesConfigService as g, AppFloatingConfigurator as h, ErrorsRoutes as i, LAYOUT_GALLERY_MANIFEST as j, LoggingScope as k, LoggingService as l, SMZ_LAYOUT_GALLERY_ENTRIES as m, SMZ_LAYOUT_LOGGING_CONFIG as n, SmzLayoutLogging as o, SmzUILayoutProvisionBuilder as p, configureSmzUILayout as q, provideSmzLayoutLogging as r, provideSmzUILayout as s };
2058
- //# sourceMappingURL=ngx-smz-layout-ngx-smz-layout-BEHAEWgI.mjs.map
2693
+ export { AccessPageComponent as A, ErrorPageComponent as E, LayoutService as L, NotfoundPageComponent as N, PageTitleService as P, RouteLayoutService as R, SMZ_UI_LAYOUT_CONFIG as S, AppConfigurator as a, AppFooter as b, AppSidebar as c, AppTopbar as d, AppLayout as e, SmzUILayout as f, NavigationService as g, LayoutLoaderService as h, ErrorPagesConfigService as i, AppAssistance as j, AppFloatingConfigurator as k, AppLoader as l, ErrorsRoutes as m, LAYOUT_GALLERY_MANIFEST as n, LoggingScope as o, LoggingService as p, SMZ_LAYOUT_GALLERY_ENTRIES as q, SMZ_LAYOUT_LOGGING_CONFIG as r, smzTopbarNotificationsAvailable as s, SmzLayoutLogging as t, SmzUILayoutProvisionBuilder as u, configureSmzUILayout as v, provideSmzLayoutLogging as w, provideSmzUILayout as x };
2694
+ //# sourceMappingURL=ngx-smz-layout-ngx-smz-layout-CvjM-0jw.mjs.map