refactor: improve tree shaking abilities

Internal refactor completed in order to improve tree shaking and dead
code removal. The public API, with an exception to ion-slides, has
stayed the same. However, internally many changes were required so
bundlers could better exclude modules which should not be bundled.
Ultimately most changes resorted to removing references to `window` or
`document`, or a module that referenced one of those.

BREAKING CHANGES

ion-slides was refactored to remove the external dependencies, and
rewritten in TypeScript/ES6 modules to again improve tree shaking
abilities.
This commit is contained in:
Adam Bradley
2017-01-09 09:51:39 -06:00
parent 13cf6a6cb7
commit 7000b1b173
191 changed files with 9401 additions and 13664 deletions

View File

@ -1,11 +1,12 @@
import { Component, ElementRef, Renderer, ViewEncapsulation } from '@angular/core';
import { Config } from '../../config/config';
import { GestureController, BlockerDelegate, BLOCK_ALL } from '../../gestures/gesture-controller';
import { isDefined, isUndefined, assert } from '../../util/util';
import { NavParams } from '../../navigation/nav-params';
import { ViewController } from '../../navigation/view-controller';
import { LoadingOptions } from './loading-options';
import { BlockerDelegate, GestureController, BLOCK_ALL } from '../../gestures/gesture-controller';
import { NavParams } from '../../navigation/nav-params';
import { Platform } from '../../platform/platform';
import { ViewController } from '../../navigation/view-controller';
/**
* @private
@ -35,6 +36,7 @@ export class LoadingCmp {
constructor(
private _viewCtrl: ViewController,
private _config: Config,
private _plt: Platform,
private _elementRef: ElementRef,
gestureCtrl: GestureController,
params: NavParams,
@ -76,8 +78,7 @@ export class LoadingCmp {
}
ionViewDidEnter() {
let activeElement: any = document.activeElement;
activeElement && activeElement.blur();
this._plt.focusOutActiveElement();
// If there is a duration, dismiss after that amount of time
if ( this.d && this.d.duration ) {