Merge branch 'master' into VM/RED-3797

This commit is contained in:
Valentin Mihai 2022-04-12 18:28:22 +03:00
commit 3d395afcb3
58 changed files with 553 additions and 575 deletions

View File

@ -41,24 +41,24 @@
white-space: normal;
a {
color: variables.$accent;
color: var(--iqser-accent);
font-weight: bold;
}
}
}
.dot {
background-color: variables.$grey-4;
background-color: var(--iqser-grey-4);
top: 8px;
right: 8px;
cursor: pointer;
}
&:hover {
background-color: variables.$grey-6;
background-color: var(--iqser-grey-6);
.dot {
background-color: variables.$grey-5;
background-color: var(--iqser-grey-5);
}
a {
@ -70,7 +70,7 @@
background-color: rgba(variables.$primary, 0.1);
.dot {
background-color: variables.$primary;
background-color: var(--iqser-primary);
}
}
}

View File

@ -1,5 +1,3 @@
@use 'variables';
.spotlight-row {
width: 300px;
display: flex;
@ -9,13 +7,13 @@
font-size: 13px;
border: none;
outline: none;
color: variables.$accent;
background-color: variables.$white;
color: var(--iqser-accent);
background-color: var(--iqser-white);
}
.highlight {
border-radius: 4px;
background-color: variables.$grey-2;
background-color: var(--iqser-grey-2);
}
.wrapper {

View File

@ -1,8 +1,7 @@
@use 'variables';
@use 'common-mixins';
.content-container {
background-color: variables.$grey-2;
background-color: var(--iqser-grey-2);
justify-content: center;
@include common-mixins.scroll-bar;
overflow: auto;

View File

@ -1,4 +1,3 @@
@use 'variables';
@use 'common-mixins';
.dialog-content {
@ -8,8 +7,8 @@
grid-column: span 2;
padding: 10px 10px;
margin-bottom: -1px;
border-top: 1px solid variables.$separator;
border-bottom: 1px solid variables.$separator;
border-top: 1px solid var(--iqser-separator);
border-bottom: 1px solid var(--iqser-separator);
}
.options-content {
@ -17,7 +16,7 @@
.statement {
opacity: 0.7;
color: variables.$grey-1;
color: var(--iqser-grey-1);
font-weight: 500;
padding: 10px 0;
}
@ -25,10 +24,12 @@
.radio-container {
display: flex;
padding: 10px 0 10px;
.radio-button {
display: flex;
align-items: center;
padding-right: 30px;
iqser-round-checkbox {
margin-right: 8px;
}
@ -39,7 +40,7 @@
padding: 10px 0;
.group-title {
color: variables.$grey-1;
color: var(--iqser-grey-1);
font-weight: 600;
}

View File

@ -1,14 +1,12 @@
@use 'variables';
.replacement-suggestion {
font-size: 13px;
line-height: 18px;
color: variables.$grey-1;
color: var(--iqser-grey-1);
margin-bottom: 24px;
}
.dialog-header {
color: variables.$primary;
color: var(--iqser-primary);
}
.heading {

View File

@ -1,5 +1,3 @@
@use 'variables';
:host ::ng-deep iqser-table {
iqser-table-header {
iqser-table-column-name .name {
@ -8,7 +6,7 @@
.header-item {
box-shadow: none;
border-top: 1px solid variables.$separator;
border-top: 1px solid var(--iqser-separator);
.all-caps-label {
margin-right: 10px;
@ -20,7 +18,7 @@
.separator {
margin-left: 14px;
background-color: variables.$separator;
background-color: var(--iqser-separator);
width: 1px;
height: 30px;
margin-right: 16px;

View File

@ -1,5 +1,3 @@
@use 'variables';
.dossier-state-square {
height: 16px;
width: 16px;
@ -11,7 +9,7 @@
font-size: 16px;
font-weight: 600;
line-height: 20px;
color: variables.$grey-1;
color: var(--iqser-grey-1);
}
.right-container {

View File

@ -1,8 +1,7 @@
@use 'variables';
@use 'common-mixins';
.content-container {
background-color: variables.$grey-2;
background-color: var(--iqser-grey-2);
display: flex;
flex-direction: column;
align-items: center;

View File

@ -1,4 +1,3 @@
@use 'variables';
@use 'common-mixins';
:host {

View File

@ -1,5 +1,4 @@
@use 'common-mixins';
@use 'variables';
.content-container {
overflow: auto;
@ -28,7 +27,7 @@
&:hover {
> div {
background-color: variables.$grey-2;
background-color: var(--iqser-grey-2);
}
}
}
@ -37,7 +36,7 @@
grid-column: span 2;
padding: 20px 20px 8px;
margin-bottom: 8px;
border-bottom: 1px solid variables.$separator;
border-bottom: 1px solid var(--iqser-separator);
}
}

View File

@ -1,4 +1,3 @@
@use 'variables';
@use 'common-mixins';
:host {
@ -27,7 +26,7 @@
.template {
padding: 8px 10px;
background-color: variables.$grey-6;
background-color: var(--iqser-grey-6);
border-radius: 4px;
transition: background-color 0.2s;
position: relative;
@ -54,7 +53,7 @@
}
&:hover {
background-color: variables.$grey-4;
background-color: var(--iqser-grey-4);
.actions {
display: flex;
@ -86,8 +85,8 @@
grid-template-columns: 1fr 2fr;
.all-caps-label {
border-top: 1px solid variables.$separator;
border-bottom: 1px solid variables.$separator;
border-top: 1px solid var(--iqser-separator);
border-bottom: 1px solid var(--iqser-separator);
padding: 8px 32px;
&:nth-child(2) {
@ -98,7 +97,7 @@
.placeholder,
.description {
padding: 16px 16px;
border-bottom: 1px solid variables.$separator;
border-bottom: 1px solid var(--iqser-separator);
}
.placeholder {

View File

@ -21,7 +21,7 @@
min-width: 353px;
padding: 24px;
border-left: none;
border-right: 1px solid variables.$separator;
border-right: 1px solid var(--iqser-separator);
&.has-scrollbar:hover {
padding-right: 13px;
@ -38,8 +38,8 @@
width: 60px;
height: 60px;
border-radius: 8px;
background-color: variables.$grey-6;
color: variables.$grey-7;
background-color: var(--iqser-grey-6);
color: var(--iqser-grey-7);
align-items: center;
justify-content: center;
text-align: center;
@ -60,8 +60,8 @@
}
&.active {
background-color: variables.$primary;
color: variables.$white;
background-color: var(--iqser-primary);
color: var(--iqser-white);
}
&.times-new-roman {

View File

@ -1,4 +1,3 @@
@use 'variables';
@use 'common-components';
@use 'common-texts';
@ -22,7 +21,7 @@
transition: background-color 0.2s;
&:hover {
background-color: variables.$grey-6;
background-color: var(--iqser-grey-6);
}
}
}

View File

@ -29,7 +29,7 @@
padding: 3px 8px;
&:hover {
background-color: variables.$grey-6;
background-color: var(--iqser-grey-6);
}
&.active {

View File

@ -1,8 +1,7 @@
@use 'common-mixins';
@use 'variables';
.error {
color: variables.$primary;
color: var(--iqser-primary);
}
.extend-cols {

View File

@ -1,7 +1,5 @@
@use 'variables';
.view-mode-selection {
border-right: 1px solid variables.$separator;
border-right: 1px solid var(--iqser-separator);
padding-right: 16px;
margin-right: 16px !important;
display: flex;

View File

@ -1,5 +1,5 @@
@use 'variables';
@use 'common-mixins';
@use 'variables';
.file-upload-input {
display: none;
@ -9,7 +9,7 @@
&.last-opened {
.selection-column {
padding-left: 6px !important;
border-left: 4px solid variables.$primary;
border-left: 4px solid var(--iqser-primary);
}
.selection-column,

View File

@ -1,5 +1,3 @@
@use 'variables';
:host {
display: flex;
min-height: 100%;
@ -18,7 +16,7 @@
height: 100%;
width: 1px;
padding: 0;
background-color: variables.$separator;
background-color: var(--iqser-separator);
}
.datepicker-wrapper {
@ -60,7 +58,7 @@
height: 50px;
object-fit: cover;
object-position: center;
border: 1px solid variables.$grey-5;
border: 1px solid var(--iqser-grey-5);
margin-right: 15px;
}

View File

@ -1,10 +1,9 @@
@use 'variables';
@use 'common-mixins';
.dialog-content {
padding: 0;
margin-top: 24px;
border-top: 1px solid variables.$separator;
border-top: 1px solid var(--iqser-separator);
overflow: hidden;
flex-direction: row;

View File

@ -1,5 +1,4 @@
@use 'common-mixins';
@use 'variables';
.search-container {
margin-top: 16px;
@ -55,7 +54,7 @@ redaction-team-members {
&.selected,
&:hover {
background-color: variables.$grey-2;
background-color: var(--iqser-grey-2);
.actions {
display: flex;

View File

@ -1,9 +1,8 @@
@use 'common-mixins';
@use 'variables';
.file-actions {
display: flex;
color: variables.$grey-1;
color: var(--iqser-grey-1);
> *:not(:last-child) {
margin-right: 2px;

View File

@ -1,5 +1,3 @@
@use 'variables';
.annotation-actions {
display: none;
@ -8,7 +6,7 @@
}
.confirm.active {
background-color: variables.$grey-2;
background-color: var(--iqser-grey-2);
}
> *:not(:last-child) {

View File

@ -1,5 +1,3 @@
@use 'variables';
.details {
display: flex;
position: relative;
@ -17,5 +15,5 @@ redaction-type-annotation-icon {
}
.pending-analysis {
color: variables.$red-1;
color: var(--iqser-red-1);
}

View File

@ -1,5 +1,3 @@
@use 'variables';
:host {
display: flex;
position: absolute;
@ -11,11 +9,11 @@
width: 260px;
padding: 10px;
border-radius: 3px;
background-color: variables.$grey-1;
color: variables.$white;
background-color: var(--iqser-grey-1);
color: var(--iqser-white);
mat-icon {
color: variables.$white;
color: var(--iqser-white);
flex-shrink: 0;
}
@ -30,7 +28,7 @@
height: 24px;
&:hover {
background-color: variables.$grey-6;
background-color: var(--iqser-grey-6);
border-radius: 12px;
mat-icon {

View File

@ -1,5 +1,3 @@
@use 'variables';
.uppercase {
text-transform: uppercase;
}

View File

@ -1,4 +1,3 @@
@use 'variables';
@use 'common-mixins';
:host {

View File

@ -32,7 +32,6 @@ export class AnnotationsListComponent extends HasScrollbarDirective implements O
@Input() activeViewerPage: number;
@Output() readonly pagesPanelActive = new EventEmitter<boolean>();
@Output() readonly selectAnnotations = new EventEmitter<AnnotationWrapper[]>();
highlightGroups$ = new BehaviorSubject<TextHighlightsGroup[]>([]);
@ -82,7 +81,7 @@ export class AnnotationsListComponent extends HasScrollbarDirective implements O
if (canMultiSelect && ($event?.ctrlKey || $event?.metaKey) && this._listingService.selected.length > 0) {
this._multiSelectService.activate();
}
this.selectAnnotations.emit([annotation]);
this._pdf.selectAnnotations([annotation]);
}
}
@ -99,7 +98,7 @@ export class AnnotationsListComponent extends HasScrollbarDirective implements O
} else if (first.y < second.y) {
return 1;
} else {
return first.x < second.y ? -1 : 1;
return first.x < second.x ? -1 : 1;
}
}

View File

@ -1,4 +1,3 @@
@use 'variables';
@use 'common-mixins';
:host {
@ -42,7 +41,7 @@
}
&:not(:last-child) {
border-bottom: 1px solid variables.$separator;
border-bottom: 1px solid var(--iqser-separator);
}
}

View File

@ -48,7 +48,7 @@
<div *ngIf="multiSelectService.active$ | async" class="multi-select">
<div class="selected-wrapper">
<iqser-round-checkbox
(click)="selectAnnotations.emit()"
(click)="pdf.selectAnnotations()"
[indeterminate]="listingService.areSomeSelected$ | async"
type="with-bg"
></iqser-round-checkbox>
@ -213,7 +213,6 @@
<redaction-annotations-list
(pagesPanelActive)="pagesPanelActive = $event"
(selectAnnotations)="selectAnnotations.emit($event)"
[activeViewerPage]="activeViewerPage"
[annotationActionsTemplate]="annotationActionsTemplate"
[annotations]="(displayedAnnotations$ | async)?.get(activeViewerPage)"

View File

@ -1,4 +1,3 @@
@use 'variables';
@use 'common-mixins';
:host {
@ -7,7 +6,7 @@
.banner {
padding: 13px 16px;
color: variables.$white;
color: var(--iqser-white);
justify-content: space-between;
.read-only-text,
@ -40,11 +39,11 @@
}
.read-only {
background-color: variables.$primary;
background-color: var(--iqser-primary);
}
.disabled-auto-analysis {
background-color: variables.$yellow-2;
background-color: var(--iqser-yellow-2);
}
.right-content {
@ -84,7 +83,7 @@
}
.quick-navigation {
border-right: 1px solid variables.$separator;
border-right: 1px solid var(--iqser-separator);
min-width: 61px;
overflow: hidden;
display: flex;
@ -99,7 +98,7 @@
transition: background-color 0.25s;
&:not(.disabled):hover {
background-color: variables.$grey-6;
background-color: var(--iqser-grey-6);
}
mat-icon {

View File

@ -56,7 +56,6 @@ export class FileWorkloadComponent {
@Input() dialogRef: MatDialogRef<unknown>;
@Input() file!: File;
@Input() annotationActionsTemplate: TemplateRef<unknown>;
@Output() readonly selectAnnotations = new EventEmitter<AnnotationWrapper[]>();
@Output() readonly selectPage = new EventEmitter<number>();
displayedPages: number[] = [];
pagesPanelActive = true;
@ -78,7 +77,7 @@ export class FileWorkloadComponent {
readonly fileDataService: FileDataService,
readonly viewModeService: ViewModeService,
readonly listingService: ListingService<AnnotationWrapper>,
private readonly _pdf: PdfViewer,
readonly pdf: PdfViewer,
private readonly _changeDetectorRef: ChangeDetectorRef,
private readonly _annotationProcessingService: AnnotationProcessingService,
) {
@ -122,7 +121,7 @@ export class FileWorkloadComponent {
return this.multiSelectService.inactive$.pipe(
tap(value => {
if (value) {
this.selectAnnotations.emit();
this.pdf.selectAnnotations();
}
}),
shareDistinctLast(),
@ -167,11 +166,11 @@ export class FileWorkloadComponent {
}
selectAllOnActivePage() {
this.selectAnnotations.emit(this.activeAnnotations);
this.pdf.selectAnnotations(this.activeAnnotations);
}
deselectAllOnActivePage(): void {
this._pdf.deselectAnnotations(this.activeAnnotations);
this.pdf.deselectAnnotations(this.activeAnnotations);
}
@HostListener('window:keyup', ['$event'])
@ -235,7 +234,7 @@ export class FileWorkloadComponent {
return;
}
const elements: HTMLElement[] = this._annotationsElement.nativeElement.querySelectorAll(
`div[annotation-id="${this._firstSelectedAnnotation?.id}"].active`,
`[annotation-id="${this._firstSelectedAnnotation?.id}"]`,
);
FileWorkloadComponent._scrollToFirstElement(elements);
}
@ -279,18 +278,18 @@ export class FileWorkloadComponent {
if (!this._firstSelectedAnnotation || this.activeViewerPage !== this._firstSelectedAnnotation.pageNumber) {
if (this.displayedPages.indexOf(this.activeViewerPage) !== -1) {
// Displayed page has annotations
return this.selectAnnotations.emit(this.activeAnnotations ? [this.activeAnnotations[0]] : null);
return this.pdf.selectAnnotations(this.activeAnnotations ? [this.activeAnnotations[0]] : null);
}
// Displayed page doesn't have annotations
if ($event.key === 'ArrowDown') {
const nextPage = this._nextPageWithAnnotations();
this.selectAnnotations.emit([this.displayedAnnotations.get(nextPage)[0]]);
this.pdf.selectAnnotations([this.displayedAnnotations.get(nextPage)[0]]);
return;
}
const prevPage = this._prevPageWithAnnotations();
const prevPageAnnotations = this.displayedAnnotations.get(prevPage);
this.selectAnnotations.emit([prevPageAnnotations[prevPageAnnotations.length - 1]]);
this.pdf.selectAnnotations([prevPageAnnotations[prevPageAnnotations.length - 1]]);
return;
}
@ -304,13 +303,13 @@ export class FileWorkloadComponent {
if ($event.key === 'ArrowDown') {
if (idx + 1 !== annotationsOnPage.length) {
// If not last item in page
this.selectAnnotations.emit([annotationsOnPage[idx + 1]]);
this.pdf.selectAnnotations([annotationsOnPage[idx + 1]]);
} else if (nextPageIdx < this.displayedPages.length) {
// If not last page
for (let i = nextPageIdx; i < this.displayedPages.length; i++) {
const nextPageAnnotations = this.displayedAnnotations.get(this.displayedPages[i]);
if (nextPageAnnotations) {
this.selectAnnotations.emit([nextPageAnnotations[0]]);
this.pdf.selectAnnotations([nextPageAnnotations[0]]);
break;
}
}
@ -320,7 +319,7 @@ export class FileWorkloadComponent {
if (idx !== 0) {
// If not first item in page
return this.selectAnnotations.emit([annotationsOnPage[idx - 1]]);
return this.pdf.selectAnnotations([annotationsOnPage[idx - 1]]);
}
if (pageIdx) {
@ -328,7 +327,7 @@ export class FileWorkloadComponent {
for (let i = previousPageIdx; i >= 0; i--) {
const prevPageAnnotations = this.displayedAnnotations.get(this.displayedPages[i]);
if (prevPageAnnotations) {
this.selectAnnotations.emit([prevPageAnnotations[prevPageAnnotations.length - 1]]);
this.pdf.selectAnnotations([prevPageAnnotations[prevPageAnnotations.length - 1]]);
break;
}
}
@ -376,7 +375,7 @@ export class FileWorkloadComponent {
this.displayedPages.indexOf(this.activeViewerPage) >= 0 &&
this.activeAnnotations.length > 0
) {
this.selectAnnotations.emit([this.activeAnnotations[0]]);
this.pdf.selectAnnotations([this.activeAnnotations[0]]);
}
}

View File

@ -1,4 +1,3 @@
@use 'variables';
@use 'common-mixins';
:host {
@ -7,13 +6,13 @@
flex-direction: column;
.exclude-pages-input-container {
background-color: variables.$grey-6;
background-color: var(--iqser-grey-6);
padding: 15px 15px 16px 14px;
}
.all-caps-label-container {
padding: 8px 16px;
border-bottom: 1px solid variables.$separator;
border-bottom: 1px solid var(--iqser-separator);
}
.ranges {
@ -22,7 +21,7 @@
.range {
padding-left: 17px;
padding-right: 16px;
border-bottom: 1px solid variables.$separator;
border-bottom: 1px solid var(--iqser-separator);
transition: background-color 0.2s;
display: flex;
align-items: center;
@ -34,7 +33,7 @@
}
&:hover {
background-color: variables.$grey-8;
background-color: var(--iqser-grey-8);
iqser-circle-button {
display: initial;

View File

@ -1,18 +1,16 @@
@use 'variables';
.page-wrapper {
color: variables.$accent;
color: var(--iqser-accent);
position: relative;
padding: 12px 14px 12px 8px;
cursor: pointer;
border-left: 4px solid transparent;
&:hover {
background-color: variables.$grey-2;
background-color: var(--iqser-grey-2);
}
&.active {
border-left: 4px solid variables.$primary;
border-left: 4px solid var(--iqser-primary);
}
mat-icon {
@ -35,10 +33,10 @@
}
&.read {
color: variables.$grey-5;
color: var(--iqser-grey-5);
.text {
color: variables.$accent;
color: var(--iqser-accent);
}
}

View File

@ -1,5 +1,3 @@
@use 'variables';
.page {
display: flex;
flex-direction: column;
@ -28,9 +26,9 @@
bottom: 20px;
left: 50%;
transform: translate(-50%);
background: variables.$white;
color: variables.$grey-7;
border: 1px solid variables.$grey-7;
background: var(--iqser-white);
color: var(--iqser-grey-7);
border: 1px solid var(--iqser-grey-7);
border-radius: 8px;
padding: 6px 2px;
display: flex;
@ -56,7 +54,7 @@
margin: 0;
}
color: variables.$grey-7;
color: var(--iqser-grey-7);
text-decoration: none;
outline: none;
border: none;
@ -67,7 +65,7 @@
&:hover,
&:focus {
font-weight: bold;
border-bottom: 1px solid variables.$grey-7;
border-bottom: 1px solid var(--iqser-grey-7);
}
}
@ -79,7 +77,7 @@
padding-right: 4px;
&:hover {
color: variables.$accent;
color: var(--iqser-accent);
}
}
}

View File

@ -415,13 +415,11 @@ export class PdfViewerComponent extends AutoUnsubscribe implements OnInit, OnCha
const quads = [this._annotationDrawService.annotationToQuads(activeAnnotation)];
const manualRedactionEntry = this._getManualRedaction({ [activePage]: quads });
this._cleanUpSelectionAndButtonState();
this.pdfViewer.deleteAnnotations([activeAnnotation.Id]);
this.manualAnnotationRequested.emit({ manualRedactionEntry, type: 'REDACTION' });
}
private _cleanUpSelectionAndButtonState() {
this.pdfViewer.deselectAllAnnotations();
this._headerConfigService.disable([HeaderElements.SHAPE_TOOL_GROUP_BUTTON]);
this._headerConfigService.enable([HeaderElements.SHAPE_TOOL_GROUP_BUTTON]);
}

View File

@ -1,11 +1,9 @@
@use 'variables';
:host {
display: contents;
}
.disabled {
background-color: variables.$grey-6;
color: variables.$grey-3;
background-color: var(--iqser-grey-6);
color: var(--iqser-grey-3);
cursor: default;
}

View File

@ -88,11 +88,16 @@
</div>
<div *ngIf="isRectangle" class="apply-on-multiple-pages iqser-input-group w-450">
<mat-checkbox #checkbox class="mb-15" color="primary">
<mat-checkbox
(change)="applyOnMultiplePages = !applyOnMultiplePages"
[checked]="applyOnMultiplePages"
class="mb-15"
color="primary"
>
{{ 'manual-annotation.dialog.content.apply-on-multiple-pages' | translate }}
</mat-checkbox>
<div *ngIf="checkbox.checked">
<div *ngIf="applyOnMultiplePages">
<input
[placeholder]="'manual-annotation.dialog.content.apply-on-multiple-pages-placeholder' | translate"
class="full-width"

View File

@ -3,7 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { ManualRedactionEntryWrapper } from '@models/file/manual-redaction-entry.wrapper';
import { JustificationsService } from '@services/entity-services/justifications.service';
import { Dictionary, Dossier, IAddRedactionRequest } from '@red/domain';
import { Dictionary, Dossier, File, IAddRedactionRequest } from '@red/domain';
import { ActiveDossiersService } from '@services/dossiers/active-dossiers.service';
import { DictionaryService } from '@services/entity-services/dictionary.service';
import { BaseDialogComponent, CircleButtonTypes, Toaster } from '@iqser/common-ui';
@ -26,6 +26,7 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme
isDictionaryRequest: boolean;
isFalsePositiveRequest: boolean;
isEditingSelectedText = false;
applyOnMultiplePages = false;
possibleDictionaries: Dictionary[] = [];
legalOptions: LegalBasisOption[] = [];
@ -41,7 +42,7 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme
protected readonly _injector: Injector,
protected readonly _toaster: Toaster,
protected readonly _dialogRef: MatDialogRef<ManualAnnotationDialogComponent>,
@Inject(MAT_DIALOG_DATA) readonly data: { manualRedactionEntryWrapper: ManualRedactionEntryWrapper; dossierId: string },
@Inject(MAT_DIALOG_DATA) readonly data: { manualRedactionEntryWrapper: ManualRedactionEntryWrapper; dossierId: string; file: File },
) {
super(_injector, _dialogRef);
this._dossier = this._activeDossiersService.find(this.data.dossierId);
@ -70,7 +71,7 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme
}
get disabled() {
return this.form.invalid;
return this.form.invalid || (this.applyOnMultiplePages && !this.form.get('multiplePages')?.value);
}
async ngOnInit() {
@ -116,11 +117,14 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme
const splitted = range.split('-');
const startPage = parseInt(splitted[0], 10);
const endPage = splitted.length > 1 ? parseInt(splitted[1], 10) : startPage;
if (!startPage || !endPage) {
if (!startPage || !endPage || startPage > this.data.file.numberOfPages || endPage > this.data.file.numberOfPages) {
throw new Error();
}
for (let page = startPage; page <= endPage; page++) {
if (page === wrapper.manualRedactionEntry.positions[0].page) {
continue;
}
const manualRedactionEntry = { ...entry, positions: [{ ...quads, page }] };
wrappers.push({ ...wrapper, manualRedactionEntry });
}

View File

@ -1,5 +1,3 @@
@use 'variables';
.content-wrapper {
padding-top: 20px;
padding-bottom: 8px;
@ -18,6 +16,6 @@ ul {
td {
padding: 8px;
text-align: left;
border: 1px solid variables.$separator;
border: 1px solid var(--iqser-separator);
}
}

View File

@ -87,7 +87,6 @@
<redaction-file-workload
#fileWorkloadComponent
(selectAnnotations)="selectAnnotations($event)"
(selectPage)="selectPage($event)"
*ngIf="!file.excluded"
[activeViewerPage]="pdf.currentPage"

View File

@ -1,9 +1,7 @@
@use 'variables';
.vertical-line {
width: 1px;
height: 30px;
background-color: variables.$grey-4;
background-color: var(--iqser-grey-4);
margin: 0 16px;
}
@ -29,7 +27,7 @@
::ng-deep .right-title {
min-height: 70px;
display: flex;
border-bottom: 1px solid variables.$separator;
border-bottom: 1px solid var(--iqser-separator);
align-items: center;
justify-content: space-between;
padding: 0 24px;

View File

@ -243,16 +243,6 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
this._changeDetectorRef.markForCheck();
}
@Debounce(10)
selectAnnotations(annotations: AnnotationWrapper[]) {
if (annotations) {
const annotationsToSelect = this.multiSelectService.isActive ? [...this.listingService.selected, ...annotations] : annotations;
this.pdf.selectAnnotations(annotationsToSelect, this.multiSelectService.isActive);
} else {
this.pdf.deselectAllAnnotations();
}
}
selectPage(pageNumber: number) {
this.pdf.navigateToPage(pageNumber);
this._workloadComponent?.scrollAnnotationsToPage(pageNumber, 'always');
@ -260,13 +250,18 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
}
openManualAnnotationDialog(manualRedactionEntryWrapper: ManualRedactionEntryWrapper) {
this._ngZone.run(() => {
return this._ngZone.run(async () => {
const file = await this.state.file;
this.dialogRef = this._dialogService.openDialog(
'manualAnnotation',
null,
{ manualRedactionEntryWrapper, dossierId: this.dossierId },
async (wrappers: ManualRedactionEntryWrapper[]) => {
const file = await this.state.file;
{ manualRedactionEntryWrapper, dossierId: this.dossierId, file },
(wrappers: ManualRedactionEntryWrapper[]) => {
const selectedAnnotations = this.pdf.annotationManager.getSelectedAnnotations();
if (selectedAnnotations.length > 0) {
this.pdf.deleteAnnotations([selectedAnnotations[0].Id]);
}
const add$ = this._manualRedactionService.addAnnotation(
wrappers.map(w => w.manualRedactionEntry).filter(e => e.positions[0].page <= file.numberOfPages),
this.dossierId,

View File

@ -10,7 +10,8 @@ import { DISABLED_HOTKEYS } from '../shared/constants';
import { Observable, Subject } from 'rxjs';
import { NGXLogger } from 'ngx-logger';
import { tap } from 'rxjs/operators';
import { shareLast } from '@iqser/common-ui';
import { ListingService, shareLast } from '@iqser/common-ui';
import { MultiSelectService } from './multi-select.service';
import Annotation = Core.Annotations.Annotation;
@Injectable()
@ -23,6 +24,8 @@ export class PdfViewer {
constructor(
@Inject(BASE_HREF) private readonly _baseHref: string,
private readonly _viewModeService: ViewModeService,
private readonly _multiSelectService: MultiSelectService,
private readonly _listingService: ListingService<AnnotationWrapper>,
private readonly _logger: NGXLogger,
) {
this.documentLoaded$ = this.#documentLoaded$.asObservable().pipe(
@ -178,25 +181,15 @@ export class PdfViewer {
this.annotationManager?.deselectAllAnnotations();
}
selectAnnotations(annotations: AnnotationWrapper[], multiSelectActive: boolean = false) {
if (!annotations) {
return;
}
const filteredAnnotations = annotations.filter(a => !!a);
if (!filteredAnnotations.length) {
return;
}
if (!multiSelectActive) {
selectAnnotations(annotations?: AnnotationWrapper[]) {
if (annotations) {
const annotationsToSelect = this._multiSelectService.isActive
? [...this._listingService.selected, ...annotations]
: annotations;
this.#selectAnnotations(annotationsToSelect);
} else {
this.deselectAllAnnotations();
}
const annotationsFromViewer = this.getAnnotationsById(filteredAnnotations.map(a => a.id));
this.annotationManager.jumpToAnnotation(annotationsFromViewer[0]);
this.annotationManager.selectAnnotations(annotationsFromViewer);
}
deleteAnnotations(annotationsIds?: readonly string[]) {
@ -221,6 +214,27 @@ export class PdfViewer {
this.annotationManager.deselectAnnotations(ann);
}
#selectAnnotations(annotations?: AnnotationWrapper[]) {
if (!annotations) {
return;
}
const filteredAnnotations = annotations.filter(a => !!a);
if (!filteredAnnotations.length) {
return;
}
if (!this._multiSelectService.isActive) {
this.deselectAllAnnotations();
}
const annotationsFromViewer = this.getAnnotationsById(filteredAnnotations.map(a => a.id));
this.annotationManager.jumpToAnnotation(annotationsFromViewer[0]);
this.annotationManager.selectAnnotations(annotationsFromViewer);
}
private _navigateToPage(pageNumber: number) {
if (this._currentInternalPage !== pageNumber) {
this.documentViewer.displayPageLocation(pageNumber, 0, 0);

View File

@ -1,5 +1,3 @@
@use 'variables';
.icon {
height: 16px;
width: 16px;
@ -11,7 +9,7 @@
align-items: center;
text-align: center;
text-transform: uppercase;
color: variables.$white;
color: var(--iqser-white);
position: relative;
background-color: var(--color);
}
@ -60,9 +58,9 @@
}
.skipped {
background-color: variables.$grey-5;
background-color: var(--iqser-grey-5);
}
.none {
color: variables.$accent;
color: var(--iqser-accent);
}

View File

@ -1,5 +1,5 @@
@use 'variables';
@use 'common-buttons';
@use 'variables';
:host {
@extend .user-button;

View File

@ -1,5 +1,3 @@
@use 'variables';
:host {
width: 100%;
height: 100%;
@ -68,7 +66,7 @@ form {
position: absolute;
right: 12px;
top: 8px;
color: variables.$accent;
color: var(--iqser-accent);
.with-input {
display: flex;
@ -96,7 +94,7 @@ form {
padding: 0 100px;
box-sizing: border-box;
text-align: center;
border: 1px solid variables.$grey-5;
border: 1px solid var(--iqser-grey-5);
> mat-icon {
height: 60px;
@ -106,6 +104,6 @@ form {
}
.heading-l {
color: variables.$grey-7;
color: var(--iqser-grey-7);
}
}

View File

@ -1,5 +1,3 @@
@use 'variables';
.dossier-state-container {
justify-content: flex-end;
width: 100%;
@ -12,5 +10,5 @@ redaction-small-chip {
.dossier-state-text {
font-size: 13px;
line-height: 16px;
color: variables.$grey-1;
color: var(--iqser-grey-1);
}

View File

@ -1,5 +1,3 @@
@use 'variables';
.wrapper {
display: flex;
align-items: center;
@ -15,5 +13,5 @@
}
.border {
border: 1px solid variables.$grey-7;
border: 1px solid var(--iqser-grey-7);
}

View File

@ -1,5 +1,3 @@
@use 'variables';
:host {
display: flex;
@ -22,7 +20,7 @@
}
&.active {
color: variables.$primary;
color: var(--iqser-primary);
font-weight: bold;
}
}

View File

@ -1,9 +1,9 @@
@use 'variables';
@use 'common-mixins';
@use 'variables';
:host {
border-radius: 8px;
border: 1px solid variables.$grey-5;
border: 1px solid var(--iqser-grey-5);
min-height: 100%;
display: block;
@ -65,23 +65,23 @@ mat-chip {
}
.mat-chip.mat-standard-chip.mat-chip-selected.mat-primary {
background-color: variables.$grey-6;
color: variables.$accent;
background-color: var(--iqser-grey-6);
color: var(--iqser-accent);
}
.mat-chip.mat-standard-chip {
background-color: variables.$white;
color: variables.$accent;
background-color: var(--iqser-white);
color: var(--iqser-accent);
margin: 0 0 2px 0;
transition: background-color 0.2s;
&:hover {
background-color: variables.$grey-8;
background-color: var(--iqser-grey-8);
}
}
.mat-chip.mat-standard-chip::after {
background: variables.$grey-8;
background: var(--iqser-grey-8);
}
.mat-standard-chip:focus::after {
@ -90,5 +90,5 @@ mat-chip {
.disabled {
pointer-events: none;
color: variables.$grey-5;
color: var(--iqser-grey-5);
}

View File

@ -57,7 +57,7 @@
}
&:hover:not(.active):not(.filter-disabled) {
background-color: variables.$grey-6;
background-color: var(--iqser-grey-6);
}
&.active {

View File

@ -1,5 +1,3 @@
@use 'variables';
.container {
flex-wrap: wrap;
margin-top: 4px;
@ -27,8 +25,8 @@
width: 16px;
height: 16px;
border-radius: 50%;
background-color: variables.$accent;
color: variables.$white;
background-color: var(--iqser-accent);
color: var(--iqser-white);
position: absolute;
right: -8px;
bottom: -2px;
@ -48,6 +46,6 @@
.see-less {
opacity: 1;
color: variables.$primary;
color: var(--iqser-primary);
margin-top: 16px;
}

View File

@ -1,8 +1,8 @@
@use 'variables';
@use 'common-mixins';
@use 'variables';
.red-upload-download-overlay {
background: variables.$white;
background: var(--iqser-white);
position: fixed;
bottom: 20px;
right: 20px;
@ -19,14 +19,14 @@
padding: 16px 14px 16px 16px;
cursor: pointer;
color: variables.$accent;
color: var(--iqser-accent);
font-size: 13px;
font-weight: 600;
line-height: 16px;
mat-icon {
height: 13px;
color: variables.$accent;
color: var(--iqser-accent);
&.collapse-icon {
height: 15px;
@ -34,7 +34,7 @@
}
&.expanded {
border-bottom: 1px solid variables.$separator;
border-bottom: 1px solid var(--iqser-separator);
}
}
@ -45,14 +45,14 @@
> div:not(:first-child) {
.dossier-name-wrapper {
border-top: 1px solid variables.$separator;
border-top: 1px solid var(--iqser-separator);
}
}
.dossier-name-wrapper {
display: flex;
padding: 4px 16px;
background-color: variables.$grey-2;
background-color: var(--iqser-grey-2);
> span {
@include common-mixins.line-clamp(1);
@ -63,7 +63,7 @@
padding: 10px 16px 12px 16px;
font-size: 11px;
line-height: 14px;
border-top: 1px solid variables.$separator;
border-top: 1px solid var(--iqser-separator);
position: relative;
.upload-download-line {
@ -95,7 +95,7 @@
.error-message {
margin-top: 2px;
color: variables.$primary;
color: var(--iqser-primary);
}
}
@ -119,7 +119,7 @@
}
&:not(.error):hover {
background-color: variables.$grey-2;
background-color: var(--iqser-grey-2);
.actions {
display: flex;

View File

@ -1,5 +1,5 @@
@use 'variables';
@use 'common-mixins';
@use 'variables';
.NEW {
stroke: var(--iqser-grey-5);
@ -13,45 +13,45 @@
.UNDER_REVIEW,
.REGULAR {
stroke: variables.$yellow-1;
background-color: variables.$yellow-1;
stroke: var(--iqser-yellow-1);
background-color: var(--iqser-yellow-1);
}
.UNDER_APPROVAL {
stroke: variables.$blue-4;
background-color: variables.$blue-4;
stroke: var(--iqser-blue-4);
background-color: var(--iqser-blue-4);
}
.APPROVED,
.ADMIN {
stroke: variables.$blue-3;
background-color: variables.$blue-3;
stroke: var(--iqser-blue-3);
background-color: var(--iqser-blue-3);
}
.PROCESSING {
stroke: variables.$accent;
background-color: variables.$accent;
stroke: var(--iqser-accent);
background-color: var(--iqser-accent);
}
.OCR_PROCESSING,
.USER_ADMIN {
stroke: variables.$green-2;
background-color: variables.$green-2;
stroke: var(--iqser-green-2);
background-color: var(--iqser-green-2);
}
.REPROCESS {
stroke: variables.$accent;
background-color: variables.$accent;
stroke: var(--iqser-accent);
background-color: var(--iqser-accent);
}
.FULLREPROCESS {
stroke: variables.$accent;
background-color: variables.$accent;
stroke: var(--iqser-accent);
background-color: var(--iqser-accent);
}
.EXCLUDED {
stroke: variables.$pink-1;
background-color: variables.$pink-1;
stroke: var(--iqser-pink-1);
background-color: var(--iqser-pink-1);
}
.ERROR {
@ -76,8 +76,8 @@
.MANAGER,
.MANAGER_ADMIN {
stroke: variables.$primary;
background-color: variables.$primary;
stroke: var(--iqser-primary);
background-color: var(--iqser-primary);
}
.workload-separator {

View File

@ -60,7 +60,7 @@
right: 40px;
border-radius: 8px;
padding: 16px 32px 16px 16px;
background-color: variables.$white;
background-color: var(--iqser-white);
box-shadow: 0 2px 6px 0 rgba(40, 50, 65, 0.3);
z-index: 5000;

View File

@ -1,6 +1,6 @@
{
"name": "redaction",
"version": "3.419.0",
"version": "3.424.0",
"private": true,
"license": "MIT",
"scripts": {

Binary file not shown.

File diff suppressed because it is too large Load Diff