@dsivd/prestations-ng 16.4.2 → 16.4.3
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 +8 -0
- package/dsivd-prestations-ng-v16.4.3.tgz +0 -0
- package/esm2020/sdk-dictionary/default-dictionary.mjs +10 -1
- package/esm2020/sdk-epayment/sdk-epayment.component.mjs +22 -28
- package/esm2020/sdk-epayment/sdk-epayment.module.mjs +5 -4
- package/fesm2015/dsivd-prestations-ng.mjs +32 -30
- package/fesm2015/dsivd-prestations-ng.mjs.map +1 -1
- package/fesm2020/dsivd-prestations-ng.mjs +32 -30
- package/fesm2020/dsivd-prestations-ng.mjs.map +1 -1
- package/package.json +1 -1
- package/sdk-epayment/sdk-epayment.component.d.ts +4 -4
- package/sdk-epayment/sdk-epayment.module.d.ts +2 -1
- package/dsivd-prestations-ng-v16.4.2.tgz +0 -0
|
@@ -831,6 +831,15 @@ const DEFAULT_DICTIONARY = {
|
|
|
831
831
|
'foehn-date-picker.screen-reader.actual-month-displayed': 'Mois actuellement affiché :',
|
|
832
832
|
'foehn-date-picker.screen-reader.month-input.label': 'Sélectionner un mois',
|
|
833
833
|
'foehn-date-picker.screen-reader.year-input.label': 'Sélectionner une année',
|
|
834
|
+
'epayment-form.errors.title': "Le paiement n'a pu être effectué",
|
|
835
|
+
'epayment-form.errors.back': 'Vous avez abandonné le paiement électronique.',
|
|
836
|
+
'epayment-form.errors.cancel': 'Vous avez abandonné le paiement électronique.',
|
|
837
|
+
'epayment-form.errors.refused': 'Le paiement a été refusé par le fournisseur de paiement électronique.',
|
|
838
|
+
'epayment-form.errors.unknown-error': 'Une erreur est survenue lors du paiement.<br/>' +
|
|
839
|
+
'Veuillez réessayer ou choisir un autre mode de paiement si disponible.',
|
|
840
|
+
'epayment-form.errors.default': 'Un problème non identifié est survenu lors du paiement électronique.',
|
|
841
|
+
'epayment-form.redirection.title': 'Paiement en préparation',
|
|
842
|
+
'epayment-form.redirection.text': 'Vous allez être redirigé vers notre fournisseur de paiement électronique.',
|
|
834
843
|
'errors.IMAGE_NOT_READABLE': "Votre pièce jointe %1$s n'est pas une image valide",
|
|
835
844
|
'errors.FILENAME_TOO_LONG': 'Votre pièce jointe %1$s a un nom du fichier qui excède le maximum autorisé : %2$s caractères',
|
|
836
845
|
'errors.FILE_TOO_SMALL': 'Votre pièce jointe %1$s a une taille inférieure au minimum exigé : %2$s bytes',
|
|
@@ -13641,27 +13650,19 @@ class SdkEpaymentComponent {
|
|
|
13641
13650
|
this.gesDemService = gesDemService;
|
|
13642
13651
|
this.gesdemEventService = gesdemEventService;
|
|
13643
13652
|
this.baseUrl = 'api/';
|
|
13644
|
-
this.
|
|
13645
|
-
this.
|
|
13646
|
-
this.
|
|
13647
|
-
|
|
13648
|
-
['
|
|
13649
|
-
[
|
|
13650
|
-
|
|
13651
|
-
|
|
13652
|
-
],
|
|
13653
|
-
[
|
|
13654
|
-
'error',
|
|
13655
|
-
'Une erreur est survenue lors du paiement. Veuillez réessayer ou choisir un autre mode de paiement si disponible.'
|
|
13656
|
-
]
|
|
13653
|
+
this.platformFailureMessageDicoKey = 'epayment-form.errors.default';
|
|
13654
|
+
this.failureModalDisplayed = false;
|
|
13655
|
+
this.redirectModalDisplayed = false;
|
|
13656
|
+
this.failureMessageDicoKeyByCode = new Map([
|
|
13657
|
+
['back', 'epayment-form.errors.back'],
|
|
13658
|
+
['cancel', 'epayment-form.errors.cancel'],
|
|
13659
|
+
['refused', 'epayment-form.errors.refused'],
|
|
13660
|
+
['error', 'epayment-form.errors.unknown-error']
|
|
13657
13661
|
]);
|
|
13658
13662
|
}
|
|
13659
13663
|
ngOnInit() {
|
|
13660
13664
|
// En cas d'échec, la plateforme nous renvoie dans la page avec une raison.
|
|
13661
|
-
this.
|
|
13662
|
-
if (this.platformFailureReason) {
|
|
13663
|
-
this.handleFailure();
|
|
13664
|
-
}
|
|
13665
|
+
this.handleFailure(this.route.snapshot.queryParams.REASON);
|
|
13665
13666
|
}
|
|
13666
13667
|
/**
|
|
13667
13668
|
* Déclenche le processus de paiement électronique. Le paiement est d'abord préparé avec GesDem, puis on navigue
|
|
@@ -13674,31 +13675,32 @@ class SdkEpaymentComponent {
|
|
|
13674
13675
|
.createPendingPayment(reference, this.baseUrl)
|
|
13675
13676
|
// eslint-disable-next-line rxjs-angular/prefer-async-pipe
|
|
13676
13677
|
.subscribe(redirectUrl => {
|
|
13678
|
+
this.redirectModalDisplayed = true;
|
|
13677
13679
|
window.location.href = redirectUrl;
|
|
13678
13680
|
});
|
|
13679
13681
|
}
|
|
13680
|
-
handleFailure() {
|
|
13681
|
-
|
|
13682
|
-
|
|
13683
|
-
this.platformFailureMessage = message;
|
|
13682
|
+
handleFailure(failureCode) {
|
|
13683
|
+
if (!failureCode?.length) {
|
|
13684
|
+
return;
|
|
13684
13685
|
}
|
|
13686
|
+
this.platformFailureMessageDicoKey =
|
|
13687
|
+
this.failureMessageDicoKeyByCode.get(failureCode) ||
|
|
13688
|
+
this.platformFailureMessageDicoKey;
|
|
13685
13689
|
this.gesdemEventService
|
|
13686
13690
|
.formInitializationObservable()
|
|
13687
13691
|
.pipe(first())
|
|
13688
13692
|
// eslint-disable-next-line rxjs-angular/prefer-async-pipe
|
|
13689
13693
|
.subscribe(() => {
|
|
13690
|
-
|
|
13691
|
-
.reference;
|
|
13692
|
-
this.ePaymentService.cancelPendingPayment(reference, this.baseUrl);
|
|
13694
|
+
this.ePaymentService.cancelPendingPayment(this.gesDemService.lastResponse.meta.reference, this.baseUrl);
|
|
13693
13695
|
});
|
|
13694
|
-
this.
|
|
13696
|
+
this.failureModalDisplayed = true;
|
|
13695
13697
|
}
|
|
13696
13698
|
}
|
|
13697
13699
|
SdkEpaymentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkEpaymentComponent, deps: [{ token: EPaymentService }, { token: i1$1.ActivatedRoute }, { token: GesdemHandlerService }, { token: GesdemEventService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13698
|
-
SdkEpaymentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SdkEpaymentComponent, selector: "epayment-form", inputs: { baseUrl: "baseUrl" }, ngImport: i0, template: "<foehn-modal\n [isModalVisible]=\"this.
|
|
13700
|
+
SdkEpaymentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SdkEpaymentComponent, selector: "epayment-form", inputs: { baseUrl: "baseUrl" }, ngImport: i0, template: "<foehn-modal\n [isModalVisible]=\"this.failureModalDisplayed\"\n [modalHeaderText]=\"'epayment-form.errors.title' | fromDictionary\"\n [modalBodyText]=\"this.platformFailureMessageDicoKey | fromDictionary\"\n (click)=\"this.failureModalDisplayed = false\"\n></foehn-modal>\n\n<foehn-modal\n [isModalVisible]=\"this.redirectModalDisplayed\"\n [modalHeaderText]=\"'epayment-form.redirection.title' | fromDictionary\"\n [modalBodyText]=\"'epayment-form.redirection.text' | fromDictionary\"\n [closeable]=\"false\"\n>\n <span modal-footer>\n <!-- empty footer => no close button-->\n </span>\n</foehn-modal>\n", styles: [""], dependencies: [{ kind: "component", type: FoehnModalComponent, selector: "foehn-modal", inputs: ["id", "name", "modalSize", "modalBodyText", "modalHeaderText", "closeable", "modalTriggerHtmlElement", "isModalVisible"], outputs: ["isModalVisibleChange"] }, { kind: "pipe", type: SdkDictionaryPipe, name: "fromDictionary" }] });
|
|
13699
13701
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkEpaymentComponent, decorators: [{
|
|
13700
13702
|
type: Component,
|
|
13701
|
-
args: [{ selector: 'epayment-form', template: "<foehn-modal\n [isModalVisible]=\"this.
|
|
13703
|
+
args: [{ selector: 'epayment-form', template: "<foehn-modal\n [isModalVisible]=\"this.failureModalDisplayed\"\n [modalHeaderText]=\"'epayment-form.errors.title' | fromDictionary\"\n [modalBodyText]=\"this.platformFailureMessageDicoKey | fromDictionary\"\n (click)=\"this.failureModalDisplayed = false\"\n></foehn-modal>\n\n<foehn-modal\n [isModalVisible]=\"this.redirectModalDisplayed\"\n [modalHeaderText]=\"'epayment-form.redirection.title' | fromDictionary\"\n [modalBodyText]=\"'epayment-form.redirection.text' | fromDictionary\"\n [closeable]=\"false\"\n>\n <span modal-footer>\n <!-- empty footer => no close button-->\n </span>\n</foehn-modal>\n" }]
|
|
13702
13704
|
}], ctorParameters: function () { return [{ type: EPaymentService }, { type: i1$1.ActivatedRoute }, { type: GesdemHandlerService }, { type: GesdemEventService }]; }, propDecorators: { baseUrl: [{
|
|
13703
13705
|
type: Input
|
|
13704
13706
|
}] } });
|
|
@@ -13706,12 +13708,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
13706
13708
|
class SdkEpaymentModule {
|
|
13707
13709
|
}
|
|
13708
13710
|
SdkEpaymentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkEpaymentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13709
|
-
SdkEpaymentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SdkEpaymentModule, declarations: [SdkEpaymentComponent], imports: [CommonModule, FoehnModalModule], exports: [SdkEpaymentComponent] });
|
|
13710
|
-
SdkEpaymentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkEpaymentModule, providers: [GrowlBrokerService], imports: [CommonModule, FoehnModalModule] });
|
|
13711
|
+
SdkEpaymentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SdkEpaymentModule, declarations: [SdkEpaymentComponent], imports: [CommonModule, FoehnModalModule, SdkDictionaryModule], exports: [SdkEpaymentComponent] });
|
|
13712
|
+
SdkEpaymentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkEpaymentModule, providers: [GrowlBrokerService], imports: [CommonModule, FoehnModalModule, SdkDictionaryModule] });
|
|
13711
13713
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkEpaymentModule, decorators: [{
|
|
13712
13714
|
type: NgModule,
|
|
13713
13715
|
args: [{
|
|
13714
|
-
imports: [CommonModule, FoehnModalModule],
|
|
13716
|
+
imports: [CommonModule, FoehnModalModule, SdkDictionaryModule],
|
|
13715
13717
|
declarations: [SdkEpaymentComponent],
|
|
13716
13718
|
providers: [GrowlBrokerService],
|
|
13717
13719
|
exports: [SdkEpaymentComponent]
|