@ngx-smz/layout 21.1.10 → 21.1.20

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, Injectable, InjectionToken, provideAppInitializer, inject, makeEnvironmentProviders, computed, effect, PLATFORM_ID, Component, EventEmitter, Output, Input, Directive, HostBinding, ViewChild } from '@angular/core';
2
+ import { signal, computed, Injectable, InjectionToken, provideAppInitializer, inject, makeEnvironmentProviders, effect, PLATFORM_ID, Component, EventEmitter, Output, Input, Directive, HostBinding, ViewChild } from '@angular/core';
3
3
  import * as i3 from '@angular/common';
4
4
  import { CommonModule, Location } from '@angular/common';
5
5
  import * as i1 from '@angular/router';
@@ -27,32 +27,64 @@ import { trigger, state, style, transition, animate } from '@angular/animations'
27
27
  import * as i4$1 from 'primeng/ripple';
28
28
  import { RippleModule } from 'primeng/ripple';
29
29
 
30
+ /**
31
+ * Clones the menu tree and sets `visible: false` where the host denies access via `hasClaim`.
32
+ * Layout shells only need `visible` / `isVisible`; authorization stays in the injected callback.
33
+ */
34
+ function cloneMenuItemsWithClaimVisibility(items, hasClaim) {
35
+ if (items == null || items.length === 0) {
36
+ return [];
37
+ }
38
+ return items.map((item) => cloneMenuItemWithClaimVisibility(item, hasClaim));
39
+ }
40
+ function cloneMenuItemWithClaimVisibility(item, hasClaim) {
41
+ const source = item;
42
+ const cloned = {
43
+ ...source,
44
+ items: source.items?.map((child) => cloneMenuItemWithClaimVisibility(child, hasClaim))
45
+ };
46
+ const claims = source.claims;
47
+ if (claims != null && claims.length > 0 && hasClaim != null && !hasClaim(claims)) {
48
+ cloned.visible = false;
49
+ }
50
+ return cloned;
51
+ }
52
+
30
53
  class SmzUILayout {
31
- hasClaim;
32
- sidebar = signal([], ...(ngDevMode ? [{ debugName: "sidebar" }] : []));
33
- footer = signal({}, ...(ngDevMode ? [{ debugName: "footer" }] : []));
54
+ /**
55
+ * Writable menu graph from the host (`SMZ_UI_LAYOUT_CONFIG.sidebar`). Mutations here trigger {@link sidebar}.
56
+ */
57
+ sidebarWritable = signal([], ...(ngDevMode ? [{ debugName: "sidebarWritable" }] : /* istanbul ignore next */ []));
58
+ /**
59
+ * Menu prepared for shells such as Hephaestus: entries denied by {@link SmzUILayoutConfigType.hasClaim}
60
+ * use `visible: false` so templates only need visibility rules.
61
+ */
62
+ sidebar = computed(() => cloneMenuItemsWithClaimVisibility(this.sidebarWritable(), this.layoutFeature?.hasClaim), ...(ngDevMode ? [{ debugName: "sidebar" }] : /* istanbul ignore next */ []));
63
+ layoutFeature = null;
64
+ footer = signal({}, ...(ngDevMode ? [{ debugName: "footer" }] : /* istanbul ignore next */ []));
34
65
  topbar = signal({
35
66
  showMenuToggle: true,
36
67
  showBackButton: true,
37
- }, ...(ngDevMode ? [{ debugName: "topbar" }] : []));
68
+ }, ...(ngDevMode ? [{ debugName: "topbar" }] : /* istanbul ignore next */ []));
38
69
  layout = signal({
39
70
  preset: 'Aura',
40
71
  primary: 'orange',
41
72
  surface: null,
42
73
  darkTheme: false,
43
74
  menuMode: 'static'
44
- }, ...(ngDevMode ? [{ debugName: "layout" }] : []));
75
+ }, ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
45
76
  state = signal({
46
77
  staticMenuDesktopInactive: false,
47
78
  overlayMenuActive: false,
48
79
  configSidebarVisible: false,
49
80
  staticMenuMobileActive: false,
50
81
  menuHoverActive: false
51
- }, ...(ngDevMode ? [{ debugName: "state" }] : []));
82
+ }, ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
52
83
  setConfig(config) {
53
- const { sidebar, footer, topbar, hasClaim } = config || {};
84
+ const { sidebar, footer, topbar } = config || {};
85
+ this.layoutFeature = config ?? null;
54
86
  if (sidebar) {
55
- this.sidebar = sidebar;
87
+ this.sidebarWritable = sidebar;
56
88
  }
57
89
  if (footer) {
58
90
  this.footer = footer;
@@ -60,33 +92,166 @@ class SmzUILayout {
60
92
  if (topbar) {
61
93
  this.topbar = topbar;
62
94
  }
63
- if (hasClaim) {
64
- this.hasClaim = hasClaim;
65
- }
66
95
  }
67
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzUILayout, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
68
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzUILayout, providedIn: 'root' });
96
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzUILayout, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
97
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzUILayout, providedIn: 'root' });
69
98
  }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzUILayout, decorators: [{
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzUILayout, decorators: [{
71
100
  type: Injectable,
72
101
  args: [{ providedIn: 'root' }]
73
102
  }] });
74
103
 
75
104
  const SMZ_UI_LAYOUT_CONFIG = new InjectionToken('SMZ_UI_LAYOUT_CONFIG');
76
- function provideSmzUILayout(initializers) {
77
- const features = initializers();
105
+ function createSmzUILayoutEnvironmentProviders(features, resolveHasClaim) {
78
106
  const providers = features?.map((feature) => ({
79
107
  provide: SMZ_UI_LAYOUT_CONFIG,
80
108
  useValue: feature,
81
109
  multi: false
82
110
  }));
83
111
  const initializer = provideAppInitializer(() => {
84
- const SmzUILayoutConfig = inject(SmzUILayout);
85
- features?.forEach((feature) => SmzUILayoutConfig.setConfig(feature));
112
+ const smzLayout = inject(SmzUILayout);
113
+ features?.forEach((feature) => {
114
+ smzLayout.setConfig(feature);
115
+ });
116
+ if (resolveHasClaim != null) {
117
+ inject(SMZ_UI_LAYOUT_CONFIG).hasClaim = resolveHasClaim();
118
+ }
86
119
  return;
87
120
  });
88
121
  return makeEnvironmentProviders([...providers, initializer]);
89
122
  }
123
+ /**
124
+ * Fluent configuration for layout provisioning.
125
+ *
126
+ * Prefer granular `.withSidebar()`, `.withFooter()`, … for readability, or `.withFeatures()`
127
+ * when you already expose an assembled {@link SmzUILayoutConfigType} (including multi-feature arrays).
128
+ *
129
+ * @example
130
+ * ```ts
131
+ * configureSmzUILayout()
132
+ * .withSidebar(appSidebar)
133
+ * .withFooter(appFooter)
134
+ * .withTopbar(appTopbar)
135
+ * .withLayout(appLayout)
136
+ * .withLayoutState(appLayoutState)
137
+ * .withMenuAuthorization(() => {
138
+ * const access = inject(AccessControlService);
139
+ * return (claims) => access.hasClaim(claims);
140
+ * })
141
+ * .build()
142
+ * ```
143
+ */
144
+ class SmzUILayoutProvisionBuilder {
145
+ featuresFactory;
146
+ menuAuthorizationFactory;
147
+ sidebarSignal;
148
+ footerSignal;
149
+ topbarSignal;
150
+ layoutSignal;
151
+ layoutStateSignal;
152
+ hasGranularSlots() {
153
+ return (this.sidebarSignal != null ||
154
+ this.footerSignal != null ||
155
+ this.topbarSignal != null ||
156
+ this.layoutSignal != null ||
157
+ this.layoutStateSignal != null);
158
+ }
159
+ assertNotUsingFeaturesFactory(methodName) {
160
+ if (this.featuresFactory != null) {
161
+ throw new Error(`configureSmzUILayout(): ${methodName} cannot be used together with .withFeatures(...).`);
162
+ }
163
+ }
164
+ /**
165
+ * Sync factory returning one or more assembled layout feature objects (advanced / legacy).
166
+ * Cannot use `inject()` here — only plain values and module-scope signals.
167
+ * Do not combine with `.withSidebar()` / `.withFooter()` / …
168
+ */
169
+ withFeatures(factory) {
170
+ if (this.hasGranularSlots()) {
171
+ throw new Error('configureSmzUILayout(): .withFeatures(...) cannot be used together with granular .withSidebar() / .withFooter() / …');
172
+ }
173
+ this.featuresFactory = factory;
174
+ return this;
175
+ }
176
+ withSidebar(sidebar) {
177
+ this.assertNotUsingFeaturesFactory('withSidebar');
178
+ this.sidebarSignal = sidebar;
179
+ return this;
180
+ }
181
+ withFooter(footer) {
182
+ this.assertNotUsingFeaturesFactory('withFooter');
183
+ this.footerSignal = footer;
184
+ return this;
185
+ }
186
+ withTopbar(topbar) {
187
+ this.assertNotUsingFeaturesFactory('withTopbar');
188
+ this.topbarSignal = topbar;
189
+ return this;
190
+ }
191
+ /** Writable layout chrome config (preset, theme flags, menu mode, …). */
192
+ withLayout(layout) {
193
+ this.assertNotUsingFeaturesFactory('withLayout');
194
+ this.layoutSignal = layout;
195
+ return this;
196
+ }
197
+ /** Writable overlay / sidebar UI state for the Prime layout shell. */
198
+ withLayoutState(state) {
199
+ this.assertNotUsingFeaturesFactory('withLayoutState');
200
+ this.layoutStateSignal = state;
201
+ return this;
202
+ }
203
+ /**
204
+ * Runs during app bootstrap (injection context). Use `inject()` to resolve services,
205
+ * then return the predicate assigned to `SMZ_UI_LAYOUT_CONFIG.hasClaim`.
206
+ */
207
+ withMenuAuthorization(factory) {
208
+ this.menuAuthorizationFactory = factory;
209
+ return this;
210
+ }
211
+ build() {
212
+ if (this.featuresFactory != null) {
213
+ const features = this.featuresFactory();
214
+ return createSmzUILayoutEnvironmentProviders(features, this.menuAuthorizationFactory);
215
+ }
216
+ const missingSteps = [];
217
+ if (this.sidebarSignal == null) {
218
+ missingSteps.push('.withSidebar(...)');
219
+ }
220
+ if (this.footerSignal == null) {
221
+ missingSteps.push('.withFooter(...)');
222
+ }
223
+ if (this.topbarSignal == null) {
224
+ missingSteps.push('.withTopbar(...)');
225
+ }
226
+ if (this.layoutSignal == null) {
227
+ missingSteps.push('.withLayout(...)');
228
+ }
229
+ if (this.layoutStateSignal == null) {
230
+ missingSteps.push('.withLayoutState(...)');
231
+ }
232
+ if (missingSteps.length > 0) {
233
+ throw new Error(`configureSmzUILayout(): provide layout signals or call .withFeatures(...). Missing: ${missingSteps.join(', ')}`);
234
+ }
235
+ const feature = {
236
+ sidebar: this.sidebarSignal,
237
+ footer: this.footerSignal,
238
+ topbar: this.topbarSignal,
239
+ layout: this.layoutSignal,
240
+ state: this.layoutStateSignal
241
+ };
242
+ return createSmzUILayoutEnvironmentProviders([feature], this.menuAuthorizationFactory);
243
+ }
244
+ }
245
+ /** Starts a fluent {@link SmzUILayoutProvisionBuilder}; finish with `.build()`. */
246
+ function configureSmzUILayout() {
247
+ return new SmzUILayoutProvisionBuilder();
248
+ }
249
+ function provideSmzUILayout(initializers, resolveHasClaim) {
250
+ const builder = configureSmzUILayout().withFeatures(initializers);
251
+ return resolveHasClaim != null
252
+ ? builder.withMenuAuthorization(resolveHasClaim).build()
253
+ : builder.build();
254
+ }
90
255
 
91
256
  class LayoutService {
92
257
  config = inject(SMZ_UI_LAYOUT_CONFIG);
@@ -100,13 +265,13 @@ class LayoutService {
100
265
  resetSource$ = this.resetSource.asObservable();
101
266
  configUpdate$ = this.configUpdate.asObservable();
102
267
  overlayOpen$ = this.overlayOpen.asObservable();
103
- theme = computed(() => (this.layoutConfig()?.darkTheme ? 'light' : 'dark'), ...(ngDevMode ? [{ debugName: "theme" }] : []));
104
- isSidebarActive = computed(() => this.layoutState().overlayMenuActive || this.layoutState().staticMenuMobileActive, ...(ngDevMode ? [{ debugName: "isSidebarActive" }] : []));
105
- isDarkTheme = computed(() => this.layoutConfig().darkTheme, ...(ngDevMode ? [{ debugName: "isDarkTheme" }] : []));
106
- getPrimary = computed(() => this.layoutConfig().primary, ...(ngDevMode ? [{ debugName: "getPrimary" }] : []));
107
- getSurface = computed(() => this.layoutConfig().surface, ...(ngDevMode ? [{ debugName: "getSurface" }] : []));
108
- isOverlay = computed(() => this.layoutConfig().menuMode === 'overlay', ...(ngDevMode ? [{ debugName: "isOverlay" }] : []));
109
- transitionComplete = signal(false, ...(ngDevMode ? [{ debugName: "transitionComplete" }] : []));
268
+ theme = computed(() => (this.layoutConfig()?.darkTheme ? 'light' : 'dark'), ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
269
+ isSidebarActive = computed(() => this.layoutState().overlayMenuActive || this.layoutState().staticMenuMobileActive, ...(ngDevMode ? [{ debugName: "isSidebarActive" }] : /* istanbul ignore next */ []));
270
+ isDarkTheme = computed(() => this.layoutConfig().darkTheme, ...(ngDevMode ? [{ debugName: "isDarkTheme" }] : /* istanbul ignore next */ []));
271
+ getPrimary = computed(() => this.layoutConfig().primary, ...(ngDevMode ? [{ debugName: "getPrimary" }] : /* istanbul ignore next */ []));
272
+ getSurface = computed(() => this.layoutConfig().surface, ...(ngDevMode ? [{ debugName: "getSurface" }] : /* istanbul ignore next */ []));
273
+ isOverlay = computed(() => this.layoutConfig().menuMode === 'overlay', ...(ngDevMode ? [{ debugName: "isOverlay" }] : /* istanbul ignore next */ []));
274
+ transitionComplete = signal(false, ...(ngDevMode ? [{ debugName: "transitionComplete" }] : /* istanbul ignore next */ []));
110
275
  initialized = false;
111
276
  constructor() {
112
277
  effect(() => {
@@ -190,10 +355,10 @@ class LayoutService {
190
355
  reset() {
191
356
  this.resetSource.next(true);
192
357
  }
193
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
194
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LayoutService, providedIn: 'root' });
358
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
359
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutService, providedIn: 'root' });
195
360
  }
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LayoutService, decorators: [{
361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutService, decorators: [{
197
362
  type: Injectable,
198
363
  args: [{
199
364
  providedIn: 'root'
@@ -212,7 +377,7 @@ class AppConfigurator {
212
377
  platformId = inject(PLATFORM_ID);
213
378
  primeNG = inject(PrimeNG);
214
379
  presets = Object.keys(presets);
215
- showMenuModeButton = signal(!this.router.url.includes('auth'), ...(ngDevMode ? [{ debugName: "showMenuModeButton" }] : []));
380
+ showMenuModeButton = signal(!this.router.url.includes('auth'), ...(ngDevMode ? [{ debugName: "showMenuModeButton" }] : /* istanbul ignore next */ []));
216
381
  menuModeOptions = [
217
382
  { label: 'Static', value: 'static' },
218
383
  { label: 'Overlay', value: 'overlay' }
@@ -363,10 +528,10 @@ class AppConfigurator {
363
528
  ];
364
529
  selectedPrimaryColor = computed(() => {
365
530
  return this.layoutService.layoutConfig().primary;
366
- }, ...(ngDevMode ? [{ debugName: "selectedPrimaryColor" }] : []));
367
- selectedSurfaceColor = computed(() => this.layoutService.layoutConfig().surface, ...(ngDevMode ? [{ debugName: "selectedSurfaceColor" }] : []));
368
- selectedPreset = computed(() => this.layoutService.layoutConfig().preset, ...(ngDevMode ? [{ debugName: "selectedPreset" }] : []));
369
- menuMode = computed(() => this.layoutService.layoutConfig().menuMode, ...(ngDevMode ? [{ debugName: "menuMode" }] : []));
531
+ }, ...(ngDevMode ? [{ debugName: "selectedPrimaryColor" }] : /* istanbul ignore next */ []));
532
+ selectedSurfaceColor = computed(() => this.layoutService.layoutConfig().surface, ...(ngDevMode ? [{ debugName: "selectedSurfaceColor" }] : /* istanbul ignore next */ []));
533
+ selectedPreset = computed(() => this.layoutService.layoutConfig().preset, ...(ngDevMode ? [{ debugName: "selectedPreset" }] : /* istanbul ignore next */ []));
534
+ menuMode = computed(() => this.layoutService.layoutConfig().menuMode, ...(ngDevMode ? [{ debugName: "menuMode" }] : /* istanbul ignore next */ []));
370
535
  primaryColors = computed(() => {
371
536
  const presetPalette = presets[this.layoutService.layoutConfig().preset].primitive;
372
537
  const colors = ['emerald', 'green', 'lime', 'orange', 'amber', 'yellow', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose'];
@@ -378,7 +543,7 @@ class AppConfigurator {
378
543
  });
379
544
  });
380
545
  return palettes;
381
- }, ...(ngDevMode ? [{ debugName: "primaryColors" }] : []));
546
+ }, ...(ngDevMode ? [{ debugName: "primaryColors" }] : /* istanbul ignore next */ []));
382
547
  getPresetExt() {
383
548
  const color = this.primaryColors().find((c) => c.name === this.selectedPrimaryColor()) || {};
384
549
  const preset = this.layoutService.layoutConfig().preset;
@@ -535,8 +700,8 @@ class AppConfigurator {
535
700
  onMenuModeChange(event) {
536
701
  this.layoutService.layoutConfig.update((prev) => ({ ...prev, menuMode: event }));
537
702
  }
538
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppConfigurator, deps: [], target: i0.ɵɵFactoryTarget.Component });
539
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", 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: `
703
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppConfigurator, deps: [], target: i0.ɵɵFactoryTarget.Component });
704
+ 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: `
540
705
  <div class="flex flex-col gap-4">
541
706
  <div>
542
707
  <span class="text-sm text-muted-color font-semibold">Primary</span>
@@ -585,7 +750,7 @@ class AppConfigurator {
585
750
  </div>
586
751
  `, 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: "ngmodule", type: SelectButtonModule }, { kind: "component", type: i3$1.SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "styleClass", "ariaLabelledBy", "dataKey", "autofocus", "size", "fluid"], outputs: ["onOptionClick", "onChange"] }] });
587
752
  }
588
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppConfigurator, decorators: [{
753
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppConfigurator, decorators: [{
589
754
  type: Component,
590
755
  args: [{
591
756
  selector: 'app-configurator',
@@ -662,10 +827,10 @@ class InjectComponentService {
662
827
  getComponent(key) {
663
828
  return this.componentRefs.get(key);
664
829
  }
665
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InjectComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
666
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InjectComponentService, providedIn: 'root' });
830
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InjectComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
831
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InjectComponentService, providedIn: 'root' });
667
832
  }
668
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InjectComponentService, decorators: [{
833
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InjectComponentService, decorators: [{
669
834
  type: Injectable,
670
835
  args: [{
671
836
  providedIn: 'root'
@@ -724,10 +889,10 @@ class ComponentInjectorDirective {
724
889
  ngOnDestroy() {
725
890
  this.removeComp();
726
891
  }
727
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ComponentInjectorDirective, deps: [{ token: i0.ViewContainerRef }, { token: InjectComponentService }], target: i0.ɵɵFactoryTarget.Directive });
728
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.1", type: ComponentInjectorDirective, isStandalone: true, selector: "ng-template[componentInjector]", inputs: { componentInjector: "componentInjector", context: "context" }, outputs: { componentCreated: "componentCreated" }, ngImport: i0 });
892
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ComponentInjectorDirective, deps: [{ token: i0.ViewContainerRef }, { token: InjectComponentService }], target: i0.ɵɵFactoryTarget.Directive });
893
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.5", type: ComponentInjectorDirective, isStandalone: true, selector: "ng-template[componentInjector]", inputs: { componentInjector: "componentInjector", context: "context" }, outputs: { componentCreated: "componentCreated" }, ngImport: i0 });
729
894
  }
730
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ComponentInjectorDirective, decorators: [{
895
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ComponentInjectorDirective, decorators: [{
731
896
  type: Directive,
732
897
  args: [{
733
898
  selector: 'ng-template[componentInjector]',
@@ -747,7 +912,7 @@ class SmzLayoutLogging {
747
912
  production: false,
748
913
  level: 'debug',
749
914
  restrictedScopes: []
750
- }, ...(ngDevMode ? [{ debugName: "logging" }] : []));
915
+ }, ...(ngDevMode ? [{ debugName: "logging" }] : /* istanbul ignore next */ []));
751
916
  setConfig(config) {
752
917
  const { logging } = config || {};
753
918
  if (logging) {
@@ -755,10 +920,10 @@ class SmzLayoutLogging {
755
920
  }
756
921
  ;
757
922
  }
758
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzLayoutLogging, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
759
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzLayoutLogging, providedIn: 'root' });
923
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzLayoutLogging, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
924
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzLayoutLogging, providedIn: 'root' });
760
925
  }
761
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzLayoutLogging, decorators: [{
926
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzLayoutLogging, decorators: [{
762
927
  type: Injectable,
763
928
  args: [{ providedIn: 'root' }]
764
929
  }] });
@@ -782,13 +947,13 @@ function provideSmzLayoutLogging(initializers) {
782
947
  // logging.service.ts
783
948
  class LoggingService {
784
949
  configFn = inject(SMZ_LAYOUT_LOGGING_CONFIG).logging;
785
- enabled = signal(this.configFn().enabled, ...(ngDevMode ? [{ debugName: "enabled" }] : []));
950
+ enabled = signal(this.configFn().enabled, ...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
786
951
  // nível de each log: debug=0, info=1, warn=2, error=3
787
952
  levelRank = { debug: 0, info: 1, warn: 2, error: 3 };
788
953
  /** expose current settings */
789
- isEnabled = computed(() => this.enabled(), ...(ngDevMode ? [{ debugName: "isEnabled" }] : []));
790
- currentLevel = computed(() => this.configFn().level ?? 'debug', ...(ngDevMode ? [{ debugName: "currentLevel" }] : []));
791
- activeScopes = computed(() => this.configFn().restrictedScopes ?? [], ...(ngDevMode ? [{ debugName: "activeScopes" }] : []));
954
+ isEnabled = computed(() => this.enabled(), ...(ngDevMode ? [{ debugName: "isEnabled" }] : /* istanbul ignore next */ []));
955
+ currentLevel = computed(() => this.configFn().level ?? 'debug', ...(ngDevMode ? [{ debugName: "currentLevel" }] : /* istanbul ignore next */ []));
956
+ activeScopes = computed(() => this.configFn().restrictedScopes ?? [], ...(ngDevMode ? [{ debugName: "activeScopes" }] : /* istanbul ignore next */ []));
792
957
  /** toggle logging global */
793
958
  enable() { this.enabled.set(true); }
794
959
  disable() { this.enabled.set(false); }
@@ -865,10 +1030,10 @@ class LoggingService {
865
1030
  }
866
1031
  };
867
1032
  }
868
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoggingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
869
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoggingService, providedIn: 'root' });
1033
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoggingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1034
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoggingService, providedIn: 'root' });
870
1035
  }
871
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoggingService, decorators: [{
1036
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoggingService, decorators: [{
872
1037
  type: Injectable,
873
1038
  args: [{ providedIn: 'root' }]
874
1039
  }] });
@@ -884,9 +1049,9 @@ var LoggingScope;
884
1049
  class NavigationService {
885
1050
  router = inject(Router);
886
1051
  location = inject(Location);
887
- history = signal(['/'], ...(ngDevMode ? [{ debugName: "history" }] : []));
888
- isPopping = signal(false, ...(ngDevMode ? [{ debugName: "isPopping" }] : []));
889
- canGoBack = computed(() => this.history().length > 1, ...(ngDevMode ? [{ debugName: "canGoBack" }] : []));
1052
+ history = signal(['/'], ...(ngDevMode ? [{ debugName: "history" }] : /* istanbul ignore next */ []));
1053
+ isPopping = signal(false, ...(ngDevMode ? [{ debugName: "isPopping" }] : /* istanbul ignore next */ []));
1054
+ canGoBack = computed(() => this.history().length > 1, ...(ngDevMode ? [{ debugName: "canGoBack" }] : /* istanbul ignore next */ []));
890
1055
  loggingService = inject(LoggingService);
891
1056
  logger = this.loggingService.scoped(LoggingScope.NavigationService);
892
1057
  constructor() {
@@ -952,10 +1117,10 @@ class NavigationService {
952
1117
  });
953
1118
  this.location.back();
954
1119
  }
955
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
956
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NavigationService, providedIn: 'root' });
1120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1121
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NavigationService, providedIn: 'root' });
957
1122
  }
958
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NavigationService, decorators: [{
1123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NavigationService, decorators: [{
959
1124
  type: Injectable,
960
1125
  args: [{ providedIn: 'root' }]
961
1126
  }], ctorParameters: () => [] });
@@ -965,11 +1130,11 @@ class PageTitleService {
965
1130
  loggingService = inject(LoggingService);
966
1131
  logger = this.loggingService.scoped(LoggingScope.PageTitleService);
967
1132
  // signal que guarda o título (ou null)
968
- titleSignal = signal(null, ...(ngDevMode ? [{ debugName: "titleSignal" }] : []));
1133
+ titleSignal = signal(null, ...(ngDevMode ? [{ debugName: "titleSignal" }] : /* istanbul ignore next */ []));
969
1134
  // string pura para template ('' quando null)
970
- title = computed(() => this.titleSignal() ?? '', ...(ngDevMode ? [{ debugName: "title" }] : []));
1135
+ title = computed(() => this.titleSignal() ?? '', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
971
1136
  // boolean para visibilidade (false quando null)
972
- hasTitle = computed(() => this.titleSignal() !== null, ...(ngDevMode ? [{ debugName: "hasTitle" }] : []));
1137
+ hasTitle = computed(() => this.titleSignal() !== null, ...(ngDevMode ? [{ debugName: "hasTitle" }] : /* istanbul ignore next */ []));
973
1138
  constructor() {
974
1139
  // toda vez que uma navegação termina, atualiza o título
975
1140
  this.router.events
@@ -994,10 +1159,10 @@ class PageTitleService {
994
1159
  : null;
995
1160
  this.titleSignal.set(title);
996
1161
  }
997
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PageTitleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
998
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PageTitleService, providedIn: 'root' });
1162
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PageTitleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1163
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PageTitleService, providedIn: 'root' });
999
1164
  }
1000
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PageTitleService, decorators: [{
1165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PageTitleService, decorators: [{
1001
1166
  type: Injectable,
1002
1167
  args: [{ providedIn: 'root' }]
1003
1168
  }], ctorParameters: () => [] });
@@ -1014,8 +1179,8 @@ class AppTopbar {
1014
1179
  handleMissingImage(event, placeholder) {
1015
1180
  event.target.src = placeholder;
1016
1181
  }
1017
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppTopbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
1018
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: AppTopbar, isStandalone: true, selector: "app-topbar", ngImport: i0, template: `
1182
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppTopbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
1183
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppTopbar, isStandalone: true, selector: "app-topbar", ngImport: i0, template: `
1019
1184
  @if (data(); as topbar) {
1020
1185
  <div class="layout-topbar">
1021
1186
  <div class="layout-topbar-logo-container">
@@ -1100,7 +1265,7 @@ class AppTopbar {
1100
1265
  </div>
1101
1266
  }`, 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: "ngmodule", type: StyleClassModule }, { kind: "directive", type: i3$2.StyleClass, selector: "[pStyleClass]", inputs: ["pStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass", "hideOnEscape", "hideOnResize", "resizeSelector"] }, { kind: "component", type: AppConfigurator, selector: "app-configurator" }, { kind: "directive", type: ComponentInjectorDirective, selector: "ng-template[componentInjector]", inputs: ["componentInjector", "context"], outputs: ["componentCreated"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: i5.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex", "appendTo", "motionOptions"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "ngmodule", type: ButtonModule }] });
1102
1267
  }
1103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppTopbar, decorators: [{
1268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppTopbar, decorators: [{
1104
1269
  type: Component,
1105
1270
  args: [{
1106
1271
  selector: 'app-topbar',
@@ -1200,7 +1365,6 @@ class AppMenuitem {
1200
1365
  index;
1201
1366
  root;
1202
1367
  parentKey;
1203
- hasClaim = inject(SMZ_UI_LAYOUT_CONFIG).hasClaim;
1204
1368
  active = false;
1205
1369
  menuSourceSubscription;
1206
1370
  menuResetSubscription;
@@ -1271,8 +1435,8 @@ class AppMenuitem {
1271
1435
  this.menuResetSubscription.unsubscribe();
1272
1436
  }
1273
1437
  }
1274
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppMenuitem, deps: [{ token: i1.Router }, { token: LayoutService }], target: i0.ɵɵFactoryTarget.Component });
1275
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", 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: `
1438
+ 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 });
1439
+ 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: `
1276
1440
  <ng-container>
1277
1441
  @if (root && item.visible !== false) {
1278
1442
  <div class="layout-menuitem-root-text">{{ item.label }}</div>
@@ -1315,7 +1479,7 @@ class AppMenuitem {
1315
1479
  @if (item.items && item.visible !== false) {
1316
1480
  <ul [@children]="submenuAnimation">
1317
1481
  @for (child of item.items; track child; let i = $index) {
1318
- @if (hasClaim(child['claims'])) {
1482
+ @if (child.visible !== false) {
1319
1483
  <li app-menuitem [item]="child" [index]="i" [parentKey]="key" [class]="child['badgeClass']"></li>
1320
1484
  }
1321
1485
  }
@@ -1334,7 +1498,7 @@ class AppMenuitem {
1334
1498
  ])
1335
1499
  ] });
1336
1500
  }
1337
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppMenuitem, decorators: [{
1501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppMenuitem, decorators: [{
1338
1502
  type: Component,
1339
1503
  args: [{
1340
1504
  // eslint-disable-next-line @angular-eslint/component-selector
@@ -1383,7 +1547,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1383
1547
  @if (item.items && item.visible !== false) {
1384
1548
  <ul [@children]="submenuAnimation">
1385
1549
  @for (child of item.items; track child; let i = $index) {
1386
- @if (hasClaim(child['claims'])) {
1550
+ @if (child.visible !== false) {
1387
1551
  <li app-menuitem [item]="child" [index]="i" [parentKey]="key" [class]="child['badgeClass']"></li>
1388
1552
  }
1389
1553
  }
@@ -1421,12 +1585,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1421
1585
  }] } });
1422
1586
 
1423
1587
  class AppMenu {
1424
- model = inject(SMZ_UI_LAYOUT_CONFIG).sidebar;
1425
- hasClaim = inject(SMZ_UI_LAYOUT_CONFIG).hasClaim;
1426
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
1427
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: AppMenu, isStandalone: true, selector: "app-menu", ngImport: i0, template: `<ul class="layout-menu">
1588
+ model = inject(SmzUILayout).sidebar;
1589
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
1590
+ 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">
1428
1591
  @for (item of model(); track item; let i = $index) {
1429
- @if (!item.separator && hasClaim(item['claims'])) {
1592
+ @if (!item.separator && item.visible !== false) {
1430
1593
  <li app-menuitem [item]="item" [index]="i" [root]="true"></li>
1431
1594
  }
1432
1595
  @if (item.separator) {
@@ -1435,7 +1598,7 @@ class AppMenu {
1435
1598
  }
1436
1599
  </ul>`, isInline: true, dependencies: [{ kind: "component", type: AppMenuitem, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey"] }, { kind: "ngmodule", type: RouterModule }] });
1437
1600
  }
1438
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppMenu, decorators: [{
1601
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppMenu, decorators: [{
1439
1602
  type: Component,
1440
1603
  args: [{
1441
1604
  selector: 'app-menu',
@@ -1443,7 +1606,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1443
1606
  imports: [AppMenuitem, RouterModule],
1444
1607
  template: `<ul class="layout-menu">
1445
1608
  @for (item of model(); track item; let i = $index) {
1446
- @if (!item.separator && hasClaim(item['claims'])) {
1609
+ @if (!item.separator && item.visible !== false) {
1447
1610
  <li app-menuitem [item]="item" [index]="i" [root]="true"></li>
1448
1611
  }
1449
1612
  @if (item.separator) {
@@ -1459,12 +1622,12 @@ class AppSidebar {
1459
1622
  constructor(el) {
1460
1623
  this.el = el;
1461
1624
  }
1462
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppSidebar, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1463
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: AppSidebar, isStandalone: true, selector: "app-sidebar", ngImport: i0, template: ` <div class="layout-sidebar">
1625
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppSidebar, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1626
+ 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">
1464
1627
  <app-menu></app-menu>
1465
1628
  </div>`, isInline: true, dependencies: [{ kind: "component", type: AppMenu, selector: "app-menu" }] });
1466
1629
  }
1467
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppSidebar, decorators: [{
1630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppSidebar, decorators: [{
1468
1631
  type: Component,
1469
1632
  args: [{
1470
1633
  selector: 'app-sidebar',
@@ -1479,8 +1642,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1479
1642
  class AppFooter {
1480
1643
  data = inject(SMZ_UI_LAYOUT_CONFIG).footer;
1481
1644
  layoutService = inject(LayoutService);
1482
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
1483
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: AppFooter, isStandalone: true, selector: "app-footer", ngImport: i0, template: `
1645
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
1646
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AppFooter, isStandalone: true, selector: "app-footer", ngImport: i0, template: `
1484
1647
  @if (data(); as footer) {
1485
1648
  <div class="flex items-center justify-between px-0 py-4 gap-4 border-t border-surface-border">
1486
1649
  @if (footer.leftLogoPath?.light && !layoutService.isDarkTheme()) {
@@ -1506,7 +1669,7 @@ class AppFooter {
1506
1669
  }
1507
1670
  `, isInline: true });
1508
1671
  }
1509
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppFooter, decorators: [{
1672
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppFooter, decorators: [{
1510
1673
  type: Component,
1511
1674
  args: [{
1512
1675
  standalone: true,
@@ -1615,8 +1778,8 @@ class AppLayout {
1615
1778
  this.menuOutsideClickListener();
1616
1779
  }
1617
1780
  }
1618
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppLayout, deps: [{ token: LayoutService }, { token: i0.Renderer2 }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
1619
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", 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">
1781
+ 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 });
1782
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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">
1620
1783
  <app-topbar></app-topbar>
1621
1784
  <app-sidebar></app-sidebar>
1622
1785
  <div class="layout-main-container">
@@ -1628,7 +1791,7 @@ class AppLayout {
1628
1791
  <div class="layout-mask animate-fadein"></div>
1629
1792
  </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" }] });
1630
1793
  }
1631
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppLayout, decorators: [{
1794
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppLayout, decorators: [{
1632
1795
  type: Component,
1633
1796
  args: [{
1634
1797
  selector: 'app-layout',
@@ -1656,12 +1819,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1656
1819
 
1657
1820
  class AppFloatingConfigurator {
1658
1821
  LayoutService = inject(LayoutService);
1659
- isDarkTheme = computed(() => this.LayoutService.layoutConfig().darkTheme, ...(ngDevMode ? [{ debugName: "isDarkTheme" }] : []));
1822
+ isDarkTheme = computed(() => this.LayoutService.layoutConfig().darkTheme, ...(ngDevMode ? [{ debugName: "isDarkTheme" }] : /* istanbul ignore next */ []));
1660
1823
  toggleDarkMode() {
1661
1824
  this.LayoutService.layoutConfig.update((state) => ({ ...state, darkTheme: !state.darkTheme }));
1662
1825
  }
1663
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppFloatingConfigurator, deps: [], target: i0.ɵɵFactoryTarget.Component });
1664
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: AppFloatingConfigurator, isStandalone: true, selector: "app-floating-configurator", ngImport: i0, template: `
1826
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppFloatingConfigurator, deps: [], target: i0.ɵɵFactoryTarget.Component });
1827
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: AppFloatingConfigurator, isStandalone: true, selector: "app-floating-configurator", ngImport: i0, template: `
1665
1828
  <div class="fixed flex gap-4 top-8 right-8">
1666
1829
  <p-button type="button" (onClick)="toggleDarkMode()" [rounded]="true" [icon]="isDarkTheme() ? 'pi pi-moon' : 'pi pi-sun'" severity="secondary" />
1667
1830
  <div class="relative">
@@ -1671,7 +1834,7 @@ class AppFloatingConfigurator {
1671
1834
  </div>
1672
1835
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: StyleClassModule }, { kind: "directive", type: i3$2.StyleClass, selector: "[pStyleClass]", inputs: ["pStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass", "hideOnEscape", "hideOnResize", "resizeSelector"] }, { kind: "component", type: AppConfigurator, selector: "app-configurator" }] });
1673
1836
  }
1674
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppFloatingConfigurator, decorators: [{
1837
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AppFloatingConfigurator, decorators: [{
1675
1838
  type: Component,
1676
1839
  args: [{
1677
1840
  selector: 'app-floating-configurator',
@@ -1736,7 +1899,7 @@ class ErrorPagesConfigService {
1736
1899
  },
1737
1900
  ]
1738
1901
  }
1739
- }, ...(ngDevMode ? [{ debugName: "config" }] : []));
1902
+ }, ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
1740
1903
  // Método para atualizar dinamicamente a configuração de forma merge
1741
1904
  updateConfig(newConfig) {
1742
1905
  this.config.update((currentConfig) => ({
@@ -1748,18 +1911,18 @@ class ErrorPagesConfigService {
1748
1911
  error: { ...currentConfig.error, ...newConfig.error }
1749
1912
  }));
1750
1913
  }
1751
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorPagesConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1752
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorPagesConfigService, providedIn: 'root' });
1914
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ErrorPagesConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1915
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ErrorPagesConfigService, providedIn: 'root' });
1753
1916
  }
1754
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorPagesConfigService, decorators: [{
1917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ErrorPagesConfigService, decorators: [{
1755
1918
  type: Injectable,
1756
1919
  args: [{ providedIn: 'root' }]
1757
1920
  }] });
1758
1921
 
1759
1922
  class AccessPageComponent {
1760
1923
  config = inject(ErrorPagesConfigService).config();
1761
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AccessPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1762
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: AccessPageComponent, isStandalone: true, selector: "app-access", ngImport: i0, template: `
1924
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AccessPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1925
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AccessPageComponent, isStandalone: true, selector: "app-access", ngImport: i0, template: `
1763
1926
  <div class="relative m-0 grid h-screen w-screen items-center justify-center overflow-hidden p-0">
1764
1927
 
1765
1928
  <div class="grid justify-center items-center col-12 lg:col-6 grid-nogutter h-full bg-surface-ground">
@@ -1781,7 +1944,7 @@ class AccessPageComponent {
1781
1944
  </div>
1782
1945
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { 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: RippleModule }] });
1783
1946
  }
1784
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AccessPageComponent, decorators: [{
1947
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AccessPageComponent, decorators: [{
1785
1948
  type: Component,
1786
1949
  args: [{
1787
1950
  selector: 'app-access',
@@ -1813,8 +1976,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1813
1976
 
1814
1977
  class ErrorPageComponent {
1815
1978
  config = inject(ErrorPagesConfigService).config();
1816
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1817
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: ErrorPageComponent, isStandalone: true, selector: "app-error", ngImport: i0, template: `
1979
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ErrorPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1980
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: ErrorPageComponent, isStandalone: true, selector: "app-error", ngImport: i0, template: `
1818
1981
  <div class="relative m-0 grid h-screen w-screen items-center justify-center overflow-hidden p-0">
1819
1982
 
1820
1983
  <div class="grid justify-center items-center col-12 lg:col-6 grid-nogutter h-full bg-surface-ground">
@@ -1836,7 +1999,7 @@ class ErrorPageComponent {
1836
1999
  </div>
1837
2000
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: RippleModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
1838
2001
  }
1839
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorPageComponent, decorators: [{
2002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ErrorPageComponent, decorators: [{
1840
2003
  type: Component,
1841
2004
  args: [{
1842
2005
  selector: 'app-error',
@@ -1868,8 +2031,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1868
2031
 
1869
2032
  class NotfoundPageComponent {
1870
2033
  config = inject(ErrorPagesConfigService).config();
1871
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotfoundPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1872
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: NotfoundPageComponent, isStandalone: true, selector: "app-notfound", ngImport: i0, template: `
2034
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotfoundPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2035
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: NotfoundPageComponent, isStandalone: true, selector: "app-notfound", ngImport: i0, template: `
1873
2036
  <div class="relative m-0 grid h-screen w-screen items-center justify-center overflow-hidden p-0">
1874
2037
 
1875
2038
  <div class="grid justify-center items-center col-12 lg:col-6 grid-nogutter h-full bg-surface-ground">
@@ -1921,7 +2084,7 @@ class NotfoundPageComponent {
1921
2084
  </div>
1922
2085
  `, 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: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: RippleModule }] });
1923
2086
  }
1924
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotfoundPageComponent, decorators: [{
2087
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotfoundPageComponent, decorators: [{
1925
2088
  type: Component,
1926
2089
  args: [{
1927
2090
  selector: 'app-notfound',
@@ -1995,5 +2158,5 @@ const ErrorsRoutes = [
1995
2158
  * Generated bundle index. Do not edit.
1996
2159
  */
1997
2160
 
1998
- export { AccessPageComponent, AppFloatingConfigurator, AppLayout, ErrorPageComponent, ErrorPagesConfigService, ErrorsRoutes, LayoutService, LoggingScope, LoggingService, NotfoundPageComponent, SMZ_LAYOUT_LOGGING_CONFIG, SMZ_UI_LAYOUT_CONFIG, SmzLayoutLogging, SmzUILayout, provideSmzLayoutLogging, provideSmzUILayout };
2161
+ export { AccessPageComponent, AppFloatingConfigurator, AppLayout, ErrorPageComponent, ErrorPagesConfigService, ErrorsRoutes, LayoutService, LoggingScope, LoggingService, NotfoundPageComponent, SMZ_LAYOUT_LOGGING_CONFIG, SMZ_UI_LAYOUT_CONFIG, SmzLayoutLogging, SmzUILayout, SmzUILayoutProvisionBuilder, configureSmzUILayout, provideSmzLayoutLogging, provideSmzUILayout };
1999
2162
  //# sourceMappingURL=ngx-smz-layout.mjs.map