Skip to content

Commit

Permalink
Merge pull request #102 from r-hannuschka/development
Browse files Browse the repository at this point in the history
2.1.1
  • Loading branch information
r-hannuschka authored Oct 11, 2019
2 parents a44e8b5 + a25e094 commit 65cb433
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 28 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 2.1.1

### bugfixes

- fixed bug peer dependency angular-pipes still exists
- fixed bug tsconfig paths not working in lib package
- fixed bug response 404 show html source from 404 page

# Changelog

## 2.1.0

### features
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ___
npm

```bash
npm i --save @r-hannuschka/ngx-fileupload angular-pipes
npm i --save @r-hannuschka/ngx-fileupload
```

## Demo
Expand Down
2 changes: 1 addition & 1 deletion src/lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ___
npm

```bash
npm i --save @r-hannuschka/ngx-fileupload angular-pipes
npm i --save @r-hannuschka/ngx-fileupload
```

## Demo
Expand Down
4 changes: 2 additions & 2 deletions src/lib/ngx-fileupload/ngx-file-upload.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { HttpClientModule } from "@angular/common/http";

import { UploadViewComponent, UploadFileDirective, UploadItemComponent } from "@lib/ui";
import { FileSizePipe } from "@lib/utils/ui";
import { UploadViewComponent, UploadFileDirective, UploadItemComponent } from "./ui";
import { FileSizePipe } from "./utils/ui";

@NgModule({
declarations: [
Expand Down
6 changes: 3 additions & 3 deletions src/lib/ngx-fileupload/ui/upload-file/upload-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { HttpClient } from "@angular/common/http";
import { takeUntil } from "rxjs/operators";
import { Subject } from "rxjs";

import { Validator, ValidationFn, UploadState } from "@lib/data/api";
import { UploadModel } from "@lib/data/upload.model";
import { FileUpload } from "@lib/utils/http/file-upload";
import { Validator, ValidationFn, UploadState } from "../../data/api";
import { UploadModel } from "../../data/upload.model";
import { FileUpload } from "../../utils/http/file-upload";

/**
* directive to add uploads with drag / drop
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

import { Component, OnInit, Input, ViewChild, TemplateRef, HostListener, OnDestroy, Output, EventEmitter } from "@angular/core";
import { FileUpload } from "@lib/utils/http/file-upload";
import { UploadControl } from "@lib/utils/upload-control";
import { UploadModel } from "@lib/data/upload.model";
import { UploadData, UploadState, Upload } from "@lib/data/api";
import { FileUpload } from "../../utils/http/file-upload";
import { UploadControl } from "../../utils/upload-control";
import { UploadModel } from "../../data/upload.model";
import { UploadData, UploadState, Upload } from "../../data/api";
import { Subscription } from "rxjs";

export interface FileUploadItemContext {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/ngx-fileupload/ui/upload-view/upload-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { delay } from "rxjs/operators";
import { of } from "rxjs";

import { Upload } from "../../data/api/upload";
import { FileUploadItemContext } from "@lib/ui";
import { Validator, ValidationFn } from "@lib/data/api/validation";
import { FileUploadItemContext } from "../../ui";
import { Validator, ValidationFn } from "../../data/api/validation";

/**
* NgxFileUploadComponent is a wrapper contain NgxFileUploadDirective and NgxFileUploadComponent
Expand Down
7 changes: 3 additions & 4 deletions src/lib/ngx-fileupload/utils/http/file-upload.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { HttpClient, HttpEvent, HttpEventType, HttpProgressEvent, HttpResponse, HttpErrorResponse } from "@angular/common/http";
import { Subject, BehaviorSubject, Observable } from "rxjs";
import { takeUntil, filter } from "rxjs/operators";
import { UploadState, UploadResponse, UploadData, Upload} from "@lib/data/api";
import { UploadModel } from "@lib/data/upload.model";
import { UploadState, UploadResponse, UploadData, Upload} from "../../data/api";
import { UploadModel } from "../../data/upload.model";

/**
* Upload Options
Expand Down Expand Up @@ -198,7 +198,6 @@ export class FileUpload implements Upload {
* status code
*/
private handleResponse(res: HttpResponse<any>) {

const uploadResponse: UploadResponse = {
success: res.ok,
body: res.body,
Expand Down Expand Up @@ -226,7 +225,7 @@ export class FileUpload implements Upload {
*/
private handleError(response: HttpErrorResponse) {

let errors: any[] = response.error instanceof ProgressEvent ? response.message : response.error;
let errors: any[] = response.error instanceof ProgressEvent || response.status === 404 ? response.message : response.error;
errors = Array.isArray(errors) ? errors : [errors];

const uploadResponse: UploadResponse = {
Expand Down
5 changes: 2 additions & 3 deletions src/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@r-hannuschka/ngx-fileupload",
"version": "2.1.0",
"version": "2.1.1",
"description": "angular fileupload library",
"repository": {
"url": "git+https://github.com/r-hannuschka/ngx-fileupload.git",
Expand All @@ -17,8 +17,7 @@
],
"peerDependencies": {
"@angular/common": "^8.0.1",
"@angular/core": "^8.0.1",
"angular-pipes": "^9.0.2"
"@angular/core": "^8.0.1"
},
"author": "Ralf Hannuschka (https://github.com/r-hannuschka)",
"bugs": {
Expand Down
12 changes: 6 additions & 6 deletions src/lib/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Public API Surface of ngx-fileupload
*/
export * from "./ngx-fileupload/ngx-file-upload.module";
export * from "@lib/data/api";
export * from "@lib/data/upload.model";
export * from "@lib/ui";
export * from "@lib/utils/http/file-upload";
export * from "@lib/utils/validation";
export * from "@lib/utils/upload-control";
export * from "./ngx-fileupload/data/api";
export * from "./ngx-fileupload/data/upload.model";
export * from "./ngx-fileupload/ui";
export * from "./ngx-fileupload/utils/http/file-upload";
export * from "./ngx-fileupload/utils/validation";
export * from "./ngx-fileupload/utils/upload-control";
2 changes: 1 addition & 1 deletion src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-fileupload",
"version": "2.1.0",
"version": "2.1.1",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down

0 comments on commit 65cb433

Please sign in to comment.