Angular 18 migration

This commit is contained in:
Igor Kulikov 2024-10-02 11:16:15 +03:00
parent e84e65d8f6
commit d9dad92c2f
7 changed files with 358 additions and 403 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": {
"buildTarget": "thingsboard:build" "browserTarget": "thingsboard:build"
} }
}, },
"lint": { "lint": {

View File

@ -44,7 +44,7 @@
"@svgdotjs/svg.filter.js": "^3.0.8", "@svgdotjs/svg.filter.js": "^3.0.8",
"@svgdotjs/svg.js": "^3.2.4", "@svgdotjs/svg.js": "^3.2.4",
"@svgdotjs/svg.panzoom.js": "^2.1.2", "@svgdotjs/svg.panzoom.js": "^2.1.2",
"@tinymce/tinymce-angular": "^7.0.0", "@tinymce/tinymce-angular": "^8.0.1",
"ace-builds": "1.4.13", "ace-builds": "1.4.13",
"ace-diff": "^3.0.3", "ace-diff": "^3.0.3",
"angular-gridster2": "~18.0.1", "angular-gridster2": "~18.0.1",
@ -100,7 +100,7 @@
"split.js": "^1.6.5", "split.js": "^1.6.5",
"systemjs": "6.14.1", "systemjs": "6.14.1",
"tinycolor2": "^1.6.0", "tinycolor2": "^1.6.0",
"tinymce": "~5.10.7", "tinymce": "~6.8.4",
"tooltipster": "^4.2.8", "tooltipster": "^4.2.8",
"ts-transformer-keys": "^0.4.4", "ts-transformer-keys": "^0.4.4",
"tslib": "^2.7.0", "tslib": "^2.7.0",
@ -164,6 +164,7 @@
"@types/react": "17.0.37", "@types/react": "17.0.37",
"@date-io/core": "1.3.7", "@date-io/core": "1.3.7",
"rc-virtual-list": "3.4.13", "rc-virtual-list": "3.4.13",
"ace-builds": "1.4.13" "ace-builds": "1.4.13",
"tinymce": "6.8.4"
} }
} }

View File

@ -15,7 +15,7 @@
/// ///
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule, IMAGE_CONFIG } from '@angular/common';
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { StoreModule } from '@ngrx/store'; import { StoreModule } from '@ngrx/store';
import { EffectsModule } from '@ngrx/effects'; import { EffectsModule } from '@ngrx/effects';
@ -101,7 +101,14 @@ import { EntityConflictInterceptor } from '@core/interceptors/entity-conflict.in
} }
}, },
WINDOW_PROVIDERS, WINDOW_PROVIDERS,
provideHttpClient(withInterceptorsFromDi()) provideHttpClient(withInterceptorsFromDi()),
{
provide: IMAGE_CONFIG,
useValue: {
disableImageSizeWarning: true,
disableImageLazyLoadWarning: true
}
}
] }) ] })
export class CoreModule { export class CoreModule {
} }

View File

@ -84,15 +84,16 @@ export class NotificationTemplateConfigurationComponent implements OnDestroy, Co
tinyMceOptions: Record<string, any> = { tinyMceOptions: Record<string, any> = {
base_url: '/assets/tinymce', base_url: '/assets/tinymce',
suffix: '.min', suffix: '.min',
plugins: ['link table image imagetools code fullscreen'], plugins: ['link', 'table', 'image', 'lists', 'code', 'fullscreen'],
menubar: 'edit insert tools view format table', menubar: 'edit insert tools view format table',
toolbar: 'fontselect fontsizeselect | formatselect | bold italic strikethrough forecolor backcolor ' + toolbar: 'undo redo | fontfamily fontsize blocks | bold italic strikethrough | forecolor backcolor ' +
'| link | table | image | alignleft aligncenter alignright alignjustify ' + '| link table image | alignleft aligncenter alignright alignjustify ' +
'| numlist bullist outdent indent | removeformat | code | fullscreen', '| numlist bullist | outdent indent | removeformat | code | fullscreen',
toolbar_mode: 'sliding', toolbar_mode: 'sliding',
height: 400, height: 400,
autofocus: false, autofocus: false,
branding: false branding: false,
promotion: false
}; };
private propagateChange = null; private propagateChange = null;

View File

@ -49,10 +49,15 @@
margin-left: 2px; margin-left: 2px;
margin-right: 2px; margin-right: 2px;
} }
.mat-button-toggle-appearance-standard .mat-button-toggle-label-content { .mat-button-toggle-appearance-standard {
line-height: 32px; .mat-button-toggle-label-content {
font-size: 16px; line-height: 32px;
font-weight: 500; font-size: 16px;
font-weight: 500;
.mat-pseudo-checkbox {
display: none;
}
}
} }
.mat-button-toggle-checked.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay { .mat-button-toggle-checked.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay {
opacity: .01; opacity: .01;

View File

@ -5029,7 +5029,6 @@ var JSHINT = (function() {
}, 20); }, 20);
} }
function nullSafeProperty(s) { function nullSafeProperty(s) {
console.log("test " + s);
symbol(s, 20).exps = true; symbol(s, 20).exps = true;
return infix(s, function(context, left, that) { return infix(s, function(context, left, that) {
if (state.option.bitwise) { if (state.option.bitwise) {

File diff suppressed because it is too large Load Diff