From 0171563778303084b60884254ab3c577d5be3b60 Mon Sep 17 00:00:00 2001 From: Lukas Spirig Date: Thu, 4 May 2023 23:10:25 +0200 Subject: [PATCH] refactor: apply standalone migration (#41) --- .eslintrc.json | 30 +- .prettierignore | 4 +- .vscode/launch.json | 7 +- .vscode/settings.json | 2 +- package.json | 3 +- src/app/app-routing.module.ts | 10 - src/app/app.component.spec.ts | 3 +- src/app/app.component.ts | 22 +- src/app/app.module.ts | 37 --- src/app/core/websocket.service.ts | 15 +- .../i18n-examples-template.component.ts | 3 + .../add-language-modal.component.spec.ts | 2 +- .../add-language-modal.component.ts | 29 +- src/app/overview/overview-routing.module.ts | 17 -- src/app/overview/overview-routing.ts | 8 + src/app/overview/overview.module.ts | 31 -- .../overview/overview.component.spec.ts | 2 +- .../overview/overview/overview.component.ts | 18 +- src/app/shared/shared.module.ts | 60 ---- .../auto-migrate.component.spec.ts | 2 +- .../auto-migrate/auto-migrate.component.ts | 28 +- .../migrate/migrate.component.spec.ts | 2 +- .../migrate/migrate.component.ts | 27 +- .../source-orphan.component.spec.ts | 2 +- .../source-orphan/source-orphan.component.ts | 19 +- .../source-orphans-routing.module.ts | 39 --- .../source-orphans/source-orphans-routing.ts | 30 ++ .../source-orphans/source-orphans.module.ts | 20 -- .../source-orphans.component.spec.ts | 2 +- .../source-orphans.component.ts | 13 + .../target/export/export.component.spec.ts | 2 +- src/app/target/export/export.component.ts | 19 +- .../target/import/import.component.spec.ts | 2 +- src/app/target/import/import.component.ts | 26 +- .../target/orphan/orphan.component.spec.ts | 2 +- src/app/target/orphan/orphan.component.ts | 20 +- .../target/orphans/orphans.component.spec.ts | 9 +- src/app/target/orphans/orphans.component.ts | 21 +- src/app/target/target-routing.module.ts | 49 --- src/app/target/target-routing.ts | 35 +++ src/app/target/target.module.ts | 26 -- .../target/target/target.component.spec.ts | 2 +- src/app/target/target/target.component.ts | 17 +- .../translate/translate.component.spec.ts | 9 +- .../target/translate/translate.component.ts | 34 ++- src/app/target/unit/unit.component.spec.ts | 2 +- src/app/target/unit/unit.component.ts | 33 +- src/main.ts | 26 +- tsconfig.json | 9 +- yarn.lock | 288 +++++++++++++++++- 50 files changed, 734 insertions(+), 384 deletions(-) delete mode 100644 src/app/app-routing.module.ts delete mode 100644 src/app/app.module.ts delete mode 100644 src/app/overview/overview-routing.module.ts create mode 100644 src/app/overview/overview-routing.ts delete mode 100644 src/app/overview/overview.module.ts delete mode 100644 src/app/shared/shared.module.ts delete mode 100644 src/app/source-orphans/source-orphans-routing.module.ts create mode 100644 src/app/source-orphans/source-orphans-routing.ts delete mode 100644 src/app/source-orphans/source-orphans.module.ts delete mode 100644 src/app/target/target-routing.module.ts create mode 100644 src/app/target/target-routing.ts delete mode 100644 src/app/target/target.module.ts diff --git a/.eslintrc.json b/.eslintrc.json index 718d0be..00632d9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,20 +1,16 @@ { "root": true, - "ignorePatterns": [ - "projects/**/*" - ], + "ignorePatterns": ["projects/**/*"], "overrides": [ { - "files": [ - "*.ts" - ], + "files": ["*.ts"], "parserOptions": { - "project": [ - "tsconfig.json" - ], + "project": ["tsconfig.json"], "createDefaultProgram": true }, "extends": [ + "plugin:import/recommended", + "plugin:import/typescript", "plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates" ], @@ -34,16 +30,20 @@ "prefix": "t9n", "style": "kebab-case" } + ], + "import/no-unresolved": "off", + "import/order": [ + "error", + { + "alphabetize": { "order": "asc", "caseInsensitive": true }, + "newlines-between": "always" + } ] } }, { - "files": [ - "*.html" - ], - "extends": [ - "plugin:@angular-eslint/template/recommended" - ], + "files": ["*.html"], + "extends": ["plugin:@angular-eslint/template/recommended"], "rules": {} } ] diff --git a/.prettierignore b/.prettierignore index 911fb8d..3d4babb 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,10 +1,9 @@ +.angular/* .github/* browserslist LICENSE coverage app/* -package-lock.json -.* *.ico *.xlf *.svg @@ -16,5 +15,6 @@ server/client/* schematics/*/index.js schematics/*/index.d.ts yarn.lock +package-lock.json test/xlf test/xlf2 \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 558a226..79a1460 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -22,10 +22,7 @@ "type": "node", "request": "launch", "name": "t9n xlf cli", - "runtimeArgs": [ - "${workspaceRoot}/bin/cli.js", - "t9n-xlf.json" - ], + "runtimeArgs": ["${workspaceRoot}/bin/cli.js", "t9n-xlf.json"], "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "port": 9229 @@ -44,4 +41,4 @@ "port": 9229 } ] -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json index d7207a4..44aeb40 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { "typescript.tsdk": "node_modules\\typescript\\lib" -} \ No newline at end of file +} diff --git a/package.json b/package.json index 7d0118a..f7e604c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "build": "yarn -s build:ng && yarn -s build:node", "build:ng": "ng build --configuration production", "build:node": "rollup --config rollup.config.mjs", - "format": "prettier --ignore-unknown --write **/*", + "format": "prettier --ignore-unknown --write \"**/*\"", "test": "yarn -s test:node", "test:node": "jest", "lint": "ng lint", @@ -93,6 +93,7 @@ "@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/parser": "^5.59.2", "eslint": "^8.39.0", + "eslint-plugin-import": "^2.27.5", "husky": "^8.0.3", "jasmine-core": "~4.6.0", "jest": "^29.5.0", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts deleted file mode 100644 index f3daf25..0000000 --- a/src/app/app-routing.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -const routes: Routes = []; - -@NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule], -}) -export class AppRoutingModule {} diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 89a0a2f..2ea7a8f 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -6,8 +6,7 @@ import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [RouterTestingModule], - declarations: [AppComponent], + imports: [RouterTestingModule, AppComponent], }).compileComponents(); })); diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 31726c1..c62f6d2 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,5 +1,15 @@ import { Component, HostBinding } from '@angular/core'; -import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { + MatSnackBar, + MatSnackBarModule, + MatSnackBarRef, + SimpleSnackBar, +} from '@angular/material/snack-bar'; +import { MatToolbarModule } from '@angular/material/toolbar'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { RouterLink, RouterOutlet } from '@angular/router'; import { WebsocketService } from './core/websocket.service'; @@ -7,6 +17,16 @@ import { WebsocketService } from './core/websocket.service'; selector: 't9n-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'], + standalone: true, + imports: [ + MatToolbarModule, + MatButtonModule, + RouterLink, + MatIconModule, + MatSnackBarModule, + MatTooltipModule, + RouterOutlet, + ], }) export class AppComponent { @HostBinding('class.service-down') serviceDown = false; diff --git a/src/app/app.module.ts b/src/app/app.module.ts deleted file mode 100644 index e8d7716..0000000 --- a/src/app/app.module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { HttpClientModule } from '@angular/common/http'; -import { NgModule } from '@angular/core'; -import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; -import { MatSnackBarModule } from '@angular/material/snack-bar'; -import { MatToolbarModule } from '@angular/material/toolbar'; -import { MatTooltipModule } from '@angular/material/tooltip'; -import { BrowserModule } from '@angular/platform-browser'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; - -import { AppRoutingModule } from './app-routing.module'; -import { AppComponent } from './app.component'; -import { I18nExamplesTemplateComponent } from './i18n-examples-template/i18n-examples-template.component'; -import { OverviewModule } from './overview/overview.module'; -import { SourceOrphansModule } from './source-orphans/source-orphans.module'; -import { TargetModule } from './target/target.module'; - -@NgModule({ - declarations: [AppComponent, I18nExamplesTemplateComponent], - imports: [ - BrowserModule, - BrowserAnimationsModule, - HttpClientModule, - MatButtonModule, - MatIconModule, - MatSnackBarModule, - MatToolbarModule, - MatTooltipModule, - OverviewModule, - TargetModule, - SourceOrphansModule, - AppRoutingModule, - ], - providers: [], - bootstrap: [AppComponent], -}) -export class AppModule {} diff --git a/src/app/core/websocket.service.ts b/src/app/core/websocket.service.ts index 136dd6d..41315d2 100644 --- a/src/app/core/websocket.service.ts +++ b/src/app/core/websocket.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; -import { delay, filter, retryWhen, skip, tap } from 'rxjs/operators'; +import { distinctUntilChanged, filter, retry, tap } from 'rxjs/operators'; import { webSocket } from 'rxjs/webSocket'; import { environment } from '../../environments/environment'; @@ -12,19 +12,14 @@ import { ProjectInfo } from './project-info'; }) export class WebsocketService { private readonly _projectSubject = new BehaviorSubject(null); - readonly project = this._projectSubject.pipe(skip(1)); + readonly project = this._projectSubject.pipe( + distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)) + ); readonly projectChange = this.project.pipe(filter((p): p is ProjectInfo => !!p)); constructor() { webSocket(environment.translationSocket) - .pipe( - retryWhen((errors) => - errors.pipe( - tap(() => this._projectSubject.next(null)), - delay(1000) - ) - ) - ) + .pipe(tap({ error: () => this._projectSubject.next(null) }), retry({ delay: 1000 })) .subscribe((r) => this._projectSubject.next(r as ProjectInfo)); } } diff --git a/src/app/i18n-examples-template/i18n-examples-template.component.ts b/src/app/i18n-examples-template/i18n-examples-template.component.ts index ea3b6e4..1cc7820 100644 --- a/src/app/i18n-examples-template/i18n-examples-template.component.ts +++ b/src/app/i18n-examples-template/i18n-examples-template.component.ts @@ -1,8 +1,11 @@ +import { TitleCasePipe } from '@angular/common'; import { Component } from '@angular/core'; @Component({ selector: 't9n-i18n-examples-template', templateUrl: './i18n-examples-template.component.html', + standalone: true, + imports: [TitleCasePipe], }) export class I18nExamplesTemplateComponent { title = 'angular-t9n'; diff --git a/src/app/overview/add-language-modal/add-language-modal.component.spec.ts b/src/app/overview/add-language-modal/add-language-modal.component.spec.ts index cbdb7f6..0a67f69 100644 --- a/src/app/overview/add-language-modal/add-language-modal.component.spec.ts +++ b/src/app/overview/add-language-modal/add-language-modal.component.spec.ts @@ -8,7 +8,7 @@ describe('AddLanguageModalComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [AddLanguageModalComponent], + imports: [AddLanguageModalComponent], }).compileComponents(); })); diff --git a/src/app/overview/add-language-modal/add-language-modal.component.ts b/src/app/overview/add-language-modal/add-language-modal.component.ts index bd63c54..2a8a535 100644 --- a/src/app/overview/add-language-modal/add-language-modal.component.ts +++ b/src/app/overview/add-language-modal/add-language-modal.component.ts @@ -1,6 +1,18 @@ +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; import { Component } from '@angular/core'; -import { AbstractControl, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; -import { MatDialogRef } from '@angular/material/dialog'; +import { + AbstractControl, + UntypedFormBuilder, + UntypedFormGroup, + Validators, + ReactiveFormsModule, +} from '@angular/forms'; +import { MatAutocompleteModule } from '@angular/material/autocomplete'; +import { MatButtonModule } from '@angular/material/button'; +import { MatOptionModule } from '@angular/material/core'; +import { MatDialogRef, MatDialogModule } from '@angular/material/dialog'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; import { Observable } from 'rxjs'; import { map, startWith, switchMap, take } from 'rxjs/operators'; @@ -11,6 +23,19 @@ import { TranslationService } from '../../core/translation.service'; selector: 't9n-add-language-modal', templateUrl: './add-language-modal.component.html', styleUrls: ['./add-language-modal.component.scss'], + standalone: true, + imports: [ + MatDialogModule, + ReactiveFormsModule, + MatFormFieldModule, + MatInputModule, + MatAutocompleteModule, + NgIf, + NgFor, + MatOptionModule, + MatButtonModule, + AsyncPipe, + ], }) export class AddLanguageModalComponent { form: UntypedFormGroup; diff --git a/src/app/overview/overview-routing.module.ts b/src/app/overview/overview-routing.module.ts deleted file mode 100644 index 692a82e..0000000 --- a/src/app/overview/overview-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { OverviewComponent } from './overview/overview.component'; - -const routes: Routes = [ - { - path: '', - component: OverviewComponent, - }, -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class OverviewRoutingModule {} diff --git a/src/app/overview/overview-routing.ts b/src/app/overview/overview-routing.ts new file mode 100644 index 0000000..0f55244 --- /dev/null +++ b/src/app/overview/overview-routing.ts @@ -0,0 +1,8 @@ +import { Routes } from '@angular/router'; + +export const routes: Routes = [ + { + path: '', + loadComponent: () => import('./overview/overview.component').then((m) => m.OverviewComponent), + }, +]; diff --git a/src/app/overview/overview.module.ts b/src/app/overview/overview.module.ts deleted file mode 100644 index 86dbb3d..0000000 --- a/src/app/overview/overview.module.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatAutocompleteModule } from '@angular/material/autocomplete'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatTooltipModule } from '@angular/material/tooltip'; - -import { AddLanguageModalComponent } from './add-language-modal/add-language-modal.component'; -import { OverviewRoutingModule } from './overview-routing.module'; -import { OverviewComponent } from './overview/overview.component'; - -@NgModule({ - declarations: [OverviewComponent, AddLanguageModalComponent], - imports: [ - CommonModule, - ReactiveFormsModule, - MatAutocompleteModule, - MatButtonModule, - MatCardModule, - MatDialogModule, - MatFormFieldModule, - MatInputModule, - MatTooltipModule, - OverviewRoutingModule, - ], -}) -export class OverviewModule {} diff --git a/src/app/overview/overview/overview.component.spec.ts b/src/app/overview/overview/overview.component.spec.ts index c84f020..a4a406f 100644 --- a/src/app/overview/overview/overview.component.spec.ts +++ b/src/app/overview/overview/overview.component.spec.ts @@ -8,7 +8,7 @@ describe('OverviewComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [OverviewComponent], + imports: [OverviewComponent], }).compileComponents(); })); diff --git a/src/app/overview/overview/overview.component.ts b/src/app/overview/overview/overview.component.ts index b6268cc..18e00a4 100644 --- a/src/app/overview/overview/overview.component.ts +++ b/src/app/overview/overview/overview.component.ts @@ -1,5 +1,10 @@ +import { NgFor, NgIf, AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCardModule } from '@angular/material/card'; +import { MatDialog, MatDialogModule } from '@angular/material/dialog'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { RouterLink } from '@angular/router'; import { forkJoin, Observable, of } from 'rxjs'; import { map, switchMap, take } from 'rxjs/operators'; @@ -13,6 +18,17 @@ import { AddLanguageModalComponent } from '../add-language-modal/add-language-mo templateUrl: './overview.component.html', styleUrls: ['./overview.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + AsyncPipe, + MatButtonModule, + MatCardModule, + MatDialogModule, + MatTooltipModule, + RouterLink, + NgFor, + NgIf, + ], }) export class OverviewComponent implements OnInit { project: Observable; diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts deleted file mode 100644 index 4ea8ea5..0000000 --- a/src/app/shared/shared.module.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { TextFieldModule } from '@angular/cdk/text-field'; -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatListModule } from '@angular/material/list'; -import { MatPaginatorModule } from '@angular/material/paginator'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatSelectModule } from '@angular/material/select'; -import { MatSidenavModule } from '@angular/material/sidenav'; -import { MatSortModule } from '@angular/material/sort'; -import { MatTableModule } from '@angular/material/table'; -import { MatTooltipModule } from '@angular/material/tooltip'; - -@NgModule({ - imports: [ - CommonModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatExpansionModule, - MatFormFieldModule, - MatIconModule, - MatInputModule, - MatListModule, - MatPaginatorModule, - MatProgressSpinnerModule, - MatSelectModule, - MatSidenavModule, - MatSortModule, - MatTableModule, - MatTooltipModule, - TextFieldModule, - ], - exports: [ - CommonModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatExpansionModule, - MatFormFieldModule, - MatIconModule, - MatInputModule, - MatListModule, - MatPaginatorModule, - MatProgressSpinnerModule, - MatSelectModule, - MatSidenavModule, - MatSortModule, - MatTableModule, - MatTooltipModule, - TextFieldModule, - ], -}) -export class SharedModule {} diff --git a/src/app/source-orphans/auto-migrate/auto-migrate.component.spec.ts b/src/app/source-orphans/auto-migrate/auto-migrate.component.spec.ts index 94f8f08..137291e 100644 --- a/src/app/source-orphans/auto-migrate/auto-migrate.component.spec.ts +++ b/src/app/source-orphans/auto-migrate/auto-migrate.component.spec.ts @@ -8,7 +8,7 @@ describe('AutoMigrateComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [AutoMigrateComponent], + imports: [AutoMigrateComponent], }).compileComponents(); })); diff --git a/src/app/source-orphans/auto-migrate/auto-migrate.component.ts b/src/app/source-orphans/auto-migrate/auto-migrate.component.ts index 4501f90..8839b62 100644 --- a/src/app/source-orphans/auto-migrate/auto-migrate.component.ts +++ b/src/app/source-orphans/auto-migrate/auto-migrate.component.ts @@ -1,5 +1,18 @@ +import { NgIf, AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; +import { + UntypedFormBuilder, + UntypedFormGroup, + Validators, + ReactiveFormsModule, +} from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatSortModule } from '@angular/material/sort'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; import { BehaviorSubject } from 'rxjs'; import { TranslationSourceUnitResponse } from '../../../models'; @@ -10,6 +23,19 @@ import { SourceOrphansService } from '../core/source-orphans.service'; templateUrl: './auto-migrate.component.html', styleUrls: ['./auto-migrate.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + ReactiveFormsModule, + MatFormFieldModule, + MatInputModule, + NgIf, + MatButtonModule, + MatProgressSpinnerModule, + MatTableModule, + MatSortModule, + MatTooltipModule, + AsyncPipe, + ], }) export class AutoMigrateComponent { configuration: UntypedFormGroup; diff --git a/src/app/source-orphans/migrate/migrate.component.spec.ts b/src/app/source-orphans/migrate/migrate.component.spec.ts index d46ea73..39010a8 100644 --- a/src/app/source-orphans/migrate/migrate.component.spec.ts +++ b/src/app/source-orphans/migrate/migrate.component.spec.ts @@ -8,7 +8,7 @@ describe('MigrateComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [MigrateComponent], + imports: [MigrateComponent], }).compileComponents(); })); diff --git a/src/app/source-orphans/migrate/migrate.component.ts b/src/app/source-orphans/migrate/migrate.component.ts index 4dbd366..8844d30 100644 --- a/src/app/source-orphans/migrate/migrate.component.ts +++ b/src/app/source-orphans/migrate/migrate.component.ts @@ -1,6 +1,15 @@ +import { AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; -import { UntypedFormBuilder } from '@angular/forms'; -import { ActivatedRoute, Router } from '@angular/router'; +import { UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatSortModule } from '@angular/material/sort'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Pagination } from '../../core/pagination'; import { SourceOrphansService } from '../core/source-orphans.service'; @@ -12,6 +21,20 @@ import { MigrateDataSource } from './migrate-datasource'; templateUrl: './migrate.component.html', styleUrls: ['./migrate.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatTableModule, + MatSortModule, + MatTooltipModule, + MatButtonModule, + RouterLink, + MatIconModule, + MatFormFieldModule, + MatInputModule, + ReactiveFormsModule, + MatPaginatorModule, + AsyncPipe, + ], }) export class MigrateComponent extends Pagination implements OnInit { constructor( diff --git a/src/app/source-orphans/source-orphan/source-orphan.component.spec.ts b/src/app/source-orphans/source-orphan/source-orphan.component.spec.ts index abdfc9b..f2b9900 100644 --- a/src/app/source-orphans/source-orphan/source-orphan.component.spec.ts +++ b/src/app/source-orphans/source-orphan/source-orphan.component.spec.ts @@ -8,7 +8,7 @@ describe('SourceOrphanComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [SourceOrphanComponent], + imports: [SourceOrphanComponent], }).compileComponents(); })); diff --git a/src/app/source-orphans/source-orphan/source-orphan.component.ts b/src/app/source-orphans/source-orphan/source-orphan.component.ts index 9b0b53c..16fff53 100644 --- a/src/app/source-orphans/source-orphan/source-orphan.component.ts +++ b/src/app/source-orphans/source-orphan/source-orphan.component.ts @@ -1,6 +1,12 @@ +import { NgIf, AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, OnDestroy } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { ActivatedRoute, Params, Router } from '@angular/router'; +import { MatSortModule } from '@angular/material/sort'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { ActivatedRoute, Params, Router, RouterLink } from '@angular/router'; import { Observable, Subject } from 'rxjs'; import { map, share, switchMap, tap } from 'rxjs/operators'; @@ -13,6 +19,17 @@ import { SourceOrphansService } from '../core/source-orphans.service'; templateUrl: './source-orphan.component.html', styleUrls: ['./source-orphan.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + NgIf, + MatTableModule, + MatSortModule, + MatTooltipModule, + MatButtonModule, + MatIconModule, + RouterLink, + AsyncPipe, + ], }) export class SourceOrphanComponent implements OnDestroy { orphan: Observable; diff --git a/src/app/source-orphans/source-orphans-routing.module.ts b/src/app/source-orphans/source-orphans-routing.module.ts deleted file mode 100644 index d4e6d8a..0000000 --- a/src/app/source-orphans/source-orphans-routing.module.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { AutoMigrateComponent } from './auto-migrate/auto-migrate.component'; -import { MigrateComponent } from './migrate/migrate.component'; -import { SourceOrphanComponent } from './source-orphan/source-orphan.component'; -import { SourceOrphansComponent } from './source-orphans/source-orphans.component'; - -const routes: Routes = [ - { - path: 'orphans', - component: SourceOrphansComponent, - children: [ - { - path: '', - redirectTo: 'migrate', - pathMatch: 'full', - }, - { - path: 'migrate', - component: MigrateComponent, - }, - { - path: 'migrate/:orphanId', - component: SourceOrphanComponent, - }, - { - path: 'auto-migration', - component: AutoMigrateComponent, - }, - ], - }, -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class SourceOrphansRoutingModule {} diff --git a/src/app/source-orphans/source-orphans-routing.ts b/src/app/source-orphans/source-orphans-routing.ts new file mode 100644 index 0000000..d1ea087 --- /dev/null +++ b/src/app/source-orphans/source-orphans-routing.ts @@ -0,0 +1,30 @@ +import { Routes } from '@angular/router'; + +export const routes: Routes = [ + { + path: 'orphans', + loadComponent: () => + import('./source-orphans/source-orphans.component').then((m) => m.SourceOrphansComponent), + children: [ + { + path: '', + redirectTo: 'migrate', + pathMatch: 'full', + }, + { + path: 'migrate', + loadComponent: () => import('./migrate/migrate.component').then((m) => m.MigrateComponent), + }, + { + path: 'migrate/:orphanId', + loadComponent: () => + import('./source-orphan/source-orphan.component').then((m) => m.SourceOrphanComponent), + }, + { + path: 'auto-migration', + loadComponent: () => + import('./auto-migrate/auto-migrate.component').then((m) => m.AutoMigrateComponent), + }, + ], + }, +]; diff --git a/src/app/source-orphans/source-orphans.module.ts b/src/app/source-orphans/source-orphans.module.ts deleted file mode 100644 index 9aa7c9f..0000000 --- a/src/app/source-orphans/source-orphans.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { SharedModule } from '../shared/shared.module'; - -import { AutoMigrateComponent } from './auto-migrate/auto-migrate.component'; -import { MigrateComponent } from './migrate/migrate.component'; -import { SourceOrphanComponent } from './source-orphan/source-orphan.component'; -import { SourceOrphansRoutingModule } from './source-orphans-routing.module'; -import { SourceOrphansComponent } from './source-orphans/source-orphans.component'; - -@NgModule({ - declarations: [ - SourceOrphansComponent, - MigrateComponent, - AutoMigrateComponent, - SourceOrphanComponent, - ], - imports: [SharedModule, SourceOrphansRoutingModule], -}) -export class SourceOrphansModule {} diff --git a/src/app/source-orphans/source-orphans/source-orphans.component.spec.ts b/src/app/source-orphans/source-orphans/source-orphans.component.spec.ts index 6b57aa2..98e7cd7 100644 --- a/src/app/source-orphans/source-orphans/source-orphans.component.spec.ts +++ b/src/app/source-orphans/source-orphans/source-orphans.component.spec.ts @@ -8,7 +8,7 @@ describe('SourceOrphansComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [SourceOrphansComponent], + imports: [SourceOrphansComponent], }).compileComponents(); })); diff --git a/src/app/source-orphans/source-orphans/source-orphans.component.ts b/src/app/source-orphans/source-orphans/source-orphans.component.ts index 8cd2692..521f85c 100644 --- a/src/app/source-orphans/source-orphans/source-orphans.component.ts +++ b/src/app/source-orphans/source-orphans/source-orphans.component.ts @@ -1,9 +1,22 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { MatCardModule } from '@angular/material/card'; +import { MatListModule } from '@angular/material/list'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; @Component({ selector: 't9n-source-orphans', templateUrl: './source-orphans.component.html', styleUrls: ['./source-orphans.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatSidenavModule, + MatListModule, + RouterLink, + RouterLinkActive, + MatCardModule, + RouterOutlet, + ], }) export class SourceOrphansComponent {} diff --git a/src/app/target/export/export.component.spec.ts b/src/app/target/export/export.component.spec.ts index 753c027..a906559 100644 --- a/src/app/target/export/export.component.spec.ts +++ b/src/app/target/export/export.component.spec.ts @@ -8,7 +8,7 @@ describe('ExportComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ExportComponent], + imports: [ExportComponent], }).compileComponents(); })); diff --git a/src/app/target/export/export.component.ts b/src/app/target/export/export.component.ts index da9646c..83df499 100644 --- a/src/app/target/export/export.component.ts +++ b/src/app/target/export/export.component.ts @@ -1,5 +1,11 @@ +import { NgIf, AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; +import { UntypedFormBuilder, UntypedFormGroup, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatOptionModule } from '@angular/material/core'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; import { BehaviorSubject } from 'rxjs'; import { ExportService } from '../core/export.service'; @@ -10,6 +16,17 @@ import { ExportService } from '../core/export.service'; styleUrls: ['./export.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ExportService], + standalone: true, + imports: [ + ReactiveFormsModule, + MatFormFieldModule, + MatSelectModule, + MatOptionModule, + MatButtonModule, + NgIf, + MatProgressSpinnerModule, + AsyncPipe, + ], }) export class ExportComponent { configuration: UntypedFormGroup; diff --git a/src/app/target/import/import.component.spec.ts b/src/app/target/import/import.component.spec.ts index b609e98..ea0abb4 100644 --- a/src/app/target/import/import.component.spec.ts +++ b/src/app/target/import/import.component.spec.ts @@ -8,7 +8,7 @@ describe('ImportComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ImportComponent], + imports: [ImportComponent], }).compileComponents(); })); diff --git a/src/app/target/import/import.component.ts b/src/app/target/import/import.component.ts index c1acdd9..94ce7b4 100644 --- a/src/app/target/import/import.component.ts +++ b/src/app/target/import/import.component.ts @@ -1,5 +1,14 @@ +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, HostBinding, HostListener } from '@angular/core'; -import { UntypedFormControl } from '@angular/forms'; +import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatOptionModule } from '@angular/material/core'; +import { MatExpansionModule } from '@angular/material/expansion'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatListModule } from '@angular/material/list'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; +import { RouterLink } from '@angular/router'; import { BehaviorSubject } from 'rxjs'; import { ImportResult } from '../core/import-result'; @@ -11,6 +20,21 @@ import { ImportService } from '../core/import.service'; styleUrls: ['./import.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ImportService], + standalone: true, + imports: [ + RouterLink, + MatFormFieldModule, + MatSelectModule, + ReactiveFormsModule, + MatOptionModule, + MatButtonModule, + NgIf, + MatProgressSpinnerModule, + MatExpansionModule, + MatListModule, + NgFor, + AsyncPipe, + ], }) export class ImportComponent { @HostBinding('class.dragging') dragging = false; diff --git a/src/app/target/orphan/orphan.component.spec.ts b/src/app/target/orphan/orphan.component.spec.ts index 5220d87..809f46d 100644 --- a/src/app/target/orphan/orphan.component.spec.ts +++ b/src/app/target/orphan/orphan.component.spec.ts @@ -8,7 +8,7 @@ describe('OrphanComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [OrphanComponent], + imports: [OrphanComponent], }).compileComponents(); })); diff --git a/src/app/target/orphan/orphan.component.ts b/src/app/target/orphan/orphan.component.ts index 9294bd4..db9ba3c 100644 --- a/src/app/target/orphan/orphan.component.ts +++ b/src/app/target/orphan/orphan.component.ts @@ -1,6 +1,12 @@ +import { NgIf, AsyncPipe, TitleCasePipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, OnDestroy } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { ActivatedRoute, Params, Router } from '@angular/router'; +import { MatSortModule } from '@angular/material/sort'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { ActivatedRoute, Params, Router, RouterLink } from '@angular/router'; import { Observable, Subject } from 'rxjs'; import { map, share, switchMap, tap } from 'rxjs/operators'; @@ -13,6 +19,18 @@ import { TranslationTargetService } from '../core/translation-target.service'; templateUrl: './orphan.component.html', styleUrls: ['./orphan.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + NgIf, + MatTableModule, + MatSortModule, + MatTooltipModule, + MatButtonModule, + MatIconModule, + RouterLink, + AsyncPipe, + TitleCasePipe, + ], }) export class OrphanComponent implements OnDestroy { orphan: Observable; diff --git a/src/app/target/orphans/orphans.component.spec.ts b/src/app/target/orphans/orphans.component.spec.ts index b03c47b..f7922ed 100644 --- a/src/app/target/orphans/orphans.component.spec.ts +++ b/src/app/target/orphans/orphans.component.spec.ts @@ -12,8 +12,13 @@ describe('OrphansComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [OrphansComponent], - imports: [NoopAnimationsModule, MatPaginatorModule, MatSortModule, MatTableModule], + imports: [ + NoopAnimationsModule, + MatPaginatorModule, + MatSortModule, + MatTableModule, + OrphansComponent, + ], }).compileComponents(); })); diff --git a/src/app/target/orphans/orphans.component.ts b/src/app/target/orphans/orphans.component.ts index 9a40e7e..1fc1f07 100644 --- a/src/app/target/orphans/orphans.component.ts +++ b/src/app/target/orphans/orphans.component.ts @@ -1,5 +1,12 @@ +import { AsyncPipe, TitleCasePipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatSortModule } from '@angular/material/sort'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Pagination } from '../../core/pagination'; import { TranslationTargetService } from '../core/translation-target.service'; @@ -11,6 +18,18 @@ import { OrphansDataSource } from './orphans-datasource'; templateUrl: './orphans.component.html', styleUrls: ['./orphans.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatTableModule, + MatSortModule, + MatTooltipModule, + MatButtonModule, + RouterLink, + MatIconModule, + MatPaginatorModule, + AsyncPipe, + TitleCasePipe, + ], }) export class OrphansComponent extends Pagination implements OnInit { constructor( diff --git a/src/app/target/target-routing.module.ts b/src/app/target/target-routing.module.ts deleted file mode 100644 index 143de7d..0000000 --- a/src/app/target/target-routing.module.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { ExportComponent } from './export/export.component'; -import { ImportComponent } from './import/import.component'; -import { OrphanComponent } from './orphan/orphan.component'; -import { OrphansComponent } from './orphans/orphans.component'; -import { TargetComponent } from './target/target.component'; -import { TranslateComponent } from './translate/translate.component'; -import { UnitComponent } from './unit/unit.component'; - -const routes: Routes = [ - { - path: 'target/:language', - component: TargetComponent, - children: [ - { - path: '', - component: TranslateComponent, - }, - { - path: 'unit/:unitId', - component: UnitComponent, - }, - { - path: 'import', - component: ImportComponent, - }, - { - path: 'export', - component: ExportComponent, - }, - { - path: 'orphans', - component: OrphansComponent, - }, - { - path: 'orphans/:orphanId', - component: OrphanComponent, - }, - ], - }, -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class TargetRoutingModule {} diff --git a/src/app/target/target-routing.ts b/src/app/target/target-routing.ts new file mode 100644 index 0000000..160abf4 --- /dev/null +++ b/src/app/target/target-routing.ts @@ -0,0 +1,35 @@ +import { Routes } from '@angular/router'; + +export const routes: Routes = [ + { + path: 'target/:language', + loadComponent: () => import('./target/target.component').then((m) => m.TargetComponent), + children: [ + { + path: '', + loadComponent: () => + import('./translate/translate.component').then((m) => m.TranslateComponent), + }, + { + path: 'unit/:unitId', + loadComponent: () => import('./unit/unit.component').then((m) => m.UnitComponent), + }, + { + path: 'import', + loadComponent: () => import('./import/import.component').then((m) => m.ImportComponent), + }, + { + path: 'export', + loadComponent: () => import('./export/export.component').then((m) => m.ExportComponent), + }, + { + path: 'orphans', + loadComponent: () => import('./orphans/orphans.component').then((m) => m.OrphansComponent), + }, + { + path: 'orphans/:orphanId', + loadComponent: () => import('./orphan/orphan.component').then((m) => m.OrphanComponent), + }, + ], + }, +]; diff --git a/src/app/target/target.module.ts b/src/app/target/target.module.ts deleted file mode 100644 index 8341d5c..0000000 --- a/src/app/target/target.module.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { SharedModule } from '../shared/shared.module'; - -import { ExportComponent } from './export/export.component'; -import { ImportComponent } from './import/import.component'; -import { OrphanComponent } from './orphan/orphan.component'; -import { OrphansComponent } from './orphans/orphans.component'; -import { TargetRoutingModule } from './target-routing.module'; -import { TargetComponent } from './target/target.component'; -import { TranslateComponent } from './translate/translate.component'; -import { UnitComponent } from './unit/unit.component'; - -@NgModule({ - declarations: [ - TranslateComponent, - ExportComponent, - ImportComponent, - TargetComponent, - OrphansComponent, - UnitComponent, - OrphanComponent, - ], - imports: [SharedModule, TargetRoutingModule], -}) -export class TargetModule {} diff --git a/src/app/target/target/target.component.spec.ts b/src/app/target/target/target.component.spec.ts index 1bacfba..9da4bf0 100644 --- a/src/app/target/target/target.component.spec.ts +++ b/src/app/target/target/target.component.spec.ts @@ -8,7 +8,7 @@ describe('TargetComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [TargetComponent], + imports: [TargetComponent], }).compileComponents(); })); diff --git a/src/app/target/target/target.component.ts b/src/app/target/target/target.component.ts index 88decc3..906b633 100644 --- a/src/app/target/target/target.component.ts +++ b/src/app/target/target/target.component.ts @@ -1,5 +1,9 @@ +import { NgIf, AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; +import { MatCardModule } from '@angular/material/card'; +import { MatListModule } from '@angular/material/list'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { ActivatedRoute, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; import { Observable } from 'rxjs'; import { filter, switchMap } from 'rxjs/operators'; @@ -13,6 +17,17 @@ import { TranslationTargetService } from '../core/translation-target.service'; styleUrls: ['./target.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [TranslationTargetService], + standalone: true, + imports: [ + MatSidenavModule, + MatListModule, + RouterLink, + RouterLinkActive, + NgIf, + MatCardModule, + RouterOutlet, + AsyncPipe, + ], }) export class TargetComponent { target: Observable; diff --git a/src/app/target/translate/translate.component.spec.ts b/src/app/target/translate/translate.component.spec.ts index bfda3db..d423001 100644 --- a/src/app/target/translate/translate.component.spec.ts +++ b/src/app/target/translate/translate.component.spec.ts @@ -12,8 +12,13 @@ describe('TranslateComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [TranslateComponent], - imports: [NoopAnimationsModule, MatPaginatorModule, MatSortModule, MatTableModule], + imports: [ + NoopAnimationsModule, + MatPaginatorModule, + MatSortModule, + MatTableModule, + TranslateComponent, + ], }).compileComponents(); })); diff --git a/src/app/target/translate/translate.component.ts b/src/app/target/translate/translate.component.ts index 54a25ec..1644363 100644 --- a/src/app/target/translate/translate.component.ts +++ b/src/app/target/translate/translate.component.ts @@ -1,6 +1,18 @@ +import { TextFieldModule } from '@angular/cdk/text-field'; +import { NgIf, AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; -import { UntypedFormBuilder } from '@angular/forms'; -import { ActivatedRoute, Router } from '@angular/router'; +import { UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatOptionModule } from '@angular/material/core'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatSelectModule } from '@angular/material/select'; +import { MatSortModule } from '@angular/material/sort'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { Pagination } from '../../core/pagination'; import { TranslationTargetService } from '../core/translation-target.service'; @@ -12,6 +24,24 @@ import { TranslateDataSource } from './translate-datasource'; templateUrl: './translate.component.html', styleUrls: ['./translate.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatTableModule, + MatSortModule, + MatTooltipModule, + MatFormFieldModule, + MatInputModule, + TextFieldModule, + ReactiveFormsModule, + MatSelectModule, + NgIf, + MatOptionModule, + MatButtonModule, + RouterLink, + MatIconModule, + MatPaginatorModule, + AsyncPipe, + ], }) export class TranslateComponent extends Pagination implements OnInit { constructor( diff --git a/src/app/target/unit/unit.component.spec.ts b/src/app/target/unit/unit.component.spec.ts index f5d7f28..85fa8ed 100644 --- a/src/app/target/unit/unit.component.spec.ts +++ b/src/app/target/unit/unit.component.spec.ts @@ -8,7 +8,7 @@ describe('UnitComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [UnitComponent], + imports: [UnitComponent], }).compileComponents(); })); diff --git a/src/app/target/unit/unit.component.ts b/src/app/target/unit/unit.component.ts index a27aaab..ced0f7c 100644 --- a/src/app/target/unit/unit.component.ts +++ b/src/app/target/unit/unit.component.ts @@ -1,6 +1,20 @@ +import { TextFieldModule } from '@angular/cdk/text-field'; +import { NgIf, AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, OnDestroy } from '@angular/core'; -import { AbstractControl, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; -import { ActivatedRoute, Params } from '@angular/router'; +import { + AbstractControl, + UntypedFormBuilder, + UntypedFormGroup, + ReactiveFormsModule, +} from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatOptionModule } from '@angular/material/core'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatSelectModule } from '@angular/material/select'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { ActivatedRoute, Params, RouterLink } from '@angular/router'; import { Observable, Subject } from 'rxjs'; import { map, share, switchMap } from 'rxjs/operators'; @@ -12,6 +26,21 @@ import { TranslationTargetService } from '../core/translation-target.service'; templateUrl: './unit.component.html', styleUrls: ['./unit.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + NgIf, + ReactiveFormsModule, + MatFormFieldModule, + MatInputModule, + TextFieldModule, + MatButtonModule, + MatTooltipModule, + MatIconModule, + MatSelectModule, + MatOptionModule, + RouterLink, + AsyncPipe, + ], }) export class UnitComponent implements OnDestroy { unit: Observable; diff --git a/src/main.ts b/src/main.ts index d9a2e7e..f73d370 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,13 +1,19 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { withInterceptorsFromDi, provideHttpClient } from '@angular/common/http'; +import { bootstrapApplication } from '@angular/platform-browser'; +import { provideAnimations } from '@angular/platform-browser/animations'; +import { provideRouter, Routes } from '@angular/router'; -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; +import { AppComponent } from './app/app.component'; +import { routes as overviewRoutes } from './app/overview/overview-routing'; +import { routes as sourceOrphanRoutes } from './app/source-orphans/source-orphans-routing'; +import { routes as targetRoutes } from './app/target/target-routing'; -if (environment.production) { - enableProdMode(); -} +const routes: Routes = [...overviewRoutes, ...sourceOrphanRoutes, ...targetRoutes]; -platformBrowserDynamic() - .bootstrapModule(AppModule) - .catch((err) => console.error(err)); +bootstrapApplication(AppComponent, { + providers: [ + provideAnimations(), + provideHttpClient(withInterceptorsFromDi()), + provideRouter(routes), + ], +}).catch((err) => console.error(err)); diff --git a/tsconfig.json b/tsconfig.json index 9015ebb..d7c9fd0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,13 +14,8 @@ "allowSyntheticDefaultImports": true, "strict": true, "target": "ES2022", - "typeRoots": [ - "node_modules/@types" - ], - "lib": [ - "es2018", - "dom" - ], + "typeRoots": ["node_modules/@types"], + "lib": ["es2018", "dom"], "useDefineForClassFields": false }, "exclude": ["builders", "schematics"] diff --git a/yarn.lock b/yarn.lock index dd0113b..eb5b7ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3082,6 +3082,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/mime@*": version "3.0.1" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10" @@ -3717,11 +3722,42 @@ array-ify@^1.0.0: resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng== +array-includes@^3.1.6: + version "3.1.6" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" + integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + get-intrinsic "^1.1.3" + is-string "^1.0.7" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +array.prototype.flat@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" + integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" + integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-shim-unscopables "^1.0.0" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -4834,7 +4870,7 @@ debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, d dependencies: ms "2.1.2" -debug@^3.2.6: +debug@^3.2.6, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -4994,6 +5030,13 @@ dns-packet@^5.2.2: dependencies: "@leichtgewicht/ip-codec" "^2.0.1" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -5202,6 +5245,46 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.19.0, es-abstract@^1.20.4: + version "1.21.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" + integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== + dependencies: + array-buffer-byte-length "^1.0.0" + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.2.0" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-typed-array "^1.1.10" + is-weakref "^1.0.2" + object-inspect "^1.12.3" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.4.3" + safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.7" + string.prototype.trimend "^1.0.6" + string.prototype.trimstart "^1.0.6" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.9" + es-get-iterator@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" @@ -5222,6 +5305,31 @@ es-module-lexer@^1.2.1: resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.2.1.tgz#ba303831f63e6a394983fde2f97ad77b22324527" integrity sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg== +es-set-tostringtag@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" + integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + dependencies: + get-intrinsic "^1.1.3" + has "^1.0.3" + has-tostringtag "^1.0.0" + +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + esbuild-wasm@0.17.18: version "0.17.18" resolved "https://registry.yarnpkg.com/esbuild-wasm/-/esbuild-wasm-0.17.18.tgz#4d922c509eccfc33f7969c880a520e5e665681ef" @@ -5280,6 +5388,43 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +eslint-import-resolver-node@^0.3.7: + version "0.3.7" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" + integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== + dependencies: + debug "^3.2.7" + is-core-module "^2.11.0" + resolve "^1.22.1" + +eslint-module-utils@^2.7.4: + version "2.8.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" + integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== + dependencies: + debug "^3.2.7" + +eslint-plugin-import@^2.27.5: + version "2.27.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" + integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== + dependencies: + array-includes "^3.1.6" + array.prototype.flat "^1.3.1" + array.prototype.flatmap "^1.3.1" + debug "^3.2.7" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.7" + eslint-module-utils "^2.7.4" + has "^1.0.3" + is-core-module "^2.11.0" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.6" + resolve "^1.22.1" + semver "^6.3.0" + tsconfig-paths "^3.14.1" + eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -5792,7 +5937,17 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -functions-have-names@^1.2.3: +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + +functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -5850,6 +6005,14 @@ get-stream@^6.0.0, get-stream@^6.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + git-raw-commits@^2.0.8: version "2.0.11" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.11.tgz#bc3576638071d18655e1cc60d7f524920008d723" @@ -5961,6 +6124,13 @@ globals@^13.19.0: dependencies: type-fest "^0.20.2" +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -6023,7 +6193,7 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== -has-bigints@^1.0.1: +has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== @@ -6045,6 +6215,11 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -6348,7 +6523,7 @@ inquirer@8.2.4: through "^2.3.6" wrap-ansi "^7.0.0" -internal-slot@^1.0.4: +internal-slot@^1.0.4, internal-slot@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== @@ -6416,7 +6591,7 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-callable@^1.1.3: +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== @@ -6428,7 +6603,7 @@ is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.8.1: dependencies: has "^1.0.3" -is-date-object@^1.0.5: +is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== @@ -6482,6 +6657,11 @@ is-map@^2.0.1, is-map@^2.0.2: resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + is-number-object@^1.0.4: version "1.0.7" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" @@ -6558,7 +6738,7 @@ is-string@^1.0.5, is-string@^1.0.7: dependencies: has-tostringtag "^1.0.0" -is-symbol@^1.0.3: +is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== @@ -6572,7 +6752,7 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" -is-typed-array@^1.1.10: +is-typed-array@^1.1.10, is-typed-array@^1.1.9: version "1.1.10" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== @@ -6593,6 +6773,13 @@ is-weakmap@^2.0.1: resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + is-weakset@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" @@ -7159,6 +7346,13 @@ json-stringify-safe@^5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== +json5@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + json5@^2.1.2, json5@^2.2.1, json5@^2.2.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -8225,6 +8419,15 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" +object.values@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" + integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" @@ -8939,7 +9142,7 @@ regex-parser@^2.2.11: resolved "https://registry.yarnpkg.com/regex-parser/-/regex-parser-2.2.11.tgz#3b37ec9049e19479806e878cabe7c1ca83ccfe58" integrity sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q== -regexp.prototype.flags@^1.5.0: +regexp.prototype.flags@^1.4.3, regexp.prototype.flags@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== @@ -9015,7 +9218,7 @@ resolve.exports@^2.0.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@1.22.2, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0: +resolve@1.22.2, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.1: version "1.22.2" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== @@ -9125,6 +9328,15 @@ safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" + "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -9652,6 +9864,33 @@ string-width@^5.0.0, string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string.prototype.trim@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" + integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +string.prototype.trimend@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" + integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +string.prototype.trimstart@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" + integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -9941,6 +10180,16 @@ ts-node@^10.4.0: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +tsconfig-paths@^3.14.1: + version "3.14.2" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" + integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + tsconfig-paths@^4.1.2, tsconfig-paths@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" @@ -10020,6 +10269,15 @@ type-is@^1.6.4, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + typed-assert@^1.0.8: version "1.0.9" resolved "https://registry.yarnpkg.com/typed-assert/-/typed-assert-1.0.9.tgz#8af9d4f93432c4970ec717e3006f33f135b06213" @@ -10057,6 +10315,16 @@ uid@2.0.2: dependencies: "@lukeed/csprng" "^1.0.0" +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc"