diff --git a/src/lib/help-mode/help-mode.service.ts b/src/lib/help-mode/help-mode.service.ts index 287a047..f8b2ec8 100644 --- a/src/lib/help-mode/help-mode.service.ts +++ b/src/lib/help-mode/help-mode.service.ts @@ -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 = document.getElementById(scrollableElementId); if (!scrollableElement) { diff --git a/src/lib/help-mode/utils/constants.ts b/src/lib/help-mode/utils/constants.ts index 0f9190e..64b132f 100644 --- a/src/lib/help-mode/utils/constants.ts +++ b/src/lib/help-mode/utils/constants.ts @@ -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; diff --git a/src/lib/inputs/editable-input/editable-input.component.html b/src/lib/inputs/editable-input/editable-input.component.html index 1cb24cb..fe31cc8 100644 --- a/src/lib/inputs/editable-input/editable-input.component.html +++ b/src/lib/inputs/editable-input/editable-input.component.html @@ -9,6 +9,7 @@ (action)="editing = true" [tooltip]="editTooltip" [type]="buttonsType" + [attr.help-mode-key]="helpModeKey" class="edit-button" icon="iqser:edit" > diff --git a/src/lib/inputs/editable-input/editable-input.component.ts b/src/lib/inputs/editable-input/editable-input.component.ts index bec7a5a..b7deeb9 100644 --- a/src/lib/inputs/editable-input/editable-input.component.ts +++ b/src/lib/inputs/editable-input/editable-input.component.ts @@ -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(); parentDimensions?: { width: number; height: number }; newValue = '';