feat: upgrade to angular9, upgrade to nebular 5.0, add material theme (#5694)

* chore: update README for extra theme (#5466)

* fix(tinymce): set absolute path for skin url (#5491)

* feat: add calendar with week numbers example (#5515)

* chore(readme): update bundles section text

* fix(forms): add missing forms module import (#5530)

* feat: update Nebular to 4.4.0 (#5533)

* chore(readme): update bundles image (#5565)

* chore: add bundles black friday deal (#5569)

* chore(readme): update black friday 2019 image (#5570)

* chore(readme): remove bundles discounts image (#5574)

* chore(readme): update bundles image (#5575)

* feat(seo): add canonical tag (#5578)

* chore(analytics): add proper analytics tracking URLs (#5604)

* feat: Material theme

* feat: upgrade to Angular 9 and Nebular 5 (#5628)

BREAKING CHANGE:
Angular updated to version 9.
Nebular updated to version 5.
`@agm/core` replaced with `@angular/google-maps`.
`ng2-completer` replaced with `@akveo/ng2-completer`, read details [here](https://github.com/akveo/ng2-smart-table/pull/1140#issue-392285957).

* Upgrade to the latest minor version of Angular

* Upgrade to the latest major version of Angular

* Upgrade to nebular 5 beta, remove "angular-tree-component" package

* Remove packages uncompatible with Ivy

* Fix post-upgrade errors

* Replace @agm/core with @angular/google-maps

* Fix search-map component using @angular/google-maps

* Move material theme files from @nebular

* Add missing images and change fg text color of dark material theme to bright white

* Implement ripple effect for material themes

* Add material style overrides

* Add ripple effects to controls across application

* Configure material theme, add material button and input examples

* Add toggle button example

* Fix lint warnings

* Add material menu icon for material themes

* Fix lint warnings for styles

* Set menu font-weight to normal for material themes

* Add "hover" and "active" styles for material menu

* Update material styles

* Override input styles for material themes

* Override select styles for material themes

* Hide rounded inputs for material themes

* Update material styles

* Remove non-material themes

* Revert "Remove non-material themes"

This reverts commit c2e319499f.

* Fix actions color

* Fix lint warnings

* Fix scrollbar for "traffic" card

* Fix scroll for "user activity" card

* Revert "Fix scroll for "user activity" card"

This reverts commit 4d793b1731.

* Revert "Fix scrollbar for "traffic" card"

This reverts commit b00da0d260.

* Fix scroll for nb-list inside nb-card

* chore(readme): add material theme description

* Remove unused angular2-toaster package

* chore(readme): add material theme images

* chore(readme): update text

* Upgrade to @nebular 5 release

* feat: update ng2-smart-table to 1.6

* chore(readme): add info about material theme branch

* fix: put Material theme in front of others

Otherwise Material theme style override Nebular

* refactor(material): remove options list border radius

* refactor: material input new look

* fix(form-inputs): show material inputs
* feat(material): change inputs style

* refactor: improve observable layout change sharing

* feat: add safe delayed event of layout change

* fix: replace change layout with safe change

* fix: limit front card width to prevent map overflow before repaint

* build: starter-kit clean up

* feat: upgrade to angular 9

Co-authored-by: David Henley <henleydr@gmail.com>
Co-authored-by: Sergey Andrievskiy <yggg@users.noreply.github.com>
Co-authored-by: Leon Lafayette <me@le0n.io>
Co-authored-by: Vladimir Lugovsky <lugovsky.v@gmail.com>
Co-authored-by: Sergey Andrievskiy <s.andrievskiy@akveo.com>
Co-authored-by: Evgeny Lupanov <elupanov@users.noreply.github.com>
Co-authored-by: eugene-sinitsyn <e.sinitsyn.s@akveo.com>
Co-authored-by: Evgeny Lupanov <e.lupanov@akveo.com>
Co-authored-by: sashaqred <sashaqred@ya.ru>
Co-authored-by: Dmitry Nehaychik <4dmitr@gmail.com>
Co-authored-by: Maksim Karatkevich <m.karatkevich@akveo.com>
This commit is contained in:
maksim-karatkevich 2020-05-22 18:43:15 +03:00 committed by GitHub
parent 9b560a0661
commit 07f430126f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 9329 additions and 4475 deletions

View file

@ -2,8 +2,10 @@ import { Component, OnDestroy, OnInit } from '@angular/core';
import { NbMediaBreakpointsService, NbMenuService, NbSidebarService, NbThemeService } from '@nebular/theme';
import { UserData } from '../../../@core/data/users';
import { LayoutService } from '../../../@core/utils';
import { map, takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs';
import { Subject, Observable } from 'rxjs';
import { RippleService } from '../../../@core/utils/ripple.service';
@Component({
selector: 'ngx-header',
@ -13,6 +15,7 @@ import { Subject } from 'rxjs';
export class HeaderComponent implements OnInit, OnDestroy {
private destroy$: Subject<void> = new Subject<void>();
public readonly materialTheme$: Observable<boolean>;
userPictureOnly: boolean = false;
user: any;
@ -33,17 +36,34 @@ export class HeaderComponent implements OnInit, OnDestroy {
value: 'corporate',
name: 'Corporate',
},
{
value: 'material-light',
name: 'Material Light',
},
{
value: 'material-dark',
name: 'Material Dark',
},
];
currentTheme = 'default';
userMenu = [ { title: 'Profile' }, { title: 'Log out' } ];
constructor(private sidebarService: NbSidebarService,
private menuService: NbMenuService,
private themeService: NbThemeService,
private userService: UserData,
private breakpointService: NbMediaBreakpointsService) {
public constructor(
private sidebarService: NbSidebarService,
private menuService: NbMenuService,
private themeService: NbThemeService,
private userService: UserData,
private layoutService: LayoutService,
private breakpointService: NbMediaBreakpointsService,
private rippleService: RippleService,
) {
this.materialTheme$ = this.themeService.onThemeChange()
.pipe(map(theme => {
const themeName: string = theme?.name || '';
return themeName.startsWith('material');
}));
}
ngOnInit() {
@ -66,7 +86,10 @@ export class HeaderComponent implements OnInit, OnDestroy {
map(({ name }) => name),
takeUntil(this.destroy$),
)
.subscribe(themeName => this.currentTheme = themeName);
.subscribe(themeName => {
this.currentTheme = themeName;
this.rippleService.toggle(themeName?.startsWith('material'));
});
}
ngOnDestroy() {
@ -80,6 +103,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
toggleSidebar(): boolean {
this.sidebarService.toggle(true, 'menu-sidebar');
this.layoutService.changeLayoutSize();
return false;
}