DM-358 - added all keys

This commit is contained in:
Valentin Mihai 2023-09-07 19:23:36 +03:00
parent d4d593d24a
commit da0e057721
4 changed files with 11 additions and 6 deletions

View File

@ -5,16 +5,15 @@ import { BehaviorSubject, firstValueFrom } from 'rxjs';
import { HelpModeDialogComponent } from './help-mode-dialog/help-mode-dialog.component';
import { HELP_MODE_KEYS, MANUAL_BASE_URL } from './tokens';
import {
ANNOTATIONS_LIST_ID,
HELP_HIGHLIGHT_CLASS,
HELP_MODE_CLASS,
OVERLAPPING_DROPDOWNS_IDS,
OverlappingElement,
PDF_TRON_IFRAME_ID,
SCROLL_BUTTONS_IDS,
SCROLLABLE_PARENT_VIEWS_IDS,
ScrollableParentView,
ScrollableParentViews,
VIRTUAL_SCROLL_ID,
WEB_VIEWER_ELEMENTS,
} from './utils/constants';
@ -174,8 +173,7 @@ export class HelpModeService {
}
if (helper.scrollableParentView) {
const scrollableElementId =
helper.scrollableParentView === ScrollableParentViews.VIRTUAL_SCROLL ? VIRTUAL_SCROLL_ID : ANNOTATIONS_LIST_ID;
const scrollableElementId = SCROLLABLE_PARENT_VIEWS_IDS[helper.scrollableParentView];
const scrollableElement: HTMLElement = <HTMLElement>document.getElementById(scrollableElementId);
if (!scrollableElement) {

View File

@ -1,5 +1,3 @@
export const VIRTUAL_SCROLL_ID = 'virtual-scroll';
export const ANNOTATIONS_LIST_ID = 'annotations-list';
export const OVERLAPPING_DROPDOWNS_IDS = {
USER_MENU: 'user-menu-items',
WORKLOAD_FILTER: 'workload-filters',
@ -18,6 +16,13 @@ export const WEB_VIEWER_ELEMENTS = [
export const ScrollableParentViews = {
VIRTUAL_SCROLL: 'VIRTUAL_SCROLL',
ANNOTATIONS_LIST: 'ANNOTATIONS_LIST',
SCM_EDIT_DIALOG: 'SCM_EDIT_DIALOG',
} as const;
export const SCROLLABLE_PARENT_VIEWS_IDS = {
VIRTUAL_SCROLL: 'virtual-scroll',
ANNOTATIONS_LIST: 'annotations-list',
SCM_EDIT_DIALOG: 'scm-edit',
} as const;
export type ScrollableParentView = keyof typeof ScrollableParentViews;

View File

@ -9,6 +9,7 @@
(action)="editing = true"
[tooltip]="editTooltip"
[type]="buttonsType"
[attr.help-mode-key]="helpModeKey"
class="edit-button"
icon="iqser:edit"
></iqser-circle-button>

View File

@ -23,6 +23,7 @@ export class EditableInputComponent implements OnChanges {
@Input() showPreview = true;
@Input() canEdit = true;
@Input() buttonsType: CircleButtonType = CircleButtonTypes.default;
@Input() helpModeKey: string = '';
@Output() readonly save = new EventEmitter<string>();
parentDimensions?: { width: number; height: number };
newValue = '';