Skip to content

Commit 689c544

Browse files
authored
Merge pull request #71 from Service-Soft/dev
Release 18.1.2
2 parents e93da46 + acf4051 commit 689c544

File tree

12 files changed

+9501
-8613
lines changed

12 files changed

+9501
-8613
lines changed

package-lock.json

Lines changed: 9445 additions & 8577 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,38 @@
2222
},
2323
"private": true,
2424
"dependencies": {
25-
"@angular/animations": "~18.1.1",
26-
"@angular/cdk": "^18.1.1",
27-
"@angular/common": "~18.1.1",
28-
"@angular/compiler": "~18.1.1",
29-
"@angular/core": "~18.1.1",
30-
"@angular/forms": "~18.1.1",
31-
"@angular/material": "^18.1.1",
32-
"@angular/platform-browser": "~18.1.1",
33-
"@angular/platform-browser-dynamic": "~18.1.1",
34-
"@angular/router": "~18.1.1",
25+
"@angular/animations": "~18.2.12",
26+
"@angular/cdk": "^18.2.12",
27+
"@angular/common": "~18.2.12",
28+
"@angular/compiler": "~18.2.12",
29+
"@angular/core": "~18.2.12",
30+
"@angular/forms": "~18.2.12",
31+
"@angular/material": "^18.2.12",
32+
"@angular/platform-browser": "~18.2.12",
33+
"@angular/platform-browser-dynamic": "~18.2.12",
34+
"@angular/router": "~18.2.12",
3535
"rxjs": "~7.8.1",
3636
"tslib": "^2.6.3",
3737
"zone.js": "~0.14.8"
3838
},
3939
"devDependencies": {
40-
"@angular-devkit/build-angular": "~18.1.1",
41-
"@angular/cli": "~18.1.1",
42-
"@angular/compiler-cli": "~18.1.1",
40+
"@angular-devkit/build-angular": "~18.2.12",
41+
"@angular/cli": "~18.2.12",
42+
"@angular/compiler-cli": "~18.2.12",
4343
"@fortawesome/angular-fontawesome": "^0.15.0",
4444
"@fortawesome/free-solid-svg-icons": "^6.6.0",
4545
"@types/jasmine": "~5.1.4",
4646
"@types/node": "^20.14.11",
4747
"concurrently": "^8.2.2",
48-
"eslint-config-service-soft": "^1.5.5",
48+
"eslint-config-service-soft": "^1.5.7",
4949
"jasmine-core": "~5.1.2",
5050
"karma": "~6.4.3",
5151
"karma-chrome-launcher": "~3.2.0",
5252
"karma-coverage": "~2.2.1",
5353
"karma-jasmine": "~5.1.0",
5454
"karma-jasmine-html-reporter": "~2.1.0",
5555
"ncp": "^2.0.0",
56-
"ng-packagr": "^18.1.0",
56+
"ng-packagr": "^18.2.1",
5757
"npm-run-all": "^4.1.5",
5858
"typescript": "~5.5.3",
5959
"wait-on": "^7.2.0"

projects/ngx-material-navigation-showcase/src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@if (footerHeight) {
2-
<ngx-mat-navigation-navbar [minSidenavWidth]="'40%'" [minHeightOtherElements]="footerHeight" [navbarRows]="navbarRows">
2+
<ngx-mat-navigation-navbar [minHeight]="80" [minSidenavWidth]="'40%'" [minHeightOtherElements]="footerHeight" [navbarRows]="navbarRows">
33
<router-outlet></router-outlet>
44
</ngx-mat-navigation-navbar>
55
}

projects/ngx-material-navigation-showcase/src/app/footer-rows.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const footerRows: FooterRow[] = [
88
{
99
type: NavElementTypes.IMAGE_WITH_INTERNAL_LINK,
1010
height: 100,
11-
url: 'https://pbs.twimg.com/profile_images/1498641868397191170/6qW2XkuI_400x400.png',
11+
url: 'https://placehold.co/400x400',
1212
link: {
1313
route: 'home'
1414
}

projects/ngx-material-navigation-showcase/src/app/routes.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable no-console */
22
import { inject } from '@angular/core';
33
import { Router } from '@angular/router';
4+
import { faHome, faRotateRight } from '@fortawesome/free-solid-svg-icons';
45
import { NavElementTypes, NavRoute, NavUtilities, NavbarRow, NgxMatNavigationNotFoundComponent } from 'ngx-material-navigation';
56

67
import { CustomComponent } from './components/custom/custom.component';
@@ -11,7 +12,7 @@ export const navbarRows: NavbarRow<NavRoute>[] = [
1112
elements: [
1213
{
1314
type: NavElementTypes.IMAGE_WITH_INTERNAL_LINK,
14-
url: 'https://pbs.twimg.com/profile_images/1498641868397191170/6qW2XkuI_400x400.png',
15+
url: 'https://placehold.co/400x400',
1516
height: 50,
1617
link: {
1718
route: 'home'
@@ -34,8 +35,7 @@ export const navbarRows: NavbarRow<NavRoute>[] = [
3435
{
3536
type: NavElementTypes.INTERNAL_LINK,
3637
name: 'Home',
37-
38-
icon: 'fas fa-home',
38+
icon: faHome,
3939
route: {
4040
title: 'Home',
4141
path: 'home',
@@ -55,7 +55,7 @@ export const navbarRows: NavbarRow<NavRoute>[] = [
5555
{
5656
name: 'Bottom',
5757
fragment: 'bottom',
58-
icon: 'fas fa-home'
58+
icon: faHome
5959
},
6060
{
6161
name: 'Middle',
@@ -77,7 +77,7 @@ export const navbarRows: NavbarRow<NavRoute>[] = [
7777
{
7878
type: NavElementTypes.INTERNAL_LINK,
7979
name: 'Home',
80-
icon: 'fas fa-home',
80+
icon: faHome,
8181
route: {
8282
title: 'Home',
8383
path: 'home',
@@ -86,7 +86,7 @@ export const navbarRows: NavbarRow<NavRoute>[] = [
8686
},
8787
{
8888
type: NavElementTypes.IMAGE_WITH_INTERNAL_LINK,
89-
url: 'https://pbs.twimg.com/profile_images/1498641868397191170/6qW2XkuI_400x400.png',
89+
url: 'https://placehold.co/400x400',
9090
height: 50,
9191
link: {
9292
route: 'home'
@@ -102,7 +102,7 @@ export const navbarRows: NavbarRow<NavRoute>[] = [
102102
{
103103
type: NavElementTypes.BUTTON,
104104
name: 'Reload Page',
105-
icon: 'fas fa-rotate-right',
105+
icon: faRotateRight,
106106
action: () => location.reload(),
107107
position: 'right'
108108
},
@@ -132,7 +132,7 @@ export const navbarRows: NavbarRow<NavRoute>[] = [
132132
{
133133
type: NavElementTypes.BUTTON,
134134
name: 'Reload Page',
135-
icon: 'fas fa-rotate-right',
135+
icon: faRotateRight,
136136
action: () => location.reload(),
137137
position: 'right',
138138
collapse: 'sm'

projects/ngx-material-navigation-showcase/src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { enableProdMode } from '@angular/core';
22
import { bootstrapApplication } from '@angular/platform-browser';
33
import { provideAnimations } from '@angular/platform-browser/animations';
44
import { InMemoryScrollingOptions, RouterConfigOptions, provideRouter, withInMemoryScrolling, withRouterConfig } from '@angular/router';
5+
import { faHome } from '@fortawesome/free-solid-svg-icons';
56
import { NGX_BURGER_MENU_ARIA_LABEL, NGX_BURGER_MENU_ICON } from 'ngx-material-navigation';
67

78
import { AppComponent } from './app/app.component';
@@ -29,7 +30,7 @@ bootstrapApplication(
2930
provideAnimations(),
3031
{
3132
provide: NGX_BURGER_MENU_ICON,
32-
useValue: 'fas fa-home'
33+
useValue: faHome
3334
},
3435
{
3536
provide: NGX_BURGER_MENU_ARIA_LABEL,

projects/ngx-material-navigation/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-material-navigation",
3-
"version": "18.1.0",
3+
"version": "18.1.2",
44
"license": "MIT",
55
"keywords": [
66
"angular",
@@ -15,6 +15,7 @@
1515
"@angular/common": "18",
1616
"@angular/core": "18",
1717
"@angular/forms": "18",
18+
"@angular/router": "18",
1819
"@angular/material": "18",
1920
"@fortawesome/angular-fontawesome": "^0.15",
2021
"@fortawesome/free-solid-svg-icons": "^6"

projects/ngx-material-navigation/src/components/nav-element/nav-element.component.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,14 @@
4545
<!-------------------CUSTOM------------------->
4646
<!-------------------------------------------->
4747
@case (NavElementTypes.CUSTOM) {
48-
<nav-custom [element]="element" [isSidenavElement]="internalIsSidenavElement" [isMenuItem]="internalIsMenuItem"></nav-custom>
48+
<div [class.menuItem]="internalIsMenuItem" [class.customMenuItem]="internalIsMenuItem">
49+
<nav-custom
50+
[element]="element"
51+
[isSidenavElement]="internalIsSidenavElement"
52+
[isMenuItem]="internalIsMenuItem"
53+
>
54+
</nav-custom>
55+
</div>
4956
}
5057
<!-------------------------------------------->
5158
<!--------------------TEXT-------------------->

projects/ngx-material-navigation/src/components/nav-element/nav-element.component.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ nav-image-with-internal-link, nav-image-with-external-link {
1616
min-height: 48px;
1717
}
1818

19+
.customMenuItem {
20+
padding-left: 12px;
21+
padding-right: 12px;
22+
width: calc(100% - 24px);
23+
}
24+
1925
::ng-deep {
2026
.mat-mdc-menu-content.mdc-list {
2127
padding: 8px;

projects/ngx-material-navigation/src/components/nav-element/nav-element.component.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,17 @@ export class NavElementComponent implements AfterContentChecked, OnInit {
123123
* Defines if the sidenav should be closed when the given element is clicked.
124124
* @param element - The element that has been clicked.
125125
*/
126-
clickSidenavElement(element: NavElement): void {
126+
async clickSidenavElement(element: NavElement): Promise<void> {
127127
switch (element.type) {
128128
case NavElementTypes.TITLE:
129129
case NavElementTypes.IMAGE:
130130
case NavElementTypes.MENU:
131-
case NavElementTypes.CUSTOM:
131+
case NavElementTypes.CUSTOM: {
132132
return;
133-
default:
134-
void this.sidenav?.close();
133+
}
134+
default: {
135+
await this.sidenav?.close();
136+
}
135137
}
136138
}
137139
}

projects/ngx-material-navigation/src/components/navbar/navbar.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#toolbar {
22
height: auto;
3+
justify-content: center;
34
}
45

56
.toolbar-row {

projects/ngx-material-navigation/src/components/navbar/navbar.component.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,17 @@ export class NgxMatNavigationNavbarComponent implements AfterContentChecked {
214214
* Defines if the sidenav should be closed when the given element is clicked.
215215
* @param element - The element that has been clicked.
216216
*/
217-
clickSidenavElement(element: NavElement): void {
217+
async clickSidenavElement(element: NavElement): Promise<void> {
218218
switch (element.type) {
219219
case NavElementTypes.TITLE:
220220
case NavElementTypes.IMAGE:
221221
case NavElementTypes.MENU:
222-
case NavElementTypes.CUSTOM:
222+
case NavElementTypes.CUSTOM: {
223223
return;
224-
default:
225-
void this.sidenav?.close();
224+
}
225+
default: {
226+
await this.sidenav?.close();
227+
}
226228
}
227229
}
228230
}

0 commit comments

Comments
 (0)