@flusys/ng-layout 4.0.0-rc → 4.0.2
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/README.md +138 -15
- package/assets/layout/_footer.scss +7 -0
- package/assets/layout/_responsive.scss +18 -0
- package/assets/layout/_topbar.scss +159 -128
- package/assets/layout/_topbar_nav.scss +350 -0
- package/assets/layout/layout.scss +2 -1
- package/fesm2022/flusys-ng-layout.mjs +1031 -468
- package/fesm2022/flusys-ng-layout.mjs.map +1 -1
- package/package.json +5 -4
- package/types/flusys-ng-layout.d.ts +63 -7
package/package.json
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flusys/ng-layout",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
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": ">=4.0.
|
|
11
|
-
"@flusys/ng-shared": ">=4.0.
|
|
10
|
+
"@flusys/ng-core": ">=4.0.2",
|
|
11
|
+
"@flusys/ng-shared": ">=4.0.2",
|
|
12
12
|
"@primeuix/themes": ">=1.0.0",
|
|
13
13
|
"primeicons": ">=7.0.0",
|
|
14
14
|
"primeng": ">=21.0.0",
|
|
15
15
|
"tailwindcss": ">=4.0.0",
|
|
16
|
-
"tailwindcss-primeui": ">=0.6.0"
|
|
16
|
+
"tailwindcss-primeui": ">=0.6.0",
|
|
17
|
+
"rxjs": "^7.8.0"
|
|
17
18
|
},
|
|
18
19
|
"sideEffects": false,
|
|
19
20
|
"module": "fesm2022/flusys-ng-layout.mjs",
|
|
@@ -9,6 +9,7 @@ import * as _primeuix_themes_types from '@primeuix/themes/types';
|
|
|
9
9
|
declare class AppFooter {
|
|
10
10
|
private readonly layoutService;
|
|
11
11
|
readonly appName: string;
|
|
12
|
+
readonly displayLogo: string;
|
|
12
13
|
readonly authorName: string;
|
|
13
14
|
readonly authorUrl: string;
|
|
14
15
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppFooter, never>;
|
|
@@ -81,14 +82,25 @@ declare const LAYOUT_AUTH_API: InjectionToken<ILayoutAuthApi>;
|
|
|
81
82
|
declare const LAYOUT_NOTIFICATION_BELL: InjectionToken<Type<unknown>>;
|
|
82
83
|
declare const LAYOUT_LANGUAGE_SELECTOR: InjectionToken<Type<unknown>>;
|
|
83
84
|
declare const LAYOUT_LANGUAGE_SELECTOR_PANEL: InjectionToken<Type<unknown>>;
|
|
85
|
+
declare const LAYOUT_SEARCHBAR: InjectionToken<Type<unknown>>;
|
|
84
86
|
declare const LAYOUT_IS_RTL: InjectionToken<Signal<boolean>>;
|
|
87
|
+
interface ISearchSuggestion {
|
|
88
|
+
label: string;
|
|
89
|
+
icon?: string;
|
|
90
|
+
routerLink?: string[];
|
|
91
|
+
data?: unknown;
|
|
92
|
+
}
|
|
93
|
+
interface ISearchAdapter {
|
|
94
|
+
getSuggestions(query: string): Observable<ISearchSuggestion[]>;
|
|
95
|
+
}
|
|
96
|
+
declare const LAYOUT_SEARCH_ADAPTER: InjectionToken<ISearchAdapter>;
|
|
85
97
|
|
|
86
98
|
interface LayoutConfig {
|
|
87
99
|
preset?: string;
|
|
88
100
|
primary?: string;
|
|
89
101
|
surface?: string | null;
|
|
90
102
|
darkTheme?: boolean;
|
|
91
|
-
menuMode?: 'static' | 'overlay';
|
|
103
|
+
menuMode?: 'static' | 'overlay' | 'topbar';
|
|
92
104
|
}
|
|
93
105
|
interface LayoutState {
|
|
94
106
|
staticMenuDesktopInactive?: boolean;
|
|
@@ -96,6 +108,7 @@ interface LayoutState {
|
|
|
96
108
|
configSidebarVisible?: boolean;
|
|
97
109
|
staticMenuMobileActive?: boolean;
|
|
98
110
|
menuHoverActive?: boolean;
|
|
111
|
+
topbarMenuVisible?: boolean;
|
|
99
112
|
}
|
|
100
113
|
interface MenuChangeEvent {
|
|
101
114
|
key: string;
|
|
@@ -137,6 +150,7 @@ declare class LayoutService {
|
|
|
137
150
|
readonly userProfile: _angular_core.Signal<UserProfile | null>;
|
|
138
151
|
readonly companyProfile: _angular_core.Signal<CompanyProfile | null>;
|
|
139
152
|
readonly appName: string;
|
|
153
|
+
readonly appLogo: string;
|
|
140
154
|
readonly authorName: string;
|
|
141
155
|
readonly authorUrl: string;
|
|
142
156
|
readonly menu: _angular_core.Signal<IMenuItem[]>;
|
|
@@ -147,12 +161,14 @@ declare class LayoutService {
|
|
|
147
161
|
readonly getPrimary: _angular_core.Signal<string | undefined>;
|
|
148
162
|
readonly getSurface: _angular_core.Signal<string | null | undefined>;
|
|
149
163
|
readonly isOverlay: _angular_core.Signal<boolean>;
|
|
164
|
+
readonly isTopbar: _angular_core.Signal<boolean>;
|
|
150
165
|
readonly userName: _angular_core.Signal<string>;
|
|
151
166
|
readonly userEmail: _angular_core.Signal<string>;
|
|
152
167
|
readonly userProfilePictureUrl: _angular_core.Signal<string | null>;
|
|
153
168
|
readonly companyLogoUrl: _angular_core.Signal<string | null>;
|
|
154
169
|
readonly isAuthenticated: _angular_core.Signal<boolean>;
|
|
155
170
|
readonly companyName: _angular_core.Signal<string>;
|
|
171
|
+
readonly displayLogo: _angular_core.Signal<string>;
|
|
156
172
|
private readonly configUpdate;
|
|
157
173
|
private readonly overlayOpen;
|
|
158
174
|
private readonly menuSource;
|
|
@@ -263,7 +279,7 @@ declare class AppConfigurator {
|
|
|
263
279
|
readonly showMenuModeButton: _angular_core.WritableSignal<boolean>;
|
|
264
280
|
readonly menuModeOptions: _angular_core.Signal<{
|
|
265
281
|
label: string;
|
|
266
|
-
value:
|
|
282
|
+
value: "static" | "overlay" | "topbar";
|
|
267
283
|
}[]>;
|
|
268
284
|
constructor();
|
|
269
285
|
readonly surfaces: SurfacesType[];
|
|
@@ -271,7 +287,7 @@ declare class AppConfigurator {
|
|
|
271
287
|
readonly selectedSurfaceColor: _angular_core.Signal<string | null | undefined>;
|
|
272
288
|
isSurfaceSelected(surfaceName: string | undefined): boolean;
|
|
273
289
|
readonly selectedPreset: _angular_core.Signal<string | undefined>;
|
|
274
|
-
readonly menuMode: _angular_core.Signal<"static" | "overlay" | undefined>;
|
|
290
|
+
readonly menuMode: _angular_core.Signal<"static" | "overlay" | "topbar" | undefined>;
|
|
275
291
|
readonly primaryColors: _angular_core.Signal<SurfacesType[]>;
|
|
276
292
|
getPresetExt(): {
|
|
277
293
|
semantic: {
|
|
@@ -324,7 +340,7 @@ declare class AppConfigurator {
|
|
|
324
340
|
updateColors(event: MouseEvent, type: string, color: SurfacesType): void;
|
|
325
341
|
applyTheme(type: string, color: SurfacesType): void;
|
|
326
342
|
onPresetChange(event: string): void;
|
|
327
|
-
onMenuModeChange(event: 'static' | 'overlay'): void;
|
|
343
|
+
onMenuModeChange(event: 'static' | 'overlay' | 'topbar'): void;
|
|
328
344
|
private translate;
|
|
329
345
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppConfigurator, never>;
|
|
330
346
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppConfigurator, "app-configurator", never, {}, {}, never, never, true, never>;
|
|
@@ -354,9 +370,11 @@ declare class AppLayout {
|
|
|
354
370
|
readonly containerClass: _angular_core.Signal<{
|
|
355
371
|
'layout-overlay': boolean;
|
|
356
372
|
'layout-static': boolean;
|
|
373
|
+
'layout-topbar-mode': boolean;
|
|
357
374
|
'layout-static-inactive': boolean | undefined;
|
|
358
375
|
'layout-overlay-active': boolean | undefined;
|
|
359
376
|
'layout-mobile-active': boolean | undefined;
|
|
377
|
+
'layout-topbar-nav-hidden': boolean;
|
|
360
378
|
}>;
|
|
361
379
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppLayout, never>;
|
|
362
380
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppLayout, "app-layout", never, {}, {}, never, never, true, never>;
|
|
@@ -406,8 +424,9 @@ declare class AppMenuitem {
|
|
|
406
424
|
readonly index: _angular_core.InputSignal<number>;
|
|
407
425
|
readonly parentKey: _angular_core.InputSignal<string>;
|
|
408
426
|
private readonly router;
|
|
409
|
-
|
|
427
|
+
readonly layoutService: LayoutService;
|
|
410
428
|
private readonly destroyRef;
|
|
429
|
+
private readonly parentLink;
|
|
411
430
|
private readonly _active;
|
|
412
431
|
readonly active: _angular_core.Signal<boolean>;
|
|
413
432
|
readonly key: _angular_core.Signal<string>;
|
|
@@ -419,6 +438,8 @@ declare class AppMenuitem {
|
|
|
419
438
|
readonly fragment: "ignored";
|
|
420
439
|
}>;
|
|
421
440
|
constructor();
|
|
441
|
+
onMouseEnter(): void;
|
|
442
|
+
private updateSubmenuPosition;
|
|
422
443
|
private updateActiveStateFromRoute;
|
|
423
444
|
itemClick(): void;
|
|
424
445
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppMenuitem, never>;
|
|
@@ -438,14 +459,19 @@ declare class AppTopbar {
|
|
|
438
459
|
readonly layoutService: LayoutService;
|
|
439
460
|
readonly notificationBellComponent: _angular_core.Type<unknown> | null;
|
|
440
461
|
readonly languageSelectorComponent: _angular_core.Type<unknown> | null;
|
|
462
|
+
private readonly searchAdapter;
|
|
463
|
+
readonly hasSearchAdapter: _angular_core.Signal<boolean>;
|
|
441
464
|
private readonly configContainer;
|
|
465
|
+
private readonly navContainer;
|
|
442
466
|
readonly activePanel: _angular_core.WritableSignal<ActivePanel>;
|
|
443
467
|
constructor();
|
|
444
468
|
readonly companyName: _angular_core.Signal<string>;
|
|
469
|
+
readonly displayLogo: _angular_core.Signal<string>;
|
|
445
470
|
readonly enableCompanyFeature: boolean;
|
|
446
471
|
toggleDarkMode(): void;
|
|
447
472
|
togglePanel(panel: ActivePanel): void;
|
|
448
473
|
private handleOutsideClick;
|
|
474
|
+
private recalculateHoveredSubmenu;
|
|
449
475
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppTopbar, never>;
|
|
450
476
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppTopbar, "app-topbar", never, {}, {}, never, never, true, never>;
|
|
451
477
|
}
|
|
@@ -510,6 +536,7 @@ declare class AppProfile {
|
|
|
510
536
|
private readonly layoutService;
|
|
511
537
|
private readonly messageService;
|
|
512
538
|
private readonly translateAdapter;
|
|
539
|
+
private readonly appConfig;
|
|
513
540
|
private readonly document;
|
|
514
541
|
private readonly elementRef;
|
|
515
542
|
private readonly _isActive;
|
|
@@ -519,6 +546,7 @@ declare class AppProfile {
|
|
|
519
546
|
readonly userName: _angular_core.Signal<string>;
|
|
520
547
|
readonly userEmail: _angular_core.Signal<string>;
|
|
521
548
|
readonly profilePicture: _angular_core.Signal<string>;
|
|
549
|
+
readonly signUpEnabled: _angular_core.Signal<boolean>;
|
|
522
550
|
logout(): void;
|
|
523
551
|
copySignUpLink(): void;
|
|
524
552
|
private translate;
|
|
@@ -526,6 +554,34 @@ declare class AppProfile {
|
|
|
526
554
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppProfile, "app-profile", never, {}, {}, never, never, true, never>;
|
|
527
555
|
}
|
|
528
556
|
|
|
557
|
+
declare class AppSearchbar {
|
|
558
|
+
readonly layoutService: LayoutService;
|
|
559
|
+
private readonly router;
|
|
560
|
+
private readonly searchAdapter;
|
|
561
|
+
private readonly destroyRef;
|
|
562
|
+
private readonly document;
|
|
563
|
+
readonly searchTerm: _angular_core.WritableSignal<string>;
|
|
564
|
+
readonly suggestionsOpen: _angular_core.WritableSignal<boolean>;
|
|
565
|
+
readonly suggestions: _angular_core.WritableSignal<ISearchSuggestion[]>;
|
|
566
|
+
readonly focusedIndex: _angular_core.WritableSignal<number>;
|
|
567
|
+
readonly isSearchExpanded: _angular_core.WritableSignal<boolean>;
|
|
568
|
+
readonly isResponsive: _angular_core.WritableSignal<boolean>;
|
|
569
|
+
private readonly searchWrapper;
|
|
570
|
+
private readonly searchInput;
|
|
571
|
+
private searchTimeout?;
|
|
572
|
+
constructor();
|
|
573
|
+
onFocus(): void;
|
|
574
|
+
handleKeydown(event: KeyboardEvent): void;
|
|
575
|
+
handleEnter(): void;
|
|
576
|
+
selectSuggestion(item: ISearchSuggestion): void;
|
|
577
|
+
private closeSuggestions;
|
|
578
|
+
toggleSearch(): void;
|
|
579
|
+
private closeSearch;
|
|
580
|
+
onSearch(): void;
|
|
581
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppSearchbar, never>;
|
|
582
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppSearchbar, "app-searchbar", never, {}, {}, never, never, true, never>;
|
|
583
|
+
}
|
|
584
|
+
|
|
529
585
|
/** Filter launcher apps based on user permission codes */
|
|
530
586
|
declare function filterAppsByPermissions(apps: ILauncherApp[], permissionCodes: string[]): ILauncherApp[];
|
|
531
587
|
|
|
@@ -553,5 +609,5 @@ declare const GreenTheme: _primeuix_themes_types.Preset;
|
|
|
553
609
|
|
|
554
610
|
declare const LAYOUT_MESSAGES: Record<string, string>;
|
|
555
611
|
|
|
556
|
-
export { AppCompanyBranchSelector, AppConfigurator, AppFloatingConfigurator, AppFooter, AppLauncher, AppLayout, AppMenu, AppMenuitem, AppProfile, AppSidebar, AppTopbar, GreenTheme, LAYOUT_AUTH_API, LAYOUT_AUTH_STATE, LAYOUT_IS_RTL, LAYOUT_LANGUAGE_SELECTOR, LAYOUT_LANGUAGE_SELECTOR_PANEL, LAYOUT_MESSAGES, LAYOUT_NOTIFICATION_BELL, LayoutPersistenceService, LayoutService, NavyBlueTheme, filterAppsByPermissions, filterMenuByPermissions };
|
|
557
|
-
export type { CompanyProfile, DocumentWithViewTransition, IBranchInfo, ICompanyInfo, ILauncherApp, ILayoutAuthApi, ILayoutAuthState, IMenuItem, IUserInfo, LayoutConfig, LayoutState, MenuChangeEvent, UserProfile, ViewTransition };
|
|
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 };
|