Added a way of accessing and updating nav items

+ Added an ability to add custom functions to the nav items
This commit is contained in:
Sercan Yemen 2017-10-14 18:44:11 +03:00
parent 56d9830176
commit 6d594d63db
6 changed files with 418 additions and 40 deletions

View File

@ -1,6 +1,17 @@
<a class="nav-link" matRipple <a class="nav-link" *ngIf="item.url" [routerLink]="[item.url]" routerLinkActive="active" matRipple>
[routerLink]="[item.url]" routerLinkActive="active">
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon> <mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title">{{item.title}}</span> <span class="nav-link-title">{{item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">{{item.badge.title}}</span> <span class="nav-link-badge" *ngIf="item.badge"
</a> [ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}}
</span>
</a>
<span class="nav-link" *ngIf="item.function" (click)="item.function()" matRipple>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title">{{item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge"
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}}
</span>
</span>

View File

@ -19,6 +19,7 @@ export class FuseNavigationService
/** /**
* Get navigation model * Get navigation model
*
* @returns {any[]} * @returns {any[]}
*/ */
getNavigationModel() getNavigationModel()
@ -28,15 +29,125 @@ export class FuseNavigationService
/** /**
* Set the navigation model * Set the navigation model
*
* @param model * @param model
*/ */
setNavigationModel(model) setNavigationModel(model)
{ {
this.navigationModel = model; this.navigationModel = model;
this.onNavigationModelChange.next(this.navigationModel.model); this.onNavigationModelChange.next(this.navigationModel.model);
} }
/**
* Add new navigation item
* to the given location
*/
addNavigationItem(location, item)
{
// Parse the location
const locationArr = location.split('.');
if ( locationArr.length === 0 )
{
return;
}
// Find the navigation item
const navItem = this.findNavigationItemById(locationArr);
// Act according to the item type
switch ( navItem.type )
{
case 'item':
// Create a children array
navItem.children = [];
// Push the item
navItem.children.push(item);
// Change the item type to collapsable
navItem.type = 'collapse';
break;
case 'collapse':
// Push the item
navItem.children.push(item);
break;
case 'group':
// Push the item
navItem.children.push(item);
break;
default:
break;
}
}
/**
* Get navigation item from
* given location
*
* @param location
*/
getNavigationItem(location)
{
// Parse the location
const locationArr = location.split('.');
if ( locationArr.length === 0 )
{
return;
}
// Find and return the navigation item
return this.findNavigationItemById(locationArr);
}
/**
* Find navigation item by location
*
* @param location
* @param navigation
*/
findNavigationItemById(location, navigation?)
{
if ( !navigation )
{
navigation = this.navigationModel.model;
}
// Iterate through the given navigation
for ( const navItem of navigation )
{
// If the nav item id equals the first location...
if ( navItem.id === location[0] )
{
// If there is more location to look at...
if ( location.length > 1 )
{
// Remove the first item of the location
location.splice(0, 1);
// Go nested...
return this.findNavigationItemById(location, navItem.children);
}
// Otherwise just return the nav item
else
{
return navItem;
}
}
}
}
/** /**
* Get flattened navigation array * Get flattened navigation array
* @param navigationItems * @param navigationItems

View File

@ -1,6 +1,17 @@
<a class="nav-link" matRipple <a class="nav-link" *ngIf="item.url" [routerLink]="[item.url]" routerLinkActive="active" matRipple>
[routerLink]="[item.url]" routerLinkActive="active">
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon> <mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title">{{item.title}}</span> <span class="nav-link-title">{{item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">{{item.badge.title}}</span> <span class="nav-link-badge" *ngIf="item.badge"
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}}
</span>
</a> </a>
<span class="nav-link" *ngIf="item.function" (click)="item.function()" matRipple>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title">{{item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge"
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}}
</span>
</span>

View File

@ -21,13 +21,6 @@
navigation. navigation.
</p> </p>
<!--<div class="my-48">
<h2>Sample</h2>
<p fxLayout="row" fxLayoutAlign="start start">
<fuse-navigation></fuse-navigation>
</p>
</div>-->
<div class="my-48"> <div class="my-48">
<h2>Usage</h2> <h2>Usage</h2>
<p class="mat-grey-200-bg py-8"> <p class="mat-grey-200-bg py-8">
@ -55,15 +48,15 @@
<fuse-hljs lang="json" class="source-code"> <fuse-hljs lang="json" class="source-code">
<textarea #source hidden="hidden"> <textarea #source hidden="hidden">
{ {
'title': 'COMPONENTS', 'title': 'COMPONENTS',
'type' : 'group', 'type' : 'group',
'children': [ 'children': [
{ {
'title': 'ngx-datatable', 'title': 'ngx-datatable',
'type' : 'item', 'type' : 'item',
'url' : '/components/datatables/ngx-datatable' 'url' : '/components/datatables/ngx-datatable'
} }
] ]
}, },
</textarea> </textarea>
</fuse-hljs> </fuse-hljs>
@ -76,16 +69,16 @@
<fuse-hljs lang="json" class="source-code"> <fuse-hljs lang="json" class="source-code">
<textarea #source hidden="hidden"> <textarea #source hidden="hidden">
{ {
'title' : 'Datatables', 'title' : 'Datatables',
'type' : 'collapse', 'type' : 'collapse',
'icon' : 'border_all', 'icon' : 'border_all',
'children': [ 'children': [
{ {
'title': 'ngx-datatable', 'title': 'ngx-datatable',
'type' : 'nav-item', 'type' : 'nav-item',
'url' : '/components/datatables/ngx-datatable' 'url' : '/components/datatables/ngx-datatable'
} }
] ]
}, },
</textarea> </textarea>
</fuse-hljs> </fuse-hljs>
@ -98,16 +91,113 @@
<fuse-hljs lang="json" class="source-code"> <fuse-hljs lang="json" class="source-code">
<textarea #source hidden="hidden"> <textarea #source hidden="hidden">
{ {
'title': 'Countdown', 'title': 'Countdown',
'type' : 'item', 'type' : 'item',
'icon' : 'settings_input_component', 'icon' : 'settings_input_component',
'url' : '/components/countdown' 'url' : '/components/countdown'
}, },
</textarea> </textarea>
</fuse-hljs> </fuse-hljs>
</p> </p>
</div> </div>
<div class="my-48">
<h2>Examples</h2>
<h4>Update navigation item on-the-fly</h4>
<p class="mat-grey-200-bg py-8">
<fuse-hljs lang="ts" class="source-code">
<textarea #source hidden="hidden">
updateMailBadge()
{
// Get the mail nav item
const mailNavItem = this.navigationService.getNavigationItem('applications.mail');
// Update the badge title
mailNavItem.badge.title = 35;
}
</textarea>
</fuse-hljs>
</p>
<div class="mt-24 mb-64">
<button mat-button mat-raised-button color="accent" (click)="updateMailBadge()">
Update Mail app badge
</button>
</div>
<h4>Add a subitem to the Calendar nav item</h4>
<p class="mat-grey-200-bg py-8">
<fuse-hljs lang="ts" class="source-code">
<textarea #source hidden="hidden">
addSubitemToCalendar()
{
// Prepare the new nav item
const newNavItem = {
id : 'sub-item',
title: 'Sub Item',
type : 'item',
url : '/apps/calendar'
};
// Add the new nav item
this.navigationService.addNavigationItem('applications.calendar', newNavItem);
}
</textarea>
</fuse-hljs>
</p>
<div class="mt-24 mb-64">
<button mat-button mat-raised-button color="accent" (click)="addSubitemToCalendar()">
Add a subitem to the Calendar nav item
</button>
</div>
<h4>Add a nav item with custom function</h4>
<p class="mat-grey-200-bg py-8">
<fuse-hljs lang="ts" class="source-code">
<textarea #source hidden="hidden">
addNavItemWithCustomFunction()
{
// Prepare the new nav item
const newNavItem = {
id : 'custom-item',
title : 'Custom Item',
type : 'item',
function: () => {
alert('Custom function!');
}
};
// Get the applications nav item
const applicationsNavItem = this.navigationService.getNavigationItem('applications');
// Add the new nav item at the beginning of the applications
applicationsNavItem.children.unshift(newNavItem);
}
</textarea>
</fuse-hljs>
</p>
<div class="mt-24">
<button mat-button mat-raised-button color="accent" (click)="addNavItemWithCustomFunction()">
Add a nav item with custom function
</button>
</div>
</div>
</div> </div>
</div> </div>

View File

@ -1,4 +1,5 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { FuseNavigationService } from '../../../../core/components/navigation/navigation.service';
@Component({ @Component({
selector : 'fuse-navigation-docs', selector : 'fuse-navigation-docs',
@ -7,8 +8,50 @@ import { Component } from '@angular/core';
}) })
export class FuseNavigationDocsComponent export class FuseNavigationDocsComponent
{ {
constructor() constructor(private navigationService: FuseNavigationService)
{ {
} }
updateMailBadge()
{
// Get the mail nav item
const mailNavItem = this.navigationService.getNavigationItem('applications.mail');
// Update the badge title
mailNavItem.badge.title = 35;
}
addSubitemToCalendar()
{
// Prepare the new nav item
const newNavItem = {
id : 'sub-item',
title: 'Sub Item',
type : 'item',
url : '/apps/calendar'
};
// Add the new nav item
this.navigationService.addNavigationItem('applications.calendar', newNavItem);
}
addNavItemWithCustomFunction()
{
// Prepare the new nav item
const newNavItem = {
id : 'custom-item',
title : 'Custom Item',
type : 'item',
function: () => {
alert('Custom function!');
}
};
// Get the applications nav item
const applicationsNavItem = this.navigationService.getNavigationItem('applications');
// Add the new nav item at the beginning of the applications
applicationsNavItem.children.unshift(newNavItem);
}
} }

View File

@ -6,29 +6,34 @@ export class NavigationModel
{ {
this.model = [ this.model = [
{ {
'id' : 'applications',
'title' : 'Applications', 'title' : 'Applications',
'type' : 'group', 'type' : 'group',
'icon' : 'apps', 'icon' : 'apps',
'children': [ 'children': [
{ {
'id' : 'dashboards',
'title' : 'Dashboards', 'title' : 'Dashboards',
'type' : 'collapse', 'type' : 'collapse',
'icon' : 'dashboard', 'icon' : 'dashboard',
'children': [ 'children': [
{ {
'type' : 'item', 'id' : 'project',
'title': 'Project', 'title': 'Project',
'type' : 'item',
'url' : '/apps/dashboards/project' 'url' : '/apps/dashboards/project'
} }
] ]
}, },
{ {
'id' : 'calendar',
'title': 'Calendar', 'title': 'Calendar',
'type' : 'item', 'type' : 'item',
'icon' : 'today', 'icon' : 'today',
'url' : '/apps/calendar' 'url' : '/apps/calendar'
}, },
{ {
'id' : 'mail',
'title': 'Mail', 'title': 'Mail',
'type' : 'item', 'type' : 'item',
'icon' : 'email', 'icon' : 'email',
@ -40,6 +45,7 @@ export class NavigationModel
} }
}, },
{ {
'id' : 'chat',
'title': 'Chat', 'title': 'Chat',
'type' : 'item', 'type' : 'item',
'icon' : 'chat', 'icon' : 'chat',
@ -51,18 +57,21 @@ export class NavigationModel
} }
}, },
{ {
'id' : 'file-manager',
'title': 'File Manager', 'title': 'File Manager',
'type' : 'item', 'type' : 'item',
'icon' : 'folder', 'icon' : 'folder',
'url' : '/apps/file-manager' 'url' : '/apps/file-manager'
}, },
{ {
'id' : 'contacts',
'title': 'Contacts', 'title': 'Contacts',
'type' : 'item', 'type' : 'item',
'icon' : 'account_box', 'icon' : 'account_box',
'url' : '/apps/contacts' 'url' : '/apps/contacts'
}, },
{ {
'id' : 'to-do',
'title': 'To-Do', 'title': 'To-Do',
'type' : 'item', 'type' : 'item',
'icon' : 'check_box', 'icon' : 'check_box',
@ -74,6 +83,7 @@ export class NavigationModel
} }
}, },
{ {
'id' : 'scrumboard',
'title': 'Scrumboard', 'title': 'Scrumboard',
'type' : 'item', 'type' : 'item',
'icon' : 'assessment', 'icon' : 'assessment',
@ -82,61 +92,73 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'pages',
'title' : 'Pages', 'title' : 'Pages',
'type' : 'group', 'type' : 'group',
'icon' : 'pages', 'icon' : 'pages',
'children': [ 'children': [
{ {
'id' : 'authentication',
'title' : 'Authentication', 'title' : 'Authentication',
'type' : 'collapse', 'type' : 'collapse',
'icon' : 'lock', 'icon' : 'lock',
'children': [ 'children': [
{ {
'id' : 'login',
'title': 'Login', 'title': 'Login',
'type' : 'item', 'type' : 'item',
'url' : '/pages/auth/login' 'url' : '/pages/auth/login'
}, },
{ {
'id' : 'login-v2',
'title': 'Login v2', 'title': 'Login v2',
'type' : 'item', 'type' : 'item',
'url' : '/pages/auth/login-2' 'url' : '/pages/auth/login-2'
}, },
{ {
'id' : 'register',
'title': 'Register', 'title': 'Register',
'type' : 'item', 'type' : 'item',
'url' : '/pages/auth/register' 'url' : '/pages/auth/register'
}, },
{ {
'id' : 'register-v2',
'title': 'Register v2', 'title': 'Register v2',
'type' : 'item', 'type' : 'item',
'url' : '/pages/auth/register-2' 'url' : '/pages/auth/register-2'
}, },
{ {
'id' : 'forgot-password',
'title': 'Forgot Password', 'title': 'Forgot Password',
'type' : 'item', 'type' : 'item',
'url' : '/pages/auth/forgot-password' 'url' : '/pages/auth/forgot-password'
}, },
{ {
'id' : 'forgot-password-v2',
'title': 'Forgot Password v2', 'title': 'Forgot Password v2',
'type' : 'item', 'type' : 'item',
'url' : '/pages/auth/forgot-password-2' 'url' : '/pages/auth/forgot-password-2'
}, },
{ {
'id' : 'reset-password',
'title': 'Reset Password', 'title': 'Reset Password',
'type' : 'item', 'type' : 'item',
'url' : '/pages/auth/reset-password' 'url' : '/pages/auth/reset-password'
}, },
{ {
'id' : 'reset-password-v2',
'title': 'Reset Password v2', 'title': 'Reset Password v2',
'type' : 'item', 'type' : 'item',
'url' : '/pages/auth/reset-password-2' 'url' : '/pages/auth/reset-password-2'
}, },
{ {
'id' : 'lock-screen',
'title': 'Lock Screen', 'title': 'Lock Screen',
'type' : 'item', 'type' : 'item',
'url' : '/pages/auth/lock' 'url' : '/pages/auth/lock'
}, },
{ {
'id' : 'mail-confirmation',
'title': 'Mail Confirmation', 'title': 'Mail Confirmation',
'type' : 'item', 'type' : 'item',
'url' : '/pages/auth/mail-confirm' 'url' : '/pages/auth/mail-confirm'
@ -144,22 +166,26 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'coming-soon',
'title': 'Coming Soon', 'title': 'Coming Soon',
'type' : 'item', 'type' : 'item',
'icon' : 'alarm', 'icon' : 'alarm',
'url' : '/pages/coming-soon' 'url' : '/pages/coming-soon'
}, },
{ {
'id' : 'errors',
'title' : 'Errors', 'title' : 'Errors',
'type' : 'collapse', 'type' : 'collapse',
'icon' : 'error', 'icon' : 'error',
'children': [ 'children': [
{ {
'id' : '404',
'title': '404', 'title': '404',
'type' : 'item', 'type' : 'item',
'url' : '/pages/errors/error-404' 'url' : '/pages/errors/error-404'
}, },
{ {
'id' : '500',
'title': '500', 'title': '500',
'type' : 'item', 'type' : 'item',
'url' : '/pages/errors/error-500' 'url' : '/pages/errors/error-500'
@ -167,16 +193,19 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'invoice',
'title' : 'Invoice', 'title' : 'Invoice',
'type' : 'collapse', 'type' : 'collapse',
'icon' : 'receipt', 'icon' : 'receipt',
'children': [ 'children': [
{ {
'id' : 'modern',
'title': 'Modern', 'title': 'Modern',
'type' : 'item', 'type' : 'item',
'url' : '/pages/invoices/modern' 'url' : '/pages/invoices/modern'
}, },
{ {
'id' : 'compact',
'title': 'Compact', 'title': 'Compact',
'type' : 'item', 'type' : 'item',
'url' : '/pages/invoices/compact' 'url' : '/pages/invoices/compact'
@ -184,27 +213,32 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'maintenance',
'title': 'Maintenance', 'title': 'Maintenance',
'type' : 'item', 'type' : 'item',
'icon' : 'build', 'icon' : 'build',
'url' : '/pages/maintenance' 'url' : '/pages/maintenance'
}, },
{ {
'id' : 'pricing',
'title' : 'Pricing', 'title' : 'Pricing',
'type' : 'collapse', 'type' : 'collapse',
'icon' : 'attach_money', 'icon' : 'attach_money',
'children': [ 'children': [
{ {
'id' : 'style-1',
'title': 'Style 1', 'title': 'Style 1',
'type' : 'item', 'type' : 'item',
'url' : '/pages/pricing/style-1' 'url' : '/pages/pricing/style-1'
}, },
{ {
'id' : 'style-2',
'title': 'Style 2', 'title': 'Style 2',
'type' : 'item', 'type' : 'item',
'url' : '/pages/pricing/style-2' 'url' : '/pages/pricing/style-2'
}, },
{ {
'id' : 'style-3',
'title': 'Style 3', 'title': 'Style 3',
'type' : 'item', 'type' : 'item',
'url' : '/pages/pricing/style-3' 'url' : '/pages/pricing/style-3'
@ -212,12 +246,14 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'profile',
'title': 'Profile', 'title': 'Profile',
'type' : 'item', 'type' : 'item',
'icon' : 'person', 'icon' : 'person',
'url' : '/pages/profile' 'url' : '/pages/profile'
}, },
{ {
'id' : 'search',
'title': 'Search', 'title': 'Search',
'type' : 'item', 'type' : 'item',
'icon' : 'search', 'icon' : 'search',
@ -226,69 +262,82 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'user-interface',
'title' : 'User Interface', 'title' : 'User Interface',
'type' : 'group', 'type' : 'group',
'icon' : 'web', 'icon' : 'web',
'children': [ 'children': [
{ {
'id' : 'forms',
'title': 'Forms', 'title': 'Forms',
'type' : 'item', 'type' : 'item',
'icon' : 'web_asset', 'icon' : 'web_asset',
'url' : '/ui/forms' 'url' : '/ui/forms'
}, },
{ {
'id' : 'icons',
'title': 'Icons', 'title': 'Icons',
'type' : 'item', 'type' : 'item',
'icon' : 'photo', 'icon' : 'photo',
'url' : '/ui/icons' 'url' : '/ui/icons'
}, },
{ {
'id' : 'typography',
'title': 'Typography', 'title': 'Typography',
'type' : 'item', 'type' : 'item',
'icon' : 'text_fields', 'icon' : 'text_fields',
'url' : '/ui/typography' 'url' : '/ui/typography'
}, },
{ {
'id' : 'helper-classes',
'title': 'Helper Classes', 'title': 'Helper Classes',
'type' : 'item', 'type' : 'item',
'icon' : 'help', 'icon' : 'help',
'url' : '/ui/helper-classes' 'url' : '/ui/helper-classes'
}, },
{ {
'id' : 'page-layouts',
'title' : 'Page Layouts', 'title' : 'Page Layouts',
'type' : 'collapse', 'type' : 'collapse',
'icon' : 'view_quilt', 'icon' : 'view_quilt',
'children': [ 'children': [
{ {
'id' : 'carded',
'title' : 'Carded', 'title' : 'Carded',
'type' : 'collapse', 'type' : 'collapse',
'children': [ 'children': [
{ {
'id' : 'full-width',
'title': 'Full Width', 'title': 'Full Width',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/carded/full-width' 'url' : '/ui/page-layouts/carded/full-width'
}, },
{ {
'id' : 'full-width-2',
'title': 'Full Width 2', 'title': 'Full Width 2',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/carded/full-width-2' 'url' : '/ui/page-layouts/carded/full-width-2'
}, },
{ {
'id' : 'left-sidenav',
'title': 'Left Sidenav', 'title': 'Left Sidenav',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/carded/left-sidenav' 'url' : '/ui/page-layouts/carded/left-sidenav'
}, },
{ {
'id' : 'left-sidenav-2',
'title': 'Left Sidenav 2', 'title': 'Left Sidenav 2',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/carded/left-sidenav-2' 'url' : '/ui/page-layouts/carded/left-sidenav-2'
}, },
{ {
'id' : 'right-sidenav',
'title': 'Right Sidenav', 'title': 'Right Sidenav',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/carded/right-sidenav' 'url' : '/ui/page-layouts/carded/right-sidenav'
}, },
{ {
'id' : 'right-sidenav-2',
'title': 'Right Sidenav 2', 'title': 'Right Sidenav 2',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/carded/right-sidenav-2' 'url' : '/ui/page-layouts/carded/right-sidenav-2'
@ -296,45 +345,54 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'simple',
'title' : 'Simple', 'title' : 'Simple',
'type' : 'collapse', 'type' : 'collapse',
'children': [ 'children': [
{ {
'id' : 'full-width',
'title': 'Full Width', 'title': 'Full Width',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/simple/full-width' 'url' : '/ui/page-layouts/simple/full-width'
}, },
{ {
'id' : 'left-sidenav',
'title': 'Left Sidenav', 'title': 'Left Sidenav',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/simple/left-sidenav' 'url' : '/ui/page-layouts/simple/left-sidenav'
}, },
{ {
'id' : 'left-sidenav-2',
'title': 'Left Sidenav 2', 'title': 'Left Sidenav 2',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/simple/left-sidenav-2' 'url' : '/ui/page-layouts/simple/left-sidenav-2'
}, },
{ {
'id' : 'left-sidenav-3',
'title': 'Left Sidenav 3', 'title': 'Left Sidenav 3',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/simple/left-sidenav-3' 'url' : '/ui/page-layouts/simple/left-sidenav-3'
}, },
{ {
'id' : 'right-sidenav',
'title': 'Right Sidenav', 'title': 'Right Sidenav',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/simple/right-sidenav' 'url' : '/ui/page-layouts/simple/right-sidenav'
}, },
{ {
'id' : 'right-sidenav-2',
'title': 'Right Sidenav 2', 'title': 'Right Sidenav 2',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/simple/right-sidenav-2' 'url' : '/ui/page-layouts/simple/right-sidenav-2'
}, },
{ {
'id' : 'right-sidenav-3',
'title': 'Right Sidenav 3', 'title': 'Right Sidenav 3',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/simple/right-sidenav-3' 'url' : '/ui/page-layouts/simple/right-sidenav-3'
}, },
{ {
'id' : 'tabbed',
'title': 'Tabbed', 'title': 'Tabbed',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/simple/tabbed' 'url' : '/ui/page-layouts/simple/tabbed'
@ -342,6 +400,7 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'blank',
'title': 'Blank', 'title': 'Blank',
'type' : 'item', 'type' : 'item',
'url' : '/ui/page-layouts/blank' 'url' : '/ui/page-layouts/blank'
@ -349,6 +408,7 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'colors',
'title': 'Colors', 'title': 'Colors',
'type' : 'item', 'type' : 'item',
'icon' : 'color_lens', 'icon' : 'color_lens',
@ -357,17 +417,20 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'services',
'title' : 'Services', 'title' : 'Services',
'type' : 'group', 'type' : 'group',
'icon' : 'settings', 'icon' : 'settings',
'children': [ 'children': [
{ {
'id' : 'config',
'title': 'Config', 'title': 'Config',
'type' : 'item', 'type' : 'item',
'icon' : 'settings', 'icon' : 'settings',
'url' : '/services/config' 'url' : '/services/config'
}, },
{ {
'id' : 'splash-screen',
'title': 'Splash Screen', 'title': 'Splash Screen',
'type' : 'item', 'type' : 'item',
'icon' : 'settings', 'icon' : 'settings',
@ -376,60 +439,72 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'components',
'title' : 'Components', 'title' : 'Components',
'type' : 'group', 'type' : 'group',
'icon' : 'settings_input_component', 'icon' : 'settings_input_component',
'children': [ 'children': [
{ {
'id' : 'angular-material-elements',
'title' : 'Angular Material Elements', 'title' : 'Angular Material Elements',
'type' : 'collapse', 'type' : 'collapse',
'icon' : 'layers', 'icon' : 'layers',
'children': [ 'children': [
{ {
'id' : 'form-controls',
'title' : 'Form Controls', 'title' : 'Form Controls',
'type' : 'group', 'type' : 'group',
'children': [ 'children': [
{ {
'id' : 'autocomplete',
'title': 'Autocomplete', 'title': 'Autocomplete',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/autocomplete' 'url' : '/components/angular-material/autocomplete'
}, },
{ {
'id' : 'checkbox',
'title': 'Checkbox', 'title': 'Checkbox',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/checkbox' 'url' : '/components/angular-material/checkbox'
}, },
{ {
'id' : 'datepicker',
'title': 'Datepicker', 'title': 'Datepicker',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/datepicker' 'url' : '/components/angular-material/datepicker'
}, },
{ {
'id' : 'form-field',
'title': 'Form field', 'title': 'Form field',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/form-field' 'url' : '/components/angular-material/form-field'
}, },
{ {
'id' : 'input',
'title': 'Input', 'title': 'Input',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/input' 'url' : '/components/angular-material/input'
}, },
{ {
'id' : 'radio-button',
'title': 'Radio button', 'title': 'Radio button',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/radio-button' 'url' : '/components/angular-material/radio-button'
}, },
{ {
'id' : 'select',
'title': 'Select', 'title': 'Select',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/select' 'url' : '/components/angular-material/select'
}, },
{ {
'id' : 'slider',
'title': 'Slider', 'title': 'Slider',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/slider' 'url' : '/components/angular-material/slider'
}, },
{ {
'id' : 'slide-toggle',
'title': 'Slide toggle', 'title': 'Slide toggle',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/slide-toggle' 'url' : '/components/angular-material/slide-toggle'
@ -437,20 +512,24 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'navigation',
'title' : 'Navigation', 'title' : 'Navigation',
'type' : 'group', 'type' : 'group',
'children': [ 'children': [
{ {
'id' : 'menu',
'title': 'Menu', 'title': 'Menu',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/menu' 'url' : '/components/angular-material/menu'
}, },
{ {
'id' : 'sidenav',
'title': 'Sidenav', 'title': 'Sidenav',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/sidenav' 'url' : '/components/angular-material/sidenav'
}, },
{ {
'id' : 'toolbar',
'title': 'Toolbar', 'title': 'Toolbar',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/toolbar' 'url' : '/components/angular-material/toolbar'
@ -458,35 +537,42 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'layout',
'title' : 'Layout', 'title' : 'Layout',
'type' : 'group', 'type' : 'group',
'children': [ 'children': [
{ {
'id' : 'list',
'title': 'List', 'title': 'List',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/list' 'url' : '/components/angular-material/list'
}, },
{ {
'id' : 'grid-list',
'title': 'Grid list', 'title': 'Grid list',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/grid-list' 'url' : '/components/angular-material/grid-list'
}, },
{ {
'id' : 'card',
'title': 'Card', 'title': 'Card',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/card' 'url' : '/components/angular-material/card'
}, },
{ {
'id' : 'stepper',
'title': 'Stepper', 'title': 'Stepper',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/stepper' 'url' : '/components/angular-material/stepper'
}, },
{ {
'id' : 'tabs',
'title': 'Tabs', 'title': 'Tabs',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/tabs' 'url' : '/components/angular-material/tabs'
}, },
{ {
'id' : 'expansion-panel',
'title': 'Expansion Panel', 'title': 'Expansion Panel',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/expansion-panel' 'url' : '/components/angular-material/expansion-panel'
@ -494,35 +580,42 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'buttons-indicators',
'title' : 'Buttons & Indicators', 'title' : 'Buttons & Indicators',
'type' : 'group', 'type' : 'group',
'children': [ 'children': [
{ {
'id' : 'button',
'title': 'Button', 'title': 'Button',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/button' 'url' : '/components/angular-material/button'
}, },
{ {
'id' : 'button-toggle',
'title': 'Button toggle', 'title': 'Button toggle',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/button-toggle' 'url' : '/components/angular-material/button-toggle'
}, },
{ {
'id' : 'chips',
'title': 'Chips', 'title': 'Chips',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/chips' 'url' : '/components/angular-material/chips'
}, },
{ {
'id' : 'icon',
'title': 'Icon', 'title': 'Icon',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/icon' 'url' : '/components/angular-material/icon'
}, },
{ {
'id' : 'progress-spinner',
'title': 'Progress spinner', 'title': 'Progress spinner',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/progress-spinner' 'url' : '/components/angular-material/progress-spinner'
}, },
{ {
'id' : 'progress-bar',
'title': 'Progress bar', 'title': 'Progress bar',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/progress-bar' 'url' : '/components/angular-material/progress-bar'
@ -530,20 +623,24 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'popups-modals',
'title' : 'Popups & Modals', 'title' : 'Popups & Modals',
'type' : 'group', 'type' : 'group',
'children': [ 'children': [
{ {
'id' : 'dialog',
'title': 'Dialog', 'title': 'Dialog',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/dialog' 'url' : '/components/angular-material/dialog'
}, },
{ {
'id' : 'tooltip',
'title': 'Tooltip', 'title': 'Tooltip',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/tooltip' 'url' : '/components/angular-material/tooltip'
}, },
{ {
'id' : 'snackbar',
'title': 'Snackbar', 'title': 'Snackbar',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/snackbar' 'url' : '/components/angular-material/snackbar'
@ -551,20 +648,24 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'data-table',
'title' : 'Data table', 'title' : 'Data table',
'type' : 'group', 'type' : 'group',
'children': [ 'children': [
{ {
'id' : 'table',
'title': 'Table', 'title': 'Table',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/data-table' 'url' : '/components/angular-material/data-table'
}, },
{ {
'id' : 'sort-header',
'title': 'Sort header', 'title': 'Sort header',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/sort-header' 'url' : '/components/angular-material/sort-header'
}, },
{ {
'id' : 'paginator',
'title': 'Paginator', 'title': 'Paginator',
'type' : 'item', 'type' : 'item',
'url' : '/components/angular-material/paginator' 'url' : '/components/angular-material/paginator'
@ -574,42 +675,49 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'countdown',
'title': 'Countdown', 'title': 'Countdown',
'type' : 'item', 'type' : 'item',
'icon' : 'settings_input_component', 'icon' : 'settings_input_component',
'url' : '/components/countdown' 'url' : '/components/countdown'
}, },
{ {
'id' : 'highlightjs',
'title': 'Highlight.js', 'title': 'Highlight.js',
'type' : 'item', 'type' : 'item',
'icon' : 'settings_input_component', 'icon' : 'settings_input_component',
'url' : '/components/highlightjs' 'url' : '/components/highlightjs'
}, },
{ {
'id' : 'material-color-picker',
'title': 'Material Color Picker', 'title': 'Material Color Picker',
'type' : 'item', 'type' : 'item',
'icon' : 'settings_input_component', 'icon' : 'settings_input_component',
'url' : '/components/material-color-picker' 'url' : '/components/material-color-picker'
}, },
{ {
'id' : 'navigation',
'title': 'Navigation', 'title': 'Navigation',
'type' : 'item', 'type' : 'item',
'icon' : 'settings_input_component', 'icon' : 'settings_input_component',
'url' : '/components/navigation' 'url' : '/components/navigation'
}, },
{ {
'id' : 'search-bar',
'title': 'Search Bar', 'title': 'Search Bar',
'type' : 'item', 'type' : 'item',
'icon' : 'settings_input_component', 'icon' : 'settings_input_component',
'url' : '/components/search-bar' 'url' : '/components/search-bar'
}, },
{ {
'id' : 'shortcuts',
'title': 'Shortcuts', 'title': 'Shortcuts',
'type' : 'item', 'type' : 'item',
'icon' : 'settings_input_component', 'icon' : 'settings_input_component',
'url' : '/components/shortcuts' 'url' : '/components/shortcuts'
}, },
{ {
'id' : 'widget',
'title': 'Widget', 'title': 'Widget',
'type' : 'item', 'type' : 'item',
'icon' : 'settings_input_component', 'icon' : 'settings_input_component',
@ -618,16 +726,19 @@ export class NavigationModel
] ]
}, },
{ {
'id' : '3rd-party-components',
'title' : '3rd Party components', 'title' : '3rd Party components',
'type' : 'group', 'type' : 'group',
'icon' : 'settings_input_component', 'icon' : 'settings_input_component',
'children': [ 'children': [
{ {
'id' : 'datatables',
'title' : 'Datatables', 'title' : 'Datatables',
'type' : 'collapse', 'type' : 'collapse',
'icon' : 'border_all', 'icon' : 'border_all',
'children': [ 'children': [
{ {
'id' : 'ngxdatatable',
'title': 'ngx-datatable', 'title': 'ngx-datatable',
'type' : 'item', 'type' : 'item',
'url' : '/components-third-party/datatables/ngx-datatable' 'url' : '/components-third-party/datatables/ngx-datatable'
@ -635,6 +746,7 @@ export class NavigationModel
] ]
}, },
{ {
'id' : 'google-maps',
'title': 'Google Maps', 'title': 'Google Maps',
'type' : 'item', 'type' : 'item',
'icon' : 'place', 'icon' : 'place',