diff --git a/.gitignore b/.gitignore index 881d94b..d15732c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules npm-debug.log typings aot +dist .idea/ diff --git a/package.json b/package.json index 642d609..a697902 100644 --- a/package.json +++ b/package.json @@ -1,34 +1,36 @@ { - "name": "angular2-swing", - "version": "0.10.0", - "description": "Angular 2 Component for Swing (Tinder style cards)", - "main": "dist/index.js", - "typings": "dist/index.d.ts", - "scripts": { - "build-app": "./node_modules/.bin/ngc", - "clean": "rm -rf ./dist && rm -rf ./aot", - "build": "npm run clean && npm run build-app" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ksachdeva/angular2-swing.git" - }, - "author": "Kapil Sachdeva ", - "license": "MIT", - "bugs": { - "url": "https://github.com/ksachdeva/angular2-swing/issues" - }, - "homepage": "https://github.com/ksachdeva/angular2-swing#readme", - "dependencies": { - "swing": "^4.3.0" - }, - "devDependencies": { - "@angular/common": "^2.0.2", - "@angular/core": "^2.0.2", - "angular-cli": "^1.0.0-beta.17", - "core-js": "^2.4.1", - "reflect-metadata": "^0.1.3", - "rxjs": "5.0.0-beta.12", - "zone.js": "^0.6.23" - } + "name": "angular2-swing", + "version": "0.11.0", + "description": "Angular 2 Component for Swing (Tinder style cards)", + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "scripts": { + "build-app": "./node_modules/.bin/ngc", + "clean": "rm -rf ./dist && rm -rf ./aot", + "build": "npm run clean && npm run build-app" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ksachdeva/angular2-swing.git" + }, + "author": "Kapil Sachdeva ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ksachdeva/angular2-swing/issues" + }, + "homepage": "https://github.com/ksachdeva/angular2-swing#readme", + "dependencies": { + "swing": "^4.3.0" + }, + "devDependencies": { + "@angular/common": "^4.0.0", + "@angular/compiler": "^4.0.0", + "@angular/core": "^4.0.0", + "@angular/cli": "1.0.0", + "@angular/compiler-cli": "^4.0.0", + "core-js": "^2.4.1", + "reflect-metadata": "^0.1.3", + "rxjs": "5.0.0-beta.12", + "zone.js": "^0.8.4" + } } diff --git a/src/index.ts b/src/index.ts index 1311e12..b24095a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,6 @@ export { SwingStackComponent } from './swing-stack-component'; export { SwingCardComponent } from './swing-card-component'; export { - ThrowDirection, ThrowEvent, DragEvent, ThrowEventName, diff --git a/src/swing-stack-component.ts b/src/swing-stack-component.ts index f569b47..e981250 100644 --- a/src/swing-stack-component.ts +++ b/src/swing-stack-component.ts @@ -3,7 +3,7 @@ declare var require: any; import {Component, Input, ContentChildren, QueryList, AfterContentInit, EventEmitter } from '@angular/core'; -import { ThrowDirection, ThrowEvent, DragEvent, Stack, Card, StackConfig} from './swing'; +import { Direction, ThrowEvent, DragEvent, Stack, Card, StackConfig } from './swing'; import {SwingCardComponent} from './swing-card-component'; const Swing = require('swing'); diff --git a/src/swing.ts b/src/swing.ts index 403677e..759dd8c 100644 --- a/src/swing.ts +++ b/src/swing.ts @@ -4,13 +4,6 @@ declare var require: any; const Swing = require('swing'); -export enum ThrowDirection { - LEFT = -1, - RIGHT = 1, - UP = 2, - DOWN = 3 -} - export interface ThrowEvent { /** * The element being dragged. @@ -21,7 +14,7 @@ export interface ThrowEvent { * The direction in which the element is being dragged: Card.DIRECTION_LEFT * or Card.DIRECTION_RIGHT */ - throwDirection: ThrowDirection; + throwDirection: Direction; } export interface DragEvent { @@ -37,7 +30,7 @@ export interface DragEvent { /** * Only available when the event is dragmove */ - throwDirection?: ThrowDirection; + throwDirection?: Direction; /** * Only available when the event is dragmove */