Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update Nebular to 4.1.2 #5451

Merged
merged 9 commits into from
Jul 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
242 changes: 168 additions & 74 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"@asymmetrik/ngx-leaflet": "3.0.1",
"@nebular/auth": "4.1.0",
"@nebular/bootstrap": "4.1.0",
"@nebular/eva-icons": "4.1.0",
"@nebular/security": "4.1.0",
"@nebular/theme": "4.1.0",
"@nebular/auth": "4.1.2",
"@nebular/eva-icons": "4.1.2",
"@nebular/security": "4.1.2",
"@nebular/theme": "4.1.2",
"@swimlane/ngx-charts": "^10.0.0",
"angular-tree-component": "7.2.0",
"angular2-chartjs": "0.4.1",
Expand Down
22 changes: 2 additions & 20 deletions src/app/@theme/layouts/one-column/one-column.layout.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { AfterViewInit, Component, Inject, PLATFORM_ID, ViewChild } from '@angular/core';
import { isPlatformBrowser } from '@angular/common';
import { NbLayoutComponent } from '@nebular/theme';

import { WindowModeBlockScrollService } from '../../services/window-mode-block-scroll.service';
import { Component } from '@angular/core';

@Component({
selector: 'ngx-one-column-layout',
Expand All @@ -27,18 +23,4 @@ import { WindowModeBlockScrollService } from '../../services/window-mode-block-s
</nb-layout>
`,
})
export class OneColumnLayoutComponent implements AfterViewInit {

@ViewChild(NbLayoutComponent, { static: false }) layout: NbLayoutComponent;

constructor(
@Inject(PLATFORM_ID) private platformId,
private windowModeBlockScrollService: WindowModeBlockScrollService,
) {}

ngAfterViewInit() {
if (isPlatformBrowser(this.platformId)) {
this.windowModeBlockScrollService.register(this.layout);
}
}
}
export class OneColumnLayoutComponent {}
132 changes: 0 additions & 132 deletions src/app/@theme/services/window-mode-block-scroll.service.ts

This file was deleted.

8 changes: 8 additions & 0 deletions src/app/@theme/styles/_layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@mixin ngx-layout() {
@include media-breakpoint-down(is) {
.row {
margin-left: -10px;
margin-right: -10px;
}
}
}
57 changes: 0 additions & 57 deletions src/app/@theme/styles/_overrides.scss
Original file line number Diff line number Diff line change
@@ -1,68 +1,11 @@
@import './themes';

@mixin nb-overrides() {
// overrides bootstrap svg style
nb-icon svg {
vertical-align: top;
}

nb-auth-block .links nb-icon {
font-size: 2.5rem;
}

nb-select.size-medium button {
padding: 0.4375rem 2.2rem 0.4375rem 1.125rem !important;

nb-icon {
right: 0.41rem !important;
}
}

nb-flip-card {
.front-container {
-webkit-backface-visibility: visible;
}
.back-container {
-webkit-backface-visibility: hidden;
}

.flipped {
.front-container {
-webkit-backface-visibility: hidden;
}
.back-container {
-webkit-backface-visibility: visible;
}
}
}

nb-layout .layout .layout-container nb-sidebar {
&,
.main-container-fixed {
top: nb-theme(header-height);
}
}

@media screen and (min-width: nb-theme(layout-window-mode-max-width) + 20px) {
@include f-window-mode(nb-theme(layout-window-mode-padding-top) / 4);
}

@media screen and (min-width: nb-theme(layout-window-mode-max-width) + 150px) {
@include f-window-mode(nb-theme(layout-window-mode-padding-top) / 2);
}

@media screen and (min-width: nb-theme(layout-window-mode-max-width) + 300px) {
@include f-window-mode(nb-theme(layout-window-mode-padding-top));
}
}

@mixin f-window-mode ($padding-top) {
nb-layout.window-mode nb-layout-header.fixed {
top: $padding-top;
}

nb-sidebar .main-container-fixed {
height: calc(100vh - #{nb-theme(header-height)} - #{$padding-top}) !important;
top: calc(#{nb-theme(header-height)} + #{$padding-top}) !important;
}
}
8 changes: 6 additions & 2 deletions src/app/@theme/styles/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
// framework component themes (styles tied to theme variables)
@import '~@nebular/theme/styles/globals';
@import '~@nebular/auth/styles/all';
@import '~@nebular/bootstrap/styles/globals';

@import '~bootstrap/scss/functions';
@import '~bootstrap/scss/variables';
@import '~bootstrap/scss/mixins';
@import '~bootstrap/scss/grid';

// loading progress bar theme
@import './pace.theme';

@import './layout';
@import './overrides';

// install the framework and custom global styles
Expand All @@ -20,8 +24,8 @@
// framework global styles
@include nb-theme-global();
@include nb-auth-global();
@include nb-bootstrap-global();

@include ngx-layout();
// loading progress bar
@include ngx-pace-theme();

Expand Down
Loading