diff --git a/src/components/action-sheet/action-sheet.ts b/src/components/action-sheet/action-sheet.ts index ec52b560c0..90a7e87ed1 100644 --- a/src/components/action-sheet/action-sheet.ts +++ b/src/components/action-sheet/action-sheet.ts @@ -141,7 +141,6 @@ export class ActionSheet extends ViewController { opts.enableBackdropDismiss = isPresent(opts.enableBackdropDismiss) ? !!opts.enableBackdropDismiss : true; super(ActionSheetCmp, opts); - this.viewType = 'action-sheet'; this.isOverlay = true; // by default, actionsheets should not fire lifecycle events of other views diff --git a/src/components/alert/alert.ts b/src/components/alert/alert.ts index 0716e27805..e9a6b38da9 100644 --- a/src/components/alert/alert.ts +++ b/src/components/alert/alert.ts @@ -194,7 +194,6 @@ export class Alert extends ViewController { opts.enableBackdropDismiss = isPresent(opts.enableBackdropDismiss) ? !!opts.enableBackdropDismiss : true; super(AlertCmp, opts); - this.viewType = 'alert'; this.isOverlay = true; // by default, alerts should not fire lifecycle events of other views diff --git a/src/components/loading/loading.ts b/src/components/loading/loading.ts index 17fd6f98c3..effd4e0cc1 100644 --- a/src/components/loading/loading.ts +++ b/src/components/loading/loading.ts @@ -111,7 +111,6 @@ export class Loading extends ViewController { opts.dismissOnPageChange = isPresent(opts.dismissOnPageChange) ? !!opts.dismissOnPageChange : false; super(LoadingCmp, opts); - this.viewType = 'loading'; this.isOverlay = true; this.usePortal = true; diff --git a/src/components/nav/nav-controller.ts b/src/components/nav/nav-controller.ts index 5c352eb155..693829dcdf 100644 --- a/src/components/nav/nav-controller.ts +++ b/src/components/nav/nav-controller.ts @@ -1201,10 +1201,6 @@ export class NavController extends Ion { this.setTransitioning(!enableApp, duration); } - if (enteringView.viewType) { - transAnimation.before.addClass(enteringView.viewType); - } - // create a callback for when the animation is done transAnimation.onFinish((trans: Transition) => { // transition animation has ended @@ -1472,8 +1468,8 @@ export class NavController extends Ion { return; } - // automatically set "ion-page" selector - // TODO: see about having this set using ComponentFactory + // TEMPORARY: automatically set selector w/ dah reflector + // TODO: use componentFactory.create once fixed addSelector(view.componentType, 'ion-page'); this._compiler.resolveComponent(view.componentType).then(componentFactory => { diff --git a/src/components/nav/view-controller.ts b/src/components/nav/view-controller.ts index 3ca658db92..a4a3e59e8f 100644 --- a/src/components/nav/view-controller.ts +++ b/src/components/nav/view-controller.ts @@ -68,11 +68,6 @@ export class ViewController { */ state: string = ''; - /** - * @private - */ - viewType: string = ''; - /** * @private * If this is currently the active view, then set to false diff --git a/src/components/picker/picker.ts b/src/components/picker/picker.ts index 6cf5a13c70..23ebc72825 100644 --- a/src/components/picker/picker.ts +++ b/src/components/picker/picker.ts @@ -26,7 +26,6 @@ export class Picker extends ViewController { opts.enableBackdropDismiss = isPresent(opts.enableBackdropDismiss) ? !!opts.enableBackdropDismiss : true; super(PickerDisplayCmp, opts); - this.viewType = 'picker'; this.isOverlay = true; this.ionChange = new EventEmitter(); diff --git a/src/components/popover/popover.ts b/src/components/popover/popover.ts index 6791b0eb8b..74957ea197 100644 --- a/src/components/popover/popover.ts +++ b/src/components/popover/popover.ts @@ -2,14 +2,13 @@ import {Component, ComponentResolver, ElementRef, HostListener, Renderer, ViewCh import {addSelector} from '../../config/bootstrap'; import {Animation} from '../../animations/animation'; +import {Config} from '../../config/config'; +import {CSS, nativeRaf} from '../../util/dom'; +import {isPresent, pascalCaseToDashCase} from '../../util/util'; +import {Key} from '../../util/key'; +import {NavParams} from '../nav/nav-params'; import {PageTransition} from '../../transitions/page-transition'; import {TransitionOptions} from '../../transitions/transition'; -import {Config} from '../../config/config'; -import {NavParams} from '../nav/nav-params'; -import {Platform} from '../../platform/platform'; -import {Key} from '../../util/key'; -import {isPresent, isUndefined, isDefined} from '../../util/util'; -import {nativeRaf, CSS} from '../../util/dom'; import {ViewController} from '../nav/view-controller'; const POPOVER_IOS_BODY_PADDING = 2; @@ -114,7 +113,6 @@ export class Popover extends ViewController { data.componentType = componentType; data.opts = opts; super(PopoverCmp, data); - this.viewType = 'popover'; this.isOverlay = true; // by default, popovers should not fire lifecycle events of other views @@ -123,13 +121,13 @@ export class Popover extends ViewController { this.fireOtherLifecycles = false; } - /** + /** * @private */ - getTransitionName(direction: string) { - let key = (direction === 'back' ? 'popoverLeave' : 'popoverEnter'); - return this._nav && this._nav.config.get(key); - } + getTransitionName(direction: string) { + let key = (direction === 'back' ? 'popoverLeave' : 'popoverEnter'); + return this._nav && this._nav.config.get(key); + } /** * Create a popover with the following options @@ -162,7 +160,7 @@ export class Popover extends ViewController { '
' + '
' + '
' + - '
' + + '
' + '
' + '
' + '' @@ -230,7 +228,7 @@ class PopoverCmp { @HostListener('body:keyup', ['$event']) private _keyUp(ev: KeyboardEvent) { - if (this.enabled && this._viewCtrl.isLast() && ev.keyCode === Key.ESCAPE ) { + if (this.enabled && ev.keyCode === Key.ESCAPE && this._viewCtrl.isLast()) { this.bdClick(); } } diff --git a/src/components/toast/toast.ts b/src/components/toast/toast.ts index daaadd06cf..1615ca4380 100644 --- a/src/components/toast/toast.ts +++ b/src/components/toast/toast.ts @@ -74,7 +74,6 @@ export class Toast extends ViewController { opts.position = TOAST_POSITION_BOTTOM; } - this.viewType = 'toast'; this.isOverlay = true; this.usePortal = true; diff --git a/src/index.ts b/src/index.ts index 75e546eddb..5b044f3477 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,6 +21,7 @@ export * from './util/keyboard'; export * from './util/form'; export * from './animations/animation'; +export * from './transitions/page-transition'; export * from './transitions/transition'; export * from './translation/translate'; diff --git a/src/transitions/page-transition.ts b/src/transitions/page-transition.ts index 7136d3caee..a65e4e952b 100644 --- a/src/transitions/page-transition.ts +++ b/src/transitions/page-transition.ts @@ -2,7 +2,7 @@ import {Animation} from '../animations/animation'; import {closest} from '../util/dom'; import {Content} from '../components/content/content'; import {Tabs} from '../components/tabs/tabs'; -import {Transition} from './transition'; +import {Transition, TransitionOptions} from './transition'; import {ViewController} from '../components/nav/view-controller'; @@ -130,13 +130,3 @@ function parsePxUnit(val: string): number { return (val.indexOf('px') > 0) ? parseInt(val, 10) : 0; } -export interface TransitionOptions { - animation: string; - duration: number; - easing: string; - direction: string; - renderDelay?: number; - isRTL?: boolean; - ev?: any; -} -