@sumaris-net/ngx-components 18.6.23 → 18.6.25
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 +4 -1
- package/esm2022/src/app/core/services/platform.service.mjs +10 -10
- package/esm2022/src/app/shared/forms.mjs +3 -1
- package/fesm2022/sumaris-net.ngx-components.mjs +11 -9
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/install/install-upgrade-card.component.d.ts +1 -1
- package/src/app/core/services/platform.service.d.ts +1 -1
- package/src/app/shared/inputs.d.ts +1 -1
- package/src/assets/manifest.json +1 -1
|
@@ -3773,6 +3773,8 @@ function disableAndClearControl(control, opts) {
|
|
|
3773
3773
|
}
|
|
3774
3774
|
}
|
|
3775
3775
|
function setControlEnabled(control, enabled, opts) {
|
|
3776
|
+
if (!control)
|
|
3777
|
+
return; // SKip if no control
|
|
3776
3778
|
if (enabled) {
|
|
3777
3779
|
if (isNotNil(opts?.required) && opts.required && !control.hasValidator(Validators.required)) {
|
|
3778
3780
|
control.addValidators(Validators.required);
|
|
@@ -23294,7 +23296,7 @@ class PlatformService extends StartableService {
|
|
|
23294
23296
|
_capacitor;
|
|
23295
23297
|
_android;
|
|
23296
23298
|
_ios;
|
|
23297
|
-
busySubject = new BehaviorSubject(
|
|
23299
|
+
busySubject = new BehaviorSubject(false);
|
|
23298
23300
|
constructor(ionicPlatform, cdkPlatform, cdkClipboard, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, audioProvider, environment, loggingService, downloader) {
|
|
23299
23301
|
super(ionicPlatform);
|
|
23300
23302
|
this.ionicPlatform = ionicPlatform;
|
|
@@ -23599,6 +23601,14 @@ class PlatformService extends StartableService {
|
|
|
23599
23601
|
}
|
|
23600
23602
|
document.documentElement.classList.toggle('dark', enable);
|
|
23601
23603
|
}
|
|
23604
|
+
showToast(opts) {
|
|
23605
|
+
if (!this.toastController)
|
|
23606
|
+
throw new Error("Missing toastController in component's constructor");
|
|
23607
|
+
return new Promise((resolve) => Toasts.show(this.toastController, this.translate, {
|
|
23608
|
+
...opts,
|
|
23609
|
+
onWillPresent: (t) => resolve(t),
|
|
23610
|
+
}));
|
|
23611
|
+
}
|
|
23602
23612
|
/* -- protected methods -- */
|
|
23603
23613
|
async configureTheme(mobile, win = window) {
|
|
23604
23614
|
// Listen for changes to settings dark mode
|
|
@@ -23765,14 +23775,6 @@ class PlatformService extends StartableService {
|
|
|
23765
23775
|
});
|
|
23766
23776
|
}
|
|
23767
23777
|
}
|
|
23768
|
-
showToast(opts) {
|
|
23769
|
-
if (!this.toastController)
|
|
23770
|
-
throw new Error("Missing toastController in component's constructor");
|
|
23771
|
-
return new Promise((resolve) => Toasts.show(this.toastController, this.translate, {
|
|
23772
|
-
...opts,
|
|
23773
|
-
onWillPresent: (t) => resolve(t),
|
|
23774
|
-
}));
|
|
23775
|
-
}
|
|
23776
23778
|
async onStartupError(err) {
|
|
23777
23779
|
console.error('[platform] Failed starting the platform! ' + JSON.stringify(err));
|
|
23778
23780
|
let message = (err && err.message) || err;
|