Merge branch 'master' into VM/RED-8748
This commit is contained in:
parent
48bc514f5b
commit
5e548798a5
@ -56,6 +56,7 @@ export const canResizeAnnotation = (
|
||||
|
||||
export const canEditAnnotation = (annotation: AnnotationWrapper) => (annotation.isRedacted || annotation.isSkipped) && !annotation.isImage;
|
||||
|
||||
export const canEditHint = (annotation: AnnotationWrapper) => (annotation.isHint && !annotation.isRuleBased) || annotation.isIgnoredHint;
|
||||
export const canEditHint = (annotation: AnnotationWrapper) =>
|
||||
((annotation.isHint && !annotation.isRuleBased) || annotation.isIgnoredHint) && !annotation.isImage;
|
||||
|
||||
export const canEditImage = (annotation: AnnotationWrapper) => annotation.isImage;
|
||||
|
||||
@ -40,6 +40,7 @@ import { MatDialog } from '@angular/material/dialog';
|
||||
import { download } from '@utils/file-download-utils';
|
||||
import { firstValueFrom } from 'rxjs';
|
||||
import { FileManagementService } from '@services/files/file-management.service';
|
||||
import { MultiSelectService } from '../../services/multi-select.service';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-file-header',
|
||||
@ -76,6 +77,7 @@ export class FileHeaderComponent implements OnInit, AfterViewInit, OnDetach, OnD
|
||||
private readonly _annotationManager: REDAnnotationManager,
|
||||
private readonly _dialog: MatDialog,
|
||||
private readonly _fileManagementService: FileManagementService,
|
||||
private readonly _multiSelectService: MultiSelectService,
|
||||
readonly state: FilePreviewStateService,
|
||||
readonly permissionsService: PermissionsService,
|
||||
) {}
|
||||
@ -172,6 +174,9 @@ export class FileHeaderComponent implements OnInit, AfterViewInit, OnDetach, OnD
|
||||
.find(annotation => annotation.id === this._annotationManager.resizingAnnotationId);
|
||||
this._annotationActionsService.cancelResize(resizedAnnotation).then();
|
||||
}
|
||||
if (this._multiSelectService.active()) {
|
||||
this._multiSelectService.deactivate();
|
||||
}
|
||||
this.fullScreen = false;
|
||||
this.closeFullScreen();
|
||||
this._changeRef.markForCheck();
|
||||
|
||||
@ -71,7 +71,9 @@
|
||||
<iqser-circle-button
|
||||
(action)="multiSelectService.deactivate()"
|
||||
[type]="circleButtonTypes.primary"
|
||||
[tooltip]="'file-preview.tabs.multi-select.close' | translate"
|
||||
icon="iqser:close"
|
||||
tooltipPosition="before"
|
||||
></iqser-circle-button>
|
||||
</div>
|
||||
|
||||
|
||||
@ -9,7 +9,6 @@ import { firstValueFrom } from 'rxjs';
|
||||
import { getEditRedactionOptions, RedactOrHintOption } from '../../utils/dialog-options';
|
||||
import { EditRedactionData, EditRedactResult } from '../../utils/dialog-types';
|
||||
import { LegalBasisOption } from '../manual-redaction-dialog/manual-annotation-dialog.component';
|
||||
import { editRedactionLabelsTranslations } from '@translations/redact-text-translations';
|
||||
import { Roles } from '@users/roles';
|
||||
import { DialogHelpModeKeys } from '../../utils/constants';
|
||||
|
||||
@ -31,11 +30,10 @@ export class EditRedactionDialogComponent
|
||||
readonly #applyToAllDossiers = this.data.applyToAllDossiers;
|
||||
readonly annotations = this.data.annotations;
|
||||
readonly iconButtonTypes = IconButtonTypes;
|
||||
readonly editRedactionLabelsTranslations = editRedactionLabelsTranslations;
|
||||
readonly isModifyDictionary = this.annotations.every(annotation => annotation.isModifyDictionary);
|
||||
readonly isImage = this.annotations.reduce((acc, next) => acc && next.isImage, true);
|
||||
readonly redactedTexts = !this.isImage ? this.annotations.map(annotation => annotation.value).filter(value => !!value) : null;
|
||||
readonly isManualRedaction = this.annotations.every(annotation => annotation.type === SuperTypes.ManualRedaction);
|
||||
readonly isManualRedaction = this.annotations.some(annotation => annotation.type === SuperTypes.ManualRedaction);
|
||||
readonly isHint = this.annotations.every(annotation => annotation.HINT || annotation.IMAGE_HINT);
|
||||
readonly isRedacted = this.annotations.every(annotation => annotation.isRedacted);
|
||||
readonly isImported: boolean = this.annotations.every(annotation => annotation.imported);
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
></div>
|
||||
|
||||
<div [ngStyle]="{ height: dialogContentHeight + redactedTextsAreaHeight + 'px' }" class="dialog-content redaction">
|
||||
<div *ngIf="!isImage" class="iqser-input-group">
|
||||
<div class="iqser-input-group">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@ -40,12 +40,15 @@ table {
|
||||
text-overflow: ellipsis;
|
||||
list-style-position: inside;
|
||||
overflow: hidden;
|
||||
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
th:last-child,
|
||||
td:last-child {
|
||||
max-width: 0;
|
||||
width: 50%;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,7 +28,6 @@ export class RemoveRedactionDialogComponent extends IqserDialogComponent<
|
||||
readonly hint = this.data.redactions[0].HINT;
|
||||
readonly skipped = this.data.redactions.some(annotation => annotation.isSkipped);
|
||||
readonly redactedTexts = this.data.redactions.map(annotation => annotation.value);
|
||||
readonly isImage = this.data.redactions.every(redaction => redaction.isImage);
|
||||
|
||||
protected readonly roles = Roles;
|
||||
form: UntypedFormGroup = this._formBuilder.group({
|
||||
|
||||
@ -56,6 +56,7 @@ import { SkippedService } from './services/skipped.service';
|
||||
import { StampService } from './services/stamp.service';
|
||||
import { ViewModeService } from './services/view-mode.service';
|
||||
import { RedactTextData } from './utils/dialog-types';
|
||||
import { MultiSelectService } from './services/multi-select.service';
|
||||
|
||||
@Component({
|
||||
templateUrl: './file-preview-screen.component.html',
|
||||
@ -111,6 +112,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
private readonly _fileManagementService: FileManagementService,
|
||||
private readonly _readableRedactionsService: ReadableRedactionsService,
|
||||
private readonly _dossierTemplatesService: DossierTemplatesService,
|
||||
private readonly _multiSelectService: MultiSelectService,
|
||||
) {
|
||||
super();
|
||||
effect(() => {
|
||||
@ -262,8 +264,11 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
}
|
||||
|
||||
@Bind()
|
||||
handleDeleteRectangleOnEsc($event: KeyboardEvent) {
|
||||
handleEscInsideViewer($event: KeyboardEvent) {
|
||||
$event.preventDefault();
|
||||
if (this._multiSelectService.active()) {
|
||||
this._multiSelectService.deactivate();
|
||||
}
|
||||
if (!!this._annotationManager.selected[0]) {
|
||||
const doesHaveWrapper = this._fileDataService.find(this._annotationManager.selected[0]?.Id);
|
||||
if (!doesHaveWrapper) {
|
||||
@ -306,7 +311,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
|
||||
this.pdfProxyService.configureElements();
|
||||
this.#restoreOldFilters();
|
||||
this.pdf.instance.UI.hotkeys.on('esc', this.handleDeleteRectangleOnEsc);
|
||||
this.pdf.instance.UI.hotkeys.on('esc', this.handleEscInsideViewer);
|
||||
this._viewerHeaderService.resetLayers();
|
||||
}
|
||||
|
||||
|
||||
@ -12,8 +12,6 @@ import { DossiersCacheService } from './dossiers/dossiers-cache.service';
|
||||
import dayjs from 'dayjs';
|
||||
import { List, mapEach } from '@iqser/common-ui/lib/utils';
|
||||
import { APP_BASE_HREF } from '@angular/common';
|
||||
import { Router } from '@angular/router';
|
||||
import { filterEventsOnPages } from '@utils/operators';
|
||||
|
||||
const INCLUDE_SEEN = false;
|
||||
|
||||
@ -35,7 +33,6 @@ export class NotificationsService extends EntitiesService<INotification, Notific
|
||||
private readonly _translateService: TranslateService,
|
||||
private readonly _userService: UserService,
|
||||
private readonly _dossiersCacheService: DossiersCacheService,
|
||||
private readonly _router: Router,
|
||||
) {
|
||||
super();
|
||||
|
||||
@ -107,16 +104,12 @@ export class NotificationsService extends EntitiesService<INotification, Notific
|
||||
|
||||
#initTimerAndChanges() {
|
||||
const timer$ = timer(0, CHANGED_CHECK_INTERVAL).pipe(
|
||||
filterEventsOnPages(this._router),
|
||||
switchMap(() => (this._dossiersCacheService.empty ? this._dossiersCacheService.load() : of(null))),
|
||||
switchMap(() => this.#loadNotificationsIfChanged()),
|
||||
);
|
||||
|
||||
// Rebuild notifications when cached dossiers are updated
|
||||
const changed$ = this._dossiersCacheService.changed$.pipe(
|
||||
filterEventsOnPages(this._router),
|
||||
tap(() => this.setEntities(this.all.map(e => this._new(e)))),
|
||||
);
|
||||
const changed$ = this._dossiersCacheService.changed$.pipe(tap(() => this.setEntities(this.all.map(e => this._new(e)))));
|
||||
return merge(timer$, changed$);
|
||||
}
|
||||
|
||||
|
||||
@ -1486,7 +1486,10 @@
|
||||
"highlights": {
|
||||
"label": "Earmarks"
|
||||
},
|
||||
"is-excluded": "Schwärzungen für dieses Dokument deaktiviert."
|
||||
"is-excluded": "Schwärzungen für dieses Dokument deaktiviert.",
|
||||
"multi-select": {
|
||||
"close": ""
|
||||
}
|
||||
},
|
||||
"text-highlights": "Earmarks",
|
||||
"text-highlights-tooltip": "Shows all text earmarks and allows removing or importing them as redactions",
|
||||
|
||||
@ -1486,7 +1486,10 @@
|
||||
"highlights": {
|
||||
"label": "Earmarks"
|
||||
},
|
||||
"is-excluded": "Redaction is disabled for this document."
|
||||
"is-excluded": "Redaction is disabled for this document.",
|
||||
"multi-select": {
|
||||
"close": "Deactivate multi select"
|
||||
}
|
||||
},
|
||||
"text-highlights": "Earmarks",
|
||||
"text-highlights-tooltip": "Shows all text earmarks and allows removing or importing them as redactions",
|
||||
|
||||
@ -1486,7 +1486,10 @@
|
||||
"highlights": {
|
||||
"label": "Earmarks"
|
||||
},
|
||||
"is-excluded": "Schwärzungen für dieses Dokument deaktiviert."
|
||||
"is-excluded": "Schwärzungen für dieses Dokument deaktiviert.",
|
||||
"multi-select": {
|
||||
"close": ""
|
||||
}
|
||||
},
|
||||
"text-highlights": "Earmarks",
|
||||
"text-highlights-tooltip": "Shows all text-earmarks and allows removing or importing them as components",
|
||||
|
||||
@ -1486,7 +1486,10 @@
|
||||
"highlights": {
|
||||
"label": "Earmarks"
|
||||
},
|
||||
"is-excluded": "Extraction is disabled for this document."
|
||||
"is-excluded": "Extraction is disabled for this document.",
|
||||
"multi-select": {
|
||||
"close": ""
|
||||
}
|
||||
},
|
||||
"text-highlights": "Earmarks",
|
||||
"text-highlights-tooltip": "Shows all text-earmarks and allows removing or importing them as components",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user