RED-6510 - WIP on "Lazy load help mode elements"
This commit is contained in:
parent
666c80afb6
commit
8810f62eba
@ -10,6 +10,7 @@ import {
|
||||
CircleButtonComponent,
|
||||
CommonUiModule,
|
||||
EmptyStateComponent,
|
||||
HelpModeKey,
|
||||
HiddenActionDirective,
|
||||
IconButtonComponent,
|
||||
InputWithActionComponent,
|
||||
@ -50,7 +51,7 @@ import { REDMissingTranslationHandler } from '@utils/missing-translations-handle
|
||||
import { ConfigService } from '@services/config.service';
|
||||
import { SpotlightSearchComponent } from '@components/spotlight-search/spotlight-search.component';
|
||||
import { DatePipe } from '@shared/pipes/date.pipe';
|
||||
import * as helpDocs from '../assets/help-mode/keys.json';
|
||||
import * as helpModeKeys from '../assets/help-mode/help-mode-keys.json';
|
||||
import { BreadcrumbsComponent } from '@components/breadcrumbs/breadcrumbs.component';
|
||||
import { UserPreferenceService } from '@users/user-preference.service';
|
||||
import { UserService } from '@users/user.service';
|
||||
@ -99,7 +100,7 @@ export const appModuleFactory = (config: AppConfig) => {
|
||||
existingRoleGuard: RedRoleGuard,
|
||||
}),
|
||||
CachingModule.forRoot(UI_CACHES),
|
||||
IqserHelpModeModule.forRoot(helpDocs as any),
|
||||
IqserHelpModeModule.forRoot(helpModeKeys as HelpModeKey[]),
|
||||
PdfViewerModule,
|
||||
ToastrModule.forRoot({
|
||||
closeButton: true,
|
||||
|
||||
@ -93,7 +93,7 @@
|
||||
></iqser-icon-button>
|
||||
<iqser-help-button
|
||||
*deny="roles.getRss; if: !!dossierTemplate"
|
||||
helpButtonKey="edit_clone_delete_dossier_templates"
|
||||
[helpButtonKey]="'edit_clone_delete_dossier_templates'"
|
||||
></iqser-help-button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
[submit]="true"
|
||||
[type]="iconButtonTypes.primary"
|
||||
></iqser-icon-button>
|
||||
<iqser-help-button *deny="roles.getRss" helpButtonKey="create_new_entity"></iqser-help-button>
|
||||
<iqser-help-button *deny="roles.getRss" [helpButtonKey]="'create_new_entity'"></iqser-help-button>
|
||||
</div>
|
||||
|
||||
<iqser-circle-button (action)="close()" class="dialog-close" icon="iqser:close"></iqser-circle-button>
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
<div (click)="revert()" [translate]="'entity.info.actions.revert'" class="all-caps-label cancel"></div>
|
||||
|
||||
<iqser-help-button *deny="roles.getRss" helpButtonKey="edit_delete_entities"></iqser-help-button>
|
||||
<iqser-help-button *deny="roles.getRss" [helpButtonKey]="'edit_delete_entities'"></iqser-help-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -31,7 +31,6 @@ export class LicenseScreenComponent {
|
||||
type: IconButtonTypes.primary,
|
||||
helpModeKey: 'license_information',
|
||||
hide: !this.permissionsService.has(ROLES.license.readReport),
|
||||
overlappingElements: [OverlappingElements.USER_MENU],
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@ -63,7 +63,6 @@ export class UserListingScreenComponent extends ListingComponent<User> implement
|
||||
icon: 'iqser:plus',
|
||||
disabled$: this._userService.currentUser$.pipe(map(user => !user.isAdmin)),
|
||||
helpModeKey: 'create_user',
|
||||
overlappingElements: [OverlappingElements.USER_MENU],
|
||||
},
|
||||
];
|
||||
collapsedDetails = false;
|
||||
|
||||
@ -162,7 +162,6 @@ export class ConfigService {
|
||||
icon: 'iqser:edit',
|
||||
hide: !this.#currentUser.isManager && !this._iqserPermissionsService.has(ROLES.dossiers.edit),
|
||||
helpModeKey: 'edit_dossier_in_dossier',
|
||||
overlappingElements: [OverlappingElements.USER_MENU],
|
||||
disabled$,
|
||||
},
|
||||
];
|
||||
|
||||
@ -73,7 +73,6 @@ export class ConfigService {
|
||||
icon: 'iqser:plus',
|
||||
type: 'primary',
|
||||
helpModeKey: 'new_dossier_button',
|
||||
overlappingElements: [OverlappingElements.USER_MENU],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { Component, HostBinding, Input, OnChanges } from '@angular/core';
|
||||
import { AnnotationWrapper } from '@models/file/annotation.wrapper';
|
||||
import { PdfProxyService } from '../../services/pdf-proxy.service';
|
||||
import { ScrollableParentViews } from '@iqser/common-ui';
|
||||
import { ActionsHelpModeKeys } from '../../utils/constants';
|
||||
import { ListItem } from '@models/file/list-item';
|
||||
|
||||
@ -15,7 +14,6 @@ export class AnnotationWrapperComponent implements OnChanges {
|
||||
|
||||
@HostBinding('attr.annotation-id') annotationId: string;
|
||||
@HostBinding('class.active') active = false;
|
||||
readonly scrollableParentView = ScrollableParentViews.ANNOTATIONS_LIST;
|
||||
actionsHelpModeKey?: string;
|
||||
|
||||
constructor(readonly pdfProxyService: PdfProxyService) {}
|
||||
|
||||
@ -10,9 +10,7 @@ import {
|
||||
IqserPermissionsService,
|
||||
IqserTooltipPositions,
|
||||
LoadingService,
|
||||
OverlappingElements,
|
||||
ScrollableParentView,
|
||||
ScrollableParentViews,
|
||||
TenantContextHolder,
|
||||
Toaster,
|
||||
} from '@iqser/common-ui';
|
||||
@ -109,10 +107,6 @@ export class FileActionsComponent implements OnChanges {
|
||||
return !!this._expandableActionsComponent?.expanded;
|
||||
}
|
||||
|
||||
get overlappingElements() {
|
||||
return this.fileActionsHelpModeKey === 'editor_document_features' ? [OverlappingElements.USER_MENU] : [];
|
||||
}
|
||||
|
||||
private get _toggleTooltip(): string {
|
||||
if (!this.canToggleAnalysis) {
|
||||
return _('file-preview.toggle-analysis.only-managers');
|
||||
@ -285,12 +279,8 @@ export class FileActionsComponent implements OnChanges {
|
||||
return actions.filter(btn => btn.show);
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
ngOnChanges() {
|
||||
this._setup();
|
||||
if (changes.fileActionsHelpModeKey) {
|
||||
this.scrollableParentView =
|
||||
this.fileActionsHelpModeKey === 'document_features_in_dossier' ? ScrollableParentViews.VIRTUAL_SCROLL : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
async setFileApproved() {
|
||||
|
||||
@ -35,10 +35,6 @@ export class DossierNameColumnComponent {
|
||||
return this._dueDateDaysDiff < 0;
|
||||
}
|
||||
|
||||
get scrollableParentView(): ScrollableParentView {
|
||||
return ScrollableParentViews.VIRTUAL_SCROLL;
|
||||
}
|
||||
|
||||
private get _dueDateDaysDiff(): number {
|
||||
return dayjs(this.dossier.dueDate).diff(dateWithoutTime(dayjs()), 'day');
|
||||
}
|
||||
|
||||
@ -61,8 +61,4 @@ export class FileNameColumnComponent extends ContextComponent<FileNameColumnCont
|
||||
}
|
||||
this.#reloadAttribute.next(null);
|
||||
}
|
||||
|
||||
get scrollableParentView(): ScrollableParentView {
|
||||
return ScrollableParentViews.VIRTUAL_SCROLL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"ADMIN_CONTACT_NAME": null,
|
||||
"ADMIN_CONTACT_URL": null,
|
||||
"API_URL": "https://dan.iqser.cloud/redaction-gateway-v1",
|
||||
"API_URL": "https://dom2.iqser.cloud/redaction-gateway-v1",
|
||||
"APP_NAME": "RedactManager",
|
||||
"AUTO_READ_TIME": 3,
|
||||
"BACKEND_APP_VERSION": "4.4.40",
|
||||
@ -11,7 +11,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://dom2.iqser.cloud/auth",
|
||||
"RECENT_PERIOD_IN_HOURS": 24,
|
||||
"SELECTION_MODE": "structural",
|
||||
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview",
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 4aef8c608d1566adf63255e21e706a86802b30c8
|
||||
Subproject commit 5c442ced9f37bb50778371c6e01a352f52a2f0a5
|
||||
Loading…
x
Reference in New Issue
Block a user