@dsivd/prestations-ng 16.5.1-beta.2 → 16.5.1-beta.4
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 +12 -2
- package/dsivd-prestations-ng-v16.5.1-beta.4.tgz +0 -0
- package/esm2020/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.component.mjs +20 -10
- package/esm2020/foehn-upload/foehn-bo-multi-upload/bo-multi-upload.service.mjs +17 -4
- package/fesm2015/dsivd-prestations-ng.mjs +34 -12
- package/fesm2015/dsivd-prestations-ng.mjs.map +1 -1
- package/fesm2020/dsivd-prestations-ng.mjs +34 -12
- package/fesm2020/dsivd-prestations-ng.mjs.map +1 -1
- package/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.component.d.ts +1 -0
- package/foehn-upload/foehn-bo-multi-upload/bo-multi-upload.service.d.ts +4 -1
- package/package.json +1 -1
- package/dsivd-prestations-ng-v16.5.1-beta.2.tgz +0 -0
|
@@ -11353,6 +11353,12 @@ class FoehnMultiselectAutocompleteComponent extends FoehnAutocompleteComponent {
|
|
|
11353
11353
|
this.hostName = this.hostId;
|
|
11354
11354
|
this.excludeFromErrorSummary = true;
|
|
11355
11355
|
}
|
|
11356
|
+
onModelChange(value) {
|
|
11357
|
+
super.onModelChange(value);
|
|
11358
|
+
if (!value || ObjectHelper.isEmpty(value)) {
|
|
11359
|
+
this.manageSuggestionListAndFocusAfterRemovingAnItem(null);
|
|
11360
|
+
}
|
|
11361
|
+
}
|
|
11356
11362
|
hasErrorsToDisplay() {
|
|
11357
11363
|
return !!this.autocompleteComponent
|
|
11358
11364
|
? this.autocompleteComponent.hasErrorsToDisplay()
|
|
@@ -11504,15 +11510,19 @@ class FoehnMultiselectAutocompleteComponent extends FoehnAutocompleteComponent {
|
|
|
11504
11510
|
manageSuggestionListAndFocusAfterRemovingAnItem(removedIndex) {
|
|
11505
11511
|
// Hide message saying no more suggestions to display
|
|
11506
11512
|
this.showEmptyListMessage = false;
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11513
|
+
if (this.autocompleteComponent) {
|
|
11514
|
+
// Manually show autocomplete because there is at least one suggestions to display
|
|
11515
|
+
this.autocompleteComponent.inputElement.nativeElement.hidden = false;
|
|
11516
|
+
// Add back selected item to autocomplete suggestion list
|
|
11517
|
+
this.autocompleteComponent.elements = this.filterAutocompleteElements(this.elements);
|
|
11518
|
+
}
|
|
11519
|
+
if (removedIndex !== null) {
|
|
11520
|
+
// When deleting a selected item, check were to set focus back when no more items to delete
|
|
11521
|
+
// eslint-disable-next-line rxjs-angular/prefer-async-pipe
|
|
11522
|
+
this.selectedElemRef.changes.pipe(first()).subscribe(() => {
|
|
11523
|
+
this.focusNextAreaAfterDelete(removedIndex);
|
|
11524
|
+
});
|
|
11525
|
+
}
|
|
11516
11526
|
}
|
|
11517
11527
|
showAlertMessageAndHideAutocomplete() {
|
|
11518
11528
|
// Show a message to user indicating there is no more suggestions to display
|
|
@@ -13610,12 +13620,13 @@ class BoDocumentsWithErrors {
|
|
|
13610
13620
|
}
|
|
13611
13621
|
|
|
13612
13622
|
class BoMultiUploadService {
|
|
13613
|
-
constructor(httpClient, growlService, applicationInfoService, dictionaryService, uploadProgressService) {
|
|
13623
|
+
constructor(httpClient, growlService, applicationInfoService, dictionaryService, uploadProgressService, iamInterceptor) {
|
|
13614
13624
|
this.httpClient = httpClient;
|
|
13615
13625
|
this.growlService = growlService;
|
|
13616
13626
|
this.applicationInfoService = applicationInfoService;
|
|
13617
13627
|
this.dictionaryService = dictionaryService;
|
|
13618
13628
|
this.uploadProgressService = uploadProgressService;
|
|
13629
|
+
this.iamInterceptor = iamInterceptor;
|
|
13619
13630
|
// A way to have a unique Id per file
|
|
13620
13631
|
this.globalSequence = 0;
|
|
13621
13632
|
this.NB_CONCURRENT_FILES_TO_UPLOAD = 3;
|
|
@@ -13667,6 +13678,7 @@ class BoMultiUploadService {
|
|
|
13667
13678
|
this.growlService.addWithType(GrowlType.SUCCESS, message);
|
|
13668
13679
|
}), catchError((e) => {
|
|
13669
13680
|
const message = this.dictionaryService.getKeySync('foehn-uploader.delete-error-message');
|
|
13681
|
+
this.manageBeneficiaryRequiredError(e);
|
|
13670
13682
|
this.growlService.addWithType(GrowlType.DANGER, message);
|
|
13671
13683
|
return throwError(() => e);
|
|
13672
13684
|
}));
|
|
@@ -13695,18 +13707,28 @@ class BoMultiUploadService {
|
|
|
13695
13707
|
this.uploadProgressService.showProgress.next(false);
|
|
13696
13708
|
const message = this.dictionaryService.getKeySync('foehn-uploader.transmission-error-message');
|
|
13697
13709
|
this.growlService.addWithType(GrowlType.DANGER, message);
|
|
13710
|
+
this.manageBeneficiaryRequiredError(e);
|
|
13698
13711
|
return throwError(() => e);
|
|
13699
13712
|
}));
|
|
13700
13713
|
}
|
|
13714
|
+
manageBeneficiaryRequiredError(httpErrorResponse) {
|
|
13715
|
+
if (!!httpErrorResponse) {
|
|
13716
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13717
|
+
const { error } = httpErrorResponse;
|
|
13718
|
+
if (error?.code === 'BENEFICIARY_REQUIRED') {
|
|
13719
|
+
this.iamInterceptor.setIamSessionExpiredManually();
|
|
13720
|
+
}
|
|
13721
|
+
}
|
|
13722
|
+
}
|
|
13701
13723
|
}
|
|
13702
|
-
BoMultiUploadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BoMultiUploadService, deps: [{ token: i1.HttpClient }, { token: GrowlBrokerService }, { token: ApplicationInfoService }, { token: SdkDictionaryService }, { token: UploadProgressService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13724
|
+
BoMultiUploadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BoMultiUploadService, deps: [{ token: i1.HttpClient }, { token: GrowlBrokerService }, { token: ApplicationInfoService }, { token: SdkDictionaryService }, { token: UploadProgressService }, { token: IamExpiredInterceptorService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13703
13725
|
BoMultiUploadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BoMultiUploadService, providedIn: 'root' });
|
|
13704
13726
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BoMultiUploadService, decorators: [{
|
|
13705
13727
|
type: Injectable,
|
|
13706
13728
|
args: [{
|
|
13707
13729
|
providedIn: 'root'
|
|
13708
13730
|
}]
|
|
13709
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: GrowlBrokerService }, { type: ApplicationInfoService }, { type: SdkDictionaryService }, { type: UploadProgressService }]; } });
|
|
13731
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: GrowlBrokerService }, { type: ApplicationInfoService }, { type: SdkDictionaryService }, { type: UploadProgressService }, { type: IamExpiredInterceptorService }]; } });
|
|
13710
13732
|
|
|
13711
13733
|
class FoehnBoMultiUploadComponent extends AbstractFoehnUploaderComponent {
|
|
13712
13734
|
constructor(boMultiUploadService, applicationInfoService, confirmModalService, dictionaryService, growlService, pageUploadLimitService) {
|