RED-9788 - wip on refactoring workload component
This commit is contained in:
parent
9535f6f06a
commit
e560fb593b
@ -0,0 +1,6 @@
|
||||
import { Directive } from '@angular/core';
|
||||
|
||||
@Directive()
|
||||
export class BaseWorkloadComponent {
|
||||
constructor() {}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
<div class="workload-container">
|
||||
<div class="workload">
|
||||
<div class="workload-header flex-align-items-center workload-separator">
|
||||
<span [innerHTML]="'documine-workload.header-label' | translate"></span>
|
||||
<!-- <iqser-popup-filter-->
|
||||
<!-- [actionsTemplate]="annotationFilterActionTemplate"-->
|
||||
<!-- [attr.help-mode-key]="'workload_filter'"-->
|
||||
<!-- [fileId]="state.file()?.id"-->
|
||||
<!-- [primaryFiltersSlug]="'primaryFilters'"-->
|
||||
<!-- [secondaryFiltersSlug]="'secondaryFilters'"-->
|
||||
<!-- ></iqser-popup-filter>-->
|
||||
<iqser-popup-filter
|
||||
[attr.help-mode-key]="'workload_filter'"
|
||||
[primaryFiltersSlug]="'primaryFilters'"
|
||||
[secondaryFiltersSlug]="'secondaryFilters'"
|
||||
></iqser-popup-filter>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (documentInfoService.shown()) {
|
||||
<redaction-document-info id="document-info"></redaction-document-info>
|
||||
} @else {
|
||||
<redaction-pages [pages]="pages"></redaction-pages>
|
||||
}
|
||||
</div>
|
||||
@ -0,0 +1,29 @@
|
||||
:host {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.workload-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 100%;
|
||||
|
||||
.workload {
|
||||
width: var(--documine-workload-content-width);
|
||||
border-right: 1px solid var(--iqser-separator);
|
||||
height: 100%;
|
||||
|
||||
.workload-header {
|
||||
min-height: 37px;
|
||||
background: var(--iqser-grey-8);
|
||||
justify-content: space-between;
|
||||
padding: 0 10px;
|
||||
|
||||
::ng-deep span {
|
||||
color: var(--iqser-text);
|
||||
font-size: var(--iqser-font-size);
|
||||
line-height: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NgIf } from '@angular/common';
|
||||
import { PopupFilterComponent } from '@common-ui/filtering';
|
||||
import { PagesComponent } from '../../pages/pages.component';
|
||||
import { DocumentInfoService } from '../../../services/document-info.service';
|
||||
import { DocumentInfoComponent } from '../../document-info/document-info.component';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-documine-file-workload',
|
||||
templateUrl: './documine-file-workload.component.html',
|
||||
styleUrls: ['./documine-file-workload.component.scss'],
|
||||
standalone: true,
|
||||
imports: [TranslateModule, NgIf, PopupFilterComponent, PagesComponent, DocumentInfoComponent],
|
||||
})
|
||||
export class DocumineFileWorkloadComponent {
|
||||
pages = [1, 2, 3, 4, 5];
|
||||
|
||||
constructor(readonly documentInfoService: DocumentInfoService) {}
|
||||
}
|
||||
@ -1,94 +0,0 @@
|
||||
@use 'common-mixins';
|
||||
|
||||
:host {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.disabled-auto-analysis {
|
||||
background-color: var(--iqser-yellow-2);
|
||||
}
|
||||
|
||||
.right-content {
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
|
||||
.no-annotations-buttons-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
iqser-icon-button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.annotations-wrapper {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
.content {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.quick-navigation,
|
||||
.annotations {
|
||||
outline: none;
|
||||
|
||||
&.active-panel {
|
||||
background-color: var(--iqser-workload-pages-bg);
|
||||
}
|
||||
}
|
||||
|
||||
.quick-navigation {
|
||||
border-right: 1px solid var(--iqser-separator);
|
||||
min-width: 61px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.jump {
|
||||
min-height: 32px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.25s;
|
||||
|
||||
&:not(.disabled):hover {
|
||||
background-color: var(--iqser-tab-hover);
|
||||
}
|
||||
|
||||
mat-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
|
||||
mat-icon {
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.annotations {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
@ -76,36 +76,12 @@
|
||||
</div>
|
||||
|
||||
<div class="annotations-wrapper">
|
||||
<div
|
||||
#quickNavigation
|
||||
(keydown)="preventKeyDefault($event)"
|
||||
(keyup)="preventKeyDefault($event)"
|
||||
[class.active-panel]="pagesPanelActive"
|
||||
class="quick-navigation"
|
||||
tabindex="0"
|
||||
>
|
||||
<div
|
||||
(click)="scrollQuickNavFirst()"
|
||||
[class.disabled]="pdf.currentPage() === 1"
|
||||
[matTooltip]="'file-preview.quick-nav.jump-first' | translate"
|
||||
class="jump"
|
||||
matTooltipPosition="above"
|
||||
>
|
||||
<mat-icon svgIcon="iqser:nav-first"></mat-icon>
|
||||
</div>
|
||||
|
||||
<redaction-pages (click)="pagesPanelActive = true" [pages]="displayedPages"></redaction-pages>
|
||||
|
||||
<div
|
||||
(click)="scrollQuickNavLast()"
|
||||
[class.disabled]="pdf.currentPage() === state.file()?.numberOfPages"
|
||||
[matTooltip]="'file-preview.quick-nav.jump-last' | translate"
|
||||
class="jump"
|
||||
matTooltipPosition="above"
|
||||
>
|
||||
<mat-icon svgIcon="iqser:nav-last"></mat-icon>
|
||||
</div>
|
||||
</div>
|
||||
<redaction-quick-navigation
|
||||
[pagesPanelActive]="pagesPanelActive"
|
||||
[displayedPages]="displayedPages"
|
||||
(pagesPanelActiveChange)="pagesPanelActive = $event"
|
||||
(preventKeyDefault)="preventKeyDefault($event)"
|
||||
></redaction-quick-navigation>
|
||||
|
||||
<div class="content">
|
||||
<div
|
||||
@ -0,0 +1,54 @@
|
||||
@use '../../../../../../../../../libs/common-ui/src/assets/styles/common-mixins';
|
||||
|
||||
:host {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.disabled-auto-analysis {
|
||||
background-color: var(--iqser-yellow-2);
|
||||
}
|
||||
|
||||
.right-content {
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
|
||||
.no-annotations-buttons-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
iqser-icon-button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.annotations-wrapper {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
.content {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.annotations {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.annotations {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
import { AsyncPipe, NgIf, NgTemplateOutlet } from '@angular/common';
|
||||
import { ChangeDetectorRef, Component, computed, effect, ElementRef, HostListener, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import { ChangeDetectorRef, Component, computed, effect, ElementRef, HostListener, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatIcon } from '@angular/material/icon';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
@ -15,8 +15,8 @@ import {
|
||||
IconButtonTypes,
|
||||
PreventDefaultDirective,
|
||||
} from '@iqser/common-ui';
|
||||
import { FilterService, INestedFilter, PopupFilterComponent } from '@iqser/common-ui/lib/filtering';
|
||||
import { AutoUnsubscribe, Debounce, IqserEventTarget } from '@iqser/common-ui/lib/utils';
|
||||
import { FilterService, INestedFilter, PopupFilterComponent } from '@common-ui/filtering';
|
||||
import { Debounce, IqserEventTarget } from '@common-ui/utils';
|
||||
import { AnnotationWrapper } from '@models/file/annotation.wrapper';
|
||||
import { ListItem } from '@models/file/list-item';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@ -26,34 +26,37 @@ import { UserPreferenceService } from '@users/user-preference.service';
|
||||
import { getLocalStorageDataByFileId } from '@utils/local-storage';
|
||||
import { combineLatest, delay, Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { REDAnnotationManager } from '../../../../pdf-viewer/services/annotation-manager.service';
|
||||
import { REDDocumentViewer } from '../../../../pdf-viewer/services/document-viewer.service';
|
||||
import { PageRotationService } from '../../../../pdf-viewer/services/page-rotation.service';
|
||||
import { PdfViewer } from '../../../../pdf-viewer/services/pdf-viewer.service';
|
||||
import { AnnotationProcessingService } from '../../../services/annotation-processing.service';
|
||||
import { AnnotationsListingService } from '../../../services/annotations-listing.service';
|
||||
import { DocumentInfoService } from '../../../services/document-info.service';
|
||||
import { ExcludedPagesService } from '../../../services/excluded-pages.service';
|
||||
import { FileDataService } from '../../../services/file-data.service';
|
||||
import { FilePreviewStateService } from '../../../services/file-preview-state.service';
|
||||
import { MultiSelectService } from '../../../services/multi-select.service';
|
||||
import { SkippedService } from '../../../services/skipped.service';
|
||||
import { ViewModeService } from '../../../services/view-mode.service';
|
||||
import { AnnotationActionsComponent } from '../../annotation-actions/annotation-actions.component';
|
||||
import { AnnotationsListComponent } from '../../annotations-list/annotations-list.component';
|
||||
import { PageExclusionComponent } from '../../page-exclusion/page-exclusion.component';
|
||||
import { PagesComponent } from '../../pages/pages.component';
|
||||
import { ReadonlyBannerComponent } from '../../readonly-banner/readonly-banner.component';
|
||||
import { DocumentInfoComponent } from '../../document-info/document-info.component';
|
||||
import { QuickNavigationComponent } from '../../quick-navigation/quick-navigation.component';
|
||||
import scrollIntoView from 'scroll-into-view-if-needed';
|
||||
import { REDAnnotationManager } from '../../../pdf-viewer/services/annotation-manager.service';
|
||||
import { REDDocumentViewer } from '../../../pdf-viewer/services/document-viewer.service';
|
||||
import { PageRotationService } from '../../../pdf-viewer/services/page-rotation.service';
|
||||
import { PdfViewer } from '../../../pdf-viewer/services/pdf-viewer.service';
|
||||
import { AnnotationProcessingService } from '../../services/annotation-processing.service';
|
||||
import { AnnotationsListingService } from '../../services/annotations-listing.service';
|
||||
import { DocumentInfoService } from '../../services/document-info.service';
|
||||
import { ExcludedPagesService } from '../../services/excluded-pages.service';
|
||||
import { FileDataService } from '../../services/file-data.service';
|
||||
import { FilePreviewStateService } from '../../services/file-preview-state.service';
|
||||
import { MultiSelectService } from '../../services/multi-select.service';
|
||||
import { SkippedService } from '../../services/skipped.service';
|
||||
import { ViewModeService } from '../../services/view-mode.service';
|
||||
import { AnnotationActionsComponent } from '../annotation-actions/annotation-actions.component';
|
||||
import { AnnotationsListComponent } from '../annotations-list/annotations-list.component';
|
||||
import { PageExclusionComponent } from '../page-exclusion/page-exclusion.component';
|
||||
import { PagesComponent } from '../pages/pages.component';
|
||||
import { ReadonlyBannerComponent } from '../readonly-banner/readonly-banner.component';
|
||||
import { DocumentInfoComponent } from '../document-info/document-info.component';
|
||||
import { BaseWorkloadComponent } from '../base-workload.component';
|
||||
import { toSignal } from '@angular/core/rxjs-interop';
|
||||
|
||||
const COMMAND_KEY_ARRAY = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Escape'];
|
||||
const ALL_HOTKEY_ARRAY = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'];
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-file-workload',
|
||||
templateUrl: './file-workload.component.html',
|
||||
styleUrls: ['./file-workload.component.scss'],
|
||||
selector: 'redaction-redact-file-workload',
|
||||
templateUrl: './redact-file-workload.component.html',
|
||||
styleUrls: ['./redact-file-workload.component.scss'],
|
||||
standalone: true,
|
||||
imports: [
|
||||
IconButtonComponent,
|
||||
@ -75,9 +78,10 @@ const ALL_HOTKEY_ARRAY = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'];
|
||||
CapitalizePipe,
|
||||
NgTemplateOutlet,
|
||||
DocumentInfoComponent,
|
||||
QuickNavigationComponent,
|
||||
],
|
||||
})
|
||||
export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, OnDestroy {
|
||||
export class RedactFileWorkloadComponent extends BaseWorkloadComponent implements OnInit {
|
||||
@ViewChild('annotationsElement') private readonly _annotationsElement: ElementRef;
|
||||
@ViewChild('quickNavigation') private readonly _quickNavigationElement: ElementRef;
|
||||
readonly #isIqserDevMode = this._userPreferenceService.isIqserDevMode;
|
||||
@ -94,6 +98,10 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
displayedPages: number[] = [];
|
||||
pagesPanelActive = true;
|
||||
|
||||
protected readonly currentPage = toSignal(this.pdf.currentPage$);
|
||||
protected readonly selectedAnnotationIds = toSignal(this.listingService.selected$);
|
||||
protected readonly keyUp = toSignal(this._documentViewer.keyUp$);
|
||||
|
||||
constructor(
|
||||
readonly filterService: FilterService,
|
||||
readonly skippedService: SkippedService,
|
||||
@ -115,24 +123,23 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
) {
|
||||
super();
|
||||
|
||||
// TODO: ngOnDetach is not called here, so we need to unsubscribe manually
|
||||
this.addActiveScreenSubscription = this.pdf.currentPage$.subscribe(pageNumber => {
|
||||
this._scrollViews();
|
||||
this.scrollAnnotationsToPage(pageNumber, 'always');
|
||||
effect(() => {
|
||||
this.#scrollViews();
|
||||
this.scrollAnnotationsToPage(this.currentPage(), 'always');
|
||||
});
|
||||
|
||||
this.addActiveScreenSubscription = this.listingService.selected$.subscribe(annotationIds => {
|
||||
if (annotationIds.length > 0) {
|
||||
effect(() => {
|
||||
if (this.selectedAnnotationIds().length > 0) {
|
||||
this.pagesPanelActive = false;
|
||||
}
|
||||
this.scrollToSelectedAnnotation();
|
||||
});
|
||||
|
||||
this.addActiveScreenSubscription = this._documentViewer.keyUp$.subscribe($event => {
|
||||
this.handleKeyEvent($event);
|
||||
effect(() => {
|
||||
this.handleKeyEvent(this.keyUp());
|
||||
});
|
||||
|
||||
this.displayedAnnotations$ = this._displayedAnnotations$;
|
||||
this.displayedAnnotations$ = this.#displayedAnnotations$;
|
||||
|
||||
effect(() => {
|
||||
if (this.multiSelectService.inactive()) {
|
||||
@ -142,7 +149,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
|
||||
effect(() => {
|
||||
this.viewModeService.viewMode();
|
||||
this._scrollViews();
|
||||
this.#scrollViews();
|
||||
});
|
||||
|
||||
effect(
|
||||
@ -168,7 +175,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
return this.listingService.selected.length ? this.listingService.selected[0] : null;
|
||||
}
|
||||
|
||||
private get _displayedAnnotations$(): Observable<Map<number, ListItem<AnnotationWrapper>[]>> {
|
||||
get #displayedAnnotations$(): Observable<Map<number, ListItem<AnnotationWrapper>[]>> {
|
||||
const primary$ = this.filterService.getFilterModels$('primaryFilters');
|
||||
const secondary$ = this.filterService.getFilterModels$('secondaryFilters');
|
||||
|
||||
@ -226,7 +233,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
@HostListener('window:keyup', ['$event'])
|
||||
handleKeyEvent($event: KeyboardEvent): void {
|
||||
if (
|
||||
!ALL_HOTKEY_ARRAY.includes($event.key) ||
|
||||
!ALL_HOTKEY_ARRAY.includes($event?.key) ||
|
||||
this._dialog.openDialogs.length ||
|
||||
($event.target as IqserEventTarget).localName === 'input'
|
||||
) {
|
||||
@ -276,7 +283,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
scrollAnnotationsToPage(page: number, mode: 'always' | 'if-needed' = 'if-needed'): void {
|
||||
if (this._annotationsElement) {
|
||||
const elements: HTMLElement[] = this._annotationsElement.nativeElement.querySelectorAll(`div[anotation-page-header="${page}"]`);
|
||||
FileWorkloadComponent._scrollToFirstElement(elements, mode);
|
||||
RedactFileWorkloadComponent._scrollToFirstElement(elements, mode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -288,7 +295,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
const elements: HTMLElement[] = this._annotationsElement.nativeElement.querySelectorAll(
|
||||
`[annotation-id="${this._firstSelectedAnnotation?.id}"]`,
|
||||
);
|
||||
FileWorkloadComponent._scrollToFirstElement(elements);
|
||||
RedactFileWorkloadComponent._scrollToFirstElement(elements);
|
||||
}
|
||||
|
||||
scrollQuickNavigation(): void {
|
||||
@ -300,14 +307,6 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
this.#scrollQuickNavigationToPage(this.displayedPages[quickNavPageIndex]);
|
||||
}
|
||||
|
||||
scrollQuickNavFirst(): void {
|
||||
this.pdf.navigateTo(1);
|
||||
}
|
||||
|
||||
scrollQuickNavLast() {
|
||||
this.pdf.navigateTo(this.state.file().numberOfPages);
|
||||
}
|
||||
|
||||
preventKeyDefault($event: KeyboardEvent): void {
|
||||
if (COMMAND_KEY_ARRAY.includes($event.key) && !(($event.target as any).localName === 'input')) {
|
||||
$event.preventDefault();
|
||||
@ -383,8 +382,9 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
@Debounce(0)
|
||||
private _scrollViews() {
|
||||
#scrollViews() {
|
||||
this.scrollQuickNavigation();
|
||||
this.scrollAnnotations();
|
||||
}
|
||||
@ -500,9 +500,10 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnInit, On
|
||||
}
|
||||
|
||||
#scrollQuickNavigationToPage(page: number) {
|
||||
console.log('scrollQuickNavigationToPage');
|
||||
if (this._quickNavigationElement) {
|
||||
const elements: HTMLElement[] = this._quickNavigationElement.nativeElement.querySelectorAll(`#quick-nav-page-${page}`);
|
||||
FileWorkloadComponent._scrollToFirstElement(elements);
|
||||
RedactFileWorkloadComponent._scrollToFirstElement(elements);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
<div
|
||||
#quickNavigation
|
||||
(keydown)="preventKeyDefault.emit($event)"
|
||||
(keyup)="preventKeyDefault.emit($event)"
|
||||
[class.active-panel]="pagesPanelActive()"
|
||||
class="quick-navigation"
|
||||
tabindex="0"
|
||||
>
|
||||
<div
|
||||
(click)="scrollQuickNavFirst()"
|
||||
[class.disabled]="pdf.currentPage() === 1"
|
||||
[matTooltip]="'file-preview.quick-nav.jump-first' | translate"
|
||||
class="jump"
|
||||
matTooltipPosition="above"
|
||||
>
|
||||
<mat-icon svgIcon="iqser:nav-first"></mat-icon>
|
||||
</div>
|
||||
|
||||
<redaction-pages (click)="pagesPanelActiveChange.emit(true)" [pages]="displayedPages()"></redaction-pages>
|
||||
|
||||
<div
|
||||
(click)="scrollQuickNavLast()"
|
||||
[class.disabled]="pdf.currentPage() === state.file()?.numberOfPages"
|
||||
[matTooltip]="'file-preview.quick-nav.jump-last' | translate"
|
||||
class="jump"
|
||||
matTooltipPosition="above"
|
||||
>
|
||||
<mat-icon svgIcon="iqser:nav-last"></mat-icon>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,39 @@
|
||||
.quick-navigation {
|
||||
height: 100%;
|
||||
border-right: 1px solid var(--iqser-separator);
|
||||
min-width: 61px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.jump {
|
||||
min-height: 32px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.25s;
|
||||
|
||||
&:not(.disabled):hover {
|
||||
background-color: var(--iqser-tab-hover);
|
||||
}
|
||||
|
||||
mat-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
|
||||
mat-icon {
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.active-panel {
|
||||
background-color: var(--iqser-workload-pages-bg);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
import { Component, EventEmitter, input, Output } from '@angular/core';
|
||||
import { PdfViewer } from '../../../pdf-viewer/services/pdf-viewer.service';
|
||||
import { FilePreviewStateService } from '../../services/file-preview-state.service';
|
||||
import { MatIcon } from '@angular/material/icon';
|
||||
import { PagesComponent } from '../pages/pages.component';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-quick-navigation',
|
||||
templateUrl: './quick-navigation.component.html',
|
||||
styleUrls: ['./quick-navigation.component.scss'],
|
||||
standalone: true,
|
||||
imports: [MatIcon, PagesComponent, MatTooltip, TranslateModule],
|
||||
})
|
||||
export class QuickNavigationComponent {
|
||||
readonly pagesPanelActive = input<boolean>(false);
|
||||
readonly displayedPages = input<number[]>([]);
|
||||
@Output() readonly pagesPanelActiveChange = new EventEmitter<boolean>();
|
||||
@Output() readonly preventKeyDefault = new EventEmitter<KeyboardEvent>();
|
||||
|
||||
constructor(
|
||||
readonly pdf: PdfViewer,
|
||||
readonly state: FilePreviewStateService,
|
||||
) {}
|
||||
|
||||
scrollQuickNavFirst() {
|
||||
this.pdf.navigateTo(1);
|
||||
}
|
||||
|
||||
scrollQuickNavLast() {
|
||||
this.pdf.navigateTo(this.state.file().numberOfPages);
|
||||
}
|
||||
}
|
||||
@ -1,12 +1,16 @@
|
||||
<ng-container *ngIf="state.file() as file">
|
||||
<iqser-empty-state
|
||||
*ngIf="file.excluded && documentInfoService.hidden() && !this.isDocumine"
|
||||
[horizontalPadding]="40"
|
||||
[text]="'file-preview.tabs.is-excluded' | translate"
|
||||
icon="red:needs-work"
|
||||
></iqser-empty-state>
|
||||
@if (state.file(); as file) {
|
||||
@if (isDocumine) {
|
||||
<redaction-documine-file-workload></redaction-documine-file-workload>
|
||||
} @else {
|
||||
<iqser-empty-state
|
||||
*ngIf="file.excluded && documentInfoService.hidden()"
|
||||
[horizontalPadding]="40"
|
||||
[text]="'file-preview.tabs.is-excluded' | translate"
|
||||
icon="red:needs-work"
|
||||
></iqser-empty-state>
|
||||
|
||||
<redaction-document-info *ngIf="documentInfoService.shown() && !isDocumine" id="document-info"></redaction-document-info>
|
||||
<redaction-document-info *ngIf="documentInfoService.shown()" id="document-info"></redaction-document-info>
|
||||
|
||||
<redaction-file-workload *ngIf="!file.excluded || isDocumine"></redaction-file-workload>
|
||||
</ng-container>
|
||||
<redaction-redact-file-workload *ngIf="!file.excluded"></redaction-redact-file-workload>
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,15 +6,23 @@ import { PdfViewer } from '../../../pdf-viewer/services/pdf-viewer.service';
|
||||
import { DocumentInfoService } from '../../services/document-info.service';
|
||||
import { FilePreviewStateService } from '../../services/file-preview-state.service';
|
||||
import { DocumentInfoComponent } from '../document-info/document-info.component';
|
||||
import { FileWorkloadComponent } from '../file-workload/file-workload.component';
|
||||
import { getConfig } from '@iqser/common-ui';
|
||||
import { RedactFileWorkloadComponent } from '../file-workload/redact-file-workload/redact-file-workload.component';
|
||||
import { DocumineFileWorkloadComponent } from '../file-workload/documine-file-workload/documine-file-workload.component';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-file-preview-right-container',
|
||||
templateUrl: './file-preview-right-container.component.html',
|
||||
styleUrls: ['./file-preview-right-container.component.scss'],
|
||||
standalone: true,
|
||||
imports: [EmptyStateComponent, NgIf, TranslateModule, DocumentInfoComponent, FileWorkloadComponent],
|
||||
imports: [
|
||||
EmptyStateComponent,
|
||||
NgIf,
|
||||
TranslateModule,
|
||||
DocumentInfoComponent,
|
||||
RedactFileWorkloadComponent,
|
||||
DocumineFileWorkloadComponent,
|
||||
],
|
||||
})
|
||||
export class FilePreviewRightContainerComponent {
|
||||
readonly isDocumine = getConfig().IS_DOCUMINE;
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
{
|
||||
"ADMIN_CONTACT_NAME": null,
|
||||
"ADMIN_CONTACT_URL": null,
|
||||
"API_URL": "https://frontend2.iqser.cloud",
|
||||
"API_URL": "https://dan2.iqser.cloud",
|
||||
"APP_NAME": "RedactManager",
|
||||
"IS_DOCUMINE": true,
|
||||
"IS_DOCUMINE": false,
|
||||
"RULE_EDITOR_DEV_ONLY": false,
|
||||
"AUTO_READ_TIME": 3,
|
||||
"BACKEND_APP_VERSION": "4.4.40",
|
||||
@ -13,13 +13,13 @@
|
||||
"MAX_RETRIES_ON_SERVER_ERROR": 3,
|
||||
"OAUTH_CLIENT_ID": "redaction",
|
||||
"OAUTH_IDP_HINT": null,
|
||||
"OAUTH_URL": "https://frontend2.iqser.cloud/auth",
|
||||
"OAUTH_URL": "https://dan2.iqser.cloud/auth",
|
||||
"RECENT_PERIOD_IN_HOURS": 24,
|
||||
"SELECTION_MODE": "structural",
|
||||
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview",
|
||||
"ANNOTATIONS_THRESHOLD": 1000,
|
||||
"THEME": "scm",
|
||||
"BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/scm/",
|
||||
"THEME": "redact",
|
||||
"BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/redact/",
|
||||
"AVAILABLE_NOTIFICATIONS_DAYS": 30,
|
||||
"AVAILABLE_OLD_NOTIFICATIONS_MINUTES": 60,
|
||||
"NOTIFICATIONS_THRESHOLD": 1000,
|
||||
|
||||
@ -392,7 +392,6 @@
|
||||
"annotation": {
|
||||
"pending": "(Analyse steht aus)"
|
||||
},
|
||||
"annotations": "Annotationen",
|
||||
"archived-dossiers-listing": {
|
||||
"no-data": {
|
||||
"title": "Keine archivierten Dossiers."
|
||||
@ -855,6 +854,9 @@
|
||||
"export": "Export",
|
||||
"export-tooltip": "Export"
|
||||
},
|
||||
"documine-workload": {
|
||||
"header-label": ""
|
||||
},
|
||||
"dossier-attribute-types": {
|
||||
"date": "Datum",
|
||||
"image": "Bild",
|
||||
|
||||
@ -392,7 +392,6 @@
|
||||
"annotation": {
|
||||
"pending": "(Pending analysis)"
|
||||
},
|
||||
"annotations": "Annotations",
|
||||
"archived-dossiers-listing": {
|
||||
"no-data": {
|
||||
"title": "No archived dossiers."
|
||||
@ -855,6 +854,9 @@
|
||||
"export": "Export",
|
||||
"export-tooltip": "Export"
|
||||
},
|
||||
"documine-workload": {
|
||||
"header-label": ""
|
||||
},
|
||||
"dossier-attribute-types": {
|
||||
"date": "Date",
|
||||
"image": "Image",
|
||||
|
||||
@ -392,7 +392,6 @@
|
||||
"annotation": {
|
||||
"pending": "(Pending analysis)"
|
||||
},
|
||||
"annotations": "Annotations",
|
||||
"archived-dossiers-listing": {
|
||||
"no-data": {
|
||||
"title": "No archived dossiers."
|
||||
@ -855,6 +854,9 @@
|
||||
"export": "Component download",
|
||||
"export-tooltip": "Component download"
|
||||
},
|
||||
"documine-workload": {
|
||||
"header-label": ""
|
||||
},
|
||||
"dossier-attribute-types": {
|
||||
"date": "Datum",
|
||||
"image": "Bild",
|
||||
|
||||
@ -392,7 +392,6 @@
|
||||
"annotation": {
|
||||
"pending": "(Pending analysis)"
|
||||
},
|
||||
"annotations": "Annotations",
|
||||
"archived-dossiers-listing": {
|
||||
"no-data": {
|
||||
"title": "No archived dossiers."
|
||||
@ -855,6 +854,9 @@
|
||||
"export": "Component download",
|
||||
"export-tooltip": "Component download"
|
||||
},
|
||||
"documine-workload": {
|
||||
"header-label": "Annotations"
|
||||
},
|
||||
"dossier-attribute-types": {
|
||||
"date": "Date",
|
||||
"image": "Image",
|
||||
|
||||
@ -187,7 +187,8 @@ body {
|
||||
);
|
||||
height: calc(100% - calc(var(--iqser-top-bar-height) + 50px));
|
||||
bottom: 0;
|
||||
right: calc(var(--qiuck-navigation-width) + 3px);
|
||||
//right: calc(var(--qiuck-navigation-width) + 3px);
|
||||
right: calc(var(--qiuck-navigation-width));
|
||||
position: absolute;
|
||||
|
||||
&.document-info {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user