mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
chore: cleanup
This commit is contained in:
@ -220,3 +220,5 @@ if (typeof NSDate !== 'undefined') {
|
|||||||
console.log(`TIME TO LOAD APP: ${time} ms`);
|
console.log(`TIME TO LOAD APP: ${time} ms`);
|
||||||
|
|
||||||
Application.run({ moduleName: 'app-root' });
|
Application.run({ moduleName: 'app-root' });
|
||||||
|
|
||||||
|
// Application.android.on()
|
||||||
|
@ -9,21 +9,23 @@ import { Builder } from '../ui/builder';
|
|||||||
import * as bindableResources from '../ui/core/bindable/bindable-resources';
|
import * as bindableResources from '../ui/core/bindable/bindable-resources';
|
||||||
import type { View } from '../ui/core/view';
|
import type { View } from '../ui/core/view';
|
||||||
import type { Frame } from '../ui/frame';
|
import type { Frame } from '../ui/frame';
|
||||||
import { NavigationEntry } from '../ui/frame/frame-interfaces';
|
import type { NavigationEntry } from '../ui/frame/frame-interfaces';
|
||||||
import type { StyleScope } from '../ui/styling/style-scope';
|
import type { StyleScope } from '../ui/styling/style-scope';
|
||||||
import type {
|
import type {
|
||||||
AndroidApplication as IAndroidApplication,
|
AndroidApplication as IAndroidApplication,
|
||||||
iOSApplication as IiOSApplication,
|
iOSApplication as IiOSApplication,
|
||||||
} from './';
|
} from './';
|
||||||
import {
|
import type {
|
||||||
ApplicationEventData,
|
ApplicationEventData,
|
||||||
CssChangedEventData,
|
CssChangedEventData,
|
||||||
DiscardedErrorEventData,
|
DiscardedErrorEventData,
|
||||||
|
FontScaleChangedEventData,
|
||||||
LaunchEventData,
|
LaunchEventData,
|
||||||
LoadAppCSSEventData,
|
LoadAppCSSEventData,
|
||||||
NativeScriptError,
|
NativeScriptError,
|
||||||
OrientationChangedEventData,
|
OrientationChangedEventData,
|
||||||
SystemAppearanceChangedEventData,
|
SystemAppearanceChangedEventData,
|
||||||
|
UnhandledErrorEventData,
|
||||||
} from './application-interfaces';
|
} from './application-interfaces';
|
||||||
|
|
||||||
const ORIENTATION_CSS_CLASSES = [
|
const ORIENTATION_CSS_CLASSES = [
|
||||||
@ -41,14 +43,133 @@ const globalEvents = global.NativeScriptGlobals.events;
|
|||||||
|
|
||||||
// helper interface to correctly type Application event handlers
|
// helper interface to correctly type Application event handlers
|
||||||
interface ApplicationEvents {
|
interface ApplicationEvents {
|
||||||
|
off(eventNames: string, callback?: any, thisArg?: any): void;
|
||||||
|
notify<T = ApplicationEventData>(eventData: T): void;
|
||||||
|
hasListeners(eventName: string): boolean;
|
||||||
|
|
||||||
on(
|
on(
|
||||||
eventNames: string,
|
eventNames: string,
|
||||||
callback: (args: ApplicationEventData) => void,
|
callback: (args: ApplicationEventData) => void,
|
||||||
thisArg?: any
|
thisArg?: any
|
||||||
): void;
|
): void;
|
||||||
off(eventNames: string, callback?: any, thisArg?: any): void;
|
/**
|
||||||
notify<T = ApplicationEventData>(eventData: T): void;
|
* This event is raised when application css is changed.
|
||||||
hasListeners(eventName: string): boolean;
|
*/
|
||||||
|
on(
|
||||||
|
event: 'cssChanged',
|
||||||
|
callback: (args: CssChangedEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event raised then livesync operation is performed.
|
||||||
|
*/
|
||||||
|
on(
|
||||||
|
event: 'livesync',
|
||||||
|
callback: (args: ApplicationEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is raised when application css is changed.
|
||||||
|
*/
|
||||||
|
on(
|
||||||
|
event: 'cssChanged',
|
||||||
|
callback: (args: CssChangedEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is raised on application launchEvent.
|
||||||
|
*/
|
||||||
|
on(event: 'launch', callback: (args: LaunchEventData) => void, thisArg?: any): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is raised after the application has performed most of its startup actions.
|
||||||
|
* Its intent is to be suitable for measuring app startup times.
|
||||||
|
* @experimental
|
||||||
|
*/
|
||||||
|
on(
|
||||||
|
event: 'displayed',
|
||||||
|
callback: (args: ApplicationEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is raised when the Application is suspended.
|
||||||
|
*/
|
||||||
|
on(
|
||||||
|
event: 'suspend',
|
||||||
|
callback: (args: ApplicationEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is raised when the Application is resumed after it has been suspended.
|
||||||
|
*/
|
||||||
|
on(
|
||||||
|
event: 'resume',
|
||||||
|
callback: (args: ApplicationEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is raised when the Application is about to exit.
|
||||||
|
*/
|
||||||
|
on(event: 'exit', callback: (args: ApplicationEventData) => void, thisArg?: any): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is raised when there is low memory on the target device.
|
||||||
|
*/
|
||||||
|
on(
|
||||||
|
event: 'lowMemory',
|
||||||
|
callback: (args: ApplicationEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is raised when an uncaught error occurs while the application is running.
|
||||||
|
*/
|
||||||
|
on(
|
||||||
|
event: 'uncaughtError',
|
||||||
|
callback: (args: UnhandledErrorEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is raised when an discarded error occurs while the application is running.
|
||||||
|
*/
|
||||||
|
on(
|
||||||
|
event: 'discardedError',
|
||||||
|
callback: (args: DiscardedErrorEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is raised when the orientation of the application changes.
|
||||||
|
*/
|
||||||
|
on(
|
||||||
|
event: 'orientationChanged',
|
||||||
|
callback: (args: OrientationChangedEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is raised when the operating system appearance changes
|
||||||
|
* between light and dark theme (for Android);
|
||||||
|
* between light and dark mode (for iOS) and vice versa.
|
||||||
|
*/
|
||||||
|
on(
|
||||||
|
event: 'systemAppearanceChanged',
|
||||||
|
callback: (args: SystemAppearanceChangedEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
|
|
||||||
|
on(
|
||||||
|
event: 'fontScaleChanged',
|
||||||
|
callback: (args: FontScaleChangedEventData) => void,
|
||||||
|
thisArg?: any
|
||||||
|
): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ApplicationCommon {
|
export class ApplicationCommon {
|
||||||
@ -70,10 +191,10 @@ export class ApplicationCommon {
|
|||||||
readonly cssChangedEvent = 'cssChanged';
|
readonly cssChangedEvent = 'cssChanged';
|
||||||
|
|
||||||
// Application events go through the global events.
|
// Application events go through the global events.
|
||||||
readonly on: ApplicationEvents['on'] = globalEvents.on.bind(globalEvents);
|
on: ApplicationEvents['on'] = globalEvents.on.bind(globalEvents);
|
||||||
readonly off: ApplicationEvents['off'] = globalEvents.off.bind(globalEvents);
|
off: ApplicationEvents['off'] = globalEvents.off.bind(globalEvents);
|
||||||
readonly notify: ApplicationEvents['notify'] = globalEvents.notify.bind(globalEvents);
|
notify: ApplicationEvents['notify'] = globalEvents.notify.bind(globalEvents);
|
||||||
readonly hasListeners: ApplicationEvents['hasListeners'] =
|
hasListeners: ApplicationEvents['hasListeners'] =
|
||||||
globalEvents.hasListeners.bind(globalEvents);
|
globalEvents.hasListeners.bind(globalEvents);
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { ApplicationCommon } from '.';
|
import type { ApplicationCommon } from './application-common';
|
||||||
import type { EventData, Observable } from '../data/observable';
|
import type { EventData, Observable } from '../data/observable';
|
||||||
import type { View } from '../ui/core/view';
|
import type { View } from '../ui/core/view';
|
||||||
|
|
||||||
|
127
packages/core/application/application.d.ts
vendored
127
packages/core/application/application.d.ts
vendored
@ -3,130 +3,9 @@
|
|||||||
export * from './application-common';
|
export * from './application-common';
|
||||||
export * from './application-interfaces';
|
export * from './application-interfaces';
|
||||||
|
|
||||||
export const Application: ApplicationCommon & ApplicationCommonEvents;
|
export const Application: ApplicationCommon;
|
||||||
|
|
||||||
export interface ApplicationCommonEvents {
|
export class AndroidApplication extends ApplicationCommon {
|
||||||
/**
|
|
||||||
* This event is raised when application css is changed.
|
|
||||||
*/
|
|
||||||
on(
|
|
||||||
event: 'cssChanged',
|
|
||||||
callback: (args: CssChangedEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Event raised then livesync operation is performed.
|
|
||||||
*/
|
|
||||||
on(
|
|
||||||
event: 'livesync',
|
|
||||||
callback: (args: ApplicationEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This event is raised when application css is changed.
|
|
||||||
*/
|
|
||||||
on(
|
|
||||||
event: 'cssChanged',
|
|
||||||
callback: (args: CssChangedEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This event is raised on application launchEvent.
|
|
||||||
*/
|
|
||||||
on(event: 'launch', callback: (args: LaunchEventData) => void, thisArg?: any): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This event is raised after the application has performed most of its startup actions.
|
|
||||||
* Its intent is to be suitable for measuring app startup times.
|
|
||||||
* @experimental
|
|
||||||
*/
|
|
||||||
on(
|
|
||||||
event: 'displayed',
|
|
||||||
callback: (args: ApplicationEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This event is raised when the Application is suspended.
|
|
||||||
*/
|
|
||||||
on(
|
|
||||||
event: 'suspend',
|
|
||||||
callback: (args: ApplicationEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This event is raised when the Application is resumed after it has been suspended.
|
|
||||||
*/
|
|
||||||
on(
|
|
||||||
event: 'resume',
|
|
||||||
callback: (args: ApplicationEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This event is raised when the Application is about to exit.
|
|
||||||
*/
|
|
||||||
on(event: 'exit', callback: (args: ApplicationEventData) => void, thisArg?: any): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This event is raised when there is low memory on the target device.
|
|
||||||
*/
|
|
||||||
on(
|
|
||||||
event: 'lowMemory',
|
|
||||||
callback: (args: ApplicationEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This event is raised when an uncaught error occurs while the application is running.
|
|
||||||
*/
|
|
||||||
on(
|
|
||||||
event: 'uncaughtError',
|
|
||||||
callback: (args: UnhandledErrorEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This event is raised when an discarded error occurs while the application is running.
|
|
||||||
*/
|
|
||||||
on(
|
|
||||||
event: 'discardedError',
|
|
||||||
callback: (args: DiscardedErrorEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This event is raised when the orientation of the application changes.
|
|
||||||
*/
|
|
||||||
on(
|
|
||||||
event: 'orientationChanged',
|
|
||||||
callback: (args: OrientationChangedEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This event is raised when the operating system appearance changes
|
|
||||||
* between light and dark theme (for Android);
|
|
||||||
* between light and dark mode (for iOS) and vice versa.
|
|
||||||
*/
|
|
||||||
on(
|
|
||||||
event: 'systemAppearanceChanged',
|
|
||||||
callback: (args: SystemAppearanceChangedEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
|
|
||||||
on(
|
|
||||||
event: 'fontScaleChanged',
|
|
||||||
callback: (args: FontScaleChangedEventData) => void,
|
|
||||||
thisArg?: any
|
|
||||||
): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface AndroidApplication extends ApplicationCommon {
|
|
||||||
readonly activityCreatedEvent;
|
readonly activityCreatedEvent;
|
||||||
readonly activityDestroyedEvent;
|
readonly activityDestroyedEvent;
|
||||||
readonly activityStartedEvent;
|
readonly activityStartedEvent;
|
||||||
@ -215,7 +94,7 @@ export interface AndroidApplication extends ApplicationCommon {
|
|||||||
): void;
|
): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface iOSApplication extends ApplicationCommon {
|
export class iOSApplication extends ApplicationCommon {
|
||||||
get rootController(): UIViewController;
|
get rootController(): UIViewController;
|
||||||
get nativeApp(): UIApplication;
|
get nativeApp(): UIApplication;
|
||||||
get window(): UIWindow;
|
get window(): UIWindow;
|
||||||
|
89
packages/core/index.d.ts
vendored
89
packages/core/index.d.ts
vendored
@ -7,89 +7,8 @@
|
|||||||
*/
|
*/
|
||||||
export type { NativeScriptConfig } from './config';
|
export type { NativeScriptConfig } from './config';
|
||||||
|
|
||||||
export { iOSApplication, AndroidApplication } from './application';
|
|
||||||
export type {
|
|
||||||
ApplicationEventData,
|
|
||||||
LaunchEventData,
|
|
||||||
OrientationChangedEventData,
|
|
||||||
UnhandledErrorEventData,
|
|
||||||
DiscardedErrorEventData,
|
|
||||||
CssChangedEventData,
|
|
||||||
LoadAppCSSEventData,
|
|
||||||
AndroidActivityEventData,
|
|
||||||
AndroidActivityBundleEventData,
|
|
||||||
AndroidActivityRequestPermissionsEventData,
|
|
||||||
AndroidActivityResultEventData,
|
|
||||||
AndroidActivityNewIntentEventData,
|
|
||||||
AndroidActivityBackPressedEventData,
|
|
||||||
SystemAppearanceChangedEventData,
|
|
||||||
} from './application';
|
|
||||||
|
|
||||||
// export * as Application from './application';
|
|
||||||
export * from './application';
|
export * from './application';
|
||||||
|
|
||||||
// import { AndroidApplication, iOSApplication, systemAppearanceChanged, getMainEntry, getRootView, _resetRootView, getResources, setResources, setCssFileName, getCssFileName, loadAppCss, addCss, on, off, notify, hasListeners, run, orientation, getNativeApplication, hasLaunched, systemAppearance, setAutoSystemAppearanceChanged, setMaxRefreshRate } from './application';
|
|
||||||
// export declare const Application: {
|
|
||||||
// launchEvent: string;
|
|
||||||
// displayedEvent: string;
|
|
||||||
// uncaughtErrorEvent: string;
|
|
||||||
// discardedErrorEvent: string;
|
|
||||||
// suspendEvent: string;
|
|
||||||
// resumeEvent: string;
|
|
||||||
// exitEvent: string;
|
|
||||||
// foregroundEvent: string;
|
|
||||||
// backgroundEvent: string;
|
|
||||||
// lowMemoryEvent: string;
|
|
||||||
// orientationChangedEvent: string;
|
|
||||||
// systemAppearanceChangedEvent: string;
|
|
||||||
// fontScaleChangedEvent: string;
|
|
||||||
// systemAppearanceChanged: typeof systemAppearanceChanged;
|
|
||||||
// setMaxRefreshRate: typeof setMaxRefreshRate;
|
|
||||||
// getMainEntry: typeof getMainEntry;
|
|
||||||
// getRootView: typeof getRootView;
|
|
||||||
// resetRootView: typeof _resetRootView;
|
|
||||||
// getResources: typeof getResources;
|
|
||||||
// setResources: typeof setResources;
|
|
||||||
// setCssFileName: typeof setCssFileName;
|
|
||||||
// getCssFileName: typeof getCssFileName;
|
|
||||||
// loadAppCss: typeof loadAppCss;
|
|
||||||
// addCss: typeof addCss;
|
|
||||||
// on: typeof on;
|
|
||||||
// off: typeof off;
|
|
||||||
// notify: typeof notify;
|
|
||||||
// hasListeners: typeof hasListeners;
|
|
||||||
// run: typeof run;
|
|
||||||
// orientation: typeof orientation;
|
|
||||||
// getNativeApplication: typeof getNativeApplication;
|
|
||||||
// hasLaunched: typeof hasLaunched;
|
|
||||||
// systemAppearance: typeof systemAppearance;
|
|
||||||
// setAutoSystemAppearanceChanged: typeof setAutoSystemAppearanceChanged;
|
|
||||||
// android: AndroidApplication;
|
|
||||||
// ios: iOSApplication;
|
|
||||||
// suspended: boolean;
|
|
||||||
// inBackground: boolean;
|
|
||||||
// };
|
|
||||||
|
|
||||||
export * as ApplicationSettings from './application-settings';
|
export * as ApplicationSettings from './application-settings';
|
||||||
// import { setString, getString, clear, flush, getAllKeys, getBoolean, getNumber, hasKey, remove, setBoolean, setNumber } from './application-settings';
|
|
||||||
// export declare const ApplicationSettings: {
|
|
||||||
// clear: typeof clear;
|
|
||||||
// flush: typeof flush;
|
|
||||||
// hasKey: typeof hasKey;
|
|
||||||
// remove: typeof remove;
|
|
||||||
// setString: typeof setString;
|
|
||||||
// getString: typeof getString;
|
|
||||||
// getAllKeys: typeof getAllKeys;
|
|
||||||
// getBoolean: typeof getBoolean;
|
|
||||||
// setBoolean: typeof setBoolean;
|
|
||||||
// getNumber: typeof getNumber;
|
|
||||||
// setNumber: typeof setNumber;
|
|
||||||
// };
|
|
||||||
// export declare const AccessibilityEvents: {
|
|
||||||
// accessibilityBlurEvent: string;
|
|
||||||
// accessibilityFocusEvent: string;
|
|
||||||
// accessibilityFocusChangedEvent: string;
|
|
||||||
// };
|
|
||||||
import * as Accessibility from './accessibility';
|
import * as Accessibility from './accessibility';
|
||||||
export namespace AccessibilityEvents {
|
export namespace AccessibilityEvents {
|
||||||
export const accessibilityBlurEvent = Accessibility.accessibilityBlurEvent;
|
export const accessibilityBlurEvent = Accessibility.accessibilityBlurEvent;
|
||||||
@ -145,14 +64,6 @@ export type {
|
|||||||
HttpContent,
|
HttpContent,
|
||||||
} from './http';
|
} from './http';
|
||||||
export * as Http from './http';
|
export * as Http from './http';
|
||||||
// import { getFile, getImage, getJSON, getString as httpGetString } from './http';
|
|
||||||
// export declare const Http: {
|
|
||||||
// getFile: typeof getFile;
|
|
||||||
// getImage: typeof getImage;
|
|
||||||
// getJSON: typeof getJSON;
|
|
||||||
// getString: typeof httpGetString;
|
|
||||||
// request: (options: import('./http').HttpRequestOptions) => Promise<import('./http').HttpResponse>;
|
|
||||||
// };
|
|
||||||
export { ImageAsset } from './image-asset';
|
export { ImageAsset } from './image-asset';
|
||||||
export type { ImageAssetOptions } from './image-asset';
|
export type { ImageAssetOptions } from './image-asset';
|
||||||
export { ImageSource } from './image-source';
|
export { ImageSource } from './image-source';
|
||||||
|
@ -2,100 +2,8 @@
|
|||||||
/// <reference path="./global-types.d.ts" />
|
/// <reference path="./global-types.d.ts" />
|
||||||
// Init globals first (use import to ensure it's always at the top)
|
// Init globals first (use import to ensure it's always at the top)
|
||||||
import './globals';
|
import './globals';
|
||||||
|
|
||||||
export { iOSApplication, AndroidApplication } from './application';
|
|
||||||
export type {
|
|
||||||
ApplicationEventData,
|
|
||||||
LaunchEventData,
|
|
||||||
OrientationChangedEventData,
|
|
||||||
UnhandledErrorEventData,
|
|
||||||
DiscardedErrorEventData,
|
|
||||||
CssChangedEventData,
|
|
||||||
LoadAppCSSEventData,
|
|
||||||
AndroidActivityEventData,
|
|
||||||
AndroidActivityBundleEventData,
|
|
||||||
AndroidActivityRequestPermissionsEventData,
|
|
||||||
AndroidActivityResultEventData,
|
|
||||||
AndroidActivityNewIntentEventData,
|
|
||||||
AndroidActivityBackPressedEventData,
|
|
||||||
SystemAppearanceChangedEventData,
|
|
||||||
} from './application';
|
|
||||||
|
|
||||||
// export * as Application from './application';
|
|
||||||
export * from './application';
|
export * from './application';
|
||||||
|
|
||||||
// import { fontScaleChangedEvent, launchEvent, displayedEvent, uncaughtErrorEvent, discardedErrorEvent, suspendEvent, resumeEvent, exitEvent, lowMemoryEvent, orientationChangedEvent, systemAppearanceChanged, systemAppearanceChangedEvent, getMainEntry, getRootView, _resetRootView, getResources, setResources, setCssFileName, getCssFileName, loadAppCss, addCss, on, off, notify, hasListeners, run, orientation, getNativeApplication, hasLaunched, android as appAndroid, ios as iosApp, systemAppearance, setAutoSystemAppearanceChanged, ensureNativeApplication, setMaxRefreshRate } from './application';
|
|
||||||
// import { inBackground, suspended, foregroundEvent, backgroundEvent } from './application/application-common';
|
|
||||||
|
|
||||||
// export const Application = {
|
|
||||||
// launchEvent,
|
|
||||||
// displayedEvent,
|
|
||||||
// uncaughtErrorEvent,
|
|
||||||
// discardedErrorEvent,
|
|
||||||
// suspendEvent,
|
|
||||||
// resumeEvent,
|
|
||||||
// exitEvent,
|
|
||||||
// foregroundEvent,
|
|
||||||
// backgroundEvent,
|
|
||||||
// lowMemoryEvent,
|
|
||||||
// orientationChangedEvent,
|
|
||||||
// systemAppearanceChangedEvent,
|
|
||||||
// systemAppearanceChanged,
|
|
||||||
// fontScaleChangedEvent,
|
|
||||||
// setMaxRefreshRate,
|
|
||||||
|
|
||||||
// getMainEntry,
|
|
||||||
// getRootView,
|
|
||||||
// resetRootView: _resetRootView,
|
|
||||||
// getResources,
|
|
||||||
// setResources,
|
|
||||||
// setCssFileName,
|
|
||||||
// getCssFileName,
|
|
||||||
// loadAppCss,
|
|
||||||
// addCss,
|
|
||||||
// on,
|
|
||||||
// off,
|
|
||||||
// notify,
|
|
||||||
// hasListeners,
|
|
||||||
// run,
|
|
||||||
// orientation,
|
|
||||||
// getNativeApplication,
|
|
||||||
// hasLaunched,
|
|
||||||
// systemAppearance,
|
|
||||||
// setAutoSystemAppearanceChanged,
|
|
||||||
// get android() {
|
|
||||||
// ensureNativeApplication();
|
|
||||||
// return appAndroid;
|
|
||||||
// },
|
|
||||||
// get ios() {
|
|
||||||
// ensureNativeApplication();
|
|
||||||
// return iosApp;
|
|
||||||
// },
|
|
||||||
// get suspended() {
|
|
||||||
// return suspended;
|
|
||||||
// },
|
|
||||||
// get inBackground() {
|
|
||||||
// return inBackground;
|
|
||||||
// },
|
|
||||||
// };
|
|
||||||
|
|
||||||
export * as ApplicationSettings from './application-settings';
|
export * as ApplicationSettings from './application-settings';
|
||||||
// // Export all methods from "application-settings" as ApplicationSettings
|
|
||||||
// import { setString, getString, clear, flush, getAllKeys, getBoolean, getNumber, hasKey, remove, setBoolean, setNumber } from './application-settings';
|
|
||||||
// export const ApplicationSettings = {
|
|
||||||
// clear,
|
|
||||||
// flush,
|
|
||||||
// hasKey,
|
|
||||||
// remove,
|
|
||||||
// setString,
|
|
||||||
// getString,
|
|
||||||
// getAllKeys,
|
|
||||||
// getBoolean,
|
|
||||||
// setBoolean,
|
|
||||||
// getNumber,
|
|
||||||
// setNumber,
|
|
||||||
// };
|
|
||||||
|
|
||||||
import * as Accessibility from './accessibility';
|
import * as Accessibility from './accessibility';
|
||||||
export namespace AccessibilityEvents {
|
export namespace AccessibilityEvents {
|
||||||
export const accessibilityBlurEvent = Accessibility.accessibilityBlurEvent;
|
export const accessibilityBlurEvent = Accessibility.accessibilityBlurEvent;
|
||||||
@ -105,12 +13,6 @@ export namespace AccessibilityEvents {
|
|||||||
export const accessibilityPerformEscapeEvent =
|
export const accessibilityPerformEscapeEvent =
|
||||||
Accessibility.accessibilityPerformEscapeEvent;
|
Accessibility.accessibilityPerformEscapeEvent;
|
||||||
}
|
}
|
||||||
// export const AccessibilityEvents = {
|
|
||||||
// accessibilityBlurEvent,
|
|
||||||
// accessibilityFocusEvent,
|
|
||||||
// accessibilityFocusChangedEvent,
|
|
||||||
// accessibilityPerformEscapeEvent,
|
|
||||||
// };
|
|
||||||
export {
|
export {
|
||||||
AccessibilityLiveRegion,
|
AccessibilityLiveRegion,
|
||||||
AccessibilityRole,
|
AccessibilityRole,
|
||||||
@ -120,20 +22,9 @@ export {
|
|||||||
} from './accessibility';
|
} from './accessibility';
|
||||||
|
|
||||||
export { Color } from './color';
|
export { Color } from './color';
|
||||||
|
|
||||||
export * as Connectivity from './connectivity';
|
export * as Connectivity from './connectivity';
|
||||||
// import { connectionType, getConnectionType, startMonitoring, stopMonitoring } from './connectivity';
|
|
||||||
// export const Connectivity = {
|
|
||||||
// connectionType,
|
|
||||||
// getConnectionType,
|
|
||||||
// startMonitoring,
|
|
||||||
// stopMonitoring,
|
|
||||||
// };
|
|
||||||
|
|
||||||
export * from './core-types';
|
export * from './core-types';
|
||||||
|
|
||||||
export { CSSUtils } from './css/system-classes';
|
export { CSSUtils } from './css/system-classes';
|
||||||
|
|
||||||
export { ObservableArray, ChangeType } from './data/observable-array';
|
export { ObservableArray, ChangeType } from './data/observable-array';
|
||||||
export type { ChangedData } from './data/observable-array';
|
export type { ChangedData } from './data/observable-array';
|
||||||
export {
|
export {
|
||||||
@ -164,20 +55,8 @@ export type {
|
|||||||
HttpContent,
|
HttpContent,
|
||||||
} from './http';
|
} from './http';
|
||||||
export * as Http from './http';
|
export * as Http from './http';
|
||||||
|
|
||||||
// Export all methods from "http" as Http
|
|
||||||
// import { getFile, getImage, getJSON, getString as httpGetString, request } from './http';
|
|
||||||
// export const Http = {
|
|
||||||
// getFile,
|
|
||||||
// getImage,
|
|
||||||
// getJSON,
|
|
||||||
// getString: httpGetString,
|
|
||||||
// request,
|
|
||||||
// };
|
|
||||||
|
|
||||||
export { ImageAsset } from './image-asset';
|
export { ImageAsset } from './image-asset';
|
||||||
export type { ImageAssetOptions } from './image-asset';
|
export type { ImageAssetOptions } from './image-asset';
|
||||||
|
|
||||||
export { ImageSource } from './image-source';
|
export { ImageSource } from './image-source';
|
||||||
export { ModuleNameResolver, _setResolver } from './module-name-resolver';
|
export { ModuleNameResolver, _setResolver } from './module-name-resolver';
|
||||||
export type { ModuleListProvider, PlatformContext } from './module-name-resolver';
|
export type { ModuleListProvider, PlatformContext } from './module-name-resolver';
|
||||||
@ -204,5 +83,4 @@ export { encoding } from './text';
|
|||||||
export * from './trace';
|
export * from './trace';
|
||||||
export * from './ui';
|
export * from './ui';
|
||||||
export * as Utils from './utils';
|
export * as Utils from './utils';
|
||||||
|
|
||||||
export { XmlParser, ParserEventType, ParserEvent } from './xml';
|
export { XmlParser, ParserEventType, ParserEvent } from './xml';
|
||||||
|
Reference in New Issue
Block a user