chore: cleanup reexports

This commit is contained in:
Nathan Walker
2020-07-05 14:53:34 -07:00
parent 1525c89733
commit 8f2900ad0b
306 changed files with 1197 additions and 1534 deletions

View File

@@ -1,6 +1,7 @@
import { Property, CssProperty, CssAnimationProperty, InheritedProperty, Style } from "../properties";
import { Property, CssProperty, CssAnimationProperty, InheritedProperty } from "../properties";
import { BindingOptions } from "../bindable";
import { Observable } from "../../../data/observable";
import { Style } from "../../styling/style";
import { Page } from "../../page";
@@ -163,7 +164,7 @@ export abstract class ViewBase extends Observable {
* and will be applied when all prerequisites are met.
* @private
*/
_suspendedUpdates: { [propertyName: string]: Property<ViewBase, any> | CssProperty<Style, any> | CssAnimationProperty<Style, any> };
_suspendedUpdates: { [propertyName: string]: Property<any, any> | CssProperty<Style, any> | CssAnimationProperty<Style, any> };
//@endprivate
/**
@@ -493,9 +494,9 @@ export class Binding {
public unbind();
}
export const idProperty: Property<ViewBase, string>;
export const classNameProperty: Property<ViewBase, string>;
export const bindingContextProperty: InheritedProperty<ViewBase, any>;
export const idProperty: Property<any, string>;
export const classNameProperty: Property<any, string>;
export const bindingContextProperty: InheritedProperty<any, any>;
/**
* Converts string into boolean value.

View File

@@ -41,6 +41,62 @@ function ensureStyleScopeModule() {
let defaultBindingSource = {};
export interface ShowModalOptions {
/**
* Any context you want to pass to the modally shown view. This same context will be available in the arguments of the shownModally event handler.
*/
context: any;
/**
* A function that will be called when the view is closed. Any arguments provided when calling ShownModallyData.closeCallback will be available here.
*/
closeCallback: Function;
/**
* An optional parameter specifying whether to show the modal view in full-screen mode.
*/
fullscreen?: boolean;
/**
* An optional parameter specifying whether to show the modal view with animation.
*/
animated?: boolean;
/**
* An optional parameter specifying whether to stretch the modal view when not in full-screen mode.
*/
stretched?: boolean;
/**
* An optional parameter that specify options specific to iOS as an object.
*/
ios?: {
/**
* The UIModalPresentationStyle to be used when showing the dialog in iOS .
*/
presentationStyle?: any; /* UIModalPresentationStyle */
/**
* width of the popup dialog
*/
width?: number;
/**
* height of the popup dialog
*/
height?: number;
}
android?: {
/**
* @deprecated Use ShowModalOptions.cancelable instead.
* An optional parameter specifying whether the modal view can be dismissed when not in full-screen mode.
*/
cancelable?: boolean
}
/**
* An optional parameter specifying whether the modal view can be dismissed when not in full-screen mode.
*/
cancelable?: boolean
}
export function getAncestor(view: ViewBaseDefinition, criterion: string | Function): ViewBaseDefinition {
let matcher: (view: ViewBaseDefinition) => boolean = null;
if (typeof criterion === "string") {
@@ -334,7 +390,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
this[name] = WrappedValue.unwrap(value);
}
@profile
@profile()
public onLoaded() {
this.setFlag(Flags.superOnLoadedCalled, true);
if (this._isLoaded) {
@@ -354,7 +410,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
this._emit("loaded");
}
@profile
@profile()
public onUnloaded() {
this.setFlag(Flags.superOnUnloadedCalled, true);
if (!this._isLoaded) {
@@ -476,7 +532,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
return allStates;
}
@profile
@profile()
public addPseudoClass(name: string): void {
let allStates = this.getAllAliasedStates(name);
for (let i = 0; i < allStates.length; i++) {
@@ -487,7 +543,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
}
}
@profile
@profile()
public deletePseudoClass(name: string): void {
let allStates = this.getAllAliasedStates(name);
for (let i = 0; i < allStates.length; i++) {
@@ -570,7 +626,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
}
}
@profile
@profile()
public requestLayout(): void {
// Default implementation for non View instances (like TabViewItem).
const parent = this.parent;
@@ -583,7 +639,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
//
}
@profile
@profile()
public _addView(view: ViewBase, atIndex?: number) {
if (Trace.isEnabled()) {
Trace.write(`${this}._addView(${view}, ${atIndex})`, Trace.categories.ViewHierarchy);
@@ -710,7 +766,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
this._setupUI(context);
}
@profile
@profile()
public _setupUI(context: android.content.Context, atIndex?: number, parentIsLoaded?: boolean): void {
if (this._context === context) {
return;
@@ -804,7 +860,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
}
}
@profile
@profile()
public _tearDownUI(force?: boolean): void {
// No context means we are already teared down.
if (!this._context) {
@@ -921,7 +977,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
}
ensureStyleScopeModule();
styleScopeModule.applyInlineStyle(this, style);
styleScopeModule.applyInlineStyle(this, style, undefined);
}
public _parentChanged(oldParent: ViewBase): void {
@@ -941,7 +997,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
public onResumeNativeUpdates(): void {
// Apply native setters...
initNativeView(this);
initNativeView(this, undefined, undefined);
}
public toString(): string {

View File

@@ -1,5 +0,0 @@
{
"name": "view-base",
"main": "view-base",
"types": "view-base.d.ts"
}