From e835f27a3d02870ded97f661d7f0b41731b9a7c4 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Wed, 6 Mar 2024 12:59:16 +0200 Subject: [PATCH 1/3] RED-7980 - update to compute annotation type if state = PENDING, based on its old entity state --- .../src/app/models/file/annotation.wrapper.ts | 12 ++++++- .../annotation-card.component.html | 2 +- .../annotation-card.component.ts | 13 ------- .../annotation-details.component.scss | 1 - .../services/file-data.service.ts | 1 + libs/red-domain/src/lib/files/super-types.ts | 36 ++++++++++++------- .../src/lib/redaction-log/entity-log-entry.ts | 1 + .../src/lib/redaction-log/entity-states.ts | 1 + 8 files changed, 38 insertions(+), 29 deletions(-) diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index f6ebdd5f3..8714d1fe9 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -9,8 +9,10 @@ import { Dictionary, Earmark, EntityTypes, + EntryState, EntryStates, FalsePositiveSuperTypes, + IEntityLog, IEntityLogEntry, ILegalBasis, IPoint, @@ -65,6 +67,7 @@ export class AnnotationWrapper implements IListable { isRemoved = false; isRemovedLocally = false; lastManualChange: ManualRedactionType; + oldState: EntryState; get isRuleBased() { return this.engines.includes(LogEntryEngines.RULE); @@ -209,6 +212,7 @@ export class AnnotationWrapper implements IListable { static fromData( logEntry: IEntityLogEntry, + allLogEntries: IEntityLogEntry[], dictionary: Dictionary, changeLogType: ChangeType, legalBasisList: ILegalBasis[], @@ -268,7 +272,13 @@ export class AnnotationWrapper implements IListable { const lastRelevantManualChange = logEntry.manualChanges?.at(-1); annotationWrapper.lastManualChange = lastRelevantManualChange?.manualRedactionType; - annotationWrapper.pending = lastRelevantManualChange && !lastRelevantManualChange.processed; + annotationWrapper.pending = logEntry.state === EntryStates.PENDING; + if (annotationWrapper.pending) { + const removedEntry = allLogEntries.find( + (e: IEntityLogEntry) => e.id === annotationWrapper.id && e.state === EntryStates.REMOVED, + ); + logEntry.oldState = removedEntry?.state; + } annotationWrapper.superType = SuperTypeMapper[logEntry.entryType][logEntry.state](logEntry); annotationWrapper.superTypeLabel = annotationTypesTranslations[annotationWrapper.superType]; diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html index 99c2ed520..50a482417 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html @@ -10,7 +10,7 @@
{{ annotation.superTypeLabel | translate }}   - + {{ 'annotation.pending' | translate }}
diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts index f62a1a538..322593075 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts @@ -18,17 +18,4 @@ export class AnnotationCardComponent { @Input() isSelected = false; constructor(readonly multiSelectService: MultiSelectService) {} - - get pending() { - return ( - this.annotation.pending && - ((this.annotation.isModifyDictionary && - !this.annotation.isRemovedLocally && - !this.annotation.hasBeenForcedHint && - this.annotation.lastManualChange !== ManualRedactionTypes.LEGAL_BASIS_CHANGE && - this.annotation.lastManualChange !== ManualRedactionTypes.RESIZE_LOCALLY) || - this.annotation.type === ImageCategory.SIGNATURE || - this.annotation.IMAGE_HINT) - ); - } } diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.scss b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.scss index 1110e38ca..8a2928722 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.scss +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.scss @@ -6,7 +6,6 @@ } .popover { - width: 260px; padding: 10px; border-radius: 3px; background-color: var(--iqser-grey-1); diff --git a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts index 2bf2a4e8a..6bc632504 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts @@ -226,6 +226,7 @@ export class FileDataService extends EntitiesService; +interface ResolveTypeOptions { + hint: boolean; + pending: boolean; +} + function wrongSuperTypeHandler(): never | undefined { return undefined; } -function resolveRedactionType(entry: IEntityLogEntry, hint = false) { - const redaction = hint ? SuperTypes.Hint : SuperTypes.Redaction; - const manualRedaction = hint ? SuperTypes.ManualHint : SuperTypes.ManualRedaction; +function resolveRedactionType(entry: IEntityLogEntry, options?: Partial) { + if (options?.pending && entry.oldState) { + return SuperTypeMapper[entry.entryType][entry.oldState](entry); + } - const manualChanges = entry.manualChanges; - const hasEngines = entry.engines.length; - const lastRelevantManualChange = manualChanges?.at(-1); - if (!!lastRelevantManualChange && !hasEngines) { - const pending = lastRelevantManualChange && !lastRelevantManualChange.processed; - if (pending && entry.dictionaryEntry) { - return redaction; - } - return manualRedaction; + const redaction = options?.hint ? SuperTypes.Hint : SuperTypes.Redaction; + const manualRedaction = options?.hint ? SuperTypes.ManualHint : SuperTypes.ManualRedaction; + + if (!entry.engines.length) { + return options?.pending && entry.dictionaryEntry ? redaction : manualRedaction; } return redaction; } @@ -44,48 +46,56 @@ export const SuperTypeMapper: Record SuperTypes.Skipped, [EntryStates.IGNORED]: () => SuperTypes.Skipped, [EntryStates.REMOVED]: wrongSuperTypeHandler, + [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), }, [EntityTypes.HINT]: { [EntryStates.APPLIED]: wrongSuperTypeHandler, - [EntryStates.SKIPPED]: entry => resolveRedactionType(entry, true), + [EntryStates.SKIPPED]: entry => resolveRedactionType(entry, { hint: true }), [EntryStates.IGNORED]: () => SuperTypes.IgnoredHint, [EntryStates.REMOVED]: wrongSuperTypeHandler, + [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), }, [EntityTypes.FALSE_POSITIVE]: { [EntryStates.APPLIED]: wrongSuperTypeHandler, [EntryStates.SKIPPED]: wrongSuperTypeHandler, [EntryStates.IGNORED]: wrongSuperTypeHandler, [EntryStates.REMOVED]: wrongSuperTypeHandler, + [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), }, [EntityTypes.RECOMMENDATION]: { [EntryStates.APPLIED]: wrongSuperTypeHandler, [EntryStates.SKIPPED]: () => SuperTypes.Recommendation, [EntryStates.IGNORED]: wrongSuperTypeHandler, [EntryStates.REMOVED]: wrongSuperTypeHandler, + [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), }, [EntityTypes.FALSE_RECOMMENDATION]: { [EntryStates.APPLIED]: wrongSuperTypeHandler, [EntryStates.SKIPPED]: wrongSuperTypeHandler, [EntryStates.IGNORED]: wrongSuperTypeHandler, [EntryStates.REMOVED]: wrongSuperTypeHandler, + [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), }, [EntityTypes.AREA]: { [EntryStates.APPLIED]: () => SuperTypes.Redaction, [EntryStates.SKIPPED]: wrongSuperTypeHandler, [EntryStates.IGNORED]: wrongSuperTypeHandler, [EntryStates.REMOVED]: wrongSuperTypeHandler, + [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), }, [EntityTypes.IMAGE]: { [EntryStates.APPLIED]: () => SuperTypes.Redaction, [EntryStates.SKIPPED]: () => SuperTypes.Skipped, [EntryStates.IGNORED]: () => SuperTypes.Skipped, [EntryStates.REMOVED]: wrongSuperTypeHandler, + [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), }, [EntityTypes.IMAGE_HINT]: { [EntryStates.APPLIED]: wrongSuperTypeHandler, [EntryStates.SKIPPED]: () => SuperTypes.Hint, [EntryStates.IGNORED]: () => SuperTypes.IgnoredHint, [EntryStates.REMOVED]: wrongSuperTypeHandler, + [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), }, }; diff --git a/libs/red-domain/src/lib/redaction-log/entity-log-entry.ts b/libs/red-domain/src/lib/redaction-log/entity-log-entry.ts index 21d94933f..2efa68491 100644 --- a/libs/red-domain/src/lib/redaction-log/entity-log-entry.ts +++ b/libs/red-domain/src/lib/redaction-log/entity-log-entry.ts @@ -14,6 +14,7 @@ export interface IEntityLogEntry extends ITrackable { type: string; entryType: EntityType; state: EntryState; + oldState?: EntryState; value: string; reason: string; matchedRule: string; diff --git a/libs/red-domain/src/lib/redaction-log/entity-states.ts b/libs/red-domain/src/lib/redaction-log/entity-states.ts index 2507f1bdb..60725eef0 100644 --- a/libs/red-domain/src/lib/redaction-log/entity-states.ts +++ b/libs/red-domain/src/lib/redaction-log/entity-states.ts @@ -3,6 +3,7 @@ export const EntryStates = { SKIPPED: 'SKIPPED', IGNORED: 'IGNORED', REMOVED: 'REMOVED', + PENDING: 'PENDING', } as const; export type EntryState = (typeof EntryStates)[keyof typeof EntryStates]; From aba65ffaf707abec59951e37e6da4088a13ed82d Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Thu, 7 Mar 2024 22:43:38 +0200 Subject: [PATCH 2/3] RED-8342 - added polyline annotation for pending redactions --- .../src/app/models/file/annotation.wrapper.ts | 11 ++- .../services/annotation-draw.service.ts | 78 ++++++++++++++++--- .../pdf-viewer/services/pdf-viewer.service.ts | 4 + 3 files changed, 77 insertions(+), 16 deletions(-) diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index 8714d1fe9..a576bfbfe 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -67,7 +67,6 @@ export class AnnotationWrapper implements IListable { isRemoved = false; isRemovedLocally = false; lastManualChange: ManualRedactionType; - oldState: EntryState; get isRuleBased() { return this.engines.includes(LogEntryEngines.RULE); @@ -287,9 +286,13 @@ export class AnnotationWrapper implements IListable { annotationWrapper.typeLabel = dictionary?.virtual ? undefined : dictionary?.label; - const colorKey = annotationEntityColorConfig[annotationWrapper.superType]; - const defaultColor = annotationDefaultColorConfig[annotationWrapper.superType]; - annotationWrapper.color = dictionary ? (dictionary[colorKey] as string) : (defaultColors[defaultColor] as string); + if (annotationWrapper.pending) { + annotationWrapper.color = defaultColors[annotationDefaultColorConfig.analysis] as string; + } else { + const colorKey = annotationEntityColorConfig[annotationWrapper.superType]; + const defaultColor = annotationDefaultColorConfig[annotationWrapper.superType]; + annotationWrapper.color = dictionary ? (dictionary[colorKey] as string) : (defaultColors[defaultColor] as string); + } annotationWrapper['entry'] = logEntry; return annotationWrapper; diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts index 5c3a677b6..1498b9ed4 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { List } from '@iqser/common-ui/lib/utils'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { Core } from '@pdftron/webviewer'; -import { IRectangle, ISectionRectangle, SuperTypes } from '@red/domain'; +import { IRectangle, ISectionRectangle, IPoint, SuperTypes } from '@red/domain'; import { DefaultColorsService } from '@services/entity-services/default-colors.service'; import { hexToRgb } from '@utils/functions'; import { BoundingBox, Table } from '../../file-preview/services/tables.service'; @@ -11,6 +11,7 @@ import { REDDocumentViewer } from './document-viewer.service'; import { PdfViewer } from './pdf-viewer.service'; import Annotation = Core.Annotations.Annotation; import Quad = Core.Math.Quad; +import PolylineAnnotation = Core.Annotations.PolylineAnnotation; const DEFAULT_TEXT_ANNOTATION_OPACITY = 1; const DEFAULT_REMOVED_ANNOTATION_OPACITY = 0.2; @@ -128,6 +129,24 @@ export class AnnotationDrawService { return; } + if (annotationWrapper.pending) { + const polylineAnnot = this._pdf.polyline(); + polylineAnnot.ReadOnly = true; + polylineAnnot.StrokeColor = this.convertColor(annotationWrapper.color); + polylineAnnot.StrokeThickness = 4; + polylineAnnot.Id = annotationWrapper.id; + polylineAnnot.PageNumber = pageNumber; + polylineAnnot.Opacity = 0.5; + + const points = this.#computePolylinePoints(annotationWrapper.positions, annotationWrapper.pageNumber); + for (let i = 0; i < points.length; i++) { + const y = i % 2 === 1 ? points[i - 1].y : points[i].y; + polylineAnnot.addPathPoint(points[i].x, y); + } + + return polylineAnnot; + } + if (annotationWrapper.superType === SuperTypes.TextHighlight) { const rectangleAnnot = this._pdf.rectangle(); const pageHeight = this._documentViewer.getHeight(pageNumber); @@ -184,18 +203,53 @@ export class AnnotationDrawService { } #rectangleToQuad(rectangle: IRectangle, pageHeight: number): Quad { - const x1 = rectangle.topLeft.x; - const y1 = pageHeight - (rectangle.topLeft.y + rectangle.height); - - const x2 = rectangle.topLeft.x + rectangle.width; - const y2 = pageHeight - (rectangle.topLeft.y + rectangle.height); - - const x3 = rectangle.topLeft.x + rectangle.width; - const y3 = pageHeight - rectangle.topLeft.y; - - const x4 = rectangle.topLeft.x; - const y4 = pageHeight - rectangle.topLeft.y; + const { x: x1, y: y1 } = this.#topLeft(rectangle, pageHeight); + const { x: x2, y: y2 } = this.#topRight(rectangle, pageHeight); + const { x: x3, y: y3 } = this.#bottomRight(rectangle, pageHeight); + const { x: x4, y: y4 } = this.#bottomLeft(rectangle, pageHeight); return this._pdf.quad(x1, y1, x2, y2, x3, y3, x4, y4); } + + #computePolylinePoints(positions: IRectangle[], pageNumber: number): IPoint[] { + const pageHeight = this._documentViewer.getHeight(pageNumber); + const points = [this.#topLeft(positions[0], pageHeight)]; + + for (let i = 0; i < positions.length; i++) { + points.push(this.#topRight(positions[i], pageHeight)); + points.push(this.#bottomRight(positions[i], pageHeight)); + } + + for (let i = positions.length - 1; i >= 0; i--) { + points.push(this.#bottomLeft(positions[i], pageHeight)); + points.push(this.#topLeft(positions[i], pageHeight)); + } + + points.push(this.#topRight(positions[0], pageHeight)); + return points; + } + + #topLeft(rectangle: IRectangle, pageHeight: number): IPoint { + const x = rectangle.topLeft.x; + const y = pageHeight - (rectangle.topLeft.y + rectangle.height); + return { x, y }; + } + + #topRight(rectangle: IRectangle, pageHeight: number): IPoint { + const x = rectangle.topLeft.x + rectangle.width; + const y = pageHeight - (rectangle.topLeft.y + rectangle.height); + return { x, y }; + } + + #bottomRight(rectangle: IRectangle, pageHeight: number): IPoint { + const x = rectangle.topLeft.x + rectangle.width; + const y = pageHeight - rectangle.topLeft.y; + return { x, y }; + } + + #bottomLeft(rectangle: IRectangle, pageHeight: number): IPoint { + const x = rectangle.topLeft.x; + const y = pageHeight - rectangle.topLeft.y; + return { x, y }; + } } diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/pdf-viewer.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/pdf-viewer.service.ts index 90da413ac..09fc4f9a7 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/pdf-viewer.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/pdf-viewer.service.ts @@ -243,6 +243,10 @@ export class PdfViewer { return new this.#instance.Core.Annotations.TextHighlightAnnotation(); } + polyline() { + return new this.#instance.Core.Annotations.PolylineAnnotation(); + } + isTextHighlight(annotation: Annotation): annotation is TextHighlightAnnotation { return annotation instanceof this.#instance.Core.Annotations.TextHighlightAnnotation; } From 2106a069a734d42cc745d2c008fa87db553c1a9f Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Fri, 8 Mar 2024 10:59:52 +0200 Subject: [PATCH 3/3] RED-7980 - removed pending option --- libs/common-ui | 2 +- libs/red-domain/src/lib/files/super-types.ts | 33 +++++++++----------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/libs/common-ui b/libs/common-ui index 3ea4e45b8..ecf9c8912 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 3ea4e45b87b94868370492c475864390d984f65d +Subproject commit ecf9c8912e366fdcc0a454d112c0f3252245666a diff --git a/libs/red-domain/src/lib/files/super-types.ts b/libs/red-domain/src/lib/files/super-types.ts index cbb9f98a8..02f2c80db 100644 --- a/libs/red-domain/src/lib/files/super-types.ts +++ b/libs/red-domain/src/lib/files/super-types.ts @@ -14,25 +14,20 @@ export const SuperTypes = { export type SuperType = ValuesOf; -interface ResolveTypeOptions { - hint: boolean; - pending: boolean; -} - function wrongSuperTypeHandler(): never | undefined { return undefined; } -function resolveRedactionType(entry: IEntityLogEntry, options?: Partial) { - if (options?.pending && entry.oldState) { +function resolveRedactionType(entry: IEntityLogEntry, hint = false) { + if (entry.state === EntryStates.PENDING && entry.oldState) { return SuperTypeMapper[entry.entryType][entry.oldState](entry); } - const redaction = options?.hint ? SuperTypes.Hint : SuperTypes.Redaction; - const manualRedaction = options?.hint ? SuperTypes.ManualHint : SuperTypes.ManualRedaction; + const redaction = hint ? SuperTypes.Hint : SuperTypes.Redaction; + const manualRedaction = hint ? SuperTypes.ManualHint : SuperTypes.ManualRedaction; if (!entry.engines.length) { - return options?.pending && entry.dictionaryEntry ? redaction : manualRedaction; + return entry.state === EntryStates.PENDING && entry.dictionaryEntry ? redaction : manualRedaction; } return redaction; } @@ -46,56 +41,56 @@ export const SuperTypeMapper: Record SuperTypes.Skipped, [EntryStates.IGNORED]: () => SuperTypes.Skipped, [EntryStates.REMOVED]: wrongSuperTypeHandler, - [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), + [EntryStates.PENDING]: entry => resolveRedactionType(entry), }, [EntityTypes.HINT]: { [EntryStates.APPLIED]: wrongSuperTypeHandler, - [EntryStates.SKIPPED]: entry => resolveRedactionType(entry, { hint: true }), + [EntryStates.SKIPPED]: entry => resolveRedactionType(entry, true), [EntryStates.IGNORED]: () => SuperTypes.IgnoredHint, [EntryStates.REMOVED]: wrongSuperTypeHandler, - [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), + [EntryStates.PENDING]: entry => resolveRedactionType(entry), }, [EntityTypes.FALSE_POSITIVE]: { [EntryStates.APPLIED]: wrongSuperTypeHandler, [EntryStates.SKIPPED]: wrongSuperTypeHandler, [EntryStates.IGNORED]: wrongSuperTypeHandler, [EntryStates.REMOVED]: wrongSuperTypeHandler, - [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), + [EntryStates.PENDING]: entry => resolveRedactionType(entry), }, [EntityTypes.RECOMMENDATION]: { [EntryStates.APPLIED]: wrongSuperTypeHandler, [EntryStates.SKIPPED]: () => SuperTypes.Recommendation, [EntryStates.IGNORED]: wrongSuperTypeHandler, [EntryStates.REMOVED]: wrongSuperTypeHandler, - [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), + [EntryStates.PENDING]: entry => resolveRedactionType(entry), }, [EntityTypes.FALSE_RECOMMENDATION]: { [EntryStates.APPLIED]: wrongSuperTypeHandler, [EntryStates.SKIPPED]: wrongSuperTypeHandler, [EntryStates.IGNORED]: wrongSuperTypeHandler, [EntryStates.REMOVED]: wrongSuperTypeHandler, - [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), + [EntryStates.PENDING]: entry => resolveRedactionType(entry), }, [EntityTypes.AREA]: { [EntryStates.APPLIED]: () => SuperTypes.Redaction, [EntryStates.SKIPPED]: wrongSuperTypeHandler, [EntryStates.IGNORED]: wrongSuperTypeHandler, [EntryStates.REMOVED]: wrongSuperTypeHandler, - [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), + [EntryStates.PENDING]: entry => resolveRedactionType(entry), }, [EntityTypes.IMAGE]: { [EntryStates.APPLIED]: () => SuperTypes.Redaction, [EntryStates.SKIPPED]: () => SuperTypes.Skipped, [EntryStates.IGNORED]: () => SuperTypes.Skipped, [EntryStates.REMOVED]: wrongSuperTypeHandler, - [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), + [EntryStates.PENDING]: entry => resolveRedactionType(entry), }, [EntityTypes.IMAGE_HINT]: { [EntryStates.APPLIED]: wrongSuperTypeHandler, [EntryStates.SKIPPED]: () => SuperTypes.Hint, [EntryStates.IGNORED]: () => SuperTypes.IgnoredHint, [EntryStates.REMOVED]: wrongSuperTypeHandler, - [EntryStates.PENDING]: entry => resolveRedactionType(entry, { pending: true }), + [EntryStates.PENDING]: entry => resolveRedactionType(entry), }, };