Merge branch 'VM/DM-358' into unprotected
This commit is contained in:
commit
f0c51915b2
@ -9,4 +9,9 @@
|
||||
background: rgba(92, 229, 148, 0.5);
|
||||
box-shadow: 0 0 0 2px var(--iqser-helpmode-primary) inset;
|
||||
cursor: help;
|
||||
|
||||
&.documine-theme {
|
||||
background: rgba(253, 189, 0, 0.5);
|
||||
box-shadow: 0 0 0 2px var(--iqser-yellow-2) inset;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,18 +5,19 @@ 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,
|
||||
DOCUMINE_THEME_CLASS,
|
||||
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';
|
||||
import { getConfig } from '../services';
|
||||
|
||||
export interface Helper {
|
||||
readonly element: HTMLElement;
|
||||
@ -43,6 +44,7 @@ export class HelpModeService {
|
||||
readonly #helpModeDialogIsOpened$ = new BehaviorSubject(false);
|
||||
readonly helpModeDialogIsOpened$ = this.#helpModeDialogIsOpened$.asObservable();
|
||||
readonly #renderer: Renderer2;
|
||||
readonly #isDocumine = getConfig().IS_DOCUMINE;
|
||||
#helpers: Record<string, Helper> = {};
|
||||
#dialogMode = false;
|
||||
|
||||
@ -138,6 +140,9 @@ export class HelpModeService {
|
||||
this.#renderer.setAttribute(helperElement, 'href', this.generateDocsLink(key));
|
||||
this.#renderer.setAttribute(helperElement, 'target', '_blank');
|
||||
this.#renderer.addClass(helperElement, HELP_MODE_CLASS);
|
||||
if (this.#isDocumine) {
|
||||
this.#renderer.addClass(helperElement, DOCUMINE_THEME_CLASS);
|
||||
}
|
||||
return helperElement;
|
||||
}
|
||||
|
||||
@ -174,8 +179,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) {
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
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',
|
||||
DOCUMENT_INFO: 'document-info',
|
||||
BREADCRUMBS_MENU: 'breadcrumbs-menu-items',
|
||||
};
|
||||
export const SCROLL_BUTTONS_IDS = ['scroll-up', 'scroll-down'];
|
||||
export const PDF_TRON_IFRAME_ID = 'webviewer-1';
|
||||
@ -17,6 +16,15 @@ export const WEB_VIEWER_ELEMENTS = [
|
||||
export const ScrollableParentViews = {
|
||||
VIRTUAL_SCROLL: 'VIRTUAL_SCROLL',
|
||||
ANNOTATIONS_LIST: 'ANNOTATIONS_LIST',
|
||||
SCM_EDIT_DIALOG: 'SCM_EDIT_DIALOG',
|
||||
WORKFLOW_VIEW: 'WORKFLOW_VIEW',
|
||||
} as const;
|
||||
|
||||
export const SCROLLABLE_PARENT_VIEWS_IDS = {
|
||||
VIRTUAL_SCROLL: 'virtual-scroll',
|
||||
ANNOTATIONS_LIST: 'annotations-list',
|
||||
SCM_EDIT_DIALOG: 'scm-edit',
|
||||
WORKFLOW_VIEW: 'workflow-view',
|
||||
} as const;
|
||||
|
||||
export type ScrollableParentView = keyof typeof ScrollableParentViews;
|
||||
@ -25,9 +33,11 @@ export const OverlappingElements = {
|
||||
USER_MENU: 'USER_MENU',
|
||||
WORKLOAD_FILTER: 'WORKLOAD_FILTER',
|
||||
DOCUMENT_INFO: 'DOCUMENT_INFO',
|
||||
BREADCRUMBS_MENU: 'BREADCRUMBS_MENU',
|
||||
} as const;
|
||||
|
||||
export type OverlappingElement = keyof typeof OverlappingElements;
|
||||
|
||||
export const HELP_MODE_CLASS = 'help-mode';
|
||||
export const DOCUMINE_THEME_CLASS = 'documine-theme';
|
||||
export const HELP_HIGHLIGHT_CLASS = 'help-highlight';
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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 = '';
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
*ngIf="showCloseButton"
|
||||
[class.ml-6]="actionConfigs"
|
||||
[icon]="'iqser:close'"
|
||||
[attr.help-mode-key]="'edit_dossier_in_dossier'"
|
||||
[attr.help-mode-key]="'close_dossier'"
|
||||
[tooltip]="'common.close' | translate"
|
||||
></iqser-circle-button>
|
||||
</div>
|
||||
|
||||
@ -40,7 +40,7 @@ export class PageHeaderComponent<T extends IListable> {
|
||||
) {}
|
||||
|
||||
get filterHelpModeKey() {
|
||||
return this.helpModeKey ? `filter_${this.helpModeKey}_list` : '';
|
||||
return this.helpModeKey ? (this.helpModeKey === 'dossier' ? 'filter_dossier_list' : 'filter_documents') : '';
|
||||
}
|
||||
|
||||
get #showResetFilters$(): Observable<boolean> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user