@sumaris-net/ngx-components 2.4.67 → 2.4.69
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/esm2020/src/app/shared/audio/audio.mjs +12 -4
- package/esm2020/src/app/shared/geolocation/geolocation.utils.mjs +7 -12
- package/esm2020/src/app/social/user-event/notification/user-event-notification.icon.mjs +3 -3
- package/fesm2015/sumaris-net.ngx-components.mjs +16 -17
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +19 -16
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -10476,6 +10476,10 @@ const SYSTEM_SOUNDS = [
|
|
|
10476
10476
|
{ assetId: 'beep-error', assetPath: 'assets/audio/beep-error.mp3', vibration: 1000 },
|
|
10477
10477
|
{ assetId: 'beep-notification', assetPath: 'assets/audio/beep-notification.mp3', vibration: [450, 150, 450] }
|
|
10478
10478
|
];
|
|
10479
|
+
const DEFAULT_AUDIO_MODE_RETURN = {
|
|
10480
|
+
audioMode: AudioManagement.AudioMode.NORMAL,
|
|
10481
|
+
label: 'Normal'
|
|
10482
|
+
};
|
|
10479
10483
|
class AudioProvider extends StartableService {
|
|
10480
10484
|
constructor(platform, audioManagement) {
|
|
10481
10485
|
super(platform);
|
|
@@ -10647,9 +10651,13 @@ class AudioProvider extends StartableService {
|
|
|
10647
10651
|
}
|
|
10648
10652
|
/* -- protected methods -- */
|
|
10649
10653
|
async readAudioMode() {
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10654
|
+
let value = await this.audioManagement.getAudioMode();
|
|
10655
|
+
value = {
|
|
10656
|
+
...DEFAULT_AUDIO_MODE_RETURN,
|
|
10657
|
+
...value
|
|
10658
|
+
};
|
|
10659
|
+
console.debug(`[audio] Detected audio mode {label: '${value.label}', audioMode: ${value.audioMode}}`);
|
|
10660
|
+
this._audioMode = value.audioMode;
|
|
10653
10661
|
}
|
|
10654
10662
|
}
|
|
10655
10663
|
AudioProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AudioProvider, deps: [{ token: i1.Platform }, { token: i2$1.AudioManagement, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -21677,17 +21685,12 @@ class GeolocationUtils {
|
|
|
21677
21685
|
catch (err) {
|
|
21678
21686
|
// If capacitor : throw error (cannot fallback to browser geolocation, because of browser security limitation)
|
|
21679
21687
|
if (platform.is('capacitor')) {
|
|
21680
|
-
console.error(`[geolocation-utils] Cannot get current geo location, using Capacitor: ${err?.message || ''}
|
|
21681
|
-
|
|
21682
|
-
|
|
21683
|
-
|
|
21684
|
-
|
|
21685
|
-
|
|
21686
|
-
if (permissionDenied)
|
|
21687
|
-
throw { ...err, code: GeolocationPositionError.PERMISSION_DENIED };
|
|
21688
|
-
}
|
|
21689
|
-
catch (e2) {
|
|
21690
|
-
console.error(`[geolocation-utils] Error while calling checkPermissions(): ${err?.message || ''}`);
|
|
21688
|
+
console.error(`[geolocation-utils] Cannot get current geo location, using Capacitor: ${err?.message || ''}`);
|
|
21689
|
+
// Detect a permission error, to add code
|
|
21690
|
+
// FIXME - Capacitor use hardcoded strings! (see https://github.com/ionic-team/capacitor-plugins)
|
|
21691
|
+
const message = (err?.message || '').toLowerCase();
|
|
21692
|
+
if (message.includes('location permission was denied') || message.includes('location disabled')) {
|
|
21693
|
+
throw { ...err, code: GeolocationPositionError.PERMISSION_DENIED };
|
|
21691
21694
|
}
|
|
21692
21695
|
throw err;
|
|
21693
21696
|
}
|
|
@@ -32759,10 +32762,10 @@ class UserEventNotificationIcon {
|
|
|
32759
32762
|
}
|
|
32760
32763
|
}
|
|
32761
32764
|
UserEventNotificationIcon.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: UserEventNotificationIcon, deps: [{ token: APP_USER_EVENT_SERVICE, optional: true }, { token: AccountService }, { token: i1.PopoverController }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
32762
|
-
UserEventNotificationIcon.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: UserEventNotificationIcon, selector: "app-user-event-notification-icon", inputs: { debug: "debug", titleI18n: "titleI18n", disabled: "disabled", filter: "filter", autoHide: "autoHide" }, ngImport: i0, template: "<button\n
|
|
32765
|
+
UserEventNotificationIcon.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: UserEventNotificationIcon, selector: "app-user-event-notification-icon", inputs: { debug: "debug", titleI18n: "titleI18n", disabled: "disabled", filter: "filter", autoHide: "autoHide" }, ngImport: i0, template: "<button\n mat-icon-button\n [title]=\"titleI18n | translate\"\n [disabled]=\"disabled\"\n *ngIf=\"visible\"\n (click)=\"showList($event)\"\n>\n <mat-icon\n [matBadge]=\"countChanges | async\"\n matBadgeColor=\"accent\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\"\n >notifications\n </mat-icon>\n</button>\n\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i6$5.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32763
32766
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: UserEventNotificationIcon, decorators: [{
|
|
32764
32767
|
type: Component,
|
|
32765
|
-
args: [{ selector: 'app-user-event-notification-icon', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n
|
|
32768
|
+
args: [{ selector: 'app-user-event-notification-icon', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n mat-icon-button\n [title]=\"titleI18n | translate\"\n [disabled]=\"disabled\"\n *ngIf=\"visible\"\n (click)=\"showList($event)\"\n>\n <mat-icon\n [matBadge]=\"countChanges | async\"\n matBadgeColor=\"accent\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\"\n >notifications\n </mat-icon>\n</button>\n\n" }]
|
|
32766
32769
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
32767
32770
|
type: Optional
|
|
32768
32771
|
}, {
|