@dsivd/prestations-ng 14.5.14-beta4 → 14.5.16-beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +2 -0
- package/bundles/dsivd-prestations-ng.umd.js +100 -53
- package/bundles/dsivd-prestations-ng.umd.js.map +1 -1
- package/dsivd-prestations-ng-v14.5.16-beta1.tgz +0 -0
- package/esm2015/abstract-page-component.js +6 -4
- package/esm2015/foehn-list/foehn-list.component.js +13 -12
- package/esm2015/foehn-page/foehn-page.component.js +2 -1
- package/esm2015/foehn-table/foehn-table.component.js +12 -7
- package/esm2015/foehn-table/tableSort.js +1 -1
- package/esm2015/foehn-upload/foehn-bo-multi-upload/bo-multi-upload.service.js +4 -3
- package/esm2015/foehn-upload/foehn-bo-multi-upload/foehn-bo-multi-upload.component.js +6 -3
- package/esm2015/foehn-upload/foehn-multi-upload/foehn-multi-upload.component.js +7 -4
- package/esm2015/foehn-upload/foehn-multi-upload/multi-upload.service.js +4 -3
- package/esm2015/foehn-upload/foehn-multi-upload/pending-upload.service.js +4 -3
- package/esm2015/foehn-upload/foehn-picture-upload/foehn-picture-upload.component.js +6 -3
- package/esm2015/foehn-upload/pending-upload.type.js +1 -1
- package/esm2015/gesdem-confirmation/gesdem-confirmation.component.js +2 -2
- package/esm2015/sdk-dictionary/default-dictionary.js +2 -1
- package/esm2015/sdk-session-info/session-info.service.js +52 -23
- package/fesm2015/dsivd-prestations-ng.js +101 -54
- package/fesm2015/dsivd-prestations-ng.js.map +1 -1
- package/foehn-list/foehn-list.component.d.ts +0 -1
- package/foehn-table/tableSort.d.ts +1 -1
- package/foehn-upload/foehn-bo-multi-upload/bo-multi-upload.service.d.ts +1 -1
- package/foehn-upload/foehn-bo-multi-upload/foehn-bo-multi-upload.component.d.ts +2 -1
- package/foehn-upload/foehn-multi-upload/foehn-multi-upload.component.d.ts +2 -1
- package/foehn-upload/foehn-multi-upload/multi-upload.service.d.ts +1 -1
- package/foehn-upload/foehn-multi-upload/pending-upload.service.d.ts +1 -1
- package/foehn-upload/foehn-picture-upload/foehn-picture-upload.component.d.ts +2 -1
- package/foehn-upload/pending-upload.type.d.ts +1 -0
- package/package.json +1 -1
- package/sdk-session-info/session-info.service.d.ts +8 -1
- package/dsivd-prestations-ng-v14.5.14-beta4.tgz +0 -0
|
@@ -3,7 +3,7 @@ import { Injectable, NgModule, EventEmitter, Directive, Input, ViewChildren, Vie
|
|
|
3
3
|
import * as i1 from '@angular/common/http';
|
|
4
4
|
import { HttpResponse, HttpErrorResponse, HTTP_INTERCEPTORS, HttpClientModule, HttpParams, HttpClient } from '@angular/common/http';
|
|
5
5
|
import { Subject, throwError, BehaviorSubject, combineLatest, of, EMPTY, interval, merge } from 'rxjs';
|
|
6
|
-
import { map, catchError, filter, shareReplay, mergeMap, tap, switchMap, debounceTime, throttleTime, share,
|
|
6
|
+
import { map, catchError, filter, shareReplay, mergeMap, tap, switchMap, first, debounceTime, throttleTime, share, finalize, distinctUntilChanged } from 'rxjs/operators';
|
|
7
7
|
import * as i1$1 from '@angular/router';
|
|
8
8
|
import { RouterModule, ActivatedRoute, NavigationEnd } from '@angular/router';
|
|
9
9
|
import * as i3 from '@angular/common';
|
|
@@ -461,42 +461,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
|
|
|
461
461
|
|
|
462
462
|
const SESSION_INFO_API_URL = 'api/sessionInfo/data';
|
|
463
463
|
class SessionInfo {
|
|
464
|
-
constructor(http) {
|
|
464
|
+
constructor(http, growlService, ngZone) {
|
|
465
465
|
this.http = http;
|
|
466
|
+
this.growlService = growlService;
|
|
467
|
+
this.ngZone = ngZone;
|
|
468
|
+
this.neverConnected_ = new BehaviorSubject(undefined);
|
|
466
469
|
}
|
|
467
470
|
get data() {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
.
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}
|
|
471
|
+
return this.neverConnected_.asObservable().pipe(tap(() => {
|
|
472
|
+
if (this.timeoutLogError) {
|
|
473
|
+
clearTimeout(this.timeoutLogError);
|
|
474
|
+
}
|
|
475
|
+
}), switchMap(neverConnected => {
|
|
476
|
+
if (neverConnected !== false) {
|
|
477
|
+
if (neverConnected === undefined) {
|
|
478
|
+
this.logErrorNeverConnectedIsNotSet();
|
|
479
|
+
}
|
|
480
|
+
if (!this.onMicroTaskEmptyPulling_) {
|
|
481
|
+
// Need 'onMicrotaskEmpty' to avoid 'ExpressionChangedAfterItHasBeenCheckedError'
|
|
482
|
+
this.onMicroTaskEmptyPulling_ = this.ngZone.onMicrotaskEmpty.pipe(first(), map(() => null), shareReplay(1));
|
|
483
|
+
}
|
|
484
|
+
return this.onMicroTaskEmptyPulling_;
|
|
481
485
|
}
|
|
482
|
-
|
|
483
|
-
|
|
486
|
+
else {
|
|
487
|
+
if (!this.pulling_) {
|
|
488
|
+
this.pulling_ = this.http
|
|
489
|
+
.get(SESSION_INFO_API_URL)
|
|
490
|
+
.pipe(catchError(() => {
|
|
491
|
+
const message = 'Impossible de récupérer les informations de la personne connectée';
|
|
492
|
+
this.growlService.addWithType(GrowlType.DANGER, message);
|
|
493
|
+
return of(null);
|
|
494
|
+
}), map((r) => {
|
|
495
|
+
if (r) {
|
|
496
|
+
return (this.sessionData = r);
|
|
497
|
+
}
|
|
498
|
+
return null;
|
|
499
|
+
}), shareReplay(1));
|
|
500
|
+
}
|
|
501
|
+
return this.pulling_;
|
|
502
|
+
}
|
|
503
|
+
}));
|
|
484
504
|
}
|
|
485
505
|
set neverConnected(neverConnected) {
|
|
486
|
-
this.neverConnected_
|
|
506
|
+
this.neverConnected_.next(neverConnected);
|
|
487
507
|
}
|
|
488
508
|
get neverConnected() {
|
|
489
|
-
return this.neverConnected_;
|
|
509
|
+
return this.neverConnected_.getValue();
|
|
510
|
+
}
|
|
511
|
+
logErrorNeverConnectedIsNotSet() {
|
|
512
|
+
// Use of setTimeout to avoid unnecessary error log
|
|
513
|
+
this.timeoutLogError = setTimeout(() => {
|
|
514
|
+
console.error("Error: 'neverConnected' is not set. " +
|
|
515
|
+
'Find more at https://dsi-vd.github.io/prestations-ng/CHANGELOG.md#_14_5_16_');
|
|
516
|
+
}, 2000);
|
|
490
517
|
}
|
|
491
518
|
}
|
|
492
|
-
SessionInfo.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: SessionInfo, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
519
|
+
SessionInfo.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: SessionInfo, deps: [{ token: i1.HttpClient }, { token: GrowlBrokerService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
493
520
|
SessionInfo.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: SessionInfo, providedIn: 'root' });
|
|
494
521
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: SessionInfo, decorators: [{
|
|
495
522
|
type: Injectable,
|
|
496
523
|
args: [{
|
|
497
524
|
providedIn: 'root'
|
|
498
525
|
}]
|
|
499
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
526
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: GrowlBrokerService }, { type: i0.NgZone }]; } });
|
|
500
527
|
|
|
501
528
|
class GesdemHandlerService {
|
|
502
529
|
constructor(http, growlService, validationHandlerService, router, route, errorHandlerService, sessionInfo) {
|
|
@@ -1389,6 +1416,7 @@ const DEFAULT_DICTIONARY = {
|
|
|
1389
1416
|
'gesdem-confirmation.mail-sent.label': 'Vous recevrez un email de confirmation dans quelques instants.',
|
|
1390
1417
|
'gesdem-confirmation.download-pdf-recap-button': 'Télécharger la demande (pdf)',
|
|
1391
1418
|
'gesdem-confirmation.exit-button': 'Terminer',
|
|
1419
|
+
'gesdem-confirmation.logout-button': 'Se déconnecter',
|
|
1392
1420
|
'gesdem-confirmation.extra-content': ' ',
|
|
1393
1421
|
'foehn-date-picker-button.icon-title': 'Afficher le calendrier',
|
|
1394
1422
|
'foehn-date-picker-button.screen-reader.selected-date': 'Date sélectionnée :',
|
|
@@ -2342,7 +2370,7 @@ class MultiUploadService {
|
|
|
2342
2370
|
});
|
|
2343
2371
|
this.uploaderHelper = new UploaderHelper(dictionaryService, applicationInfoService);
|
|
2344
2372
|
}
|
|
2345
|
-
uploadDocuments(baseUrl, formKey, label, files, key, isMultiple, language) {
|
|
2373
|
+
uploadDocuments(baseUrl, formKey, label, files, key, isMultiple, language, shouldDisplayFileSavedConfirmation) {
|
|
2346
2374
|
if (this.reference) {
|
|
2347
2375
|
const documents = files.map(file => this.uploaderHelper.mapToDocumentReference(file, label, key, isMultiple, this.uniqPrefix, this.globalSequence++));
|
|
2348
2376
|
const formData = this.uploaderHelper.mapToFormData(documents, formKey, language);
|
|
@@ -2351,7 +2379,8 @@ class MultiUploadService {
|
|
|
2351
2379
|
.post(url, formData)
|
|
2352
2380
|
.pipe(tap(result => {
|
|
2353
2381
|
const successfulDocumentsCount = result.documents && result.documents.length;
|
|
2354
|
-
if (successfulDocumentsCount
|
|
2382
|
+
if (successfulDocumentsCount &&
|
|
2383
|
+
shouldDisplayFileSavedConfirmation) {
|
|
2355
2384
|
const message = `${successfulDocumentsCount} fichier(s) sauvegardé(s) avec succès`;
|
|
2356
2385
|
this.growlService.addWithType(GrowlType.SUCCESS, message);
|
|
2357
2386
|
}
|
|
@@ -2440,7 +2469,7 @@ class PendingUploadService {
|
|
|
2440
2469
|
// Return true if at least one files for a given formKey exist
|
|
2441
2470
|
return !!this.pendingFilesByFormKey.get(formKey).files.length;
|
|
2442
2471
|
}
|
|
2443
|
-
addPendingFiles(baseUrl, formKey, label, files, key, isMultiple) {
|
|
2472
|
+
addPendingFiles(baseUrl, formKey, label, files, key, isMultiple, shouldDisplayFileSavedConfirmation) {
|
|
2444
2473
|
// Initialize pending files by formKey
|
|
2445
2474
|
if (!this.hasPendingFiles(formKey)) {
|
|
2446
2475
|
this.pendingFilesByFormKey.set(formKey, new PendingFiles());
|
|
@@ -2456,6 +2485,7 @@ class PendingUploadService {
|
|
|
2456
2485
|
];
|
|
2457
2486
|
this.pendingFilesByFormKey.get(formKey).key = key;
|
|
2458
2487
|
this.pendingFilesByFormKey.get(formKey).isMultiple = isMultiple;
|
|
2488
|
+
this.pendingFilesByFormKey.get(formKey).shouldDisplayFileSavedConfirmation = shouldDisplayFileSavedConfirmation;
|
|
2459
2489
|
}
|
|
2460
2490
|
removePendingFile(file, formKey) {
|
|
2461
2491
|
if (this.hasPendingFiles(formKey)) {
|
|
@@ -2471,7 +2501,7 @@ class PendingUploadService {
|
|
|
2471
2501
|
const mergedResponse = new DocumentsWithErrors();
|
|
2472
2502
|
filesToUpload.forEach((pendingFiles, formKey) => {
|
|
2473
2503
|
this.multiUploadService
|
|
2474
|
-
.uploadDocuments(pendingFiles.url, formKey, pendingFiles.label, pendingFiles.files, pendingFiles.key, pendingFiles.isMultiple, form.language)
|
|
2504
|
+
.uploadDocuments(pendingFiles.url, formKey, pendingFiles.label, pendingFiles.files, pendingFiles.key, pendingFiles.isMultiple, form.language, pendingFiles.shouldDisplayFileSavedConfirmation)
|
|
2475
2505
|
.subscribe((response) => {
|
|
2476
2506
|
// Merge all uploads response
|
|
2477
2507
|
this.mergePendingUploadedServerResult(mergedResponse, response);
|
|
@@ -2657,11 +2687,13 @@ class AbstractPageComponent {
|
|
|
2657
2687
|
else {
|
|
2658
2688
|
this._validationHandlerService.shouldDisplayErrors(true);
|
|
2659
2689
|
}
|
|
2660
|
-
this.sendForFormConcurrentSafe
|
|
2690
|
+
this.sendForFormConcurrentSafe
|
|
2691
|
+
.pipe(first())
|
|
2692
|
+
.subscribe(() => this.onFormSent(goToNextPage));
|
|
2661
2693
|
}
|
|
2662
2694
|
transmit() {
|
|
2663
2695
|
this._validationHandlerService.shouldDisplayErrors(true);
|
|
2664
|
-
this.transmitConcurrentSafe.subscribe(() => {
|
|
2696
|
+
this.transmitConcurrentSafe.pipe(first()).subscribe(() => {
|
|
2665
2697
|
if (!this._gesdemService.lastResponse.errors.length) {
|
|
2666
2698
|
this._gesdemEventService.formTransmittedSubject.next(this._gesdemService.lastResponse);
|
|
2667
2699
|
this._navigation.next();
|
|
@@ -3607,7 +3639,7 @@ class GesdemConfirmationComponent {
|
|
|
3607
3639
|
}
|
|
3608
3640
|
}
|
|
3609
3641
|
GesdemConfirmationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: GesdemConfirmationComponent, deps: [{ token: GesdemHandlerService }, { token: FoehnPageService }, { token: i1$1.ActivatedRoute }, { token: SdkDictionaryService }, { token: i3.Location }], target: i0.ɵɵFactoryTarget.Component });
|
|
3610
|
-
GesdemConfirmationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: GesdemConfirmationComponent, selector: "gesdem-confirmation", inputs: { reference: "reference", setPageTitle: "setPageTitle", hasEmailSent: "hasEmailSent", closeHref: "closeHref", showDownloadPdfRecapButton: "showDownloadPdfRecapButton", showLinkToMyDemandes: "showLinkToMyDemandes", demandeIsClosedOnTransmit: "demandeIsClosedOnTransmit", actionStatut: "actionStatut", connectedConfirmationMessage: "connectedConfirmationMessage", connectedConfirmationMessageIfAbandoned: "connectedConfirmationMessageIfAbandoned", downloadPdfRecapButtonText: "downloadPdfRecapButtonText", closeButtonText: "closeButtonText", baseUrlPdf: "baseUrlPdf" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"container mt-5\" *ngIf=\"reference && !isInProgress\">\n <div\n class=\"alert text-center mb-2\"\n [ngClass]=\"isTransferred ? 'alert-success' : 'alert-danger'\"\n >\n <p class=\"h2\">\n {{\n isTransferred\n ? (successLabelDicoKey | fromDictionary)\n : ('gesdem-confirmation.abort-label' | fromDictionary)\n }}\n </p>\n <dl>\n <dt class=\"font-weight-light\">\n {{\n 'gesdem-confirmation.reference-title.label' | fromDictionary\n }}\n </dt>\n <dd id=\"numDemande\" class=\"h4 d-block mt-3\">{{ reference }}</dd>\n </dl>\n <p *ngIf=\"hasEmailSent && !(isConnectedCyber | async)\">\n {{ 'gesdem-confirmation.mail-sent.label' | fromDictionary }}\n </p>\n </div>\n\n <span\n [innerHTML]=\"'gesdem-confirmation.extra-content' | fromDictionary\"\n ></span>\n\n <ng-content></ng-content>\n\n <div\n class=\"col-md-12 vd-highlight\"\n *ngIf=\"(isConnectedCyber | async) && hasConnectedContent()\"\n >\n <span class=\"sr-only\">\n Information suite \u00E0 la transmission de votre demande\n </span>\n <div class=\"row\">\n <div class=\"col-md-1\">\n <foehn-icon-info-circle class=\"h3\"></foehn-icon-info-circle>\n </div>\n <div class=\"col-md-11\">\n <p\n [innerHTML]=\"\n isTransferred\n ? connectedConfirmationMessage\n : connectedConfirmationMessageIfAbandoned\n \"\n ></p>\n <p\n *ngIf=\"\n showLinkToMyDemandes &&\n (demandeIsClosedOnTransmit || isAbandoned)\n \"\n >\n Vous pouvez consulter votre demande en cliquant sur :\n <a href=\"/100002/demandes/search/MINE/TREATED\">\n Mes nouvelles demandes trait\u00E9es\n </a>\n .\n </p>\n <p\n *ngIf=\"\n showLinkToMyDemandes &&\n !demandeIsClosedOnTransmit &&\n !isAbandoned\n \"\n >\n Vous pouvez suivre l'avancement du traitement de votre\n demande en cliquant sur :\n <a href=\"/100002/demandes/search/MINE/IN_PROGRESS\">\n Mes demandes en cours de traitement\n </a>\n .\n </p>\n </div>\n </div>\n </div>\n\n <div
|
|
3642
|
+
GesdemConfirmationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: GesdemConfirmationComponent, selector: "gesdem-confirmation", inputs: { reference: "reference", setPageTitle: "setPageTitle", hasEmailSent: "hasEmailSent", closeHref: "closeHref", showDownloadPdfRecapButton: "showDownloadPdfRecapButton", showLinkToMyDemandes: "showLinkToMyDemandes", demandeIsClosedOnTransmit: "demandeIsClosedOnTransmit", actionStatut: "actionStatut", connectedConfirmationMessage: "connectedConfirmationMessage", connectedConfirmationMessageIfAbandoned: "connectedConfirmationMessageIfAbandoned", downloadPdfRecapButtonText: "downloadPdfRecapButtonText", closeButtonText: "closeButtonText", baseUrlPdf: "baseUrlPdf" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"container mt-5\" *ngIf=\"reference && !isInProgress\">\n <div\n class=\"alert text-center mb-2\"\n [ngClass]=\"isTransferred ? 'alert-success' : 'alert-danger'\"\n >\n <p class=\"h2\">\n {{\n isTransferred\n ? (successLabelDicoKey | fromDictionary)\n : ('gesdem-confirmation.abort-label' | fromDictionary)\n }}\n </p>\n <dl>\n <dt class=\"font-weight-light\">\n {{\n 'gesdem-confirmation.reference-title.label' | fromDictionary\n }}\n </dt>\n <dd id=\"numDemande\" class=\"h4 d-block mt-3\">{{ reference }}</dd>\n </dl>\n <p *ngIf=\"hasEmailSent && !(isConnectedCyber | async)\">\n {{ 'gesdem-confirmation.mail-sent.label' | fromDictionary }}\n </p>\n </div>\n\n <span\n [innerHTML]=\"'gesdem-confirmation.extra-content' | fromDictionary\"\n ></span>\n\n <ng-content></ng-content>\n\n <div\n class=\"col-md-12 vd-highlight\"\n *ngIf=\"(isConnectedCyber | async) && hasConnectedContent()\"\n >\n <span class=\"sr-only\">\n Information suite \u00E0 la transmission de votre demande\n </span>\n <div class=\"row\">\n <div class=\"col-md-1\">\n <foehn-icon-info-circle class=\"h3\"></foehn-icon-info-circle>\n </div>\n <div class=\"col-md-11\">\n <p\n [innerHTML]=\"\n isTransferred\n ? connectedConfirmationMessage\n : connectedConfirmationMessageIfAbandoned\n \"\n ></p>\n <p\n *ngIf=\"\n showLinkToMyDemandes &&\n (demandeIsClosedOnTransmit || isAbandoned)\n \"\n >\n Vous pouvez consulter votre demande en cliquant sur :\n <a href=\"/100002/demandes/search/MINE/TREATED\">\n Mes nouvelles demandes trait\u00E9es\n </a>\n .\n </p>\n <p\n *ngIf=\"\n showLinkToMyDemandes &&\n !demandeIsClosedOnTransmit &&\n !isAbandoned\n \"\n >\n Vous pouvez suivre l'avancement du traitement de votre\n demande en cliquant sur :\n <a href=\"/100002/demandes/search/MINE/IN_PROGRESS\">\n Mes demandes en cours de traitement\n </a>\n .\n </p>\n </div>\n </div>\n </div>\n\n <div class=\"col-md-12 list-unstyled d-md-flex p-0 mt-4\">\n <div class=\"ml-0 mr-md-auto mr-md-2 mb-2 mt-2\">\n <a\n *ngIf=\"showDownloadPdfRecapButton\"\n [href]=\"urlPdf\"\n id=\"telechargerBtn\"\n class=\"btn btn-secondary w-100\"\n title=\"T\u00E9l\u00E9charger le PDF\"\n >\n {{ downloadPdfRecapButtonText | fromDictionary }}\n </a>\n </div>\n\n <div\n class=\"mr-0 ml-md-auto mb-2 mt-2\"\n *ngIf=\"!(isConnectedCyber | async) && closeLink | async as link\"\n >\n <a [href]=\"link\" id=\"terminerBtn\" class=\"btn btn-primary w-100\">\n {{ closeButtonText | fromDictionary }}\n </a>\n </div>\n\n <div\n class=\"mr-0 ml-md-auto mb-2 mt-2\"\n *ngIf=\"!!(isConnectedCyber | async)\"\n >\n <a\n href=\"/100018/logout\"\n id=\"logoutBtn\"\n class=\"btn btn-primary w-100\"\n >\n {{ 'gesdem-confirmation.logout-button' | fromDictionary }}\n </a>\n </div>\n </div>\n</div>\n\n<div class=\"container mt-5\" *ngIf=\"reference && isInProgress\">\n <div class=\"alert alert-info text-center mb-2\">\n <p class=\"h2\">Demande en cours</p>\n <dl>\n <dt class=\"font-weight-light\">\n {{\n 'gesdem-confirmation.reference-title.label' | fromDictionary\n }}\n </dt>\n <dd id=\"numDemandeEnCours\" class=\"h4 d-block mt-3\">\n {{ reference }}\n </dd>\n </dl>\n </div>\n\n <div class=\"col-md-12 vd-highlight\">\n <div class=\"row\">\n <div class=\"col-md-1\">\n <foehn-icon-info-circle class=\"h3\"></foehn-icon-info-circle>\n </div>\n <div class=\"col-md-11\">\n <p>\n Vous pouvez reprendre votre demande en cliquant sur le lien\n ci-dessous\n </p>\n <p>\n <a [routerLink]=\"firstPageLink\">Reprendre ma demande</a>\n </p>\n </div>\n </div>\n </div>\n</div>\n", components: [{ type: FoehnIconInfoCircleComponent, selector: "foehn-icon-info-circle" }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }], pipes: { "fromDictionary": SdkDictionaryPipe, "async": i3.AsyncPipe } });
|
|
3611
3643
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: GesdemConfirmationComponent, decorators: [{
|
|
3612
3644
|
type: Component,
|
|
3613
3645
|
args: [{
|
|
@@ -4920,6 +4952,7 @@ class FoehnPageComponent {
|
|
|
4920
4952
|
this.sessionInfo = sessionInfo;
|
|
4921
4953
|
this.foehnPageModalService = foehnPageModalService;
|
|
4922
4954
|
this.sdkDictionaryService = sdkDictionaryService;
|
|
4955
|
+
this.neverConnected = false;
|
|
4923
4956
|
this.supportAlertEnabled = true;
|
|
4924
4957
|
this.userConnectedAsDisplayed = true;
|
|
4925
4958
|
this.confirmLeavingAlert = {
|
|
@@ -8453,6 +8486,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
|
|
|
8453
8486
|
}]
|
|
8454
8487
|
}] });
|
|
8455
8488
|
|
|
8489
|
+
const hasInputChanged$1 = (change) => !(!change ||
|
|
8490
|
+
!change.currentValue ||
|
|
8491
|
+
ObjectHelper.isEqual(change.previousValue, change.currentValue));
|
|
8456
8492
|
class FoehnListComponent {
|
|
8457
8493
|
constructor() {
|
|
8458
8494
|
this.itemsPerPage = 10;
|
|
@@ -8474,9 +8510,9 @@ class FoehnListComponent {
|
|
|
8474
8510
|
const itemsPerPageChange = changes.itemsPerPage;
|
|
8475
8511
|
const listChange = changes.list;
|
|
8476
8512
|
const fixedPageCountChange = changes.fixedPageCount;
|
|
8477
|
-
if (!
|
|
8478
|
-
!
|
|
8479
|
-
!
|
|
8513
|
+
if (!hasInputChanged$1(itemsPerPageChange) &&
|
|
8514
|
+
!hasInputChanged$1(listChange) &&
|
|
8515
|
+
!hasInputChanged$1(fixedPageCountChange)) {
|
|
8480
8516
|
return;
|
|
8481
8517
|
}
|
|
8482
8518
|
this.buildFilteredList();
|
|
@@ -8529,6 +8565,10 @@ class FoehnListComponent {
|
|
|
8529
8565
|
: 0;
|
|
8530
8566
|
}
|
|
8531
8567
|
buildFilteredList() {
|
|
8568
|
+
if (!this._list) {
|
|
8569
|
+
this.filteredList = [];
|
|
8570
|
+
return;
|
|
8571
|
+
}
|
|
8532
8572
|
if (!!this.fixedPageCount) {
|
|
8533
8573
|
this.filteredList = this._list;
|
|
8534
8574
|
return;
|
|
@@ -8538,14 +8578,7 @@ class FoehnListComponent {
|
|
|
8538
8578
|
this.currentPage = 1;
|
|
8539
8579
|
}
|
|
8540
8580
|
const start = (this.currentPage - 1) * this.itemsPerPage;
|
|
8541
|
-
this.filteredList = this._list
|
|
8542
|
-
? this._list.slice(start, start + this.itemsPerPage)
|
|
8543
|
-
: [];
|
|
8544
|
-
}
|
|
8545
|
-
hasInputChanged(change) {
|
|
8546
|
-
return !(!change ||
|
|
8547
|
-
!change.currentValue ||
|
|
8548
|
-
change.previousValue === change.currentValue);
|
|
8581
|
+
this.filteredList = this._list.slice(start, start + this.itemsPerPage);
|
|
8549
8582
|
}
|
|
8550
8583
|
}
|
|
8551
8584
|
FoehnListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: FoehnListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -8602,7 +8635,7 @@ class PageChangeEvent {
|
|
|
8602
8635
|
|
|
8603
8636
|
const hasInputChanged = (change) => !(!change ||
|
|
8604
8637
|
!change.currentValue ||
|
|
8605
|
-
change.previousValue
|
|
8638
|
+
ObjectHelper.isEqual(change.previousValue, change.currentValue));
|
|
8606
8639
|
class FoehnTableComponent {
|
|
8607
8640
|
constructor() {
|
|
8608
8641
|
this.itemsPerPage = 10;
|
|
@@ -8623,9 +8656,11 @@ class FoehnTableComponent {
|
|
|
8623
8656
|
const itemsPerPageChange = changes.itemsPerPage;
|
|
8624
8657
|
const listChange = changes.list;
|
|
8625
8658
|
const fixedPageCountChange = changes.fixedPageCount;
|
|
8659
|
+
const sortInputChange = changes.sort;
|
|
8626
8660
|
if (!hasInputChanged(itemsPerPageChange) &&
|
|
8627
8661
|
!hasInputChanged(listChange) &&
|
|
8628
|
-
!hasInputChanged(fixedPageCountChange)
|
|
8662
|
+
!hasInputChanged(fixedPageCountChange) &&
|
|
8663
|
+
!hasInputChanged(sortInputChange)) {
|
|
8629
8664
|
return;
|
|
8630
8665
|
}
|
|
8631
8666
|
this.buildFilteredList();
|
|
@@ -8688,6 +8723,10 @@ class FoehnTableComponent {
|
|
|
8688
8723
|
});
|
|
8689
8724
|
}
|
|
8690
8725
|
buildFilteredList() {
|
|
8726
|
+
if (!this._list) {
|
|
8727
|
+
this.filteredList = [];
|
|
8728
|
+
return;
|
|
8729
|
+
}
|
|
8691
8730
|
if (!!this.fixedPageCount) {
|
|
8692
8731
|
this.filteredList = this._list;
|
|
8693
8732
|
return;
|
|
@@ -8697,13 +8736,11 @@ class FoehnTableComponent {
|
|
|
8697
8736
|
this.currentPage = 1;
|
|
8698
8737
|
}
|
|
8699
8738
|
const start = (this.currentPage - 1) * this.itemsPerPage;
|
|
8700
|
-
this.filteredList = this._list
|
|
8701
|
-
? this._list.slice(start, start + this.itemsPerPage)
|
|
8702
|
-
: [];
|
|
8739
|
+
this.filteredList = this._list.slice(start, start + this.itemsPerPage);
|
|
8703
8740
|
}
|
|
8704
8741
|
}
|
|
8705
8742
|
FoehnTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: FoehnTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8706
|
-
FoehnTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnTableComponent, selector: "foehn-table", inputs: { itemsPerPage: "itemsPerPage", id: "id", previousLabel: "previousLabel", nextLabel: "nextLabel", totalElements: "totalElements", fixedPageCount: "fixedPageCount", columnsConfiguration: "columnsConfiguration", sort: "sort", trackByFn: "trackByFn", list: "list" }, outputs: { pageChange: "pageChange", sortChange: "sortChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"row\" [id]=\"id\">\n <div class=\"col-12\">\n <h4 *ngIf=\"!!totalElements && totalElements === 1\">\n {{ 'foehn-table.totalElements.1' | fromDictionary }}\n </h4>\n <h4 *ngIf=\"!!totalElements && totalElements !== 1\">\n {{\n 'foehn-table.totalElements'\n | fromDictionary: { total: totalElements.toString() }\n }}\n </h4>\n </div>\n\n <div class=\"col-12 table-responsive\">\n <table class=\"table table-hover\">\n <thead class=\"vd-bg-pattern-bars-gray\">\n <tr>\n <th\n scope=\"col\"\n *ngFor=\"let col of columnsConfiguration\"\n [id]=\"col.id\"\n >\n <ng-container *ngIf=\"!col.sortAttribute\">\n <span\n [innerHTML]=\"\n col.columnLabelKey | fromDictionary\n \"\n ></span>\n </ng-container>\n\n <ng-container *ngIf=\"!!col.sortAttribute\">\n <a\n href=\"#\"\n class=\"vd-text-thin\"\n (click)=\"\n $event.preventDefault();\n triggerSort(col.sortAttribute)\n \"\n [title]=\"\n 'Trier par ' +\n (col.columnLabelKey | fromDictionary)\n \"\n >\n <span\n [innerHTML]=\"\n col.columnLabelKey | fromDictionary\n \"\n ></span>\n <ng-container\n *ngIf=\"\n sort.sortAttribute === col.sortAttribute\n \"\n >\n <span\n class=\"ml-3\"\n *ngIf=\"sort.sortDirection === 'ASC'\"\n >\n <foehn-icon-chevron-up></foehn-icon-chevron-up>\n </span>\n <span\n class=\"ml-3\"\n *ngIf=\"sort.sortDirection === 'DESC'\"\n >\n <foehn-icon-chevron-down></foehn-icon-chevron-down>\n </span>\n </ng-container>\n </a>\n </ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"\n let item of filteredList;\n let index = index;\n trackBy: trackByFn\n \"\n >\n <td\n *ngFor=\"let col of columnsConfiguration\"\n [id]=\"col.id + '-' + index\"\n >\n <ng-container *ngIf=\"!!col.isImportant\">\n <span\n *ngIf=\"col.isImportant(item)\"\n class=\"cell-vertical-align-middle\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n style=\"color: var(--red)\"\n fill=\"currentColor\"\n class=\"bi bi-exclamation\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.553.553 0 0 1-1.1 0L7.1 4.995z\"\n />\n </svg>\n </span>\n </ng-container>\n\n <ng-container *ngIf=\"!col.routerLinkGetter\">\n <span\n [innerHTML]=\"col.valueGetter(item)\"\n class=\"cell-vertical-align-middle\"\n ></span>\n </ng-container>\n\n <ng-container *ngIf=\"!!col.routerLinkGetter\">\n <a\n [routerLink]=\"col.routerLinkGetter(item)\"\n queryParamsHandling=\"merge\"\n class=\"cell-vertical-align-middle\"\n >\n <span\n [innerHTML]=\"col.valueGetter(item)\"\n ></span>\n </a>\n </ng-container>\n </td>\n </tr>\n <tr *ngIf=\"!filteredList.length\">\n <td [colSpan]=\"columnsConfiguration.length\">\n <div class=\"w-100 text-center\">\n {{ 'foehn-table.totalElements.0' | fromDictionary }}\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"row d-flex justify-content-between p-1\">\n <div class=\"col-lg-3 col-md-3 col-sm-6 col-xs-6\">\n <nav\n class=\"vd-pagination\"\n aria-label=\"Pagination\"\n *ngIf=\"hasPreviousPage()\"\n >\n <ul class=\"vd-pagination__list\">\n <li\n class=\"vd-pagination__item vd-pagination__item--previous\"\n >\n <button\n class=\"btn-link vd-pagination__link btn-no-extra vd-pagination__link-reset\"\n (click)=\"previousPage()\"\n >\n <span class=\"vd-pagination__title\">\n <foehn-icon-chevron-left></foehn-icon-chevron-left>\n {{ previousLabel }}\n </span>\n <span class=\"sr-only\">:</span>\n <span class=\"vd-pagination__label\">\n {{ currentPage - 1 }} sur {{ pagesCount() }}\n </span>\n </button>\n </li>\n </ul>\n </nav>\n </div>\n\n <div class=\"col-lg-3 col-md-3 col-sm-6 col-xs-6\">\n <nav\n class=\"vd-pagination\"\n aria-label=\"Pagination\"\n *ngIf=\"hasNextPage()\"\n >\n <ul class=\"vd-pagination__list\">\n <li\n class=\"vd-pagination__item vd-pagination__item--next\"\n >\n <button\n class=\"btn-link vd-pagination__link btn-no-extra vd-pagination__link-reset\"\n (click)=\"nextPage()\"\n >\n <span class=\"vd-pagination__title\">\n {{ nextLabel }}\n <foehn-icon-chevron-right></foehn-icon-chevron-right>\n </span>\n <span class=\"sr-only\">:</span>\n <span class=\"vd-pagination__label\">\n {{ currentPage + 1 }} sur {{ pagesCount() }}\n </span>\n </button>\n </li>\n </ul>\n </nav>\n </div>\n </div>\n </div>\n</div>\n", styles: [".btn-no-extra{padding:0;border:none;font-weight:400;-webkit-text-decoration-line:none;text-decoration-line:none}.vd-pagination__link-reset{background:none;border:none;font-weight:inherit;-webkit-text-decoration-line:none;text-decoration-line:none;text-align:inherit;cursor:pointer}.vd-pagination__link-reset:focus{background-color:#ffbf47}.cell-vertical-align-middle{vertical-align:middle}\n"], components: [{ type: FoehnIconChevronUpComponent, selector: "foehn-icon-chevron-up" }, { type: FoehnIconChevronDownComponent, selector: "foehn-icon-chevron-down" }, { type: FoehnIconChevronLeftComponent, selector: "foehn-icon-chevron-left" }, { type: FoehnIconChevronRightComponent, selector: "foehn-icon-chevron-right" }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }], pipes: { "fromDictionary": SdkDictionaryPipe } });
|
|
8743
|
+
FoehnTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnTableComponent, selector: "foehn-table", inputs: { itemsPerPage: "itemsPerPage", id: "id", previousLabel: "previousLabel", nextLabel: "nextLabel", totalElements: "totalElements", fixedPageCount: "fixedPageCount", columnsConfiguration: "columnsConfiguration", sort: "sort", trackByFn: "trackByFn", list: "list" }, outputs: { pageChange: "pageChange", sortChange: "sortChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"row\" [id]=\"id\">\n <div class=\"col-12\">\n <h4 *ngIf=\"!!totalElements && totalElements === 1\">\n {{ 'foehn-table.totalElements.1' | fromDictionary }}\n </h4>\n <h4 *ngIf=\"!!totalElements && totalElements !== 1\">\n {{\n 'foehn-table.totalElements'\n | fromDictionary: { total: totalElements.toString() }\n }}\n </h4>\n </div>\n\n <div class=\"col-12 table-responsive\">\n <table class=\"table table-hover\">\n <thead class=\"vd-bg-pattern-bars-gray\">\n <tr>\n <th\n scope=\"col\"\n *ngFor=\"let col of columnsConfiguration\"\n [id]=\"col.id\"\n >\n <ng-container\n *ngIf=\"!filteredList.length || !col.sortAttribute\"\n >\n <span\n [innerHTML]=\"\n col.columnLabelKey | fromDictionary\n \"\n ></span>\n </ng-container>\n\n <ng-container\n *ngIf=\"!!filteredList.length && !!col.sortAttribute\"\n >\n <a\n href=\"#\"\n class=\"vd-text-thin\"\n (click)=\"\n $event.preventDefault();\n triggerSort(col.sortAttribute)\n \"\n [title]=\"\n 'Trier par ' +\n (col.columnLabelKey | fromDictionary)\n \"\n >\n <span\n [innerHTML]=\"\n col.columnLabelKey | fromDictionary\n \"\n ></span>\n <ng-container\n *ngIf=\"\n sort.sortAttribute === col.sortAttribute\n \"\n >\n <span\n class=\"ml-3\"\n *ngIf=\"sort.sortDirection === 'ASC'\"\n >\n <foehn-icon-chevron-up></foehn-icon-chevron-up>\n </span>\n <span\n class=\"ml-3\"\n *ngIf=\"sort.sortDirection === 'DESC'\"\n >\n <foehn-icon-chevron-down></foehn-icon-chevron-down>\n </span>\n </ng-container>\n </a>\n </ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"\n let item of filteredList;\n let index = index;\n trackBy: trackByFn\n \"\n >\n <td\n *ngFor=\"let col of columnsConfiguration\"\n [id]=\"col.id + '-' + index\"\n >\n <ng-container *ngIf=\"!!col.isImportant\">\n <span\n *ngIf=\"col.isImportant(item)\"\n class=\"cell-vertical-align-middle\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n style=\"color: var(--red)\"\n fill=\"currentColor\"\n class=\"bi bi-exclamation\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.553.553 0 0 1-1.1 0L7.1 4.995z\"\n />\n </svg>\n </span>\n </ng-container>\n\n <ng-container *ngIf=\"!col.routerLinkGetter\">\n <span\n [innerHTML]=\"col.valueGetter(item)\"\n class=\"cell-vertical-align-middle\"\n ></span>\n </ng-container>\n\n <ng-container *ngIf=\"!!col.routerLinkGetter\">\n <a\n [routerLink]=\"col.routerLinkGetter(item)\"\n queryParamsHandling=\"merge\"\n class=\"cell-vertical-align-middle\"\n >\n <span\n [innerHTML]=\"col.valueGetter(item)\"\n ></span>\n </a>\n </ng-container>\n </td>\n </tr>\n <tr *ngIf=\"!!columnsConfiguration && !filteredList.length\">\n <td [colSpan]=\"columnsConfiguration.length\">\n <div class=\"w-100 text-center\">\n {{ 'foehn-table.totalElements.0' | fromDictionary }}\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"row d-flex justify-content-between p-1\">\n <div class=\"col-lg-3 col-md-3 col-sm-6 col-xs-6\">\n <nav\n class=\"vd-pagination\"\n aria-label=\"Pagination\"\n *ngIf=\"hasPreviousPage()\"\n >\n <ul class=\"vd-pagination__list\">\n <li\n class=\"vd-pagination__item vd-pagination__item--previous\"\n >\n <button\n class=\"btn-link vd-pagination__link btn-no-extra vd-pagination__link-reset\"\n (click)=\"previousPage()\"\n >\n <span class=\"vd-pagination__title\">\n <foehn-icon-chevron-left></foehn-icon-chevron-left>\n {{ previousLabel }}\n </span>\n <span class=\"sr-only\">:</span>\n <span class=\"vd-pagination__label\">\n {{ currentPage - 1 }} sur {{ pagesCount() }}\n </span>\n </button>\n </li>\n </ul>\n </nav>\n </div>\n\n <div class=\"col-lg-3 col-md-3 col-sm-6 col-xs-6\">\n <nav\n class=\"vd-pagination\"\n aria-label=\"Pagination\"\n *ngIf=\"hasNextPage()\"\n >\n <ul class=\"vd-pagination__list\">\n <li\n class=\"vd-pagination__item vd-pagination__item--next\"\n >\n <button\n class=\"btn-link vd-pagination__link btn-no-extra vd-pagination__link-reset\"\n (click)=\"nextPage()\"\n >\n <span class=\"vd-pagination__title\">\n {{ nextLabel }}\n <foehn-icon-chevron-right></foehn-icon-chevron-right>\n </span>\n <span class=\"sr-only\">:</span>\n <span class=\"vd-pagination__label\">\n {{ currentPage + 1 }} sur {{ pagesCount() }}\n </span>\n </button>\n </li>\n </ul>\n </nav>\n </div>\n </div>\n </div>\n</div>\n", styles: [".btn-no-extra{padding:0;border:none;font-weight:400;-webkit-text-decoration-line:none;text-decoration-line:none}.vd-pagination__link-reset{background:none;border:none;font-weight:inherit;-webkit-text-decoration-line:none;text-decoration-line:none;text-align:inherit;cursor:pointer}.vd-pagination__link-reset:focus{background-color:#ffbf47}.cell-vertical-align-middle{vertical-align:middle}\n"], components: [{ type: FoehnIconChevronUpComponent, selector: "foehn-icon-chevron-up" }, { type: FoehnIconChevronDownComponent, selector: "foehn-icon-chevron-down" }, { type: FoehnIconChevronLeftComponent, selector: "foehn-icon-chevron-left" }, { type: FoehnIconChevronRightComponent, selector: "foehn-icon-chevron-right" }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }], pipes: { "fromDictionary": SdkDictionaryPipe } });
|
|
8707
8744
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: FoehnTableComponent, decorators: [{
|
|
8708
8745
|
type: Component,
|
|
8709
8746
|
args: [{
|
|
@@ -9458,6 +9495,7 @@ class FoehnMultiUploadComponent extends AbstractFoehnUploaderComponent {
|
|
|
9458
9495
|
this.confirmModalService = confirmModalService;
|
|
9459
9496
|
this.dictionaryService = dictionaryService;
|
|
9460
9497
|
this.url = 'api/document';
|
|
9498
|
+
this.shouldDisplayFileSavedConfirmation = true;
|
|
9461
9499
|
this.pendingUploadService = pendingUploadService;
|
|
9462
9500
|
this.multiUploadService = multiUploadService;
|
|
9463
9501
|
}
|
|
@@ -9472,7 +9510,7 @@ class FoehnMultiUploadComponent extends AbstractFoehnUploaderComponent {
|
|
|
9472
9510
|
// Only one call every 300ms to stop concurrent access
|
|
9473
9511
|
throttleTime(300),
|
|
9474
9512
|
// Only one concurrent call at the time
|
|
9475
|
-
mergeMap(files => this.multiUploadService.uploadDocuments(this.url, this.name, this.label, files, this.key, this.multiple, this.currentLanguage), 1))
|
|
9513
|
+
mergeMap(files => this.multiUploadService.uploadDocuments(this.url, this.name, this.label, files, this.key, this.multiple, this.currentLanguage, this.shouldDisplayFileSavedConfirmation), 1))
|
|
9476
9514
|
.subscribe(({ documents, errors }) => {
|
|
9477
9515
|
this.displayResultFromServer(documents, errors);
|
|
9478
9516
|
}, (error) => {
|
|
@@ -9573,7 +9611,7 @@ class FoehnMultiUploadComponent extends AbstractFoehnUploaderComponent {
|
|
|
9573
9611
|
// only when no error so isPristine is set to false for validation purpose
|
|
9574
9612
|
this.markAsDirty();
|
|
9575
9613
|
// Otherwise, we store files in pending storage
|
|
9576
|
-
this.pendingUploadService.addPendingFiles(this.url, this.name, this.label, files, this.key, this.multiple);
|
|
9614
|
+
this.pendingUploadService.addPendingFiles(this.url, this.name, this.label, files, this.key, this.multiple, this.shouldDisplayFileSavedConfirmation);
|
|
9577
9615
|
}
|
|
9578
9616
|
}
|
|
9579
9617
|
displayPendingUploadedErrorsFromServerByFormKey(errors, formKey) {
|
|
@@ -9626,7 +9664,7 @@ class FoehnMultiUploadComponent extends AbstractFoehnUploaderComponent {
|
|
|
9626
9664
|
}
|
|
9627
9665
|
}
|
|
9628
9666
|
FoehnMultiUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: FoehnMultiUploadComponent, deps: [{ token: MultiUploadService }, { token: PendingUploadService }, { token: ApplicationInfoService }, { token: FoehnConfirmModalService }, { token: SdkDictionaryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9629
|
-
FoehnMultiUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnMultiUploadComponent, selector: "foehn-multi-upload", inputs: { url: "url", reference: "reference" }, providers: [
|
|
9667
|
+
FoehnMultiUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnMultiUploadComponent, selector: "foehn-multi-upload", inputs: { url: "url", reference: "reference", shouldDisplayFileSavedConfirmation: "shouldDisplayFileSavedConfirmation" }, providers: [
|
|
9630
9668
|
{
|
|
9631
9669
|
provide: FoehnInputComponent,
|
|
9632
9670
|
useExisting: forwardRef(() => FoehnMultiUploadComponent),
|
|
@@ -9651,6 +9689,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
|
|
|
9651
9689
|
type: Input
|
|
9652
9690
|
}], reference: [{
|
|
9653
9691
|
type: Input
|
|
9692
|
+
}], shouldDisplayFileSavedConfirmation: [{
|
|
9693
|
+
type: Input
|
|
9654
9694
|
}] } });
|
|
9655
9695
|
|
|
9656
9696
|
class FoehnMultiUploadModule {
|
|
@@ -9694,12 +9734,13 @@ class BoMultiUploadService {
|
|
|
9694
9734
|
this.uniqPrefix = new Date().getTime();
|
|
9695
9735
|
this.uploaderHelper = new UploaderHelper(dictionaryService, applicationInfoService);
|
|
9696
9736
|
}
|
|
9697
|
-
uploadDocuments(url, formKey, label, files, key, isMultiple, language) {
|
|
9737
|
+
uploadDocuments(url, formKey, label, files, key, isMultiple, language, shouldDisplayFileSavedConfirmation) {
|
|
9698
9738
|
const documents = files.map(file => this.uploaderHelper.mapToDocumentReference(file, label, key, isMultiple, this.uniqPrefix, this.globalSequence++));
|
|
9699
9739
|
const formData = this.uploaderHelper.mapToFormData(documents, formKey, language);
|
|
9700
9740
|
return this.httpClient.post(url, formData).pipe(tap(result => {
|
|
9701
9741
|
const successfulDocumentsCount = result.documents && result.documents.length;
|
|
9702
|
-
if (successfulDocumentsCount
|
|
9742
|
+
if (successfulDocumentsCount &&
|
|
9743
|
+
shouldDisplayFileSavedConfirmation) {
|
|
9703
9744
|
const message = `${successfulDocumentsCount} fichier(s) sauvegardé(s) avec succès`;
|
|
9704
9745
|
this.growlService.addWithType(GrowlType.SUCCESS, message);
|
|
9705
9746
|
}
|
|
@@ -9741,6 +9782,7 @@ class FoehnBoMultiUploadComponent extends AbstractFoehnUploaderComponent {
|
|
|
9741
9782
|
this.applicationInfoService = applicationInfoService;
|
|
9742
9783
|
this.confirmModalService = confirmModalService;
|
|
9743
9784
|
this.dictionaryService = dictionaryService;
|
|
9785
|
+
this.shouldDisplayFileSavedConfirmation = true;
|
|
9744
9786
|
this.documentDeleted = new EventEmitter();
|
|
9745
9787
|
this.boMultiUploadService = boMultiUploadService;
|
|
9746
9788
|
}
|
|
@@ -9752,7 +9794,7 @@ class FoehnBoMultiUploadComponent extends AbstractFoehnUploaderComponent {
|
|
|
9752
9794
|
// Only one call every 300ms to stop concurrent access
|
|
9753
9795
|
throttleTime(300),
|
|
9754
9796
|
// Only one concurrent call at the time
|
|
9755
|
-
mergeMap(files => this.boMultiUploadService.uploadDocuments(this.uploadUrl, this.name, this.label, files, this.key, this.multiple, this.currentLanguage), 1))
|
|
9797
|
+
mergeMap(files => this.boMultiUploadService.uploadDocuments(this.uploadUrl, this.name, this.label, files, this.key, this.multiple, this.currentLanguage, this.shouldDisplayFileSavedConfirmation), 1))
|
|
9756
9798
|
.subscribe(({ documents, errors }) => {
|
|
9757
9799
|
this.displayResultFromServer(documents, errors);
|
|
9758
9800
|
}, (error) => {
|
|
@@ -9858,7 +9900,7 @@ class FoehnBoMultiUploadComponent extends AbstractFoehnUploaderComponent {
|
|
|
9858
9900
|
}
|
|
9859
9901
|
}
|
|
9860
9902
|
FoehnBoMultiUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: FoehnBoMultiUploadComponent, deps: [{ token: BoMultiUploadService }, { token: ApplicationInfoService }, { token: FoehnConfirmModalService }, { token: SdkDictionaryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9861
|
-
FoehnBoMultiUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnBoMultiUploadComponent, selector: "foehn-bo-multi-upload", inputs: { uploadUrl: "uploadUrl", deleteUrl: "deleteUrl", downloadUrl: "downloadUrl" }, outputs: { documentDeleted: "documentDeleted" }, providers: [
|
|
9903
|
+
FoehnBoMultiUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnBoMultiUploadComponent, selector: "foehn-bo-multi-upload", inputs: { uploadUrl: "uploadUrl", deleteUrl: "deleteUrl", downloadUrl: "downloadUrl", shouldDisplayFileSavedConfirmation: "shouldDisplayFileSavedConfirmation" }, outputs: { documentDeleted: "documentDeleted" }, providers: [
|
|
9862
9904
|
{
|
|
9863
9905
|
provide: FoehnInputComponent,
|
|
9864
9906
|
useExisting: forwardRef(() => FoehnBoMultiUploadComponent),
|
|
@@ -9885,6 +9927,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
|
|
|
9885
9927
|
type: Input
|
|
9886
9928
|
}], downloadUrl: [{
|
|
9887
9929
|
type: Input
|
|
9930
|
+
}], shouldDisplayFileSavedConfirmation: [{
|
|
9931
|
+
type: Input
|
|
9888
9932
|
}], documentDeleted: [{
|
|
9889
9933
|
type: Output
|
|
9890
9934
|
}] } });
|
|
@@ -9959,6 +10003,7 @@ class FoehnPictureUploadComponent extends FoehnInputComponent {
|
|
|
9959
10003
|
this.croppedPictureFilename = 'photo.png';
|
|
9960
10004
|
this.resizeToWidth = 300;
|
|
9961
10005
|
this.resizeToHeight = 0;
|
|
10006
|
+
this.shouldDisplayFileSavedConfirmation = true;
|
|
9962
10007
|
this.loading = false;
|
|
9963
10008
|
}
|
|
9964
10009
|
ngOnInit() {
|
|
@@ -9998,7 +10043,7 @@ class FoehnPictureUploadComponent extends FoehnInputComponent {
|
|
|
9998
10043
|
this.markAsPristine();
|
|
9999
10044
|
const photo = convertBase64UrlToFile(this.croppedPictureAsBase64Url, this.croppedPictureFilename);
|
|
10000
10045
|
this.uploadService
|
|
10001
|
-
.uploadDocuments(this.baseUrl, this.name, this.label, [photo], this.key, false, this.currentLanguage)
|
|
10046
|
+
.uploadDocuments(this.baseUrl, this.name, this.label, [photo], this.key, false, this.currentLanguage, this.shouldDisplayFileSavedConfirmation)
|
|
10002
10047
|
.pipe(filter(result => !!result))
|
|
10003
10048
|
.subscribe(({ documents, errors }) => {
|
|
10004
10049
|
this.resetPictureSelection();
|
|
@@ -10041,7 +10086,7 @@ class FoehnPictureUploadComponent extends FoehnInputComponent {
|
|
|
10041
10086
|
}
|
|
10042
10087
|
}
|
|
10043
10088
|
FoehnPictureUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: FoehnPictureUploadComponent, deps: [{ token: GrowlBrokerService }, { token: MultiUploadService }, { token: SdkDictionaryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
10044
|
-
FoehnPictureUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnPictureUploadComponent, selector: "foehn-picture-upload", inputs: { name: "name", key: "key", label: "label", baseUrl: "baseUrl", croppedPictureFilename: "croppedPictureFilename", resizeToWidth: "resizeToWidth", resizeToHeight: "resizeToHeight" }, providers: [
|
|
10089
|
+
FoehnPictureUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnPictureUploadComponent, selector: "foehn-picture-upload", inputs: { name: "name", key: "key", label: "label", baseUrl: "baseUrl", croppedPictureFilename: "croppedPictureFilename", resizeToWidth: "resizeToWidth", resizeToHeight: "resizeToHeight", shouldDisplayFileSavedConfirmation: "shouldDisplayFileSavedConfirmation" }, providers: [
|
|
10045
10090
|
{
|
|
10046
10091
|
provide: FoehnInputComponent,
|
|
10047
10092
|
useExisting: forwardRef(() => FoehnPictureUploadComponent),
|
|
@@ -10075,6 +10120,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
|
|
|
10075
10120
|
type: Input
|
|
10076
10121
|
}], resizeToHeight: [{
|
|
10077
10122
|
type: Input
|
|
10123
|
+
}], shouldDisplayFileSavedConfirmation: [{
|
|
10124
|
+
type: Input
|
|
10078
10125
|
}] } });
|
|
10079
10126
|
|
|
10080
10127
|
class FoehnPictureUploadModule {
|