@sumaris-net/ngx-components 21.4.5 → 21.5.0-alpha0
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/doc/changelog.md +19 -0
- package/fesm2022/sumaris-net.ngx-components.mjs +10850 -9454
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/manifest.json +1 -1
- package/types/sumaris-net.ngx-components.d.ts +4869 -4701
package/doc/changelog.md
CHANGED
|
@@ -2523,3 +2523,22 @@ The library now uses the Ionic **standalone** build (`@ionic/angular/standalone`
|
|
|
2523
2523
|
* Fix `cancelExistingRow()` (inverted `interactive` logic: never asked for confirmation, and looped when `onBeforeCancelRows` was observed)
|
|
2524
2524
|
* Add `confirmAndUp()`, options `keepSelection`, `confirmRow` and `throwIfNotConfirmed` in `save()`, `logPrefix`, `reservedStartColumns` and `reservedEndColumns`
|
|
2525
2525
|
* `save({ keepEditing: true })` now also restores the first row (id = 0); `confirmAndForward()` and `confirmAndAdd()` no longer fail without any row
|
|
2526
|
+
|
|
2527
|
+
## 21.4.6
|
|
2528
|
+
- fix(table): `AppTable`: fix a reload while a new row is in edition: the last row was deleted, in addition to the new row (and then lost on save)
|
|
2529
|
+
|
|
2530
|
+
## 21.5.0 (next version)
|
|
2531
|
+
- chore(lint): faster, untyped lint (no more `parserOptions.project`), `--cache`; Prettier no longer runs inside ESLint: use `npm run lint:format` (`eslint-plugin-prettier` removed); upgrade Prettier to 3.9
|
|
2532
|
+
- chore(deps): upgrade the lint tooling, same versions as sumaris-app: ESLint `~9.39.5` (was `~9.26.0`, no longer supported), typescript-eslint `^8.72.1` (`@typescript-eslint/eslint-plugin`, `parser`, `utils`; was `^8.57.2`). Remove the unused `eslint-plugin-import`, `eslint-plugin-jsdoc` and `eslint-plugin-prefer-arrow` (never loaded by `.eslintrc.json`). Same lint results (0 error, 391 warnings)
|
|
2533
|
+
- enh: migrate dependency injection to `inject()` (Angular `@angular/core:inject` migration, with backwards-compatible constructors)
|
|
2534
|
+
* **Breaking**: most constructors no longer take dependencies. A `constructor(...args: unknown[])` overload is kept (marked `@deprecated`), so `super(injector, ...)` / `super(formBuilder, ...)` still compile, but **the arguments are ignored**: dependencies always come from `inject()`. A subclass that passed another instance than the injected one (e.g. a mock, a custom `FormBuilder`) must provide it with a DI provider instead
|
|
2535
|
+
* **Breaking**: these classes must be created in an injection context. `new X(...)` outside the DI (e.g. in a unit test, or at runtime in a service method) now throws `NG0203`: use `TestBed.runInInjectionContext(() => new X())`, `runInInjectionContext(injector, () => new X())`, or `TestBed.inject(X)`
|
|
2536
|
+
* Exception, for backward compatibility: `AppValidatorService` and `ReferentialValidatorService` still use the `formBuilder` (and `translate`) given to their constructor (deprecated), and only call `inject()` without arguments. So an app validator calling `super(formBuilder, translate)` can still be created with `new MyValidator(formBuilder, translate)` outside an injection context (e.g. sumaris-app `BatchService.control()`); `translate` stays `undefined` when not given with a `formBuilder`. The other lib validators (e.g. `PersonValidatorService`, `LocalSettingsValidatorService`) still ignore their arguments
|
|
2537
|
+
* Same exception for `UploadFileComponent`: `new UploadFileComponent(cd, translate)` (used to upload files without UI, e.g. in quadrige3-app `MonitoringLocationTable`) still works outside an injection context. Prefer the new `UploadFileUtils.uploadFiles(injector, files, { uploadFn, maxParallelUpload })`
|
|
2538
|
+
- enh: add `UploadFileUtils.uploadFiles()`, to upload files without UI (from a component or a service), with the logic of `UploadFileComponent`; it can be called outside an injection context. Unlike `uploadFiles(files)` on a component, `maxParallelUpload` is applied (the component only counts the files of its own list)
|
|
2539
|
+
* **Breaking** (only with `useDefineForClassFields: true`): a subclass that redeclares an injected member without initializer (e.g. `protected formBuilder: UntypedFormBuilder;`) now fails with `TS2612`, and would reset it to `undefined`: remove the redeclaration
|
|
2540
|
+
* Unchanged constructors (they also receive values that are not dependencies: entity type, columns, options, a `null` route for modals...): `AppForm`, `AppTable`, `AppAsyncTable`, `AppInMemoryTable`, `AppEditor`, `AppTabEditor`, `AppEntityEditor`, `AppEntityEditorModal`, `BaseGraphqlService`, `BaseEntityService`, `AbstractPersonService`, `AbstractNamedFilterService`, `AbstractUserEventService`, `StartableService`, `StartableObservableService`, `EntitiesTableDataSource`, `EntitiesAsyncTableDataSource`, `InMemoryEntitiesService`, `PropertiesFileService`
|
|
2541
|
+
- enh: convert components, directives and pipes to standalone (Angular `@angular/core:standalone` migration, mode `convert-to-standalone` only)
|
|
2542
|
+
* The NgModules are kept (`SharedModule`, `CoreModule`, `AppTableModule`...) and still export the same symbols: apps using them (legacy `NgModule` way) need no change. Standalone components can now also be imported directly
|
|
2543
|
+
* **Breaking**: a lib component, directive or pipe can no longer be put in the `declarations` of an NgModule or of `TestBed.configureTestingModule()` (error `NG6008`, "is standalone, and cannot be declared"): move it to `imports`. E.g. in sumaris-app: `columns.component.spec.ts`, `pmfm-column.component.spec.ts`, `batch-model-tree.component.spec.ts`
|
|
2544
|
+
* Swiper components (`MatSwipeField`, `AppImageGallerySlideshowComponent`) now declare `CUSTOM_ELEMENTS_SCHEMA` themselves
|