MOBILE-3662 core: Install Badge ionic-native library
parent
b2ac70175b
commit
150f44d0c1
|
@ -2123,6 +2123,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@ionic-native/badge": {
|
||||||
|
"version": "5.30.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ionic-native/badge/-/badge-5.30.0.tgz",
|
||||||
|
"integrity": "sha512-9bz8AsdiJVAPEGGRLihoWWkikJf38xjCBgshBpgMxlXGmaDKMQQ2PHl8EeSlzjDCZy3POLbtAQnLTfYp+zqXEg==",
|
||||||
|
"requires": {
|
||||||
|
"@types/cordova": "^0.0.34"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/cordova": {
|
||||||
|
"version": "0.0.34",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
|
||||||
|
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@ionic-native/camera": {
|
"@ionic-native/camera": {
|
||||||
"version": "5.29.0",
|
"version": "5.29.0",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic-native/camera/-/camera-5.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic-native/camera/-/camera-5.29.0.tgz",
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
"@angular/platform-browser": "~10.0.0",
|
"@angular/platform-browser": "~10.0.0",
|
||||||
"@angular/platform-browser-dynamic": "~10.0.0",
|
"@angular/platform-browser-dynamic": "~10.0.0",
|
||||||
"@angular/router": "~10.0.0",
|
"@angular/router": "~10.0.0",
|
||||||
|
"@ionic-native/badge": "^5.30.0",
|
||||||
"@ionic-native/camera": "^5.29.0",
|
"@ionic-native/camera": "^5.29.0",
|
||||||
"@ionic-native/chooser": "^5.29.0",
|
"@ionic-native/chooser": "^5.29.0",
|
||||||
"@ionic-native/clipboard": "^5.28.0",
|
"@ionic-native/clipboard": "^5.28.0",
|
||||||
|
|
|
@ -19,6 +19,7 @@ import { CoreEmulatorHelperProvider } from './services/emulator-helper';
|
||||||
import { CoreEmulatorComponentsModule } from './components/components.module';
|
import { CoreEmulatorComponentsModule } from './components/components.module';
|
||||||
|
|
||||||
// Ionic Native services.
|
// Ionic Native services.
|
||||||
|
import { Badge } from '@ionic-native/badge/ngx';
|
||||||
import { Camera } from '@ionic-native/camera/ngx';
|
import { Camera } from '@ionic-native/camera/ngx';
|
||||||
import { Chooser } from '@ionic-native/chooser/ngx';
|
import { Chooser } from '@ionic-native/chooser/ngx';
|
||||||
import { Clipboard } from '@ionic-native/clipboard/ngx';
|
import { Clipboard } from '@ionic-native/clipboard/ngx';
|
||||||
|
@ -72,6 +73,7 @@ import { ZipMock } from './services/zip';
|
||||||
CoreEmulatorComponentsModule,
|
CoreEmulatorComponentsModule,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
Badge,
|
||||||
{
|
{
|
||||||
provide: Camera,
|
provide: Camera,
|
||||||
deps: [Platform],
|
deps: [Platform],
|
||||||
|
|
|
@ -69,6 +69,7 @@ export class CoreEvents {
|
||||||
static readonly SITE_STORAGE_DELETED = 'site_storage_deleted';
|
static readonly SITE_STORAGE_DELETED = 'site_storage_deleted';
|
||||||
static readonly FORM_ACTION = 'form_action';
|
static readonly FORM_ACTION = 'form_action';
|
||||||
static readonly ACTIVITY_DATA_SENT = 'activity_data_sent';
|
static readonly ACTIVITY_DATA_SENT = 'activity_data_sent';
|
||||||
|
static readonly DEVICE_REGISTERED_IN_MOODLE = 'device_registered_in_moodle';
|
||||||
|
|
||||||
protected static logger = CoreLogger.getInstance('CoreEvents');
|
protected static logger = CoreLogger.getInstance('CoreEvents');
|
||||||
protected static observables: { [eventName: string]: Subject<unknown> } = {};
|
protected static observables: { [eventName: string]: Subject<unknown> } = {};
|
||||||
|
|
|
@ -25,6 +25,7 @@ import {
|
||||||
ActionSheetController as ActionSheetControllerService,
|
ActionSheetController as ActionSheetControllerService,
|
||||||
} from '@ionic/angular';
|
} from '@ionic/angular';
|
||||||
|
|
||||||
|
import { Badge as BadgeService } from '@ionic-native/badge/ngx';
|
||||||
import { Camera as CameraService } from '@ionic-native/camera/ngx';
|
import { Camera as CameraService } from '@ionic-native/camera/ngx';
|
||||||
import { Chooser as ChooserService } from '@ionic-native/chooser/ngx';
|
import { Chooser as ChooserService } from '@ionic-native/chooser/ngx';
|
||||||
import { Clipboard as ClipboardService } from '@ionic-native/clipboard/ngx';
|
import { Clipboard as ClipboardService } from '@ionic-native/clipboard/ngx';
|
||||||
|
@ -111,6 +112,7 @@ export function makeSingleton<Service>(injectionToken: Type<Service> | Type<unkn
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert ionic-native services to singleton.
|
// Convert ionic-native services to singleton.
|
||||||
|
export class Badge extends makeSingleton(BadgeService) {}
|
||||||
export class Camera extends makeSingleton(CameraService) {}
|
export class Camera extends makeSingleton(CameraService) {}
|
||||||
export class Chooser extends makeSingleton(ChooserService) {}
|
export class Chooser extends makeSingleton(ChooserService) {}
|
||||||
export class Clipboard extends makeSingleton(ClipboardService) {}
|
export class Clipboard extends makeSingleton(ClipboardService) {}
|
||||||
|
|
Loading…
Reference in New Issue