Skip to content

Commit

Permalink
upgrade-nebular-to-9 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
abadakhshan authored Jan 13, 2022
1 parent fe38d09 commit 720dd5f
Show file tree
Hide file tree
Showing 5 changed files with 2,245 additions and 2,249 deletions.
1 change: 0 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
Expand Down
12 changes: 8 additions & 4 deletions extra-webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
const path = require('path');
const AngularCompilerPlugin = require('@ngtools/webpack/src');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const LayoutResolver = require('./build-tools/layout-resolver');

module.exports = (config) => {
debugger;

const index = config.plugins.findIndex((p) => {
return p instanceof AngularCompilerPlugin.AngularWebpackPlugin;
});
const options = config.plugins[index].pluginOptions;
options.directTemplateLoading = false;
config.plugins.splice(index);

config.plugins.push(new AngularCompilerPlugin.AngularWebpackPlugin(options));

config.plugins.splice(
index,
1,
new AngularCompilerPlugin.AngularWebpackPlugin(options)
);
config.module.rules.unshift(
{
test: /\.html$/i,
Expand Down
54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~13.0.1",
"@angular/cdk": "~13.0.0",
"@angular/common": "~13.0.1",
"@angular/compiler": "~13.0.1",
"@angular/core": "~13.0.1",
"@angular/flex-layout": "~12.0.0-beta.35",
"@angular/forms": "~13.0.1",
"@angular/material": "~13.0.0",
"@angular/platform-browser": "~13.0.1",
"@angular/platform-browser-dynamic": "~13.0.1",
"@angular/router": "~13.0.1",
"@angular/animations": "~13.1.2",
"@angular/cdk": "~13.1.2",
"@angular/common": "~13.1.2",
"@angular/compiler": "~13.1.2",
"@angular/core": "~13.1.2",
"@angular/flex-layout": "~13.0.0-beta.36",
"@angular/forms": "~13.1.2",
"@angular/material": "~13.1.2",
"@angular/platform-browser": "~13.1.2",
"@angular/platform-browser-dynamic": "~13.1.2",
"@angular/router": "~13.1.2",
"@aspnet/signalr": "^1.1.4",
"@fortawesome/fontawesome-free": "^5.15.4",
"@narik/app-core": "^7.0.0",
Expand All @@ -33,50 +33,50 @@
"@narik/jwt-authentication": "^7.0.0",
"@narik/ui-core": "^7.0.0",
"@narik/ui-material": "^7.0.0",
"@nebular/eva-icons": "8.0.0",
"@nebular/theme": "8.0.0",
"@nebular/eva-icons": "9.0.0",
"@nebular/theme": "9.0.0",
"@ngx-translate/core": "^14.0.0",
"@thebespokepixel/es-tinycolor": "^3.0.6",
"@thebespokepixel/es-tinycolor": "^3.1.0",
"angular2-text-mask": "^9.0.0",
"angular2-uuid": "^1.1.1",
"bootstrap": "^5.1.3",
"class-validator": "^0.13.1",
"class-validator": "^0.13.2",
"data-adapter": "^0.2.3",
"eva-icons": "^1.1.3",
"localforage": "^1.10.0",
"lodash-es": "^4.17.21",
"material-community-components": "^11.0.0",
"material-community-components": "^12.0.0",
"ngforage": "^6.0.0",
"ngx-toastr": "^14.1.4",
"ngx-toastr": "^14.2.1",
"roboto-fontface": "^0.10.0",
"rxjs": "~7.4.0",
"rxjs": "~7.5.2",
"tinycolor2": "^1.4.2",
"tslib": "^2.3.1",
"typeface-exo": "^1.1.13",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-builders/custom-webpack": "13.0.0",
"@angular-devkit/build-angular": "~13.0.2",
"@angular/cli": "~13.0.2",
"@angular/compiler-cli": "~13.0.1",
"@angular/language-service": "~13.0.1",
"@angular-devkit/build-angular": "~13.1.3",
"@angular/cli": "~13.1.3",
"@angular/compiler-cli": "~13.1.2",
"@angular/language-service": "~13.1.2",
"@narik/webpack-tools": "4.1.0",
"@types/jasmine": "~3.10.2",
"@types/jasmine": "~3.10.3",
"@types/jasminewd2": "~2.0.10",
"@types/node": "^16.11.7",
"@types/node": "^17.0.8",
"cheerio": "^1.0.0-rc.10",
"codelyzer": "^6.0.2",
"jasmine-core": "~3.10.1",
"jasmine-core": "~4.0.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.3.8",
"karma": "~6.3.10",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"protractor": "~7.0.0",
"ts-node": "~10.4.0",
"tslint": "~6.1.3",
"typescript": "~4.4.4"
"typescript": "~4.5.4"
}
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { NarikTranslateService } from "@narik/core";
import { NarikTranslateService } from '@narik/core';
import {
NarikComponent,
FormTitleResolver,
MODULE_UI_KEY,
MetaDataService
} from "@narik/infrastructure";
import { filter } from "rxjs/internal/operators/filter";
import { map } from "rxjs/internal/operators/map";
MetaDataService,
} from '@narik/infrastructure';
import { filter } from 'rxjs/internal/operators/filter';
import { map } from 'rxjs/internal/operators/map';

import { Component, Input, OnInit, Injector } from "@angular/core";
import { Title } from "@angular/platform-browser";
import { ActivatedRoute, NavigationEnd, Router } from "@angular/router";
import { NbMenuItem } from "@nebular/theme";
import { takeWhile } from "rxjs/internal/operators/takeWhile";
import { Component, Input, OnInit, Injector } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { NbMenuItem } from '@nebular/theme';
import { takeWhile } from 'rxjs/internal/operators/takeWhile';

@Component({
selector: "ngx-main-view",
templateUrl: "ngx-main-view.component.html",
styleUrls: ["ngx-main-view.component.scss"]
selector: 'ngx-main-view',
templateUrl: 'ngx-main-view.component.html',
styleUrls: ['ngx-main-view.component.scss'],
})
export class NgxMainViewComponent extends NarikComponent implements OnInit {
_menuItems: NbMenuItem[];
Expand All @@ -33,7 +33,7 @@ export class NgxMainViewComponent extends NarikComponent implements OnInit {
}

@Input()
navigationType = "route";
navigationType = 'route';

@Input()
set menuItems(value: NbMenuItem[]) {
Expand All @@ -43,8 +43,8 @@ export class NgxMainViewComponent extends NarikComponent implements OnInit {
return this._menuItems;
}

@Input() headerTitle = "";
@Input() menuHeader = "";
@Input() headerTitle = '';
@Input() menuHeader = '';

constructor(
private translateService: NarikTranslateService,
Expand All @@ -60,23 +60,23 @@ export class NgxMainViewComponent extends NarikComponent implements OnInit {
const moduleUiKey = injector.get(MODULE_UI_KEY);
const viewOptions = metaDataService.getValue<any>(
moduleUiKey,
"viewOptions"
'viewOptions'
);

router.events
.pipe(
filter(event => event instanceof NavigationEnd),
filter((event) => event instanceof NavigationEnd),
map(() => {
let route = activatedRoute;
while (route.firstChild) {
route = route.firstChild;
}
return route;
}),
filter(route => route.outlet === "primary"),
takeWhile(x => this.isAlive)
filter((route) => route.outlet === 'primary'),
takeWhile((x) => this.isAlive)
)
.subscribe(ar => {
.subscribe((ar) => {
this.title = this.formTitleResolver.resolveTitle(ar.snapshot);
this.titleService.setTitle(this.title);
});
Expand Down
Loading

0 comments on commit 720dd5f

Please sign in to comment.