@sumaris-net/ngx-components 21.1.2 → 21.3.0
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 +36 -0
- package/fesm2022/sumaris-net.ngx-components.mjs +547 -179
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/i18n/en-US.json +8 -1
- package/src/assets/i18n/en.json +8 -1
- package/src/assets/i18n/fr.json +8 -1
- package/src/assets/manifest.json +1 -1
- package/types/sumaris-net.ngx-components.d.ts +109 -48
package/doc/changelog.md
CHANGED
|
@@ -2344,3 +2344,39 @@ enh: Environment: add useHash property to configure Angular router to use hash U
|
|
|
2344
2344
|
|
|
2345
2345
|
## 21.1.2
|
|
2346
2346
|
- enh(public_api): export `*.icons` modules across app layers
|
|
2347
|
+
|
|
2348
|
+
## 21.2.0
|
|
2349
|
+
|
|
2350
|
+
### ⚠️ BREAKING CHANGES — migration to Ionic standalone components
|
|
2351
|
+
|
|
2352
|
+
The library now uses the Ionic **standalone** build (`@ionic/angular/standalone`, recommended by Ionic 8), and **no longer** the lazy-loaded build (`IonicModule`). Both builds must NOT be mixed: it left Ionic custom elements (`ion-app`, `ion-modal`...) undefined in production builds (blank page).
|
|
2353
|
+
|
|
2354
|
+
**Apps using the library MUST be migrated**:
|
|
2355
|
+
1. Use `provideIonicAngular({...})` (from `@ionic/angular/standalone`) instead of `IonicModule.forRoot({...})`
|
|
2356
|
+
2. Replace all imports from `@ionic/angular` by `@ionic/angular/standalone` - especially the controllers (`ModalController`, `AlertController`, `ToastController`, `PopoverController`, `LoadingController`, `ActionSheetController`) and services (`NavController`, `Platform`...): classes are NOT the same (DI injection errors otherwise)
|
|
2357
|
+
3. Replace `IonicModule` (in NgModules and standalone components) by `SharedIonicModule`, or by an app module that extends `SHARED_IONIC_COMPONENTS` with the other Ionic components used by the app (e.g. `IonTabs`, `IonTextarea`, `IonItemSliding`...). An Ionic tag whose component is not imported stays an inert element, without any error (especially with `CUSTOM_ELEMENTS_SCHEMA`)
|
|
2358
|
+
4. Icons: register icons using `SharedModule.forRoot({ icons: {...} })` (see `ION_ICONS`); remove any custom `addIcons()` workaround. Unregistered icons are loaded from the `svg/` assets folder (copy `node_modules/ionicons/dist/ionicons/svg` into `svg/`)
|
|
2359
|
+
5. Unit tests: replace `IonicModule.forRoot()` by `SharedIonicModule`, and add `provideIonicAngular()` in providers
|
|
2360
|
+
|
|
2361
|
+
### Changes
|
|
2362
|
+
- refactor(ionic): migrate all modules and components to Ionic standalone components; import controllers and services from `@ionic/angular/standalone`; `AppModule` uses `provideIonicAngular()` only
|
|
2363
|
+
- enh(ionic): add `SharedIonicModule` and `SHARED_IONIC_COMPONENTS` (all Ionic standalone components used by the library, including `IonRouterLink` for `routerLink` on Ionic components), replacing `IonicModule`. Exported by `SharedModule` and `public_api`
|
|
2364
|
+
- enh(icons): register icons (`ION_ICONS`) using `addIcons()` at startup (`SharedModule.forRoot()`), with new functions `registerIonicIcons()` and `provideIonicIconsInitializer()`. Unregistered icons (e.g. names computed at runtime) are loaded from the `svg/` assets folder
|
|
2365
|
+
- enh(VersionUtils): add `parseVersion()` (`VersionUtils.parse`) that returns a `SemVersion` (major, minor, patch, prerelease, build) or `null`, and `isValidVersion()` (`VersionUtils.isValid`). Both support prerelease versions (e.g. `1.0.0-alpha`, `1.0.0-beta.2`, `21.0.0-rc16`) and partial versions (e.g. `14` => `14.0.0`)
|
|
2366
|
+
- fix(VersionUtils): `compareVersionNumbers()` now returns `NaN` (instead of throwing an error) for a `null` or non-string version, and ignores leading/trailing whitespaces
|
|
2367
|
+
- fix(network): `NetworkService.getAppVersion()` now ignores a `version.appup` content that is not a valid version (e.g. a web server returning `index.html` for an unknown file), that caused a useless page reload
|
|
2368
|
+
- fix(properties-form): replace the unknown `arrow-dropdown` icon (removed in ionicons 8) by `caret-down`
|
|
2369
|
+
- perf(app): faster startup of the demo app (production: 408 ms => 329 ms, with standalone components):
|
|
2370
|
+
* use the `package.json` version as environment version (was not aligned with `manifest.json`, causing a page reload by the app version check)
|
|
2371
|
+
* declare `*_TESTING_PAGES` in lightweight `*.testing.config.ts` files, so that the testing modules stay lazy loaded (still re-exported by the testing modules)
|
|
2372
|
+
* do not import `public_api` from the named filter testing service (it pulled the whole library into the main bundle)
|
|
2373
|
+
- test(ionic): unit tests use `SharedIonicModule` and `provideIonicAngular()` instead of `IonicModule.forRoot()`
|
|
2374
|
+
- test(version): add unit tests for `parseVersion()`, `isValidVersion()` and `VersionUtils`
|
|
2375
|
+
|
|
2376
|
+
## 21.3.0
|
|
2377
|
+
- enh(network): new environment option `startupConnectionTimeout`: max time to wait for the pod at startup, before starting in offline mode. The pod is still checked in background, and the app goes online as soon as it responds. Can depend on the connection type, e.g. `{ wifi: 3000, cellular: 10000 }` (a cellular network is slower). Default: `connectionTimeout` (the startup waits for the pod, as before)
|
|
2378
|
+
- enh(NetworkUtils): add `NetworkUtils.resolveTimeout()`, to resolve a timeout that depends on the connection type
|
|
2379
|
+
- fix(config): faster startup when the pod cannot be reached: `ConfigService` now waits the network to be started, before loading the pod configuration (it was loaded with retries, ~6s, before being restored from the local storage)
|
|
2380
|
+
- fix(home): the loading spinner was not visible (white on a white background), while waiting for the pod configuration
|
|
2381
|
+
- fix(select-peer): display a message ('NETWORK.PEER.SELECT_MODAL.NO_PEER', in danger color) when no network node has been found, and open the manual form (to set a peer URL) automatically
|
|
2382
|
+
- fix(text-popover): do not show the 'invalid value' error before the user changed the value (the focus trap marked the control as touched, as soon as the popover opens)
|