+
+
{{annotation.key}}:{{annotation.value}}
+
diff --git a/src/modules/config/components/annotation/script-annotation/script-annotation.component.spec.ts b/src/modules/config/components/annotation/script-annotation/script-annotation.component.spec.ts
index 0caf72d39..f19d1a94b 100644
--- a/src/modules/config/components/annotation/script-annotation/script-annotation.component.spec.ts
+++ b/src/modules/config/components/annotation/script-annotation/script-annotation.component.spec.ts
@@ -1,7 +1,6 @@
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import {UntypedFormBuilder} from '@angular/forms';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services/auth';
import {CoreTestingModule} from '../../../../core/core.testing.module';
import {ScriptAnnotationComponent} from './script-annotation.component';
@@ -12,7 +11,7 @@ describe('ScriptAnnotationComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
- imports: [CoreTestingModule.forRoot(), AbilityModule],
+ imports: [CoreTestingModule.forRoot()],
providers: [UntypedFormBuilder,
{
provide: AuthService,
diff --git a/src/modules/config/components/annotation/script-annotation/script-annotation.component.ts b/src/modules/config/components/annotation/script-annotation/script-annotation.component.ts
index 44af9591e..8ac445993 100644
--- a/src/modules/config/components/annotation/script-annotation/script-annotation.component.ts
+++ b/src/modules/config/components/annotation/script-annotation/script-annotation.component.ts
@@ -1,16 +1,20 @@
import {ChangeDetectionStrategy, Component, Input, OnInit} from '@angular/core';
import {Annotation} from '../../../../../shared/models/config';
+import {Observable} from "rxjs";
+import {AbilityService} from "@casl/angular";
@Component({
- selector: 'app-script-annotation',
- templateUrl: './script-annotation.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-script-annotation',
+ templateUrl: './script-annotation.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class ScriptAnnotationComponent {
-
+readonly ability$: Observable
;
@Input()
annotations: Annotation[];
- constructor() {
+ constructor(abilityService: AbilityService) {
+ this.ability$ = abilityService.ability$;
}
}
diff --git a/src/modules/config/components/browserconfig/browserconfig-details/browserconfig-details.component.spec.ts b/src/modules/config/components/browserconfig/browserconfig-details/browserconfig-details.component.spec.ts
index f31cb0000..5099479a5 100644
--- a/src/modules/config/components/browserconfig/browserconfig-details/browserconfig-details.component.spec.ts
+++ b/src/modules/config/components/browserconfig/browserconfig-details/browserconfig-details.component.spec.ts
@@ -19,7 +19,6 @@ import {
Label,
Meta
} from '../../../../../shared/models';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
import {ReactiveFormsModule} from '@angular/forms';
import {MockComponent} from 'ng-mocks';
@@ -122,7 +121,6 @@ describe('BrowserConfigDetailsComponent', () => {
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
- AbilityModule,
MaterialModule,
RouterTestingModule,
CoreTestingModule.forRoot(),
diff --git a/src/modules/config/components/browserconfig/browserconfig-details/browserconfig-details.component.ts b/src/modules/config/components/browserconfig/browserconfig-details/browserconfig-details.component.ts
index e16cc8c45..9714aa097 100644
--- a/src/modules/config/components/browserconfig/browserconfig-details/browserconfig-details.component.ts
+++ b/src/modules/config/components/browserconfig/browserconfig-details/browserconfig-details.component.ts
@@ -7,9 +7,10 @@ import {UnitOfTime} from '../../../../../shared/models/duration/unit-time.model'
@Component({
- selector: 'app-browserconfig-details',
- templateUrl: './browserconfig-details.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush
+ selector: 'app-browserconfig-details',
+ templateUrl: './browserconfig-details.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class BrowserConfigDetailsComponent implements OnChanges {
readonly Kind = Kind;
diff --git a/src/modules/config/components/browserconfig/browserconfig-dialog/browserconfig-dialog.component.spec.ts b/src/modules/config/components/browserconfig/browserconfig-dialog/browserconfig-dialog.component.spec.ts
index c90f33122..964916ed9 100644
--- a/src/modules/config/components/browserconfig/browserconfig-dialog/browserconfig-dialog.component.spec.ts
+++ b/src/modules/config/components/browserconfig/browserconfig-dialog/browserconfig-dialog.component.spec.ts
@@ -11,7 +11,6 @@ import {ConfigDialogData} from '../../../func';
import {LabelService} from '../../../services';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {of} from 'rxjs';
-import {AbilityModule} from '@casl/angular';
import {CoreTestingModule} from '../../../../core/core.testing.module';
import {AuthService} from '../../../../core/services';
@@ -31,7 +30,6 @@ describe('BrowserConfigDialogComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [CoreTestingModule.forRoot(),
- AbilityModule,
CommonsModule,
NoopAnimationsModule,
MatDialogModule, ReactiveFormsModule],
diff --git a/src/modules/config/components/browserconfig/browserconfig-dialog/browserconfig-dialog.component.ts b/src/modules/config/components/browserconfig/browserconfig-dialog/browserconfig-dialog.component.ts
index 5b634bf46..bee863ac1 100644
--- a/src/modules/config/components/browserconfig/browserconfig-dialog/browserconfig-dialog.component.ts
+++ b/src/modules/config/components/browserconfig/browserconfig-dialog/browserconfig-dialog.component.ts
@@ -7,9 +7,10 @@ import {ConfigDialogData} from '../../../func';
import {ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-browserconfig-dialog',
- templateUrl: './browserconfig-dialog.component.html',
- styleUrls: ['./browserconfig-dialog.component.css']
+ selector: 'app-browserconfig-dialog',
+ templateUrl: './browserconfig-dialog.component.html',
+ styleUrls: ['./browserconfig-dialog.component.css'],
+ standalone: false
})
export class BrowserConfigDialogComponent extends BrowserConfigDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/browserconfig/browserconfig-multi-dialog/browserconfig-multi-dialog.component.ts b/src/modules/config/components/browserconfig/browserconfig-multi-dialog/browserconfig-multi-dialog.component.ts
index 891df58e0..7c896c4a8 100644
--- a/src/modules/config/components/browserconfig/browserconfig-multi-dialog/browserconfig-multi-dialog.component.ts
+++ b/src/modules/config/components/browserconfig/browserconfig-multi-dialog/browserconfig-multi-dialog.component.ts
@@ -9,10 +9,11 @@ import {NUMBER_OR_EMPTY_STRING} from '../../../../../shared/validation/patterns'
import {LabelMultiComponent} from '../../label/label-multi/label-multi.component';
@Component({
- selector: 'app-browserconfig-multi-dialog',
- templateUrl: './browserconfig-multi-dialog.component.html',
- styleUrls: ['./browserconfig-multi-dialog.component.css'],
- changeDetection: ChangeDetectionStrategy.OnPush
+ selector: 'app-browserconfig-multi-dialog',
+ templateUrl: './browserconfig-multi-dialog.component.html',
+ styleUrls: ['./browserconfig-multi-dialog.component.css'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class BrowserConfigMultiDialogComponent extends BrowserConfigDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/browserconfig/browserconfig-preview/browserconfig-preview.component.spec.ts b/src/modules/config/components/browserconfig/browserconfig-preview/browserconfig-preview.component.spec.ts
index 8c6cbf699..7f7833696 100644
--- a/src/modules/config/components/browserconfig/browserconfig-preview/browserconfig-preview.component.spec.ts
+++ b/src/modules/config/components/browserconfig/browserconfig-preview/browserconfig-preview.component.spec.ts
@@ -4,7 +4,6 @@ import {BrowserconfigPreviewComponent} from './browserconfig-preview.component';
import {CommonsModule} from '../../../../commons';
import {ConfigObject, Kind} from '../../../../../shared/models';
import {ShortcutListComponent} from '../../shortcut/shortcut-list/shortcut-list.component';
-import {AbilityModule} from '@casl/angular';
import {CoreTestingModule} from '../../../../core/core.testing.module';
describe('BrowserconfigPreviewComponent', () => {
@@ -13,7 +12,7 @@ describe('BrowserconfigPreviewComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
- imports: [CommonsModule, CoreTestingModule.forRoot(), AbilityModule],
+ imports: [CommonsModule, CoreTestingModule.forRoot()],
declarations: [BrowserconfigPreviewComponent, ShortcutListComponent],
providers: []
})
diff --git a/src/modules/config/components/browserconfig/browserconfig-preview/browserconfig-preview.component.ts b/src/modules/config/components/browserconfig/browserconfig-preview/browserconfig-preview.component.ts
index 7c1d6751b..fb497c363 100644
--- a/src/modules/config/components/browserconfig/browserconfig-preview/browserconfig-preview.component.ts
+++ b/src/modules/config/components/browserconfig/browserconfig-preview/browserconfig-preview.component.ts
@@ -2,9 +2,10 @@ import {Component, Input} from '@angular/core';
import {ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-browserconfig-preview',
- templateUrl: './browserconfig-preview.component.html',
- styleUrls: ['./browserconfig-preview.component.css']
+ selector: 'app-browserconfig-preview',
+ templateUrl: './browserconfig-preview.component.html',
+ styleUrls: ['./browserconfig-preview.component.css'],
+ standalone: false
})
export class BrowserconfigPreviewComponent {
@Input()
diff --git a/src/modules/config/components/browserscript/browserscript-details/browserscript-details.component.spec.ts b/src/modules/config/components/browserscript/browserscript-details/browserscript-details.component.spec.ts
index 37a8b96e5..3a4ebf98d 100644
--- a/src/modules/config/components/browserscript/browserscript-details/browserscript-details.component.spec.ts
+++ b/src/modules/config/components/browserscript/browserscript-details/browserscript-details.component.spec.ts
@@ -18,7 +18,6 @@ import {LabelService} from '../../../services';
import {of} from 'rxjs';
import {AuthService} from '../../../../core/services/auth';
import {AnnotationComponent, LabelComponent, MetaComponent} from '../..';
-import {AbilityModule} from '@casl/angular';
import {HarnessLoader} from '@angular/cdk/testing';
import {MatButtonHarness} from '@angular/material/button/testing';
import {MatSelectHarness} from '@angular/material/select/testing';
@@ -66,7 +65,6 @@ describe('BrowserScriptDetailsComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
- AbilityModule,
RouterTestingModule,
CommonsModule,
NoopAnimationsModule,
diff --git a/src/modules/config/components/browserscript/browserscript-details/browserscript-details.component.ts b/src/modules/config/components/browserscript/browserscript-details/browserscript-details.component.ts
index 46d949a22..fb47221d5 100644
--- a/src/modules/config/components/browserscript/browserscript-details/browserscript-details.component.ts
+++ b/src/modules/config/components/browserscript/browserscript-details/browserscript-details.component.ts
@@ -16,10 +16,11 @@ import {MatChipInputEvent} from '@angular/material/chips';
import {MonacoEditorConstructionOptions, MonacoEditorLoaderService, MonacoStandaloneCodeEditor} from '@materia-ui/ngx-monaco-editor';
@Component({
- changeDetection: ChangeDetectionStrategy.OnPush,
- selector: 'app-browserscript-details',
- templateUrl: './browserscript-details.component.html',
- styleUrls: ['./browserscript-details.component.scss']
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-browserscript-details',
+ templateUrl: './browserscript-details.component.html',
+ styleUrls: ['./browserscript-details.component.scss'],
+ standalone: false
})
export class BrowserScriptDetailsComponent implements OnChanges {
readonly BrowserScriptType = BrowserScriptType;
diff --git a/src/modules/config/components/browserscript/browserscript-dialog/browserscript-dialog.component.spec.ts b/src/modules/config/components/browserscript/browserscript-dialog/browserscript-dialog.component.spec.ts
index 0e5121584..ad720a283 100644
--- a/src/modules/config/components/browserscript/browserscript-dialog/browserscript-dialog.component.spec.ts
+++ b/src/modules/config/components/browserscript/browserscript-dialog/browserscript-dialog.component.spec.ts
@@ -11,7 +11,6 @@ import {LabelService} from '../../../services';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {of} from 'rxjs';
import {AnnotationComponent} from '../../annotation/annotation.component';
-import {AbilityModule} from '@casl/angular';
import {CoreTestingModule} from '../../../../core/core.testing.module';
import {AuthService} from '../../../../core/services';
import {MonacoEditorComponent} from '@materia-ui/ngx-monaco-editor';
@@ -29,7 +28,6 @@ describe('BrowserScriptDialogComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
- AbilityModule,
CoreTestingModule.forRoot(),
CommonsModule,
NoopAnimationsModule
diff --git a/src/modules/config/components/browserscript/browserscript-dialog/browserscript-dialog.component.ts b/src/modules/config/components/browserscript/browserscript-dialog/browserscript-dialog.component.ts
index 4db8b8910..4b72a85e5 100644
--- a/src/modules/config/components/browserscript/browserscript-dialog/browserscript-dialog.component.ts
+++ b/src/modules/config/components/browserscript/browserscript-dialog/browserscript-dialog.component.ts
@@ -8,9 +8,10 @@ import {ConfigObject} from '../../../../../shared/models/config';
import {MonacoEditorLoaderService} from '@materia-ui/ngx-monaco-editor';
@Component({
- selector: 'app-browserscript-dialog',
- templateUrl: './browserscript-dialog.component.html',
- styleUrls: ['./browserscript-dialog.component.css']
+ selector: 'app-browserscript-dialog',
+ templateUrl: './browserscript-dialog.component.html',
+ styleUrls: ['./browserscript-dialog.component.css'],
+ standalone: false
})
export class BrowserScriptDialogComponent extends BrowserScriptDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/browserscript/browserscript-multi-dialog/browserscript-multi-dialog.component.ts b/src/modules/config/components/browserscript/browserscript-multi-dialog/browserscript-multi-dialog.component.ts
index 6863c8729..dcee09cd2 100644
--- a/src/modules/config/components/browserscript/browserscript-multi-dialog/browserscript-multi-dialog.component.ts
+++ b/src/modules/config/components/browserscript/browserscript-multi-dialog/browserscript-multi-dialog.component.ts
@@ -9,9 +9,10 @@ import {LabelMultiComponent} from '../../label/label-multi/label-multi.component
import {MonacoEditorLoaderService} from '@materia-ui/ngx-monaco-editor';
@Component({
- selector: 'app-browserscript-multi-dialog',
- templateUrl: './browserscript-multi-dialog.component.html',
- styleUrls: ['./browserscript-multi-dialog.component.css']
+ selector: 'app-browserscript-multi-dialog',
+ templateUrl: './browserscript-multi-dialog.component.html',
+ styleUrls: ['./browserscript-multi-dialog.component.css'],
+ standalone: false
})
export class BrowserScriptMultiDialogComponent extends BrowserScriptDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/browserscript/browserscript-preview/browserscript-preview.component.ts b/src/modules/config/components/browserscript/browserscript-preview/browserscript-preview.component.ts
index 349057f33..389e40efe 100644
--- a/src/modules/config/components/browserscript/browserscript-preview/browserscript-preview.component.ts
+++ b/src/modules/config/components/browserscript/browserscript-preview/browserscript-preview.component.ts
@@ -3,9 +3,10 @@ import {BrowserScriptType, ConfigObject} from '../../../../../shared/models/conf
import {MonacoEditorConstructionOptions, MonacoStandaloneCodeEditor} from '@materia-ui/ngx-monaco-editor';
@Component({
- selector: 'app-browserscript-preview',
- templateUrl: './browserscript-preview.component.html',
- styleUrls: ['./browserscript-preview.component.css']
+ selector: 'app-browserscript-preview',
+ templateUrl: './browserscript-preview.component.html',
+ styleUrls: ['./browserscript-preview.component.css'],
+ standalone: false
})
export class BrowserscriptPreviewComponent implements OnInit {
readonly BrowserScriptType = BrowserScriptType;
diff --git a/src/modules/config/components/collection-meta/collection-meta.component.spec.ts b/src/modules/config/components/collection-meta/collection-meta.component.spec.ts
index 4edf2cdf7..f2b7fb108 100644
--- a/src/modules/config/components/collection-meta/collection-meta.component.spec.ts
+++ b/src/modules/config/components/collection-meta/collection-meta.component.spec.ts
@@ -15,7 +15,6 @@ import {AnnotationComponent} from '../annotation/annotation.component';
import {LabelService} from '../../services';
import {of} from 'rxjs';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../core/services';
import {expect} from '@angular/flex-layout/_private-utils/testing';
import {VALID_COLLECTION_NAME} from '../../../../shared/validation/patterns';
@@ -32,7 +31,6 @@ describe('CollectionMetaComponent', () => {
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
- AbilityModule,
MaterialModule,
RouterTestingModule,
CommonsModule,
diff --git a/src/modules/config/components/collection-meta/collection-meta.component.ts b/src/modules/config/components/collection-meta/collection-meta.component.ts
index 7f23952cc..867b88be8 100644
--- a/src/modules/config/components/collection-meta/collection-meta.component.ts
+++ b/src/modules/config/components/collection-meta/collection-meta.component.ts
@@ -8,13 +8,14 @@ import {Observable, of} from 'rxjs';
import {first, map, tap} from 'rxjs/operators';
@Component({
- selector: 'app-collection-meta',
- templateUrl: './collection-meta.component.html',
- styleUrls: ['./collection-meta.component.css'],
- providers: [
- {provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CollectionMetaComponent), multi: true},
- ],
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-collection-meta',
+ templateUrl: './collection-meta.component.html',
+ styleUrls: ['./collection-meta.component.css'],
+ providers: [
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CollectionMetaComponent), multi: true },
+ ],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class CollectionMetaComponent extends MetaComponent {
diff --git a/src/modules/config/components/collection/collection-details/collection-details.component.spec.ts b/src/modules/config/components/collection/collection-details/collection-details.component.spec.ts
index f95d8ba47..3c51734d2 100644
--- a/src/modules/config/components/collection/collection-details/collection-details.component.spec.ts
+++ b/src/modules/config/components/collection/collection-details/collection-details.component.spec.ts
@@ -19,7 +19,6 @@ import {
RotationPolicy,
subCollectionTypes
} from '../../../../../shared/models';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
import {HarnessLoader} from '@angular/cdk/testing';
import {MatButtonHarness} from '@angular/material/button/testing';
@@ -78,7 +77,6 @@ describe('CollectionDetailsComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
- AbilityModule,
RouterTestingModule,
CommonsModule,
NoopAnimationsModule,
diff --git a/src/modules/config/components/collection/collection-details/collection-details.component.ts b/src/modules/config/components/collection/collection-details/collection-details.component.ts
index 92af373a3..ba2f28975 100644
--- a/src/modules/config/components/collection/collection-details/collection-details.component.ts
+++ b/src/modules/config/components/collection/collection-details/collection-details.component.ts
@@ -14,10 +14,11 @@ import {VALID_COLLECTION_NAME} from '../../../../../shared/validation/patterns';
@Component({
- selector: 'app-collection-details',
- templateUrl: './collection-details.component.html',
- styleUrls: ['./collection-details.component.css'],
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-collection-details',
+ templateUrl: './collection-details.component.html',
+ styleUrls: ['./collection-details.component.css'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class CollectionDetailsComponent implements OnChanges {
diff --git a/src/modules/config/components/collection/collection-dialog/collection-dialog.component.spec.ts b/src/modules/config/components/collection/collection-dialog/collection-dialog.component.spec.ts
index 87d11acf1..4d43d37e7 100644
--- a/src/modules/config/components/collection/collection-dialog/collection-dialog.component.spec.ts
+++ b/src/modules/config/components/collection/collection-dialog/collection-dialog.component.spec.ts
@@ -12,7 +12,6 @@ import {AnnotationComponent, FilesizeInputComponent, LabelComponent, MetaCompone
import {LabelService} from '../../../services';
import {of} from 'rxjs';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
import {CollectionMetaComponent} from '../../collection-meta/collection-meta.component';
@@ -31,7 +30,7 @@ describe('CollectionDialogComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
- imports: [CommonsModule, CoreTestingModule.forRoot(), MatDialogModule, MatIconModule, NoopAnimationsModule, AbilityModule],
+ imports: [CommonsModule, CoreTestingModule.forRoot(), MatDialogModule, MatIconModule, NoopAnimationsModule],
declarations: [CollectionDialogComponent, CollectionMetaComponent, FilesizeInputComponent, LabelComponent, AnnotationComponent],
providers: [UntypedFormBuilder,
{
diff --git a/src/modules/config/components/collection/collection-dialog/collection-dialog.component.ts b/src/modules/config/components/collection/collection-dialog/collection-dialog.component.ts
index 02d175565..749876912 100644
--- a/src/modules/config/components/collection/collection-dialog/collection-dialog.component.ts
+++ b/src/modules/config/components/collection/collection-dialog/collection-dialog.component.ts
@@ -7,10 +7,11 @@ import {ConfigDialogData} from '../../../func';
import {ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-collection-dialog',
- templateUrl: './collection-dialog.component.html',
- styleUrls: ['./collection-dialog.component.css'],
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-collection-dialog',
+ templateUrl: './collection-dialog.component.html',
+ styleUrls: ['./collection-dialog.component.css'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class CollectionDialogComponent extends CollectionDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/collection/collection-preview/collection-preview.component.ts b/src/modules/config/components/collection/collection-preview/collection-preview.component.ts
index 155ebad2a..30d97b7a5 100644
--- a/src/modules/config/components/collection/collection-preview/collection-preview.component.ts
+++ b/src/modules/config/components/collection/collection-preview/collection-preview.component.ts
@@ -2,9 +2,10 @@ import {Component, Input, OnInit} from '@angular/core';
import {ConfigObject, RotationPolicy, SubCollectionType} from '../../../../../shared/models/config';
@Component({
- selector: 'app-collection-preview',
- templateUrl: './collection-preview.component.html',
- styleUrls: ['./collection-preview.component.css']
+ selector: 'app-collection-preview',
+ templateUrl: './collection-preview.component.html',
+ styleUrls: ['./collection-preview.component.css'],
+ standalone: false
})
export class CollectionPreviewComponent {
readonly RotationPolicy = RotationPolicy;
diff --git a/src/modules/config/components/config-list/config-list.component.ts b/src/modules/config/components/config-list/config-list.component.ts
index 034581d0f..bd21bbb51 100644
--- a/src/modules/config/components/config-list/config-list.component.ts
+++ b/src/modules/config/components/config-list/config-list.component.ts
@@ -5,26 +5,27 @@ import {BASE_LIST} from '../../../../shared/directives';
import {animate, state, style, transition, trigger} from '@angular/animations';
@Component({
- selector: 'app-config-list',
- templateUrl: '../../../commons/components/base-list/base-list.html',
- styleUrls: [
- '../../../commons/components/base-list/base-list.scss',
- '../../../commons/components/base-list/base-list-odd-preview.scss',
- ],
- changeDetection: ChangeDetectionStrategy.OnPush,
- providers: [
- {
- provide: BASE_LIST,
- useExisting: forwardRef(() => ConfigListComponent)
- }
- ],
- animations: [
- trigger('detailExpand', [
- state('collapsed', style({height: '0px', minHeight: '0', opacity: 0})),
- state('expanded', style({height: '*', opacity: 1})),
- transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
- ]),
- ],
+ selector: 'app-config-list',
+ templateUrl: '../../../commons/components/base-list/base-list.html',
+ styleUrls: [
+ '../../../commons/components/base-list/base-list.scss',
+ '../../../commons/components/base-list/base-list-odd-preview.scss',
+ ],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ providers: [
+ {
+ provide: BASE_LIST,
+ useExisting: forwardRef(() => ConfigListComponent)
+ }
+ ],
+ animations: [
+ trigger('detailExpand', [
+ state('collapsed', style({ height: '0px', minHeight: '0', opacity: 0 })),
+ state('expanded', style({ height: '*', opacity: 1 })),
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
+ ]),
+ ],
+ standalone: false
})
export class ConfigListComponent extends BaseListComponent {
diff --git a/src/modules/config/components/config-query/config-query.component.ts b/src/modules/config/components/config-query/config-query.component.ts
index 7ea423457..9625b825d 100644
--- a/src/modules/config/components/config-query/config-query.component.ts
+++ b/src/modules/config/components/config-query/config-query.component.ts
@@ -17,10 +17,11 @@ import {ShortcutEventOutput, ShortcutInput} from 'ng-keyboard-shortcuts';
@Component({
- selector: 'app-config-query',
- styleUrls: ['config-query.component.scss'],
- templateUrl: './config-query.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush
+ selector: 'app-config-query',
+ styleUrls: ['config-query.component.scss'],
+ templateUrl: './config-query.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class ConfigQueryComponent extends QueryComponent implements OnChanges, AfterViewInit {
readonly Kind = Kind;
diff --git a/src/modules/config/components/crawl-execution-status/crawl-execution-status.component.ts b/src/modules/config/components/crawl-execution-status/crawl-execution-status.component.ts
index 4589dfb66..e5f409f37 100644
--- a/src/modules/config/components/crawl-execution-status/crawl-execution-status.component.ts
+++ b/src/modules/config/components/crawl-execution-status/crawl-execution-status.component.ts
@@ -2,11 +2,11 @@ import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
import {CrawlExecutionState, CrawlExecutionStatus} from '../../../../shared/models/report';
@Component({
- selector: 'app-config-crawl-execution-status',
- templateUrl: './crawl-execution-status.component.html',
- styleUrls: ['./crawl-execution-status.component.css'],
- changeDetection: ChangeDetectionStrategy.OnPush
-
+ selector: 'app-config-crawl-execution-status',
+ templateUrl: './crawl-execution-status.component.html',
+ styleUrls: ['./crawl-execution-status.component.css'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class CrawlExecutionStatusComponent {
readonly CrawlExecutionState = CrawlExecutionState;
diff --git a/src/modules/config/components/crawlconfig/crawlconfig-details/crawlconfig-details.component.spec.ts b/src/modules/config/components/crawlconfig/crawlconfig-details/crawlconfig-details.component.spec.ts
index a0123ac22..11de56463 100644
--- a/src/modules/config/components/crawlconfig/crawlconfig-details/crawlconfig-details.component.spec.ts
+++ b/src/modules/config/components/crawlconfig/crawlconfig-details/crawlconfig-details.component.spec.ts
@@ -9,7 +9,6 @@ import {LabelComponent} from '../../label/label.component';
import {LabelService} from '../../../services';
import {of} from 'rxjs';
import {AnnotationComponent} from '../../annotation/annotation.component';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
import {HarnessLoader} from '@angular/cdk/testing';
import {ExtraConfig} from '../../../../../shared/models/config/crawlconfig.model';
@@ -68,7 +67,6 @@ describe('CrawlConfigDetailsComponent', () => {
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
- AbilityModule,
MaterialModule,
RouterTestingModule,
CoreTestingModule.forRoot(),
diff --git a/src/modules/config/components/crawlconfig/crawlconfig-details/crawlconfig-details.component.ts b/src/modules/config/components/crawlconfig/crawlconfig-details/crawlconfig-details.component.ts
index 6c4857586..711129518 100644
--- a/src/modules/config/components/crawlconfig/crawlconfig-details/crawlconfig-details.component.ts
+++ b/src/modules/config/components/crawlconfig/crawlconfig-details/crawlconfig-details.component.ts
@@ -5,9 +5,10 @@ import {ConfigObject, ConfigRef, CrawlConfig, Kind, Meta} from '../../../../../s
import {AuthService} from '../../../../core/services/auth';
@Component({
- selector: 'app-crawlconfig-details',
- templateUrl: './crawlconfig-details.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-crawlconfig-details',
+ templateUrl: './crawlconfig-details.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class CrawlConfigDetailsComponent implements OnChanges {
readonly Kind = Kind;
diff --git a/src/modules/config/components/crawlconfig/crawlconfig-dialog/crawlconfig-dialog.component.spec.ts b/src/modules/config/components/crawlconfig/crawlconfig-dialog/crawlconfig-dialog.component.spec.ts
index 226572f1b..b536f7982 100644
--- a/src/modules/config/components/crawlconfig/crawlconfig-dialog/crawlconfig-dialog.component.spec.ts
+++ b/src/modules/config/components/crawlconfig/crawlconfig-dialog/crawlconfig-dialog.component.spec.ts
@@ -12,7 +12,6 @@ import {LabelService} from '../../../services';
import {of} from 'rxjs';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {AnnotationComponent} from '../../annotation/annotation.component';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
describe('CrawlConfigDialogComponent', () => {
@@ -26,7 +25,7 @@ describe('CrawlConfigDialogComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
- imports: [AbilityModule, CoreTestingModule.forRoot(), CommonsModule, NoopAnimationsModule],
+ imports: [CoreTestingModule.forRoot(), CommonsModule, NoopAnimationsModule],
declarations: [CrawlConfigDialogComponent, MetaComponent, LabelComponent, AnnotationComponent],
providers: [
{
diff --git a/src/modules/config/components/crawlconfig/crawlconfig-dialog/crawlconfig-dialog.component.ts b/src/modules/config/components/crawlconfig/crawlconfig-dialog/crawlconfig-dialog.component.ts
index 9e3b5a158..4cb34e78f 100644
--- a/src/modules/config/components/crawlconfig/crawlconfig-dialog/crawlconfig-dialog.component.ts
+++ b/src/modules/config/components/crawlconfig/crawlconfig-dialog/crawlconfig-dialog.component.ts
@@ -7,9 +7,10 @@ import {ConfigDialogData} from '../../../func';
import {ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-crawlconfig-dialog',
- templateUrl: './crawlconfig-dialog.component.html',
- styleUrls: ['./crawlconfig-dialog.component.css']
+ selector: 'app-crawlconfig-dialog',
+ templateUrl: './crawlconfig-dialog.component.html',
+ styleUrls: ['./crawlconfig-dialog.component.css'],
+ standalone: false
})
export class CrawlConfigDialogComponent extends CrawlConfigDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/crawlconfig/crawlconfig-multi-dialog/crawlconfig-multi-dialog.component.ts b/src/modules/config/components/crawlconfig/crawlconfig-multi-dialog/crawlconfig-multi-dialog.component.ts
index fd8d7dac2..5b8087d04 100644
--- a/src/modules/config/components/crawlconfig/crawlconfig-multi-dialog/crawlconfig-multi-dialog.component.ts
+++ b/src/modules/config/components/crawlconfig/crawlconfig-multi-dialog/crawlconfig-multi-dialog.component.ts
@@ -9,9 +9,10 @@ import {NUMBER_OR_EMPTY_STRING} from '../../../../../shared/validation/patterns'
import {LabelMultiComponent} from '../../label/label-multi/label-multi.component';
@Component({
- selector: 'app-crawlconfig-multi-dialog',
- templateUrl: './crawlconfig-multi-dialog.component.html',
- styleUrls: ['./crawlconfig-multi-dialog.component.css']
+ selector: 'app-crawlconfig-multi-dialog',
+ templateUrl: './crawlconfig-multi-dialog.component.html',
+ styleUrls: ['./crawlconfig-multi-dialog.component.css'],
+ standalone: false
})
export class CrawlConfigMultiDialogComponent extends CrawlConfigDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/crawlconfig/crawlconfig-preview/crawlconfig-preview.component.ts b/src/modules/config/components/crawlconfig/crawlconfig-preview/crawlconfig-preview.component.ts
index 26519e3bd..6b48885ac 100644
--- a/src/modules/config/components/crawlconfig/crawlconfig-preview/crawlconfig-preview.component.ts
+++ b/src/modules/config/components/crawlconfig/crawlconfig-preview/crawlconfig-preview.component.ts
@@ -2,9 +2,10 @@ import {Component, Input, OnInit} from '@angular/core';
import {ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-crawlconfig-preview',
- templateUrl: './crawlconfig-preview.component.html',
- styleUrls: ['./crawlconfig-preview.component.css']
+ selector: 'app-crawlconfig-preview',
+ templateUrl: './crawlconfig-preview.component.html',
+ styleUrls: ['./crawlconfig-preview.component.css'],
+ standalone: false
})
export class CrawlconfigPreviewComponent {
@Input()
diff --git a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-details/crawlhostgroupconfig-details.component.spec.ts b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-details/crawlhostgroupconfig-details.component.spec.ts
index a65cd5716..8b6121498 100644
--- a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-details/crawlhostgroupconfig-details.component.spec.ts
+++ b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-details/crawlhostgroupconfig-details.component.spec.ts
@@ -9,7 +9,6 @@ import {CoreTestingModule} from '../../../../core/core.testing.module';
import {LabelService} from '../../../services';
import {of} from 'rxjs';
import {AnnotationComponent, DurationPickerComponent, LabelComponent, MetaComponent} from '../..';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
import {HarnessLoader} from '@angular/cdk/testing';
import {MatButtonHarness} from '@angular/material/button/testing';
@@ -65,7 +64,6 @@ describe('CrawlHostGroupConfigDetailsComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
- AbilityModule,
CommonsModule,
RouterTestingModule,
NoopAnimationsModule,
diff --git a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-details/crawlhostgroupconfig-details.component.ts b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-details/crawlhostgroupconfig-details.component.ts
index 1b710b0ce..b99fd11d7 100644
--- a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-details/crawlhostgroupconfig-details.component.ts
+++ b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-details/crawlhostgroupconfig-details.component.ts
@@ -12,10 +12,11 @@ import {
import {UnitOfTime} from 'src/shared/models/duration/unit-time.model';
@Component({
- selector: 'app-crawlhostgroupconfig-details',
- templateUrl: './crawlhostgroupconfig-details.component.html',
- styleUrls: ['./crawlhostgroupconfig-details.component.scss'],
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-crawlhostgroupconfig-details',
+ templateUrl: './crawlhostgroupconfig-details.component.html',
+ styleUrls: ['./crawlhostgroupconfig-details.component.scss'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class CrawlHostGroupConfigDetailsComponent implements OnChanges {
readonly UnitOfTime = UnitOfTime;
diff --git a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-dialog/crawlhostgroupconfig-dialog.component.spec.ts b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-dialog/crawlhostgroupconfig-dialog.component.spec.ts
index 293188008..6ab27d2ca 100644
--- a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-dialog/crawlhostgroupconfig-dialog.component.spec.ts
+++ b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-dialog/crawlhostgroupconfig-dialog.component.spec.ts
@@ -12,7 +12,6 @@ import {LabelService} from '../../../services';
import {of} from 'rxjs';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {AnnotationComponent} from '../../annotation/annotation.component';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
import {DurationPickerComponent} from '../../durationpicker/duration-picker';
@@ -27,7 +26,7 @@ describe('CrawlHostGroupConfigDialogComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
- imports: [CoreTestingModule.forRoot(), AbilityModule, CommonsModule, NoopAnimationsModule],
+ imports: [CoreTestingModule.forRoot(), CommonsModule, NoopAnimationsModule],
providers: [
{
provide: LabelService,
diff --git a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-dialog/crawlhostgroupconfig-dialog.component.ts b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-dialog/crawlhostgroupconfig-dialog.component.ts
index 8438cbac5..a0ba3a4a9 100644
--- a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-dialog/crawlhostgroupconfig-dialog.component.ts
+++ b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-dialog/crawlhostgroupconfig-dialog.component.ts
@@ -7,9 +7,10 @@ import {ConfigObject} from '../../../../../shared/models/config';
import {CrawlHostGroupConfigDetailsComponent} from '..';
@Component({
- selector: 'app-crawlhostgroupconfig-dialog',
- templateUrl: './crawlhostgroupconfig-dialog.component.html',
- styleUrls: ['./crawlhostgroupconfig-dialog.component.css']
+ selector: 'app-crawlhostgroupconfig-dialog',
+ templateUrl: './crawlhostgroupconfig-dialog.component.html',
+ styleUrls: ['./crawlhostgroupconfig-dialog.component.css'],
+ standalone: false
})
export class CrawlHostGroupConfigDialogComponent extends CrawlHostGroupConfigDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-multi-dialog/crawlhostgroupconfig-multi-dialog.component.spec.ts b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-multi-dialog/crawlhostgroupconfig-multi-dialog.component.spec.ts
index ae523f759..757b54c09 100644
--- a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-multi-dialog/crawlhostgroupconfig-multi-dialog.component.spec.ts
+++ b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-multi-dialog/crawlhostgroupconfig-multi-dialog.component.spec.ts
@@ -12,7 +12,6 @@ import {AuthService} from '../../../../core/services';
import {DurationPickerComponent} from '../../durationpicker/duration-picker';
import {CommonsModule} from '../../../../commons';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
-import {AbilityModule} from '@casl/angular';
import {of} from 'rxjs';
describe('CrawlHostGroupConfigMultiDialogComponent', () => {
@@ -26,7 +25,7 @@ describe('CrawlHostGroupConfigMultiDialogComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
- imports: [CoreTestingModule.forRoot(), AbilityModule, CommonsModule, NoopAnimationsModule],
+ imports: [CoreTestingModule.forRoot(), CommonsModule, NoopAnimationsModule],
providers: [UntypedFormBuilder,
{
provide: LabelService,
diff --git a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-multi-dialog/crawlhostgroupconfig-multi-dialog.component.ts b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-multi-dialog/crawlhostgroupconfig-multi-dialog.component.ts
index e3ae04691..fedf241db 100644
--- a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-multi-dialog/crawlhostgroupconfig-multi-dialog.component.ts
+++ b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-multi-dialog/crawlhostgroupconfig-multi-dialog.component.ts
@@ -9,9 +9,10 @@ import {LabelMultiComponent} from '../../label/label-multi/label-multi.component
import {ANY_DECIMAL_NUMBER_OR_EMPTY_STRING, NUMBER_OR_EMPTY_STRING} from '../../../../../shared/validation/patterns';
@Component({
- selector: 'app-crawlhostgroupconfig-multi-dialog',
- templateUrl: './crawlhostgroupconfig-multi-dialog.component.html',
- styleUrls: ['./crawlhostgroupconfig-multi-dialog.component.css']
+ selector: 'app-crawlhostgroupconfig-multi-dialog',
+ templateUrl: './crawlhostgroupconfig-multi-dialog.component.html',
+ styleUrls: ['./crawlhostgroupconfig-multi-dialog.component.css'],
+ standalone: false
})
export class CrawlHostGroupConfigMultiDialogComponent extends CrawlHostGroupConfigDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-preview/crawlhostgroupconfig-preview.component.ts b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-preview/crawlhostgroupconfig-preview.component.ts
index f99b7dee6..bda0936fe 100644
--- a/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-preview/crawlhostgroupconfig-preview.component.ts
+++ b/src/modules/config/components/crawlhostgroupconfig/crawlhostgroupconfig-preview/crawlhostgroupconfig-preview.component.ts
@@ -2,9 +2,10 @@ import {Component, Input} from '@angular/core';
import {ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-crawlhostgroupconfig-preview',
- templateUrl: './crawlhostgroupconfig-preview.component.html',
- styleUrls: ['./crawlhostgroupconfig-preview.component.css']
+ selector: 'app-crawlhostgroupconfig-preview',
+ templateUrl: './crawlhostgroupconfig-preview.component.html',
+ styleUrls: ['./crawlhostgroupconfig-preview.component.css'],
+ standalone: false
})
export class CrawlhostgroupconfigPreviewComponent {
@Input()
diff --git a/src/modules/config/components/crawljobs/crawljob-details/crawl-job-details.component.spec.ts b/src/modules/config/components/crawljobs/crawljob-details/crawl-job-details.component.spec.ts
index b2001c315..d0442c582 100644
--- a/src/modules/config/components/crawljobs/crawljob-details/crawl-job-details.component.spec.ts
+++ b/src/modules/config/components/crawljobs/crawljob-details/crawl-job-details.component.spec.ts
@@ -27,7 +27,6 @@ import {
Label,
Meta
} from '../../../../../shared/models';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
import {HarnessLoader} from '@angular/cdk/testing';
import {MatButtonHarness} from '@angular/material/button/testing';
@@ -158,7 +157,6 @@ describe('CrawljobDetailsComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
- AbilityModule,
CommonsModule,
RouterTestingModule,
NoopAnimationsModule,
diff --git a/src/modules/config/components/crawljobs/crawljob-details/crawl-job-details.component.ts b/src/modules/config/components/crawljobs/crawljob-details/crawl-job-details.component.ts
index 4f5a4fc82..c6401a606 100644
--- a/src/modules/config/components/crawljobs/crawljob-details/crawl-job-details.component.ts
+++ b/src/modules/config/components/crawljobs/crawljob-details/crawl-job-details.component.ts
@@ -7,9 +7,10 @@ import {UnitOfTime} from '../../../../../shared/models/duration/unit-time.model'
@Component({
- selector: 'app-crawljob-details',
- templateUrl: './crawl-job-details.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-crawljob-details',
+ templateUrl: './crawl-job-details.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class CrawlJobDetailsComponent implements OnChanges {
readonly Kind = Kind;
diff --git a/src/modules/config/components/crawljobs/crawljob-dialog/crawljob-dialog.component.spec.ts b/src/modules/config/components/crawljobs/crawljob-dialog/crawljob-dialog.component.spec.ts
index cce4e5593..cdc11c4af 100644
--- a/src/modules/config/components/crawljobs/crawljob-dialog/crawljob-dialog.component.spec.ts
+++ b/src/modules/config/components/crawljobs/crawljob-dialog/crawljob-dialog.component.spec.ts
@@ -15,7 +15,6 @@ import {
} from '../..';
import {CommonsModule} from '../../../../commons';
import {LabelService} from '../../../services';
-import {AbilityModule} from '@casl/angular';
import {of} from 'rxjs';
import {AuthService} from '../../../../core/services';
@@ -30,7 +29,7 @@ describe('CrawlJobDialogComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
- imports: [AbilityModule, CommonsModule, NoopAnimationsModule, CoreTestingModule.forRoot()],
+ imports: [CommonsModule, NoopAnimationsModule, CoreTestingModule.forRoot()],
declarations: [
MetaComponent,
CrawlJobDialogComponent,
diff --git a/src/modules/config/components/crawljobs/crawljob-dialog/crawljob-dialog.component.ts b/src/modules/config/components/crawljobs/crawljob-dialog/crawljob-dialog.component.ts
index e264b898f..87d7978ac 100644
--- a/src/modules/config/components/crawljobs/crawljob-dialog/crawljob-dialog.component.ts
+++ b/src/modules/config/components/crawljobs/crawljob-dialog/crawljob-dialog.component.ts
@@ -7,9 +7,10 @@ import {ConfigDialogData} from '../../../func';
import {BrowserScriptType, ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-crawljob-dialog',
- templateUrl: './crawljob-dialog.component.html',
- styleUrls: ['./crawljob-dialog.component.css']
+ selector: 'app-crawljob-dialog',
+ templateUrl: './crawljob-dialog.component.html',
+ styleUrls: ['./crawljob-dialog.component.css'],
+ standalone: false
})
export class CrawlJobDialogComponent extends CrawlJobDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/crawljobs/crawljob-multi-dialog/crawljobs-multi-dialog.component.ts b/src/modules/config/components/crawljobs/crawljob-multi-dialog/crawljobs-multi-dialog.component.ts
index 7fd7b64c0..6ee1b7c8a 100644
--- a/src/modules/config/components/crawljobs/crawljob-multi-dialog/crawljobs-multi-dialog.component.ts
+++ b/src/modules/config/components/crawljobs/crawljob-multi-dialog/crawljobs-multi-dialog.component.ts
@@ -9,9 +9,10 @@ import {NUMBER_OR_EMPTY_STRING} from '../../../../../shared/validation/patterns'
import {LabelMultiComponent} from '../../label/label-multi/label-multi.component';
@Component({
- selector: 'app-crawljobs-multi-dialog',
- templateUrl: './crawljobs-multi-dialog.component.html',
- styleUrls: ['./crawljobs-multi-dialog.component.css']
+ selector: 'app-crawljobs-multi-dialog',
+ templateUrl: './crawljobs-multi-dialog.component.html',
+ styleUrls: ['./crawljobs-multi-dialog.component.css'],
+ standalone: false
})
export class CrawlJobMultiDialogComponent extends CrawlJobDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/crawljobs/crawljob-preview/crawljob-preview.component.ts b/src/modules/config/components/crawljobs/crawljob-preview/crawljob-preview.component.ts
index a0c333965..ad8264778 100644
--- a/src/modules/config/components/crawljobs/crawljob-preview/crawljob-preview.component.ts
+++ b/src/modules/config/components/crawljobs/crawljob-preview/crawljob-preview.component.ts
@@ -2,9 +2,10 @@ import {Component, Input} from '@angular/core';
import {ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-crawljob-preview',
- templateUrl: './crawljob-preview.component.html',
- styleUrls: ['./crawljob-preview.component.css']
+ selector: 'app-crawljob-preview',
+ templateUrl: './crawljob-preview.component.html',
+ styleUrls: ['./crawljob-preview.component.css'],
+ standalone: false
})
export class CrawljobPreviewComponent {
diff --git a/src/modules/config/components/delete-dialog/delete-dialog.component.ts b/src/modules/config/components/delete-dialog/delete-dialog.component.ts
index 6a061a036..008b10a14 100644
--- a/src/modules/config/components/delete-dialog/delete-dialog.component.ts
+++ b/src/modules/config/components/delete-dialog/delete-dialog.component.ts
@@ -3,8 +3,9 @@ import {MAT_DIALOG_DATA} from '@angular/material/dialog';
import {ConfigObject, Kind} from '../../../../shared/models/config';
@Component({
- selector: 'app-delete-dialog',
- templateUrl: 'delete-dialog.component.html'
+ selector: 'app-delete-dialog',
+ templateUrl: 'delete-dialog.component.html',
+ standalone: false
})
export class DeleteDialogComponent {
readonly Kind = Kind;
diff --git a/src/modules/config/components/delete-multi-dialog/delete-multi-dialog.component.ts b/src/modules/config/components/delete-multi-dialog/delete-multi-dialog.component.ts
index f9552c84f..2e1d415d0 100644
--- a/src/modules/config/components/delete-multi-dialog/delete-multi-dialog.component.ts
+++ b/src/modules/config/components/delete-multi-dialog/delete-multi-dialog.component.ts
@@ -6,9 +6,10 @@ export interface DeleteDialogData {
}
@Component({
- selector: 'app-delete-multi-dialog',
- styleUrls: ['delete-multi-dialog.component.scss'],
- templateUrl: 'delete-multi-dialog.component.html'
+ selector: 'app-delete-multi-dialog',
+ styleUrls: ['delete-multi-dialog.component.scss'],
+ templateUrl: 'delete-multi-dialog.component.html',
+ standalone: false
})
export class DeleteMultiDialogComponent {
diff --git a/src/modules/config/components/durationpicker/duration-picker.ts b/src/modules/config/components/durationpicker/duration-picker.ts
index feeccf9cb..3a1daa1a5 100644
--- a/src/modules/config/components/durationpicker/duration-picker.ts
+++ b/src/modules/config/components/durationpicker/duration-picker.ts
@@ -13,24 +13,28 @@ import {Duration} from '../../../../shared/models/duration/duration.model';
import {takeUntil} from 'rxjs/operators';
import {Subject} from 'rxjs';
import {NUMBER_OR_EMPTY_STRING} from '../../../../shared/validation/patterns';
-import * as moment from 'moment';
+import dayjs from 'dayjs';
+import duration from 'dayjs/plugin/duration';
+dayjs.extend(duration);
@Component({
- selector: 'app-duration-picker',
- templateUrl: './duration-picker.component.html',
- styleUrls: ['./duration-picker.component.scss'],
- providers: [
- {
- provide: NG_VALUE_ACCESSOR,
- useExisting: forwardRef(() => DurationPickerComponent),
- multi: true
- },
- {
- provide: NG_VALIDATORS,
- useExisting: forwardRef(() => DurationPickerComponent),
- multi: true
- }],
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-duration-picker',
+ templateUrl: './duration-picker.component.html',
+ styleUrls: ['./duration-picker.component.scss'],
+ providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => DurationPickerComponent),
+ multi: true
+ },
+ {
+ provide: NG_VALIDATORS,
+ useExisting: forwardRef(() => DurationPickerComponent),
+ multi: true
+ }
+ ],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class DurationPickerComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnDestroy {
@@ -149,7 +153,7 @@ export class DurationPickerComponent implements ControlValueAccessor, OnInit, Af
}
secondsToDuration(seconds: number): Duration {
- const s = moment.duration(seconds, 'seconds');
+ const s = dayjs.duration(seconds, 'seconds');
return new Duration({
days: s.days(),
hours: s.hours(),
@@ -160,7 +164,7 @@ export class DurationPickerComponent implements ControlValueAccessor, OnInit, Af
}
msToDuration(milliseconds: number): Duration {
- const ms = moment.duration(milliseconds);
+ const ms = dayjs.duration(milliseconds);
return new Duration({
days: null,
hours: null,
diff --git a/src/modules/config/components/entity/entity-details/entity-details.component.spec.ts b/src/modules/config/components/entity/entity-details/entity-details.component.spec.ts
index 0a95fe049..bc2c3b7d4 100644
--- a/src/modules/config/components/entity/entity-details/entity-details.component.spec.ts
+++ b/src/modules/config/components/entity/entity-details/entity-details.component.spec.ts
@@ -5,7 +5,6 @@ import {LabelService} from '../../../services';
import {of} from 'rxjs';
import {AnnotationComponent, LabelComponent, MetaComponent} from '../..';
import {Annotation, ConfigObject, CrawlEntity, Kind, Label, Meta} from '../../../../../shared/models';
-import {AbilityModule} from '@casl/angular';
import {CoreTestingModule} from '../../../../core/core.testing.module';
import {AuthService} from '../../../../core/services';
import {RouterTestingModule} from '@angular/router/testing';
@@ -46,7 +45,6 @@ describe('EntityDetailsComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
- AbilityModule,
CommonsModule,
RouterTestingModule,
NoopAnimationsModule,
diff --git a/src/modules/config/components/entity/entity-details/entity-details.component.ts b/src/modules/config/components/entity/entity-details/entity-details.component.ts
index eb62b06d3..2f4cb66e0 100644
--- a/src/modules/config/components/entity/entity-details/entity-details.component.ts
+++ b/src/modules/config/components/entity/entity-details/entity-details.component.ts
@@ -4,9 +4,10 @@ import {AuthService} from '../../../../core/services/auth';
import {ConfigObject, Kind, Meta} from '../../../../../shared/models';
@Component({
- selector: 'app-entity-details',
- templateUrl: './entity-details.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-entity-details',
+ templateUrl: './entity-details.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class EntityDetailsComponent implements OnChanges {
diff --git a/src/modules/config/components/entity/entity-dialog/entity-dialog.component.ts b/src/modules/config/components/entity/entity-dialog/entity-dialog.component.ts
index 244042d6d..40cddb743 100644
--- a/src/modules/config/components/entity/entity-dialog/entity-dialog.component.ts
+++ b/src/modules/config/components/entity/entity-dialog/entity-dialog.component.ts
@@ -7,9 +7,10 @@ import {ConfigDialogData} from '../../../func';
import {ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-entity-dialog',
- templateUrl: './entity-dialog.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-entity-dialog',
+ templateUrl: './entity-dialog.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class EntityDialogComponent extends EntityDetailsComponent implements OnInit {
constructor(protected fb: UntypedFormBuilder,
diff --git a/src/modules/config/components/entity/entity-multi-dialog/entity-multi-dialog.component.ts b/src/modules/config/components/entity/entity-multi-dialog/entity-multi-dialog.component.ts
index d80a10318..70bd40d50 100644
--- a/src/modules/config/components/entity/entity-multi-dialog/entity-multi-dialog.component.ts
+++ b/src/modules/config/components/entity/entity-multi-dialog/entity-multi-dialog.component.ts
@@ -8,8 +8,9 @@ import {ConfigObject, Kind, Label} from '../../../../../shared/models/config';
import {LabelMultiComponent} from '../../label/label-multi/label-multi.component';
@Component({
- selector: 'app-entity-multi-dialog',
- templateUrl: './entity-multi-dialog.component.html',
+ selector: 'app-entity-multi-dialog',
+ templateUrl: './entity-multi-dialog.component.html',
+ standalone: false
})
export class EntityMultiDialogComponent extends EntityDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/entity/entity-view/entity-view.component.ts b/src/modules/config/components/entity/entity-view/entity-view.component.ts
index a7b728c8b..ed3df7de4 100644
--- a/src/modules/config/components/entity/entity-view/entity-view.component.ts
+++ b/src/modules/config/components/entity/entity-view/entity-view.component.ts
@@ -2,9 +2,10 @@ import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
import {ConfigObject, Label} from '../../../../../shared/models';
@Component({
- selector: 'app-entity-view',
- templateUrl: './entity-view.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-entity-view',
+ templateUrl: './entity-view.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class EntityViewComponent {
diff --git a/src/modules/config/components/filesize-input/filesize-input.component.ts b/src/modules/config/components/filesize-input/filesize-input.component.ts
index 09abfbe64..906fa3731 100644
--- a/src/modules/config/components/filesize-input/filesize-input.component.ts
+++ b/src/modules/config/components/filesize-input/filesize-input.component.ts
@@ -33,21 +33,22 @@ const incrementBases = {
};
@Component({
- selector: 'app-filesize-input',
- templateUrl: './filesize-input.component.html',
- providers: [
- {
- provide: NG_VALUE_ACCESSOR,
- useExisting: forwardRef(() => FilesizeInputComponent),
- multi: true
- },
- {
- provide: NG_VALIDATORS,
- useExisting: forwardRef(() => FilesizeInputComponent),
- multi: true
- }
- ],
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-filesize-input',
+ templateUrl: './filesize-input.component.html',
+ providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => FilesizeInputComponent),
+ multi: true
+ },
+ {
+ provide: NG_VALIDATORS,
+ useExisting: forwardRef(() => FilesizeInputComponent),
+ multi: true
+ }
+ ],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class FilesizeInputComponent implements ControlValueAccessor, AfterViewInit, OnDestroy {
diff --git a/src/modules/config/components/job-execution-status/job-status.component.ts b/src/modules/config/components/job-execution-status/job-status.component.ts
index eebefd4d6..670c8660f 100644
--- a/src/modules/config/components/job-execution-status/job-status.component.ts
+++ b/src/modules/config/components/job-execution-status/job-status.component.ts
@@ -2,10 +2,11 @@ import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
import {JobExecutionState, JobExecutionStatus} from '../../../../shared/models/report';
@Component({
- selector: 'app-config-job-execution-status',
- templateUrl: './job-status.component.html',
- styleUrls: ['./job-status.component.css'],
- changeDetection: ChangeDetectionStrategy.OnPush
+ selector: 'app-config-job-execution-status',
+ templateUrl: './job-status.component.html',
+ styleUrls: ['./job-status.component.css'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class JobStatusComponent {
readonly JobExecutionState = JobExecutionState;
diff --git a/src/modules/config/components/label/label-multi/label-multi.component.ts b/src/modules/config/components/label/label-multi/label-multi.component.ts
index 2b767704b..1a154487b 100644
--- a/src/modules/config/components/label/label-multi/label-multi.component.ts
+++ b/src/modules/config/components/label/label-multi/label-multi.component.ts
@@ -9,9 +9,10 @@ import {LabelService} from '../../../services/label.service';
import {UntypedFormControl} from '@angular/forms';
@Component({
- selector: 'app-label-multi',
- templateUrl: './label-multi.component.html',
- styleUrls: ['./label-multi.component.css']
+ selector: 'app-label-multi',
+ templateUrl: './label-multi.component.html',
+ styleUrls: ['./label-multi.component.css'],
+ standalone: false
})
export class LabelMultiComponent implements OnInit {
@Input()
diff --git a/src/modules/config/components/label/label.component.ts b/src/modules/config/components/label/label.component.ts
index 9ae797c6a..f1d663933 100644
--- a/src/modules/config/components/label/label.component.ts
+++ b/src/modules/config/components/label/label.component.ts
@@ -26,11 +26,12 @@ import {LabelService} from '../../services/label.service';
@Component({
- selector: 'app-labels',
- templateUrl: './label.component.html',
- styleUrls: ['./label.component.scss'],
- providers: [{provide: NG_VALUE_ACCESSOR, useExisting: LabelComponent, multi: true}],
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-labels',
+ templateUrl: './label.component.html',
+ styleUrls: ['./label.component.scss'],
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: LabelComponent, multi: true }],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class LabelComponent implements ControlValueAccessor, OnInit {
diff --git a/src/modules/config/components/meta/meta-preview/meta-preview.component.ts b/src/modules/config/components/meta/meta-preview/meta-preview.component.ts
index 5f364db77..1383e4874 100644
--- a/src/modules/config/components/meta/meta-preview/meta-preview.component.ts
+++ b/src/modules/config/components/meta/meta-preview/meta-preview.component.ts
@@ -3,9 +3,10 @@ import {ConfigObject} from '../../../../../shared/models/config';
import {AuthService, SnackBarService} from '../../../../core/services';
@Component({
- selector: 'app-meta-preview',
- templateUrl: './meta-preview.component.html',
- styleUrls: ['./meta-preview.component.css']
+ selector: 'app-meta-preview',
+ templateUrl: './meta-preview.component.html',
+ styleUrls: ['./meta-preview.component.css'],
+ standalone: false
})
export class MetaPreviewComponent {
diff --git a/src/modules/config/components/meta/meta.component.spec.ts b/src/modules/config/components/meta/meta.component.spec.ts
index 0c573e97a..6f1918bad 100644
--- a/src/modules/config/components/meta/meta.component.spec.ts
+++ b/src/modules/config/components/meta/meta.component.spec.ts
@@ -9,7 +9,6 @@ import {CoreTestingModule} from '../../../core/core.testing.module';
import {CommonsModule} from '../../../commons';
import {LabelComponent} from '../label/label.component';
import {AnnotationComponent} from '../annotation/annotation.component';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../core/services';
describe('MetaComponent', () => {
@@ -20,7 +19,6 @@ describe('MetaComponent', () => {
TestBed.configureTestingModule({
declarations: [MetaComponent, LabelComponent, AnnotationComponent],
imports: [
- AbilityModule,
CoreTestingModule.forRoot(),
CommonsModule,
NoopAnimationsModule
diff --git a/src/modules/config/components/meta/meta.component.ts b/src/modules/config/components/meta/meta.component.ts
index 07e171d03..f8e944edb 100644
--- a/src/modules/config/components/meta/meta.component.ts
+++ b/src/modules/config/components/meta/meta.component.ts
@@ -17,14 +17,15 @@ import {takeUntil} from 'rxjs/operators';
@Component({
- selector: 'app-meta',
- templateUrl: './meta.component.html',
- styleUrls: ['./meta.component.css'],
- providers: [
- {provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MetaComponent), multi: true},
- {provide: NG_VALIDATORS, useExisting: forwardRef(() => MetaComponent), multi: true},
- ],
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-meta',
+ templateUrl: './meta.component.html',
+ styleUrls: ['./meta.component.css'],
+ providers: [
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MetaComponent), multi: true },
+ { provide: NG_VALIDATORS, useExisting: forwardRef(() => MetaComponent), multi: true },
+ ],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class MetaComponent implements AfterViewInit, OnInit, OnDestroy, ControlValueAccessor, Validator {
diff --git a/src/modules/config/components/politenessconfig/politenessconfig-details/politenessconfig-details.component.spec.ts b/src/modules/config/components/politenessconfig/politenessconfig-details/politenessconfig-details.component.spec.ts
index 3b766634a..6d674e640 100644
--- a/src/modules/config/components/politenessconfig/politenessconfig-details/politenessconfig-details.component.spec.ts
+++ b/src/modules/config/components/politenessconfig/politenessconfig-details/politenessconfig-details.component.spec.ts
@@ -17,7 +17,6 @@ import {
RobotsPolicy
} from '../../../../../shared/models';
import {AnnotationComponent, DurationPickerComponent, LabelComponent, MetaComponent} from '../..';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
import {HarnessLoader} from '@angular/cdk/testing';
import {MatButtonHarness} from '@angular/material/button/testing';
@@ -68,7 +67,6 @@ describe('PolitenessConfigDetailsComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
- AbilityModule,
RouterTestingModule,
NoopAnimationsModule,
CoreTestingModule.forRoot(),
diff --git a/src/modules/config/components/politenessconfig/politenessconfig-details/politenessconfig-details.component.ts b/src/modules/config/components/politenessconfig/politenessconfig-details/politenessconfig-details.component.ts
index 3ff9315b1..12d6bd41e 100644
--- a/src/modules/config/components/politenessconfig/politenessconfig-details/politenessconfig-details.component.ts
+++ b/src/modules/config/components/politenessconfig/politenessconfig-details/politenessconfig-details.component.ts
@@ -7,9 +7,10 @@ import {UnitOfTime} from '../../../../../shared/models/duration/unit-time.model'
@Component({
- selector: 'app-politenessconfig-details',
- templateUrl: './politenessconfig-details.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-politenessconfig-details',
+ templateUrl: './politenessconfig-details.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class PolitenessConfigDetailsComponent implements OnChanges {
diff --git a/src/modules/config/components/politenessconfig/politenessconfig-dialog/politenessconfig-dialog.component.spec.ts b/src/modules/config/components/politenessconfig/politenessconfig-dialog/politenessconfig-dialog.component.spec.ts
index cc7866c78..b8350d518 100644
--- a/src/modules/config/components/politenessconfig/politenessconfig-dialog/politenessconfig-dialog.component.spec.ts
+++ b/src/modules/config/components/politenessconfig/politenessconfig-dialog/politenessconfig-dialog.component.spec.ts
@@ -17,7 +17,6 @@ import {CommonsModule} from '../../../../commons';
import {LabelService} from '../../../services';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {of} from 'rxjs';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
describe('PolitenessConfigDialogComponent', () => {
@@ -32,7 +31,7 @@ describe('PolitenessConfigDialogComponent', () => {
};
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
- imports: [AbilityModule, CoreTestingModule.forRoot(), MatDialogModule, CommonsModule, NoopAnimationsModule],
+ imports: [CoreTestingModule.forRoot(), MatDialogModule, CommonsModule, NoopAnimationsModule],
declarations: [PolitenessConfigDialogComponent,
DurationPickerComponent,
SelectorComponent,
diff --git a/src/modules/config/components/politenessconfig/politenessconfig-dialog/politenessconfig-dialog.component.ts b/src/modules/config/components/politenessconfig/politenessconfig-dialog/politenessconfig-dialog.component.ts
index ab86eebf8..aa4e6ba4a 100644
--- a/src/modules/config/components/politenessconfig/politenessconfig-dialog/politenessconfig-dialog.component.ts
+++ b/src/modules/config/components/politenessconfig/politenessconfig-dialog/politenessconfig-dialog.component.ts
@@ -7,9 +7,10 @@ import {ConfigDialogData} from '../../../func';
import {ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-politenessconfig-dialog',
- templateUrl: './politenessconfig-dialog.component.html',
- styleUrls: ['./politenessconfig-dialog.component.css']
+ selector: 'app-politenessconfig-dialog',
+ templateUrl: './politenessconfig-dialog.component.html',
+ styleUrls: ['./politenessconfig-dialog.component.css'],
+ standalone: false
})
export class PolitenessConfigDialogComponent extends PolitenessConfigDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/politenessconfig/politenessconfig-multi-dialog/politenessconfig-multi-dialog.component.ts b/src/modules/config/components/politenessconfig/politenessconfig-multi-dialog/politenessconfig-multi-dialog.component.ts
index 4650ae08d..9c408dc93 100644
--- a/src/modules/config/components/politenessconfig/politenessconfig-multi-dialog/politenessconfig-multi-dialog.component.ts
+++ b/src/modules/config/components/politenessconfig/politenessconfig-multi-dialog/politenessconfig-multi-dialog.component.ts
@@ -9,9 +9,10 @@ import {NUMBER_OR_EMPTY_STRING} from '../../../../../shared/validation/patterns'
import {LabelMultiComponent} from '../../label/label-multi/label-multi.component';
@Component({
- selector: 'app-politenessconfig-multi-dialog',
- templateUrl: './politenessconfig-multi-dialog.component.html',
- styleUrls: ['./politenessconfig-multi-dialog.component.css']
+ selector: 'app-politenessconfig-multi-dialog',
+ templateUrl: './politenessconfig-multi-dialog.component.html',
+ styleUrls: ['./politenessconfig-multi-dialog.component.css'],
+ standalone: false
})
export class PolitenessConfigMultiDialogComponent extends PolitenessConfigDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/politenessconfig/politenessconfig-preview/politenessconfig-preview.component.ts b/src/modules/config/components/politenessconfig/politenessconfig-preview/politenessconfig-preview.component.ts
index aa9bce820..bb2297c55 100644
--- a/src/modules/config/components/politenessconfig/politenessconfig-preview/politenessconfig-preview.component.ts
+++ b/src/modules/config/components/politenessconfig/politenessconfig-preview/politenessconfig-preview.component.ts
@@ -2,9 +2,10 @@ import {Component, Input} from '@angular/core';
import {ConfigObject, RobotsPolicy} from '../../../../../shared/models/config';
@Component({
- selector: 'app-politenessconfig-preview',
- templateUrl: './politenessconfig-preview.component.html',
- styleUrls: ['./politenessconfig-preview.component.css']
+ selector: 'app-politenessconfig-preview',
+ templateUrl: './politenessconfig-preview.component.html',
+ styleUrls: ['./politenessconfig-preview.component.css'],
+ standalone: false
})
export class PolitenessconfigPreviewComponent {
readonly RobotsPolicy = RobotsPolicy;
diff --git a/src/modules/config/components/preview/preview.component.ts b/src/modules/config/components/preview/preview.component.ts
index 484417bf3..4880fbbcf 100644
--- a/src/modules/config/components/preview/preview.component.ts
+++ b/src/modules/config/components/preview/preview.component.ts
@@ -4,10 +4,11 @@ import {ActivatedRoute, Router} from '@angular/router';
import {ErrorService} from '../../../core/services';
@Component({
- selector: 'app-preview',
- templateUrl: './preview.component.html',
- styleUrls: ['./preview.component.css'],
- changeDetection: ChangeDetectionStrategy.OnPush
+ selector: 'app-preview',
+ templateUrl: './preview.component.html',
+ styleUrls: ['./preview.component.css'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class PreviewComponent {
readonly Kind = Kind;
diff --git a/src/modules/config/components/rolemapping/rolemapping-details/rolemapping-details.component.ts b/src/modules/config/components/rolemapping/rolemapping-details/rolemapping-details.component.ts
index 585c89202..71d6d3441 100644
--- a/src/modules/config/components/rolemapping/rolemapping-details/rolemapping-details.component.ts
+++ b/src/modules/config/components/rolemapping/rolemapping-details/rolemapping-details.component.ts
@@ -5,9 +5,10 @@ import {ConfigObject, Kind, Meta, Role, RoleMapping} from '../../../../../shared
@Component({
- selector: 'app-rolemapping-details',
- templateUrl: './rolemapping-details.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-rolemapping-details',
+ templateUrl: './rolemapping-details.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class RoleMappingDetailsComponent implements OnChanges {
diff --git a/src/modules/config/components/rolemapping/rolemapping-dialog/rolemapping-dialog.component.ts b/src/modules/config/components/rolemapping/rolemapping-dialog/rolemapping-dialog.component.ts
index 24313112d..0afe8f167 100644
--- a/src/modules/config/components/rolemapping/rolemapping-dialog/rolemapping-dialog.component.ts
+++ b/src/modules/config/components/rolemapping/rolemapping-dialog/rolemapping-dialog.component.ts
@@ -7,9 +7,10 @@ import {ConfigDialogData} from '../../../func';
import {ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-rolemapping-dialog',
- templateUrl: './rolemapping-dialog.component.html',
- styleUrls: ['./rolemapping-dialog.component.css']
+ selector: 'app-rolemapping-dialog',
+ templateUrl: './rolemapping-dialog.component.html',
+ styleUrls: ['./rolemapping-dialog.component.css'],
+ standalone: false
})
export class RoleMappingDialogComponent extends RoleMappingDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/rolemapping/rolemapping-list/rolemapping-list.component.ts b/src/modules/config/components/rolemapping/rolemapping-list/rolemapping-list.component.ts
index 12a20a274..e93729c0f 100644
--- a/src/modules/config/components/rolemapping/rolemapping-list/rolemapping-list.component.ts
+++ b/src/modules/config/components/rolemapping/rolemapping-list/rolemapping-list.component.ts
@@ -5,16 +5,17 @@ import {BASE_LIST} from '../../../../../shared/directives';
@Component({
- selector: 'app-rolemapping-list',
- templateUrl: './rolemapping-list.component.html',
- styleUrls: ['../../../../commons/components/base-list/base-list.scss'],
- changeDetection: ChangeDetectionStrategy.OnPush,
- providers: [
- {
- provide: BASE_LIST,
- useExisting: forwardRef(() => RoleMappingListComponent)
- }
- ]
+ selector: 'app-rolemapping-list',
+ templateUrl: './rolemapping-list.component.html',
+ styleUrls: ['../../../../commons/components/base-list/base-list.scss'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ providers: [
+ {
+ provide: BASE_LIST,
+ useExisting: forwardRef(() => RoleMappingListComponent)
+ }
+ ],
+ standalone: false
})
export class RoleMappingListComponent extends BaseListComponent {
diff --git a/src/modules/config/components/rolemapping/rolemapping-multi-dialog/rolemapping-multi-dialog.component.ts b/src/modules/config/components/rolemapping/rolemapping-multi-dialog/rolemapping-multi-dialog.component.ts
index c2e5ecf86..2d3575f41 100644
--- a/src/modules/config/components/rolemapping/rolemapping-multi-dialog/rolemapping-multi-dialog.component.ts
+++ b/src/modules/config/components/rolemapping/rolemapping-multi-dialog/rolemapping-multi-dialog.component.ts
@@ -7,9 +7,10 @@ import {CustomValidators} from '../../../../../shared/validation';
import {ConfigObject, Kind} from '../../../../../shared/models/config';
@Component({
- selector: 'app-rolemapping-multi-dialog',
- templateUrl: './rolemapping-multi-dialog.component.html',
- styleUrls: ['./rolemapping-multi-dialog.component.css']
+ selector: 'app-rolemapping-multi-dialog',
+ templateUrl: './rolemapping-multi-dialog.component.html',
+ styleUrls: ['./rolemapping-multi-dialog.component.css'],
+ standalone: false
})
export class RoleMappingMultiDialogComponent extends RoleMappingDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/run-crawl-dialog/run-crawl-dialog.component.ts b/src/modules/config/components/run-crawl-dialog/run-crawl-dialog.component.ts
index 800b74d1e..3236c50b5 100644
--- a/src/modules/config/components/run-crawl-dialog/run-crawl-dialog.component.ts
+++ b/src/modules/config/components/run-crawl-dialog/run-crawl-dialog.component.ts
@@ -4,9 +4,10 @@ import {RunCrawlReply, RunCrawlRequest} from '../../../../shared/models/controll
import {ConfigObject, Kind} from '../../../../shared/models/config';
@Component({
- selector: 'app-run-crawl-dialog',
- templateUrl: './run-crawl-dialog.component.html',
- styleUrls: ['./run-crawl-dialog.component.css']
+ selector: 'app-run-crawl-dialog',
+ templateUrl: './run-crawl-dialog.component.html',
+ styleUrls: ['./run-crawl-dialog.component.css'],
+ standalone: false
})
export class RunCrawlDialogComponent {
diff --git a/src/modules/config/components/schedule/schedule-details/schedule-details.component.html b/src/modules/config/components/schedule/schedule-details/schedule-details.component.html
index 60350b4dd..9719f58c1 100644
--- a/src/modules/config/components/schedule/schedule-details/schedule-details.component.html
+++ b/src/modules/config/components/schedule/schedule-details/schedule-details.component.html
@@ -78,6 +78,7 @@ Time limit
+ {{validFrom.errors | json}}
diff --git a/src/modules/config/components/schedule/schedule-details/schedule-details.component.spec.ts b/src/modules/config/components/schedule/schedule-details/schedule-details.component.spec.ts
index 646f65050..8ed6586c0 100644
--- a/src/modules/config/components/schedule/schedule-details/schedule-details.component.spec.ts
+++ b/src/modules/config/components/schedule/schedule-details/schedule-details.component.spec.ts
@@ -7,7 +7,6 @@ import {CoreTestingModule} from '../../../../core/core.testing.module';
import {LabelService} from '../../../services';
import {of} from 'rxjs';
import {AnnotationComponent, LabelComponent, MetaComponent} from '../..';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
import {HarnessLoader} from '@angular/cdk/testing';
import {MatButtonHarness} from '@angular/material/button/testing';
@@ -19,7 +18,8 @@ import {
MatDatepickerToggleHarness
} from '@angular/material/datepicker/testing';
import {MatFormFieldHarness} from '@angular/material/form-field/testing';
-import moment from 'moment';
+import dayjs from 'dayjs';
+import {MAT_DATE_LOCALE} from "@angular/material/core";
const exampleCrawlSchedule: ConfigObject = {
id: 'configObject_id',
@@ -72,7 +72,6 @@ describe('ScheduleDetailsComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
- AbilityModule,
CommonsModule,
NoopAnimationsModule,
CoreTestingModule.forRoot(),
@@ -84,6 +83,10 @@ describe('ScheduleDetailsComponent', () => {
AnnotationComponent
],
providers: [
+ {
+ provide: MAT_DATE_LOCALE,
+ useValue: 'nb',
+ },
{
provide: AuthService,
useValue: {
@@ -384,22 +387,7 @@ describe('ScheduleDetailsComponent', () => {
});
});
- // TODO:
- // use no-nb as locale when inputting dates ?
- // Use updateButton.click() instead of component.onUpdate().(Gets error fixture already destroyed when using click())
-
- /** Testing datepicker component.
- * When checking validation for entering invalid dates, output from calendar is in en-US locale.
- * Same goes for when typing in input.
- * ex: writing dd.mm.yyyy in test (24.12.2022), is invalid.
- * Tested on live page (where locale is set), and works as expected (24.12.2022 is valid and 12.24.2022 is invalid).
- *
- * At the end of each test the updated configObject (from prepareSave), is validated to be as expected.
- *
- */
-
it('setting valid from date in calendar sets timestamp to beginning of day', async () => {
-
let update: ConfigObject | undefined;
component.update.subscribe((config: ConfigObject) => {
update = config;
@@ -411,42 +399,49 @@ describe('ScheduleDetailsComponent', () => {
await fromCal.selectCell(dates[0]);
await validFromToggle.closeCalendar();
fixture.detectChanges();
- const expectedFromDate = moment().add(1, 'M').month() + '/1/' + moment().year();
- expect(await validFrom.getValue()).toEqual(expectedFromDate);
+
+ // Calculate the expected date and timestamp reliably
+ const expectedDate = dayjs().locale('nb').startOf('month');
+ const expected = expectedDate.format('l');
+
+ expect(await validFrom.getValue()).toEqual(expected);
expect(component.canUpdate).toBeTruthy();
+
fixture.detectChanges();
component.onUpdate();
- const expectedTimestamp = moment().startOf('month').format('YYYY-MM-DD') + 'T00:00:00.000Z';
+
+ const expectedTimestamp = expectedDate.format('YYYY-MM-DD') + 'T00:00:00.000Z';
expect(update.crawlScheduleConfig.validFrom).toBe(expectedTimestamp);
});
- it('setting valid from date in input sets timestamp to end of day', async () => {
+ it('setting valid from date in input sets timestamp to start of day', async () => {
let update: ConfigObject | undefined;
component.update.subscribe((config: ConfigObject) => {
update = config;
});
- await validFrom.setValue('1.32.2022');
+ await validFrom.setValue('32.1.2022');
fixture.detectChanges();
await validFrom.blur();
expect(await validFromFormField.isControlValid()).toBeFalsy();
expect(component.canUpdate).toBeFalsy();
- await validFrom.setValue('13.1.2022');
+
+ await validFrom.setValue('1.13.2022');
await validFrom.blur();
expect(await validFromFormField.isControlValid()).toBeFalsy();
expect(component.canUpdate).toBeFalsy();
+
await validFrom.setValue('1.1.2022');
await validFrom.blur();
-
expect(await validFromFormField.isControlValid()).toBeTruthy();
expect(component.canUpdate).toBeTruthy();
component.onUpdate();
+
expect(update.crawlScheduleConfig.validFrom).toBe('2022-01-01T00:00:00.000Z');
});
it('setting valid to date in calendar sets timestamp to end of day', async () => {
-
let update: ConfigObject | undefined;
component.update.subscribe((config: ConfigObject) => {
update = config;
@@ -455,18 +450,18 @@ describe('ScheduleDetailsComponent', () => {
await validToToggle.openCalendar();
const toCal = await validToToggle.getCalendar();
const daysInMonth = await toCal.getCells();
- await toCal.selectCell({text: (daysInMonth.length).toString()});
+ await daysInMonth[daysInMonth.length -1].select();
await validToToggle.closeCalendar();
fixture.detectChanges();
- const expectedToDate = moment().add(1, 'M').month() + '/' + daysInMonth.length + '/' + moment().year();
+ const expectedToDate = dayjs().locale('nb').endOf('month').format('D.M.YYYY');
expect(await validTo.getValue()).toEqual(expectedToDate);
expect(component.canUpdate).toBeTruthy();
component.onUpdate();
- const expectedTimestamp = moment().endOf('month').format('YYYY-MM-DD') + 'T23:59:59.999Z';
+ const expectedTimestamp = dayjs().locale('nb').endOf('month').format('YYYY-MM-DD') + 'T23:59:59.999Z';
expect(update.crawlScheduleConfig.validTo).toBe(expectedTimestamp);
});
- it('setting valid to date in input sets timestamp to beginning of day', async () => {
+ it('setting valid to date in input sets timestamp to end of day', async () => {
let update: ConfigObject | undefined;
component.update.subscribe((config: ConfigObject) => {
update = config;
@@ -477,16 +472,18 @@ describe('ScheduleDetailsComponent', () => {
await validTo.blur();
expect(await validToFormField.isControlValid()).toBeFalsy();
expect(component.canUpdate).toBeFalsy();
- await validTo.setValue('13.1.2022');
+
+ await validTo.setValue('32.1.2022');
+ fixture.detectChanges();
await validTo.blur();
expect(await validToFormField.isControlValid()).toBeFalsy();
expect(component.canUpdate).toBeFalsy();
+
await validTo.setValue('1.1.2022');
+ fixture.detectChanges();
await validTo.blur();
-
expect(await validToFormField.isControlValid()).toBeTruthy();
expect(component.canUpdate).toBeTruthy();
-
component.onUpdate();
expect(update.crawlScheduleConfig.validTo).toBe('2022-01-01T23:59:59.999Z');
});
diff --git a/src/modules/config/components/schedule/schedule-details/schedule-details.component.ts b/src/modules/config/components/schedule/schedule-details/schedule-details.component.ts
index f80b417b3..fe2f0ba90 100644
--- a/src/modules/config/components/schedule/schedule-details/schedule-details.component.ts
+++ b/src/modules/config/components/schedule/schedule-details/schedule-details.component.ts
@@ -22,9 +22,10 @@ import {DateTime} from '../../../../../shared/func';
@Component({
- selector: 'app-schedule-details',
- templateUrl: './schedule-details.component.html',
- styleUrls: ['./schedule-details.component.css'],
+ selector: 'app-schedule-details',
+ templateUrl: './schedule-details.component.html',
+ styleUrls: ['./schedule-details.component.css'],
+ standalone: false
})
export class ScheduleDetailsComponent implements OnChanges {
@Input()
diff --git a/src/modules/config/components/schedule/schedule-dialog/schedule-dialog.component.spec.ts b/src/modules/config/components/schedule/schedule-dialog/schedule-dialog.component.spec.ts
index be3d26df4..f716ac1a4 100644
--- a/src/modules/config/components/schedule/schedule-dialog/schedule-dialog.component.spec.ts
+++ b/src/modules/config/components/schedule/schedule-dialog/schedule-dialog.component.spec.ts
@@ -9,7 +9,6 @@ import {AnnotationComponent, LabelComponent, MetaComponent} from '../..';
import {ConfigDialogData} from '../../../func';
import {LabelService} from '../../../services';
import {of} from 'rxjs';
-import {AbilityModule} from '@casl/angular';
import {AuthService} from '../../../../core/services';
describe('ScheduleDialogComponent', () => {
@@ -24,7 +23,7 @@ describe('ScheduleDialogComponent', () => {
{
component: ScheduleDialogComponent,
declarations: [MetaComponent, LabelComponent, AnnotationComponent],
- imports: [AbilityModule, CoreTestingModule.forRoot(), MatDialogModule, CommonsModule],
+ imports: [CoreTestingModule.forRoot(), MatDialogModule, CommonsModule],
providers: [UntypedFormBuilder,
{
provide: LabelService,
diff --git a/src/modules/config/components/schedule/schedule-dialog/schedule-dialog.component.ts b/src/modules/config/components/schedule/schedule-dialog/schedule-dialog.component.ts
index 9c08bbfd1..3cf1e8d58 100644
--- a/src/modules/config/components/schedule/schedule-dialog/schedule-dialog.component.ts
+++ b/src/modules/config/components/schedule/schedule-dialog/schedule-dialog.component.ts
@@ -7,9 +7,10 @@ import {ConfigObject} from '../../../../../shared/models/config';
import {ScheduleDetailsComponent} from '..';
@Component({
- selector: 'app-schedule-dialog',
- templateUrl: './schedule-dialog.component.html',
- styleUrls: ['./schedule-dialog.component.css']
+ selector: 'app-schedule-dialog',
+ templateUrl: './schedule-dialog.component.html',
+ styleUrls: ['./schedule-dialog.component.css'],
+ standalone: false
})
export class ScheduleDialogComponent extends ScheduleDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/schedule/schedule-multi-dialog/schedule-multi-dialog.component.ts b/src/modules/config/components/schedule/schedule-multi-dialog/schedule-multi-dialog.component.ts
index 4eea315df..b54e24589 100644
--- a/src/modules/config/components/schedule/schedule-multi-dialog/schedule-multi-dialog.component.ts
+++ b/src/modules/config/components/schedule/schedule-multi-dialog/schedule-multi-dialog.component.ts
@@ -9,9 +9,10 @@ import {DateTime} from '../../../../../shared/func';
import {LabelMultiComponent} from '../../label/label-multi/label-multi.component';
@Component({
- selector: 'app-schedule-multi-dialog',
- templateUrl: './schedule-multi-dialog.component.html',
- styleUrls: ['./schedule-multi-dialog.component.css']
+ selector: 'app-schedule-multi-dialog',
+ templateUrl: './schedule-multi-dialog.component.html',
+ styleUrls: ['./schedule-multi-dialog.component.css'],
+ standalone: false
})
export class ScheduleMultiDialogComponent extends ScheduleDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/schedule/schedule-preview/schedule-preview.component.ts b/src/modules/config/components/schedule/schedule-preview/schedule-preview.component.ts
index 9b016531b..f98be8df9 100644
--- a/src/modules/config/components/schedule/schedule-preview/schedule-preview.component.ts
+++ b/src/modules/config/components/schedule/schedule-preview/schedule-preview.component.ts
@@ -2,9 +2,10 @@ import {Component, Input} from '@angular/core';
import {ConfigObject} from '../../../../../shared/models/config';
@Component({
- selector: 'app-schedule-preview',
- templateUrl: './schedule-preview.component.html',
- styleUrls: ['./schedule-preview.component.css']
+ selector: 'app-schedule-preview',
+ templateUrl: './schedule-preview.component.html',
+ styleUrls: ['./schedule-preview.component.css'],
+ standalone: false
})
export class SchedulePreviewComponent {
@Input()
diff --git a/src/modules/config/components/seed-meta/seed-meta-preview/seed-meta-preview.component.ts b/src/modules/config/components/seed-meta/seed-meta-preview/seed-meta-preview.component.ts
index 44295eeaf..4999650c4 100644
--- a/src/modules/config/components/seed-meta/seed-meta-preview/seed-meta-preview.component.ts
+++ b/src/modules/config/components/seed-meta/seed-meta-preview/seed-meta-preview.component.ts
@@ -3,9 +3,10 @@ import {ConfigObject} from '../../../../../shared/models';
import {AuthService, SnackBarService} from '../../../../core/services';
@Component({
- selector: 'app-seed-meta-preview',
- templateUrl: './seed-meta-preview.component.html',
- styleUrls: ['./seed-meta-preview.component.css']
+ selector: 'app-seed-meta-preview',
+ templateUrl: './seed-meta-preview.component.html',
+ styleUrls: ['./seed-meta-preview.component.css'],
+ standalone: false
})
export class SeedMetaPreviewComponent {
diff --git a/src/modules/config/components/seed-meta/seed-meta.component.spec.ts b/src/modules/config/components/seed-meta/seed-meta.component.spec.ts
index a1a9d655d..39a553c36 100644
--- a/src/modules/config/components/seed-meta/seed-meta.component.spec.ts
+++ b/src/modules/config/components/seed-meta/seed-meta.component.spec.ts
@@ -7,7 +7,6 @@ import {LabelService} from '../../services';
import {of} from 'rxjs';
import {AnnotationComponent, LabelComponent} from '..';
import {CoreTestingModule} from '../../../core/core.testing.module';
-import {AbilityModule} from '@casl/angular';
import {CommonsModule} from '../../../commons';
import {HarnessLoader} from '@angular/cdk/testing';
import {MatFormFieldHarness} from '@angular/material/form-field/testing';
@@ -104,7 +103,6 @@ describe('SeedMetaComponent', () => {
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
- AbilityModule,
MaterialModule,
CommonsModule,
CoreTestingModule.forRoot(),
diff --git a/src/modules/config/components/seed-meta/seed-meta.component.ts b/src/modules/config/components/seed-meta/seed-meta.component.ts
index f9a010ab7..33fd917d2 100644
--- a/src/modules/config/components/seed-meta/seed-meta.component.ts
+++ b/src/modules/config/components/seed-meta/seed-meta.component.ts
@@ -32,14 +32,15 @@ export interface Parcel {
}
@Component({
- selector: 'app-seed-meta',
- templateUrl: './seed-meta.component.html',
- styleUrls: ['./seed-meta.component.css'],
- providers: [
- {provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SeedMetaComponent), multi: true},
- {provide: NG_ASYNC_VALIDATORS, useExisting: forwardRef(() => SeedMetaComponent), multi: true}
- ],
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-seed-meta',
+ templateUrl: './seed-meta.component.html',
+ styleUrls: ['./seed-meta.component.css'],
+ providers: [
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SeedMetaComponent), multi: true },
+ { provide: NG_ASYNC_VALIDATORS, useExisting: forwardRef(() => SeedMetaComponent), multi: true }
+ ],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class SeedMetaComponent extends MetaComponent implements AsyncValidator {
diff --git a/src/modules/config/components/seed/seed-details/seed-details.component.ts b/src/modules/config/components/seed/seed-details/seed-details.component.ts
index d458a4fe7..cdb30497e 100644
--- a/src/modules/config/components/seed/seed-details/seed-details.component.ts
+++ b/src/modules/config/components/seed/seed-details/seed-details.component.ts
@@ -18,9 +18,10 @@ import {Parcel} from '../..';
import {configRefIdRequired} from '../../../../../shared/validation/configref';
@Component({
- selector: 'app-seed-details',
- templateUrl: './seed-details.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-seed-details',
+ templateUrl: './seed-details.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class SeedDetailsComponent implements OnChanges, OnDestroy {
diff --git a/src/modules/config/components/seed/seed-dialog/seed-dialog.component.ts b/src/modules/config/components/seed/seed-dialog/seed-dialog.component.ts
index 76c6d160e..0fe6dcbae 100644
--- a/src/modules/config/components/seed/seed-dialog/seed-dialog.component.ts
+++ b/src/modules/config/components/seed/seed-dialog/seed-dialog.component.ts
@@ -7,9 +7,10 @@ import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';
import {ConfigDialogData} from '../../../func';
@Component({
- selector: 'app-entity-dialog',
- templateUrl: './seed-dialog.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-entity-dialog',
+ templateUrl: './seed-dialog.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class SeedDialogComponent extends SeedDetailsComponent implements OnInit {
crawlJobs: ConfigObject[];
diff --git a/src/modules/config/components/seed/seed-multi-dialog/seed-multi-dialog.component.ts b/src/modules/config/components/seed/seed-multi-dialog/seed-multi-dialog.component.ts
index c103cb4f8..70f062435 100644
--- a/src/modules/config/components/seed/seed-multi-dialog/seed-multi-dialog.component.ts
+++ b/src/modules/config/components/seed/seed-multi-dialog/seed-multi-dialog.component.ts
@@ -8,9 +8,10 @@ import {ConfigObject, ConfigRef, Kind, Label} from '../../../../../shared/models
import {LabelMultiComponent} from '../../label/label-multi/label-multi.component';
@Component({
- selector: 'app-seed-multi-dialog',
- templateUrl: './seed-multi-dialog.component.html',
- styleUrls: ['./seed-multi-dialog.component.css']
+ selector: 'app-seed-multi-dialog',
+ templateUrl: './seed-multi-dialog.component.html',
+ styleUrls: ['./seed-multi-dialog.component.css'],
+ standalone: false
})
export class SeedMultiDialogComponent extends SeedDetailsComponent implements OnInit {
diff --git a/src/modules/config/components/seed/seed-preview/seed-preview.component.spec.ts b/src/modules/config/components/seed/seed-preview/seed-preview.component.spec.ts
index 2a09052ae..563bbac12 100644
--- a/src/modules/config/components/seed/seed-preview/seed-preview.component.spec.ts
+++ b/src/modules/config/components/seed/seed-preview/seed-preview.component.spec.ts
@@ -2,7 +2,6 @@ import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import {SeedPreviewComponent} from './seed-preview.component';
import {RouterTestingModule} from '@angular/router/testing';
-import {MatDialogModule} from '@angular/material/dialog';
import {CoreTestingModule} from '../../../../core/core.testing.module';
import {CommonsModule} from '../../../../commons';
diff --git a/src/modules/config/components/seed/seed-preview/seed-preview.component.ts b/src/modules/config/components/seed/seed-preview/seed-preview.component.ts
index 9124bd8d9..67121b2dc 100644
--- a/src/modules/config/components/seed/seed-preview/seed-preview.component.ts
+++ b/src/modules/config/components/seed/seed-preview/seed-preview.component.ts
@@ -6,9 +6,10 @@ import {AuthService, SnackBarService} from '../../../../core/services';
@Component({
- selector: 'app-seed-preview',
- templateUrl: './seed-preview.component.html',
- styleUrls: ['./seed-preview.component.css']
+ selector: 'app-seed-preview',
+ templateUrl: './seed-preview.component.html',
+ styleUrls: ['./seed-preview.component.css'],
+ standalone: false
})
export class SeedPreviewComponent {
readonly CrawlExecutionState = CrawlExecutionState;
diff --git a/src/modules/config/components/selector/selector.component.ts b/src/modules/config/components/selector/selector.component.ts
index 66d3e2f35..60f61412b 100644
--- a/src/modules/config/components/selector/selector.component.ts
+++ b/src/modules/config/components/selector/selector.component.ts
@@ -6,11 +6,12 @@ import {LabelComponent} from '../label/label.component';
@Component({
- selector: 'app-selector',
- templateUrl: '../label/label.component.html',
- styleUrls: ['../label/label.component.scss'],
- providers: [{provide: NG_VALUE_ACCESSOR, useExisting: SelectorComponent, multi: true}],
- changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'app-selector',
+ templateUrl: '../label/label.component.html',
+ styleUrls: ['../label/label.component.scss'],
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectorComponent, multi: true }],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ standalone: false
})
export class SelectorComponent extends LabelComponent implements OnInit {
diff --git a/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.html b/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.html
index 27c358dfe..ff6c7c03f 100644
--- a/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.html
+++ b/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.html
@@ -1,4 +1,4 @@
-
+
Actions
@@ -6,7 +6,7 @@
@@ -17,7 +17,7 @@
play_arrow
Crawl seed
@@ -26,7 +26,7 @@
play_arrow
Run crawljob
@@ -35,7 +35,7 @@
file_copy
Clone
diff --git a/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.spec.ts b/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.spec.ts
index f1be3024d..5b40ef91d 100644
--- a/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.spec.ts
+++ b/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.spec.ts
@@ -1,5 +1,4 @@
import {ActionShortcutComponent} from './action-shortcut.component';
-import {AbilityModule} from '@casl/angular';
import {CoreTestingModule} from '../../../../core/core.testing.module';
import {ConfigObject, Kind} from '../../../../../shared/models';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
@@ -11,7 +10,7 @@ describe('ActionShortcutComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
- imports: [CoreTestingModule.forRoot(), AbilityModule, MatListModule],
+ imports: [CoreTestingModule.forRoot(), MatListModule],
declarations: [ActionShortcutComponent],
providers: []
})
diff --git a/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.ts b/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.ts
index 5d85804e5..571f27123 100644
--- a/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.ts
+++ b/src/modules/config/components/shortcut/action-shortcut/action-shortcut.component.ts
@@ -1,12 +1,16 @@
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {ConfigObject, Kind} from '../../../../../shared/models/config';
+import {Observable} from "rxjs";
+import {AbilityService} from "@casl/angular";
@Component({
- selector: 'app-action-shortcut',
- templateUrl: './action-shortcut.component.html',
+ selector: 'app-action-shortcut',
+ templateUrl: './action-shortcut.component.html',
+ standalone: false
})
export class ActionShortcutComponent {
readonly Kind = Kind;
+ readonly ability$: Observable
@Input()
configObject: ConfigObject;
@@ -21,7 +25,8 @@ export class ActionShortcutComponent {
clone = new EventEmitter();
- constructor() {
+ constructor(private ableService: AbilityService) {
+ this.ability$ = this.ableService.ability$;
}
onClone() {
diff --git a/src/modules/config/components/shortcut/filter-shortcut/filter-shortcut.component.html b/src/modules/config/components/shortcut/filter-shortcut/filter-shortcut.component.html
index 61374140e..183433bd0 100644
--- a/src/modules/config/components/shortcut/filter-shortcut/filter-shortcut.component.html
+++ b/src/modules/config/components/shortcut/filter-shortcut/filter-shortcut.component.html
@@ -1,11 +1,11 @@
-
+
Filters
link
@@ -18,7 +18,7 @@
Filters