From 9286ae74d6d1f8962c9b2de0a10041ba951dc72e Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Fri, 3 Dec 2021 14:23:01 +0200 Subject: [PATCH 1/5] fix pdftron deprecation warnings --- .../pdf-viewer/pdf-viewer.component.ts | 67 +++++++++---------- .../file-preview-screen.component.html | 10 +-- .../file-preview-screen.component.ts | 5 +- 3 files changed, 37 insertions(+), 45 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/pdf-viewer/pdf-viewer.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/pdf-viewer/pdf-viewer.component.ts index 146b0eb3c..82fd4c695 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/pdf-viewer/pdf-viewer.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/pdf-viewer/pdf-viewer.component.ts @@ -34,7 +34,6 @@ import { PdfViewerUtils } from '../../../../utils/pdf-viewer.utils'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { ActivatedRoute } from '@angular/router'; import { toPosition } from '../../../../utils/pdf-calculation.utils'; -import { DossiersService } from '@services/entity-services/dossiers.service'; import { ViewModeService } from '../../services/view-mode.service'; import { MultiSelectService } from '../../services/multi-select.service'; import Tools = Core.Tools; @@ -63,6 +62,7 @@ const dataElements = { export class PdfViewerComponent implements OnInit, OnChanges { @Input() fileData: Blob; @Input() file: File; + @Input() dossier: Dossier; @Input() canPerformActions = false; @Input() annotations: AnnotationWrapper[]; @Input() shouldDeselectAnnotationsOnPageChange = true; @@ -94,18 +94,13 @@ export class PdfViewerComponent implements OnInit, OnChanges { private readonly _annotationActionsService: AnnotationActionsService, private readonly _configService: ConfigService, private readonly _loadingService: LoadingService, - private readonly _dossiersService: DossiersService, readonly viewModeService: ViewModeService, readonly multiSelectService: MultiSelectService, ) {} - private get _dossier(): Dossier { - return this._dossiersService.find(this.file.dossierId); - } - async ngOnInit() { this._setReadyAndInitialState = this._setReadyAndInitialState.bind(this); - await this._loadViewer(); + await this.loadViewer(); } ngOnChanges(changes: SimpleChanges): void { @@ -200,18 +195,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { this.utils.navigateToPage(1); } - private _setInitialDisplayMode() { - this.instance.UI.setFitMode('FitPage'); - const instanceDisplayMode = this.documentViewer.getDisplayModeManager().getDisplayMode(); - instanceDisplayMode.mode = this.viewModeService.isStandard ? 'Single' : 'Facing'; - this.documentViewer.getDisplayModeManager().setDisplayMode(instanceDisplayMode); - } - - private _convertPath(path: string): string { - return this._baseHref + path; - } - - private async _loadViewer() { + async loadViewer() { this.instance = await WebViewer( { licenseKey: environment.licenseKey ? atob(environment.licenseKey) : null, @@ -232,7 +216,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { this.utils.disableHotkeys(); this._configureTextPopup(); - this.annotationManager.on('annotationSelected', (annotations, action) => { + this.annotationManager.addEventListener('annotationSelected', (annotations, action) => { this.annotationSelected.emit(this.annotationManager.getSelectedAnnotations().map(ann => ann.Id)); if (action === 'deselected') { this._toggleRectangleAnnotationAction(true); @@ -242,17 +226,17 @@ export class PdfViewerComponent implements OnInit, OnChanges { } }); - this.annotationManager.on('annotationChanged', annotations => { + this.annotationManager.addEventListener('annotationChanged', annotations => { // when a rectangle is drawn, // it returns one annotation with tool name 'AnnotationCreateRectangle; // this will auto select rectangle after drawing if (annotations.length === 1 && annotations[0].ToolName === 'AnnotationCreateRectangle') { this.annotationManager.selectAnnotations(annotations); - annotations[0].setRotationControlEnabled(false); + annotations[0].enableRotationControl(); } }); - this.documentViewer.on('pageNumberUpdated', pageNumber => { + this.documentViewer.addEventListener('pageNumberUpdated', pageNumber => { if (this.shouldDeselectAnnotationsOnPageChange) { this.utils.deselectAllAnnotations(); } @@ -268,9 +252,9 @@ export class PdfViewerComponent implements OnInit, OnChanges { this._handleCustomActions(); }); - this.documentViewer.on('documentLoaded', this._setReadyAndInitialState); + this.documentViewer.addEventListener('documentLoaded', this._setReadyAndInitialState); - this.documentViewer.on('keyUp', $event => { + this.documentViewer.addEventListener('keyUp', $event => { // arrows and full-screen if ($event.target?.tagName?.toLowerCase() !== 'input') { if ($event.key.startsWith('Arrow') || $event.key === 'f') { @@ -288,7 +272,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { } }); - this.documentViewer.on('textSelected', (quads, selectedText) => { + this.documentViewer.addEventListener('textSelected', (quads, selectedText) => { this._selectedText = selectedText; const textActions = [dataElements.ADD_DICTIONARY, dataElements.ADD_FALSE_POSITIVE]; @@ -314,6 +298,17 @@ export class PdfViewerComponent implements OnInit, OnChanges { this._loadDocument(); } + private _setInitialDisplayMode() { + this.instance.UI.setFitMode('FitPage'); + const instanceDisplayMode = this.documentViewer.getDisplayModeManager().getDisplayMode(); + instanceDisplayMode.mode = this.viewModeService.isStandard ? 'Single' : 'Facing'; + this.documentViewer.getDisplayModeManager().setDisplayMode(instanceDisplayMode); + } + + private _convertPath(path: string): string { + return this._baseHref + path; + } + private _setSelectionMode(): void { const textTool = this.instance.Core.Tools.TextTool as unknown as TextTool; textTool.SELECTION_MODE = this._configService.values.SELECTION_MODE; @@ -403,14 +398,14 @@ export class PdfViewerComponent implements OnInit, OnChanges { this.instance.UI.disableElements([dataElements.CLOSE_COMPARE_BUTTON]); - const dossierTemplateId = this._dossier.dossierTemplateId; + const dossierTemplateId = this.dossier.dossierTemplateId; - this.documentViewer.getTool('AnnotationCreateRectangle').setStyles(() => ({ + this.documentViewer.getTool('AnnotationCreateRectangle').setStyles({ StrokeThickness: 2, StrokeColor: this._annotationDrawService.getColor(this.instance, dossierTemplateId, 'manual'), FillColor: this._annotationDrawService.getColor(this.instance, dossierTemplateId, 'manual'), Opacity: 0.6, - })); + }); } private _configureAnnotationSpecificActions(viewerAnnotations: Annotation[]) { @@ -464,7 +459,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { type: 'actionButton', dataElement: dataElements.ADD_RECTANGLE, img: this._convertPath('/assets/icons/general/pdftron-action-add-redaction.svg'), - title: this._translateService.instant(this._manualAnnotationService.getTitle('REDACTION', this._dossier)), + title: this._translateService.instant(this._manualAnnotationService.getTitle('REDACTION', this.dossier)), onClick: () => this._addRectangleManualRedaction(), }, ]); @@ -519,7 +514,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { dataElement: 'add-false-positive', img: this._convertPath('/assets/icons/general/pdftron-action-false-positive.svg'), title: this._translateService.instant( - this._manualAnnotationService.getTitle(ManualRedactionEntryTypes.FALSE_POSITIVE, this._dossier), + this._manualAnnotationService.getTitle(ManualRedactionEntryTypes.FALSE_POSITIVE, this.dossier), ), onClick: () => this._addManualRedactionOfType(ManualRedactionEntryTypes.FALSE_POSITIVE), }, @@ -532,7 +527,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { dataElement: dataElements.ADD_REDACTION, img: this._convertPath('/assets/icons/general/pdftron-action-add-redaction.svg'), title: this._translateService.instant( - this._manualAnnotationService.getTitle(ManualRedactionEntryTypes.REDACTION, this._dossier), + this._manualAnnotationService.getTitle(ManualRedactionEntryTypes.REDACTION, this.dossier), ), onClick: () => this._addManualRedactionOfType(ManualRedactionEntryTypes.REDACTION), }, @@ -541,7 +536,7 @@ export class PdfViewerComponent implements OnInit, OnChanges { dataElement: dataElements.ADD_DICTIONARY, img: this._convertPath('/assets/icons/general/pdftron-action-add-dict.svg'), title: this._translateService.instant( - this._manualAnnotationService.getTitle(ManualRedactionEntryTypes.DICTIONARY, this._dossier), + this._manualAnnotationService.getTitle(ManualRedactionEntryTypes.DICTIONARY, this.dossier), ), onClick: () => this._addManualRedactionOfType(ManualRedactionEntryTypes.DICTIONARY), }, @@ -570,7 +565,11 @@ export class PdfViewerComponent implements OnInit, OnChanges { ]; if (this.canPerformActions && !this.utils.isCurrentPageExcluded) { - this.instance.UI.enableTools(['AnnotationCreateRectangle']); + try { + this.instance.UI.enableTools(['AnnotationCreateRectangle']); + } catch (e) { + console.log(e); + } this.instance.UI.enableElements(elements); if (this._selectedText.length > 2) { 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 1a6725ccb..75909d65f 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 @@ -76,10 +76,10 @@ (manualAnnotationRequested)="openManualAnnotationDialog($event)" (pageChanged)="viewerPageChanged($event)" (viewerReady)="viewerReady($event)" - *ngIf="displayPDFViewer" [annotations]="annotations" [canPerformActions]="canPerformAnnotationActions$ | async" - [fileData]="fileData.fileData" + [dossier]="dossier" + [fileData]="fileData?.fileData" [file]="file" [shouldDeselectAnnotationsOnPageChange]="shouldDeselectAnnotationsOnPageChange" > @@ -93,11 +93,7 @@ icon="red:needs-work" > - + { @@ -241,8 +240,6 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni if (file?.analysisRequired) { await this.fileActions.reanalyseFile(); } - - this.displayPDFViewer = true; } rebuildFilters(deletePreviousAnnotations = false): void { From 36c4deb9edfb9964dc7853cb15e43b77c2f9c48a Mon Sep 17 00:00:00 2001 From: Bamboo Date: Fri, 3 Dec 2021 13:35:51 +0100 Subject: [PATCH 2/5] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3208 -> 3209 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c6e8ce428..468b970ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.84.0", + "version": "3.85.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 9fcf61276b3834f6280ab633e1e2b5b2ae6570d4..d051be74cdc11978a2c22f626c6f1f70897e4647 100644 GIT binary patch delta 3161 zcmV-f45ssl8HpK?Pk*>Z-3{P9ybW&wFw?67r*xfLEFl|m_2P3h8`@%Ki%(~^cwsvW zXmjyfwik}?%v|4|J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Vw!K&QKz_*VjK^tHr!X=}jOzMV5JpGvd zOm2}272(NXf!9R7YI%rswr$!5BfruSeua#n64wCCR{Yc16ylUMvEEa1C+^+6>c(_E>uU7l|%D#WjtfpmB_+guV*{g-qRAx^^!NWzhY9B>zxDgh|* zB=XH$hj{ZTk#0V?WD;+%S)eb3QTuD$tr&=Osq+^VEp~;5T%q7rNYom&(I**kNvi!S zbmQW7Hg77nUk#T=M)jh<6dzj{&3^-kj2?P3ZezAKWH63c0S_+ZNl_kK?4cl+!zi-b zTolJzdGL22a{TyE?bO=XU0bZJIa1;SNXYnF<4gg?YW5F&djg@r1kGoB^T6>h2a|#1 z3XS;&LuyuTb;FiljiX@?J>g<9t^<7*fMEk)iPIKnomGTwJ!zg!nwS0&uYcyflr!f4 ziAx9yK1bX=P^mCoIZ)d_`%QzL$Ovb=2c6N-Z4czm3GRdcoLdAc>;o zyDHEdbKnhu9y-sy7|@6JoCsQ%ZhH-&N9WGd|6>^0CFn;nva`oUnTI3-?Gq{5v|^;# zb8mJe#B)p`%8++D`@4OJcYighx?66>45{n!3bAP59K{KiE&L2J^dE4r&1K~U$@{4hY9~^UYR>iJ|*$ZZR-^}=l87wfq)vT?WcU5y)Re!Y4k_=7OVXSL# zKX5a4r0a2eu%kepy!ATZe&6*Sd13u=D7-$z_M+@wh%*hMBKtl>?@)-or$SUz=a~-w zaj1ENpzpY(K|&nHj=P+X7-IHdZR5e|?!15Sr<}^EoXV-3%Bh^nshrBG koXV-3%Bh^nshrBGoD<5aoXV-3%9F}}0V Date: Fri, 3 Dec 2021 17:08:06 +0200 Subject: [PATCH 3/5] show pdf viewer on route reuse --- .../file-preview-screen/file-preview-screen.component.html | 1 + .../file-preview-screen/file-preview-screen.component.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 75909d65f..c1a6573a4 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 @@ -76,6 +76,7 @@ (manualAnnotationRequested)="openManualAnnotationDialog($event)" (pageChanged)="viewerPageChanged($event)" (viewerReady)="viewerReady($event)" + *ngIf="displayPdfViewer" [annotations]="annotations" [canPerformActions]="canPerformAnnotationActions$ | async" [dossier]="dossier" 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 74815de48..415c09cc9 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 @@ -76,6 +76,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni annotationData: AnnotationData; selectedAnnotations: AnnotationWrapper[]; hideSkipped = false; + displayPdfViewer = false; @ViewChild(PdfViewerComponent) readonly viewerComponent: PdfViewerComponent; @ViewChild('fileActions') fileActions: FileActionsComponent; readonly dossierId: string; @@ -216,8 +217,9 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni } ngOnDetach(): void { - this._changeDetectorRef.markForCheck(); + this.displayPdfViewer = false; super.ngOnDestroy(); + this._changeDetectorRef.markForCheck(); } async ngOnAttach(previousRoute: ActivatedRouteSnapshot): Promise { @@ -228,6 +230,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni await this.ngOnInit(); this._lastPage = previousRoute.queryParams.page; + this._changeDetectorRef.markForCheck(); this._loadingService.stop(); } @@ -240,6 +243,8 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni if (file?.analysisRequired) { await this.fileActions.reanalyseFile(); } + + this.displayPdfViewer = true; } rebuildFilters(deletePreviousAnnotations = false): void { From 5d8892a1215999679348eef80e37f8a71fc54150 Mon Sep 17 00:00:00 2001 From: Bamboo Date: Fri, 3 Dec 2021 16:18:52 +0100 Subject: [PATCH 4/5] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3209 -> 3207 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 468b970ef..72d2e6142 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.85.0", + "version": "3.86.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index d051be74cdc11978a2c22f626c6f1f70897e4647..063b34e78ef5049e071e16ee0b4b16769211d9a4 100644 GIT binary patch literal 3207 zcmV;240!V&iwFP!000001MM5za^tpjpZyi6Gws-^DDx`G@?^WoG-+QtohE7f(ie~f zMRX~WA;Go19nbVP`qYYqnF>3xB;erS+;A=cGQTNtMmL4U zQnDpCuRcbzp)CVjd^*AMmF+B{EyQoxUOB!KxV{G;0Oz=l=f6V1N1V*?bozG#7vNlga9$z%$7R*r{?GOQCQ5Nt6NWDT{OwoP>hkX54c(SS#ZXgaSC=Vc zWxc++Ns64+^G#7~GJ;E5&!b{{0|w##Cc#^pJ%0AblH|Ys2IuvfGMvrsHz|8#&pg|{ zvuD2e8;HLP@pmcyuHdgDU>pJC2pC7eI0DAuFu#gvU1s?4v-%#Fm)Ca}b50-5td!uG zROlZU2)(yx9+QVPa_-<)N+_(qMt)$I4|f+&gBj~}NRpx=VrGb=w_LM%Y(+&@RBQB! zyYgJ$8P7whBc^a+ST%i5)@b4L1!UK~T$XbLeHqP()seDVwt!n)ZD?+>qJ+sStuHJX zE4Dzjk!aNYtO>57R1mVo57s@6SqivpTSc};xM2nVT^2QEw1A$9WSG%+#TIB)4P$T>-p6KPqm!4M*n z7FnnGqQntpk85PlmnR~dy=>*7wP<$XNW0K%z*!xm*s<_S9LF@@00I}}?JSSN60*FV z-0L5QpsI!uPFK}ZBse|Lo&f zSf|B1DQ|-T#jzg;0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@#O^VK^V$r+o_lWy! zwQA>;3~&X@LhZz_wz?#4!jHRZz7Bk2v>0mBHEYxDX;YYnuwLqju5XijOUh<^!0F9(pTobG9~RFhZ{=E7TFyxifgSr_&YE;etoD;YJKdkBi7a(Dfs~uWPGo2p@3mE=Lfz$ zfmC3E<}-eH;P{t=#Xxg~CVYbL*?}`whv|ZVw`Ch72WqS zdWT~4Jr$#3I?oLFk3-8FBz?yf4HDxpcia_x1c*6;wSxzjzoQ7^JgmpAt$*(SIpx$& v?bJ@~)K2ZxPVLlA?bJ@~)K2ZxPVLlA?bJ@~)K2Zxp49#emw;OL08jt`+j2J| From 1f8096399a512733eac26f152090cde6f9617af0 Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Fri, 3 Dec 2021 20:16:57 +0200 Subject: [PATCH 5/5] fix RED-2916 --- .../edit-dossier-deleted-documents.component.ts | 2 +- libs/common-ui | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts index 062e463f7..6a9336c7e 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts @@ -147,7 +147,7 @@ export class EditDossierDeletedDocumentsComponent extends ListingComponent= 0 && hoursLeft >= 0 && minutesLeft > 0; + return daysLeft >= 0 && hoursLeft >= 0 && minutesLeft >= 0; } private _getRestoreDate(softDeletedTime: string): string { diff --git a/libs/common-ui b/libs/common-ui index 82f6fa90c..5d584893d 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 82f6fa90c8206d473f1f52aa0bd6fe3baf5a36d9 +Subproject commit 5d584893d7e3067e0abfd09d2fc6b567305e9b43