@dsivd/prestations-ng 18.2.0-beta.1 → 18.2.0-beta.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 CHANGED
@@ -27,6 +27,10 @@
27
27
  - `foehn-app-version-mismatch-modal.btn.save-and-reload` : Sauver et recharger
28
28
  - `foehn-app-version-mismatch-modal.btn.reload` : Recharger
29
29
 
30
+ ### Fixed
31
+ - [i18n-form.ts](projects/prestations-ng/src/i18n-form.ts)
32
+ - initialize referenceInterne with nothing instead of ''
33
+
30
34
  ## [18.1.1]
31
35
 
32
36
  ### Fixed
@@ -5854,7 +5854,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
5854
5854
  class I18nForm {
5855
5855
  constructor() {
5856
5856
  this.language = 'fr';
5857
- this.referenceInterne = '';
5858
5857
  }
5859
5858
  }
5860
5859
 
@@ -7903,11 +7902,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
7903
7902
  }], ctorParameters: () => [{ type: FoehnTransmitWaitingModalService }] });
7904
7903
 
7905
7904
  class FoehnAppVersionMisMatchModalComponent {
7906
- constructor(foehnPageService) {
7905
+ constructor(foehnPageService, gesdemService, registerNgModelService) {
7907
7906
  this.foehnPageService = foehnPageService;
7907
+ this.gesdemService = gesdemService;
7908
+ this.registerNgModelService = registerNgModelService;
7908
7909
  this.hasDemandeInProgress = false;
7909
- this.gesdemService = inject(GesdemHandlerService);
7910
- this.registerNgModelService = inject(RegisterNgModelService);
7911
7910
  this.isModalVisible = this.foehnPageService.onAppVersionMismatch().pipe(filter(mismatch => !!mismatch), first(), tap$1(() => {
7912
7911
  this.hasDemandeInProgress =
7913
7912
  !!this.gesdemService.lastResponse?.meta?.reference?.length;
@@ -7930,13 +7929,13 @@ class FoehnAppVersionMisMatchModalComponent {
7930
7929
  url.searchParams.set('t', Date.now().toString());
7931
7930
  window.location.href = url.toString();
7932
7931
  }
7933
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FoehnAppVersionMisMatchModalComponent, deps: [{ token: FoehnPageService }], target: i0.ɵɵFactoryTarget.Component }); }
7932
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FoehnAppVersionMisMatchModalComponent, deps: [{ token: FoehnPageService }, { token: GesdemHandlerService }, { token: RegisterNgModelService }], target: i0.ɵɵFactoryTarget.Component }); }
7934
7933
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FoehnAppVersionMisMatchModalComponent, isStandalone: false, selector: "foehn-app-version-mis-match-modal", ngImport: i0, template: "<foehn-modal\n [id]=\"'foehn-app-version-mismatch-modal'\"\n [modalHeaderText]=\"\n 'foehn-app-version-mismatch-modal.title' | fromDictionary\n \"\n modalSize=\"modal-md\"\n [isModalVisible]=\"isModalVisible | async\"\n [closeable]=\"false\"\n>\n <div\n id=\"foehn-app-version-mismatch-modal-body\"\n [innerHTML]=\"\n 'foehn-app-version-mismatch-modal.content' | fromDictionary\n \"\n ></div>\n\n <div modal-footer class=\"w-100\">\n <div class=\"d-flex\">\n <button\n id=\"saveAndReloadBtn\"\n type=\"button\"\n class=\"btn btn-primary ms-auto\"\n [innerHTML]=\"\n (hasDemandeInProgress\n ? 'foehn-app-version-mismatch-modal.btn.save-and-reload'\n : 'foehn-app-version-mismatch-modal.btn.reload'\n ) | fromDictionary\n \"\n (click)=\"saveAndReload()\"\n ></button>\n </div>\n </div>\n</foehn-modal>\n", styles: [":host ::ng-deep .modal{z-index:10000}\n"], dependencies: [{ kind: "component", type: FoehnModalComponent, selector: "foehn-modal", inputs: ["id", "name", "modalSize", "modalBodyText", "modalHeaderText", "closeable", "draggable", "hideable", "modalTriggerHtmlElement", "isModalVisible"], outputs: ["isModalVisibleChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: SdkDictionaryPipe, name: "fromDictionary" }] }); }
7935
7934
  }
7936
7935
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FoehnAppVersionMisMatchModalComponent, decorators: [{
7937
7936
  type: Component,
7938
7937
  args: [{ selector: 'foehn-app-version-mis-match-modal', standalone: false, template: "<foehn-modal\n [id]=\"'foehn-app-version-mismatch-modal'\"\n [modalHeaderText]=\"\n 'foehn-app-version-mismatch-modal.title' | fromDictionary\n \"\n modalSize=\"modal-md\"\n [isModalVisible]=\"isModalVisible | async\"\n [closeable]=\"false\"\n>\n <div\n id=\"foehn-app-version-mismatch-modal-body\"\n [innerHTML]=\"\n 'foehn-app-version-mismatch-modal.content' | fromDictionary\n \"\n ></div>\n\n <div modal-footer class=\"w-100\">\n <div class=\"d-flex\">\n <button\n id=\"saveAndReloadBtn\"\n type=\"button\"\n class=\"btn btn-primary ms-auto\"\n [innerHTML]=\"\n (hasDemandeInProgress\n ? 'foehn-app-version-mismatch-modal.btn.save-and-reload'\n : 'foehn-app-version-mismatch-modal.btn.reload'\n ) | fromDictionary\n \"\n (click)=\"saveAndReload()\"\n ></button>\n </div>\n </div>\n</foehn-modal>\n", styles: [":host ::ng-deep .modal{z-index:10000}\n"] }]
7939
- }], ctorParameters: () => [{ type: FoehnPageService }] });
7938
+ }], ctorParameters: () => [{ type: FoehnPageService }, { type: GesdemHandlerService }, { type: RegisterNgModelService }] });
7940
7939
 
7941
7940
  const LEAVING_ALERT_CONTENT = 'Ce changement de page entraine une perte des données non sauvegardées.<br/>Souhaitez-vous quand même continuer ?';
7942
7941
  const LEAVING_ALERT_OK = 'Poursuivre sans sauvegarder';
@@ -9709,6 +9708,17 @@ const APP_VERSION_HEADER = 'app-version';
9709
9708
  class AppInfoHeadersInterceptor {
9710
9709
  constructor() {
9711
9710
  this.foehnPageService = inject(FoehnPageService);
9711
+ this.errorListenerRegistered = false;
9712
+ // Enregistrer une seule fois
9713
+ if (!this.errorListenerRegistered) {
9714
+ window.addEventListener('error', (event) => {
9715
+ if (event.message?.includes('ChunkLoadError') ||
9716
+ event.message?.includes('Loading chunk')) {
9717
+ this.foehnPageService.setAppVersionMismatch();
9718
+ }
9719
+ });
9720
+ this.errorListenerRegistered = true;
9721
+ }
9712
9722
  }
9713
9723
  intercept(request, next) {
9714
9724
  return next.handle(request).pipe(tap$1((httpEvent) => {
@@ -9717,11 +9727,9 @@ class AppInfoHeadersInterceptor {
9717
9727
  if (!this.appVersion?.length) {
9718
9728
  this.appVersion = appVersionInHeader;
9719
9729
  }
9720
- else {
9721
- if (appVersionInHeader &&
9722
- this.appVersion !== appVersionInHeader) {
9723
- this.foehnPageService.setAppVersionMismatch();
9724
- }
9730
+ else if (appVersionInHeader &&
9731
+ this.appVersion !== appVersionInHeader) {
9732
+ this.foehnPageService.setAppVersionMismatch();
9725
9733
  }
9726
9734
  }
9727
9735
  }));
@@ -9734,7 +9742,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
9734
9742
  args: [{
9735
9743
  providedIn: 'root'
9736
9744
  }]
9737
- }] });
9745
+ }], ctorParameters: () => [] });
9738
9746
  const APP_INFO_HEADERS_INTERCEPTOR_PROVIDER = [
9739
9747
  {
9740
9748
  provide: HTTP_INTERCEPTORS,