@flusys/ng-layout 5.1.3 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@flusys/ng-layout",
3
- "version": "5.1.3",
3
+ "version": "5.3.0",
4
4
  "description": "Layout components for FLUSYS Angular applications",
5
5
  "license": "MIT",
6
6
  "peerDependencies": {
7
7
  "@angular/common": ">=21.0.0",
8
8
  "@angular/core": ">=21.0.0",
9
9
  "@angular/router": ">=21.0.0",
10
- "@flusys/ng-core": ">=5.1.3",
11
- "@flusys/ng-shared": ">=5.1.3",
10
+ "@flusys/ng-core": ">=5.3.0",
11
+ "@flusys/ng-shared": ">=5.3.0",
12
12
  "@primeuix/themes": ">=1.0.0",
13
13
  "primeicons": ">=7.0.0",
14
14
  "primeng": ">=21.0.0",
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { Signal, InjectionToken, Type } from '@angular/core';
3
3
  import * as rxjs from 'rxjs';
4
4
  import { Observable } from 'rxjs';
5
+ import { LayoutConfig } from '@flusys/ng-core';
5
6
  import { ILogicNode, IconTypeEnum } from '@flusys/ng-shared';
6
7
  import * as _flusys_ng_layout from '@flusys/ng-layout';
7
8
  import * as _primeuix_themes_types from '@primeuix/themes/types';
@@ -10,6 +11,7 @@ declare class AppFooter {
10
11
  private readonly layoutService;
11
12
  readonly appName: string;
12
13
  readonly displayLogo: string;
14
+ readonly isLogoSvg: boolean;
13
15
  readonly authorName: string;
14
16
  readonly authorUrl: string;
15
17
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppFooter, never>;
@@ -96,13 +98,6 @@ interface ISearchAdapter {
96
98
  }
97
99
  declare const LAYOUT_SEARCH_ADAPTER: InjectionToken<ISearchAdapter>;
98
100
 
99
- interface LayoutConfig {
100
- preset?: string;
101
- primary?: string;
102
- surface?: string | null;
103
- darkTheme?: boolean;
104
- menuMode?: 'static' | 'overlay' | 'topbar';
105
- }
106
101
  interface LayoutState {
107
102
  staticMenuDesktopInactive?: boolean;
108
103
  overlayMenuActive?: boolean;
@@ -127,7 +122,6 @@ interface CompanyProfile {
127
122
  slug: string;
128
123
  logoUrl?: string | null;
129
124
  }
130
- /** Layout configuration and state management service */
131
125
  declare class LayoutService {
132
126
  private readonly document;
133
127
  private readonly platformId;
@@ -136,6 +130,7 @@ declare class LayoutService {
136
130
  private readonly appConfig;
137
131
  private readonly DEFAULT_CONFIG;
138
132
  private readonly DEFAULT_STATE;
133
+ private readonly memorable;
139
134
  private readonly _layoutConfig;
140
135
  private readonly _layoutState;
141
136
  private readonly _transitionComplete;
@@ -151,6 +146,7 @@ declare class LayoutService {
151
146
  readonly companyProfile: _angular_core.Signal<CompanyProfile | null>;
152
147
  readonly appName: string;
153
148
  readonly appLogo: string;
149
+ readonly isAppLogoSvg: boolean;
154
150
  readonly authorName: string;
155
151
  readonly authorUrl: string;
156
152
  readonly menu: _angular_core.Signal<IMenuItem[]>;
@@ -158,8 +154,6 @@ declare class LayoutService {
158
154
  readonly hasApps: _angular_core.Signal<boolean>;
159
155
  readonly isSidebarActive: _angular_core.Signal<boolean | undefined>;
160
156
  readonly isDarkTheme: _angular_core.Signal<boolean | undefined>;
161
- readonly getPrimary: _angular_core.Signal<string | undefined>;
162
- readonly getSurface: _angular_core.Signal<string | null | undefined>;
163
157
  readonly isOverlay: _angular_core.Signal<boolean>;
164
158
  readonly isTopbar: _angular_core.Signal<boolean>;
165
159
  readonly userName: _angular_core.Signal<string>;
@@ -169,13 +163,12 @@ declare class LayoutService {
169
163
  readonly isAuthenticated: _angular_core.Signal<boolean>;
170
164
  readonly companyName: _angular_core.Signal<string>;
171
165
  readonly displayLogo: _angular_core.Signal<string>;
172
- private readonly configUpdate;
166
+ readonly isDisplayLogoSvg: _angular_core.Signal<boolean>;
173
167
  private readonly overlayOpen;
174
168
  private readonly menuSource;
175
169
  private readonly resetSource;
176
170
  readonly menuSource$: rxjs.Observable<MenuChangeEvent>;
177
171
  readonly resetSource$: rxjs.Observable<boolean>;
178
- readonly configUpdate$: rxjs.Observable<LayoutConfig>;
179
172
  readonly overlayOpen$: rxjs.Observable<void>;
180
173
  private initialized;
181
174
  constructor();
@@ -199,56 +192,14 @@ declare class LayoutService {
199
192
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<LayoutService>;
200
193
  }
201
194
 
202
- /**
203
- * Service for persisting layout configuration to localStorage.
204
- * Handles loading, saving, and validation of layout preferences with SSR-safe checks.
205
- *
206
- * @example
207
- * ```typescript
208
- * const persistence = inject(LayoutPersistenceService);
209
- *
210
- * // Load saved config
211
- * const config = persistence.load();
212
- *
213
- * // Save config
214
- * persistence.save({ darkTheme: true, preset: 'Aura' });
215
- *
216
- * // Clear saved config
217
- * persistence.clear();
218
- * ```
219
- */
220
195
  declare class LayoutPersistenceService {
221
196
  private readonly platformId;
222
197
  private readonly isBrowser;
223
198
  private readonly validPresets;
224
199
  private readonly validMenuModes;
225
- /**
226
- * Load configuration from localStorage.
227
- * Returns null if no saved config or invalid data.
228
- * SSR-safe (returns null on server).
229
- *
230
- * @returns Validated layout configuration or null
231
- */
232
200
  load(): LayoutConfig | null;
233
- /**
234
- * Save configuration to localStorage.
235
- * SSR-safe (no-op on server).
236
- *
237
- * @param config Layout configuration to save
238
- */
239
201
  save(config: LayoutConfig): void;
240
- /**
241
- * Clear stored configuration.
242
- * SSR-safe (no-op on server).
243
- */
244
202
  clear(): void;
245
- /**
246
- * Validate and sanitize configuration.
247
- * Returns null if version mismatch.
248
- *
249
- * @param config Configuration to validate
250
- * @returns Validated configuration or null
251
- */
252
203
  private validateConfig;
253
204
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<LayoutPersistenceService, never>;
254
205
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<LayoutPersistenceService>;
@@ -274,6 +225,7 @@ declare type SurfacesType = {
274
225
  declare class AppConfigurator {
275
226
  private readonly router;
276
227
  private readonly translateAdapter;
228
+ private readonly platformId;
277
229
  readonly layoutService: LayoutService;
278
230
  readonly presets: string[];
279
231
  readonly showMenuModeButton: _angular_core.WritableSignal<boolean>;
@@ -291,20 +243,7 @@ declare class AppConfigurator {
291
243
  readonly primaryColors: _angular_core.Signal<SurfacesType[]>;
292
244
  getPresetExt(): {
293
245
  semantic: {
294
- primary: {
295
- 0?: string;
296
- 50?: string;
297
- 100?: string;
298
- 200?: string;
299
- 300?: string;
300
- 400?: string;
301
- 500?: string;
302
- 600?: string;
303
- 700?: string;
304
- 800?: string;
305
- 900?: string;
306
- 950?: string;
307
- } | undefined;
246
+ primary: object;
308
247
  colorScheme: {
309
248
  light: {
310
249
  primary: {
@@ -338,7 +277,7 @@ declare class AppConfigurator {
338
277
  };
339
278
  };
340
279
  updateColors(event: MouseEvent, type: string, color: SurfacesType): void;
341
- applyTheme(type: string, color: SurfacesType): void;
280
+ private applyTheme;
342
281
  onPresetChange(event: string): void;
343
282
  onMenuModeChange(event: 'static' | 'overlay' | 'topbar'): void;
344
283
  private translate;
@@ -603,11 +542,53 @@ declare function filterAppsByPermissions(apps: ILauncherApp[], permissionCodes:
603
542
  */
604
543
  declare function filterMenuByPermissions(items: IMenuItem[], permissionCode: string[]): IMenuItem[];
605
544
 
545
+ declare function buildSemanticExt(palette: object | null, presetName: string): {
546
+ semantic: {
547
+ primary: object;
548
+ colorScheme: {
549
+ light: {
550
+ primary: {
551
+ color: string;
552
+ contrastColor: string;
553
+ hoverColor: string;
554
+ activeColor: string;
555
+ };
556
+ highlight: {
557
+ background: string;
558
+ focusBackground: string;
559
+ color: string;
560
+ focusColor: string;
561
+ };
562
+ };
563
+ dark: {
564
+ primary: {
565
+ color: string;
566
+ contrastColor: string;
567
+ hoverColor: string;
568
+ activeColor: string;
569
+ };
570
+ highlight: {
571
+ background: string;
572
+ focusBackground: string;
573
+ color: string;
574
+ focusColor: string;
575
+ };
576
+ };
577
+ };
578
+ };
579
+ };
580
+ declare function buildPreset(presetName: string, primary: string): _primeuix_themes_types.Preset;
581
+ declare function buildBootstrapPreset(envConfig?: {
582
+ preset?: string;
583
+ primary?: string;
584
+ isMemorable?: boolean;
585
+ }): _primeuix_themes_types.Preset;
586
+
606
587
  declare const NavyBlueTheme: _primeuix_themes_types.Preset;
607
588
 
608
589
  declare const GreenTheme: _primeuix_themes_types.Preset;
609
590
 
610
591
  declare const LAYOUT_MESSAGES: Record<string, string>;
611
592
 
612
- export { AppCompanyBranchSelector, AppConfigurator, AppFloatingConfigurator, AppFooter, AppLauncher, AppLayout, AppMenu, AppMenuitem, AppProfile, AppSearchbar, AppSidebar, AppTopbar, GreenTheme, LAYOUT_AUTH_API, LAYOUT_AUTH_STATE, LAYOUT_IS_RTL, LAYOUT_LANGUAGE_SELECTOR, LAYOUT_LANGUAGE_SELECTOR_PANEL, LAYOUT_MESSAGES, LAYOUT_NOTIFICATION_BELL, LAYOUT_SEARCHBAR, LAYOUT_SEARCH_ADAPTER, LayoutPersistenceService, LayoutService, NavyBlueTheme, filterAppsByPermissions, filterMenuByPermissions };
613
- export type { CompanyProfile, DocumentWithViewTransition, IBranchInfo, ICompanyInfo, ILauncherApp, ILayoutAuthApi, ILayoutAuthState, IMenuItem, ISearchAdapter, ISearchSuggestion, IUserInfo, LayoutConfig, LayoutState, MenuChangeEvent, UserProfile, ViewTransition };
593
+ export { AppCompanyBranchSelector, AppConfigurator, AppFloatingConfigurator, AppFooter, AppLauncher, AppLayout, AppMenu, AppMenuitem, AppProfile, AppSearchbar, AppSidebar, AppTopbar, GreenTheme, LAYOUT_AUTH_API, LAYOUT_AUTH_STATE, LAYOUT_IS_RTL, LAYOUT_LANGUAGE_SELECTOR, LAYOUT_LANGUAGE_SELECTOR_PANEL, LAYOUT_MESSAGES, LAYOUT_NOTIFICATION_BELL, LAYOUT_SEARCHBAR, LAYOUT_SEARCH_ADAPTER, LayoutPersistenceService, LayoutService, NavyBlueTheme, buildBootstrapPreset, buildPreset, buildSemanticExt, filterAppsByPermissions, filterMenuByPermissions };
594
+ export type { CompanyProfile, DocumentWithViewTransition, IBranchInfo, ICompanyInfo, ILauncherApp, ILayoutAuthApi, ILayoutAuthState, IMenuItem, ISearchAdapter, ISearchSuggestion, IUserInfo, LayoutState, MenuChangeEvent, UserProfile, ViewTransition };