Skip to content

Commit

Permalink
chore(release): 4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed Oct 21, 2017
1 parent 5ec9801 commit 5ba36ad
Show file tree
Hide file tree
Showing 9 changed files with 1,599 additions and 1,903 deletions.
3,080 changes: 1,483 additions & 1,597 deletions package-lock.json

Large diffs are not rendered by default.

86 changes: 42 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-uploader",
"version": "4.0.0",
"version": "4.0.1",
"main": "bundles/ngx-uploader.umd.js",
"module": "lib/index.js",
"esnext": "lib/index.js",
Expand All @@ -27,67 +27,65 @@
},
"homepage": "https://github.com/jkuri/ngx-uploader#readme",
"devDependencies": {
"@angular/animations": "^4.3.4",
"@angular/common": "^4.3.4",
"@angular/compiler": "^4.3.4",
"@angular/compiler-cli": "^4.3.4",
"@angular/core": "^4.3.4",
"@angular/forms": "^4.3.4",
"@angular/http": "^4.3.4",
"@angular/platform-browser": "^4.3.4",
"@angular/platform-browser-dynamic": "^4.3.4",
"@angular/platform-server": "^4.3.4",
"@angular/router": "^4.3.4",
"@ngtools/webpack": "^1.6.0",
"@types/body-parser": "^1.16.4",
"@angular/animations": "^4.4.6",
"@angular/common": "^4.4.6",
"@angular/compiler": "^4.4.6",
"@angular/compiler-cli": "^4.4.6",
"@angular/core": "^4.4.6",
"@angular/forms": "^4.4.6",
"@angular/http": "^4.4.6",
"@angular/platform-browser": "^4.4.6",
"@angular/platform-browser-dynamic": "^4.4.6",
"@angular/platform-server": "^4.4.6",
"@angular/router": "^4.4.6",
"@ngtools/webpack": "^1.7.4",
"@types/body-parser": "^1.16.5",
"@types/cors": "^2.8.1",
"@types/d3": "^4.10.1",
"@types/express": "^4.0.36",
"@types/jasmine": "^2.5.53",
"@types/multer": "^1.3.2",
"@types/node": "^8.0.22",
"@types/rimraf": "^2.0.1",
"add-asset-html-webpack-plugin": "^2.1.0",
"bulma": "^0.5.1",
"compression-webpack-plugin": "^1.0.0",
"copy-webpack-plugin": "^4.0.1",
"core-js": "^2.5.0",
"@types/express": "^4.0.37",
"@types/jasmine": "^2.6.0",
"@types/multer": "^1.3.3",
"@types/node": "^8.0.46",
"@types/rimraf": "^2.0.2",
"add-asset-html-webpack-plugin": "^2.1.2",
"bulma": "^0.6.0",
"compression-webpack-plugin": "^1.0.1",
"copy-webpack-plugin": "^4.2.0",
"core-js": "^2.5.1",
"cors": "^2.8.4",
"css-loader": "^0.28.4",
"d3": "^4.10.2",
"express": "^4.15.4",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"css-loader": "^0.28.7",
"express": "^4.16.2",
"extract-text-webpack-plugin": "^3.0.1",
"file-loader": "^1.1.5",
"html-webpack-plugin": "^2.30.1",
"jasmine": "^2.7.0",
"jasmine": "^2.8.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^1.7.0",
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
"karma-jasmine": "^1.1.0",
"karma-spec-reporter": "^0.0.31",
"karma-webpack": "^2.0.4",
"karma-webpack": "^2.0.5",
"multer": "^1.3.0",
"ng-router-loader": "^2.1.0",
"node-sass": "^4.5.3",
"nodemon": "^1.11.0",
"nodemon": "^1.12.1",
"portfinder": "^1.0.13",
"protractor": "^5.1.2",
"protractor": "^5.2.0",
"raw-loader": "^0.5.1",
"rimraf": "^2.6.1",
"rxjs": "^5.4.3",
"rimraf": "^2.6.2",
"rxjs": "^5.5.0",
"sass-loader": "^6.0.6",
"script-ext-html-webpack-plugin": "^1.8.5",
"source-map-loader": "^0.2.1",
"style-loader": "^0.18.2",
"source-map-loader": "^0.2.2",
"style-loader": "^0.19.0",
"to-string-loader": "^1.1.5",
"ts-node": "^3.3.0",
"tslint": "^5.7.0",
"typescript": "^2.4.2",
"webpack": "^3.5.4",
"webpack-dev-server": "^2.7.1",
"tslint": "^5.8.0",
"typescript": "^2.5.3",
"webpack": "^3.8.1",
"webpack-dev-server": "^2.9.3",
"webpack-dll-bundles-plugin": "^1.0.0-beta.5",
"webpack-merge": "^4.1.0",
"webpack-node-externals": "^1.6.0",
"zone.js": "^0.8.16"
"zone.js": "^0.8.18"
}
}
3 changes: 1 addition & 2 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { FormsModule } from '@angular/forms';
import { NgUploaderModule } from './ngx-uploader/module/ngx-uploader.module';
import { AppComponent } from './app.component';
import { AppHomeComponent } from './components/app-home';
import { AppProgressChartComponent } from './components/app-progress-chart';

@NgModule({
imports: [
Expand All @@ -17,7 +16,7 @@ import { AppProgressChartComponent } from './components/app-progress-chart';
providers: [
{ provide: APP_BASE_HREF, useValue: '/' }
],
declarations: [ AppComponent, AppHomeComponent, AppProgressChartComponent ],
declarations: [ AppComponent, AppHomeComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule {}
87 changes: 22 additions & 65 deletions src/components/app-home/app-home.component.html
Original file line number Diff line number Diff line change
@@ -1,77 +1,34 @@
<div class="hero is-fullheight">
<div class="hero-body">
<div class="container">
<div class="columns">
<div class="column is-12">
<div class="browser-window">
<div class="browser-topbar">
<span class="dot red"></span>
<span class="dot yellow"></span>
<span class="dot green"></span>
<span class="browser-title">
http://ngx-uploader.com
</span>
</div>
<div class="browser-container">
<div class="drop-container" ngFileDrop [options]="options" (uploadOutput)="onUploadOutput($event)" [uploadInput]="uploadInput" [ngClass]="{ 'is-drop-over': dragOver, 'is-hidden': uploading }">
<h1>Drag & Drop</h1>
<p>
<span>your files here or</span>
<label class="upload-button">
<input type="file" ngFileSelect [options]="options" (uploadOutput)="onUploadOutput($event)" [uploadInput]="uploadInput" multiple>
browse
</label>
</p>
</div>
<app-progress-chart [percent]="percent" *ngIf="uploading" [class.is-hidden]="!uploading"></app-progress-chart>
</div>
<div class="columns is-multiline">
<div class="column is-8 is-offset-2">
<div class="drop-container">
<p>
Drag a file here or
<label class="upload-button">
<input type="file" ngFileSelect [options]="options" (uploadOutput)="onUploadOutput($event)" [uploadInput]="uploadInput" multiple>
browse
</label>
to upload.
</p>
</div>
</div>
</div>
</div>
</div>
</div>

<!-- <div class="hero is-fullheight">
<div class="hero-body">
<div class="container">
<div class="columns">
<div class="column is-6 is-offset-3">
<div class="upload-popup">
<div class="popup-container">
<h1>My Uploads</h1>
<div class="uploads" *ngIf="files?.length">
<div class="upload-item" *ngFor="let f of files; let i = index;">
<div class="upload-item-top">
<span class="filename">{{ f.name }}</span>
<span class="progress-data">
{{ f.progress.data.percentage }}% at {{ f.progress.data.speedHuman }} eta {{ f.progress.data.eta }}s
</span>
<span class="x" (click)="removeFile(f.id)">x</span>
</div>
<div class="progress-bar-container">
<div class="bar" [style.width]="f.progress.data.percentage + '%'" [class.green]="f.progress.data.percentage === 100"></div>
</div>
</div>
</div>
<div class="drop-container" ngFileDrop [options]="options" (uploadOutput)="onUploadOutput($event)" [uploadInput]="uploadInput" [ngClass]="{ 'is-drop-over': dragOver }">
<h1>Drag & Drop</h1>
<p>
<span>your files here or</span>
<label class="upload-button">
<input type="file" ngFileSelect [options]="options" (uploadOutput)="onUploadOutput($event)" [uploadInput]="uploadInput" multiple>
browse
</label>
</p>
<div class="column is-8 is-offset-2">
<div class="upload-items">
<div class="upload-item" *ngFor="let f of files; let i = index;">
<span class="filename">
<span>{{ f.name }} ({{ f.id }}) - {{ f.progress?.data?.percentage }}%</span>
<span>uploading with {{ f.progress?.data?.speedHuman }}</span>
<span>ETA {{ f.progress?.data?.etaHuman }}</span>
</span>
<div class="progress">
<span class="bar" [style.width]="f?.progress?.data?.percentage + '%'"></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div> -->


</div>
20 changes: 1 addition & 19 deletions src/components/app-home/app-home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ export class AppHomeComponent {
humanizeBytes: Function;
dragOver: boolean;
options: UploaderOptions;
percent: number;
uploading: boolean;

constructor() {
this.uploading = false;
this.options = { concurrency: 1 };
this.files = [];
this.uploadInput = new EventEmitter<UploadInput>();
Expand All @@ -36,7 +33,6 @@ export class AppHomeComponent {
} else if (output.type === 'addedToQueue' && typeof output.file !== 'undefined') {
this.files.push(output.file);
} else if (output.type === 'uploading' && typeof output.file !== 'undefined') {
this.uploading = true;
const index = this.files.findIndex(file => typeof output.file !== 'undefined' && file.id === output.file.id);
this.files[index] = output.file;
} else if (output.type === 'removed') {
Expand All @@ -49,21 +45,7 @@ export class AppHomeComponent {
this.dragOver = false;
}

let uploadInProgress = false;
let percent = 0;

this.files.forEach(file => {
if (file.progress.status !== UploadStatus.Done) {
uploadInProgress = true;
}

if (file.progress.data) {
percent += file.progress.data.percentage;
}
});

this.uploading = uploadInProgress;
this.percent = percent / this.files.length;
this.files = this.files.filter(file => file.progress.status !== UploadStatus.Done);
}

startUpload(): void {
Expand Down

This file was deleted.

78 changes: 0 additions & 78 deletions src/components/app-progress-chart/app-progress-chart.component.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/components/app-progress-chart/index.ts

This file was deleted.

Loading

0 comments on commit 5ba36ad

Please sign in to comment.