diff --git a/Nuget.config b/Nuget.config index 8c24b91a1..3f0e00340 100644 --- a/Nuget.config +++ b/Nuget.config @@ -1,7 +1,6 @@  - \ No newline at end of file diff --git a/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj b/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj index bd47258f1..e498fd62c 100644 --- a/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj +++ b/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj @@ -8,11 +8,11 @@ True - + all runtime; build; native; contentfiles; analyzers - + diff --git a/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj b/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj index f366ea646..4a1d40b7e 100644 --- a/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj +++ b/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj b/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj index a3d6da666..f3c64022d 100644 --- a/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj +++ b/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj @@ -14,12 +14,12 @@ - - + + all runtime; build; native; contentfiles; analyzers - + diff --git a/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj b/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj index 8753ca0ef..56fc1237c 100644 --- a/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj +++ b/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj @@ -19,7 +19,7 @@ - + ..\..\Squidex.ruleset diff --git a/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj b/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj index 8a4d33405..539128d44 100644 --- a/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj +++ b/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj @@ -17,7 +17,7 @@ - + ..\..\Squidex.ruleset diff --git a/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj b/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj index e39741428..11d4cf7ba 100644 --- a/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj +++ b/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj @@ -11,12 +11,12 @@ - + all runtime; build; native; contentfiles; analyzers - - + + @@ -25,7 +25,7 @@ - + diff --git a/src/Squidex/Squidex.csproj b/src/Squidex/Squidex.csproj index c6c9c710c..146bbf58c 100644 --- a/src/Squidex/Squidex.csproj +++ b/src/Squidex/Squidex.csproj @@ -60,27 +60,27 @@ - + - + - - - - + + + + - + - + diff --git a/src/Squidex/app/framework/angular/forms/progress-bar.component.ts b/src/Squidex/app/framework/angular/forms/progress-bar.component.ts index 31d6f3dee..cd3e30577 100644 --- a/src/Squidex/app/framework/angular/forms/progress-bar.component.ts +++ b/src/Squidex/app/framework/angular/forms/progress-bar.component.ts @@ -5,13 +5,14 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { Component, ElementRef, Input, OnChanges, OnInit, Renderer2, SimpleChanges } from '@angular/core'; +import { ChangeDetectionStrategy, Component, ElementRef, Input, OnChanges, OnInit, Renderer2, SimpleChanges } from '@angular/core'; const ProgressBar = require('progressbar.js'); @Component({ selector: 'sqx-progress-bar', - template: '' + template: '', + changeDetection: ChangeDetectionStrategy.OnPush }) export class ProgressBarComponent implements OnChanges, OnInit { private progressBar: any; diff --git a/src/Squidex/app/framework/angular/forms/tag-editor.component.html b/src/Squidex/app/framework/angular/forms/tag-editor.component.html index 3de720b30..0c3dbe926 100644 --- a/src/Squidex/app/framework/angular/forms/tag-editor.component.html +++ b/src/Squidex/app/framework/angular/forms/tag-editor.component.html @@ -14,7 +14,6 @@ [formControl]="addInput" [attr.name]="inputName" [attr.placeholder]="placeholder" - [disabled]="addInput.disabled" autocomplete="off" autocorrect="off" autocapitalize="off" diff --git a/src/Squidex/app/shared/components/geolocation-editor.component.ts b/src/Squidex/app/shared/components/geolocation-editor.component.ts index 2b4709ce3..3531b0731 100644 --- a/src/Squidex/app/shared/components/geolocation-editor.component.ts +++ b/src/Squidex/app/shared/components/geolocation-editor.component.ts @@ -144,13 +144,12 @@ export class GeolocationEditorComponent implements ControlValueAccessor, AfterVi } public updateValueByInput() { - let updateMap = - !!this.geolocationForm.controls['latitude'].value && - !!this.geolocationForm.controls['longitude'].value; + const lat = this.geolocationForm.controls['latitude'].value; + const lng = this.geolocationForm.controls['longitude'].value; - this.value = this.geolocationForm.value; + this.updateValue(lat, lng); - if (updateMap) { + if (lat && lng) { this.updateMarker(true, true); } else { this.callChange(this.value); @@ -189,11 +188,7 @@ export class GeolocationEditorComponent implements ControlValueAccessor, AfterVi if (!this.marker && !this.isDisabled) { const latlng = event.latlng.wrap(); - this.value = { - latitude: latlng.lat, - longitude: latlng.lng - }; - + this.updateValue(latlng.lat, latlng.lng); this.updateMarker(false, true); } }); @@ -226,11 +221,7 @@ export class GeolocationEditorComponent implements ControlValueAccessor, AfterVi this.map.addListener('click', (event: any) => { if (!this.isDisabled) { - this.value = { - latitude: event.latLng.lat(), - longitude: event.latLng.lng() - }; - + this.updateValue(event.latLng.lat(), event.latLng.lng()); this.updateMarker(false, true); } }); @@ -253,8 +244,7 @@ export class GeolocationEditorComponent implements ControlValueAccessor, AfterVi let lat = place.geometry.location.lat(); let lng = place.geometry.location.lng(); - this.value = { latitude: lat, longitude: lng }; - + this.updateValue(lat, lng); this.updateMarker(false, true); } } @@ -275,6 +265,10 @@ export class GeolocationEditorComponent implements ControlValueAccessor, AfterVi this.updateMarker(true, true); } + private updateValue(lat: number, lng: number) { + this.value = { latitude: lat, longitude: lng }; + } + private updateMarker(zoom: boolean, fireEvent: boolean) { if (!this.isGoogleMaps) { this.updateMarkerOSM(zoom, fireEvent); @@ -291,10 +285,7 @@ export class GeolocationEditorComponent implements ControlValueAccessor, AfterVi this.marker.on('drag', (event: any) => { const latlng = event.latlng.wrap(); - this.value = { - latitude: latlng.lat, - longitude: latlng.lng - }; + this.updateValue(latlng.lat, latlng.lng); }); this.marker.on('dragend', () => { @@ -348,19 +339,12 @@ export class GeolocationEditorComponent implements ControlValueAccessor, AfterVi this.marker.addListener('drag', (event: any) => { if (!this.isDisabled) { - this.value = { - latitude: event.latLng.lat(), - longitude: event.latLng.lng() - }; + this.updateValue(event.latLng.lat(), event.LatLng.lng()); } }); this.marker.addListener('dragend', (event: any) => { if (!this.isDisabled) { - this.value = { - latitude: event.latLng.lat(), - longitude: event.latLng.lng() - }; - + this.updateValue(event.latLng.lat(), event.LatLng.lng()); this.updateMarker(false, true); } }); diff --git a/src/Squidex/app/shared/components/language-selector.component.ts b/src/Squidex/app/shared/components/language-selector.component.ts index 3dc2783ff..b22da54f3 100644 --- a/src/Squidex/app/shared/components/language-selector.component.ts +++ b/src/Squidex/app/shared/components/language-selector.component.ts @@ -5,7 +5,7 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; +import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; import { fadeAnimation, ModalModel } from '@app/shared/internal'; @@ -17,7 +17,8 @@ export interface Language { iso2Code: string; englishName: string; isMasterLangu templateUrl: './language-selector.component.html', animations: [ fadeAnimation - ] + ], + changeDetection: ChangeDetectionStrategy.OnPush }) export class LanguageSelectorComponent implements OnChanges, OnInit { public dropdown = new ModalModel(); diff --git a/src/Squidex/app/shared/components/markdown-editor.component.ts b/src/Squidex/app/shared/components/markdown-editor.component.ts index 8fbc06107..0b54f7711 100644 --- a/src/Squidex/app/shared/components/markdown-editor.component.ts +++ b/src/Squidex/app/shared/components/markdown-editor.component.ts @@ -5,7 +5,7 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { AfterViewInit, Component, ElementRef, forwardRef, Renderer2, ViewChild } from '@angular/core'; +import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, forwardRef, Renderer2, ViewChild } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { @@ -25,7 +25,8 @@ export const SQX_MARKDOWN_EDITOR_CONTROL_VALUE_ACCESSOR: any = { selector: 'sqx-markdown-editor', styleUrls: ['./markdown-editor.component.scss'], templateUrl: './markdown-editor.component.html', - providers: [SQX_MARKDOWN_EDITOR_CONTROL_VALUE_ACCESSOR] + providers: [SQX_MARKDOWN_EDITOR_CONTROL_VALUE_ACCESSOR], + changeDetection: ChangeDetectionStrategy.OnPush }) export class MarkdownEditorComponent implements ControlValueAccessor, AfterViewInit { private callChange = (v: any) => { /* NOOP */ }; diff --git a/src/Squidex/app/shared/components/rich-editor.component.ts b/src/Squidex/app/shared/components/rich-editor.component.ts index 0375d4733..940d066b3 100644 --- a/src/Squidex/app/shared/components/rich-editor.component.ts +++ b/src/Squidex/app/shared/components/rich-editor.component.ts @@ -5,7 +5,7 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { AfterViewInit, Component, ElementRef, EventEmitter, forwardRef, OnDestroy, Output, ViewChild } from '@angular/core'; +import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, forwardRef, OnDestroy, Output, ViewChild } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { @@ -25,7 +25,8 @@ export const SQX_RICH_EDITOR_CONTROL_VALUE_ACCESSOR: any = { selector: 'sqx-rich-editor', styleUrls: ['./rich-editor.component.scss'], templateUrl: './rich-editor.component.html', - providers: [SQX_RICH_EDITOR_CONTROL_VALUE_ACCESSOR] + providers: [SQX_RICH_EDITOR_CONTROL_VALUE_ACCESSOR], + changeDetection: ChangeDetectionStrategy.OnPush }) export class RichEditorComponent implements ControlValueAccessor, AfterViewInit, OnDestroy { private callChange = (v: any) => { /* NOOP */ }; diff --git a/src/Squidex/app/shared/components/schema-category.component.ts b/src/Squidex/app/shared/components/schema-category.component.ts index b4838d9d0..0feb35bc5 100644 --- a/src/Squidex/app/shared/components/schema-category.component.ts +++ b/src/Squidex/app/shared/components/schema-category.component.ts @@ -5,7 +5,7 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; +import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; import { onErrorResumeNext } from 'rxjs/operators'; import { @@ -24,7 +24,8 @@ import { templateUrl: './schema-category.component.html', animations: [ fadeAnimation - ] + ], + changeDetection: ChangeDetectionStrategy.OnPush }) export class SchemaCategoryComponent implements OnInit, OnChanges { @Output() diff --git a/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj b/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj index 9d4bdae34..abdc8a779 100644 --- a/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj +++ b/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj b/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj index e6e5fbdd0..1bea62311 100644 --- a/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj +++ b/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj @@ -20,9 +20,9 @@ - + - + diff --git a/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj b/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj index e8a6c96f6..43d5afbce 100644 --- a/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj +++ b/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj b/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj index 7c8f994cf..16991be90 100644 --- a/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj +++ b/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/tests/Squidex.Tests/Squidex.Tests.csproj b/tests/Squidex.Tests/Squidex.Tests.csproj index 8e0f478d2..607b034eb 100644 --- a/tests/Squidex.Tests/Squidex.Tests.csproj +++ b/tests/Squidex.Tests/Squidex.Tests.csproj @@ -11,11 +11,11 @@ - + - +