From 8095d6a94104de5ccbc9ff1918a2542f56f699eb Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Wed, 6 Oct 2021 09:54:07 +0300 Subject: [PATCH] update eslint --- .eslintrc.json | 52 +++++--- apps/red-ui/src/app/app-routing.module.ts | 30 ++--- apps/red-ui/src/app/app.component.ts | 6 +- apps/red-ui/src/app/app.module.ts | 40 +++--- .../auth-error/auth-error.component.ts | 2 +- .../base-screen/base-screen.component.ts | 22 ++-- .../downloads-list-screen.component.ts | 6 +- .../notifications/notifications.component.ts | 6 +- .../spotlight-search.component.ts | 4 +- .../app/components/toast/toast.component.ts | 2 +- .../user-profile-screen.component.ts | 12 +- apps/red-ui/src/app/i18n/language.service.ts | 2 +- .../src/app/models/file/annotation.wrapper.ts | 2 +- .../src/app/models/file/file-data.model.ts | 4 +- apps/red-ui/src/app/models/file/file.ts | 2 +- .../file/manual-redaction-entry.wrapper.ts | 2 +- .../app/modules/admin/admin-routing.module.ts | 78 ++++++------ .../admin-side-nav.component.ts | 20 +-- .../src/app/modules/admin/admin.module.ts | 8 +- .../admin-breadcrumbs.component.ts | 4 +- .../combo-chart/combo-chart.component.ts | 16 +-- .../combo-series-vertical.component.ts | 22 ++-- .../dossier-template-actions.component.ts | 4 +- .../users-stats/users-stats.component.ts | 2 +- .../add-edit-dictionary-dialog.component.ts | 14 +- ...edit-dossier-attribute-dialog.component.ts | 14 +- ...-edit-dossier-template-dialog.component.ts | 16 +-- ...dd-edit-file-attribute-dialog.component.ts | 10 +- .../add-edit-user-dialog.component.ts | 2 +- .../reset-password.component.ts | 10 +- .../user-details/user-details.component.ts | 24 ++-- ...-delete-file-attribute-dialog.component.ts | 6 +- .../confirm-delete-users-dialog.component.ts | 6 +- .../edit-color-dialog.component.ts | 8 +- .../active-fields-listing.component.ts | 12 +- ...-attributes-csv-import-dialog.component.ts | 26 ++-- .../smtp-auth-dialog.component.ts | 6 +- .../screens/audit/audit-screen.component.ts | 10 +- .../default-colors-screen.component.ts | 14 +- .../dictionary-listing-screen.component.ts | 22 ++-- .../dictionary-overview-screen.component.ts | 16 +-- .../digital-signature-screen.component.ts | 14 +- ...ier-attributes-listing-screen.component.ts | 14 +- ...sier-templates-listing-screen.component.ts | 14 +- ...ile-attributes-listing-screen.component.ts | 20 +-- .../general-config-screen.component.ts | 10 +- .../license-information-screen.component.ts | 42 +++--- .../reports/reports-screen.component.ts | 18 +-- .../screens/rules/rules-screen.component.ts | 20 +-- .../screens/trash/trash-screen.component.ts | 20 +-- .../user-listing-screen.component.ts | 24 ++-- .../watermark/watermark-screen.component.ts | 42 +++--- .../admin/services/admin-dialog.service.ts | 24 ++-- .../admin-side-nav-translations.ts | 2 +- .../audit-categories-translations.ts | 2 +- .../default-colors-translations.ts | 2 +- .../dossier-attribute-types-translations.ts | 2 +- .../file-attribute-types-translations.ts | 2 +- .../placeholders-descriptions-translations.ts | 4 +- .../red-ui/src/app/modules/auth/auth.guard.ts | 6 +- .../src/app/modules/auth/auth.module.ts | 38 +++--- .../src/app/modules/auth/red-role.guard.ts | 4 +- .../annotation-actions.component.ts | 8 +- .../components/comments/comments.component.ts | 6 +- .../document-info/document-info.component.ts | 4 +- .../annotation-source.component.ts | 16 +-- .../annotations-list.component.ts | 4 +- .../file-workload/file-workload.component.ts | 12 +- .../page-exclusion.component.ts | 15 ++- .../page-indicator.component.ts | 6 +- .../pdf-viewer/pdf-viewer.component.ts | 72 +++++------ .../team-members-manager.component.ts | 10 +- .../type-annotation-icon.component.ts | 2 +- .../add-dossier-dialog.component.ts | 24 ++-- ...sign-reviewer-approver-dialog.component.ts | 10 +- .../change-legal-basis-dialog.component.ts | 12 +- .../document-info-dialog.component.ts | 10 +- .../edit-dossier-attributes.component.ts | 10 +- ...dit-dossier-deleted-documents.component.ts | 22 ++-- .../edit-dossier-dictionary.component.ts | 6 +- ...edit-dossier-download-package.component.ts | 16 +-- .../edit-dossier-dialog.component.ts | 22 ++-- .../edit-dossier-general-info.component.ts | 20 +-- .../edit-dossier-team-members.component.ts | 2 +- .../force-redaction-dialog.component.ts | 10 +- .../manual-annotation-dialog.component.ts | 14 +- .../recategorize-image-dialog.component.ts | 10 +- .../remove-annotations-dialog.component.ts | 8 +- .../dossier/dossiers-routing.module.ts | 20 +-- .../app/modules/dossier/dossiers.module.ts | 8 +- ...dossier-overview-bulk-actions.component.ts | 18 +-- .../dossier-details-stats.component.ts | 6 +- .../dossier-details.component.ts | 6 +- .../table-item/table-item.component.ts | 2 +- .../dossier-overview/config.service.ts | 90 ++++++------- .../dossier-overview.module.ts | 8 +- .../dossier-overview-screen.component.ts | 18 +-- .../dossiers-listing-actions.component.ts | 6 +- .../dossiers-listing-details.component.ts | 2 +- ...dossiers-listing-dossier-name.component.ts | 2 +- .../table-item/table-item.component.ts | 2 +- .../dossiers-listing/config.service.ts | 52 ++++---- .../dossiers-listing.module.ts | 8 +- .../dossiers-listing-screen.component.ts | 17 ++- .../file-preview-screen.component.ts | 56 ++++---- .../search-screen/search-screen.component.ts | 22 ++-- .../services/annotation-actions.service.ts | 50 ++++---- .../services/annotation-draw.service.ts | 8 +- .../services/annotation-processing.service.ts | 14 +- .../services/dossier-templates.service.ts | 6 +- .../services/dossiers-dialog.service.ts | 24 ++-- .../dossier/services/dossiers.service.ts | 8 +- .../services/file-attributes.service.ts | 8 +- .../modules/dossier/services/files.service.ts | 2 +- .../app/modules/dossier/services/injector.ts | 4 +- .../services/manual-annotation.service.ts | 22 ++-- .../services/pdf-viewer-data.service.ts | 10 +- .../file-actions/file-actions.component.ts | 16 +-- .../needs-work-badge.component.ts | 4 +- .../shared/services/file-action.service.ts | 18 +-- .../dossier/shared/shared-dossiers.module.ts | 2 +- .../annotation-actions-translations.ts | 46 +++---- .../translations/file-status-translations.ts | 2 +- .../image-categories-translations.ts | 2 +- .../translations/workload-translations.ts | 2 +- .../dossier/utils/compare-mode.utils.ts | 8 +- .../modules/dossier/utils/pdf-viewer.utils.ts | 24 ++-- .../src/app/modules/icons/icons.module.ts | 6 +- .../modules/mat-config/mat-config.module.ts | 4 +- .../annotation-icon.component.ts | 2 +- .../assign-user-dropdown.component.ts | 2 +- .../file-download-btn.component.ts | 4 +- .../user-button/user-button.component.ts | 2 +- .../dictionary-annotation-icon.component.ts | 2 +- .../dictionary-manager.component.ts | 6 +- .../components/editor/editor.component.ts | 12 +- .../initials-avatar.component.ts | 4 +- .../pagination/pagination.component.ts | 2 +- .../components/select/select.component.ts | 6 +- .../simple-doughnut-chart.component.ts | 2 +- .../team-members/team-members.component.ts | 2 +- .../type-filter/type-filter.component.ts | 6 +- .../shared/directives/long-press.directive.ts | 7 +- ...navigate-last-dossiers-screen.directive.ts | 2 +- .../src/app/modules/shared/pipes/date.pipe.ts | 8 +- .../src/app/modules/shared/pipes/name.pipe.ts | 2 +- .../dossier-attributes.service.ts | 8 +- .../shared/services/dictionary.service.ts | 16 +-- .../src/app/modules/shared/shared.module.ts | 12 +- .../overwrite-files-dialog.component.ts | 4 +- .../file-drop/file-drop.component.ts | 4 +- .../file-upload-download.module.ts | 2 +- .../services/file-download.service.ts | 15 +-- .../services/file-drop-overlay.service.ts | 4 +- .../services/file-upload.service.ts | 17 ++- .../services/status-overlay.service.ts | 2 +- .../upload-download-dialog.service.ts | 4 +- .../upload-status-overlay.component.ts | 4 +- .../red-ui/src/app/services/config.service.ts | 6 +- .../src/app/services/permissions.service.ts | 4 +- .../app/services/router-history.service.ts | 2 +- .../app/services/translate-chart.service.ts | 4 +- .../app/services/user-preference.service.ts | 2 +- apps/red-ui/src/app/services/user.service.ts | 18 +-- apps/red-ui/src/app/state/app-state.guard.ts | 4 +- .../red-ui/src/app/state/app-state.service.ts | 112 ++++++++-------- .../annotation-types-translations.ts | 2 +- .../download-types-translations.ts | 2 +- .../translations/languages-translations.ts | 2 +- .../notifications-translations.ts | 2 +- .../app/translations/roles-translations.ts | 2 +- .../src/app/utils/api-path-interceptor.ts | 4 +- .../app/utils/configuration.initializer.ts | 4 +- .../red-ui/src/app/utils/date-inputs-utils.ts | 2 +- apps/red-ui/src/app/utils/file-drop-utils.ts | 82 ++++++------ apps/red-ui/src/app/utils/functions.ts | 12 +- apps/red-ui/src/app/utils/page-stamper.ts | 50 ++++---- apps/red-ui/src/app/utils/pdf-coordinates.ts | 6 +- .../app/utils/pruning-translation-loader.ts | 2 +- .../utils/sorters/redaction-filter-sorter.ts | 2 +- .../src/app/utils/sorters/status-sorter.ts | 20 ++- .../app/utils/sorters/super-type-sorter.ts | 2 +- .../src/environments/environment.prod.ts | 2 +- apps/red-ui/src/environments/environment.ts | 2 +- libs/common-ui | 2 +- libs/red-ui-http/src/lib/api.module.ts | 8 +- .../src/lib/api/auditController.service.ts | 6 +- .../lib/api/dictionaryController.service.ts | 114 ++++++++--------- .../api/digitalSignatureController.service.ts | 12 +- .../dossierAttributesController.service.ts | 74 +++++------ .../src/lib/api/dossierController.service.ts | 16 +-- .../api/dossierTemplateController.service.ts | 28 ++-- .../src/lib/api/downloadController.service.ts | 10 +- .../api/fileAttributesController.service.ts | 56 ++++---- .../api/fileManagementController.service.ts | 26 ++-- .../api/generalSettingsController.service.ts | 8 +- .../src/lib/api/infoController.service.ts | 4 +- .../legalBasisMappingController.service.ts | 10 +- .../api/licenseReportController.service.ts | 6 +- .../api/manualRedactionController.service.ts | 120 +++++++++--------- .../lib/api/notificationController.service.ts | 14 +- .../lib/api/reanalysisController.service.ts | 44 +++---- .../lib/api/redactionLogController.service.ts | 12 +- .../api/reportTemplateController.service.ts | 28 ++-- .../src/lib/api/rulesController.service.ts | 12 +- .../src/lib/api/searchController.service.ts | 4 +- .../smtpConfigurationController.service.ts | 10 +- .../src/lib/api/statusController.service.ts | 88 ++++++------- .../lib/api/statusReportController.service.ts | 4 +- .../src/lib/api/uploadController.service.ts | 4 +- .../src/lib/api/userController.service.ts | 48 +++---- .../api/userPreferenceController.service.ts | 8 +- .../src/lib/api/versionsController.service.ts | 10 +- .../lib/api/viewedPagesController.service.ts | 20 +-- .../lib/api/watermarkController.service.ts | 14 +- libs/red-ui-http/src/lib/model/change.ts | 2 +- libs/red-ui-http/src/lib/model/dictionary.ts | 2 +- libs/red-ui-http/src/lib/model/dossier.ts | 4 +- .../src/lib/model/dossierAttributeConfig.ts | 2 +- .../src/lib/model/dossierRequest.ts | 4 +- .../src/lib/model/downloadStatus.ts | 4 +- libs/red-ui-http/src/lib/model/file.ts | 4 +- .../src/lib/model/fileAttributeConfig.ts | 2 +- libs/red-ui-http/src/lib/model/idRemoval.ts | 2 +- .../src/lib/model/manualForceRedaction.ts | 2 +- .../lib/model/manualImageRecategorization.ts | 2 +- .../src/lib/model/manualLegalBasisChange.ts | 2 +- .../src/lib/model/manualRedactionEntry.ts | 2 +- .../src/lib/model/redactionLogEntry.ts | 6 +- libs/red-ui-http/src/lib/model/reportData.ts | 2 +- .../red-ui-http/src/lib/model/typeResponse.ts | 2 +- .../src/lib/model/watermarkModel.ts | 2 +- libs/red-ui-http/src/lib/variables.ts | 2 +- package.json | 1 + yarn.lock | 118 ++++++++++++++++- 235 files changed, 1746 insertions(+), 1628 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 04393f649..925cd52ff 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -42,23 +42,17 @@ }, { "files": ["*.ts"], + "extends": [ + "plugin:@nrwl/nx/angular", + "airbnb-typescript/base", + "plugin:@angular-eslint/template/process-inline-templates", + "plugin:@angular-eslint/recommended", + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + "plugin:@angular-eslint/recommended--extra" + ], "rules": { - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ], - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], "@angular-eslint/no-conflicting-lifecycle": "error", "@angular-eslint/no-host-metadata-property": "error", "@angular-eslint/no-input-rename": "error", @@ -71,7 +65,14 @@ "@angular-eslint/use-pipe-transform-interface": "error", "@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/dot-notation": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-return": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-misused-promises": "off", "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/indent": "off", + "@typescript-eslint/lines-between-class-members": "off", "@typescript-eslint/ban-types": "off", "@typescript-eslint/explicit-member-accessibility": [ "error", @@ -129,6 +130,10 @@ "@typescript-eslint/no-unused-expressions": "error", "@typescript-eslint/prefer-function-type": "error", "@typescript-eslint/unified-signatures": "error", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-floating-promises": "off", + "@typescript-eslint/unbound-method": "off", + "@typescript-eslint/restrict-template-expressions": "off", "arrow-body-style": "error", "arrow-parens": ["error", "as-needed"], "constructor-super": "error", @@ -137,6 +142,7 @@ "id-blacklist": "off", "id-match": "off", "import/no-deprecated": "warn", + "import/no-extraneous-dependencies": "off", "no-bitwise": "error", "no-caller": "error", "no-console": [ @@ -178,7 +184,16 @@ "prefer-const": "error", "radix": "error", "curly": "error", - "comma-dangle": "error", + "comma-dangle": [ + "error", + { + "arrays": "always-multiline", + "objects": "always-multiline", + "imports": "always-multiline", + "exports": "always-multiline", + "functions": "always-multiline" + } + ], "max-len": [ "error", { @@ -192,12 +207,13 @@ }, { "files": ["*.html"], + "extends": ["plugin:@nrwl/nx/angular-template", "plugin:@angular-eslint/template/recommended"], "rules": { "@angular-eslint/template/banana-in-box": "error", "@angular-eslint/template/no-negated-async": "error", "@angular-eslint/template/eqeqeq": "error" }, - "plugins": ["@angular-eslint/eslint-plugin-template"] + "plugins": ["@angular-eslint/eslint-plugin-template", "prettier"] } ] } diff --git a/apps/red-ui/src/app/app-routing.module.ts b/apps/red-ui/src/app/app-routing.module.ts index f66bf7d55..92d9eae7a 100644 --- a/apps/red-ui/src/app/app-routing.module.ts +++ b/apps/red-ui/src/app/app-routing.module.ts @@ -13,12 +13,12 @@ const routes = [ { path: '', redirectTo: 'main/dossiers', - pathMatch: 'full' + pathMatch: 'full', }, { path: 'auth-error', component: AuthErrorComponent, - canActivate: [AuthGuard] + canActivate: [AuthGuard], }, { path: 'main/my-profile', @@ -26,23 +26,23 @@ const routes = [ children: [ { path: '', - component: UserProfileScreenComponent - } + component: UserProfileScreenComponent, + }, ], canActivate: [CompositeRouteGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, }, { path: 'main/admin', component: BaseScreenComponent, - loadChildren: () => import('./modules/admin/admin.module').then(m => m.AdminModule) + loadChildren: () => import('./modules/admin/admin.module').then(m => m.AdminModule), }, { path: 'main/dossiers', component: BaseScreenComponent, - loadChildren: () => import('./modules/dossier/dossiers.module').then(m => m.DossiersModule) + loadChildren: () => import('./modules/dossier/dossiers.module').then(m => m.DossiersModule), }, { path: 'main/downloads', @@ -50,24 +50,24 @@ const routes = [ children: [ { path: '', - component: DownloadsListScreenComponent - } + component: DownloadsListScreenComponent, + }, ], canActivate: [CompositeRouteGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, }, { path: '**', redirectTo: 'main/dossiers', - pathMatch: 'full' - } + pathMatch: 'full', + }, ]; @NgModule({ imports: [RouterModule.forRoot(routes, { scrollPositionRestoration: 'enabled' })], providers: [{ provide: RouteReuseStrategy, useClass: CustomRouteReuseStrategy }], - exports: [RouterModule] + exports: [RouterModule], }) export class AppRoutingModule {} diff --git a/apps/red-ui/src/app/app.component.ts b/apps/red-ui/src/app/app.component.ts index 58cafd198..1bec5a390 100644 --- a/apps/red-ui/src/app/app.component.ts +++ b/apps/red-ui/src/app/app.component.ts @@ -3,8 +3,6 @@ import { Component } from '@angular/core'; @Component({ selector: 'redaction-root', templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'] + styleUrls: ['./app.component.scss'], }) -export class AppComponent { - constructor() {} -} +export class AppComponent {} diff --git a/apps/red-ui/src/app/app.module.ts b/apps/red-ui/src/app/app.module.ts index 853650195..0da640424 100644 --- a/apps/red-ui/src/app/app.module.ts +++ b/apps/red-ui/src/app/app.module.ts @@ -72,78 +72,78 @@ const components = [AppComponent, AuthErrorComponent, ToastComponent, Notificati ToastrModule.forRoot({ closeButton: true, enableHtml: true, - toastComponent: ToastComponent + toastComponent: ToastComponent, }), TranslateModule.forRoot({ loader: { provide: TranslateLoader, useFactory: httpLoaderFactory, - deps: [HttpClient] + deps: [HttpClient], }, compiler: { provide: TranslateCompiler, - useClass: TranslateMessageFormatCompiler - } + useClass: TranslateMessageFormatCompiler, + }, }), - ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }) + ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }), ], providers: [ { provide: HTTP_INTERCEPTORS, multi: true, - useClass: ServerErrorInterceptor + useClass: ServerErrorInterceptor, }, { provide: ErrorHandler, - useClass: GlobalErrorHandler + useClass: GlobalErrorHandler, }, { provide: BASE_HREF, useFactory: (s: PlatformLocation) => cleanupBaseUrl(s.getBaseHrefFromDOM()), - deps: [PlatformLocation] + deps: [PlatformLocation], }, { provide: HTTP_INTERCEPTORS, multi: true, - useClass: ApiPathInterceptor + useClass: ApiPathInterceptor, }, { provide: HTTP_INTERCEPTORS, multi: true, - useClass: HttpCacheInterceptor + useClass: HttpCacheInterceptor, }, { provide: APP_INITIALIZER, multi: true, useFactory: languageInitializer, - deps: [LanguageService] + deps: [LanguageService], }, { provide: APP_INITIALIZER, multi: true, useFactory: configurationInitializer, - deps: [KeycloakService, Title, ConfigService, GeneralSettingsControllerService] + deps: [KeycloakService, Title, ConfigService, GeneralSettingsControllerService], }, { provide: MONACO_PATH, - useValue: 'https://unpkg.com/monaco-editor@0.24.0/min/vs' + useValue: 'https://unpkg.com/monaco-editor@0.24.0/min/vs', }, { provide: MissingTranslationHandler, - useClass: REDMissingTranslationHandler + useClass: REDMissingTranslationHandler, }, { provide: HELP_DOCS, - useValue: links + useValue: links, }, { provide: MAX_RETRIES_ON_SERVER_ERROR, useFactory: (configService: ConfigService) => configService.values.MAX_RETRIES_ON_SERVER_ERROR, - deps: [ConfigService] + deps: [ConfigService], }, - DatePipe + DatePipe, ], - bootstrap: [AppComponent] + bootstrap: [AppComponent], }) export class AppModule { constructor(private readonly _router: Router, private readonly _route: ActivatedRoute) { @@ -157,9 +157,9 @@ export class AppModule { queryParams: { state: null, session_state: null, - code: null + code: null, }, - queryParamsHandling: 'merge' + queryParamsHandling: 'merge', }); } }); diff --git a/apps/red-ui/src/app/components/auth-error/auth-error.component.ts b/apps/red-ui/src/app/components/auth-error/auth-error.component.ts index 3cd3488c6..1bf1d0a7e 100644 --- a/apps/red-ui/src/app/components/auth-error/auth-error.component.ts +++ b/apps/red-ui/src/app/components/auth-error/auth-error.component.ts @@ -5,7 +5,7 @@ import { ConfigService } from '@services/config.service'; @Component({ selector: 'redaction-auth-error', templateUrl: './auth-error.component.html', - styleUrls: ['./auth-error.component.scss'] + styleUrls: ['./auth-error.component.scss'], }) export class AuthErrorComponent { adminName = this._configService.values.ADMIN_CONTACT_NAME; diff --git a/apps/red-ui/src/app/components/base-screen/base-screen.component.ts b/apps/red-ui/src/app/components/base-screen/base-screen.component.ts index b97584730..b4217e4e7 100644 --- a/apps/red-ui/src/app/components/base-screen/base-screen.component.ts +++ b/apps/red-ui/src/app/components/base-screen/base-screen.component.ts @@ -24,7 +24,7 @@ const isSearchScreen = url => url.includes('/main/dossiers') && url.includes('/s @Component({ templateUrl: './base-screen.component.html', - styleUrls: ['./base-screen.component.scss'] + styleUrls: ['./base-screen.component.scss'], }) export class BaseScreenComponent { readonly currentUser = this.userService.currentUser; @@ -32,43 +32,43 @@ export class BaseScreenComponent { { name: _('top-bar.navigation-items.my-account.children.my-profile'), routerLink: '/main/my-profile', - show: true + show: true, }, { name: _('top-bar.navigation-items.my-account.children.admin'), routerLink: '/main/admin', show: this.currentUser.isManager || this.currentUser.isUserAdmin, - action: this.appStateService.reset + action: this.appStateService.reset, }, { name: _('top-bar.navigation-items.my-account.children.downloads'), routerLink: '/main/downloads', - show: this.currentUser.isUser + show: this.currentUser.isUser, }, { name: _('top-bar.navigation-items.my-account.children.trash'), routerLink: '/main/admin/trash', - show: this.currentUser.isManager - } + show: this.currentUser.isManager, + }, ]; readonly searchActions: readonly SpotlightSearchAction[] = [ { text: this._translateService.instant('search.this-dossier'), icon: 'red:enter', hide: (): boolean => !this.dossiersService.activeDossier, - action: (query): void => this._search(query, this.dossiersService.activeDossierId) + action: (query): void => this._search(query, this.dossiersService.activeDossierId), }, { text: this._translateService.instant('search.entire-platform'), icon: 'red:enter', - action: (query): void => this._search(query) - } + action: (query): void => this._search(query), + }, ]; private readonly _navigationStart$ = this._router.events.pipe( filter(isNavigationStart), map((event: NavigationStart) => event.url), startWith(this._router.url), - distinctUntilChanged() + distinctUntilChanged(), ); readonly isDossiersView$ = this._navigationStart$.pipe(map(isDossiersView)); readonly isSearchScreen$ = this._navigationStart$.pipe(map(isSearchScreen)); @@ -81,7 +81,7 @@ export class BaseScreenComponent { readonly titleService: Title, readonly fileDownloadService: FileDownloadService, private readonly _router: Router, - private readonly _translateService: TranslateService + private readonly _translateService: TranslateService, ) {} trackByName(index: number, item: MenuItem) { diff --git a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts index 3b7ea4106..e30bb92fd 100644 --- a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts +++ b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts @@ -11,7 +11,7 @@ import { RouterHistoryService } from '@services/router-history.service'; selector: 'redaction-downloads-list-screen', templateUrl: './downloads-list-screen.component.html', styleUrls: ['./downloads-list-screen.component.scss'], - providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => DownloadsListScreenComponent) }] + providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => DownloadsListScreenComponent) }], }) export class DownloadsListScreenComponent extends ListingComponent implements OnInit { readonly circleButtonTypes = CircleButtonTypes; @@ -20,7 +20,7 @@ export class DownloadsListScreenComponent extends ListingComponent { this.notifications = response.notifications.filter(notification => this._isSupportedType(notification)); @@ -78,7 +78,7 @@ export class NotificationsComponent { dossierHref: this._getDossierHref(dossierId), dossierName: this._getDossierName(notification.target?.dossierId), fileName: this._getFileName(notification.target?.dossierId, notification.target?.fileId), - user: this._getUsername(notification.userId) + user: this._getUsername(notification.userId), }); } diff --git a/apps/red-ui/src/app/components/spotlight-search/spotlight-search.component.ts b/apps/red-ui/src/app/components/spotlight-search/spotlight-search.component.ts index 5446c02b4..1c7a87236 100644 --- a/apps/red-ui/src/app/components/spotlight-search/spotlight-search.component.ts +++ b/apps/red-ui/src/app/components/spotlight-search/spotlight-search.component.ts @@ -8,7 +8,7 @@ import { MatMenuTrigger } from '@angular/material/menu'; selector: 'redaction-spotlight-search [actions]', templateUrl: './spotlight-search.component.html', styleUrls: ['./spotlight-search.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class SpotlightSearchComponent { @Input() actions: readonly SpotlightSearchAction[]; @@ -22,7 +22,7 @@ export class SpotlightSearchComponent { readonly showActions$ = this.valueChanges$.pipe( debounceTime(300), map(value => value !== ''), - tap(show => (show ? this._menuTrigger.openMenu() : this._menuTrigger.closeMenu())) + tap(show => (show ? this._menuTrigger.openMenu() : this._menuTrigger.closeMenu())), ); get shownActions(): readonly SpotlightSearchAction[] { diff --git a/apps/red-ui/src/app/components/toast/toast.component.ts b/apps/red-ui/src/app/components/toast/toast.component.ts index ade7b422e..d420009f7 100644 --- a/apps/red-ui/src/app/components/toast/toast.component.ts +++ b/apps/red-ui/src/app/components/toast/toast.component.ts @@ -4,7 +4,7 @@ import { ToasterOptions } from '@iqser/common-ui'; @Component({ templateUrl: './toast.component.html', - styleUrls: ['./toast.component.scss'] + styleUrls: ['./toast.component.scss'], }) export class ToastComponent extends Toast { constructor(protected readonly _toastrService: ToastrService, readonly toastPackage: ToastPackage) { diff --git a/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.ts b/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.ts index ef48662d2..56e9cf409 100644 --- a/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.ts +++ b/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.ts @@ -13,7 +13,7 @@ import { LoadingService } from '@iqser/common-ui'; @Component({ selector: 'redaction-user-profile-screen', templateUrl: './user-profile-screen.component.html', - styleUrls: ['./user-profile-screen.component.scss'] + styleUrls: ['./user-profile-screen.component.scss'], }) export class UserProfileScreenComponent implements OnInit { formGroup: FormGroup; @@ -31,18 +31,18 @@ export class UserProfileScreenComponent implements OnInit { private readonly _languageService: LanguageService, private readonly _domSanitizer: DomSanitizer, private readonly _translateService: TranslateService, - private readonly _loadingService: LoadingService + private readonly _loadingService: LoadingService, ) { this._loadingService.start(); this.formGroup = this._formBuilder.group({ email: [undefined, [Validators.required, Validators.email]], firstName: [undefined], lastName: [undefined], - language: [undefined] + language: [undefined], }); this.changePasswordUrl = this._domSanitizer.bypassSecurityTrustResourceUrl( - this._configService.values.OAUTH_URL + '/account/password' + `${this._configService.values.OAUTH_URL}/account/password`, ); } @@ -84,7 +84,7 @@ export class UserProfileScreenComponent implements OnInit { await this._userControllerService .updateMyProfile({ - ...value + ...value, }) .toPromise(); @@ -101,7 +101,7 @@ export class UserProfileScreenComponent implements OnInit { email: this._userService.currentUser.email, firstName: this._userService.currentUser.firstName, lastName: this._userService.currentUser.lastName, - language: this._languageService.currentLanguage + language: this._languageService.currentLanguage, }; if (this._userService.currentUser.email) { // disable email if it's already set diff --git a/apps/red-ui/src/app/i18n/language.service.ts b/apps/red-ui/src/app/i18n/language.service.ts index 0f75ec887..4f4331ae7 100644 --- a/apps/red-ui/src/app/i18n/language.service.ts +++ b/apps/red-ui/src/app/i18n/language.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class LanguageService { constructor(private readonly _translateService: TranslateService) { diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index 9f14dbc4d..83c93a4ef 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -387,7 +387,7 @@ export class AnnotationWrapper { private static _createContent(annotationWrapper: AnnotationWrapper, entry: RedactionLogEntryWrapper) { let content = ''; if (entry.matchedRule) { - content += 'Rule ' + entry.matchedRule + ' matched \n\n'; + content += `Rule ${entry.matchedRule} matched \n\n`; } if (entry.reason) { diff --git a/apps/red-ui/src/app/models/file/file-data.model.ts b/apps/red-ui/src/app/models/file/file-data.model.ts index 0c7eb12ff..98e368e03 100644 --- a/apps/red-ui/src/app/models/file/file-data.model.ts +++ b/apps/red-ui/src/app/models/file/file-data.model.ts @@ -19,7 +19,7 @@ export class FileDataModel { dictionaryData: { [p: string]: TypeValue }, currentUser: User, viewMode: ViewMode, - areDevFeaturesEnabled: boolean + areDevFeaturesEnabled: boolean, ): AnnotationData { const entries: RedactionLogEntryWrapper[] = this._convertData(); let allAnnotations = entries @@ -42,7 +42,7 @@ export class FileDataModel { return { visibleAnnotations: visibleAnnotations, - allAnnotations: allAnnotations + allAnnotations: allAnnotations, }; } diff --git a/apps/red-ui/src/app/models/file/file.ts b/apps/red-ui/src/app/models/file/file.ts index 01c718e09..718a951f7 100644 --- a/apps/red-ui/src/app/models/file/file.ts +++ b/apps/red-ui/src/app/models/file/file.ts @@ -7,7 +7,7 @@ const processingStatuses: List = [ FileStatuses.FULLREPROCESS, FileStatuses.OCR_PROCESSING, FileStatuses.INDEXING, - FileStatuses.PROCESSING + FileStatuses.PROCESSING, ] as const; export class File implements IFile, IListable { diff --git a/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts b/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts index 6dc92c3ee..05e31dc74 100644 --- a/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts +++ b/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts @@ -6,6 +6,6 @@ export class ManualRedactionEntryWrapper { readonly manualRedactionEntry: ManualRedactionEntry, readonly type: 'DICTIONARY' | 'REDACTION' | 'FALSE_POSITIVE', readonly annotationType: 'TEXT' | 'RECTANGLE' = 'TEXT', - readonly rectId?: string + readonly rectId?: string, ) {} } diff --git a/apps/red-ui/src/app/modules/admin/admin-routing.module.ts b/apps/red-ui/src/app/modules/admin/admin-routing.module.ts index ff2d05a70..6c1854d48 100644 --- a/apps/red-ui/src/app/modules/admin/admin-routing.module.ts +++ b/apps/red-ui/src/app/modules/admin/admin-routing.module.ts @@ -31,8 +31,8 @@ const routes = [ component: DossierTemplatesListingScreenComponent, canActivate: [CompositeRouteGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, }, { path: ':dossierTemplateId', @@ -45,8 +45,8 @@ const routes = [ component: DictionaryListingScreenComponent, canActivate: [CompositeRouteGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, }, { path: ':type', @@ -54,10 +54,10 @@ const routes = [ canActivate: [CompositeRouteGuard], canDeactivate: [PendingChangesGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } - } - ] + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, + }, + ], }, { path: 'rules', @@ -65,57 +65,57 @@ const routes = [ canActivate: [CompositeRouteGuard], canDeactivate: [PendingChangesGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, }, { path: 'file-attributes', component: FileAttributesListingScreenComponent, canActivate: [CompositeRouteGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, }, { path: 'watermark', component: WatermarkScreenComponent, canActivate: [CompositeRouteGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, }, { path: 'reports', component: ReportsScreenComponent, canActivate: [CompositeRouteGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, }, { path: 'dossier-attributes', component: DossierAttributesListingScreenComponent, canActivate: [CompositeRouteGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, }, { path: 'default-colors', component: DefaultColorsScreenComponent, canActivate: [CompositeRouteGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, }, - { path: '', redirectTo: 'dictionaries', pathMatch: 'full' } - ] - } + { path: '', redirectTo: 'dictionaries', pathMatch: 'full' }, + ], + }, ], data: { routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], - requiredRoles: ['RED_MANAGER', 'RED_ADMIN'] - } + requiredRoles: ['RED_MANAGER', 'RED_ADMIN'], + }, }, { path: 'users', @@ -123,8 +123,8 @@ const routes = [ canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], - requiredRoles: ['RED_USER_ADMIN'] - } + requiredRoles: ['RED_USER_ADMIN'], + }, }, { path: 'license-info', @@ -132,8 +132,8 @@ const routes = [ canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], - requiredRoles: ['RED_ADMIN'] - } + requiredRoles: ['RED_ADMIN'], + }, }, { path: 'digital-signature', @@ -141,8 +141,8 @@ const routes = [ canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], - requiredRoles: ['RED_ADMIN'] - } + requiredRoles: ['RED_ADMIN'], + }, }, { path: 'audit', @@ -150,8 +150,8 @@ const routes = [ canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], - requiredRoles: ['RED_ADMIN'] - } + requiredRoles: ['RED_ADMIN'], + }, }, { path: 'general-config', @@ -159,21 +159,21 @@ const routes = [ canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], - requiredRoles: ['RED_ADMIN'] - } + requiredRoles: ['RED_ADMIN'], + }, }, { path: 'trash', component: TrashScreenComponent, canActivate: [CompositeRouteGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, + }, ]; @NgModule({ imports: [RouterModule.forChild(routes)], - exports: [RouterModule] + exports: [RouterModule], }) export class AdminRoutingModule {} diff --git a/apps/red-ui/src/app/modules/admin/admin-side-nav/admin-side-nav.component.ts b/apps/red-ui/src/app/modules/admin/admin-side-nav/admin-side-nav.component.ts index c8c52fd51..f870ba690 100644 --- a/apps/red-ui/src/app/modules/admin/admin-side-nav/admin-side-nav.component.ts +++ b/apps/red-ui/src/app/modules/admin/admin-side-nav/admin-side-nav.component.ts @@ -16,7 +16,7 @@ interface NavItem { @Component({ selector: 'redaction-admin-side-nav', templateUrl: './admin-side-nav.component.html', - styleUrls: ['./admin-side-nav.component.scss'] + styleUrls: ['./admin-side-nav.component.scss'], }) export class AdminSideNavComponent { @Input() type: Type; @@ -29,44 +29,44 @@ export class AdminSideNavComponent { { screen: 'dossier-templates', label: _('dossier-templates'), - hideIf: !this.currentUser.isManager + hideIf: !this.currentUser.isManager, }, { screen: 'digital-signature', label: _('digital-signature'), - hideIf: !this.currentUser.isAdmin + hideIf: !this.currentUser.isAdmin, }, { screen: 'license-info', label: _('license-information'), - hideIf: !this.currentUser.isAdmin + hideIf: !this.currentUser.isAdmin, }, { screen: 'audit', label: _('audit'), hideIf: !this.currentUser.isAdmin }, { screen: 'users', label: _('user-management'), hideIf: !this.currentUser.isUserAdmin }, { screen: 'general-config', label: _('configurations'), - hideIf: !this.currentUser.isAdmin - } + hideIf: !this.currentUser.isAdmin, + }, ], dossierTemplates: [ { screen: 'dictionaries', label: _('dictionaries') }, { screen: 'rules', label: _('rule-editor'), - hideIf: !this.userPreferenceService.areDevFeaturesEnabled + hideIf: !this.userPreferenceService.areDevFeaturesEnabled, }, { screen: 'default-colors', label: _('default-colors') }, { screen: 'watermark', label: _('watermark') }, { screen: 'file-attributes', label: _('file-attributes') }, { screen: 'dossier-attributes', label: _('dossier-attributes') }, - { screen: 'reports', label: _('reports') } - ] + { screen: 'reports', label: _('reports') }, + ], }; constructor( private readonly _userService: UserService, private readonly _appStateService: AppStateService, - readonly userPreferenceService: UserPreferenceService + readonly userPreferenceService: UserPreferenceService, ) {} } diff --git a/apps/red-ui/src/app/modules/admin/admin.module.ts b/apps/red-ui/src/app/modules/admin/admin.module.ts index e3cdbee28..81c5b1ad1 100644 --- a/apps/red-ui/src/app/modules/admin/admin.module.ts +++ b/apps/red-ui/src/app/modules/admin/admin.module.ts @@ -50,7 +50,7 @@ const dialogs = [ AddEditUserDialogComponent, ConfirmDeleteUsersDialogComponent, FileAttributesCsvImportDialogComponent, - AddEditDossierAttributeDialogComponent + AddEditDossierAttributeDialogComponent, ]; const screens = [ @@ -68,7 +68,7 @@ const screens = [ GeneralConfigScreenComponent, ReportsScreenComponent, DossierAttributesListingScreenComponent, - TrashScreenComponent + TrashScreenComponent, ]; const components = [ @@ -83,12 +83,12 @@ const components = [ UserDetailsComponent, ...dialogs, - ...screens + ...screens, ]; @NgModule({ declarations: [...components], providers: [AdminDialogService], - imports: [CommonModule, SharedModule, AdminRoutingModule, NgxChartsModule, ColorPickerModule, MonacoEditorModule] + imports: [CommonModule, SharedModule, AdminRoutingModule, NgxChartsModule, ColorPickerModule, MonacoEditorModule], }) export class AdminModule {} diff --git a/apps/red-ui/src/app/modules/admin/components/breadcrumbs/admin-breadcrumbs.component.ts b/apps/red-ui/src/app/modules/admin/components/breadcrumbs/admin-breadcrumbs.component.ts index 4064b2f6f..7d3f522c0 100644 --- a/apps/red-ui/src/app/modules/admin/components/breadcrumbs/admin-breadcrumbs.component.ts +++ b/apps/red-ui/src/app/modules/admin/components/breadcrumbs/admin-breadcrumbs.component.ts @@ -7,7 +7,7 @@ import { DossierTemplatesService } from '../../../dossier/services/dossier-templ @Component({ selector: 'redaction-admin-breadcrumbs', templateUrl: './admin-breadcrumbs.component.html', - styleUrls: ['./admin-breadcrumbs.component.scss'] + styleUrls: ['./admin-breadcrumbs.component.scss'], }) export class AdminBreadcrumbsComponent { @Input() root = false; @@ -16,6 +16,6 @@ export class AdminBreadcrumbsComponent { readonly userPreferenceService: UserPreferenceService, readonly permissionService: PermissionsService, readonly appStateService: AppStateService, - readonly dossierTemplatesService: DossierTemplatesService + readonly dossierTemplatesService: DossierTemplatesService, ) {} } diff --git a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.ts b/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.ts index 25973390b..fff29fbc4 100644 --- a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.ts +++ b/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.ts @@ -7,7 +7,7 @@ import { Output, TemplateRef, ViewChild, - ViewEncapsulation + ViewEncapsulation, } from '@angular/core'; import { curveLinear } from 'd3-shape'; @@ -19,7 +19,7 @@ import { BaseChartComponent, calculateViewDimensions, ColorHelper, LineSeriesCom selector: 'combo-chart-component', templateUrl: './combo-chart.component.html', styleUrls: ['./combo-chart.component.scss'], - encapsulation: ViewEncapsulation.None + encapsulation: ViewEncapsulation.None, }) export class ComboChartComponent extends BaseChartComponent { @Input() curve: any = curveLinear; @@ -86,7 +86,7 @@ export class ComboChartComponent extends BaseChartComponent { yOrientLeft = 'left'; yOrientRight = 'right'; legendSpacing = 0; - bandwidth; + bandwidth: number; barPadding = 8; trackBy(index, item): string { @@ -107,7 +107,7 @@ export class ComboChartComponent extends BaseChartComponent { showYLabel: this.showYAxisLabel, showLegend: this.legend, legendType: this.schemeType, - legendPosition: this.legendPosition + legendPosition: this.legendPosition, }); if (!this.yAxis) { @@ -171,7 +171,7 @@ export class ComboChartComponent extends BaseChartComponent { this.combinedSeries = this.lineChart.slice(0); this.combinedSeries.push({ name: this.yAxisLabel, - series: this.results + series: this.results, }); return this.combinedSeries.map(d => d.name); } @@ -270,7 +270,7 @@ export class ComboChartComponent extends BaseChartComponent { } } - getXScaleLine(domain, width): any { + getXScaleLine(domain, width: number): any { let scale; if (this.bandwidth === undefined) { this.bandwidth = width - this.barPadding; @@ -349,7 +349,7 @@ export class ComboChartComponent extends BaseChartComponent { colors: undefined, domain: [], title: undefined, - position: this.legendPosition + position: this.legendPosition, }; if (opts.scaleType === 'ordinal') { opts.domain = this.seriesDomain; @@ -367,7 +367,7 @@ export class ComboChartComponent extends BaseChartComponent { this.scaleLines(); } - updateYAxisWidth({ width }): void { + updateYAxisWidth({ width }: { width: number }): void { this.yAxisWidth = width + 20; this.update(); } diff --git a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-series-vertical.component.ts b/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-series-vertical.component.ts index 6cab46e13..6289f88d6 100644 --- a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-series-vertical.component.ts +++ b/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-series-vertical.component.ts @@ -38,12 +38,12 @@ import { formatLabel } from '@swimlane/ngx-charts'; transition('* => void', [ style({ opacity: 1, - transform: '*' + transform: '*', }), - animate(500, style({ opacity: 0, transform: 'scale(0)' })) - ]) - ]) - ] + animate(500, style({ opacity: 0, transform: 'scale(0)' })), + ]), + ]), + ], }) export class ComboSeriesVerticalComponent implements OnChanges { @Input() dims; @@ -82,11 +82,11 @@ export class ComboSeriesVerticalComponent implements OnChanges { let d0 = 0; let total; if (this.type === 'normalized') { - total = this.series.map(d => d.value).reduce((sum, d) => sum + d, 0); + total = this.series.map(d => d.value).reduce((sum: number, d: number) => sum + d, 0); } this.bars = this.series.map((d, index) => { - let value = d.value; + let value: number = d.value; const label = d.name; const formattedLabel = formatLabel(label); const roundEdges = this.type === 'standard'; @@ -100,7 +100,7 @@ export class ComboSeriesVerticalComponent implements OnChanges { formattedLabel, height: 0, x: 0, - y: 0 + y: 0, }; if (this.type === 'standard') { @@ -140,6 +140,8 @@ export class ComboSeriesVerticalComponent implements OnChanges { bar.y = this.yScale(offset1); bar.offset0 = offset0; bar.offset1 = offset1; + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore value = (offset1 - offset0).toFixed(2) + '%'; } @@ -163,8 +165,8 @@ export class ComboSeriesVerticalComponent implements OnChanges { this.getSeriesTooltips(this.seriesLine, index); const lineValue = this.seriesLine[0].series[index].value; bar.tooltipText = ` - ${tooltipLabel} - + ${tooltipLabel} + Y1 - ${value.toLocaleString()} • Y2 - ${lineValue.toLocaleString()}% `; diff --git a/apps/red-ui/src/app/modules/admin/components/dossier-template-actions/dossier-template-actions.component.ts b/apps/red-ui/src/app/modules/admin/components/dossier-template-actions/dossier-template-actions.component.ts index 740a3d3d9..3657c3083 100644 --- a/apps/red-ui/src/app/modules/admin/components/dossier-template-actions/dossier-template-actions.component.ts +++ b/apps/red-ui/src/app/modules/admin/components/dossier-template-actions/dossier-template-actions.component.ts @@ -11,7 +11,7 @@ import { DossierTemplatesService } from '../../../dossier/services/dossier-templ @Component({ selector: 'redaction-dossier-template-actions', templateUrl: './dossier-template-actions.component.html', - styleUrls: ['./dossier-template-actions.component.scss'] + styleUrls: ['./dossier-template-actions.component.scss'], }) export class DossierTemplateActionsComponent implements OnInit { readonly circleButtonTypes = CircleButtonTypes; @@ -28,7 +28,7 @@ export class DossierTemplateActionsComponent implements OnInit { private readonly _appStateService: AppStateService, private readonly _dossierTemplatesService: DossierTemplatesService, private readonly _dialogService: AdminDialogService, - private readonly _dossierTemplateControllerService: DossierTemplateControllerService + private readonly _dossierTemplateControllerService: DossierTemplateControllerService, ) {} get dossierTemplate() { diff --git a/apps/red-ui/src/app/modules/admin/components/users-stats/users-stats.component.ts b/apps/red-ui/src/app/modules/admin/components/users-stats/users-stats.component.ts index 5b6a4c578..f256e1e32 100644 --- a/apps/red-ui/src/app/modules/admin/components/users-stats/users-stats.component.ts +++ b/apps/red-ui/src/app/modules/admin/components/users-stats/users-stats.component.ts @@ -4,7 +4,7 @@ import { DoughnutChartConfig } from '@shared/components/simple-doughnut-chart/si @Component({ selector: 'redaction-users-stats', templateUrl: './users-stats.component.html', - styleUrls: ['./users-stats.component.scss'] + styleUrls: ['./users-stats.component.scss'], }) export class UsersStatsComponent { @Output() toggleCollapse = new EventEmitter(); diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.ts index 7814a4b95..9a7ad256d 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.ts @@ -14,7 +14,7 @@ import { DictionaryService } from '@shared/services/dictionary.service'; @Component({ selector: 'redaction-add-edit-dictionary-dialog', templateUrl: './add-edit-dictionary-dialog.component.html', - styleUrls: ['./add-edit-dictionary-dialog.component.scss'] + styleUrls: ['./add-edit-dictionary-dialog.component.scss'], }) export class AddEditDictionaryDialogComponent { dictionaryForm: FormGroup; @@ -30,7 +30,7 @@ export class AddEditDictionaryDialogComponent { private readonly _translateService: TranslateService, private readonly _dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) - private readonly _data: { dictionary: TypeValue; dossierTemplateId: string } + private readonly _data: { dictionary: TypeValue; dossierTemplateId: string }, ) { this.dictionary = _data.dictionary; this._dossierTemplateId = _data.dossierTemplateId; @@ -41,7 +41,7 @@ export class AddEditDictionaryDialogComponent { hexColor: [this.dictionary?.hexColor, [Validators.required, Validators.minLength(7)]], hint: [!!this.dictionary?.hint], addToDictionaryAction: [!!this.dictionary?.addToDictionaryAction], - caseSensitive: [this.dictCaseSensitive] + caseSensitive: [this.dictCaseSensitive], }); this.dictionaryForm.get('label').valueChanges.subscribe(() => { this._updateTechnicalName(); @@ -51,7 +51,7 @@ export class AddEditDictionaryDialogComponent { get dialogHeader(): string { return this._translateService.instant('add-edit-dictionary.title', { type: this.dictionary ? 'edit' : 'create', - name: this.dictionary?.label + name: this.dictionary?.label, }); } @@ -82,7 +82,7 @@ export class AddEditDictionaryDialogComponent { return false; } - async saveDictionary(): Promise { + saveDictionary(): void { const typeValue: ITypeValue = this._formToObject(); let observable: Observable; @@ -104,7 +104,7 @@ export class AddEditDictionaryDialogComponent { } else { this._toaster.error(_('add-edit-dictionary.error.generic')); } - } + }, ); } @@ -130,7 +130,7 @@ export class AddEditDictionaryDialogComponent { hint: this.dictionaryForm.get('hint').value, rank: this.dictionaryForm.get('rank').value, addToDictionaryAction: this.dictionaryForm.get('addToDictionaryAction').value, - dossierTemplateId: this._dossierTemplateId + dossierTemplateId: this._dossierTemplateId, }; } } diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-attribute-dialog/add-edit-dossier-attribute-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-attribute-dialog/add-edit-dossier-attribute-dialog.component.ts index 8c4aed934..8b1094dfd 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-attribute-dialog/add-edit-dossier-attribute-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-attribute-dialog/add-edit-dossier-attribute-dialog.component.ts @@ -10,7 +10,7 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ templateUrl: './add-edit-dossier-attribute-dialog.component.html', - styleUrls: ['./add-edit-dossier-attribute-dialog.component.scss'] + styleUrls: ['./add-edit-dossier-attribute-dialog.component.scss'], }) export class AddEditDossierAttributeDialogComponent extends AutoUnsubscribe implements OnDestroy { dossierAttributeForm: FormGroup; @@ -25,7 +25,7 @@ export class AddEditDossierAttributeDialogComponent extends AutoUnsubscribe impl private readonly _toaster: Toaster, readonly dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) - readonly data: { readonly dossierAttribute: IDossierAttributeConfig } + readonly data: { readonly dossierAttribute: IDossierAttributeConfig }, ) { super(); this.dossierAttribute = data.dossierAttribute; @@ -35,10 +35,10 @@ export class AddEditDossierAttributeDialogComponent extends AutoUnsubscribe impl ...(!!this.dossierAttribute && { placeholder: { value: this.dossierAttribute.placeholder, - disabled: true - } + disabled: true, + }, }), - type: [this.dossierAttribute?.type || FileAttributeConfigTypes.TEXT, Validators.required] + type: [this.dossierAttribute?.type || FileAttributeConfigTypes.TEXT, Validators.required], }); } @@ -62,7 +62,7 @@ export class AddEditDossierAttributeDialogComponent extends AutoUnsubscribe impl const attribute: IDossierAttributeConfig = { id: this.dossierAttribute?.id, editable: true, - ...this.dossierAttributeForm.getRawValue() + ...this.dossierAttributeForm.getRawValue(), }; this._dossierAttributesService.addOrUpdateConfig(attribute).subscribe( @@ -72,7 +72,7 @@ export class AddEditDossierAttributeDialogComponent extends AutoUnsubscribe impl (error: HttpErrorResponse) => { this._loadingService.stop(); this._toaster.error(_('add-edit-dossier-attribute.error.generic'), { error: error }); - } + }, ); } } diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.ts index 6d4d07f16..21bbab6e9 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.ts @@ -12,7 +12,7 @@ import { DossierTemplatesService } from '../../../dossier/services/dossier-templ @Component({ selector: 'redaction-add-edit-dossier-template-dialog', templateUrl: './add-edit-dossier-template-dialog.component.html', - styleUrls: ['./add-edit-dossier-template-dialog.component.scss'] + styleUrls: ['./add-edit-dossier-template-dialog.component.scss'], }) export class AddEditDossierTemplateDialogComponent { dossierTemplateForm: FormGroup; @@ -21,7 +21,7 @@ export class AddEditDossierTemplateDialogComponent { downloadTypesEnum: DownloadFileType[] = ['ORIGINAL', 'PREVIEW', 'REDACTED']; downloadTypes: { key: DownloadFileType; label: string }[] = this.downloadTypesEnum.map(type => ({ key: type, - label: downloadTypesTranslations[type] + label: downloadTypesTranslations[type], })); private _previousValidFrom: Moment; @@ -33,20 +33,20 @@ export class AddEditDossierTemplateDialogComponent { private readonly _formBuilder: FormBuilder, private readonly _dossierTemplateController: DossierTemplateControllerService, public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) readonly dossierTemplate: IDossierTemplate + @Inject(MAT_DIALOG_DATA) readonly dossierTemplate: IDossierTemplate, ) { this.dossierTemplateForm = this._formBuilder.group({ name: [this.dossierTemplate?.name, Validators.required], description: [this.dossierTemplate?.description], validFrom: [ this.dossierTemplate?.validFrom ? moment(this.dossierTemplate?.validFrom) : null, - this._requiredIfValidator(() => this.hasValidFrom) + this._requiredIfValidator(() => this.hasValidFrom), ], validTo: [ this.dossierTemplate?.validTo ? moment(this.dossierTemplate?.validTo) : null, - this._requiredIfValidator(() => this.hasValidTo) + this._requiredIfValidator(() => this.hasValidTo), ], - downloadFileTypes: [this.dossierTemplate?.downloadFileTypes || ['PREVIEW', 'REDACTED']] + downloadFileTypes: [this.dossierTemplate?.downloadFileTypes || ['PREVIEW', 'REDACTED']], }); this.hasValidFrom = !!this.dossierTemplate?.validFrom; this.hasValidTo = !!this.dossierTemplate?.validTo; @@ -97,7 +97,7 @@ export class AddEditDossierTemplateDialogComponent { dossierTemplateId: this.dossierTemplate?.dossierTemplateId, ...this.dossierTemplateForm.getRawValue(), validFrom: this.hasValidFrom ? this.dossierTemplateForm.get('validFrom').value : null, - validTo: this.hasValidTo ? this.dossierTemplateForm.get('validTo').value : null + validTo: this.hasValidTo ? this.dossierTemplateForm.get('validTo').value : null, }; await this._dossierTemplateController.createOrUpdateDossierTemplate(dossierTemplate).toPromise(); await this._dossierTemplatesService.loadAll().toPromise(); @@ -113,7 +113,7 @@ export class AddEditDossierTemplateDialogComponent { this._previousValidTo, this.dossierTemplateForm, 'validFrom', - 'validTo' + 'validTo', ) ) { return true; diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.ts index a7abc108c..bc36e8c9c 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.ts @@ -8,7 +8,7 @@ import { fileAttributeTypesTranslations } from '../../translations/file-attribut @Component({ selector: 'redaction-add-edit-file-attribute-dialog', templateUrl: './add-edit-file-attribute-dialog.component.html', - styleUrls: ['./add-edit-file-attribute-dialog.component.scss'] + styleUrls: ['./add-edit-file-attribute-dialog.component.scss'], }) export class AddEditFileAttributeDialogComponent { fileAttributeForm: FormGroup; @@ -22,7 +22,7 @@ export class AddEditFileAttributeDialogComponent { private readonly _formBuilder: FormBuilder, public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) - public data: { fileAttribute: IFileAttributeConfig; dossierTemplateId: string } + public data: { fileAttribute: IFileAttributeConfig; dossierTemplateId: string }, ) { this.fileAttribute = data.fileAttribute; this.dossierTemplateId = data.dossierTemplateId; @@ -34,7 +34,7 @@ export class AddEditFileAttributeDialogComponent { readonly: [this.fileAttribute ? !this.fileAttribute.editable : false], primaryAttribute: [this.fileAttribute?.primaryAttribute], filterable: [this.fileAttribute?.filterable], - displayedInFileList: [this.fileAttribute?.displayedInFileList] + displayedInFileList: [this.fileAttribute?.displayedInFileList], }); } @@ -56,11 +56,11 @@ export class AddEditFileAttributeDialogComponent { return false; } - async saveFileAttribute() { + saveFileAttribute() { const fileAttribute: IFileAttributeConfig = { id: this.fileAttribute?.id, editable: !this.fileAttributeForm.get('readonly').value, - ...this.fileAttributeForm.getRawValue() + ...this.fileAttributeForm.getRawValue(), }; this.dialogRef.close(fileAttribute); } diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.ts index 95222870a..5b28e9688 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.ts @@ -5,7 +5,7 @@ import { User } from '@models/user'; @Component({ selector: 'redaction-add-edit-user-dialog', templateUrl: './add-edit-user-dialog.component.html', - styleUrls: ['./add-edit-user-dialog.component.scss'] + styleUrls: ['./add-edit-user-dialog.component.scss'], }) export class AddEditUserDialogComponent { resettingPassword = false; diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.ts index a8a7b7c96..a27419d23 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.ts @@ -8,11 +8,11 @@ import { User } from '@models/user'; @Component({ selector: 'redaction-reset-password', templateUrl: './reset-password.component.html', - styleUrls: ['./reset-password.component.scss'] + styleUrls: ['./reset-password.component.scss'], }) export class ResetPasswordComponent { readonly passwordForm = this._formBuilder.group({ - temporaryPassword: [null, Validators.required] + temporaryPassword: [null, Validators.required], }); @Input() user: User; @Output() readonly toggleResetPassword = new EventEmitter(); @@ -21,7 +21,7 @@ export class ResetPasswordComponent { private readonly _formBuilder: FormBuilder, private readonly _userControllerService: UserControllerService, private readonly _userService: UserService, - private readonly _loadingService: LoadingService + private readonly _loadingService: LoadingService, ) {} async save() { @@ -30,9 +30,9 @@ export class ResetPasswordComponent { .resetPassword( { password: this.passwordForm.get('temporaryPassword').value, - temporary: true + temporary: true, }, - this.user.id + this.user.id, ) .toPromise(); this._loadingService.stop(); diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.ts index a9a6f9406..8a779d360 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.ts @@ -10,7 +10,7 @@ import { User } from '@models/user'; @Component({ selector: 'redaction-user-details', templateUrl: './user-details.component.html', - styleUrls: ['./user-details.component.scss'] + styleUrls: ['./user-details.component.scss'], }) export class UserDetailsComponent implements OnInit { readonly iconButtonTypes = IconButtonTypes; @@ -29,7 +29,7 @@ export class UserDetailsComponent implements OnInit { private readonly _toaster: Toaster, private readonly _dialogService: AdminDialogService, private readonly _loadingService: LoadingService, - private readonly _userControllerService: UserControllerService + private readonly _userControllerService: UserControllerService, ) {} get changed(): boolean { @@ -75,12 +75,12 @@ export class UserDetailsComponent implements OnInit { this.user && Object.keys(this._ROLE_REQUIREMENTS).reduce( (value, key) => value || (role === this._ROLE_REQUIREMENTS[key] && this.user.roles.indexOf(key) !== -1), - false - ) - } - ] + false, + ), + }, + ], }), - {} + {}, ); this.userForm = this._formBuilder.group({ firstName: [this.user?.firstName, Validators.required], @@ -88,11 +88,11 @@ export class UserDetailsComponent implements OnInit { email: [ { value: this.user?.email, - disabled: !!this.user + disabled: !!this.user, }, - [Validators.required, Validators.email] + [Validators.required, Validators.email], ], - ...rolesControls + ...rolesControls, }); this._setRolesRequirements(); } @@ -122,8 +122,8 @@ export class UserDetailsComponent implements OnInit { } } - async delete() { - this._dialogService.openDialog('deleteUsers', null, [this.user], async () => { + delete() { + this._dialogService.openDialog('deleteUsers', null, [this.user], () => { this.closeDialog.emit(true); }); } diff --git a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.ts index d35d500d3..490d1a8a9 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.ts @@ -6,19 +6,19 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-confirm-delete-file-attribute-dialog', templateUrl: './confirm-delete-file-attribute-dialog.component.html', - styleUrls: ['./confirm-delete-file-attribute-dialog.component.scss'] + styleUrls: ['./confirm-delete-file-attribute-dialog.component.scss'], }) export class ConfirmDeleteFileAttributeDialogComponent { fileAttribute: IFileAttributeConfig; checkboxes = [ { value: false, label: _('confirm-delete-file-attribute.impacted-documents') }, - { value: false, label: _('confirm-delete-file-attribute.lost-details') } + { value: false, label: _('confirm-delete-file-attribute.lost-details') }, ]; showToast = false; constructor( public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: IFileAttributeConfig + @Inject(MAT_DIALOG_DATA) public data: IFileAttributeConfig, ) { this.fileAttribute = data; } diff --git a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.ts index 8f9c5eb26..984effd5f 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.ts @@ -9,12 +9,12 @@ import { DossiersService } from '../../../dossier/services/dossiers.service'; @Component({ selector: 'redaction-confirm-delete-users-dialog', templateUrl: './confirm-delete-users-dialog.component.html', - styleUrls: ['./confirm-delete-users-dialog.component.scss'] + styleUrls: ['./confirm-delete-users-dialog.component.scss'], }) export class ConfirmDeleteUsersDialogComponent { readonly checkboxes = [ { value: false, label: _('confirm-delete-users.impacted-dossiers') }, - { value: false, label: _('confirm-delete-users.impacted-documents') } + { value: false, label: _('confirm-delete-users.impacted-documents') }, ]; showToast = false; dossiersCount: number; @@ -24,7 +24,7 @@ export class ConfirmDeleteUsersDialogComponent { private readonly _loadingService: LoadingService, private readonly _userControllerService: UserControllerService, readonly dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) readonly users: User[] + @Inject(MAT_DIALOG_DATA) readonly users: User[], ) { this.dossiersCount = this._dossiersService.all.filter(dw => { for (const user of this.users) { diff --git a/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.ts index 6f4711c25..a97eb94b7 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.ts @@ -12,7 +12,7 @@ import { DictionaryService } from '@shared/services/dictionary.service'; @Component({ selector: 'redaction-edit-color-dialog', templateUrl: './edit-color-dialog.component.html', - styleUrls: ['./edit-color-dialog.component.scss'] + styleUrls: ['./edit-color-dialog.component.scss'], }) export class EditColorDialogComponent { readonly colors: Colors; @@ -29,7 +29,7 @@ export class EditColorDialogComponent { private readonly _translateService: TranslateService, private readonly _dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) - private readonly _data: { colors: Colors; colorKey: DefaultColorType; dossierTemplateId: string } + private readonly _data: { colors: Colors; colorKey: DefaultColorType; dossierTemplateId: string }, ) { this.colors = _data.colors; this.colorKey = _data.colorKey; @@ -37,7 +37,7 @@ export class EditColorDialogComponent { this._initialColor = _data.colors[this.colorKey]; this.colorForm = this._formBuilder.group({ - color: [this.colors[this.colorKey], [Validators.required, Validators.minLength(7)]] + color: [this.colors[this.colorKey], [Validators.required, Validators.minLength(7)]], }); } @@ -48,7 +48,7 @@ export class EditColorDialogComponent { async saveColors() { const colors = { ...this.colors, - [this.colorKey]: this.colorForm.get('color').value + [this.colorKey]: this.colorForm.get('color').value, }; try { diff --git a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.ts index c64a3a780..59c20c095 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.ts @@ -9,7 +9,7 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; selector: 'redaction-active-fields-listing', templateUrl: './active-fields-listing.component.html', styleUrls: ['./active-fields-listing.component.scss'], - providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => ActiveFieldsListingComponent) }] + providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => ActiveFieldsListingComponent) }], }) export class ActiveFieldsListingComponent extends ListingComponent implements OnChanges { readonly circleButtonTypes = CircleButtonTypes; @@ -19,25 +19,25 @@ export class ActiveFieldsListingComponent extends ListingComponent implem { label: _('file-attributes-csv-import.table-col-names.name'), class: 'name', - width: 'minmax(0, 350px)' + width: 'minmax(0, 350px)', }, { label: _('file-attributes-csv-import.table-col-names.type'), - width: '150px' + width: '150px', }, { label: _('file-attributes-csv-import.table-col-names.read-only'), class: 'flex-center', leftIcon: 'red:read-only', - width: 'auto' + width: 'auto', }, { label: _('file-attributes-csv-import.table-col-names.primary'), class: 'flex-center', rightIcon: 'red:status-info', rightIconTooltip: _('file-attributes-csv-import.table-col-names.primary-info-tooltip'), - width: 'auto' - } + width: 'auto', + }, ]; readonly typeOptions = Object.keys(FileAttributeConfigTypes); @Input() entities: Field[]; diff --git a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/file-attributes-csv-import-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/file-attributes-csv-import-dialog.component.ts index 6871e582c..631687884 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/file-attributes-csv-import-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/file-attributes-csv-import-dialog.component.ts @@ -22,7 +22,7 @@ export interface Field extends IListable { @Component({ templateUrl: './file-attributes-csv-import-dialog.component.html', styleUrls: ['./file-attributes-csv-import-dialog.component.scss'], - providers: [...DefaultListingServices] + providers: [...DefaultListingServices], }) export class FileAttributesCsvImportDialogComponent extends ListingComponent { readonly tableColumnConfigs: TableColumnConfig[] = []; @@ -49,14 +49,14 @@ export class FileAttributesCsvImportDialogComponent extends ListingComponent { + reader.addEventListener('load', event => { const parsedCsv = event.target.result; this.parseResult = Papa.parse(parsedCsv, { header: true, - delimiter: this.baseConfigForm.get('delimiter').value + delimiter: this.baseConfigForm.get('delimiter').value, }); this.baseConfigForm.patchValue({ delimiter: this.parseResult.meta.delimiter }); @@ -104,8 +104,8 @@ export class FileAttributesCsvImportDialogComponent extends ListingComponent this.allEntities .filter(field => field.csvColumn.toLowerCase().indexOf(value.toLowerCase()) !== -1) - .map(field => field.csvColumn) - ) + .map(field => field.csvColumn), + ), ); if ( @@ -113,13 +113,13 @@ export class FileAttributesCsvImportDialogComponent extends ListingComponent entity.csvColumn === this.data.existingConfiguration.filenameMappingColumnHeaderName) ) { this.baseConfigForm.patchValue({ - filenameMappingColumnHeaderName: this.data.existingConfiguration.filenameMappingColumnHeaderName + filenameMappingColumnHeaderName: this.data.existingConfiguration.filenameMappingColumnHeaderName, }); } this.initialParseConfig = { delimiter: this.baseConfigForm.get('delimiter').value, - encoding: this.baseConfigForm.get('encoding').value + encoding: this.baseConfigForm.get('encoding').value, }; }); reader.readAsText(this.data.csv, this.baseConfigForm.get('encoding').value); @@ -181,9 +181,9 @@ export class FileAttributesCsvImportDialogComponent extends ListingComponent, - @Inject(MAT_DIALOG_DATA) public data: SMTPConfiguration + @Inject(MAT_DIALOG_DATA) public data: SMTPConfiguration, ) { this.authForm = this._formBuilder.group({ user: [data?.user || this._userService.currentUser.email, [Validators.required]], - password: [data?.password, Validators.required] + password: [data?.password, Validators.required], }); } diff --git a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts index ad2c4c828..6214e0bb5 100644 --- a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts @@ -15,7 +15,7 @@ const PAGE_SIZE = 50; selector: 'redaction-audit-screen', templateUrl: './audit-screen.component.html', styleUrls: ['./audit-screen.component.scss'], - providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => AuditScreenComponent) }] + providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => AuditScreenComponent) }], }) export class AuditScreenComponent extends ListingComponent implements OnDestroy, OnInit { readonly ALL_CATEGORIES = 'allCategories'; @@ -30,7 +30,7 @@ export class AuditScreenComponent extends ListingComponent implements OnD { label: _('audit-screen.table-col-names.message') }, { label: _('audit-screen.table-col-names.date') }, { label: _('audit-screen.table-col-names.user'), class: 'user-column' }, - { label: _('audit-screen.table-col-names.category') } + { label: _('audit-screen.table-col-names.category') }, ]; readonly tableHeaderLabel = _('audit-screen.table-header.title'); private _previousFrom: Moment; @@ -41,14 +41,14 @@ export class AuditScreenComponent extends ListingComponent implements OnD protected readonly _injector: Injector, private readonly _formBuilder: FormBuilder, private readonly _loadingService: LoadingService, - private readonly _auditControllerService: AuditControllerService + private readonly _auditControllerService: AuditControllerService, ) { super(_injector); this.filterForm = this._formBuilder.group({ category: [this.ALL_CATEGORIES], userId: [this.ALL_USERS], from: [], - to: [] + to: [], }); this.addSubscription = this.filterForm.valueChanges.subscribe(async value => { @@ -99,7 +99,7 @@ export class AuditScreenComponent extends ListingComponent implements OnD category: category === this.ALL_CATEGORIES ? undefined : category, userId: userId === this.ALL_USERS ? undefined : userId, from, - to + to, }; promises.push(this._auditControllerService.getAuditCategories().toPromise()); diff --git a/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.ts index 132bd327c..42f749f25 100644 --- a/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.ts @@ -9,7 +9,7 @@ import { IListable, ListingComponent, LoadingService, - TableColumnConfig + TableColumnConfig, } from '@iqser/common-ui'; import { DefaultColorType } from '@models/default-color-key.model'; import { defaultColorsTranslations } from '../../translations/default-colors-translations'; @@ -27,7 +27,7 @@ interface ListItem extends IListable { templateUrl: './default-colors-screen.component.html', styleUrls: ['./default-colors-screen.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => DefaultColorsScreenComponent) }] + providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => DefaultColorsScreenComponent) }], }) export class DefaultColorsScreenComponent extends ListingComponent implements OnInit { readonly circleButtonTypes = CircleButtonTypes; @@ -36,7 +36,7 @@ export class DefaultColorsScreenComponent extends ListingComponent imp readonly tableHeaderLabel = _('default-colors-screen.table-header.title'); readonly tableColumnConfigs: TableColumnConfig[] = [ { label: _('default-colors-screen.table-col-names.key'), sortByKey: 'searchKey', width: '2fr' }, - { label: _('default-colors-screen.table-col-names.color'), class: 'flex-center' } + { label: _('default-colors-screen.table-col-names.color'), class: 'flex-center' }, ]; private _colorsObj: Colors; @@ -48,7 +48,7 @@ export class DefaultColorsScreenComponent extends ListingComponent imp private readonly _appStateService: AppStateService, private readonly _dossierTemplatesService: DossierTemplatesService, private readonly _dialogService: AdminDialogService, - private readonly _dictionaryService: DictionaryService + private readonly _dictionaryService: DictionaryService, ) { super(_injector); } @@ -64,12 +64,12 @@ export class DefaultColorsScreenComponent extends ListingComponent imp { colors: this._colorsObj, colorKey: color.key, - dossierTemplateId: this._dossierTemplatesService.activeDossierTemplateId + dossierTemplateId: this._dossierTemplatesService.activeDossierTemplateId, }, async () => { await this._loadColors(); await this._appStateService.refreshDossierTemplate(this._dossierTemplatesService.activeDossierTemplateId); - } + }, ); } @@ -82,7 +82,7 @@ export class DefaultColorsScreenComponent extends ListingComponent imp id: key, key, searchKey: key, - value: data[key] + value: data[key], })) .filter(entry => entry.id !== 'dossierTemplateId'); this.entitiesService.setEntities(entities); diff --git a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.ts index 50a5ca718..cd60948b6 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.ts @@ -12,7 +12,7 @@ import { IconButtonTypes, ListingComponent, LoadingService, - TableColumnConfig + TableColumnConfig, } from '@iqser/common-ui'; import { AdminDialogService } from '../../services/admin-dialog.service'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @@ -24,13 +24,13 @@ const toChartConfig = (dict: TypeValue): DoughnutChartConfig => ({ value: dict.entries?.length ?? 0, color: dict.hexColor, label: dict.label, - key: dict.type + key: dict.type, }); @Component({ templateUrl: './dictionary-listing-screen.component.html', styleUrls: ['./dictionary-listing-screen.component.scss'], - providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => DictionaryListingScreenComponent) }] + providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => DictionaryListingScreenComponent) }], }) export class DictionaryListingScreenComponent extends ListingComponent implements OnInit { readonly iconButtonTypes = IconButtonTypes; @@ -40,7 +40,7 @@ export class DictionaryListingScreenComponent extends ListingComponent[] = [ { label: _('dictionary-listing.table-col-names.type'), sortByKey: 'searchKey', width: '2fr' }, { label: _('dictionary-listing.table-col-names.order-of-importance'), sortByKey: 'rank', class: 'flex-center' }, - { label: _('dictionary-listing.table-col-names.hint-redaction'), class: 'flex-center' } + { label: _('dictionary-listing.table-col-names.hint-redaction'), class: 'flex-center' }, ]; chartData: DoughnutChartConfig[] = []; @@ -53,7 +53,7 @@ export class DictionaryListingScreenComponent extends ListingComponent t.type), - this._dossierTemplatesService.activeDossierTemplateId + this._dossierTemplatesService.activeDossierTemplateId, ) .toPromise(); this.listingService.setSelected([]); @@ -86,7 +86,7 @@ export class DictionaryListingScreenComponent extends ListingComponent { this._loadingService.start(); @@ -94,7 +94,7 @@ export class DictionaryListingScreenComponent extends ListingComponent { dict.entries = this.allEntities.find(d => d.type === dict.type)?.entries || []; return dict; - }) + }), ); } else { this.entitiesService.setEntities(entities); @@ -123,8 +123,8 @@ export class DictionaryListingScreenComponent extends ListingComponent { dict.entries = []; return of({}); - }) - ) + }), + ), ); forkJoin(dataObs) diff --git a/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.ts index 3933d6ab1..c564eb92c 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.ts @@ -14,7 +14,7 @@ import { DossierTemplatesService } from '../../../dossier/services/dossier-templ @Component({ templateUrl: './dictionary-overview-screen.component.html', - styleUrls: ['./dictionary-overview-screen.component.scss'] + styleUrls: ['./dictionary-overview-screen.component.scss'], }) export class DictionaryOverviewScreenComponent extends ComponentHasChanges implements OnInit { readonly circleButtonTypes = CircleButtonTypes; @@ -36,7 +36,7 @@ export class DictionaryOverviewScreenComponent extends ComponentHasChanges imple private readonly _dossierTemplatesService: DossierTemplatesService, private readonly _dialogService: AdminDialogService, protected readonly _translateService: TranslateService, - private readonly _dictionaryService: DictionaryService + private readonly _dictionaryService: DictionaryService, ) { super(_translateService); } @@ -57,14 +57,14 @@ export class DictionaryOverviewScreenComponent extends ComponentHasChanges imple $event, { dictionary: this.dictionary, - dossierTemplateId: this.dictionary.dossierTemplateId + dossierTemplateId: this.dictionary.dossierTemplateId, }, async () => { this._loadingService.start(); await this._appStateService.loadDictionaryData(); this.dictionary = this._appStateService.activeDictionary; this._loadingService.stop(); - } + }, ); } @@ -79,7 +79,7 @@ export class DictionaryOverviewScreenComponent extends ComponentHasChanges imple 'admin', 'dossier-templates', this._dossierTemplatesService.activeDossierTemplateId, - 'dictionaries' + 'dictionaries', ]); }); } @@ -87,7 +87,7 @@ export class DictionaryOverviewScreenComponent extends ComponentHasChanges imple download(): void { const content = this._dictionaryManager.editor.value; const blob = new Blob([content], { - type: 'text/plain;charset=utf-8' + type: 'text/plain;charset=utf-8', }); saveAs(blob, `${this.dictionary.label}.txt`); } @@ -113,7 +113,7 @@ export class DictionaryOverviewScreenComponent extends ComponentHasChanges imple }, () => { this._loadingService.stop(); - } + }, ); } @@ -130,7 +130,7 @@ export class DictionaryOverviewScreenComponent extends ComponentHasChanges imple () => { this._loadingService.stop(); this.entries = []; - } + }, ) .catch(() => { this._loadingService.stop(); diff --git a/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.ts index e4f5ca79c..e9b27de0e 100644 --- a/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.ts @@ -10,7 +10,7 @@ import { RouterHistoryService } from '@services/router-history.service'; @Component({ selector: 'redaction-digital-signature-screen', templateUrl: './digital-signature-screen.component.html', - styleUrls: ['./digital-signature-screen.component.scss'] + styleUrls: ['./digital-signature-screen.component.scss'], }) export class DigitalSignatureScreenComponent extends AutoUnsubscribe implements OnDestroy { readonly iconButtonTypes = IconButtonTypes; @@ -27,7 +27,7 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribe implements private readonly _userService: UserService, private readonly _loadingService: LoadingService, readonly routerHistoryService: RouterHistoryService, - private readonly _digitalSignatureControllerService: DigitalSignatureControllerService + private readonly _digitalSignatureControllerService: DigitalSignatureControllerService, ) { super(); this.loadDigitalSignatureAndInitializeForm(); @@ -39,7 +39,7 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribe implements saveDigitalSignature() { const digitalSignature = { - ...this.digitalSignatureForm.getRawValue() + ...this.digitalSignatureForm.getRawValue(), }; //adjusted for chrome auto-complete / password manager digitalSignature.password = digitalSignature.keySecret; @@ -59,7 +59,7 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribe implements } else { this._toaster.error(_('digital-signature-screen.action.save-error')); } - } + }, ); } @@ -69,7 +69,7 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribe implements this.loadDigitalSignatureAndInitializeForm(); this._toaster.success(_('digital-signature-screen.action.delete-success')); }, - () => this._toaster.error(_('digital-signature-screen.action.delete-error')) + () => this._toaster.error(_('digital-signature-screen.action.delete-error')), ); } @@ -98,7 +98,7 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribe implements () => { this.digitalSignatureExists = false; this.digitalSignature = {}; - } + }, ) .add(() => { this._initForm(); @@ -115,7 +115,7 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribe implements reason: this.digitalSignature.reason, base64EncodedPrivateKey: this.digitalSignatureExists ? null - : [this.digitalSignature.base64EncodedPrivateKey, Validators.required] + : [this.digitalSignature.base64EncodedPrivateKey, Validators.required], }); } } diff --git a/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.ts index c540d9286..4726578ba 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.ts @@ -5,7 +5,7 @@ import { IconButtonTypes, ListingComponent, LoadingService, - TableColumnConfig + TableColumnConfig, } from '@iqser/common-ui'; import { IDossierAttributeConfig } from '@redaction/red-ui-http'; import { AppStateService } from '@state/app-state.service'; @@ -23,8 +23,8 @@ import { DossierTemplatesService } from '../../../dossier/services/dossier-templ styleUrls: ['./dossier-attributes-listing-screen.component.scss'], providers: [ ...DefaultListingServices, - { provide: ListingComponent, useExisting: forwardRef(() => DossierAttributesListingScreenComponent) } - ] + { provide: ListingComponent, useExisting: forwardRef(() => DossierAttributesListingScreenComponent) }, + ], }) export class DossierAttributesListingScreenComponent extends ListingComponent implements OnInit { readonly iconButtonTypes = IconButtonTypes; @@ -35,7 +35,7 @@ export class DossierAttributesListingScreenComponent extends ListingComponent[] = [ { label: _('dossier-attributes-listing.table-col-names.label'), sortByKey: 'label', width: '2fr' }, { label: _('dossier-attributes-listing.table-col-names.placeholder'), width: '2fr' }, - { label: _('dossier-attributes-listing.table-col-names.type'), sortByKey: 'type' } + { label: _('dossier-attributes-listing.table-col-names.type'), sortByKey: 'type' }, ]; constructor( @@ -46,12 +46,12 @@ export class DossierAttributesListingScreenComponent extends ListingComponent { await this._loadData(); } @@ -72,7 +72,7 @@ export class DossierAttributesListingScreenComponent extends ListingComponent await this._loadData() + async () => this._loadData(), ); } diff --git a/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.ts index 37f4bf58f..90609213e 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.ts @@ -11,7 +11,7 @@ import { ListingComponent, LoadingService, TableColumnConfig, - Toaster + Toaster, } from '@iqser/common-ui'; import { DossierTemplateControllerService } from '@redaction/red-ui-http'; import { UserService } from '@services/user.service'; @@ -26,8 +26,8 @@ import { DossierTemplatesService } from '../../../dossier/services/dossier-templ providers: [ ...DefaultListingServicesTmp, { provide: EntitiesService, useExisting: DossierTemplatesService }, - { provide: ListingComponent, useExisting: forwardRef(() => DossierTemplatesListingScreenComponent) } - ] + { provide: ListingComponent, useExisting: forwardRef(() => DossierTemplatesListingScreenComponent) }, + ], }) export class DossierTemplatesListingScreenComponent extends ListingComponent implements OnInit { readonly iconButtonTypes = IconButtonTypes; @@ -38,7 +38,7 @@ export class DossierTemplatesListingScreenComponent extends ListingComponent { + return this._dialogService.openDialog('confirm', $event, null, () => { this._loadingService.loadWhile(this._deleteTemplates()); }); } @@ -89,7 +89,7 @@ export class DossierTemplatesListingScreenComponent extends ListingComponent FileAttributesListingScreenComponent) } - ] + { provide: ListingComponent, useExisting: forwardRef(() => FileAttributesListingScreenComponent) }, + ], }) export class FileAttributesListingScreenComponent extends ListingComponent implements OnInit, OnDestroy { readonly iconButtonTypes = IconButtonTypes; @@ -44,8 +44,8 @@ export class FileAttributesListingScreenComponent extends ListingComponent f.id), - dossierTemplateId + dossierTemplateId, ) .toPromise(); } @@ -112,9 +112,9 @@ export class FileAttributesListingScreenComponent extends ListingComponent await this._loadData() + async () => this._loadData(), ); } diff --git a/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.ts index 4105133ad..1306a96c7 100644 --- a/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.ts @@ -5,7 +5,7 @@ import { GeneralConfigurationModel, GeneralSettingsControllerService, SMTPConfiguration, - SmtpConfigurationControllerService + SmtpConfigurationControllerService, } from '@redaction/red-ui-http'; import { ConfigService } from '@services/config.service'; import { AutoUnsubscribe, IconButtonTypes, LoadingService, Toaster } from '@iqser/common-ui'; @@ -15,7 +15,7 @@ import { UserService } from '@services/user.service'; @Component({ selector: 'redaction-general-config-screen', templateUrl: './general-config-screen.component.html', - styleUrls: ['./general-config-screen.component.scss'] + styleUrls: ['./general-config-screen.component.scss'], }) export class GeneralConfigScreenComponent extends AutoUnsubscribe implements OnInit, OnDestroy { readonly iconButtonTypes = IconButtonTypes; @@ -35,13 +35,13 @@ export class GeneralConfigScreenComponent extends AutoUnsubscribe implements OnI private readonly _dialogService: AdminDialogService, private readonly _configService: ConfigService, private readonly _smtpConfigService: SmtpConfigurationControllerService, - private readonly _generalSettingsControllerService: GeneralSettingsControllerService + private readonly _generalSettingsControllerService: GeneralSettingsControllerService, ) { super(); this.configForm = this._formBuilder.group({ forgotPasswordFunctionEnabled: [false], - auxiliaryName: [undefined] + auxiliaryName: [undefined], }); this.smtpForm = this._formBuilder.group({ @@ -56,7 +56,7 @@ export class GeneralConfigScreenComponent extends AutoUnsubscribe implements OnI starttls: [false], auth: [false], user: [undefined], - password: [undefined] + password: [undefined], }); this.addSubscription = this.smtpForm.controls.auth.valueChanges.subscribe(auth => { diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts index e62d97347..06ab7877a 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts @@ -11,7 +11,7 @@ import { RouterHistoryService } from '@services/router-history.service'; @Component({ selector: 'redaction-license-information-screen', templateUrl: './license-information-screen.component.html', - styleUrls: ['./license-information-screen.component.scss'] + styleUrls: ['./license-information-screen.component.scss'], }) export class LicenseInformationScreenComponent implements OnInit { readonly currentUser = this._userService.currentUser; @@ -19,8 +19,8 @@ export class LicenseInformationScreenComponent implements OnInit { { label: _('license-info-screen.email-report'), action: (): void => this.sendMail(), - type: IconButtonTypes.primary - } + type: IconButtonTypes.primary, + }, ]; currentInfo: LicenseReport = {}; @@ -33,12 +33,12 @@ export class LicenseInformationScreenComponent implements OnInit { lineChartScheme = { selectable: true, group: 'Ordinal', - domain: ['#dd4d50', '#5ce594', '#0389ec'] + domain: ['#dd4d50', '#5ce594', '#0389ec'], }; comboBarScheme = { selectable: true, group: 'Ordinal', - domain: ['#0389ec'] + domain: ['#0389ec'], }; constructor( @@ -47,7 +47,7 @@ export class LicenseInformationScreenComponent implements OnInit { private readonly _loadingService: LoadingService, readonly routerHistoryService: RouterHistoryService, private readonly _translateService: TranslateService, - private readonly _licenseReportController: LicenseReportControllerService + private readonly _licenseReportController: LicenseReportControllerService, ) { _loadingService.start(); } @@ -65,16 +65,16 @@ export class LicenseInformationScreenComponent implements OnInit { const currentConfig = { startDate: startDate.toDate(), - endDate: endDate.toDate() + endDate: endDate.toDate(), }; const promises = [ this._licenseReportController.licenseReport(currentConfig).toPromise(), - this._licenseReportController.licenseReport({}).toPromise() + this._licenseReportController.licenseReport({}).toPromise(), ]; if (endDate.isBefore(moment())) { const unlicensedConfig = { - startDate: endDate.toDate() + startDate: endDate.toDate(), }; promises.push(this._licenseReportController.licenseReport(unlicensedConfig).toPromise()); } @@ -92,16 +92,16 @@ export class LicenseInformationScreenComponent implements OnInit { sendMail(): void { const licenseCustomer = this.configService.values.LICENSE_CUSTOMER; const subject = this._translateService.instant('license-info-screen.email.title', { - licenseCustomer + licenseCustomer, }); const lineBreak = '%0D%0A'; const body = [ this._translateService.instant('license-info-screen.email.body.analyzed', { - pages: this.currentInfo.numberOfAnalyzedPages + pages: this.currentInfo.numberOfAnalyzedPages, }), this._translateService.instant('license-info-screen.email.body.licensed', { - pages: this.totalLicensedNumberOfPages - }) + pages: this.totalLicensedNumberOfPages, + }), ].join(lineBreak); window.location.href = `mailto:${this.configService.values.LICENSE_EMAIL}?subject=${subject}&body=${body}`; } @@ -120,7 +120,7 @@ export class LicenseInformationScreenComponent implements OnInit { while (m <= endMonth && y <= endYear) { totalLicensedSeries.push({ name: `${moment.localeData().monthsShort(moment([y, m]))} ${y}`, - value: this.totalLicensedNumberOfPages + value: this.totalLicensedNumberOfPages, }); let nm = m + 1; @@ -134,9 +134,9 @@ export class LicenseInformationScreenComponent implements OnInit { this._licenseReportController .licenseReport({ startDate: moment(`01-${m + 1}-${y}`, 'DD-MM-YYYY').toDate(), - endDate: moment(`01-${nm + 1}-${ny}`, 'DD-MM-YYYY').toDate() + endDate: moment(`01-${nm + 1}-${ny}`, 'DD-MM-YYYY').toDate(), }) - .toPromise() + .toPromise(), ); y = ny; @@ -153,11 +153,11 @@ export class LicenseInformationScreenComponent implements OnInit { cumulativePages += report.numberOfAnalyzedPages; this.barChart.push({ name: `${moment.localeData().monthsShort(moment([y, m]))} ${y}`, - value: report.numberOfAnalyzedPages + value: report.numberOfAnalyzedPages, }); cumulativePagesSeries.push({ name: `${moment.localeData().monthsShort(moment([y, m]))} ${y}`, - value: cumulativePages + value: cumulativePages, }); m++; if (m === 12) { @@ -169,12 +169,12 @@ export class LicenseInformationScreenComponent implements OnInit { this.lineChartSeries = [ { name: this._translateService.instant('license-info-screen.chart.licensed-total'), - series: totalLicensedSeries + series: totalLicensedSeries, }, { name: this._translateService.instant('license-info-screen.chart.cumulative'), - series: cumulativePagesSeries - } + series: cumulativePagesSeries, + }, ]; } } diff --git a/apps/red-ui/src/app/modules/admin/screens/reports/reports-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/reports/reports-screen.component.ts index 74068c51d..c6ff0871f 100644 --- a/apps/red-ui/src/app/modules/admin/screens/reports/reports-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/reports/reports-screen.component.ts @@ -7,7 +7,7 @@ import { ConfirmationDialogInput, LoadingService, Toaster } from '@iqser/common- import { PermissionsService } from '@services/permissions.service'; import { generalPlaceholdersDescriptionsTranslations, - placeholdersDescriptionsTranslations + placeholdersDescriptionsTranslations, } from '../../translations/placeholders-descriptions-translations'; import { removeBraces } from '@utils/functions'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @@ -26,7 +26,7 @@ const placeholderTypes: PlaceholderType[] = ['generalPlaceholders', 'fileAttribu @Component({ selector: 'redaction-reports-screen', templateUrl: './reports-screen.component.html', - styleUrls: ['./reports-screen.component.scss'] + styleUrls: ['./reports-screen.component.scss'], }) export class ReportsScreenComponent implements OnInit { placeholders: Placeholder[]; @@ -42,7 +42,7 @@ export class ReportsScreenComponent implements OnInit { private readonly _dialogService: AdminDialogService, private readonly _toaster: Toaster, private readonly _loadingService: LoadingService, - readonly permissionsService: PermissionsService + readonly permissionsService: PermissionsService, ) {} async ngOnInit() { @@ -52,7 +52,7 @@ export class ReportsScreenComponent implements OnInit { this._loadingService.stop(); } - async uploadTemplate($event) { + uploadTemplate($event) { this._loadingService.loadWhile(this._uploadTemplate($event)); } @@ -66,7 +66,7 @@ export class ReportsScreenComponent implements OnInit { } deleteTemplate(template: ReportTemplate) { - this._dialogService.openDialog('confirm', null, null, async () => { + this._dialogService.openDialog('confirm', null, null, () => { this._loadingService.loadWhile(this._deleteTemplate(template)); }); } @@ -98,8 +98,8 @@ export class ReportsScreenComponent implements OnInit { denyText: _('confirmation-dialog.upload-report-template.deny-text'), alternativeConfirmationText: _('confirmation-dialog.upload-report-template.alternate-confirmation-text'), translateParams: { - fileName: file.name - } + fileName: file.name, + }, }); this._dialogService.openDialog('confirm', null, data, null, async result => { if (result) { @@ -133,8 +133,8 @@ export class ReportsScreenComponent implements OnInit { placeholdersResponse[type].map(placeholder => ({ placeholder, descriptionTranslation: this._getPlaceholderDescriptionTranslation(type, placeholder), - attributeName: this._getAttributeName(placeholder) - })) + attributeName: this._getAttributeName(placeholder), + })), ); } diff --git a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts index 996e22b9f..6b9a7a0ed 100644 --- a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts @@ -16,7 +16,7 @@ import IStandaloneEditorConstructionOptions = monaco.editor.IStandaloneEditorCon @Component({ selector: 'redaction-rules-screen', templateUrl: './rules-screen.component.html', - styleUrls: ['./rules-screen.component.scss'] + styleUrls: ['./rules-screen.component.scss'], }) export class RulesScreenComponent extends ComponentHasChanges implements OnInit { readonly iconButtonTypes = IconButtonTypes; @@ -24,7 +24,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit theme: 'vs', language: 'java', automaticLayout: true, - readOnly: !this.permissionsService.isAdmin() + readOnly: !this.permissionsService.isAdmin(), }; initialLines: string[] = []; @@ -44,7 +44,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit private readonly _toaster: Toaster, protected readonly _translateService: TranslateService, private readonly _activatedRoute: ActivatedRoute, - private readonly _loadingService: LoadingService + private readonly _loadingService: LoadingService, ) { super(_translateService); } @@ -73,8 +73,8 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit inherit: true, rules: [], colors: { - 'editor.lineHighlightBackground': '#f4f5f7' - } + 'editor.lineHighlightBackground': '#f4f5f7', + }, }); (window as any).monaco.editor.setTheme('redaction'); } @@ -91,7 +91,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit await this._rulesControllerService .uploadRules({ rules: this._codeEditor.getModel().getValue(), - dossierTemplateId: this._dossierTemplatesService.activeDossierTemplateId + dossierTemplateId: this._dossierTemplatesService.activeDossierTemplateId, }) .toPromise() .then( @@ -102,7 +102,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit () => { this._loadingService.stop(); this._toaster.error(_('rules-screen.error.generic')); - } + }, ); } @@ -115,7 +115,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit download(): void { const content = this._codeEditor.getModel().getValue(); const blob = new Blob([content], { - type: 'text/plain;charset=utf-8' + type: 'text/plain;charset=utf-8', }); saveAs(blob, 'rules.txt'); } @@ -142,7 +142,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit return { range: new monaco.Range(line, 1, line, 1), - options: { isWholeLine: true, className: 'changed-row-marker' } + options: { isWholeLine: true, className: 'changed-row-marker' }, } as IModelDeltaDecoration; } @@ -156,7 +156,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit this.currentLines = this.initialLines = rules.rules.split('\n'); this.revert(); }, - () => this._loadingService.stop() + () => this._loadingService.stop(), ); } } diff --git a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.ts index 8d67242a0..b0032d04e 100644 --- a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.ts @@ -9,7 +9,7 @@ import { LoadingService, SortingOrders, TableColumnConfig, - TitleColors + TitleColors, } from '@iqser/common-ui'; import { ConfigService } from '@services/config.service'; import * as moment from 'moment'; @@ -30,7 +30,7 @@ interface DossierListItem extends IDossier, IListable { templateUrl: './trash-screen.component.html', styleUrls: ['./trash-screen.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => TrashScreenComponent) }] + providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => TrashScreenComponent) }], }) export class TrashScreenComponent extends ListingComponent implements OnInit { readonly circleButtonTypes = CircleButtonTypes; @@ -40,7 +40,7 @@ export class TrashScreenComponent extends ListingComponent impl { label: _('trash.table-col-names.name'), sortByKey: 'searchKey' }, { label: _('trash.table-col-names.owner'), class: 'user-column' }, { label: _('trash.table-col-names.deleted-on'), sortByKey: 'softDeletedTime' }, - { label: _('trash.table-col-names.time-to-restore'), sortByKey: 'softDeletedTime' } + { label: _('trash.table-col-names.time-to-restore'), sortByKey: 'softDeletedTime' }, ]; constructor( @@ -49,7 +49,7 @@ export class TrashScreenComponent extends ListingComponent impl private readonly _dossiersService: DossiersService, readonly routerHistoryService: RouterHistoryService, private readonly _configService: ConfigService, - private readonly _adminDialogService: AdminDialogService + private readonly _adminDialogService: AdminDialogService, ) { super(_injector); } @@ -57,7 +57,7 @@ export class TrashScreenComponent extends ListingComponent impl private get _canRestoreSelected$(): Observable { return this.listingService.selectedEntities$.pipe( map(entities => entities.length && !entities.find(dossier => !dossier.canRestore)), - distinctUntilChanged() + distinctUntilChanged(), ); } @@ -68,7 +68,7 @@ export class TrashScreenComponent extends ListingComponent impl await this._loadDossiersData(); this.sortingService.setSortingOption({ column: 'softDeletedTime', - order: SortingOrders.desc + order: SortingOrders.desc, }); this._loadingService.stop(); } @@ -84,10 +84,10 @@ export class TrashScreenComponent extends ListingComponent impl denyText: _('confirmation-dialog.delete-dossier.deny-text'), translateParams: { dossierName: dossiers[0].dossierName, - dossiersCount: dossiers.length - } + dossiersCount: dossiers.length, + }, }); - this._adminDialogService.openDialog('confirm', null, data, async () => { + this._adminDialogService.openDialog('confirm', null, data, () => { this._loadingService.loadWhile(this._hardDelete(dossiers)); }); } @@ -123,7 +123,7 @@ export class TrashScreenComponent extends ListingComponent impl restoreDate, canRestore: this._canRestoreDossier(restoreDate), // Because of migrations, for some this is not set - softDeletedTime: dossier.softDeletedTime || '-' + softDeletedTime: dossier.softDeletedTime || '-', }; } diff --git a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.ts index 4ae84286d..63bcb3642 100644 --- a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.ts @@ -11,7 +11,7 @@ import { IconButtonTypes, ListingComponent, LoadingService, - TableColumnConfig + TableColumnConfig, } from '@iqser/common-ui'; import { InitialsAvatarComponent } from '@shared/components/initials-avatar/initials-avatar.component'; import { Observable } from 'rxjs'; @@ -23,7 +23,7 @@ import { User } from '@models/user'; @Component({ templateUrl: './user-listing-screen.component.html', styleUrls: ['./user-listing-screen.component.scss'], - providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => UserListingScreenComponent) }] + providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => UserListingScreenComponent) }], }) export class UserListingScreenComponent extends ListingComponent implements OnInit { readonly translations = rolesTranslations; @@ -36,7 +36,7 @@ export class UserListingScreenComponent extends ListingComponent implement { label: _('user-listing.table-col-names.name'), width: '2fr' }, { label: _('user-listing.table-col-names.email') }, { label: _('user-listing.table-col-names.active'), class: 'flex-center' }, - { label: _('user-listing.table-col-names.roles') } + { label: _('user-listing.table-col-names.roles') }, ]; collapsedDetails = false; chartData: DoughnutChartConfig[] = []; @@ -50,7 +50,7 @@ export class UserListingScreenComponent extends ListingComponent implement private readonly _dialogService: AdminDialogService, private readonly _translateService: TranslateService, private readonly _userControllerService: UserControllerService, - private readonly _translateChartService: TranslateChartService + private readonly _translateChartService: TranslateChartService, ) { super(_injector); } @@ -108,34 +108,34 @@ export class UserListingScreenComponent extends ListingComponent implement { value: this.allEntities.filter(user => !user.isActive).length, color: 'INACTIVE', - label: 'INACTIVE' + label: 'INACTIVE', }, { value: this.allEntities.filter(user => user.roles.length === 1 && user.roles[0] === 'RED_USER').length, color: 'REGULAR', - label: 'REGULAR' + label: 'REGULAR', }, { value: this.allEntities.filter(user => user.isManager && !user.isAdmin).length, color: 'MANAGER', - label: 'RED_MANAGER' + label: 'RED_MANAGER', }, { value: this.allEntities.filter(user => user.isManager && user.isAdmin).length, color: 'MANAGER_ADMIN', - label: 'MANAGER_ADMIN' + label: 'MANAGER_ADMIN', }, { value: this.allEntities.filter(user => user.isUserAdmin && !user.isAdmin).length, color: 'USER_ADMIN', - label: 'RED_USER_ADMIN' + label: 'RED_USER_ADMIN', }, { value: this.allEntities.filter(user => user.isAdmin && !user.isManager).length, color: 'ADMIN', - label: 'RED_ADMIN' - } - ].filter(type => type.value > 0) + label: 'RED_ADMIN', + }, + ].filter(type => type.value > 0), ); } } diff --git a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.ts index 83de4efd6..fb11607b3 100644 --- a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.ts @@ -18,13 +18,13 @@ export const DEFAULT_WATERMARK: WatermarkModel = { opacity: 70, fontSize: 11, fontType: 'sans-serif', - orientation: WatermarkModel.OrientationEnum.DIAGONAL + orientation: WatermarkModel.OrientationEnum.DIAGONAL, } as const; @Component({ selector: 'redaction-watermark-screen', templateUrl: './watermark-screen.component.html', - styleUrls: ['./watermark-screen.component.scss'] + styleUrls: ['./watermark-screen.component.scss'], }) export class WatermarkScreenComponent implements OnInit { readonly iconButtonTypes = IconButtonTypes; @@ -44,7 +44,7 @@ export class WatermarkScreenComponent implements OnInit { private readonly _formBuilder: FormBuilder, private readonly _activatedRoute: ActivatedRoute, private readonly _dossierTemplatesService: DossierTemplatesService, - private readonly _loadingService: LoadingService + private readonly _loadingService: LoadingService, ) { this._loadingService.start(); this._initForm(); @@ -73,7 +73,7 @@ export class WatermarkScreenComponent implements OnInit { save() { const watermark = { - ...this.configForm.getRawValue() + ...this.configForm.getRawValue(), }; const dossierTemplateId = this._dossierTemplatesService.activeDossierTemplateId; @@ -86,10 +86,10 @@ export class WatermarkScreenComponent implements OnInit { () => { this._loadWatermark(); this._toaster.success( - watermark.text ? _('watermark-screen.action.change-success') : _('watermark-screen.action.delete-success') + watermark.text ? _('watermark-screen.action.change-success') : _('watermark-screen.action.delete-success'), ); }, - () => this._toaster.error(_('watermark-screen.action.error')) + () => this._toaster.error(_('watermark-screen.action.error')), ); } @@ -118,7 +118,7 @@ export class WatermarkScreenComponent implements OnInit { this._watermark = DEFAULT_WATERMARK; this.configForm.setValue({ ...this._watermark }); this._loadViewer(); - } + }, ); } @@ -131,9 +131,9 @@ export class WatermarkScreenComponent implements OnInit { css: this._baseHref + '/assets/pdftron/stylesheet.css', fullAPI: true, isReadOnly: true, - backendType: 'ems' + backendType: 'ems', }, - this._viewer.nativeElement + this._viewer.nativeElement, ).then(instance => { this._instance = instance; @@ -146,7 +146,7 @@ export class WatermarkScreenComponent implements OnInit { return this._http .request('get', '/assets/pdftron/blank.pdf', { - responseType: 'blob' + responseType: 'blob', }) .subscribe(blobData => { this._instance.UI.loadDocument(blobData, { filename: 'blank.pdf' }); @@ -182,38 +182,38 @@ export class WatermarkScreenComponent implements OnInit { hexColor: [ { value: null, - disabled: !this.permissionsService.isAdmin() + disabled: !this.permissionsService.isAdmin(), }, - Validators.required + Validators.required, ], opacity: [ { value: null, - disabled: !this.permissionsService.isAdmin() + disabled: !this.permissionsService.isAdmin(), }, - Validators.required + Validators.required, ], fontSize: [ { value: null, - disabled: !this.permissionsService.isAdmin() + disabled: !this.permissionsService.isAdmin(), }, - Validators.required + Validators.required, ], fontType: [ { value: null, - disabled: !this.permissionsService.isAdmin() + disabled: !this.permissionsService.isAdmin(), }, - Validators.required + Validators.required, ], orientation: [ { value: null, - disabled: !this.permissionsService.isAdmin() + disabled: !this.permissionsService.isAdmin(), }, - Validators.required - ] + Validators.required, + ], }); } } diff --git a/apps/red-ui/src/app/modules/admin/services/admin-dialog.service.ts b/apps/red-ui/src/app/modules/admin/services/admin-dialog.service.ts index efb040bad..3ca7d13af 100644 --- a/apps/red-ui/src/app/modules/admin/services/admin-dialog.service.ts +++ b/apps/red-ui/src/app/modules/admin/services/admin-dialog.service.ts @@ -37,47 +37,47 @@ type AdminDialogConfig = { export class AdminDialogService extends DialogService { protected readonly _config: AdminDialogConfig = { confirm: { - component: ConfirmationDialogComponent + component: ConfirmationDialogComponent, }, addEditDictionary: { component: AddEditDictionaryDialogComponent, - dialogConfig: { autoFocus: true } + dialogConfig: { autoFocus: true }, }, editColor: { component: EditColorDialogComponent, - dialogConfig: { autoFocus: true } + dialogConfig: { autoFocus: true }, }, addEditFileAttribute: { component: AddEditFileAttributeDialogComponent, - dialogConfig: { autoFocus: true } + dialogConfig: { autoFocus: true }, }, deleteFileAttribute: { - component: ConfirmDeleteFileAttributeDialogComponent + component: ConfirmDeleteFileAttributeDialogComponent, }, importFileAttributes: { component: FileAttributesCsvImportDialogComponent, - dialogConfig: largeDialogConfig + dialogConfig: largeDialogConfig, }, deleteUsers: { component: ConfirmDeleteUsersDialogComponent, - dialogConfig: { autoFocus: true } + dialogConfig: { autoFocus: true }, }, addEditUser: { component: AddEditUserDialogComponent, - dialogConfig: { autoFocus: true } + dialogConfig: { autoFocus: true }, }, smtpAuthConfig: { component: SmtpAuthDialogComponent, - dialogConfig: { autoFocus: true } + dialogConfig: { autoFocus: true }, }, addEditDossierTemplate: { component: AddEditDossierTemplateDialogComponent, - dialogConfig: { width: '900px', autoFocus: true } + dialogConfig: { width: '900px', autoFocus: true }, }, addEditDossierAttribute: { component: AddEditDossierAttributeDialogComponent, - dialogConfig: { autoFocus: true } - } + dialogConfig: { autoFocus: true }, + }, }; constructor(protected readonly _dialog: MatDialog) { diff --git a/apps/red-ui/src/app/modules/admin/translations/admin-side-nav-translations.ts b/apps/red-ui/src/app/modules/admin/translations/admin-side-nav-translations.ts index b3c5972b5..7103ed3be 100644 --- a/apps/red-ui/src/app/modules/admin/translations/admin-side-nav-translations.ts +++ b/apps/red-ui/src/app/modules/admin/translations/admin-side-nav-translations.ts @@ -2,5 +2,5 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; export const adminSideNavTranslations = { settings: _('admin-side-nav.settings'), - dossierTemplates: _('admin-side-nav.dossier-templates') + dossierTemplates: _('admin-side-nav.dossier-templates'), }; diff --git a/apps/red-ui/src/app/modules/admin/translations/audit-categories-translations.ts b/apps/red-ui/src/app/modules/admin/translations/audit-categories-translations.ts index 82a25e8a7..b0bbb0552 100644 --- a/apps/red-ui/src/app/modules/admin/translations/audit-categories-translations.ts +++ b/apps/red-ui/src/app/modules/admin/translations/audit-categories-translations.ts @@ -12,5 +12,5 @@ export const auditCategoriesTranslations: { [key: string]: string } = { USER: _('audit-screen.categories.user'), DOCUMENT: _('audit-screen.categories.document'), AUDIT: _('audit-screen.categories.audit'), - DOSSIER_TEMPLATE: _('audit-screen.categories.dossier-template') + DOSSIER_TEMPLATE: _('audit-screen.categories.dossier-template'), }; diff --git a/apps/red-ui/src/app/modules/admin/translations/default-colors-translations.ts b/apps/red-ui/src/app/modules/admin/translations/default-colors-translations.ts index f14212fcb..01a862b21 100644 --- a/apps/red-ui/src/app/modules/admin/translations/default-colors-translations.ts +++ b/apps/red-ui/src/app/modules/admin/translations/default-colors-translations.ts @@ -10,5 +10,5 @@ export const defaultColorsTranslations: { [key in DefaultColorType]: string } = previewColor: _('default-colors-screen.types.previewColor'), requestAdd: _('default-colors-screen.types.requestAdd'), requestRemove: _('default-colors-screen.types.requestRemove'), - updatedColor: _('default-colors-screen.types.updatedColor') + updatedColor: _('default-colors-screen.types.updatedColor'), }; diff --git a/apps/red-ui/src/app/modules/admin/translations/dossier-attribute-types-translations.ts b/apps/red-ui/src/app/modules/admin/translations/dossier-attribute-types-translations.ts index 7c24b71e2..451b9b0ed 100644 --- a/apps/red-ui/src/app/modules/admin/translations/dossier-attribute-types-translations.ts +++ b/apps/red-ui/src/app/modules/admin/translations/dossier-attribute-types-translations.ts @@ -5,5 +5,5 @@ export const dossierAttributeTypesTranslations: { [key in DossierAttributeConfig TEXT: _('dossier-attribute-types.text'), NUMBER: _('dossier-attribute-types.number'), DATE: _('dossier-attribute-types.date'), - IMAGE: _('dossier-attribute-types.image') + IMAGE: _('dossier-attribute-types.image'), }; diff --git a/apps/red-ui/src/app/modules/admin/translations/file-attribute-types-translations.ts b/apps/red-ui/src/app/modules/admin/translations/file-attribute-types-translations.ts index 84898cdb8..438e55d17 100644 --- a/apps/red-ui/src/app/modules/admin/translations/file-attribute-types-translations.ts +++ b/apps/red-ui/src/app/modules/admin/translations/file-attribute-types-translations.ts @@ -4,5 +4,5 @@ import { FileAttributeConfigType } from '@redaction/red-ui-http'; export const fileAttributeTypesTranslations: { [key in FileAttributeConfigType]: string } = { TEXT: _('file-attribute-types.text'), NUMBER: _('file-attribute-types.number'), - DATE: _('file-attribute-types.date') + DATE: _('file-attribute-types.date'), }; diff --git a/apps/red-ui/src/app/modules/admin/translations/placeholders-descriptions-translations.ts b/apps/red-ui/src/app/modules/admin/translations/placeholders-descriptions-translations.ts index 277cc012f..b97f0b351 100644 --- a/apps/red-ui/src/app/modules/admin/translations/placeholders-descriptions-translations.ts +++ b/apps/red-ui/src/app/modules/admin/translations/placeholders-descriptions-translations.ts @@ -2,7 +2,7 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; export const placeholdersDescriptionsTranslations: { [key: string]: string } = { dossierAttributePlaceholders: _('reports-screen.descriptions.dossier-attributes'), - fileAttributePlaceholders: _('reports-screen.descriptions.file-attributes') + fileAttributePlaceholders: _('reports-screen.descriptions.file-attributes'), }; export const generalPlaceholdersDescriptionsTranslations: { [key: string]: string } = { @@ -14,5 +14,5 @@ export const generalPlaceholdersDescriptionsTranslations: { [key: string]: strin 'date.dd.MM.yyyy': _('reports-screen.descriptions.general.date.d-m-y'), 'date.MM/dd/yyyy': _('reports-screen.descriptions.general.date.m-d-y'), 'time.HH:mm': _('reports-screen.descriptions.general.time.h-m'), - 'dossier.name': _('reports-screen.descriptions.general.dossier.name') + 'dossier.name': _('reports-screen.descriptions.general.dossier.name'), }; diff --git a/apps/red-ui/src/app/modules/auth/auth.guard.ts b/apps/red-ui/src/app/modules/auth/auth.guard.ts index 180aba176..12803b3b0 100644 --- a/apps/red-ui/src/app/modules/auth/auth.guard.ts +++ b/apps/red-ui/src/app/modules/auth/auth.guard.ts @@ -6,7 +6,7 @@ import { ConfigService } from '@services/config.service'; import { BASE_HREF } from '../../tokens'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class AuthGuard extends KeycloakAuthGuard { constructor( @@ -14,7 +14,7 @@ export class AuthGuard extends KeycloakAuthGuard { private readonly _userService: UserService, protected readonly _keycloak: KeycloakService, private readonly _configService: ConfigService, - @Inject(BASE_HREF) private readonly _baseHref: string + @Inject(BASE_HREF) private readonly _baseHref: string, ) { super(_router, _keycloak); } @@ -24,7 +24,7 @@ export class AuthGuard extends KeycloakAuthGuard { const kcIdpHint = route.queryParamMap.get('kc_idp_hint'); await this._keycloak.login({ idpHint: kcIdpHint ?? this._configService.values.OAUTH_IDP_HINT, - redirectUri: window.location.origin + this._baseHref + state.url + redirectUri: window.location.origin + this._baseHref + state.url, }); return false; } diff --git a/apps/red-ui/src/app/modules/auth/auth.module.ts b/apps/red-ui/src/app/modules/auth/auth.module.ts index 38a01373e..a4c4cd032 100644 --- a/apps/red-ui/src/app/modules/auth/auth.module.ts +++ b/apps/red-ui/src/app/modules/auth/auth.module.ts @@ -7,20 +7,8 @@ import { ConfigService } from '@services/config.service'; import { BASE_HREF } from '../../tokens'; import { environment } from '@environments/environment'; -export function keycloakInitializer(keycloakService: KeycloakService, configService: ConfigService, baseUrl: string): () => Promise { - return () => - configService - .loadAppConfig() - .toPromise() - .then(() => - keycloakService - .init(getKeycloakOptions(configService, baseUrl)) - .then(() => configureAutomaticRedirectToLoginScreen(keycloakService)) - ); -} - function getKeycloakOptions(configService: ConfigService, baseUrl: string) { - let url = configService.values.OAUTH_URL; + let url: string = configService.values.OAUTH_URL; url = url.replace(/\/$/, ''); // remove trailing slash const realm = url.substring(url.lastIndexOf('/') + 1, url.length); url = url.substr(0, url.lastIndexOf('/realms')); @@ -28,7 +16,7 @@ function getKeycloakOptions(configService: ConfigService, baseUrl: string) { config: { url: url, realm: realm, - clientId: configService.values.OAUTH_CLIENT_ID + clientId: configService.values.OAUTH_CLIENT_ID, }, initOptions: { checkLoginIframe: false, @@ -36,9 +24,9 @@ function getKeycloakOptions(configService: ConfigService, baseUrl: string) { silentCheckSsoRedirectUri: environment.production ? window.location.origin + baseUrl + '/assets/oauth/silent-refresh.html' : null, - flow: 'standard' + flow: 'standard', }, - enableBearerInterceptor: true + enableBearerInterceptor: true, }; return options; } @@ -49,6 +37,18 @@ function configureAutomaticRedirectToLoginScreen(keyCloakService: KeycloakServic }; } +export function keycloakInitializer(keycloakService: KeycloakService, configService: ConfigService, baseUrl: string): () => Promise { + return () => + configService + .loadAppConfig() + .toPromise() + .then(() => + keycloakService + .init(getKeycloakOptions(configService, baseUrl)) + .then(() => configureAutomaticRedirectToLoginScreen(keycloakService)), + ); +} + @NgModule({ imports: [CommonModule, HttpClientModule, KeycloakAngularModule], providers: [ @@ -56,8 +56,8 @@ function configureAutomaticRedirectToLoginScreen(keyCloakService: KeycloakServic provide: APP_INITIALIZER, useFactory: keycloakInitializer, multi: true, - deps: [KeycloakService, ConfigService, BASE_HREF] - } - ] + deps: [KeycloakService, ConfigService, BASE_HREF], + }, + ], }) export class AuthModule {} diff --git a/apps/red-ui/src/app/modules/auth/red-role.guard.ts b/apps/red-ui/src/app/modules/auth/red-role.guard.ts index 88404170f..524ba77e2 100644 --- a/apps/red-ui/src/app/modules/auth/red-role.guard.ts +++ b/apps/red-ui/src/app/modules/auth/red-role.guard.ts @@ -5,13 +5,13 @@ import { LoadingService } from '@iqser/common-ui'; import { Observable } from 'rxjs'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class RedRoleGuard implements CanActivate { constructor( protected readonly _router: Router, private readonly _loadingService: LoadingService, - private readonly _userService: UserService + private readonly _userService: UserService, ) {} canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { diff --git a/apps/red-ui/src/app/modules/dossier/components/annotation-actions/annotation-actions.component.ts b/apps/red-ui/src/app/modules/dossier/components/annotation-actions/annotation-actions.component.ts index 44159abd0..2b86746fd 100644 --- a/apps/red-ui/src/app/modules/dossier/components/annotation-actions/annotation-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/annotation-actions/annotation-actions.component.ts @@ -9,7 +9,7 @@ import { UserService } from '@services/user.service'; export const AnnotationButtonTypes = { dark: 'dark', - primary: 'primary' + primary: 'primary', } as const; export type AnnotationButtonType = keyof typeof AnnotationButtonTypes; @@ -17,7 +17,7 @@ export type AnnotationButtonType = keyof typeof AnnotationButtonTypes; @Component({ selector: 'redaction-annotation-actions', templateUrl: './annotation-actions.component.html', - styleUrls: ['./annotation-actions.component.scss'] + styleUrls: ['./annotation-actions.component.scss'], }) export class AnnotationActionsComponent implements OnInit { @Input() buttonType: AnnotationButtonType = AnnotationButtonTypes.dark; @@ -32,7 +32,7 @@ export class AnnotationActionsComponent implements OnInit { readonly appStateService: AppStateService, readonly annotationActionsService: AnnotationActionsService, private readonly _permissionsService: PermissionsService, - private readonly _userService: UserService + private readonly _userService: UserService, ) {} private _annotations: AnnotationWrapper[]; @@ -94,7 +94,7 @@ export class AnnotationActionsComponent implements OnInit { this.annotationPermissions = AnnotationPermissions.forUser( this._permissionsService.isApprover(), this._userService.currentUser, - this.annotations + this.annotations, ); } } diff --git a/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.ts b/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.ts index 19ce51c9f..71c40a505 100644 --- a/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.ts @@ -8,7 +8,7 @@ import { PermissionsService } from '@services/permissions.service'; @Component({ selector: 'redaction-comments', templateUrl: './comments.component.html', - styleUrls: ['./comments.component.scss'] + styleUrls: ['./comments.component.scss'], }) export class CommentsComponent { @Input() annotation: AnnotationWrapper; @@ -17,7 +17,7 @@ export class CommentsComponent { constructor( readonly permissionsService: PermissionsService, private readonly _userService: UserService, - private readonly _manualAnnotationService: ManualAnnotationService + private readonly _manualAnnotationService: ManualAnnotationService, ) {} addComment(value: string): void { @@ -31,7 +31,7 @@ export class CommentsComponent { this.annotation.comments.push({ text: value, id: parseInt(commentResponse.commentId, 10), - user: this._userService.currentUser.id + user: this._userService.currentUser.id, }); }); } diff --git a/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.ts b/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.ts index 8bf1714fe..d6aed5cdc 100644 --- a/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.ts @@ -11,7 +11,7 @@ import { DossierTemplatesService } from '../../services/dossier-templates.servic @Component({ selector: 'redaction-document-info', templateUrl: './document-info.component.html', - styleUrls: ['./document-info.component.scss'] + styleUrls: ['./document-info.component.scss'], }) export class DocumentInfoComponent extends AutoUnsubscribe implements OnInit { @Input() file: File; @@ -24,7 +24,7 @@ export class DocumentInfoComponent extends AutoUnsubscribe implements OnInit { private readonly _dossiersService: DossiersService, private readonly _dossierTemplatesService: DossierTemplatesService, private readonly _fileAttributesService: FileAttributesService, - private readonly _dialogService: DossiersDialogService + private readonly _dialogService: DossiersDialogService, ) { super(); } diff --git a/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotation-source/annotation-source.component.ts b/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotation-source/annotation-source.component.ts index f22c9eaa9..d59bedd06 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotation-source/annotation-source.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotation-source/annotation-source.component.ts @@ -9,12 +9,10 @@ interface Engine { readonly show: boolean; } -type Engines = readonly Engine[]; - const Engines = { DICTIONARY: 'DICTIONARY', NER: 'NER', - RULE: 'RULE' + RULE: 'RULE', } as const; type EngineName = keyof typeof Engines; @@ -23,7 +21,7 @@ type EngineName = keyof typeof Engines; selector: 'redaction-annotation-source', templateUrl: './annotation-source.component.html', styleUrls: ['./annotation-source.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class AnnotationSourceComponent { @Input() @@ -31,7 +29,7 @@ export class AnnotationSourceComponent { annotation: AnnotationWrapper; isPopoverOpen = false; - engines: Engines; + engines: readonly Engine[]; constructor(private readonly _translateService: TranslateService) {} @@ -44,18 +42,18 @@ export class AnnotationSourceComponent { { icon: 'red:dictionary', description: this._translateService.instant('annotation-engines.dictionary'), - show: this._isBasedOn(Engines.DICTIONARY) + show: this._isBasedOn(Engines.DICTIONARY), }, { icon: 'red:ai', description: this._translateService.instant('annotation-engines.ner'), - show: this._isBasedOn(Engines.NER) + show: this._isBasedOn(Engines.NER), }, { icon: 'red:rule', description: this._translateService.instant('annotation-engines.rule', { rule: this.annotation.legalBasisValue }), - show: this._isBasedOn(Engines.RULE) - } + show: this._isBasedOn(Engines.RULE), + }, ]; } diff --git a/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotations-list/annotations-list.component.ts b/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotations-list/annotations-list.component.ts index 391e02415..bd0859d21 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotations-list/annotations-list.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotations-list/annotations-list.component.ts @@ -6,7 +6,7 @@ import { IqserEventTarget } from '@iqser/common-ui'; selector: 'redaction-annotations-list', templateUrl: './annotations-list.component.html', styleUrls: ['./annotations-list.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class AnnotationsListComponent { @Input() annotations: AnnotationWrapper[]; @@ -37,7 +37,7 @@ export class AnnotationsListComponent { } this.selectAnnotations.emit({ annotations: [annotation], - multiSelect: this.multiSelectActive + multiSelect: this.multiSelectActive, }); } } diff --git a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts index 3b86ddd81..abeb97c36 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts @@ -16,7 +16,7 @@ const ALL_HOTKEY_ARRAY = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown']; @Component({ selector: 'redaction-file-workload', templateUrl: './file-workload.component.html', - styleUrls: ['./file-workload.component.scss'] + styleUrls: ['./file-workload.component.scss'], }) export class FileWorkloadComponent { readonly iconButtonTypes = IconButtonTypes; @@ -52,7 +52,7 @@ export class FileWorkloadComponent { private readonly _permissionsService: PermissionsService, private readonly _changeDetectorRef: ChangeDetectorRef, private readonly _filterService: FilterService, - private readonly _annotationProcessingService: AnnotationProcessingService + private readonly _annotationProcessingService: AnnotationProcessingService, ) { this.displayedAnnotations$ = this._displayedAnnotations$; } @@ -99,7 +99,7 @@ export class FileWorkloadComponent { const secondary$ = this._filterService.getFilterModels$('secondaryFilters'); return combineLatest([this._annotations$.asObservable(), primary$, secondary$]).pipe( - map(([annotations, primary, secondary]) => this._filterAnnotations(annotations, primary, secondary)) + map(([annotations, primary, secondary]) => this._filterAnnotations(annotations, primary, secondary)), ); } @@ -109,7 +109,7 @@ export class FileWorkloadComponent { behavior: 'smooth', scrollMode: mode, block: 'start', - inline: 'start' + inline: 'start', }); } } @@ -185,7 +185,7 @@ export class FileWorkloadComponent { return; } const elements = this._annotationsElement.nativeElement.querySelectorAll( - `div[annotation-id="${this._firstSelectedAnnotation?.id}"].active` + `div[annotation-id="${this._firstSelectedAnnotation?.id}"].active`, ); FileWorkloadComponent._scrollToFirstElement(elements); } @@ -228,7 +228,7 @@ export class FileWorkloadComponent { private _filterAnnotations( annotations: AnnotationWrapper[], primary: INestedFilter[], - secondary: INestedFilter[] = [] + secondary: INestedFilter[] = [], ): Map { if (!primary) { return; diff --git a/apps/red-ui/src/app/modules/dossier/components/page-exclusion/page-exclusion.component.ts b/apps/red-ui/src/app/modules/dossier/components/page-exclusion/page-exclusion.component.ts index 901096a0a..6af347ea6 100644 --- a/apps/red-ui/src/app/modules/dossier/components/page-exclusion/page-exclusion.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/page-exclusion/page-exclusion.component.ts @@ -8,7 +8,7 @@ import { File } from '@models/file/file'; @Component({ selector: 'redaction-page-exclusion', templateUrl: './page-exclusion.component.html', - styleUrls: ['./page-exclusion.component.scss'] + styleUrls: ['./page-exclusion.component.scss'], }) export class PageExclusionComponent implements OnChanges { @Input() file: File; @@ -21,7 +21,7 @@ export class PageExclusionComponent implements OnChanges { readonly permissionsService: PermissionsService, private readonly _reanalysisControllerService: ReanalysisControllerService, private readonly _toaster: Toaster, - private readonly _loadingService: LoadingService + private readonly _loadingService: LoadingService, ) {} ngOnChanges(): void { @@ -31,6 +31,7 @@ export class PageExclusionComponent implements OnChanges { return [{ startPage: page, endPage: page }]; } + // eslint-disable-next-line @typescript-eslint/restrict-plus-operands if (page === ranges[ranges.length - 1].endPage + 1) { ranges[ranges.length - 1].endPage = page; } else { @@ -52,16 +53,16 @@ export class PageExclusionComponent implements OnChanges { } return { startPage, - endPage + endPage, }; }); await this._reanalysisControllerService .excludePages( { - pageRanges: pageRanges + pageRanges: pageRanges, }, this.file.dossierId, - this.file.fileId + this.file.fileId, ) .toPromise(); this._inputComponent.reset(); @@ -77,10 +78,10 @@ export class PageExclusionComponent implements OnChanges { await this._reanalysisControllerService .includePages( { - pageRanges: [range] + pageRanges: [range], }, this.file.dossierId, - this.file.fileId + this.file.fileId, ) .toPromise(); this._inputComponent.reset(); diff --git a/apps/red-ui/src/app/modules/dossier/components/page-indicator/page-indicator.component.ts b/apps/red-ui/src/app/modules/dossier/components/page-indicator/page-indicator.component.ts index b99377e82..99e690162 100644 --- a/apps/red-ui/src/app/modules/dossier/components/page-indicator/page-indicator.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/page-indicator/page-indicator.component.ts @@ -9,7 +9,7 @@ import { DossiersService } from '../../services/dossiers.service'; @Component({ selector: 'redaction-page-indicator', templateUrl: './page-indicator.component.html', - styleUrls: ['./page-indicator.component.scss'] + styleUrls: ['./page-indicator.component.scss'], }) export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy { @Input() active: boolean; @@ -28,7 +28,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy { private readonly _appStateService: AppStateService, private readonly _dossiersService: DossiersService, private readonly _configService: ConfigService, - private readonly _permissionService: PermissionsService + private readonly _permissionService: PermissionsService, ) {} get read() { @@ -109,7 +109,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy { .subscribe(() => { this.viewedPages?.pages?.splice( this.viewedPages?.pages?.findIndex(p => p.page === this.number), - 1 + 1, ); }); } diff --git a/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.ts b/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.ts index 5f198d887..c41f737b2 100644 --- a/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.ts @@ -9,7 +9,7 @@ import { OnInit, Output, SimpleChanges, - ViewChild + ViewChild, } from '@angular/core'; import { ManualRedactionEntry } from '@redaction/red-ui-http'; import WebViewer, { Core, WebViewerInstance } from '@pdftron/webviewer'; @@ -31,14 +31,14 @@ import { PdfViewerUtils } from '../../utils/pdf-viewer.utils'; import { ViewMode } from '@models/file/view-mode'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { ActivatedRoute } from '@angular/router'; -import TextTool = Tools.TextTool; import Tools = Core.Tools; +import TextTool = Tools.TextTool; import Annotation = Core.Annotations.Annotation; @Component({ selector: 'redaction-pdf-viewer', templateUrl: './pdf-viewer.component.html', - styleUrls: ['./pdf-viewer.component.scss'] + styleUrls: ['./pdf-viewer.component.scss'], }) export class PdfViewerComponent implements OnInit, OnChanges { @Input() fileData: Blob; @@ -73,7 +73,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { private readonly _annotationDrawService: AnnotationDrawService, private readonly _annotationActionsService: AnnotationActionsService, private readonly _configService: ConfigService, - private readonly _loadingService: LoadingService + private readonly _loadingService: LoadingService, ) {} private _viewMode: ViewMode = 'STANDARD'; @@ -115,7 +115,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { this.instance.Core.documentViewer.getDisplayModeManager().setDisplayMode(instanceDisplayMode); } - async uploadFile(files: any) { + uploadFile(files: any) { const fileToCompare = files[0]; this.compareFileInput.nativeElement.value = null; @@ -152,7 +152,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { () => { this.utils.navigateToPage(1); }, - this.instance.Core.PDFNet + this.instance.Core.PDFNet, ); this._loadingService.stop(); }; @@ -167,10 +167,10 @@ export class PdfViewerComponent implements OnInit, OnChanges { translateParams: { fileName: fileToCompare.name, currentDocumentPageCount, - compareDocumentPageCount - } + compareDocumentPageCount, + }, }), - loadCompareDocument + loadCompareDocument, ); } else { await loadCompareDocument(); @@ -187,7 +187,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { await pdfNet.initialize(environment.licenseKey ? atob(environment.licenseKey) : null); const currentDocument = await pdfNet.PDFDoc.createFromBuffer(await this.fileData.arrayBuffer()); this.instance.UI.loadDocument(currentDocument, { - filename: this.file ? this.file.filename : 'document.pdf' + filename: this.file ? this.file.filename : 'document.pdf', }); this.instance.UI.disableElements(['closeCompareButton']); this.instance.UI.enableElements(['compareButton']); @@ -205,9 +205,9 @@ export class PdfViewerComponent implements OnInit, OnChanges { fullAPI: true, path: this._convertPath('/assets/wv-resources'), css: this._convertPath('/assets/pdftron/stylesheet.css'), - backendType: 'ems' + backendType: 'ems', }, - this.viewer.nativeElement + this.viewer.nativeElement, ); this.utils = new PdfViewerUtils(this.instance, this.viewMode, this.multiSelectActive); @@ -296,7 +296,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { } private _setSelectionMode(): void { - const textTool = (this.instance.Core.Tools.TextTool) as TextTool; + const textTool = ( this.instance.Core.Tools.TextTool) as TextTool; textTool.SELECTION_MODE = this._configService.values.SELECTION_MODE; } @@ -329,21 +329,21 @@ export class PdfViewerComponent implements OnInit, OnChanges { 'rotateClockwiseButton', 'rotateCounterClockwiseButton', 'annotationStyleEditButton', - 'annotationGroupButton' + 'annotationGroupButton', ]); this.instance.UI.setHeaderItems(header => { const originalHeaderItems = header.getItems(); originalHeaderItems.splice(8, 0, { type: 'divider', - dataElement: 'rectangleToolDivider' + dataElement: 'rectangleToolDivider', }); originalHeaderItems.splice(9, 0, { type: 'toolGroupButton', toolGroup: 'rectangleTools', dataElement: 'shapeToolGroupButton', img: this._convertPath('/assets/icons/general/rectangle.svg'), - title: 'annotation.rectangle' + title: 'annotation.rectangle', }); if (this._userPreferenceService.areDevFeaturesEnabled) { originalHeaderItems.splice(11, 0, { @@ -354,7 +354,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { title: 'Compare', onClick: () => { this.compareFileInput.nativeElement.click(); - } + }, }); originalHeaderItems.splice(11, 0, { type: 'actionButton', @@ -364,11 +364,11 @@ export class PdfViewerComponent implements OnInit, OnChanges { title: 'Leave Compare Mode', onClick: () => { this.closeCompareMode(); - } + }, }); originalHeaderItems.splice(13, 0, { type: 'divider', - dataElement: 'compareToolDivider' + dataElement: 'compareToolDivider', }); } }); @@ -379,7 +379,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { StrokeThickness: 2, StrokeColor: this._annotationDrawService.getColor(this.instance, 'manual'), FillColor: this._annotationDrawService.getColor(this.instance, 'manual'), - Opacity: 0.6 + Opacity: 0.6, })); } @@ -418,13 +418,13 @@ export class PdfViewerComponent implements OnInit, OnChanges { this.instance.Core.annotationManager.deselectAllAnnotations(); this._annotationActionsService.updateHiddenAnnotation(this.annotations, viewerAnnotations, allAreVisible); }); - } - } + }, + }, ]); } this.instance.UI.annotationPopup.add( - this._annotationActionsService.getViewerAvailableActions(annotationWrappers, this.annotationsChanged) + this._annotationActionsService.getViewerAvailableActions(annotationWrappers, this.annotationsChanged), ); } @@ -448,9 +448,9 @@ export class PdfViewerComponent implements OnInit, OnChanges { this.instance.UI.enableElements(['shapeToolGroupButton', 'rectangleToolDivider']); // dispatch event this.manualAnnotationRequested.emit( - new ManualRedactionEntryWrapper([quad], mre, 'REDACTION', 'RECTANGLE', activeAnnotation.Id) + new ManualRedactionEntryWrapper([quad], mre, 'REDACTION', 'RECTANGLE', activeAnnotation.Id), ); - } + }, }); } @@ -467,13 +467,13 @@ export class PdfViewerComponent implements OnInit, OnChanges { wildcard: false, // allow using '*' as a wildcard value regex: false, // string is treated as a regular expression searchUp: false, // search from the end of the document upwards - ambientString: true // return ambient string as part of the result + ambientString: true, // return ambient string as part of the result }; this.instance.UI.openElements(['searchPanel']); setTimeout(() => { this.instance.UI.searchTextFull(text, searchOptions); }, 250); - } + }, }); // Adding directly to the false-positive dict is only available in dev-mode @@ -488,9 +488,9 @@ export class PdfViewerComponent implements OnInit, OnChanges { const text = this.instance.Core.documentViewer.getSelectedText(); const mre = this._getManualRedactionEntry(selectedQuads, text, true); this.manualAnnotationRequested.emit( - new ManualRedactionEntryWrapper(this.instance.Core.documentViewer.getSelectedTextQuads(), mre, 'FALSE_POSITIVE') + new ManualRedactionEntryWrapper(this.instance.Core.documentViewer.getSelectedTextQuads(), mre, 'FALSE_POSITIVE'), ); - } + }, }); } @@ -504,9 +504,9 @@ export class PdfViewerComponent implements OnInit, OnChanges { const text = this.instance.Core.documentViewer.getSelectedText(); const mre = this._getManualRedactionEntry(selectedQuads, text, true); this.manualAnnotationRequested.emit( - new ManualRedactionEntryWrapper(this.instance.Core.documentViewer.getSelectedTextQuads(), mre, 'DICTIONARY') + new ManualRedactionEntryWrapper(this.instance.Core.documentViewer.getSelectedTextQuads(), mre, 'DICTIONARY'), ); - } + }, }); this.instance.UI.textPopup.add({ @@ -519,9 +519,9 @@ export class PdfViewerComponent implements OnInit, OnChanges { const text = this.instance.Core.documentViewer.getSelectedText(); const mre = this._getManualRedactionEntry(selectedQuads, text, true); this.manualAnnotationRequested.emit( - new ManualRedactionEntryWrapper(this.instance.Core.documentViewer.getSelectedTextQuads(), mre, 'REDACTION') + new ManualRedactionEntryWrapper(this.instance.Core.documentViewer.getSelectedTextQuads(), mre, 'REDACTION'), ); - } + }, }); this._handleCustomActions(); } @@ -536,7 +536,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { 'add-false-positive', 'shapeToolGroupButton', 'rectangleToolDivider', - 'annotationPopup' + 'annotationPopup', ]); if (this._selectedText.length > 2) { this.instance.UI.enableElements(['add-dictionary', 'add-false-positive']); @@ -550,7 +550,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { 'add-rectangle', 'shapeToolGroupButton', 'rectangleToolDivider', - 'annotationPopup' + 'annotationPopup', ]); } } @@ -570,7 +570,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { private _loadDocument() { if (this.fileData) { this.instance.UI.loadDocument(this.fileData, { - filename: this.file ? this.file.filename : 'document.pdf' + filename: this.file ? this.file.filename : 'document.pdf', }); } } diff --git a/apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.ts b/apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.ts index c6705fb29..5cf3c3618 100644 --- a/apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.ts @@ -9,7 +9,7 @@ import { DossiersService } from '../../services/dossiers.service'; @Component({ selector: 'redaction-team-members-manager', templateUrl: './team-members-manager.component.html', - styleUrls: ['./team-members-manager.component.scss'] + styleUrls: ['./team-members-manager.component.scss'], }) export class TeamMembersManagerComponent implements OnInit { teamForm: FormGroup; @@ -27,7 +27,7 @@ export class TeamMembersManagerComponent implements OnInit { readonly userService: UserService, private readonly _toaster: Toaster, private readonly _formBuilder: FormBuilder, - private readonly _dossiersService: DossiersService + private readonly _dossiersService: DossiersService, ) {} get selectedOwnerId(): string { @@ -55,7 +55,7 @@ export class TeamMembersManagerComponent implements OnInit { ...this.dossier, memberIds: this.selectedMembersList, approverIds: this.selectedApproversList, - ownerId: this.selectedOwnerId + ownerId: this.selectedOwnerId, } as DossierRequest; const result = await this._dossiersService.createOrUpdate(dossier).toPromise(); @@ -105,7 +105,7 @@ export class TeamMembersManagerComponent implements OnInit { this._updateLists(); } - async ngOnInit() { + ngOnInit() { this._loadData(); } @@ -143,7 +143,7 @@ export class TeamMembersManagerComponent implements OnInit { this.teamForm = this._formBuilder.group({ owner: [this.dossier?.ownerId, Validators.required], approvers: [[...this.dossier?.approverIds]], - members: [[...this.dossier?.memberIds]] + members: [[...this.dossier?.memberIds]], }); this.teamForm.get('owner').valueChanges.subscribe(owner => { if (!this.isApprover(owner)) { diff --git a/apps/red-ui/src/app/modules/dossier/components/type-annotation-icon/type-annotation-icon.component.ts b/apps/red-ui/src/app/modules/dossier/components/type-annotation-icon/type-annotation-icon.component.ts index 9586951ad..d018c12b1 100644 --- a/apps/red-ui/src/app/modules/dossier/components/type-annotation-icon/type-annotation-icon.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/type-annotation-icon/type-annotation-icon.component.ts @@ -5,7 +5,7 @@ import { AppStateService } from '@state/app-state.service'; @Component({ selector: 'redaction-type-annotation-icon', templateUrl: './type-annotation-icon.component.html', - styleUrls: ['./type-annotation-icon.component.scss'] + styleUrls: ['./type-annotation-icon.component.scss'], }) export class TypeAnnotationIconComponent implements OnChanges { @Input() annotation: AnnotationWrapper; diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/add-dossier-dialog/add-dossier-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/add-dossier-dialog/add-dossier-dialog.component.ts index 7d4b42d17..42bed8aa6 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/add-dossier-dialog/add-dossier-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/add-dossier-dialog/add-dossier-dialog.component.ts @@ -5,7 +5,7 @@ import { DownloadFileType, IDossierTemplate, ReportTemplate, - ReportTemplateControllerService + ReportTemplateControllerService, } from '@redaction/red-ui-http'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import * as moment from 'moment'; @@ -16,7 +16,7 @@ import { DossierTemplatesService } from '../../services/dossier-templates.servic @Component({ templateUrl: './add-dossier-dialog.component.html', - styleUrls: ['./add-dossier-dialog.component.scss'] + styleUrls: ['./add-dossier-dialog.component.scss'], }) export class AddDossierDialogComponent { readonly iconButtonTypes = IconButtonTypes; @@ -25,7 +25,7 @@ export class AddDossierDialogComponent { hasDueDate = false; downloadTypes: { key: DownloadFileType; label: string }[] = ['ORIGINAL', 'PREVIEW', 'REDACTED'].map((type: DownloadFileType) => ({ key: type, - label: downloadTypesTranslations[type] + label: downloadTypesTranslations[type], })); dossierTemplates: IDossierTemplate[]; availableReportTypes = []; @@ -35,7 +35,7 @@ export class AddDossierDialogComponent { private readonly _dossierTemplatesService: DossierTemplatesService, private readonly _formBuilder: FormBuilder, private readonly _reportTemplateController: ReportTemplateControllerService, - readonly dialogRef: MatDialogRef + readonly dialogRef: MatDialogRef, ) { this._filterInvalidDossierTemplates(); this.dossierForm = this._formBuilder.group( @@ -46,14 +46,14 @@ export class AddDossierDialogComponent { reportTemplateIds: [null], description: [null], dueDate: [null], - watermarkEnabled: [true] + watermarkEnabled: [true], }, { validators: control => control.value.reportTemplateIds?.length > 0 || control.value.downloadFileTypes?.length > 0 ? null - : { downloadPackage: true } - } + : { downloadPackage: true }, + }, ); } @@ -93,18 +93,18 @@ export class AddDossierDialogComponent { this.dossierForm.patchValue( { downloadFileTypes: dossierTemplate.downloadFileTypes, - reportTemplateIds: [] // TODO DEFAULT + reportTemplateIds: [], // TODO DEFAULT }, - { emitEvent: false } + { emitEvent: false }, ); } else { this.availableReportTypes = []; this.dossierForm.patchValue( { downloadFileTypes: [], - reportTemplateIds: [] + reportTemplateIds: [], }, - { emitEvent: false } + { emitEvent: false }, ); } } @@ -125,7 +125,7 @@ export class AddDossierDialogComponent { dossierTemplateId: this.dossierForm.get('dossierTemplateId').value, downloadFileTypes: this.dossierForm.get('downloadFileTypes').value, reportTemplateIds: this.dossierForm.get('reportTemplateIds').value, - watermarkEnabled: this.dossierForm.get('watermarkEnabled').value + watermarkEnabled: this.dossierForm.get('watermarkEnabled').value, }; } } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/assign-reviewer-approver-dialog/assign-reviewer-approver-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/assign-reviewer-approver-dialog/assign-reviewer-approver-dialog.component.ts index 63bd76f2a..468379ba0 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/assign-reviewer-approver-dialog/assign-reviewer-approver-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/assign-reviewer-approver-dialog/assign-reviewer-approver-dialog.component.ts @@ -19,7 +19,7 @@ class DialogData { @Component({ templateUrl: './assign-reviewer-approver-dialog.component.html', - styleUrls: ['./assign-reviewer-approver-dialog.component.scss'] + styleUrls: ['./assign-reviewer-approver-dialog.component.scss'], }) export class AssignReviewerApproverDialogComponent { usersForm: FormGroup; @@ -33,7 +33,7 @@ export class AssignReviewerApproverDialogComponent { private readonly _dossiersService: DossiersService, private readonly _filesService: FilesService, private readonly _dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) readonly data: DialogData + @Inject(MAT_DIALOG_DATA) readonly data: DialogData, ) { this._loadData(); } @@ -75,7 +75,7 @@ export class AssignReviewerApproverDialogComponent { .setReviewerFor( this.data.files.map(f => f.fileId), this._dossiersService.activeDossierId, - selectedUser + selectedUser, ) .toPromise(); } else { @@ -83,7 +83,7 @@ export class AssignReviewerApproverDialogComponent { .setUnderApprovalFor( this.data.files.map(f => f.fileId), selectedUser, - this._dossiersService.activeDossierId + this._dossiersService.activeDossierId, ) .toPromise(); } @@ -106,7 +106,7 @@ export class AssignReviewerApproverDialogComponent { singleUser = this.singleUsersSelectOptions.indexOf(singleUser) >= 0 ? singleUser : this.singleUsersSelectOptions[0]; this.usersForm = this._formBuilder.group({ - singleUser: [singleUser, Validators.required] + singleUser: [singleUser, Validators.required], }); } } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/change-legal-basis-dialog/change-legal-basis-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/change-legal-basis-dialog/change-legal-basis-dialog.component.ts index 624ebeda2..6f32c2601 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/change-legal-basis-dialog/change-legal-basis-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/change-legal-basis-dialog/change-legal-basis-dialog.component.ts @@ -17,7 +17,7 @@ export interface LegalBasisOption { @Component({ selector: 'redaction-change-legal-basis-dialog', templateUrl: './change-legal-basis-dialog.component.html', - styleUrls: ['./change-legal-basis-dialog.component.scss'] + styleUrls: ['./change-legal-basis-dialog.component.scss'], }) export class ChangeLegalBasisDialogComponent implements OnInit { legalBasisForm: FormGroup; @@ -32,7 +32,7 @@ export class ChangeLegalBasisDialogComponent implements OnInit { private readonly _permissionsService: PermissionsService, private readonly _formBuilder: FormBuilder, public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public annotations: AnnotationWrapper[] + @Inject(MAT_DIALOG_DATA) public annotations: AnnotationWrapper[], ) {} get changed(): boolean { @@ -44,7 +44,7 @@ export class ChangeLegalBasisDialogComponent implements OnInit { this.legalBasisForm = this._formBuilder.group({ reason: [null, Validators.required], - comment: this.isDocumentAdmin ? [null] : [null, Validators.required] + comment: this.isDocumentAdmin ? [null] : [null, Validators.required], }); const data = await this._legalBasisMappingControllerService .getLegalBasisMapping(this._dossiersService.activeDossier.dossierTemplateId) @@ -54,19 +54,19 @@ export class ChangeLegalBasisDialogComponent implements OnInit { .map(lbm => ({ legalBasis: lbm.reason, description: lbm.description, - label: lbm.name + label: lbm.name, })) .sort((a, b) => a.label.localeCompare(b.label)); this.legalBasisForm.patchValue({ - reason: this.legalOptions.find(option => option.legalBasis === this.annotations[0].legalBasis) + reason: this.legalOptions.find(option => option.legalBasis === this.annotations[0].legalBasis), }); } save() { this.dialogRef.close({ legalBasis: this.legalBasisForm.get('reason').value.legalBasis, - comment: this.legalBasisForm.get('comment').value + comment: this.legalBasisForm.get('comment').value, }); } } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts index f00ca3baf..6ad604d96 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts @@ -9,7 +9,7 @@ import { DossiersService } from '../../services/dossiers.service'; @Component({ templateUrl: './document-info-dialog.component.html', - styleUrls: ['./document-info-dialog.component.scss'] + styleUrls: ['./document-info-dialog.component.scss'], }) export class DocumentInfoDialogComponent implements OnInit { documentInfoForm: FormGroup; @@ -24,7 +24,7 @@ export class DocumentInfoDialogComponent implements OnInit { private readonly _formBuilder: FormBuilder, private readonly _fileAttributesService: FileAttributesService, public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: IFile + @Inject(MAT_DIALOG_DATA) public data: IFile, ) { this.file = this.data; this._dossier = this._dossiersService.find(this.file.dossierId); @@ -37,9 +37,9 @@ export class DocumentInfoDialogComponent implements OnInit { const formConfig = this.attributes.reduce( (acc, attr) => ({ ...acc, - [attr.id]: [this.file.fileAttributes?.attributeIdToValue[attr.id]] + [attr.id]: [this.file.fileAttributes?.attributeIdToValue[attr.id]], }), - {} + {}, ); this.documentInfoForm = this._formBuilder.group(formConfig); } @@ -47,7 +47,7 @@ export class DocumentInfoDialogComponent implements OnInit { async saveDocumentInfo() { const attributeIdToValue = { ...this.file.fileAttributes?.attributeIdToValue, - ...this.documentInfoForm.getRawValue() + ...this.documentInfoForm.getRawValue(), }; await this._fileAttributesService.setFileAttributes({ attributeIdToValue }, this.file.dossierId, this.file.fileId).toPromise(); this.file.fileAttributes = { attributeIdToValue }; diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.ts index df38cf707..a437871bc 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.ts @@ -11,7 +11,7 @@ import { DossierAttributesService } from '@shared/services/controller-wrappers/d @Component({ selector: 'redaction-edit-dossier-attributes', templateUrl: './edit-dossier-attributes.component.html', - styleUrls: ['./edit-dossier-attributes.component.scss'] + styleUrls: ['./edit-dossier-attributes.component.scss'], }) export class EditDossierAttributesComponent implements EditDossierSectionInterface, OnInit { readonly iconButtonTypes = IconButtonTypes; @@ -30,7 +30,7 @@ export class EditDossierAttributesComponent implements EditDossierSectionInterfa private readonly _permissionsService: PermissionsService, private readonly _dossierAttributesService: DossierAttributesService, private readonly _loadingService: LoadingService, - private readonly _formBuilder: FormBuilder + private readonly _formBuilder: FormBuilder, ) {} get changed() { @@ -66,7 +66,7 @@ export class EditDossierAttributesComponent implements EditDossierSectionInterfa this._loadingService.start(); const dossierAttributeList = this.attributes.map(attr => ({ dossierAttributeId: attr.id, - value: this.currentAttrValue(attr) + value: this.currentAttrValue(attr), })); await this._dossierAttributesService.setValues(this.dossier, dossierAttributeList); await this._loadAttributes(); @@ -106,7 +106,7 @@ export class EditDossierAttributesComponent implements EditDossierSectionInterfa const image = $event.target.files[0]; const result = await toBase64(image); this.attributesForm.patchValue({ - [attr.id]: result + [attr.id]: result, }); this._getFileInputById(attr.id).nativeElement.value = null; } @@ -121,7 +121,7 @@ export class EditDossierAttributesComponent implements EditDossierSectionInterfa deleteAttr(attr: DossierAttributeWithValue) { this.attributesForm.patchValue({ - [attr.id]: null + [attr.id]: null, }); } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts index c5c4c3a59..d571ca2d9 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts @@ -10,7 +10,7 @@ import { LoadingService, SortingOrders, TableColumnConfig, - TitleColors + TitleColors, } from '@iqser/common-ui'; import { FileManagementControllerService, IFile } from '@redaction/red-ui-http'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @@ -34,8 +34,8 @@ interface FileListItem extends IFile, IListable { styleUrls: ['./edit-dossier-deleted-documents.component.scss'], providers: [ ...DefaultListingServices, - { provide: ListingComponent, useExisting: forwardRef(() => EditDossierDeletedDocumentsComponent) } - ] + { provide: ListingComponent, useExisting: forwardRef(() => EditDossierDeletedDocumentsComponent) }, + ], }) export class EditDossierDeletedDocumentsComponent extends ListingComponent implements EditDossierSectionInterface, OnInit { @Input() dossier: Dossier; @@ -47,7 +47,7 @@ export class EditDossierDeletedDocumentsComponent extends ListingComponent { return this.listingService.selectedEntities$.pipe( map(entities => entities.length && !entities.find(file => !file.canRestore)), - distinctUntilChanged() + distinctUntilChanged(), ); } @@ -82,10 +82,10 @@ export class EditDossierDeletedDocumentsComponent extends ListingComponent { + this._dialogService.openDialog('confirm', null, data, () => { this._loadingService.loadWhile(this._hardDelete(files)); }); } @@ -96,7 +96,7 @@ export class EditDossierDeletedDocumentsComponent extends ListingComponent ({ key: type, - label: downloadTypesTranslations[type] + label: downloadTypesTranslations[type], })); availableReportTypes: ReportTemplate[] = []; @@ -25,7 +25,7 @@ export class EditDossierDownloadPackageComponent implements OnInit, EditDossierS constructor( private readonly _dossiersService: DossiersService, private readonly _reportTemplateController: ReportTemplateControllerService, - private readonly _formBuilder: FormBuilder + private readonly _formBuilder: FormBuilder, ) {} get reportTypesLength() { @@ -70,14 +70,14 @@ export class EditDossierDownloadPackageComponent implements OnInit, EditDossierS this.dossierForm = this._formBuilder.group( { reportTemplateIds: [this.dossier.reportTemplateIds], - downloadFileTypes: [this.dossier.downloadFileTypes] + downloadFileTypes: [this.dossier.downloadFileTypes], }, { validators: control => control.value.reportTemplateIds?.length > 0 || control.value.downloadFileTypes?.length > 0 ? null - : { downloadPackage: true } - } + : { downloadPackage: true }, + }, ); } @@ -85,7 +85,7 @@ export class EditDossierDownloadPackageComponent implements OnInit, EditDossierS const dossier = { ...this.dossier, downloadFileTypes: this.dossierForm.get('downloadFileTypes').value, - reportTemplateIds: this.dossierForm.get('reportTemplateIds').value + reportTemplateIds: this.dossierForm.get('reportTemplateIds').value, }; await this._dossiersService.createOrUpdate(dossier).toPromise(); this.updateDossier.emit(); @@ -94,7 +94,7 @@ export class EditDossierDownloadPackageComponent implements OnInit, EditDossierS revert() { this.dossierForm.reset({ downloadFileTypes: this.dossier.downloadFileTypes, - reportTemplateIds: this.dossier.reportTemplateIds + reportTemplateIds: this.dossier.reportTemplateIds, }); } } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts index 438dce15b..dcc5d4e98 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts @@ -18,7 +18,7 @@ type Section = 'dossierInfo' | 'downloadPackage' | 'dossierDictionary' | 'member @Component({ templateUrl: './edit-dossier-dialog.component.html', - styleUrls: ['./edit-dossier-dialog.component.scss'] + styleUrls: ['./edit-dossier-dialog.component.scss'], }) export class EditDossierDialogComponent { readonly navItems: { key: Section; title?: string; sideNavTitle?: string }[]; @@ -42,37 +42,37 @@ export class EditDossierDialogComponent { dossier: Dossier; afterSave: Function; section?: Section; - } + }, ) { this.navItems = [ { key: 'dossierInfo', title: _('edit-dossier-dialog.nav-items.general-info'), - sideNavTitle: _('edit-dossier-dialog.nav-items.dossier-info') + sideNavTitle: _('edit-dossier-dialog.nav-items.dossier-info'), }, { key: 'downloadPackage', title: _('edit-dossier-dialog.nav-items.choose-download'), - sideNavTitle: _('edit-dossier-dialog.nav-items.download-package') + sideNavTitle: _('edit-dossier-dialog.nav-items.download-package'), }, { key: 'dossierDictionary', sideNavTitle: _('edit-dossier-dialog.nav-items.dictionary'), - title: _('edit-dossier-dialog.nav-items.dossier-dictionary') + title: _('edit-dossier-dialog.nav-items.dossier-dictionary'), }, { key: 'members', title: _('edit-dossier-dialog.nav-items.team-members'), - sideNavTitle: _('edit-dossier-dialog.nav-items.members') + sideNavTitle: _('edit-dossier-dialog.nav-items.members'), }, { key: 'dossierAttributes', - title: _('edit-dossier-dialog.nav-items.dossier-attributes') + title: _('edit-dossier-dialog.nav-items.dossier-attributes'), }, { key: 'deletedDocuments', - sideNavTitle: _('edit-dossier-dialog.nav-items.deleted-documents') - } + sideNavTitle: _('edit-dossier-dialog.nav-items.deleted-documents'), + }, ]; this.dossier = _data.dossier; @@ -90,7 +90,7 @@ export class EditDossierDialogComponent { dossierDictionary: this.dictionaryComponent, members: this.membersComponent, dossierAttributes: this.attributesComponent, - deletedDocuments: this.deletedDocumentsComponent + deletedDocuments: this.deletedDocumentsComponent, }[this.activeNav]; } @@ -123,7 +123,7 @@ export class EditDossierDialogComponent { await this.activeComponent.save(); } - async revert() { + revert() { this.activeComponent.revert(); } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts index 015072d6c..5a7ba8b25 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts @@ -17,7 +17,7 @@ import { DossierTemplatesService } from '../../../services/dossier-templates.ser @Component({ selector: 'redaction-edit-dossier-general-info', templateUrl: './edit-dossier-general-info.component.html', - styleUrls: ['./edit-dossier-general-info.component.scss'] + styleUrls: ['./edit-dossier-general-info.component.scss'], }) export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSectionInterface { readonly iconButtonTypes = IconButtonTypes; @@ -37,7 +37,7 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti private readonly _dialogService: DossiersDialogService, private readonly _router: Router, private readonly _editDossierDialogRef: MatDialogRef, - private readonly _toaster: Toaster + private readonly _toaster: Toaster, ) {} get changed() { @@ -72,13 +72,13 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti dossierTemplateId: [ { value: this.dossier.dossierTemplateId, - disabled: this.dossier.hasFiles + disabled: this.dossier.hasFiles, }, - Validators.required + Validators.required, ], description: [this.dossier.description], dueDate: [this.dossier.dueDate], - watermarkEnabled: [this.dossier.watermarkEnabled] + watermarkEnabled: [this.dossier.watermarkEnabled], }); this.hasDueDate = !!this.dossier.dueDate; } @@ -89,7 +89,7 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti dossierTemplateId: this.dossier.dossierTemplateId, description: this.dossier.description, watermarkEnabled: this.dossier.watermarkEnabled, - dueDate: this.dossier.dueDate + dueDate: this.dossier.dueDate, }); } @@ -100,13 +100,13 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti description: this.dossierForm.get('description').value, watermarkEnabled: this.dossierForm.get('watermarkEnabled').value, dueDate: this.hasDueDate ? this.dossierForm.get('dueDate').value : undefined, - dossierTemplateId: this.dossierForm.get('dossierTemplateId').value + dossierTemplateId: this.dossierForm.get('dossierTemplateId').value, } as DossierRequest; await this._dossiersService.createOrUpdate(dossier).toPromise(); this.updateDossier.emit(); } - async deleteDossier() { + deleteDossier() { const data = new ConfirmationDialogInput({ title: _('confirmation-dialog.delete-dossier.title'), titleColor: TitleColors.PRIMARY, @@ -117,8 +117,8 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti denyText: _('confirmation-dialog.delete-dossier.deny-text'), translateParams: { dossierName: this.dossier.dossierName, - dossiersCount: 1 - } + dossiersCount: 1, + }, }); this._dialogService.openDialog('confirm', null, data, async () => { await this._dossiersService.delete(this.dossier).toPromise(); diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/team-members/edit-dossier-team-members.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/team-members/edit-dossier-team-members.component.ts index 00bed1c3f..9f9f1929f 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/team-members/edit-dossier-team-members.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/team-members/edit-dossier-team-members.component.ts @@ -7,7 +7,7 @@ import { UserService } from '@services/user.service'; @Component({ selector: 'redaction-edit-dossier-team-members', templateUrl: './edit-dossier-team-members.component.html', - styleUrls: ['./edit-dossier-team-members.component.scss'] + styleUrls: ['./edit-dossier-team-members.component.scss'], }) export class EditDossierTeamMembersComponent implements EditDossierSectionInterface { readonly currentUser = this._userService.currentUser; diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/force-redaction-dialog/force-redaction-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/force-redaction-dialog/force-redaction-dialog.component.ts index 6adba14df..f12f8be20 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/force-redaction-dialog/force-redaction-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/force-redaction-dialog/force-redaction-dialog.component.ts @@ -18,7 +18,7 @@ export interface LegalBasisOption { @Component({ selector: 'redaction-force-redaction-dialog', templateUrl: './force-redaction-dialog.component.html', - styleUrls: ['./force-redaction-dialog.component.scss'] + styleUrls: ['./force-redaction-dialog.component.scss'], }) export class ForceRedactionDialogComponent implements OnInit { redactionForm: FormGroup; @@ -34,10 +34,10 @@ export class ForceRedactionDialogComponent implements OnInit { private readonly _legalBasisMappingControllerService: LegalBasisMappingControllerService, private readonly _manualAnnotationService: ManualAnnotationService, private readonly _permissionsService: PermissionsService, - public dialogRef: MatDialogRef + public dialogRef: MatDialogRef, ) {} - async ngOnInit() { + ngOnInit() { this._legalBasisMappingControllerService .getLegalBasisMapping(this._dossiersService.activeDossier.dossierTemplateId) .subscribe(data => { @@ -45,7 +45,7 @@ export class ForceRedactionDialogComponent implements OnInit { this.legalOptions.push({ legalBasis: lbm.reason, description: lbm.description, - label: lbm.name + label: lbm.name, }); }); @@ -56,7 +56,7 @@ export class ForceRedactionDialogComponent implements OnInit { this.redactionForm = this._formBuilder.group({ reason: [null, Validators.required], - comment: this.isDocumentAdmin ? [null] : [null, Validators.required] + comment: this.isDocumentAdmin ? [null] : [null, Validators.required], }); } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts index 6868bc0a6..60ba724f6 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts @@ -22,7 +22,7 @@ export interface LegalBasisOption { @Component({ selector: 'redaction-manual-annotation-dialog', templateUrl: './manual-annotation-dialog.component.html', - styleUrls: ['./manual-annotation-dialog.component.scss'] + styleUrls: ['./manual-annotation-dialog.component.scss'], }) export class ManualAnnotationDialogComponent implements OnInit { redactionForm: FormGroup; @@ -45,7 +45,7 @@ export class ManualAnnotationDialogComponent implements OnInit { private readonly _manualAnnotationService: ManualAnnotationService, private readonly _permissionsService: PermissionsService, public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public manualRedactionEntryWrapper: ManualRedactionEntryWrapper + @Inject(MAT_DIALOG_DATA) public manualRedactionEntryWrapper: ManualRedactionEntryWrapper, ) {} get title() { @@ -60,7 +60,7 @@ export class ManualAnnotationDialogComponent implements OnInit { return null; } - async ngOnInit() { + ngOnInit() { this._legalBasisMappingControllerService .getLegalBasisMapping(this._dossiersService.activeDossier.dossierTemplateId) .subscribe(data => { @@ -68,7 +68,7 @@ export class ManualAnnotationDialogComponent implements OnInit { this.legalOptions.push({ legalBasis: lbm.reason, description: lbm.description, - label: lbm.name + label: lbm.name, }); }); @@ -85,7 +85,7 @@ export class ManualAnnotationDialogComponent implements OnInit { dictionary: this.isDictionaryRequest ? [this.isFalsePositiveRequest ? 'false_positive' : null, Validators.required] : ['manual', Validators.required], - comment: this.isDocumentAdmin ? [null] : [null, Validators.required] + comment: this.isDocumentAdmin ? [null] : [null, Validators.required], }); for (const key of Object.keys(this._appStateService.dictionaryData[this._dossiersService.activeDossier.dossierTemplateId])) { @@ -101,7 +101,7 @@ export class ManualAnnotationDialogComponent implements OnInit { this._enhanceManualRedaction(this.manualRedactionEntryWrapper.manualRedactionEntry); this._manualAnnotationService.addAnnotation(this.manualRedactionEntryWrapper.manualRedactionEntry).subscribe( response => this.dialogRef.close(new ManualAnnotationResponse(this.manualRedactionEntryWrapper, response)), - () => this.dialogRef.close() + () => this.dialogRef.close(), ); } @@ -109,7 +109,7 @@ export class ManualAnnotationDialogComponent implements OnInit { return value.replace( // eslint-disable-next-line no-control-regex,max-len /([^\s\d-]{2,})[-\u00AD]\u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029]/gi, - '$1' + '$1', ); } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.ts index da652f537..807d1134a 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.ts @@ -9,7 +9,7 @@ import { ImageCategory } from '../../models/image-category.model'; @Component({ selector: 'redaction-recategorize-image-dialog', templateUrl: './recategorize-image-dialog.component.html', - styleUrls: ['./recategorize-image-dialog.component.scss'] + styleUrls: ['./recategorize-image-dialog.component.scss'], }) export class RecategorizeImageDialogComponent implements OnInit { recategorizeImageForm: FormGroup; @@ -21,26 +21,26 @@ export class RecategorizeImageDialogComponent implements OnInit { private readonly _permissionsService: PermissionsService, private readonly _formBuilder: FormBuilder, public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public annotations: AnnotationWrapper[] + @Inject(MAT_DIALOG_DATA) public annotations: AnnotationWrapper[], ) {} get changed(): boolean { return this.recategorizeImageForm.get('type').value !== this.annotations[0].type; } - async ngOnInit() { + ngOnInit() { this.isDocumentAdmin = this._permissionsService.isApprover(); this.recategorizeImageForm = this._formBuilder.group({ type: [this.annotations[0].type, Validators.required], - comment: this.isDocumentAdmin ? [null] : [null, Validators.required] + comment: this.isDocumentAdmin ? [null] : [null, Validators.required], }); } save() { this.dialogRef.close({ type: this.recategorizeImageForm.get('type').value, - comment: this.recategorizeImageForm.get('comment').value + comment: this.recategorizeImageForm.get('comment').value, }); } } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.ts index 1a8cbd30b..5546259f8 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.ts @@ -14,7 +14,7 @@ export interface RemoveAnnotationsDialogInput { @Component({ selector: 'redaction-remove-annotations-dialog', templateUrl: './remove-annotations-dialog.component.html', - styleUrls: ['./remove-annotations-dialog.component.scss'] + styleUrls: ['./remove-annotations-dialog.component.scss'], }) export class RemoveAnnotationsDialogComponent { redactionForm: FormGroup; @@ -24,10 +24,10 @@ export class RemoveAnnotationsDialogComponent { private readonly _formBuilder: FormBuilder, readonly permissionsService: PermissionsService, public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: RemoveAnnotationsDialogInput + @Inject(MAT_DIALOG_DATA) public data: RemoveAnnotationsDialogInput, ) { this.redactionForm = this._formBuilder.group({ - comment: this.permissionsService.isApprover() ? [null] : [null, Validators.required] + comment: this.permissionsService.isApprover() ? [null] : [null, Validators.required], }); } @@ -42,7 +42,7 @@ export class RemoveAnnotationsDialogComponent { printable(annotation: AnnotationWrapper) { if (annotation.isImage) { return this._translateService.instant('remove-annotations-dialog.image-type', { - typeLabel: humanize(annotation.type) + typeLabel: humanize(annotation.type), }); } else { return annotation.value; diff --git a/apps/red-ui/src/app/modules/dossier/dossiers-routing.module.ts b/apps/red-ui/src/app/modules/dossier/dossiers-routing.module.ts index b582d05c2..e20b57beb 100644 --- a/apps/red-ui/src/app/modules/dossier/dossiers-routing.module.ts +++ b/apps/red-ui/src/app/modules/dossier/dossiers-routing.module.ts @@ -13,17 +13,17 @@ const routes: Routes = [ component: SearchScreenComponent, canActivate: [CompositeRouteGuard], data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + }, }, { path: ':dossierId', canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], - reuse: true + reuse: true, }, - loadChildren: () => import('./screens/dossier-overview/dossier-overview.module').then(m => m.DossierOverviewModule) + loadChildren: () => import('./screens/dossier-overview/dossier-overview.module').then(m => m.DossierOverviewModule), }, { path: ':dossierId/file/:fileId', @@ -31,8 +31,8 @@ const routes: Routes = [ canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], - reuse: true - } + reuse: true, + }, }, { path: '', @@ -40,14 +40,14 @@ const routes: Routes = [ canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], - reuse: true + reuse: true, }, - loadChildren: () => import('./screens/dossiers-listing/dossiers-listing.module').then(m => m.DossiersListingModule) - } + loadChildren: () => import('./screens/dossiers-listing/dossiers-listing.module').then(m => m.DossiersListingModule), + }, ]; @NgModule({ imports: [RouterModule.forChild(routes)], - exports: [RouterModule] + exports: [RouterModule], }) export class DossiersRoutingModule {} diff --git a/apps/red-ui/src/app/modules/dossier/dossiers.module.ts b/apps/red-ui/src/app/modules/dossier/dossiers.module.ts index 998b8c106..6a0653da1 100644 --- a/apps/red-ui/src/app/modules/dossier/dossiers.module.ts +++ b/apps/red-ui/src/app/modules/dossier/dossiers.module.ts @@ -52,7 +52,7 @@ const dialogs = [ DocumentInfoDialogComponent, AssignReviewerApproverDialogComponent, ChangeLegalBasisDialogComponent, - RecategorizeImageDialogComponent + RecategorizeImageDialogComponent, ]; const components = [ @@ -75,7 +75,7 @@ const components = [ AnnotationSourceComponent, ...screens, - ...dialogs + ...dialogs, ]; const services = [ @@ -85,12 +85,12 @@ const services = [ PdfViewerDataService, AnnotationDrawService, AnnotationProcessingService, - UserPreferenceControllerService + UserPreferenceControllerService, ]; @NgModule({ declarations: [...components], providers: [...services], - imports: [CommonModule, SharedModule, SharedDossiersModule, FileUploadDownloadModule, DossiersRoutingModule, OverlayModule] + imports: [CommonModule, SharedModule, SharedDossiersModule, FileUploadDownloadModule, DossiersRoutingModule, OverlayModule], }) export class DossiersModule {} diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.ts index 58f9fe3d2..872113947 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.ts @@ -14,7 +14,7 @@ import { Dossier } from '@state/model/dossier'; @Component({ selector: 'redaction-dossier-overview-bulk-actions', templateUrl: './dossier-overview-bulk-actions.component.html', - styleUrls: ['./dossier-overview-bulk-actions.component.scss'] + styleUrls: ['./dossier-overview-bulk-actions.component.scss'], }) export class DossierOverviewBulkActionsComponent { readonly circleButtonTypes = CircleButtonTypes; @@ -31,7 +31,7 @@ export class DossierOverviewBulkActionsComponent { private readonly _fileActionService: FileActionService, private readonly _loadingService: LoadingService, private readonly _translateService: TranslateService, - private readonly _listingService: ListingService + private readonly _listingService: ListingService, ) {} get selectedFiles(): File[] { @@ -50,7 +50,7 @@ export class DossierOverviewBulkActionsComponent { if (this.areSomeFilesSelected) { const allFilesAreUnderReviewOrUnassigned = this.selectedFiles.reduce( (acc, file) => acc && (file.isUnderReview || file.isUnassigned), - true + true, ); const allFilesAreUnderApproval = this.selectedFiles.reduce((acc, file) => acc && file.isUnderApproval, true); return allFilesAreUnderReviewOrUnassigned || allFilesAreUnderApproval; @@ -121,21 +121,21 @@ export class DossierOverviewBulkActionsComponent { null, new ConfirmationDialogInput({ title: _('confirmation-dialog.delete-file.title'), - question: _('confirmation-dialog.delete-file.question') + question: _('confirmation-dialog.delete-file.question'), }), async () => { this._loadingService.start(); await this._fileManagementControllerService .deleteFiles( this.selectedFiles.map(item => item.fileId), - this.dossier.dossierId + this.dossier.dossierId, ) .toPromise(); await this._appStateService.reloadActiveDossierFiles(); this.reload.emit(); this._listingService.setSelected([]); this._loadingService.stop(); - } + }, ); } @@ -148,7 +148,7 @@ export class DossierOverviewBulkActionsComponent { } } - async reanalyse() { + reanalyse() { const fileIds = this.selectedFiles.filter(file => file.analysisRequired).map(file => file.fileId); this._performBulkAction(this._reanalysisControllerService.reanalyzeFilesForDossier(fileIds, this.dossier.id)); } @@ -169,11 +169,11 @@ export class DossierOverviewBulkActionsComponent { null, new ConfirmationDialogInput({ title: _('confirmation-dialog.approve-multiple-files.title'), - question: _('confirmation-dialog.approve-multiple-files.question') + question: _('confirmation-dialog.approve-multiple-files.question'), }), () => { this._performBulkAction(this._fileActionService.setFilesApproved(this.selectedFiles)); - } + }, ); } else { this._performBulkAction(this._fileActionService.setFilesApproved(this.selectedFiles)); diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.ts index 2e294eda8..bb34fe1e3 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.ts @@ -10,7 +10,7 @@ import { DossierTemplate } from '@models/file/dossier-template'; @Component({ selector: 'redaction-dossier-details-stats', templateUrl: './dossier-details-stats.component.html', - styleUrls: ['./dossier-details-stats.component.scss'] + styleUrls: ['./dossier-details-stats.component.scss'], }) export class DossierDetailsStatsComponent { attributesExpanded = false; @@ -21,7 +21,7 @@ export class DossierDetailsStatsComponent { private readonly _appStateService: AppStateService, private readonly _dossierTemplatesService: DossierTemplatesService, private readonly _dialogService: DossiersDialogService, - readonly dossiersService: DossiersService + readonly dossiersService: DossiersService, ) {} dossierTemplate(dossier: Dossier): DossierTemplate { @@ -31,7 +31,7 @@ export class DossierDetailsStatsComponent { openEditDossierAttributesDialog(dossier: Dossier) { this._dialogService.openDialog('editDossier', null, { dossier, - section: 'dossierAttributes' + section: 'dossierAttributes', }); } } diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details/dossier-details.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details/dossier-details.component.ts index c7e90c7fd..8eef7ca0d 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details/dossier-details.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details/dossier-details.component.ts @@ -15,7 +15,7 @@ import { DossiersService } from '../../../../services/dossiers.service'; @Component({ selector: 'redaction-dossier-details', templateUrl: './dossier-details.component.html', - styleUrls: ['./dossier-details.component.scss'] + styleUrls: ['./dossier-details.component.scss'], }) export class DossierDetailsComponent implements OnInit { documentsChartData: DoughnutChartConfig[] = []; @@ -38,7 +38,7 @@ export class DossierDetailsComponent implements OnInit { readonly filterService: FilterService, private readonly _changeDetectorRef: ChangeDetectorRef, private readonly _userService: UserService, - private readonly _toaster: Toaster + private readonly _toaster: Toaster, ) {} get managers() { @@ -66,7 +66,7 @@ export class DossierDetailsComponent implements OnInit { value: groups[status].length, color: status, label: fileStatusTranslations[status], - key: status + key: status, }); } this.documentsChartData.sort(StatusSorter.byStatus); diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/table-item.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/table-item.component.ts index 1200e494b..8c0c4eba3 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/table-item.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/table-item.component.ts @@ -7,7 +7,7 @@ import { IFileAttributeConfig } from '@redaction/red-ui-http'; selector: 'redaction-table-item', templateUrl: './table-item.component.html', styleUrls: ['./table-item.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class TableItemComponent { @Input() @Required() file!: File; diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/config.service.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/config.service.ts index 800e4f9d7..e21d3e4f1 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/config.service.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/config.service.ts @@ -27,7 +27,7 @@ export class ConfigService { private readonly _translateService: TranslateService, private readonly _userService: UserService, private readonly _dialogService: DossiersDialogService, - private readonly _appConfigService: AppConfigService + private readonly _appConfigService: AppConfigService, ) {} get actionConfig() { @@ -36,46 +36,46 @@ export class ConfigService { label: this._translateService.instant('dossier-overview.header-actions.edit'), action: $event => this._openEditDossierDialog($event), icon: 'iqser:edit', - hide: !this._userService.currentUser.isManager - } + hide: !this._userService.currentUser.isManager, + }, ]; } tableConfig(displayedAttributes: IFileAttributeConfig[]): TableColumnConfig[] { const dynamicColumns: TableColumnConfig[] = displayedAttributes.map(config => ({ label: config.label, - notTranslatable: true + notTranslatable: true, })); return [ { label: _('dossier-overview.table-col-names.name'), sortByKey: 'searchKey', - width: '3fr' + width: '3fr', }, { label: _('dossier-overview.table-col-names.added-on'), sortByKey: 'added', - width: '2fr' + width: '2fr', }, ...dynamicColumns, { - label: _('dossier-overview.table-col-names.needs-work') + label: _('dossier-overview.table-col-names.needs-work'), }, { label: _('dossier-overview.table-col-names.assigned-to'), class: 'user-column', sortByKey: 'reviewerName', - width: '2fr' + width: '2fr', }, { label: _('dossier-overview.table-col-names.pages'), - sortByKey: 'numberOfPages' + sortByKey: 'numberOfPages', }, { label: _('dossier-overview.table-col-names.status'), class: 'flex-end', - sortByKey: 'statusSort' - } + sortByKey: 'statusSort', + }, ]; } @@ -89,7 +89,7 @@ export class ConfigService { key: FileStatuses.UNASSIGNED, enterFn: this._unassignFn(reloadDossiers), enterPredicate: () => false, - color: '#D3D5DA' + color: '#D3D5DA', }, { label: fileStatusTranslations[FileStatuses.UNDER_REVIEW], @@ -99,7 +99,7 @@ export class ConfigService { this._permissionsService.canAssignToSelf(file) || this._permissionsService.canAssignUser(file), key: FileStatuses.UNDER_REVIEW, - color: '#FDBD00' + color: '#FDBD00', }, { label: fileStatusTranslations[FileStatuses.UNDER_APPROVAL], @@ -107,16 +107,16 @@ export class ConfigService { enterPredicate: (file: File) => this._permissionsService.canSetUnderApproval(file) || this._permissionsService.canUndoApproval(file), key: FileStatuses.UNDER_APPROVAL, - color: '#374C81' + color: '#374C81', }, { label: fileStatusTranslations[FileStatuses.APPROVED], enterFn: this._approveFn(reloadDossiers), enterPredicate: (file: File) => this._permissionsService.isReadyForApproval(file) && file.canBeApproved, key: FileStatuses.APPROVED, - color: '#48C9F7' - } - ] + color: '#48C9F7', + }, + ], }; } @@ -125,7 +125,7 @@ export class ConfigService { fileAttributeConfigs: IFileAttributeConfig[], needsWorkFilterTemplate: TemplateRef, checkedRequiredFilters: () => NestedFilter[], - checkedNotRequiredFilters: () => NestedFilter[] + checkedNotRequiredFilters: () => NestedFilter[], ) { const allDistinctFileStatuses = new Set(); const allDistinctPeople = new Set(); @@ -189,8 +189,8 @@ export class ConfigService { status => new NestedFilter({ id: status, - label: this._translateService.instant(fileStatusTranslations[status]) - }) + label: this._translateService.instant(fileStatusTranslations[status]), + }), ); filterGroups.push({ @@ -198,7 +198,7 @@ export class ConfigService { label: this._translateService.instant('filters.status'), icon: 'red:status', filters: statusFilters.sort((a, b) => StatusSorter[a.id] - StatusSorter[b.id]), - checker: keyChecker('status') + checker: keyChecker('status'), }); const peopleFilters: NestedFilter[] = []; @@ -208,16 +208,16 @@ export class ConfigService { peopleFilters.push( new NestedFilter({ id: null, - label: this._translateService.instant('initials-avatar.unassigned') - }) + label: this._translateService.instant('initials-avatar.unassigned'), + }), ); } allDistinctPeople.forEach(userId => { peopleFilters.push( new NestedFilter({ id: userId, - label: this._userService.getNameForId(userId) - }) + label: this._userService.getNameForId(userId), + }), ); }); filterGroups.push({ @@ -225,15 +225,15 @@ export class ConfigService { label: this._translateService.instant('filters.assigned-people'), icon: 'red:user', filters: peopleFilters, - checker: keyChecker('currentReviewer') + checker: keyChecker('currentReviewer'), }); const needsWorkFilters = [...allDistinctNeedsWork].map( item => new NestedFilter({ id: item, - label: workloadTranslations[item] - }) + label: workloadTranslations[item], + }), ); filterGroups.push({ @@ -243,7 +243,7 @@ export class ConfigService { filterTemplate: needsWorkFilterTemplate, filters: needsWorkFilters.sort(RedactionFilterSorter.byKey), checker: annotationFilterChecker, - matchAll: true + matchAll: true, }); dynamicFilters.forEach((filterValue: Set, filterKey: string) => { @@ -257,10 +257,10 @@ export class ConfigService { (value: string) => new NestedFilter({ id: value, - label: value === '-' ? this._translateService.instant('filters.empty') : value - }) + label: value === '-' ? this._translateService.instant('filters.empty') : value, + }), ), - checker: (input: File, filter: INestedFilter) => filter.id === input.fileAttributes.attributeIdToValue[id] + checker: (input: File, filter: INestedFilter) => filter.id === input.fileAttributes.attributeIdToValue[id], }); }); @@ -269,15 +269,15 @@ export class ConfigService { filters: this._quickFilters(entities), checker: (file: File) => checkedRequiredFilters().reduce((acc, f) => acc && f.checker(file), true) && - (checkedNotRequiredFilters().length === 0 || checkedNotRequiredFilters().reduce((acc, f) => acc || f.checker(file), false)) + (checkedNotRequiredFilters().length === 0 || checkedNotRequiredFilters().reduce((acc, f) => acc || f.checker(file), false)), }); const filesNamesFilters = entities.map( file => new NestedFilter({ id: file.filename, - label: file.filename - }) + label: file.filename, + }), ); filterGroups.push({ @@ -286,7 +286,7 @@ export class ConfigService { icon: 'iqser:document', filters: filesNamesFilters, checker: keyChecker('filename'), - filterceptionPlaceholder: this._translateService.instant('dossier-overview.filters.search') + filterceptionPlaceholder: this._translateService.instant('dossier-overview.filters.search'), }); return filterGroups; @@ -303,11 +303,11 @@ export class ConfigService { { id: 'recent', label: this._translateService.instant('dossier-overview.quick-filters.recent', { - hours: recentPeriod + hours: recentPeriod, }), required: true, - checker: this._recentlyModifiedChecker - } + checker: this._recentlyModifiedChecker, + }, ]; } @@ -316,29 +316,29 @@ export class ConfigService { { id: 'assigned-to-me', label: this._translateService.instant('dossier-overview.quick-filters.assigned-to-me'), - checker: (file: File) => file.currentReviewer === this._userService.currentUser.id + checker: (file: File) => file.currentReviewer === this._userService.currentUser.id, }, { id: 'unassigned', label: this._translateService.instant('dossier-overview.quick-filters.unassigned'), - checker: (file: File) => !file.currentReviewer + checker: (file: File) => !file.currentReviewer, }, { id: 'assigned-to-others', label: this._translateService.instant('dossier-overview.quick-filters.assigned-to-others'), - checker: (file: File) => !!file.currentReviewer && file.currentReviewer !== this._userService.currentUser.id - } + checker: (file: File) => !!file.currentReviewer && file.currentReviewer !== this._userService.currentUser.id, + }, ].map(filter => new NestedFilter(filter)); } private _openEditDossierDialog($event: MouseEvent) { this._dialogService.openDialog('editDossier', $event, { - dossier: this._dossiersService.activeDossier + dossier: this._dossiersService.activeDossier, }); } // eslint-disable-next-line @typescript-eslint/no-unused-vars - private _unassignFn = (reloadDossiers: () => Promise) => async (file: File) => { + private _unassignFn = (reloadDossiers: () => Promise) => (file: File) => { // TODO console.log('unassign', file); }; diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/dossier-overview.module.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/dossier-overview.module.ts index 76b7ee087..8a0293c3a 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/dossier-overview.module.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/dossier-overview.module.ts @@ -16,8 +16,8 @@ const routes = [ { path: '', component: DossierOverviewScreenComponent, - pathMatch: 'full' - } + pathMatch: 'full', + }, ]; @NgModule({ @@ -26,9 +26,9 @@ const routes = [ DossierOverviewBulkActionsComponent, DossierDetailsComponent, DossierDetailsStatsComponent, - TableItemComponent + TableItemComponent, ], providers: [ConfigService], - imports: [RouterModule.forChild(routes), CommonModule, SharedModule, SharedDossiersModule, IqserIconsModule, TranslateModule] + imports: [RouterModule.forChild(routes), CommonModule, SharedModule, SharedDossiersModule, IqserIconsModule, TranslateModule], }) export class DossierOverviewModule {} diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.ts index b7b08e766..5d631c526 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.ts @@ -8,7 +8,7 @@ import { OnDestroy, OnInit, TemplateRef, - ViewChild + ViewChild, } from '@angular/core'; import { FileStatus, IFileAttributeConfig } from '@redaction/red-ui-http'; import { AppStateService } from '@state/app-state.service'; @@ -38,7 +38,7 @@ import { TableColumnConfig, TableComponent, Toaster, - WorkflowConfig + WorkflowConfig, } from '@iqser/common-ui'; import { DossierAttributesService } from '@shared/services/controller-wrappers/dossier-attributes.service'; import { DossierAttributeWithValue } from '@models/dossier-attributes.model'; @@ -56,7 +56,7 @@ import { DossierTemplatesService } from '../../../services/dossier-templates.ser @Component({ templateUrl: './dossier-overview-screen.component.html', styleUrls: ['./dossier-overview-screen.component.scss'], - providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => DossierOverviewScreenComponent) }] + providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => DossierOverviewScreenComponent) }], }) export class DossierOverviewScreenComponent extends ListingComponent implements OnInit, OnDestroy, OnDetach, OnAttach { readonly listingModes = ListingModes; @@ -97,7 +97,7 @@ export class DossierOverviewScreenComponent extends ListingComponent imple private readonly _fileDropOverlayService: FileDropOverlayService, private readonly _dossierAttributesService: DossierAttributesService, private readonly _fileAttributesService: FileAttributesService, - private readonly _configService: ConfigService + private readonly _configService: ConfigService, ) { super(_injector); } @@ -120,7 +120,7 @@ export class DossierOverviewScreenComponent extends ListingComponent imple async actionPerformed(action?: string, file?: File) { if (action === 'assign-reviewer') { - return await this.reloadDossiers(); + return this.reloadDossiers(); } this.calculateData(); @@ -138,7 +138,7 @@ export class DossierOverviewScreenComponent extends ListingComponent imple this._loadingService.start(); this._loadEntitiesFromState(); this.fileAttributeConfigs = this._fileAttributesService.getFileAttributeConfig( - this.currentDossier.dossierTemplateId + this.currentDossier.dossierTemplateId, )?.fileAttributeConfigs; this.tableColumnConfigs = this._configService.tableConfig(this.displayedAttributes); try { @@ -157,7 +157,7 @@ export class DossierOverviewScreenComponent extends ListingComponent imple this.addSubscription = this._dossierTemplatesService.entityChanged$.subscribe(() => { this.fileAttributeConfigs = this._fileAttributesService.getFileAttributeConfig( - this.currentDossier.dossierTemplateId + this.currentDossier.dossierTemplateId, )?.fileAttributeConfigs; }); @@ -239,7 +239,7 @@ export class DossierOverviewScreenComponent extends ListingComponent imple openAssignDossierMembersDialog(): void { const data = { dossier: this.currentDossier, section: 'members' }; - this._dialogService.openDialog('editDossier', null, data, async () => await this.reloadDossiers()); + this._dialogService.openDialog('editDossier', null, data, async () => this.reloadDossiers()); } openDossierDictionaryDialog() { @@ -280,7 +280,7 @@ export class DossierOverviewScreenComponent extends ListingComponent imple this.fileAttributeConfigs, this._needsWorkFilterTemplate, () => this.checkedRequiredFilters, - () => this.checkedNotRequiredFilters + () => this.checkedNotRequiredFilters, ); for (const filterGroup of filterGroups) { diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.ts index 5b9c6c153..c20d0abe4 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.ts @@ -11,7 +11,7 @@ import { DossiersDialogService } from '../../../../services/dossiers-dialog.serv selector: 'redaction-dossiers-listing-actions', templateUrl: './dossiers-listing-actions.component.html', styleUrls: ['./dossiers-listing-actions.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class DossiersListingActionsComponent { readonly circleButtonTypes = CircleButtonTypes; @@ -24,7 +24,7 @@ export class DossiersListingActionsComponent { readonly permissionsService: PermissionsService, readonly appStateService: AppStateService, private readonly _dialogService: DossiersDialogService, - private readonly _userService: UserService + private readonly _userService: UserService, ) {} get statusConfig(): readonly StatusBarConfig[] { @@ -50,7 +50,7 @@ export class DossiersListingActionsComponent { openEditDossierDialog($event: MouseEvent, dossier: Dossier): void { this._dialogService.openDialog('editDossier', $event, { dossier, - afterSave: () => this.actionPerformed.emit() + afterSave: () => this.actionPerformed.emit(), }); } diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-details/dossiers-listing-details.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-details/dossiers-listing-details.component.ts index 355ad624d..cd4716c2b 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-details/dossiers-listing-details.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-details/dossiers-listing-details.component.ts @@ -7,7 +7,7 @@ import { DossiersService } from '../../../../services/dossiers.service'; selector: 'redaction-dossiers-listing-details', templateUrl: './dossiers-listing-details.component.html', styleUrls: ['./dossiers-listing-details.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class DossiersListingDetailsComponent { @Input() dossiersChartData: DoughnutChartConfig[]; diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-dossier-name/dossiers-listing-dossier-name.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-dossier-name/dossiers-listing-dossier-name.component.ts index c779b0287..4ac0d1031 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-dossier-name/dossiers-listing-dossier-name.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-dossier-name/dossiers-listing-dossier-name.component.ts @@ -6,7 +6,7 @@ import { DossierTemplatesService } from '../../../../services/dossier-templates. selector: 'redaction-dossiers-listing-dossier-name', templateUrl: './dossiers-listing-dossier-name.component.html', styleUrls: ['./dossiers-listing-dossier-name.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class DossiersListingDossierNameComponent { @Input() dossier: Dossier; diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts index fad81a746..321ca04a7 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts @@ -5,7 +5,7 @@ import { Required } from '@iqser/common-ui'; @Component({ selector: 'redaction-table-item', templateUrl: './table-item.component.html', - styleUrls: ['./table-item.component.scss'] + styleUrls: ['./table-item.component.scss'], }) export class TableItemComponent { @Input() @Required() dossier!: Dossier; diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/config.service.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/config.service.ts index 771578905..142a46560 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/config.service.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/config.service.ts @@ -13,7 +13,7 @@ import { dossierStatusChecker, dossierTemplateChecker, RedactionFilterSorter, - StatusSorter + StatusSorter, } from '@utils/index'; import { workloadTranslations } from '../../translations/workload-translations'; import { AppStateService } from '@state/app-state.service'; @@ -26,7 +26,7 @@ export class ConfigService { private readonly _userPreferenceService: UserPreferenceService, private readonly _userService: UserService, private readonly _appStateService: AppStateService, - private readonly _dossierTemplatesService: DossierTemplatesService + private readonly _dossierTemplatesService: DossierTemplatesService, ) {} get tableConfig(): TableColumnConfig[] { @@ -34,7 +34,7 @@ export class ConfigService { { label: _('dossier-listing.table-col-names.name'), sortByKey: 'searchKey', width: '2fr' }, { label: _('dossier-listing.table-col-names.needs-work') }, { label: _('dossier-listing.table-col-names.owner'), class: 'user-column' }, - { label: _('dossier-listing.table-col-names.status'), class: 'flex-end', width: 'auto' } + { label: _('dossier-listing.table-col-names.status'), class: 'flex-end', width: 'auto' }, ]; } @@ -51,23 +51,23 @@ export class ConfigService { checker: (dw: Dossier) => { console.log(dw.ownerId, this._currentUser.id); return dw.ownerId === this._currentUser.id; - } + }, }, { id: 'to-approve', label: this._translateService.instant('dossier-listing.quick-filters.to-approve'), - checker: (dw: Dossier) => dw.approverIds.includes(this._currentUser.id) + checker: (dw: Dossier) => dw.approverIds.includes(this._currentUser.id), }, { id: 'to-review', label: this._translateService.instant('dossier-listing.quick-filters.to-review'), - checker: (dw: Dossier) => dw.memberIds.includes(this._currentUser.id) + checker: (dw: Dossier) => dw.memberIds.includes(this._currentUser.id), }, { id: 'other', label: this._translateService.instant('dossier-listing.quick-filters.other'), - checker: (dw: Dossier) => !dw.memberIds.includes(this._currentUser.id) - } + checker: (dw: Dossier) => !dw.memberIds.includes(this._currentUser.id), + }, ].map(filter => new NestedFilter(filter)); return filters.filter(f => f.label === myDossiersLabel || this._userPreferenceService.areDevFeaturesEnabled); @@ -80,8 +80,8 @@ export class ConfigService { action: addDossier, hide: !this._currentUser.isManager, icon: 'iqser:plus', - type: 'primary' - } + type: 'primary', + }, ]; } @@ -123,8 +123,8 @@ export class ConfigService { status => new NestedFilter({ id: status, - label: this._translateService.instant(fileStatusTranslations[status]) - }) + label: this._translateService.instant(fileStatusTranslations[status]), + }), ); filterGroups.push({ @@ -132,15 +132,15 @@ export class ConfigService { label: this._translateService.instant('filters.status'), icon: 'red:status', filters: statusFilters.sort((a, b) => StatusSorter[a.id] - StatusSorter[b.id]), - checker: dossierStatusChecker + checker: dossierStatusChecker, }); const peopleFilters = [...allDistinctPeople].map( userId => new NestedFilter({ id: userId, - label: this._userService.getNameForId(userId) - }) + label: this._userService.getNameForId(userId), + }), ); filterGroups.push({ @@ -148,15 +148,15 @@ export class ConfigService { label: this._translateService.instant('filters.people'), icon: 'red:user', filters: peopleFilters, - checker: dossierMemberChecker + checker: dossierMemberChecker, }); const needsWorkFilters = [...allDistinctNeedsWork].map( type => new NestedFilter({ id: type, - label: workloadTranslations[type] - }) + label: workloadTranslations[type], + }), ); filterGroups.push({ @@ -166,15 +166,15 @@ export class ConfigService { filterTemplate: needsWorkFilterTemplate, filters: needsWorkFilters.sort((a, b) => RedactionFilterSorter[a.id] - RedactionFilterSorter[b.id]), checker: annotationFilterChecker, - matchAll: true + matchAll: true, }); const dossierTemplateFilters = [...allDistinctDossierTemplates].map( id => new NestedFilter({ id: id, - label: this._dossierTemplatesService.find(id).name - }) + label: this._dossierTemplatesService.find(id).name, + }), ); filterGroups.push({ @@ -183,22 +183,22 @@ export class ConfigService { icon: 'red:template', hide: dossierTemplateFilters.length <= 1, filters: dossierTemplateFilters, - checker: dossierTemplateChecker + checker: dossierTemplateChecker, }); const quickFilters = this._quickFilters; filterGroups.push({ slug: 'quickFilters', filters: quickFilters, - checker: (dw: Dossier) => quickFilters.reduce((acc, f) => acc || (f.checked && f.checker(dw)), false) + checker: (dw: Dossier) => quickFilters.reduce((acc, f) => acc || (f.checked && f.checker(dw)), false), }); const dossierFilters = entities.map( dossier => new NestedFilter({ id: dossier.dossierName, - label: dossier.dossierName - }) + label: dossier.dossierName, + }), ); filterGroups.push({ slug: 'dossierNameFilter', @@ -206,7 +206,7 @@ export class ConfigService { icon: 'red:folder', filters: dossierFilters, filterceptionPlaceholder: this._translateService.instant('dossier-listing.filters.search'), - checker: keyChecker('dossierName') + checker: keyChecker('dossierName'), }); return filterGroups; diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/dossiers-listing.module.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/dossiers-listing.module.ts index 0b6b2aa21..fb95409d3 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/dossiers-listing.module.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/dossiers-listing.module.ts @@ -16,8 +16,8 @@ const routes = [ { path: '', component: DossiersListingScreenComponent, - pathMatch: 'full' - } + pathMatch: 'full', + }, ]; @NgModule({ @@ -26,9 +26,9 @@ const routes = [ DossiersListingActionsComponent, DossiersListingDetailsComponent, DossiersListingDossierNameComponent, - TableItemComponent + TableItemComponent, ], providers: [ConfigService], - imports: [RouterModule.forChild(routes), CommonModule, SharedModule, SharedDossiersModule, IqserIconsModule, TranslateModule] + imports: [RouterModule.forChild(routes), CommonModule, SharedModule, SharedDossiersModule, IqserIconsModule, TranslateModule], }) export class DossiersListingModule {} diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts index 0ee765c35..be4b4cbb1 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts @@ -23,13 +23,12 @@ import { DossiersService } from '../../../services/dossiers.service'; providers: [ ...DefaultListingServicesTmp, { provide: EntitiesService, useExisting: DossiersService }, - { provide: ListingComponent, useExisting: forwardRef(() => DossiersListingScreenComponent) } - ] + { provide: ListingComponent, useExisting: forwardRef(() => DossiersListingScreenComponent) }, + ], }) export class DossiersListingScreenComponent extends ListingComponent - implements OnInit, AfterViewInit, OnDestroy, OnAttach, OnDetach -{ + implements OnInit, AfterViewInit, OnDestroy, OnAttach, OnDetach { readonly currentUser = this._userService.currentUser; readonly tableColumnConfigs = this._configService.tableConfig; readonly tableHeaderLabel = _('dossier-listing.table-header.title'); @@ -39,7 +38,7 @@ export class DossiersListingScreenComponent private _lastScrolledIndex: number; @ViewChild('needsWorkFilterTemplate', { read: TemplateRef, - static: true + static: true, }) private readonly _needsWorkFilterTemplate: TemplateRef; @ViewChild(TableComponent) private readonly _tableComponent: TableComponent; @@ -53,7 +52,7 @@ export class DossiersListingScreenComponent private readonly _dossiersService: DossiersService, private readonly _dialogService: DossiersDialogService, private readonly _translateChartService: TranslateChartService, - private readonly _configService: ConfigService + private readonly _configService: ConfigService, ) { super(_injector); this._appStateService.reset(); @@ -103,7 +102,7 @@ export class DossiersListingScreenComponent if (addResponse.addMembers) { this._dialogService.openDialog('editDossier', null, { dossier: addResponse.dossier, - section: 'members' + section: 'members', }); } }); @@ -114,7 +113,7 @@ export class DossiersListingScreenComponent this.dossiersChartData = [ { value: this._activeDossiersCount, color: 'ACTIVE', label: _('active') }, - { value: this._inactiveDossiersCount, color: 'DELETED', label: _('archived') } + { value: this._inactiveDossiersCount, color: 'DELETED', label: _('archived') }, ]; const groups = groupBy(this._dossiersService.allFiles, 'status'); this.documentsChartData = []; @@ -124,7 +123,7 @@ export class DossiersListingScreenComponent value: groups[status].length, color: status, label: fileStatusTranslations[status], - key: status + key: status, }); } this.documentsChartData.sort(StatusSorter.byStatus); diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts index aaa84ca30..b7f8b6f15 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts @@ -13,7 +13,7 @@ import { OnAttach, OnDetach, processFilters, - Toaster + Toaster, } from '@iqser/common-ui'; import { MatDialogRef, MatDialogState } from '@angular/material/dialog'; import { ManualRedactionEntryWrapper } from '@models/file/manual-redaction-entry.wrapper'; @@ -51,7 +51,7 @@ const ALL_HOTKEY_ARRAY = ['Escape', 'F', 'f']; @Component({ templateUrl: './file-preview-screen.component.html', styleUrls: ['./file-preview-screen.component.scss'], - providers: [FilterService] + providers: [FilterService], }) export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnInit, OnDestroy, OnAttach, OnDetach { readonly circleButtonTypes = CircleButtonTypes; @@ -78,7 +78,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni @ViewChild('fileWorkloadComponent') private readonly _workloadComponent: FileWorkloadComponent; @ViewChild('annotationFilterTemplate', { read: TemplateRef, - static: true + static: true, }) private readonly _filterTemplate: TemplateRef; @@ -103,7 +103,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni private readonly _fileManagementControllerService: FileManagementControllerService, private readonly _loadingService: LoadingService, private readonly _filterService: FilterService, - private readonly _translateService: TranslateService + private readonly _translateService: TranslateService, ) { super(); this._loadingService.start(); @@ -240,7 +240,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni async ngOnAttach(previousRoute: ActivatedRouteSnapshot): Promise { if (!this.appStateService.activeFile.canBeOpened) { - return await this.dossiersService.goToActiveDossier(); + return this.dossiersService.goToActiveDossier(); } await this.ngOnInit(); @@ -265,19 +265,19 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni try { this._instance?.Core.annotationManager?.deleteAnnotations(annotationsToDelete, { imported: true, - force: true + force: true, }); } catch (error) { console.error(error); } } - console.log('[REDACTION] Delete previous annotations time: ' + (new Date().getTime() - startTime) + 'ms'); + console.log(`[REDACTION] Delete previous annotations time: ${new Date().getTime() - startTime} ms`); const processStartTime = new Date().getTime(); const newAnnotationsData = this.fileData.getAnnotations( this.appStateService.dictionaryData[this.dossiersService.activeDossier.dossierTemplateId], this.userService.currentUser, this.viewMode, - this.userPreferenceService.areDevFeaturesEnabled + this.userPreferenceService.areDevFeaturesEnabled, ); if (this.annotationData) { this._setHiddenPropertyToNewAnnotations(newAnnotationsData.visibleAnnotations, this.annotationData.visibleAnnotations); @@ -289,21 +289,19 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni this._filterService.addFilterGroup({ slug: 'primaryFilters', filterTemplate: this._filterTemplate, - filters: processFilters(primaryFilters, annotationFilters) + filters: processFilters(primaryFilters, annotationFilters), }); const secondaryFilters = this._filterService.getGroup('secondaryFilters')?.filters; this._filterService.addFilterGroup({ slug: 'secondaryFilters', filterTemplate: this._filterTemplate, - filters: processFilters(secondaryFilters, AnnotationProcessingService.secondaryAnnotationFilters) + filters: processFilters(secondaryFilters, AnnotationProcessingService.secondaryAnnotationFilters), }); - console.log('[REDACTION] Process time: ' + (new Date().getTime() - processStartTime) + 'ms'); + console.log(`[REDACTION] Process time: ${new Date().getTime() - processStartTime} ms`); console.log( - '[REDACTION] Annotation Redraw and filter rebuild time: ' + - (new Date().getTime() - startTime) + - 'ms for : ' + - this.annotations.length + - ' annotations' + `[REDACTION] Annotation Redraw and filter rebuild time: ${new Date().getTime() - startTime} ms for: ${ + this.annotations.length + } annotations`, ); } @@ -344,18 +342,18 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni async (response: ManualAnnotationResponse) => { if (response?.annotationId) { const annotation = this._instance.Core.annotationManager.getAnnotationById( - response.manualRedactionEntryWrapper.rectId + response.manualRedactionEntryWrapper.rectId, ); this._instance.Core.annotationManager.deleteAnnotation(annotation); this.fileData.file = await this.appStateService.reloadActiveFile(); const distinctPages = entryWrapper.manualRedactionEntry.positions .map(p => p.page) .filter((item, pos, self) => self.indexOf(item) === pos); - distinctPages.forEach(page => { - this._cleanupAndRedrawManualAnnotationsForEntirePage(page); - }); + for (const page of distinctPages) { + await this._cleanupAndRedrawManualAnnotationsForEntirePage(page); + } } - } + }, ); }); } @@ -409,7 +407,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni // Add current page in URL query params const extras: NavigationExtras = { queryParams: { page: $event }, - queryParamsHandling: 'merge' + queryParamsHandling: 'merge', }; this._router.navigate([], extras).then(); @@ -444,7 +442,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni switch (action) { case 'delete': - return await this.dossiersService.goToActiveDossier(); + return this.dossiersService.goToActiveDossier(); case 'enable-analysis': case 'reanalyse': @@ -553,7 +551,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni 'DIAGONAL', 33, '#283241', - excludedPages + excludedPages, ); } } @@ -566,7 +564,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni } private _subscribeToFileUpdates(): void { - this.addSubscription = timer(0, 5000).subscribe(async () => await this.appStateService.reloadActiveFile()); + this.addSubscription = timer(0, 5000).subscribe(async () => this.appStateService.reloadActiveFile()); this.addSubscription = this.appStateService.fileReanalysed$.subscribe(async (file: File) => { if (file.fileId === this.fileId) { await this._loadFileData(!this._reloadFileOnReanalysis); @@ -621,7 +619,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni this._instance, this.annotationData.allAnnotations, this.hideSkipped, - this.viewerComponent.utils.isCompareMode + this.viewerComponent.utils.isCompareMode, ); }); } @@ -644,7 +642,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni this._instance, newPageAnnotations, this.hideSkipped, - this.viewerComponent.utils.isCompareMode + this.viewerComponent.utils.isCompareMode, ); } }); @@ -665,7 +663,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni handleFilterDelta(oldPageSpecificFilters, newPageSpecificFilters, primaryFilters); this._filterService.addFilterGroup({ ...primaryFilterGroup, - filters: primaryFilters + filters: primaryFilters, }); } @@ -674,7 +672,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni if (viewerAnnotation) { this._instance.Core.annotationManager.deleteAnnotation(viewerAnnotation, { imported: true, - force: true + force: true, }); } } diff --git a/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.ts index 716563712..e15ff880a 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.ts @@ -7,7 +7,7 @@ import { LoadingService, NestedFilter, SearchPositions, - TableColumnConfig + TableColumnConfig, } from '@iqser/common-ui'; import { List, MatchedDocument, SearchControllerService, SearchResult } from '@redaction/red-ui-http'; import { BehaviorSubject, Observable } from 'rxjs'; @@ -38,7 +38,7 @@ interface SearchInput { @Component({ templateUrl: './search-screen.component.html', styleUrls: ['./search-screen.component.scss'], - providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => SearchScreenComponent) }] + providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => SearchScreenComponent) }], }) export class SearchScreenComponent extends ListingComponent implements OnDestroy { readonly fileStatusTranslations = fileStatusTranslations; @@ -49,7 +49,7 @@ export class SearchScreenComponent extends ListingComponent implements { label: _('search-screen.cols.document'), width: '2fr' }, { label: _('search-screen.cols.status') }, { label: _('search-screen.cols.dossier') }, - { label: _('search-screen.cols.pages'), width: 'auto' } + { label: _('search-screen.cols.pages'), width: 'auto' }, ]; readonly search$ = new BehaviorSubject(null); readonly searchResults$: Observable = this.search$.asObservable().pipe( @@ -57,7 +57,7 @@ export class SearchScreenComponent extends ListingComponent implements map(searchResult => this._toMatchedDocuments(searchResult)), map(docs => this._toListItems(docs)), tap(result => this.entitiesService.setEntities(result)), - tap(() => this._loadingService.stop()) + tap(() => this._loadingService.stop()), ); constructor( @@ -68,7 +68,7 @@ export class SearchScreenComponent extends ListingComponent implements private readonly _dossiersService: DossiersService, readonly routerHistoryService: RouterHistoryService, private readonly _translateService: TranslateService, - private readonly _searchControllerService: SearchControllerService + private readonly _searchControllerService: SearchControllerService, ) { super(_injector); this.searchService.skip = true; @@ -82,16 +82,16 @@ export class SearchScreenComponent extends ListingComponent implements dossier => new NestedFilter({ id: dossier.id, - label: dossier.dossierName - }) + label: dossier.dossierName, + }), ), - checker: keyChecker('id') + checker: keyChecker('id'), }); this.addSubscription = _activatedRoute.queryParamMap .pipe( tap(() => this._loadingService.start()), - map(value => ({ query: value.get('query'), dossierId: value.get('dossierId') })) + map(value => ({ query: value.get('query'), dossierId: value.get('dossierId') })), ) .subscribe(mappedValue => this._updateValues(mappedValue)); @@ -115,7 +115,7 @@ export class SearchScreenComponent extends ListingComponent implements queryString: searchInput.query ?? '', page: 1, returnSections: false, - pageSize: 300 + pageSize: 300, }); } @@ -151,7 +151,7 @@ export class SearchScreenComponent extends ListingComponent implements dossierName: this._dossiersService.find(dossierId).dossierName, filename: file.filename, searchKey: file.filename, - routerLink: `/main/dossiers/${dossierId}/file/${fileId}` + routerLink: `/main/dossiers/${dossierId}/file/${fileId}`, }; } } diff --git a/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts b/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts index 029baa5f5..78d8a1e01 100644 --- a/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts @@ -22,7 +22,7 @@ export class AnnotationActionsService { private readonly _permissionsService: PermissionsService, private readonly _manualAnnotationService: ManualAnnotationService, private readonly _translateService: TranslateService, - private readonly _dialogService: DossiersDialogService + private readonly _dialogService: DossiersDialogService, ) {} acceptSuggestion($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { @@ -31,7 +31,7 @@ export class AnnotationActionsService { this._processObsAndEmit( this._manualAnnotationService.approveRequest(annotation.id, annotation.isModifyDictionary), annotation, - annotationsChanged + annotationsChanged, ); }); } @@ -49,10 +49,10 @@ export class AnnotationActionsService { this._processObsAndEmit( this._manualAnnotationService.forceRedaction({ ...request, - annotationId: annotation.id + annotationId: annotation.id, }), annotation, - annotationsChanged + annotationsChanged, ); }); }); @@ -64,7 +64,7 @@ export class AnnotationActionsService { this._processObsAndEmit( this._manualAnnotationService.changeLegalBasis(annotation.annotationId, data.legalBasis, data.comment), annotation, - annotationsChanged + annotationsChanged, ); }); }); @@ -74,7 +74,7 @@ export class AnnotationActionsService { $event: MouseEvent, annotations: AnnotationWrapper[], removeFromDictionary: boolean, - annotationsChanged: EventEmitter + annotationsChanged: EventEmitter, ) { const data = { annotationsToRemove: annotations, removeFromDictionary }; this._dialogService.openDialog('removeAnnotations', $event, data, (result: { comment: string }) => { @@ -82,7 +82,7 @@ export class AnnotationActionsService { this._processObsAndEmit( this._manualAnnotationService.removeOrSuggestRemoveAnnotation(annotation, removeFromDictionary, result.comment), annotation, - annotationsChanged + annotationsChanged, ); }); }); @@ -100,7 +100,7 @@ export class AnnotationActionsService { this._processObsAndEmit( this._manualAnnotationService.recategorizeImage(annotation.annotationId, data.type, data.comment), annotation, - annotationsChanged + annotationsChanged, ); }); }); @@ -124,13 +124,13 @@ export class AnnotationActionsService { getViewerAvailableActions( annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter + annotationsChanged: EventEmitter, ): Record[] { const availableActions = []; const annotationPermissions = annotations.map(annotation => ({ annotation, - permissions: AnnotationPermissions.forUser(this._permissionsService.isApprover(), this._userService.currentUser, annotation) + permissions: AnnotationPermissions.forUser(this._permissionsService.isApprover(), this._userService.currentUser, annotation), })); const canChangeLegalBasis = annotationPermissions.reduce((acc, next) => acc && next.permissions.canChangeLegalBasis, true); @@ -143,7 +143,7 @@ export class AnnotationActionsService { this._ngZone.run(() => { this.changeLegalBasis(null, annotations, annotationsChanged); }); - } + }, }); } @@ -157,13 +157,13 @@ export class AnnotationActionsService { this._ngZone.run(() => { this.recategorizeImages(null, annotations, annotationsChanged); }); - } + }, }); } const canRemoveOrSuggestToRemoveFromDictionary = annotationPermissions.reduce( (acc, next) => acc && next.permissions.canRemoveOrSuggestToRemoveFromDictionary, - true + true, ); if (canRemoveOrSuggestToRemoveFromDictionary) { availableActions.push({ @@ -174,7 +174,7 @@ export class AnnotationActionsService { this._ngZone.run(() => { this.suggestRemoveAnnotation(null, annotations, true, annotationsChanged); }); - } + }, }); } @@ -188,7 +188,7 @@ export class AnnotationActionsService { this._ngZone.run(() => { this.convertRecommendationToAnnotation(null, annotations, annotationsChanged); }); - } + }, }); } @@ -202,7 +202,7 @@ export class AnnotationActionsService { this._ngZone.run(() => { this.acceptSuggestion(null, annotations, annotationsChanged); }); - } + }, }); } @@ -216,7 +216,7 @@ export class AnnotationActionsService { this._ngZone.run(() => { this.undoDirectAction(null, annotations, annotationsChanged); }); - } + }, }); } @@ -230,7 +230,7 @@ export class AnnotationActionsService { this._ngZone.run(() => { this.markAsFalsePositive(null, annotations, annotationsChanged); }); - } + }, }); } @@ -244,7 +244,7 @@ export class AnnotationActionsService { this._ngZone.run(() => { this.forceRedaction(null, annotations, annotationsChanged); }); - } + }, }); } @@ -258,13 +258,13 @@ export class AnnotationActionsService { this._ngZone.run(() => { this.rejectSuggestion(null, annotations, annotationsChanged); }); - } + }, }); } const canRemoveOrSuggestToRemoveOnlyHere = annotationPermissions.reduce( (acc, next) => acc && next.permissions.canRemoveOrSuggestToRemoveOnlyHere, - true + true, ); if (canRemoveOrSuggestToRemoveOnlyHere) { availableActions.push({ @@ -275,7 +275,7 @@ export class AnnotationActionsService { this._ngZone.run(() => { this.suggestRemoveAnnotation(null, annotations, false, annotationsChanged); }); - } + }, }); } @@ -295,13 +295,13 @@ export class AnnotationActionsService { }, () => { annotationsChanged.emit(); - } + }, ); } private _getFalsePositiveText(annotation: AnnotationWrapper) { if (annotation.canBeMarkedAsFalsePositive) { - let text; + let text: string; if (annotation.hasTextAfter) { text = getFirstRelevantTextPart(annotation.textAfter, 'FORWARD'); return text ? (annotation.value + text).trim() : annotation.value; @@ -319,7 +319,7 @@ export class AnnotationActionsService { $event: MouseEvent, annotation: AnnotationWrapper, text: string, - annotationsChanged: EventEmitter + annotationsChanged: EventEmitter, ) { $event?.stopPropagation(); diff --git a/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts b/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts index 8ed474bf6..d89f45970 100644 --- a/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts @@ -14,7 +14,7 @@ export class AnnotationDrawService { private readonly _appStateService: AppStateService, private readonly _dossiersService: DossiersService, private readonly _redactionLogControllerService: RedactionLogControllerService, - private readonly _userPreferenceService: UserPreferenceService + private readonly _userPreferenceService: UserPreferenceService, ) {} drawAnnotations(activeViewer: WebViewerInstance, annotationWrappers: AnnotationWrapper[], hideSkipped = false, compareMode = false) { @@ -22,7 +22,7 @@ export class AnnotationDrawService { return; } const annotations = annotationWrappers.map(annotation => - this.computeAnnotation(activeViewer, annotation, hideSkipped, compareMode) + this.computeAnnotation(activeViewer, annotation, hideSkipped, compareMode), ); const annotationManager = activeViewer.Core.annotationManager; annotationManager.addAnnotations(annotations, { imported: true }); @@ -60,7 +60,7 @@ export class AnnotationDrawService { topLeft: sectionRectangle.topLeft, page: pageNumber, height: sectionRectangle.height, - width: sectionRectangle.width + width: sectionRectangle.width, }; rectangleAnnot.PageNumber = pageNumber; rectangleAnnot.X = rectangle.topLeft.x - 1; @@ -98,7 +98,7 @@ export class AnnotationDrawService { highlight.setCustomData('redactionColor', String(this.getColor(activeViewer, 'redaction', 'redaction'))); highlight.setCustomData( 'annotationColor', - String(this.getColor(activeViewer, annotationWrapper.superType, annotationWrapper.type)) + String(this.getColor(activeViewer, annotationWrapper.superType, annotationWrapper.type)), ); return highlight; diff --git a/apps/red-ui/src/app/modules/dossier/services/annotation-processing.service.ts b/apps/red-ui/src/app/modules/dossier/services/annotation-processing.service.ts index 66eb5f2c5..9eaddc99d 100644 --- a/apps/red-ui/src/app/modules/dossier/services/annotation-processing.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/annotation-processing.service.ts @@ -15,7 +15,7 @@ export class AnnotationProcessingService { label: _('filter-menu.with-comments'), checked: false, topLevelFilter: true, - checker: (annotation: AnnotationWrapper) => annotation?.comments?.length > 0 + checker: (annotation: AnnotationWrapper) => annotation?.comments?.length > 0, }, { id: 'with-reason-changes', @@ -23,8 +23,8 @@ export class AnnotationProcessingService { label: _('filter-menu.with-reason-changes'), checked: false, topLevelFilter: true, - checker: (annotation: AnnotationWrapper) => annotation?.legalBasisChangeValue?.length > 0 - } + checker: (annotation: AnnotationWrapper) => annotation?.legalBasisChangeValue?.length > 0, + }, ].map(item => new NestedFilter(item)); } @@ -51,7 +51,7 @@ export class AnnotationProcessingService { id: a.type, label: a.type, checked: false, - matches: 1 + matches: 1, }; filterMap.set(key, childFilter); parentFilter.children.push(new Filter(childFilter)); @@ -76,7 +76,7 @@ export class AnnotationProcessingService { filterAndGroupAnnotations( annotations: AnnotationWrapper[], primaryFilters: INestedFilter[], - secondaryFilters?: INestedFilter[] + secondaryFilters?: INestedFilter[], ): Map { const obj = new Map(); @@ -91,7 +91,7 @@ export class AnnotationProcessingService { if ( !this._matchesAll( secondaryFlatFilters, - f => (!!f.checker && f.checker(annotation)) || this._checkByFilterKey(f, annotation) + f => (!!f.checker && f.checker(annotation)) || this._checkByFilterKey(f, annotation), ) ) { continue; @@ -118,7 +118,7 @@ export class AnnotationProcessingService { id: key, topLevelFilter: true, matches: 1, - label: annotationTypesTranslations[key] + label: annotationTypesTranslations[key], }); filterMap.set(key, filter); filters.push(filter); diff --git a/apps/red-ui/src/app/modules/dossier/services/dossier-templates.service.ts b/apps/red-ui/src/app/modules/dossier/services/dossier-templates.service.ts index 9e7bc36df..5f07cc1e6 100644 --- a/apps/red-ui/src/app/modules/dossier/services/dossier-templates.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/dossier-templates.service.ts @@ -9,7 +9,7 @@ import { currentComponentRoute } from '@utils/functions'; import { map, switchMap } from 'rxjs/operators'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DossierTemplatesService extends EntitiesService { readonly activeDossierTemplate$: Observable; @@ -18,7 +18,7 @@ export class DossierTemplatesService extends EntitiesService entities.map(e => this._fileAttributesService.getFileAttributesConfig(e.id)); return super.loadAll().pipe( switchMap(entities => forkJoin(getAttributes(entities))), - map(() => this.all) + map(() => this.all), ); } } diff --git a/apps/red-ui/src/app/modules/dossier/services/dossiers-dialog.service.ts b/apps/red-ui/src/app/modules/dossier/services/dossiers-dialog.service.ts index 150d328de..6131fb4fb 100644 --- a/apps/red-ui/src/app/modules/dossier/services/dossiers-dialog.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/dossiers-dialog.service.ts @@ -38,46 +38,46 @@ type DossiersDialogConfig = { export class DossiersDialogService extends DialogService { protected readonly _config: DossiersDialogConfig = { confirm: { - component: ConfirmationDialogComponent + component: ConfirmationDialogComponent, }, documentInfo: { component: DocumentInfoDialogComponent, - dialogConfig: { autoFocus: true } + dialogConfig: { autoFocus: true }, }, editDossier: { component: EditDossierDialogComponent, - dialogConfig: { ...largeDialogConfig } + dialogConfig: { ...largeDialogConfig }, }, addDossier: { component: AddDossierDialogComponent, - dialogConfig: { width: '900px', autoFocus: true } + dialogConfig: { width: '900px', autoFocus: true }, }, assignFile: { - component: AssignReviewerApproverDialogComponent + component: AssignReviewerApproverDialogComponent, }, recategorizeImage: { - component: RecategorizeImageDialogComponent + component: RecategorizeImageDialogComponent, }, changeLegalBasis: { - component: ChangeLegalBasisDialogComponent + component: ChangeLegalBasisDialogComponent, }, removeAnnotations: { - component: RemoveAnnotationsDialogComponent + component: RemoveAnnotationsDialogComponent, }, forceRedaction: { - component: ForceRedactionDialogComponent + component: ForceRedactionDialogComponent, }, manualAnnotation: { component: ManualAnnotationDialogComponent, - dialogConfig: { autoFocus: true } - } + dialogConfig: { autoFocus: true }, + }, }; constructor( protected readonly _dialog: MatDialog, private readonly _appStateService: AppStateService, private readonly _manualAnnotationService: ManualAnnotationService, - private readonly _configService: ConfigService + private readonly _configService: ConfigService, ) { super(_dialog); } diff --git a/apps/red-ui/src/app/modules/dossier/services/dossiers.service.ts b/apps/red-ui/src/app/modules/dossier/services/dossiers.service.ts index 8c74a8c95..c64ec953c 100644 --- a/apps/red-ui/src/app/modules/dossier/services/dossiers.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/dossiers.service.ts @@ -19,7 +19,7 @@ const DOSSIER_EXISTS_MSG = _('add-dossier-dialog.errors.dossier-already-exists') const GENERIC_MGS = _('add-dossier-dialog.errors.generic'); @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DossiersService extends EntitiesService { readonly stats$ = this.all$.pipe(map(entities => this._computeStats(entities))); @@ -30,7 +30,7 @@ export class DossiersService extends EntitiesService { protected readonly _injector: Injector, private readonly _router: Router, private readonly _dictionaryService: DictionaryService, - private readonly _toaster: Toaster + private readonly _toaster: Toaster, ) { super(_injector, Dossier, 'dossier'); this.activeDossier$ = this._activeDossier$.asObservable(); @@ -105,7 +105,7 @@ export class DossiersService extends EntitiesService { catchError(error => { this._toaster.error(error.status === 409 ? DOSSIER_EXISTS_MSG : GENERIC_MGS); return of(undefined); - }) + }), ); } @@ -146,7 +146,7 @@ export class DossiersService extends EntitiesService { return { totalPeople: totalPeople.size, - totalAnalyzedPages + totalAnalyzedPages, }; } } diff --git a/apps/red-ui/src/app/modules/dossier/services/file-attributes.service.ts b/apps/red-ui/src/app/modules/dossier/services/file-attributes.service.ts index cd235f924..4d034c077 100644 --- a/apps/red-ui/src/app/modules/dossier/services/file-attributes.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/file-attributes.service.ts @@ -8,7 +8,7 @@ import { FileAttributeConfig } from '@models/file/file-attribute-config'; type FileAttributesConfigMap = Readonly>; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class FileAttributesService extends EntitiesService { private readonly _fileAttributesConfig$ = new BehaviorSubject({}); @@ -35,10 +35,10 @@ export class FileAttributesService extends EntitiesService this._fileAttributesConfig$.next({ ...this._fileAttributesConfig$.value, - [dossierTemplateId]: entities - }) + [dossierTemplateId]: entities, + }), ), - catchError(() => of({})) + catchError(() => of({})), ); } diff --git a/apps/red-ui/src/app/modules/dossier/services/files.service.ts b/apps/red-ui/src/app/modules/dossier/services/files.service.ts index 308bf0d77..5e95f8b99 100644 --- a/apps/red-ui/src/app/modules/dossier/services/files.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/files.service.ts @@ -7,7 +7,7 @@ import { map } from 'rxjs/operators'; import { UserService } from '@services/user.service'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class FilesService extends EntitiesService { constructor(protected readonly _injector: Injector, private readonly _userService: UserService) { diff --git a/apps/red-ui/src/app/modules/dossier/services/injector.ts b/apps/red-ui/src/app/modules/dossier/services/injector.ts index 9aae4f747..871abbb46 100644 --- a/apps/red-ui/src/app/modules/dossier/services/injector.ts +++ b/apps/red-ui/src/app/modules/dossier/services/injector.ts @@ -10,7 +10,7 @@ export const TEMPORARY_INJECTOR = injector => Injector.create({ providers: [ { provide: FilterService, useClass: FilterService }, - { provide: SearchService, useClass: SearchService } + { provide: SearchService, useClass: SearchService }, ], - parent: injector + parent: injector, }); diff --git a/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts b/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts index 862212d1f..91ee3f08c 100644 --- a/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts @@ -25,7 +25,7 @@ export class ManualAnnotationService { private readonly _translateService: TranslateService, private readonly _toaster: Toaster, private readonly _manualRedactionControllerService: ManualRedactionControllerService, - private readonly _permissionsService: PermissionsService + private readonly _permissionsService: PermissionsService, ) { this.CONFIG = { add: 'addRedaction', @@ -40,7 +40,7 @@ export class ManualAnnotationService { remove: 'removeRedaction', suggest: 'requestAddRedaction', 'force-redaction': 'forceRedaction', - 'request-force-redaction': 'requestForceRedaction' + 'request-force-redaction': 'requestForceRedaction', }; } @@ -49,13 +49,13 @@ export class ManualAnnotationService { ? this._manualRedactionControllerService[this.CONFIG[mode]]( body, this._dossiersService.activeDossierId, - this._appStateService.activeFileId + this._appStateService.activeFileId, ) : this._manualRedactionControllerService[this.CONFIG[mode]]( body, secondParam, this._dossiersService.activeDossierId, - this._appStateService.activeFileId + this._appStateService.activeFileId, ); return obs.pipe( @@ -64,9 +64,9 @@ export class ManualAnnotationService { error => this._toaster.error(this._getMessage(mode, modifyDictionary, true), { params: error, - positionClass: 'toast-file-preview' - }) - ) + positionClass: 'toast-file-preview', + }), + ), ); } @@ -77,7 +77,7 @@ export class ManualAnnotationService { { text: comment }, annotationId, this._dossiersService.activeDossierId, - this._appStateService.activeFileId + this._appStateService.activeFileId, ); } @@ -87,7 +87,7 @@ export class ManualAnnotationService { annotationId, commentId, this._dossiersService.activeDossierId, - this._appStateService.activeFileId + this._appStateService.activeFileId, ); } @@ -172,7 +172,7 @@ export class ManualAnnotationService { body = { annotationId: annotationWrapper.id, removeFromDictionary, - comment: comment + comment: comment, }; removeDict = removeFromDictionary; } @@ -181,7 +181,7 @@ export class ManualAnnotationService { body = { annotationId: annotationWrapper.id, removeFromDictionary, - comment: comment + comment: comment, }; removeDict = removeFromDictionary; } diff --git a/apps/red-ui/src/app/modules/dossier/services/pdf-viewer-data.service.ts b/apps/red-ui/src/app/modules/dossier/services/pdf-viewer-data.service.ts index 4db531619..9729a3382 100644 --- a/apps/red-ui/src/app/modules/dossier/services/pdf-viewer-data.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/pdf-viewer-data.service.ts @@ -5,7 +5,7 @@ import { FileManagementControllerService, ManualRedactionControllerService, RedactionLogControllerService, - ViewedPagesControllerService + ViewedPagesControllerService, } from '@redaction/red-ui-http'; import { FileDataModel } from '@models/file/file-data.model'; import { AppStateService } from '@state/app-state.service'; @@ -22,7 +22,7 @@ export class PdfViewerDataService { private readonly _man: ManualRedactionControllerService, private readonly _fileManagementControllerService: FileManagementControllerService, private readonly _redactionLogControllerService: RedactionLogControllerService, - private readonly _viewedPagesControllerService: ViewedPagesControllerService + private readonly _viewedPagesControllerService: ViewedPagesControllerService, ) {} loadActiveFileRedactionLog() { @@ -31,8 +31,8 @@ export class PdfViewerDataService { .pipe( tap( redactionLog => redactionLog.redactionLogEntry.sort((a, b) => a.positions[0].page - b.positions[0].page), - catchError(() => of({})) - ) + catchError(() => of({})), + ), ); } @@ -42,7 +42,7 @@ export class PdfViewerDataService { const viewedPages$ = this.getViewedPagesForActiveFile(); return forkJoin([file$, reactionLog$, viewedPages$]).pipe( - map(data => new FileDataModel(this._appStateService.activeFile, ...data)) + map(data => new FileDataModel(this._appStateService.activeFile, ...data)), ); } diff --git a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts index 4dae7a6f7..a026e2281 100644 --- a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts @@ -11,7 +11,7 @@ import { LoadingService, Required, StatusBarConfig, - Toaster + Toaster, } from '@iqser/common-ui'; import { FileManagementControllerService, FileStatus } from '@redaction/red-ui-http'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @@ -25,7 +25,7 @@ import { DossiersService } from '../../../services/dossiers.service'; @Component({ selector: 'redaction-file-actions', templateUrl: './file-actions.component.html', - styleUrls: ['./file-actions.component.scss'] + styleUrls: ['./file-actions.component.scss'], }) export class FileActionsComponent extends AutoUnsubscribe implements OnInit, OnDestroy, OnChanges { readonly circleButtonTypes = CircleButtonTypes; @@ -68,7 +68,7 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnInit, OnD private readonly _fileManagementControllerService: FileManagementControllerService, private readonly _userService: UserService, private readonly _toaster: Toaster, - private readonly _userPreferenceService: UserPreferenceService + private readonly _userPreferenceService: UserPreferenceService, ) { super(); } @@ -130,7 +130,7 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnInit, OnD $event, new ConfirmationDialogInput({ title: _('confirmation-dialog.delete-file.title'), - question: _('confirmation-dialog.delete-file.question') + question: _('confirmation-dialog.delete-file.question'), }), async () => { this._loadingService.start(); @@ -143,7 +143,7 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnInit, OnD await this.appStateService.reloadActiveDossierFiles(); this.actionPerformed.emit('delete'); this._loadingService.stop(); - } + }, ); } @@ -191,11 +191,11 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnInit, OnD $event, new ConfirmationDialogInput({ title: _('confirmation-dialog.approve-file.title'), - question: _('confirmation-dialog.approve-file.question') + question: _('confirmation-dialog.approve-file.question'), }), () => { this._setFileApproved(); - } + }, ); } else { this._setFileApproved(); @@ -215,7 +215,7 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnInit, OnD $event, this.file, () => this.reloadDossiers('assign-reviewer'), - ignoreDialogChanges + ignoreDialogChanges, ); } diff --git a/apps/red-ui/src/app/modules/dossier/shared/components/needs-work-badge/needs-work-badge.component.ts b/apps/red-ui/src/app/modules/dossier/shared/components/needs-work-badge/needs-work-badge.component.ts index 27040f512..6b136e8ac 100644 --- a/apps/red-ui/src/app/modules/dossier/shared/components/needs-work-badge/needs-work-badge.component.ts +++ b/apps/red-ui/src/app/modules/dossier/shared/components/needs-work-badge/needs-work-badge.component.ts @@ -6,7 +6,7 @@ import { Dossier } from '@state/model/dossier'; @Component({ selector: 'redaction-needs-work-badge', templateUrl: './needs-work-badge.component.html', - styleUrls: ['./needs-work-badge.component.scss'] + styleUrls: ['./needs-work-badge.component.scss'], }) export class NeedsWorkBadgeComponent { @Input() needsWorkInput: File | Dossier; @@ -46,7 +46,7 @@ export class NeedsWorkBadgeComponent { } get hasAnnotationComments(): boolean { - return this.needsWorkInput instanceof File && (this.needsWorkInput).hasAnnotationComments; + return this.needsWorkInput instanceof File && ( this.needsWorkInput).hasAnnotationComments; } reanalysisRequired() { diff --git a/apps/red-ui/src/app/modules/dossier/shared/services/file-action.service.ts b/apps/red-ui/src/app/modules/dossier/shared/services/file-action.service.ts index ebcd2346d..2def31856 100644 --- a/apps/red-ui/src/app/modules/dossier/shared/services/file-action.service.ts +++ b/apps/red-ui/src/app/modules/dossier/shared/services/file-action.service.ts @@ -19,7 +19,7 @@ export class FileActionService { private readonly _fileService: FilesService, private readonly _reanalysisControllerService: ReanalysisControllerService, private readonly _appStateService: AppStateService, - private readonly _dossiersService: DossiersService + private readonly _dossiersService: DossiersService, ) {} reanalyseFile(file = this._appStateService.activeFile) { @@ -36,7 +36,7 @@ export class FileActionService { if (atLeastOneFileHasReviewer) { const data = new ConfirmationDialogInput({ title: _('confirmation-dialog.assign-file-to-me.title'), - question: _('confirmation-dialog.assign-file-to-me.question') + question: _('confirmation-dialog.assign-file-to-me.question'), }); this._dialogService.openDialog('confirm', null, data, () => { this._assignReviewerToCurrentUser(files, callback) @@ -59,28 +59,28 @@ export class FileActionService { return this._fileService.setUnderApprovalFor( files.map(f => f.fileId), approverId, - this._dossiersService.activeDossierId + this._dossiersService.activeDossierId, ); } setFilesApproved(files: File[]) { return this._fileService.setApprovedFor( files.map(f => f.fileId), - this._dossiersService.activeDossierId + this._dossiersService.activeDossierId, ); } setFilesUnderReview(files: File[]) { return this._fileService.setUnderReviewFor( files.map(f => f.fileId), - this._dossiersService.activeDossierId + this._dossiersService.activeDossierId, ); } ocrFiles(files: File[]) { return this._reanalysisControllerService.ocrFiles( files.map(f => f.fileId), - this._dossiersService.activeDossierId + this._dossiersService.activeDossierId, ); } @@ -89,12 +89,12 @@ export class FileActionService { $event: MouseEvent, file = this._appStateService.activeFile, callback?: Function, - ignoreChanged = false + ignoreChanged = false, ) { const data = { mode, files: [file], ignoreChanged }; this._dialogService.openDialog('assignFile', $event, data, async () => { if (callback) { - callback(); + await callback(); } }); } @@ -104,7 +104,7 @@ export class FileActionService { .setReviewerFor( files.map(f => f.fileId), this._dossiersService.activeDossierId, - this._userService.currentUser.id + this._userService.currentUser.id, ) .toPromise(); if (callback) { diff --git a/apps/red-ui/src/app/modules/dossier/shared/shared-dossiers.module.ts b/apps/red-ui/src/app/modules/dossier/shared/shared-dossiers.module.ts index b1c4b967e..2691d256e 100644 --- a/apps/red-ui/src/app/modules/dossier/shared/shared-dossiers.module.ts +++ b/apps/red-ui/src/app/modules/dossier/shared/shared-dossiers.module.ts @@ -12,6 +12,6 @@ const components = [FileActionsComponent, NeedsWorkBadgeComponent]; declarations: [...components], exports: [...components], providers: [FileActionService], - imports: [CommonModule, IqserIconsModule, SharedModule] + imports: [CommonModule, IqserIconsModule, SharedModule], }) export class SharedDossiersModule {} diff --git a/apps/red-ui/src/app/modules/dossier/translations/annotation-actions-translations.ts b/apps/red-ui/src/app/modules/dossier/translations/annotation-actions-translations.ts index e9c127212..987cda37b 100644 --- a/apps/red-ui/src/app/modules/dossier/translations/annotation-actions-translations.ts +++ b/apps/red-ui/src/app/modules/dossier/translations/annotation-actions-translations.ts @@ -10,85 +10,85 @@ export const annotationActionsTranslations: { dictionary: { add: { error: _('annotation-actions.message.dictionary.add.error'), - success: _('annotation-actions.message.dictionary.add.success') + success: _('annotation-actions.message.dictionary.add.success'), }, approve: { error: _('annotation-actions.message.dictionary.approve.error'), - success: _('annotation-actions.message.dictionary.approve.success') + success: _('annotation-actions.message.dictionary.approve.success'), }, decline: { error: _('annotation-actions.message.dictionary.decline.error'), - success: _('annotation-actions.message.dictionary.decline.success') + success: _('annotation-actions.message.dictionary.decline.success'), }, remove: { error: _('annotation-actions.message.dictionary.remove.error'), - success: _('annotation-actions.message.dictionary.remove.success') + success: _('annotation-actions.message.dictionary.remove.success'), }, 'request-remove': { error: _('annotation-actions.message.dictionary.request-remove.error'), - success: _('annotation-actions.message.dictionary.request-remove.success') + success: _('annotation-actions.message.dictionary.request-remove.success'), }, suggest: { error: _('annotation-actions.message.dictionary.suggest.error'), - success: _('annotation-actions.message.dictionary.suggest.success') + success: _('annotation-actions.message.dictionary.suggest.success'), }, undo: { error: _('annotation-actions.message.dictionary.undo.error'), - success: _('annotation-actions.message.dictionary.undo.success') - } + success: _('annotation-actions.message.dictionary.undo.success'), + }, }, 'manual-redaction': { add: { error: _('annotation-actions.message.manual-redaction.add.error'), - success: _('annotation-actions.message.manual-redaction.add.success') + success: _('annotation-actions.message.manual-redaction.add.success'), }, approve: { error: _('annotation-actions.message.manual-redaction.approve.error'), - success: _('annotation-actions.message.manual-redaction.approve.success') + success: _('annotation-actions.message.manual-redaction.approve.success'), }, 'change-legal-basis': { error: _('annotation-actions.message.manual-redaction.change-legal-basis.error'), - success: _('annotation-actions.message.manual-redaction.change-legal-basis.success') + success: _('annotation-actions.message.manual-redaction.change-legal-basis.success'), }, decline: { error: _('annotation-actions.message.manual-redaction.decline.error'), - success: _('annotation-actions.message.manual-redaction.decline.success') + success: _('annotation-actions.message.manual-redaction.decline.success'), }, 'force-redaction': { error: _('annotation-actions.message.manual-redaction.force-redaction.error'), - success: _('annotation-actions.message.manual-redaction.force-redaction.success') + success: _('annotation-actions.message.manual-redaction.force-redaction.success'), }, 'recategorize-image': { error: _('annotation-actions.message.manual-redaction.recategorize-image.error'), - success: _('annotation-actions.message.manual-redaction.recategorize-image.success') + success: _('annotation-actions.message.manual-redaction.recategorize-image.success'), }, 'request-change-legal-basis': { error: _('annotation-actions.message.manual-redaction.request-change-legal-basis.error'), - success: _('annotation-actions.message.manual-redaction.request-change-legal-basis.success') + success: _('annotation-actions.message.manual-redaction.request-change-legal-basis.success'), }, 'request-force-redaction': { error: _('annotation-actions.message.manual-redaction.request-force-redaction.error'), - success: _('annotation-actions.message.manual-redaction.request-force-redaction.success') + success: _('annotation-actions.message.manual-redaction.request-force-redaction.success'), }, 'request-image-recategorization': { error: _('annotation-actions.message.manual-redaction.request-image-recategorization.error'), - success: _('annotation-actions.message.manual-redaction.request-image-recategorization.success') + success: _('annotation-actions.message.manual-redaction.request-image-recategorization.success'), }, suggest: { error: _('annotation-actions.message.manual-redaction.suggest.error'), - success: _('annotation-actions.message.manual-redaction.suggest.success') + success: _('annotation-actions.message.manual-redaction.suggest.success'), }, undo: { error: _('annotation-actions.message.manual-redaction.undo.error'), - success: _('annotation-actions.message.manual-redaction.undo.success') + success: _('annotation-actions.message.manual-redaction.undo.success'), }, remove: { error: _('annotation-actions.message.manual-redaction.remove.error'), - success: _('annotation-actions.message.manual-redaction.remove.success') + success: _('annotation-actions.message.manual-redaction.remove.success'), }, 'request-remove': { error: _('annotation-actions.message.manual-redaction.request-remove.error'), - success: _('annotation-actions.message.manual-redaction.request-remove.success') - } - } + success: _('annotation-actions.message.manual-redaction.request-remove.success'), + }, + }, }; diff --git a/apps/red-ui/src/app/modules/dossier/translations/file-status-translations.ts b/apps/red-ui/src/app/modules/dossier/translations/file-status-translations.ts index 26432c048..1449ed1d2 100644 --- a/apps/red-ui/src/app/modules/dossier/translations/file-status-translations.ts +++ b/apps/red-ui/src/app/modules/dossier/translations/file-status-translations.ts @@ -14,5 +14,5 @@ export const fileStatusTranslations: { [key in FileStatus]: string } = { UNASSIGNED: _('file-status.unassigned'), UNDER_APPROVAL: _('file-status.under-approval'), UNDER_REVIEW: _('file-status.under-review'), - UNPROCESSED: _('file-status.unprocessed') + UNPROCESSED: _('file-status.unprocessed'), }; diff --git a/apps/red-ui/src/app/modules/dossier/translations/image-categories-translations.ts b/apps/red-ui/src/app/modules/dossier/translations/image-categories-translations.ts index 5ca0276f3..9477421dd 100644 --- a/apps/red-ui/src/app/modules/dossier/translations/image-categories-translations.ts +++ b/apps/red-ui/src/app/modules/dossier/translations/image-categories-translations.ts @@ -5,5 +5,5 @@ export const imageCategoriesTranslations: { [key in ImageCategory]: string } = { signature: _('image-category.signature'), logo: _('image-category.logo'), formula: _('image-category.formula'), - image: _('image-category.image') + image: _('image-category.image'), }; diff --git a/apps/red-ui/src/app/modules/dossier/translations/workload-translations.ts b/apps/red-ui/src/app/modules/dossier/translations/workload-translations.ts index 5cb5905df..84d912e7c 100644 --- a/apps/red-ui/src/app/modules/dossier/translations/workload-translations.ts +++ b/apps/red-ui/src/app/modules/dossier/translations/workload-translations.ts @@ -8,5 +8,5 @@ export const workloadTranslations: { [key: string]: string } = { redaction: _('filter.redaction'), suggestion: _('filter.suggestion'), updated: _('filter.updated'), - comment: _('filter.comment') + comment: _('filter.comment'), }; diff --git a/apps/red-ui/src/app/modules/dossier/utils/compare-mode.utils.ts b/apps/red-ui/src/app/modules/dossier/utils/compare-mode.utils.ts index 899d386a8..3074b808b 100644 --- a/apps/red-ui/src/app/modules/dossier/utils/compare-mode.utils.ts +++ b/apps/red-ui/src/app/modules/dossier/utils/compare-mode.utils.ts @@ -10,7 +10,7 @@ const processPage = async (pageNumber, document1, document2, mergedDocument, pdf await blankPage.setRotation(await pageToCopy.getRotation()); await mergedDocument.pagePushBack(blankPage); await stampPDFPage(mergedDocument, pdfNet, '<< Compare Placeholder Page >>', 20, 'courier', 'DIAGONAL', 33, '#ffb83b', [ - await mergedDocument.getPageCount() + await mergedDocument.getPageCount(), ]); } }; @@ -25,7 +25,7 @@ export const loadCompareDocumentWrapper = async ( file, setCompareViewMode: () => void, navigateToPage: () => void, - pdfNet: any + pdfNet: any, ) => { try { const maxPageCount = Math.max(currentDocumentPageCount, compareDocumentPageCount); @@ -38,13 +38,13 @@ export const loadCompareDocumentWrapper = async ( const buffer = await mergedDocument.saveMemoryBuffer(pdfNet.SDFDoc.SaveOptions.e_linearized); const mergedDocumentBuffer = new Blob([buffer], { - type: 'application/pdf' + type: 'application/pdf', }); setCompareViewMode(); instance.loadDocument(mergedDocumentBuffer, { - filename: file?.filename ?? 'document.pdf' + filename: file?.filename ?? 'document.pdf', }); instance.disableElements(['compareButton']); instance.enableElements(['closeCompareButton']); diff --git a/apps/red-ui/src/app/modules/dossier/utils/pdf-viewer.utils.ts b/apps/red-ui/src/app/modules/dossier/utils/pdf-viewer.utils.ts index 625355307..6d2acd34a 100644 --- a/apps/red-ui/src/app/modules/dossier/utils/pdf-viewer.utils.ts +++ b/apps/red-ui/src/app/modules/dossier/utils/pdf-viewer.utils.ts @@ -35,7 +35,7 @@ const DISABLED_HOTKEYS = [ 'G', 'H', 'K', - 'U' + 'U', ] as const; export class PdfViewerUtils { @@ -43,14 +43,6 @@ export class PdfViewerUtils { constructor(readonly instance: WebViewerInstance, public viewMode: ViewMode, public multiSelectActive: boolean) {} - private get _documentViewer() { - return this.instance?.Core.documentViewer; - } - - private get _annotationManager() { - return this.instance?.Core.annotationManager; - } - get isCompareMode() { return this.viewMode === 'COMPARE'; } @@ -79,6 +71,14 @@ export class PdfViewerUtils { } } + private get _documentViewer() { + return this.instance?.Core.documentViewer; + } + + private get _annotationManager() { + return this.instance?.Core.annotationManager; + } + private get _currentInternalPage() { return this.instance?.Core.documentViewer?.getCurrentPage(); } @@ -115,17 +115,17 @@ export class PdfViewerUtils { return translateQuads(page, rotation, quads); } - toPosition(page: number, selectedQuad: any): Rectangle { + toPosition(page: number, selectedQuad: { x3: number; x4: number; y4: number; y2: number }): Rectangle { const pageHeight = this._documentViewer.getPageHeight(page); const height = selectedQuad.y2 - selectedQuad.y4; return { page: page, topLeft: { x: selectedQuad.x4, - y: pageHeight - (selectedQuad.y4 + height) + y: pageHeight - (selectedQuad.y4 + height), }, height: height, - width: selectedQuad.x3 - selectedQuad.x4 + width: selectedQuad.x3 - selectedQuad.x4, }; } diff --git a/apps/red-ui/src/app/modules/icons/icons.module.ts b/apps/red-ui/src/app/modules/icons/icons.module.ts index bc7e3e171..efea9ea26 100644 --- a/apps/red-ui/src/app/modules/icons/icons.module.ts +++ b/apps/red-ui/src/app/modules/icons/icons.module.ts @@ -6,7 +6,7 @@ import { DomSanitizer } from '@angular/platform-browser'; @NgModule({ imports: [CommonModule, MatIconModule], declarations: [], - exports: [MatIconModule] + exports: [MatIconModule], }) export class IconsModule { constructor(private readonly _iconRegistry: MatIconRegistry, private readonly _sanitizer: DomSanitizer) { @@ -68,14 +68,14 @@ export class IconsModule { 'undo', 'user', 'visibility', - 'visibility-off' + 'visibility-off', ]; for (const icon of icons) { _iconRegistry.addSvgIconInNamespace( 'red', icon, - _sanitizer.bypassSecurityTrustResourceUrl(`/assets/icons/general/${icon}.svg`) + _sanitizer.bypassSecurityTrustResourceUrl(`/assets/icons/general/${icon}.svg`), ); } } diff --git a/apps/red-ui/src/app/modules/mat-config/mat-config.module.ts b/apps/red-ui/src/app/modules/mat-config/mat-config.module.ts index c0513ad22..9e7cf655b 100644 --- a/apps/red-ui/src/app/modules/mat-config/mat-config.module.ts +++ b/apps/red-ui/src/app/modules/mat-config/mat-config.module.ts @@ -36,11 +36,11 @@ const matImports = [ MatSelectModule, MatProgressBarModule, MatAutocompleteModule, - MatChipsModule + MatChipsModule, ]; @NgModule({ imports: [...matImports], - exports: [...matImports] + exports: [...matImports], }) export class MatConfigModule {} diff --git a/apps/red-ui/src/app/modules/shared/components/annotation-icon/annotation-icon.component.ts b/apps/red-ui/src/app/modules/shared/components/annotation-icon/annotation-icon.component.ts index 398a87988..af8909ecc 100644 --- a/apps/red-ui/src/app/modules/shared/components/annotation-icon/annotation-icon.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/annotation-icon/annotation-icon.component.ts @@ -4,7 +4,7 @@ import { TypeValue } from '@models/file/type-value'; @Component({ selector: 'redaction-annotation-icon', templateUrl: './annotation-icon.component.html', - styleUrls: ['./annotation-icon.component.scss'] + styleUrls: ['./annotation-icon.component.scss'], }) export class AnnotationIconComponent implements OnChanges { @Input() color: string; diff --git a/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.ts b/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.ts index fd20f27b9..200f0dc00 100644 --- a/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.ts @@ -7,7 +7,7 @@ import { User } from '@models/user'; selector: 'redaction-assign-user-dropdown', templateUrl: './assign-user-dropdown.component.html', styleUrls: ['./assign-user-dropdown.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class AssignUserDropdownComponent { oldUser: User | string; diff --git a/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts b/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts index f822b1573..c03b703ce 100644 --- a/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/buttons/file-download-btn/file-download-btn.component.ts @@ -13,7 +13,7 @@ export type MenuState = 'OPEN' | 'CLOSED'; selector: 'redaction-file-download-btn', templateUrl: './file-download-btn.component.html', styleUrls: ['./file-download-btn.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class FileDownloadBtnComponent extends AutoUnsubscribe implements OnDestroy { @Input() dossier: Dossier; @@ -27,7 +27,7 @@ export class FileDownloadBtnComponent extends AutoUnsubscribe implements OnDestr private readonly _permissionsService: PermissionsService, private readonly _fileDownloadService: FileDownloadService, private readonly _toaster: Toaster, - private readonly _translateService: TranslateService + private readonly _translateService: TranslateService, ) { super(); } diff --git a/apps/red-ui/src/app/modules/shared/components/buttons/user-button/user-button.component.ts b/apps/red-ui/src/app/modules/shared/components/buttons/user-button/user-button.component.ts index 5f963f39d..7d38097fa 100644 --- a/apps/red-ui/src/app/modules/shared/components/buttons/user-button/user-button.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/buttons/user-button/user-button.component.ts @@ -4,7 +4,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; selector: 'redaction-user-button', templateUrl: './user-button.component.html', styleUrls: ['./user-button.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class UserButtonComponent { @Input() userId: string; diff --git a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts index 5892b774f..b4260759b 100644 --- a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts @@ -5,7 +5,7 @@ import { TypeValue } from '@models/file/type-value'; @Component({ selector: 'redaction-dictionary-annotation-icon', templateUrl: './dictionary-annotation-icon.component.html', - styleUrls: ['./dictionary-annotation-icon.component.scss'] + styleUrls: ['./dictionary-annotation-icon.component.scss'], }) export class DictionaryAnnotationIconComponent implements OnChanges { @Input() dictionaryKey: string; diff --git a/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts b/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts index ce9b4f352..83bd2139c 100644 --- a/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts @@ -19,7 +19,7 @@ const SMOOTH_SCROLL = 0; @Component({ selector: 'redaction-dictionary-manager', templateUrl: './dictionary-manager.component.html', - styleUrls: ['./dictionary-manager.component.scss'] + styleUrls: ['./dictionary-manager.component.scss'], }) export class DictionaryManagerComponent implements OnChanges { readonly iconButtonTypes = IconButtonTypes; @@ -38,7 +38,7 @@ export class DictionaryManagerComponent implements OnChanges { searchText = ''; selectDossier = { dossierName: _('dictionary-overview.compare.select-dossier') } as Dossier; selectDictionary = { - label: _('dictionary-overview.compare.select-dictionary') + label: _('dictionary-overview.compare.select-dictionary'), } as TypeValue; selectDossierTemplate = { name: _('dictionary-overview.compare.select-dossier-template') } as DossierTemplate; compare: false; @@ -49,7 +49,7 @@ export class DictionaryManagerComponent implements OnChanges { private readonly _dictionaryService: DictionaryService, readonly dossiersService: DossiersService, readonly appStateService: AppStateService, - readonly dossierTemplatesService: DossierTemplatesService + readonly dossierTemplatesService: DossierTemplatesService, ) {} private _dossierTemplate = this.selectDossierTemplate; diff --git a/apps/red-ui/src/app/modules/shared/components/editor/editor.component.ts b/apps/red-ui/src/app/modules/shared/components/editor/editor.component.ts index edb61fca1..a30b2322c 100644 --- a/apps/red-ui/src/app/modules/shared/components/editor/editor.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/editor/editor.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; +import { Component, Input, OnChanges, OnInit } from '@angular/core'; import { Debounce, List } from '@iqser/common-ui'; import IStandaloneEditorConstructionOptions = monaco.editor.IStandaloneEditorConstructionOptions; import ICodeEditor = monaco.editor.ICodeEditor; @@ -10,7 +10,7 @@ const MIN_WORD_LENGTH = 2; @Component({ selector: 'redaction-editor', templateUrl: './editor.component.html', - styleUrls: ['./editor.component.scss'] + styleUrls: ['./editor.component.scss'], }) export class EditorComponent implements OnInit, OnChanges { editorOptions: IStandaloneEditorConstructionOptions = {}; @@ -53,11 +53,11 @@ export class EditorComponent implements OnInit, OnChanges { theme: 'vs', language: 'text/plain', automaticLayout: true, - readOnly: !this.canEdit + readOnly: !this.canEdit, }; } - ngOnChanges(changes: SimpleChanges) { + ngOnChanges() { this.revert(); } @@ -72,8 +72,8 @@ export class EditorComponent implements OnInit, OnChanges { inherit: true, rules: [], colors: { - 'editor.lineHighlightBackground': '#f4f5f7' - } + 'editor.lineHighlightBackground': '#f4f5f7', + }, }); (window as any).monaco.editor.setTheme('redaction'); } diff --git a/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts b/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts index 181e306ef..fa46e8c97 100644 --- a/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts @@ -8,7 +8,7 @@ import { User } from '@models/user'; selector: 'redaction-initials-avatar', templateUrl: './initials-avatar.component.html', styleUrls: ['./initials-avatar.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class InitialsAvatarComponent extends AutoUnsubscribe implements OnChanges, OnDestroy { @Input() userId: string; @@ -26,7 +26,7 @@ export class InitialsAvatarComponent extends AutoUnsubscribe implements OnChange constructor( private readonly _userService: UserService, private readonly _translateService: TranslateService, - private readonly _changeDetectorRef: ChangeDetectorRef + private readonly _changeDetectorRef: ChangeDetectorRef, ) { super(); this.addSubscription = _userService.usersReloaded$.subscribe(() => { diff --git a/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts b/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts index 86bbf36b9..0b465516b 100644 --- a/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts @@ -4,7 +4,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from selector: 'redaction-pagination', templateUrl: './pagination.component.html', styleUrls: ['./pagination.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, }) export class PaginationComponent { displayedPages: (number | string)[]; diff --git a/apps/red-ui/src/app/modules/shared/components/select/select.component.ts b/apps/red-ui/src/app/modules/shared/components/select/select.component.ts index 21885bf85..6344482e5 100644 --- a/apps/red-ui/src/app/modules/shared/components/select/select.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/select/select.component.ts @@ -10,9 +10,9 @@ import { MatChip, MatChipList, MatChipSelectionChange } from '@angular/material/ { provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, - multi: true - } - ] + multi: true, + }, + ], }) export class SelectComponent implements AfterViewInit, ControlValueAccessor { @Input() optionTemplate: TemplateRef; diff --git a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts index f5f8cf4af..f529ad6c4 100644 --- a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts @@ -15,7 +15,7 @@ export interface DoughnutChartConfig { @Component({ selector: 'redaction-simple-doughnut-chart', templateUrl: './simple-doughnut-chart.component.html', - styleUrls: ['./simple-doughnut-chart.component.scss'] + styleUrls: ['./simple-doughnut-chart.component.scss'], }) export class SimpleDoughnutChartComponent implements OnChanges { @Input() subtitle: string; diff --git a/apps/red-ui/src/app/modules/shared/components/team-members/team-members.component.ts b/apps/red-ui/src/app/modules/shared/components/team-members/team-members.component.ts index 497aafafe..3ba00cf93 100644 --- a/apps/red-ui/src/app/modules/shared/components/team-members/team-members.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/team-members/team-members.component.ts @@ -6,7 +6,7 @@ import { List } from '@redaction/red-ui-http'; @Component({ selector: 'redaction-team-members', templateUrl: './team-members.component.html', - styleUrls: ['./team-members.component.scss'] + styleUrls: ['./team-members.component.scss'], }) export class TeamMembersComponent { readonly circleButtonTypes = CircleButtonTypes; diff --git a/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts b/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts index 9d2866f9d..7f1510892 100644 --- a/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts @@ -5,7 +5,7 @@ import { INestedFilter } from '@iqser/common-ui'; @Component({ selector: 'redaction-type-filter', templateUrl: './type-filter.component.html', - styleUrls: ['./type-filter.component.scss'] + styleUrls: ['./type-filter.component.scss'], }) export class TypeFilterComponent implements OnInit { @Input() filter: INestedFilter; @@ -18,7 +18,7 @@ export class TypeFilterComponent implements OnInit { 'suggestion-force-redaction', 'suggestion-add', 'suggestion-remove-dictionary', - 'suggestion-add-dictionary' + 'suggestion-add-dictionary', ]; private _needsAnalysisKeys = [ 'add-dictionary', @@ -26,7 +26,7 @@ export class TypeFilterComponent implements OnInit { 'remove-only-here', 'pending-analysis', 'change-legal-basis', - 'analysis' + 'analysis', ]; constructor(private readonly _appStateService: AppStateService) {} diff --git a/apps/red-ui/src/app/modules/shared/directives/long-press.directive.ts b/apps/red-ui/src/app/modules/shared/directives/long-press.directive.ts index 0f7b5a134..f69a381ac 100644 --- a/apps/red-ui/src/app/modules/shared/directives/long-press.directive.ts +++ b/apps/red-ui/src/app/modules/shared/directives/long-press.directive.ts @@ -7,14 +7,11 @@ export interface LongPressEvent { } @Directive({ - selector: '[redactionLongPress]' + selector: '[redactionLongPress]', }) export class LongPressDirective { - private _touchTimeout: any; - @Output() longPress = new EventEmitter(); - - constructor() {} + private _touchTimeout: any; @HostListener('window:keydown.control') @HostListener('window:keydown.meta') diff --git a/apps/red-ui/src/app/modules/shared/directives/navigate-last-dossiers-screen.directive.ts b/apps/red-ui/src/app/modules/shared/directives/navigate-last-dossiers-screen.directive.ts index 7f4b1c9de..d2c18de3d 100644 --- a/apps/red-ui/src/app/modules/shared/directives/navigate-last-dossiers-screen.directive.ts +++ b/apps/red-ui/src/app/modules/shared/directives/navigate-last-dossiers-screen.directive.ts @@ -2,7 +2,7 @@ import { Directive, HostListener } from '@angular/core'; import { RouterHistoryService } from '@services/router-history.service'; @Directive({ - selector: '[redactionNavigateLastDossiersScreen]' + selector: '[redactionNavigateLastDossiersScreen]', }) export class NavigateLastDossiersScreenDirective { constructor(private readonly _routerHistoryService: RouterHistoryService) {} diff --git a/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts b/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts index 33b2cfc32..d4017a2f1 100644 --- a/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts +++ b/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts @@ -17,11 +17,11 @@ const MONTH_NAMES = { 8: _('months.sep'), 9: _('months.oct'), 10: _('months.nov'), - 11: _('months.dec') + 11: _('months.dec'), }; @Pipe({ - name: 'date' + name: 'date', }) export class DatePipe extends BaseDatePipe implements PipeTransform { constructor(@Inject(LOCALE_ID) private readonly _locale: string, private readonly _translateService: TranslateService) { @@ -65,7 +65,7 @@ export class DatePipe extends BaseDatePipe implements PipeTransform { return daysDisplay; } - return this._translateService.instant(`time.no-time-left`); + return this._translateService.instant('time.no-time-left'); } private _getSophisticatedDate(item: string) { @@ -118,7 +118,7 @@ export class DatePipe extends BaseDatePipe implements PipeTransform { month, year, hour, - minute + minute, }); } } diff --git a/apps/red-ui/src/app/modules/shared/pipes/name.pipe.ts b/apps/red-ui/src/app/modules/shared/pipes/name.pipe.ts index d0618c670..9b1da8a12 100644 --- a/apps/red-ui/src/app/modules/shared/pipes/name.pipe.ts +++ b/apps/red-ui/src/app/modules/shared/pipes/name.pipe.ts @@ -4,7 +4,7 @@ import { TranslateService } from '@ngx-translate/core'; import { User } from '@models/user'; @Pipe({ - name: 'name' + name: 'name', }) export class NamePipe implements PipeTransform { constructor(private readonly _userService: UserService, private readonly _translateService: TranslateService) {} diff --git a/apps/red-ui/src/app/modules/shared/services/controller-wrappers/dossier-attributes.service.ts b/apps/red-ui/src/app/modules/shared/services/controller-wrappers/dossier-attributes.service.ts index 1a89f56a0..b03e035d2 100644 --- a/apps/red-ui/src/app/modules/shared/services/controller-wrappers/dossier-attributes.service.ts +++ b/apps/red-ui/src/app/modules/shared/services/controller-wrappers/dossier-attributes.service.ts @@ -7,12 +7,12 @@ import { DossierAttributeConfig } from '@state/model/dossier-attribute-config'; import { DossierTemplatesService } from '../../../dossier/services/dossier-templates.service'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DossierAttributesService { constructor( private readonly _dossierAttributesControllerService: DossierAttributesControllerService, - private readonly _dossierTemplatesService: DossierTemplatesService + private readonly _dossierTemplatesService: DossierTemplatesService, ) {} async getValues(dossier: Dossier): Promise { @@ -23,7 +23,7 @@ export class DossierAttributesService { return attributesConfig.dossierAttributeConfigs.map(config => ({ ...config, - value: attributes.dossierAttributeList.find(attr => attr.dossierAttributeConfigId === config.id)?.value + value: attributes.dossierAttributeList.find(attr => attr.dossierAttributeConfigId === config.id)?.value, })); } @@ -43,7 +43,7 @@ export class DossierAttributesService { addOrUpdateConfig( attribute: IDossierAttributeConfig, - dossierTemplateId = this._dossierTemplatesService.activeDossierTemplateId + dossierTemplateId = this._dossierTemplatesService.activeDossierTemplateId, ): Observable { return this._dossierAttributesControllerService.addOrUpdateDossierAttributesConfig(attribute, dossierTemplateId); } diff --git a/apps/red-ui/src/app/modules/shared/services/dictionary.service.ts b/apps/red-ui/src/app/modules/shared/services/dictionary.service.ts index 75bf08990..a41011919 100644 --- a/apps/red-ui/src/app/modules/shared/services/dictionary.service.ts +++ b/apps/red-ui/src/app/modules/shared/services/dictionary.service.ts @@ -9,7 +9,7 @@ import { Dictionary } from '@models/dictionary'; const MIN_WORD_LENGTH = 2; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DictionaryService extends EntitiesService { constructor(private readonly _toaster: Toaster, protected readonly _injector: Injector) { @@ -60,7 +60,7 @@ export class DictionaryService extends EntitiesService @RequiredParam() body: UpdateTypeValue, @RequiredParam() dossierTemplateId: string, @RequiredParam() type: string, - dossierId?: string + dossierId?: string, ) { const url = `${this._defaultModelPath}/type/${type}/${dossierTemplateId}`; const queryParams = dossierId ? [{ key: 'dossierId', value: dossierId }] : undefined; @@ -93,11 +93,11 @@ export class DictionaryService extends EntitiesService @RequiredParam() dossierTemplateId: string, @RequiredParam() type: string, dossierId?: string, - removeCurrent?: boolean + removeCurrent?: boolean, ) { const queryParams: List = [ { key: 'dossierId', value: dossierId }, - { key: 'removeCurrent', value: removeCurrent } + { key: 'removeCurrent', value: removeCurrent }, ]; const url = `${this._defaultModelPath}/${type}/${dossierTemplateId}`; return this._post(body, url, queryParams); @@ -111,7 +111,7 @@ export class DictionaryService extends EntitiesService @RequiredParam() body: List, @RequiredParam() dossierTemplateId: string, @RequiredParam() type: string, - @RequiredParam() dossierId?: string + @RequiredParam() dossierId?: string, ) { const queryParams = dossierId ? [{ key: 'dossierId', value: dossierId }] : undefined; const url = `${this._defaultModelPath}/delete/${type}/${dossierTemplateId}`; @@ -124,7 +124,7 @@ export class DictionaryService extends EntitiesService dossierTemplateId: string, type: string, dossierId: string, - showToast = true + showToast = true, ): Observable { let entriesToAdd = []; entries.forEach(currentEntry => { @@ -149,8 +149,8 @@ export class DictionaryService extends EntitiesService this._toaster.success(_('dictionary-overview.success.generic')); } }, - () => this._toaster.error(_('dictionary-overview.error.generic')) - ) + () => this._toaster.error(_('dictionary-overview.error.generic')), + ), ); } else { this._toaster.error(_('dictionary-overview.error.entries-too-short')); diff --git a/apps/red-ui/src/app/modules/shared/shared.module.ts b/apps/red-ui/src/app/modules/shared/shared.module.ts index 2698a60f3..c98a54456 100644 --- a/apps/red-ui/src/app/modules/shared/shared.module.ts +++ b/apps/red-ui/src/app/modules/shared/shared.module.ts @@ -40,7 +40,7 @@ const components = [ TypeFilterComponent, TeamMembersComponent, - ...buttons + ...buttons, ]; const utils = [DatePipe, NamePipe, NavigateLastDossiersScreenDirective, LongPressDirective]; @@ -60,10 +60,10 @@ const modules = [MatConfigModule, ScrollingModule, IconsModule, FormsModule, Rea dateInput: 'DD/MM/YY', monthYearLabel: 'YYYY', dateA11yLabel: 'LL', - monthYearA11yLabel: 'YYYY' - } - } - } - ] + monthYearA11yLabel: 'YYYY', + }, + }, + }, + ], }) export class SharedModule {} diff --git a/apps/red-ui/src/app/modules/upload-download/dialogs/overwrite-files-dialog/overwrite-files-dialog.component.ts b/apps/red-ui/src/app/modules/upload-download/dialogs/overwrite-files-dialog/overwrite-files-dialog.component.ts index 811b5be95..aa51218bc 100644 --- a/apps/red-ui/src/app/modules/upload-download/dialogs/overwrite-files-dialog/overwrite-files-dialog.component.ts +++ b/apps/red-ui/src/app/modules/upload-download/dialogs/overwrite-files-dialog/overwrite-files-dialog.component.ts @@ -6,7 +6,7 @@ import { IconButtonTypes } from '@iqser/common-ui'; @Component({ selector: 'redaction-overwrite-files-dialog', templateUrl: './overwrite-files-dialog.component.html', - styleUrls: ['./overwrite-files-dialog.component.scss'] + styleUrls: ['./overwrite-files-dialog.component.scss'], }) export class OverwriteFilesDialogComponent { readonly iconButtonTypes = IconButtonTypes; @@ -15,7 +15,7 @@ export class OverwriteFilesDialogComponent { constructor( private readonly _translateService: TranslateService, public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public filename: string + @Inject(MAT_DIALOG_DATA) public filename: string, ) {} cancel() { diff --git a/apps/red-ui/src/app/modules/upload-download/file-drop/file-drop.component.ts b/apps/red-ui/src/app/modules/upload-download/file-drop/file-drop.component.ts index 4e8c11a71..3faff91c0 100644 --- a/apps/red-ui/src/app/modules/upload-download/file-drop/file-drop.component.ts +++ b/apps/red-ui/src/app/modules/upload-download/file-drop/file-drop.component.ts @@ -9,7 +9,7 @@ import { DossiersService } from '../../dossier/services/dossiers.service'; @Component({ selector: 'redaction-file-drop', templateUrl: './file-drop.component.html', - styleUrls: ['./file-drop.component.scss'] + styleUrls: ['./file-drop.component.scss'], }) export class FileDropComponent { constructor( @@ -17,7 +17,7 @@ export class FileDropComponent { private readonly _fileUploadService: FileUploadService, private readonly _dossiersService: DossiersService, private readonly _changeDetectorRef: ChangeDetectorRef, - private readonly _statusOverlayService: StatusOverlayService + private readonly _statusOverlayService: StatusOverlayService, ) {} close() { diff --git a/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts b/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts index e045fab1e..5c546731c 100644 --- a/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts +++ b/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts @@ -16,6 +16,6 @@ import { FileDropOverlayService } from './services/file-drop-overlay.service'; declarations: [FileDropComponent, UploadStatusOverlayComponent, OverwriteFilesDialogComponent], entryComponents: [FileDropComponent, UploadStatusOverlayComponent], providers: [UploadDownloadDialogService, FileUploadService, FileDownloadService, StatusOverlayService, FileDropOverlayService], - exports: [FileDropComponent, UploadStatusOverlayComponent] + exports: [FileDropComponent, UploadStatusOverlayComponent], }) export class FileUploadDownloadModule {} diff --git a/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts b/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts index 45741d33c..91bb55e48 100644 --- a/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts +++ b/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts @@ -26,7 +26,7 @@ export class FileDownloadService { private readonly _translateService: TranslateService, private readonly _configService: ConfigService, private readonly _downloadControllerService: DownloadControllerService, - private readonly _fileManagementControllerService: FileManagementControllerService + private readonly _fileManagementControllerService: FileManagementControllerService, ) { interval(5000).subscribe(() => { if (_userService.currentUser.isUser) { @@ -39,7 +39,7 @@ export class FileDownloadService { return this._downloadControllerService .prepareDownload({ fileIds: files.map(f => f.fileId), - dossierId: dossier.id + dossierId: dossier.id, }) .pipe(mergeMap(() => this.getDownloadStatus())); } @@ -49,19 +49,16 @@ export class FileDownloadService { tap(statusResponse => { this.downloads = statusResponse.downloadStatus.map(d => new DownloadStatusWrapper(d)); this.hasPendingDownloads = !!this.downloads.find(f => !f.lastDownload && f.isReady); - }) + }), ); } async performDownload(status: DownloadStatusWrapper) { const token = await this._keycloakService.getToken(); const anchor = document.createElement('a'); - anchor.href = - this._configService.values.API_URL + - '/async/download?access_token=' + - encodeURIComponent(token) + - '&storageId=' + - encodeURIComponent(status.storageId); + anchor.href = `${this._configService.values.API_URL}/async/download?access_token=${encodeURIComponent( + token, + )}&storageId=${encodeURIComponent(status.storageId)}`; anchor.download = status.filename; anchor.target = '_blank'; diff --git a/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts b/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts index fc42393b2..870081285 100644 --- a/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts +++ b/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts @@ -10,7 +10,7 @@ export class FileDropOverlayService { constructor(private readonly _overlay: Overlay, private readonly _injector: Injector) { this._dropOverlayRef = this._overlay.create({ height: '100vh', - width: '100vw' + width: '100vw', }); } @@ -58,7 +58,7 @@ export class FileDropOverlayService { private _createInjector() { return Injector.create({ providers: [{ provide: OverlayRef, useValue: this._dropOverlayRef }], - parent: this._injector + parent: this._injector, }); } } diff --git a/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts b/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts index f6133266f..626d3d216 100644 --- a/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts +++ b/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts @@ -6,7 +6,6 @@ import { interval, Subscription } from 'rxjs'; import { ConfigService } from '@services/config.service'; import { TranslateService } from '@ngx-translate/core'; import { UploadDownloadDialogService } from './upload-download-dialog.service'; -import { toNumber } from '@utils/functions'; import { UploadControllerService } from '@redaction/red-ui-http'; import { isCsv } from '@utils/file-drop-utils'; import { ErrorMessageService } from '@iqser/common-ui'; @@ -35,7 +34,7 @@ export class FileUploadService { private readonly _configService: ConfigService, private readonly _uploadControllerService: UploadControllerService, private readonly _dialogService: UploadDownloadDialogService, - private readonly _errorMessageService: ErrorMessageService + private readonly _errorMessageService: ErrorMessageService, ) { this._uploadControllerService.defaultHeaders = this._uploadControllerService.defaultHeaders.append('ngsw-bypass', 'true'); interval(2500).subscribe(() => { @@ -58,7 +57,7 @@ export class FileUploadService { async uploadFiles(files: FileUploadModel[]): Promise { const maxSizeMB = this._configService.values.MAX_FILE_SIZE_MB; - const maxSizeBytes = toNumber(maxSizeMB) * 1024 * 1024; + const maxSizeBytes = maxSizeMB * 1024 * 1024; const dossierFiles = this._dossiersService.activeDossier.files; let option: 'overwrite' | 'skip'; for (let idx = 0; idx < files.length; ++idx) { @@ -84,8 +83,8 @@ export class FileUploadService { file.completed = true; file.error = { message: this._translateService.instant('upload-status.error.file-size', { - size: maxSizeMB - }) + size: maxSizeMB, + }), }; file.sizeError = true; } @@ -148,7 +147,7 @@ export class FileUploadService { const subscription = this._createSubscription(poppedFileUploadModel); this._activeUploads.push({ subscription: subscription, - fileUploadModel: poppedFileUploadModel + fileUploadModel: poppedFileUploadModel, }); } } @@ -170,7 +169,7 @@ export class FileUploadService { } else { uploadFile.completed = true; uploadFile.error = { - message: this._translateService.instant('upload-status.error.generic') + message: this._translateService.instant('upload-status.error.generic'), }; } this._removeUpload(uploadFile); @@ -181,14 +180,14 @@ export class FileUploadService { uploadFile.completed = true; uploadFile.error = { // Extract error message - message: this._errorMessageService.getMessage(err, 'upload-status.error.generic') + message: this._errorMessageService.getMessage(err, 'upload-status.error.generic'), }; this._removeUpload(uploadFile); if (uploadFile.retryCount < 5 && err.status !== 400) { uploadFile.retryCount += 1; this.scheduleUpload(uploadFile); } - } + }, ); } diff --git a/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts b/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts index 2bd7148bd..f90697230 100644 --- a/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts +++ b/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts @@ -21,7 +21,7 @@ export class StatusOverlayService { private _createUploadInjector() { return Injector.create({ providers: [{ provide: OverlayRef, useValue: this._uploadStatusOverlayRef }], - parent: this._injector + parent: this._injector, }); } } diff --git a/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts b/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts index 7e29b6ece..32d21f052 100644 --- a/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts +++ b/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts @@ -5,7 +5,7 @@ import { OverwriteFilesDialogComponent } from '../dialogs/overwrite-files-dialog const dialogConfig = { width: '662px', maxWidth: '90vw', - autoFocus: false + autoFocus: false, }; @Injectable() @@ -15,7 +15,7 @@ export class UploadDownloadDialogService { openOverwriteFileDialog(filename: string): Promise<{ option?: 'overwrite' | 'skip'; remember?: boolean; cancel?: boolean }> { const ref = this._dialog.open(OverwriteFilesDialogComponent, { ...dialogConfig, - data: filename + data: filename, }); return ref diff --git a/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.ts b/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.ts index e5c97d513..9d359ebd1 100644 --- a/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.ts +++ b/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.ts @@ -7,7 +7,7 @@ import { CircleButtonTypes } from '@iqser/common-ui'; @Component({ selector: 'redaction-upload-status-overlay', templateUrl: './upload-status-overlay.component.html', - styleUrls: ['./upload-status-overlay.component.scss'] + styleUrls: ['./upload-status-overlay.component.scss'], }) export class UploadStatusOverlayComponent implements OnInit { readonly circleButtonTypes = CircleButtonTypes; @@ -18,7 +18,7 @@ export class UploadStatusOverlayComponent implements OnInit { constructor( readonly uploadService: FileUploadService, private readonly _overlayRef: OverlayRef, - private readonly _changeDetectorRef: ChangeDetectorRef + private readonly _changeDetectorRef: ChangeDetectorRef, ) {} ngOnInit() { diff --git a/apps/red-ui/src/app/services/config.service.ts b/apps/red-ui/src/app/services/config.service.ts index 50a7a06ff..c50b4c3b9 100644 --- a/apps/red-ui/src/app/services/config.service.ts +++ b/apps/red-ui/src/app/services/config.service.ts @@ -10,7 +10,7 @@ import { tap } from 'rxjs/operators'; const version = packageInfo.version; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class ConfigService { private _values = { ...config, FRONTEND_APP_VERSION: version } as const; @@ -18,7 +18,7 @@ export class ConfigService { constructor( private readonly _httpClient: HttpClient, private readonly _cacheApiService: CacheApiService, - private readonly _titleService: Title + private readonly _titleService: Title, ) { this._checkFrontendVersion(); } @@ -28,7 +28,7 @@ export class ConfigService { tap(envConfig => { console.log('[REDACTION] Started with config: ', envConfig); this._values = envConfig; - }) + }), ); } diff --git a/apps/red-ui/src/app/services/permissions.service.ts b/apps/red-ui/src/app/services/permissions.service.ts index acc7f9323..4b4da608e 100644 --- a/apps/red-ui/src/app/services/permissions.service.ts +++ b/apps/red-ui/src/app/services/permissions.service.ts @@ -7,13 +7,13 @@ import { Dossier } from '@state/model/dossier'; import { DossiersService } from '../modules/dossier/services/dossiers.service'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class PermissionsService { constructor( private readonly _appStateService: AppStateService, private readonly _userService: UserService, - private readonly _dossiersService: DossiersService + private readonly _dossiersService: DossiersService, ) {} private get _activeFile(): File | undefined { diff --git a/apps/red-ui/src/app/services/router-history.service.ts b/apps/red-ui/src/app/services/router-history.service.ts index 023a64176..bbd98d1c2 100644 --- a/apps/red-ui/src/app/services/router-history.service.ts +++ b/apps/red-ui/src/app/services/router-history.service.ts @@ -3,7 +3,7 @@ import { NavigationEnd, Router } from '@angular/router'; import { filter } from 'rxjs/operators'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class RouterHistoryService { private _lastDossiersScreen = '/main/dossiers'; diff --git a/apps/red-ui/src/app/services/translate-chart.service.ts b/apps/red-ui/src/app/services/translate-chart.service.ts index 3056f1d6b..97c14b8e6 100644 --- a/apps/red-ui/src/app/services/translate-chart.service.ts +++ b/apps/red-ui/src/app/services/translate-chart.service.ts @@ -4,7 +4,7 @@ import { TranslateService } from '@ngx-translate/core'; import { rolesTranslations } from '../translations/roles-translations'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class TranslateChartService { constructor(private readonly _translateService: TranslateService) {} @@ -16,7 +16,7 @@ export class TranslateChartService { translateRoles(config: DoughnutChartConfig[]): DoughnutChartConfig[] { return config.map(val => ({ ...val, - label: this._translateService.instant(rolesTranslations[val.label]).toLowerCase() + label: this._translateService.instant(rolesTranslations[val.label]).toLowerCase(), })); } } diff --git a/apps/red-ui/src/app/services/user-preference.service.ts b/apps/red-ui/src/app/services/user-preference.service.ts index 441ffb7ce..4dbeda9ea 100644 --- a/apps/red-ui/src/app/services/user-preference.service.ts +++ b/apps/red-ui/src/app/services/user-preference.service.ts @@ -6,7 +6,7 @@ interface UserAttributes { } @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class UserPreferenceService { constructor(private readonly _userPreferenceControllerService: UserPreferenceControllerService) { diff --git a/apps/red-ui/src/app/services/user.service.ts b/apps/red-ui/src/app/services/user.service.ts index 5d159d8ed..608030d7f 100644 --- a/apps/red-ui/src/app/services/user.service.ts +++ b/apps/red-ui/src/app/services/user.service.ts @@ -16,20 +16,24 @@ export interface ProfileModel { } @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class UserService { usersReloaded$ = new Subject(); - private _currentUser: User; private _allUsers: User[]; + private _allRedUsers: User[]; constructor( @Inject(BASE_HREF) private readonly _baseHref: string, private readonly _keycloakService: KeycloakService, - private readonly _userControllerService: UserControllerService + private readonly _userControllerService: UserControllerService, ) {} - private _allRedUsers: User[]; + private _currentUser: User; + + get currentUser(): User { + return this._currentUser; + } get managerUsers(): User[] { return this._allRedUsers.filter(user => user.isManager); @@ -39,10 +43,6 @@ export class UserService { return this._allRedUsers.filter(user => user.isUser || user.isManager); } - get currentUser(): User { - return this._currentUser; - } - logout() { wipeCaches().then(); this._keycloakService.logout(window.location.origin + this._baseHref).then(); @@ -69,7 +69,7 @@ export class UserService { async loadCurrentUser() { const token = await this._keycloakService.getToken(); - const decoded = jwt_decode(token) as any; + const decoded: { sub: string } = jwt_decode(token); const userId = decoded.sub; this._currentUser = new User(await this._keycloakService.loadUserProfile(true), this._keycloakService.getUserRoles(true), userId); } diff --git a/apps/red-ui/src/app/state/app-state.guard.ts b/apps/red-ui/src/app/state/app-state.guard.ts index 5f4ba7ee7..0a302acad 100644 --- a/apps/red-ui/src/app/state/app-state.guard.ts +++ b/apps/red-ui/src/app/state/app-state.guard.ts @@ -6,7 +6,7 @@ import { DossiersService } from '../modules/dossier/services/dossiers.service'; import { DossierTemplatesService } from '../modules/dossier/services/dossier-templates.service'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class AppStateGuard implements CanActivate { constructor( @@ -14,7 +14,7 @@ export class AppStateGuard implements CanActivate { private readonly _dossiersService: DossiersService, private readonly _dossierTemplatesService: DossierTemplatesService, private readonly _userService: UserService, - private readonly _router: Router + private readonly _router: Router, ) {} async canActivate(route: ActivatedRouteSnapshot): Promise { diff --git a/apps/red-ui/src/app/state/app-state.service.ts b/apps/red-ui/src/app/state/app-state.service.ts index 0b61648c2..aed8de3d8 100644 --- a/apps/red-ui/src/app/state/app-state.service.ts +++ b/apps/red-ui/src/app/state/app-state.service.ts @@ -22,7 +22,7 @@ export interface AppState { } @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class AppStateService { readonly fileChanged$ = new Subject(); @@ -39,7 +39,7 @@ export class AppStateService { private readonly _dictionaryService: DictionaryService, private readonly _dossierTemplatesService: DossierTemplatesService, private readonly _fileAttributesService: FileAttributesService, - private readonly _userPreferenceService: UserPreferenceService + private readonly _userPreferenceService: UserPreferenceService, ) { _router.events.pipe(currentComponentRoute).subscribe(async (event: ActivationEnd) => { const fileId = event.snapshot.paramMap.get('fileId'); @@ -56,11 +56,11 @@ export class AppStateService { await _dossiersService.activeDossier$ .pipe( filter(dossier => !!dossier), - first() + first(), ) .toPromise(); const dossierId = event.snapshot.paramMap.get('dossierId'); - return await this.activateFile(dossierId, fileId); + return this.activateFile(dossierId, fileId); }); } @@ -157,7 +157,7 @@ export class AppStateService { const activeFile = new File( iFile, this._userService.getNameForId(iFile.currentReviewer), - this._fileAttributesService.getFileAttributeConfig(activeDossier.dossierTemplateId) + this._fileAttributesService.getFileAttributeConfig(activeDossier.dossierTemplateId), ); const files = activeDossier.files.filter(file => file.fileId !== activeFile.fileId); files.push(activeFile); @@ -273,9 +273,9 @@ export class AppStateService { previewColor: FALLBACK_COLOR, requestRemove: FALLBACK_COLOR, updatedColor: FALLBACK_COLOR, - dossierTemplateId: dossierTemplateId - } as Colors) - ) + dossierTemplateId: dossierTemplateId, + } as Colors), + ), ); } @@ -287,7 +287,7 @@ export class AppStateService { for (const type of typesResponse.types) { dictionaryData[type.type] = new TypeValue(type); } - }) + }), ); const colorsObs = this.loadColors(dossierTemplateId).pipe( @@ -307,184 +307,184 @@ export class AppStateService { dictionaryData['declined-suggestion'] = new TypeValue( { hexColor: colors.notRedacted || FALLBACK_COLOR, - type: 'declined-suggestion' + type: 'declined-suggestion', }, - true + true, ); dictionaryData['manual'] = new TypeValue( { hexColor: colors.manualRedactionColor || FALLBACK_COLOR, - type: 'manual' + type: 'manual', }, - true + true, ); dictionaryData['manual-redaction'] = new TypeValue( { hexColor: colors.manualRedactionColor || FALLBACK_COLOR, - type: 'manual-redaction' + type: 'manual-redaction', }, - true + true, ); // dictionary actions dictionaryData['recommendation'] = new TypeValue( { hexColor: '#c5d3eb', - type: 'recommendation' + type: 'recommendation', }, - true + true, ); // dictionary actions dictionaryData['add-dictionary'] = new TypeValue( { hexColor: colors.analysisColor || FALLBACK_COLOR, - type: 'add-dictionary' + type: 'add-dictionary', }, - true + true, ); dictionaryData['remove-dictionary'] = new TypeValue( { hexColor: colors.analysisColor || FALLBACK_COLOR, - type: 'remove-dictionary' + type: 'remove-dictionary', }, - true + true, ); dictionaryData['remove-only-here'] = new TypeValue( { hexColor: colors.analysisColor || FALLBACK_COLOR, - type: 'remove-only-here' + type: 'remove-only-here', }, - true + true, ); // generic suggestions dictionaryData['suggestion'] = new TypeValue( { hexColor: colors.requestAdd || FALLBACK_COLOR, - type: 'suggestion' + type: 'suggestion', }, - true + true, ); dictionaryData['suggestion-add'] = new TypeValue( { hexColor: colors.requestAdd || FALLBACK_COLOR, - type: 'suggestion-add' + type: 'suggestion-add', }, - true + true, ); // add suggestions dictionaryData['suggestion-change-legal-basis'] = new TypeValue( { hexColor: colors.requestAdd || FALLBACK_COLOR, - type: 'suggestion-change-legal-basis' + type: 'suggestion-change-legal-basis', }, - true + true, ); dictionaryData['suggestion-recategorize-image'] = new TypeValue( { hexColor: colors.requestAdd || FALLBACK_COLOR, - type: 'suggestion-recategorize-image' + type: 'suggestion-recategorize-image', }, - true + true, ); dictionaryData['suggestion-add-dictionary'] = new TypeValue( { hexColor: colors.dictionaryRequestColor || FALLBACK_COLOR, - type: 'suggestion-add' + type: 'suggestion-add', }, - true + true, ); dictionaryData['suggestion-remove'] = new TypeValue( { hexColor: colors.requestRemove || FALLBACK_COLOR, - type: 'suggestion-add' + type: 'suggestion-add', }, - true + true, ); dictionaryData['suggestion-remove-dictionary'] = new TypeValue( { hexColor: colors.dictionaryRequestColor || FALLBACK_COLOR, - type: 'suggestion-add' + type: 'suggestion-add', }, - true + true, ); dictionaryData['skipped'] = new TypeValue( { hexColor: colors.notRedacted || FALLBACK_COLOR, - type: 'skipped' + type: 'skipped', }, - true + true, ); dictionaryData['default'] = new TypeValue( { hexColor: colors.defaultColor || FALLBACK_COLOR, - type: 'default' + type: 'default', }, - true + true, ); dictionaryData['add'] = new TypeValue( { hexColor: colors.requestAdd || FALLBACK_COLOR, - type: 'add' + type: 'add', }, - true + true, ); dictionaryData['analysis'] = new TypeValue( { hexColor: colors.analysisColor || FALLBACK_COLOR, - type: 'analysis' + type: 'analysis', }, - true + true, ); dictionaryData['pending-analysis'] = new TypeValue( { hexColor: colors.analysisColor || FALLBACK_COLOR, - type: 'analysis' + type: 'analysis', }, - true + true, ); dictionaryData['change-legal-basis'] = new TypeValue( { hexColor: colors.analysisColor || FALLBACK_COLOR, - type: 'analysis' + type: 'analysis', }, - true + true, ); dictionaryData['hint'] = new TypeValue( { hexColor: '#fa98f7', type: 'hint', - hint: true + hint: true, }, - true + true, ); dictionaryData['redaction'] = new TypeValue( { hexColor: colors.previewColor || FALLBACK_COLOR, - type: 'redaction' + type: 'redaction', }, - true + true, ); dictionaryData['updated'] = new TypeValue( { hexColor: colors.updatedColor || FALLBACK_COLOR, - type: 'updated' + type: 'updated', }, - true + true, ); - }) + }), ); return forkJoin([typeObs, colorsObs]).pipe(map(() => dictionaryData)); diff --git a/apps/red-ui/src/app/translations/annotation-types-translations.ts b/apps/red-ui/src/app/translations/annotation-types-translations.ts index b2c98e4bb..a65bb59f3 100644 --- a/apps/red-ui/src/app/translations/annotation-types-translations.ts +++ b/apps/red-ui/src/app/translations/annotation-types-translations.ts @@ -19,5 +19,5 @@ export const annotationTypesTranslations: { [key in AnnotationSuperType]: string 'suggestion-recategorize-image': _('annotation-type.suggestion-recategorize-image'), 'suggestion-force-redaction': _('annotation-type.suggestion-force-redaction'), 'suggestion-remove': _('annotation-type.suggestion-remove'), - 'suggestion-remove-dictionary': _('annotation-type.suggestion-remove-dictionary') + 'suggestion-remove-dictionary': _('annotation-type.suggestion-remove-dictionary'), } as const; diff --git a/apps/red-ui/src/app/translations/download-types-translations.ts b/apps/red-ui/src/app/translations/download-types-translations.ts index 043e96878..930e00574 100644 --- a/apps/red-ui/src/app/translations/download-types-translations.ts +++ b/apps/red-ui/src/app/translations/download-types-translations.ts @@ -6,5 +6,5 @@ export const downloadTypesTranslations: { [key in DownloadFileType]: string } = PREVIEW: _('download-type.preview'), REDACTED: _('download-type.redacted'), ANNOTATED: _('download-type.annotated'), - FLATTEN: _('download-type.flatten') + FLATTEN: _('download-type.flatten'), } as const; diff --git a/apps/red-ui/src/app/translations/languages-translations.ts b/apps/red-ui/src/app/translations/languages-translations.ts index 3678c12e8..a6a9ce343 100644 --- a/apps/red-ui/src/app/translations/languages-translations.ts +++ b/apps/red-ui/src/app/translations/languages-translations.ts @@ -2,5 +2,5 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; export const languagesTranslations: { [key: string]: string } = { en: _('top-bar.navigation-items.my-account.children.language.en'), - de: _('top-bar.navigation-items.my-account.children.language.de') + de: _('top-bar.navigation-items.my-account.children.language.de'), } as const; diff --git a/apps/red-ui/src/app/translations/notifications-translations.ts b/apps/red-ui/src/app/translations/notifications-translations.ts index a78779bb6..6259c2e61 100644 --- a/apps/red-ui/src/app/translations/notifications-translations.ts +++ b/apps/red-ui/src/app/translations/notifications-translations.ts @@ -12,5 +12,5 @@ export const notificationsTranslations: { [key in NotificationType]: string } = [NotificationTypeEnum.USER_BECOMES_DOSSIER_MEMBER]: _('notification.user-becomes-dossier-member'), [NotificationTypeEnum.USER_DEGRADED_TO_REVIEWER]: _('notification.user-demoted-to-reviewer'), [NotificationTypeEnum.USER_PROMOTED_TO_APPROVER]: _('notification.user-promoted-to-approver'), - [NotificationTypeEnum.USER_REMOVED_AS_DOSSIER_MEMBER]: _('notification.user-removed-as-dossier-member') + [NotificationTypeEnum.USER_REMOVED_AS_DOSSIER_MEMBER]: _('notification.user-removed-as-dossier-member'), } as const; diff --git a/apps/red-ui/src/app/translations/roles-translations.ts b/apps/red-ui/src/app/translations/roles-translations.ts index b3f70b83c..2ab43c1dd 100644 --- a/apps/red-ui/src/app/translations/roles-translations.ts +++ b/apps/red-ui/src/app/translations/roles-translations.ts @@ -8,5 +8,5 @@ export const rolesTranslations: { [key in string]: string } = { RED_MANAGER: _('roles.red-manager'), RED_USER: _('roles.red-user'), RED_USER_ADMIN: _('roles.red-user-admin'), - REGULAR: _('roles.regular') + REGULAR: _('roles.regular'), } as const; diff --git a/apps/red-ui/src/app/utils/api-path-interceptor.ts b/apps/red-ui/src/app/utils/api-path-interceptor.ts index 591bc6087..fda13e3b1 100644 --- a/apps/red-ui/src/app/utils/api-path-interceptor.ts +++ b/apps/red-ui/src/app/utils/api-path-interceptor.ts @@ -11,12 +11,12 @@ export class ApiPathInterceptor implements HttpInterceptor { intercept(req: HttpRequest, next: HttpHandler): Observable> { if (!req.url.startsWith('/assets')) { const updatedRequest = req.clone({ - url: this._configService.values.API_URL + req.url + url: `${this._configService.values.API_URL}${req.url}`, }); return next.handle(updatedRequest); } else { const updatedRequest = req.clone({ - url: this._baseHref + req.url + url: this._baseHref + req.url, }); return next.handle(updatedRequest); } diff --git a/apps/red-ui/src/app/utils/configuration.initializer.ts b/apps/red-ui/src/app/utils/configuration.initializer.ts index 76dc6dba3..1cb29da59 100644 --- a/apps/red-ui/src/app/utils/configuration.initializer.ts +++ b/apps/red-ui/src/app/utils/configuration.initializer.ts @@ -9,7 +9,7 @@ export function configurationInitializer( keycloakService: KeycloakService, title: Title, configService: ConfigService, - generalSettingsControllerService: GeneralSettingsControllerService + generalSettingsControllerService: GeneralSettingsControllerService, ) { return () => keycloakService.keycloakEvents$ @@ -21,7 +21,7 @@ export function configurationInitializer( title.setTitle('RedactManager'); return of({}); }), - take(1) + take(1), ) .toPromise(); } diff --git a/apps/red-ui/src/app/utils/date-inputs-utils.ts b/apps/red-ui/src/app/utils/date-inputs-utils.ts index 40770d10f..f75518ab1 100644 --- a/apps/red-ui/src/app/utils/date-inputs-utils.ts +++ b/apps/red-ui/src/app/utils/date-inputs-utils.ts @@ -7,7 +7,7 @@ export function applyIntervalConstraints( previousTo: Moment, form: FormGroup, fromKey: string, - toKey: string + toKey: string, ): boolean { if (!!value[fromKey] && !!value[toKey]) { if (previousFrom !== value[fromKey]) { diff --git a/apps/red-ui/src/app/utils/file-drop-utils.ts b/apps/red-ui/src/app/utils/file-drop-utils.ts index fb0d1efa1..7cc4bfdf1 100644 --- a/apps/red-ui/src/app/utils/file-drop-utils.ts +++ b/apps/red-ui/src/app/utils/file-drop-utils.ts @@ -1,6 +1,47 @@ import { FileUploadModel } from '@upload-download/model/file-upload.model'; import { Dossier } from '@state/model/dossier'; +export function isCsv(file: FileUploadModel): boolean { + return file.file.type?.toLowerCase() === 'text/csv' || file.file.name.toLowerCase().endsWith('.csv'); +} + +export type Files = FileList | File[]; + +export function convertFiles(files: FileList | File[], dossier: Dossier): FileUploadModel[] { + let uploadFiles: FileUploadModel[] = []; + for (let i = 0; i < files.length; i++) { + const file = files[i]; + uploadFiles.push({ + file: file, + progress: 0, + completed: false, + error: null, + dossierId: dossier.id, + dossierName: dossier.dossierName, + sizeError: false, + retryCount: 0, + size: file.size, + }); + } + + uploadFiles = uploadFiles.filter( + file => + file.file.type?.toLowerCase() === 'application/pdf' || + file.file.name.toLowerCase().endsWith('.pdf') || + file.file.type?.toLowerCase() === 'application/zip' || + file.file.name.toLowerCase().endsWith('.zip') || + isCsv(file), + ); + + const pdfFiles = uploadFiles.filter(a => !isCsv(a)).sort((a, b) => a.size - b.size); + const csvFiles = uploadFiles.filter(a => isCsv(a)); + + const sortedFiles = [...pdfFiles, ...csvFiles]; + + console.log('[REDACTION] Uploading files: ', sortedFiles); + return sortedFiles; +} + export function handleFileDrop(event: DragEvent, dossier: Dossier, uploadFiles: (files: FileUploadModel[]) => void) { event.preventDefault(); event.stopPropagation(); @@ -25,44 +66,3 @@ export function handleFileDrop(event: DragEvent, dossier: Dossier, uploadFiles: uploadFiles(convertedFiles); } } - -export function isCsv(file: FileUploadModel): boolean { - return file.file.type?.toLowerCase() === 'text/csv' || file.file.name.toLowerCase().endsWith('.csv'); -} - -export type Files = FileList | File[]; - -export function convertFiles(files: FileList | File[], dossier: Dossier): FileUploadModel[] { - let uploadFiles: FileUploadModel[] = []; - for (let i = 0; i < files.length; i++) { - const file = files[i]; - uploadFiles.push({ - file: file, - progress: 0, - completed: false, - error: null, - dossierId: dossier.id, - dossierName: dossier.dossierName, - sizeError: false, - retryCount: 0, - size: file.size - }); - } - - uploadFiles = uploadFiles.filter( - file => - file.file.type?.toLowerCase() === 'application/pdf' || - file.file.name.toLowerCase().endsWith('.pdf') || - file.file.type?.toLowerCase() === 'application/zip' || - file.file.name.toLowerCase().endsWith('.zip') || - isCsv(file) - ); - - const pdfFiles = uploadFiles.filter(a => !isCsv(a)).sort((a, b) => a.size - b.size); - const csvFiles = uploadFiles.filter(a => isCsv(a)); - - const sortedFiles = [...pdfFiles, ...csvFiles]; - - console.log('[REDACTION] Uploading files: ', sortedFiles); - return sortedFiles; -} diff --git a/apps/red-ui/src/app/utils/functions.ts b/apps/red-ui/src/app/utils/functions.ts index 9410bf00c..9eab788bf 100644 --- a/apps/red-ui/src/app/utils/functions.ts +++ b/apps/red-ui/src/app/utils/functions.ts @@ -5,7 +5,7 @@ import { ActivationEnd } from '@angular/router'; import { BaseScreenComponent } from '@components/base-screen/base-screen.component'; export const currentComponentRoute = filter( - event => event instanceof ActivationEnd && !!event.snapshot.component && event.snapshot.component !== BaseScreenComponent + event => event instanceof ActivationEnd && !!event.snapshot.component && event.snapshot.component !== BaseScreenComponent, ); export const FALLBACK_COLOR = '#CCCCCC'; @@ -23,7 +23,7 @@ export function hexToRgb(hex) { ? { r: parseInt(result[1], 16), g: parseInt(result[2], 16), - b: parseInt(result[3], 16) + b: parseInt(result[3], 16), } : null; } @@ -65,14 +65,14 @@ export function getFirstRelevantTextPart(text, direction: 'FORWARD' | 'BACKWARD' return accumulator; } -export function lastIndexOfEnd(string, search) { - const io = string.lastIndexOf(search); +export function lastIndexOfEnd(str: string, search: string) { + const io = str.lastIndexOf(search); return io === -1 ? -1 : io + search.length; } -export function toNumber(string) { +export function toNumber(str: string) { try { - return parseInt(`${string}`.replace(/\D/g, ''), 10); + return parseInt(`${str}`.replace(/\D/g, ''), 10); } catch (e) { return 0; } diff --git a/apps/red-ui/src/app/utils/page-stamper.ts b/apps/red-ui/src/app/utils/page-stamper.ts index 85eef6d35..decf09723 100644 --- a/apps/red-ui/src/app/utils/page-stamper.ts +++ b/apps/red-ui/src/app/utils/page-stamper.ts @@ -3,6 +3,28 @@ import { environment } from '@environments/environment'; import { Core } from '@pdftron/webviewer'; import PDFDoc = Core.PDFNet.PDFDoc; +async function createPageSet(pdfNet: any, pages: number[]) { + const pageSet = await pdfNet.PageSet.create(); + for (const page of pages) { + if (page > 0) { + await pageSet.addPage(page); + } + } + return pageSet; +} + +function convertFont(type: string): number { + switch (type) { + case 'times-new-roman': + return 0; + case 'helvetica': + return 4; + case 'courier': + return 8; + } + return 4; +} + export async function clearStamps(document: PDFDoc, pdfNet: any, pages: number[]) { await pdfNet.runWithCleanup( async () => { @@ -10,7 +32,7 @@ export async function clearStamps(document: PDFDoc, pdfNet: any, pages: number[] const pageSet = await createPageSet(pdfNet, pages); await pdfNet.Stamper.deleteStamps(document, pageSet); }, - environment.licenseKey ? atob(environment.licenseKey) : null + environment.licenseKey ? atob(environment.licenseKey) : null, ); } @@ -23,7 +45,7 @@ export async function stampPDFPage( orientation: 'DIAGONAL' | 'HORIZONTAL' | 'VERTICAL', opacity: number, color: string, - pages: number[] + pages: number[], ) { await pdfNet.runWithCleanup( async () => { @@ -56,28 +78,6 @@ export async function stampPDFPage( await stamper.setTextAlignment(0); await stamper.stampText(document, text, pageSet); }, - environment.licenseKey ? atob(environment.licenseKey) : null + environment.licenseKey ? atob(environment.licenseKey) : null, ); } - -async function createPageSet(pdfNet: any, pages: number[]) { - const pageSet = await pdfNet.PageSet.create(); - for (const page of pages) { - if (page > 0) { - await pageSet.addPage(page); - } - } - return pageSet; -} - -function convertFont(type: string): number { - switch (type) { - case 'times-new-roman': - return 0; - case 'helvetica': - return 4; - case 'courier': - return 8; - } - return 4; -} diff --git a/apps/red-ui/src/app/utils/pdf-coordinates.ts b/apps/red-ui/src/app/utils/pdf-coordinates.ts index 8c76dbe5a..8a470e293 100644 --- a/apps/red-ui/src/app/utils/pdf-coordinates.ts +++ b/apps/red-ui/src/app/utils/pdf-coordinates.ts @@ -17,7 +17,7 @@ export function translateQuads(page: number, rotation: number, quads: any) { y1: quads.y2, y2: quads.y3, y3: quads.y4, - y4: quads.y1 + y4: quads.y1, }; break; case PageRotation.E_180: @@ -29,7 +29,7 @@ export function translateQuads(page: number, rotation: number, quads: any) { y1: quads.y3, y2: quads.y4, y3: quads.y1, - y4: quads.y2 + y4: quads.y2, }; break; case PageRotation.E_270: @@ -41,7 +41,7 @@ export function translateQuads(page: number, rotation: number, quads: any) { y1: quads.y4, y2: quads.y1, y3: quads.y2, - y4: quads.y3 + y4: quads.y3, }; break; case PageRotation.E_0: diff --git a/apps/red-ui/src/app/utils/pruning-translation-loader.ts b/apps/red-ui/src/app/utils/pruning-translation-loader.ts index 6ad40e849..faafe68e5 100644 --- a/apps/red-ui/src/app/utils/pruning-translation-loader.ts +++ b/apps/red-ui/src/app/utils/pruning-translation-loader.ts @@ -16,7 +16,7 @@ export class PruningTranslationLoader implements TranslateLoader { .filter(key => object.hasOwnProperty(key) && object[key] !== '') .reduce( (result, key) => ((result[key] = typeof object[key] === 'object' ? this._process(object[key]) : object[key]), result), - {} + {}, ) ); } diff --git a/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts b/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts index 90d07be73..092b35c76 100644 --- a/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts +++ b/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts @@ -6,5 +6,5 @@ export const RedactionFilterSorter = { hint: 4, suggestion: 5, none: 6, - byKey: (a: { id: string }, b: { id: string }) => RedactionFilterSorter[a.id] - RedactionFilterSorter[b.id] + byKey: (a: { id: string }, b: { id: string }): number => RedactionFilterSorter[a.id] - RedactionFilterSorter[b.id], }; diff --git a/apps/red-ui/src/app/utils/sorters/status-sorter.ts b/apps/red-ui/src/app/utils/sorters/status-sorter.ts index 1a984acf3..5d7a2b55d 100644 --- a/apps/red-ui/src/app/utils/sorters/status-sorter.ts +++ b/apps/red-ui/src/app/utils/sorters/status-sorter.ts @@ -1,15 +1,5 @@ type StatusSorterItem = { key?: string } | string; -const byStatus = (a: StatusSorterItem, b: StatusSorterItem) => { - if (typeof a !== typeof b) { - return; - } - - const x = typeof a === 'string' ? a : a.key; - const y = typeof b === 'string' ? b : b.key; - return StatusSorter[x] - StatusSorter[y]; -}; - export const StatusSorter = { ERROR: 0, UNPROCESSED: 1, @@ -21,5 +11,13 @@ export const StatusSorter = { UNDER_REVIEW: 15, UNDER_APPROVAL: 20, APPROVED: 25, - byStatus: byStatus + byStatus: (a: StatusSorterItem, b: StatusSorterItem): number => { + if (typeof a !== typeof b) { + return; + } + + const x = typeof a === 'string' ? a : a.key; + const y = typeof b === 'string' ? b : b.key; + return StatusSorter[x] - StatusSorter[y]; + }, }; diff --git a/apps/red-ui/src/app/utils/sorters/super-type-sorter.ts b/apps/red-ui/src/app/utils/sorters/super-type-sorter.ts index 47b500cb9..87793d0dc 100644 --- a/apps/red-ui/src/app/utils/sorters/super-type-sorter.ts +++ b/apps/red-ui/src/app/utils/sorters/super-type-sorter.ts @@ -18,5 +18,5 @@ export const SuperTypeSorter: { [key in AnnotationSuperType]: number } = { redaction: 1, 'manual-redaction': 2, hint: 17, - 'declined-suggestion': 20 + 'declined-suggestion': 20, }; diff --git a/apps/red-ui/src/environments/environment.prod.ts b/apps/red-ui/src/environments/environment.prod.ts index e3dce0fb3..cadbc6345 100644 --- a/apps/red-ui/src/environments/environment.prod.ts +++ b/apps/red-ui/src/environments/environment.prod.ts @@ -2,5 +2,5 @@ export const environment = { production: true, licenseKey: 'S25lY29uIEFHKGVuLmtuZWNvbi5zd2lzcyk6T0VNOkREQS1SOjpCKzpBTVMoMjAyMTEwMjkpOkNGQ0MwRDMzMDd' + - 'EQUI0RjM0QjMxM0JDOUIyNDMzODJDNEU2RjZGQ0I4M0NEOEFDNTc0MzU4QTk1OTczMEI2MjJGQUJFRjVDNw==' + 'EQUI0RjM0QjMxM0JDOUIyNDMzODJDNEU2RjZGQ0I4M0NEOEFDNTc0MzU4QTk1OTczMEI2MjJGQUJFRjVDNw==', }; diff --git a/apps/red-ui/src/environments/environment.ts b/apps/red-ui/src/environments/environment.ts index 5291f9fe4..dbe1e6051 100644 --- a/apps/red-ui/src/environments/environment.ts +++ b/apps/red-ui/src/environments/environment.ts @@ -2,5 +2,5 @@ export const environment = { production: false, licenseKey: 'S25lY29uIEFHKGVuLmtuZWNvbi5zd2lzcyk6T0VNOkREQS1SOjpCKzpBTVMoMjAyMTEwMjkpOkNGQ0MwRDMzMDd' + - 'EQUI0RjM0QjMxM0JDOUIyNDMzODJDNEU2RjZGQ0I4M0NEOEFDNTc0MzU4QTk1OTczMEI2MjJGQUJFRjVDNw==' + 'EQUI0RjM0QjMxM0JDOUIyNDMzODJDNEU2RjZGQ0I4M0NEOEFDNTc0MzU4QTk1OTczMEI2MjJGQUJFRjVDNw==', }; diff --git a/libs/common-ui b/libs/common-ui index 61fb1a400..4e84610f6 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 61fb1a40063e27f335b0345552b8874eba2ac899 +Subproject commit 4e84610f65c8993d9725af62188e3578e9a27e8b diff --git a/libs/red-ui-http/src/lib/api.module.ts b/libs/red-ui-http/src/lib/api.module.ts index 9100985ab..f7a22a5bb 100644 --- a/libs/red-ui-http/src/lib/api.module.ts +++ b/libs/red-ui-http/src/lib/api.module.ts @@ -57,8 +57,8 @@ import { StatusReportControllerService } from './api/statusReportController.serv WatermarkControllerService, SearchControllerService, NotificationControllerService, - StatusReportControllerService - ] + StatusReportControllerService, + ], }) export class ApiModule { constructor(@Optional() @SkipSelf() parentModule: ApiModule, @Optional() http: HttpClient) { @@ -67,7 +67,7 @@ export class ApiModule { } if (!http) { throw new Error( - 'You need to import the HttpClientModule in your AppModule! \n' + 'See also https://github.com/angular/angular/issues/20575' + 'You need to import the HttpClientModule in your AppModule! \n' + 'See also https://github.com/angular/angular/issues/20575', ); } } @@ -75,7 +75,7 @@ export class ApiModule { public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { return { ngModule: ApiModule, - providers: [{ provide: Configuration, useFactory: configurationFactory }] + providers: [{ provide: Configuration, useFactory: configurationFactory }], }; } } diff --git a/libs/red-ui-http/src/lib/api/auditController.service.ts b/libs/red-ui-http/src/lib/api/auditController.service.ts index 75a9a80c6..ffae52057 100644 --- a/libs/red-ui-http/src/lib/api/auditController.service.ts +++ b/libs/red-ui-http/src/lib/api/auditController.service.ts @@ -31,7 +31,7 @@ export class AuditControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -75,7 +75,7 @@ export class AuditControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -129,7 +129,7 @@ export class AuditControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/dictionaryController.service.ts b/libs/red-ui-http/src/lib/api/dictionaryController.service.ts index 407dc89e6..203aae7e4 100644 --- a/libs/red-ui-http/src/lib/api/dictionaryController.service.ts +++ b/libs/red-ui-http/src/lib/api/dictionaryController.service.ts @@ -10,20 +10,20 @@ * Do not edit the class manually. */ /* tslint:disable:no-unused-variable member-ordering */ -import {Inject, Injectable, Optional} from "@angular/core"; -import {HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse} from "@angular/common/http"; -import {CustomHttpUrlEncodingCodec} from "../encoder"; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; +import { CustomHttpUrlEncodingCodec } from '../encoder'; -import {Observable} from "rxjs"; +import { Observable } from 'rxjs'; -import {Colors} from "../model/colors"; -import {IDictionary} from "../model/dictionary"; -import {TypeResponse} from "../model/typeResponse"; -import {ITypeValue} from "../model/typeValue"; -import {UpdateTypeValue} from "../model/updateTypeValue"; +import { Colors } from '../model/colors'; +import { IDictionary } from '../model/dictionary'; +import { TypeResponse } from '../model/typeResponse'; +import { ITypeValue } from '../model/typeValue'; +import { UpdateTypeValue } from '../model/updateTypeValue'; -import {BASE_PATH} from "../variables"; -import {Configuration} from "../configuration"; +import { BASE_PATH } from '../variables'; +import { Configuration } from '../configuration'; @Injectable() export class DictionaryControllerService { @@ -34,7 +34,7 @@ export class DictionaryControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -93,7 +93,7 @@ export class DictionaryControllerService { dossierId?: string, removeCurrent?: boolean, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling addEntry.'); @@ -107,7 +107,7 @@ export class DictionaryControllerService { throw new Error('Required parameter type was null or undefined when calling addEntry.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (dossierId !== undefined && dossierId !== null) { queryParameters = queryParameters.set('dossierId', dossierId); } @@ -147,8 +147,8 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -171,7 +171,7 @@ export class DictionaryControllerService { throw new Error('Required parameter body was null or undefined when calling addType.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (dossierId !== undefined && dossierId !== null) { queryParameters = queryParameters.set('dossierId', dossierId); } @@ -205,7 +205,7 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -252,7 +252,7 @@ export class DictionaryControllerService { type: string, dossierId?: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling deleteEntries.'); @@ -266,7 +266,7 @@ export class DictionaryControllerService { throw new Error('Required parameter type was null or undefined when calling deleteEntries.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (dossierId !== undefined && dossierId !== null) { queryParameters = queryParameters.set('dossierId', dossierId); } @@ -303,8 +303,8 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -351,7 +351,7 @@ export class DictionaryControllerService { type: string, dossierId?: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteEntry.'); @@ -365,7 +365,7 @@ export class DictionaryControllerService { throw new Error('Required parameter type was null or undefined when calling deleteEntry.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (dossierId !== undefined && dossierId !== null) { queryParameters = queryParameters.set('dossierId', dossierId); } @@ -389,15 +389,15 @@ export class DictionaryControllerService { return this.httpClient.request( 'delete', `${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent( - String(dossierTemplateId) + String(dossierTemplateId), )}/${encodeURIComponent(String(entry))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -439,7 +439,7 @@ export class DictionaryControllerService { type: string, dossierId?: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteType.'); @@ -449,7 +449,7 @@ export class DictionaryControllerService { throw new Error('Required parameter type was null or undefined when calling deleteType.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (dossierId !== undefined && dossierId !== null) { queryParameters = queryParameters.set('dossierId', dossierId); } @@ -478,8 +478,8 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -521,7 +521,7 @@ export class DictionaryControllerService { dossierTemplateId: string, dossierId?: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling deleteTypes.'); @@ -531,7 +531,7 @@ export class DictionaryControllerService { throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteTypes.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (dossierId !== undefined && dossierId !== null) { queryParameters = queryParameters.set('dossierId', dossierId); } @@ -568,8 +568,8 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -611,7 +611,7 @@ export class DictionaryControllerService { type: string, dossierId?: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling downloadDictionaryFile.'); @@ -621,7 +621,7 @@ export class DictionaryControllerService { throw new Error('Required parameter type was null or undefined when calling downloadDictionaryFile.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (dossierId !== undefined && dossierId !== null) { queryParameters = queryParameters.set('dossierId', dossierId); } @@ -650,8 +650,8 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -683,13 +683,13 @@ export class DictionaryControllerService { dossierTemplateId: string, dossierId?: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling getAllTypes.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (dossierId !== undefined && dossierId !== null) { queryParameters = queryParameters.set('dossierId', dossierId); } @@ -718,8 +718,8 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -761,7 +761,7 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -803,7 +803,7 @@ export class DictionaryControllerService { type: string, dossierId?: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling getDictionaryForType.'); @@ -813,7 +813,7 @@ export class DictionaryControllerService { throw new Error('Required parameter type was null or undefined when calling getDictionaryForType.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (dossierId !== undefined && dossierId !== null) { queryParameters = queryParameters.set('dossierId', dossierId); } @@ -842,8 +842,8 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -903,7 +903,7 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -950,7 +950,7 @@ export class DictionaryControllerService { type: string, dossierId?: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateType.'); @@ -964,7 +964,7 @@ export class DictionaryControllerService { throw new Error('Required parameter type was null or undefined when calling updateType.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (dossierId !== undefined && dossierId !== null) { queryParameters = queryParameters.set('dossierId', dossierId); } @@ -1001,8 +1001,8 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -1049,7 +1049,7 @@ export class DictionaryControllerService { file?: Blob, dossierId?: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling uploadDictionaryFile.'); @@ -1089,7 +1089,7 @@ export class DictionaryControllerService { if (useForm) { formParams = new FormData(); } else { - formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + formParams = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); } if (file !== undefined) { @@ -1107,8 +1107,8 @@ export class DictionaryControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } diff --git a/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts b/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts index 3336e0594..dada73e88 100644 --- a/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts +++ b/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts @@ -30,7 +30,7 @@ export class DigitalSignatureControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -74,7 +74,7 @@ export class DigitalSignatureControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -111,7 +111,7 @@ export class DigitalSignatureControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -169,7 +169,7 @@ export class DigitalSignatureControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -197,7 +197,7 @@ export class DigitalSignatureControllerService { public updateDigitalSignature( body: DigitalSignatureViewModel, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateDigitalSignaturegit_.'); @@ -231,7 +231,7 @@ export class DigitalSignatureControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/dossierAttributesController.service.ts b/libs/red-ui-http/src/lib/api/dossierAttributesController.service.ts index 0858bad17..220c01aa5 100644 --- a/libs/red-ui-http/src/lib/api/dossierAttributesController.service.ts +++ b/libs/red-ui-http/src/lib/api/dossierAttributesController.service.ts @@ -10,18 +10,18 @@ * Do not edit the class manually. */ /* tslint:disable:no-unused-variable member-ordering */ -import {Inject, Injectable, Optional} from "@angular/core"; -import {HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse} from "@angular/common/http"; -import {CustomHttpUrlEncodingCodec} from '../encoder'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; +import { CustomHttpUrlEncodingCodec } from '../encoder'; -import {Observable} from "rxjs"; +import { Observable } from 'rxjs'; import { DossierAttributes } from '../model/dossierAttributes'; import { DossierAttribute } from '../model/dossierAttribute'; -import {IDossierAttributeConfig} from "../model/dossierAttributeConfig"; -import {DossierAttributesConfig} from "../model/dossierAttributesConfig"; +import { IDossierAttributeConfig } from '../model/dossierAttributeConfig'; +import { DossierAttributesConfig } from '../model/dossierAttributesConfig'; -import {BASE_PATH} from "../variables"; -import {Configuration} from "../configuration"; +import { BASE_PATH } from '../variables'; +import { Configuration } from '../configuration'; @Injectable() export class DossierAttributesControllerService { @@ -32,7 +32,7 @@ export class DossierAttributesControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -76,7 +76,7 @@ export class DossierAttributesControllerService { body: DossierAttribute, dossierId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling addOrUpdateDossierAttributes.'); @@ -117,8 +117,8 @@ export class DossierAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -155,7 +155,7 @@ export class DossierAttributesControllerService { body: IDossierAttributeConfig, dossierTemplateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling addOrUpdateDossierAttributesConfig.'); @@ -196,8 +196,8 @@ export class DossierAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -234,7 +234,7 @@ export class DossierAttributesControllerService { dossierAttributeId: string, dossierId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierAttributeId === null || dossierAttributeId === undefined) { throw new Error('Required parameter dossierAttributeId was null or undefined when calling deleteDossierAttribute.'); @@ -263,14 +263,14 @@ export class DossierAttributesControllerService { return this.httpClient.request( 'delete', `${this.basePath}/dossier-attributes/set/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(dossierAttributeId) + String(dossierAttributeId), )}`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -307,7 +307,7 @@ export class DossierAttributesControllerService { dossierAttributeId: string, dossierTemplateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierAttributeId === null || dossierAttributeId === undefined) { throw new Error('Required parameter dossierAttributeId was null or undefined when calling deleteDossierAttributeConfig.'); @@ -336,14 +336,14 @@ export class DossierAttributesControllerService { return this.httpClient.request( 'delete', `${this.basePath}/dossier-attributes/config/${encodeURIComponent(String(dossierTemplateId))}/${encodeURIComponent( - String(dossierAttributeId) + String(dossierAttributeId), )}`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -380,7 +380,7 @@ export class DossierAttributesControllerService { dossierAttributeIds: Array, dossierTemplateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierAttributeIds === null || dossierAttributeIds === undefined) { throw new Error('Required parameter dossierAttributeIds was null or undefined when calling deleteDossierAttributesConfig.'); @@ -390,7 +390,7 @@ export class DossierAttributesControllerService { throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteDossierAttributesConfig.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (dossierAttributeIds) { dossierAttributeIds.forEach(element => { queryParameters = queryParameters.append('dossierAttributeIds', element); @@ -421,8 +421,8 @@ export class DossierAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -471,8 +471,8 @@ export class DossierAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -529,8 +529,8 @@ export class DossierAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -567,7 +567,7 @@ export class DossierAttributesControllerService { body: DossierAttributes, dossierId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setDossierAttributes.'); @@ -608,8 +608,8 @@ export class DossierAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -646,7 +646,7 @@ export class DossierAttributesControllerService { body: DossierAttributesConfig, dossierTemplateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setDossierAttributesConfig.'); @@ -687,8 +687,8 @@ export class DossierAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } diff --git a/libs/red-ui-http/src/lib/api/dossierController.service.ts b/libs/red-ui-http/src/lib/api/dossierController.service.ts index 78debc69a..bf0ec01fb 100644 --- a/libs/red-ui-http/src/lib/api/dossierController.service.ts +++ b/libs/red-ui-http/src/lib/api/dossierController.service.ts @@ -31,7 +31,7 @@ export class DossierControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -88,7 +88,7 @@ export class DossierControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -130,7 +130,7 @@ export class DossierControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -167,7 +167,7 @@ export class DossierControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -209,7 +209,7 @@ export class DossierControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -246,7 +246,7 @@ export class DossierControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -296,7 +296,7 @@ export class DossierControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -346,7 +346,7 @@ export class DossierControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts b/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts index 8a78317a1..34baed127 100644 --- a/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts +++ b/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts @@ -10,14 +10,14 @@ * Do not edit the class manually. */ /* tslint:disable:no-unused-variable member-ordering */ -import {Inject, Injectable, Optional} from "@angular/core"; -import {HttpClient, HttpEvent, HttpHeaders, HttpResponse} from "@angular/common/http"; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; -import {Observable} from "rxjs"; +import { Observable } from 'rxjs'; -import {BASE_PATH} from '../variables'; -import {Configuration} from '../configuration'; -import {IDossierTemplate} from "../model/dossierTemplate"; +import { BASE_PATH } from '../variables'; +import { Configuration } from '../configuration'; +import { IDossierTemplate } from '../model/dossierTemplate'; @Injectable() export class DossierTemplateControllerService { @@ -28,7 +28,7 @@ export class DossierTemplateControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -93,7 +93,7 @@ export class DossierTemplateControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -138,8 +138,8 @@ export class DossierTemplateControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -189,7 +189,7 @@ export class DossierTemplateControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -226,7 +226,7 @@ export class DossierTemplateControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -279,8 +279,8 @@ export class DossierTemplateControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } diff --git a/libs/red-ui-http/src/lib/api/downloadController.service.ts b/libs/red-ui-http/src/lib/api/downloadController.service.ts index b1d4f862b..471dd8d5f 100644 --- a/libs/red-ui-http/src/lib/api/downloadController.service.ts +++ b/libs/red-ui-http/src/lib/api/downloadController.service.ts @@ -33,7 +33,7 @@ export class DownloadControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -90,7 +90,7 @@ export class DownloadControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -142,7 +142,7 @@ export class DownloadControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -179,7 +179,7 @@ export class DownloadControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -237,7 +237,7 @@ export class DownloadControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts b/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts index add461f4f..79aa0c00e 100644 --- a/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts +++ b/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts @@ -10,17 +10,17 @@ * Do not edit the class manually. */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from "@angular/core"; -import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from "@angular/common/http"; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; -import { Observable } from "rxjs"; +import { Observable } from 'rxjs'; -import { IFileAttributeConfig } from "../model/fileAttributeConfig"; -import { FileAttributes } from "../model/fileAttributes"; -import { FileAttributesConfig } from "../model/fileAttributesConfig"; +import { IFileAttributeConfig } from '../model/fileAttributeConfig'; +import { FileAttributes } from '../model/fileAttributes'; +import { FileAttributesConfig } from '../model/fileAttributesConfig'; -import { BASE_PATH } from "../variables"; -import { Configuration } from "../configuration"; +import { BASE_PATH } from '../variables'; +import { Configuration } from '../configuration'; @Injectable() export class FileAttributesControllerService { @@ -31,7 +31,7 @@ export class FileAttributesControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -75,7 +75,7 @@ export class FileAttributesControllerService { dossierTemplateId: string, fileAttributeId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteFileAttribute.'); @@ -104,14 +104,14 @@ export class FileAttributesControllerService { return this.httpClient.request( 'delete', `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent(String(dossierTemplateId))}/${encodeURIComponent( - String(fileAttributeId) + String(fileAttributeId), )}`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -148,7 +148,7 @@ export class FileAttributesControllerService { body: Array, dossierTemplateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling deleteFileAttributes.'); @@ -189,8 +189,8 @@ export class FileAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -222,7 +222,7 @@ export class FileAttributesControllerService { public getFileAttributesConfiguration( dossierTemplateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling getFileAttributesConfiguration.'); @@ -251,8 +251,8 @@ export class FileAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -294,7 +294,7 @@ export class FileAttributesControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setFileAttributes.'); @@ -339,8 +339,8 @@ export class FileAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -377,7 +377,7 @@ export class FileAttributesControllerService { body: FileAttributesConfig, dossierTemplateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setFileAttributesConfig.'); @@ -418,8 +418,8 @@ export class FileAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -456,7 +456,7 @@ export class FileAttributesControllerService { body: IFileAttributeConfig, dossierTemplateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setFileAttributesConfiguration.'); @@ -497,8 +497,8 @@ export class FileAttributesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } diff --git a/libs/red-ui-http/src/lib/api/fileManagementController.service.ts b/libs/red-ui-http/src/lib/api/fileManagementController.service.ts index fdeb33527..ed56449e2 100644 --- a/libs/red-ui-http/src/lib/api/fileManagementController.service.ts +++ b/libs/red-ui-http/src/lib/api/fileManagementController.service.ts @@ -28,7 +28,7 @@ export class FileManagementControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -85,8 +85,8 @@ export class FileManagementControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -146,7 +146,7 @@ export class FileManagementControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -188,7 +188,7 @@ export class FileManagementControllerService { fileId: string, inline?: boolean, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling downloadAnnotatedFile.'); @@ -227,8 +227,8 @@ export class FileManagementControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -274,7 +274,7 @@ export class FileManagementControllerService { inline?: boolean, indicator?: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling downloadOriginalFile.'); @@ -317,8 +317,8 @@ export class FileManagementControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -350,7 +350,7 @@ export class FileManagementControllerService { dossierId: string, fileIds: Array, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling hardDeleteFile.'); @@ -388,7 +388,7 @@ export class FileManagementControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -448,7 +448,7 @@ export class FileManagementControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts b/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts index 3b9b5b853..2f7ce83c0 100644 --- a/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts +++ b/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts @@ -29,7 +29,7 @@ export class GeneralSettingsControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -73,7 +73,7 @@ export class GeneralSettingsControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -101,7 +101,7 @@ export class GeneralSettingsControllerService { public updateGeneralConfigurations( body: GeneralConfigurationModel, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateGeneralConfigurations.'); @@ -135,7 +135,7 @@ export class GeneralSettingsControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/infoController.service.ts b/libs/red-ui-http/src/lib/api/infoController.service.ts index f91a00a58..8fcf6925b 100644 --- a/libs/red-ui-http/src/lib/api/infoController.service.ts +++ b/libs/red-ui-http/src/lib/api/infoController.service.ts @@ -29,7 +29,7 @@ export class InfoControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -73,7 +73,7 @@ export class InfoControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts b/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts index 86b72ad6c..2ccc59b07 100644 --- a/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts +++ b/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts @@ -29,7 +29,7 @@ export class LegalBasisMappingControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -89,8 +89,8 @@ export class LegalBasisMappingControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -127,7 +127,7 @@ export class LegalBasisMappingControllerService { body: Array, dossierTemplateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setLegalBasisMapping.'); @@ -165,7 +165,7 @@ export class LegalBasisMappingControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/licenseReportController.service.ts b/libs/red-ui-http/src/lib/api/licenseReportController.service.ts index 8a8090751..fbefc55e1 100644 --- a/libs/red-ui-http/src/lib/api/licenseReportController.service.ts +++ b/libs/red-ui-http/src/lib/api/licenseReportController.service.ts @@ -31,7 +31,7 @@ export class LicenseReportControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -80,7 +80,7 @@ export class LicenseReportControllerService { limit?: number, offset?: number, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling licenseReport.'); @@ -123,7 +123,7 @@ export class LicenseReportControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts b/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts index 58ac7b83c..7521f7aae 100644 --- a/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts +++ b/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts @@ -38,7 +38,7 @@ export class ManualRedactionControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -92,7 +92,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling addComment.'); @@ -136,15 +136,15 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', `${this.basePath}/manualRedaction/comment/add/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}/${encodeURIComponent(String(annotationId))}`, { body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -186,7 +186,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling addRedaction.'); @@ -231,8 +231,8 @@ export class ManualRedactionControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -279,7 +279,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling approveRequest.'); @@ -323,15 +323,15 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', `${this.basePath}/manualRedaction/approve/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}/${encodeURIComponent(String(annotationId))}`, { body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -373,7 +373,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (annotationId === null || annotationId === undefined) { throw new Error('Required parameter annotationId was null or undefined when calling declineRequest.'); @@ -406,14 +406,14 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', `${this.basePath}/manualRedaction/decline/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}/${encodeURIComponent(String(annotationId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -455,7 +455,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling forceRedaction.'); @@ -495,15 +495,15 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', `${this.basePath}/manualRedaction/redaction/force/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}`, { body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -563,8 +563,8 @@ export class ManualRedactionControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -606,7 +606,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling legalBasisChange.'); @@ -646,15 +646,15 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', `${this.basePath}/manualRedaction/redaction/legalBasisChange/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}`, { body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -696,7 +696,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling recategorizeImage.'); @@ -736,15 +736,15 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', `${this.basePath}/manualRedaction/redaction/recategorize/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}`, { body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -786,7 +786,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling removeRedaction.'); @@ -826,15 +826,15 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', `${this.basePath}/manualRedaction/redaction/remove/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}`, { body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -876,7 +876,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling requestAddRedaction.'); @@ -921,8 +921,8 @@ export class ManualRedactionControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -964,7 +964,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling requestForceRedaction.'); @@ -1009,8 +1009,8 @@ export class ManualRedactionControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -1052,7 +1052,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling requestImageRecategorization.'); @@ -1092,15 +1092,15 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', `${this.basePath}/manualRedaction/request/recategorize/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}`, { body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -1142,7 +1142,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling requestLegalBasisChange.'); @@ -1182,15 +1182,15 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', `${this.basePath}/manualRedaction/request/legalBasis/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}`, { body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -1232,7 +1232,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling requestRemoveRedaction.'); @@ -1272,15 +1272,15 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', `${this.basePath}/manualRedaction/request/remove/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}`, { body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -1316,7 +1316,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (annotationId === null || annotationId === undefined) { throw new Error('Required parameter annotationId was null or undefined when calling undo.'); @@ -1349,14 +1349,14 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'delete', `${this.basePath}/manualRedaction/undo/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}/${encodeURIComponent(String(annotationId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -1403,7 +1403,7 @@ export class ManualRedactionControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (annotationId === null || annotationId === undefined) { throw new Error('Required parameter annotationId was null or undefined when calling undoComment.'); @@ -1440,14 +1440,14 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'delete', `${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}/${encodeURIComponent(String(annotationId))}/${encodeURIComponent(String(commentId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } diff --git a/libs/red-ui-http/src/lib/api/notificationController.service.ts b/libs/red-ui-http/src/lib/api/notificationController.service.ts index 4e9262f7b..7efa7274e 100644 --- a/libs/red-ui-http/src/lib/api/notificationController.service.ts +++ b/libs/red-ui-http/src/lib/api/notificationController.service.ts @@ -30,7 +30,7 @@ export class NotificationControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -87,7 +87,7 @@ export class NotificationControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -143,7 +143,7 @@ export class NotificationControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -175,7 +175,7 @@ export class NotificationControllerService { body: Array, setRead: boolean, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling toggleNotificationRead.'); @@ -219,7 +219,7 @@ export class NotificationControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -251,7 +251,7 @@ export class NotificationControllerService { body: Array, setSeen: boolean, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling toggleNotificationSeen.'); @@ -295,7 +295,7 @@ export class NotificationControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/reanalysisController.service.ts b/libs/red-ui-http/src/lib/api/reanalysisController.service.ts index 5103e081f..20fef4590 100644 --- a/libs/red-ui-http/src/lib/api/reanalysisController.service.ts +++ b/libs/red-ui-http/src/lib/api/reanalysisController.service.ts @@ -30,7 +30,7 @@ export class ReanalysisControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -79,7 +79,7 @@ export class ReanalysisControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling excludePages.'); @@ -124,8 +124,8 @@ export class ReanalysisControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -167,7 +167,7 @@ export class ReanalysisControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling includePages.'); @@ -212,8 +212,8 @@ export class ReanalysisControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -255,7 +255,7 @@ export class ReanalysisControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -291,7 +291,7 @@ export class ReanalysisControllerService { fileId: string, force?: boolean, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling ocrFile.'); @@ -330,8 +330,8 @@ export class ReanalysisControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -386,7 +386,7 @@ export class ReanalysisControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -440,7 +440,7 @@ export class ReanalysisControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -476,7 +476,7 @@ export class ReanalysisControllerService { fileId: string, force?: boolean, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling reanalyzeFile.'); @@ -515,8 +515,8 @@ export class ReanalysisControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -558,7 +558,7 @@ export class ReanalysisControllerService { dossierId: string, force?: boolean, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling reanalyzeFilesForDossier.'); @@ -602,7 +602,7 @@ export class ReanalysisControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -659,7 +659,7 @@ export class ReanalysisControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -701,7 +701,7 @@ export class ReanalysisControllerService { fileId: string, excluded?: boolean, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling toggleAnalysis.'); @@ -740,8 +740,8 @@ export class ReanalysisControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } diff --git a/libs/red-ui-http/src/lib/api/redactionLogController.service.ts b/libs/red-ui-http/src/lib/api/redactionLogController.service.ts index 96548d57c..4f785770f 100644 --- a/libs/red-ui-http/src/lib/api/redactionLogController.service.ts +++ b/libs/red-ui-http/src/lib/api/redactionLogController.service.ts @@ -31,7 +31,7 @@ export class RedactionLogControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -80,7 +80,7 @@ export class RedactionLogControllerService { fileId: string, withManualRedactions?: boolean, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling getRedactionLog.'); @@ -119,8 +119,8 @@ export class RedactionLogControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -180,8 +180,8 @@ export class RedactionLogControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } diff --git a/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts b/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts index 748667ad5..cc9afe2eb 100644 --- a/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts +++ b/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts @@ -31,7 +31,7 @@ export class ReportTemplateControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -70,7 +70,7 @@ export class ReportTemplateControllerService { dossierTemplateId: string, templateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteTemplate.'); @@ -103,8 +103,8 @@ export class ReportTemplateControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -141,7 +141,7 @@ export class ReportTemplateControllerService { dossierTemplateId: string, templateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling downloadReportTemplate.'); @@ -174,8 +174,8 @@ export class ReportTemplateControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -232,8 +232,8 @@ export class ReportTemplateControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -290,8 +290,8 @@ export class ReportTemplateControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -333,7 +333,7 @@ export class ReportTemplateControllerService { multiFileReport?: boolean, file?: Blob, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling uploadTemplate.'); @@ -387,8 +387,8 @@ export class ReportTemplateControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } diff --git a/libs/red-ui-http/src/lib/api/rulesController.service.ts b/libs/red-ui-http/src/lib/api/rulesController.service.ts index bfce50459..cb83081e2 100644 --- a/libs/red-ui-http/src/lib/api/rulesController.service.ts +++ b/libs/red-ui-http/src/lib/api/rulesController.service.ts @@ -30,7 +30,7 @@ export class RulesControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -79,7 +79,7 @@ export class RulesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -121,7 +121,7 @@ export class RulesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -171,7 +171,7 @@ export class RulesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -203,7 +203,7 @@ export class RulesControllerService { dossierTemplateId: string, file?: Blob, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error('Required parameter dossierTemplateId was null or undefined when calling uploadRulesFile.'); @@ -251,7 +251,7 @@ export class RulesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/searchController.service.ts b/libs/red-ui-http/src/lib/api/searchController.service.ts index 07eb74578..a2c9cfed2 100644 --- a/libs/red-ui-http/src/lib/api/searchController.service.ts +++ b/libs/red-ui-http/src/lib/api/searchController.service.ts @@ -30,7 +30,7 @@ export class SearchControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -87,7 +87,7 @@ export class SearchControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts b/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts index 3495520e5..d10788582 100644 --- a/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts +++ b/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts @@ -28,7 +28,7 @@ export class SmtpConfigurationControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -72,7 +72,7 @@ export class SmtpConfigurationControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -109,7 +109,7 @@ export class SmtpConfigurationControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -159,7 +159,7 @@ export class SmtpConfigurationControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -209,7 +209,7 @@ export class SmtpConfigurationControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/statusController.service.ts b/libs/red-ui-http/src/lib/api/statusController.service.ts index 7bfd0ff97..0ebf68cf9 100644 --- a/libs/red-ui-http/src/lib/api/statusController.service.ts +++ b/libs/red-ui-http/src/lib/api/statusController.service.ts @@ -10,17 +10,17 @@ * Do not edit the class manually. */ /* tslint:disable:no-unused-variable member-ordering */ -import {Inject, Injectable, Optional} from "@angular/core"; -import {HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse} from "@angular/common/http"; -import {CustomHttpUrlEncodingCodec} from "../encoder"; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; +import { CustomHttpUrlEncodingCodec } from '../encoder'; -import {Observable} from "rxjs"; +import { Observable } from 'rxjs'; -import {IFile} from "../model/file"; -import {JSONPrimitive} from '../model/JSONPrimitive'; +import { IFile } from '../model/file'; +import { JSONPrimitive } from '../model/JSONPrimitive'; -import {BASE_PATH} from "../variables"; -import {Configuration} from "../configuration"; +import { BASE_PATH } from '../variables'; +import { Configuration } from '../configuration'; @Injectable() export class StatusControllerService { @@ -31,7 +31,7 @@ export class StatusControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -82,8 +82,8 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -125,7 +125,7 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -180,8 +180,8 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -243,7 +243,7 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -285,7 +285,7 @@ export class StatusControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setFileReviewer.'); @@ -330,8 +330,8 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -373,7 +373,7 @@ export class StatusControllerService { fileId: string, reviewerId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling setFileReviewer1.'); @@ -406,14 +406,14 @@ export class StatusControllerService { return this.httpClient.request( 'post', `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent( - String(reviewerId) + String(reviewerId), )}`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -455,7 +455,7 @@ export class StatusControllerService { dossierId: string, reviewerId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setFileReviewerForList.'); @@ -500,8 +500,8 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -556,8 +556,8 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -589,7 +589,7 @@ export class StatusControllerService { body: Array, dossierId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setStatusApprovedForList.'); @@ -627,7 +627,7 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -669,7 +669,7 @@ export class StatusControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setStatusUnderApproval.'); @@ -714,8 +714,8 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -757,7 +757,7 @@ export class StatusControllerService { fileId: string, approverId?: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling setStatusUnderApproval1.'); @@ -767,7 +767,7 @@ export class StatusControllerService { throw new Error('Required parameter fileId was null or undefined when calling setStatusUnderApproval1.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (approverId !== undefined && approverId !== null) { queryParameters = queryParameters.set('approverId', approverId); } @@ -796,8 +796,8 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -839,7 +839,7 @@ export class StatusControllerService { approverId: string, dossierId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setStatusUnderApprovalForList.'); @@ -853,7 +853,7 @@ export class StatusControllerService { throw new Error('Required parameter dossierId was null or undefined when calling setStatusUnderApprovalForList.'); } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (approverId !== undefined && approverId !== null) { queryParameters = queryParameters.set('approverId', approverId); } @@ -887,7 +887,7 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -919,7 +919,7 @@ export class StatusControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling setStatusUnderReview.'); @@ -952,8 +952,8 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -985,7 +985,7 @@ export class StatusControllerService { body: Array, dossierId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling setStatusUnderReviewForList.'); @@ -1023,7 +1023,7 @@ export class StatusControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/statusReportController.service.ts b/libs/red-ui-http/src/lib/api/statusReportController.service.ts index c6985682d..7cd87c3ae 100644 --- a/libs/red-ui-http/src/lib/api/statusReportController.service.ts +++ b/libs/red-ui-http/src/lib/api/statusReportController.service.ts @@ -27,7 +27,7 @@ export class StatusReportControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -76,7 +76,7 @@ export class StatusReportControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/uploadController.service.ts b/libs/red-ui-http/src/lib/api/uploadController.service.ts index 502792cf5..47f1d2f23 100644 --- a/libs/red-ui-http/src/lib/api/uploadController.service.ts +++ b/libs/red-ui-http/src/lib/api/uploadController.service.ts @@ -30,7 +30,7 @@ export class UploadControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -112,7 +112,7 @@ export class UploadControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/userController.service.ts b/libs/red-ui-http/src/lib/api/userController.service.ts index ce6d838a7..64b3f08f8 100644 --- a/libs/red-ui-http/src/lib/api/userController.service.ts +++ b/libs/red-ui-http/src/lib/api/userController.service.ts @@ -10,20 +10,20 @@ * Do not edit the class manually. */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from "@angular/core"; -import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http"; -import { CustomHttpUrlEncodingCodec } from "../encoder"; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; +import { CustomHttpUrlEncodingCodec } from '../encoder'; -import { Observable } from "rxjs"; +import { Observable } from 'rxjs'; -import { CreateUserRequest } from "../model/createUserRequest"; -import { ResetPasswordRequest } from "../model/resetPasswordRequest"; -import { UpdateMyProfileRequest } from "../model/updateMyProfileRequest"; -import { UpdateProfileRequest } from "../model/updateProfileRequest"; -import { IUser } from "../model/user"; +import { CreateUserRequest } from '../model/createUserRequest'; +import { ResetPasswordRequest } from '../model/resetPasswordRequest'; +import { UpdateMyProfileRequest } from '../model/updateMyProfileRequest'; +import { UpdateProfileRequest } from '../model/updateProfileRequest'; +import { IUser } from '../model/user'; -import { BASE_PATH } from "../variables"; -import { Configuration } from "../configuration"; +import { BASE_PATH } from '../variables'; +import { Configuration } from '../configuration'; @Injectable() export class UserControllerService { @@ -34,7 +34,7 @@ export class UserControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -101,7 +101,7 @@ export class UserControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -151,7 +151,7 @@ export class UserControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -193,7 +193,7 @@ export class UserControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -243,7 +243,7 @@ export class UserControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -287,7 +287,7 @@ export class UserControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -329,7 +329,7 @@ export class UserControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -373,7 +373,7 @@ export class UserControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -405,7 +405,7 @@ export class UserControllerService { body: ResetPasswordRequest, userId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling resetPassword.'); @@ -443,7 +443,7 @@ export class UserControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -493,7 +493,7 @@ export class UserControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -525,7 +525,7 @@ export class UserControllerService { body: UpdateProfileRequest, userId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateProfile.'); @@ -563,7 +563,7 @@ export class UserControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts b/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts index b01b06d56..053385219 100644 --- a/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts +++ b/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts @@ -27,7 +27,7 @@ export class UserPreferenceControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -76,7 +76,7 @@ export class UserPreferenceControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -113,7 +113,7 @@ export class UserPreferenceControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -168,7 +168,7 @@ export class UserPreferenceControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/versionsController.service.ts b/libs/red-ui-http/src/lib/api/versionsController.service.ts index 57ff97418..ff589e9c9 100644 --- a/libs/red-ui-http/src/lib/api/versionsController.service.ts +++ b/libs/red-ui-http/src/lib/api/versionsController.service.ts @@ -30,7 +30,7 @@ export class VersionsControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -74,7 +74,7 @@ export class VersionsControllerService { dossierId: string, dossierTemplateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling getDossierDictionaryVersion.'); @@ -107,8 +107,8 @@ export class VersionsControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -170,7 +170,7 @@ export class VersionsControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } diff --git a/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts b/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts index d91adceaf..a05770760 100644 --- a/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts +++ b/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts @@ -30,7 +30,7 @@ export class ViewedPagesControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -79,7 +79,7 @@ export class ViewedPagesControllerService { dossierId: string, fileId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling addPage.'); @@ -124,8 +124,8 @@ export class ViewedPagesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -185,8 +185,8 @@ export class ViewedPagesControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -222,7 +222,7 @@ export class ViewedPagesControllerService { fileId: string, page: number, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error('Required parameter dossierId was null or undefined when calling removePage.'); @@ -255,14 +255,14 @@ export class ViewedPagesControllerService { return this.httpClient.request( 'delete', `${this.basePath}/viewedPages/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) + String(fileId), )}/${encodeURIComponent(String(page))}`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } diff --git a/libs/red-ui-http/src/lib/api/watermarkController.service.ts b/libs/red-ui-http/src/lib/api/watermarkController.service.ts index 997bdfeb9..4a2bac3c5 100644 --- a/libs/red-ui-http/src/lib/api/watermarkController.service.ts +++ b/libs/red-ui-http/src/lib/api/watermarkController.service.ts @@ -29,7 +29,7 @@ export class WatermarkControllerService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration + @Optional() configuration: Configuration, ) { if (basePath) { this.basePath = basePath; @@ -78,7 +78,7 @@ export class WatermarkControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress + reportProgress: reportProgress, }); } @@ -127,8 +127,8 @@ export class WatermarkControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } @@ -165,7 +165,7 @@ export class WatermarkControllerService { body: WatermarkModel, dossierTemplateId: string, observe: any = 'body', - reportProgress: boolean = false + reportProgress: boolean = false, ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling saveWatermark.'); @@ -206,8 +206,8 @@ export class WatermarkControllerService { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, - reportProgress: reportProgress - } + reportProgress: reportProgress, + }, ); } diff --git a/libs/red-ui-http/src/lib/model/change.ts b/libs/red-ui-http/src/lib/model/change.ts index bb2e530b5..54d1ff263 100644 --- a/libs/red-ui-http/src/lib/model/change.ts +++ b/libs/red-ui-http/src/lib/model/change.ts @@ -20,6 +20,6 @@ export namespace Change { export const TypeEnum = { ADDED: 'ADDED' as TypeEnum, CHANGED: 'CHANGED' as TypeEnum, - REMOVED: 'REMOVED' as TypeEnum + REMOVED: 'REMOVED' as TypeEnum, }; } diff --git a/libs/red-ui-http/src/lib/model/dictionary.ts b/libs/red-ui-http/src/lib/model/dictionary.ts index 0754fb732..24ccfd10c 100644 --- a/libs/red-ui-http/src/lib/model/dictionary.ts +++ b/libs/red-ui-http/src/lib/model/dictionary.ts @@ -10,7 +10,7 @@ * Do not edit the class manually. */ -import { List } from "../red-types"; +import { List } from '../red-types'; /** * Object containing a list of dictionary entries and colors of an entry type. diff --git a/libs/red-ui-http/src/lib/model/dossier.ts b/libs/red-ui-http/src/lib/model/dossier.ts index 0e48a239c..74fdafcb4 100644 --- a/libs/red-ui-http/src/lib/model/dossier.ts +++ b/libs/red-ui-http/src/lib/model/dossier.ts @@ -35,12 +35,12 @@ export const DownloadFileTypes = { FLATTEN: 'FLATTEN', ORIGINAL: 'ORIGINAL', PREVIEW: 'PREVIEW', - REDACTED: 'REDACTED' + REDACTED: 'REDACTED', } as const; export type DownloadFileType = keyof typeof DownloadFileTypes; export const DossierStatuses = { ACTIVE: 'ACTIVE', - DELETED: 'DELETED' + DELETED: 'DELETED', } as const; export type DossierStatus = keyof typeof DossierStatuses; diff --git a/libs/red-ui-http/src/lib/model/dossierAttributeConfig.ts b/libs/red-ui-http/src/lib/model/dossierAttributeConfig.ts index d41f90b65..d79c33800 100644 --- a/libs/red-ui-http/src/lib/model/dossierAttributeConfig.ts +++ b/libs/red-ui-http/src/lib/model/dossierAttributeConfig.ts @@ -23,6 +23,6 @@ export const DossierAttributeConfigTypes = { DATE: 'DATE', IMAGE: 'IMAGE', NUMBER: 'NUMBER', - TEXT: 'TEXT' + TEXT: 'TEXT', } as const; export type DossierAttributeConfigType = keyof typeof DossierAttributeConfigTypes; diff --git a/libs/red-ui-http/src/lib/model/dossierRequest.ts b/libs/red-ui-http/src/lib/model/dossierRequest.ts index 6a422951e..f1d90790f 100644 --- a/libs/red-ui-http/src/lib/model/dossierRequest.ts +++ b/libs/red-ui-http/src/lib/model/dossierRequest.ts @@ -10,7 +10,7 @@ * Do not edit the class manually. */ -import { List } from "../red-types"; +import { List } from '../red-types'; /** * Object containing information about a dossier. @@ -69,6 +69,6 @@ export namespace DossierRequest { FLATTEN: 'FLATTEN' as DownloadFileTypesEnum, ORIGINAL: 'ORIGINAL' as DownloadFileTypesEnum, PREVIEW: 'PREVIEW' as DownloadFileTypesEnum, - REDACTED: 'REDACTED' as DownloadFileTypesEnum + REDACTED: 'REDACTED' as DownloadFileTypesEnum, }; } diff --git a/libs/red-ui-http/src/lib/model/downloadStatus.ts b/libs/red-ui-http/src/lib/model/downloadStatus.ts index ed87259c2..c84a2913a 100644 --- a/libs/red-ui-http/src/lib/model/downloadStatus.ts +++ b/libs/red-ui-http/src/lib/model/downloadStatus.ts @@ -31,13 +31,13 @@ export namespace DownloadStatus { FLATTEN: 'FLATTEN' as DownloadFileTypesEnum, ORIGINAL: 'ORIGINAL' as DownloadFileTypesEnum, PREVIEW: 'PREVIEW' as DownloadFileTypesEnum, - REDACTED: 'REDACTED' as DownloadFileTypesEnum + REDACTED: 'REDACTED' as DownloadFileTypesEnum, }; export type StatusEnum = 'FAILED' | 'GENERATING' | 'QUEUED' | 'READY'; export const StatusEnum = { FAILED: 'FAILED' as StatusEnum, GENERATING: 'GENERATING' as StatusEnum, QUEUED: 'QUEUED' as StatusEnum, - READY: 'READY' as StatusEnum + READY: 'READY' as StatusEnum, }; } diff --git a/libs/red-ui-http/src/lib/model/file.ts b/libs/red-ui-http/src/lib/model/file.ts index 05093c593..edc6ecd8a 100644 --- a/libs/red-ui-http/src/lib/model/file.ts +++ b/libs/red-ui-http/src/lib/model/file.ts @@ -9,7 +9,7 @@ * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ -import { FileAttributes } from "./fileAttributes"; +import { FileAttributes } from './fileAttributes'; /** * Object containing information on a specific file. @@ -163,7 +163,7 @@ export const FileStatuses = { UNASSIGNED: 'UNASSIGNED', UNDER_APPROVAL: 'UNDER_APPROVAL', UNDER_REVIEW: 'UNDER_REVIEW', - UNPROCESSED: 'UNPROCESSED' + UNPROCESSED: 'UNPROCESSED', } as const; export type FileStatus = keyof typeof FileStatuses; diff --git a/libs/red-ui-http/src/lib/model/fileAttributeConfig.ts b/libs/red-ui-http/src/lib/model/fileAttributeConfig.ts index 1afe9dfa7..8ef723324 100644 --- a/libs/red-ui-http/src/lib/model/fileAttributeConfig.ts +++ b/libs/red-ui-http/src/lib/model/fileAttributeConfig.ts @@ -27,6 +27,6 @@ export interface IFileAttributeConfig { export const FileAttributeConfigTypes = { DATE: 'DATE', NUMBER: 'NUMBER', - TEXT: 'TEXT' + TEXT: 'TEXT', } as const; export type FileAttributeConfigType = keyof typeof FileAttributeConfigTypes; diff --git a/libs/red-ui-http/src/lib/model/idRemoval.ts b/libs/red-ui-http/src/lib/model/idRemoval.ts index a11baafe1..6dd15c329 100644 --- a/libs/red-ui-http/src/lib/model/idRemoval.ts +++ b/libs/red-ui-http/src/lib/model/idRemoval.ts @@ -26,6 +26,6 @@ export namespace IdRemoval { export const StatusEnum = { APPROVED: 'APPROVED' as StatusEnum, DECLINED: 'DECLINED' as StatusEnum, - REQUESTED: 'REQUESTED' as StatusEnum + REQUESTED: 'REQUESTED' as StatusEnum, }; } diff --git a/libs/red-ui-http/src/lib/model/manualForceRedaction.ts b/libs/red-ui-http/src/lib/model/manualForceRedaction.ts index 2d8f7d7b8..54ead0b97 100644 --- a/libs/red-ui-http/src/lib/model/manualForceRedaction.ts +++ b/libs/red-ui-http/src/lib/model/manualForceRedaction.ts @@ -26,6 +26,6 @@ export namespace ManualForceRedaction { export const StatusEnum = { APPROVED: 'APPROVED' as StatusEnum, DECLINED: 'DECLINED' as StatusEnum, - REQUESTED: 'REQUESTED' as StatusEnum + REQUESTED: 'REQUESTED' as StatusEnum, }; } diff --git a/libs/red-ui-http/src/lib/model/manualImageRecategorization.ts b/libs/red-ui-http/src/lib/model/manualImageRecategorization.ts index 1a1e77124..0f0760954 100644 --- a/libs/red-ui-http/src/lib/model/manualImageRecategorization.ts +++ b/libs/red-ui-http/src/lib/model/manualImageRecategorization.ts @@ -26,6 +26,6 @@ export namespace ManualImageRecategorization { export const StatusEnum = { APPROVED: 'APPROVED' as StatusEnum, DECLINED: 'DECLINED' as StatusEnum, - REQUESTED: 'REQUESTED' as StatusEnum + REQUESTED: 'REQUESTED' as StatusEnum, }; } diff --git a/libs/red-ui-http/src/lib/model/manualLegalBasisChange.ts b/libs/red-ui-http/src/lib/model/manualLegalBasisChange.ts index 8d5977d9d..11c5b83e6 100644 --- a/libs/red-ui-http/src/lib/model/manualLegalBasisChange.ts +++ b/libs/red-ui-http/src/lib/model/manualLegalBasisChange.ts @@ -26,6 +26,6 @@ export namespace ManualLegalBasisChange { export const StatusEnum = { APPROVED: 'APPROVED' as StatusEnum, DECLINED: 'DECLINED' as StatusEnum, - REQUESTED: 'REQUESTED' as StatusEnum + REQUESTED: 'REQUESTED' as StatusEnum, }; } diff --git a/libs/red-ui-http/src/lib/model/manualRedactionEntry.ts b/libs/red-ui-http/src/lib/model/manualRedactionEntry.ts index f5c97259b..2b20ce48e 100644 --- a/libs/red-ui-http/src/lib/model/manualRedactionEntry.ts +++ b/libs/red-ui-http/src/lib/model/manualRedactionEntry.ts @@ -33,6 +33,6 @@ export namespace ManualRedactionEntry { export const StatusEnum = { APPROVED: 'APPROVED' as StatusEnum, DECLINED: 'DECLINED' as StatusEnum, - REQUESTED: 'REQUESTED' as StatusEnum + REQUESTED: 'REQUESTED' as StatusEnum, }; } diff --git a/libs/red-ui-http/src/lib/model/redactionLogEntry.ts b/libs/red-ui-http/src/lib/model/redactionLogEntry.ts index 769174c86..d1aed05b9 100644 --- a/libs/red-ui-http/src/lib/model/redactionLogEntry.ts +++ b/libs/red-ui-http/src/lib/model/redactionLogEntry.ts @@ -53,7 +53,7 @@ export namespace RedactionLogEntry { export const EnginesEnum = { DICTIONARY: 'DICTIONARY' as EnginesEnum, NER: 'NER' as EnginesEnum, - RULE: 'RULE' as EnginesEnum + RULE: 'RULE' as EnginesEnum, }; export type ManualRedactionTypeEnum = 'ADD' | 'FORCE_REDACT' | 'LEGAL_BASIS_CHANGE' | 'RECATEGORIZE' | 'REMOVE'; export const ManualRedactionTypeEnum = { @@ -61,12 +61,12 @@ export namespace RedactionLogEntry { FORCEREDACT: 'FORCE_REDACT' as ManualRedactionTypeEnum, LEGALBASISCHANGE: 'LEGAL_BASIS_CHANGE' as ManualRedactionTypeEnum, RECATEGORIZE: 'RECATEGORIZE' as ManualRedactionTypeEnum, - REMOVE: 'REMOVE' as ManualRedactionTypeEnum + REMOVE: 'REMOVE' as ManualRedactionTypeEnum, }; export type StatusEnum = 'APPROVED' | 'DECLINED' | 'REQUESTED'; export const StatusEnum = { APPROVED: 'APPROVED' as StatusEnum, DECLINED: 'DECLINED' as StatusEnum, - REQUESTED: 'REQUESTED' as StatusEnum + REQUESTED: 'REQUESTED' as StatusEnum, }; } diff --git a/libs/red-ui-http/src/lib/model/reportData.ts b/libs/red-ui-http/src/lib/model/reportData.ts index 7ff08f9aa..1be0f479b 100644 --- a/libs/red-ui-http/src/lib/model/reportData.ts +++ b/libs/red-ui-http/src/lib/model/reportData.ts @@ -47,6 +47,6 @@ export namespace ReportData { UNASSIGNED: 'UNASSIGNED' as StatusEnum, UNDER_APPROVAL: 'UNDER_APPROVAL' as StatusEnum, UNDER_REVIEW: 'UNDER_REVIEW' as StatusEnum, - UNPROCESSED: 'UNPROCESSED' as StatusEnum + UNPROCESSED: 'UNPROCESSED' as StatusEnum, }; } diff --git a/libs/red-ui-http/src/lib/model/typeResponse.ts b/libs/red-ui-http/src/lib/model/typeResponse.ts index 7093440c6..8d820d630 100644 --- a/libs/red-ui-http/src/lib/model/typeResponse.ts +++ b/libs/red-ui-http/src/lib/model/typeResponse.ts @@ -9,7 +9,7 @@ * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ -import { ITypeValue } from "./typeValue"; +import { ITypeValue } from './typeValue'; /** * Object containing a list of values of an entry type. diff --git a/libs/red-ui-http/src/lib/model/watermarkModel.ts b/libs/red-ui-http/src/lib/model/watermarkModel.ts index 32447e6b0..b0503c202 100644 --- a/libs/red-ui-http/src/lib/model/watermarkModel.ts +++ b/libs/red-ui-http/src/lib/model/watermarkModel.ts @@ -24,6 +24,6 @@ export namespace WatermarkModel { export const OrientationEnum = { DIAGONAL: 'DIAGONAL' as OrientationEnum, HORIZONTAL: 'HORIZONTAL' as OrientationEnum, - VERTICAL: 'VERTICAL' as OrientationEnum + VERTICAL: 'VERTICAL' as OrientationEnum, }; } diff --git a/libs/red-ui-http/src/lib/variables.ts b/libs/red-ui-http/src/lib/variables.ts index 0763faba7..00ed1fcf2 100644 --- a/libs/red-ui-http/src/lib/variables.ts +++ b/libs/red-ui-http/src/lib/variables.ts @@ -5,5 +5,5 @@ export const COLLECTION_FORMATS = { csv: ',', tsv: ' ', ssv: ' ', - pipes: '|' + pipes: '|', }; diff --git a/package.json b/package.json index ab59ceeca..534cf1212 100644 --- a/package.json +++ b/package.json @@ -89,6 +89,7 @@ "cypress-localstorage-commands": "^1.5.0", "dotenv": "10.0.0", "eslint": "7.32.0", + "eslint-config-airbnb-base": "^14.2.1", "eslint-config-airbnb-typescript": "^14.0.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-import": "2.24.2", diff --git a/yarn.lock b/yarn.lock index 5da4a7a25..42868a507 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5637,7 +5637,7 @@ config-chain@^1.1.11: ini "^1.3.4" proto-list "~1.2.1" -confusing-browser-globals@^1.0.9: +confusing-browser-globals@^1.0.10, confusing-browser-globals@^1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== @@ -6990,6 +6990,32 @@ es-abstract@^1.18.2: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" +es-abstract@^1.19.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" + integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.1" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.1" + is-string "^1.0.7" + is-weakref "^1.0.1" + object-inspect "^1.11.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + es-module-lexer@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.7.1.tgz#c2c8e0f46f2df06274cdaf0dd3f3b33e0a0b267d" @@ -7056,6 +7082,15 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" +eslint-config-airbnb-base@^14.2.1: + version "14.2.1" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" + integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== + dependencies: + confusing-browser-globals "^1.0.10" + object.assign "^4.1.2" + object.entries "^1.1.2" + eslint-config-airbnb-typescript@^14.0.0: version "14.0.0" resolved "https://registry.yarnpkg.com/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-14.0.0.tgz#fc22246973b99f0820e2ad1ab929fdd011dfa039" @@ -7989,7 +8024,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== @@ -8042,6 +8077,14 @@ get-stream@^6.0.0: 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" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -8300,6 +8343,13 @@ has-to-string-tag-x@^1.2.0: dependencies: has-symbol-support-x "^1.4.1" +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -8747,6 +8797,15 @@ internal-ip@^4.3.0: default-gateway "^4.2.0" ipaddr.js "^1.9.0" +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + internmap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/internmap/-/internmap-1.0.0.tgz#3c6bf0944b0eae457698000412108752bbfddb56" @@ -8849,6 +8908,11 @@ is-callable@^1.2.3: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== +is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -9125,6 +9189,14 @@ is-regex@^1.1.3: call-bind "^1.0.2" has-symbols "^1.0.2" +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-resolvable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" @@ -9135,6 +9207,11 @@ is-retry-allowed@^1.0.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== +is-shared-array-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" + integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== + is-stream@^1.0.0, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -9155,6 +9232,13 @@ is-string@^1.0.6: resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== +is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" @@ -9172,6 +9256,13 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +is-weakref@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.1.tgz#842dba4ec17fa9ac9850df2d6efbc1737274f2a2" + integrity sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ== + dependencies: + call-bind "^1.0.0" + is-what@^3.12.0: version "3.14.1" resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1" @@ -11290,6 +11381,11 @@ object-inspect@^1.10.3: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== +object-inspect@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" + integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== + object-inspect@^1.7.0, object-inspect@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" @@ -11340,6 +11436,15 @@ object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" +object.entries@^1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" + integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -13568,6 +13673,15 @@ shell-quote@^1.6.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"