Angular 17 migration

This commit is contained in:
Igor Kulikov 2024-09-26 15:48:53 +03:00
parent 48d082adf0
commit 0d95cec8d1
8 changed files with 2368 additions and 3347 deletions

View File

@ -233,7 +233,7 @@
"extract-i18n": { "extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n", "builder": "@angular-devkit/build-angular:extract-i18n",
"options": { "options": {
"browserTarget": "thingsboard:build" "buildTarget": "thingsboard:build"
} }
}, },
"test": { "test": {

View File

@ -14,33 +14,33 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^16.2.12", "@angular/animations": "^17.3.12",
"@angular/cdk": "^16.2.14", "@angular/cdk": "^16.2.14",
"@angular/common": "^16.2.12", "@angular/common": "^17.3.12",
"@angular/compiler": "^16.2.12", "@angular/compiler": "^17.3.12",
"@angular/core": "^16.2.12", "@angular/core": "^17.3.12",
"@angular/flex-layout": "^15.0.0-beta.42", "@angular/flex-layout": "^15.0.0-beta.42",
"@angular/forms": "^16.2.12", "@angular/forms": "^17.3.12",
"@angular/material": "^16.2.14", "@angular/material": "^16.2.14",
"@angular/platform-browser": "^16.2.12", "@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^16.2.12", "@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^16.2.12", "@angular/router": "^17.3.12",
"@auth0/angular-jwt": "^5.1.2", "@auth0/angular-jwt": "^5.1.2",
"@date-io/core": "1.3.7", "@date-io/core": "1.3.7",
"@date-io/date-fns": "1.3.7", "@date-io/date-fns": "1.3.7",
"@flowjs/flow.js": "^2.14.1", "@flowjs/flow.js": "^2.14.1",
"@flowjs/ngx-flow": "~0.7.2", "@flowjs/ngx-flow": "~0.7.2",
"@geoman-io/leaflet-geoman-free": "2.14.2", "@geoman-io/leaflet-geoman-free": "2.14.2",
"@iplab/ngx-color-picker": "^15.0.2", "@iplab/ngx-color-picker": "^17.2.2",
"@mat-datetimepicker/core": "~12.0.1", "@mat-datetimepicker/core": "~12.0.1",
"@material-ui/core": "4.12.3", "@material-ui/core": "4.12.3",
"@material-ui/icons": "4.11.2", "@material-ui/icons": "4.11.2",
"@material-ui/pickers": "3.3.10", "@material-ui/pickers": "3.3.10",
"@mdi/svg": "^7.2.96", "@mdi/svg": "^7.2.96",
"@messageformat/core": "^3.1.0", "@messageformat/core": "^3.1.0",
"@ngrx/effects": "^15.4.0", "@ngrx/effects": "^17.2.0",
"@ngrx/store": "^15.4.0", "@ngrx/store": "^17.2.0",
"@ngrx/store-devtools": "^15.4.0", "@ngrx/store-devtools": "^17.2.0",
"@ngx-translate/core": "^14.0.0", "@ngx-translate/core": "^14.0.0",
"@svgdotjs/svg.filter.js": "^3.0.8", "@svgdotjs/svg.filter.js": "^3.0.8",
"@svgdotjs/svg.js": "^3.2.0", "@svgdotjs/svg.js": "^3.2.0",
@ -48,7 +48,7 @@
"@tinymce/tinymce-angular": "^7.0.0", "@tinymce/tinymce-angular": "^7.0.0",
"ace-builds": "1.4.13", "ace-builds": "1.4.13",
"ace-diff": "^3.0.3", "ace-diff": "^3.0.3",
"angular-gridster2": "~15.0.4", "angular-gridster2": "~17.0.0",
"angular2-hotkeys": "^13.1.0", "angular2-hotkeys": "^13.1.0",
"canvas-gauges": "^2.1.7", "canvas-gauges": "^2.1.7",
"core-js": "^3.29.1", "core-js": "^3.29.1",
@ -72,15 +72,15 @@
"leaflet.gridlayer.googlemutant": "0.14.1", "leaflet.gridlayer.googlemutant": "0.14.1",
"leaflet.markercluster": "1.5.3", "leaflet.markercluster": "1.5.3",
"libphonenumber-js": "^1.10.4", "libphonenumber-js": "^1.10.4",
"marked": "^4.0.17", "marked": "^12.0.2",
"moment": "^2.29.4", "moment": "^2.29.4",
"moment-timezone": "^0.5.42", "moment-timezone": "^0.5.42",
"ngx-clipboard": "^15.1.0", "ngx-clipboard": "^15.1.0",
"ngx-daterangepicker-material": "^6.0.4", "ngx-daterangepicker-material": "^6.0.4",
"ngx-drag-drop": "^15.0.1", "ngx-drag-drop": "^17.0.0",
"ngx-flowchart": "https://github.com/thingsboard/ngx-flowchart.git#release/2.0.0", "ngx-flowchart": "https://github.com/thingsboard/ngx-flowchart.git#release/2.0.0",
"ngx-hm-carousel": "^3.0.0", "ngx-hm-carousel": "^3.0.0",
"ngx-markdown": "^15.1.2", "ngx-markdown": "^17.2.1",
"ngx-sharebuttons": "^12.0.0", "ngx-sharebuttons": "^12.0.0",
"ngx-translate-messageformat-compiler": "^6.2.0", "ngx-translate-messageformat-compiler": "^6.2.0",
"objectpath": "^2.0.0", "objectpath": "^2.0.0",
@ -110,17 +110,17 @@
"zone.js": "~0.14.0" "zone.js": "~0.14.0"
}, },
"devDependencies": { "devDependencies": {
"@angular-builders/custom-webpack": "~15.0.0", "@angular-builders/custom-webpack": "~17.0.2",
"@angular-devkit/build-angular": "^16.2.16", "@angular-devkit/build-angular": "^17.3.10",
"@angular-eslint/builder": "16.3.1", "@angular-eslint/builder": "17.5.2",
"@angular-eslint/eslint-plugin": "16.3.1", "@angular-eslint/eslint-plugin": "17.5.2",
"@angular-eslint/eslint-plugin-template": "16.3.1", "@angular-eslint/eslint-plugin-template": "17.5.2",
"@angular-eslint/schematics": "16.3.1", "@angular-eslint/schematics": "17.5.2",
"@angular-eslint/template-parser": "16.3.1", "@angular-eslint/template-parser": "17.5.2",
"@angular/cli": "^16.2.16", "@angular/cli": "^17.3.10",
"@angular/compiler-cli": "^16.2.12", "@angular/compiler-cli": "^17.3.12",
"@angular/language-service": "^16.2.12", "@angular/language-service": "^17.3.12",
"@ngtools/webpack": "15.2.10", "@ngtools/webpack": "17.3.10",
"@types/ace-diff": "^2.1.1", "@types/ace-diff": "^2.1.1",
"@types/canvas-gauges": "^2.1.4", "@types/canvas-gauges": "^2.1.4",
"@types/flot": "^0.0.32", "@types/flot": "^0.0.32",
@ -143,11 +143,11 @@
"@types/systemjs": "6.13.1", "@types/systemjs": "6.13.1",
"@types/tinycolor2": "^1.4.3", "@types/tinycolor2": "^1.4.3",
"@types/tooltipster": "^0.0.31", "@types/tooltipster": "^0.0.31",
"@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^5.59.2", "@typescript-eslint/parser": "^7.2.0",
"compression-webpack-plugin": "^10.0.0", "compression-webpack-plugin": "^10.0.0",
"directory-tree": "^3.5.1", "directory-tree": "^3.5.1",
"eslint": "^8.39.0", "eslint": "^8.57.0",
"eslint-plugin-import": "latest", "eslint-plugin-import": "latest",
"eslint-plugin-jsdoc": "latest", "eslint-plugin-jsdoc": "latest",
"eslint-plugin-prefer-arrow": "latest", "eslint-plugin-prefer-arrow": "latest",

View File

@ -1,8 +1,8 @@
diff --git a/node_modules/@angular/core/fesm2022/core.mjs b/node_modules/@angular/core/fesm2022/core.mjs diff --git a/node_modules/@angular/core/fesm2022/core.mjs b/node_modules/@angular/core/fesm2022/core.mjs
index d0a158f..e16744c 100755 index 4eaa990..50f34b2 100755
--- a/node_modules/@angular/core/fesm2022/core.mjs --- a/node_modules/@angular/core/fesm2022/core.mjs
+++ b/node_modules/@angular/core/fesm2022/core.mjs +++ b/node_modules/@angular/core/fesm2022/core.mjs
@@ -12685,13 +12685,13 @@ function findDirectiveDefMatches(tView, tNode) { @@ -11963,13 +11963,13 @@ function findDirectiveDefMatches(tView, tNode) {
if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) { if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {
matches || (matches = []); matches || (matches = []);
if (isComponentDef(def)) { if (isComponentDef(def)) {

View File

@ -1,15 +1,15 @@
diff --git a/node_modules/angular-gridster2/fesm2020/angular-gridster2.mjs b/node_modules/angular-gridster2/fesm2020/angular-gridster2.mjs diff --git a/node_modules/angular-gridster2/fesm2022/angular-gridster2.mjs b/node_modules/angular-gridster2/fesm2022/angular-gridster2.mjs
index cf4e220..df51c91 100644 index 3e682eb..097ede4 100644
--- a/node_modules/angular-gridster2/fesm2020/angular-gridster2.mjs --- a/node_modules/angular-gridster2/fesm2022/angular-gridster2.mjs
+++ b/node_modules/angular-gridster2/fesm2020/angular-gridster2.mjs +++ b/node_modules/angular-gridster2/fesm2022/angular-gridster2.mjs
@@ -666,8 +666,8 @@ class GridsterRenderer { @@ -666,8 +666,8 @@ class GridsterRenderer {
renderer.setStyle(el, DirTypes.LTR ? 'margin-right' : 'margin-left', ''); renderer.setStyle(el, DirTypes.LTR ? 'margin-right' : 'margin-left', '');
} }
else { else {
- const x = Math.round(this.gridster.curColWidth * item.x); - const x = Math.round(this.gridster.curColWidth * item.x);
- const y = Math.round(this.gridster.curRowHeight * item.y); - const y = Math.round(this.gridster.curRowHeight * item.y);
+ const x = this.gridster.curColWidth * item.x; + const x = this.gridster.curColWidth * item.x;
+ const y = this.gridster.curRowHeight * item.y; + const y = this.gridster.curRowHeight * item.y;
const width = this.gridster.curColWidth * item.cols - this.gridster.$options.margin; const width = this.gridster.curColWidth * item.cols - this.gridster.$options.margin;
const height = this.gridster.curRowHeight * item.rows - this.gridster.$options.margin; const height = this.gridster.curRowHeight * item.rows - this.gridster.$options.margin;
// set the cell style // set the cell style

View File

@ -88,7 +88,7 @@ import { EntityConflictInterceptor } from '@core/interceptors/entity-conflict.in
? [] ? []
: StoreDevtoolsModule.instrument({ : StoreDevtoolsModule.instrument({
name: env.appTitle name: env.appTitle
}) , connectInZone: true})
], ],
providers: [ providers: [
{ {

View File

@ -17,7 +17,7 @@
--> -->
<ng-container [formGroup]="axisSettingsFormGroup"> <ng-container [formGroup]="axisSettingsFormGroup">
<div class="tb-form-panel stroked tb-slide-toggle"> <div class="tb-form-panel stroked tb-slide-toggle">
<mat-expansion-panel class="tb-settings" [(expanded)]="alwaysExpanded || settingsExpanded" <mat-expansion-panel class="tb-settings" [expanded]="alwaysExpanded || settingsExpanded"
[disabled]="alwaysExpanded || !axisSettingsFormGroup.get('show').value"> [disabled]="alwaysExpanded || !axisSettingsFormGroup.get('show').value">
<mat-expansion-panel-header fxLayout="row wrap"> <mat-expansion-panel-header fxLayout="row wrap">
<mat-panel-title> <mat-panel-title>

View File

@ -45,6 +45,6 @@
<div #javascriptEditor id="tb-javascript-input" [ngStyle]="fillHeight ? {} : {minHeight: minHeight}" [ngClass]="{'fill-height': fillHeight}"></div> <div #javascriptEditor id="tb-javascript-input" [ngStyle]="fillHeight ? {} : {minHeight: minHeight}" [ngClass]="{'fill-height': fillHeight}"></div>
</div> </div>
<div *ngIf="!hideBrackets" fxLayout="row" fxLayoutAlign="start center" style="height: 40px;"> <div *ngIf="!hideBrackets" fxLayout="row" fxLayoutAlign="start center" style="height: 40px;">
<label class="tb-title no-padding" [ngClass]="{'tb-error': hasErrors || !functionValid || required && !modelValue}">}</label> <label class="tb-title no-padding" [ngClass]="{'tb-error': hasErrors || !functionValid || required && !modelValue}">&#125;</label>
</div> </div>
</div> </div>

File diff suppressed because it is too large Load Diff