@flusys/ng-layout 5.2.0 → 5.3.1

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.2.0",
3
+ "version": "5.3.1",
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.2.0",
11
- "@flusys/ng-shared": ">=5.2.0",
10
+ "@flusys/ng-core": ">=5.3.1",
11
+ "@flusys/ng-shared": ">=5.3.1",
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';
@@ -97,13 +98,6 @@ interface ISearchAdapter {
97
98
  }
98
99
  declare const LAYOUT_SEARCH_ADAPTER: InjectionToken<ISearchAdapter>;
99
100
 
100
- interface LayoutConfig {
101
- preset?: string;
102
- primary?: string;
103
- surface?: string | null;
104
- darkTheme?: boolean;
105
- menuMode?: 'static' | 'overlay' | 'topbar';
106
- }
107
101
  interface LayoutState {
108
102
  staticMenuDesktopInactive?: boolean;
109
103
  overlayMenuActive?: boolean;
@@ -128,7 +122,6 @@ interface CompanyProfile {
128
122
  slug: string;
129
123
  logoUrl?: string | null;
130
124
  }
131
- /** Layout configuration and state management service */
132
125
  declare class LayoutService {
133
126
  private readonly document;
134
127
  private readonly platformId;
@@ -137,6 +130,7 @@ declare class LayoutService {
137
130
  private readonly appConfig;
138
131
  private readonly DEFAULT_CONFIG;
139
132
  private readonly DEFAULT_STATE;
133
+ private readonly memorable;
140
134
  private readonly _layoutConfig;
141
135
  private readonly _layoutState;
142
136
  private readonly _transitionComplete;
@@ -160,8 +154,6 @@ declare class LayoutService {
160
154
  readonly hasApps: _angular_core.Signal<boolean>;
161
155
  readonly isSidebarActive: _angular_core.Signal<boolean | undefined>;
162
156
  readonly isDarkTheme: _angular_core.Signal<boolean | undefined>;
163
- readonly getPrimary: _angular_core.Signal<string | undefined>;
164
- readonly getSurface: _angular_core.Signal<string | null | undefined>;
165
157
  readonly isOverlay: _angular_core.Signal<boolean>;
166
158
  readonly isTopbar: _angular_core.Signal<boolean>;
167
159
  readonly userName: _angular_core.Signal<string>;
@@ -172,13 +164,11 @@ declare class LayoutService {
172
164
  readonly companyName: _angular_core.Signal<string>;
173
165
  readonly displayLogo: _angular_core.Signal<string>;
174
166
  readonly isDisplayLogoSvg: _angular_core.Signal<boolean>;
175
- private readonly configUpdate;
176
167
  private readonly overlayOpen;
177
168
  private readonly menuSource;
178
169
  private readonly resetSource;
179
170
  readonly menuSource$: rxjs.Observable<MenuChangeEvent>;
180
171
  readonly resetSource$: rxjs.Observable<boolean>;
181
- readonly configUpdate$: rxjs.Observable<LayoutConfig>;
182
172
  readonly overlayOpen$: rxjs.Observable<void>;
183
173
  private initialized;
184
174
  constructor();
@@ -202,56 +192,14 @@ declare class LayoutService {
202
192
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<LayoutService>;
203
193
  }
204
194
 
205
- /**
206
- * Service for persisting layout configuration to localStorage.
207
- * Handles loading, saving, and validation of layout preferences with SSR-safe checks.
208
- *
209
- * @example
210
- * ```typescript
211
- * const persistence = inject(LayoutPersistenceService);
212
- *
213
- * // Load saved config
214
- * const config = persistence.load();
215
- *
216
- * // Save config
217
- * persistence.save({ darkTheme: true, preset: 'Aura' });
218
- *
219
- * // Clear saved config
220
- * persistence.clear();
221
- * ```
222
- */
223
195
  declare class LayoutPersistenceService {
224
196
  private readonly platformId;
225
197
  private readonly isBrowser;
226
198
  private readonly validPresets;
227
199
  private readonly validMenuModes;
228
- /**
229
- * Load configuration from localStorage.
230
- * Returns null if no saved config or invalid data.
231
- * SSR-safe (returns null on server).
232
- *
233
- * @returns Validated layout configuration or null
234
- */
235
200
  load(): LayoutConfig | null;
236
- /**
237
- * Save configuration to localStorage.
238
- * SSR-safe (no-op on server).
239
- *
240
- * @param config Layout configuration to save
241
- */
242
201
  save(config: LayoutConfig): void;
243
- /**
244
- * Clear stored configuration.
245
- * SSR-safe (no-op on server).
246
- */
247
202
  clear(): void;
248
- /**
249
- * Validate and sanitize configuration.
250
- * Returns null if version mismatch.
251
- *
252
- * @param config Configuration to validate
253
- * @returns Validated configuration or null
254
- */
255
203
  private validateConfig;
256
204
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<LayoutPersistenceService, never>;
257
205
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<LayoutPersistenceService>;
@@ -277,6 +225,7 @@ declare type SurfacesType = {
277
225
  declare class AppConfigurator {
278
226
  private readonly router;
279
227
  private readonly translateAdapter;
228
+ private readonly platformId;
280
229
  readonly layoutService: LayoutService;
281
230
  readonly presets: string[];
282
231
  readonly showMenuModeButton: _angular_core.WritableSignal<boolean>;
@@ -294,20 +243,7 @@ declare class AppConfigurator {
294
243
  readonly primaryColors: _angular_core.Signal<SurfacesType[]>;
295
244
  getPresetExt(): {
296
245
  semantic: {
297
- primary: {
298
- 0?: string;
299
- 50?: string;
300
- 100?: string;
301
- 200?: string;
302
- 300?: string;
303
- 400?: string;
304
- 500?: string;
305
- 600?: string;
306
- 700?: string;
307
- 800?: string;
308
- 900?: string;
309
- 950?: string;
310
- } | undefined;
246
+ primary: object;
311
247
  colorScheme: {
312
248
  light: {
313
249
  primary: {
@@ -341,7 +277,7 @@ declare class AppConfigurator {
341
277
  };
342
278
  };
343
279
  updateColors(event: MouseEvent, type: string, color: SurfacesType): void;
344
- applyTheme(type: string, color: SurfacesType): void;
280
+ private applyTheme;
345
281
  onPresetChange(event: string): void;
346
282
  onMenuModeChange(event: 'static' | 'overlay' | 'topbar'): void;
347
283
  private translate;
@@ -606,11 +542,53 @@ declare function filterAppsByPermissions(apps: ILauncherApp[], permissionCodes:
606
542
  */
607
543
  declare function filterMenuByPermissions(items: IMenuItem[], permissionCode: string[]): IMenuItem[];
608
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
+
609
587
  declare const NavyBlueTheme: _primeuix_themes_types.Preset;
610
588
 
611
589
  declare const GreenTheme: _primeuix_themes_types.Preset;
612
590
 
613
591
  declare const LAYOUT_MESSAGES: Record<string, string>;
614
592
 
615
- 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 };
616
- 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 };