@flusys/ng-layout 1.1.0-beta → 1.1.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/README.md +61 -4
- package/fesm2022/flusys-ng-layout.mjs +306 -414
- package/fesm2022/flusys-ng-layout.mjs.map +1 -1
- package/package.json +11 -11
- package/types/flusys-ng-layout.d.ts +122 -135
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
## Package Information
|
|
10
10
|
|
|
11
11
|
- **Package:** `@flusys/ng-layout`
|
|
12
|
+
- **Version:** 1.1.0
|
|
12
13
|
- **Dependencies:** ng-core, ng-shared
|
|
13
14
|
- **Dependents:** flusysng
|
|
14
15
|
- **Build Command:** `npm run build:ng-layout`
|
|
@@ -87,17 +88,21 @@ Recursive menu item component using attribute selector `[app-menuitem]`.
|
|
|
87
88
|
|
|
88
89
|
#### AppFooter
|
|
89
90
|
|
|
90
|
-
Displays
|
|
91
|
+
Displays product branding information from `LayoutService`:
|
|
92
|
+
- **appName** - Application name from `APP_CONFIG` or default
|
|
93
|
+
- **authorName** - Author/company name with link
|
|
94
|
+
- **authorUrl** - Link to author website
|
|
91
95
|
|
|
92
96
|
#### AppProfile
|
|
93
97
|
|
|
94
98
|
User profile dropdown in topbar.
|
|
95
99
|
|
|
96
100
|
**Features:**
|
|
97
|
-
- User info display (picture, name, email)
|
|
101
|
+
- User info display (picture, name, email) with text truncation for long values
|
|
98
102
|
- Profile route link
|
|
99
103
|
- Copy SignUp Link button (generates link with company slug)
|
|
100
104
|
- Logout button with toast feedback
|
|
105
|
+
- Responsive dropdown width (`w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[280px] max-w-[320px]`)
|
|
101
106
|
- Uses `LAYOUT_AUTH_API` and `LAYOUT_AUTH_STATE` tokens (optional injection)
|
|
102
107
|
|
|
103
108
|
#### AppCompanyBranchSelector
|
|
@@ -128,11 +133,12 @@ Company and branch switcher in topbar. Shown when company feature is enabled.
|
|
|
128
133
|
App launcher grid in topbar for quick access to related applications.
|
|
129
134
|
|
|
130
135
|
**Features:**
|
|
131
|
-
-
|
|
136
|
+
- Responsive grid: 2 columns on mobile, 3 columns on desktop (`grid-cols-2 sm:grid-cols-3`)
|
|
132
137
|
- External links (open in new tabs)
|
|
133
138
|
- Icon support: PrimeNG, Material, or image URLs
|
|
134
139
|
- Permission filtering via `permissionLogic`
|
|
135
140
|
- Only visible when `layoutService.hasApps()` is true
|
|
141
|
+
- App names truncated to prevent overflow
|
|
136
142
|
|
|
137
143
|
**Configuration:**
|
|
138
144
|
```typescript
|
|
@@ -198,6 +204,8 @@ export class AppComponent {
|
|
|
198
204
|
| `userProfile` | `Signal<UserProfile \| null>` | Current user display data |
|
|
199
205
|
| `companyProfile` | `Signal<CompanyProfile \| null>` | Current company display data |
|
|
200
206
|
| `appName` | `Signal<string>` | App name for fallback display |
|
|
207
|
+
| `authorName` | `Signal<string>` | Author/company name for footer |
|
|
208
|
+
| `authorUrl` | `Signal<string>` | Author website URL for footer |
|
|
201
209
|
| `menu` | `Computed<IMenuItem[]>` | Permission-filtered menu items |
|
|
202
210
|
| `apps` | `Computed<ILauncherApp[]>` | Permission-filtered launcher apps |
|
|
203
211
|
|
|
@@ -548,11 +556,59 @@ export class AppComponent implements OnInit {
|
|
|
548
556
|
- Theme preferences persist automatically to localStorage
|
|
549
557
|
- Test both light and dark themes for contrast
|
|
550
558
|
|
|
559
|
+
**Dark Mode CSS Variables:**
|
|
560
|
+
All components use PrimeNG CSS variables for automatic dark mode support:
|
|
561
|
+
```css
|
|
562
|
+
/* Backgrounds */
|
|
563
|
+
background-color: var(--surface-overlay); /* Dropdown panels */
|
|
564
|
+
bg-emphasis /* Hover states */
|
|
565
|
+
|
|
566
|
+
/* Text */
|
|
567
|
+
text-color /* Primary text */
|
|
568
|
+
text-muted-color /* Secondary text */
|
|
569
|
+
|
|
570
|
+
/* Borders */
|
|
571
|
+
border-surface /* Standard borders */
|
|
572
|
+
|
|
573
|
+
/* Primary colors */
|
|
574
|
+
bg-primary /* Primary backgrounds */
|
|
575
|
+
text-primary-contrast /* Text on primary */
|
|
576
|
+
```
|
|
577
|
+
|
|
551
578
|
### Responsive Design
|
|
552
579
|
- Use Tailwind for responsive utilities
|
|
553
580
|
- Layout automatically handles responsive behavior (static → overlay on mobile)
|
|
554
581
|
- Menu closes on navigation and outside clicks
|
|
555
582
|
|
|
583
|
+
**Dropdown Panel Pattern:**
|
|
584
|
+
```css
|
|
585
|
+
/* Full width on mobile, auto-width on desktop with min/max constraints */
|
|
586
|
+
class="w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[280px] max-w-[320px]"
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
**Component Responsive Widths:**
|
|
590
|
+
| Component | Pattern |
|
|
591
|
+
|-----------|---------|
|
|
592
|
+
| `AppConfigurator` | `w-[calc(100vw-2rem)] sm:w-72 max-w-72` |
|
|
593
|
+
| `AppProfile` | `w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[280px] max-w-[320px]` |
|
|
594
|
+
| `AppCompanyBranchSelector` | `w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[300px] max-w-[360px]` |
|
|
595
|
+
| `AppLauncher` | `w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[280px] max-w-[320px]` |
|
|
596
|
+
| `AppFloatingConfigurator` | Position: `top-4 md:top-8 right-2 md:right-8` |
|
|
597
|
+
|
|
598
|
+
**Grid Responsiveness:**
|
|
599
|
+
```css
|
|
600
|
+
/* 2 columns mobile, 3 columns desktop */
|
|
601
|
+
class="grid grid-cols-2 sm:grid-cols-3 gap-2"
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
**Text Truncation:**
|
|
605
|
+
```html
|
|
606
|
+
<!-- Prevent overflow on long names/emails -->
|
|
607
|
+
<div class="flex flex-col min-w-0 flex-1">
|
|
608
|
+
<span class="truncate">{{ userName() }}</span>
|
|
609
|
+
</div>
|
|
610
|
+
```
|
|
611
|
+
|
|
556
612
|
## Common Issues
|
|
557
613
|
|
|
558
614
|
### Menu Not Showing
|
|
@@ -653,5 +709,6 @@ Layout automatically handles responsive behavior. Ensure you're using the `AppLa
|
|
|
653
709
|
|
|
654
710
|
---
|
|
655
711
|
|
|
656
|
-
**Last Updated:** 2026-02-
|
|
712
|
+
**Last Updated:** 2026-02-23
|
|
713
|
+
**Version:** 1.1.0
|
|
657
714
|
**Angular Version:** 21
|