@flusys/ng-layout 1.0.0-rc → 1.0.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,19 +1,19 @@
1
1
  {
2
2
  "name": "@flusys/ng-layout",
3
- "version": "1.0.0-rc",
3
+ "version": "1.0.0",
4
4
  "description": "Layout components for FLUSYS Angular applications",
5
5
  "license": "MIT",
6
6
  "peerDependencies": {
7
- "@angular/common": "^21.0.0",
8
- "@angular/core": "^21.0.0",
9
- "@angular/router": "^21.0.0",
10
- "@flusys/ng-core": "^1.1.1-beta",
11
- "@flusys/ng-shared": "^1.1.1-beta",
12
- "@primeuix/themes": "^1.0.0",
13
- "primeicons": "^7.0.0",
14
- "primeng": "^21.0.0",
15
- "tailwindcss": "^4.0.0",
16
- "tailwindcss-primeui": "^0.6.0"
7
+ "@angular/common": ">=21.0.0",
8
+ "@angular/core": ">=21.0.0",
9
+ "@angular/router": ">=21.0.0",
10
+ "@flusys/ng-core": ">=1.0.0",
11
+ "@flusys/ng-shared": ">=1.0.0",
12
+ "@primeuix/themes": ">=1.0.0",
13
+ "primeicons": ">=7.0.0",
14
+ "primeng": ">=21.0.0",
15
+ "tailwindcss": ">=4.0.0",
16
+ "tailwindcss-primeui": ">=0.6.0"
17
17
  },
18
18
  "sideEffects": false,
19
19
  "module": "fesm2022/flusys-ng-layout.mjs",
@@ -30,4 +30,4 @@
30
30
  "dependencies": {
31
31
  "tslib": "^2.3.0"
32
32
  }
33
- }
33
+ }
@@ -2,10 +2,19 @@ import * as _angular_core from '@angular/core';
2
2
  import { Signal, InjectionToken } from '@angular/core';
3
3
  import * as rxjs from 'rxjs';
4
4
  import { Observable } from 'rxjs';
5
- import { IconTypeEnum, ILogicNode } from '@flusys/ng-shared';
5
+ import { ILogicNode, IconTypeEnum } from '@flusys/ng-shared';
6
6
  import * as _flusys_ng_layout from '@flusys/ng-layout';
7
7
  import * as _primeuix_themes_types from '@primeuix/themes/types';
8
8
 
9
+ declare class AppFooter {
10
+ private readonly layoutService;
11
+ readonly appName: string;
12
+ readonly authorName: string;
13
+ readonly authorUrl: string;
14
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppFooter, never>;
15
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppFooter, "app-footer", never, {}, {}, never, never, true, never>;
16
+ }
17
+
9
18
  interface ILauncherApp {
10
19
  id: string;
11
20
  name: string;
@@ -82,37 +91,27 @@ interface MenuChangeEvent {
82
91
  key: string;
83
92
  routeEvent?: boolean;
84
93
  }
85
- /**
86
- * User profile information for display in layout
87
- */
88
94
  interface UserProfile {
89
95
  id: string;
90
96
  name: string;
91
97
  email: string;
92
98
  profilePictureUrl?: string | null;
93
99
  }
94
- /**
95
- * Company information for display in layout
96
- */
97
100
  interface CompanyProfile {
98
101
  id: string;
99
102
  name: string;
100
103
  slug: string;
101
104
  logoUrl?: string | null;
102
105
  }
103
- /**
104
- * Service managing layout configuration and state.
105
- * Provides signals for reactive layout updates.
106
- */
106
+ /** Layout configuration and state management service */
107
107
  declare class LayoutService {
108
108
  private readonly document;
109
109
  private readonly platformId;
110
110
  private readonly isBrowser;
111
111
  private readonly persistence;
112
112
  private readonly appConfig;
113
- private readonly defaultConfig;
114
- private readonly initialConfig;
115
- private readonly defaultState;
113
+ private readonly DEFAULT_CONFIG;
114
+ private readonly DEFAULT_STATE;
116
115
  private readonly _layoutConfig;
117
116
  private readonly _layoutState;
118
117
  private readonly _transitionComplete;
@@ -121,28 +120,17 @@ declare class LayoutService {
121
120
  readonly transitionComplete: _angular_core.Signal<boolean>;
122
121
  private readonly _userProfile;
123
122
  private readonly _companyProfile;
124
- private readonly _appName;
125
- readonly userProfile: _angular_core.Signal<UserProfile | null>;
126
- readonly companyProfile: _angular_core.Signal<CompanyProfile | null>;
127
- readonly appName: _angular_core.Signal<string>;
128
- private readonly _authorName;
129
- private readonly _authorUrl;
130
- readonly authorName: _angular_core.Signal<string>;
131
- readonly authorUrl: _angular_core.Signal<string>;
132
- private readonly _rawApps;
133
- /**
134
- * Filtered launcher apps based on user permissions.
135
- * Automatically recomputes when raw apps or permissions change.
136
- */
137
- readonly apps: _angular_core.Signal<ILauncherApp[]>;
138
123
  private readonly _rawMenu;
124
+ private readonly _rawApps;
139
125
  private readonly permissionValidator;
140
- /**
141
- * Filtered menu items based on user permissions.
142
- * Automatically recomputes when raw menu or permission checker changes.
143
- * Role checker is optional - if not set, role-based permissions will be denied.
144
- */
126
+ readonly userProfile: _angular_core.Signal<UserProfile | null>;
127
+ readonly companyProfile: _angular_core.Signal<CompanyProfile | null>;
128
+ readonly appName: string;
129
+ readonly authorName: string;
130
+ readonly authorUrl: string;
145
131
  readonly menu: _angular_core.Signal<IMenuItem[]>;
132
+ readonly apps: _angular_core.Signal<ILauncherApp[]>;
133
+ readonly hasApps: _angular_core.Signal<boolean>;
146
134
  readonly isSidebarActive: _angular_core.Signal<boolean | undefined>;
147
135
  readonly isDarkTheme: _angular_core.Signal<boolean | undefined>;
148
136
  readonly getPrimary: _angular_core.Signal<string | undefined>;
@@ -151,10 +139,9 @@ declare class LayoutService {
151
139
  readonly userName: _angular_core.Signal<string>;
152
140
  readonly userEmail: _angular_core.Signal<string>;
153
141
  readonly userProfilePictureUrl: _angular_core.Signal<string | null>;
154
- readonly companyName: _angular_core.Signal<string>;
155
142
  readonly companyLogoUrl: _angular_core.Signal<string | null>;
156
143
  readonly isAuthenticated: _angular_core.Signal<boolean>;
157
- readonly hasApps: _angular_core.Signal<boolean>;
144
+ readonly companyName: _angular_core.Signal<string>;
158
145
  private readonly configUpdate;
159
146
  private readonly overlayOpen;
160
147
  private readonly menuSource;
@@ -165,57 +152,21 @@ declare class LayoutService {
165
152
  readonly overlayOpen$: rxjs.Observable<void>;
166
153
  private initialized;
167
154
  constructor();
168
- private handleDarkModeTransition;
169
- private startViewTransition;
170
155
  toggleDarkMode(config?: LayoutConfig): void;
156
+ private handleDarkModeTransition;
171
157
  private onTransitionEnd;
172
158
  onMenuToggle(): void;
173
159
  isDesktop(): boolean;
174
160
  isMobile(): boolean;
175
- onConfigUpdate(): void;
176
161
  onMenuStateChange(event: MenuChangeEvent): void;
177
162
  reset(): void;
178
- /**
179
- * Update layout configuration.
180
- * Called by configurator component.
181
- */
182
163
  updateLayoutConfig(config: Partial<LayoutConfig>): void;
183
- /**
184
- * Update layout state.
185
- * Called internally and by layout components.
186
- */
187
164
  updateLayoutState(state: Partial<LayoutState>): void;
188
- /**
189
- * Set the current user profile for display in layout.
190
- * Called by auth integration to sync user data.
191
- */
192
165
  setUserProfile(profile: UserProfile | null): void;
193
- /**
194
- * Set the current company profile for display in layout.
195
- * Called by auth integration to sync company data.
196
- */
197
166
  setCompanyProfile(profile: CompanyProfile | null): void;
198
- /**
199
- * Set the raw menu items (unfiltered).
200
- * Menu will be automatically filtered based on permission checker.
201
- * Called by app initialization to set menu from IAM or other source.
202
- */
203
167
  setMenu(items: IMenuItem[]): void;
204
- /**
205
- * Clear menu and permission/role checkers.
206
- * Called on logout.
207
- */
208
168
  clearMenu(): void;
209
- /**
210
- * Set launcher apps for display in header.
211
- * Apps will be automatically filtered based on user permissions.
212
- * If empty after filtering, the app launcher button is hidden.
213
- */
214
169
  setApps(apps: ILauncherApp[]): void;
215
- /**
216
- * Clear launcher apps.
217
- * Called on logout.
218
- */
219
170
  clearApps(): void;
220
171
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<LayoutService, never>;
221
172
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<LayoutService>;
@@ -373,15 +324,6 @@ declare class AppFloatingConfigurator {
373
324
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppFloatingConfigurator, "app-floating-configurator", never, {}, {}, never, never, true, never>;
374
325
  }
375
326
 
376
- declare class AppFooter {
377
- private readonly layoutService;
378
- readonly appName: _angular_core.Signal<string>;
379
- readonly authorName: _angular_core.Signal<string>;
380
- readonly authorUrl: _angular_core.Signal<string>;
381
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppFooter, never>;
382
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppFooter, "app-footer", never, {}, {}, never, never, true, never>;
383
- }
384
-
385
327
  declare class AppLayout {
386
328
  private readonly destroyRef;
387
329
  private readonly document;
@@ -423,6 +365,27 @@ declare class AppMenu {
423
365
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppMenu, "app-menu", never, {}, {}, never, never, true, never>;
424
366
  }
425
367
 
368
+ /**
369
+ * View Transitions API type definitions
370
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
371
+ */
372
+ interface ViewTransition {
373
+ /** Promise fulfilled when the transition animation is complete */
374
+ finished: Promise<void>;
375
+ /** Promise fulfilled when the pseudo-element tree is ready */
376
+ ready: Promise<void>;
377
+ /** Promise fulfilled when the callback finishes */
378
+ updateCallbackDone: Promise<void>;
379
+ /** Skip the transition animation */
380
+ skipTransition(): void;
381
+ }
382
+ /**
383
+ * Extended Document interface with View Transitions API support.
384
+ * Uses the native Document type with startViewTransition which is now
385
+ * part of the standard TypeScript DOM library.
386
+ */
387
+ type DocumentWithViewTransition = Document;
388
+
426
389
  declare class AppMenuitem {
427
390
  readonly item: _angular_core.InputSignal<IMenuItem>;
428
391
  readonly index: _angular_core.InputSignal<number>;
@@ -563,9 +526,9 @@ declare function filterAppsByPermissions(apps: ILauncherApp[], permissionCodes:
563
526
  */
564
527
  declare function filterMenuByPermissions(items: IMenuItem[], permissionCode: string[]): IMenuItem[];
565
528
 
566
- declare const GreenTheme: _primeuix_themes_types.Preset;
567
-
568
529
  declare const NavyBlueTheme: _primeuix_themes_types.Preset;
569
530
 
531
+ declare const GreenTheme: _primeuix_themes_types.Preset;
532
+
570
533
  export { AppCompanyBranchSelector, AppConfigurator, AppFloatingConfigurator, AppFooter, AppLauncher, AppLayout, AppMenu, AppMenuitem, AppProfile, AppSidebar, AppTopbar, GreenTheme, LAYOUT_AUTH_API, LAYOUT_AUTH_STATE, LayoutPersistenceService, LayoutService, NavyBlueTheme, filterAppsByPermissions, filterMenuByPermissions };
571
- export type { CompanyProfile, IBranchInfo, ICompanyInfo, ILauncherApp, ILayoutAuthApi, ILayoutAuthState, IMenuItem, IUserInfo, LayoutConfig, LayoutState, MenuChangeEvent, UserProfile };
534
+ export type { CompanyProfile, DocumentWithViewTransition, IBranchInfo, ICompanyInfo, ILauncherApp, ILayoutAuthApi, ILayoutAuthState, IMenuItem, IUserInfo, LayoutConfig, LayoutState, MenuChangeEvent, UserProfile, ViewTransition };