Skip to content

Commit 2f96b3e

Browse files
committed
chore(pilot-ui): update angular to 10.x latest
1 parent 37d73bb commit 2f96b3e

23 files changed

+1897
-1482
lines changed
File renamed without changes.

packages/misc/pilot-ui/angular.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
"aot": false,
2929
"assets": ["src/favicon.ico", "src/assets"],
3030
"styles": ["src/styles.scss", "src/tailwind.scss"],
31-
"scripts": [],
32-
"es5BrowserSupport": true
31+
"scripts": []
3332
},
3433
"configurations": {
3534
"production": {

packages/misc/pilot-ui/package-lock.json

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

packages/misc/pilot-ui/package.json

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,48 +13,48 @@
1313
},
1414
"private": true,
1515
"dependencies": {
16-
"@angular/animations": "~9.1.12",
17-
"@angular/common": "~9.1.12",
18-
"@angular/compiler": "~9.1.12",
19-
"@angular/core": "~9.1.12",
20-
"@angular/forms": "~9.1.12",
21-
"@angular/platform-browser": "~9.1.12",
22-
"@angular/platform-browser-dynamic": "~9.1.12",
23-
"@angular/router": "~9.1.12",
24-
"@ngxs/devtools-plugin": "^3.4.3",
25-
"@ngxs/store": "^3.4.3",
26-
"angular-split": "^3.0.1",
27-
"autoprefixer": "^9.5.1",
28-
"core-js": "^2.5.4",
16+
"@angular/animations": "~10.0.11",
17+
"@angular/common": "~10.0.11",
18+
"@angular/compiler": "~10.0.11",
19+
"@angular/core": "~10.0.11",
20+
"@angular/forms": "~10.0.11",
21+
"@angular/platform-browser": "~10.0.11",
22+
"@angular/platform-browser-dynamic": "~10.0.11",
23+
"@angular/router": "~10.0.11",
24+
"@ngxs/devtools-plugin": "^3.6.2",
25+
"@ngxs/store": "^3.6.2",
26+
"angular-split": "^4.0.0",
27+
"autoprefixer": "^9.8.6",
28+
"core-js": "^3.6.5",
2929
"pretty-checkbox": "^3.0.3",
30-
"remixicon": "^2.1.0",
30+
"remixicon": "^2.5.0",
3131
"rxjs": "^6.6.2",
32-
"tailwindcss": "^1.1.3",
33-
"toppy": "^2.3.3",
34-
"tslib": "^1.10.0",
35-
"zone.js": "~0.10.2"
32+
"tailwindcss": "^1.7.3",
33+
"toppy": "^2.3.4",
34+
"tslib": "^2.0.1",
35+
"zone.js": "~0.11.1"
3636
},
3737
"devDependencies": {
38-
"@angular-builders/custom-webpack": "^8.4.0",
39-
"@angular-devkit/build-angular": "~0.901.12",
40-
"@angular/cli": "~9.1.12",
41-
"@angular/compiler-cli": "~9.1.12",
42-
"@angular/language-service": "~9.1.12",
43-
"@fullhuman/postcss-purgecss": "^1.3.0",
44-
"@types/jasminewd2": "~2.0.3",
38+
"@angular-builders/custom-webpack": "^10.0.0",
39+
"@angular-devkit/build-angular": "~0.1000.7",
40+
"@angular/cli": "~10.0.7",
41+
"@angular/compiler-cli": "~10.0.11",
42+
"@angular/language-service": "~10.0.11",
43+
"@fullhuman/postcss-purgecss": "^2.3.0",
44+
"@types/jasminewd2": "~2.0.8",
4545
"argh": "^1.0.0",
46-
"codelyzer": "^5.1.2",
47-
"configstore": "^5.0.0",
48-
"jasmine-core": "~3.4.0",
49-
"jasmine-spec-reporter": "~4.2.1",
50-
"karma": "~4.1.0",
51-
"karma-chrome-launcher": "~2.2.0",
52-
"karma-coverage-istanbul-reporter": "~2.0.1",
53-
"karma-jasmine": "~2.0.1",
54-
"karma-jasmine-html-reporter": "^1.4.0",
46+
"codelyzer": "^6.0.0",
47+
"configstore": "^5.0.1",
48+
"jasmine-core": "~3.6.0",
49+
"jasmine-spec-reporter": "~5.0.2",
50+
"karma": "~5.1.1",
51+
"karma-chrome-launcher": "~3.1.0",
52+
"karma-coverage-istanbul-reporter": "~3.0.3",
53+
"karma-jasmine": "~4.0.1",
54+
"karma-jasmine-html-reporter": "^1.5.4",
5555
"postcss-import": "^12.0.1",
5656
"postcss-loader": "^3.0.0",
57-
"postcss-scss": "^2.0.0",
58-
"protractor": "~5.4.0"
57+
"postcss-scss": "^2.1.1",
58+
"protractor": "~7.0.0"
5959
}
6060
}

packages/misc/pilot-ui/src/app/components/header/header.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { Component } from "@angular/core";
1+
import { Component, OnInit } from "@angular/core";
22
import { Select } from "@ngxs/store";
33
import { Observable } from "rxjs";
44

55
@Component({
66
selector: "pilot-header",
77
templateUrl: "./header.template.html",
88
})
9-
export class HeaderComponent {
9+
export class HeaderComponent implements OnInit {
1010
menuItems = [];
1111
@Select((state) => state.common.config)
1212
webConfig$: Observable<object>;

packages/misc/pilot-ui/src/app/components/header/header.template.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
class="bg-white flex border-bottom-2 border-b border-gray-300 mb-5"
33
*ngIf="webConfig$ | async as config"
44
>
5-
<div class="container mx-auto">
5+
<div class="container mx-auto" *ngIf="config.pilot">
66
<div class="flex flex-wrap items-center">
77
<div class="w-full sm:w-1/3 flex items-center p-5 sm:p-0 justify-start">
88
<i class="ri-dashboard-line mr-3 text-xl text-violet"></i>
@@ -29,7 +29,6 @@
2929
[routerLink]="menuItem.path"
3030
>
3131
<i
32-
[class]="menuItem.icon"
3332
class="{{menuItem.icon+' mr-1 text-xl text-gray-900 group-hover:text-vio-500 block text-center'}}"
3433
></i>
3534
{{menuItem.name}}</a

packages/misc/pilot-ui/src/app/services/commands.service.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ export class CommandsService {
1616

1717
onRequestCommands(): Observable<any> {
1818
return this.wsService.listen().pipe(
19-
filter(a => a && a.onRequestAllCommands),
19+
filter((a) => a && a.onRequestAllCommands),
2020
take(1),
21-
map(req => req.onRequestAllCommands),
22-
map(cmds => {
23-
return cmds.filter(cmd => cmd.isVisible);
21+
map((req) => req.onRequestAllCommands),
22+
map((cmds) => {
23+
return cmds.filter((cmd) => cmd.isVisible);
2424
}),
2525
);
2626
}
2727

2828
createdNestedCommands(commands: object[]) {
2929
const nest = (items, main = null, parent = "") =>
3030
items
31-
.filter(item => item.main === main)
32-
.map(item => ({
31+
.filter((item) => item.main === main)
32+
.map((item) => ({
3333
...item,
3434
children: nest(items, item.name, (parent + " " + item.name).trim()),
35-
family: [...parent.split(" "), item.name].filter(a => a),
35+
family: [...parent.split(" "), item.name].filter((a) => a),
3636
}));
3737
return nest(commands);
3838
}

packages/misc/pilot-ui/src/app/store/states/command.state.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Injectable } from "@angular/core";
12
import { State, Action, StateContext } from "@ngxs/store";
23
import { SelectedCommand } from "../actions/command.actions";
34

@@ -7,6 +8,7 @@ import { SelectedCommand } from "../actions/command.actions";
78
command: null,
89
},
910
})
11+
@Injectable()
1012
export class CommandState {
1113
@Action(SelectedCommand)
1214
selectedCommand(ctx: StateContext<any>, action: SelectedCommand) {

packages/misc/pilot-ui/src/app/store/states/commands.state.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Injectable } from "@angular/core";
12
import { State, Action, StateContext } from "@ngxs/store";
23
import { UpdateCommands, LoadCommands } from "../actions/commands.actions";
34
import { CommandsService } from "../../services/commands.service";
@@ -8,6 +9,7 @@ import { CommandModel } from "../../pilot.models";
89
name: "commands",
910
defaults: [],
1011
})
12+
@Injectable()
1113
export class CommandsState {
1214
constructor(private commandsService: CommandsService) {}
1315

@@ -16,7 +18,7 @@ export class CommandsState {
1618
this.commandsService.requestCommands();
1719
return this.commandsService
1820
.onRequestCommands()
19-
.pipe(mergeMap(commands => ctx.dispatch(new UpdateCommands(commands))));
21+
.pipe(mergeMap((commands) => ctx.dispatch(new UpdateCommands(commands))));
2022
}
2123

2224
@Action(UpdateCommands)

packages/misc/pilot-ui/src/app/store/states/common.state.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Injectable } from "@angular/core";
12
import { Title } from "@angular/platform-browser";
23
import { State, Action, StateContext, createSelector } from "@ngxs/store";
34
import { CommonModel } from "../../pilot.models";
@@ -19,6 +20,7 @@ import { mergeMap } from "rxjs/operators";
1920
config: {},
2021
},
2122
})
23+
@Injectable()
2224
export class CommonState {
2325
constructor(
2426
private commonService: CommonService,

0 commit comments

Comments
 (0)