other updates

This commit is contained in:
Dan Percic 2023-08-26 00:06:41 +03:00
parent ed42348df9
commit 36d9edc5b6
5 changed files with 1784 additions and 2328 deletions

View File

@ -1,10 +1,24 @@
import { BrowserModule } from '@angular/platform-browser';
import { ENVIRONMENT_INITIALIZER, ErrorHandler, inject, NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { DatePipe as BaseDatePipe } from '@angular/common';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { ENVIRONMENT_INITIALIZER, ErrorHandler, inject, NgModule } from '@angular/core';
import { MatDividerModule } from '@angular/material/divider';
import { MAT_TOOLTIP_DEFAULT_OPTIONS } from '@angular/material/tooltip';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ServiceWorkerModule } from '@angular/service-worker';
import { AuthErrorComponent } from '@components/auth-error/auth-error.component';
import { BaseScreenComponent } from '@components/base-screen/base-screen.component';
import { MissingTranslationHandler } from '@ngx-translate/core';
import { BreadcrumbsComponent } from '@components/breadcrumbs/breadcrumbs.component';
import { DownloadsListScreenComponent } from '@components/downloads-list-screen/downloads-list-screen.component';
import { NotificationsComponent } from '@components/notifications/notifications.component';
import { DashboardSkeletonComponent } from '@components/skeleton/dashboard-skeleton/dashboard-skeleton.component';
import { DossierSkeletonComponent } from '@components/skeleton/dossier-skeleton/dossier-skeleton.component';
import { SkeletonStatsComponent } from '@components/skeleton/skeleton-stats/skeleton-stats.component';
import { SkeletonTopBarComponent } from '@components/skeleton/skeleton-top-bar/skeleton-top-bar.component';
import { SpotlightSearchComponent } from '@components/spotlight-search/spotlight-search.component';
import { TenantsMenuComponent } from '@components/tenants-menu/tenants-menu.component';
import { UserMenuComponent } from '@components/user-menu/user-menu.component';
import { environment } from '@environments/environment';
import {
CachingModule,
ChevronButtonComponent,
@ -27,47 +41,33 @@ import {
ServerErrorInterceptor,
StopPropagationDirective,
} from '@iqser/common-ui';
import { ToastrModule } from 'ngx-toastr';
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '@environments/environment';
import { AuthErrorComponent } from '@components/auth-error/auth-error.component';
import { NotificationsComponent } from '@components/notifications/notifications.component';
import { DashboardSkeletonComponent } from '@components/skeleton/dashboard-skeleton/dashboard-skeleton.component';
import { DownloadsListScreenComponent } from '@components/downloads-list-screen/downloads-list-screen.component';
import { AppRoutingModule } from './app-routing.module';
import { SharedModule } from '@shared/shared.module';
import { FileUploadDownloadModule } from '@upload-download/file-upload-download.module';
import { DatePipe as BaseDatePipe } from '@angular/common';
import { ACTIVE_DOSSIERS_SERVICE, ARCHIVED_DOSSIERS_SERVICE } from './tokens';
import { MonacoEditorModule } from '@materia-ui/ngx-monaco-editor';
import { GlobalErrorHandler } from '@services/global-error-handler.service';
import { REDMissingTranslationHandler } from '@utils/missing-translations-handler';
import { ConfigService } from '@services/config.service';
import { SpotlightSearchComponent } from '@components/spotlight-search/spotlight-search.component';
import { DatePipe } from '@shared/pipes/date.pipe';
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';
import { ActiveDossiersService } from '@services/dossiers/active-dossiers.service';
import { ArchivedDossiersService } from '@services/dossiers/archived-dossiers.service';
import { MAT_TOOLTIP_DEFAULT_OPTIONS } from '@angular/material/tooltip';
import { LoggerModule, NgxLoggerLevel, TOKEN_LOGGER_CONFIG, TOKEN_LOGGER_RULES_SERVICE } from 'ngx-logger';
import { LoggerRulesService } from '@services/logger-rules.service';
import { AppConfig, ILoggerConfig } from '@red/domain';
import { PdfViewerModule } from './modules/pdf-viewer/pdf-viewer.module';
import { UI_CACHES } from '@utils/constants';
import { RedRoleGuard } from '@users/red-role.guard';
import { SkeletonTopBarComponent } from '@components/skeleton/skeleton-top-bar/skeleton-top-bar.component';
import { DossierSkeletonComponent } from '@components/skeleton/dossier-skeleton/dossier-skeleton.component';
import { SkeletonStatsComponent } from '@components/skeleton/skeleton-stats/skeleton-stats.component';
import { UserMenuComponent } from '@components/user-menu/user-menu.component';
import { TenantsMenuComponent } from '@components/tenants-menu/tenants-menu.component';
import { MatDividerModule } from '@angular/material/divider';
import { IqserUsersModule } from '@iqser/common-ui/lib/users';
import { CommonUiModule } from '@iqser/common-ui/lib/common-ui.module';
import { LogoComponent, SkeletonComponent, ToastComponent } from '@iqser/common-ui/lib/shared';
import { TenantPipe, TenantsModule } from '@iqser/common-ui/lib/tenants';
import { IqserUsersModule } from '@iqser/common-ui/lib/users';
import { MonacoEditorModule } from '@materia-ui/ngx-monaco-editor';
import { MissingTranslationHandler } from '@ngx-translate/core';
import { AppConfig, ILoggerConfig } from '@red/domain';
import { ConfigService } from '@services/config.service';
import { ActiveDossiersService } from '@services/dossiers/active-dossiers.service';
import { ArchivedDossiersService } from '@services/dossiers/archived-dossiers.service';
import { GlobalErrorHandler } from '@services/global-error-handler.service';
import { LoggerRulesService } from '@services/logger-rules.service';
import { DatePipe } from '@shared/pipes/date.pipe';
import { SharedModule } from '@shared/shared.module';
import { FileUploadDownloadModule } from '@upload-download/file-upload-download.module';
import { RedRoleGuard } from '@users/red-role.guard';
import { UserPreferenceService } from '@users/user-preference.service';
import { UserService } from '@users/user.service';
import { UI_CACHES } from '@utils/constants';
import { REDMissingTranslationHandler } from '@utils/missing-translations-handler';
import { LoggerModule, NgxLoggerLevel, TOKEN_LOGGER_CONFIG, TOKEN_LOGGER_RULES_SERVICE } from 'ngx-logger';
import { ToastrModule } from 'ngx-toastr';
import * as helpModeKeys from '../assets/help-mode/help-mode-keys.json';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { PdfViewerModule } from './modules/pdf-viewer/pdf-viewer.module';
import { ACTIVE_DOSSIERS_SERVICE, ARCHIVED_DOSSIERS_SERVICE } from './tokens';
export const appModuleFactory = (config: AppConfig) => {
@NgModule({
@ -144,7 +144,7 @@ export const appModuleFactory = (config: AppConfig) => {
enabled: false,
},
PDF: {
enabled: false,
enabled: true,
},
FILE: {
enabled: true,

View File

@ -15,7 +15,7 @@ import { firstValueFrom } from 'rxjs';
}),
})
export class DownloadsListScreenComponent extends ListingComponent<DownloadStatus> implements OnDestroy {
readonly #interval: NodeJS.Timer;
readonly #interval: number;
readonly tableHeaderLabel = _('downloads-list.table-header.title');
readonly tableColumnConfigs: TableColumnConfig<DownloadStatus>[] = [
{ label: _('downloads-list.table-col-names.name'), width: '2fr' },
@ -31,11 +31,11 @@ export class DownloadsListScreenComponent extends ListingComponent<DownloadStatu
) {
super();
this._loadingService.loadWhile(this._loadData());
this.#interval = setInterval(() => this._loadData(), 5000);
this.#interval = window.setInterval(() => this._loadData(), 5000);
}
ngOnDestroy() {
clearInterval(this.#interval);
window.clearInterval(this.#interval);
}
downloadItem(download: DownloadStatus) {

View File

@ -1,18 +1,18 @@
import { Component, computed, Input, OnChanges } from '@angular/core';
import { HelpModeService, IqserPermissionsService } from '@iqser/common-ui';
import { AnnotationPermissions } from '@models/file/annotation.permissions';
import { AnnotationWrapper } from '@models/file/annotation.wrapper';
import { PermissionsService } from '@services/permissions.service';
import { AnnotationPermissions } from '@models/file/annotation.permissions';
import { Roles } from '@users/roles';
import { REDAnnotationManager } from '../../../pdf-viewer/services/annotation-manager.service';
import { AnnotationActionsService } from '../../services/annotation-actions.service';
import { AnnotationReferencesService } from '../../services/annotation-references.service';
import { MultiSelectService } from '../../services/multi-select.service';
import { FilePreviewStateService } from '../../services/file-preview-state.service';
import { HelpModeService, IqserPermissionsService } from '@iqser/common-ui';
import { MultiSelectService } from '../../services/multi-select.service';
import { ViewModeService } from '../../services/view-mode.service';
import { REDAnnotationManager } from '../../../pdf-viewer/services/annotation-manager.service';
import { Roles } from '@users/roles';
export const AnnotationButtonTypes = {
dark: 'dark',
default: 'default',
primary: 'primary',
} as const;
@ -24,16 +24,15 @@ export type AnnotationButtonType = keyof typeof AnnotationButtonTypes;
styleUrls: ['./annotation-actions.component.scss'],
})
export class AnnotationActionsComponent implements OnChanges {
@Input() buttonType: AnnotationButtonType = AnnotationButtonTypes.dark;
#annotations: AnnotationWrapper[] = [];
protected _annotationId = '';
@Input() buttonType: AnnotationButtonType = AnnotationButtonTypes.default;
@Input() tooltipPosition: 'before' | 'above' = 'before';
@Input() canPerformAnnotationActions: boolean;
@Input() alwaysVisible: boolean;
readonly roles = Roles;
annotationPermissions: AnnotationPermissions;
isImage = true;
protected _annotationId = '';
#annotations: AnnotationWrapper[] = [];
readonly isVisible = computed(() => {
const hidden = this._annotationManager.hidden();
return this.#annotations.reduce((acc, annotation) => !hidden.has(annotation.id) && acc, true);

View File

@ -38,39 +38,39 @@
"@ngx-translate/core": "15.0.0",
"@ngx-translate/http-loader": "8.0.0",
"@nx/angular": "16.7.4",
"@pdftron/webviewer": "10.1.1",
"chart.js": "^4.3.0",
"dayjs": "^1.11.5",
"@pdftron/webviewer": "10.3.0",
"chart.js": "4.4.0",
"dayjs": "1.11.9",
"file-saver": "^2.0.5",
"jszip": "^3.10.1",
"jwt-decode": "^3.1.2",
"keycloak-angular": "14.0.0",
"keycloak-js": "21.1.1",
"keycloak-angular": "14.1.0",
"keycloak-js": "22.0.1",
"lodash-es": "^4.17.21",
"monaco-editor": "0.39.0",
"ng2-charts": "^4.1.1",
"monaco-editor": "0.41.0",
"ng2-charts": "5.0.3",
"ngx-color-picker": "^14.0.0",
"ngx-logger": "^5.0.11",
"ngx-toastr": "17.0.2",
"ngx-translate-messageformat-compiler": "6.4.0",
"ngx-translate-messageformat-compiler": "6.5.0",
"object-hash": "^3.0.0",
"papaparse": "^5.4.0",
"rxjs": "7.8.1",
"sass": "1.63.4",
"sass": "1.66.1",
"scroll-into-view-if-needed": "^3.0.6",
"streamsaver": "^2.0.5",
"tslib": "2.5.3",
"tslib": "2.6.2",
"zone.js": "0.13.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "16.2.0",
"@angular-devkit/core": "16.2.0",
"@angular-devkit/schematics": "16.2.0",
"@angular-eslint/builder": "16.0.3",
"@angular-eslint/eslint-plugin": "16.0.3",
"@angular-eslint/eslint-plugin-template": "16.0.3",
"@angular-eslint/schematics": "16.0.3",
"@angular-eslint/template-parser": "16.0.3",
"@angular-eslint/builder": "16.1.1",
"@angular-eslint/eslint-plugin": "16.1.1",
"@angular-eslint/eslint-plugin-template": "16.1.1",
"@angular-eslint/schematics": "16.1.1",
"@angular-eslint/template-parser": "16.1.1",
"@angular/cli": "~16.2.0",
"@angular/compiler-cli": "16.2.2",
"@angular/language-service": "16.2.2",
@ -81,37 +81,37 @@
"@nx/workspace": "16.7.4",
"@schematics/angular": "16.2.0",
"@types/file-saver": "^2.0.5",
"@types/jest": "29.5.2",
"@types/lodash-es": "^4.17.6",
"@types/node": "20.3.1",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@types/jest": "29.5.4",
"@types/lodash-es": "4.17.8",
"@types/node": "20.5.6",
"@typescript-eslint/eslint-plugin": "6.4.1",
"@typescript-eslint/parser": "6.4.1",
"axios": "^1.3.4",
"dotenv": "16.1.4",
"eslint": "8.46.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-prettier": "^4.0.0",
"dotenv": "16.3.1",
"eslint": "8.48.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-rxjs": "^5.0.2",
"google-translate-api-browser": "^4.0.6",
"husky": "^8.0.3",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-extended": "4.0.0",
"jest": "29.6.4",
"jest-environment-jsdom": "29.6.4",
"jest-extended": "4.0.1",
"jest-preset-angular": "13.1.1",
"lint-staged": "^13.2.0",
"lint-staged": "14.0.1",
"nx": "16.7.4",
"nx-cloud": "16.3.0",
"postcss": "8.4.24",
"postcss": "8.4.28",
"postcss-import": "15.1.0",
"postcss-preset-env": "8.5.0",
"postcss-preset-env": "9.1.1",
"postcss-url": "10.1.3",
"prettier": "2.8.8",
"prettier": "3.0.2",
"sonarqube-scanner": "^3.0.1",
"superagent": "^8.0.9",
"superagent": "8.1.2",
"superagent-promise": "^1.1.0",
"ts-node": "10.9.1",
"typescript": "5.1.3",
"webpack": "5.87.0",
"typescript": "5.1.6",
"webpack": "5.88.2",
"webpack-bundle-analyzer": "^4.8.0",
"xliff": "^6.1.0"
}

3931
yarn.lock

File diff suppressed because it is too large Load Diff