@ngx-smz/layout 21.1.4 → 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,70 +27,231 @@ 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 = (claims) => false;
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
- ;
58
89
  if (footer) {
59
90
  this.footer = footer;
60
91
  }
61
- ;
62
92
  if (topbar) {
63
93
  this.topbar = topbar;
64
94
  }
65
- ;
66
- if (hasClaim) {
67
- this.hasClaim = hasClaim;
68
- }
69
- ;
70
95
  }
71
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzUILayout, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
72
- 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' });
73
98
  }
74
- 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: [{
75
100
  type: Injectable,
76
101
  args: [{ providedIn: 'root' }]
77
102
  }] });
78
103
 
79
104
  const SMZ_UI_LAYOUT_CONFIG = new InjectionToken('SMZ_UI_LAYOUT_CONFIG');
80
- function provideSmzUILayout(initializers) {
81
- const features = initializers();
105
+ function createSmzUILayoutEnvironmentProviders(features, resolveHasClaim) {
82
106
  const providers = features?.map((feature) => ({
83
107
  provide: SMZ_UI_LAYOUT_CONFIG,
84
108
  useValue: feature,
85
109
  multi: false
86
110
  }));
87
111
  const initializer = provideAppInitializer(() => {
88
- const SmzUILayoutConfig = inject(SmzUILayout);
89
- 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
+ }
90
119
  return;
91
120
  });
92
121
  return makeEnvironmentProviders([...providers, initializer]);
93
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
+ }
94
255
 
95
256
  class LayoutService {
96
257
  config = inject(SMZ_UI_LAYOUT_CONFIG);
@@ -104,13 +265,13 @@ class LayoutService {
104
265
  resetSource$ = this.resetSource.asObservable();
105
266
  configUpdate$ = this.configUpdate.asObservable();
106
267
  overlayOpen$ = this.overlayOpen.asObservable();
107
- theme = computed(() => (this.layoutConfig()?.darkTheme ? 'light' : 'dark'), ...(ngDevMode ? [{ debugName: "theme" }] : []));
108
- isSidebarActive = computed(() => this.layoutState().overlayMenuActive || this.layoutState().staticMenuMobileActive, ...(ngDevMode ? [{ debugName: "isSidebarActive" }] : []));
109
- isDarkTheme = computed(() => this.layoutConfig().darkTheme, ...(ngDevMode ? [{ debugName: "isDarkTheme" }] : []));
110
- getPrimary = computed(() => this.layoutConfig().primary, ...(ngDevMode ? [{ debugName: "getPrimary" }] : []));
111
- getSurface = computed(() => this.layoutConfig().surface, ...(ngDevMode ? [{ debugName: "getSurface" }] : []));
112
- isOverlay = computed(() => this.layoutConfig().menuMode === 'overlay', ...(ngDevMode ? [{ debugName: "isOverlay" }] : []));
113
- 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 */ []));
114
275
  initialized = false;
115
276
  constructor() {
116
277
  effect(() => {
@@ -194,10 +355,10 @@ class LayoutService {
194
355
  reset() {
195
356
  this.resetSource.next(true);
196
357
  }
197
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
198
- 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' });
199
360
  }
200
- 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: [{
201
362
  type: Injectable,
202
363
  args: [{
203
364
  providedIn: 'root'
@@ -216,7 +377,7 @@ class AppConfigurator {
216
377
  platformId = inject(PLATFORM_ID);
217
378
  primeNG = inject(PrimeNG);
218
379
  presets = Object.keys(presets);
219
- showMenuModeButton = signal(!this.router.url.includes('auth'), ...(ngDevMode ? [{ debugName: "showMenuModeButton" }] : []));
380
+ showMenuModeButton = signal(!this.router.url.includes('auth'), ...(ngDevMode ? [{ debugName: "showMenuModeButton" }] : /* istanbul ignore next */ []));
220
381
  menuModeOptions = [
221
382
  { label: 'Static', value: 'static' },
222
383
  { label: 'Overlay', value: 'overlay' }
@@ -367,10 +528,10 @@ class AppConfigurator {
367
528
  ];
368
529
  selectedPrimaryColor = computed(() => {
369
530
  return this.layoutService.layoutConfig().primary;
370
- }, ...(ngDevMode ? [{ debugName: "selectedPrimaryColor" }] : []));
371
- selectedSurfaceColor = computed(() => this.layoutService.layoutConfig().surface, ...(ngDevMode ? [{ debugName: "selectedSurfaceColor" }] : []));
372
- selectedPreset = computed(() => this.layoutService.layoutConfig().preset, ...(ngDevMode ? [{ debugName: "selectedPreset" }] : []));
373
- 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 */ []));
374
535
  primaryColors = computed(() => {
375
536
  const presetPalette = presets[this.layoutService.layoutConfig().preset].primitive;
376
537
  const colors = ['emerald', 'green', 'lime', 'orange', 'amber', 'yellow', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose'];
@@ -382,7 +543,7 @@ class AppConfigurator {
382
543
  });
383
544
  });
384
545
  return palettes;
385
- }, ...(ngDevMode ? [{ debugName: "primaryColors" }] : []));
546
+ }, ...(ngDevMode ? [{ debugName: "primaryColors" }] : /* istanbul ignore next */ []));
386
547
  getPresetExt() {
387
548
  const color = this.primaryColors().find((c) => c.name === this.selectedPrimaryColor()) || {};
388
549
  const preset = this.layoutService.layoutConfig().preset;
@@ -539,8 +700,8 @@ class AppConfigurator {
539
700
  onMenuModeChange(event) {
540
701
  this.layoutService.layoutConfig.update((prev) => ({ ...prev, menuMode: event }));
541
702
  }
542
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppConfigurator, deps: [], target: i0.ɵɵFactoryTarget.Component });
543
- 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: `
544
705
  <div class="flex flex-col gap-4">
545
706
  <div>
546
707
  <span class="text-sm text-muted-color font-semibold">Primary</span>
@@ -589,7 +750,7 @@ class AppConfigurator {
589
750
  </div>
590
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"] }] });
591
752
  }
592
- 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: [{
593
754
  type: Component,
594
755
  args: [{
595
756
  selector: 'app-configurator',
@@ -666,10 +827,10 @@ class InjectComponentService {
666
827
  getComponent(key) {
667
828
  return this.componentRefs.get(key);
668
829
  }
669
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InjectComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
670
- 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' });
671
832
  }
672
- 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: [{
673
834
  type: Injectable,
674
835
  args: [{
675
836
  providedIn: 'root'
@@ -728,10 +889,10 @@ class ComponentInjectorDirective {
728
889
  ngOnDestroy() {
729
890
  this.removeComp();
730
891
  }
731
- 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 });
732
- 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 });
733
894
  }
734
- 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: [{
735
896
  type: Directive,
736
897
  args: [{
737
898
  selector: 'ng-template[componentInjector]',
@@ -751,7 +912,7 @@ class SmzLayoutLogging {
751
912
  production: false,
752
913
  level: 'debug',
753
914
  restrictedScopes: []
754
- }, ...(ngDevMode ? [{ debugName: "logging" }] : []));
915
+ }, ...(ngDevMode ? [{ debugName: "logging" }] : /* istanbul ignore next */ []));
755
916
  setConfig(config) {
756
917
  const { logging } = config || {};
757
918
  if (logging) {
@@ -759,10 +920,10 @@ class SmzLayoutLogging {
759
920
  }
760
921
  ;
761
922
  }
762
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzLayoutLogging, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
763
- 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' });
764
925
  }
765
- 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: [{
766
927
  type: Injectable,
767
928
  args: [{ providedIn: 'root' }]
768
929
  }] });
@@ -786,13 +947,13 @@ function provideSmzLayoutLogging(initializers) {
786
947
  // logging.service.ts
787
948
  class LoggingService {
788
949
  configFn = inject(SMZ_LAYOUT_LOGGING_CONFIG).logging;
789
- enabled = signal(this.configFn().enabled, ...(ngDevMode ? [{ debugName: "enabled" }] : []));
950
+ enabled = signal(this.configFn().enabled, ...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
790
951
  // nível de each log: debug=0, info=1, warn=2, error=3
791
952
  levelRank = { debug: 0, info: 1, warn: 2, error: 3 };
792
953
  /** expose current settings */
793
- isEnabled = computed(() => this.enabled(), ...(ngDevMode ? [{ debugName: "isEnabled" }] : []));
794
- currentLevel = computed(() => this.configFn().level ?? 'debug', ...(ngDevMode ? [{ debugName: "currentLevel" }] : []));
795
- 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 */ []));
796
957
  /** toggle logging global */
797
958
  enable() { this.enabled.set(true); }
798
959
  disable() { this.enabled.set(false); }
@@ -869,10 +1030,10 @@ class LoggingService {
869
1030
  }
870
1031
  };
871
1032
  }
872
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoggingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
873
- 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' });
874
1035
  }
875
- 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: [{
876
1037
  type: Injectable,
877
1038
  args: [{ providedIn: 'root' }]
878
1039
  }] });
@@ -888,9 +1049,9 @@ var LoggingScope;
888
1049
  class NavigationService {
889
1050
  router = inject(Router);
890
1051
  location = inject(Location);
891
- history = signal(['/'], ...(ngDevMode ? [{ debugName: "history" }] : []));
892
- isPopping = signal(false, ...(ngDevMode ? [{ debugName: "isPopping" }] : []));
893
- 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 */ []));
894
1055
  loggingService = inject(LoggingService);
895
1056
  logger = this.loggingService.scoped(LoggingScope.NavigationService);
896
1057
  constructor() {
@@ -956,10 +1117,10 @@ class NavigationService {
956
1117
  });
957
1118
  this.location.back();
958
1119
  }
959
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
960
- 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' });
961
1122
  }
962
- 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: [{
963
1124
  type: Injectable,
964
1125
  args: [{ providedIn: 'root' }]
965
1126
  }], ctorParameters: () => [] });
@@ -969,11 +1130,11 @@ class PageTitleService {
969
1130
  loggingService = inject(LoggingService);
970
1131
  logger = this.loggingService.scoped(LoggingScope.PageTitleService);
971
1132
  // signal que guarda o título (ou null)
972
- titleSignal = signal(null, ...(ngDevMode ? [{ debugName: "titleSignal" }] : []));
1133
+ titleSignal = signal(null, ...(ngDevMode ? [{ debugName: "titleSignal" }] : /* istanbul ignore next */ []));
973
1134
  // string pura para template ('' quando null)
974
- title = computed(() => this.titleSignal() ?? '', ...(ngDevMode ? [{ debugName: "title" }] : []));
1135
+ title = computed(() => this.titleSignal() ?? '', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
975
1136
  // boolean para visibilidade (false quando null)
976
- hasTitle = computed(() => this.titleSignal() !== null, ...(ngDevMode ? [{ debugName: "hasTitle" }] : []));
1137
+ hasTitle = computed(() => this.titleSignal() !== null, ...(ngDevMode ? [{ debugName: "hasTitle" }] : /* istanbul ignore next */ []));
977
1138
  constructor() {
978
1139
  // toda vez que uma navegação termina, atualiza o título
979
1140
  this.router.events
@@ -998,10 +1159,10 @@ class PageTitleService {
998
1159
  : null;
999
1160
  this.titleSignal.set(title);
1000
1161
  }
1001
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PageTitleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1002
- 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' });
1003
1164
  }
1004
- 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: [{
1005
1166
  type: Injectable,
1006
1167
  args: [{ providedIn: 'root' }]
1007
1168
  }], ctorParameters: () => [] });
@@ -1018,8 +1179,8 @@ class AppTopbar {
1018
1179
  handleMissingImage(event, placeholder) {
1019
1180
  event.target.src = placeholder;
1020
1181
  }
1021
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppTopbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
1022
- 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: `
1023
1184
  @if (data(); as topbar) {
1024
1185
  <div class="layout-topbar">
1025
1186
  <div class="layout-topbar-logo-container">
@@ -1104,7 +1265,7 @@ class AppTopbar {
1104
1265
  </div>
1105
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 }] });
1106
1267
  }
1107
- 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: [{
1108
1269
  type: Component,
1109
1270
  args: [{
1110
1271
  selector: 'app-topbar',
@@ -1204,7 +1365,6 @@ class AppMenuitem {
1204
1365
  index;
1205
1366
  root;
1206
1367
  parentKey;
1207
- hasClaim = inject(SMZ_UI_LAYOUT_CONFIG).hasClaim;
1208
1368
  active = false;
1209
1369
  menuSourceSubscription;
1210
1370
  menuResetSubscription;
@@ -1275,8 +1435,8 @@ class AppMenuitem {
1275
1435
  this.menuResetSubscription.unsubscribe();
1276
1436
  }
1277
1437
  }
1278
- 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 });
1279
- 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: `
1280
1440
  <ng-container>
1281
1441
  @if (root && item.visible !== false) {
1282
1442
  <div class="layout-menuitem-root-text">{{ item.label }}</div>
@@ -1319,7 +1479,7 @@ class AppMenuitem {
1319
1479
  @if (item.items && item.visible !== false) {
1320
1480
  <ul [@children]="submenuAnimation">
1321
1481
  @for (child of item.items; track child; let i = $index) {
1322
- @if (hasClaim(child['claims'])) {
1482
+ @if (child.visible !== false) {
1323
1483
  <li app-menuitem [item]="child" [index]="i" [parentKey]="key" [class]="child['badgeClass']"></li>
1324
1484
  }
1325
1485
  }
@@ -1338,7 +1498,7 @@ class AppMenuitem {
1338
1498
  ])
1339
1499
  ] });
1340
1500
  }
1341
- 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: [{
1342
1502
  type: Component,
1343
1503
  args: [{
1344
1504
  // eslint-disable-next-line @angular-eslint/component-selector
@@ -1387,7 +1547,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1387
1547
  @if (item.items && item.visible !== false) {
1388
1548
  <ul [@children]="submenuAnimation">
1389
1549
  @for (child of item.items; track child; let i = $index) {
1390
- @if (hasClaim(child['claims'])) {
1550
+ @if (child.visible !== false) {
1391
1551
  <li app-menuitem [item]="child" [index]="i" [parentKey]="key" [class]="child['badgeClass']"></li>
1392
1552
  }
1393
1553
  }
@@ -1425,12 +1585,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1425
1585
  }] } });
1426
1586
 
1427
1587
  class AppMenu {
1428
- model = inject(SMZ_UI_LAYOUT_CONFIG).sidebar;
1429
- hasClaim = inject(SMZ_UI_LAYOUT_CONFIG).hasClaim;
1430
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
1431
- 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">
1432
1591
  @for (item of model(); track item; let i = $index) {
1433
- @if (!item.separator && hasClaim(item['claims'])) {
1592
+ @if (!item.separator && item.visible !== false) {
1434
1593
  <li app-menuitem [item]="item" [index]="i" [root]="true"></li>
1435
1594
  }
1436
1595
  @if (item.separator) {
@@ -1439,7 +1598,7 @@ class AppMenu {
1439
1598
  }
1440
1599
  </ul>`, isInline: true, dependencies: [{ kind: "component", type: AppMenuitem, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey"] }, { kind: "ngmodule", type: RouterModule }] });
1441
1600
  }
1442
- 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: [{
1443
1602
  type: Component,
1444
1603
  args: [{
1445
1604
  selector: 'app-menu',
@@ -1447,7 +1606,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1447
1606
  imports: [AppMenuitem, RouterModule],
1448
1607
  template: `<ul class="layout-menu">
1449
1608
  @for (item of model(); track item; let i = $index) {
1450
- @if (!item.separator && hasClaim(item['claims'])) {
1609
+ @if (!item.separator && item.visible !== false) {
1451
1610
  <li app-menuitem [item]="item" [index]="i" [root]="true"></li>
1452
1611
  }
1453
1612
  @if (item.separator) {
@@ -1463,12 +1622,12 @@ class AppSidebar {
1463
1622
  constructor(el) {
1464
1623
  this.el = el;
1465
1624
  }
1466
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppSidebar, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1467
- 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">
1468
1627
  <app-menu></app-menu>
1469
1628
  </div>`, isInline: true, dependencies: [{ kind: "component", type: AppMenu, selector: "app-menu" }] });
1470
1629
  }
1471
- 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: [{
1472
1631
  type: Component,
1473
1632
  args: [{
1474
1633
  selector: 'app-sidebar',
@@ -1483,8 +1642,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1483
1642
  class AppFooter {
1484
1643
  data = inject(SMZ_UI_LAYOUT_CONFIG).footer;
1485
1644
  layoutService = inject(LayoutService);
1486
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
1487
- 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: `
1488
1647
  @if (data(); as footer) {
1489
1648
  <div class="flex items-center justify-between px-0 py-4 gap-4 border-t border-surface-border">
1490
1649
  @if (footer.leftLogoPath?.light && !layoutService.isDarkTheme()) {
@@ -1510,7 +1669,7 @@ class AppFooter {
1510
1669
  }
1511
1670
  `, isInline: true });
1512
1671
  }
1513
- 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: [{
1514
1673
  type: Component,
1515
1674
  args: [{
1516
1675
  standalone: true,
@@ -1619,8 +1778,8 @@ class AppLayout {
1619
1778
  this.menuOutsideClickListener();
1620
1779
  }
1621
1780
  }
1622
- 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 });
1623
- 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">
1624
1783
  <app-topbar></app-topbar>
1625
1784
  <app-sidebar></app-sidebar>
1626
1785
  <div class="layout-main-container">
@@ -1632,7 +1791,7 @@ class AppLayout {
1632
1791
  <div class="layout-mask animate-fadein"></div>
1633
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" }] });
1634
1793
  }
1635
- 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: [{
1636
1795
  type: Component,
1637
1796
  args: [{
1638
1797
  selector: 'app-layout',
@@ -1660,12 +1819,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1660
1819
 
1661
1820
  class AppFloatingConfigurator {
1662
1821
  LayoutService = inject(LayoutService);
1663
- isDarkTheme = computed(() => this.LayoutService.layoutConfig().darkTheme, ...(ngDevMode ? [{ debugName: "isDarkTheme" }] : []));
1822
+ isDarkTheme = computed(() => this.LayoutService.layoutConfig().darkTheme, ...(ngDevMode ? [{ debugName: "isDarkTheme" }] : /* istanbul ignore next */ []));
1664
1823
  toggleDarkMode() {
1665
1824
  this.LayoutService.layoutConfig.update((state) => ({ ...state, darkTheme: !state.darkTheme }));
1666
1825
  }
1667
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppFloatingConfigurator, deps: [], target: i0.ɵɵFactoryTarget.Component });
1668
- 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: `
1669
1828
  <div class="fixed flex gap-4 top-8 right-8">
1670
1829
  <p-button type="button" (onClick)="toggleDarkMode()" [rounded]="true" [icon]="isDarkTheme() ? 'pi pi-moon' : 'pi pi-sun'" severity="secondary" />
1671
1830
  <div class="relative">
@@ -1675,7 +1834,7 @@ class AppFloatingConfigurator {
1675
1834
  </div>
1676
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" }] });
1677
1836
  }
1678
- 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: [{
1679
1838
  type: Component,
1680
1839
  args: [{
1681
1840
  selector: 'app-floating-configurator',
@@ -1740,7 +1899,7 @@ class ErrorPagesConfigService {
1740
1899
  },
1741
1900
  ]
1742
1901
  }
1743
- }, ...(ngDevMode ? [{ debugName: "config" }] : []));
1902
+ }, ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
1744
1903
  // Método para atualizar dinamicamente a configuração de forma merge
1745
1904
  updateConfig(newConfig) {
1746
1905
  this.config.update((currentConfig) => ({
@@ -1752,18 +1911,18 @@ class ErrorPagesConfigService {
1752
1911
  error: { ...currentConfig.error, ...newConfig.error }
1753
1912
  }));
1754
1913
  }
1755
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorPagesConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1756
- 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' });
1757
1916
  }
1758
- 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: [{
1759
1918
  type: Injectable,
1760
1919
  args: [{ providedIn: 'root' }]
1761
1920
  }] });
1762
1921
 
1763
1922
  class AccessPageComponent {
1764
1923
  config = inject(ErrorPagesConfigService).config();
1765
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AccessPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1766
- 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: `
1767
1926
  <div class="relative m-0 grid h-screen w-screen items-center justify-center overflow-hidden p-0">
1768
1927
 
1769
1928
  <div class="grid justify-center items-center col-12 lg:col-6 grid-nogutter h-full bg-surface-ground">
@@ -1785,7 +1944,7 @@ class AccessPageComponent {
1785
1944
  </div>
1786
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 }] });
1787
1946
  }
1788
- 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: [{
1789
1948
  type: Component,
1790
1949
  args: [{
1791
1950
  selector: 'app-access',
@@ -1817,8 +1976,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1817
1976
 
1818
1977
  class ErrorPageComponent {
1819
1978
  config = inject(ErrorPagesConfigService).config();
1820
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1821
- 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: `
1822
1981
  <div class="relative m-0 grid h-screen w-screen items-center justify-center overflow-hidden p-0">
1823
1982
 
1824
1983
  <div class="grid justify-center items-center col-12 lg:col-6 grid-nogutter h-full bg-surface-ground">
@@ -1840,7 +1999,7 @@ class ErrorPageComponent {
1840
1999
  </div>
1841
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"] }] });
1842
2001
  }
1843
- 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: [{
1844
2003
  type: Component,
1845
2004
  args: [{
1846
2005
  selector: 'app-error',
@@ -1872,8 +2031,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1872
2031
 
1873
2032
  class NotfoundPageComponent {
1874
2033
  config = inject(ErrorPagesConfigService).config();
1875
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotfoundPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1876
- 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: `
1877
2036
  <div class="relative m-0 grid h-screen w-screen items-center justify-center overflow-hidden p-0">
1878
2037
 
1879
2038
  <div class="grid justify-center items-center col-12 lg:col-6 grid-nogutter h-full bg-surface-ground">
@@ -1925,7 +2084,7 @@ class NotfoundPageComponent {
1925
2084
  </div>
1926
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 }] });
1927
2086
  }
1928
- 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: [{
1929
2088
  type: Component,
1930
2089
  args: [{
1931
2090
  selector: 'app-notfound',
@@ -1999,5 +2158,5 @@ const ErrorsRoutes = [
1999
2158
  * Generated bundle index. Do not edit.
2000
2159
  */
2001
2160
 
2002
- 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 };
2003
2162
  //# sourceMappingURL=ngx-smz-layout.mjs.map