@dsivd/prestations-ng 19.0.2-beta.5 → 19.0.2

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,14 @@
6
6
 
7
7
  ---
8
8
 
9
+ ## [19.0.2]
10
+
11
+ ### Fixed
12
+
13
+ - [recaptcha.service.ts](projects/prestations-ng/src/sdk-recaptcha/recaptcha.service.ts)
14
+ - fixed recaptcha called infinitely when backend says that it must be revalidated
15
+
16
+
9
17
  ## [19.0.0] - should be aligned with prestations-be 19.0.x
10
18
 
11
19
  ### Added
@@ -42,6 +50,13 @@
42
50
  - [foehn-list-summary.component.ts](projects/prestations-ng/src/foehn-menu-prestation/foehn-list-summary/foehn-list-summary.component.ts)
43
51
  - `[list]` attribut has been removed. Use `[model]` instead.
44
52
 
53
+ ## [18.3.13]
54
+
55
+ ### Fixed
56
+
57
+ - [recaptcha.service.ts](projects/prestations-ng/src/sdk-recaptcha/recaptcha.service.ts)
58
+ - fixed recaptcha called infinitely when backend says that it must be revalidated
59
+
45
60
  ## [18.3.12]
46
61
 
47
62
  ### Updated
package/UPGRADING_V17.md CHANGED
@@ -151,7 +151,7 @@ Add `/.nx/cache`
151
151
  ```bash
152
152
  npm install @angular/cli@17 -g
153
153
  ng update @angular/core@17 @angular/cli@17 --force
154
- ng update @dsivd/prestations-ng@latest
154
+ ng update @dsivd/prestations-ng@17
155
155
  ng update rxjs@7
156
156
  ng update @angular-eslint/builder@17
157
157
  ng update @angular-eslint/eslint-plugin@17 @angular-eslint/eslint-plugin-template@17 @angular-eslint/template-parser@17
@@ -167,6 +167,11 @@ npm install puppeteer@~23.5.2 --save-dev
167
167
  npm update
168
168
  ```
169
169
 
170
+ If you go errors like "npm error code ERESOLVE
171
+ npm error ERESOLVE could not resolve
172
+ " while executing `npm remove puppeteer`, you can run :
173
+ `npm i primeng@^17 primeicons@^7 @angular/cdk@^17 @angular/material@^17` to align versions first.
174
+
170
175
  #### Align Angular & ESLint versions
171
176
 
172
177
  Make sure that @angular & @angular-eslint packages are aligned up to the minor version (17.X).
package/UPGRADING_V18.md CHANGED
@@ -456,8 +456,9 @@ Just FYI if you are curious about the details, you can find the Angular update g
456
456
  ```bash
457
457
  npm install @angular/cli@19 -g
458
458
  ng update typescript@5.5
459
- ng update @dsivd/prestations-ng@latest
459
+ ng update @dsivd/prestations-ng@18
460
460
  ```
461
+ NB: You might need to use the --force option.
461
462
 
462
463
  When asked the question "Select the migrations that you'd like to run", accept "provide-initializer" by hitting "Space" key then "Enter".
463
464
 
package/UPGRADING_V19.md CHANGED
@@ -291,6 +291,7 @@ When a unique identifier such as `id` is not possible, track by object or as a l
291
291
  ```bash
292
292
  ng update @angular/cdk@20
293
293
  ```
294
+ NB: you might need to use the `--force` option
294
295
 
295
296
  ### Running with node 22+
296
297
 
@@ -314,6 +315,8 @@ Update your `package.json` file to specify the node engine:
314
315
 
315
316
  ```diff
316
317
  buildAppPipelinePodmanUT([
318
+ - jdk: 21,
319
+ + jdk: 25,
317
320
  - node: 20,
318
321
  + node: 22,
319
322
  ])
@@ -577,7 +580,7 @@ ng generate @angular/core:route-lazy-loading
577
580
 
578
581
  Here is an example when doing it manually because schematic above does not work as intended:
579
582
 
580
- Your `app.routing.ts` file should look something like this:
583
+ Your `app.routes.ts` file should look something like this:
581
584
 
582
585
  ```ts
583
586
  const routes: Routes = [
Binary file
@@ -4418,13 +4418,22 @@ class FoehnInputStringComponent extends FoehnInputComponent {
4418
4418
  super.onBlur(e);
4419
4419
  }
4420
4420
  onModelChange(value) {
4421
- if (value === undefined || value === null || !!value) {
4421
+ if (value === undefined ||
4422
+ value === null ||
4423
+ !!value ||
4424
+ this.isZeroAsNumber(value)) {
4422
4425
  this.updateNgModel(value);
4423
4426
  }
4424
4427
  else {
4425
4428
  this.updateNgModel(null);
4426
4429
  }
4427
4430
  }
4431
+ isZeroAsNumber(value) {
4432
+ if (typeof value === 'number') {
4433
+ return value === 0;
4434
+ }
4435
+ return false;
4436
+ }
4428
4437
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: FoehnInputStringComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
4429
4438
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.19", type: FoehnInputStringComponent, isStandalone: true, inputs: { trimOnBlur: { classPropertyName: "trimOnBlur", publicName: "trimOnBlur", isSignal: true, isRequired: false, transformFunction: null }, sanitizeOnBlur: { classPropertyName: "sanitizeOnBlur", publicName: "sanitizeOnBlur", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
4430
4439
  }
@@ -4604,6 +4613,7 @@ class RecaptchaService {
4604
4613
  this.applicationInfoService = inject(ApplicationInfoService);
4605
4614
  this.sdkLogsService = inject(SdkLogsService);
4606
4615
  this.errorsSubject = new BehaviorSubject([]);
4616
+ this.gesdemFormErrors = [];
4607
4617
  this.errors = this.initErrorObservable(); // has to be first since it is used in initShouldDisplayObservable !
4608
4618
  this.shouldDisplay = this.initShouldDisplayObservable();
4609
4619
  this.publicKey = this.initPublicKeyObservable();
@@ -4646,6 +4656,9 @@ class RecaptchaService {
4646
4656
  this.errorsSubject.next([newError, ...existingErrors]);
4647
4657
  }
4648
4658
  clearErrors() {
4659
+ // Remove recaptcha errors so it won't reset infinitely
4660
+ this.validationHandlerService.updateErrors(this.gesdemFormErrors.filter(error => error.code !== CAPTCHA_ERROR_NAME &&
4661
+ error.name !== CAPTCHA_ERROR_NAME));
4649
4662
  this.errorsSubject.next([]);
4650
4663
  }
4651
4664
  getErrors() {
@@ -4669,8 +4682,13 @@ class RecaptchaService {
4669
4682
  of([]),
4670
4683
  // Read from the gesdem service all errors.
4671
4684
  this.validationHandlerService.validationErrorsSubject).pipe(
4685
+ // Store all validation errors before filtering
4686
+ tap(errors => {
4687
+ this.gesdemFormErrors = errors;
4688
+ }),
4672
4689
  // Errors from GesDem, or nothing
4673
- map((errors) => errors.filter((ex) => CAPTCHA_ERROR_NAME === ex.code)));
4690
+ map((errors) => errors.filter((ex) => CAPTCHA_ERROR_NAME === ex.code ||
4691
+ CAPTCHA_ERROR_NAME === ex.name)));
4674
4692
  // Bind errors to the component, either from the backend of from this component
4675
4693
  return combineLatest([
4676
4694
  // Errors from gesdem matching the name of the captcha.
@@ -7169,7 +7187,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
7169
7187
  args: [{ selector: 'sdk-support-alert-container', imports: [SupportAlertComponent, AsyncPipe], template: "@if (hasAlerts | async) {\n <section class=\"d-flex flex-column container mt-2\">\n <h2 class=\"visually-hidden\">Messages de support</h2>\n @if (hasHiddenAlerts | async) {\n <div class=\"mb-2 mt-2\">\n <button\n type=\"button\"\n class=\"btn btn-link pe-0 ps-0\"\n (click)=\"restoreAllAlerts()\"\n >\n Afficher tous les messages\n </button>\n </div>\n }\n @for (alert of alertsToDisplay | async; track alert) {\n <sdk-support-alert [alert]=\"alert\" />\n }\n </section>\n}\n" }]
7170
7188
  }], propDecorators: { supportAlertUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "supportAlertUrl", required: false }] }], etapeId: [{ type: i0.Input, args: [{ isSignal: true, alias: "etapeId", required: false }] }] } });
7171
7189
 
7172
- const supportedBrowsers = /Edge?\/(14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(14\d|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(109|1[1-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(26\.([3-9]|\d{2,})|(2[7-9]|[3-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(12[7-9]|1[3-9]\d|[2-9]\d{2}|\d{4,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(18[._]([5-9]|\d{2,})|(19|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Opera Mini|Android:?[ /-](15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(15[2-9]|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(29|[3-9]\d|\d{3,})\.\d+|Android.+MQ{2}Browser\/(14(\.(9|\d{2,})|)|(1[5-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(2\.([5-9]|\d{2,})|([3-9]|\d{2,})\.\d+)(\.\d+|)/;
7190
+ const supportedBrowsers = /Edge?\/(149|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(14\d|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(109|1[1-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(26\.([3-9]|\d{2,})|(2[7-9]|[3-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(12[7-9]|1[3-9]\d|[2-9]\d{2}|\d{4,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(18[._]([5-9]|\d{2,})|(19|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Opera Mini|Android:?[ /-](15[1-9]|1[6-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(15[3-9]|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(15[1-9]|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(29|[3-9]\d|\d{3,})\.\d+|Android.+MQ{2}Browser\/(14(\.(9|\d{2,})|)|(1[5-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(2\.([5-9]|\d{2,})|([3-9]|\d{2,})\.\d+)(\.\d+|)/;
7173
7191
 
7174
7192
  class FoehnAppVersionMisMatchModalComponent {
7175
7193
  constructor() {