From 3ba2ab6d4459ea298be3268a593f18d1d713f837 Mon Sep 17 00:00:00 2001 From: Dmitriy Schekhovtsov Date: Sat, 16 Jan 2016 12:17:21 +0200 Subject: [PATCH] chore(upgrade): to ng2 beta 1 --- .gitignore | 3 -- .npmignore | 3 -- components/ng2-select-config.ts | 16 ------- components/select/select-pipes.ts | 2 +- components/select/select.ts | 51 +++++++++++----------- demo/components/select-section.ts | 10 ++--- demo/components/select/children-demo.html | 4 +- demo/components/select/children-demo.ts | 17 +++----- demo/components/select/multiple-demo.ts | 17 +++----- demo/components/select/single-demo.ts | 17 +++----- demo/index-bs4.html | 30 ------------- demo/index.ts | 29 ++----------- ng2-select.ts | 1 - package.json | 52 ++++++++++++++--------- tsconfig.json | 2 +- tsd.d.ts | 2 - webpack.config.js | 2 +- 17 files changed, 85 insertions(+), 173 deletions(-) delete mode 100644 components/ng2-select-config.ts delete mode 100644 demo/index-bs4.html delete mode 100644 tsd.d.ts diff --git a/.gitignore b/.gitignore index 5d689f8f..f68b09fb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,6 @@ /node_modules npm-debug.log -# type script artifacts -/typings - # WebStorm .idea diff --git a/.npmignore b/.npmignore index 6dfb3920..f4ba59a3 100644 --- a/.npmignore +++ b/.npmignore @@ -4,7 +4,4 @@ build gulp-tasks logs -tsd.d.ts -typings - webpack.config.js diff --git a/components/ng2-select-config.ts b/components/ng2-select-config.ts deleted file mode 100644 index fe42301b..00000000 --- a/components/ng2-select-config.ts +++ /dev/null @@ -1,16 +0,0 @@ -export enum Ng2SelectTheme {BS3 = 1, BS4 = 2} - -export class Ng2SelectConfig { - private static _theme: Ng2SelectTheme; - static get theme():Ng2SelectTheme { - // hack as for now - let w: any = window; - if (w && w.__theme === 'bs4') { - return Ng2SelectTheme.BS4; - } - return (this._theme || Ng2SelectTheme.BS3); - } - static set theme(v:Ng2SelectTheme){ - this._theme = v; - } -} diff --git a/components/select/select-pipes.ts b/components/select/select-pipes.ts index 97ca0ecd..03df053a 100644 --- a/components/select/select-pipes.ts +++ b/components/select/select-pipes.ts @@ -1,4 +1,4 @@ -import {Pipe} from 'angular2/angular2'; +import {Pipe} from 'angular2/core'; @Pipe({ name: 'hightlight' diff --git a/components/select/select.ts b/components/select/select.ts index fcbeaf1b..a9cb6ce0 100644 --- a/components/select/select.ts +++ b/components/select/select.ts @@ -1,42 +1,41 @@ import { - Component, View, OnInit, OnDestroy, - Directive, ViewEncapsulation, Self, - EventEmitter, ElementRef, ComponentRef, - Pipe, CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass, NgStyle, + Component, OnInit, OnDestroy, + EventEmitter, ElementRef, Pipe, bind, forwardRef, ResolvedBinding, Injector -} from 'angular2/angular2'; +} from 'angular2/core'; +import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass, NgStyle} from 'angular2/common'; import {SelectItem} from './select-item'; import {HightlightPipe} from './select-pipes'; import {IOptionsBehavior} from './select-interfaces'; let optionsTemplate = ` - -