Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating to beta14 and cleaning up imports #132

Merged
merged 1 commit into from
Apr 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions components/charts/charts.d.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
import { OnDestroy, OnInit, OnChanges, ElementRef } from 'angular2/core';
export declare class Charts {
constructor(element: ElementRef);
}
export declare class BaseChart implements OnInit, OnDestroy, OnChanges {
private element;
data: Array<any>;
labels: Array<any>;
options: any;
chartType: string;
series: Array<any>;
colours: Array<any>;
legend: boolean;
private ctx;
private cvs;
private parent;
private chart;
private legendTemplate;
private initFlag;
private chartClick;
private chartHover;
private defaultsColours;
constructor(element: ElementRef);
ngOnInit(): void;
ngOnChanges(changes: any): void;
ngOnDestroy(): void;
setLegend(): void;
getColour(colour: Array<number>): any;
getRandomInt(min: any, max: any): any;
rgba(colour: any, alpha: any): string;
click(evt: any): void;
hover(evt: any): void;
getChartBuilder(ctx: any, data: Array<any>, options: any): any;
getDataObject(label: string, value: any): any;
getChartData(labels: any, dataObject: any): any;
private refresh();
}
export declare const CHART_DIRECTIVES: Array<any>;
import { OnDestroy, OnInit, OnChanges, ElementRef } from 'angular2/core';
export declare class Charts {
constructor(element: ElementRef);
}
export declare class BaseChart implements OnInit, OnDestroy, OnChanges {
private element;
data: Array<any>;
labels: Array<any>;
options: any;
chartType: string;
series: Array<any>;
colours: Array<any>;
legend: boolean;
private ctx;
private cvs;
private parent;
private chart;
private legendTemplate;
private initFlag;
private chartClick;
private chartHover;
private defaultsColours;
constructor(element: ElementRef);
ngOnInit(): void;
ngOnChanges(changes: any): void;
ngOnDestroy(): void;
setLegend(): void;
getColour(colour: Array<number>): any;
getRandomInt(min: any, max: any): any;
rgba(colour: any, alpha: any): string;
click(evt: any): void;
hover(evt: any): void;
getChartBuilder(ctx: any, data: Array<any>, options: any): any;
getDataObject(label: string, value: any): any;
getChartData(labels: any, dataObject: any): any;
private refresh();
}
export declare const CHART_DIRECTIVES: Array<any>;
3 changes: 1 addition & 2 deletions components/charts/charts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
Component, Directive,
AfterViewChecked, OnDestroy, OnInit, OnChanges,
Component, OnDestroy, OnInit, OnChanges,
EventEmitter, ElementRef, Input
} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';
Expand Down
2 changes: 2 additions & 0 deletions components/charts/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
///<reference path="../../node_modules/angular2/typings/browser.d.ts"/>
///<reference path="../../typings/browser.d.ts" />
4 changes: 2 additions & 2 deletions demo/components/charts-section.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES} from 'angular2/common';

import {tabs} from 'ng2-bootstrap/ng2-bootstrap';
import {TAB_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap';
import {LineChartDemo} from './charts/line-chart-demo';
import {BarChartDemo} from './charts/bar-chart-demo';
import {DoughnutChartDemo} from './charts/doughnut-chart-demo';
Expand Down Expand Up @@ -142,7 +142,7 @@ chartDesc.forEach(desc => {
</section>
`,
directives: [LineChartDemo, BarChartDemo, DoughnutChartDemo, PieChartDemo,
PolarAreaChartDemo, RadarChartDemo, BaseChartDemo, tabs, CORE_DIRECTIVES]
PolarAreaChartDemo, RadarChartDemo, BaseChartDemo, TAB_DIRECTIVES, CORE_DIRECTIVES]
})
export class ChartsSection {
}
2 changes: 1 addition & 1 deletion demo/components/charts/bar-chart-demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, EventEmitter} from 'angular2/core';
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';

import {CHART_DIRECTIVES} from '../../../ng2-charts';
Expand Down
2 changes: 1 addition & 1 deletion demo/components/charts/base-chart-demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, EventEmitter} from 'angular2/core';
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';

import {CHART_DIRECTIVES} from '../../../ng2-charts';
Expand Down
2 changes: 1 addition & 1 deletion demo/components/charts/doughnut-chart-demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, EventEmitter} from 'angular2/core';
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';

import {CHART_DIRECTIVES} from '../../../ng2-charts';
Expand Down
2 changes: 1 addition & 1 deletion demo/components/charts/line-chart-demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, EventEmitter} from 'angular2/core';
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';

import {CHART_DIRECTIVES} from '../../../ng2-charts';
Expand Down
2 changes: 1 addition & 1 deletion demo/components/charts/pie-chart-demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, EventEmitter} from 'angular2/core';
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';

import {CHART_DIRECTIVES} from '../../../ng2-charts';
Expand Down
2 changes: 1 addition & 1 deletion demo/components/charts/polar-area-chart-demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, EventEmitter} from 'angular2/core';
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';

import {CHART_DIRECTIVES} from '../../../ng2-charts';
Expand Down
2 changes: 1 addition & 1 deletion demo/components/charts/radar-chart-demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, EventEmitter} from 'angular2/core';
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass} from 'angular2/common';

import {CHART_DIRECTIVES} from '../../../ng2-charts';
Expand Down
2 changes: 1 addition & 1 deletion demo/components/demo-header.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, View} from 'angular2/core';
import {Component} from 'angular2/core';
import {NgFor} from 'angular2/common';

import {Collapse, DROPDOWN_DIRECTIVES, Ng2BootstrapConfig, Ng2BootstrapTheme} from 'ng2-bootstrap/ng2-bootstrap';
Expand Down
1 change: 1 addition & 0 deletions demo/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
///<reference path="../node_modules/angular2/typings/browser.d.ts"/>
import {bootstrap} from 'angular2/bootstrap';
import {Component} from 'angular2/core';
import {NgClass} from 'angular2/common';
Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"deploy": "NODE_ENV=production webpack -p --progress --color --optimize-minimize --optimize-dedupe --optimize-occurence-order",
"prepublish": "gulp clean && tsc",
"postinstall": "typings install --ambient",
"server": "webpack-dev-server --hot --inline --colors --display-error-details --display-cached",
"start": "npm run server",
"test": "gulp lint"
Expand All @@ -28,35 +29,36 @@
"homepage": "https://github.com/valor-software/ng2-charts#readme",
"dependencies": {},
"devDependencies": {
"angular2": "2.0.0-beta.0",
"angular2": "2.0.0-beta.14",
"bootstrap": "3.3.6",
"chart.js": "1.0.2",
"clean-webpack-plugin": "0.1.8",
"compression-webpack-plugin": "0.3.1",
"es6-shim": "0.33.13",
"eslint": "1.10.3",
"es6-shim": "0.35.0",
"eslint": "^2.7.0",
"exports-loader": "0.6.3",
"gulp": "3.9.1",
"gulp-clean": "0.3.2",
"gulp-eslint": "1.1.1",
"gulp-eslint": "^2.0.0",
"gulp-size": "2.1.0",
"gulp-tsc": "1.1.4",
"gulp-tslint": "4.3.4",
"gulp-tslint": "4.3.5",
"html-loader": "0.4.2",
"markdown-loader": "0.1.7",
"marked": "0.3.5",
"ng2-bootstrap": "1.0.7",
"ng2-bootstrap": "1.0.11",
"pre-commit": "1.1.2",
"prismjs": "valorkin/prism",
"prismjs-loader": "0.0.2",
"raw-loader": "0.5.1",
"reflect-metadata": "0.1.2",
"require-dir": "0.3.0",
"rxjs": "5.0.0-beta.0",
"rxjs": "5.0.0-beta.2",
"transfer-webpack-plugin": "0.1.4",
"ts-loader": "0.8.1",
"tslint": "3.5.0",
"typescript": "1.8.9",
"typings": "^0.7.12",
"webpack": "1.12.14",
"webpack-dev-server": "1.14.0",
"zone.js": "0.6.6"
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"node_modules"
],
"files": [
"./ng2-charts.ts"
"./ng2-charts.ts",
"./components/charts/typings.d.ts"
]
}
2 changes: 0 additions & 2 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"no-shadowed-variable": true,
"no-string-literal": true,
"no-switch-case-fall-through": true,
"no-trailing-comma": true,
"no-trailing-whitespace": true,
"no-unused-expression": true,
"no-unused-variable": false,
Expand All @@ -43,7 +42,6 @@
"quotemark": [true, "single"],
"radix": true,
"semicolon": true,
"sort-object-literal-keys": false,
"triple-equals": [true, "allow-null-check"],
"variable-name": false,
"whitespace": [true,
Expand Down
5 changes: 5 additions & 0 deletions typings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ambientDependencies": {
"require": "github:DefinitelyTyped/DefinitelyTyped/requirejs/require.d.ts"
}
}
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var config = {
entry: {
angular2: [
// Angular 2 Deps
'zone.js/dist/zone-microtask',
'zone.js/dist/zone',
'reflect-metadata',
'angular2/common',
'angular2/core'
Expand Down