From c1726b847296b14a299e75320d3d354aa4cf5227 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Thu, 7 Sep 2023 19:24:10 +0300 Subject: [PATCH] DM-358 - added all keys --- .../base-screen/base-screen.component.html | 4 +- .../annotation-actions.component.html | 3 + .../annotation-actions.component.ts | 7 ++- .../annotation-wrapper.component.ts | 15 +++-- .../file-workload.component.html | 4 +- ...component-management-dialog.component.html | 10 ++- .../file-actions/file-actions.component.ts | 2 - apps/red-ui/src/assets/config/config.json | 6 +- .../src/assets/help-mode/help-mode-keys.json | 61 +++++++++++++++++-- libs/common-ui | 2 +- 10 files changed, 89 insertions(+), 25 deletions(-) diff --git a/apps/red-ui/src/app/components/base-screen/base-screen.component.html b/apps/red-ui/src/app/components/base-screen/base-screen.component.html index 0cc8595f3..d26b35bc0 100644 --- a/apps/red-ui/src/app/components/base-screen/base-screen.component.html +++ b/apps/red-ui/src/app/components/base-screen/base-screen.component.html @@ -1,4 +1,4 @@ - +
@@ -25,7 +25,7 @@ [placeholder]="'search.placeholder' | translate" > - + @@ -44,6 +45,7 @@ [tooltipPosition]="tooltipPosition" [tooltip]="'annotation-actions.edit-redaction.label' | translate" [type]="buttonType" + [attr.help-mode-key]="helpModeKey('edit')" icon="iqser:edit" > @@ -143,6 +145,7 @@ [tooltipPosition]="tooltipPosition" [tooltip]="'annotation-actions.remove-annotation.remove-redaction' | translate" [type]="buttonType" + [attr.help-mode-key]="helpModeKey('remove')" icon="iqser:trash" > diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts index b368cea86..25a616f78 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts @@ -1,5 +1,5 @@ import { Component, computed, Input, OnChanges } from '@angular/core'; -import { HelpModeService, IqserPermissionsService } from '@iqser/common-ui'; +import { getConfig, HelpModeService, IqserPermissionsService } from '@iqser/common-ui'; import { AnnotationPermissions } from '@models/file/annotation.permissions'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { PermissionsService } from '@services/permissions.service'; @@ -30,6 +30,7 @@ export class AnnotationActionsComponent implements OnChanges { @Input() tooltipPosition: 'before' | 'above' = 'before'; @Input() canPerformAnnotationActions: boolean; @Input() alwaysVisible: boolean; + readonly #isDocumine = getConfig().IS_DOCUMINE; readonly roles = Roles; annotationPermissions: AnnotationPermissions; isImage = true; @@ -113,4 +114,8 @@ export class AnnotationActionsComponent implements OnChanges { this._iqserPermissionsService, ); } + + helpModeKey(action: string) { + return this.#isDocumine ? `${action}_annotation` : ''; + } } diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts index a8046088a..5ec1cb170 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts @@ -4,6 +4,7 @@ import { PdfProxyService } from '../../services/pdf-proxy.service'; import { ActionsHelpModeKeys } from '../../utils/constants'; import { ListItem } from '@models/file/list-item'; import { MultiSelectService } from '../../services/multi-select.service'; +import { getConfig } from '@iqser/common-ui'; @Component({ selector: 'redaction-annotation-wrapper', @@ -16,6 +17,7 @@ export class AnnotationWrapperComponent implements OnChanges { @HostBinding('attr.annotation-id') annotationId: string; @HostBinding('class.active') active = false; actionsHelpModeKey?: string; + readonly #isDocumine = getConfig().IS_DOCUMINE; protected readonly _pdfProxyService = inject(PdfProxyService); protected readonly _multiSelectService = inject(MultiSelectService); @@ -26,11 +28,14 @@ export class AnnotationWrapperComponent implements OnChanges { } #getActionsHelpModeKey(): string { - const type = this.annotation.item.typeLabel?.split('.')[1]; - const typeValue = this.annotation.item.typeValue; - if (type === 'hint' && (typeValue === 'ocr' || typeValue === 'formula' || typeValue === 'image')) { - return ActionsHelpModeKeys[`${type}-${typeValue}`]; + if (!this.#isDocumine) { + const type = this.annotation.item.typeLabel?.split('.')[1]; + const typeValue = this.annotation.item.typeValue; + if (type === 'hint' && (typeValue === 'ocr' || typeValue === 'formula' || typeValue === 'image')) { + return ActionsHelpModeKeys[`${type}-${typeValue}`]; + } + return ActionsHelpModeKeys[type]; } - return ActionsHelpModeKeys[type]; + return ''; } } diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html index 4b6a9beba..ab5ab8c6b 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html @@ -20,7 +20,7 @@
@@ -28,7 +28,7 @@

-
+
{{ 'rss-dialog.table-header.component' | translate }}
{{ 'rss-dialog.table-header.value' | translate }}
{{ 'rss-dialog.table-header.transformation-rule' | translate }}
{{ 'rss-dialog.table-header.annotation-references' | translate }}
- +
{{ entry.key }}
@@ -65,12 +67,14 @@ [label]="'rss-dialog.actions.export-json' | translate" [submit]="true" [type]="iconButtonTypes.primary" + [attr.help-mode-key]="'scm_export_DIALOG'" > btn.show)); - return actions.filter(btn => btn.show); } diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index 42bf5941f..2921a3b39 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -1,9 +1,9 @@ { "ADMIN_CONTACT_NAME": null, "ADMIN_CONTACT_URL": null, - "API_URL": "https://dan.iqser.cloud", + "API_URL": "https://frontend2.iqser.cloud", "APP_NAME": "RedactManager", - "IS_DOCUMINE": false, + "IS_DOCUMINE": true, "RULE_EDITOR_DEV_ONLY": false, "AUTO_READ_TIME": 3, "BACKEND_APP_VERSION": "4.4.40", @@ -13,7 +13,7 @@ "MAX_RETRIES_ON_SERVER_ERROR": 3, "OAUTH_CLIENT_ID": "redaction", "OAUTH_IDP_HINT": null, - "OAUTH_URL": "https://dan.iqser.cloud/auth", + "OAUTH_URL": "https://frontend2.iqser.cloud/auth", "RECENT_PERIOD_IN_HOURS": 24, "SELECTION_MODE": "structural", "MANUAL_BASE_URL": "https://docs.redactmanager.com/preview", diff --git a/apps/red-ui/src/assets/help-mode/help-mode-keys.json b/apps/red-ui/src/assets/help-mode/help-mode-keys.json index cc95a985c..9c7b9a9c5 100644 --- a/apps/red-ui/src/assets/help-mode/help-mode-keys.json +++ b/apps/red-ui/src/assets/help-mode/help-mode-keys.json @@ -440,27 +440,33 @@ }, { "elementKey": "dossier_delete_file", - "documentKey": "dossier_delete_file" + "documentKey": "dossier_delete_file", + "scrollableParentView": "VIRTUAL_SCROLL" }, { "elementKey": "dossier_assign_user", - "documentKey": "dossier_assign_user" + "documentKey": "dossier_assign_user", + "scrollableParentView": "VIRTUAL_SCROLL" }, { "elementKey": "dossier_change_status", - "documentKey": "dossier_change_status" + "documentKey": "dossier_change_status", + "scrollableParentView": "VIRTUAL_SCROLL" }, { "elementKey": "dossier_stop_analysis", - "documentKey": "dossier_stop_analysis" + "documentKey": "dossier_stop_analysis", + "scrollableParentView": "VIRTUAL_SCROLL" }, { "elementKey": "dossier_download", - "documentKey": "dossier_download" + "documentKey": "dossier_download", + "scrollableParentView": "VIRTUAL_SCROLL" }, { "elementKey": "dossier_disable_redaction", - "documentKey": "dossier_disable_redaction" + "documentKey": "dossier_disable_redaction", + "scrollableParentView": "VIRTUAL_SCROLL" }, { "elementKey": "workload_page_list", @@ -506,5 +512,48 @@ { "elementKey": "editor_close", "documentKey": "editor_close" + }, + { + "elementKey": "scm_edit_DIALOG", + "documentKey": "scm_edit", + "scrollableParentView": "SCM_EDIT_DIALOG" + }, + { + "elementKey": "scm_undo_DIALOG", + "documentKey": "scm_undo", + "scrollableParentView": "SCM_EDIT_DIALOG" + }, + { + "elementKey": "scm_export_DIALOG", + "documentKey": "scm_export", + "scrollableParentView": "SCM_EDIT_DIALOG" + }, + { + "elementKey": "resize_annotation", + "documentKey": "resize_annotation", + "scrollableParentView": "ANNOTATIONS_LIST", + "overlappingElements": ["USER_MENU", "WORKLOAD_FILTER", "DOCUMENT_INFO"] + }, + { + "elementKey": "edit_annotation", + "documentKey": "edit_annotation", + "scrollableParentView": "ANNOTATIONS_LIST", + "overlappingElements": ["USER_MENU", "WORKLOAD_FILTER", "DOCUMENT_INFO"] + }, + { + "elementKey": "remove_annotation", + "documentKey": "remove_annotation", + "scrollableParentView": "ANNOTATIONS_LIST", + "overlappingElements": ["USER_MENU", "WORKLOAD_FILTER", "DOCUMENT_INFO"] + }, + { + "elementKey": "workload_filter", + "documentKey": "workload_filter", + "overlappingElements": ["USER_MENU", "DOCUMENT_INFO"] + }, + { + "elementKey": "workload_bulk_selection", + "documentKey": "workload_bulk_selection", + "overlappingElements": ["USER_MENU", "DOCUMENT_INFO"] } ] diff --git a/libs/common-ui b/libs/common-ui index d4d593d24..da0e05772 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit d4d593d24ac4f99dc9455d05906ae37db3c19ac9 +Subproject commit da0e0577218fa268bd14e06db889f74b23508f75