diff --git a/.eslintrc.json b/.eslintrc.json
index 567c024ba..6790da491 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -11,7 +11,6 @@
{
"enforceBuildableLibDependency": true,
"allow": [
- "@redaction/red-ui-http",
"@redaction/red-cache",
"@services/**",
"@components/**",
diff --git a/angular.json b/angular.json
index 0e78f4204..990116c5b 100644
--- a/angular.json
+++ b/angular.json
@@ -210,41 +210,6 @@
"outputs": ["coverage/apps/red-ui"]
}
}
- },
- "red-ui-http": {
- "projectType": "library",
- "root": "libs/red-ui-http",
- "sourceRoot": "libs/red-ui-http/src",
- "prefix": "redaction",
- "architect": {
- "build": {
- "builder": "@angular-devkit/build-angular:ng-packagr",
- "options": {
- "tsConfig": "libs/red-ui-http/tsconfig.lib.json",
- "project": "libs/red-ui-http/ng-package.json"
- }
- },
- "lint": {
- "builder": "@nrwl/linter:eslint",
- "options": {
- "lintFilePatterns": ["libs/red-ui-http/src/**/*.ts", "libs/red-ui-http/src/**/*.html"]
- },
- "outputs": ["{options.outputFile}"]
- },
- "test": {
- "builder": "@nrwl/jest:jest",
- "options": {
- "jestConfig": "libs/red-ui-http/jest.config.js",
- "passWithNoTests": true
- },
- "outputs": ["coverage/libs/red-ui-http"]
- }
- },
- "schematics": {
- "@schematics/angular:component": {
- "style": "scss"
- }
- }
}
}
}
diff --git a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts
index fc39331e1..73cee8af0 100644
--- a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts
+++ b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts
@@ -1,6 +1,6 @@
import { Component, forwardRef, Injector } from '@angular/core';
import { FileDownloadService } from '@upload-download/services/file-download.service';
-import { DownloadStatus } from '@upload-download/model/download-status';
+import { DownloadStatus } from '@red/domain';
import {
CircleButtonTypes,
DefaultListingServicesTmp,
diff --git a/apps/red-ui/src/app/components/notifications/notifications.component.html b/apps/red-ui/src/app/components/notifications/notifications.component.html
index 3b2f42e76..a7ef00a67 100644
--- a/apps/red-ui/src/app/components/notifications/notifications.component.html
+++ b/apps/red-ui/src/app/components/notifications/notifications.component.html
@@ -10,10 +10,14 @@
[verticalPadding]="0"
>
-
-
{{ group.date }}
+
+
+
{{ group.date }}
+
View all
+
+
{{ notification.time }}
notifications.filter(n => !n.readDate).length > 0),
distinctUntilChanged(),
+ shareReplay(1),
);
}
@@ -46,9 +48,9 @@ export class NotificationsComponent implements OnInit {
await this._loadData();
}
- async markRead(notification: Notification, $event, isRead = true): Promise {
+ async markRead($event, notifications: List = this._notifications$.getValue().map(n => n.id), isRead = true): Promise {
$event.stopPropagation();
- await this._notificationsService.toggleNotificationRead([notification.id], isRead).toPromise();
+ await this._notificationsService.toggleNotificationRead(notifications, isRead).toPromise();
await this._loadData();
}
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 83c93a4ef..ff1c95d17 100644
--- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts
+++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts
@@ -1,7 +1,7 @@
-import { Comment, Point, Rectangle } from '@redaction/red-ui-http';
import { RedactionLogEntryWrapper } from './redaction-log-entry.wrapper';
import { annotationTypesTranslations } from '../../translations/annotation-types-translations';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
+import { IComment, IPoint, IRectangle } from '@red/domain';
export type AnnotationSuperType =
| 'add-dictionary'
@@ -29,8 +29,8 @@ export class AnnotationWrapper {
typeValue: string;
recategorizationType: string;
color: string;
- comments: Comment[] = [];
- firstTopLeftPoint: Point;
+ comments: IComment[] = [];
+ firstTopLeftPoint: IPoint;
annotationId: string;
shortContent: string;
content: string;
@@ -41,7 +41,7 @@ export class AnnotationWrapper {
redaction: boolean;
status: string;
dictionaryOperation: boolean;
- positions: Rectangle[];
+ positions: IRectangle[];
recommendationType: string;
legalBasisValue: string;
legalBasisChangeValue?: string;
diff --git a/apps/red-ui/src/app/models/file/file-data.model.ts b/apps/red-ui/src/app/models/file/file-data.model.ts
index 0658137e6..4a82bd0a4 100644
--- a/apps/red-ui/src/app/models/file/file-data.model.ts
+++ b/apps/red-ui/src/app/models/file/file-data.model.ts
@@ -1,10 +1,7 @@
-import { RedactionLog, RedactionLogEntry } from '@redaction/red-ui-http';
-import { File } from './file';
+import { Dictionary, File, IRedactionLog, IRedactionLogEntry, IViewedPage, User, ViewMode } from '@red/domain';
import { AnnotationWrapper } from './annotation.wrapper';
import { RedactionLogEntryWrapper } from './redaction-log-entry.wrapper';
-import { ViewMode } from './view-mode';
import * as moment from 'moment';
-import { Dictionary, IViewedPage, User } from '@red/domain';
export class AnnotationData {
visibleAnnotations: AnnotationWrapper[];
@@ -16,7 +13,7 @@ export class FileDataModel {
hasChangeLog: boolean;
- constructor(public file: File, public fileData: Blob, public redactionLog: RedactionLog, public viewedPages?: IViewedPage[]) {}
+ constructor(public file: File, public fileData: Blob, public redactionLog: IRedactionLog, public viewedPages?: IViewedPage[]) {}
getAnnotations(
dictionaryData: { [p: string]: Dictionary },
@@ -103,7 +100,7 @@ export class FileDataModel {
return result;
}
- private _isChangeLogEntry(redactionLogEntry: RedactionLogEntry, wrapper: RedactionLogEntryWrapper) {
+ private _isChangeLogEntry(redactionLogEntry: IRedactionLogEntry, wrapper: RedactionLogEntryWrapper) {
if (this.file.numberOfAnalyses > 1) {
redactionLogEntry.changes.sort((a, b) => moment(a.dateTime).valueOf() - moment(b.dateTime).valueOf());
diff --git a/apps/red-ui/src/app/models/file/file-type.ts b/apps/red-ui/src/app/models/file/file-type.ts
deleted file mode 100644
index 3087b0097..000000000
--- a/apps/red-ui/src/app/models/file/file-type.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export enum FileType {
- ORIGINAL = 'ORIGINAL',
- ANNOTATED = 'ANNOTATED',
- REDACTED = 'REDACTED',
- FLAT_REDACTED = 'FLAT_REDACTED',
-}
diff --git a/apps/red-ui/src/app/models/file/manual-annotation-response.ts b/apps/red-ui/src/app/models/file/manual-annotation-response.ts
index c19074328..d7f4c623d 100644
--- a/apps/red-ui/src/app/models/file/manual-annotation-response.ts
+++ b/apps/red-ui/src/app/models/file/manual-annotation-response.ts
@@ -1,11 +1,11 @@
import { ManualRedactionEntryWrapper } from './manual-redaction-entry.wrapper';
-import { ManualAddResponse } from '@redaction/red-ui-http';
+import { IManualAddResponse } from '@red/domain';
export class ManualAnnotationResponse {
annotationId;
commentId;
- constructor(public manualRedactionEntryWrapper: ManualRedactionEntryWrapper, public manualAddResponse: ManualAddResponse) {
+ constructor(public manualRedactionEntryWrapper: ManualRedactionEntryWrapper, public manualAddResponse: IManualAddResponse) {
this.annotationId = manualAddResponse?.annotationId ? manualAddResponse.annotationId : new Date().getTime();
this.commentId = manualAddResponse?.commentId ? manualAddResponse.commentId : new Date().getTime();
}
diff --git a/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts b/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts
index 05e31dc74..39714983c 100644
--- a/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts
+++ b/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts
@@ -1,9 +1,9 @@
-import { ManualRedactionEntry } from '@redaction/red-ui-http';
+import { IManualRedactionEntry } from '@red/domain';
export class ManualRedactionEntryWrapper {
constructor(
readonly quads: any,
- readonly manualRedactionEntry: ManualRedactionEntry,
+ readonly manualRedactionEntry: IManualRedactionEntry,
readonly type: 'DICTIONARY' | 'REDACTION' | 'FALSE_POSITIVE',
readonly annotationType: 'TEXT' | 'RECTANGLE' = 'TEXT',
readonly rectId?: string,
diff --git a/apps/red-ui/src/app/models/file/redaction-log-entry.wrapper.ts b/apps/red-ui/src/app/models/file/redaction-log-entry.wrapper.ts
index 8c7649645..251b5bd77 100644
--- a/apps/red-ui/src/app/models/file/redaction-log-entry.wrapper.ts
+++ b/apps/red-ui/src/app/models/file/redaction-log-entry.wrapper.ts
@@ -1,7 +1,7 @@
-import { Change, Comment, ILegalBasis, Rectangle } from '@redaction/red-ui-http';
+import { IChange, IComment, ILegalBasis, IRectangle } from '@red/domain';
export interface RedactionLogEntryWrapper {
- changes?: Array;
+ changes?: Array;
dossierDictionaryEntry?: boolean;
endOffset?: number;
excluded?: boolean;
@@ -19,7 +19,7 @@ export interface RedactionLogEntryWrapper {
manual?: boolean;
manualRedactionType?: 'ADD' | 'REMOVE' | 'UNDO' | 'LEGAL_BASIS_CHANGE' | 'FORCE_REDACT' | 'RECATEGORIZE';
matchedRule?: number;
- positions?: Array;
+ positions?: Array;
reason?: string;
redacted?: boolean;
section?: string;
@@ -29,7 +29,7 @@ export interface RedactionLogEntryWrapper {
textBefore?: string;
value?: string;
image?: boolean;
- legalBasisList?: Array;
+ legalBasisList?: ILegalBasis[];
recommendation?: boolean;
recommendationAnnotationId?: string;
@@ -37,7 +37,7 @@ export interface RedactionLogEntryWrapper {
hidden?: boolean;
userId?: string;
- comments?: Comment[];
+ comments?: IComment[];
isChangeLogEntry?: boolean;
changeLogType?: 'ADDED' | 'REMOVED' | 'CHANGED';
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html
index 477d76338..a056d7d3c 100644
--- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html
+++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html
@@ -3,7 +3,7 @@
{{ dialogHeader }}
-