projecte_ionic/node_modules/@ionic/angular/providers/platform.d.ts.map
2022-02-09 18:30:03 +01:00

1 line
7.7 KiB
Plaintext
Executable file

{"version":3,"file":"platform.d.ts","sources":["platform.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA","sourcesContent":["import { NgZone } from '@angular/core';\nimport { BackButtonEventDetail, Platforms } from '@ionic/core';\nimport { Subject, Subscription } from 'rxjs';\nexport interface BackButtonEmitter extends Subject<BackButtonEventDetail> {\n subscribeWithPriority(priority: number, callback: (processNextHandler: () => void) => Promise<any> | void): Subscription;\n}\nexport declare class Platform {\n private doc;\n private _readyPromise;\n private win;\n /**\n * @hidden\n */\n backButton: BackButtonEmitter;\n /**\n * The keyboardDidShow event emits when the\n * on-screen keyboard is presented.\n */\n keyboardDidShow: any;\n /**\n * The keyboardDidHide event emits when the\n * on-screen keyboard is hidden.\n */\n keyboardDidHide: Subject<void>;\n /**\n * The pause event emits when the native platform puts the application\n * into the background, typically when the user switches to a different\n * application. This event would emit when a Cordova app is put into\n * the background, however, it would not fire on a standard web browser.\n */\n pause: Subject<void>;\n /**\n * The resume event emits when the native platform pulls the application\n * out from the background. This event would emit when a Cordova app comes\n * out from the background, however, it would not fire on a standard web browser.\n */\n resume: Subject<void>;\n /**\n * The resize event emits when the browser window has changed dimensions. This\n * could be from a browser window being physically resized, or from a device\n * changing orientation.\n */\n resize: Subject<void>;\n constructor(doc: any, zone: NgZone);\n /**\n * @returns returns true/false based on platform.\n * @description\n * Depending on the platform the user is on, `is(platformName)` will\n * return `true` or `false`. Note that the same app can return `true`\n * for more than one platform name. For example, an app running from\n * an iPad would return `true` for the platform names: `mobile`,\n * `ios`, `ipad`, and `tablet`. Additionally, if the app was running\n * from Cordova then `cordova` would be true, and if it was running\n * from a web browser on the iPad then `mobileweb` would be `true`.\n *\n * ```\n * import { Platform } from 'ionic-angular';\n *\n * @Component({...})\n * export MyPage {\n * constructor(public platform: Platform) {\n * if (this.platform.is('ios')) {\n * // This will only print when on iOS\n * console.log('I am an iOS device!');\n * }\n * }\n * }\n * ```\n *\n * | Platform Name | Description |\n * |-----------------|------------------------------------|\n * | android | on a device running Android. |\n * | capacitor | on a device running Capacitor. |\n * | cordova | on a device running Cordova. |\n * | ios | on a device running iOS. |\n * | ipad | on an iPad device. |\n * | iphone | on an iPhone device. |\n * | phablet | on a phablet device. |\n * | tablet | on a tablet device. |\n * | electron | in Electron on a desktop device. |\n * | pwa | as a PWA app. |\n * | mobile | on a mobile device. |\n * | mobileweb | on a mobile device in a browser. |\n * | desktop | on a desktop device. |\n * | hybrid | is a cordova or capacitor app. |\n *\n */\n is(platformName: Platforms): boolean;\n /**\n * @returns the array of platforms\n * @description\n * Depending on what device you are on, `platforms` can return multiple values.\n * Each possible value is a hierarchy of platforms. For example, on an iPhone,\n * it would return `mobile`, `ios`, and `iphone`.\n *\n * ```\n * import { Platform } from 'ionic-angular';\n *\n * @Component({...})\n * export MyPage {\n * constructor(public platform: Platform) {\n * // This will print an array of the current platforms\n * console.log(this.platform.platforms());\n * }\n * }\n * ```\n */\n platforms(): string[];\n /**\n * Returns a promise when the platform is ready and native functionality\n * can be called. If the app is running from within a web browser, then\n * the promise will resolve when the DOM is ready. When the app is running\n * from an application engine such as Cordova, then the promise will\n * resolve when Cordova triggers the `deviceready` event.\n *\n * The resolved value is the `readySource`, which states which platform\n * ready was used. For example, when Cordova is ready, the resolved ready\n * source is `cordova`. The default ready source value will be `dom`. The\n * `readySource` is useful if different logic should run depending on the\n * platform the app is running from. For example, only Cordova can execute\n * the status bar plugin, so the web should not run status bar plugin logic.\n *\n * ```\n * import { Component } from '@angular/core';\n * import { Platform } from 'ionic-angular';\n *\n * @Component({...})\n * export MyApp {\n * constructor(public platform: Platform) {\n * this.platform.ready().then((readySource) => {\n * console.log('Platform ready from', readySource);\n * // Platform now ready, execute any required native code\n * });\n * }\n * }\n * ```\n */\n ready(): Promise<string>;\n /**\n * Returns if this app is using right-to-left language direction or not.\n * We recommend the app's `index.html` file already has the correct `dir`\n * attribute value set, such as `<html dir=\"ltr\">` or `<html dir=\"rtl\">`.\n * [W3C: Structural markup and right-to-left text in HTML](http://www.w3.org/International/questions/qa-html-dir)\n */\n readonly isRTL: boolean;\n /**\n * Get the query string parameter\n */\n getQueryParam(key: string): string | null;\n /**\n * Returns `true` if the app is in landscape mode.\n */\n isLandscape(): boolean;\n /**\n * Returns `true` if the app is in portrait mode.\n */\n isPortrait(): boolean;\n testUserAgent(expression: string): boolean;\n /**\n * Get the current url.\n */\n url(): any;\n /**\n * Gets the width of the platform's viewport using `window.innerWidth`.\n */\n width(): any;\n /**\n * Gets the height of the platform's viewport using `window.innerHeight`.\n */\n height(): number;\n}\n"]}