Upgrading frontend to Angular 13

This commit is contained in:
softsimon 2021-12-08 20:24:33 +04:00
parent 7c89dde5d4
commit ed9b46bae0
No known key found for this signature in database
GPG key ID: 488D7DCFB5A430D7
7 changed files with 3683 additions and 8760 deletions

1
frontend/.gitignore vendored
View file

@ -34,6 +34,7 @@ speed-measure-plugin.json
.history/*
# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage

View file

@ -255,20 +255,6 @@
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"tsconfig.server.json",
"cypress/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@cypress/schematic:cypress",
"options": {

12371
frontend/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -53,18 +53,18 @@
"cypress:run:ci": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 && npm run generate-config && start-server-and-test serve:local-prod 4200 cypress:run:record"
},
"dependencies": {
"@angular-devkit/build-angular": "^12.2.6",
"@angular/animations": "~12.2.6",
"@angular/cli": "~12.2.6",
"@angular/common": "~12.2.6",
"@angular/compiler": "~12.2.6",
"@angular/core": "~12.2.6",
"@angular/forms": "~12.2.6",
"@angular/localize": "^12.2.6",
"@angular/platform-browser": "~12.2.6",
"@angular/platform-browser-dynamic": "~12.2.6",
"@angular/platform-server": "~12.2.6",
"@angular/router": "~12.2.6",
"@angular-devkit/build-angular": "^13.0.4",
"@angular/animations": "~13.0.3",
"@angular/cli": "~13.0.4",
"@angular/common": "~13.0.3",
"@angular/compiler": "~13.0.3",
"@angular/core": "~13.0.3",
"@angular/forms": "~13.0.3",
"@angular/localize": "^13.0.3",
"@angular/platform-browser": "~13.0.3",
"@angular/platform-browser-dynamic": "~13.0.3",
"@angular/platform-server": "~13.0.3",
"@angular/router": "~13.0.3",
"@fortawesome/angular-fontawesome": "^0.8.2",
"@fortawesome/fontawesome-common-types": "^0.2.35",
"@fortawesome/fontawesome-svg-core": "^1.2.35",
@ -73,7 +73,7 @@
"@mempool/mempool.js": "^2.2.4",
"@ng-bootstrap/ng-bootstrap": "^10.0.0",
"@nguniversal/express-engine": "11.2.1",
"@types/qrcode": "^1.3.4",
"@types/qrcode": "1.4.1",
"bootstrap": "4.5.0",
"browserify": "^17.0.0",
"clipboard": "^2.0.4",
@ -84,7 +84,7 @@
"ngx-bootrap-multiselect": "^2.0.0",
"ngx-echarts": "^7.0.1",
"ngx-infinite-scroll": "^10.0.1",
"qrcode": "^1.4.4",
"qrcode": "1.5.0",
"rxjs": "^6.6.7",
"tinyify": "^3.0.0",
"tlite": "^0.1.9",
@ -92,8 +92,8 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular/compiler-cli": "~12.2.6",
"@angular/language-service": "~12.2.6",
"@angular/compiler-cli": "~13.0.3",
"@angular/language-service": "~13.0.3",
"@nguniversal/builders": "^11.2.1",
"@types/express": "^4.17.0",
"@types/jasmine": "~3.6.0",
@ -110,7 +110,7 @@
"karma-jasmine-html-reporter": "^1.5.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.3.5"
"typescript": "~4.4.4"
},
"optionalDependencies": {
"@cypress/schematic": "^1.3.0",
@ -120,4 +120,4 @@
"mock-socket": "^9.0.3",
"start-server-and-test": "^1.12.6"
}
}
}

View file

@ -1,5 +1,5 @@
import { Component, Input, AfterViewInit, OnDestroy, ViewChild, ElementRef } from '@angular/core';
import * as QRCode from 'qrcode/build/qrcode.js';
import { Component, Input, AfterViewInit, ViewChild, ElementRef } from '@angular/core';
import * as QRCode from 'qrcode';
import { StateService } from 'src/app/services/state.service';
@Component({
@ -23,7 +23,7 @@ export class QrcodeComponent implements AfterViewInit {
if (!this.stateService.isBrowser) {
return;
}
const opts = {
const opts: QRCode.QRCodeRenderersOptions = {
errorCorrectionLevel: 'H',
margin: 0,
color: {
@ -31,7 +31,6 @@ export class QrcodeComponent implements AfterViewInit {
light: '#fff'
},
width: this.size,
height: this.size,
};
if (!this.data) {

View file

@ -22,16 +22,6 @@ import '@angular/localize/init';
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags

View file

@ -12,7 +12,9 @@ declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);