Merge branch 'dan' into 'master'

Some updates

See merge request redactmanager/red-ui!145
This commit is contained in:
Dan Percic 2023-10-18 12:22:12 +02:00
commit d2782f95e0
8 changed files with 1687 additions and 1450 deletions

View File

@ -100,7 +100,7 @@
"selector": "memberLike",
"modifiers": ["protected"],
"format": ["camelCase"],
"leadingUnderscore": "require"
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",

View File

@ -10,12 +10,12 @@
<div *ngIf="licenseService.licenseData$ | async" class="grid-container">
<div class="row">
<div translate="license-info-screen.backend-version"></div>
<div>{{ configService.values.BACKEND_APP_VERSION || '-' }}</div>
<div>{{ config.BACKEND_APP_VERSION || '-' }}</div>
</div>
<div class="row">
<div translate="license-info-screen.custom-app-title"></div>
<div>{{ configService.values.APP_NAME || '-' }}</div>
<div>{{ config.APP_NAME || '-' }}</div>
</div>
<div class="row">

View File

@ -1,23 +1,24 @@
import { Component } from '@angular/core';
import { ConfigService } from '@services/config.service';
import { TranslateService } from '@ngx-translate/core';
import { ButtonConfig, IconButtonTypes, IqserPermissionsService } from '@iqser/common-ui';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { RouterHistoryService } from '@services/router-history.service';
import { LicenseService } from '@services/license.service';
import { Roles } from '@users/roles';
import type { User } from '@red/domain';
import { List } from '@common-ui/utils';
import { ButtonConfig, getConfig, IconButtonTypes, IqserPermissionsService } from '@iqser/common-ui';
import { getCurrentUser } from '@iqser/common-ui/lib/users';
import { TranslateService } from '@ngx-translate/core';
import type { AppConfig, User } from '@red/domain';
import { LicenseService } from '@services/license.service';
import { RouterHistoryService } from '@services/router-history.service';
import { Roles } from '@users/roles';
@Component({
templateUrl: './license-screen.component.html',
styleUrls: ['./license-screen.component.scss'],
})
export class LicenseScreenComponent {
readonly roles = Roles;
readonly currentUser = getCurrentUser<User>();
readonly currentYear = new Date().getFullYear();
readonly buttonConfigs: readonly ButtonConfig[] = [
protected readonly config = getConfig<AppConfig>();
protected readonly roles = Roles;
protected readonly currentUser = getCurrentUser<User>();
protected readonly currentYear = new Date().getFullYear();
protected readonly buttonConfigs: List<ButtonConfig> = [
{
label: _('license-info-screen.email-report'),
action: (): void => this.sendMail(),
@ -28,7 +29,6 @@ export class LicenseScreenComponent {
];
constructor(
readonly configService: ConfigService,
readonly licenseService: LicenseService,
readonly permissionsService: IqserPermissionsService,
readonly routerHistoryService: RouterHistoryService,

View File

@ -8,6 +8,6 @@ export class NavigateLastDossiersScreenDirective {
constructor(private readonly _routerHistoryService: RouterHistoryService) {}
@HostListener('click') onClick() {
this._routerHistoryService.navigateToLastDossiersScreen();
return this._routerHistoryService.navigateToLastDossiersScreen();
}
}

View File

@ -1,10 +1,10 @@
import { effect, Injectable } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
import { filter } from 'rxjs/operators';
import { JwtToken } from '@guards/if-logged-in.guard';
import { TenantsService } from '@iqser/common-ui/lib/tenants';
import jwt_decode from 'jwt-decode';
import { KeycloakService } from 'keycloak-angular';
import { JwtToken } from '@guards/if-logged-in.guard';
import { filter } from 'rxjs/operators';
const LAST_DOSSIERS_SCREEN = 'routerHistory_lastDossiersScreen';
@ -28,6 +28,10 @@ export class RouterHistoryService {
}
});
const ref = effect(async () => {
if (!(await _keycloakService.isLoggedIn())) {
return;
}
const token = await this._keycloakService.getToken();
if (this._tenantsService.activeTenantId.length === 0 || !token) {
return;
@ -45,14 +49,14 @@ export class RouterHistoryService {
});
}
navigateToLastDossiersScreen(): void {
navigateToLastDossiersScreen() {
const lastDossiersScreen = localStorage.getItem(LAST_DOSSIERS_SCREEN);
if (this._router.url === decodeURI(lastDossiersScreen) || lastDossiersScreen === null) {
this._router.navigate(['/' + this._tenantsService.activeTenantId]);
} else {
const url = decodeURI(lastDossiersScreen).split('?')[0];
// todo links
this._router.navigate([url]);
return this._router.navigate(['/' + this._tenantsService.activeTenantId]);
}
const url = decodeURI(lastDossiersScreen).split('?')[0];
// todo links
return this._router.navigate([url]);
}
}

View File

@ -1,9 +1,9 @@
{
"ADMIN_CONTACT_NAME": null,
"ADMIN_CONTACT_URL": null,
"API_URL": "https://dan1.iqser.cloud",
"API_URL": "https://dan.iqser.cloud",
"APP_NAME": "RedactManager",
"IS_DOCUMINE": true,
"IS_DOCUMINE": false,
"RULE_EDITOR_DEV_ONLY": false,
"AUTO_READ_TIME": 3,
"BACKEND_APP_VERSION": "4.4.40",
@ -13,13 +13,13 @@
"MAX_RETRIES_ON_SERVER_ERROR": 3,
"OAUTH_CLIENT_ID": "redaction",
"OAUTH_IDP_HINT": null,
"OAUTH_URL": "https://dan1.iqser.cloud/auth",
"OAUTH_URL": "https://dan.iqser.cloud/auth",
"RECENT_PERIOD_IN_HOURS": 24,
"SELECTION_MODE": "structural",
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview",
"ANNOTATIONS_THRESHOLD": 1000,
"THEME": "scm",
"BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/scm/",
"THEME": "redact",
"BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/redact/",
"AVAILABLE_NOTIFICATIONS_DAYS": 30,
"AVAILABLE_OLD_NOTIFICATIONS_MINUTES": 60,
"NOTIFICATIONS_THRESHOLD": 1000,

View File

@ -23,98 +23,98 @@
"*.{ts,js,html}": "eslint --fix"
},
"dependencies": {
"@angular/animations": "16.2.2",
"@angular/cdk": "16.2.1",
"@angular/common": "16.2.2",
"@angular/compiler": "16.2.2",
"@angular/core": "16.2.2",
"@angular/forms": "16.2.2",
"@angular/material": "16.2.1",
"@angular/platform-browser": "16.2.2",
"@angular/platform-browser-dynamic": "16.2.2",
"@angular/router": "16.2.2",
"@angular/service-worker": "16.2.2",
"@angular/animations": "16.2.9",
"@angular/cdk": "16.2.8",
"@angular/common": "16.2.9",
"@angular/compiler": "16.2.9",
"@angular/core": "16.2.9",
"@angular/forms": "16.2.9",
"@angular/material": "16.2.8",
"@angular/platform-browser": "16.2.9",
"@angular/platform-browser-dynamic": "16.2.9",
"@angular/router": "16.2.9",
"@angular/service-worker": "16.2.9",
"@materia-ui/ngx-monaco-editor": "^6.0.0",
"@messageformat/core": "^3.1.0",
"@ngx-translate/core": "15.0.0",
"@ngx-translate/http-loader": "8.0.0",
"@nx/angular": "16.7.4",
"@pdftron/webviewer": "10.3.0",
"@nx/angular": "16.10.0",
"@pdftron/webviewer": "10.4.0",
"chart.js": "4.4.0",
"dayjs": "1.11.9",
"dayjs": "1.11.10",
"file-saver": "^2.0.5",
"jszip": "^3.10.1",
"jwt-decode": "^3.1.2",
"keycloak-angular": "14.1.0",
"keycloak-js": "22.0.1",
"keycloak-js": "22.0.4",
"lodash-es": "^4.17.21",
"monaco-editor": "0.41.0",
"monaco-editor": "0.44.0",
"ng2-charts": "5.0.3",
"ngx-color-picker": "^14.0.0",
"ngx-color-picker": "15.0.0",
"ngx-logger": "^5.0.11",
"ngx-toastr": "17.0.2",
"ngx-translate-messageformat-compiler": "6.5.0",
"object-hash": "^3.0.0",
"papaparse": "^5.4.0",
"rxjs": "7.8.1",
"sass": "1.66.1",
"scroll-into-view-if-needed": "^3.0.6",
"sass": "1.69.3",
"scroll-into-view-if-needed": "3.1.0",
"streamsaver": "^2.0.5",
"tslib": "2.6.2",
"zone.js": "0.13.1"
"zone.js": "0.14.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "16.2.0",
"@angular-devkit/core": "16.2.0",
"@angular-devkit/schematics": "16.2.0",
"@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",
"@angular-devkit/build-angular": "16.2.6",
"@angular-devkit/core": "16.2.6",
"@angular-devkit/schematics": "16.2.6",
"@angular-eslint/builder": "16.2.0",
"@angular-eslint/eslint-plugin": "16.2.0",
"@angular-eslint/eslint-plugin-template": "16.2.0",
"@angular-eslint/schematics": "16.2.0",
"@angular-eslint/template-parser": "16.2.0",
"@angular/cli": "16.2.6",
"@angular/compiler-cli": "16.2.9",
"@angular/language-service": "16.2.9",
"@bartholomej/ngx-translate-extract": "^8.0.2",
"@localazy/ts-api": "^1.0.0",
"@nx/eslint-plugin": "16.7.4",
"@nx/jest": "16.7.4",
"@nx/linter": "16.7.4",
"@nx/workspace": "16.7.4",
"@schematics/angular": "16.2.0",
"@nx/eslint-plugin": "16.10.0",
"@nx/jest": "16.10.0",
"@nx/linter": "16.10.0",
"@nx/workspace": "16.10.0",
"@schematics/angular": "16.2.6",
"@types/file-saver": "^2.0.5",
"@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",
"@types/jest": "29.5.5",
"@types/lodash-es": "4.17.9",
"@types/node": "20.8.6",
"@typescript-eslint/eslint-plugin": "6.8.0",
"@typescript-eslint/parser": "6.8.0",
"axios": "1.5.1",
"dotenv": "16.3.1",
"eslint": "8.48.0",
"eslint": "8.51.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-rxjs": "^5.0.2",
"google-translate-api-browser": "^4.0.6",
"husky": "^8.0.3",
"jest": "29.6.4",
"jest-environment-jsdom": "29.6.4",
"jest-extended": "4.0.1",
"jest-preset-angular": "13.1.1",
"lint-staged": "14.0.1",
"nx": "16.7.4",
"nx-cloud": "16.3.0",
"postcss": "8.4.28",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-extended": "4.0.2",
"jest-preset-angular": "13.1.2",
"lint-staged": "15.0.1",
"nx": "16.10.0",
"nx-cloud": "16.5.2",
"postcss": "8.4.31",
"postcss-import": "15.1.0",
"postcss-preset-env": "9.1.1",
"postcss-preset-env": "9.2.0",
"postcss-url": "10.1.3",
"prettier": "3.0.2",
"sonarqube-scanner": "^3.0.1",
"prettier": "3.0.3",
"sonarqube-scanner": "3.1.0",
"superagent": "8.1.2",
"superagent-promise": "^1.1.0",
"ts-node": "10.9.1",
"typescript": "5.1.6",
"webpack": "5.88.2",
"webpack-bundle-analyzer": "^4.8.0",
"webpack": "5.89.0",
"webpack-bundle-analyzer": "4.9.1",
"xliff": "^6.1.0"
}
}

2961
yarn.lock

File diff suppressed because it is too large Load Diff