diff --git a/apps/red-ui/src/app/app.module.ts b/apps/red-ui/src/app/app.module.ts index b61e28269..f33f58a51 100644 --- a/apps/red-ui/src/app/app.module.ts +++ b/apps/red-ui/src/app/app.module.ts @@ -7,7 +7,7 @@ import { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from '@angular/common import { BaseScreenComponent } from '@components/base-screen/base-screen.component'; import { ApiModule, GeneralSettingsControllerService } from '@redaction/red-ui-http'; import { ApiPathInterceptor } from '@utils/api-path-interceptor'; -import { MissingTranslationHandler, TranslateLoader, TranslateModule } from '@ngx-translate/core'; +import { MissingTranslationHandler, TranslateCompiler, TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { TranslateHttpLoader } from '@ngx-translate/http-loader'; import { languageInitializer } from '@i18n/language.initializer'; import { LanguageService } from '@i18n/language.service'; @@ -30,6 +30,7 @@ import { BASE_HREF } from './tokens'; import { MONACO_PATH, MonacoEditorModule } from '@materia-ui/ngx-monaco-editor'; import { GlobalErrorHandler } from '@utils/global-error-handler.service'; import { REDMissingTranslationHandler } from '@utils/missing-translations-handler'; +import { TranslateMessageFormatCompiler } from 'ngx-translate-messageformat-compiler'; import { configurationInitializer } from '@app-config/configuration.initializer'; import { AppConfigService } from '@app-config/app-config.service'; import { SpotlightSearchComponent } from '@components/spotlight-search/spotlight-search.component'; @@ -82,6 +83,10 @@ const components = [ provide: TranslateLoader, useFactory: httpLoaderFactory, deps: [HttpClient] + }, + compiler: { + provide: TranslateCompiler, + useClass: TranslateMessageFormatCompiler } }), ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }) diff --git a/apps/red-ui/src/app/components/auth-error/auth-error.component.html b/apps/red-ui/src/app/components/auth-error/auth-error.component.html index 04fa26b44..a2597f3bc 100644 --- a/apps/red-ui/src/app/components/auth-error/auth-error.component.html +++ b/apps/red-ui/src/app/components/auth-error/auth-error.component.html @@ -1,15 +1,8 @@
-

+

{{ titleService.getTitle() }}

+ diff --git a/apps/red-ui/src/app/components/base-screen/base-screen.component.scss b/apps/red-ui/src/app/components/base-screen/base-screen.component.scss index 85a33b817..12959da2c 100644 --- a/apps/red-ui/src/app/components/base-screen/base-screen.component.scss +++ b/apps/red-ui/src/app/components/base-screen/base-screen.component.scss @@ -25,3 +25,12 @@ display: flex; flex: 2; } + +.buttons { + display: flex; + margin-right: 8px; + + > *:not(:last-child) { + margin-right: 2px; + } +} 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 1c25f91f1..070deabe8 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 @@ -11,6 +11,7 @@ import { MatDialog } from '@angular/material/dialog'; import { SpotlightSearchComponent } from '@components/spotlight-search/spotlight-search.component'; import { SpotlightSearchAction } from '@components/spotlight-search/spotlight-search-action'; import { SpotlightSearchDialogData } from '@components/spotlight-search/spotlight-search-dialog-data'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; interface MenuItem { name: string; @@ -26,23 +27,23 @@ interface MenuItem { export class BaseScreenComponent { readonly userMenuItems: MenuItem[] = [ { - name: 'top-bar.navigation-items.my-account.children.my-profile', + name: _('top-bar.navigation-items.my-account.children.my-profile'), routerLink: '/main/my-profile', show: true }, { - name: 'top-bar.navigation-items.my-account.children.admin', + name: _('top-bar.navigation-items.my-account.children.admin'), routerLink: '/main/admin', show: this.permissionsService.isManager() || this.permissionsService.isUserAdmin(), action: this.appStateService.reset }, { - name: 'top-bar.navigation-items.my-account.children.downloads', + name: _('top-bar.navigation-items.my-account.children.downloads'), routerLink: '/main/downloads', show: this.permissionsService.isUser() }, { - name: 'top-bar.navigation-items.my-account.children.trash', + name: _('top-bar.navigation-items.my-account.children.trash'), routerLink: '/main/admin/trash', show: this.permissionsService.isManager() || this.permissionsService.isUserAdmin() } diff --git a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html index 34990b3c9..4e159a38e 100644 --- a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html +++ b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html @@ -2,9 +2,9 @@
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 f707f6332..692d3961e 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 @@ -3,6 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { AppStateService } from '@state/app-state.service'; import { FileAttributeConfig } from '@redaction/red-ui-http'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { fileAttributeTypesTranslations } from '../../translations/file-attribute-types-translations'; @Component({ selector: 'redaction-add-edit-file-attribute-dialog', @@ -13,11 +14,8 @@ export class AddEditFileAttributeDialogComponent { fileAttributeForm: FormGroup; fileAttribute: FileAttributeConfig; dossierTemplateId: string; - readonly typeOptions = [ - FileAttributeConfig.TypeEnum.TEXT, - FileAttributeConfig.TypeEnum.NUMBER, - FileAttributeConfig.TypeEnum.DATE - ]; + readonly typeOptions = [FileAttributeConfig.TypeEnum.TEXT, FileAttributeConfig.TypeEnum.NUMBER, FileAttributeConfig.TypeEnum.DATE]; + translations = fileAttributeTypesTranslations; constructor( private readonly _appStateService: AppStateService, @@ -32,10 +30,7 @@ export class AddEditFileAttributeDialogComponent { this.fileAttributeForm = this._formBuilder.group({ label: [this.fileAttribute?.label, Validators.required], csvColumnHeader: [this.fileAttribute?.csvColumnHeader, Validators.required], - type: [ - this.fileAttribute?.type || FileAttributeConfig.TypeEnum.TEXT, - Validators.required - ], + type: [this.fileAttribute?.type || FileAttributeConfig.TypeEnum.TEXT, Validators.required], readonly: [this.fileAttribute ? !this.fileAttribute.editable : false], primaryAttribute: [this.fileAttribute?.primaryAttribute] }); diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.html index 17b725f7a..6cf1ed70c 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.html @@ -13,9 +13,5 @@ [user]="user" > - + 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 6d91c4d8f..e79719568 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 @@ -10,10 +10,7 @@ import { User } from '@redaction/red-ui-http'; export class AddEditUserDialogComponent { resettingPassword = false; - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public user: User - ) {} + constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public user: User) {} toggleResetPassword() { this.resettingPassword = !this.resettingPassword; diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html index fee0ff69f..18392a3fd 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html @@ -1,8 +1,4 @@ -
+
@@ -17,10 +13,6 @@ {{ 'reset-password-dialog.actions.save' | translate }} -
+
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.html index 3e8f0a829..a770d5ae2 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.html @@ -1,6 +1,10 @@ -
- {{ (user ? 'add-edit-user.title.edit' : 'add-edit-user.title.new') | translate }} -
+
@@ -23,7 +27,7 @@
- {{ 'roles.' + role | translate }} + {{ translations[role] | translate }}
@@ -37,30 +41,18 @@
- -
+
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 1cc9e3dd6..3fe562f79 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 @@ -3,6 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { User, UserControllerService } from '@redaction/red-ui-http'; import { AdminDialogService } from '../../../services/admin-dialog.service'; import { LoadingService } from '@services/loading.service'; +import { rolesTranslations } from '../../../../../translations/roles-translations'; @Component({ selector: 'redaction-user-details', @@ -15,6 +16,7 @@ export class UserDetailsComponent implements OnInit { @Output() closeDialog = new EventEmitter(); userForm: FormGroup; readonly ROLES = ['RED_USER', 'RED_MANAGER', 'RED_USER_ADMIN', 'RED_ADMIN']; + translations = rolesTranslations; private readonly _ROLE_REQUIREMENTS = { RED_MANAGER: 'RED_USER', RED_ADMIN: 'RED_USER_ADMIN' }; constructor( diff --git a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.html index 49371a4c8..91c3cc26b 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.html @@ -1,8 +1,12 @@
{{ - 'confirm-delete-file-attribute.title.' + type - | translate: { name: fileAttribute?.label } + 'confirm-delete-file-attribute.title' + | translate + : { + type: type, + name: fileAttribute?.label + } }}
@@ -22,23 +26,20 @@ [class.error]="!checkbox.value && showToast" color="primary" > - {{ 'confirm-delete-file-attribute.' + checkbox.label | translate }} + {{ checkbox.label | translate: { type: type } }}
- +
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 19bf85133..bad6ea1d0 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 @@ -1,6 +1,7 @@ import { Component, Inject } from '@angular/core'; import { FileAttributeConfig } from '@redaction/red-ui-http'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-confirm-delete-file-attribute-dialog', @@ -10,8 +11,8 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; export class ConfirmDeleteFileAttributeDialogComponent { fileAttribute: FileAttributeConfig; checkboxes = [ - { value: false, label: 'impacted-documents.' + this.type }, - { value: false, label: 'lost-details' } + { value: false, label: _('confirm-delete-file-attribute.impacted-documents') }, + { value: false, label: _('confirm-delete-file-attribute.lost-details') } ]; showToast = false; @@ -27,7 +28,7 @@ export class ConfirmDeleteFileAttributeDialogComponent { } get type(): 'bulk' | 'single' { - return !this.fileAttribute ? 'bulk' : 'single'; + return this.fileAttribute ? 'single' : 'bulk'; } deleteFileAttribute() { diff --git a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.html index c2e0d3bd0..47014fd58 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.html @@ -1,5 +1,5 @@
-
+
@@ -18,25 +18,26 @@ color="primary" > {{ - 'confirm-delete-users.' + checkbox.label - | translate: { dossiersCount: dossiersCount } + checkbox.label + | translate + : { + dossiersCount: dossiersCount, + usersCount: users.length + } }}
- +
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 947a2626a..f6ed8044d 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 @@ -3,6 +3,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { User, UserControllerService } from '@redaction/red-ui-http'; import { AppStateService } from '@state/app-state.service'; import { LoadingService } from '@services/loading.service'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-confirm-delete-users-dialog', @@ -11,8 +12,8 @@ import { LoadingService } from '@services/loading.service'; }) export class ConfirmDeleteUsersDialogComponent { checkboxes = [ - { value: false, label: 'impacted-dossiers' }, - { value: false, label: 'impacted-documents.' + this.type } + { value: false, label: _('confirm-delete-users.impacted-dossiers') }, + { value: false, label: _('confirm-delete-users.impacted-documents') } ]; showToast = false; dossiersCount: number; @@ -38,10 +39,6 @@ export class ConfirmDeleteUsersDialogComponent { return this.checkboxes[0].value && this.checkboxes[1].value; } - get type(): 'bulk' | 'single' { - return this.users.length > 1 ? 'bulk' : 'single'; - } - async deleteUser() { if (this.valid) { this._loadingService.start(); diff --git a/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html index 7087e823e..bcfc453fd 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html @@ -1,18 +1,15 @@
-
+
@@ -34,20 +28,11 @@
-
- +
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 7eacbff89..c67a8dd1c 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 @@ -1,9 +1,12 @@ import { Component, Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { Colors, DictionaryControllerService } from '@redaction/red-ui-http'; -import { Toaster } from '../../../../services/toaster.service'; +import { Toaster } from '@services/toaster.service'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; +import { DefaultColorType } from '@models/default-color-key.model'; +import { defaultColorsTranslations } from '../../translations/default-colors-translations'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-edit-color-dialog', @@ -12,8 +15,9 @@ import { TranslateService } from '@ngx-translate/core'; }) export class EditColorDialogComponent { readonly colors: Colors; - readonly colorKey: string; + readonly colorKey: DefaultColorType; colorForm: FormGroup; + translations = defaultColorsTranslations; private readonly _initialColor: string; private readonly _dossierTemplateId: string; @@ -24,7 +28,7 @@ export class EditColorDialogComponent { private readonly _translateService: TranslateService, private readonly _dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) - private readonly _data: { colors: Colors; colorKey: string; dossierTemplateId: string } + private readonly _data: { colors: Colors; colorKey: DefaultColorType; dossierTemplateId: string } ) { this.colors = _data.colors; this.colorKey = _data.colorKey; @@ -49,10 +53,10 @@ export class EditColorDialogComponent { try { await this._dictionaryControllerService.setColors(colors, this._dossierTemplateId).toPromise(); this._dialogRef.close(true); - const color = this._translateService.instant(`default-colors-screen.types.${this.colorKey}`); - this._toaster.info('edit-color-dialog.success', { params: { color: color } }); + const color = this._translateService.instant(defaultColorsTranslations[this.colorKey]); + this._toaster.info(_('edit-color-dialog.success'), { params: { color: color } }); } catch (e) { - this._toaster.error('edit-color-dialog.error'); + this._toaster.error(_('edit-color-dialog.error')); } } } diff --git a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.html b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.html index c98448df1..089ebd3e7 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.html @@ -13,23 +13,23 @@
@@ -47,7 +47,7 @@
@@ -56,21 +56,24 @@
- + - +
@@ -79,8 +82,8 @@ @@ -106,22 +109,22 @@ @@ -131,7 +134,7 @@ - {{ 'file-attribute-types.' + type | translate }} + {{ translations[type] | translate }} @@ -148,8 +151,8 @@
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 93ebbe06f..2e7c9cd95 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 @@ -6,6 +6,7 @@ import { SearchService } from '@shared/services/search.service'; import { ScreenStateService } from '@shared/services/screen-state.service'; import { SortingService } from '@services/sorting.service'; import { BaseListingComponent } from '@shared/base/base-listing.component'; +import { fileAttributeTypesTranslations } from '../../../translations/file-attribute-types-translations'; @Component({ selector: 'redaction-active-fields-listing', @@ -18,6 +19,7 @@ export class ActiveFieldsListingComponent extends BaseListingComponent im @Output() entitiesChange = new EventEmitter(); @Output() setHoveredColumn = new EventEmitter(); @Output() toggleFieldActive = new EventEmitter(); + translations = fileAttributeTypesTranslations; readonly typeOptions = [FileAttributeConfig.TypeEnum.TEXT, FileAttributeConfig.TypeEnum.NUMBER, FileAttributeConfig.TypeEnum.DATE]; protected readonly _primaryKey = 'csvColumn'; diff --git a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/file-attributes-csv-import-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/file-attributes-csv-import-dialog.component.html index 1b50e47f0..1e140d174 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/file-attributes-csv-import-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/file-attributes-csv-import-dialog.component.html @@ -51,8 +51,8 @@ @@ -91,7 +91,7 @@
@@ -126,9 +126,7 @@ class="center" >
-
- {{ 'file-attributes-csv-import.csv-column' + (previewExpanded ? '' : '-preview') | translate }} -
+
@@ -23,17 +23,9 @@ -
+
- + diff --git a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html index 34b6c552b..5a7783652 100644 --- a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html @@ -10,10 +10,10 @@
@@ -35,7 +35,7 @@ - {{ 'audit-screen.categories.' + category | translate }} + {{ translations[category] | translate }} @@ -87,18 +87,31 @@
- - + + - +
- +
@@ -111,7 +124,7 @@
-
+
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 645c50334..7e1e3bdaa 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 @@ -4,8 +4,10 @@ import { FormBuilder, FormGroup } from '@angular/forms'; import { AuditControllerService, AuditResponse, AuditSearchRequest } from '@redaction/red-ui-http'; import { Moment } from 'moment'; import { applyIntervalConstraints } from '@utils/date-inputs-utils'; -import { LoadingService } from '../../../../services/loading.service'; -import { AutoUnsubscribeComponent } from '../../../shared/base/auto-unsubscribe.component'; +import { LoadingService } from '@services/loading.service'; +import { AutoUnsubscribeComponent } from '@shared/base/auto-unsubscribe.component'; +import { auditCategoriesTranslations } from '../../translations/audit-categories-translations'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; const PAGE_SIZE = 50; @@ -15,8 +17,9 @@ const PAGE_SIZE = 50; styleUrls: ['./audit-screen.component.scss'] }) export class AuditScreenComponent extends AutoUnsubscribeComponent implements OnDestroy { - readonly ALL_CATEGORIES = 'all-categories'; - readonly ALL_USERS = 'audit-screen.all-users'; + readonly ALL_CATEGORIES = 'allCategories'; + readonly ALL_USERS = _('audit-screen.all-users'); + translations = auditCategoriesTranslations; filterForm: FormGroup; categories: string[] = []; diff --git a/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.html index 0aa435152..42baf8f09 100644 --- a/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.html @@ -7,8 +7,8 @@ @@ -17,7 +17,7 @@
- +
@@ -28,14 +28,14 @@
@@ -46,7 +46,7 @@
-
+
@@ -58,8 +58,8 @@
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 fcaad3be4..5dae2be05 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,9 @@ import { FilterService } from '@shared/services/filter.service'; import { SearchService } from '@shared/services/search.service'; import { ScreenStateService } from '@shared/services/screen-state.service'; import { BaseListingComponent } from '@shared/base/base-listing.component'; -import { SortingService } from '../../../../services/sorting.service'; +import { DefaultColorType } from '@models/default-color-key.model'; +import { SortingService } from '@services/sorting.service'; +import { defaultColorsTranslations } from '../../translations/default-colors-translations'; @Component({ templateUrl: './default-colors-screen.component.html', @@ -24,8 +26,9 @@ export class DefaultColorsScreenComponent }> implements OnInit { - private _colorsObj: Colors; + translations = defaultColorsTranslations; protected readonly _primaryKey = 'key'; + private _colorsObj: Colors; constructor( private readonly _appStateService: AppStateService, @@ -44,7 +47,7 @@ export class DefaultColorsScreenComponent await this._loadColors(); } - openEditColorDialog($event: any, color: { key: string; value: string }) { + openEditColorDialog($event: any, color: { key: DefaultColorType | string; value: string }) { this._dialogService.openDialog( 'editColor', $event, diff --git a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html index 86d344cda..b6cac2fd1 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html @@ -7,8 +7,8 @@
@@ -17,7 +17,7 @@
- +
@@ -36,23 +36,23 @@
@@ -63,21 +63,21 @@
@@ -86,12 +86,16 @@ - +
@@ -159,7 +163,7 @@ [counterText]="'dictionary-listing.stats.charts.entries' | translate" [radius]="82" [strokeWidth]="15" - [subtitle]="'dictionary-listing.stats.charts.types'" + [subtitle]="'dictionary-listing.stats.charts.types' | translate" totalType="count" >
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 fd1fdd8db..d0cb34314 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 { LoadingService } from '@services/loading.service'; import { FilterService } from '@shared/services/filter.service'; import { SearchService } from '@shared/services/search.service'; import { ScreenStateService } from '@shared/services/screen-state.service'; -import { SortingService } from '../../../../services/sorting.service'; +import { SortingService } from '@services/sorting.service'; import { BaseListingComponent } from '@shared/base/base-listing.component'; import { AdminDialogService } from '../../services/admin-dialog.service'; diff --git a/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.html index 761e5a76f..d5b568d83 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.html @@ -6,8 +6,8 @@ @@ -15,24 +15,24 @@ @@ -40,9 +40,9 @@
@@ -51,7 +51,7 @@
- +
@@ -75,16 +76,16 @@ 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 0a2777a7a..a6a0955e6 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 @@ -1,11 +1,12 @@ import { Component, OnDestroy } from '@angular/core'; import { DigitalSignature, DigitalSignatureControllerService } from '@redaction/red-ui-http'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { Toaster } from '../../../../services/toaster.service'; +import { Toaster } from '@services/toaster.service'; import { PermissionsService } from '@services/permissions.service'; import { lastIndexOfEnd } from '@utils/functions'; -import { AutoUnsubscribeComponent } from '../../../shared/base/auto-unsubscribe.component'; -import { LoadingService } from '../../../../services/loading.service'; +import { AutoUnsubscribeComponent } from '@shared/base/auto-unsubscribe.component'; +import { LoadingService } from '@services/loading.service'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-digital-signature-screen', @@ -47,13 +48,13 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribeComponent im this.addSubscription = observable.subscribe( () => { this.loadDigitalSignatureAndInitializeForm(); - this._toaster.success('digital-signature-screen.action.save-success'); + this._toaster.success(_('digital-signature-screen.action.save-success')); }, error => { if (error.status === 400) { - this._toaster.error('digital-signature-screen.action.certificate-not-valid-error'); + this._toaster.error(_('digital-signature-screen.action.certificate-not-valid-error')); } else { - this._toaster.error('digital-signature-screen.action.save-error'); + this._toaster.error(_('digital-signature-screen.action.save-error')); } } ); @@ -63,9 +64,9 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribeComponent im this.addSubscription = this._digitalSignatureControllerService.deleteDigitalSignature().subscribe( () => { this.loadDigitalSignatureAndInitializeForm(); - this._toaster.success('digital-signature-screen.action.delete-success'); + 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')) ); } diff --git a/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.html index c81b649de..fd8b8381d 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.html @@ -7,8 +7,8 @@
@@ -17,7 +17,7 @@
- +
@@ -39,23 +39,23 @@
@@ -65,16 +65,21 @@
- + + + +
@@ -82,12 +87,16 @@ - +
- {{ 'dossier-attribute-types.' + attribute.type | translate }} + {{ translations[attribute.type] | translate }}
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 fd9d9f10f..3feeccebc 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,12 +5,13 @@ import { AppStateService } from '@state/app-state.service'; import { ActivatedRoute } from '@angular/router'; import { AdminDialogService } from '../../services/admin-dialog.service'; import { LoadingService } from '@services/loading.service'; -import { SortingService } from '../../../../services/sorting.service'; +import { SortingService } from '@services/sorting.service'; import { FilterService } from '@shared/services/filter.service'; import { SearchService } from '@shared/services/search.service'; import { ScreenStateService } from '@shared/services/screen-state.service'; import { PermissionsService } from '@services/permissions.service'; import { DossierAttributesService } from '@shared/services/controller-wrappers/dossier-attributes.service'; +import { dossierAttributeTypesTranslations } from '../../translations/dossier-attribute-types-translations'; @Component({ templateUrl: './dossier-attributes-listing-screen.component.html', @@ -18,6 +19,7 @@ import { DossierAttributesService } from '@shared/services/controller-wrappers/d providers: [FilterService, SearchService, ScreenStateService, SortingService] }) export class DossierAttributesListingScreenComponent extends BaseListingComponent implements OnInit { + translations = dossierAttributeTypesTranslations; protected readonly _primaryKey = 'label'; constructor( diff --git a/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.html index 7a4d7b13a..f5394e270 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.html @@ -30,23 +30,23 @@
@@ -56,23 +56,23 @@
@@ -80,11 +80,14 @@ - +
@@ -17,7 +17,7 @@
- +
@@ -38,15 +38,15 @@
@@ -54,8 +54,8 @@ @@ -63,8 +63,8 @@
@@ -74,31 +74,33 @@
- +
@@ -108,11 +110,14 @@ - + @@ -125,7 +130,7 @@ {{ attribute.label }}
-
+
diff --git a/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.ts index c17f588f1..32d0425ae 100644 --- a/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.ts @@ -8,8 +8,9 @@ import { LoadingService } from '@services/loading.service'; import { FilterService } from '@shared/services/filter.service'; import { SearchService } from '@shared/services/search.service'; import { ScreenStateService } from '@shared/services/screen-state.service'; -import { SortingService } from '../../../../services/sorting.service'; +import { SortingService } from '@services/sorting.service'; import { BaseListingComponent } from '@shared/base/base-listing.component'; +import { fileAttributeTypesTranslations } from '../../translations/file-attribute-types-translations'; @Component({ templateUrl: './file-attributes-listing-screen.component.html', @@ -18,8 +19,8 @@ import { BaseListingComponent } from '@shared/base/base-listing.component'; providers: [FilterService, SearchService, ScreenStateService, SortingService] }) export class FileAttributesListingScreenComponent extends BaseListingComponent implements OnInit, OnDestroy { + translations = fileAttributeTypesTranslations; protected readonly _primaryKey = 'label'; - private _existingConfiguration: FileAttributesConfig; @ViewChild('fileInput') private _fileInput: ElementRef; diff --git a/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.html index 6e8724884..05dae7061 100644 --- a/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.html @@ -167,7 +167,7 @@
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 f56f11a31..7b616319c 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 @@ -12,6 +12,7 @@ import { AppConfigService } from '../../../app-config/app-config.service'; import { AutoUnsubscribeComponent } from '../../../shared/base/auto-unsubscribe.component'; import { Toaster } from '../../../../services/toaster.service'; import { LoadingService } from '../../../../services/loading.service'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-general-config-screen', @@ -57,7 +58,7 @@ export class GeneralConfigScreenComponent extends AutoUnsubscribeComponent imple password: [undefined] }); - this.addSubscription = this.configForm.controls.auth.valueChanges.subscribe(auth => { + this.addSubscription = this.smtpForm.controls.auth.valueChanges.subscribe(auth => { if (auth) { this.openAuthConfigDialog(); } @@ -124,9 +125,9 @@ export class GeneralConfigScreenComponent extends AutoUnsubscribeComponent imple this._loadingService.start(); try { await this._smtpConfigService.testSMTPConfiguration(this.smtpForm.getRawValue()).toPromise(); - this._toaster.success('smtp-config-screen.test.success'); + this._toaster.success(_('general-config-screen.test.success')); } catch (e) { - this._toaster.error('smtp-config-screen.test.error'); + this._toaster.error(_('general-config-screen.test.error')); } finally { this._loadingService.stop(); } diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html index 654cc2576..187ba165a 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html @@ -5,9 +5,9 @@
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 398f76664..112675cae 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 @@ -4,9 +4,10 @@ import { LicenseReport, LicenseReportControllerService } from '@redaction/red-ui import { AppConfigService } from '@app-config/app-config.service'; import * as moment from 'moment'; import { TranslateService } from '@ngx-translate/core'; -import { LoadingService } from '../../../../services/loading.service'; -import { ButtonConfig } from '../../../shared/components/page-header/models/button-config.model'; -import { IconButtonTypes } from '../../../shared/components/buttons/icon-button/icon-button.component'; +import { LoadingService } from '@services/loading.service'; +import { ButtonConfig } from '@shared/components/page-header/models/button-config.model'; +import { IconButtonTypes } from '@shared/components/buttons/icon-button/icon-button.component'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-license-information-screen', @@ -35,7 +36,7 @@ export class LicenseInformationScreenComponent implements OnInit { }; buttonConfigs: ButtonConfig[] = [ { - label: this._translateService.instant('license-info-screen.email-report'), + label: _('license-info-screen.email-report'), action: () => this.sendMail(), type: IconButtonTypes.PRIMARY } @@ -93,6 +94,7 @@ export class LicenseInformationScreenComponent implements OnInit { const subject = this._translateService.instant('license-info-screen.email.title', { licenseCustomer }); + const lineBreak = '%0D%0A'; const body = [ this._translateService.instant('license-info-screen.email.body.analyzed', { pages: this.currentInfo.numberOfAnalyzedPages @@ -100,7 +102,7 @@ export class LicenseInformationScreenComponent implements OnInit { this._translateService.instant('license-info-screen.email.body.licensed', { pages: this.totalLicensedNumberOfPages }) - ].join('%0D%0A'); + ].join(lineBreak); window.location.href = `mailto:${this.appConfigService.getConfig('LICENSE_EMAIL')}?subject=${subject}&body=${body}`; } diff --git a/apps/red-ui/src/app/modules/admin/screens/reports/reports-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/reports/reports-screen.component.html index ab6ea2b2f..c80a5168a 100644 --- a/apps/red-ui/src/app/modules/admin/screens/reports/reports-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/reports/reports-screen.component.html @@ -7,8 +7,8 @@
@@ -17,7 +17,7 @@
- +
@@ -47,8 +47,8 @@
diff --git a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.html index 9c295de22..6952262fc 100644 --- a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.html @@ -7,8 +7,8 @@
@@ -17,7 +17,7 @@
- +
@@ -25,8 +25,8 @@
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 f51ad33c5..65ef95081 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 @@ -1,13 +1,14 @@ import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; import { PermissionsService } from '@services/permissions.service'; import { RulesControllerService } from '@redaction/red-ui-http'; -import { Toaster } from '../../../../services/toaster.service'; +import { Toaster } from '@services/toaster.service'; import { TranslateService } from '@ngx-translate/core'; import { saveAs } from 'file-saver'; import { ComponentHasChanges } from '@guards/can-deactivate.guard'; import { ActivatedRoute } from '@angular/router'; import { AppStateService } from '@state/app-state.service'; import { debounce } from '../../../../utils/debounce'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { LoadingService } from '../../../../services/loading.service'; import ICodeEditor = monaco.editor.ICodeEditor; import IModelDeltaDecoration = monaco.editor.IModelDeltaDecoration; @@ -48,10 +49,6 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit _appStateService.activateDossierTemplate(_activatedRoute.snapshot.params.dossierTemplateId); } - async ngOnInit() { - await this._initialize(); - } - get hasChanges(): boolean { return this.currentLines.toString() !== this.initialLines.toString(); } @@ -65,6 +62,10 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit this.codeEditorTextChanged(); } + async ngOnInit() { + await this._initialize(); + } + onCodeEditorInit(editor: ICodeEditor) { this._codeEditor = editor; (window as any).monaco.editor.defineTheme('redaction', { @@ -96,11 +97,11 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit .then( async () => { await this._initialize(); - this._toaster.success('rules-screen.success.generic'); + this._toaster.success(_('rules-screen.success.generic')); }, () => { this._loadingService.stop(); - this._toaster.error('rules-screen.error.generic'); + this._toaster.error(_('rules-screen.error.generic')); } ); } diff --git a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html index 9eeff7dcb..e82bc8d48 100644 --- a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html @@ -60,9 +60,13 @@
- + - +
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 8c362ec5d..562efdc83 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 @@ -8,7 +8,7 @@ import * as moment from 'moment'; import { FilterService } from '@shared/services/filter.service'; import { SearchService } from '@shared/services/search.service'; import { ScreenStateService } from '@shared/services/screen-state.service'; -import { SortingService } from '../../../../services/sorting.service'; +import { SortingService } from '@services/sorting.service'; import { BaseListingComponent } from '@shared/base/base-listing.component'; import { DossiersService } from '../../../dossier/services/dossiers.service'; @@ -20,8 +20,8 @@ import { DossiersService } from '../../../dossier/services/dossiers.service'; }) export class TrashScreenComponent extends BaseListingComponent implements OnInit { readonly itemSize = 85; - private readonly _deleteRetentionHours = this._appConfigService.getConfig(AppConfigKey.DELETE_RETENTION_HOURS); protected readonly _primaryKey = 'dossierName'; + private readonly _deleteRetentionHours = this._appConfigService.getConfig(AppConfigKey.DELETE_RETENTION_HOURS); constructor( private readonly _appStateService: AppStateService, diff --git a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html index e122bb1b0..66eefc267 100644 --- a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html @@ -10,22 +10,22 @@
@@ -50,7 +50,11 @@ (action)="bulkDelete()" *ngIf="screenStateService.areSomeEntitiesSelected$ | async" [disabled]="(canDeleteSelected$ | async) === false" - [tooltip]="(canDeleteSelected$ | async) ? 'user-listing.bulk.delete' : 'user-listing.bulk.delete-disabled'" + [tooltip]=" + (canDeleteSelected$ | async) + ? ('user-listing.bulk.delete' | translate) + : ('user-listing.bulk.delete-disabled' | translate) + " icon="red:trash" tooltipPosition="after" type="dark-bg" @@ -60,19 +64,22 @@
- + - + - + - +
- + @@ -101,15 +108,15 @@
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 4a6fdd703..cb88b3ddd 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 @@ -15,6 +15,7 @@ import { SortingService } from '@services/sorting.service'; import { BaseListingComponent } from '@shared/base/base-listing.component'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; +import { rolesTranslations } from '../../../../translations/roles-translations'; @Component({ templateUrl: './user-listing-screen.component.html', @@ -22,11 +23,11 @@ import { map } from 'rxjs/operators'; providers: [FilterService, SearchService, ScreenStateService, SortingService] }) export class UserListingScreenComponent extends BaseListingComponent implements OnInit { - protected readonly _primaryKey = 'userId'; readonly canDeleteSelected$ = this._canDeleteSelected$; - collapsedDetails = false; chartData: DoughnutChartConfig[] = []; + translations = rolesTranslations; + protected readonly _primaryKey = 'userId'; @ViewChildren(InitialsAvatarComponent) private readonly _avatars: QueryList; @@ -65,9 +66,10 @@ export class UserListingScreenComponent extends BaseListingComponent imple } getDisplayRoles(user: User) { + const separator = ', '; return ( - user.roles.map(role => this._translateService.instant('roles.' + role)).join(', ') || - this._translateService.instant('roles.NO_ROLE') + user.roles.map(role => this._translateService.instant(this.translations[role])).join(separator) || + this._translateService.instant(this.translations['NO_ROLE']) ); } diff --git a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.html index eddd49d16..d9ef81f1f 100644 --- a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.html @@ -7,8 +7,8 @@
@@ -17,7 +17,7 @@
- +
@@ -25,8 +25,8 @@
@@ -77,10 +77,10 @@
{ this._loadWatermark(); - this._toaster.success(watermark.text ? 'watermark-screen.action.change-success' : 'watermark-screen.action.delete-success'); + this._toaster.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')) ); } 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 new file mode 100644 index 000000000..b3c5972b5 --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/translations/admin-side-nav-translations.ts @@ -0,0 +1,6 @@ +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; + +export const adminSideNavTranslations = { + settings: _('admin-side-nav.settings'), + 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 new file mode 100644 index 000000000..82a25e8a7 --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/translations/audit-categories-translations.ts @@ -0,0 +1,16 @@ +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; + +export const auditCategoriesTranslations: { [key: string]: string } = { + allCategories: _('audit-screen.categories.all-categories'), + LICENSE: _('audit-screen.categories.license'), + DOWNLOAD: _('audit-screen.categories.download'), + AUDIT_LOG: _('audit-screen.categories.audit-log'), + PROJECT: _('audit-screen.categories.project'), + DOSSIER: _('audit-screen.categories.dossier'), + DICTIONARY: _('audit-screen.categories.dictionary'), + PROJECT_TEMPLATE: _('audit-screen.categories.project-template'), + USER: _('audit-screen.categories.user'), + DOCUMENT: _('audit-screen.categories.document'), + AUDIT: _('audit-screen.categories.audit'), + 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 new file mode 100644 index 000000000..f14212fcb --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/translations/default-colors-translations.ts @@ -0,0 +1,14 @@ +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import { DefaultColorType } from '@models/default-color-key.model'; + +export const defaultColorsTranslations: { [key in DefaultColorType]: string } = { + analysisColor: _('default-colors-screen.types.analysisColor'), + defaultColor: _('default-colors-screen.types.defaultColor'), + dictionaryRequestColor: _('default-colors-screen.types.dictionaryRequestColor'), + manualRedactionColor: _('default-colors-screen.types.manualRedactionColor'), + notRedacted: _('default-colors-screen.types.notRedacted'), + previewColor: _('default-colors-screen.types.previewColor'), + requestAdd: _('default-colors-screen.types.requestAdd'), + requestRemove: _('default-colors-screen.types.requestRemove'), + 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 new file mode 100644 index 000000000..bb325e3c9 --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/translations/dossier-attribute-types-translations.ts @@ -0,0 +1,9 @@ +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import { DossierAttributeConfig } from '@redaction/red-ui-http'; + +export const dossierAttributeTypesTranslations: { [key in DossierAttributeConfig.TypeEnum]: string } = { + TEXT: _('dossier-attribute-types.text'), + NUMBER: _('dossier-attribute-types.number'), + DATE: _('dossier-attribute-types.date'), + 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 new file mode 100644 index 000000000..5262ab6c9 --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/translations/file-attribute-types-translations.ts @@ -0,0 +1,8 @@ +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import { FileAttributeConfig } from '@redaction/red-ui-http'; + +export const fileAttributeTypesTranslations: { [key in FileAttributeConfig.TypeEnum]: string } = { + TEXT: _('file-attribute-types.text'), + NUMBER: _('file-attribute-types.number'), + DATE: _('file-attribute-types.date') +}; diff --git a/apps/red-ui/src/app/modules/dossier/components/annotation-actions/annotation-actions.component.html b/apps/red-ui/src/app/modules/dossier/components/annotation-actions/annotation-actions.component.html index 87ec5e4cf..145bcc4bc 100644 --- a/apps/red-ui/src/app/modules/dossier/components/annotation-actions/annotation-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/annotation-actions/annotation-actions.component.html @@ -1,131 +1,118 @@ -
+
- + icon="red:edit" + > - + icon="red:check" + > - + icon="red:check" + > - + icon="red:undo" + > - + icon="red:trash" + > - + icon="red:thumb-down" + > - + icon="red:thumb-down" + > - + icon="red:thumb-up" + > - + icon="red:visibility-off" + > - + icon="red:visibility" + > - + > - + > - + >
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 790c99fbe..70425a94a 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 @@ -14,14 +14,10 @@ import { WebViewerInstance } from '@pdftron/webviewer'; export class AnnotationActionsComponent implements OnInit { @Input() btnType: 'dark-bg' | 'primary' = 'dark-bg'; @Input() tooltipPosition: 'before' | 'above' = 'before'; - - @Input() _annotations: AnnotationWrapper[]; @Input() canPerformAnnotationActions: boolean; @Input() viewer: WebViewerInstance; @Input() alwaysVisible: boolean; - @Output() annotationsChanged = new EventEmitter(); - annotationPermissions: AnnotationPermissions; constructor( @@ -30,6 +26,8 @@ export class AnnotationActionsComponent implements OnInit { private _permissionsService: PermissionsService ) {} + private _annotations: AnnotationWrapper[]; + get annotations(): AnnotationWrapper[] { return this._annotations; } diff --git a/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.html b/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.html index 13e04a4d8..28809a440 100644 --- a/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.html @@ -2,8 +2,8 @@ @@ -18,24 +18,24 @@ @@ -46,7 +46,7 @@ (action)="approveDocuments()" *ngIf="isReadyForApproval" [disabled]="!canApprove" - [tooltip]="canApprove ? 'dossier-overview.approve' : 'dossier-overview.approve-disabled'" + [tooltip]="canApprove ? ('dossier-overview.approve' | translate) : ('dossier-overview.approve-disabled' | translate)" icon="red:approved" type="dark-bg" > @@ -55,24 +55,24 @@ diff --git a/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.ts b/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.ts index 99837fade..6c69164d7 100644 --- a/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.ts @@ -6,9 +6,11 @@ import { FileStatusWrapper } from '@models/file/file-status.wrapper'; import { FileActionService } from '../../services/file-action.service'; import { from, Observable } from 'rxjs'; import { DossiersDialogService } from '../../services/dossiers-dialog.service'; -import { LoadingService } from '../../../../services/loading.service'; -import { ConfirmationDialogInput } from '../../../shared/dialogs/confirmation-dialog/confirmation-dialog.component'; -import { ScreenStateService } from '../../../shared/services/screen-state.service'; +import { LoadingService } from '@services/loading.service'; +import { ConfirmationDialogInput } from '@shared/dialogs/confirmation-dialog/confirmation-dialog.component'; +import { ScreenStateService } from '@shared/services/screen-state.service'; +import { TranslateService } from '@ngx-translate/core'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-dossier-overview-bulk-actions', @@ -27,6 +29,7 @@ export class DossierOverviewBulkActionsComponent { private readonly _permissionsService: PermissionsService, private readonly _fileActionService: FileActionService, private readonly _loadingService: LoadingService, + private readonly _translateService: TranslateService, private readonly _screenStateService: ScreenStateService ) {} @@ -117,7 +120,9 @@ export class DossierOverviewBulkActionsComponent { get assignTooltip() { const allFilesAreUnderApproval = this.selectedFiles.reduce((acc, file) => acc && file.isUnderApproval, true); - return allFilesAreUnderApproval ? 'dossier-overview.assign-approver' : 'dossier-overview.assign-reviewer'; + return allFilesAreUnderApproval + ? this._translateService.instant('dossier-overview.assign-approver') + : this._translateService.instant('dossier-overview.assign-reviewer'); } delete() { @@ -125,8 +130,8 @@ export class DossierOverviewBulkActionsComponent { 'confirm', null, new ConfirmationDialogInput({ - title: 'confirmation-dialog.delete-file.title', - question: 'confirmation-dialog.delete-file.question' + title: _('confirmation-dialog.delete-file.title'), + question: _('confirmation-dialog.delete-file.question') }), async () => { this._loadingService.start(); diff --git a/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.html b/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.html index 920e8765a..263104ef6 100644 --- a/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/comments/comments.component.html @@ -22,15 +22,11 @@ (action)="addComment()" *ngIf="permissionsService.canAddComment()" [form]="commentForm" + [placeholder]="'comments.add-comment' | translate" autocomplete="off" icon="red:collapse" - placeholder="comments.add-comment" type="action" width="full" > -
+
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 6a90664da..4957063d7 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 @@ -35,15 +35,13 @@ export class CommentsComponent { addComment(): void { const value = this.commentForm.value.value; if (value) { - this._manualAnnotationService - .addComment(value, this.annotation.id) - .subscribe(commentResponse => { - this.annotation.comments.push({ - text: value, - id: commentResponse.commentId, - user: this._userService.userId - }); + this._manualAnnotationService.addComment(value, this.annotation.id).subscribe(commentResponse => { + this.annotation.comments.push({ + text: value, + id: commentResponse.commentId, + user: this._userService.userId }); + }); this.commentForm.reset(); } } @@ -54,14 +52,12 @@ export class CommentsComponent { } deleteComment(comment: Comment): void { - this._manualAnnotationService - .deleteComment(comment.id, this.annotation.id) - .subscribe(() => { - this.annotation.comments.splice(this.annotation.comments.indexOf(comment), 1); - if (!this.annotation.comments.length) { - this._hidden = true; - } - }); + this._manualAnnotationService.deleteComment(comment.id, this.annotation.id).subscribe(() => { + this.annotation.comments.splice(this.annotation.comments.indexOf(comment), 1); + if (!this.annotation.comments.length) { + this._hidden = true; + } + }); } isCommentOwner(comment: Comment): boolean { diff --git a/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.html b/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.html index b45eaf546..bd02b1ad1 100644 --- a/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.html @@ -2,14 +2,14 @@
@@ -26,30 +26,20 @@
- {{ - 'file-preview.tabs.document-info.details.dossier' - | translate: { dossierName: dossier.name } - }} + {{ 'file-preview.tabs.document-info.details.dossier' | translate: { dossierName: dossier.name } }}
- {{ - 'file-preview.tabs.document-info.details.pages' - | translate: { pages: file.numberOfPages } - }} + {{ 'file-preview.tabs.document-info.details.pages' | translate: { pages: file.numberOfPages } }}
- {{ - 'file-preview.tabs.document-info.details.created-on' - | translate: { date: file.added | date: 'mediumDate' } - }} + {{ 'file-preview.tabs.document-info.details.created-on' | translate: { date: file.added | date: 'mediumDate' } }}
{{ - 'file-preview.tabs.document-info.details.due' - | translate: { date: dossier.dossier.dueDate | date: 'mediumDate' } + 'file-preview.tabs.document-info.details.due' | translate: { date: dossier.dossier.dueDate | date: 'mediumDate' } }}
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 754972a6e..72cd05668 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 @@ -14,10 +14,7 @@ export class DocumentInfoComponent { fileAttributesConfig: FileAttributesConfig; - constructor( - private readonly _appStateService: AppStateService, - private readonly _dialogService: DossiersDialogService - ) { + constructor(private readonly _appStateService: AppStateService, private readonly _dialogService: DossiersDialogService) { this.fileAttributesConfig = this._appStateService.activeFileAttributesConfig; } diff --git a/apps/red-ui/src/app/modules/dossier/components/dossier-details/dossier-details.component.html b/apps/red-ui/src/app/modules/dossier/components/dossier-details/dossier-details.component.html index dfca40153..dbd094540 100644 --- a/apps/red-ui/src/app/modules/dossier/components/dossier-details/dossier-details.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/dossier-details/dossier-details.component.html @@ -1,12 +1,14 @@
- +
{{ appStateService.activeDossier.dossier.dossierName }}
- +
@@ -18,9 +20,9 @@ @@ -41,7 +43,7 @@ [config]="documentsChartData" [radius]="63" [strokeWidth]="15" - [subtitle]="'dossier-overview.dossier-details.charts.documents-in-dossier'" + [subtitle]="'dossier-overview.dossier-details.charts.documents-in-dossier' | translate" direction="row" >
@@ -78,11 +80,11 @@ > - + diff --git a/apps/red-ui/src/app/modules/dossier/components/dossier-details/dossier-details.component.ts b/apps/red-ui/src/app/modules/dossier/components/dossier-details/dossier-details.component.ts index 5ad0f88f5..f26e9927c 100644 --- a/apps/red-ui/src/app/modules/dossier/components/dossier-details/dossier-details.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/dossier-details/dossier-details.component.ts @@ -7,9 +7,11 @@ import { TranslateChartService } from '@services/translate-chart.service'; import { StatusSorter } from '@utils/sorters/status-sorter'; import { UserService } from '@services/user.service'; import { User } from '@redaction/red-ui-http'; -import { Toaster } from '../../../../services/toaster.service'; -import { FilterService } from '../../../shared/services/filter.service'; +import { Toaster } from '@services/toaster.service'; +import { FilterService } from '@shared/services/filter.service'; import { DossierAttributeWithValue } from '@models/dossier-attributes.model'; +import { fileStatusTranslations } from '../../translations/file-status-translations'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-dossier-details', @@ -24,6 +26,8 @@ export class DossierDetailsComponent implements OnInit { @Output() openAssignDossierMembersDialog = new EventEmitter(); @Output() openDossierDictionaryDialog = new EventEmitter(); @Output() toggleCollapse = new EventEmitter(); + collapseTooltip = _('dossier-details.collapse'); + expandTooltip = _('dossier-details.expand'); readonly needsWorkFilters$ = this.filterService.getFilterModels$('needsWorkFilters'); @@ -68,7 +72,7 @@ export class DossierDetailsComponent implements OnInit { this.documentsChartData.push({ value: groups[key].length, color: key, - label: key, + label: fileStatusTranslations[key], key: key }); } diff --git a/apps/red-ui/src/app/modules/dossier/components/dossier-listing-actions/dossier-listing-actions.component.html b/apps/red-ui/src/app/modules/dossier/components/dossier-listing-actions/dossier-listing-actions.component.html index ae58a0ab7..b78c711d0 100644 --- a/apps/red-ui/src/app/modules/dossier/components/dossier-listing-actions/dossier-listing-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/dossier-listing-actions/dossier-listing-actions.component.html @@ -3,22 +3,18 @@ - +
diff --git a/apps/red-ui/src/app/modules/dossier/components/dossier-listing-details/dossier-listing-details.component.html b/apps/red-ui/src/app/modules/dossier/components/dossier-listing-details/dossier-listing-details.component.html index 6609a95ad..48847222d 100644 --- a/apps/red-ui/src/app/modules/dossier/components/dossier-listing-details/dossier-listing-details.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/dossier-listing-details/dossier-listing-details.component.html @@ -3,7 +3,7 @@ [config]="dossiersChartData" [radius]="80" [strokeWidth]="15" - [subtitle]="'dossier-listing.stats.charts.dossiers'" + [subtitle]="'dossier-listing.stats.charts.dossiers' | translate" >
@@ -29,6 +29,6 @@ [config]="documentsChartData" [radius]="80" [strokeWidth]="15" - [subtitle]="'dossier-listing.stats.charts.total-documents'" + [subtitle]="'dossier-listing.stats.charts.total-documents' | translate" >
diff --git a/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.html b/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.html index a379400af..428a81c2f 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.html @@ -14,9 +14,9 @@ (action)="openDeleteFileDialog($event)" *ngIf="permissionsService.canDeleteFile(fileStatus)" [tooltipPosition]="tooltipPosition" + [tooltip]="'dossier-overview.delete.action' | translate" [type]="buttonType" icon="red:trash" - tooltip="dossier-overview.delete.action" > @@ -50,8 +50,8 @@ (action)="toggleViewDocumentInfo()" *ngIf="screen === 'file-preview'" [attr.aria-expanded]="activeDocumentInfo" + [tooltip]="'file-preview.document-info' | translate" icon="red:status-info" - tooltip="file-preview.document-info" tooltipPosition="below" > @@ -60,8 +60,8 @@ *ngIf="screen === 'file-preview'" [attr.aria-expanded]="activeExcludePages" [showDot]="!!fileStatus.excludedPages?.length" + [tooltip]="'file-preview.exclude-pages' | translate" icon="red:exclude-pages" - tooltip="file-preview.exclude-pages" tooltipPosition="below" > @@ -70,9 +70,9 @@ (action)="setFileUnderApproval($event)" *ngIf="canSetToUnderApproval" [tooltipPosition]="tooltipPosition" + [tooltip]="'dossier-overview.under-approval' | translate" [type]="buttonType" icon="red:ready-for-approval" - tooltip="dossier-overview.under-approval" > @@ -80,9 +80,9 @@ (action)="setFileUnderReview($event, true)" *ngIf="canSetToUnderReview" [tooltipPosition]="tooltipPosition" + [tooltip]="'dossier-overview.under-review' | translate" [type]="buttonType" icon="red:undo" - tooltip="dossier-overview.under-review" > @@ -91,7 +91,11 @@ *ngIf="permissionsService.isReadyForApproval(fileStatus)" [disabled]="!permissionsService.canApprove(fileStatus)" [tooltipPosition]="tooltipPosition" - [tooltip]="permissionsService.canApprove(fileStatus) ? 'dossier-overview.approve' : 'dossier-overview.approve-disabled'" + [tooltip]=" + permissionsService.canApprove(fileStatus) + ? ('dossier-overview.approve' | translate) + : ('dossier-overview.approve-disabled' | translate) + " [type]="buttonType" icon="red:approved" > @@ -101,26 +105,26 @@ (action)="setFileUnderApproval($event)" *ngIf="canUndoApproval" [tooltipPosition]="tooltipPosition" + [tooltip]="'dossier-overview.under-approval' | translate" [type]="buttonType" icon="red:undo" - tooltip="dossier-overview.under-approval" > diff --git a/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.ts b/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.ts index b5820b64e..134e5c222 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.ts @@ -7,6 +7,8 @@ import { DossiersDialogService } from '../../services/dossiers-dialog.service'; import { ConfirmationDialogInput } from '@shared/dialogs/confirmation-dialog/confirmation-dialog.component'; import { LoadingService } from '@services/loading.service'; import { FileManagementControllerService } from '@redaction/red-ui-http'; +import { TranslateService } from '@ngx-translate/core'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-file-actions', @@ -28,7 +30,8 @@ export class FileActionsComponent implements OnInit { private readonly _dialogService: DossiersDialogService, private readonly _fileActionService: FileActionService, private readonly _loadingService: LoadingService, - private readonly _fileManagementControllerService: FileManagementControllerService + private readonly _fileManagementControllerService: FileManagementControllerService, + private readonly _translateService: TranslateService ) {} get statusBarConfig() { @@ -45,10 +48,10 @@ export class FileActionsComponent implements OnInit { get toggleTooltip(): string { if (!this.permissionsService.isManager()) { - return 'file-preview.toggle-analysis.only-managers'; + return _('file-preview.toggle-analysis.only-managers'); } - return this.fileStatus?.isExcluded ? 'file-preview.toggle-analysis.enable' : 'file-preview.toggle-analysis.disable'; + return this.fileStatus?.isExcluded ? _('file-preview.toggle-analysis.enable') : _('file-preview.toggle-analysis.disable'); } get canAssignToSelf() { @@ -84,7 +87,9 @@ export class FileActionsComponent implements OnInit { } get assignTooltip() { - return this.fileStatus.isUnderApproval ? 'dossier-overview.assign-approver' : 'dossier-overview.assign-reviewer'; + return this.fileStatus.isUnderApproval + ? this._translateService.instant('dossier-overview.assign-approver') + : this._translateService.instant('dossier-overview.assign-reviewer'); } ngOnInit(): void { @@ -115,8 +120,8 @@ export class FileActionsComponent implements OnInit { 'confirm', $event, new ConfirmationDialogInput({ - title: 'confirmation-dialog.delete-file.title', - question: 'confirmation-dialog.delete-file.question' + title: _('confirmation-dialog.delete-file.title'), + question: _('confirmation-dialog.delete-file.question') }), async () => { this._loadingService.start(); diff --git a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html index 35627cdd2..b6cbf79f2 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html @@ -20,8 +20,8 @@
@@ -46,12 +46,12 @@ > {{ selectedAnnotations?.length || 0 }} selected @@ -99,7 +99,7 @@
-
+
{{ activeViewerPage }} - {{ activeAnnotationsLength || 0 }} @@ -130,7 +130,12 @@ tabindex="1" > - + {{ 'file-preview.tabs.annotations.page-is' | translate }}
@@ -164,10 +169,10 @@
@@ -201,7 +206,7 @@
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 397df5070..57cde0bb2 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 @@ -20,7 +20,6 @@ import { FileDataModel } from '@models/file/file-data.model'; import { FilterModel } from '@shared/components/filters/popup-filter/model/filter.model'; import { CommentsComponent } from '../comments/comments.component'; import { PermissionsService } from '@services/permissions.service'; -import { TranslateService } from '@ngx-translate/core'; import { WebViewerInstance } from '@pdftron/webviewer'; const COMMAND_KEY_ARRAY = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Escape']; @@ -60,8 +59,7 @@ export class FileWorkloadComponent { constructor( private readonly _permissionsService: PermissionsService, private readonly _changeDetectorRef: ChangeDetectorRef, - private readonly _annotationProcessingService: AnnotationProcessingService, - private readonly _translateService: TranslateService + private readonly _annotationProcessingService: AnnotationProcessingService ) {} private _annotations: AnnotationWrapper[]; @@ -114,11 +112,6 @@ export class FileWorkloadComponent { } } - commentsTooltip({ comments }: AnnotationWrapper): string { - const i18nString = 'comments.' + (comments.length === 1 ? 'comment' : 'comments'); - return this._translateService.instant(i18nString, { count: comments.length }); - } - isSelected(annotation: AnnotationWrapper) { return this.selectedAnnotations?.find(a => a?.id === annotation.id); } diff --git a/apps/red-ui/src/app/modules/dossier/components/needs-work-badge/needs-work-badge.component.html b/apps/red-ui/src/app/modules/dossier/components/needs-work-badge/needs-work-badge.component.html index 0a14004fe..dbf5b95fa 100644 --- a/apps/red-ui/src/app/modules/dossier/components/needs-work-badge/needs-work-badge.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/needs-work-badge/needs-work-badge.component.html @@ -1,34 +1,14 @@
- - + + - - + +
-
+
@@ -23,14 +20,12 @@ {{ range.startPage }} - - {{ range.startPage }}-{{ range.endPage }} - + {{ range.startPage }} -{{ range.endPage }}
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 1555cef37..991fd9b77 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 @@ -3,8 +3,9 @@ import { PermissionsService } from '@services/permissions.service'; import { FormBuilder, FormGroup } from '@angular/forms'; import { PageRange, ReanalysisControllerService } from '@redaction/red-ui-http'; import { FileDataModel } from '../../../../models/file/file-data.model'; -import { Toaster } from '../../../../services/toaster.service'; -import { LoadingService } from '../../../../services/loading.service'; +import { Toaster } from '@services/toaster.service'; +import { LoadingService } from '@services/loading.service'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-page-exclusion', @@ -78,7 +79,7 @@ export class PageExclusionComponent implements OnChanges { this.excludePagesForm.reset(); this.actionPerformed.emit('exclude-pages'); } catch (e) { - this._toaster.error('file-preview.tabs.exclude-pages.error'); + this._toaster.error(_('file-preview.tabs.exclude-pages.error')); this._loadingService.stop(); } } 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 ef232df41..2570b45fb 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 @@ -1,13 +1,4 @@ -import { - Component, - EventEmitter, - Input, - OnChanges, - OnDestroy, - OnInit, - Output, - SimpleChanges -} from '@angular/core'; +import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core'; import { ViewedPages, ViewedPagesControllerService } from '@redaction/red-ui-http'; import { AppStateService } from '@state/app-state.service'; import { PermissionsService } from '@services/permissions.service'; @@ -104,11 +95,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy { private _markPageRead() { this._viewedPagesControllerService - .addPage( - { page: this.number }, - this._appStateService.activeDossierId, - this._appStateService.activeFileId - ) + .addPage({ page: this.number }, this._appStateService.activeDossierId, this._appStateService.activeFileId) .subscribe(() => { this.viewedPages?.pages?.push(this.number); }); @@ -116,11 +103,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy { private _markPageUnread() { this._viewedPagesControllerService - .removePage( - this._appStateService.activeDossierId, - this._appStateService.activeFileId, - this.number - ) + .removePage(this._appStateService.activeDossierId, this._appStateService.activeFileId, this.number) .subscribe(() => { this.viewedPages?.pages?.splice(this.viewedPages?.pages?.indexOf(this.number), 1); }); diff --git a/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.html b/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.html index bcfbe8777..e20a2f31b 100644 --- a/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.html @@ -2,12 +2,7 @@
- +
-
- + 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 b6ff867e3..393998aaa 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 @@ -1,10 +1,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; -import { - FileAttributeConfig, - FileAttributesControllerService, - FileStatus -} from '@redaction/red-ui-http'; +import { FileAttributeConfig, FileAttributesControllerService, FileStatus } from '@redaction/red-ui-http'; import { AppStateService } from '@state/app-state.service'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { DossierWrapper } from '@state/model/dossier.wrapper'; @@ -34,9 +30,7 @@ export class DocumentInfoDialogComponent implements OnInit { async ngOnInit() { this.attributes = ( - await this._fileAttributesService - .getFileAttributesConfiguration(this._dossier.dossierTemplateId) - .toPromise() + await this._fileAttributesService.getFileAttributesConfiguration(this._dossier.dossierTemplateId).toPromise() ).fileAttributeConfigs.filter(attr => attr.editable); const formConfig = this.attributes.reduce( (acc, attr) => ({ @@ -53,9 +47,7 @@ export class DocumentInfoDialogComponent implements OnInit { ...this.file.fileAttributes?.attributeIdToValue, ...this.documentInfoForm.getRawValue() }; - await this._fileAttributesService - .setFileAttributes({ attributeIdToValue }, this.file.dossierId, this.file.fileId) - .toPromise(); + await this._fileAttributesService.setFileAttributes({ attributeIdToValue }, this.file.dossierId, this.file.fileId).toPromise(); this.file.fileAttributes = { attributeIdToValue }; this.dialogRef.close(true); } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/dossier-dictionary-dialog/dossier-dictionary-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/dossier-dictionary-dialog/dossier-dictionary-dialog.component.html index c98e77be4..445d8cd9e 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/dossier-dictionary-dialog/dossier-dictionary-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/dossier-dictionary-dialog/dossier-dictionary-dialog.component.html @@ -12,26 +12,13 @@
- -
+
- + diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.html index f641b9463..5037d8497 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.html @@ -6,8 +6,8 @@
@@ -36,8 +36,8 @@
@@ -74,14 +74,14 @@
diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.html index 9c4360695..95ddd0035 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.html @@ -4,14 +4,12 @@ [options]="availableReportTypes" [valueMapper]="reportTemplateValueMapper" [optionTemplate]="reportTemplateOptionTemplate" - [translatePrefix]="'report-type.'" class="mr-16" formControlName="reportTemplateIds" > diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.ts index 20abe1ba4..bbd2d8006 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.ts @@ -1,9 +1,10 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DossierTemplateModel, ReportTemplate, ReportTemplateControllerService } from '@redaction/red-ui-http'; +import { Dossier, DossierTemplateModel, ReportTemplate, ReportTemplateControllerService } from '@redaction/red-ui-http'; import { FormBuilder, FormGroup } from '@angular/forms'; import { AppStateService } from '@state/app-state.service'; import { DossierWrapper } from '@state/model/dossier.wrapper'; import { EditDossierSectionInterface } from '../edit-dossier-section.interface'; +import { downloadTypesTranslations } from '../../../../../translations/download-types-translations'; @Component({ selector: 'redaction-edit-dossier-download-package', @@ -12,9 +13,13 @@ import { EditDossierSectionInterface } from '../edit-dossier-section.interface'; }) export class EditDossierDownloadPackageComponent implements OnInit, EditDossierSectionInterface { dossierForm: FormGroup; - downloadTypesEnum = ['ORIGINAL', 'PREVIEW', 'REDACTED']; + downloadTypesEnum: Dossier.DownloadFileTypesEnum[] = ['ORIGINAL', 'PREVIEW', 'REDACTED']; + downloadTypes: { key: Dossier.DownloadFileTypesEnum; label: string }[] = this.downloadTypesEnum.map(type => ({ + key: type, + label: downloadTypesTranslations[type] + })); dossierTemplates: DossierTemplateModel[]; - availableReportTypes = []; + availableReportTypes: ReportTemplate[] = []; @Input() dossierWrapper: DossierWrapper; @Output() updateDossier = new EventEmitter(); @@ -55,7 +60,7 @@ export class EditDossierDownloadPackageComponent implements OnInit, EditDossierS } get disabled() { - return this.dossierForm.invalid; + return this.dossierForm?.invalid; } async ngOnInit() { diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html index 1d92fffa5..c1fa1a5e3 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html @@ -4,19 +4,19 @@
- +
- {{ 'edit-dossier-dialog.nav-items.' + (activeNavItem.title || activeNavItem.key) | translate }} + {{ activeNavItem.title | translate }}
@@ -31,19 +31,19 @@ @@ -55,7 +55,7 @@
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 7e08320d3..afdb4dfda 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 @@ -1,30 +1,24 @@ import { ChangeDetectorRef, Component, Inject, ViewChild } from '@angular/core'; import { MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { DossierWrapper } from '../../../../state/model/dossier.wrapper'; +import { DossierWrapper } from '@state/model/dossier.wrapper'; import { EditDossierGeneralInfoComponent } from './general-info/edit-dossier-general-info.component'; import { EditDossierDownloadPackageComponent } from './download-package/edit-dossier-download-package.component'; import { EditDossierSectionInterface } from './edit-dossier-section.interface'; -import { Toaster } from '../../../../services/toaster.service'; +import { Toaster } from '@services/toaster.service'; import { EditDossierDictionaryComponent } from './dictionary/edit-dossier-dictionary.component'; import { EditDossierTeamMembersComponent } from './team-members/edit-dossier-team-members.component'; import { EditDossierAttributesComponent } from './attributes/edit-dossier-attributes.component'; -type Section = 'dossier-info' | 'download-package' | 'dossier-dictionary' | 'members' | 'dossier-attributes'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; + +type Section = 'dossierInfo' | 'downloadPackage' | 'dossierDictionary' | 'members' | 'dossierAttributes'; @Component({ templateUrl: './edit-dossier-dialog.component.html', styleUrls: ['./edit-dossier-dialog.component.scss'] }) export class EditDossierDialogComponent { - navItems: { key: Section; title?: string }[] = [ - { key: 'dossier-info', title: 'general-info' }, - { key: 'download-package', title: 'choose-download' }, - { key: 'dossier-dictionary', title: 'dossier-dictionary' }, - { key: 'members', title: 'team-members' }, - { key: 'dossier-attributes' } - // TODO: - // { key: 'report-attributes' } - ]; + readonly navItems: { key: Section; title: string; sideNavTitle?: string }[]; activeNav: Section; dossierWrapper: DossierWrapper; @@ -44,8 +38,35 @@ export class EditDossierDialogComponent { section?: Section; } ) { + this.navItems = [ + { + key: 'dossierInfo', + title: _('edit-dossier-dialog.nav-items.general-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') + }, + { + key: 'dossierDictionary', + sideNavTitle: _('edit-dossier-dialog.nav-items.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') + }, + { + key: 'dossierAttributes', + title: _('edit-dossier-dialog.nav-items.dossier-attributes') + } + ]; + this.dossierWrapper = _data.dossierWrapper; - this.activeNav = _data.section || 'dossier-info'; + this.activeNav = _data.section || 'dossierInfo'; } get activeNavItem(): { key: string; title?: string } { @@ -54,28 +75,28 @@ export class EditDossierDialogComponent { get activeComponent(): EditDossierSectionInterface { return { - 'dossier-info': this.generalInfoComponent, - 'download-package': this.downloadPackageComponent, - 'dossier-dictionary': this.dictionaryComponent, + dossierInfo: this.generalInfoComponent, + downloadPackage: this.downloadPackageComponent, + dossierDictionary: this.dictionaryComponent, members: this.membersComponent, - 'dossier-attributes': this.attributesComponent + dossierAttributes: this.attributesComponent }[this.activeNav]; } get noPaddingTab(): boolean { - return ['dossier-attributes'].includes(this.activeNav); + return ['dossierAttributes'].includes(this.activeNav); } get showHeading(): boolean { - return !['dossier-attributes'].includes(this.activeNav); + return !['dossierAttributes'].includes(this.activeNav); } get showSubtitle(): boolean { - return ['dossier-dictionary'].includes(this.activeNav); + return ['dossierDictionary'].includes(this.activeNav); } updatedDossier(updatedDossier: DossierWrapper) { - this._toaster.success('edit-dossier-dialog.change-successful'); + this._toaster.success(_('edit-dossier-dialog.change-successful')); if (updatedDossier) { this.dossierWrapper = updatedDossier; @@ -100,7 +121,7 @@ export class EditDossierDialogComponent { changeTab(key: Section) { if (this.activeComponent.changed) { - this._toaster.error('edit-dossier-dialog.unsaved-changes'); + this._toaster.error(_('edit-dossier-dialog.unsaved-changes')); return; } this.activeNav = key; diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.html index 0fe55be18..b18f3ed26 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.html @@ -11,17 +11,11 @@
- {{ - 'edit-dossier-dialog.general-info.form.template' | translate - }} + {{ 'edit-dossier-dialog.general-info.form.template' | translate }} @@ -34,9 +28,7 @@
+
@@ -53,9 +34,5 @@
- + 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 c3de99226..d5f1293c4 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 @@ -3,7 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { AppStateService } from '@state/app-state.service'; import { MatDialogRef } from '@angular/material/dialog'; import { ForceRedactionRequest, LegalBasisMappingControllerService } from '@redaction/red-ui-http'; -import { Toaster } from '../../../../services/toaster.service'; +import { Toaster } from '@services/toaster.service'; import { TranslateService } from '@ngx-translate/core'; import { UserService } from '@services/user.service'; import { ManualAnnotationService } from '../../services/manual-annotation.service'; diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html index b62deb489..57c5ef08f 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html @@ -19,9 +19,7 @@
@@ -38,28 +36,15 @@
- +
- +
-
+
@@ -85,9 +70,5 @@
- + 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 b5c5d24df..381c37e36 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 @@ -3,7 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { AppStateService } from '@state/app-state.service'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { AddRedactionRequest, LegalBasisMappingControllerService } from '@redaction/red-ui-http'; -import { Toaster } from '../../../../services/toaster.service'; +import { Toaster } from '@services/toaster.service'; import { TranslateService } from '@ngx-translate/core'; import { UserService } from '@services/user.service'; import { ManualRedactionEntryWrapper } from '@models/file/manual-redaction-entry.wrapper'; diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html index a256d59de..e9284dab0 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html @@ -11,43 +11,24 @@ formControlName="type" > - {{ 'recategorize-image-dialog.options.' + option | translate }} + {{ translations[option] | translate }}
- +
- -
+
- + 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 5372c1a07..f6ba498c7 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 @@ -3,6 +3,8 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { PermissionsService } from '@services/permissions.service'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; +import { imageCategoriesTranslations } from '../../translations/image-categories-translations'; +import { ImageCategory } from '../../models/image-category.model'; @Component({ selector: 'redaction-recategorize-image-dialog', @@ -12,7 +14,8 @@ import { AnnotationWrapper } from '@models/file/annotation.wrapper'; export class RecategorizeImageDialogComponent implements OnInit { recategorizeImageForm: FormGroup; isDocumentAdmin: boolean; - typeOptions: string[] = ['signature', 'logo', 'formula', 'image']; + typeOptions: ImageCategory[] = ['signature', 'logo', 'formula', 'image']; + translations = imageCategoriesTranslations; constructor( private readonly _permissionsService: PermissionsService, diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html index 9b9f80f93..aabddd419 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html @@ -49,9 +49,5 @@
- + diff --git a/apps/red-ui/src/app/modules/dossier/models/annotation-action-mode.model.ts b/apps/red-ui/src/app/modules/dossier/models/annotation-action-mode.model.ts new file mode 100644 index 000000000..eabbda0a9 --- /dev/null +++ b/apps/red-ui/src/app/modules/dossier/models/annotation-action-mode.model.ts @@ -0,0 +1,14 @@ +export type AnnotationActionMode = + | 'add' + | 'approve' + | 'remove' + | 'change-legal-basis' + | 'decline' + | 'request-remove' + | 'request-change-legal-basis' + | 'recategorize-image' + | 'request-image-recategorization' + | 'suggest' + | 'undo' + | 'force-redaction' + | 'request-force-redaction'; diff --git a/apps/red-ui/src/app/modules/dossier/models/image-category.model.ts b/apps/red-ui/src/app/modules/dossier/models/image-category.model.ts new file mode 100644 index 000000000..cbfc5355f --- /dev/null +++ b/apps/red-ui/src/app/modules/dossier/models/image-category.model.ts @@ -0,0 +1 @@ +export type ImageCategory = 'signature' | 'logo' | 'formula' | 'image'; diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html index d3d8ca424..8f4cbdf44 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html @@ -8,20 +8,18 @@
- + - +
event instanceof NavigationStart && event.url !== '/main/dossiers'; @@ -42,10 +45,9 @@ export class DossierListingScreenComponent implements OnInit, AfterViewInit, OnDestroy, OnAttach, OnDetach { readonly itemSize = 95; - protected readonly _primaryKey = 'dossierName'; buttonConfigs: ButtonConfig[] = [ { - label: this._translateService.instant('dossier-listing.add-new'), + label: _('dossier-listing.add-new'), action: () => this.openAddDossierDialog(), hide: !this.permissionsService.isManager(), icon: 'red:plus', @@ -54,28 +56,27 @@ export class DossierListingScreenComponent ]; tableColConfigs: TableColConfig[] = [ { - label: 'dossier-listing.table-col-names.name', + label: _('dossier-listing.table-col-names.name'), withSort: true, column: 'dossierName' }, { - label: 'dossier-listing.table-col-names.needs-work' + label: _('dossier-listing.table-col-names.needs-work') }, { - label: 'dossier-listing.table-col-names.owner', + label: _('dossier-listing.table-col-names.owner'), class: 'user-column' }, { - label: 'dossier-listing.table-col-names.status', + label: _('dossier-listing.table-col-names.status'), class: 'flex-end' } ]; - dossiersChartData: DoughnutChartConfig[] = []; documentsChartData: DoughnutChartConfig[] = []; - + protected readonly _primaryKey = 'dossierName'; + protected _tableHeaderLabel = _('dossier-listing.table-header.title'); private _lastScrollPosition: number; - @ViewChild('needsWorkTemplate', { read: TemplateRef, static: true }) private readonly _needsWorkTemplate: TemplateRef; @@ -95,6 +96,18 @@ export class DossierListingScreenComponent this._loadEntitiesFromState(); } + private get _userId() { + return this._userService.userId; + } + + private get _activeDossiersCount(): number { + return this.screenStateService.allEntities.filter(p => p.dossier.status === Dossier.StatusEnum.ACTIVE).length; + } + + private get _inactiveDossiersCount(): number { + return this.screenStateService.allEntities.length - this._activeDossiersCount; + } + ngOnInit(): void { this.calculateData(); @@ -144,24 +157,12 @@ export class DossierListingScreenComponent }); } - private get _userId() { - return this._userService.userId; - } - - private get _activeDossiersCount(): number { - return this.screenStateService.allEntities.filter(p => p.dossier.status === Dossier.StatusEnum.ACTIVE).length; - } - - private get _inactiveDossiersCount(): number { - return this.screenStateService.allEntities.length - this._activeDossiersCount; - } - calculateData() { this._computeAllFilters(); this.dossiersChartData = [ - { value: this._activeDossiersCount, color: 'ACTIVE', label: 'active' }, - { value: this._inactiveDossiersCount, color: 'DELETED', label: 'archived' } + { value: this._activeDossiersCount, color: 'ACTIVE', label: _('active') }, + { value: this._inactiveDossiersCount, color: 'DELETED', label: _('archived') } ]; const groups = groupBy(this._appStateService.aggregatedFiles, 'status'); this.documentsChartData = []; @@ -170,7 +171,7 @@ export class DossierListingScreenComponent this.documentsChartData.push({ value: groups[key].length, color: key, - label: key, + label: fileStatusTranslations[key], key: key }); } @@ -206,7 +207,7 @@ export class DossierListingScreenComponent const statusFilters = [...allDistinctFileStatus].map(status => ({ key: status, - label: this._translateService.instant(status) + label: this._translateService.instant(fileStatusTranslations[status]) })); this.filterService.addFilterGroup({ @@ -232,7 +233,7 @@ export class DossierListingScreenComponent const needsWorkFilters = [...allDistinctNeedsWork].map(type => ({ key: type, - label: `filter.${type}` + label: workloadTranslations[type] })); this.filterService.addFilterGroup({ diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.html index a5cf89f8f..8d62c4de0 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.html @@ -59,37 +59,37 @@
- +
@@ -97,16 +97,17 @@ - +
{ this.reloadDossiers(); - this._toaster.success('dossier-overview.reanalyse-dossier.success'); + this._toaster.success(_('dossier-overview.reanalyse-dossier.success')); }) - .catch(() => this._toaster.error('dossier-overview.reanalyse-dossier.error')); + .catch(() => this._toaster.error(_('dossier-overview.reanalyse-dossier.error'))); } reloadDossiers() { @@ -261,7 +264,7 @@ export class DossierOverviewScreenComponent const statusFilters = [...allDistinctFileStatusWrapper].map(item => ({ key: item, - label: this._translateService.instant(item) + label: this._translateService.instant(fileStatusTranslations[item]) })); this.filterService.addFilterGroup({ @@ -297,7 +300,7 @@ export class DossierOverviewScreenComponent const needsWorkFilters = [...allDistinctNeedsWork].map(item => ({ key: item, - label: this._translateService.instant('filter.' + item) + label: workloadTranslations[item] })); this.filterService.addFilterGroup({ diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html index 7a64b785a..c982ab609 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html @@ -32,10 +32,10 @@
- +
- {{ status | translate }} + {{ translations[status] | translate }} {{ 'by' | translate }}:
@@ -74,8 +74,8 @@
@@ -96,8 +96,8 @@ @@ -105,9 +105,9 @@ @@ -117,9 +117,9 @@ (action)="closeFullScreen()" *ngIf="!fullScreen" [routerLink]="['/main/dossiers/' + appStateService.activeDossierId]" + [tooltip]="'common.close' | translate" class="ml-8" icon="red:close" - tooltip="common.close" tooltipPosition="below" >
@@ -150,8 +150,8 @@
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 0b28de2a6..bb77389a4 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 @@ -12,7 +12,7 @@ import { AnnotationData, FileDataModel } from '@models/file/file-data.model'; import { FileActionService } from '../../services/file-action.service'; import { AnnotationDrawService } from '../../services/annotation-draw.service'; import { AnnotationProcessingService } from '../../services/annotation-processing.service'; -import { Toaster } from '../../../../services/toaster.service'; +import { Toaster } from '@services/toaster.service'; import { FileStatusWrapper } from '@models/file/file-status.wrapper'; import { PermissionsService } from '@services/permissions.service'; import { Subscription, timer } from 'rxjs'; @@ -33,10 +33,11 @@ import { DossiersDialogService } from '../../services/dossiers-dialog.service'; import { OnAttach, OnDetach } from '@utils/custom-route-reuse.strategy'; import { FilterModel } from '@shared/components/filters/popup-filter/model/filter.model'; import { handleFilterDelta, processFilters } from '@shared/components/filters/popup-filter/utils/filter-utils'; -import { LoadingService } from '../../../../services/loading.service'; +import { LoadingService } from '@services/loading.service'; import { stampPDFPage } from '../../../../utils/page-stamper'; import { TranslateService } from '@ngx-translate/core'; -import { AutoUnsubscribeComponent } from '../../../shared/base/auto-unsubscribe.component'; +import { AutoUnsubscribeComponent } from '@shared/base/auto-unsubscribe.component'; +import { fileStatusTranslations } from '../../translations/file-status-translations'; const ALL_HOTKEY_ARRAY = ['Escape', 'F', 'f']; @@ -63,10 +64,10 @@ export class FilePreviewScreenComponent extends AutoUnsubscribeComponent impleme viewDocumentInfo = false; excludePages = false; @ViewChild(PdfViewerComponent) viewerComponent: PdfViewerComponent; + translations = fileStatusTranslations; private _instance: WebViewerInstance; private _lastPage: string; private _reloadFileOnReanalysis = false; - @ViewChild('fileWorkloadComponent') private _workloadComponent: FileWorkloadComponent; constructor( @@ -106,7 +107,9 @@ export class FilePreviewScreenComponent extends AutoUnsubscribeComponent impleme } get assignTooltip(): string { - return this.appStateService.activeFile.isUnderApproval ? 'dossier-overview.assign-approver' : this.assignOrChangeReviewerTooltip; + return this.appStateService.activeFile.isUnderApproval + ? this._translateService.instant('dossier-overview.assign-approver') + : this.assignOrChangeReviewerTooltip; } get annotations(): AnnotationWrapper[] { @@ -118,11 +121,15 @@ export class FilePreviewScreenComponent extends AutoUnsubscribeComponent impleme } get activeViewerPage() { + const currentPage = this._instance?.docViewer?.getCurrentPage(); + if (!currentPage) { + return 0; + } return this.viewerComponent?.viewMode === 'STANDARD' - ? this._instance?.docViewer?.getCurrentPage() - : this._instance?.docViewer?.getCurrentPage() % 2 === 0 - ? this._instance?.docViewer?.getCurrentPage() / 2 - : (this._instance?.docViewer?.getCurrentPage() + 1) / 2; + ? currentPage + : currentPage % 2 === 0 + ? currentPage / 2 + : (currentPage + 1) / 2; } get canSwitchToRedactedView() { @@ -158,7 +165,9 @@ export class FilePreviewScreenComponent extends AutoUnsubscribeComponent impleme } get assignOrChangeReviewerTooltip() { - return this.currentReviewer ? 'file-preview.change-reviewer' : 'file-preview.assign-reviewer'; + return this.currentReviewer + ? this._translateService.instant('file-preview.change-reviewer') + : this._translateService.instant('file-preview.assign-reviewer'); } get currentReviewer(): string { @@ -405,7 +414,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribeComponent impleme } async annotationsChangedByReviewAction(annotation: AnnotationWrapper) { - await this._cleanupAndRedrawManualAnnotationsForEntirePage(annotation.pageNumber); + await this._cleanupAndRedrawManualAnnotationsForEntirePage(annotation?.pageNumber || this.activeViewerPage); } async fileActionPerformed(action: string) { diff --git a/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.html index 59d849feb..ffa974b0a 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.html @@ -1,18 +1,15 @@
- + {{ item.fileName }}
-
- +
+
-
- +
+
-
+
{{ 'search-screen.missing' | translate }}: {{ term }}. {{ 'search-screen.must-contain' | translate }}:  {{ term }} @@ -62,14 +59,15 @@
diff --git a/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.scss b/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.scss index 092360fde..c73223165 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.scss +++ b/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.scss @@ -26,6 +26,10 @@ .highlights { @include line-clamp(1); } + + .stats-subtitle > div { + width: fit-content; + } } } 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 994acab65..f705e2497 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 @@ -1,10 +1,9 @@ import { Component, Injector, OnDestroy } from '@angular/core'; import { BaseListingComponent } from '../../../shared/base/base-listing.component'; -import { SearchControllerService, SearchResult } from '@redaction/red-ui-http'; +import { MatchedDocument, SearchControllerService, SearchResult } from '@redaction/red-ui-http'; import { BehaviorSubject, Observable } from 'rxjs'; import { debounceTime, map, switchMap, tap } from 'rxjs/operators'; import { ActivatedRoute, Router } from '@angular/router'; -import { MatchedDocument } from '@redaction/red-ui-http'; import { TableColConfig } from '../../../shared/components/table-col-name/table-col-name.component'; import { FilterService } from '../../../shared/services/filter.service'; import { SearchService } from '../../../shared/services/search.service'; @@ -12,8 +11,9 @@ import { ScreenStateService } from '../../../shared/services/screen-state.servic import { SortingService } from '../../../../services/sorting.service'; import { AppStateService } from '../../../../state/app-state.service'; import { FileStatusWrapper } from '../../../../models/file/file-status.wrapper'; -import { TranslateService } from '@ngx-translate/core'; import { LoadingService } from '../../../../services/loading.service'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import { fileStatusTranslations } from '../../translations/file-status-translations'; interface ListItem { fileName: string; @@ -32,9 +32,9 @@ interface ListItem { providers: [FilterService, SearchService, ScreenStateService, SortingService] }) export class SearchScreenComponent extends BaseListingComponent implements OnDestroy { - protected readonly _primaryKey = 'fileName'; - readonly itemSize = 85; + fileStatusTranslations = fileStatusTranslations; + readonly itemSize = 85; readonly search$ = new BehaviorSubject(null); readonly searchResults$: Observable = this.search$.asObservable().pipe( switchMap(query => this._search(query)), @@ -43,30 +43,29 @@ export class SearchScreenComponent extends BaseListingComponent implem tap(result => this.screenStateService.setEntities(result)), tap(() => this._loadingService.stop()) ); - - private _dossierId: string; - readonly tableColConfigs: TableColConfig[] = [ { - label: this._translateService.instant('search-screen.cols.document') + label: _('search-screen.cols.document') }, { - label: this._translateService.instant('search-screen.cols.status') + label: _('search-screen.cols.status') }, { - label: this._translateService.instant('search-screen.cols.dossier') + label: _('search-screen.cols.dossier') }, { - label: this._translateService.instant('search-screen.cols.pages') + label: _('search-screen.cols.pages') } ]; + protected readonly _primaryKey = 'fileName'; + protected _tableHeaderLabel = _('search-screen.table-header'); + private _dossierId: string; constructor( protected readonly _injector: Injector, private readonly _searchControllerService: SearchControllerService, private readonly _activatedRoute: ActivatedRoute, private readonly _appStateService: AppStateService, - private readonly _translateService: TranslateService, private readonly _loadingService: LoadingService, private readonly _router: Router ) { 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 477033369..b00cf0589 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 @@ -21,44 +21,25 @@ export class AnnotationActionsService { private readonly _dialogService: DossiersDialogService ) {} - acceptSuggestion( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { + acceptSuggestion($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { $event?.stopPropagation(); annotations.forEach(annotation => { this._processObsAndEmit( - this._manualAnnotationService.approveRequest( - annotation.id, - annotation.isModifyDictionary - ), + this._manualAnnotationService.approveRequest(annotation.id, annotation.isModifyDictionary), annotation, annotationsChanged ); }); } - rejectSuggestion( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { + rejectSuggestion($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { $event?.stopPropagation(); annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.declineOrRemoveRequest(annotation), - annotation, - annotationsChanged - ); + this._processObsAndEmit(this._manualAnnotationService.declineOrRemoveRequest(annotation), annotation, annotationsChanged); }); } - forceRedaction( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { + forceRedaction($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { $event?.stopPropagation(); this._dialogService.openForceRedactionDialog($event, request => { annotations.forEach(annotation => { @@ -74,28 +55,16 @@ export class AnnotationActionsService { }); } - changeLegalBasis( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { - this._dialogService.openChangeLegalBasisDialog( - $event, - annotations, - (data: { comment: string; legalBasis: string }) => { - annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.changeLegalBasis( - annotation.annotationId, - data.legalBasis, - data.comment - ), - annotation, - annotationsChanged - ); - }); - } - ); + changeLegalBasis($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { + this._dialogService.openChangeLegalBasisDialog($event, annotations, (data: { comment: string; legalBasis: string }) => { + annotations.forEach(annotation => { + this._processObsAndEmit( + this._manualAnnotationService.changeLegalBasis(annotation.annotationId, data.legalBasis, data.comment), + annotation, + annotationsChanged + ); + }); + }); } suggestRemoveAnnotation( @@ -104,97 +73,55 @@ export class AnnotationActionsService { removeFromDictionary: boolean, annotationsChanged: EventEmitter ) { - this._dialogService.openRemoveFromDictionaryDialog( - $event, - annotations, - removeFromDictionary, - () => { - annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.removeOrSuggestRemoveAnnotation( - annotation, - removeFromDictionary - ), - annotation, - annotationsChanged - ); - }); - } - ); + this._dialogService.openRemoveFromDictionaryDialog($event, annotations, removeFromDictionary, () => { + annotations.forEach(annotation => { + this._processObsAndEmit( + this._manualAnnotationService.removeOrSuggestRemoveAnnotation(annotation, removeFromDictionary), + annotation, + annotationsChanged + ); + }); + }); } - markAsFalsePositive( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { + markAsFalsePositive($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { annotations.forEach(annotation => { const permissions = AnnotationPermissions.forUser( this._permissionsService.isApprover(), this._permissionsService.currentUser, annotation ); - const value = permissions.canMarkTextOnlyAsFalsePositive - ? annotation.value - : this._getFalsePositiveText(annotation); + const value = permissions.canMarkTextOnlyAsFalsePositive ? annotation.value : this._getFalsePositiveText(annotation); this._markAsFalsePositive($event, annotation, value, annotationsChanged); }); } - recategorizeImage( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { - this._dialogService.openRecategorizeImageDialog( - $event, - annotations, - (data: { type: string; comment: string }) => { - annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.recategorizeImage( - annotation.annotationId, - data.type, - data.comment - ), - annotation, - annotationsChanged - ); - }); - } - ); - } - - undoDirectAction( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { - $event?.stopPropagation(); - - annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.undoRequest(annotation), - annotation, - annotationsChanged - ); + recategorizeImage($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { + this._dialogService.openRecategorizeImageDialog($event, annotations, (data: { type: string; comment: string }) => { + annotations.forEach(annotation => { + this._processObsAndEmit( + this._manualAnnotationService.recategorizeImage(annotation.annotationId, data.type, data.comment), + annotation, + annotationsChanged + ); + }); }); } - convertRecommendationToAnnotation( - $event: any, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { + undoDirectAction($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { $event?.stopPropagation(); annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.addRecommendation(annotation), - annotation, - annotationsChanged - ); + this._processObsAndEmit(this._manualAnnotationService.undoRequest(annotation), annotation, annotationsChanged); + }); + } + + convertRecommendationToAnnotation($event: any, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { + $event?.stopPropagation(); + + annotations.forEach(annotation => { + this._processObsAndEmit(this._manualAnnotationService.addRecommendation(annotation), annotation, annotationsChanged); }); } @@ -206,15 +133,10 @@ export class AnnotationActionsService { const annotationPermissions = annotations.map(a => ({ annotation: a, - permissions: AnnotationPermissions.forUser( - this._permissionsService.isApprover(), - this._permissionsService.currentUser, - a - ) + permissions: AnnotationPermissions.forUser(this._permissionsService.isApprover(), this._permissionsService.currentUser, a) })); - const canRecategorizeImage = - annotations.length === 1 && annotationPermissions[0].permissions.canRecategorizeImage; + const canRecategorizeImage = annotations.length === 1 && annotationPermissions[0].permissions.canRecategorizeImage; if (canRecategorizeImage) { availableActions.push({ type: 'actionButton', @@ -236,9 +158,7 @@ export class AnnotationActionsService { availableActions.push({ type: 'actionButton', img: this._convertPath('/assets/icons/general/remove-from-dict.svg'), - title: this._translateService.instant( - 'annotation-actions.remove-annotation.remove-from-dict' - ), + title: this._translateService.instant('annotation-actions.remove-annotation.remove-from-dict'), onClick: () => { this._ngZone.run(() => { this.suggestRemoveAnnotation(null, annotations, true, annotationsChanged); @@ -247,33 +167,21 @@ export class AnnotationActionsService { }); } - const canAcceptRecommendation = annotationPermissions.reduce( - (acc, next) => acc && next.permissions.canAcceptRecommendation, - true - ); + const canAcceptRecommendation = annotationPermissions.reduce((acc, next) => acc && next.permissions.canAcceptRecommendation, true); if (canAcceptRecommendation) { availableActions.push({ type: 'actionButton', img: this._convertPath('/assets/icons/general/check.svg'), - title: this._translateService.instant( - 'annotation-actions.accept-recommendation.label' - ), + title: this._translateService.instant('annotation-actions.accept-recommendation.label'), onClick: () => { this._ngZone.run(() => { - this.convertRecommendationToAnnotation( - null, - annotations, - annotationsChanged - ); + this.convertRecommendationToAnnotation(null, annotations, annotationsChanged); }); } }); } - const canAcceptSuggestion = annotationPermissions.reduce( - (acc, next) => acc && next.permissions.canAcceptSuggestion, - true - ); + const canAcceptSuggestion = annotationPermissions.reduce((acc, next) => acc && next.permissions.canAcceptSuggestion, true); if (canAcceptSuggestion) { availableActions.push({ type: 'actionButton', @@ -287,10 +195,7 @@ export class AnnotationActionsService { }); } - const canUndo = annotationPermissions.reduce( - (acc, next) => acc && next.permissions.canUndo, - true - ); + const canUndo = annotationPermissions.reduce((acc, next) => acc && next.permissions.canUndo, true); if (canUndo) { availableActions.push({ type: 'actionButton', @@ -305,19 +210,14 @@ export class AnnotationActionsService { } const canMarkAsFalsePositive = annotationPermissions.reduce( - (acc, next) => - acc && - (next.permissions.canMarkAsFalsePositive || - next.permissions.canMarkTextOnlyAsFalsePositive), + (acc, next) => acc && (next.permissions.canMarkAsFalsePositive || next.permissions.canMarkTextOnlyAsFalsePositive), true ); if (canMarkAsFalsePositive) { availableActions.push({ type: 'actionButton', img: this._convertPath('/assets/icons/general/thumb-down.svg'), - title: this._translateService.instant( - 'annotation-actions.remove-annotation.false-positive' - ), + title: this._translateService.instant('annotation-actions.remove-annotation.false-positive'), onClick: () => { this._ngZone.run(() => { this.markAsFalsePositive(null, annotations, annotationsChanged); @@ -326,10 +226,7 @@ export class AnnotationActionsService { }); } - const canForceRedaction = annotationPermissions.reduce( - (acc, next) => acc && next.permissions.canForceRedaction, - true - ); + const canForceRedaction = annotationPermissions.reduce((acc, next) => acc && next.permissions.canForceRedaction, true); if (canForceRedaction) { availableActions.push({ type: 'actionButton', @@ -343,10 +240,7 @@ export class AnnotationActionsService { }); } - const canRejectSuggestion = annotationPermissions.reduce( - (acc, next) => acc && next.permissions.canRejectSuggestion, - true - ); + const canRejectSuggestion = annotationPermissions.reduce((acc, next) => acc && next.permissions.canRejectSuggestion, true); if (canRejectSuggestion) { availableActions.push({ type: 'actionButton', @@ -368,9 +262,7 @@ export class AnnotationActionsService { availableActions.push({ type: 'actionButton', img: this._convertPath('/assets/icons/general/trash.svg'), - title: this._translateService.instant( - 'annotation-actions.remove-annotation.only-here' - ), + title: this._translateService.instant('annotation-actions.remove-annotation.only-here'), onClick: () => { this._ngZone.run(() => { this.suggestRemoveAnnotation(null, annotations, false, annotationsChanged); @@ -382,11 +274,7 @@ export class AnnotationActionsService { return availableActions; } - private _processObsAndEmit( - obs: Observable, - annotation: AnnotationWrapper, - annotationsChanged: EventEmitter - ) { + private _processObsAndEmit(obs: Observable, annotation: AnnotationWrapper, annotationsChanged: EventEmitter) { obs.subscribe( () => { annotationsChanged.emit(annotation); @@ -426,11 +314,7 @@ export class AnnotationActionsService { falsePositiveRequest.addToDictionary = true; falsePositiveRequest.comment = { text: 'False Positive' }; - this._processObsAndEmit( - this._manualAnnotationService.addAnnotation(falsePositiveRequest), - annotation, - annotationsChanged - ); + this._processObsAndEmit(this._manualAnnotationService.addAnnotation(falsePositiveRequest), annotation, annotationsChanged); } private _convertPath(path: string): string { 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 68a4dca74..41b9d9b9c 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 @@ -1,11 +1,6 @@ import { Injectable } from '@angular/core'; import { Annotations, WebViewerInstance } from '@pdftron/webviewer'; -import { - Rectangle, - RedactionLogControllerService, - SectionGrid, - SectionRectangle -} from '@redaction/red-ui-http'; +import { Rectangle, RedactionLogControllerService, SectionGrid, SectionRectangle } from '@redaction/red-ui-http'; import { hexToRgb } from '@utils/functions'; import { AppStateService } from '@state/app-state.service'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; @@ -27,9 +22,7 @@ export class AnnotationDrawService { ) { const annotations = []; annotationWrappers.forEach(annotation => { - annotations.push( - this.computeAnnotation(activeViewer, annotation, hideSkipped, compareMode) - ); + annotations.push(this.computeAnnotation(activeViewer, annotation, hideSkipped, compareMode)); }); const annotationManager = activeViewer.annotManager; @@ -38,10 +31,7 @@ export class AnnotationDrawService { if (this._userPreferenceService.areDevFeaturesEnabled) { this._redactionLogControllerService - .getSectionGrid( - this._appStateService.activeDossierId, - this._appStateService.activeFileId - ) + .getSectionGrid(this._appStateService.activeDossierId, this._appStateService.activeFileId) .subscribe(sectionGrid => { this.drawSections(activeViewer, sectionGrid); }); @@ -53,9 +43,7 @@ export class AnnotationDrawService { for (const page of Object.keys(sectionGrid.rectanglesPerPage)) { const sectionRectangles: SectionRectangle[] = sectionGrid.rectanglesPerPage[page]; sectionRectangles.forEach(sectionRectangle => { - sections.push( - this.computeSection(activeViewer, parseInt(page, 10), sectionRectangle) - ); + sections.push(this.computeSection(activeViewer, parseInt(page, 10), sectionRectangle)); // sectionRectangle.tableCells?.forEach(cell =>{ // sections.push(this.computeSection(activeViewer, parseInt(page, 10), cell)); // }) @@ -66,11 +54,7 @@ export class AnnotationDrawService { annotationManager.drawAnnotationsFromList(sections); } - computeSection( - activeViewer: WebViewerInstance, - pageNumber: number, - sectionRectangle: SectionRectangle - ) { + computeSection(activeViewer: WebViewerInstance, pageNumber: number, sectionRectangle: SectionRectangle) { const rectangleAnnot = new activeViewer.Annotations.RectangleAnnotation(); const pageHeight = activeViewer.docViewer.getPageHeight(pageNumber); const rectangle = { @@ -97,44 +81,25 @@ export class AnnotationDrawService { hideSkipped: boolean = false, compareMode: boolean = false ) { - const pageNumber = compareMode - ? annotationWrapper.pageNumber * 2 - 1 - : annotationWrapper.pageNumber; + const pageNumber = compareMode ? annotationWrapper.pageNumber * 2 - 1 : annotationWrapper.pageNumber; const highlight = new activeViewer.Annotations.TextHighlightAnnotation(); highlight.PageNumber = pageNumber; - highlight.StrokeColor = this.getColor( - activeViewer, - annotationWrapper.superType, - annotationWrapper.dictionary - ); + highlight.StrokeColor = this.getColor(activeViewer, annotationWrapper.superType, annotationWrapper.dictionary); highlight.setContents(annotationWrapper.content); - highlight.Quads = this._rectanglesToQuads( - annotationWrapper.positions, - activeViewer, - pageNumber - ); + highlight.Quads = this._rectanglesToQuads(annotationWrapper.positions, activeViewer, pageNumber); highlight.Id = annotationWrapper.id; highlight.ReadOnly = true; // change log entries are drawn lighter highlight.Opacity = annotationWrapper.isChangeLogRemoved ? 0.2 : 1; - highlight.Hidden = - annotationWrapper.isChangeLogRemoved || - (hideSkipped && annotationWrapper.isSkipped) || - annotationWrapper.isOCR; + highlight.Hidden = annotationWrapper.isChangeLogRemoved || (hideSkipped && annotationWrapper.isSkipped) || annotationWrapper.isOCR; highlight.setCustomData('redacto-manager', true); highlight.setCustomData('redaction', annotationWrapper.isRedacted); highlight.setCustomData('skipped', annotationWrapper.isSkipped); highlight.setCustomData('changeLog', annotationWrapper.isChangeLogEntry); highlight.setCustomData('changeLogRemoved', annotationWrapper.isChangeLogRemoved); - highlight.setCustomData( - 'redactionColor', - this.getColor(activeViewer, 'redaction', 'redaction') - ); - highlight.setCustomData( - 'annotationColor', - this.getColor(activeViewer, annotationWrapper.superType, annotationWrapper.dictionary) - ); + highlight.setCustomData('redactionColor', this.getColor(activeViewer, 'redaction', 'redaction')); + highlight.setCustomData('annotationColor', this.getColor(activeViewer, annotationWrapper.superType, annotationWrapper.dictionary)); return highlight; } @@ -174,20 +139,12 @@ export class AnnotationDrawService { return new activeViewer.CoreControls.Math.Quad(x1, y1, x2, y2, x3, y3, x4, y4); } - private _rectanglesToQuads( - positions: Rectangle[], - activeViewer: WebViewerInstance, - pageNumber: number - ): any[] { + private _rectanglesToQuads(positions: Rectangle[], activeViewer: WebViewerInstance, pageNumber: number): any[] { const pageHeight = activeViewer.docViewer.getPageHeight(pageNumber); return positions.map(p => this._rectangleToQuad(p, activeViewer, pageHeight)); } - private _rectangleToQuad( - rectangle: Rectangle, - activeViewer: WebViewerInstance, - pageHeight: number - ): any { + private _rectangleToQuad(rectangle: Rectangle, activeViewer: WebViewerInstance, pageHeight: number): any { const x1 = rectangle.topLeft.x; const y1 = pageHeight - (rectangle.topLeft.y + rectangle.height); 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 d189d56fc..cf3192461 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 @@ -3,6 +3,8 @@ import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { SuperTypeSorter } from '@utils/sorters/super-type-sorter'; import { FilterModel } from '@shared/components/filters/popup-filter/model/filter.model'; import { handleCheckedValue } from '@shared/components/filters/popup-filter/utils/filter-utils'; +import { annotationTypesTranslations } from '../../../translations/annotation-types-translations'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Injectable() export class AnnotationProcessingService { @@ -11,7 +13,7 @@ export class AnnotationProcessingService { { key: 'with-comments', icon: 'red:comment', - label: 'filter-menu.with-comments', + label: _('filter-menu.with-comments'), checked: false, topLevelFilter: true, filters: [], @@ -20,12 +22,11 @@ export class AnnotationProcessingService { { key: 'with-reason-changes', icon: 'red:reason', - label: 'filter-menu.with-reason-changes', + label: _('filter-menu.with-reason-changes'), checked: false, topLevelFilter: true, filters: [], - checker: (annotation: AnnotationWrapper) => - annotation?.legalBasisChangeValue?.length > 0 + checker: (annotation: AnnotationWrapper) => annotation?.legalBasisChangeValue?.length > 0 } ]; } @@ -35,10 +36,7 @@ export class AnnotationProcessingService { const filters: FilterModel[] = []; annotations?.forEach(a => { - const topLevelFilter = - a.superType !== 'hint' && - a.superType !== 'redaction' && - a.superType !== 'recommendation'; + const topLevelFilter = a.superType !== 'hint' && a.superType !== 'redaction' && a.superType !== 'recommendation'; const key = topLevelFilter ? a.superType : a.superType + a.dictionary; const filter = filterMap.get(key); if (filter) { @@ -96,9 +94,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; @@ -127,16 +123,12 @@ export class AnnotationProcessingService { return obj; } - private _createParentFilter( - key: string, - filterMap: Map, - filters: FilterModel[] - ) { + private _createParentFilter(key: string, filterMap: Map, filters: FilterModel[]) { const filter: FilterModel = { key: key, topLevelFilter: true, matches: 1, - label: 'annotation-type.' + key, + label: annotationTypesTranslations[key], filters: [] }; filterMap.set(key, filter); @@ -155,10 +147,7 @@ export class AnnotationProcessingService { return filterBy ? flatFilters.filter(f => filterBy(f)) : flatFilters; } - private _matchesOne = ( - filters: FilterModel[], - condition: (filter: FilterModel) => boolean - ): boolean => { + private _matchesOne = (filters: FilterModel[], condition: (filter: FilterModel) => boolean): boolean => { if (filters.length === 0) return true; for (const filter of filters) { @@ -168,10 +157,7 @@ export class AnnotationProcessingService { return false; }; - private _matchesAll = ( - filters: FilterModel[], - condition: (filter: FilterModel) => boolean - ): boolean => { + private _matchesAll = (filters: FilterModel[], condition: (filter: FilterModel) => boolean): boolean => { if (filters.length === 0) return true; for (const filter of filters) { @@ -183,13 +169,9 @@ export class AnnotationProcessingService { private _checkByFilterKey = (filter: FilterModel, annotation: AnnotationWrapper) => { const superType = annotation.superType; - const isNotTopLevelFilter = - superType === 'hint' || superType === 'redaction' || superType === 'recommendation'; + const isNotTopLevelFilter = superType === 'hint' || superType === 'redaction' || superType === 'recommendation'; - return ( - filter.key === superType || - (filter.key === annotation.dictionary && isNotTopLevelFilter) - ); + return filter.key === superType || (filter.key === annotation.dictionary && isNotTopLevelFilter); }; private _sortAnnotations(annotations: AnnotationWrapper[]): AnnotationWrapper[] { 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 974f17ace..becdd9247 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 @@ -24,6 +24,7 @@ import { ChangeLegalBasisDialogComponent } from '../dialogs/change-legal-basis-d import { RecategorizeImageDialogComponent } from '../dialogs/recategorize-image-dialog/recategorize-image-dialog.component'; import { DialogService } from '@shared/services/dialog.service'; import { ComponentType } from '@angular/cdk/portal'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; const dialogConfig = { width: '662px', @@ -201,13 +202,13 @@ export class DossiersDialogService extends DialogService { const ref = this._dialog.open(ConfirmationDialogComponent, { ...dialogConfig, data: new ConfirmationDialogInput({ - title: 'confirmation-dialog.delete-dossier.title', + title: _('confirmation-dialog.delete-dossier.title'), titleColor: TitleColors.PRIMARY, - question: 'confirmation-dialog.delete-dossier.question', - // details: 'confirmation-dialog.delete-dossier.details', - confirmationText: 'confirmation-dialog.delete-dossier.confirmation-text', + question: _('confirmation-dialog.delete-dossier.question'), + // details: _('confirmation-dialog.delete-dossier.details'), + confirmationText: _('confirmation-dialog.delete-dossier.confirmation-text'), requireInput: true, - denyText: 'confirmation-dialog.delete-dossier.deny-text', + denyText: _('confirmation-dialog.delete-dossier.deny-text'), translateParams: { dossierName: dossier.dossierName, period: period } }) }); @@ -246,8 +247,8 @@ export class DossiersDialogService extends DialogService { const ref = this._dialog.open(ConfirmationDialogComponent, { ...dialogConfig, data: new ConfirmationDialogInput({ - title: 'confirmation-dialog.assign-file-to-me.title', - question: 'confirmation-dialog.assign-file-to-me.question' + title: _('confirmation-dialog.assign-file-to-me.title'), + question: _('confirmation-dialog.assign-file-to-me.question') }) }); ref.afterClosed().subscribe(result => { 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 102baff26..f457f781d 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 @@ -7,31 +7,19 @@ import { ManualRedactionControllerService } from '@redaction/red-ui-http'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; -import { Toaster } from '../../../services/toaster.service'; +import { Toaster } from '@services/toaster.service'; import { TranslateService } from '@ngx-translate/core'; import { tap } from 'rxjs/operators'; import { UserService } from '@services/user.service'; import { PermissionsService } from '@services/permissions.service'; - -type Mode = - | 'add' - | 'approve' - | 'remove' - | 'change-legal-basis' - | 'decline' - | 'request-remove' - | 'request-change-legal-basis' - | 'recategorize-image' - | 'request-image-recategorization' - | 'suggest' - | 'undo' - | 'force-redaction' - | 'request-force-redaction'; +import { AnnotationActionMode } from '../models/annotation-action-mode.model'; +import { annotationActionsTranslations } from '../translations/annotation-actions-translations'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Injectable() export class ManualAnnotationService { CONFIG: { - [key in Mode]: string; + [key in AnnotationActionMode]: string; }; constructor( @@ -60,7 +48,7 @@ export class ManualAnnotationService { }; } - _makeRequest(mode: Mode, body: any, secondParam: any = null, modifyDictionary = false) { + _makeRequest(mode: AnnotationActionMode, body: any, secondParam: any = null, modifyDictionary = false) { const obs = !secondParam ? this._manualRedactionControllerService[this.CONFIG[mode]]( body, @@ -123,7 +111,7 @@ export class ManualAnnotationService { // /manualRedaction/redaction/legalBasisChange // /manualRedaction/request/legalBasis changeLegalBasis(annotationId: string, legalBasis: string, comment?: string) { - const mode: Mode = this._permissionsService.isApprover() ? 'change-legal-basis' : 'request-change-legal-basis'; + const mode: AnnotationActionMode = this._permissionsService.isApprover() ? 'change-legal-basis' : 'request-change-legal-basis'; return this._makeRequest(mode, { annotationId, legalBasis, comment }); } @@ -131,7 +119,7 @@ export class ManualAnnotationService { // /manualRedaction/redaction/recategorize // /manualRedaction/request/recategorize recategorizeImage(annotationId: string, type: string, comment: string) { - const mode: Mode = this._permissionsService.isApprover() ? 'recategorize-image' : 'request-image-recategorization'; + const mode: AnnotationActionMode = this._permissionsService.isApprover() ? 'recategorize-image' : 'request-image-recategorization'; return this._makeRequest(mode, { annotationId, type, comment }); } @@ -139,7 +127,7 @@ export class ManualAnnotationService { // /manualRedaction/redaction/add // /manualRedaction/request/add addAnnotation(manualRedactionEntry: AddRedactionRequest) { - const mode: Mode = this._permissionsService.isApprover() ? 'add' : 'suggest'; + const mode: AnnotationActionMode = this._permissionsService.isApprover() ? 'add' : 'suggest'; return this._makeRequest(mode, manualRedactionEntry, null, manualRedactionEntry.addToDictionary); } @@ -147,7 +135,7 @@ export class ManualAnnotationService { // /manualRedaction/redaction/force // /manualRedaction/request/force forceRedaction(request: ForceRedactionRequest) { - const mode: Mode = this._permissionsService.isApprover() ? 'force-redaction' : 'request-force-redaction'; + const mode: AnnotationActionMode = this._permissionsService.isApprover() ? 'force-redaction' : 'request-force-redaction'; return this._makeRequest(mode, request); } @@ -166,7 +154,7 @@ export class ManualAnnotationService { // /manualRedaction/decline/remove // /manualRedaction/undo declineOrRemoveRequest(annotationWrapper: AnnotationWrapper) { - const mode: Mode = this._permissionsService.isApprover() ? 'decline' : 'undo'; + const mode: AnnotationActionMode = this._permissionsService.isApprover() ? 'decline' : 'undo'; return this._makeRequest(mode, annotationWrapper.id, null, annotationWrapper.isModifyDictionary); } @@ -174,7 +162,7 @@ export class ManualAnnotationService { // /manualRedaction/redaction/remove/ // /manualRedaction/request/remove/ removeOrSuggestRemoveAnnotation(annotationWrapper: AnnotationWrapper, removeFromDictionary: boolean = false) { - let mode: Mode, + let mode: AnnotationActionMode, body: any, removeDict = false; @@ -209,30 +197,27 @@ export class ManualAnnotationService { if (this._permissionsService.isApprover()) { switch (type) { case 'DICTIONARY': - return 'manual-annotation.dialog.header.dictionary'; + return _('manual-annotation.dialog.header.dictionary'); case 'FALSE_POSITIVE': - return 'manual-annotation.dialog.header.false-positive'; + return _('manual-annotation.dialog.header.false-positive'); case 'REDACTION': - return 'manual-annotation.dialog.header.redaction'; + return _('manual-annotation.dialog.header.redaction'); } } else { switch (type) { case 'DICTIONARY': - return 'manual-annotation.dialog.header.request-dictionary'; + return _('manual-annotation.dialog.header.request-dictionary'); case 'FALSE_POSITIVE': - return 'manual-annotation.dialog.header.request-false-positive'; + return _('manual-annotation.dialog.header.request-false-positive'); case 'REDACTION': - return 'manual-annotation.dialog.header.request-redaction'; + return _('manual-annotation.dialog.header.request-redaction'); } } } - private _getMessage(mode: Mode, modifyDictionary?: boolean, error: boolean = false) { - return ( - 'annotation-actions.message.' + - (modifyDictionary ? 'dictionary.' : 'manual-redaction.') + - mode + - (error ? '.error' : '.success') - ); + private _getMessage(mode: AnnotationActionMode, modifyDictionary?: boolean, error: boolean = false) { + const type = modifyDictionary ? 'dictionary' : 'manual-redaction'; + const resultType = error ? 'error' : 'success'; + return annotationActionsTranslations[type][mode][resultType]; } } 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 new file mode 100644 index 000000000..2679a24ad --- /dev/null +++ b/apps/red-ui/src/app/modules/dossier/translations/annotation-actions-translations.ts @@ -0,0 +1,86 @@ +import { AnnotationActionMode } from '../models/annotation-action-mode.model'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; + +type ActionType = { [key in AnnotationActionMode]?: { error: string; success: string } }; + +export const annotationActionsTranslations: { + dictionary: ActionType; + 'manual-redaction': ActionType; +} = { + dictionary: { + add: { + error: _('annotation-actions.message.dictionary.add.error'), + success: _('annotation-actions.message.dictionary.add.success') + }, + approve: { + error: _('annotation-actions.message.dictionary.approve.error'), + success: _('annotation-actions.message.dictionary.approve.success') + }, + decline: { + error: _('annotation-actions.message.dictionary.decline.error'), + success: _('annotation-actions.message.dictionary.decline.success') + }, + remove: { + error: _('annotation-actions.message.dictionary.remove.error'), + 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') + }, + suggest: { + error: _('annotation-actions.message.dictionary.suggest.error'), + success: _('annotation-actions.message.dictionary.suggest.success') + }, + undo: { + error: _('annotation-actions.message.dictionary.undo.error'), + 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') + }, + approve: { + error: _('annotation-actions.message.manual-redaction.approve.error'), + 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') + }, + decline: { + error: _('annotation-actions.message.manual-redaction.decline.error'), + 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') + }, + 'recategorize-image': { + error: _('annotation-actions.message.manual-redaction.recategorize-image.error'), + 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') + }, + 'request-force-redaction': { + error: _('annotation-actions.message.manual-redaction.request-force-redaction.error'), + 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') + }, + suggest: { + error: _('annotation-actions.message.manual-redaction.suggest.error'), + 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') + } + } +}; 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 new file mode 100644 index 000000000..7fd447e6e --- /dev/null +++ b/apps/red-ui/src/app/modules/dossier/translations/file-status-translations.ts @@ -0,0 +1,16 @@ +import { FileStatus } from '@redaction/red-ui-http'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; + +export const fileStatusTranslations: { [key in FileStatus.StatusEnum]: string } = { + APPROVED: _('file-status.approved'), + ERROR: _('file-status.error'), + EXCLUDED: _('file-status.excluded'), + FULLREPROCESS: _('file-status.full-reprocess'), + OCR_PROCESSING: _('file-status.ocr-processing'), + PROCESSING: _('file-status.processing'), + REPROCESS: _('file-status.reprocess'), + UNASSIGNED: _('file-status.unassigned'), + UNDER_APPROVAL: _('file-status.under-approval'), + UNDER_REVIEW: _('file-status.under-review'), + 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 new file mode 100644 index 000000000..5ca0276f3 --- /dev/null +++ b/apps/red-ui/src/app/modules/dossier/translations/image-categories-translations.ts @@ -0,0 +1,9 @@ +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import { ImageCategory } from '../models/image-category.model'; + +export const imageCategoriesTranslations: { [key in ImageCategory]: string } = { + signature: _('image-category.signature'), + logo: _('image-category.logo'), + formula: _('image-category.formula'), + 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 new file mode 100644 index 000000000..eea3c5668 --- /dev/null +++ b/apps/red-ui/src/app/modules/dossier/translations/workload-translations.ts @@ -0,0 +1,11 @@ +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; + +export const workloadTranslations: { [key: string]: string } = { + analysis: _('filter.analysis'), + hint: _('filter.hint'), + image: _('filter.image'), + none: _('filter.none'), + redaction: _('filter.redaction'), + suggestion: _('filter.suggestion'), + updated: _('filter.updated') +}; 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 24b130efb..f17133c9e 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 @@ -3,13 +3,7 @@ import { stampPDFPage } from '../../../utils/page-stamper'; const processPage = async (pageNumber, document1, document2, mergedDocument, PDFNet) => { const document1PageCount = await document1.getPageCount(); if (document1PageCount >= pageNumber) { - await mergedDocument.insertPages( - pageNumber * 2, - document1, - pageNumber, - pageNumber, - PDFNet.PDFDoc.InsertFlag.e_none - ); + await mergedDocument.insertPages(pageNumber * 2, document1, pageNumber, pageNumber, PDFNet.PDFDoc.InsertFlag.e_none); } else { const pageToCopy = await document2.getPage(pageNumber); const blankPage = await mergedDocument.pageCreate(await pageToCopy.getCropBox()); @@ -49,9 +43,7 @@ export const loadCompareDocumentWrapper = async ( await processPage(idx, compareDocument, currentDocument, mergedDocument, PDFNet); } - const buffer = await mergedDocument.saveMemoryBuffer( - PDFNet.SDFDoc.SaveOptions.e_linearized - ); + const buffer = await mergedDocument.saveMemoryBuffer(PDFNet.SDFDoc.SaveOptions.e_linearized); const mergedDocumentBuffer = new Blob([buffer], { type: 'application/pdf' diff --git a/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts b/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts index 990211374..4966a26d1 100644 --- a/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts +++ b/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts @@ -1,13 +1,13 @@ import { Component, Injector, OnDestroy, ViewChild } from '@angular/core'; import { SortingOrders, SortingService } from '@services/sorting.service'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; -import { FilterService } from '../services/filter.service'; import { SearchService } from '../services/search.service'; import { ScreenStateService } from '../services/screen-state.service'; import { combineLatest, Observable } from 'rxjs'; import { AutoUnsubscribeComponent } from './auto-unsubscribe.component'; import { distinctUntilChanged, map } from 'rxjs/operators'; -import { PermissionsService } from '../../../services/permissions.service'; +import { PermissionsService } from '@services/permissions.service'; +import { FilterService } from '../services/filter.service'; @Component({ template: '' }) export abstract class BaseListingComponent extends AutoUnsubscribeComponent implements OnDestroy { @@ -23,6 +23,7 @@ export abstract class BaseListingComponent extends AutoUnsubscribeComponent i readonly sortedDisplayedEntities$: Observable; readonly noMatch$: Observable; + protected readonly _tableHeaderLabel: string; /** * Key used in the *trackBy* function with **ngFor* or **cdkVirtualFor* * and in the default sorting and as the search field @@ -44,6 +45,29 @@ export abstract class BaseListingComponent extends AutoUnsubscribeComponent i this.noMatch$ = this._noMatch$; } + get tableHeaderLabel(): string { + if (!this._tableHeaderLabel) { + throw new Error('Not implemented'); + } + + return this._tableHeaderLabel; + } + + get allEntities(): T[] { + return this.screenStateService.allEntities; + } + + private get _sortedDisplayedEntities$(): Observable { + return this.screenStateService.displayedEntities$.pipe(map(entities => this.sortingService.defaultSort(entities))); + } + + private get _noMatch$(): Observable { + return combineLatest([this.screenStateService.allEntitiesLength$, this.screenStateService.displayedLength$]).pipe( + map(([hasEntities, hasDisplayedEntities]) => hasEntities && !hasDisplayedEntities), + distinctUntilChanged() + ); + } + setInitialConfig() { this.sortingService.setSortingOption({ column: this._primaryKey, @@ -56,21 +80,6 @@ export abstract class BaseListingComponent extends AutoUnsubscribeComponent i super.ngOnDestroy(); } - private get _sortedDisplayedEntities$(): Observable { - return this.screenStateService.displayedEntities$.pipe(map(entities => this.sortingService.defaultSort(entities))); - } - - get allEntities(): T[] { - return this.screenStateService.allEntities; - } - - private get _noMatch$(): Observable { - return combineLatest([this.screenStateService.allEntitiesLength$, this.screenStateService.displayedLength$]).pipe( - map(([hasEntities, hasDisplayedEntities]) => hasEntities && !hasDisplayedEntities), - distinctUntilChanged() - ); - } - canBulkDelete$(hasPermission = true): Observable { return this.screenStateService.areSomeEntitiesSelected$.pipe( map(areSomeEntitiesSelected => areSomeEntitiesSelected && hasPermission), diff --git a/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.html b/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.html index ebd73b821..ee83a886d 100644 --- a/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.html +++ b/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.html @@ -11,26 +11,21 @@
- + diff --git a/apps/red-ui/src/app/modules/shared/components/buttons/chevron-button/chevron-button.component.html b/apps/red-ui/src/app/modules/shared/components/buttons/chevron-button/chevron-button.component.html index 6c26d9bb7..c15aa6378 100644 --- a/apps/red-ui/src/app/modules/shared/components/buttons/chevron-button/chevron-button.component.html +++ b/apps/red-ui/src/app/modules/shared/components/buttons/chevron-button/chevron-button.component.html @@ -1,5 +1,5 @@
diff --git a/apps/red-ui/src/app/modules/shared/components/buttons/chevron-button/chevron-button.component.ts b/apps/red-ui/src/app/modules/shared/components/buttons/chevron-button/chevron-button.component.ts index 6c1329533..c6b9438ee 100644 --- a/apps/red-ui/src/app/modules/shared/components/buttons/chevron-button/chevron-button.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/buttons/chevron-button/chevron-button.component.ts @@ -7,7 +7,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; changeDetection: ChangeDetectionStrategy.OnPush }) export class ChevronButtonComponent { - @Input() text: string; + @Input() label: string; @Input() showDot = false; @Input() primary = false; } diff --git a/apps/red-ui/src/app/modules/shared/components/buttons/circle-button/circle-button.component.html b/apps/red-ui/src/app/modules/shared/components/buttons/circle-button/circle-button.component.html index 95bf94fb5..84679d1c8 100644 --- a/apps/red-ui/src/app/modules/shared/components/buttons/circle-button/circle-button.component.html +++ b/apps/red-ui/src/app/modules/shared/components/buttons/circle-button/circle-button.component.html @@ -1,8 +1,4 @@ -
+
diff --git a/apps/red-ui/src/app/modules/shared/components/buttons/icon-button/icon-button.component.ts b/apps/red-ui/src/app/modules/shared/components/buttons/icon-button/icon-button.component.ts index 0faab82ab..92737b00f 100644 --- a/apps/red-ui/src/app/modules/shared/components/buttons/icon-button/icon-button.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/buttons/icon-button/icon-button.component.ts @@ -1,6 +1,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; export type IconButtonType = 'default' | 'show-bg' | 'primary'; + export enum IconButtonTypes { DEFAULT = 'default', SHOW_BG = 'show-bg', @@ -15,7 +16,7 @@ export enum IconButtonTypes { }) export class IconButtonComponent { @Input() icon: string; - @Input() text: string; + @Input() label: string; @Input() showDot = false; @Input() disabled = false; @Input() type: IconButtonType = IconButtonTypes.DEFAULT; diff --git a/apps/red-ui/src/app/modules/shared/components/buttons/user-button/user-button.component.html b/apps/red-ui/src/app/modules/shared/components/buttons/user-button/user-button.component.html index e5211ef5f..09fa1a777 100644 --- a/apps/red-ui/src/app/modules/shared/components/buttons/user-button/user-button.component.html +++ b/apps/red-ui/src/app/modules/shared/components/buttons/user-button/user-button.component.html @@ -1,9 +1,5 @@
diff --git a/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.html b/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.html index 39f6e5eda..6f8249aac 100644 --- a/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.html +++ b/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.html @@ -1,9 +1,4 @@ -
+
diff --git a/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts b/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts index 5c8f4e60a..1371ac55e 100644 --- a/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts @@ -1,12 +1,4 @@ -import { - Component, - ElementRef, - HostBinding, - Input, - OnChanges, - OnInit, - ViewChild -} from '@angular/core'; +import { Component, ElementRef, HostBinding, Input, OnChanges, OnInit, ViewChild } from '@angular/core'; @Component({ selector: 'redaction-round-checkbox', diff --git a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html index 7b97cafac..22eb999b5 100644 --- a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html +++ b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html @@ -1,5 +1 @@ - + 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 2bffab9f9..3fc06e497 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 @@ -19,14 +19,8 @@ export class DictionaryAnnotationIconComponent implements OnChanges { ngOnChanges(): void { if (this.dictionaryKey) { - const typeValue: TypeValueWrapper = this._appStateService.getDictionaryTypeValue( - this.dictionaryKey, - this.dossierTemplateId - ); - this.color = this._appStateService.getDictionaryColor( - this.dictionaryKey, - this.dossierTemplateId - ); + const typeValue: TypeValueWrapper = this._appStateService.getDictionaryTypeValue(this.dictionaryKey, this.dossierTemplateId); + this.color = this._appStateService.getDictionaryColor(this.dictionaryKey, this.dossierTemplateId); this.type = typeValue.hint ? 'circle' : 'square'; this.label = this.dictionaryKey[0].toUpperCase(); } diff --git a/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.html b/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.html index 6e6fb7eae..3f45bd76a 100644 --- a/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.html +++ b/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.html @@ -6,7 +6,7 @@ (keyup)="searchChanged(searchText)" [(ngModel)]="searchText" [class.with-matches]="searchText.length > 0" - placeholder="{{ 'dictionary-overview.search' | translate }}" + [placeholder]="'dictionary-overview.search' | translate" type="text" /> @@ -18,21 +18,9 @@
{{ currentMatch + '/' + findMatches.length }}
- - - + + +
@@ -43,9 +31,7 @@
- {{ - selectDossier.name | translate - }} + {{ selectDossier.name | translate }} {{ dossier.name }} @@ -75,21 +61,13 @@
-
+
-
+
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 73a37074e..3bdaac889 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 @@ -5,6 +5,7 @@ import { debounce } from '@utils/debounce'; import { Observable } from 'rxjs'; import { map, take } from 'rxjs/operators'; import { DossierWrapper } from '@state/model/dossier.wrapper'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import ICodeEditor = monaco.editor.ICodeEditor; import IDiffEditor = monaco.editor.IDiffEditor; import IModelDeltaDecoration = monaco.editor.IModelDeltaDecoration; @@ -37,14 +38,13 @@ export class DictionaryManagerComponent implements OnChanges, OnInit { showDiffEditor = false; searchText = ''; - selectDossier = { name: 'dictionary-overview.compare.select-dossier' }; + selectDossier = { name: _('dictionary-overview.compare.select-dossier') }; compare: false; private _codeEditor: ICodeEditor; private _diffEditor: IDiffEditor; private _decorations: string[] = []; private _searchDecorations: string[] = []; - private _dossier: DossierWrapper = this.selectDossier as DossierWrapper; constructor( private readonly _dictionaryControllerService: DictionaryControllerService, @@ -53,14 +53,7 @@ export class DictionaryManagerComponent implements OnChanges, OnInit { this.currentEntries = this.initialEntries; } - ngOnInit(): void { - this.editorOptions = { - theme: 'vs', - language: 'text/plain', - automaticLayout: true, - readOnly: !this.canEdit - }; - } + private _dossier: DossierWrapper = this.selectDossier as DossierWrapper; get dossier() { return this._dossier; @@ -80,8 +73,7 @@ export class DictionaryManagerComponent implements OnChanges, OnInit { .subscribe(entries => { this.diffEditorText = entries; this.showDiffEditor = true; - if (this.showDiffEditor) - this._diffEditor?.getOriginalEditor().setValue(this.diffEditorText); + if (this.showDiffEditor) this._diffEditor?.getOriginalEditor().setValue(this.diffEditorText); }); } @@ -102,6 +94,15 @@ export class DictionaryManagerComponent implements OnChanges, OnInit { return this.currentEntries.toString() !== this.initialEntries.toString(); } + ngOnInit(): void { + this.editorOptions = { + theme: 'vs', + language: 'text/plain', + automaticLayout: true, + readOnly: !this.canEdit + }; + } + onDiffEditorInit(editor: IDiffEditor): void { this._diffEditor = editor; } @@ -136,9 +137,7 @@ export class DictionaryManagerComponent implements OnChanges, OnInit { @debounce() codeEditorTextChanged() { - const newDecorations = this.currentEntries - .filter(entry => this._isNew(entry)) - .map(entry => this._getDecoration(entry)); + const newDecorations = this.currentEntries.filter(entry => this._isNew(entry)).map(entry => this._getDecoration(entry)); this._decorations = this._codeEditor.deltaDecorations(this._decorations, newDecorations); } @@ -162,13 +161,11 @@ export class DictionaryManagerComponent implements OnChanges, OnInit { } private _applySearchDecorations() { - this._searchDecorations = - this._codeEditor?.deltaDecorations(this._searchDecorations, []) || []; + this._searchDecorations = this._codeEditor?.deltaDecorations(this._searchDecorations, []) || []; const decorations = this.findMatches.map(match => this._getSearchDecoration(match)); - this._searchDecorations = - this._codeEditor?.deltaDecorations(this._searchDecorations, decorations) || []; + this._searchDecorations = this._codeEditor?.deltaDecorations(this._searchDecorations, decorations) || []; } private _getMatches(text: string): FindMatch[] { @@ -199,15 +196,8 @@ export class DictionaryManagerComponent implements OnChanges, OnInit { this._codeEditor.revealLineInCenter(range.startLineNumber, SMOOTH_SCROLL); } - private _onDossierChanged({ - dossierId, - dossierTemplateId - }: DossierWrapper): Observable { - const dictionary$ = this._dictionaryControllerService.getDictionaryForType( - dossierTemplateId, - 'dossier_redaction', - dossierId - ); + private _onDossierChanged({ dossierId, dossierTemplateId }: DossierWrapper): Observable { + const dictionary$ = this._dictionaryControllerService.getDictionaryForType(dossierTemplateId, 'dossier_redaction', dossierId); return dictionary$.pipe(map(data => this._toString(data.entries))); } diff --git a/apps/red-ui/src/app/modules/shared/components/empty-state/empty-state.component.html b/apps/red-ui/src/app/modules/shared/components/empty-state/empty-state.component.html index c8f5095d2..71fedfada 100644 --- a/apps/red-ui/src/app/modules/shared/components/empty-state/empty-state.component.html +++ b/apps/red-ui/src/app/modules/shared/components/empty-state/empty-state.component.html @@ -10,12 +10,7 @@
-
- +
{{ text }}
+ +
diff --git a/apps/red-ui/src/app/modules/shared/components/empty-state/empty-state.component.ts b/apps/red-ui/src/app/modules/shared/components/empty-state/empty-state.component.ts index 6b3b53f12..e3376736c 100644 --- a/apps/red-ui/src/app/modules/shared/components/empty-state/empty-state.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/empty-state/empty-state.component.ts @@ -7,14 +7,13 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output changeDetection: ChangeDetectionStrategy.OnPush }) export class EmptyStateComponent implements OnInit { - @Input() screen: string; @Input() text: string; @Input() icon: string; @Input() showButton = true; @Input() buttonIcon = 'red:plus'; + @Input() buttonLabel: string; @Input() horizontalPadding = 100; @Input() verticalPadding = 120; - @Input() type: 'no-data' | 'no-match' = 'no-data'; @Output() action = new EventEmitter(); ngOnInit(): void { diff --git a/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/model/filter.model.ts b/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/model/filter.model.ts index 7a2d39989..16686cf98 100644 --- a/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/model/filter.model.ts +++ b/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/model/filter.model.ts @@ -1,7 +1,6 @@ export interface FilterModel { key: string; label?: string; - labelParams?: object; icon?: string; checked?: boolean; indeterminate?: boolean; diff --git a/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.html b/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.html index b9d7671a4..ab78f2597 100644 --- a/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.html +++ b/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.html @@ -1,24 +1,19 @@ - +
@@ -38,11 +33,11 @@
@@ -53,11 +48,11 @@
@@ -68,23 +63,13 @@ {{ _(filter)?.label }}
- +
- -
-
-   +
+
 
- +
-
- +
+ - +
diff --git a/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts b/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts index 296f0219d..943b7a21b 100644 --- a/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts @@ -27,7 +27,7 @@ export class PopupFilterComponent implements OnChanges { @Input() actionsTemplate: TemplateRef; @Input() primaryFilters: FilterModel[] = []; @Input() secondaryFilters: FilterModel[] = []; - @Input() filterLabel = this._translateService.instant('filter-menu.label'); + @Input() filterLabel; @Input() icon: string; @Input() chevron = false; diff --git a/apps/red-ui/src/app/modules/shared/components/filters/quick-filters/quick-filters.component.html b/apps/red-ui/src/app/modules/shared/components/filters/quick-filters/quick-filters.component.html index a35b5fef6..533c9d10a 100644 --- a/apps/red-ui/src/app/modules/shared/components/filters/quick-filters/quick-filters.component.html +++ b/apps/red-ui/src/app/modules/shared/components/filters/quick-filters/quick-filters.component.html @@ -4,5 +4,5 @@ [class.active]="filter.checked" class="quick-filter" > - {{ filter.label | translate: filter.labelParams }} + {{ filter.label }}
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 c2401b8a8..ce0e9d4cd 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 @@ -1,11 +1,4 @@ -import { - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - Input, - OnChanges, - OnDestroy -} from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy } from '@angular/core'; import { UserService } from '@services/user.service'; import { User } from '@redaction/red-ui-http'; import { TranslateService } from '@ngx-translate/core'; @@ -78,12 +71,12 @@ export class InitialsAvatarComponent implements OnChanges, OnDestroy { this.user = this._userService.getUserById(this.userId); this.displayName = this._userService.getNameForId(this.userId); + this.initials = this._getInitials(); + this.colorClass = this._colorClass; + if (this.showYou && this._isCurrentUser) { this.displayName += ` (${this._translateService.instant('initials-avatar.you')})`; } - - this.initials = this._getInitials(); - this.colorClass = this._colorClass; } detectChanges(): void { diff --git a/apps/red-ui/src/app/modules/shared/components/input-with-action/input-with-action.component.html b/apps/red-ui/src/app/modules/shared/components/input-with-action/input-with-action.component.html index 9dcc0a08c..a5cc57156 100644 --- a/apps/red-ui/src/app/modules/shared/components/input-with-action/input-with-action.component.html +++ b/apps/red-ui/src/app/modules/shared/components/input-with-action/input-with-action.component.html @@ -3,12 +3,12 @@ - + {{ hint }} diff --git a/apps/red-ui/src/app/modules/shared/components/page-header/page-header.component.html b/apps/red-ui/src/app/modules/shared/components/page-header/page-header.component.html index 7f6fa8bb4..696c58c36 100644 --- a/apps/red-ui/src/app/modules/shared/components/page-header/page-header.component.html +++ b/apps/red-ui/src/app/modules/shared/components/page-header/page-header.component.html @@ -1,38 +1,38 @@
diff --git a/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts b/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts index 403caff1f..47f4e943b 100644 --- a/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts +++ b/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts @@ -1,6 +1,7 @@ import { Component, HostListener, Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { TranslateService } from '@ngx-translate/core'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; export type TitleColor = 'default' | 'primary'; @@ -20,13 +21,13 @@ export class ConfirmationDialogInput { translateParams?: Record; constructor(options?: ConfirmationDialogInput) { - this.title = options?.title || 'common.confirmation-dialog.title'; + this.title = options?.title || _('common.confirmation-dialog.title'); this.titleColor = options?.titleColor || TitleColors.DEFAULT; - this.question = options?.question || 'common.confirmation-dialog.description'; + this.question = options?.question || _('common.confirmation-dialog.description'); this.details = options?.details || ''; - this.confirmationText = options?.confirmationText || 'common.confirmation-dialog.confirm'; + this.confirmationText = options?.confirmationText || _('common.confirmation-dialog.confirm'); this.requireInput = options?.requireInput || false; - this.denyText = options?.denyText || 'common.confirmation-dialog.deny'; + this.denyText = options?.denyText || _('common.confirmation-dialog.deny'); this.translateParams = options?.translateParams || {}; } } @@ -39,7 +40,6 @@ export class ConfirmationDialogComponent { config: ConfirmationDialogInput; inputValue = ''; readonly inputLabel: string; - private readonly _inputLabelKey = 'confirmation-dialog.delete-dossier.input-label'; constructor( private readonly _dialogRef: MatDialogRef, @@ -49,7 +49,7 @@ export class ConfirmationDialogComponent { this.config = _confirmationDialogInput ?? new ConfirmationDialogInput(); this.config = this.translate(this.config); this.inputLabel = - this.translate(this._inputLabelKey) + ` '${this.config.confirmationText}'`; + this._translateService.instant('confirmation-dialog.delete-dossier.input-label') + ` '${this.config.confirmationText}'`; } get isDeleteAction() { @@ -78,12 +78,9 @@ export class ConfirmationDialogComponent { translate(obj: T): T { const translateKeys = ['title', 'question', 'details', 'confirmationText', 'denyText']; - if (typeof obj === 'string') - return this._translateService.instant(obj, this.config.translateParams); + if (typeof obj === 'string') return this._translateService.instant(obj, this.config.translateParams); - const stringKeys = Object.keys(obj).filter( - key => typeof key === 'string' && !!obj[key] && translateKeys.includes(key) - ); + const stringKeys = Object.keys(obj).filter(key => typeof key === 'string' && !!obj[key] && translateKeys.includes(key)); stringKeys.forEach(key => (obj[key] = this.translate(obj[key]))); return obj; diff --git a/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts b/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts index 8fb57ac82..d0c832652 100644 --- a/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts +++ b/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts @@ -10,10 +10,7 @@ export class HasScrollbarDirective implements AfterContentChecked { constructor(private readonly _elementRef: ElementRef) {} get hasScrollbar() { - return ( - this._elementRef?.nativeElement.clientHeight < - this._elementRef?.nativeElement.scrollHeight - ); + return this._elementRef?.nativeElement.clientHeight < this._elementRef?.nativeElement.scrollHeight; } ngAfterContentChecked() { 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 4de9e5b87..6b0a34b6f 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 @@ -10,20 +10,12 @@ const MINUTES_IN_AN_HOUR = 60; name: 'date' }) export class DatePipe extends BaseDatePipe implements PipeTransform { - constructor( - @Inject(LOCALE_ID) private readonly _locale: string, - private readonly _translateService: TranslateService - ) { + constructor(@Inject(LOCALE_ID) private readonly _locale: string, private readonly _translateService: TranslateService) { super(_locale); } transform(value: null | undefined, format?: string, timezone?: string, locale?: string): null; - transform( - value: Date | string | number | null | undefined, - format?: string, - timezone?: string, - locale?: string - ): string | null; + transform(value: Date | string | number | null | undefined, format?: string, timezone?: string, locale?: string): string | null; transform(value: any, format?: string, timezone?: string, locale?: string): string { if (format === 'timeFromNow') return this._getTimeFromNow(value); return super.transform(value, format, timezone, locale); @@ -39,24 +31,17 @@ export class DatePipe extends BaseDatePipe implements PipeTransform { const minutesFromNow = date.diff(now, 'minutes'); const minutesLeft = minutesFromNow - HOURS_IN_A_DAY * MINUTES_IN_AN_HOUR * daysLeft; - if (daysLeft === 0 && hoursLeft === 0 && minutesLeft > 0) - return this._translate('time.less-than-an-hour'); + if (daysLeft === 0 && hoursLeft === 0 && minutesLeft > 0) return this._translateService.instant('time.less-than-an-hour'); - const hoursSuffix = this._translate(`time.hour${hoursLeft === 1 ? '' : 's'}`); - const hoursDisplay = `${hoursLeft} ${hoursSuffix}`; + const hoursDisplay = this._translateService.instant('time.hours', { hours: hoursLeft }); if (daysLeft === 0 && hoursLeft > 0) return hoursDisplay; - const daysSuffix = this._translate(`time.day${daysLeft === 1 ? '' : 's'}`); - const daysDisplay = `${daysLeft} ${daysSuffix}`; + const daysDisplay = this._translateService.instant('time.days', { days: daysLeft }); if (daysLeft > 0 && hoursLeft > 0) return `${daysDisplay} ${hoursDisplay}`; if (daysLeft > 0) return daysDisplay; - return this._translate(`time.no-time-left`); - } - - private _translate(value: string, params?: { [key: string]: string }) { - return this._translateService.instant(value, params); + return this._translateService.instant(`time.no-time-left`); } } diff --git a/apps/red-ui/src/app/modules/shared/pipes/sort-by.pipe.ts b/apps/red-ui/src/app/modules/shared/pipes/sort-by.pipe.ts index f9275b187..bb2ade371 100644 --- a/apps/red-ui/src/app/modules/shared/pipes/sort-by.pipe.ts +++ b/apps/red-ui/src/app/modules/shared/pipes/sort-by.pipe.ts @@ -1,5 +1,5 @@ import { Pipe, PipeTransform } from '@angular/core'; -import { SortingService } from '../../../services/sorting.service'; +import { SortingService } from '@services/sorting.service'; @Pipe({ name: 'sortBy' }) export class SortByPipe implements PipeTransform { diff --git a/apps/red-ui/src/app/modules/shared/services/dialog.service.ts b/apps/red-ui/src/app/modules/shared/services/dialog.service.ts index d821b264c..1714cc862 100644 --- a/apps/red-ui/src/app/modules/shared/services/dialog.service.ts +++ b/apps/red-ui/src/app/modules/shared/services/dialog.service.ts @@ -26,13 +26,7 @@ export abstract class DialogService { protected constructor(protected readonly _dialog: MatDialog) {} - openDialog( - type: T, - $event: MouseEvent, - data: any, - cb?: Function, - finallyCb?: Function - ): MatDialogRef { + openDialog(type: T, $event: MouseEvent, data: any, cb?: Function, finallyCb?: Function): MatDialogRef { const config = this._config[type]; $event?.stopPropagation(); diff --git a/apps/red-ui/src/app/modules/shared/services/dictionary-save.service.ts b/apps/red-ui/src/app/modules/shared/services/dictionary-save.service.ts index 5bce425e3..87523196d 100644 --- a/apps/red-ui/src/app/modules/shared/services/dictionary-save.service.ts +++ b/apps/red-ui/src/app/modules/shared/services/dictionary-save.service.ts @@ -1,8 +1,9 @@ import { Injectable } from '@angular/core'; import { Observable, throwError } from 'rxjs'; -import { Toaster } from '../../../services/toaster.service'; +import { Toaster } from '@services/toaster.service'; import { DictionaryControllerService } from '@redaction/red-ui-http'; import { tap } from 'rxjs/operators'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; const MIN_WORD_LENGTH = 2; @@ -39,13 +40,13 @@ export class DictionarySaveService { return obs.pipe( tap( () => { - if (showToast) this._toaster.success('dictionary-overview.success.generic'); + if (showToast) 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'); + this._toaster.error(_('dictionary-overview.error.entries-too-short')); return throwError('Entries too short'); } diff --git a/apps/red-ui/src/app/modules/shared/services/filter.service.ts b/apps/red-ui/src/app/modules/shared/services/filter.service.ts index d849f8047..73fd37adc 100644 --- a/apps/red-ui/src/app/modules/shared/services/filter.service.ts +++ b/apps/red-ui/src/app/modules/shared/services/filter.service.ts @@ -9,7 +9,6 @@ import { distinctUntilChanged, map, switchMap } from 'rxjs/operators'; export class FilterService { private readonly _filterGroups$ = new BehaviorSubject([]); private readonly _refresh$ = new BehaviorSubject(null); - readonly filterGroups$ = this._refresh$.pipe(switchMap(() => this._filterGroups$.asObservable())); readonly showResetFilters$ = this._showResetFilters$; @@ -17,6 +16,14 @@ export class FilterService { return Object.values(this._filterGroups$.getValue()); } + private get _showResetFilters$(): Observable { + return this.filterGroups$.pipe( + map(all => this._toFlatFilters(all)), + map(f => !!f.find(el => el.checked)), + distinctUntilChanged() + ); + } + refresh(): void { this._refresh$.next(null); } @@ -65,14 +72,6 @@ export class FilterService { this.refresh(); } - private get _showResetFilters$(): Observable { - return this.filterGroups$.pipe( - map(all => this._toFlatFilters(all)), - map(f => !!f.find(el => el.checked)), - distinctUntilChanged() - ); - } - private _toFlatFilters(entities: FilterGroup[]): FilterModel[] { const flatChildren = (filters: FilterModel[]) => (filters ?? []).reduce((acc, f) => [...acc, ...(f?.filters ?? [])], []); diff --git a/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts b/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts index 57279b1f8..4420d8c9e 100644 --- a/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts +++ b/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts @@ -46,36 +46,6 @@ export class ScreenStateService { return Object.values(this._displayedEntities$.getValue()); } - setEntities(newEntities: Partial): void { - this._allEntities$.next(newEntities); - } - - setSelectedEntities(newEntities: Partial): void { - this._selectedEntities$.next(newEntities); - } - - isSelected(entity: T): boolean { - return this.selectedEntities.indexOf(entity) !== -1; - } - - selectEntities(entities?: T[]): void { - if (entities !== undefined && entities !== null && entities.length > 0) { - return entities.forEach(entity => this._selectOne(entity)); - } - return this._selectAll(); - } - - updateSelection(): void { - const items = this.displayedEntities.filter(item => this.selectedEntities.includes(item)); - this.setSelectedEntities(items); - } - - logCurrentState(): void { - console.log('Entities', this.allEntities); - console.log('Displayed', this.displayedEntities); - console.log('Selected', this.selectedEntities); - } - get _getDisplayedEntities$(): Observable { const filterGroups$ = this._filterService.filterGroups$; const searchValue$ = this._searchService.valueChanges$; @@ -133,6 +103,40 @@ export class ScreenStateService { ); } + private get _allEntitiesSelected() { + return this.displayedEntities.length !== 0 && this.displayedEntities.length === this.selectedEntities.length; + } + + setEntities(newEntities: Partial): void { + this._allEntities$.next(newEntities); + } + + setSelectedEntities(newEntities: Partial): void { + this._selectedEntities$.next(newEntities); + } + + isSelected(entity: T): boolean { + return this.selectedEntities.indexOf(entity) !== -1; + } + + selectEntities(entities?: T[]): void { + if (entities !== undefined && entities !== null && entities.length > 0) { + return entities.forEach(entity => this._selectOne(entity)); + } + return this._selectAll(); + } + + updateSelection(): void { + const items = this.displayedEntities.filter(item => this.selectedEntities.includes(item)); + this.setSelectedEntities(items); + } + + logCurrentState(): void { + console.log('Entities', this.allEntities); + console.log('Displayed', this.displayedEntities); + console.log('Selected', this.selectedEntities); + } + private _selectOne(entity: T): void { const currentEntityIdx = this.selectedEntities.indexOf(entity); if (currentEntityIdx === -1) { @@ -145,8 +149,4 @@ export class ScreenStateService { if (this._allEntitiesSelected) return this.setSelectedEntities([]); this.setSelectedEntities(this.displayedEntities); } - - private get _allEntitiesSelected() { - return this.displayedEntities.length !== 0 && this.displayedEntities.length === this.selectedEntities.length; - } } diff --git a/apps/red-ui/src/app/modules/shared/services/search.service.ts b/apps/red-ui/src/app/modules/shared/services/search.service.ts index e4d32014f..d0049343c 100644 --- a/apps/red-ui/src/app/modules/shared/services/search.service.ts +++ b/apps/red-ui/src/app/modules/shared/services/search.service.ts @@ -4,16 +4,22 @@ import { startWith } from 'rxjs/operators'; @Injectable() export class SearchService { - private _searchKey: string; - readonly searchForm = this._formBuilder.group({ query: [''] }); - readonly valueChanges$ = this.searchForm.get('query').valueChanges.pipe(startWith('')); + private _searchKey: string; constructor(private readonly _formBuilder: FormBuilder) {} + get searchValue(): string { + return this.searchForm.get('query').value; + } + + set searchValue(value: string) { + this.searchForm.patchValue({ query: value }); + } + searchIn(entities: T[]) { if (!this._searchKey) return entities; @@ -25,14 +31,6 @@ export class SearchService { this._searchKey = value; } - get searchValue(): string { - return this.searchForm.get('query').value; - } - - set searchValue(value: string) { - this.searchForm.patchValue({ query: value }); - } - reset(): void { this.searchForm.reset({ query: '' }, { emitEvent: true }); } diff --git a/apps/red-ui/src/app/modules/upload-download/dialogs/overwrite-files-dialog/overwrite-files-dialog.component.html b/apps/red-ui/src/app/modules/upload-download/dialogs/overwrite-files-dialog/overwrite-files-dialog.component.html index 0cc5b1431..5e0191a28 100644 --- a/apps/red-ui/src/app/modules/upload-download/dialogs/overwrite-files-dialog/overwrite-files-dialog.component.html +++ b/apps/red-ui/src/app/modules/upload-download/dialogs/overwrite-files-dialog/overwrite-files-dialog.component.html @@ -4,12 +4,7 @@

- + {{ 'overwrite-files-dialog.options.remember' | translate }}
@@ -23,13 +18,9 @@ > -
+
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 feb65ed38..e045fab1e 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 @@ -15,13 +15,7 @@ import { FileDropOverlayService } from './services/file-drop-overlay.service'; imports: [CommonModule, SharedModule, OverlayModule], declarations: [FileDropComponent, UploadStatusOverlayComponent, OverwriteFilesDialogComponent], entryComponents: [FileDropComponent, UploadStatusOverlayComponent], - providers: [ - UploadDownloadDialogService, - FileUploadService, - FileDownloadService, - StatusOverlayService, - FileDropOverlayService - ], + providers: [UploadDownloadDialogService, FileUploadService, FileDownloadService, StatusOverlayService, FileDropOverlayService], exports: [FileDropComponent, UploadStatusOverlayComponent] }) export class FileUploadDownloadModule {} diff --git a/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts b/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts index 4c38d2973..9d1742de0 100644 --- a/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts +++ b/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts @@ -6,15 +6,8 @@ export class DownloadStatusWrapper { constructor(private _downloadStatus: DownloadStatus) {} get size() { - const i = - this._downloadStatus.fileSize === 0 - ? 0 - : Math.floor(Math.log(this._downloadStatus.fileSize) / Math.log(1024)); - return ( - (this._downloadStatus.fileSize / Math.pow(1024, i)).toFixed(2) + - ' ' + - ['B', 'kB', 'MB', 'GB', 'TB'][i] - ); + const i = this._downloadStatus.fileSize === 0 ? 0 : Math.floor(Math.log(this._downloadStatus.fileSize) / Math.log(1024)); + return (this._downloadStatus.fileSize / Math.pow(1024, i)).toFixed(2) + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]; } get creationDate() { 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 9b7287ad3..4abf26af6 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 @@ -34,10 +34,7 @@ export class FileDownloadService { }); } - downloadFiles( - fileStatusWrappers: FileStatusWrapper[], - dossier: DossierWrapper - ): Observable { + downloadFiles(fileStatusWrappers: FileStatusWrapper[], dossier: DossierWrapper): Observable { return this._downloadControllerService .prepareDownload({ fileIds: fileStatusWrappers.map(f => f.fileId), @@ -49,9 +46,7 @@ export class FileDownloadService { getDownloadStatus() { return this._downloadControllerService.getDownloadStatus().pipe( tap(statusResponse => { - this.downloads = statusResponse.downloadStatus.map( - d => new DownloadStatusWrapper(d) - ); + this.downloads = statusResponse.downloadStatus.map(d => new DownloadStatusWrapper(d)); this.hasPendingDownloads = !!this.downloads.find(f => !f.lastDownload && f.isReady); }) ); 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 35e02614d..930bb3e96 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 @@ -42,25 +42,15 @@ export class FileDropOverlayService { }; initFileDropHandling() { - document - .getElementsByTagName('body')[0] - .addEventListener('dragenter', this.dragListener, false); - document - .getElementsByTagName('body')[0] - .addEventListener('mouseenter', this.mouseIn, false); + document.getElementsByTagName('body')[0].addEventListener('dragenter', this.dragListener, false); + document.getElementsByTagName('body')[0].addEventListener('mouseenter', this.mouseIn, false); document.getElementsByTagName('body')[0].addEventListener('mouseout', this.mouseOut, false); } cleanupFileDropHandling() { - document - .getElementsByTagName('body')[0] - .removeEventListener('dragenter', this.dragListener, false); - document - .getElementsByTagName('body')[0] - .removeEventListener('mouseenter', this.mouseIn, false); - document - .getElementsByTagName('body')[0] - .removeEventListener('mouseout', this.mouseOut, false); + document.getElementsByTagName('body')[0].removeEventListener('dragenter', this.dragListener, false); + document.getElementsByTagName('body')[0].removeEventListener('mouseenter', this.mouseIn, false); + document.getElementsByTagName('body')[0].removeEventListener('mouseout', this.mouseOut, false); } openFileDropOverlay() { 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 091c8425b..2bd7148bd 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 @@ -12,11 +12,7 @@ export class StatusOverlayService { } openUploadStatusOverlay() { - const component = new ComponentPortal( - UploadStatusOverlayComponent, - null, - this._createUploadInjector() - ); + const component = new ComponentPortal(UploadStatusOverlayComponent, null, this._createUploadInjector()); if (!this._uploadStatusOverlayRef.hasAttached()) { this._uploadStatusOverlayRef.attach(component); } 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 c797e32d0..7e29b6ece 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 @@ -12,9 +12,7 @@ const dialogConfig = { export class UploadDownloadDialogService { constructor(private readonly _dialog: MatDialog) {} - openOverwriteFileDialog( - filename: string - ): Promise<{ option?: 'overwrite' | 'skip'; remember?: boolean; cancel?: boolean }> { + openOverwriteFileDialog(filename: string): Promise<{ option?: 'overwrite' | 'skip'; remember?: boolean; cancel?: boolean }> { const ref = this._dialog.open(OverwriteFilesDialogComponent, { ...dialogConfig, data: filename diff --git a/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html b/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html index 060b49cf5..18ed6f268 100644 --- a/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html +++ b/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html @@ -1,30 +1,17 @@
-
+
{{ 'upload-status.dialog.title' | translate: { len: uploadService.files.length } }}
- - + +
{{ uploadService.groupedFiles[dossierId][0].dossierName }}
-
+
-
+
diff --git a/apps/red-ui/src/app/services/permissions.service.ts b/apps/red-ui/src/app/services/permissions.service.ts index ab388d99c..313d708dd 100644 --- a/apps/red-ui/src/app/services/permissions.service.ts +++ b/apps/red-ui/src/app/services/permissions.service.ts @@ -9,10 +9,7 @@ import { DossierWrapper } from '@state/model/dossier.wrapper'; providedIn: 'root' }) export class PermissionsService { - constructor( - private readonly _appStateService: AppStateService, - private readonly _userService: UserService - ) {} + constructor(private readonly _appStateService: AppStateService, private readonly _userService: UserService) {} get currentUser(): UserWrapper { return this._userService.user; @@ -43,23 +40,16 @@ export class PermissionsService { } displayReanalyseBtn(dossier = this._activeDossier): boolean { - return ( - this.isApprover(dossier) && - dossier.files.filter(file => this.fileRequiresReanalysis(file)).length > 0 - ); + return this.isApprover(dossier) && dossier.files.filter(file => this.fileRequiresReanalysis(file)).length > 0; } canToggleAnalysis(fileStatus: FileStatusWrapper): boolean { - return ( - this.isManager() && - ['UNASSIGNED', 'UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status) - ); + return this.isManager() && ['UNASSIGNED', 'UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status); } canReanalyseFile(fileStatus = this._activeFile): boolean { return ( - (this.fileRequiresReanalysis(fileStatus) && - (this.isReviewerOrApprover(fileStatus) || fileStatus.isUnassigned)) || + (this.fileRequiresReanalysis(fileStatus) && (this.isReviewerOrApprover(fileStatus) || fileStatus.isUnassigned)) || (fileStatus.isError && fileStatus.isUnassigned) ); } @@ -77,21 +67,14 @@ export class PermissionsService { } canAssignToSelf(fileStatus = this._activeFile): boolean { - const precondition = - this.isDossierMember() && - !fileStatus.isProcessing && - !fileStatus.isError && - !fileStatus.isApproved; + const precondition = this.isDossierMember() && !fileStatus.isProcessing && !fileStatus.isError && !fileStatus.isApproved; const isTheOnlyReviewer = !this._appStateService.activeDossier.hasMoreThanOneReviewer; if (precondition) { if ( - (fileStatus.isUnassigned || - (fileStatus.isUnderReview && !this.isFileReviewer(fileStatus))) && - (this.isApprover() || - isTheOnlyReviewer || - (this.isDossierReviewer() && fileStatus.isUnassigned)) + (fileStatus.isUnassigned || (fileStatus.isUnderReview && !this.isFileReviewer(fileStatus))) && + (this.isApprover() || isTheOnlyReviewer || (this.isDossierReviewer() && fileStatus.isUnassigned)) ) { return true; } @@ -100,17 +83,10 @@ export class PermissionsService { } canAssignUser(fileStatus = this._activeFile): boolean { - const precondition = - !fileStatus.isProcessing && - !fileStatus.isError && - !fileStatus.isApproved && - this.isApprover(); + const precondition = !fileStatus.isProcessing && !fileStatus.isError && !fileStatus.isApproved && this.isApprover(); if (precondition) { - if ( - (fileStatus.isUnassigned || fileStatus.isUnderReview) && - this._activeDossier.hasMoreThanOneReviewer - ) { + if ((fileStatus.isUnassigned || fileStatus.isUnderReview) && this._activeDossier.hasMoreThanOneReviewer) { return true; } if (fileStatus.isUnderApproval && this._activeDossier.hasMoreThanOneApprover) { @@ -153,10 +129,7 @@ export class PermissionsService { } canPerformAnnotationActions(fileStatus = this._activeFile): boolean { - return ( - ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus?.status) && - this.isFileReviewer(fileStatus) - ); + return ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus?.status) && this.isFileReviewer(fileStatus); } canOpenFile(fileStatus = this._activeFile): boolean { @@ -172,10 +145,7 @@ export class PermissionsService { } canMarkPagesAsViewed(fileStatus = this._activeFile): boolean { - return ( - ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus?.status) && - this.isFileReviewer(fileStatus) - ); + return ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus?.status) && this.isFileReviewer(fileStatus); } canDownloadFiles(fileStatus = this._activeFile): boolean { @@ -203,9 +173,7 @@ export class PermissionsService { canOcrFile(fileStatus = this._activeFile): boolean { return ( - !fileStatus.isExcluded && - !fileStatus.ocrTime && - ['UNASSIGNED', 'UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status) + !fileStatus.isExcluded && !fileStatus.ocrTime && ['UNASSIGNED', 'UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status) ); } @@ -218,9 +186,6 @@ export class PermissionsService { } canExcludePages(fileStatus = this._activeFile): boolean { - return ( - ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status) && - (this.isFileReviewer(fileStatus) || this.isApprover()) - ); + return ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status) && (this.isFileReviewer(fileStatus) || this.isApprover()); } } diff --git a/apps/red-ui/src/app/services/sorting.service.ts b/apps/red-ui/src/app/services/sorting.service.ts index bb5736b71..9f54c91a5 100644 --- a/apps/red-ui/src/app/services/sorting.service.ts +++ b/apps/red-ui/src/app/services/sorting.service.ts @@ -19,6 +19,18 @@ export interface SortingOption { export class SortingService { private _sortingOption: SortingOption; + get sortingOption(): SortingOption { + return this._sortingOption; + } + + private get _currentOrder(): SortingOrder { + return this._sortingOption.order; + } + + private set _currentOrder(value: SortingOrder) { + this._sortingOption.order = value; + } + setSortingOption(value: SortingOption): void { this._sortingOption = value; } @@ -51,16 +63,4 @@ export class SortingService { this._sortingOption = { column, order: SortingOrders.ASC }; } } - - get sortingOption(): SortingOption { - return this._sortingOption; - } - - private get _currentOrder(): SortingOrder { - return this._sortingOption.order; - } - - private set _currentOrder(value: SortingOrder) { - this._sortingOption.order = value; - } } 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 581b4a467..3056f1d6b 100644 --- a/apps/red-ui/src/app/services/translate-chart.service.ts +++ b/apps/red-ui/src/app/services/translate-chart.service.ts @@ -1,6 +1,7 @@ import { Injectable } from '@angular/core'; import { DoughnutChartConfig } from '@shared/components/simple-doughnut-chart/simple-doughnut-chart.component'; import { TranslateService } from '@ngx-translate/core'; +import { rolesTranslations } from '../translations/roles-translations'; @Injectable({ providedIn: 'root' @@ -15,7 +16,7 @@ export class TranslateChartService { translateRoles(config: DoughnutChartConfig[]): DoughnutChartConfig[] { return config.map(val => ({ ...val, - label: this._translateService.instant(`roles.${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 e2999f0ce..f788146b5 100644 --- a/apps/red-ui/src/app/services/user-preference.service.ts +++ b/apps/red-ui/src/app/services/user-preference.service.ts @@ -9,14 +9,14 @@ interface UserAttributes { providedIn: 'root' }) export class UserPreferenceService { - private _userAttributes: UserAttributes = {}; - constructor(private readonly _userPreferenceControllerService: UserPreferenceControllerService) { _userPreferenceControllerService.getAllUserAttributes().subscribe(attributes => { this._userAttributes = attributes ?? {}; }); } + private _userAttributes: UserAttributes = {}; + get userAttributes(): UserAttributes { return this._userAttributes; } 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 b4206425c..537dd0a0a 100644 --- a/apps/red-ui/src/app/state/app-state.service.ts +++ b/apps/red-ui/src/app/state/app-state.service.ts @@ -21,6 +21,7 @@ import { DossierWrapper } from './model/dossier.wrapper'; import { TypeValueWrapper } from '@models/file/type-value.wrapper'; import { DossierTemplateModelWrapper } from '@models/file/dossier-template-model.wrapper'; import { DossiersService } from '../modules/dossier/services/dossiers.service'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; export interface AppState { dossiers: DossierWrapper[]; @@ -335,7 +336,7 @@ export class AppStateService { const index = this.allDossiers.findIndex(p => p.dossierId === dossier.dossierId); this._appState.dossiers.splice(index, 1); }, - () => this._toaster.error('dossiers.delete.delete-failed', { params: dossier }) + () => this._toaster.error(_('dossier-listing.delete.delete-failed'), { params: dossier }) ); } @@ -353,7 +354,7 @@ export class AppStateService { return foundDossier; } catch (error) { this._toaster.error( - error.status === 409 ? 'add-dossier-dialog.errors.dossier-already-exists' : 'add-dossier-dialog.errors.generic' + error.status === 409 ? _('add-dossier-dialog.errors.dossier-already-exists') : _('add-dossier-dialog.errors.generic') ); } } diff --git a/apps/red-ui/src/app/state/model/dossier.wrapper.ts b/apps/red-ui/src/app/state/model/dossier.wrapper.ts index 4220c3614..e859c8dff 100644 --- a/apps/red-ui/src/app/state/model/dossier.wrapper.ts +++ b/apps/red-ui/src/app/state/model/dossier.wrapper.ts @@ -124,8 +124,7 @@ export class DossierWrapper { this.hasRequests = this.hasRequests || f.hasRequests; this.allFilesApproved = this.allFilesApproved && f.isApproved; this.totalNumberOfPages += f.numberOfPages; - this.hasPendingOrProcessing = - this.hasPendingOrProcessing || f.isPending || f.isProcessing; + this.hasPendingOrProcessing = this.hasPendingOrProcessing || f.isPending || f.isProcessing; }); this.hasNone = !this.hasRequests && !this.hasRedactions && !this.hintsOnly; } diff --git a/apps/red-ui/src/app/translations/annotation-types-translations.ts b/apps/red-ui/src/app/translations/annotation-types-translations.ts new file mode 100644 index 000000000..b2c98e4bb --- /dev/null +++ b/apps/red-ui/src/app/translations/annotation-types-translations.ts @@ -0,0 +1,23 @@ +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import { AnnotationSuperType } from '../models/file/annotation.wrapper'; + +export const annotationTypesTranslations: { [key in AnnotationSuperType]: string } = { + 'add-dictionary': _('annotation-type.add-dictionary'), + 'change-legal-basis': _('annotation-type.change-legal-basis'), + 'declined-suggestion': _('annotation-type.declined-suggestion'), + hint: _('annotation-type.hint'), + 'manual-redaction': _('annotation-type.manual-redaction'), + 'pending-analysis': _('annotation-type.pending-analysis'), + recommendation: _('annotation-type.recommendation'), + redaction: _('annotation-type.redaction'), + 'remove-dictionary': _('annotation-type.remove-dictionary'), + 'remove-only-here': _('annotation-type.remove-only-here'), + skipped: _('annotation-type.skipped'), + 'suggestion-add': _('annotation-type.suggestion-add'), + 'suggestion-add-dictionary': _('annotation-type.suggestion-add-dictionary'), + 'suggestion-change-legal-basis': _('annotation-type.suggestion-change-legal-basis'), + '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') +} 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 new file mode 100644 index 000000000..ba6bdf18d --- /dev/null +++ b/apps/red-ui/src/app/translations/download-types-translations.ts @@ -0,0 +1,10 @@ +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import { Dossier } from '@redaction/red-ui-http'; + +export const downloadTypesTranslations: { [key in Dossier.DownloadFileTypesEnum]: string } = { + ORIGINAL: _('download-type.original'), + PREVIEW: _('download-type.preview'), + REDACTED: _('download-type.redacted'), + ANNOTATED: _('download-type.annotated'), + 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 new file mode 100644 index 000000000..3678c12e8 --- /dev/null +++ b/apps/red-ui/src/app/translations/languages-translations.ts @@ -0,0 +1,6 @@ +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') +} as const; diff --git a/apps/red-ui/src/app/translations/roles-translations.ts b/apps/red-ui/src/app/translations/roles-translations.ts new file mode 100644 index 000000000..b3f70b83c --- /dev/null +++ b/apps/red-ui/src/app/translations/roles-translations.ts @@ -0,0 +1,12 @@ +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; + +export const rolesTranslations: { [key in string]: string } = { + INACTIVE: _('roles.inactive'), + MANAGER_ADMIN: _('roles.manager-admin'), + NO_ROLE: _('roles.no-role'), + RED_ADMIN: _('roles.red-admin'), + RED_MANAGER: _('roles.red-manager'), + RED_USER: _('roles.red-user'), + RED_USER_ADMIN: _('roles.red-user-admin'), + 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 78ae4a1f6..61d262e22 100644 --- a/apps/red-ui/src/app/utils/api-path-interceptor.ts +++ b/apps/red-ui/src/app/utils/api-path-interceptor.ts @@ -6,10 +6,7 @@ import { BASE_HREF } from '../tokens'; @Injectable() export class ApiPathInterceptor implements HttpInterceptor { - constructor( - @Inject(BASE_HREF) private readonly _baseHref: string, - private readonly _appConfigService: AppConfigService - ) {} + constructor(@Inject(BASE_HREF) private readonly _baseHref: string, private readonly _appConfigService: AppConfigService) {} intercept(req: HttpRequest, next: HttpHandler): Observable> { if (!req.url.startsWith('/assets')) { diff --git a/apps/red-ui/src/app/utils/custom-route-reuse.strategy.ts b/apps/red-ui/src/app/utils/custom-route-reuse.strategy.ts index 4b85cdbbb..d41a1190f 100644 --- a/apps/red-ui/src/app/utils/custom-route-reuse.strategy.ts +++ b/apps/red-ui/src/app/utils/custom-route-reuse.strategy.ts @@ -59,17 +59,12 @@ export class CustomRouteReuseStrategy implements RouteReuseStrategy { } shouldReuseRoute(future: ActivatedRouteSnapshot, current: ActivatedRouteSnapshot): boolean { - return ( - future.routeConfig === current.routeConfig || - this._getKey(future) === this._getKey(current) - ); + return future.routeConfig === current.routeConfig || this._getKey(future) === this._getKey(current); } private _getKey(route: ActivatedRouteSnapshot): string { return route.pathFromRoot - .map((el: ActivatedRouteSnapshot) => - el.routeConfig ? el.routeConfig.path + JSON.stringify(el.params) : '' - ) + .map((el: ActivatedRouteSnapshot) => (el.routeConfig ? el.routeConfig.path + JSON.stringify(el.params) : '')) .filter(str => str.length > 0) .join(''); } diff --git a/apps/red-ui/src/app/utils/dialog-helper.ts b/apps/red-ui/src/app/utils/dialog-helper.ts index e8f3940c4..653b86897 100644 --- a/apps/red-ui/src/app/utils/dialog-helper.ts +++ b/apps/red-ui/src/app/utils/dialog-helper.ts @@ -59,22 +59,14 @@ export class DialogHelper { config.backdropClass = 'dark-backdrop'; config.panelClass = 'gin-file-upload-dialog-panel'; config.scrollStrategy = overlay.scrollStrategies.block(); - config.positionStrategy = overlay - .position() - .global() - .centerHorizontally() - .centerVertically(); + config.positionStrategy = overlay.position().global().centerHorizontally().centerVertically(); return config; } static generateUploadStatusConfig(overlay: Overlay): OverlayConfig { const config = new OverlayConfig(); config.hasBackdrop = false; - config.positionStrategy = overlay - .position() - .global() - .bottom(DialogHelper._MARGIN) - .right(DialogHelper._MARGIN); + config.positionStrategy = overlay.position().global().bottom(DialogHelper._MARGIN).right(DialogHelper._MARGIN); return config; } } diff --git a/apps/red-ui/src/app/utils/file-download-utils.ts b/apps/red-ui/src/app/utils/file-download-utils.ts index 8f793588c..038357ab9 100644 --- a/apps/red-ui/src/app/utils/file-download-utils.ts +++ b/apps/red-ui/src/app/utils/file-download-utils.ts @@ -5,9 +5,7 @@ export function download(event: HttpResponse, altName?: string) { const contentDisposition = event.headers.get('Content-Disposition'); let fileName; try { - fileName = contentDisposition - ? contentDisposition.split('filename=')[1].replace(/"/g, '') - : undefined; + fileName = contentDisposition ? contentDisposition.split('filename=')[1].replace(/"/g, '') : undefined; } catch (e) { console.log('[REDACTION] Failed to parse content-disposition: ', contentDisposition); } 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 578b09fa8..ca8a871fc 100644 --- a/apps/red-ui/src/app/utils/file-drop-utils.ts +++ b/apps/red-ui/src/app/utils/file-drop-utils.ts @@ -1,11 +1,7 @@ import { FileUploadModel } from '@upload-download/model/file-upload.model'; import { DossierWrapper } from '@state/model/dossier.wrapper'; -export function handleFileDrop( - event: DragEvent, - dossier: DossierWrapper, - uploadFiles: (files: FileUploadModel[]) => void -) { +export function handleFileDrop(event: DragEvent, dossier: DossierWrapper, uploadFiles: (files: FileUploadModel[]) => void) { event.preventDefault(); event.stopPropagation(); const { dataTransfer } = event; @@ -31,10 +27,7 @@ export function handleFileDrop( } export function isCsv(file: FileUploadModel): boolean { - return ( - file.file.type?.toLowerCase() === 'text/csv' || - file.file.name.toLowerCase().endsWith('.csv') - ); + return file.file.type?.toLowerCase() === 'text/csv' || file.file.name.toLowerCase().endsWith('.csv'); } export function convertFiles(files: FileList | File[], dossier: DossierWrapper): FileUploadModel[] { diff --git a/apps/red-ui/src/app/utils/page-stamper.ts b/apps/red-ui/src/app/utils/page-stamper.ts index e2c444ae5..16611e565 100644 --- a/apps/red-ui/src/app/utils/page-stamper.ts +++ b/apps/red-ui/src/app/utils/page-stamper.ts @@ -25,9 +25,7 @@ export async function stampPDFPage( const rgbColor = hexToRgb(color); const stamper = await PdfNet.Stamper.create(3, fontSize, 0); - await stamper.setFontColor( - await PdfNet.ColorPt.init(rgbColor.r / 255, rgbColor.g / 255, rgbColor.b / 255) - ); + await stamper.setFontColor(await PdfNet.ColorPt.init(rgbColor.r / 255, rgbColor.g / 255, rgbColor.b / 255)); await stamper.setOpacity(opacity / 100); switch (orientation) { 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 a922c6820..82e055c3b 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,6 +6,5 @@ export const RedactionFilterSorter = { hint: 4, suggestion: 5, none: 6, - byKey: (a: { key: string }, b: { key: string }) => - RedactionFilterSorter[a.key] - RedactionFilterSorter[b.key] + byKey: (a: { key: string }, b: { key: string }) => RedactionFilterSorter[a.key] - RedactionFilterSorter[b.key] }; 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 4408f9b5a..47b500cb9 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 @@ -1,4 +1,10 @@ -export const SuperTypeSorter = { +import { AnnotationSuperType } from '../../models/file/annotation.wrapper'; + +export const SuperTypeSorter: { [key in AnnotationSuperType]: number } = { + 'suggestion-change-legal-basis': 14, + 'suggestion-force-redaction': 15, + 'suggestion-recategorize-image': 16, + recommendation: 7, 'add-dictionary': 2, 'remove-dictionary': 3, 'pending-analysis': 4, @@ -10,7 +16,7 @@ export const SuperTypeSorter = { 'suggestion-remove': 11, skipped: 50, redaction: 1, - manual: 2, - hint: 15, + 'manual-redaction': 2, + hint: 17, 'declined-suggestion': 20 }; diff --git a/apps/red-ui/src/app/utils/sync-scroll.ts b/apps/red-ui/src/app/utils/sync-scroll.ts index 50e90757e..51a462699 100644 --- a/apps/red-ui/src/app/utils/sync-scroll.ts +++ b/apps/red-ui/src/app/utils/sync-scroll.ts @@ -36,12 +36,7 @@ export function syncScroll(elements: HTMLElement[]) { updateX && Math.round( otherEl['scrollLeft'] - - (scrollX = otherEl.eX = - Math.round( - xRate * - (otherEl['scrollWidth'] - - otherEl['clientWidth']) - )) + (scrollX = otherEl.eX = Math.round(xRate * (otherEl['scrollWidth'] - otherEl['clientWidth']))) ) ) { otherEl['scrollLeft'] = scrollX; @@ -51,12 +46,7 @@ export function syncScroll(elements: HTMLElement[]) { updateY && Math.round( otherEl['scrollTop'] - - (scrollY = otherEl.eY = - Math.round( - yRate * - (otherEl['scrollHeight'] - - otherEl['clientHeight']) - )) + (scrollY = otherEl.eY = Math.round(yRate * (otherEl['scrollHeight'] - otherEl['clientHeight']))) ) ) { otherEl['scrollTop'] = scrollY; diff --git a/apps/red-ui/src/app/utils/uuid-helper.ts b/apps/red-ui/src/app/utils/uuid-helper.ts index 0f925537b..3cd05d407 100644 --- a/apps/red-ui/src/app/utils/uuid-helper.ts +++ b/apps/red-ui/src/app/utils/uuid-helper.ts @@ -5,9 +5,7 @@ for (let i = 0; i < 256; i++) { } export function isUUID(uuid: string) { - return /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test( - uuid - ); + return /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(uuid); } export function UUID() { diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index c581e389e..465e6649d 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -50,10 +50,20 @@ "redaction": "Redaction" }, "save": "Save Dictionary", - "title": { - "edit": "Edit {{name}} Dictionary", - "new": "Create Dictionary" - } + "title": "{type, select, edit{Edit {name}} create{Create} other{}} Dictionary" + }, + "add-edit-dossier-attribute": { + "error": { + "generic": "Failed to save attribute!" + }, + "form": { + "label": "Attribute Name", + "label-placeholder": "Enter Name", + "placeholder": "Attribute Placeholder", + "type": "Attribute Type" + }, + "save": "Save Attribute", + "title": "{type, select, edit{Edit {name}} create{Add New} other{}} Dossier Attribute" }, "add-edit-dossier-template": { "form": { @@ -65,10 +75,7 @@ "valid-to": "Valid to" }, "save": "Save Dossier Template", - "title": { - "edit": "Edit {{name}} Dossier Template", - "new": "Create Dossier Template" - } + "title": "{type, select, edit{Edit {name}} create{Create} other{}} Dossier Template" }, "add-edit-file-attribute": { "form": { @@ -81,26 +88,7 @@ "type": "Type" }, "save": "Save Attribute", - "title": { - "edit": "Edit {{name}} File Attribute", - "new": "Add New File Attribute" - } - }, - "add-edit-dossier-attribute": { - "form": { - "label": "Attribute Name", - "label-placeholder": "Enter Name", - "placeholder": "Attribute Placeholder", - "type": "Attribute Type" - }, - "save": "Save Attribute", - "title": { - "edit": "Edit {{name}} Dossier Attribute", - "new": "Add New Dossier Attribute" - }, - "error": { - "generic": "Failed to save attribute!" - } + "title": "{type, select, edit{Edit {name}} create{Add New} other{}} File Attribute" }, "add-edit-user": { "actions": { @@ -113,13 +101,14 @@ "email": "Email", "first-name": "First Name", "last-name": "Last Name", - "role": "Role", - "reset-password": "Reset Password" + "reset-password": "Reset Password", + "role": "Role" }, - "title": { - "edit": "Edit User", - "new": "Add New User" - } + "title": "{type, select, edit{Edit} create{Add New} other{}} User" + }, + "admin-side-nav": { + "dossier-templates": "Dossier Templates", + "settings": "Settings" }, "annotation": "Annotation", "annotation-actions": { @@ -127,7 +116,7 @@ "label": "Accept Recommendation" }, "accept-suggestion": { - "add-to-dict": "Approve and add to dictionary" + "label": "Approve and add to dictionary" }, "edit-reason": { "label": "Edit Reason" @@ -139,86 +128,83 @@ "message": { "dictionary": { "add": { - "error": "Failed to add entry to dictionary: {{error}}", + "error": "Failed to add entry to dictionary: {error}", "success": "Entry added to dictionary. Changes will be visible after reanalysis." }, "approve": { - "error": "Failed to approve dictionary entry: {{error}}", + "error": "Failed to approve dictionary entry: {error}", "success": "Dictionary entry approved. Changes will be visible after reanalysis." }, "decline": { - "error": "Failed to decline dictionary suggestion: {{error}}", + "error": "Failed to decline dictionary suggestion: {error}", "success": "Dictionary suggestion declined." }, "remove": { - "error": "Failed to remove dictionary entry: {{error}}", + "error": "Failed to remove dictionary entry: {error}", "success": "Dictionary entry removed!" }, "request-remove": { - "error": "Failed to request removal of dictionary entry: {{error}}", + "error": "Failed to request removal of dictionary entry: {error}", "success": "Requested to remove dictionary entry!" }, "suggest": { - "error": "Failed to save suggestion for dictionary modification: {{error}}", + "error": "Failed to save suggestion for dictionary modification: {error}", "success": "Suggestion for dictionary modification saved!" }, "undo": { - "error": "Failed to undo: {{error}}", + "error": "Failed to undo: {error}", "success": "Undo successful" } }, "manual-redaction": { "add": { - "error": "Failed to save redaction: {{error}}", - "success": "Redaction added!" - }, - "force-redaction": { - "error": "Failed to save redaction: {{error}}", + "error": "Failed to save redaction: {error}", "success": "Redaction added!" }, "approve": { - "error": "Failed to approve suggestion: {{error}}", + "error": "Failed to approve suggestion: {error}", "success": "Suggestion approved." }, "change-legal-basis": { - "error": "Failed to edit annotation reason: {{error}}", + "error": "Failed to edit annotation reason: {error}", "success": "Annotation reason was edited." }, "decline": { - "error": "Failed to decline suggestion: {{error}}", + "error": "Failed to decline suggestion: {error}", "success": "Suggestion declined." }, - "request-change-legal-basis": { - "error": "Failed to request annotation reason change: {{error}}", - "success": "Annotation reason change requested." + "force-redaction": { + "error": "Failed to save redaction: {error}", + "success": "Redaction added!" }, "recategorize-image": { - "error": "Failed to recategorize image: {{error}}", + "error": "Failed to recategorize image: {error}", "success": "Image recategorized." }, - "request-image-recategorization": { - "error": "Failed to request image recategorization: {{error}}", - "success": "Image recategorization requested." - }, - "search": "Document name...", - "suggest": { - "error": "Failed to save redaction suggestion: {{error}}", - "success": "Redaction suggestion saved" + "request-change-legal-basis": { + "error": "Failed to request annotation reason change: {error}", + "success": "Annotation reason change requested." }, "request-force-redaction": { - "error": "Failed to save redaction suggestion: {{error}}", + "error": "Failed to save redaction suggestion: {error}", + "success": "Redaction suggestion saved" + }, + "request-image-recategorization": { + "error": "Failed to request image recategorization: {error}", + "success": "Image recategorization requested." + }, + "suggest": { + "error": "Failed to save redaction suggestion: {error}", "success": "Redaction suggestion saved" }, "undo": { - "error": "Failed to undo: {{error}}", + "error": "Failed to undo: {error}", "success": "Undo successful" } } }, "recategorize-image": "Recategorize", - "reject": "Reject", "reject-suggestion": "Reject Suggestion", - "remove": "Remove", "remove-annotation": { "false-positive": "False Positive", "only-here": "Remove only here", @@ -242,43 +228,30 @@ "suggestion-add": "Suggested redaction", "suggestion-add-dictionary": "Suggested dictionary add", "suggestion-change-legal-basis": "Suggested change legal basis", - "suggestion-recategorize-image": "Suggested recategorize image", "suggestion-force-redaction": "Suggestion force redaction", + "suggestion-recategorize-image": "Suggested recategorize image", "suggestion-remove": "Suggested redaction removal", "suggestion-remove-dictionary": "Suggested dictionary removal" }, "annotations": "Annotations", - "app-name": "DDA-R", - "APPROVED": "Approved", "archived": "Archived", - "assign-approver-owner": { - "dialog": { - "cancel": "Cancel", - "save": "Save", - "single-user": "Approver", - "title": "Manage File Approver" - } - }, "assign-dossier-owner": { "dialog": { "approvers": "Approvers", - "cancel": "Cancel", "make-approver": "Make Approver", "no-approvers": "No approvers yet.\nSelect from the list below.", "no-reviewers": "No reviewers yet.\nSelect from the list below.", "reviewers": "Reviewers", - "save": "Save Changes", "search": "Search...", - "single-user": "Owner", - "title": "Manage Dossier Team" + "single-user": "Owner" } }, - "assign-reviewer-owner": { + "assign-owner": { "dialog": { "cancel": "Cancel", + "label": "{type, select, approver{Approver} reviewer{Reviewer} other{}}", "save": "Save", - "single-user": "Reviewer", - "title": "Manage File Reviewer" + "title": "Manage File {type, select, approver{Approver} reviewer{Reviewer} other{}}" } }, "assign-user": { @@ -290,17 +263,17 @@ "all-users": "All Users", "categories": { "all-categories": "All Categories", - "LICENSE": "License", - "DOWNLOAD": "Download", - "AUDIT_LOG": "Audit Log", - "PROJECT": "Project", - "DOSSIER": "Dossier", - "DICTIONARY": "Dictionary", - "PROJECT_TEMPLATE": "Project Template", - "USER": "User", - "DOCUMENT": "Document", - "AUDIT": "Audit", - "DOSSIER_TEMPLATE": "Dossier Template" + "audit": "Audit", + "audit-log": "Audit Log", + "dictionary": "Dictionary", + "document": "Document", + "dossier": "Dossier", + "dossier-template": "Dossier Template", + "download": "Download", + "license": "License", + "project": "Project", + "project-template": "Project Template", + "user": "User" }, "no-data": { "title": "No available logs." @@ -312,19 +285,18 @@ "user": "User" }, "table-header": { - "title": "{{length}} Logs" + "title": "{length} {length, plural, one{Log} other{Logs}}" }, "to": "to" }, "auth-error": { "heading": "Your user doesn't have the required RED-* roles to access this application. Please contact your admin for access!", - "heading-with-link": "Your user doesn't have the required RED-* roles to access this application. Please contact your admin for access!", - "heading-with-name": "Your user doesn't have the required RED-* roles to access this application. Please contact {{adminName}} for access!", - "heading-with-name-and-link": "Your user doesn't have the required RED-* roles to access this application. Please contact {{adminName}} for access!", + "heading-with-link": "Your user doesn't have the required RED-* roles to access this application. Please contact your admin for access!", + "heading-with-name": "Your user doesn't have the required RED-* roles to access this application. Please contact {adminName} for access!", + "heading-with-name-and-link": "Your user doesn't have the required RED-* roles to access this application. Please contact {adminName} for access!", "logout": "Logout" }, "by": "by", - "change-legal-basis": "Pending Change of Legal Basis", "change-legal-basis-dialog": { "actions": { "cancel": "Cancel", @@ -338,40 +310,9 @@ }, "header": "Edit Redaction Reason" }, - "recategorize-image-dialog": { - "actions": { - "cancel": "Cancel", - "save": "Save Changes" - }, - "content": { - "comment": "Comment", - "type": "Select image type", - "type-placeholder": "Select a type..." - }, - "header": "Edit Image Type", - "options": { - "image": "Image", - "logo": "Logo", - "signature": "Signature", - "formula": "Formula" - } - }, - "reset-password-dialog": { - "header": "Set Temporary Password for {{userName}}", - "form": { - "password": "Temporary password" - }, - "actions": { - "save": "Save", - "cancel": "Cancel" - } - }, - "comment": "Comment", "comments": { "add-comment": "Enter comment", - "cancel": "Cancel", - "comment": "{{count}} comment", - "comments": "{{count}} comments", + "comments": "{count} {count, plural, one{comment} other{comments}}", "hide-comments": "Hide comments" }, "common": { @@ -385,44 +326,20 @@ }, "configurations": "Configurations", "confirm-delete-file-attribute": { - "cancel": { - "bulk": "Keep Attributes", - "single": "Keep Attribute" - }, - "delete": { - "bulk": "Delete Attributes", - "single": "Delete Attribute" - }, - "impacted-documents": { - "bulk": "All documents they are used on will be impacted", - "single": "All documents it is used on will be impacted" - }, + "cancel": "Keep {type, select, single{Attribute} bulk{Attributes} other{}}", + "delete": "Delete {type, select, single{Attribute} bulk{Attributes} other{}}", + "impacted-documents": "All documents {type, select, single{it is} bulk{they are} other{}} used on will be impacted", "lost-details": "All inputted details on the documents will be lost", - "title": { - "bulk": "Delete File Attributes", - "single": "Delete {{name}}" - }, + "title": "Delete {type, select, single{{name}} bulk{File Attributes} other{}}", "toast-error": "Please confirm that you understand the ramifications of your action!", "warning": "Warning: this cannot be undone!" }, "confirm-delete-users": { - "cancel": { - "bulk": "Keep Users", - "single": "Keep User" - }, - "delete": { - "bulk": "Delete Users", - "single": "Delete User" - }, - "impacted-documents": { - "bulk": "All documents pending review from the users will be impacted", - "single": "All documents pending review from the user will be impacted" - }, - "impacted-dossiers": "{{dossiersCount}} dossiers will be impacted", - "title": { - "bulk": "Delete Users from Workspace", - "single": "Delete User from Workspace" - }, + "cancel": "Keep {usersCount, plural, one{User} other{Users}}", + "delete": "Delete {usersCount, plural, one{User} other{Users}}", + "impacted-documents": "All documents pending review from the {usersCount, plural, one{user} other{users}} will be impacted", + "impacted-dossiers": "{dossiersCount} {dossiersCount, plural, one{dossier} other{dossiers}} will be impacted", + "title": "Delete {usersCount, plural, one{User} other{Users}} from Workspace", "toast-error": "Please confirm that you understand the ramifications of your action!", "warning": "Warning: this cannot be undone!" }, @@ -432,16 +349,15 @@ "title": "Re-assign reviewer" }, "compare-file": { - "question": "Warning!

Number of pages does not match, current document has {{currentDocumentPageCount}} page(s). Uploaded document has {{compareDocumentPageCount}} page(s).

Do you wish to proceed?", - "title": "Compare with file: {{fileName}}" + "question": "Warning!

Number of pages does not match, current document has {currentDocumentPageCount} page(s). Uploaded document has {compareDocumentPageCount} page(s).

Do you wish to proceed?", + "title": "Compare with file: {fileName}" }, "delete-dossier": { "confirmation-text": "Delete Dossier", "deny-text": "Keep Dossier", - "details": "Deleted dossiers are sent to trash. They can be restored up to {{period}} days from their deletion.", "input-label": "To proceed please type below", "question": "Are you sure you want to delete this dossier?", - "title": "Delete {{dossierName}}" + "title": "Delete {dossierName}" }, "delete-file": { "question": "Do you wish to proceed?", @@ -459,7 +375,7 @@ "key": "Type" }, "table-header": { - "title": "{{length}} Default Colors" + "title": "{length} Default {length, plural, one{Color} other{Colors}}" }, "types": { "analysisColor": "Analysis", @@ -473,7 +389,6 @@ "updatedColor": "Updated" } }, - "delete-files-error": "Failed to delete files.", "dev-mode": "DEV", "dictionaries": "Dictionaries", "dictionary": "Dictionary", @@ -507,7 +422,7 @@ "type": "Type" }, "table-header": { - "title": "{{length}} dictionaries" + "title": "{length} {length, plural, one{dictionary} other{dictionaries}}" } }, "dictionary-overview": { @@ -577,6 +492,39 @@ "save": "Save Document Info", "title": "Introduce File Attributes" }, + "dossier-attribute-types": { + "date": "Date", + "image": "Image", + "number": "Number", + "text": "Free Text" + }, + "dossier-attributes": "Dossier Attributes", + "dossier-attributes-listing": { + "action": { + "delete": "Delete Attribute", + "edit": "Edit Attribute" + }, + "add-new": "New Attribute", + "bulk": { + "delete": "Delete Selected Attributes" + }, + "no-data": { + "action": "New Attribute", + "title": "There are no dossier attributes." + }, + "no-match": { + "title": "No attributes match your current filters." + }, + "search": "Search...", + "table-col-names": { + "label": "Label", + "placeholder": "Placeholder", + "type": "Type" + }, + "table-header": { + "title": "{length} dossier {length, plural, one{attribute} other{attributes}}" + } + }, "dossier-details": { "assign-members": "Assign Members", "collapse": "Hide Details", @@ -596,15 +544,11 @@ "add-new": "New Dossier", "delete": { "action": "Delete Dossier", - "delete-failed": "Failed to delete dossier: {{dossierName}}" - }, - "download-files": { - "action": "Download Redacted Files" + "delete-failed": "Failed to delete dossier: {dossierName}" }, "edit": { "action": "Edit Dossier" }, - "header": "Dossiers", "no-data": { "action": "New Dossier", "title": "You currently have no dossiers." @@ -637,13 +581,9 @@ "status": "Status" }, "table-header": { - "recent": "Recent", - "title": "{{length}} active dossiers" + "title": "{length} active {length, plural, one{Dossier} other{Dossiers}}" } }, - "dossier-member-guard": { - "access-denied": "You are not allowed to access that page." - }, "dossier-overview": { "approve": "Approve", "approve-disabled": "File can only be approved once it has been analysed with the latest dictionaries and all suggestions have been processed.", @@ -659,8 +599,8 @@ }, "dossier-details": { "attributes": { + "expand": "{count} custom {count, plural, one{attribute} other{attributes}}", "image-uploaded": "Image uploaded", - "expand": "{{count}} custom attributes", "show-less": "show less" }, "charts": { @@ -669,11 +609,11 @@ "description": "Description", "dictionary": "Dossier Dictionary", "stats": { - "analysed-pages": "{{count}} pages", - "created-on": "Created on {{date}}", - "documents": "{{count}} documents", - "due-date": "Due {{date}}", - "people": "{{count}} user(s)" + "analysed-pages": "{count} {count, plural, one{page} other{pages}}", + "created-on": "Created on {date}", + "documents": "{count} {count, plural, one{document} other{documents}}", + "due-date": "Due {date}", + "people": "{count} {count, plural, one{user} other{users}}" } }, "download-file": "Download", @@ -685,7 +625,6 @@ "file-processing": "Processing" } }, - "header": "Dossier Overview", "header-actions": { "edit": "Edit Dossier", "upload-document": "Upload Document" @@ -709,16 +648,16 @@ "quick-filters": { "assigned-to-me": "Assigned to me", "assigned-to-others": "Assigned to others", - "recent": "Recent ({{hours}} h)", + "recent": "Recent ({hours} h)", "unassigned": "Unassigned" }, - "reanalyse": { - "action": "Analyze File" - }, "reanalyse-dossier": { "error": "Failed to schedule files for reanalysis. Please try again.", "success": "Files scheduled for reanalysis." }, + "reanalyse": { + "action": "Analyze File" + }, "search": "Document name...", "table-col-names": { "added-on": "Added", @@ -729,7 +668,7 @@ "status": "Status" }, "table-header": { - "title": "{{length}} documents" + "title": "{length} {length, plural, one{document} other{documents}}" }, "under-approval": "For Approval", "under-review": "Under Review", @@ -745,7 +684,7 @@ "bulk": { "delete": "Delete Selected Dossier Templates" }, - "dictionaries": "{{length}} dictionaries", + "dictionaries": "{length} {length, plural, one{dictionary} other{dictionaries}}", "no-data": { "title": "There are no dossier templates yet." }, @@ -760,18 +699,20 @@ "name": "Name" }, "table-header": { - "title": "{{length}} dossier templates" + "title": "{length} dossier {length, plural, one{template} other{templates}}" } }, "download-includes": "Choose what is included at download:", "download-status": { - "queued": "Your download has been queued, you can see all your requested downloads here: My Downloads ." + "queued": "Your download has been queued, you can see all your requested downloads here: My Downloads ." }, "download-type": { - "label": "{{length}} document versions", - "ORIGINAL": "Optimized PDF", - "PREVIEW": "Preview PDF", - "REDACTED": "Redacted PDF" + "annotated": "Annotated PDF", + "flatten": "Flatten PDF", + "label": "{length} document {length, plural, one{version} other{versions}}", + "original": "Optimized PDF", + "preview": "Preview PDF", + "redacted": "Redacted PDF" }, "downloads-list": { "actions": { @@ -785,11 +726,10 @@ "date": "Date", "name": "Name", "size": "Size", - "status": "Status", - "type": "Type" + "status": "Status" }, "table-header": { - "title": "{{length}} downloads" + "title": "{length} {length, plural, one{download} other{downloads}}" } }, "edit-color-dialog": { @@ -799,17 +739,25 @@ "color-placeholder": "Color" }, "save": "Save", - "success": "Successfully updated color for {{color}}." + "success": "Successfully updated color for {color}." }, "edit-dossier-dialog": { "actions": { "revert": "Revert", "save": "Save Changes" }, + "attributes": { + "custom-attributes": "Custom Dossier Attributes", + "delete-image": "Delete Image", + "image-attributes": "Image Attributes", + "no-custom-attributes": "There are no text attributes", + "no-image-attributes": "There are no image attributes", + "upload-image": "Upload Image" + }, "change-successful": "Dossier was updated.", "delete-successful": "Dossier was deleted.", "dictionary": { - "entries": "{{length}} entries" + "entries": "{length} {length, plural, one{entry} other{entries}}" }, "general-info": { "form": { @@ -826,7 +774,7 @@ "watermark": "Watermark application on redacted documents" } }, - "header": "Edit {{dossierName}}", + "header": "Edit {dossierName}", "nav-items": { "choose-download": "Choose what is included at download:", "dictionary": "Dictionary", @@ -836,32 +784,15 @@ "download-package": "Download Package", "general-info": "General Information", "members": "Members", - "report-attributes": "Report Attributes", "team-members": "Team Members" }, - "attributes": { - "custom-attributes": "Custom Dossier Attributes", - "image-attributes": "Image Attributes", - "upload-image": "Upload Image", - "delete-image": "Delete Image", - "no-custom-attributes": "There are no text attributes", - "no-image-attributes": "There are no image attributes" - }, + "side-nav-title": "Configurations", "unsaved-changes": "You have unsaved changes. Save or revert before changing the tab." }, - "efsa": "EFSA Approval", - "ERROR": "Re-processing required", - "EXCLUDED": "Excluded", "file-attribute-types": { - "DATE": "Date", - "NUMBER": "Number", - "TEXT": "Free Text" - }, - "dossier-attribute-types": { - "DATE": "Date", - "NUMBER": "Number", - "TEXT": "Free Text", - "IMAGE": "Image" + "date": "Date", + "number": "Number", + "text": "Free Text" }, "file-attributes": "File Attributes", "file-attributes-csv-import": { @@ -871,7 +802,7 @@ "remove": "Remove", "save-name": "Save" }, - "available": "{{value}} available", + "available": "{value} available", "cancel": "Cancel", "csv-column": "CSV Column", "delimiter": "Delimiter", @@ -885,7 +816,7 @@ "title": "No file attributes defined. Select a column from the left panel to start defining file attributes." }, "no-hovered-column": "Preview CSV column by hovering the entry.", - "no-sample-data-for": "No sample data for {{column}}.", + "no-sample-data-for": "No sample data for {column}.", "parse-csv": "Parse CSV with new options", "quick-activation": { "all": "All", @@ -894,12 +825,12 @@ "save": { "error": "Failed to create File Attributes!", "label": "Save Attributes", - "success": "{{count}} File Attributes created successfully!" + "success": "{count} file {count, plural, one{attribute} other{attributes}} created successfully!" }, "search": { "placeholder": "Search by column name..." }, - "selected": "{{value}} selected", + "selected": "{value} selected", "table-col-names": { "name": "Name", "primary": "primary", @@ -915,10 +846,10 @@ "remove-selected": "Remove Selected", "type": "Type" }, - "title": "{{length}} file attributes" + "title": "{length} file {length, plural, one{attribute} other{attributes}}" }, "title": "Select CSV columns to use as File Attributes", - "total-rows": "{{rows}} rows in total" + "total-rows": "{rows} rows in total" }, "file-attributes-listing": { "action": { @@ -946,37 +877,10 @@ "type": "Input Type" }, "table-header": { - "title": "{{length}} file attributes" + "title": "{length} file {length, plural, one{attribute} other{attributes}}" }, "upload-csv": "Upload File Attributes Configuration" }, - "dossier-attributes": "Dossier Attributes", - "dossier-attributes-listing": { - "action": { - "delete": "Delete Attribute", - "edit": "Edit Attribute" - }, - "add-new": "New Attribute", - "bulk": { - "delete": "Delete Selected Attributes" - }, - "no-match": { - "title": "No attributes match your current filters." - }, - "no-data": { - "action": "New Attribute", - "title": "There are no dossier attributes." - }, - "search": "Search...", - "table-col-names": { - "label": "Label", - "placeholder": "Placeholder", - "type": "Type" - }, - "table-header": { - "title": "{{length}} dossier attributes" - } - }, "file-preview": { "assign-me": "Assign to me", "assign-reviewer": "Assign Reviewer", @@ -988,9 +892,7 @@ "exclude-pages": "Exclude pages from redaction", "excluded-from-redaction": "excluded from redaction", "fullscreen": "Full Screen (F)", - "html-debug": "Open Document HTML Debug", "last-reviewer": "Last Reviewed by:", - "new-tab-ssr": "Open Document in Server Side Rendering Mode", "no-data": { "title": "There are no annotations on this page." }, @@ -998,11 +900,9 @@ "jump-first": "Jump to first page", "jump-last": "Jump to last page" }, - "reanalyse-file": "File reanalysis in progress", "reanalyse-notification": "This document was not processed with the latest rule/dictionary set. Analyze now to get updated annotations.", "redacted": "Preview", "redacted-tooltip": "Redaction preview shows only redactions. Consider this a preview for the final redacted version. This view is only available if the file has no pending changes & doesn't require a reanalysis", - "reviewer": "Assigned to", "standard": "Standard", "standard-tooltip": "Standard Workload view shows all hints, redactions, recommendations & suggestions. This view allows editing.", "tabs": { @@ -1010,18 +910,18 @@ "jump-to-next": "Jump to Next", "jump-to-previous": "Jump to Previous", "label": "Workload", + "page-is": "This page is", "select": "Select", "select-all": "All", - "select-none": "None", - "page-is": "This page is" + "select-none": "None" }, "document-info": { "close": "Close Document Info", "details": { - "created-on": "Created on: {{date}}", - "dossier": "in {{dossierName}}", - "due": "Due: {{date}}", - "pages": "{{pages}} pages" + "created-on": "Created on: {date}", + "dossier": "in {dossierName}", + "due": "Due: {date}", + "pages": "{pages} pages" }, "edit": "Edit Document Info", "label": "Document Info" @@ -1042,8 +942,27 @@ "disable": "Disable redaction", "enable": "Enable for redaction", "only-managers": "Enabling / disabling is permitted only for managers" - }, - "unassigned": "Unassigned" + } + }, + "file-status": { + "approved": "Approved", + "error": "Re-processing required", + "excluded": "Excluded", + "full-reprocess": "Processing", + "ocr-processing": "OCR Processing", + "processing": "Processing", + "reprocess": "Processing", + "unassigned": "Unassigned", + "under-approval": "Under Approval", + "under-review": "Under Review", + "unprocessed": "Unprocessed" + }, + "filter-menu": { + "filter-options": "Filter options", + "filter-types": "Filter types", + "label": "Filter", + "with-comments": "Only annotations with comments", + "with-reason-changes": "Only redactions with reason changes" }, "filter": { "analysis": "Analysis required", @@ -1054,196 +973,14 @@ "suggestion": "Suggested Redaction", "updated": "Updated" }, - "filter-menu": { - "filter-options": "Filter options", - "filter-types": "Filter types", - "label": "Filter", - "with-comments": "Only annotations with comments", - "with-reason-changes": "Only redactions with reason changes" - }, "filters": { "assigned-people": "Assignee(s)", - "dossier": "Dossier", "dossier-templates": "Rule Sets", "filter-by": "Filter:", "needs-work": "Workload", "people": "Dossier Member(s)", "status": "Status" }, - "finished": "Finished", - "FULLREPROCESS": "Processing", - "hint": "Hint", - "initials-avatar": { - "unassigned": "Unassigned", - "you": "You" - }, - "license-info-screen": { - "3rd-party-title": "Reference to 3rd Party Licenses", - "analyzed-pages": "Analyzed Pages", - "backend-version": "Backend Application Version", - "chart": { - "cumulative": "Cumulative Pages", - "legend": "Legend", - "licensed-total": "Licensed Total", - "pages-per-month": "Pages per Month", - "total-pages": "Total Pages" - }, - "copyright-claim-text": "Copyright © 2020 - {{currentYear}} knecon AG (powered by IQSER)", - "copyright-claim-title": "Copyright Claim", - "current-analyzed": "Analyzed Pages in Current Licensing Period", - "custom-app-title": "Custom Application Title", - "email": { - "body": { - "analyzed": "Total Analyzed Pages in current license period: {{pages}}.", - "licensed": "Licensed Pages: {{pages}}." - }, - "title": "License Report {{licenseCustomer}}" - }, - "email-report": "Email Report", - "end-user-license-text": "The use of this product is subject to the terms of the Redaction End User Agreement, unless other specified therein.", - "end-user-license-title": "End User License Agreement", - "frontend-version": "Frontend Application Version", - "licensed-page-count": "Number of licensed pages", - "licensed-to": "Licensed to", - "licensing-details": "Licensing Details", - "licensing-period": "Licensing Period", - "total-analyzed": "Total Analyzed Pages Since {{date}}", - "unlicensed-analyzed": "Unlicensed Analyzed Pages", - "usage-details": "Usage Details" - }, - "license-information": "License Information", - "manual-annotation": { - "dialog": { - "actions": { - "save": "Save" - }, - "content": { - "comment": "Comment", - "dictionary": "Dictionary", - "legalBasis": "Legal Basis", - "reason": "Reason", - "reason-placeholder": "Select a reason ...", - "rectangle": "Custom Rectangle", - "text": "Selected text:" - }, - "header": { - "dictionary": "Add to dictionary", - "false-positive": "Set false positive", - "force": "Force Redaction", - "redaction": "Redaction", - "request-dictionary": "Request add to dictionary", - "request-false-positive": "Request false positive", - "request-redaction": "Request Redaction" - } - }, - "undo": { - "error": "Failed to undo action.", - "success": "Action undone." - } - }, - "notifications": { - "mark-read": "Mark as read", - "mark-unread": "Mark as unread", - "today": "Today", - "tomorrow": "Tomorrow", - "yesterday": "Yesterday" - }, - "OCR_PROCESSING": "OCR Processing", - "overwrite-files-dialog": { - "options": { - "cancel": "Cancel all uploads", - "overwrite": "Replace existing document", - "remember": "Remember choice and don't ask me again", - "skip": "Keep existing document" - }, - "question": "{{filename}} already exists. Choose how to proceed:", - "title": "Document already exists!" - }, - "page": "Page", - "pagination": { - "next": "Next", - "previous": "Prev" - }, - "pdf-viewer": { - "text-popup": { - "actions": { - "search": "Search for selection" - } - } - }, - "pending-analysis": "Pending Re-Analysis", - "pending-changes-guard": "WARNING: You have unsaved changes. Press Cancel to go back and save these changes, or OK to lose these changes.", - "PROCESSING": "Processing", - "readonly": "Read only", - "redaction": "Redaction", - "remove-annotations-dialog": { - "confirm": "Yes, proceed and remove!", - "deny": "Cancel", - "dictionary": "Dictionary", - "image-type": "Image: {{typeLabel}}", - "remove-from-dictionary": { - "question": "Following entries will be removed from their respective dictionaries:", - "title": "Remove From Dictionary" - }, - "remove-only-here": { - "question": "Following redactions will be removed only here:", - "title": "Remove Redaction" - }, - "value": "Value" - }, - "report-type": { - "EXCEL_MULTI_FILE": "Excel (for all)", - "EXCEL_SINGLE_FILE": "Excel (per file)", - "label": "{{length}} report types", - "WORD_SINGLE_FILE_APPENDIX_A1_TEMPLATE": "Justification Appendix A1", - "WORD_SINGLE_FILE_APPENDIX_A2_TEMPLATE": "Justification Appendix A2" - }, - "reports": "Reports", - "reports-screen": { - "description": "A short text explaining how to create report documents. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.", - "document-setup-description": "A short text explaining what placeholders are and how to use them in your report template. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.", - "document-setup-heading": "Document Setup", - "report-documents": "Report Documents", - "title": "Reports", - "upload-document": "Upload a Document" - }, - "REPROCESS": "Processing", - "reset-filters": "Reset Filters", - "roles": { - "INACTIVE": "Inactive", - "MANAGER_ADMIN": "Manager & Admin", - "NO_ROLE": "No role defined", - "RED_ADMIN": "Application Admin", - "RED_MANAGER": "Manager", - "RED_USER": "User", - "RED_USER_ADMIN": "Users Admin", - "REGULAR": "Regular" - }, - "rule-editor": "Rule Editor", - "rules-screen": { - "error": { - "generic": "Something went wrong... Rules update failed!" - }, - "revert-changes": "Revert", - "save-changes": "Save Changes", - "success": { - "generic": "Rules updated!" - } - }, - "settings": "Settings", - "skipped": "Skipped", - "smtp-auth-config": { - "actions": { - "cancel": "Cancel", - "save": "Save Credentials" - }, - "form": { - "password": "Password", - "username": "Username", - "username-placeholder": "Login Username" - }, - "title": "Enable Authentication" - }, "general-config-screen": { "actions": { "save": "Save Configurations", @@ -1288,44 +1025,215 @@ }, "title": "Configure SMTP Account" }, - "trash": { - "label": "Trash", - "table-header": { - "title": "{{length}} deleted dossiers", - "info": "Deleted items can be restored up to {{hours}} hours from their deletions" + "hint": "Hint", + "image-category": { + "formula": "Formula", + "image": "Image", + "logo": "Logo", + "signature": "Signature" + }, + "initials-avatar": { + "unassigned": "Unassigned", + "you": "You" + }, + "license-info-screen": { + "analyzed-pages": "Analyzed Pages", + "backend-version": "Backend Application Version", + "chart": { + "cumulative": "Cumulative Pages", + "legend": "Legend", + "licensed-total": "Licensed Total", + "pages-per-month": "Pages per Month", + "total-pages": "Total Pages" }, - "bulk": { - "delete": "Forever Delete Selected Dossiers", - "restore": "Restore Selected Dossiers" + "copyright-claim-text": "Copyright © 2020 - {currentYear} knecon AG (powered by IQSER)", + "copyright-claim-title": "Copyright Claim", + "current-analyzed": "Analyzed Pages in Current Licensing Period", + "custom-app-title": "Custom Application Title", + "email-report": "Email Report", + "email": { + "body": { + "analyzed": "Total Analyzed Pages in current license period: {pages}.", + "licensed": "Licensed Pages: {pages}." + }, + "title": "License Report {licenseCustomer}" }, - "action": { - "delete": "Delete forever", - "restore": "Restore" - }, - "search": "Search...", - "table-col-names": { - "name": "Name", - "owner": "Owner", - "deleted-on": "Deleted on", - "time-to-restore": "Time to restore" - }, - "no-data": { - "title": "There are no dossiers yet." - }, - "no-match": { - "title": "No dossiers match your current filters." + "end-user-license-text": "The use of this product is subject to the terms of the Redaction End User Agreement, unless other specified therein.", + "end-user-license-title": "End User License Agreement", + "frontend-version": "Frontend Application Version", + "licensed-page-count": "Number of licensed pages", + "licensed-to": "Licensed to", + "licensing-details": "Licensing Details", + "licensing-period": "Licensing Period", + "total-analyzed": "Total Analyzed Pages Since {date}", + "unlicensed-analyzed": "Unlicensed Analyzed Pages", + "usage-details": "Usage Details" + }, + "license-information": "License Information", + "manual-annotation": { + "dialog": { + "actions": { + "save": "Save" + }, + "content": { + "comment": "Comment", + "dictionary": "Dictionary", + "legalBasis": "Legal Basis", + "reason": "Reason", + "reason-placeholder": "Select a reason ...", + "rectangle": "Custom Rectangle", + "text": "Selected text:" + }, + "header": { + "dictionary": "Add to dictionary", + "false-positive": "Set false positive", + "force": "Force Redaction", + "redaction": "Redaction", + "request-dictionary": "Request add to dictionary", + "request-false-positive": "Request false positive", + "request-redaction": "Request Redaction" + } } }, - "sorting": { - "alphabetically": "Alphabetically", - "custom": "Custom", - "number-of-analyses": "Number of analyses", - "number-of-pages": "Number of pages", - "oldest": "Oldest", - "recent": "Recent" + "notifications": { + "mark-read": "Mark as read", + "mark-unread": "Mark as unread", + "today": "Today", + "tomorrow": "Tomorrow", + "yesterday": "Yesterday" + }, + "overwrite-files-dialog": { + "options": { + "cancel": "Cancel all uploads", + "overwrite": "Replace existing document", + "remember": "Remember choice and don't ask me again", + "skip": "Keep existing document" + }, + "question": "{filename} already exists. Choose how to proceed:", + "title": "Document already exists!" + }, + "page": "Page", + "pagination": { + "next": "Next", + "previous": "Prev" + }, + "pdf-viewer": { + "text-popup": { + "actions": { + "search": "Search for selection" + } + } + }, + "pending-changes-guard": "WARNING: You have unsaved changes. Press Cancel to go back and save these changes, or OK to lose these changes.", + "readonly": "Read only", + "recategorize-image-dialog": { + "actions": { + "cancel": "Cancel", + "save": "Save Changes" + }, + "content": { + "comment": "Comment", + "type": "Select image type", + "type-placeholder": "Select a type..." + }, + "header": "Edit Image Type" + }, + "redaction": "Redaction", + "remove-annotations-dialog": { + "confirm": "Yes, proceed and remove!", + "deny": "Cancel", + "dictionary": "Dictionary", + "image-type": "Image: {typeLabel}", + "remove-from-dictionary": { + "question": "Following entries will be removed from their respective dictionaries:", + "title": "Remove From Dictionary" + }, + "remove-only-here": { + "question": "Following redactions will be removed only here:", + "title": "Remove Redaction" + }, + "value": "Value" + }, + "report-type": { + "label": "{length} report {length, plural, one{type} other{types}}" + }, + "reports": "Reports", + "reports-screen": { + "description": "A short text explaining how to create report documents. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.", + "document-setup-description": "A short text explaining what placeholders are and how to use them in your report template. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.", + "document-setup-heading": "Document Setup", + "report-documents": "Report Documents", + "title": "Reports", + "upload-document": "Upload a Document" + }, + "reset-filters": "Reset Filters", + "reset-password-dialog": { + "actions": { + "cancel": "Cancel", + "save": "Save" + }, + "form": { + "password": "Temporary password" + }, + "header": "Set Temporary Password for {userName}" + }, + "roles": { + "inactive": "Inactive", + "manager-admin": "Manager & Admin", + "no-role": "No role defined", + "red-admin": "Application Admin", + "red-manager": "Manager", + "red-user": "User", + "red-user-admin": "Users Admin", + "regular": "Regular" + }, + "rule-editor": "Rule Editor", + "rules-screen": { + "error": { + "generic": "Something went wrong... Rules update failed!" + }, + "revert-changes": "Revert", + "save-changes": "Save Changes", + "success": { + "generic": "Rules updated!" + } + }, + "search-screen": { + "cols": { + "document": "Document", + "dossier": "Dossier", + "pages": "Pages", + "status": "Status" + }, + "missing": "Missing", + "must-contain": "Must contain", + "no-data": "Please enter a keyword in the search input to look for documents or document content.", + "table-header": "{length} search {length, plural, one{result} other{results}}" + }, + "search": { + "entire-platform": "entire platform", + "header-label": "Search entire platform", + "placeholder": "Search for documents or document content", + "this-dossier": "in this dossier" + }, + "smtp-auth-config": { + "actions": { + "cancel": "Cancel", + "save": "Save Credentials" + }, + "form": { + "password": "Password", + "username": "Username", + "username-placeholder": "Login Username" + }, + "title": "Enable Authentication" + }, + "time": { + "days": "{days} {days, plural, one{day} other{days}}", + "hours": "{hours} {hours, plural, one{hour} other{hours}}", + "less-than-an-hour": "< 1 hour", + "no-time-left": "Time to restore already passed" }, - "submitted": "Submitted", - "suggestion": "Suggestion for redaction", "top-bar": { "navigation-items": { "back": "Back", @@ -1339,28 +1247,50 @@ "en": "English", "label": "Language" }, + "logout": "Logout", "my-profile": "My Profile", - "trash": "Trash", - "logout": "Logout" + "trash": "Trash" } } } }, + "trash": { + "action": { + "delete": "Delete forever", + "restore": "Restore" + }, + "bulk": { + "delete": "Forever Delete Selected Dossiers", + "restore": "Restore Selected Dossiers" + }, + "label": "Trash", + "no-data": { + "title": "There are no dossiers yet." + }, + "no-match": { + "title": "No dossiers match your current filters." + }, + "table-col-names": { + "deleted-on": "Deleted on", + "name": "Name", + "owner": "Owner", + "time-to-restore": "Time to restore" + }, + "table-header": { + "title": "{length} deleted {length, plural, one{dossier} other{dossiers}}" + } + }, "type": "Type", - "UNASSIGNED": "Unassigned", - "UNDER_APPROVAL": "Under Approval", - "UNDER_REVIEW": "Under Review", - "UNPROCESSED": "Unprocessed", "upload-status": { "dialog": { "actions": { "cancel": "Cancel Upload", "re-upload": "Retry Upload" }, - "title": "File Uploads ({{len}})" + "title": "File Uploads ({len})" }, "error": { - "file-size": "File too large. Limit is {{size}}MB.", + "file-size": "File too large. Limit is {size}MB.", "generic": "Failed to upload file. " } }, @@ -1385,14 +1315,14 @@ "roles": "Roles" }, "table-header": { - "title": "{{length}} users" + "title": "{length} {length, plural, one{user} other{users}}" } }, "user-management": "User Management", "user-profile": { "actions": { - "save": "Save profile", - "change-password": "Change Password" + "change-password": "Change Password", + "save": "Save profile" }, "form": { "email": "Email", @@ -1427,32 +1357,5 @@ "text-placeholder": "Enter text" }, "title": "Watermark" - }, - "time": { - "no-time-left": "Time to restore already passed", - "less-than-an-hour": "< 1 hour", - "hour": "hour", - "hours": "hours", - "day": "day", - "days": "days" - }, - "search": { - "header-label": "Search entire platform", - "placeholder": "Search for documents or document content", - "this-dossier": "in this dossier", - "entire-platform": "entire platform", - "close": "Close" - }, - "search-screen": { - "table-header": "{{length}} search results", - "cols": { - "document": "Document", - "status": "Status", - "dossier": "Dossier", - "pages": "Pages" - }, - "no-data": "Please enter a keyword in the search input to look for documents or document content.", - "missing": "Missing", - "must-contain": "Must contain" } } diff --git a/apps/red-ui/src/assets/icons/general/pdftron-action-close-compare.svg b/apps/red-ui/src/assets/icons/general/pdftron-action-close-compare.svg index df53361e4..82ddb11d8 100644 --- a/apps/red-ui/src/assets/icons/general/pdftron-action-close-compare.svg +++ b/apps/red-ui/src/assets/icons/general/pdftron-action-close-compare.svg @@ -1,11 +1,13 @@ - + - + diff --git a/apps/red-ui/src/assets/icons/general/pdftron-action-compare.svg b/apps/red-ui/src/assets/icons/general/pdftron-action-compare.svg index a7c3e888e..6765155b5 100644 --- a/apps/red-ui/src/assets/icons/general/pdftron-action-compare.svg +++ b/apps/red-ui/src/assets/icons/general/pdftron-action-compare.svg @@ -1,7 +1,7 @@ - + - 711C9D82-CAA8-47BE-954A-A9DA22CE85E6 - + - + diff --git a/apps/red-ui/src/assets/icons/general/reason.svg b/apps/red-ui/src/assets/icons/general/reason.svg index 2c3bfed3f..f08160e93 100644 --- a/apps/red-ui/src/assets/icons/general/reason.svg +++ b/apps/red-ui/src/assets/icons/general/reason.svg @@ -1 +1,14 @@ - \ No newline at end of file + + + + + + + + + + + diff --git a/apps/red-ui/src/assets/styles/red-controls.scss b/apps/red-ui/src/assets/styles/red-controls.scss index 339ec9625..919a592f1 100644 --- a/apps/red-ui/src/assets/styles/red-controls.scss +++ b/apps/red-ui/src/assets/styles/red-controls.scss @@ -43,6 +43,7 @@ -khtml-user-select: none; /* Konqueror HTML */ -moz-user-select: none; /* Old versions of Firefox */ -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; /* Non-prefixed version, currently - supported by Chrome, Edge, Opera and Firefox */ + user-select: none; + /* Non-prefixed version, currently + supported by Chrome, Edge, Opera and Firefox */ } diff --git a/libs/red-cache/.eslintrc.json b/libs/red-cache/.eslintrc.json index 34f0525ad..cf4ef48a5 100644 --- a/libs/red-cache/.eslintrc.json +++ b/libs/red-cache/.eslintrc.json @@ -4,10 +4,7 @@ "overrides": [ { "files": ["*.ts"], - "extends": [ - "plugin:@nrwl/nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], + "extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"], "parserOptions": { "project": ["libs/red-cache/tsconfig.*?.json"] }, diff --git a/libs/red-cache/jest.config.js b/libs/red-cache/jest.config.js index 2a387101b..197cb6356 100644 --- a/libs/red-cache/jest.config.js +++ b/libs/red-cache/jest.config.js @@ -5,10 +5,7 @@ module.exports = { 'ts-jest': { stringifyContentPathRegex: '\\.(html|svg)$', astTransformers: { - before: [ - 'jest-preset-angular/build/InlineFilesTransformer', - 'jest-preset-angular/build/StripStylesTransformer' - ] + before: ['jest-preset-angular/build/InlineFilesTransformer', 'jest-preset-angular/build/StripStylesTransformer'] }, tsconfig: '/tsconfig.spec.json' } diff --git a/libs/red-cache/src/lib/caches/cache-api.service.ts b/libs/red-cache/src/lib/caches/cache-api.service.ts index f4a9b7524..1d7d4aa01 100644 --- a/libs/red-cache/src/lib/caches/cache-api.service.ts +++ b/libs/red-cache/src/lib/caches/cache-api.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { DYNAMIC_CACHES, APP_LEVEL_CACHE } from './cache-utils'; +import { APP_LEVEL_CACHE, DYNAMIC_CACHES } from './cache-utils'; import { HttpEvent, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http'; import { from, Observable, throwError } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -12,17 +12,17 @@ export class CacheApiService { this.checkCachesExpiration(); } + get cachesAvailable(): boolean { + return !!window.caches; + } + cacheRequest(request: HttpRequest, httpResponse: HttpResponse): Promise { if (httpResponse.status < 300 && httpResponse.status >= 200) { const url = this._buildUrl(request); for (const dynCache of DYNAMIC_CACHES) { for (const cacheUrl of dynCache.urls) { if (url.indexOf(cacheUrl) >= 0) { - return caches - .open(dynCache.name) - .then(cache => - this._handleFetchResponse(httpResponse, dynCache, cache, url) - ); + return caches.open(dynCache.name).then(cache => this._handleFetchResponse(httpResponse, dynCache, cache, url)); } } } @@ -160,6 +160,15 @@ export class CacheApiService { return false; } + checkCachesExpiration() { + if (this.cachesAvailable) { + const now = new Date().getTime(); + for (const dynCache of DYNAMIC_CACHES) { + this._handleCacheExpiration(dynCache, now); + } + } + } + private _toHttpResponse(response: Response): Observable> { response = response.clone(); const contentType = response.headers.get('content-type'); @@ -224,15 +233,6 @@ export class CacheApiService { cache.put(url, new Response(body, cachedResponseFields)); } - checkCachesExpiration() { - if (this.cachesAvailable) { - const now = new Date().getTime(); - for (const dynCache of DYNAMIC_CACHES) { - this._handleCacheExpiration(dynCache, now); - } - } - } - private _handleCacheExpiration(dynCache, now) { caches.open(dynCache.name).then(cache => { cache.keys().then(keys => { @@ -263,10 +263,6 @@ export class CacheApiService { }); } - get cachesAvailable(): boolean { - return !!window.caches; - } - private _toHttpHeaders(headers: Headers): HttpHeaders { let httpHeaders = new HttpHeaders(); headers.forEach((value, key) => { diff --git a/libs/red-cache/src/lib/caches/http-cache-interceptor.ts b/libs/red-cache/src/lib/caches/http-cache-interceptor.ts index e6119d29d..fb3077403 100644 --- a/libs/red-cache/src/lib/caches/http-cache-interceptor.ts +++ b/libs/red-cache/src/lib/caches/http-cache-interceptor.ts @@ -1,10 +1,4 @@ -import { - HttpEvent, - HttpHandler, - HttpInterceptor, - HttpRequest, - HttpResponse -} from '@angular/common/http'; +import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { CacheApiService } from './cache-api.service'; diff --git a/libs/red-cache/src/test.ts b/libs/red-cache/src/test.ts index 882de64a8..8ff0d4a25 100644 --- a/libs/red-cache/src/test.ts +++ b/libs/red-cache/src/test.ts @@ -4,10 +4,7 @@ import 'core-js/es7/reflect'; import 'zone.js'; import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; +import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; declare const require: any; diff --git a/libs/red-ui-http/.eslintrc.json b/libs/red-ui-http/.eslintrc.json index 086670f3a..4b905e040 100644 --- a/libs/red-ui-http/.eslintrc.json +++ b/libs/red-ui-http/.eslintrc.json @@ -4,10 +4,7 @@ "overrides": [ { "files": ["*.ts"], - "extends": [ - "plugin:@nrwl/nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], + "extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"], "parserOptions": { "project": ["libs/red-ui-http/tsconfig.*?.json"] }, diff --git a/libs/red-ui-http/jest.config.js b/libs/red-ui-http/jest.config.js index f2d44522e..cc5fd00cb 100644 --- a/libs/red-ui-http/jest.config.js +++ b/libs/red-ui-http/jest.config.js @@ -5,10 +5,7 @@ module.exports = { 'ts-jest': { stringifyContentPathRegex: '\\.(html|svg)$', astTransformers: { - before: [ - 'jest-preset-angular/build/InlineFilesTransformer', - 'jest-preset-angular/build/StripStylesTransformer' - ] + before: ['jest-preset-angular/build/InlineFilesTransformer', 'jest-preset-angular/build/StripStylesTransformer'] }, tsconfig: '/tsconfig.spec.json' } 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 ca9c7491c..187f4185d 100644 --- a/libs/red-ui-http/src/lib/api/auditController.service.ts +++ b/libs/red-ui-http/src/lib/api/auditController.service.ts @@ -48,54 +48,35 @@ export class AuditControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getAuditCategories( - observe?: 'body', - reportProgress?: boolean - ): Observable>; + public getAuditCategories(observe?: 'body', reportProgress?: boolean): Observable>; - public getAuditCategories( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; + public getAuditCategories(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAuditCategories( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; + public getAuditCategories(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAuditCategories( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getAuditCategories(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request>( - 'get', - `${this.basePath}/audit/categories`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request>('get', `${this.basePath}/audit/categories`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -105,11 +86,7 @@ export class AuditControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public searchAuditLog( - body: AuditSearchRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public searchAuditLog(body: AuditSearchRequest, observe?: 'body', reportProgress?: boolean): Observable; public searchAuditLog( body: AuditSearchRequest, @@ -117,21 +94,11 @@ export class AuditControllerService { reportProgress?: boolean ): Observable>; - public searchAuditLog( - body: AuditSearchRequest, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public searchAuditLog(body: AuditSearchRequest, observe?: 'events', reportProgress?: boolean): Observable>; - public searchAuditLog( - body: AuditSearchRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public searchAuditLog(body: AuditSearchRequest, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling searchAuditLog.' - ); + throw new Error('Required parameter body was null or undefined when calling searchAuditLog.'); } let headers = this.defaultHeaders; @@ -139,24 +106,20 @@ export class AuditControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/libs/red-ui-http/src/lib/api/debugController.service.ts b/libs/red-ui-http/src/lib/api/debugController.service.ts index 7b129a6bf..27b384295 100644 --- a/libs/red-ui-http/src/lib/api/debugController.service.ts +++ b/libs/red-ui-http/src/lib/api/debugController.service.ts @@ -47,12 +47,7 @@ export class DebugControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public debugClassificationsForm( - file: Blob, - inline?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public debugClassificationsForm(file: Blob, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable; public debugClassificationsForm( file: Blob, @@ -61,23 +56,11 @@ export class DebugControllerService { reportProgress?: boolean ): Observable>; - public debugClassificationsForm( - file: Blob, - inline?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public debugClassificationsForm(file: Blob, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public debugClassificationsForm( - file: Blob, - inline?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public debugClassificationsForm(file: Blob, inline?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable { if (file === null || file === undefined) { - throw new Error( - 'Required parameter file was null or undefined when calling debugClassifications.' - ); + throw new Error('Required parameter file was null or undefined when calling debugClassifications.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -90,16 +73,13 @@ export class DebugControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -143,37 +123,15 @@ export class DebugControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public debugHtmlTablesForm( - file: Blob, - inline?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public debugHtmlTablesForm(file: Blob, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public debugHtmlTablesForm( - file: Blob, - inline?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public debugHtmlTablesForm(file: Blob, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public debugHtmlTablesForm( - file: Blob, - inline?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public debugHtmlTablesForm(file: Blob, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public debugHtmlTablesForm( - file: Blob, - inline?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public debugHtmlTablesForm(file: Blob, inline?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable { if (file === null || file === undefined) { - throw new Error( - 'Required parameter file was null or undefined when calling debugHtmlTables.' - ); + throw new Error('Required parameter file was null or undefined when calling debugHtmlTables.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -186,16 +144,13 @@ export class DebugControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -240,37 +195,15 @@ export class DebugControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public debugSectionsForm( - file: Blob, - inline?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public debugSectionsForm(file: Blob, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public debugSectionsForm( - file: Blob, - inline?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public debugSectionsForm(file: Blob, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public debugSectionsForm( - file: Blob, - inline?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public debugSectionsForm(file: Blob, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public debugSectionsForm( - file: Blob, - inline?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public debugSectionsForm(file: Blob, inline?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable { if (file === null || file === undefined) { - throw new Error( - 'Required parameter file was null or undefined when calling debugSections.' - ); + throw new Error('Required parameter file was null or undefined when calling debugSections.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -283,16 +216,13 @@ export class DebugControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -369,9 +299,7 @@ export class DebugControllerService { reportProgress: boolean = false ): Observable { if (file === null || file === undefined) { - throw new Error( - 'Required parameter file was null or undefined when calling redaction.' - ); + throw new Error('Required parameter file was null or undefined when calling redaction.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -387,16 +315,13 @@ export class DebugControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } 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 28fe72ac1..ce77d7944 100644 --- a/libs/red-ui-http/src/lib/api/dictionaryController.service.ts +++ b/libs/red-ui-http/src/lib/api/dictionaryController.service.ts @@ -100,9 +100,7 @@ export class DictionaryControllerService { } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling addEntry.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling addEntry.'); } if (type === null || type === undefined) { @@ -122,33 +120,27 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent( - String(dossierTemplateId) - )}`, + `${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { body: body, params: queryParameters, @@ -168,33 +160,13 @@ export class DictionaryControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public addType( - body: TypeValue, - dossierId?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public addType(body: TypeValue, dossierId?: string, observe?: 'body', reportProgress?: boolean): Observable; - public addType( - body: TypeValue, - dossierId?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public addType(body: TypeValue, dossierId?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public addType( - body: TypeValue, - dossierId?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public addType(body: TypeValue, dossierId?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public addType( - body: TypeValue, - dossierId?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public addType(body: TypeValue, dossierId?: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling addType.'); } @@ -209,24 +181,20 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -287,21 +255,15 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling deleteEntries.' - ); + throw new Error('Required parameter body was null or undefined when calling deleteEntries.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteEntries.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteEntries.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling deleteEntries.' - ); + throw new Error('Required parameter type was null or undefined when calling deleteEntries.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -314,33 +276,27 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/dictionary/delete/${encodeURIComponent( - String(type) - )}/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/dictionary/delete/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { body: body, params: queryParameters, @@ -398,21 +354,15 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteEntry.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteEntry.'); } if (entry === null || entry === undefined) { - throw new Error( - 'Required parameter entry was null or undefined when calling deleteEntry.' - ); + throw new Error('Required parameter entry was null or undefined when calling deleteEntry.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling deleteEntry.' - ); + throw new Error('Required parameter type was null or undefined when calling deleteEntry.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -425,16 +375,13 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -495,15 +442,11 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteType.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteType.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling deleteType.' - ); + throw new Error('Required parameter type was null or undefined when calling deleteType.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -516,25 +459,20 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/dictionary/type/${encodeURIComponent( - String(type) - )}/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -586,15 +524,11 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling deleteTypes.' - ); + throw new Error('Required parameter body was null or undefined when calling deleteTypes.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteTypes.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteTypes.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -607,33 +541,27 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/dictionary/type/${encodeURIComponent( - String(dossierTemplateId) - )}/delete`, + `${this.basePath}/dictionary/type/${encodeURIComponent(String(dossierTemplateId))}/delete`, { body: body, params: queryParameters, @@ -686,15 +614,11 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling downloadDictionaryFile.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling downloadDictionaryFile.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling downloadDictionaryFile.' - ); + throw new Error('Required parameter type was null or undefined when calling downloadDictionaryFile.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -707,25 +631,20 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/dictionary/download/${encodeURIComponent( - String(type) - )}/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/dictionary/download/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -744,12 +663,7 @@ export class DictionaryControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getAllTypes( - dossierTemplateId: string, - dossierId?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getAllTypes(dossierTemplateId: string, dossierId?: string, observe?: 'body', reportProgress?: boolean): Observable; public getAllTypes( dossierTemplateId: string, @@ -772,9 +686,7 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getAllTypes.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getAllTypes.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -787,16 +699,13 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -821,33 +730,15 @@ export class DictionaryControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getColors( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getColors(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; - public getColors( - dossierTemplateId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getColors(dossierTemplateId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getColors( - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getColors(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getColors( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getColors(dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getColors.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getColors.'); } let headers = this.defaultHeaders; @@ -855,30 +746,23 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -922,15 +806,11 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getDictionaryForType.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getDictionaryForType.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling getDictionaryForType.' - ); + throw new Error('Required parameter type was null or undefined when calling getDictionaryForType.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -943,25 +823,20 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent( - String(dossierTemplateId) - )}`, + `${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -980,12 +855,7 @@ export class DictionaryControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public setColors( - body: Colors, - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public setColors(body: Colors, dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; public setColors( body: Colors, @@ -994,29 +864,15 @@ export class DictionaryControllerService { reportProgress?: boolean ): Observable>; - public setColors( - body: Colors, - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public setColors(body: Colors, dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public setColors( - body: Colors, - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public setColors(body: Colors, dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setColors.' - ); + throw new Error('Required parameter body was null or undefined when calling setColors.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling setColors.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling setColors.'); } let headers = this.defaultHeaders; @@ -1024,39 +880,31 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -1105,21 +953,15 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling updateType.' - ); + throw new Error('Required parameter body was null or undefined when calling updateType.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling updateType.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling updateType.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling updateType.' - ); + throw new Error('Required parameter type was null or undefined when calling updateType.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -1132,33 +974,27 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/dictionary/type/${encodeURIComponent( - String(type) - )}/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { body: body, params: queryParameters, @@ -1216,15 +1052,11 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling uploadDictionaryFile.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling uploadDictionaryFile.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling uploadDictionaryFile.' - ); + throw new Error('Required parameter type was null or undefined when calling uploadDictionaryFile.'); } let headers = this.defaultHeaders; @@ -1232,16 +1064,13 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -1272,9 +1101,7 @@ export class DictionaryControllerService { return this.httpClient.request( 'post', - `${this.basePath}/dictionary/upload/${encodeURIComponent( - String(type) - )}/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/dictionary/upload/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { body: convertFormParamsToString ? formParams.toString() : formParams, withCredentials: this.configuration.withCredentials, 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 f46bb07d3..541ff9518 100644 --- a/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts +++ b/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts @@ -50,35 +50,23 @@ export class DigitalSignatureControllerService { */ public deleteDigitalSignature(observe?: 'body', reportProgress?: boolean): Observable; - public deleteDigitalSignature( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public deleteDigitalSignature(observe?: 'response', reportProgress?: boolean): Observable>; - public deleteDigitalSignature( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public deleteDigitalSignature(observe?: 'events', reportProgress?: boolean): Observable>; - public deleteDigitalSignature( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteDigitalSignature(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -97,54 +85,35 @@ export class DigitalSignatureControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDigitalSignature( - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getDigitalSignature(observe?: 'body', reportProgress?: boolean): Observable; - public getDigitalSignature( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getDigitalSignature(observe?: 'response', reportProgress?: boolean): Observable>; - public getDigitalSignature( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getDigitalSignature(observe?: 'events', reportProgress?: boolean): Observable>; - public getDigitalSignature( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getDigitalSignature(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/digital-signature`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/digital-signature`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -172,15 +141,9 @@ export class DigitalSignatureControllerService { reportProgress?: boolean ): Observable>; - public saveDigitalSignature( - body: DigitalSignature, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public saveDigitalSignature(body: DigitalSignature, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling saveDigitalSignature.' - ); + throw new Error('Required parameter body was null or undefined when calling saveDigitalSignature.'); } let headers = this.defaultHeaders; @@ -188,39 +151,31 @@ export class DigitalSignatureControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/digital-signature`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/digital-signature`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -230,11 +185,7 @@ export class DigitalSignatureControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateDigitalSignature( - body: DigitalSignatureViewModelReq, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public updateDigitalSignature(body: DigitalSignatureViewModelReq, observe?: 'body', reportProgress?: boolean): Observable; public updateDigitalSignature( body: DigitalSignatureViewModelReq, @@ -254,9 +205,7 @@ export class DigitalSignatureControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling saveDigitalSignature1.' - ); + throw new Error('Required parameter body was null or undefined when calling saveDigitalSignature1.'); } let headers = this.defaultHeaders; @@ -264,24 +213,20 @@ export class DigitalSignatureControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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 4ed3a9f5c..8995f46de 100644 --- a/libs/red-ui-http/src/lib/api/dossierController.service.ts +++ b/libs/red-ui-http/src/lib/api/dossierController.service.ts @@ -24,9 +24,9 @@ import { Configuration } from '../configuration'; @Injectable() export class DossierControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = ''; constructor( protected httpClient: HttpClient, @@ -42,20 +42,6 @@ export class DossierControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Creates or updates a dossier. * None @@ -63,30 +49,15 @@ export class DossierControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createOrUpdateDossier( - body: DossierRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createOrUpdateDossier( - body: DossierRequest, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createOrUpdateDossier( - body: DossierRequest, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createOrUpdateDossier( - body: DossierRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public createOrUpdateDossier(body: DossierRequest, observe?: 'body', reportProgress?: boolean): Observable; + + public createOrUpdateDossier(body: DossierRequest, observe?: 'response', reportProgress?: boolean): Observable>; + + public createOrUpdateDossier(body: DossierRequest, observe?: 'events', reportProgress?: boolean): Observable>; + + public createOrUpdateDossier(body: DossierRequest, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling createOrUpdateDossier.' - ); + throw new Error('Required parameter body was null or undefined when calling createOrUpdateDossier.'); } let headers = this.defaultHeaders; @@ -94,24 +65,20 @@ export class DossierControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -132,30 +99,15 @@ export class DossierControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteDossier( - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteDossier( - dossierId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteDossier( - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteDossier( - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteDossier(dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; + + public deleteDossier(dossierId: string, observe?: 'response', reportProgress?: boolean): Observable>; + + public deleteDossier(dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; + + public deleteDossier(dossierId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling deleteDossier.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling deleteDossier.'); } let headers = this.defaultHeaders; @@ -163,30 +115,23 @@ export class DossierControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/dossier/${encodeURIComponent(String(dossierId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/dossier/${encodeURIComponent(String(dossierId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -195,37 +140,25 @@ export class DossierControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDeletedDossiers( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getDeletedDossiers( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getDeletedDossiers( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getDeletedDossiers( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getDeletedDossiers(observe?: 'body', reportProgress?: boolean): Observable>; + + public getDeletedDossiers(observe?: 'response', reportProgress?: boolean): Observable>>; + + public getDeletedDossiers(observe?: 'events', reportProgress?: boolean): Observable>>; + + public getDeletedDossiers(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -245,30 +178,15 @@ export class DossierControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDossier( - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getDossier( - dossierId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getDossier( - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getDossier( - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getDossier(dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; + + public getDossier(dossierId: string, observe?: 'response', reportProgress?: boolean): Observable>; + + public getDossier(dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; + + public getDossier(dossierId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling getDossier.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getDossier.'); } let headers = this.defaultHeaders; @@ -276,30 +194,23 @@ export class DossierControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/dossier/${encodeURIComponent(String(dossierId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/dossier/${encodeURIComponent(String(dossierId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -309,30 +220,24 @@ export class DossierControllerService { * @param reportProgress flag to report request and response progress. */ public getDossiers(observe?: 'body', reportProgress?: boolean): Observable>; - public getDossiers( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getDossiers( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; + + public getDossiers(observe?: 'response', reportProgress?: boolean): Observable>>; + + public getDossiers(observe?: 'events', reportProgress?: boolean): Observable>>; + public getDossiers(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -352,30 +257,15 @@ export class DossierControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public hardDeleteDossiers( - body: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public hardDeleteDossiers( - body: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public hardDeleteDossiers( - body: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public hardDeleteDossiers( - body: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public hardDeleteDossiers(body: Array, observe?: 'body', reportProgress?: boolean): Observable; + + public hardDeleteDossiers(body: Array, observe?: 'response', reportProgress?: boolean): Observable>; + + public hardDeleteDossiers(body: Array, observe?: 'events', reportProgress?: boolean): Observable>; + + public hardDeleteDossiers(body: Array, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling hardDeleteDossiers.' - ); + throw new Error('Required parameter body was null or undefined when calling hardDeleteDossiers.'); } let headers = this.defaultHeaders; @@ -383,9 +273,7 @@ export class DossierControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } @@ -396,32 +284,26 @@ export class DossierControllerService { // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/deleted-dossiers/hard-delete`, - { - body: body, - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/deleted-dossiers/hard-delete`, { + body: body, + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -431,30 +313,15 @@ export class DossierControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public restoreDossiers( - body: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public restoreDossiers( - body: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public restoreDossiers( - body: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public restoreDossiers( - body: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public restoreDossiers(body: Array, observe?: 'body', reportProgress?: boolean): Observable; + + public restoreDossiers(body: Array, observe?: 'response', reportProgress?: boolean): Observable>; + + public restoreDossiers(body: Array, observe?: 'events', reportProgress?: boolean): Observable>; + + public restoreDossiers(body: Array, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling restoreDossiers.' - ); + throw new Error('Required parameter body was null or undefined when calling restoreDossiers.'); } let headers = this.defaultHeaders; @@ -462,9 +329,7 @@ export class DossierControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } @@ -475,16 +340,14 @@ export class DossierControllerService { // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -498,4 +361,18 @@ export class DossierControllerService { reportProgress: reportProgress }); } + + /** + * @param consumes string[] mime-types + * @return true: consumes contains 'multipart/form-data', false: otherwise + */ + private canConsumeForm(consumes: string[]): boolean { + const form = 'multipart/form-data'; + for (const consume of consumes) { + if (form === consume) { + return true; + } + } + return false; + } } 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 02d8c84c9..6276e3e9f 100644 --- a/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts +++ b/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts @@ -71,9 +71,7 @@ export class DossierTemplateControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling createOrUpdateDossierTemplate.' - ); + throw new Error('Required parameter body was null or undefined when calling createOrUpdateDossierTemplate.'); } let headers = this.defaultHeaders; @@ -81,39 +79,31 @@ export class DossierTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/dossier-template`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/dossier-template`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -123,33 +113,15 @@ export class DossierTemplateControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteDossierTemplate( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deleteDossierTemplate(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; - public deleteDossierTemplate( - dossierTemplateId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public deleteDossierTemplate(dossierTemplateId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteDossierTemplate( - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public deleteDossierTemplate(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteDossierTemplate( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteDossierTemplate(dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteDossierTemplate.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteDossierTemplate.'); } let headers = this.defaultHeaders; @@ -157,16 +129,13 @@ export class DossierTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -190,30 +159,12 @@ export class DossierTemplateControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteDossierTemplates( - body: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteDossierTemplates( - body: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteDossierTemplates( - body: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteDossierTemplates( - body: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteDossierTemplates(body: Array, observe?: 'body', reportProgress?: boolean): Observable; + public deleteDossierTemplates(body: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteDossierTemplates(body: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteDossierTemplates(body: Array, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling deleteDossierTemplates.' - ); + throw new Error('Required parameter body was null or undefined when calling deleteDossierTemplates.'); } let headers = this.defaultHeaders; @@ -221,24 +172,20 @@ export class DossierTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -258,54 +205,35 @@ export class DossierTemplateControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getAllDossierTemplates( - observe?: 'body', - reportProgress?: boolean - ): Observable>; + public getAllDossierTemplates(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllDossierTemplates( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; + public getAllDossierTemplates(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllDossierTemplates( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; + public getAllDossierTemplates(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllDossierTemplates( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getAllDossierTemplates(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request>( - 'get', - `${this.basePath}/dossier-template`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request>('get', `${this.basePath}/dossier-template`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -315,11 +243,7 @@ export class DossierTemplateControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDossierTemplate( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getDossierTemplate(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; public getDossierTemplate( dossierTemplateId: string, @@ -333,15 +257,9 @@ export class DossierTemplateControllerService { reportProgress?: boolean ): Observable>; - public getDossierTemplate( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getDossierTemplate(dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getDossierTemplate.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getDossierTemplate.'); } let headers = this.defaultHeaders; @@ -349,16 +267,13 @@ export class DossierTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } 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 14ec27043..0905bfff4 100644 --- a/libs/red-ui-http/src/lib/api/downloadController.service.ts +++ b/libs/red-ui-http/src/lib/api/downloadController.service.ts @@ -52,37 +52,15 @@ export class DownloadControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public downloadFile( - storageId: string, - inline?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public downloadFile(storageId: string, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public downloadFile( - storageId: string, - inline?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public downloadFile(storageId: string, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public downloadFile( - storageId: string, - inline?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public downloadFile(storageId: string, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public downloadFile( - storageId: string, - inline?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public downloadFile(storageId: string, inline?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable { if (storageId === null || storageId === undefined) { - throw new Error( - 'Required parameter storageId was null or undefined when calling downloadFile.' - ); + throw new Error('Required parameter storageId was null or undefined when calling downloadFile.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -98,16 +76,13 @@ export class DownloadControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -127,54 +102,35 @@ export class DownloadControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDownloadStatus( - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getDownloadStatus(observe?: 'body', reportProgress?: boolean): Observable; - public getDownloadStatus( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getDownloadStatus(observe?: 'response', reportProgress?: boolean): Observable>; - public getDownloadStatus( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getDownloadStatus(observe?: 'events', reportProgress?: boolean): Observable>; - public getDownloadStatus( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getDownloadStatus(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/async/download/status`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/async/download/status`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -184,11 +140,7 @@ export class DownloadControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public prepareDownload( - body: PrepareDownloadRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public prepareDownload(body: PrepareDownloadRequest, observe?: 'body', reportProgress?: boolean): Observable; public prepareDownload( body: PrepareDownloadRequest, @@ -202,15 +154,9 @@ export class DownloadControllerService { reportProgress?: boolean ): Observable>; - public prepareDownload( - body: PrepareDownloadRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public prepareDownload(body: PrepareDownloadRequest, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling prepareDownload.' - ); + throw new Error('Required parameter body was null or undefined when calling prepareDownload.'); } let headers = this.defaultHeaders; @@ -218,39 +164,31 @@ export class DownloadControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/async/download/prepare`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/async/download/prepare`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -260,33 +198,15 @@ export class DownloadControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteDownload( - body: RemoveDownloadRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deleteDownload(body: RemoveDownloadRequest, observe?: 'body', reportProgress?: boolean): Observable; - public deleteDownload( - body: RemoveDownloadRequest, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public deleteDownload(body: RemoveDownloadRequest, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteDownload( - body: RemoveDownloadRequest, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public deleteDownload(body: RemoveDownloadRequest, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteDownload( - body: RemoveDownloadRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteDownload(body: RemoveDownloadRequest, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling prepareDownload1.' - ); + throw new Error('Required parameter body was null or undefined when calling prepareDownload1.'); } let headers = this.defaultHeaders; @@ -294,24 +214,20 @@ export class DownloadControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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 f7c2e2627..689b985f9 100644 --- a/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts +++ b/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts @@ -78,15 +78,11 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteFileAttribute.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteFileAttribute.'); } if (fileAttributeId === null || fileAttributeId === undefined) { - throw new Error( - 'Required parameter fileAttributeId was null or undefined when calling deleteFileAttribute.' - ); + throw new Error('Required parameter fileAttributeId was null or undefined when calling deleteFileAttribute.'); } let headers = this.defaultHeaders; @@ -94,25 +90,22 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent( - String(dossierTemplateId) - )}/${encodeURIComponent(String(fileAttributeId))}`, + `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent(String(dossierTemplateId))}/${encodeURIComponent( + String(fileAttributeId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -158,15 +151,11 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling deleteFileAttributes.' - ); + throw new Error('Required parameter body was null or undefined when calling deleteFileAttributes.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteFileAttributes.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteFileAttributes.'); } let headers = this.defaultHeaders; @@ -174,33 +163,27 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent( - String(dossierTemplateId) - )}/delete`, + `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent(String(dossierTemplateId))}/delete`, { body: body, withCredentials: this.configuration.withCredentials, @@ -242,9 +225,7 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getFileAttributesConfiguration.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getFileAttributesConfiguration.'); } let headers = this.defaultHeaders; @@ -252,25 +233,20 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/fileAttributes/config/${encodeURIComponent( - String(dossierTemplateId) - )}`, + `${this.basePath}/fileAttributes/config/${encodeURIComponent(String(dossierTemplateId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -321,21 +297,15 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setFileAttributes.' - ); + throw new Error('Required parameter body was null or undefined when calling setFileAttributes.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setFileAttributes.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setFileAttributes.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling setFileAttributes.' - ); + throw new Error('Required parameter fileId was null or undefined when calling setFileAttributes.'); } let headers = this.defaultHeaders; @@ -343,33 +313,27 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/fileAttributes/set/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/fileAttributes/set/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -416,15 +380,11 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setFileAttributesConfig.' - ); + throw new Error('Required parameter body was null or undefined when calling setFileAttributesConfig.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling setFileAttributesConfig.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling setFileAttributesConfig.'); } let headers = this.defaultHeaders; @@ -432,33 +392,27 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'put', - `${this.basePath}/fileAttributes/config/baseConfig/${encodeURIComponent( - String(dossierTemplateId) - )}`, + `${this.basePath}/fileAttributes/config/baseConfig/${encodeURIComponent(String(dossierTemplateId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -505,15 +459,11 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setFileAttributesConfiguration.' - ); + throw new Error('Required parameter body was null or undefined when calling setFileAttributesConfiguration.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling setFileAttributesConfiguration.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling setFileAttributesConfiguration.'); } let headers = this.defaultHeaders; @@ -521,33 +471,27 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent( - String(dossierTemplateId) - )}`, + `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent(String(dossierTemplateId))}`, { body: body, withCredentials: this.configuration.withCredentials, 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 e65b0b80c..19ba3aa4c 100644 --- a/libs/red-ui-http/src/lib/api/fileManagementController.service.ts +++ b/libs/red-ui-http/src/lib/api/fileManagementController.service.ts @@ -21,9 +21,9 @@ import { Configuration } from '../configuration'; @Injectable() export class FileManagementControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = ''; constructor( protected httpClient: HttpClient, @@ -39,20 +39,6 @@ export class FileManagementControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Deletes a file for a given dossierId and FileId * None @@ -61,40 +47,19 @@ export class FileManagementControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteFile( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteFile( - dossierId: string, - fileId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteFile( - dossierId: string, - fileId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteFile( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteFile(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; + + public deleteFile(dossierId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable>; + + public deleteFile(dossierId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable>; + + public deleteFile(dossierId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling deleteFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling deleteFile.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling deleteFile.' - ); + throw new Error('Required parameter fileId was null or undefined when calling deleteFile.'); } let headers = this.defaultHeaders; @@ -102,25 +67,20 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/delete/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) - )}`, + `${this.basePath}/delete/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -138,40 +98,24 @@ export class FileManagementControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteFiles( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deleteFiles(body: Array, dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; + public deleteFiles( body: Array, dossierId: string, observe?: 'response', reportProgress?: boolean ): Observable>; - public deleteFiles( - body: Array, - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteFiles( - body: Array, - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + + public deleteFiles(body: Array, dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; + + public deleteFiles(body: Array, dossierId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling deleteFiles.' - ); + throw new Error('Required parameter body was null or undefined when calling deleteFiles.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling deleteFiles.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling deleteFiles.'); } let headers = this.defaultHeaders; @@ -179,39 +123,31 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/delete/${encodeURIComponent(String(dossierId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/delete/${encodeURIComponent(String(dossierId))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -230,6 +166,7 @@ export class FileManagementControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public downloadAnnotatedFile( dossierId: string, fileId: string, @@ -237,6 +174,7 @@ export class FileManagementControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; + public downloadAnnotatedFile( dossierId: string, fileId: string, @@ -244,6 +182,7 @@ export class FileManagementControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; + public downloadAnnotatedFile( dossierId: string, fileId: string, @@ -252,15 +191,11 @@ export class FileManagementControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling downloadAnnotatedFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling downloadAnnotatedFile.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling downloadAnnotatedFile.' - ); + throw new Error('Required parameter fileId was null or undefined when calling downloadAnnotatedFile.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -273,25 +208,20 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/download/annotated/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/download/annotated/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -347,15 +277,11 @@ export class FileManagementControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling downloadOriginalFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling downloadOriginalFile.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling downloadOriginalFile.' - ); + throw new Error('Required parameter fileId was null or undefined when calling downloadOriginalFile.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -371,25 +297,20 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/download/original/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/download/original/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { responseType: 'blob', params: queryParameters, @@ -409,40 +330,24 @@ export class FileManagementControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public hardDeleteFile( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public hardDeleteFile(body: Array, dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; + public hardDeleteFile( body: Array, dossierId: string, observe?: 'response', reportProgress?: boolean ): Observable>; - public hardDeleteFile( - body: Array, - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public hardDeleteFile( - body: Array, - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + + public hardDeleteFile(body: Array, dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; + + public hardDeleteFile(body: Array, dossierId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling hardDeleteFile.' - ); + throw new Error('Required parameter body was null or undefined when calling hardDeleteFile.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling hardDeleteFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling hardDeleteFile.'); } let headers = this.defaultHeaders; @@ -450,39 +355,31 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['*/*']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/delete/hard-delete/${encodeURIComponent(String(dossierId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/delete/hard-delete/${encodeURIComponent(String(dossierId))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -493,40 +390,24 @@ export class FileManagementControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public restoreFiles( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public restoreFiles(body: Array, dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; + public restoreFiles( body: Array, dossierId: string, observe?: 'response', reportProgress?: boolean ): Observable>; - public restoreFiles( - body: Array, - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public restoreFiles( - body: Array, - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + + public restoreFiles(body: Array, dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; + + public restoreFiles(body: Array, dossierId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling restoreFiles.' - ); + throw new Error('Required parameter body was null or undefined when calling restoreFiles.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling restoreFiles.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling restoreFiles.'); } let headers = this.defaultHeaders; @@ -534,38 +415,44 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/delete/restore/${encodeURIComponent(String(dossierId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress + return this.httpClient.request('post', `${this.basePath}/delete/restore/${encodeURIComponent(String(dossierId))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); + } + + /** + * @param consumes string[] mime-types + * @return true: consumes contains 'multipart/form-data', false: otherwise + */ + private canConsumeForm(consumes: string[]): boolean { + const form = 'multipart/form-data'; + for (const consume of consumes) { + if (form === consume) { + return true; } - ); + } + return false; } } 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 1d5722b0b..bc1256dee 100644 --- a/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts +++ b/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts @@ -46,54 +46,35 @@ export class GeneralSettingsControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getGeneralConfigurations( - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getGeneralConfigurations(observe?: 'body', reportProgress?: boolean): Observable; - public getGeneralConfigurations( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getGeneralConfigurations(observe?: 'response', reportProgress?: boolean): Observable>; - public getGeneralConfigurations( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getGeneralConfigurations(observe?: 'events', reportProgress?: boolean): Observable>; - public getGeneralConfigurations( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getGeneralConfigurations(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/configuration/general`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/configuration/general`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -103,11 +84,7 @@ export class GeneralSettingsControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateGeneralConfigurations( - body: GeneralConfigurationModel, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public updateGeneralConfigurations(body: GeneralConfigurationModel, observe?: 'body', reportProgress?: boolean): Observable; public updateGeneralConfigurations( body: GeneralConfigurationModel, @@ -127,9 +104,7 @@ export class GeneralSettingsControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling updateGeneralConfigurations.' - ); + throw new Error('Required parameter body was null or undefined when calling updateGeneralConfigurations.'); } let headers = this.defaultHeaders; @@ -137,24 +112,20 @@ export class GeneralSettingsControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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 a16aeabac..f570b22fa 100644 --- a/libs/red-ui-http/src/lib/api/infoController.service.ts +++ b/libs/red-ui-http/src/lib/api/infoController.service.ts @@ -48,15 +48,9 @@ export class InfoControllerService { */ public getAuthInfo(observe?: 'body', reportProgress?: boolean): Observable; - public getAuthInfo( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getAuthInfo(observe?: 'response', reportProgress?: boolean): Observable>; - public getAuthInfo( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getAuthInfo(observe?: 'events', reportProgress?: boolean): Observable>; public getAuthInfo(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; @@ -64,16 +58,13 @@ export class InfoControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } 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 894586ed8..d0398013c 100644 --- a/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts +++ b/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts @@ -65,15 +65,9 @@ export class LegalBasisMappingControllerService { reportProgress?: boolean ): Observable>>; - public getLegalBasisMapping( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getLegalBasisMapping(dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getLegalBasisMapping.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getLegalBasisMapping.'); } let headers = this.defaultHeaders; @@ -81,16 +75,13 @@ export class LegalBasisMappingControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -143,15 +134,11 @@ export class LegalBasisMappingControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setLegalBasisMapping.' - ); + throw new Error('Required parameter body was null or undefined when calling setLegalBasisMapping.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling setLegalBasisMapping.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling setLegalBasisMapping.'); } let headers = this.defaultHeaders; @@ -159,38 +146,30 @@ export class LegalBasisMappingControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/legalBasis/${encodeURIComponent(String(dossierTemplateId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/legalBasis/${encodeURIComponent(String(dossierTemplateId))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + 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 eadc5b1d5..1e0fa4ea6 100644 --- a/libs/red-ui-http/src/lib/api/licenseReportController.service.ts +++ b/libs/red-ui-http/src/lib/api/licenseReportController.service.ts @@ -83,9 +83,7 @@ export class LicenseReportControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling licenseReport.' - ); + throw new Error('Required parameter body was null or undefined when calling licenseReport.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -101,24 +99,20 @@ export class LicenseReportControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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 04368a8ad..9bf849ccc 100644 --- a/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts +++ b/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts @@ -31,9 +31,9 @@ import { Configuration } from '../configuration'; @Injectable() export class ManualRedactionControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = ''; constructor( protected httpClient: HttpClient, @@ -92,27 +92,19 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling addComment.' - ); + throw new Error('Required parameter body was null or undefined when calling addComment.'); } if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling addComment.' - ); + throw new Error('Required parameter annotationId was null or undefined when calling addComment.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling addComment.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling addComment.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling addComment.' - ); + throw new Error('Required parameter fileId was null or undefined when calling addComment.'); } let headers = this.defaultHeaders; @@ -120,33 +112,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/comment/add/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, + `${this.basePath}/manualRedaction/comment/add/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(annotationId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -195,21 +183,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling addRedaction.' - ); + throw new Error('Required parameter body was null or undefined when calling addRedaction.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling addRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling addRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling addRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling addRedaction.'); } let headers = this.defaultHeaders; @@ -217,33 +199,27 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/redaction/add/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/redaction/add/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -297,27 +273,19 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling approveRequest.' - ); + throw new Error('Required parameter body was null or undefined when calling approveRequest.'); } if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling approveRequest.' - ); + throw new Error('Required parameter annotationId was null or undefined when calling approveRequest.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling approveRequest.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling approveRequest.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling approveRequest.' - ); + throw new Error('Required parameter fileId was null or undefined when calling approveRequest.'); } let headers = this.defaultHeaders; @@ -325,33 +293,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/approve/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, + `${this.basePath}/manualRedaction/approve/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(annotationId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -400,21 +364,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling declineRequest.' - ); + throw new Error('Required parameter annotationId was null or undefined when calling declineRequest.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling declineRequest.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling declineRequest.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling declineRequest.' - ); + throw new Error('Required parameter fileId was null or undefined when calling declineRequest.'); } let headers = this.defaultHeaders; @@ -422,25 +380,22 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/decline/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, + `${this.basePath}/manualRedaction/decline/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(annotationId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -488,21 +443,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling forceRedaction.' - ); + throw new Error('Required parameter body was null or undefined when calling forceRedaction.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling forceRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling forceRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling forceRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling forceRedaction.'); } let headers = this.defaultHeaders; @@ -510,33 +459,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/redaction/force/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/redaction/force/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -555,12 +500,7 @@ export class ManualRedactionControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getManualRedaction( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getManualRedaction(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public getManualRedaction( dossierId: string, fileId: string, @@ -573,22 +513,13 @@ export class ManualRedactionControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; - public getManualRedaction( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getManualRedaction(dossierId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling getManualRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getManualRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling getManualRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling getManualRedaction.'); } let headers = this.defaultHeaders; @@ -596,25 +527,20 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/manualRedaction/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -662,21 +588,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling legalBasisChange.' - ); + throw new Error('Required parameter body was null or undefined when calling legalBasisChange.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling legalBasisChange.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling legalBasisChange.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling legalBasisChange.' - ); + throw new Error('Required parameter fileId was null or undefined when calling legalBasisChange.'); } let headers = this.defaultHeaders; @@ -684,33 +604,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/redaction/legalBasisChange/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/redaction/legalBasisChange/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -759,21 +675,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling recategorizeImage.' - ); + throw new Error('Required parameter body was null or undefined when calling recategorizeImage.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling recategorizeImage.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling recategorizeImage.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling recategorizeImage.' - ); + throw new Error('Required parameter fileId was null or undefined when calling recategorizeImage.'); } let headers = this.defaultHeaders; @@ -781,33 +691,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/redaction/recategorize/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/redaction/recategorize/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -856,21 +762,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling removeRedaction.' - ); + throw new Error('Required parameter body was null or undefined when calling removeRedaction.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling removeRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling removeRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling removeRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling removeRedaction.'); } let headers = this.defaultHeaders; @@ -878,33 +778,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/redaction/remove/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/redaction/remove/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -953,21 +849,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling requestAddRedaction.' - ); + throw new Error('Required parameter body was null or undefined when calling requestAddRedaction.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling requestAddRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling requestAddRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling requestAddRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling requestAddRedaction.'); } let headers = this.defaultHeaders; @@ -975,33 +865,27 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/request/add/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/request/add/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -1050,21 +934,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling requestForceRedaction.' - ); + throw new Error('Required parameter body was null or undefined when calling requestForceRedaction.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling requestForceRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling requestForceRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling requestForceRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling requestForceRedaction.'); } let headers = this.defaultHeaders; @@ -1072,33 +950,27 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/request/force/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/request/force/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -1147,21 +1019,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling requestImageRecategorization.' - ); + throw new Error('Required parameter body was null or undefined when calling requestImageRecategorization.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling requestImageRecategorization.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling requestImageRecategorization.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling requestImageRecategorization.' - ); + throw new Error('Required parameter fileId was null or undefined when calling requestImageRecategorization.'); } let headers = this.defaultHeaders; @@ -1169,33 +1035,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/request/recategorize/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/request/recategorize/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -1244,21 +1106,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling requestLegalBasisChange.' - ); + throw new Error('Required parameter body was null or undefined when calling requestLegalBasisChange.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling requestLegalBasisChange.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling requestLegalBasisChange.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling requestLegalBasisChange.' - ); + throw new Error('Required parameter fileId was null or undefined when calling requestLegalBasisChange.'); } let headers = this.defaultHeaders; @@ -1266,33 +1122,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/request/legalBasis/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/request/legalBasis/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -1341,21 +1193,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling requestRemoveRedaction.' - ); + throw new Error('Required parameter body was null or undefined when calling requestRemoveRedaction.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling requestRemoveRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling requestRemoveRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling requestRemoveRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling requestRemoveRedaction.'); } let headers = this.defaultHeaders; @@ -1363,33 +1209,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/request/remove/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/request/remove/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -1409,13 +1251,7 @@ export class ManualRedactionControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public undo( - annotationId: string, - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public undo(annotationId: string, dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public undo( annotationId: string, dossierId: string, @@ -1438,15 +1274,11 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling undo.' - ); + throw new Error('Required parameter annotationId was null or undefined when calling undo.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling undo.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling undo.'); } if (fileId === null || fileId === undefined) { @@ -1458,25 +1290,22 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/manualRedaction/undo/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, + `${this.basePath}/manualRedaction/undo/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(annotationId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -1529,27 +1358,19 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling undoComment.' - ); + throw new Error('Required parameter annotationId was null or undefined when calling undoComment.'); } if (commentId === null || commentId === undefined) { - throw new Error( - 'Required parameter commentId was null or undefined when calling undoComment.' - ); + throw new Error('Required parameter commentId was null or undefined when calling undoComment.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling undoComment.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling undoComment.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling undoComment.' - ); + throw new Error('Required parameter fileId was null or undefined when calling undoComment.'); } let headers = this.defaultHeaders; @@ -1557,16 +1378,13 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -1574,11 +1392,9 @@ export class ManualRedactionControllerService { // to determine the Content-Type header return this.httpClient.request( 'delete', - `${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent( - String(annotationId) - )}/${encodeURIComponent(String(commentId))}`, + `${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(annotationId))}/${encodeURIComponent(String(commentId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, 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 b7a8a3861..540f5dcad 100644 --- a/libs/red-ui-http/src/lib/api/reanalysisController.service.ts +++ b/libs/red-ui-http/src/lib/api/reanalysisController.service.ts @@ -82,21 +82,15 @@ export class ReanalysisControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling excludePages.' - ); + throw new Error('Required parameter body was null or undefined when calling excludePages.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling excludePages.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling excludePages.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling excludePages.' - ); + throw new Error('Required parameter fileId was null or undefined when calling excludePages.'); } let headers = this.defaultHeaders; @@ -104,33 +98,27 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/exclude-pages/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/exclude-pages/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -182,21 +170,15 @@ export class ReanalysisControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling includePages.' - ); + throw new Error('Required parameter body was null or undefined when calling includePages.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling includePages.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling includePages.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling includePages.' - ); + throw new Error('Required parameter fileId was null or undefined when calling includePages.'); } let headers = this.defaultHeaders; @@ -204,33 +186,27 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/include-pages/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/include-pages/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -248,33 +224,15 @@ export class ReanalysisControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public ocrDossier( - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public ocrDossier(dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; - public ocrDossier( - dossierId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public ocrDossier(dossierId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public ocrDossier( - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public ocrDossier(dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public ocrDossier( - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public ocrDossier(dossierId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling ocrDossier.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling ocrDossier.'); } let headers = this.defaultHeaders; @@ -282,30 +240,23 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -316,43 +267,19 @@ export class ReanalysisControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public ocrFile( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public ocrFile(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; - public ocrFile( - dossierId: string, - fileId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public ocrFile(dossierId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public ocrFile( - dossierId: string, - fileId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public ocrFile(dossierId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public ocrFile( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public ocrFile(dossierId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling ocrFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling ocrFile.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling ocrFile.' - ); + throw new Error('Required parameter fileId was null or undefined when calling ocrFile.'); } let headers = this.defaultHeaders; @@ -360,25 +287,20 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/ocr/reanalyze/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -396,41 +318,19 @@ export class ReanalysisControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public ocrFiles( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public ocrFiles(body: Array, dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; - public ocrFiles( - body: Array, - dossierId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public ocrFiles(body: Array, dossierId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public ocrFiles( - body: Array, - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public ocrFiles(body: Array, dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public ocrFiles( - body: Array, - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public ocrFiles(body: Array, dossierId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling ocrFiles.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling ocrFiles.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling ocrFiles.'); } let headers = this.defaultHeaders; @@ -438,39 +338,31 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}/bulk`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}/bulk`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -481,12 +373,7 @@ export class ReanalysisControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public reanalyzeDossier( - dossierId: string, - force?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public reanalyzeDossier(dossierId: string, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; public reanalyzeDossier( dossierId: string, @@ -495,23 +382,11 @@ export class ReanalysisControllerService { reportProgress?: boolean ): Observable>; - public reanalyzeDossier( - dossierId: string, - force?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public reanalyzeDossier(dossierId: string, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public reanalyzeDossier( - dossierId: string, - force?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public reanalyzeDossier(dossierId: string, force?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling reanalyzeDossier.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling reanalyzeDossier.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -524,31 +399,24 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}`, { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -560,13 +428,7 @@ export class ReanalysisControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public reanalyzeFile( - dossierId: string, - fileId: string, - force?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public reanalyzeFile(dossierId: string, fileId: string, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; public reanalyzeFile( dossierId: string, @@ -592,15 +454,11 @@ export class ReanalysisControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling reanalyzeFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling reanalyzeFile.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling reanalyzeFile.' - ); + throw new Error('Required parameter fileId was null or undefined when calling reanalyzeFile.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -613,25 +471,20 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/reanalyze/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -683,15 +536,11 @@ export class ReanalysisControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling reanalyzeFilesForDossier.' - ); + throw new Error('Required parameter body was null or undefined when calling reanalyzeFilesForDossier.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling reanalyzeFilesForDossier.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling reanalyzeFilesForDossier.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -704,40 +553,32 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}/bulk`, - { - body: body, - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}/bulk`, { + body: body, + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -781,15 +622,11 @@ export class ReanalysisControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling toggleAnalysis.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling toggleAnalysis.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling toggleAnalysis.' - ); + throw new Error('Required parameter fileId was null or undefined when calling toggleAnalysis.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -802,25 +639,20 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/toggle-analysis/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/toggle-analysis/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, 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 2dbfea216..ad39fcf90 100644 --- a/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts +++ b/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts @@ -49,12 +49,7 @@ export class ReportTemplateControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteTemplate( - dossierTemplateId: string, - templateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deleteTemplate(dossierTemplateId: string, templateId: string, observe?: 'body', reportProgress?: boolean): Observable; public deleteTemplate( dossierTemplateId: string, @@ -77,15 +72,11 @@ export class ReportTemplateControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteTemplate.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteTemplate.'); } if (templateId === null || templateId === undefined) { - throw new Error( - 'Required parameter templateId was null or undefined when calling deleteTemplate.' - ); + throw new Error('Required parameter templateId was null or undefined when calling deleteTemplate.'); } let headers = this.defaultHeaders; @@ -93,25 +84,20 @@ export class ReportTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/templateUpload/${encodeURIComponent( - String(dossierTemplateId) - )}/${encodeURIComponent(String(templateId))}`, + `${this.basePath}/templateUpload/${encodeURIComponent(String(dossierTemplateId))}/${encodeURIComponent(String(templateId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -157,15 +143,11 @@ export class ReportTemplateControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling downloadReportTemplate.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling downloadReportTemplate.'); } if (templateId === null || templateId === undefined) { - throw new Error( - 'Required parameter templateId was null or undefined when calling downloadReportTemplate.' - ); + throw new Error('Required parameter templateId was null or undefined when calling downloadReportTemplate.'); } let headers = this.defaultHeaders; @@ -173,25 +155,20 @@ export class ReportTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/templateUpload/${encodeURIComponent( - String(dossierTemplateId) - )}/${encodeURIComponent(String(templateId))}`, + `${this.basePath}/templateUpload/${encodeURIComponent(String(dossierTemplateId))}/${encodeURIComponent(String(templateId))}`, { withCredentials: this.configuration.withCredentials, responseType: 'blob', @@ -227,15 +204,9 @@ export class ReportTemplateControllerService { reportProgress?: boolean ): Observable>>; - public getAvailableReportTemplates( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getAvailableReportTemplates(dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getAvailableReportTemplates.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getAvailableReportTemplates.'); } let headers = this.defaultHeaders; @@ -243,16 +214,13 @@ export class ReportTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -305,9 +273,7 @@ export class ReportTemplateControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling uploadTemplate.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling uploadTemplate.'); } let headers = this.defaultHeaders; @@ -315,16 +281,13 @@ export class ReportTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } 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 6a1eea3d3..bfce50459 100644 --- a/libs/red-ui-http/src/lib/api/rulesController.service.ts +++ b/libs/red-ui-http/src/lib/api/rulesController.service.ts @@ -48,33 +48,15 @@ export class RulesControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public downloadRules( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public downloadRules(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; - public downloadRules( - dossierTemplateId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public downloadRules(dossierTemplateId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public downloadRules( - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public downloadRules(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public downloadRules( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public downloadRules(dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling downloadRules.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling downloadRules.'); } let headers = this.defaultHeaders; @@ -82,30 +64,23 @@ export class RulesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -115,33 +90,15 @@ export class RulesControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public downloadRulesFile( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public downloadRulesFile(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; - public downloadRulesFile( - dossierTemplateId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public downloadRulesFile(dossierTemplateId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public downloadRulesFile( - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public downloadRulesFile(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public downloadRulesFile( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public downloadRulesFile(dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling downloadRulesFile.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling downloadRulesFile.'); } let headers = this.defaultHeaders; @@ -149,30 +106,23 @@ export class RulesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}/download`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}/download`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -184,27 +134,13 @@ export class RulesControllerService { */ public uploadRules(body: Rules, observe?: 'body', reportProgress?: boolean): Observable; - public uploadRules( - body: Rules, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public uploadRules(body: Rules, observe?: 'response', reportProgress?: boolean): Observable>; - public uploadRules( - body: Rules, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public uploadRules(body: Rules, observe?: 'events', reportProgress?: boolean): Observable>; - public uploadRules( - body: Rules, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public uploadRules(body: Rules, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling uploadRules.' - ); + throw new Error('Required parameter body was null or undefined when calling uploadRules.'); } let headers = this.defaultHeaders; @@ -212,24 +148,20 @@ export class RulesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -251,12 +183,7 @@ export class RulesControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public uploadRulesFileForm( - dossierTemplateId: string, - file?: Blob, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public uploadRulesFileForm(dossierTemplateId: string, file?: Blob, observe?: 'body', reportProgress?: boolean): Observable; public uploadRulesFileForm( dossierTemplateId: string, @@ -279,9 +206,7 @@ export class RulesControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling uploadRulesFile.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling uploadRulesFile.'); } let headers = this.defaultHeaders; @@ -289,16 +214,13 @@ export class RulesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -324,17 +246,13 @@ export class RulesControllerService { formParams = (formParams.append('file', file) as any) || formParams; } - return this.httpClient.request( - 'post', - `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}/upload`, - { - body: convertFormParamsToString ? formParams.toString() : formParams, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}/upload`, { + body: convertFormParamsToString ? formParams.toString() : formParams, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + 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 3c88f814d..b628aa76b 100644 --- a/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts +++ b/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts @@ -48,35 +48,23 @@ export class SmtpConfigurationControllerService { */ public clearSMTPConfiguration(observe?: 'body', reportProgress?: boolean): Observable; - public clearSMTPConfiguration( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public clearSMTPConfiguration(observe?: 'response', reportProgress?: boolean): Observable>; - public clearSMTPConfiguration( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public clearSMTPConfiguration(observe?: 'events', reportProgress?: boolean): Observable>; - public clearSMTPConfiguration( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public clearSMTPConfiguration(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -95,54 +83,35 @@ export class SmtpConfigurationControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getCurrentSMTPConfiguration( - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getCurrentSMTPConfiguration(observe?: 'body', reportProgress?: boolean): Observable; - public getCurrentSMTPConfiguration( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getCurrentSMTPConfiguration(observe?: 'response', reportProgress?: boolean): Observable>; - public getCurrentSMTPConfiguration( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getCurrentSMTPConfiguration(observe?: 'events', reportProgress?: boolean): Observable>; - public getCurrentSMTPConfiguration( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getCurrentSMTPConfiguration(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/configuration/smtp`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/configuration/smtp`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -152,11 +121,7 @@ export class SmtpConfigurationControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public testSMTPConfiguration( - body: SMTPConfigurationModel, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public testSMTPConfiguration(body: SMTPConfigurationModel, observe?: 'body', reportProgress?: boolean): Observable; public testSMTPConfiguration( body: SMTPConfigurationModel, @@ -164,21 +129,11 @@ export class SmtpConfigurationControllerService { reportProgress?: boolean ): Observable>; - public testSMTPConfiguration( - body: SMTPConfigurationModel, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public testSMTPConfiguration(body: SMTPConfigurationModel, observe?: 'events', reportProgress?: boolean): Observable>; - public testSMTPConfiguration( - body: SMTPConfigurationModel, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public testSMTPConfiguration(body: SMTPConfigurationModel, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling testSMTPConfiguration.' - ); + throw new Error('Required parameter body was null or undefined when calling testSMTPConfiguration.'); } let headers = this.defaultHeaders; @@ -186,24 +141,20 @@ export class SmtpConfigurationControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -224,11 +175,7 @@ export class SmtpConfigurationControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateSMTPConfiguration( - body: SMTPConfigurationModel, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public updateSMTPConfiguration(body: SMTPConfigurationModel, observe?: 'body', reportProgress?: boolean): Observable; public updateSMTPConfiguration( body: SMTPConfigurationModel, @@ -236,21 +183,11 @@ export class SmtpConfigurationControllerService { reportProgress?: boolean ): Observable>; - public updateSMTPConfiguration( - body: SMTPConfigurationModel, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public updateSMTPConfiguration(body: SMTPConfigurationModel, observe?: 'events', reportProgress?: boolean): Observable>; - public updateSMTPConfiguration( - body: SMTPConfigurationModel, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public updateSMTPConfiguration(body: SMTPConfigurationModel, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling updateSMTPConfiguration.' - ); + throw new Error('Required parameter body was null or undefined when calling updateSMTPConfiguration.'); } let headers = this.defaultHeaders; @@ -258,24 +195,20 @@ export class SmtpConfigurationControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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 d6cbfe094..43b06ba9c 100644 --- a/libs/red-ui-http/src/lib/api/statusController.service.ts +++ b/libs/red-ui-http/src/lib/api/statusController.service.ts @@ -48,33 +48,15 @@ export class StatusControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDossierStatus( - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; + public getDossierStatus(dossierId: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getDossierStatus( - dossierId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; + public getDossierStatus(dossierId: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getDossierStatus( - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; + public getDossierStatus(dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getDossierStatus( - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getDossierStatus(dossierId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling getDossierStatus.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getDossierStatus.'); } let headers = this.defaultHeaders; @@ -82,30 +64,23 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request>( - 'get', - `${this.basePath}/status/${encodeURIComponent(String(dossierId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request>('get', `${this.basePath}/status/${encodeURIComponent(String(dossierId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -116,12 +91,7 @@ export class StatusControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getFileStatus( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getFileStatus(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public getFileStatus( dossierId: string, @@ -137,22 +107,13 @@ export class StatusControllerService { reportProgress?: boolean ): Observable>; - public getFileStatus( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getFileStatus(dossierId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling getFileStatus.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getFileStatus.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling getFileStatus.' - ); + throw new Error('Required parameter fileId was null or undefined when calling getFileStatus.'); } let headers = this.defaultHeaders; @@ -160,25 +121,20 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) - )}`, + `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -213,15 +169,9 @@ export class StatusControllerService { reportProgress?: boolean ): Observable }>>; - public getFileStatusForDossiers( - body: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getFileStatusForDossiers(body: Array, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling getFileStatusForDossiers.' - ); + throw new Error('Required parameter body was null or undefined when calling getFileStatusForDossiers.'); } let headers = this.defaultHeaders; @@ -229,39 +179,31 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request<{ [key: string]: Array }>( - 'post', - `${this.basePath}/status`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request<{ [key: string]: Array }>('post', `${this.basePath}/status`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -305,21 +247,15 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setFileReviewer.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setFileReviewer.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling setFileReviewer.' - ); + throw new Error('Required parameter fileId was null or undefined when calling setFileReviewer.'); } if (reviewerId === null || reviewerId === undefined) { - throw new Error( - 'Required parameter reviewerId was null or undefined when calling setFileReviewer.' - ); + throw new Error('Required parameter reviewerId was null or undefined when calling setFileReviewer.'); } let headers = this.defaultHeaders; @@ -327,25 +263,22 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) - )}/${encodeURIComponent(String(reviewerId))}`, + `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent( + String(reviewerId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -396,21 +329,15 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setFileReviewerForList.' - ); + throw new Error('Required parameter body was null or undefined when calling setFileReviewerForList.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setFileReviewerForList.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setFileReviewerForList.'); } if (reviewerId === null || reviewerId === undefined) { - throw new Error( - 'Required parameter reviewerId was null or undefined when calling setFileReviewerForList.' - ); + throw new Error('Required parameter reviewerId was null or undefined when calling setFileReviewerForList.'); } let headers = this.defaultHeaders; @@ -418,33 +345,27 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/status/${encodeURIComponent( - String(dossierId) - )}/bulk/${encodeURIComponent(String(reviewerId))}`, + `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/bulk/${encodeURIComponent(String(reviewerId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -463,12 +384,7 @@ export class StatusControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public setStatusApproved( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public setStatusApproved(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public setStatusApproved( dossierId: string, @@ -477,29 +393,15 @@ export class StatusControllerService { reportProgress?: boolean ): Observable>; - public setStatusApproved( - dossierId: string, - fileId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public setStatusApproved(dossierId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public setStatusApproved( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public setStatusApproved(dossierId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setStatusApproved.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setStatusApproved.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling setStatusApproved.' - ); + throw new Error('Required parameter fileId was null or undefined when calling setStatusApproved.'); } let headers = this.defaultHeaders; @@ -507,25 +409,20 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/status/approved/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/status/approved/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -543,12 +440,7 @@ export class StatusControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public setStatusApprovedForList( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public setStatusApprovedForList(body: Array, dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; public setStatusApprovedForList( body: Array, @@ -571,15 +463,11 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setStatusApprovedForList.' - ); + throw new Error('Required parameter body was null or undefined when calling setStatusApprovedForList.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setStatusApprovedForList.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setStatusApprovedForList.'); } let headers = this.defaultHeaders; @@ -587,39 +475,31 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/status/approved/${encodeURIComponent(String(dossierId))}/bulk`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/status/approved/${encodeURIComponent(String(dossierId))}/bulk`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -663,15 +543,11 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setStatusUnderApproval.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setStatusUnderApproval.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling setStatusUnderApproval.' - ); + throw new Error('Required parameter fileId was null or undefined when calling setStatusUnderApproval.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -684,25 +560,20 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/status/underapproval/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/status/underapproval/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -754,21 +625,15 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setStatusUnderApprovalForList.' - ); + throw new Error('Required parameter body was null or undefined when calling setStatusUnderApprovalForList.'); } if (approverId === null || approverId === undefined) { - throw new Error( - 'Required parameter approverId was null or undefined when calling setStatusUnderApprovalForList.' - ); + throw new Error('Required parameter approverId was null or undefined when calling setStatusUnderApprovalForList.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setStatusUnderApprovalForList.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setStatusUnderApprovalForList.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -781,40 +646,32 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/status/underapproval/${encodeURIComponent(String(dossierId))}/bulk`, - { - body: body, - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/status/underapproval/${encodeURIComponent(String(dossierId))}/bulk`, { + body: body, + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -825,12 +682,7 @@ export class StatusControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public setStatusUnderReview( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public setStatusUnderReview(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public setStatusUnderReview( dossierId: string, @@ -853,15 +705,11 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setStatusUnderReview.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setStatusUnderReview.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling setStatusUnderReview.' - ); + throw new Error('Required parameter fileId was null or undefined when calling setStatusUnderReview.'); } let headers = this.defaultHeaders; @@ -869,25 +717,20 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/status/underreview/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/status/underreview/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -905,12 +748,7 @@ export class StatusControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public setStatusUnderReviewForList( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public setStatusUnderReviewForList(body: Array, dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; public setStatusUnderReviewForList( body: Array, @@ -933,15 +771,11 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setStatusUnderReviewForList.' - ); + throw new Error('Required parameter body was null or undefined when calling setStatusUnderReviewForList.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setStatusUnderReviewForList.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setStatusUnderReviewForList.'); } let headers = this.defaultHeaders; @@ -949,38 +783,30 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/status/underreview/${encodeURIComponent(String(dossierId))}/bulk`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/status/underreview/${encodeURIComponent(String(dossierId))}/bulk`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + 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 439ce3506..502792cf5 100644 --- a/libs/red-ui-http/src/lib/api/uploadController.service.ts +++ b/libs/red-ui-http/src/lib/api/uploadController.service.ts @@ -49,12 +49,7 @@ export class UploadControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public uploadFileForm( - dossierId: string, - file?: Blob, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public uploadFileForm(dossierId: string, file?: Blob, observe?: 'body', reportProgress?: boolean): Observable; public uploadFileForm( dossierId: string, @@ -70,16 +65,9 @@ export class UploadControllerService { reportProgress?: boolean ): Observable>; - public uploadFileForm( - dossierId: string, - file?: Blob, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public uploadFileForm(dossierId: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling uploadFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling uploadFile.'); } let headers = this.defaultHeaders; @@ -87,16 +75,13 @@ export class UploadControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -122,17 +107,13 @@ export class UploadControllerService { formParams = (formParams.append('file', file) as any) || formParams; } - return this.httpClient.request( - 'post', - `${this.basePath}/upload/${encodeURIComponent(String(dossierId))}`, - { - body: convertFormParamsToString ? formParams.toString() : formParams, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/upload/${encodeURIComponent(String(dossierId))}`, { + body: convertFormParamsToString ? formParams.toString() : formParams, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + 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 90d13f363..f7be77a31 100644 --- a/libs/red-ui-http/src/lib/api/userController.service.ts +++ b/libs/red-ui-http/src/lib/api/userController.service.ts @@ -53,12 +53,7 @@ export class UserControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public addRoleToUsers( - body: Array, - userId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public addRoleToUsers(body: Array, userId: string, observe?: 'body', reportProgress?: boolean): Observable; public addRoleToUsers( body: Array, @@ -67,29 +62,15 @@ export class UserControllerService { reportProgress?: boolean ): Observable>; - public addRoleToUsers( - body: Array, - userId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public addRoleToUsers(body: Array, userId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public addRoleToUsers( - body: Array, - userId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public addRoleToUsers(body: Array, userId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling addRoleToUsers.' - ); + throw new Error('Required parameter body was null or undefined when calling addRoleToUsers.'); } if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling addRoleToUsers.' - ); + throw new Error('Required parameter userId was null or undefined when calling addRoleToUsers.'); } let headers = this.defaultHeaders; @@ -97,39 +78,31 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/user/${encodeURIComponent(String(userId))}/role`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/user/${encodeURIComponent(String(userId))}/role`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -139,33 +112,15 @@ export class UserControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUser( - body: CreateUserRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public createUser(body: CreateUserRequest, observe?: 'body', reportProgress?: boolean): Observable; - public createUser( - body: CreateUserRequest, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public createUser(body: CreateUserRequest, observe?: 'response', reportProgress?: boolean): Observable>; - public createUser( - body: CreateUserRequest, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public createUser(body: CreateUserRequest, observe?: 'events', reportProgress?: boolean): Observable>; - public createUser( - body: CreateUserRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public createUser(body: CreateUserRequest, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling createUser.' - ); + throw new Error('Required parameter body was null or undefined when calling createUser.'); } let headers = this.defaultHeaders; @@ -173,24 +128,20 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -213,27 +164,13 @@ export class UserControllerService { */ public deleteUser(userId: string, observe?: 'body', reportProgress?: boolean): Observable; - public deleteUser( - userId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public deleteUser(userId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteUser( - userId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public deleteUser(userId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteUser( - userId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteUser(userId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling deleteUser.' - ); + throw new Error('Required parameter userId was null or undefined when calling deleteUser.'); } let headers = this.defaultHeaders; @@ -241,30 +178,23 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/user/${encodeURIComponent(String(userId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/user/${encodeURIComponent(String(userId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -274,33 +204,15 @@ export class UserControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteUsers( - userId: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deleteUsers(userId: Array, observe?: 'body', reportProgress?: boolean): Observable; - public deleteUsers( - userId: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public deleteUsers(userId: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteUsers( - userId: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public deleteUsers(userId: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteUsers( - userId: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteUsers(userId: Array, observe: any = 'body', reportProgress: boolean = false): Observable { if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling deleteUser1.' - ); + throw new Error('Required parameter userId was null or undefined when calling deleteUser1.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -315,16 +227,13 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -345,29 +254,13 @@ export class UserControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getAllUsers( - refreshCache?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; + public getAllUsers(refreshCache?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllUsers( - refreshCache?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; + public getAllUsers(refreshCache?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllUsers( - refreshCache?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; + public getAllUsers(refreshCache?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllUsers( - refreshCache?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getAllUsers(refreshCache?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable { let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (refreshCache !== undefined && refreshCache !== null) { queryParameters = queryParameters.set('refreshCache', refreshCache); @@ -378,16 +271,13 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -408,33 +298,15 @@ export class UserControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getUserById( - userId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getUserById(userId: string, observe?: 'body', reportProgress?: boolean): Observable; - public getUserById( - userId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getUserById(userId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserById( - userId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getUserById(userId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserById( - userId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getUserById(userId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling getUserById.' - ); + throw new Error('Required parameter userId was null or undefined when calling getUserById.'); } let headers = this.defaultHeaders; @@ -442,30 +314,23 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/user/${encodeURIComponent(String(userId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/user/${encodeURIComponent(String(userId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -475,29 +340,13 @@ export class UserControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getUsers( - refreshCache?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; + public getUsers(refreshCache?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getUsers( - refreshCache?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; + public getUsers(refreshCache?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getUsers( - refreshCache?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; + public getUsers(refreshCache?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getUsers( - refreshCache?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getUsers(refreshCache?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable { let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (refreshCache !== undefined && refreshCache !== null) { queryParameters = queryParameters.set('refreshCache', refreshCache); @@ -508,16 +357,13 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -539,12 +385,7 @@ export class UserControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public resetPassword( - body: ResetPasswordRequest, - userId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public resetPassword(body: ResetPasswordRequest, userId: string, observe?: 'body', reportProgress?: boolean): Observable; public resetPassword( body: ResetPasswordRequest, @@ -567,15 +408,11 @@ export class UserControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling resetPassword.' - ); + throw new Error('Required parameter body was null or undefined when calling resetPassword.'); } if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling resetPassword.' - ); + throw new Error('Required parameter userId was null or undefined when calling resetPassword.'); } let headers = this.defaultHeaders; @@ -583,39 +420,31 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/user/${encodeURIComponent(String(userId))}/reset-password`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/user/${encodeURIComponent(String(userId))}/reset-password`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -625,33 +454,15 @@ export class UserControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateMyProfile( - body: UpdateMyProfileRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public updateMyProfile(body: UpdateMyProfileRequest, observe?: 'body', reportProgress?: boolean): Observable; - public updateMyProfile( - body: UpdateMyProfileRequest, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public updateMyProfile(body: UpdateMyProfileRequest, observe?: 'response', reportProgress?: boolean): Observable>; - public updateMyProfile( - body: UpdateMyProfileRequest, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public updateMyProfile(body: UpdateMyProfileRequest, observe?: 'events', reportProgress?: boolean): Observable>; - public updateMyProfile( - body: UpdateMyProfileRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public updateMyProfile(body: UpdateMyProfileRequest, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling updateProfile.' - ); + throw new Error('Required parameter body was null or undefined when calling updateProfile.'); } let headers = this.defaultHeaders; @@ -659,24 +470,20 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -698,12 +505,7 @@ export class UserControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateProfile( - body: UpdateProfileRequest, - userId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public updateProfile(body: UpdateProfileRequest, userId: string, observe?: 'body', reportProgress?: boolean): Observable; public updateProfile( body: UpdateProfileRequest, @@ -726,15 +528,11 @@ export class UserControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling updateProfile1.' - ); + throw new Error('Required parameter body was null or undefined when calling updateProfile1.'); } if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling updateProfile1.' - ); + throw new Error('Required parameter userId was null or undefined when calling updateProfile1.'); } let headers = this.defaultHeaders; @@ -742,38 +540,30 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/user/profile/${encodeURIComponent(String(userId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/user/profile/${encodeURIComponent(String(userId))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + 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 56502f06d..3496ca8aa 100644 --- a/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts +++ b/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts @@ -45,33 +45,15 @@ export class UserPreferenceControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deletePreferences( - key: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deletePreferences(key: string, observe?: 'body', reportProgress?: boolean): Observable; - public deletePreferences( - key: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public deletePreferences(key: string, observe?: 'response', reportProgress?: boolean): Observable>; - public deletePreferences( - key: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public deletePreferences(key: string, observe?: 'events', reportProgress?: boolean): Observable>; - public deletePreferences( - key: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deletePreferences(key: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (key === null || key === undefined) { - throw new Error( - 'Required parameter key was null or undefined when calling deletePreferences.' - ); + throw new Error('Required parameter key was null or undefined when calling deletePreferences.'); } let headers = this.defaultHeaders; @@ -79,30 +61,23 @@ export class UserPreferenceControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/attributes/${encodeURIComponent(String(key))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/attributes/${encodeURIComponent(String(key))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -111,54 +86,35 @@ export class UserPreferenceControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getAllUserAttributes( - observe?: 'body', - reportProgress?: boolean - ): Observable<{ [key: string]: Array }>; + public getAllUserAttributes(observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: Array }>; - public getAllUserAttributes( - observe?: 'response', - reportProgress?: boolean - ): Observable }>>; + public getAllUserAttributes(observe?: 'response', reportProgress?: boolean): Observable }>>; - public getAllUserAttributes( - observe?: 'events', - reportProgress?: boolean - ): Observable }>>; + public getAllUserAttributes(observe?: 'events', reportProgress?: boolean): Observable }>>; - public getAllUserAttributes( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getAllUserAttributes(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request<{ [key: string]: Array }>( - 'get', - `${this.basePath}/attributes`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request<{ [key: string]: Array }>('get', `${this.basePath}/attributes`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -169,43 +125,19 @@ export class UserPreferenceControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public savePreferences( - body: Array, - key: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public savePreferences(body: Array, key: string, observe?: 'body', reportProgress?: boolean): Observable; - public savePreferences( - body: Array, - key: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public savePreferences(body: Array, key: string, observe?: 'response', reportProgress?: boolean): Observable>; - public savePreferences( - body: Array, - key: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public savePreferences(body: Array, key: string, observe?: 'events', reportProgress?: boolean): Observable>; - public savePreferences( - body: Array, - key: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public savePreferences(body: Array, key: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling savePreferences.' - ); + throw new Error('Required parameter body was null or undefined when calling savePreferences.'); } if (key === null || key === undefined) { - throw new Error( - 'Required parameter key was null or undefined when calling savePreferences.' - ); + throw new Error('Required parameter key was null or undefined when calling savePreferences.'); } let headers = this.defaultHeaders; @@ -213,38 +145,30 @@ export class UserPreferenceControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'put', - `${this.basePath}/attributes/${encodeURIComponent(String(key))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('put', `${this.basePath}/attributes/${encodeURIComponent(String(key))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + 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 73d201b79..7232b1106 100644 --- a/libs/red-ui-http/src/lib/api/versionsController.service.ts +++ b/libs/red-ui-http/src/lib/api/versionsController.service.ts @@ -77,15 +77,11 @@ export class VersionsControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling getDossierDictionaryVersion.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getDossierDictionaryVersion.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getDossierDictionaryVersion.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getDossierDictionaryVersion.'); } let headers = this.defaultHeaders; @@ -93,25 +89,20 @@ export class VersionsControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/version/dossier/${encodeURIComponent( - String(dossierTemplateId) - )}/${encodeURIComponent(String(dossierId))}`, + `${this.basePath}/version/dossier/${encodeURIComponent(String(dossierTemplateId))}/${encodeURIComponent(String(dossierId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -146,15 +137,9 @@ export class VersionsControllerService { reportProgress?: boolean ): Observable>; - public getVersions( - dossierTemplateId: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getVersions(dossierTemplateId: Array, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getVersions.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getVersions.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -169,30 +154,23 @@ export class VersionsControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['*/*']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request<{ [key: string]: VersionsResponse }>( - 'get', - `${this.basePath}/version`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request<{ [key: string]: VersionsResponse }>('get', `${this.basePath}/version`, { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + 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 f5ad9b03d..dfe0202ee 100644 --- a/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts +++ b/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts @@ -86,15 +86,11 @@ export class ViewedPagesControllerService { } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling addPage.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling addPage.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling addPage.' - ); + throw new Error('Required parameter fileId was null or undefined when calling addPage.'); } let headers = this.defaultHeaders; @@ -102,33 +98,27 @@ export class ViewedPagesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/viewedPages/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/viewedPages/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -147,12 +137,7 @@ export class ViewedPagesControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getViewedPages( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getViewedPages(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public getViewedPages( dossierId: string, @@ -168,22 +153,13 @@ export class ViewedPagesControllerService { reportProgress?: boolean ): Observable>; - public getViewedPages( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getViewedPages(dossierId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling getViewedPages.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getViewedPages.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling getViewedPages.' - ); + throw new Error('Required parameter fileId was null or undefined when calling getViewedPages.'); } let headers = this.defaultHeaders; @@ -191,25 +167,20 @@ export class ViewedPagesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/viewedPages/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/viewedPages/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -228,13 +199,7 @@ export class ViewedPagesControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public removePage( - dossierId: string, - fileId: string, - page: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public removePage(dossierId: string, fileId: string, page: number, observe?: 'body', reportProgress?: boolean): Observable; public removePage( dossierId: string, @@ -260,21 +225,15 @@ export class ViewedPagesControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling removePage.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling removePage.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling removePage.' - ); + throw new Error('Required parameter fileId was null or undefined when calling removePage.'); } if (page === null || page === undefined) { - throw new Error( - 'Required parameter page was null or undefined when calling removePage.' - ); + throw new Error('Required parameter page was null or undefined when calling removePage.'); } let headers = this.defaultHeaders; @@ -282,25 +241,22 @@ export class ViewedPagesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/viewedPages/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(page))}`, + `${this.basePath}/viewedPages/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(page))}`, { withCredentials: this.configuration.withCredentials, headers: headers, 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 0e3f7536d..f5c2db566 100644 --- a/libs/red-ui-http/src/lib/api/watermarkController.service.ts +++ b/libs/red-ui-http/src/lib/api/watermarkController.service.ts @@ -48,33 +48,15 @@ export class WatermarkControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteWatermark( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deleteWatermark(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; - public deleteWatermark( - dossierTemplateId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public deleteWatermark(dossierTemplateId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteWatermark( - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public deleteWatermark(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteWatermark( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteWatermark(dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteWatermark.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteWatermark.'); } let headers = this.defaultHeaders; @@ -82,30 +64,23 @@ export class WatermarkControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/watermark/${encodeURIComponent(String(dossierTemplateId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/watermark/${encodeURIComponent(String(dossierTemplateId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -115,11 +90,7 @@ export class WatermarkControllerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getWatermark( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getWatermark(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; public getWatermark( dossierTemplateId: string, @@ -127,21 +98,11 @@ export class WatermarkControllerService { reportProgress?: boolean ): Observable>; - public getWatermark( - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getWatermark(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getWatermark( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getWatermark(dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getWatermark.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getWatermark.'); } let headers = this.defaultHeaders; @@ -149,16 +110,13 @@ export class WatermarkControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -211,15 +169,11 @@ export class WatermarkControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling saveWatermark.' - ); + throw new Error('Required parameter body was null or undefined when calling saveWatermark.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling saveWatermark.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling saveWatermark.'); } let headers = this.defaultHeaders; @@ -227,24 +181,20 @@ export class WatermarkControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/libs/red-ui-http/src/lib/configuration.ts b/libs/red-ui-http/src/lib/configuration.ts index d43dea327..ff7fb826b 100644 --- a/libs/red-ui-http/src/lib/configuration.ts +++ b/libs/red-ui-http/src/lib/configuration.ts @@ -73,13 +73,7 @@ export class Configuration { * @return True if the given MIME is JSON, false otherwise. */ public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp( - '^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', - 'i' - ); - return ( - mime !== null && - (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json') - ); + const jsonMime: RegExp = new RegExp('^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } } diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/package.json b/package.json index 1d6ca5a92..eeb07c9ae 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "format:check": "nx format:check", "format:write": "nx format:write", "help": "nx help", + "i18n:extract": "ngx-translate-extract --input ./apps/red-ui/src --output apps/red-ui/src/assets/i18n/en.json --clean --sort --format namespaced-json --format-indentation ' '", "postinstall": "ngcc --properties es2015 browser module main", "lint": "nx workspace-lint && nx lint", "lint-fix": "nx workspace-lint --fix && nx lint --fix", @@ -48,6 +49,7 @@ "@angular/platform-browser-dynamic": "12.0.4", "@angular/router": "12.0.4", "@angular/service-worker": "12.0.4", + "@biesbjerg/ngx-translate-extract-marker": "^1.0.0", "@materia-ui/ngx-monaco-editor": "^5.1.0", "@ngx-translate/core": "^13.0.0", "@ngx-translate/http-loader": "^6.0.0", @@ -59,9 +61,11 @@ "keycloak-angular": "^8.2.0", "keycloak-js": "13.0.1", "lodash": "^4.17.21", + "messageformat": "^2.3.0", "moment": "^2.29.1", "ngx-color-picker": "^11.0.0", "ngx-toastr": "^14.0.0", + "ngx-translate-messageformat-compiler": "^4.10.0", "papaparse": "^5.3.1", "rxjs": "~6.6.7", "sass": "^1.35.1", @@ -78,6 +82,7 @@ "@angular/cli": "12.0.4", "@angular/compiler-cli": "12.0.4", "@angular/language-service": "12.0.4", + "@biesbjerg/ngx-translate-extract": "^7.0.4", "@nrwl/cli": "12.3.6", "@nrwl/cypress": "12.3.6", "@nrwl/eslint-plugin-nx": "12.3.6", diff --git a/yarn.lock b/yarn.lock index 75e959ec1..e71c35272 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2352,6 +2352,29 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@biesbjerg/ngx-translate-extract-marker@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@biesbjerg/ngx-translate-extract-marker/-/ngx-translate-extract-marker-1.0.0.tgz#3c50b5305fb2ffe4826c1473e25e6f746bb31916" + integrity sha512-GlCBQKmFE+b+qfIO0aGvuRc4LJVSfK27K2QQFXZLP55/w28iiq/q2CnBS8ya+4l+hapm7U3QPtFoZu9lmbUuew== + dependencies: + tslib "^1.9.0" + +"@biesbjerg/ngx-translate-extract@^7.0.4": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@biesbjerg/ngx-translate-extract/-/ngx-translate-extract-7.0.4.tgz#98190aa798dfe78a9f33904256891e76634fd52c" + integrity sha512-33hR94Fu26LK7Z+ImW2IdZiHfOcAzyIs1CdkUXg/536z2MqxBYqPoI9Ghsk6RTEfnsGa65wMgOcDXn7Ilhp8ew== + dependencies: + "@phenomnomnominal/tsquery" "^4.1.1" + boxen "^5.0.1" + colorette "^1.2.2" + flat "^5.0.2" + gettext-parser "^4.0.4" + glob "^7.1.6" + mkdirp "^1.0.4" + path "^0.12.7" + terminal-link "^2.1.1" + yargs "^16.2.0" + "@csstools/convert-colors@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7" @@ -2878,6 +2901,13 @@ resolved "https://registry.yarnpkg.com/@pdftron/webviewer/-/webviewer-7.3.3.tgz#e5ada58c4c4a4101a095507673ba2278042942ef" integrity sha512-cTJf9pXlN9tilliO8NgKw6vn1PPXSHKLOrUS7j4f+0sz2BJDVwO2rlI4BJBQ5BT2qIru1dg2GxYUyeXOqNyi9Q== +"@phenomnomnominal/tsquery@^4.1.1": + version "4.1.1" + resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-4.1.1.tgz#42971b83590e9d853d024ddb04a18085a36518df" + integrity sha512-jjMmK1tnZbm1Jq5a7fBliM4gQwjxMU7TFoRNwIyzwlO+eHPRCFv/Nv+H/Gi1jc3WR7QURG8D5d0Tn12YGrUqBQ== + dependencies: + esquery "^1.0.1" + "@rollup/plugin-commonjs@^19.0.0": version "19.0.0" resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-19.0.0.tgz#8c3e71f9a66908e60d70cc1be205834ef3e45f71" @@ -3836,6 +3866,13 @@ alphanum-sort@^1.0.2: resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= +ansi-align@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" + integrity sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw== + dependencies: + string-width "^3.0.0" + ansi-colors@4.1.1, ansi-colors@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -4413,6 +4450,20 @@ boolbase@^1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= +boxen@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.0.1.tgz#657528bdd3f59a772b8279b831f27ec2c744664b" + integrity sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA== + dependencies: + ansi-align "^3.0.0" + camelcase "^6.2.0" + chalk "^4.1.0" + cli-boxes "^2.2.1" + string-width "^4.2.0" + type-fest "^0.20.2" + widest-line "^3.1.0" + wrap-ansi "^7.0.0" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -4923,6 +4974,11 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +cli-boxes@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" + integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== + cli-cursor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" @@ -5205,7 +5261,7 @@ content-disposition@0.5.3: dependencies: safe-buffer "5.1.2" -content-type@~1.0.4: +content-type@^1.0.4, content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== @@ -6285,7 +6341,7 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding@^0.1.12: +encoding@^0.1.12, encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== @@ -6652,7 +6708,7 @@ esprima@^4.0.0, esprima@^4.0.1: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.0: +esquery@^1.0.1, esquery@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== @@ -7409,6 +7465,16 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +gettext-parser@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/gettext-parser/-/gettext-parser-4.0.4.tgz#bd5eb4af282336c8bf83f607d35f0839853b9670" + integrity sha512-VDZEeOIYd0veZXt5iAn0SS3I0Fz14fJw+59avRNa7VIslEDriRLxcfrBd/xeQyOcm6nyS4uuufxm2iw88qirAg== + dependencies: + content-type "^1.0.4" + encoding "^0.1.13" + readable-stream "^3.6.0" + safe-buffer "^5.2.1" + glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" @@ -9589,6 +9655,13 @@ make-fetch-happen@^8.0.9: socks-proxy-agent "^5.0.0" ssri "^8.0.0" +make-plural@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/make-plural/-/make-plural-4.3.0.tgz#f23de08efdb0cac2e0c9ba9f315b0dff6b4c2735" + integrity sha512-xTYd4JVHpSCW+aqDof6w/MebaMVNTVYBZhbB/vi513xXdiPT92JMVCo0Jq8W2UZnzYRFeVbQiQ+I25l13JuKvA== + optionalDependencies: + minimist "^1.2.0" + makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" @@ -9692,6 +9765,25 @@ merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +messageformat-formatters@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/messageformat-formatters/-/messageformat-formatters-2.0.1.tgz#0492c1402a48775f751c9b17c0354e92be012b08" + integrity sha512-E/lQRXhtHwGuiQjI7qxkLp8AHbMD5r2217XNe/SREbBlSawe0lOqsFb7rflZJmlQFSULNLIqlcjjsCPlB3m3Mg== + +messageformat-parser@^4.1.2: + version "4.1.3" + resolved "https://registry.yarnpkg.com/messageformat-parser/-/messageformat-parser-4.1.3.tgz#b824787f57fcda7d50769f5b63e8d4fda68f5b9e" + integrity sha512-2fU3XDCanRqeOCkn7R5zW5VQHWf+T3hH65SzuqRvjatBK7r4uyFa5mEX+k6F9Bd04LVM5G4/BHBTUJsOdW7uyg== + +messageformat@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/messageformat/-/messageformat-2.3.0.tgz#de263c49029d5eae65d7ee25e0754f57f425ad91" + integrity sha512-uTzvsv0lTeQxYI2y1NPa1lItL5VRI8Gb93Y2K2ue5gBPyrbJxfDi/EYWxh2PKv5yO42AJeeqblS9MJSh/IEk4w== + dependencies: + make-plural "^4.3.0" + messageformat-formatters "^2.0.1" + messageformat-parser "^4.1.2" + methods@^1.1.2, methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -10101,6 +10193,13 @@ ngx-toastr@^14.0.0: dependencies: tslib "^2.1.0" +ngx-translate-messageformat-compiler@^4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/ngx-translate-messageformat-compiler/-/ngx-translate-messageformat-compiler-4.10.0.tgz#f670252a9bbcbc24664765fb7584424d55d319b2" + integrity sha512-SA7H4eZ2BE5HUqgRiyNMHNnRUAINCD3bgLMrBm12ktbjppK74DMFiWq7bsRen/X569vqGEr16uQ/RkTHHLeqKg== + dependencies: + tslib "^1.10.0" + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -10863,6 +10962,14 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +path@^0.12.7: + version "0.12.7" + resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" + integrity sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8= + dependencies: + process "^0.11.1" + util "^0.10.3" + pbkdf2@^3.0.3: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" @@ -11674,7 +11781,7 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.11.10: +process@^0.11.1, process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= @@ -12300,7 +12407,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -12951,6 +13058,15 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" +string-width@^4.0.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + string-width@^4.1.0, string-width@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" @@ -13243,7 +13359,7 @@ tar@^6.1.0: mkdirp "^1.0.3" yallist "^4.0.0" -terminal-link@^2.0.0: +terminal-link@^2.0.0, terminal-link@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== @@ -13768,6 +13884,13 @@ util@0.10.3: dependencies: inherits "2.0.1" +util@^0.10.3: + version "0.10.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" + integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== + dependencies: + inherits "2.0.3" + util@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" @@ -14198,6 +14321,13 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" +widest-line@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" + integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== + dependencies: + string-width "^4.0.0" + wildcard@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec"