mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
8
nativescript-core/ui/page/index.d.ts
vendored
8
nativescript-core/ui/page/index.d.ts
vendored
@@ -1,12 +1,14 @@
|
||||
import { CssProperty, Property } from '../core/properties';
|
||||
import { PageBase } from './page-common';
|
||||
import { CssProperty, Property } from '../core/properties';
|
||||
import { Style } from '../styling/style';
|
||||
import { EventData } from '../../data/observable';
|
||||
import { ContentView } from '../content-view';
|
||||
import { Frame } from '../frame';
|
||||
import { ActionBar } from '../action-bar';
|
||||
import { KeyframeAnimationInfo } from '../animation/keyframe-animation';
|
||||
import { Color } from '../../color';
|
||||
|
||||
export * from './page-common';
|
||||
|
||||
/**
|
||||
* Defines the data for the page navigation events.
|
||||
*/
|
||||
@@ -29,7 +31,7 @@ export module knownCollections {
|
||||
/**
|
||||
* Represents a logical unit for navigation (inside Frame).
|
||||
*/
|
||||
export class Page extends ContentView {
|
||||
export declare class Page extends PageBase {
|
||||
/**
|
||||
* String value used when hooking to navigatingTo event.
|
||||
*/
|
||||
|
||||
52
nativescript-core/ui/page/page-common.d.ts
vendored
Normal file
52
nativescript-core/ui/page/page-common.d.ts
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
import { Page as PageDefinition } from '.';
|
||||
import { ContentView } from '../content-view';
|
||||
import { Frame } from '../frame';
|
||||
import { KeyframeAnimationInfo } from '../animation';
|
||||
import { NavigatedData } from '.';
|
||||
import { Color } from '../../color';
|
||||
import { ActionBar } from '../action-bar';
|
||||
import { View } from '../core/view';
|
||||
export declare class PageBase extends ContentView {
|
||||
static navigatingToEvent: string;
|
||||
static navigatedToEvent: string;
|
||||
static navigatingFromEvent: string;
|
||||
static navigatedFromEvent: string;
|
||||
_frame: Frame;
|
||||
actionBarHidden: boolean;
|
||||
enableSwipeBackNavigation: boolean;
|
||||
backgroundSpanUnderStatusBar: boolean;
|
||||
hasActionBar: boolean;
|
||||
readonly navigationContext: any;
|
||||
|
||||
actionBar: ActionBar;
|
||||
|
||||
statusBarStyle: 'light' | 'dark';
|
||||
androidStatusBarBackground: Color;
|
||||
|
||||
readonly page: PageDefinition;
|
||||
|
||||
_addChildFromBuilder(name: string, value: any): void;
|
||||
|
||||
getKeyframeAnimationWithName(animationName: string): KeyframeAnimationInfo;
|
||||
|
||||
readonly frame: Frame;
|
||||
|
||||
createNavigatedData(eventName: string, isBackNavigation: boolean): NavigatedData {
|
||||
return {
|
||||
eventName: eventName,
|
||||
object: this,
|
||||
context: this.navigationContext,
|
||||
isBackNavigation: isBackNavigation,
|
||||
};
|
||||
}
|
||||
|
||||
onNavigatingTo(context: any, isBackNavigation: boolean, bindingContext?: any): void;
|
||||
|
||||
onNavigatedTo(isBackNavigation: boolean): void;
|
||||
|
||||
onNavigatingFrom(isBackNavigation: boolean): void;
|
||||
|
||||
onNavigatedFrom(isBackNavigation: boolean): void;
|
||||
|
||||
eachChildView(callback: (child: View) => boolean): void;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Page as PageDefinition, NavigatedData } from '.';
|
||||
import { Page as PageDefinition } from '.';
|
||||
import { ContentView } from '../content-view';
|
||||
import { View, CSSType, ShownModallyData } from '../core/view';
|
||||
import { booleanConverter } from '../core/view-base';
|
||||
@@ -12,8 +12,13 @@ import { ActionBar } from '../action-bar';
|
||||
import { KeyframeAnimationInfo } from '../animation/keyframe-animation';
|
||||
import { profile } from '../../profiling';
|
||||
|
||||
interface NavigatedData extends EventData {
|
||||
context: any;
|
||||
isBackNavigation: boolean;
|
||||
}
|
||||
|
||||
@CSSType('Page')
|
||||
export class PageBase extends ContentView implements PageDefinition {
|
||||
export class PageBase extends ContentView {
|
||||
public static navigatingToEvent = 'navigatingTo';
|
||||
public static navigatedToEvent = 'navigatedTo';
|
||||
public static navigatingFromEvent = 'navigatingFrom';
|
||||
|
||||
Reference in New Issue
Block a user