@dsivd/prestations-ng 19.2.0-beta.11 → 19.2.0-beta.12
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 +3 -0
- package/CONTRIBUTING.md +1 -1
- package/GOOD_PRACTICES.md +4 -2
- package/UPGRADING_V19.md +16 -5
- package/fesm2022/dsivd-prestations-ng.mjs +4 -1
- package/fesm2022/dsivd-prestations-ng.mjs.map +1 -1
- package/package.json +1 -1
- package/dsivd-prestations-ng-19.2.0-beta.11.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -218,6 +218,9 @@ Please check the [UPGRADING_V19.md](UPGRADING_V19.md) guide for more information
|
|
|
218
218
|
- `ng add @dsivd/prestations-ng` works again on the Angular workspaces created since Angular 14: it failed because
|
|
219
219
|
`angular.json` no longer has a `defaultProject` (the dependencies are now added to every application), then
|
|
220
220
|
because of the comments of `tsconfig.json` (now kept, like its formatting).
|
|
221
|
+
- `foehn-feedback-notification`: an error of `api/feedbacknotification/queryparams/{reference}` is logged and the
|
|
222
|
+
links are displayed without the feedback url, it reached the `ErrorHandler` as unhandled.
|
|
223
|
+
- The npm package no longer contains its own archive (`dsivd-prestations-ng-<version>.tgz`).
|
|
221
224
|
|
|
222
225
|
## [19.1.1]
|
|
223
226
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -171,7 +171,7 @@ Alternatively, you can manually publish the package. Although this method is not
|
|
|
171
171
|
- Ensure you can push to the npm registry: `npm adduser --registry=https://registry.npmjs.org --scope=@dsivd`
|
|
172
172
|
- Update the version number in `package.json` either manually or with `npm version`
|
|
173
173
|
- Commit and tag the version change
|
|
174
|
-
- Package a new version of the library with `npm package`
|
|
174
|
+
- Package a new version of the library with `npm run package`
|
|
175
175
|
- Publish the package:
|
|
176
176
|
- `npm run publish:stable` for stable version (released to everybody)
|
|
177
177
|
- `npm run publish:next` for next version (development only)
|
package/GOOD_PRACTICES.md
CHANGED
|
@@ -461,8 +461,10 @@ private readonly changeDetectorRef = inject(ChangeDetectorRef);
|
|
|
461
461
|
ngOnInit(): void {
|
|
462
462
|
super.ngOnInit();
|
|
463
463
|
this.sessionInfoWithApplicationService.prefillForm((info) => {
|
|
464
|
-
this.form
|
|
465
|
-
|
|
464
|
+
if (this.form) {
|
|
465
|
+
this.form.email = info?.email ?? null;
|
|
466
|
+
this.changeDetectorRef.markForCheck();
|
|
467
|
+
}
|
|
466
468
|
});
|
|
467
469
|
}
|
|
468
470
|
```
|
package/UPGRADING_V19.md
CHANGED
|
@@ -1246,7 +1246,7 @@ In `front/src/`, remove the file `typings.d.ts` if it is still there.
|
|
|
1246
1246
|
{
|
|
1247
1247
|
"extends": "./tsconfig.json",
|
|
1248
1248
|
"compilerOptions": {
|
|
1249
|
-
"outDir": "
|
|
1249
|
+
"outDir": "./out-tsc/app",
|
|
1250
1250
|
"types": []
|
|
1251
1251
|
},
|
|
1252
1252
|
"include": ["src/**/*.ts"],
|
|
@@ -1448,12 +1448,15 @@ When using `IntelliJ`, you can run code inspection on your project to fix deprec
|
|
|
1448
1448
|
- In your `tsconfig.json` file, add `"strict": true` in `compilerOptions` and remove `alwaysStrict`, `noImplicitThis`, `strictBindCallApply` and `strictFunctionTypes` as they are already included in `strict` mode.
|
|
1449
1449
|
- In your `tsconfig.json` file, remove `useDefineForClassFields` from `compilerOptions`.
|
|
1450
1450
|
|
|
1451
|
-
Now fix your project until no more errors:
|
|
1451
|
+
Now fix your project until no more errors (unlike `tsc -b`, these commands write nothing):
|
|
1452
1452
|
|
|
1453
1453
|
```bash
|
|
1454
|
-
npx tsc -
|
|
1454
|
+
npx tsc -p tsconfig.app.json --noEmit
|
|
1455
|
+
npx tsc -p tsconfig.spec.json --noEmit
|
|
1455
1456
|
```
|
|
1456
1457
|
|
|
1458
|
+
`tsc` doesn't check the templates: the errors reported by `strictTemplates` appear when you build your application.
|
|
1459
|
+
|
|
1457
1460
|
and finally run the following commands to build, test and start your application:
|
|
1458
1461
|
|
|
1459
1462
|
```bash
|
|
@@ -1515,6 +1518,8 @@ The CommonJS dependencies of prestations-ng are now `"iban"` and `"dayjs"` (whic
|
|
|
1515
1518
|
"allowedCommonJsDependencies": ["iban", "dayjs"]
|
|
1516
1519
|
```
|
|
1517
1520
|
|
|
1521
|
+
Also remove the packages that are no longer installed (`npm ls <package>` lists nothing).
|
|
1522
|
+
|
|
1518
1523
|
### Zoneless (optional but recommended)
|
|
1519
1524
|
|
|
1520
1525
|
Since v19.2, prestations-ng does not need zone.js anymore: the state of its components is held by signals, which
|
|
@@ -1558,6 +1563,10 @@ then uninstall zone.js:
|
|
|
1558
1563
|
npm uninstall zone.js
|
|
1559
1564
|
```
|
|
1560
1565
|
|
|
1566
|
+
`zone.js` stays in your `package-lock.json` as an optional peer dependency of `@angular/core`: this is expected. Check
|
|
1567
|
+
instead that the build of your application no longer outputs a `polyfills` chunk (unless you still have other
|
|
1568
|
+
polyfills, e.g. `@angular/localize/init`).
|
|
1569
|
+
|
|
1561
1570
|
#### Check your components
|
|
1562
1571
|
|
|
1563
1572
|
Without zone.js, Angular refreshes a component only when it is notified that something changed:
|
|
@@ -1601,8 +1610,10 @@ Pay attention to:
|
|
|
1601
1610
|
ngOnInit(): void {
|
|
1602
1611
|
super.ngOnInit();
|
|
1603
1612
|
this.sessionInfoWithApplicationService.prefillForm((info) => {
|
|
1604
|
-
this.form
|
|
1605
|
-
|
|
1613
|
+
if (this.form) {
|
|
1614
|
+
this.form.email = info?.email ?? null;
|
|
1615
|
+
this.changeDetectorRef.markForCheck();
|
|
1616
|
+
}
|
|
1606
1617
|
});
|
|
1607
1618
|
}
|
|
1608
1619
|
```
|
|
@@ -3867,7 +3867,10 @@ class FoehnFeedbackNotificationComponent {
|
|
|
3867
3867
|
.post(`api/feedbacknotification/queryparams/${reference}`, fbu, {
|
|
3868
3868
|
responseType: 'text',
|
|
3869
3869
|
})
|
|
3870
|
-
.pipe(map((cryptedUrlParams) => `${feedBackFormBaseUrl}?q=${encodeURIComponent(cryptedUrlParams)}`))
|
|
3870
|
+
.pipe(map((cryptedUrlParams) => `${feedBackFormBaseUrl}?q=${encodeURIComponent(cryptedUrlParams)}`), catchError((e) => {
|
|
3871
|
+
console.error('Unable to get the feedback url, returning null', e);
|
|
3872
|
+
return of(null);
|
|
3873
|
+
}));
|
|
3871
3874
|
}
|
|
3872
3875
|
getCategory(sessionInfoData, etapeInfo) {
|
|
3873
3876
|
if (sessionInfoData?.categories) {
|