update rxjs to v7.5
This commit is contained in:
parent
66f1e2b207
commit
77d93e1874
@ -1,6 +1,6 @@
|
||||
import { AnnotationWrapper } from './annotation.wrapper';
|
||||
import { isArray } from 'rxjs/internal-compatibility';
|
||||
import { User } from '@red/domain';
|
||||
import { isArray } from 'lodash';
|
||||
|
||||
export class AnnotationPermissions {
|
||||
canUndo = true;
|
||||
|
||||
@ -6,7 +6,7 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { RouterHistoryService } from '@services/router-history.service';
|
||||
import { DigitalSignatureService } from '../../services/digital-signature.service';
|
||||
import { IDigitalSignature } from '@red/domain';
|
||||
import { IDigitalSignature, IDigitalSignatureRequest } from '@red/domain';
|
||||
import { HttpStatusCode } from '@angular/common/http';
|
||||
|
||||
@Component({
|
||||
@ -40,29 +40,30 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribe implements
|
||||
}
|
||||
|
||||
saveDigitalSignature() {
|
||||
const digitalSignature = {
|
||||
...this.form.getRawValue(),
|
||||
const formValue = this.form.getRawValue();
|
||||
const digitalSignature: IDigitalSignature = {
|
||||
...formValue,
|
||||
};
|
||||
//adjusted for chrome auto-complete / password manager
|
||||
digitalSignature.password = digitalSignature.keySecret;
|
||||
digitalSignature.password = formValue.keySecret;
|
||||
|
||||
const observable = this.digitalSignatureExists
|
||||
? this._digitalSignatureService.update(digitalSignature)
|
||||
: this._digitalSignatureService.save(digitalSignature);
|
||||
|
||||
this.addSubscription = observable.subscribe(
|
||||
() => {
|
||||
this.addSubscription = observable.subscribe({
|
||||
next: () => {
|
||||
this.loadDigitalSignatureAndInitializeForm();
|
||||
this._toaster.success(_('digital-signature-screen.action.save-success'));
|
||||
},
|
||||
error => {
|
||||
error: error => {
|
||||
if (error.status === HttpStatusCode.BadRequest) {
|
||||
this._toaster.error(_('digital-signature-screen.action.certificate-not-valid-error'));
|
||||
} else {
|
||||
this._toaster.error(_('digital-signature-screen.action.save-error'));
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
removeDigitalSignature() {
|
||||
@ -85,23 +86,23 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribe implements
|
||||
this.form.get('certificateName').setValue(file.name);
|
||||
input.value = null;
|
||||
};
|
||||
fileReader.readAsDataURL(file);
|
||||
fileReader.readAsDataURL(file as Blob);
|
||||
}
|
||||
|
||||
loadDigitalSignatureAndInitializeForm() {
|
||||
this._loadingService.start();
|
||||
this.addSubscription = this._digitalSignatureService
|
||||
this._digitalSignatureService
|
||||
.getSignature()
|
||||
.subscribe(
|
||||
digitalSignature => {
|
||||
.subscribe({
|
||||
next: digitalSignature => {
|
||||
this.digitalSignatureExists = true;
|
||||
this.digitalSignature = digitalSignature;
|
||||
},
|
||||
() => {
|
||||
error: () => {
|
||||
this.digitalSignatureExists = false;
|
||||
this.digitalSignature = {};
|
||||
},
|
||||
)
|
||||
})
|
||||
.add(() => {
|
||||
this.form = this._getForm();
|
||||
this._loadingService.stop();
|
||||
|
||||
@ -396,7 +396,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
});
|
||||
|
||||
// Go to initial page from query params
|
||||
const pageNumber = this._lastPage || this._activatedRoute.snapshot.queryParams.page;
|
||||
const pageNumber: string = this._lastPage || this._activatedRoute.snapshot.queryParams.page;
|
||||
if (pageNumber) {
|
||||
setTimeout(() => {
|
||||
this.selectPage(parseInt(pageNumber, 10));
|
||||
@ -516,7 +516,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
await stampPDFPage(
|
||||
document,
|
||||
this._instance.Core.PDFNet,
|
||||
this._translateService.instant('file-preview.excluded-from-redaction'),
|
||||
this._translateService.instant('file-preview.excluded-from-redaction') as string,
|
||||
17,
|
||||
'courier',
|
||||
'TOP_LEFT',
|
||||
|
||||
@ -2,7 +2,7 @@ import { Injectable, Injector } from '@angular/core';
|
||||
import { GenericService, List, mapEach, QueryParam, RequiredParam, Validate } from '@iqser/common-ui';
|
||||
import * as moment from 'moment';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { iif, Observable } from 'rxjs';
|
||||
import { EMPTY, iif, Observable } from 'rxjs';
|
||||
import { INotification, Notification, NotificationTypes } from '@red/domain';
|
||||
import { map, switchMap } from 'rxjs/operators';
|
||||
import { notificationsTranslations } from '../translations/notifications-translations';
|
||||
@ -40,7 +40,7 @@ export class NotificationsService extends GenericService<Notification> {
|
||||
|
||||
@Validate()
|
||||
getNotificationsIfChanged(@RequiredParam() includeSeen: boolean): Observable<Notification[]> {
|
||||
return this.hasChanges$().pipe(switchMap(changed => iif(() => changed, this.getNotifications(includeSeen))));
|
||||
return this.hasChanges$().pipe(switchMap(changed => iif(() => changed, this.getNotifications(includeSeen), EMPTY)));
|
||||
}
|
||||
|
||||
@Validate()
|
||||
@ -54,7 +54,7 @@ export class NotificationsService extends GenericService<Notification> {
|
||||
}
|
||||
|
||||
private _new(notification: INotification) {
|
||||
const message = this._translate(notification, notificationsTranslations[notification.notificationType]);
|
||||
const message = this._translate(notification, notificationsTranslations[notification.notificationType] as string);
|
||||
const time = this._getTime(notification.creationDate);
|
||||
return new Notification(notification, message, time);
|
||||
}
|
||||
@ -64,7 +64,7 @@ export class NotificationsService extends GenericService<Notification> {
|
||||
return moment(date).format('hh:mm A');
|
||||
}
|
||||
|
||||
private _translate(notification: INotification, translation: string) {
|
||||
private _translate(notification: INotification, translation: string): string {
|
||||
const fileId = notification.target.fileId;
|
||||
const dossierId = notification.target.dossierId;
|
||||
const dossier = this._dossiersService.find(dossierId);
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
"ngx-toastr": "^14.1.3",
|
||||
"ngx-translate-messageformat-compiler": "^5.0.1",
|
||||
"papaparse": "^5.3.1",
|
||||
"rxjs": "~6.6.7",
|
||||
"rxjs": "~7.5.2",
|
||||
"sass": "^1.48.0",
|
||||
"scroll-into-view-if-needed": "^2.2.28",
|
||||
"streamsaver": "^2.0.5",
|
||||
|
||||
11
yarn.lock
11
yarn.lock
@ -12149,7 +12149,7 @@ rxjs-for-await@0.0.2:
|
||||
resolved "https://registry.yarnpkg.com/rxjs-for-await/-/rxjs-for-await-0.0.2.tgz#26598a1d6167147cc192172970e7eed4e620384b"
|
||||
integrity sha512-IJ8R/ZCFMHOcDIqoABs82jal00VrZx8Xkgfe7TOKoaRPAW5nH/VFlG23bXpeGdrmtqI9UobFPgUKgCuFc7Lncw==
|
||||
|
||||
rxjs@6.6.7, rxjs@^6.3.3, rxjs@^6.5.0, rxjs@^6.5.4, rxjs@~6.6.7:
|
||||
rxjs@6.6.7, rxjs@^6.3.3, rxjs@^6.5.0, rxjs@^6.5.4:
|
||||
version "6.6.7"
|
||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9"
|
||||
integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==
|
||||
@ -12163,6 +12163,13 @@ rxjs@^7.2.0, rxjs@^7.4.0:
|
||||
dependencies:
|
||||
tslib "~2.1.0"
|
||||
|
||||
rxjs@~7.5.2:
|
||||
version "7.5.2"
|
||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.2.tgz#11e4a3a1dfad85dbf7fb6e33cbba17668497490b"
|
||||
integrity sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w==
|
||||
dependencies:
|
||||
tslib "^2.1.0"
|
||||
|
||||
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||
@ -13419,7 +13426,7 @@ tsconfig-paths@^3.12.0, tsconfig-paths@^3.9.0:
|
||||
minimist "^1.2.0"
|
||||
strip-bom "^3.0.0"
|
||||
|
||||
tslib@2.3.1, tslib@^2.0.0, tslib@^2.3.0, tslib@^2.3.1:
|
||||
tslib@2.3.1, tslib@^2.0.0, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
|
||||
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user