@dsivd/prestations-ng 18.3.13 → 18.3.15-beta.1

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
@@ -6,6 +6,38 @@
6
6
 
7
7
  ---
8
8
 
9
+ ## [18.3.15]
10
+
11
+ ### Updated
12
+
13
+ - [foehn-navigation.component.html](projects/prestations-ng/src/foehn-navigation/foehn-navigation/foehn-navigation.component.html)
14
+ - [foehn-simple-navigation.component.html](projects/prestations-ng/src/foehn-navigation/foehn-simple-navigation/foehn-simple-navigation.component.html)
15
+ - while the page targeted by "next", "transmit" or "previous" is loading for more than 200 ms (e.g. lazy loaded route), the clicked button displays a spinner with the new `loadingLabel` input (dictionary key `foehn-navigation.loading.label`, "Chargement...") and the navigation buttons are disabled (`aria-disabled`; clicks are ignored from the start of the navigation); a `role="status"` region announces the loading to screen readers
16
+ - [foehn-navigation.service.ts](projects/prestations-ng/src/foehn-navigation/foehn-navigation.service.ts)
17
+ - new method `pendingNavigationDirection()`: direction of the navigation started with `next()` or `previous()` until it ends, `null` otherwise
18
+
19
+ ### Fixed
20
+
21
+ - [abstract-page-component.ts](projects/prestations-ng/src/abstract-page-component.ts)
22
+ - fixed a second click on "next" or "transmit" while the next page is loading (lazy loaded route, resolver, async guard) saving again and skipping the next page: `send()`, `sendAndTransmit()` and `transmit()` are now ignored until the navigation to the next page ends
23
+ - new protected method `navigateToNextPage()`: pages overriding `onFormSent()` should call it instead of `this._navigation.next()` to get this protection
24
+ - [abstract-page-from-menu.component.ts](projects/prestations-ng/src/foehn-menu-prestation/abstract-page-from-menu.component.ts)
25
+ - same fix when returning to the parent page
26
+
27
+ ## [18.3.14]
28
+
29
+ ### Fixed
30
+
31
+ - [foehn-input-phone.component.ts](projects/prestations-ng/src/foehn-input/foehn-input-phone.component.ts)
32
+ - fixed help texts to be aligned with ch.vd.cyber.prestationsbe.validation.PhoneNumberValidator (prestations-be)
33
+ - dictionary keys have changed to be more explicit :
34
+ - foehn-input-phone.STANDARD_HELPTEXT_SWISS_FIX_AND_MOBILE
35
+ - foehn-input-phone.STANDARD_HELPTEXT_SWISS_FIX_ONLY
36
+ - foehn-input-phone.STANDARD_HELPTEXT_SWISS_MOBILE_ONLY
37
+ - foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_FIX_AND_MOBILE
38
+ - foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_FIX_ONLY
39
+ - foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_MOBILE_ONLY
40
+
9
41
  ## [18.3.13]
10
42
 
11
43
  ### Fixed
package/UPGRADING_V19.md CHANGED
@@ -11,8 +11,8 @@ From here on, we are in the root folder of your project, for example ~/git/cybsd
11
11
 
12
12
  ### Spring Boot 4
13
13
 
14
- You can switch to Java 25 `jdk25` + change in IntelliJ: right-click on your project > Open Module Settings > Project > set "SDK" to `jdk25` from devtools and "Language
15
- level" to `25` in "Modules"
14
+ You can switch to Java 25 `jdk25` + change in IntelliJ: right-click on your project > Open Module Settings > Project > set "SDK" to `jdk25` from devtools and "Language
15
+ level" to `25` in "Modules"
16
16
 
17
17
  Use the latest application-parent v15+ in your `pom.xml`.
18
18
 
@@ -53,6 +53,7 @@ If the following plugin with Lombok path was added by the recipe, remove this pl
53
53
  ```
54
54
 
55
55
  If the code uses `AutoConfigureMockMvc`, add:
56
+
56
57
  ```xml
57
58
  <dependency>
58
59
  <groupId>org.springframework.boot</groupId>
@@ -60,9 +61,10 @@ If the code uses `AutoConfigureMockMvc`, add:
60
61
  <scope>test</scope>
61
62
  </dependency>
62
63
  ```
64
+
63
65
  And replace the old `AutoConfigureMockMvc` import which is not recognized anymore by the new one.
64
66
 
65
- If we use in pom.xml Spring/Hibernate dependencies (like hibernate-jpamodelgen), check the Spring Boot 4 migration
67
+ If we use in pom.xml Spring/Hibernate dependencies (like hibernate-jpamodelgen), check the Spring Boot 4 migration
66
68
  guide to see if it has been replaced by another library: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Migration-Guide
67
69
 
68
70
  ### Jackson migration
@@ -72,14 +74,16 @@ Replace `com.fasterxml.jackson.databind.ObjectMapper` with `tools.jackson.databi
72
74
 
73
75
  ### Brave Tracer
74
76
 
75
- If you are using Brave Tracer (search `brace.Tracer` in the code, usually in backoffices), you need to replace it with
77
+ If you are using Brave Tracer (search `brace.Tracer` in the code, usually in backoffices), you need to replace it with
76
78
  OpenTelemetry by adding the following dependency:
79
+
77
80
  ```xml
78
81
  <dependency>
79
82
  <groupId>org.springframework.boot</groupId>
80
83
  <artifactId>spring-boot-micrometer-tracing-brave</artifactId>
81
84
  </dependency>
82
85
  ```
86
+
83
87
  And replace `brave.Tracer` imports by `io.micrometer.tracing.Tracer`;
84
88
 
85
89
  ### Property migration
@@ -100,8 +104,8 @@ Look for logs that indicate property you should migrate (watch for WARN logs of
100
104
 
101
105
  Spring boot 4 doesn't support calling a controller with a trailing slash, fix the url called (/api/ping != /api/ping**/**)
102
106
 
103
-
104
107
  ### Clean Sonar code smells
108
+
105
109
  You can use the following OpenRewrite recipes to clean Sonar code smells. It is recommended to do it after the migration to avoid mixing the migration changes with code cleaning changes, and to make it easier to review.
106
110
 
107
111
  ```bash
@@ -38,6 +38,7 @@ export declare abstract class AbstractPageComponent<T extends I18nForm> implemen
38
38
  private _currentLangSubscription;
39
39
  private _transmitConcurrentSafe;
40
40
  private _gesdemSaveSubscription;
41
+ private _isNavigatingToNextPage;
41
42
  private readonly _registerNgModelService;
42
43
  constructor(activatedRoute: ActivatedRoute);
43
44
  ngOnInit(): void;
@@ -50,6 +51,14 @@ export declare abstract class AbstractPageComponent<T extends I18nForm> implemen
50
51
  protected setPageTitle(pageTitle: string): void;
51
52
  protected setPageTitleAsync(pageTitle: Observable<string>): void;
52
53
  protected onFormSent(goToNextPage: boolean): void;
54
+ /**
55
+ * Navigates to the next page and ignores send(), sendAndTransmit() and transmit() until the navigation ends.
56
+ *
57
+ * The current page stays displayed and clickable while the next one is activated (e.g. lazy loaded route,
58
+ * resolver or async guard): a second click on "next" would save again, then navigate once more from the
59
+ * next page and skip it.
60
+ */
61
+ protected navigateToNextPage(): Promise<void>;
53
62
  private checkHasPendingsFilesBeforeTransmit;
54
63
  private gotToTop;
55
64
  abstract newForm(): T;