@flusys/ng-layout 0.1.0-alpha.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/assets/images/asset-access.svg +46 -0
- package/assets/images/asset-error.svg +74 -0
- package/assets/images/default/default-audio.png +0 -0
- package/assets/images/default/default-code.png +0 -0
- package/assets/images/default/default-file.png +0 -0
- package/assets/images/default/default-image.jpg +0 -0
- package/assets/images/default/default-pdf.png +0 -0
- package/assets/images/default/default-txt.png +0 -0
- package/assets/images/default/default-video.png +0 -0
- package/assets/images/default/default-zip.png +0 -0
- package/assets/images/logo.svg +377 -0
- package/assets/layout/_core.scss +24 -0
- package/assets/layout/_footer.scss +8 -0
- package/assets/layout/_forms.scss +54 -0
- package/assets/layout/_main.scss +13 -0
- package/assets/layout/_menu.scss +181 -0
- package/assets/layout/_mixins.scss +15 -0
- package/assets/layout/_preloading.scss +47 -0
- package/assets/layout/_responsive.scss +110 -0
- package/assets/layout/_topbar.scss +160 -0
- package/assets/layout/_typography.scss +68 -0
- package/assets/layout/_utils.scss +25 -0
- package/assets/layout/layout.scss +14 -0
- package/assets/layout/variables/_common.scss +20 -0
- package/assets/layout/variables/_dark.scss +5 -0
- package/assets/layout/variables/_light.scss +5 -0
- package/assets/style.scss +39 -0
- package/fesm2022/flusys-ng-layout.mjs +2233 -0
- package/fesm2022/flusys-ng-layout.mjs.map +1 -0
- package/package.json +28 -0
- package/types/flusys-ng-layout.d.ts +525 -0
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal, InjectionToken, ElementRef } from '@angular/core';
|
|
3
|
+
import { Router } from '@angular/router';
|
|
4
|
+
import { PrimeNG } from 'primeng/config';
|
|
5
|
+
import * as rxjs from 'rxjs';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import { IconTypeEnum, ILogicNode, PlatformService } from '@flusys/ng-shared';
|
|
8
|
+
import * as _flusys_ng_layout from '@flusys/ng-layout';
|
|
9
|
+
import * as _primeuix_themes_types from '@primeuix/themes/types';
|
|
10
|
+
|
|
11
|
+
interface ILauncherApp {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
iconType: IconTypeEnum;
|
|
15
|
+
icon: string;
|
|
16
|
+
url: string;
|
|
17
|
+
/** Optional permission logic - if set, app only visible when logic passes */
|
|
18
|
+
permissionLogic?: ILogicNode | null;
|
|
19
|
+
}
|
|
20
|
+
interface ICompanyInfo {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
slug: string;
|
|
24
|
+
imageId: string;
|
|
25
|
+
}
|
|
26
|
+
interface IBranchInfo {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
slug: string;
|
|
30
|
+
imageId?: string;
|
|
31
|
+
}
|
|
32
|
+
interface IUserInfo {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
email: string;
|
|
36
|
+
profilePicture?: {
|
|
37
|
+
url: string;
|
|
38
|
+
} | null;
|
|
39
|
+
}
|
|
40
|
+
interface IMenuItem {
|
|
41
|
+
id?: string;
|
|
42
|
+
label?: string;
|
|
43
|
+
icon?: string;
|
|
44
|
+
iconType?: number;
|
|
45
|
+
routerLink?: string[];
|
|
46
|
+
children?: IMenuItem[];
|
|
47
|
+
parent?: {
|
|
48
|
+
id: string;
|
|
49
|
+
} | null;
|
|
50
|
+
separator?: boolean;
|
|
51
|
+
/** Optional permission logic - if set, item only visible when logic passes */
|
|
52
|
+
permissionLogic?: ILogicNode | null;
|
|
53
|
+
}
|
|
54
|
+
interface ILayoutAuthState {
|
|
55
|
+
currentCompanyInfo: Signal<ICompanyInfo | null>;
|
|
56
|
+
currentBranchInfo: Signal<IBranchInfo | null>;
|
|
57
|
+
loginUserData: Signal<IUserInfo | null>;
|
|
58
|
+
}
|
|
59
|
+
interface ILayoutAuthApi {
|
|
60
|
+
logOut(): Observable<any>;
|
|
61
|
+
navigateLogin(withUrl?: boolean): void;
|
|
62
|
+
switchCompany(companyId: string, branchId: string): Observable<any>;
|
|
63
|
+
getUserCompanies(): Observable<ICompanyInfo[]>;
|
|
64
|
+
getCompanyBranches(companyId: string): Observable<IBranchInfo[]>;
|
|
65
|
+
}
|
|
66
|
+
declare const LAYOUT_AUTH_STATE: InjectionToken<ILayoutAuthState>;
|
|
67
|
+
declare const LAYOUT_AUTH_API: InjectionToken<ILayoutAuthApi>;
|
|
68
|
+
|
|
69
|
+
interface LayoutConfig {
|
|
70
|
+
preset?: string;
|
|
71
|
+
primary?: string;
|
|
72
|
+
surface?: string | null;
|
|
73
|
+
darkTheme?: boolean;
|
|
74
|
+
menuMode?: 'static' | 'overlay';
|
|
75
|
+
}
|
|
76
|
+
interface LayoutState {
|
|
77
|
+
staticMenuDesktopInactive?: boolean;
|
|
78
|
+
overlayMenuActive?: boolean;
|
|
79
|
+
configSidebarVisible?: boolean;
|
|
80
|
+
staticMenuMobileActive?: boolean;
|
|
81
|
+
menuHoverActive?: boolean;
|
|
82
|
+
}
|
|
83
|
+
interface MenuChangeEvent {
|
|
84
|
+
key: string;
|
|
85
|
+
routeEvent?: boolean;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* User profile information for display in layout
|
|
89
|
+
*/
|
|
90
|
+
interface UserProfile {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
email: string;
|
|
94
|
+
profilePictureUrl?: string | null;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Company information for display in layout
|
|
98
|
+
*/
|
|
99
|
+
interface CompanyProfile {
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
slug: string;
|
|
103
|
+
logoUrl?: string | null;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Service managing layout configuration and state.
|
|
107
|
+
* Provides signals for reactive layout updates.
|
|
108
|
+
*/
|
|
109
|
+
declare class LayoutService {
|
|
110
|
+
private readonly document;
|
|
111
|
+
private readonly platformId;
|
|
112
|
+
private readonly isBrowser;
|
|
113
|
+
private readonly persistence;
|
|
114
|
+
private readonly defaultConfig;
|
|
115
|
+
private readonly initialConfig;
|
|
116
|
+
private readonly defaultState;
|
|
117
|
+
readonly layoutConfig: _angular_core.WritableSignal<LayoutConfig>;
|
|
118
|
+
readonly layoutState: _angular_core.WritableSignal<LayoutState>;
|
|
119
|
+
readonly transitionComplete: _angular_core.WritableSignal<boolean>;
|
|
120
|
+
readonly userProfile: _angular_core.WritableSignal<UserProfile | null>;
|
|
121
|
+
readonly companyProfile: _angular_core.WritableSignal<CompanyProfile | null>;
|
|
122
|
+
readonly appName: _angular_core.WritableSignal<string>;
|
|
123
|
+
private readonly _rawApps;
|
|
124
|
+
/**
|
|
125
|
+
* Filtered launcher apps based on user permissions.
|
|
126
|
+
* Automatically recomputes when raw apps or permissions change.
|
|
127
|
+
*/
|
|
128
|
+
readonly apps: _angular_core.Signal<ILauncherApp[]>;
|
|
129
|
+
private readonly _rawMenu;
|
|
130
|
+
private readonly permissionValidator;
|
|
131
|
+
/**
|
|
132
|
+
* Filtered menu items based on user permissions.
|
|
133
|
+
* Automatically recomputes when raw menu or permission checker changes.
|
|
134
|
+
* Role checker is optional - if not set, role-based permissions will be denied.
|
|
135
|
+
*/
|
|
136
|
+
readonly menu: _angular_core.Signal<IMenuItem[]>;
|
|
137
|
+
readonly theme: _angular_core.Signal<"light" | "dark">;
|
|
138
|
+
readonly isSidebarActive: _angular_core.Signal<boolean | undefined>;
|
|
139
|
+
readonly isDarkTheme: _angular_core.Signal<boolean | undefined>;
|
|
140
|
+
readonly getPrimary: _angular_core.Signal<string | undefined>;
|
|
141
|
+
readonly getSurface: _angular_core.Signal<string | null | undefined>;
|
|
142
|
+
readonly isOverlay: _angular_core.Signal<boolean>;
|
|
143
|
+
readonly userName: _angular_core.Signal<string>;
|
|
144
|
+
readonly userEmail: _angular_core.Signal<string>;
|
|
145
|
+
readonly userProfilePictureUrl: _angular_core.Signal<string | null>;
|
|
146
|
+
readonly companyName: _angular_core.Signal<string>;
|
|
147
|
+
readonly companyLogoUrl: _angular_core.Signal<string | null>;
|
|
148
|
+
readonly isAuthenticated: _angular_core.Signal<boolean>;
|
|
149
|
+
readonly hasApps: _angular_core.Signal<boolean>;
|
|
150
|
+
private readonly configUpdate;
|
|
151
|
+
private readonly overlayOpen;
|
|
152
|
+
private readonly menuSource;
|
|
153
|
+
private readonly resetSource;
|
|
154
|
+
readonly menuSource$: rxjs.Observable<MenuChangeEvent>;
|
|
155
|
+
readonly resetSource$: rxjs.Observable<boolean>;
|
|
156
|
+
readonly configUpdate$: rxjs.Observable<LayoutConfig>;
|
|
157
|
+
readonly overlayOpen$: rxjs.Observable<void>;
|
|
158
|
+
private initialized;
|
|
159
|
+
constructor();
|
|
160
|
+
private handleDarkModeTransition;
|
|
161
|
+
private startViewTransition;
|
|
162
|
+
toggleDarkMode(config?: LayoutConfig): void;
|
|
163
|
+
private onTransitionEnd;
|
|
164
|
+
onMenuToggle(): void;
|
|
165
|
+
isDesktop(): boolean;
|
|
166
|
+
isMobile(): boolean;
|
|
167
|
+
onConfigUpdate(): void;
|
|
168
|
+
onMenuStateChange(event: MenuChangeEvent): void;
|
|
169
|
+
reset(): void;
|
|
170
|
+
/**
|
|
171
|
+
* Set the current user profile for display in layout.
|
|
172
|
+
* Called by auth integration to sync user data.
|
|
173
|
+
*/
|
|
174
|
+
setUserProfile(profile: UserProfile | null): void;
|
|
175
|
+
/**
|
|
176
|
+
* Set the current company profile for display in layout.
|
|
177
|
+
* Called by auth integration to sync company data.
|
|
178
|
+
*/
|
|
179
|
+
setCompanyProfile(profile: CompanyProfile | null): void;
|
|
180
|
+
/**
|
|
181
|
+
* Set the raw menu items (unfiltered).
|
|
182
|
+
* Menu will be automatically filtered based on permission checker.
|
|
183
|
+
* Called by app initialization to set menu from IAM or other source.
|
|
184
|
+
*/
|
|
185
|
+
setMenu(items: IMenuItem[]): void;
|
|
186
|
+
/**
|
|
187
|
+
* Clear menu and permission/role checkers.
|
|
188
|
+
* Called on logout.
|
|
189
|
+
*/
|
|
190
|
+
clearMenu(): void;
|
|
191
|
+
/**
|
|
192
|
+
* Set launcher apps for display in header.
|
|
193
|
+
* Apps will be automatically filtered based on user permissions.
|
|
194
|
+
* If empty after filtering, the app launcher button is hidden.
|
|
195
|
+
*/
|
|
196
|
+
setApps(apps: ILauncherApp[]): void;
|
|
197
|
+
/**
|
|
198
|
+
* Clear launcher apps.
|
|
199
|
+
* Called on logout.
|
|
200
|
+
*/
|
|
201
|
+
clearApps(): void;
|
|
202
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LayoutService, never>;
|
|
203
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<LayoutService>;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Service for persisting layout configuration to localStorage.
|
|
208
|
+
* Handles loading, saving, and validation of layout preferences with SSR-safe checks.
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* ```typescript
|
|
212
|
+
* const persistence = inject(LayoutPersistenceService);
|
|
213
|
+
*
|
|
214
|
+
* // Load saved config
|
|
215
|
+
* const config = persistence.load();
|
|
216
|
+
*
|
|
217
|
+
* // Save config
|
|
218
|
+
* persistence.save({ darkTheme: true, preset: 'Aura' });
|
|
219
|
+
*
|
|
220
|
+
* // Clear saved config
|
|
221
|
+
* persistence.clear();
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
declare class LayoutPersistenceService {
|
|
225
|
+
private readonly platformId;
|
|
226
|
+
private readonly isBrowser;
|
|
227
|
+
private readonly validPresets;
|
|
228
|
+
private readonly validMenuModes;
|
|
229
|
+
/**
|
|
230
|
+
* Load configuration from localStorage.
|
|
231
|
+
* Returns null if no saved config or invalid data.
|
|
232
|
+
* SSR-safe (returns null on server).
|
|
233
|
+
*
|
|
234
|
+
* @returns Validated layout configuration or null
|
|
235
|
+
*/
|
|
236
|
+
load(): LayoutConfig | null;
|
|
237
|
+
/**
|
|
238
|
+
* Save configuration to localStorage.
|
|
239
|
+
* SSR-safe (no-op on server).
|
|
240
|
+
*
|
|
241
|
+
* @param config Layout configuration to save
|
|
242
|
+
*/
|
|
243
|
+
save(config: LayoutConfig): void;
|
|
244
|
+
/**
|
|
245
|
+
* Clear stored configuration.
|
|
246
|
+
* SSR-safe (no-op on server).
|
|
247
|
+
*/
|
|
248
|
+
clear(): void;
|
|
249
|
+
/**
|
|
250
|
+
* Validate and sanitize configuration.
|
|
251
|
+
* Returns null if version mismatch.
|
|
252
|
+
*
|
|
253
|
+
* @param config Configuration to validate
|
|
254
|
+
* @returns Validated configuration or null
|
|
255
|
+
*/
|
|
256
|
+
private validateConfig;
|
|
257
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LayoutPersistenceService, never>;
|
|
258
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<LayoutPersistenceService>;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
declare type SurfacesType = {
|
|
262
|
+
name?: string;
|
|
263
|
+
palette?: {
|
|
264
|
+
0?: string;
|
|
265
|
+
50?: string;
|
|
266
|
+
100?: string;
|
|
267
|
+
200?: string;
|
|
268
|
+
300?: string;
|
|
269
|
+
400?: string;
|
|
270
|
+
500?: string;
|
|
271
|
+
600?: string;
|
|
272
|
+
700?: string;
|
|
273
|
+
800?: string;
|
|
274
|
+
900?: string;
|
|
275
|
+
950?: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
declare class AppConfigurator {
|
|
279
|
+
router: Router;
|
|
280
|
+
config: PrimeNG;
|
|
281
|
+
layoutService: LayoutService;
|
|
282
|
+
platformService: PlatformService;
|
|
283
|
+
primeng: PrimeNG;
|
|
284
|
+
presets: string[];
|
|
285
|
+
showMenuModeButton: _angular_core.WritableSignal<boolean>;
|
|
286
|
+
menuModeOptions: {
|
|
287
|
+
label: string;
|
|
288
|
+
value: string;
|
|
289
|
+
}[];
|
|
290
|
+
ngOnInit(): void;
|
|
291
|
+
surfaces: SurfacesType[];
|
|
292
|
+
selectedPrimaryColor: _angular_core.Signal<string | undefined>;
|
|
293
|
+
selectedSurfaceColor: _angular_core.Signal<string | null | undefined>;
|
|
294
|
+
selectedPreset: _angular_core.Signal<string | undefined>;
|
|
295
|
+
menuMode: _angular_core.Signal<"static" | "overlay" | undefined>;
|
|
296
|
+
primaryColors: _angular_core.Signal<SurfacesType[]>;
|
|
297
|
+
getPresetExt(): {
|
|
298
|
+
semantic: {
|
|
299
|
+
primary: {
|
|
300
|
+
0?: string;
|
|
301
|
+
50?: string;
|
|
302
|
+
100?: string;
|
|
303
|
+
200?: string;
|
|
304
|
+
300?: string;
|
|
305
|
+
400?: string;
|
|
306
|
+
500?: string;
|
|
307
|
+
600?: string;
|
|
308
|
+
700?: string;
|
|
309
|
+
800?: string;
|
|
310
|
+
900?: string;
|
|
311
|
+
950?: string;
|
|
312
|
+
} | undefined;
|
|
313
|
+
colorScheme: {
|
|
314
|
+
light: {
|
|
315
|
+
primary: {
|
|
316
|
+
color: string;
|
|
317
|
+
contrastColor: string;
|
|
318
|
+
hoverColor: string;
|
|
319
|
+
activeColor: string;
|
|
320
|
+
};
|
|
321
|
+
highlight: {
|
|
322
|
+
background: string;
|
|
323
|
+
focusBackground: string;
|
|
324
|
+
color: string;
|
|
325
|
+
focusColor: string;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
dark: {
|
|
329
|
+
primary: {
|
|
330
|
+
color: string;
|
|
331
|
+
contrastColor: string;
|
|
332
|
+
hoverColor: string;
|
|
333
|
+
activeColor: string;
|
|
334
|
+
};
|
|
335
|
+
highlight: {
|
|
336
|
+
background: string;
|
|
337
|
+
focusBackground: string;
|
|
338
|
+
color: string;
|
|
339
|
+
focusColor: string;
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
updateColors(event: any, type: string, color: any): void;
|
|
346
|
+
applyTheme(type: string, color: any): void;
|
|
347
|
+
onPresetChange(event: any): void;
|
|
348
|
+
onMenuModeChange(event: 'static' | 'overlay'): void;
|
|
349
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppConfigurator, never>;
|
|
350
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppConfigurator, "app-configurator", never, {}, {}, never, never, true, never>;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
declare class AppFloatingConfigurator {
|
|
354
|
+
LayoutService: LayoutService;
|
|
355
|
+
isDarkTheme: _angular_core.Signal<boolean | undefined>;
|
|
356
|
+
toggleDarkMode(): void;
|
|
357
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppFloatingConfigurator, never>;
|
|
358
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppFloatingConfigurator, "app-floating-configurator", never, {}, {}, never, never, true, never>;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
declare class AppFooter {
|
|
362
|
+
private authState;
|
|
363
|
+
companyName: _angular_core.Signal<string>;
|
|
364
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppFooter, never>;
|
|
365
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppFooter, "app-footer", never, {}, {}, never, never, true, never>;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
declare class AppTopbar {
|
|
369
|
+
private readonly authState;
|
|
370
|
+
private readonly appConfig;
|
|
371
|
+
readonly layoutService: LayoutService;
|
|
372
|
+
companyName: _angular_core.Signal<string>;
|
|
373
|
+
enableCompanyFeature: _angular_core.Signal<boolean>;
|
|
374
|
+
toggleDarkMode(): void;
|
|
375
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppTopbar, never>;
|
|
376
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppTopbar, "app-topbar", never, {}, {}, never, never, true, never>;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
declare class AppSidebar {
|
|
380
|
+
el: ElementRef;
|
|
381
|
+
constructor(el: ElementRef);
|
|
382
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppSidebar, never>;
|
|
383
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppSidebar, "app-sidebar", never, {}, {}, never, never, true, never>;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
declare class AppLayout {
|
|
387
|
+
private readonly destroyRef;
|
|
388
|
+
private readonly document;
|
|
389
|
+
readonly layoutService: LayoutService;
|
|
390
|
+
private readonly renderer;
|
|
391
|
+
private readonly router;
|
|
392
|
+
private menuOutsideClickListener;
|
|
393
|
+
appSidebar: AppSidebar;
|
|
394
|
+
appTopBar: AppTopbar;
|
|
395
|
+
constructor();
|
|
396
|
+
isOutsideClicked(event: MouseEvent): boolean;
|
|
397
|
+
hideMenu(): void;
|
|
398
|
+
blockBodyScroll(): void;
|
|
399
|
+
unblockBodyScroll(): void;
|
|
400
|
+
get containerClass(): {
|
|
401
|
+
'layout-overlay': boolean;
|
|
402
|
+
'layout-static': boolean;
|
|
403
|
+
'layout-static-inactive': boolean | undefined;
|
|
404
|
+
'layout-overlay-active': boolean | undefined;
|
|
405
|
+
'layout-mobile-active': boolean | undefined;
|
|
406
|
+
};
|
|
407
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppLayout, never>;
|
|
408
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppLayout, "app-layout", never, {}, {}, never, never, true, never>;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Main menu component that displays filtered menu items.
|
|
413
|
+
* Menu is automatically filtered based on user permissions using the permission checker (logicNode pattern).
|
|
414
|
+
* The filtering happens internally in LayoutService via computed signal.
|
|
415
|
+
*/
|
|
416
|
+
declare class AppMenu {
|
|
417
|
+
private readonly layoutService;
|
|
418
|
+
/**
|
|
419
|
+
* Filtered menu items from layout service.
|
|
420
|
+
* This signal is computed in LayoutService and automatically updates when:
|
|
421
|
+
* - Raw menu changes (setMenu called)
|
|
422
|
+
* - Permission state changes (user permissions updated)
|
|
423
|
+
*/
|
|
424
|
+
readonly menuItems: _angular_core.Signal<_flusys_ng_layout.IMenuItem[]>;
|
|
425
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppMenu, never>;
|
|
426
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppMenu, "app-menu", never, {}, {}, never, never, true, never>;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
declare class AppMenuitem {
|
|
430
|
+
readonly item: _angular_core.InputSignal<IMenuItem>;
|
|
431
|
+
readonly index: _angular_core.InputSignal<number>;
|
|
432
|
+
readonly parentKey: _angular_core.InputSignal<string>;
|
|
433
|
+
private readonly router;
|
|
434
|
+
private readonly layoutService;
|
|
435
|
+
private readonly authState;
|
|
436
|
+
private readonly destroyRef;
|
|
437
|
+
readonly active: _angular_core.WritableSignal<boolean>;
|
|
438
|
+
readonly key: _angular_core.Signal<string>;
|
|
439
|
+
readonly routerLink: _angular_core.Signal<string[]>;
|
|
440
|
+
readonly routerLinkActiveOptions: _angular_core.Signal<{
|
|
441
|
+
readonly paths: "exact" | "subset";
|
|
442
|
+
readonly queryParams: "ignored";
|
|
443
|
+
readonly matrixParams: "ignored";
|
|
444
|
+
readonly fragment: "ignored";
|
|
445
|
+
}>;
|
|
446
|
+
constructor();
|
|
447
|
+
private updateActiveStateFromRoute;
|
|
448
|
+
itemClick(): void;
|
|
449
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppMenuitem, never>;
|
|
450
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppMenuitem, "[app-menuitem]", never, { "item": { "alias": "item"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": true; "isSignal": true; }; "parentKey": { "alias": "parentKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/** Company/branch switcher displayed in top bar */
|
|
454
|
+
declare class AppCompanyBranchSelector {
|
|
455
|
+
private readonly destroyRef;
|
|
456
|
+
private readonly authState;
|
|
457
|
+
private readonly authApi;
|
|
458
|
+
private readonly messageService;
|
|
459
|
+
readonly currentCompanyName: _angular_core.Signal<string>;
|
|
460
|
+
readonly currentBranchName: _angular_core.Signal<string | null>;
|
|
461
|
+
readonly companies: _angular_core.WritableSignal<ICompanyInfo[]>;
|
|
462
|
+
readonly branches: _angular_core.WritableSignal<IBranchInfo[]>;
|
|
463
|
+
readonly selectedCompanyId: _angular_core.WritableSignal<string | null>;
|
|
464
|
+
readonly selectedBranchId: _angular_core.WritableSignal<string | null>;
|
|
465
|
+
readonly isLoadingCompanies: _angular_core.WritableSignal<boolean>;
|
|
466
|
+
readonly isLoadingBranches: _angular_core.WritableSignal<boolean>;
|
|
467
|
+
readonly isSwitching: _angular_core.WritableSignal<boolean>;
|
|
468
|
+
readonly canSwitch: _angular_core.Signal<boolean>;
|
|
469
|
+
onPanelOpen(): void;
|
|
470
|
+
private loadCompanies;
|
|
471
|
+
onCompanyChange(companyId: string | null): void;
|
|
472
|
+
onBranchChange(branchId: string | null): void;
|
|
473
|
+
private loadBranches;
|
|
474
|
+
onSwitch(): void;
|
|
475
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppCompanyBranchSelector, never>;
|
|
476
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppCompanyBranchSelector, "app-company-branch-selector", never, {}, {}, never, never, true, never>;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
declare class AppLauncher {
|
|
480
|
+
readonly layoutService: LayoutService;
|
|
481
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppLauncher, never>;
|
|
482
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppLauncher, "app-launcher", never, {}, {}, never, never, true, never>;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
declare class AppProfile {
|
|
486
|
+
private readonly destroyRef;
|
|
487
|
+
private readonly authState;
|
|
488
|
+
private readonly authApi;
|
|
489
|
+
private readonly messageService;
|
|
490
|
+
userName: _angular_core.Signal<string>;
|
|
491
|
+
userEmail: _angular_core.Signal<string>;
|
|
492
|
+
profilePicture: _angular_core.Signal<string>;
|
|
493
|
+
logout(): void;
|
|
494
|
+
copySignUpLink(): void;
|
|
495
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppProfile, never>;
|
|
496
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppProfile, "app-profile", never, {}, {}, never, never, true, never>;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/** Filter launcher apps based on user permission codes */
|
|
500
|
+
declare function filterAppsByPermissions(apps: ILauncherApp[], permissionCodes: string[]): ILauncherApp[];
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Filter menu items based on permission and role checker
|
|
504
|
+
*
|
|
505
|
+
* @param items - Array of menu items to filter
|
|
506
|
+
* @param hasPermission - Function to check if user has permission
|
|
507
|
+
* @param hasRole - Function to check if user has role (optional, defaults to always false)
|
|
508
|
+
* @returns Filtered menu items array
|
|
509
|
+
*
|
|
510
|
+
* @example
|
|
511
|
+
* ```typescript
|
|
512
|
+
* const filteredMenu = filterMenuByPermissions(
|
|
513
|
+
* menuItems,
|
|
514
|
+
* (actionCode) => permissionState.hasAction(actionCode)
|
|
515
|
+
* );
|
|
516
|
+
* ```
|
|
517
|
+
*/
|
|
518
|
+
declare function filterMenuByPermissions(items: IMenuItem[], permissionCode: string[]): IMenuItem[];
|
|
519
|
+
|
|
520
|
+
declare const GreenTheme: _primeuix_themes_types.Preset;
|
|
521
|
+
|
|
522
|
+
declare const NavyBlueTheme: _primeuix_themes_types.Preset;
|
|
523
|
+
|
|
524
|
+
export { AppCompanyBranchSelector, AppConfigurator, AppFloatingConfigurator, AppFooter, AppLauncher, AppLayout, AppMenu, AppMenuitem, AppProfile, AppSidebar, AppTopbar, GreenTheme, LAYOUT_AUTH_API, LAYOUT_AUTH_STATE, LayoutPersistenceService, LayoutService, NavyBlueTheme, filterAppsByPermissions, filterMenuByPermissions };
|
|
525
|
+
export type { CompanyProfile, IBranchInfo, ICompanyInfo, ILauncherApp, ILayoutAuthApi, ILayoutAuthState, IMenuItem, IUserInfo, LayoutConfig, LayoutState, MenuChangeEvent, UserProfile };
|