@rxap/layout 19.0.2-dev.2 → 19.0.2-dev.3
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/compodoc/changelog.html +5 -0
- package/compodoc/dependencies.html +4 -4
- package/compodoc/index.html +1 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/miscellaneous/functions.html +12 -12
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +13156 -0
- package/docs/html/.nojekyll +1 -0
- package/docs/html/assets/hierarchy.js +1 -0
- package/docs/html/assets/highlight.css +85 -0
- package/docs/html/assets/icons.js +18 -0
- package/docs/html/assets/icons.svg +1 -0
- package/docs/html/assets/main.js +60 -0
- package/docs/html/assets/navigation.js +1 -0
- package/docs/html/assets/search.js +1 -0
- package/docs/html/assets/style.css +1611 -0
- package/docs/html/classes/AppsButtonComponent.html +13 -0
- package/docs/html/classes/BaseLayoutComponent.html +2 -0
- package/docs/html/classes/DefaultHeaderComponent.html +7 -0
- package/docs/html/classes/DefaultHeaderService.html +13 -0
- package/docs/html/classes/ExternalAppsService.html +19 -0
- package/docs/html/classes/FooterComponent.html +4 -0
- package/docs/html/classes/FooterDirective.html +11 -0
- package/docs/html/classes/FooterService.html +13 -0
- package/docs/html/classes/HeaderComponent.html +5 -0
- package/docs/html/classes/HeaderDirective.html +11 -0
- package/docs/html/classes/HeaderService.html +13 -0
- package/docs/html/classes/LayoutComponent.html +5 -0
- package/docs/html/classes/LayoutService.html +16 -0
- package/docs/html/classes/LogoService.html +6 -0
- package/docs/html/classes/MinimalLayoutComponent.html +2 -0
- package/docs/html/classes/NavigationComponent.html +16 -0
- package/docs/html/classes/NavigationItemComponent.html +24 -0
- package/docs/html/classes/NavigationProgressBarComponent.html +4 -0
- package/docs/html/classes/NavigationService.html +12 -0
- package/docs/html/classes/ReleaseInfoComponent.html +5 -0
- package/docs/html/classes/SettingsButtonComponent.html +18 -0
- package/docs/html/classes/SidenavComponent.html +15 -0
- package/docs/html/classes/SidenavFooterDirective.html +3 -0
- package/docs/html/classes/SidenavHeaderDirective.html +3 -0
- package/docs/html/classes/SidenavToggleButtonComponent.html +4 -0
- package/docs/html/classes/UserProfileIconComponent.html +5 -0
- package/docs/html/functions/IsNavigationDividerItem.html +1 -0
- package/docs/html/functions/IsNavigationInsertItem.html +1 -0
- package/docs/html/functions/IsNavigationItem.html +1 -0
- package/docs/html/functions/provideExternalApps.html +1 -0
- package/docs/html/functions/provideLayout.html +1 -0
- package/docs/html/functions/withDefaultHeaderComponent.html +1 -0
- package/docs/html/functions/withDefaultHeaderItems.html +1 -0
- package/docs/html/functions/withFooterComponents.html +1 -0
- package/docs/html/functions/withHeaderComponents.html +1 -0
- package/docs/html/functions/withNavigationConfig.html +1 -0
- package/docs/html/functions/withNavigationInserts.html +1 -0
- package/docs/html/functions/withReleaseInfoModules.html +1 -0
- package/docs/html/functions/withSettingsMenuItems.html +1 -0
- package/docs/html/functions/withUserProfileDataSource.html +1 -0
- package/docs/html/index.html +111 -0
- package/docs/html/interfaces/NavigationDividerItem.html +3 -0
- package/docs/html/interfaces/NavigationInsertItem.html +2 -0
- package/docs/html/interfaces/NavigationItem.html +6 -0
- package/docs/html/interfaces/NavigationStatus.html +2 -0
- package/docs/html/interfaces/ReleaseInfoModule.html +4 -0
- package/docs/html/interfaces/SettingsMenuItem.html +4 -0
- package/docs/html/modules.html +1 -0
- package/docs/html/types/DefaultHeaderItemComponent.html +1 -0
- package/docs/html/types/ExternalApp.html +1 -0
- package/docs/html/types/ExtractUsernameFromProfileFn.html +1 -0
- package/docs/html/types/Navigation.html +1 -0
- package/docs/html/types/NavigationWithInserts.html +1 -0
- package/docs/html/types/SettingsMenuItemComponent.html +1 -0
- package/docs/html/variables/EXTRACT_USERNAME_FROM_PROFILE.html +1 -0
- package/docs/html/variables/RXAP_DEFAULT_HEADER_ITEM_COMPONENT.html +1 -0
- package/docs/html/variables/RXAP_EXTERNAL_APP.html +1 -0
- package/docs/html/variables/RXAP_EXTERNAL_APP_FILTER.html +1 -0
- package/docs/html/variables/RXAP_FOOTER_COMPONENT.html +1 -0
- package/docs/html/variables/RXAP_HEADER_COMPONENT.html +1 -0
- package/docs/html/variables/RXAP_LAYOUT_APPS_GRID.html +1 -0
- package/docs/html/variables/RXAP_LOGO_CONFIG.html +1 -0
- package/docs/html/variables/RXAP_NAVIGATION_CONFIG.html +1 -0
- package/docs/html/variables/RXAP_NAVIGATION_CONFIG_INSERTS.html +1 -0
- package/docs/html/variables/RXAP_RELEASE_INFO_MODULE.html +1 -0
- package/docs/html/variables/RXAP_SETTINGS_MENU_ITEM.html +1 -0
- package/docs/html/variables/RXAP_SETTINGS_MENU_ITEM_COMPONENT.html +1 -0
- package/docs/html/variables/RXAP_USER_PROFILE_DATA_SOURCE.html +1 -0
- package/docs/markdown/README.md +305 -0
- package/docs/markdown/classes/AppsButtonComponent.md +83 -0
- package/docs/markdown/classes/BaseLayoutComponent.md +19 -0
- package/docs/markdown/classes/DefaultHeaderComponent.md +59 -0
- package/docs/markdown/classes/DefaultHeaderService.md +87 -0
- package/docs/markdown/classes/ExternalAppsService.md +251 -0
- package/docs/markdown/classes/FooterComponent.md +35 -0
- package/docs/markdown/classes/FooterDirective.md +65 -0
- package/docs/markdown/classes/FooterService.md +87 -0
- package/docs/markdown/classes/HeaderComponent.md +43 -0
- package/docs/markdown/classes/HeaderDirective.md +65 -0
- package/docs/markdown/classes/HeaderService.md +87 -0
- package/docs/markdown/classes/LayoutComponent.md +43 -0
- package/docs/markdown/classes/LayoutService.md +149 -0
- package/docs/markdown/classes/LogoService.md +51 -0
- package/docs/markdown/classes/MinimalLayoutComponent.md +19 -0
- package/docs/markdown/classes/NavigationComponent.md +139 -0
- package/docs/markdown/classes/NavigationItemComponent.md +195 -0
- package/docs/markdown/classes/NavigationProgressBarComponent.md +35 -0
- package/docs/markdown/classes/NavigationService.md +205 -0
- package/docs/markdown/classes/ReleaseInfoComponent.md +47 -0
- package/docs/markdown/classes/SettingsButtonComponent.md +229 -0
- package/docs/markdown/classes/SidenavComponent.md +135 -0
- package/docs/markdown/classes/SidenavFooterDirective.md +35 -0
- package/docs/markdown/classes/SidenavHeaderDirective.md +35 -0
- package/docs/markdown/classes/SidenavToggleButtonComponent.md +39 -0
- package/docs/markdown/classes/UserProfileIconComponent.md +47 -0
- package/docs/markdown/functions/IsNavigationDividerItem.md +21 -0
- package/docs/markdown/functions/IsNavigationInsertItem.md +21 -0
- package/docs/markdown/functions/IsNavigationItem.md +21 -0
- package/docs/markdown/functions/provideExternalApps.md +21 -0
- package/docs/markdown/functions/provideLayout.md +21 -0
- package/docs/markdown/functions/withDefaultHeaderComponent.md +15 -0
- package/docs/markdown/functions/withDefaultHeaderItems.md +21 -0
- package/docs/markdown/functions/withFooterComponents.md +21 -0
- package/docs/markdown/functions/withHeaderComponents.md +21 -0
- package/docs/markdown/functions/withNavigationConfig.md +21 -0
- package/docs/markdown/functions/withNavigationInserts.md +21 -0
- package/docs/markdown/functions/withReleaseInfoModules.md +21 -0
- package/docs/markdown/functions/withSettingsMenuItems.md +21 -0
- package/docs/markdown/functions/withUserProfileDataSource.md +25 -0
- package/docs/markdown/globals.md +86 -0
- package/docs/markdown/interfaces/NavigationDividerItem.md +25 -0
- package/docs/markdown/interfaces/NavigationInsertItem.md +17 -0
- package/docs/markdown/interfaces/NavigationItem.md +61 -0
- package/docs/markdown/interfaces/NavigationStatus.md +27 -0
- package/docs/markdown/interfaces/ReleaseInfoModule.md +33 -0
- package/docs/markdown/interfaces/SettingsMenuItem.md +37 -0
- package/docs/markdown/type-aliases/DefaultHeaderItemComponent.md +11 -0
- package/docs/markdown/type-aliases/ExternalApp.md +11 -0
- package/docs/markdown/type-aliases/ExtractUsernameFromProfileFn.md +25 -0
- package/docs/markdown/type-aliases/Navigation.md +11 -0
- package/docs/markdown/type-aliases/NavigationWithInserts.md +11 -0
- package/docs/markdown/type-aliases/SettingsMenuItemComponent.md +11 -0
- package/docs/markdown/variables/EXTRACT_USERNAME_FROM_PROFILE.md +11 -0
- package/docs/markdown/variables/RXAP_DEFAULT_HEADER_ITEM_COMPONENT.md +11 -0
- package/docs/markdown/variables/RXAP_EXTERNAL_APP.md +11 -0
- package/docs/markdown/variables/RXAP_EXTERNAL_APP_FILTER.md +11 -0
- package/docs/markdown/variables/RXAP_FOOTER_COMPONENT.md +11 -0
- package/docs/markdown/variables/RXAP_HEADER_COMPONENT.md +11 -0
- package/docs/markdown/variables/RXAP_LAYOUT_APPS_GRID.md +11 -0
- package/docs/markdown/variables/RXAP_LOGO_CONFIG.md +11 -0
- package/docs/markdown/variables/RXAP_NAVIGATION_CONFIG.md +11 -0
- package/docs/markdown/variables/RXAP_NAVIGATION_CONFIG_INSERTS.md +11 -0
- package/docs/markdown/variables/RXAP_RELEASE_INFO_MODULE.md +11 -0
- package/docs/markdown/variables/RXAP_SETTINGS_MENU_ITEM.md +11 -0
- package/docs/markdown/variables/RXAP_SETTINGS_MENU_ITEM_COMPONENT.md +11 -0
- package/docs/markdown/variables/RXAP_USER_PROFILE_DATA_SOURCE.md +11 -0
- package/docs/wiki/Class.AppsButtonComponent.md +79 -0
- package/docs/wiki/Class.BaseLayoutComponent.md +15 -0
- package/docs/wiki/Class.DefaultHeaderComponent.md +55 -0
- package/docs/wiki/Class.DefaultHeaderService.md +83 -0
- package/docs/wiki/Class.ExternalAppsService.md +247 -0
- package/docs/wiki/Class.FooterComponent.md +31 -0
- package/docs/wiki/Class.FooterDirective.md +61 -0
- package/docs/wiki/Class.FooterService.md +83 -0
- package/docs/wiki/Class.HeaderComponent.md +39 -0
- package/docs/wiki/Class.HeaderDirective.md +61 -0
- package/docs/wiki/Class.HeaderService.md +83 -0
- package/docs/wiki/Class.LayoutComponent.md +39 -0
- package/docs/wiki/Class.LayoutService.md +145 -0
- package/docs/wiki/Class.LogoService.md +47 -0
- package/docs/wiki/Class.MinimalLayoutComponent.md +15 -0
- package/docs/wiki/Class.NavigationComponent.md +135 -0
- package/docs/wiki/Class.NavigationItemComponent.md +191 -0
- package/docs/wiki/Class.NavigationProgressBarComponent.md +31 -0
- package/docs/wiki/Class.NavigationService.md +201 -0
- package/docs/wiki/Class.ReleaseInfoComponent.md +43 -0
- package/docs/wiki/Class.SettingsButtonComponent.md +225 -0
- package/docs/wiki/Class.SidenavComponent.md +131 -0
- package/docs/wiki/Class.SidenavFooterDirective.md +31 -0
- package/docs/wiki/Class.SidenavHeaderDirective.md +31 -0
- package/docs/wiki/Class.SidenavToggleButtonComponent.md +35 -0
- package/docs/wiki/Class.UserProfileIconComponent.md +43 -0
- package/docs/wiki/Function.IsNavigationDividerItem.md +17 -0
- package/docs/wiki/Function.IsNavigationInsertItem.md +17 -0
- package/docs/wiki/Function.IsNavigationItem.md +17 -0
- package/docs/wiki/Function.provideExternalApps.md +17 -0
- package/docs/wiki/Function.provideLayout.md +17 -0
- package/docs/wiki/Function.withDefaultHeaderComponent.md +11 -0
- package/docs/wiki/Function.withDefaultHeaderItems.md +17 -0
- package/docs/wiki/Function.withFooterComponents.md +17 -0
- package/docs/wiki/Function.withHeaderComponents.md +17 -0
- package/docs/wiki/Function.withNavigationConfig.md +17 -0
- package/docs/wiki/Function.withNavigationInserts.md +17 -0
- package/docs/wiki/Function.withReleaseInfoModules.md +17 -0
- package/docs/wiki/Function.withSettingsMenuItems.md +17 -0
- package/docs/wiki/Function.withUserProfileDataSource.md +21 -0
- package/docs/wiki/Home.md +301 -0
- package/docs/wiki/Interface.NavigationDividerItem.md +21 -0
- package/docs/wiki/Interface.NavigationInsertItem.md +13 -0
- package/docs/wiki/Interface.NavigationItem.md +57 -0
- package/docs/wiki/Interface.NavigationStatus.md +23 -0
- package/docs/wiki/Interface.ReleaseInfoModule.md +29 -0
- package/docs/wiki/Interface.SettingsMenuItem.md +33 -0
- package/docs/wiki/TypeAlias.DefaultHeaderItemComponent.md +7 -0
- package/docs/wiki/TypeAlias.ExternalApp.md +7 -0
- package/docs/wiki/TypeAlias.ExtractUsernameFromProfileFn.md +21 -0
- package/docs/wiki/TypeAlias.Navigation.md +7 -0
- package/docs/wiki/TypeAlias.NavigationWithInserts.md +7 -0
- package/docs/wiki/TypeAlias.SettingsMenuItemComponent.md +7 -0
- package/docs/wiki/Variable.EXTRACT_USERNAME_FROM_PROFILE.md +7 -0
- package/docs/wiki/Variable.RXAP_DEFAULT_HEADER_ITEM_COMPONENT.md +7 -0
- package/docs/wiki/Variable.RXAP_EXTERNAL_APP.md +7 -0
- package/docs/wiki/Variable.RXAP_EXTERNAL_APP_FILTER.md +7 -0
- package/docs/wiki/Variable.RXAP_FOOTER_COMPONENT.md +7 -0
- package/docs/wiki/Variable.RXAP_HEADER_COMPONENT.md +7 -0
- package/docs/wiki/Variable.RXAP_LAYOUT_APPS_GRID.md +7 -0
- package/docs/wiki/Variable.RXAP_LOGO_CONFIG.md +7 -0
- package/docs/wiki/Variable.RXAP_NAVIGATION_CONFIG.md +7 -0
- package/docs/wiki/Variable.RXAP_NAVIGATION_CONFIG_INSERTS.md +7 -0
- package/docs/wiki/Variable.RXAP_RELEASE_INFO_MODULE.md +7 -0
- package/docs/wiki/Variable.RXAP_SETTINGS_MENU_ITEM.md +7 -0
- package/docs/wiki/Variable.RXAP_SETTINGS_MENU_ITEM_COMPONENT.md +7 -0
- package/docs/wiki/Variable.RXAP_USER_PROFILE_DATA_SOURCE.md +7 -0
- package/docs/wiki/_Sidebar.md +82 -0
- package/docs/wiki/globals.md +82 -0
- package/package.json +10 -10
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
**@rxap/layout v19.0.2-dev.3**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
This library provides a set of Angular components and services for creating consistent and configurable application layouts, including headers, footers, side navigation, and content areas. It offers features such as dynamic navigation, external application integration, and customizable themes. The library also includes directives for extending header and footer areas with custom content.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@rxap/layout)
|
|
8
|
+
[](https://commitizen.github.io/cz-cli/)
|
|
9
|
+
[](https://github.com/prettier/prettier)
|
|
10
|
+

|
|
11
|
+

|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
- [Installation](#installation)
|
|
15
|
+
- [Get started](#get-started)
|
|
16
|
+
- [Generators](#generators)
|
|
17
|
+
- [init](#init)
|
|
18
|
+
|
|
19
|
+
# Installation
|
|
20
|
+
|
|
21
|
+
**Add the package to your workspace:**
|
|
22
|
+
```bash
|
|
23
|
+
yarn add @rxap/layout
|
|
24
|
+
```
|
|
25
|
+
**Install peer dependencies:**
|
|
26
|
+
```bash
|
|
27
|
+
yarn add @angular/animations@^19.1.3 @angular/cdk@^19.1.1 @angular/common@^19.1.3 @angular/core@^19.1.3 @angular/material@^19.1.1 @angular/router@^19.1.3 @rxap/browser-utilities@^1.1.11-dev.0 @rxap/config@^19.0.2-dev.1 @rxap/data-source@^19.0.2-dev.1 @rxap/environment@^19.0.2-dev.0 @rxap/material-directives@^19.0.2-dev.1 @rxap/ngx-pub-sub@^19.0.2-dev.0 @rxap/ngx-theme@^19.0.2-dev.1 @rxap/pattern@^1.1.12-dev.0 @rxap/utilities@^16.4.3-dev.0 rxjs@^7.8.1
|
|
28
|
+
```
|
|
29
|
+
**Execute the init generator:**
|
|
30
|
+
```bash
|
|
31
|
+
yarn nx g @rxap/layout:init
|
|
32
|
+
```
|
|
33
|
+
# Get started
|
|
34
|
+
|
|
35
|
+
## Layout
|
|
36
|
+
|
|
37
|
+
Create a new file `layout.routes.ts` in the `app` folder. This file will contain all child routes that should be loaded within the layout component.
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { LayoutComponent, provideLayout } from '@rxap/layout';
|
|
41
|
+
|
|
42
|
+
const ROUTES: Route[] = [
|
|
43
|
+
{
|
|
44
|
+
path: '',
|
|
45
|
+
component: LayoutComponent,
|
|
46
|
+
children: [ ],
|
|
47
|
+
providers: [ provideLayout() ],
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Import the layout routes into the `app.routes.ts` file.
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
export const appRoutes: Route[] = [
|
|
56
|
+
{
|
|
57
|
+
path: '',
|
|
58
|
+
loadChildren: () => import('./layout.routes'),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
path: '**',
|
|
62
|
+
redirectTo: '',
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Navigation
|
|
68
|
+
|
|
69
|
+
Create a new file `app.navigation.ts` in the `app` folder. This file will contain the navigation items that should be displayed in the layout component.
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
export const APP_NAVIGATION: () => NavigationWithInserts = () => [];
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Provide the app navigation in the layout routes:
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
import {
|
|
79
|
+
LayoutComponent,
|
|
80
|
+
ProvideNavigationConfig,
|
|
81
|
+
withNavigationService,
|
|
82
|
+
} from '@rxap/layout';
|
|
83
|
+
import { APP_NAVIGATION } from './app.navigation';
|
|
84
|
+
|
|
85
|
+
const ROUTES: Route[] = [
|
|
86
|
+
{
|
|
87
|
+
path: '',
|
|
88
|
+
component: LayoutComponent,
|
|
89
|
+
children: [ ],
|
|
90
|
+
providers: [
|
|
91
|
+
provideLayout(
|
|
92
|
+
withNavigationConfig(APP_NAVIGATION),
|
|
93
|
+
),
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Navigation Item
|
|
100
|
+
|
|
101
|
+
A navigation item represents a single item in the navigation sidebar. Each item has the required properties `label` and `routerLink`. The `label` property is the text that should be displayed in the sidebar. The `routerLink` property is the path that should be navigated to when the item is clicked.
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
const item: NavigationItem = {
|
|
105
|
+
label: 'Home',
|
|
106
|
+
routerLink: '/',
|
|
107
|
+
};
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
With the `children` property, a navigation item can have child items. The child items are displayed in a dropdown menu when the parent item is clicked.
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
const item: NavigationItem = {
|
|
114
|
+
label: 'Home',
|
|
115
|
+
routerLink: '/',
|
|
116
|
+
children: [
|
|
117
|
+
{
|
|
118
|
+
label: 'Child',
|
|
119
|
+
routerLink: '/child',
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
};
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
#### Icon Property
|
|
126
|
+
|
|
127
|
+
With the `icon` property, the item can be assigned an icon. The icon is displayed to the left of the label. If the navigation sidebar is collapsed, only the icon is displayed.
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
const item: NavigationItem = {
|
|
131
|
+
label: 'Home',
|
|
132
|
+
routerLink: '/',
|
|
133
|
+
icon: { icon: 'home' },
|
|
134
|
+
};
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### Status Property
|
|
138
|
+
|
|
139
|
+
With the `status` property, a injectable token, class or function can be assigned to the item. The object must have the method `isVisible` which returns a boolean. If the method returns `false`, the item is not displayed in the navigation sidebar.
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
@Injectable()
|
|
143
|
+
class SetNavStatus {
|
|
144
|
+
isVisible(item: NavigationItem): boolean {
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const item: NavigationItem = {
|
|
150
|
+
label: 'Home',
|
|
151
|
+
routerLink: '/',
|
|
152
|
+
status: SetNavStatus,
|
|
153
|
+
};
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Navigation Divider Item
|
|
157
|
+
|
|
158
|
+
A navigation divider item is a horizontal line that separates navigation items. It is used to group items in the navigation sidebar. It is required to set the property `divider` to `true`. With the optional property `title`, a title can be defined that is displayed below the divider.
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
const item: NavigationDividerItem = {
|
|
162
|
+
divider: true,
|
|
163
|
+
title: 'Group',
|
|
164
|
+
};
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Navigation Insert Item (WIP)
|
|
168
|
+
|
|
169
|
+
A navigation insert item is a placeholder for a navigation item that should be inserted into the navigation sidebar.
|
|
170
|
+
The item is used to define where a dynamic navigation should be inserted. The `insert` property is the key that is used
|
|
171
|
+
identify the insert item. The `insert` property is required.
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
const item: NavigationInsertItem = {
|
|
175
|
+
insert: 'insert-key',
|
|
176
|
+
};
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Header
|
|
180
|
+
|
|
181
|
+
The header is composed of the components from left to right: AppsButtonComponent, SettingsButtonComponent and UserProfileIconComponent.
|
|
182
|
+
|
|
183
|
+
### Apps Button
|
|
184
|
+
|
|
185
|
+
The apps buttons allow for a navigation between different applications. To configure the apps button, the config path
|
|
186
|
+
`navigation.apps` must be set with an array of object with the property `title` and ether `routerLink` or `href`. If the
|
|
187
|
+
property `href` is set, the link is opened in a new tab. If the property `routerLink` the router is used to navigate.
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"navigation": {
|
|
192
|
+
"apps": [
|
|
193
|
+
{
|
|
194
|
+
"title": "App 1",
|
|
195
|
+
"routerLink": ["/", "app1"]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"title": "App 2",
|
|
199
|
+
"href": "https://app2.com"
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
> If the application is in production mode, the current `localId` is appended to the url defined in the `href` property.
|
|
207
|
+
|
|
208
|
+
### Settings Button Customization (WIP)
|
|
209
|
+
|
|
210
|
+
It is possible to add custom items to the settings menu. This custom item can be a component or a configuration object.
|
|
211
|
+
|
|
212
|
+
>
|
|
213
|
+
|
|
214
|
+
#### Configuration Object
|
|
215
|
+
|
|
216
|
+
The action function is called when the item is clicked. It is possible to use the `inject` function to inject services.
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
import {
|
|
220
|
+
LayoutComponent,
|
|
221
|
+
ProvideNavigationConfig,
|
|
222
|
+
withNavigationService,
|
|
223
|
+
} from '@rxap/layout';
|
|
224
|
+
import { APP_NAVIGATION } from './app.navigation';
|
|
225
|
+
|
|
226
|
+
const ROUTES: Route[] = [
|
|
227
|
+
{
|
|
228
|
+
path: '',
|
|
229
|
+
component: LayoutComponent,
|
|
230
|
+
children: [ ],
|
|
231
|
+
providers: [
|
|
232
|
+
provideLayout(
|
|
233
|
+
withNavigationConfig(APP_NAVIGATION),
|
|
234
|
+
withSettingsMenuItems(
|
|
235
|
+
{
|
|
236
|
+
label: 'Custom Item',
|
|
237
|
+
icon: { icon: 'home' },
|
|
238
|
+
action: () => inject(MatDialog).open(MyCustomDialogComponent),
|
|
239
|
+
}
|
|
240
|
+
)
|
|
241
|
+
),
|
|
242
|
+
],
|
|
243
|
+
},
|
|
244
|
+
];
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
#### Component
|
|
248
|
+
|
|
249
|
+
If a component is provided ensure the component template uses the `mat-menu-item` component:
|
|
250
|
+
|
|
251
|
+
```angular17html
|
|
252
|
+
<button mat-menu-item>My Custom Item</button>
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
```typescript
|
|
256
|
+
import {
|
|
257
|
+
LayoutComponent,
|
|
258
|
+
ProvideNavigationConfig,
|
|
259
|
+
withNavigationService,
|
|
260
|
+
} from '@rxap/layout';
|
|
261
|
+
import { APP_NAVIGATION } from './app.navigation';
|
|
262
|
+
|
|
263
|
+
const ROUTES: Route[] = [
|
|
264
|
+
{
|
|
265
|
+
path: '',
|
|
266
|
+
component: LayoutComponent,
|
|
267
|
+
children: [ ],
|
|
268
|
+
providers: [
|
|
269
|
+
provideLayout(
|
|
270
|
+
withNavigationConfig(APP_NAVIGATION),
|
|
271
|
+
withSettingsMenuItems(
|
|
272
|
+
MyCustomMenuItemComponent
|
|
273
|
+
)
|
|
274
|
+
),
|
|
275
|
+
],
|
|
276
|
+
},
|
|
277
|
+
];
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### User Profile (WIP)
|
|
281
|
+
|
|
282
|
+
...
|
|
283
|
+
|
|
284
|
+
## Dynamic Footer
|
|
285
|
+
|
|
286
|
+
With the directive `rxapFooter` it is possible to define a dynamic footer. When the directive is used on a `<ng-template>` in a component,
|
|
287
|
+
that is rendered in the layout component, the template is rendered in the footer of the layout component.
|
|
288
|
+
|
|
289
|
+
```angular17html
|
|
290
|
+
<mat-card>
|
|
291
|
+
...
|
|
292
|
+
</mat-card>
|
|
293
|
+
<ng-template rxapFooter>
|
|
294
|
+
<button mat-button>A button in the layout footer</button>
|
|
295
|
+
</ng-template>
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
# Generators
|
|
299
|
+
|
|
300
|
+
## init
|
|
301
|
+
> Initialize the package in the workspace
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
nx g @rxap/layout:init
|
|
305
|
+
```
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
[**@rxap/layout v19.0.2-dev.3**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rxap/layout](../globals.md) / AppsButtonComponent
|
|
6
|
+
|
|
7
|
+
# Class: AppsButtonComponent
|
|
8
|
+
|
|
9
|
+
Defined in: [default-header/apps-button/apps-button.component.ts:35](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/apps-button/apps-button.component.ts#L35)
|
|
10
|
+
|
|
11
|
+
## Implements
|
|
12
|
+
|
|
13
|
+
- `OnInit`
|
|
14
|
+
|
|
15
|
+
## Constructors
|
|
16
|
+
|
|
17
|
+
### new AppsButtonComponent()
|
|
18
|
+
|
|
19
|
+
> **new AppsButtonComponent**(): [`AppsButtonComponent`](AppsButtonComponent.md)
|
|
20
|
+
|
|
21
|
+
#### Returns
|
|
22
|
+
|
|
23
|
+
[`AppsButtonComponent`](AppsButtonComponent.md)
|
|
24
|
+
|
|
25
|
+
## Properties
|
|
26
|
+
|
|
27
|
+
### appList
|
|
28
|
+
|
|
29
|
+
> `readonly` **appList**: `Signal`\<`AppsNavigationConfig`[]\>
|
|
30
|
+
|
|
31
|
+
Defined in: [default-header/apps-button/apps-button.component.ts:42](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/apps-button/apps-button.component.ts#L42)
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### hasApps
|
|
36
|
+
|
|
37
|
+
> `readonly` **hasApps**: `Signal`\<`boolean`\>
|
|
38
|
+
|
|
39
|
+
Defined in: [default-header/apps-button/apps-button.component.ts:43](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/apps-button/apps-button.component.ts#L43)
|
|
40
|
+
|
|
41
|
+
***
|
|
42
|
+
|
|
43
|
+
### isOpen
|
|
44
|
+
|
|
45
|
+
> `readonly` **isOpen**: `WritableSignal`\<`boolean`\>
|
|
46
|
+
|
|
47
|
+
Defined in: [default-header/apps-button/apps-button.component.ts:39](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/apps-button/apps-button.component.ts#L39)
|
|
48
|
+
|
|
49
|
+
The signal that indicates if the app list is open
|
|
50
|
+
|
|
51
|
+
## Methods
|
|
52
|
+
|
|
53
|
+
### ngOnInit()
|
|
54
|
+
|
|
55
|
+
> **ngOnInit**(): `void`
|
|
56
|
+
|
|
57
|
+
Defined in: [default-header/apps-button/apps-button.component.ts:49](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/apps-button/apps-button.component.ts#L49)
|
|
58
|
+
|
|
59
|
+
A callback method that is invoked immediately after the
|
|
60
|
+
default change detector has checked the directive's
|
|
61
|
+
data-bound properties for the first time,
|
|
62
|
+
and before any of the view or content children have been checked.
|
|
63
|
+
It is invoked only once when the directive is instantiated.
|
|
64
|
+
|
|
65
|
+
#### Returns
|
|
66
|
+
|
|
67
|
+
`void`
|
|
68
|
+
|
|
69
|
+
#### Implementation of
|
|
70
|
+
|
|
71
|
+
`OnInit.ngOnInit`
|
|
72
|
+
|
|
73
|
+
***
|
|
74
|
+
|
|
75
|
+
### toggle()
|
|
76
|
+
|
|
77
|
+
> **toggle**(): `void`
|
|
78
|
+
|
|
79
|
+
Defined in: [default-header/apps-button/apps-button.component.ts:45](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/apps-button/apps-button.component.ts#L45)
|
|
80
|
+
|
|
81
|
+
#### Returns
|
|
82
|
+
|
|
83
|
+
`void`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[**@rxap/layout v19.0.2-dev.3**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rxap/layout](../globals.md) / BaseLayoutComponent
|
|
6
|
+
|
|
7
|
+
# Class: BaseLayoutComponent
|
|
8
|
+
|
|
9
|
+
Defined in: [base-layout/base-layout.component.ts:18](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/base-layout/base-layout.component.ts#L18)
|
|
10
|
+
|
|
11
|
+
## Constructors
|
|
12
|
+
|
|
13
|
+
### new BaseLayoutComponent()
|
|
14
|
+
|
|
15
|
+
> **new BaseLayoutComponent**(): [`BaseLayoutComponent`](BaseLayoutComponent.md)
|
|
16
|
+
|
|
17
|
+
#### Returns
|
|
18
|
+
|
|
19
|
+
[`BaseLayoutComponent`](BaseLayoutComponent.md)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
[**@rxap/layout v19.0.2-dev.3**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rxap/layout](../globals.md) / DefaultHeaderComponent
|
|
6
|
+
|
|
7
|
+
# Class: DefaultHeaderComponent
|
|
8
|
+
|
|
9
|
+
Defined in: [default-header/default-header.component.ts:36](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/default-header.component.ts#L36)
|
|
10
|
+
|
|
11
|
+
## Constructors
|
|
12
|
+
|
|
13
|
+
### new DefaultHeaderComponent()
|
|
14
|
+
|
|
15
|
+
> **new DefaultHeaderComponent**(): [`DefaultHeaderComponent`](DefaultHeaderComponent.md)
|
|
16
|
+
|
|
17
|
+
#### Returns
|
|
18
|
+
|
|
19
|
+
[`DefaultHeaderComponent`](DefaultHeaderComponent.md)
|
|
20
|
+
|
|
21
|
+
## Properties
|
|
22
|
+
|
|
23
|
+
### collapsable
|
|
24
|
+
|
|
25
|
+
> `readonly` **collapsable**: `Signal`\<`boolean`\>
|
|
26
|
+
|
|
27
|
+
Defined in: [default-header/default-header.component.ts:40](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/default-header.component.ts#L40)
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### hasPortals
|
|
32
|
+
|
|
33
|
+
> `readonly` **hasPortals**: `Signal`\<`boolean`\>
|
|
34
|
+
|
|
35
|
+
Defined in: [default-header/default-header.component.ts:47](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/default-header.component.ts#L47)
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### opened
|
|
40
|
+
|
|
41
|
+
> `readonly` **opened**: `Signal`\<`boolean`\>
|
|
42
|
+
|
|
43
|
+
Defined in: [default-header/default-header.component.ts:41](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/default-header.component.ts#L41)
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### portals
|
|
48
|
+
|
|
49
|
+
> `readonly` **portals**: `Signal`\<`Portal`\<`unknown`\>[]\>
|
|
50
|
+
|
|
51
|
+
Defined in: [default-header/default-header.component.ts:46](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/default-header.component.ts#L46)
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### profile
|
|
56
|
+
|
|
57
|
+
> `readonly` **profile**: `Signal`\<`unknown`\>
|
|
58
|
+
|
|
59
|
+
Defined in: [default-header/default-header.component.ts:42](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/default-header.component.ts#L42)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
[**@rxap/layout v19.0.2-dev.3**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rxap/layout](../globals.md) / DefaultHeaderService
|
|
6
|
+
|
|
7
|
+
# Class: DefaultHeaderService
|
|
8
|
+
|
|
9
|
+
Defined in: [default-header/default-header.service.ts:21](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/default-header.service.ts#L21)
|
|
10
|
+
|
|
11
|
+
## Constructors
|
|
12
|
+
|
|
13
|
+
### new DefaultHeaderService()
|
|
14
|
+
|
|
15
|
+
> **new DefaultHeaderService**(): [`DefaultHeaderService`](DefaultHeaderService.md)
|
|
16
|
+
|
|
17
|
+
#### Returns
|
|
18
|
+
|
|
19
|
+
[`DefaultHeaderService`](DefaultHeaderService.md)
|
|
20
|
+
|
|
21
|
+
## Properties
|
|
22
|
+
|
|
23
|
+
### portalCount
|
|
24
|
+
|
|
25
|
+
> `readonly` **portalCount**: `Signal`\<`number`\>
|
|
26
|
+
|
|
27
|
+
Defined in: [default-header/default-header.service.ts:42](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/default-header.service.ts#L42)
|
|
28
|
+
|
|
29
|
+
Computes the count of portals.
|
|
30
|
+
|
|
31
|
+
#### Returns
|
|
32
|
+
|
|
33
|
+
The count of portals.
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### portals
|
|
38
|
+
|
|
39
|
+
> `readonly` **portals**: `Signal`\<`Portal`\<`unknown`\>[]\>
|
|
40
|
+
|
|
41
|
+
Defined in: [default-header/default-header.service.ts:34](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/default-header.service.ts#L34)
|
|
42
|
+
|
|
43
|
+
Represents an array of `Portal` objects with unknown type.
|
|
44
|
+
|
|
45
|
+
## Methods
|
|
46
|
+
|
|
47
|
+
### pushPortal()
|
|
48
|
+
|
|
49
|
+
> **pushPortal**(`portal`): `void`
|
|
50
|
+
|
|
51
|
+
Defined in: [default-header/default-header.service.ts:52](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/default-header.service.ts#L52)
|
|
52
|
+
|
|
53
|
+
Adds a portal to the list of portals.
|
|
54
|
+
|
|
55
|
+
#### Parameters
|
|
56
|
+
|
|
57
|
+
##### portal
|
|
58
|
+
|
|
59
|
+
`Portal`\<`unknown`\>
|
|
60
|
+
|
|
61
|
+
The portal to be added.
|
|
62
|
+
|
|
63
|
+
#### Returns
|
|
64
|
+
|
|
65
|
+
`void`
|
|
66
|
+
|
|
67
|
+
***
|
|
68
|
+
|
|
69
|
+
### removePortal()
|
|
70
|
+
|
|
71
|
+
> **removePortal**(`portal`): `void`
|
|
72
|
+
|
|
73
|
+
Defined in: [default-header/default-header.service.ts:68](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/layout/src/lib/default-header/default-header.service.ts#L68)
|
|
74
|
+
|
|
75
|
+
Removes a portal from the list of portals.
|
|
76
|
+
|
|
77
|
+
#### Parameters
|
|
78
|
+
|
|
79
|
+
##### portal
|
|
80
|
+
|
|
81
|
+
`Portal`\<`unknown`\>
|
|
82
|
+
|
|
83
|
+
The portal to be removed.
|
|
84
|
+
|
|
85
|
+
#### Returns
|
|
86
|
+
|
|
87
|
+
`void`
|