DM-358 - added all keys

This commit is contained in:
Valentin Mihai 2023-09-07 19:24:10 +03:00
parent b170f0dffb
commit c1726b8472
10 changed files with 89 additions and 25 deletions

View File

@ -1,4 +1,4 @@
<iqser-help-mode *ngIf="!config.IS_DOCUMINE"></iqser-help-mode> <iqser-help-mode></iqser-help-mode>
<div class="top-bar"> <div class="top-bar">
<ng-template #menuPlaceholder> <ng-template #menuPlaceholder>
@ -25,7 +25,7 @@
[placeholder]="'search.placeholder' | translate" [placeholder]="'search.placeholder' | translate"
></redaction-spotlight-search> ></redaction-spotlight-search>
<iqser-help-button *ngIf="!config.IS_DOCUMINE" [attr.help-mode-key]="'help_mode'" id="help-mode-button"></iqser-help-button> <iqser-help-button [attr.help-mode-key]="'help_mode'" id="help-mode-button"></iqser-help-button>
<redaction-notifications <redaction-notifications
*ngIf="currentUser.isUser || currentUser.isManager" *ngIf="currentUser.isUser || currentUser.isManager"

View File

@ -30,6 +30,7 @@
[tooltipPosition]="tooltipPosition" [tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.resize.label' | translate" [tooltip]="'annotation-actions.resize.label' | translate"
[type]="buttonType" [type]="buttonType"
[attr.help-mode-key]="helpModeKey('resize')"
icon="red:resize" icon="red:resize"
></iqser-circle-button> ></iqser-circle-button>
@ -44,6 +45,7 @@
[tooltipPosition]="tooltipPosition" [tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.edit-redaction.label' | translate" [tooltip]="'annotation-actions.edit-redaction.label' | translate"
[type]="buttonType" [type]="buttonType"
[attr.help-mode-key]="helpModeKey('edit')"
icon="iqser:edit" icon="iqser:edit"
></iqser-circle-button> ></iqser-circle-button>
@ -143,6 +145,7 @@
[tooltipPosition]="tooltipPosition" [tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.remove-annotation.remove-redaction' | translate" [tooltip]="'annotation-actions.remove-annotation.remove-redaction' | translate"
[type]="buttonType" [type]="buttonType"
[attr.help-mode-key]="helpModeKey('remove')"
icon="iqser:trash" icon="iqser:trash"
></iqser-circle-button> ></iqser-circle-button>
</ng-container> </ng-container>

View File

@ -1,5 +1,5 @@
import { Component, computed, Input, OnChanges } from '@angular/core'; 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 { AnnotationPermissions } from '@models/file/annotation.permissions';
import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { AnnotationWrapper } from '@models/file/annotation.wrapper';
import { PermissionsService } from '@services/permissions.service'; import { PermissionsService } from '@services/permissions.service';
@ -30,6 +30,7 @@ export class AnnotationActionsComponent implements OnChanges {
@Input() tooltipPosition: 'before' | 'above' = 'before'; @Input() tooltipPosition: 'before' | 'above' = 'before';
@Input() canPerformAnnotationActions: boolean; @Input() canPerformAnnotationActions: boolean;
@Input() alwaysVisible: boolean; @Input() alwaysVisible: boolean;
readonly #isDocumine = getConfig().IS_DOCUMINE;
readonly roles = Roles; readonly roles = Roles;
annotationPermissions: AnnotationPermissions; annotationPermissions: AnnotationPermissions;
isImage = true; isImage = true;
@ -113,4 +114,8 @@ export class AnnotationActionsComponent implements OnChanges {
this._iqserPermissionsService, this._iqserPermissionsService,
); );
} }
helpModeKey(action: string) {
return this.#isDocumine ? `${action}_annotation` : '';
}
} }

View File

@ -4,6 +4,7 @@ import { PdfProxyService } from '../../services/pdf-proxy.service';
import { ActionsHelpModeKeys } from '../../utils/constants'; import { ActionsHelpModeKeys } from '../../utils/constants';
import { ListItem } from '@models/file/list-item'; import { ListItem } from '@models/file/list-item';
import { MultiSelectService } from '../../services/multi-select.service'; import { MultiSelectService } from '../../services/multi-select.service';
import { getConfig } from '@iqser/common-ui';
@Component({ @Component({
selector: 'redaction-annotation-wrapper', selector: 'redaction-annotation-wrapper',
@ -16,6 +17,7 @@ export class AnnotationWrapperComponent implements OnChanges {
@HostBinding('attr.annotation-id') annotationId: string; @HostBinding('attr.annotation-id') annotationId: string;
@HostBinding('class.active') active = false; @HostBinding('class.active') active = false;
actionsHelpModeKey?: string; actionsHelpModeKey?: string;
readonly #isDocumine = getConfig().IS_DOCUMINE;
protected readonly _pdfProxyService = inject(PdfProxyService); protected readonly _pdfProxyService = inject(PdfProxyService);
protected readonly _multiSelectService = inject(MultiSelectService); protected readonly _multiSelectService = inject(MultiSelectService);
@ -26,6 +28,7 @@ export class AnnotationWrapperComponent implements OnChanges {
} }
#getActionsHelpModeKey(): string { #getActionsHelpModeKey(): string {
if (!this.#isDocumine) {
const type = this.annotation.item.typeLabel?.split('.')[1]; const type = this.annotation.item.typeLabel?.split('.')[1];
const typeValue = this.annotation.item.typeValue; const typeValue = this.annotation.item.typeValue;
if (type === 'hint' && (typeValue === 'ocr' || typeValue === 'formula' || typeValue === 'image')) { if (type === 'hint' && (typeValue === 'ocr' || typeValue === 'formula' || typeValue === 'image')) {
@ -33,4 +36,6 @@ export class AnnotationWrapperComponent implements OnChanges {
} }
return ActionsHelpModeKeys[type]; return ActionsHelpModeKeys[type];
} }
return '';
}
} }

View File

@ -20,7 +20,7 @@
<div <div
(click)="multiSelectService.activate()" (click)="multiSelectService.activate()"
*ngIf="multiSelectService.enabled() && multiSelectService.inactive()" *ngIf="multiSelectService.enabled() && multiSelectService.inactive()"
[attr.help-mode-key]="'workload_in_editor'" [attr.help-mode-key]="'workload_bulk_selection'"
class="all-caps-label primary pointer" class="all-caps-label primary pointer"
translate="file-preview.tabs.annotations.select" translate="file-preview.tabs.annotations.select"
></div> ></div>
@ -28,7 +28,7 @@
<iqser-popup-filter <iqser-popup-filter
*ngIf="documentInfoService.hidden()" *ngIf="documentInfoService.hidden()"
[actionsTemplate]="annotationFilterActionTemplate" [actionsTemplate]="annotationFilterActionTemplate"
[attr.help-mode-key]="'workload_in_editor'" [attr.help-mode-key]="'workload_filter'"
[fileId]="state.file()?.id" [fileId]="state.file()?.id"
[primaryFiltersSlug]="'primaryFilters'" [primaryFiltersSlug]="'primaryFilters'"
[secondaryFiltersSlug]="'secondaryFilters'" [secondaryFiltersSlug]="'secondaryFilters'"

View File

@ -2,7 +2,7 @@
<div [translate]="'rss-dialog.title'" class="dialog-header heading-l"></div> <div [translate]="'rss-dialog.title'" class="dialog-header heading-l"></div>
<hr /> <hr />
<div class="dialog-content"> <div class="dialog-content" id="scm-edit">
<div *ngIf="scmData() as scmEntry" class="table output-data"> <div *ngIf="scmData() as scmEntry" class="table output-data">
<div class="table-header">{{ 'rss-dialog.table-header.component' | translate }}</div> <div class="table-header">{{ 'rss-dialog.table-header.component' | translate }}</div>
<div class="table-header">{{ 'rss-dialog.table-header.value' | translate }}</div> <div class="table-header">{{ 'rss-dialog.table-header.value' | translate }}</div>
@ -21,6 +21,7 @@
[parentId]="getValueCellId(index)" [parentId]="getValueCellId(index)"
[saveTooltip]="'rss-dialog.actions.save' | translate" [saveTooltip]="'rss-dialog.actions.save' | translate"
[value]="entry.value.value ?? entry.value.originalValue" [value]="entry.value.value ?? entry.value.originalValue"
[helpModeKey]="'scm_edit_DIALOG'"
> >
<ng-container slot="editing"> <ng-container slot="editing">
<iqser-circle-button <iqser-circle-button
@ -28,6 +29,7 @@
*ngIf="entry.value.value && canEdit" *ngIf="entry.value.value && canEdit"
[showDot]="true" [showDot]="true"
[tooltip]="'rss-dialog.actions.undo' | translate: { value: entry.value.originalValue } | replaceNbsp" [tooltip]="'rss-dialog.actions.undo' | translate: { value: entry.value.originalValue } | replaceNbsp"
[attr.help-mode-key]="'scm_undo_DIALOG'"
class="ml-2" class="ml-2"
icon="red:undo" icon="red:undo"
></iqser-circle-button> ></iqser-circle-button>
@ -65,12 +67,14 @@
[label]="'rss-dialog.actions.export-json' | translate" [label]="'rss-dialog.actions.export-json' | translate"
[submit]="true" [submit]="true"
[type]="iconButtonTypes.primary" [type]="iconButtonTypes.primary"
[attr.help-mode-key]="'scm_export_DIALOG'"
></iqser-icon-button> ></iqser-icon-button>
<iqser-icon-button <iqser-icon-button
(action)="exportXML()" (action)="exportXML()"
[label]="'rss-dialog.actions.export-xml' | translate" [label]="'rss-dialog.actions.export-xml' | translate"
[type]="iconButtonTypes.primary" [type]="iconButtonTypes.primary"
[attr.help-mode-key]="'scm_export_DIALOG'"
></iqser-icon-button> ></iqser-icon-button>
<iqser-icon-button <iqser-icon-button

View File

@ -276,8 +276,6 @@ export class FileActionsComponent implements OnChanges {
}, },
]; ];
console.log(actions.filter(btn => btn.show));
return actions.filter(btn => btn.show); return actions.filter(btn => btn.show);
} }

View File

@ -1,9 +1,9 @@
{ {
"ADMIN_CONTACT_NAME": null, "ADMIN_CONTACT_NAME": null,
"ADMIN_CONTACT_URL": null, "ADMIN_CONTACT_URL": null,
"API_URL": "https://dan.iqser.cloud", "API_URL": "https://frontend2.iqser.cloud",
"APP_NAME": "RedactManager", "APP_NAME": "RedactManager",
"IS_DOCUMINE": false, "IS_DOCUMINE": true,
"RULE_EDITOR_DEV_ONLY": false, "RULE_EDITOR_DEV_ONLY": false,
"AUTO_READ_TIME": 3, "AUTO_READ_TIME": 3,
"BACKEND_APP_VERSION": "4.4.40", "BACKEND_APP_VERSION": "4.4.40",
@ -13,7 +13,7 @@
"MAX_RETRIES_ON_SERVER_ERROR": 3, "MAX_RETRIES_ON_SERVER_ERROR": 3,
"OAUTH_CLIENT_ID": "redaction", "OAUTH_CLIENT_ID": "redaction",
"OAUTH_IDP_HINT": null, "OAUTH_IDP_HINT": null,
"OAUTH_URL": "https://dan.iqser.cloud/auth", "OAUTH_URL": "https://frontend2.iqser.cloud/auth",
"RECENT_PERIOD_IN_HOURS": 24, "RECENT_PERIOD_IN_HOURS": 24,
"SELECTION_MODE": "structural", "SELECTION_MODE": "structural",
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview", "MANUAL_BASE_URL": "https://docs.redactmanager.com/preview",

View File

@ -440,27 +440,33 @@
}, },
{ {
"elementKey": "dossier_delete_file", "elementKey": "dossier_delete_file",
"documentKey": "dossier_delete_file" "documentKey": "dossier_delete_file",
"scrollableParentView": "VIRTUAL_SCROLL"
}, },
{ {
"elementKey": "dossier_assign_user", "elementKey": "dossier_assign_user",
"documentKey": "dossier_assign_user" "documentKey": "dossier_assign_user",
"scrollableParentView": "VIRTUAL_SCROLL"
}, },
{ {
"elementKey": "dossier_change_status", "elementKey": "dossier_change_status",
"documentKey": "dossier_change_status" "documentKey": "dossier_change_status",
"scrollableParentView": "VIRTUAL_SCROLL"
}, },
{ {
"elementKey": "dossier_stop_analysis", "elementKey": "dossier_stop_analysis",
"documentKey": "dossier_stop_analysis" "documentKey": "dossier_stop_analysis",
"scrollableParentView": "VIRTUAL_SCROLL"
}, },
{ {
"elementKey": "dossier_download", "elementKey": "dossier_download",
"documentKey": "dossier_download" "documentKey": "dossier_download",
"scrollableParentView": "VIRTUAL_SCROLL"
}, },
{ {
"elementKey": "dossier_disable_redaction", "elementKey": "dossier_disable_redaction",
"documentKey": "dossier_disable_redaction" "documentKey": "dossier_disable_redaction",
"scrollableParentView": "VIRTUAL_SCROLL"
}, },
{ {
"elementKey": "workload_page_list", "elementKey": "workload_page_list",
@ -506,5 +512,48 @@
{ {
"elementKey": "editor_close", "elementKey": "editor_close",
"documentKey": "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"]
} }
] ]

@ -1 +1 @@
Subproject commit d4d593d24ac4f99dc9455d05906ae37db3c19ac9 Subproject commit da0e0577218fa268bd14e06db889f74b23508f75