diff --git a/README.md b/README.md index bf4d686..b43e3b5 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Angular file uploader is an Angular 2/4/5/6/7/8/9/10 + file uploader module with ### Install ``` -npm i angular-file-uploader +npm i ngx-file-uploader ``` ### Raising funds @@ -18,24 +18,24 @@ Support this package if it really helped you, send your support at [Patreon](htt ``` in your index.html. -- Import AngularFileUploaderModule inside your app.module.ts +- Import NgxFileUploaderModule inside your app.module.ts ```javascript - import { AngularFileUploaderModule } from "angular-file-uploader"; + import { NgxFileUploaderModule } from "ngx-file-uploader"; ``` ```javascript @NgModule({ imports: [ ..., - AngularFileUploaderModule, + NgxFileUploaderModule, ... ] }) ``` ##### Example-1 ( with minimal configuration ) ```html - - + ``` ```javascript afuConfig = { @@ -46,11 +46,11 @@ Support this package if it really helped you, send your support at [Patreon](htt ``` ##### Example-2 ( with all available configuration ) ```html - - + ``` ```javascript afuConfig = { @@ -116,11 +116,11 @@ You have seen that by using 'resetUpload' property, you can reset the module eas ###### Example-3 ```html - - + ``` - Assign one local reference variable (here 'fileUpload1') to the component. - Now use this local reference variable in your xyz.component.ts file. @@ -131,7 +131,7 @@ You have seen that by using 'resetUpload' property, you can reset the module eas - Remember to import ViewChild and AngularFileUploaderComponent properly in your component. ```javascript import { ViewChild } from '@angular/core'; - import { AngularFileUploaderComponent } from "angular-file-uploader"; + import { AngularFileUploaderComponent } from "ngx-file-uploader"; ``` - That's it.....all done, now just use ```javascript @@ -162,15 +162,15 @@ You have seen that by using 'resetUpload' property, you can reset the module eas - More themes. - More customization options. --- -#### For Versions < 6.x : [Click Here !](https://github.com/kzrfaisal/angular-file-uploader#for-versions--6x-) +#### For Versions < 6.x : [Click Here !](https://github.com/kzrfaisal/ngx-file-uploader#for-versions--6x-) --- --- -#### For Versions < 5.x : [Click Here !](https://github.com/kzrfaisal/angular-file-uploader#for-versions--5x-) +#### For Versions < 5.x : [Click Here !](https://github.com/kzrfaisal/ngx-file-uploader#for-versions--5x-) --- #### For Versions =< 4.0.12 : -- Replace AngularFileUploaderModule and AngularFileUploaderComponent with FileUploadModule and FileUploadComponent respectively. +- Replace NgxFileUploaderModule and AngularFileUploaderComponent with FileUploadModule and FileUploadComponent respectively. --- -#### For Versions < 2.x : [Click Here !](https://github.com/kzrfaisal/angular-file-uploader#for-versions--2x-) +#### For Versions < 2.x : [Click Here !](https://github.com/kzrfaisal/ngx-file-uploader#for-versions--2x-) --- --- #### For Versions < 6.x : @@ -180,7 +180,7 @@ Angular file uploader is an Angular 2/4/5/6 file uploader module with Real-Time ### Install ``` -npm i angular-file-uploader +npm i ngx-file-uploader ``` ### Usage - Bootstrap.min.css is required. @@ -189,24 +189,24 @@ npm i angular-file-uploader ``` in your index.html. -- Import AngularFileUploaderModule inside your app.module.ts +- Import NgxFileUploaderModule inside your app.module.ts ```javascript - import { AngularFileUploaderModule } from "angular-file-uploader"; + import { NgxFileUploaderModule } from "ngx-file-uploader"; ``` ```javascript @NgModule({ imports: [ ..., - AngularFileUploaderModule, + NgxFileUploaderModule, ... ] }) ``` ##### Example-1 ( with minimal configuration ) ```html - - + ``` ```javascript afuConfig = { @@ -217,11 +217,11 @@ npm i angular-file-uploader ``` ##### Example-2 ( with all available configuration ) ```html - - + ``` ```javascript afuConfig = { @@ -279,11 +279,11 @@ You have seen that by using 'resetUpload' property, you can reset the module eas ###### Example-3 ```html - - + ``` - Assign one local reference variable (here 'fileUpload1') to the component. - Now use this local reference variable in your xyz.component.ts file. @@ -294,7 +294,7 @@ You have seen that by using 'resetUpload' property, you can reset the module eas - Remember to import ViewChild and AngularFileUploaderComponent properly in your component. ```javascript import { ViewChild } from '@angular/core'; - import { AngularFileUploaderComponent } from "angular-file-uploader"; + import { AngularFileUploaderComponent } from "ngx-file-uploader"; ``` - That's it.....all done, now just use ```javascript @@ -333,7 +333,7 @@ Angular file uploader is an Angular 2/4/5/6 file uploader module with Real-Time ### Install ``` -npm i angular-file-uploader +npm i ngx-file-uploader ``` ### Usage - Bootstrap.min.css is required. @@ -342,24 +342,24 @@ npm i angular-file-uploader ``` in your index.html. -- Import AngularFileUploaderModule inside your app.module.ts +- Import NgxFileUploaderModule inside your app.module.ts ```javascript - import { AngularFileUploaderModule } from "angular-file-uploader"; + import { NgxFileUploaderModule } from "ngx-file-uploader"; ``` ```javascript @NgModule({ imports: [ ..., - AngularFileUploaderModule, + NgxFileUploaderModule, ... ] }) ``` ##### Example-1 ( with minimal configuration ) ```html - - + ``` ```javascript afuConfig = { @@ -370,11 +370,11 @@ npm i angular-file-uploader ``` ##### Example-2 ( with all available configuration ) ```html - - + ``` ```javascript afuConfig = { @@ -423,11 +423,11 @@ You have seen that by using 'resetUpload' property, you can reset the module eas ###### Example-3 ```html - - + ``` - Assign one local reference variable (here 'fileUpload1') to the component. - Now use this local reference variable in your xyz.component.ts file. @@ -438,7 +438,7 @@ You have seen that by using 'resetUpload' property, you can reset the module eas - Remember to import ViewChild and AngularFileUploaderComponent properly in your component. ```javascript import { ViewChild } from '@angular/core'; - import { AngularFileUploaderComponent } from "angular-file-uploader"; + import { AngularFileUploaderComponent } from "ngx-file-uploader"; ``` - That's it.....all done, now just use ```javascript @@ -474,13 +474,13 @@ You have seen that by using 'resetUpload' property, you can reset the module eas #### For Versions < 2.x : ##### Example-1 ```html - - + ``` ##### Example-2 ```html - - + ``` | **Properties** | **Description** | **Default Value** | @@ -505,7 +505,7 @@ You have seen that by using 'resetUpload' property, you can reset the module eas ##### Example-3 ```html - - + ``` - Assign one local reference variable (here 'fileUpload1') to the component. - Now use this local reference variable in your xyz.component.ts file. @@ -524,7 +524,7 @@ You have seen that by using 'resetUpload' property, you can reset the module eas - Remember to import ViewChild and FileUploadComponent properly in your component. ```javascript import { ViewChild } from '@angular/core'; - import { FileUploadComponent } from "angular-file-uploader"; + import { FileUploadComponent } from "ngx-file-uploader"; ``` - That's it.....all done, now just use ```javascript diff --git a/angular.json b/angular.json index a109bf3..f1775e7 100644 --- a/angular.json +++ b/angular.json @@ -3,38 +3,38 @@ "version": 1, "newProjectRoot": "projects", "projects": { - "angular-file-uploader": { + "ngx-file-uploader": { "projectType": "library", - "root": "projects/angular-file-uploader", - "sourceRoot": "projects/angular-file-uploader/src", + "root": "projects/ngx-file-uploader", + "sourceRoot": "projects/ngx-file-uploader/src", "prefix": "lib", "architect": { "build": { "builder": "@angular-devkit/build-ng-packagr:build", "options": { - "tsConfig": "projects/angular-file-uploader/tsconfig.lib.json", - "project": "projects/angular-file-uploader/ng-package.json" + "tsConfig": "projects/ngx-file-uploader/tsconfig.lib.json", + "project": "projects/ngx-file-uploader/ng-package.json" }, "configurations": { "production": { - "tsConfig": "projects/angular-file-uploader/tsconfig.lib.prod.json" + "tsConfig": "projects/ngx-file-uploader/tsconfig.lib.prod.json" } } }, "test": { "builder": "@angular-devkit/build-angular:karma", "options": { - "main": "projects/angular-file-uploader/src/test.ts", - "tsConfig": "projects/angular-file-uploader/tsconfig.spec.json", - "karmaConfig": "projects/angular-file-uploader/karma.conf.js" + "main": "projects/ngx-file-uploader/src/test.ts", + "tsConfig": "projects/ngx-file-uploader/tsconfig.spec.json", + "karmaConfig": "projects/ngx-file-uploader/karma.conf.js" } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ - "projects/angular-file-uploader/tsconfig.lib.json", - "projects/angular-file-uploader/tsconfig.spec.json" + "projects/ngx-file-uploader/tsconfig.lib.json", + "projects/ngx-file-uploader/tsconfig.spec.json" ], "exclude": [ "**/node_modules/**" @@ -185,5 +185,5 @@ } } }}, - "defaultProject": "angular-file-uploader" + "defaultProject": "ngx-file-uploader" } diff --git a/package-lock.json b/package-lock.json index b70c5d0..44113ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "afu-lib-ws", - "version": "0.0.0", + "name": "ngx-file-uploader", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2159,14 +2159,6 @@ "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", "dev": true }, - "angular-file-uploader": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/angular-file-uploader/-/angular-file-uploader-7.0.1.tgz", - "integrity": "sha512-X8Yj/E0Ex8DxCwlEzXhr6gNAwMhUkvfxAk/lzlcs0ps3bhKfrPFKc4H4YQHd4bND8BgqR08SQ2tVXhBeSw6BrA==", - "requires": { - "tslib": "^2.0.0" - } - }, "ansi-align": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", diff --git a/package.json b/package.json index 7049ddb..6bf4d00 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,15 @@ { - "name": "afu-lib-ws", - "version": "0.0.0", + "name": "ngx-file-uploader", + "version": "1.0.0", "scripts": { "ng": "ng", - "start": "ng build angular-file-uploader --prod && ng serve lib-demo", + "start": "ng build ngx-file-uploader --prod && ng serve lib-demo", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "rm-dist": "rm -rf ./dist", - "publish": "ng build angular-file-uploader --prod && cd dist/angular-file-uploader && npm publish" + "publish": "ng build ngx-file-uploader --prod && cd dist/ngx-file-uploader && npm publish" }, "private": true, "dependencies": { @@ -21,7 +21,6 @@ "@angular/platform-browser": "~10.0.5", "@angular/platform-browser-dynamic": "~10.0.5", "@angular/router": "~10.0.5", - "angular-file-uploader": "^7.0.1", "rxjs": "~6.5.5", "tslib": "^2.0.0", "zone.js": "~0.10.3" diff --git a/projects/angular-file-uploader/package.json b/projects/angular-file-uploader/package.json deleted file mode 100644 index 1ba9f0d..0000000 --- a/projects/angular-file-uploader/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "angular-file-uploader", - "version": "7.0.1", - "license": "MIT", - "peerDependencies": { - "@angular/common": "^10.0.5", - "@angular/core": "^10.0.5" - }, - "dependencies": { - "tslib": "^2.0.0" - }, - "description": "Angular file uploader is an Angular 2/4/5/6/7/8/9/10 + file uploader module with Real-Time Progress Bar, Responsive design, Angular Universal Compatibility and multiple themes which includes Drag and Drop and much more.", - "deprecated": false, - "readme": "README.md", - "keywords": [ - "angular file uploader", - "angular file upload", - "angular", - "file upload", - "drag and drop", - "upload", - "uploader", - "ng", - "angular 2", - "angular 4", - "angular 5", - "angular 6", - "angular 7", - "angular 8", - "angular 9", - "universal", - "img", - "image", - "image upload", - "formdata", - "bootstrap" - ], - "author": { - "name": "Mohd Faisal Ansari", - "email": "kzrfaisal@gmail.com" - }, - "repository": { - "type": "git", - "url": "https://github.com/kzrfaisal/angular-file-uploader.git" - }, - "homepage": "https://kzrfaisal.github.io/#/afu", - "bugs": { - "url": "https://github.com/kzrfaisal/angular-file-uploader/issues" - }, - "funding": { - "type": "patreon", - "url": "https://www.patreon.com/kzrfaisal" - } -} diff --git a/projects/angular-file-uploader/src/public-api.ts b/projects/angular-file-uploader/src/public-api.ts deleted file mode 100644 index 766a3b1..0000000 --- a/projects/angular-file-uploader/src/public-api.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Public API Surface of angular-file-uploader - */ - -export * from './lib/angular-file-uploader.component'; -export * from './lib/angular-file-uploader.module'; -export * from './lib/angular-file-uploader.types'; diff --git a/projects/lib-demo/src/app/app.component.html b/projects/lib-demo/src/app/app.component.html index 2e5e5ed..ab015e8 100644 --- a/projects/lib-demo/src/app/app.component.html +++ b/projects/lib-demo/src/app/app.component.html @@ -1,27 +1,27 @@
-

angular-file-uploader

+

ngx-file-uploader

Example-1 (Default Theme)

- - + +


Example-2 (Theme - dragNDrop)

- - + +


Example-3 (Theme - attachPin)

- - + +
diff --git a/projects/lib-demo/src/app/app.component.ts b/projects/lib-demo/src/app/app.component.ts index 28f5848..ed3b4fd 100644 --- a/projects/lib-demo/src/app/app.component.ts +++ b/projects/lib-demo/src/app/app.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { AngularFileUploaderConfig } from 'angular-file-uploader'; +import { AngularFileUploaderConfig } from 'ngx-file-uploader'; @Component({ selector: 'app-root', diff --git a/projects/lib-demo/src/app/app.module.ts b/projects/lib-demo/src/app/app.module.ts index 2390b77..910e470 100644 --- a/projects/lib-demo/src/app/app.module.ts +++ b/projects/lib-demo/src/app/app.module.ts @@ -1,14 +1,14 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { AngularFileUploaderModule } from "angular-file-uploader"; -// To use angular-file-uploader from node-modules remove paths from tsconfig.json in root. +import { NgxFileUploaderModule } from "ngx-file-uploader"; +// To use ngx-file-uploader from node-modules remove paths from tsconfig.json in root. /* "paths": { - "angular-file-uploader": [ - "dist/angular-file-uploader" + "ngx-file-uploader": [ + "dist/ngx-file-uploader" ], - "angular-file-uploader/*": [ - "dist/angular-file-uploader/*" + "ngx-file-uploader/*": [ + "dist/ngx-file-uploader/*" ] } */ @@ -20,7 +20,7 @@ import { AppComponent } from './app.component'; ], imports: [ BrowserModule, - AngularFileUploaderModule + NgxFileUploaderModule ], providers: [], bootstrap: [AppComponent], diff --git a/projects/lib-demo/src/index.html b/projects/lib-demo/src/index.html index ebf25e9..4df917b 100644 --- a/projects/lib-demo/src/index.html +++ b/projects/lib-demo/src/index.html @@ -3,7 +3,7 @@ - angular-file-uploader + ngx-file-uploader diff --git a/projects/angular-file-uploader/LICENSE b/projects/ngx-file-uploader/LICENSE similarity index 100% rename from projects/angular-file-uploader/LICENSE rename to projects/ngx-file-uploader/LICENSE diff --git a/projects/angular-file-uploader/README.md b/projects/ngx-file-uploader/README.md similarity index 83% rename from projects/angular-file-uploader/README.md rename to projects/ngx-file-uploader/README.md index e7b60cf..b1d22fd 100644 --- a/projects/angular-file-uploader/README.md +++ b/projects/ngx-file-uploader/README.md @@ -1,15 +1,10 @@ -Angular file uploader is an Angular 2/4/5/6/7/8/9/10 + file uploader module with Real-Time Progress Bar, Responsive design, Angular Universal Compatibility and multiple themes which includes Drag and Drop and much more. +Ngx file uploader is an Angular 9/10 + file uploader (fork from angular-file-uploader -> https://github.com/kzrfaisal/angular-file-uploader) -### Demo - ### Install ``` -npm i angular-file-uploader +npm i ngx-file-uploader ``` -### Raising funds -Support this package if it really helped you, send your support at [Patreon](https://www.patreon.com/kzrfaisal). - ### Usage - Bootstrap.min.css is required. Include @@ -17,24 +12,24 @@ Support this package if it really helped you, send your support at [Patreon](htt ``` in your index.html. -- Import AngularFileUploaderModule inside your app.module.ts +- Import NgxFileUploaderModule inside your app.module.ts ```javascript - import { AngularFileUploaderModule } from "angular-file-uploader"; + import { NgxFileUploaderModule } from "ngx-file-uploader"; ``` ```javascript @NgModule({ imports: [ ..., - AngularFileUploaderModule, + NgxFileUploaderModule, ... ] }) ``` ##### Example-1 ( with minimal configuration ) ```html - - + ``` ```javascript afuConfig = { @@ -45,11 +40,11 @@ Support this package if it really helped you, send your support at [Patreon](htt ``` ##### Example-2 ( with all available configuration ) ```html - - + ``` ```javascript afuConfig = { @@ -114,11 +109,11 @@ You have seen that by using 'resetUpload' property, you can reset the module eas ###### Example-3 ```html - - + ``` - Assign one local reference variable (here 'fileUpload1') to the component. - Now use this local reference variable in your xyz.component.ts file. @@ -129,7 +124,7 @@ You have seen that by using 'resetUpload' property, you can reset the module eas - Remember to import ViewChild and AngularFileUploaderComponent properly in your component. ```javascript import { ViewChild } from '@angular/core'; - import { AngularFileUploaderComponent } from "angular-file-uploader"; + import { AngularFileUploaderComponent } from "ngx-file-uploader"; ``` - That's it.....all done, now just use ```javascript @@ -155,18 +150,3 @@ You have seen that by using 'resetUpload' property, you can reset the module eas #### Points to note: - Files are uploaded in FormData format. - -### Coming Soon: -- More themes. -- More customization options. ---- -#### For Versions < 6.x : [Click Here !](https://github.com/kzrfaisal/angular-file-uploader#for-versions--6x-) ---- ---- -#### For Versions < 5.x : [Click Here !](https://github.com/kzrfaisal/angular-file-uploader#for-versions--5x-) ---- -#### For Versions =< 4.0.12 : -- Replace AngularFileUploaderModule and AngularFileUploaderComponent with FileUploadModule and FileUploadComponent respectively. ---- -#### For Versions < 2.x : [Click Here !](https://github.com/kzrfaisal/angular-file-uploader#for-versions--2x-) ---- diff --git a/projects/angular-file-uploader/ng-package.json b/projects/ngx-file-uploader/ng-package.json similarity index 72% rename from projects/angular-file-uploader/ng-package.json rename to projects/ngx-file-uploader/ng-package.json index 2390145..d381ef3 100644 --- a/projects/angular-file-uploader/ng-package.json +++ b/projects/ngx-file-uploader/ng-package.json @@ -1,6 +1,6 @@ { "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", - "dest": "../../dist/angular-file-uploader", + "dest": "../../dist/ngx-file-uploader", "lib": { "entryFile": "src/public-api.ts" } diff --git a/projects/ngx-file-uploader/package.json b/projects/ngx-file-uploader/package.json new file mode 100644 index 0000000..7310bdc --- /dev/null +++ b/projects/ngx-file-uploader/package.json @@ -0,0 +1,47 @@ +{ + "name": "ngxc-file-uploader", + "version": "1.0.0", + "license": "MIT", + "peerDependencies": { + "@angular/common": "^10.0.5", + "@angular/core": "^10.0.5" + }, + "dependencies": { + "tslib": "^2.0.0" + }, + "description": "Ngx file uploader is an Angular 9/10 + file uploader", + "deprecated": false, + "readme": "README.md", + "keywords": [ + "ngx file uploader", + "ngx file upload", + "angular", + "file upload", + "drag and drop", + "upload", + "uploader", + "ng", + "angular 2", + "angular 4", + "angular 5", + "angular 6", + "angular 7", + "angular 8", + "angular 9", + "angular 10", + "universal", + "img", + "image", + "image upload", + "formdata", + "bootstrap" + ], + "repository": { + "type": "git", + "url": "https://github.com/BruneXX/ngx-file-uploader.git" + }, + "homepage": "https://BruneXX.github.io/#/ngx-file-uploader", + "bugs": { + "url": "https://github.com/BruneXX/ngx-file-uploader/issues" + } +} diff --git a/projects/angular-file-uploader/src/lib/angular-file-uploader.component.css b/projects/ngx-file-uploader/src/lib/ngx-file-uploader.component.css similarity index 100% rename from projects/angular-file-uploader/src/lib/angular-file-uploader.component.css rename to projects/ngx-file-uploader/src/lib/ngx-file-uploader.component.css diff --git a/projects/angular-file-uploader/src/lib/angular-file-uploader.component.html b/projects/ngx-file-uploader/src/lib/ngx-file-uploader.component.html similarity index 91% rename from projects/angular-file-uploader/src/lib/angular-file-uploader.component.html rename to projects/ngx-file-uploader/src/lib/ngx-file-uploader.component.html index 120eac4..3436b3b 100644 --- a/projects/angular-file-uploader/src/lib/angular-file-uploader.component.html +++ b/projects/ngx-file-uploader/src/lib/ngx-file-uploader.component.html @@ -1,7 +1,7 @@
-
@@ -12,7 +12,7 @@
+ *ngIf="!uploadStarted && !hideSelectBtn">{{replaceTexts?.selectFileBtn}}
- +
{{replaceTexts?.pleaseWaitMessage}}

diff --git a/projects/angular-file-uploader/src/lib/angular-file-uploader.component.ts b/projects/ngx-file-uploader/src/lib/ngx-file-uploader.component.ts similarity index 96% rename from projects/angular-file-uploader/src/lib/angular-file-uploader.component.ts rename to projects/ngx-file-uploader/src/lib/ngx-file-uploader.component.ts index 35de010..ea3f9bb 100644 --- a/projects/angular-file-uploader/src/lib/angular-file-uploader.component.ts +++ b/projects/ngx-file-uploader/src/lib/ngx-file-uploader.component.ts @@ -3,7 +3,6 @@ import { EventEmitter, Input, OnChanges, - OnInit, Output, SimpleChanges, } from '@angular/core'; @@ -12,7 +11,7 @@ import { AngularFileUploaderConfig, UploadInfo, UploadApi, -} from './angular-file-uploader.types'; +} from './ngx-file-uploader.types'; import { HttpClient, HttpHeaders, @@ -22,11 +21,11 @@ import { import { map } from 'rxjs/operators'; @Component({ - selector: 'angular-file-uploader', - templateUrl: './angular-file-uploader.component.html', - styleUrls: ['./angular-file-uploader.component.css'], + selector: 'ngx-file-uploader', + templateUrl: './ngx-file-uploader.component.html', + styleUrls: ['./ngx-file-uploader.component.css'], }) -export class AngularFileUploaderComponent implements OnChanges { +export class NgxFileUploaderComponent implements OnChanges { // Inputs @Input() config: AngularFileUploaderConfig; @@ -106,6 +105,7 @@ export class AngularFileUploaderComponent implements OnChanges { resetBtn: 'Reset', uploadBtn: 'Upload', dragNDropBox: 'Drag N Drop', + pleaseWaitMessage: 'Please wait until file is uploaded', attachPinBtn: this.multiple ? 'Attach Files...' : 'Attach File...', afterUploadMsg_success: 'Successfully Uploaded !', afterUploadMsg_error: 'Upload Failed !', @@ -251,6 +251,7 @@ export class AngularFileUploaderComponent implements OnChanges { // Success this.progressBarShow = false; this.enableUploadBtn = false; + this.uploadStarted = false; this.uploadMsg = true; this.afterUpload = true; if (!isError) { diff --git a/projects/angular-file-uploader/src/lib/angular-file-uploader.module.ts b/projects/ngx-file-uploader/src/lib/ngx-file-uploader.module.ts similarity index 50% rename from projects/angular-file-uploader/src/lib/angular-file-uploader.module.ts rename to projects/ngx-file-uploader/src/lib/ngx-file-uploader.module.ts index 55bc335..b278c0f 100644 --- a/projects/angular-file-uploader/src/lib/angular-file-uploader.module.ts +++ b/projects/ngx-file-uploader/src/lib/ngx-file-uploader.module.ts @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { AngularFileUploaderComponent } from './angular-file-uploader.component'; +import { NgxFileUploaderComponent } from './ngx-file-uploader.component'; import { HttpClientModule } from '@angular/common/http'; @NgModule({ @@ -8,7 +8,7 @@ import { HttpClientModule } from '@angular/common/http'; CommonModule, HttpClientModule, ], - declarations: [AngularFileUploaderComponent], - exports: [AngularFileUploaderComponent] + declarations: [NgxFileUploaderComponent], + exports: [NgxFileUploaderComponent] }) -export class AngularFileUploaderModule { } +export class NgxFileUploaderModule { } diff --git a/projects/angular-file-uploader/src/lib/angular-file-uploader.types.ts b/projects/ngx-file-uploader/src/lib/ngx-file-uploader.types.ts similarity index 97% rename from projects/angular-file-uploader/src/lib/angular-file-uploader.types.ts rename to projects/ngx-file-uploader/src/lib/ngx-file-uploader.types.ts index c4d516f..c7205e5 100644 --- a/projects/angular-file-uploader/src/lib/angular-file-uploader.types.ts +++ b/projects/ngx-file-uploader/src/lib/ngx-file-uploader.types.ts @@ -4,6 +4,7 @@ export interface ReplaceTexts { selectFileBtn?: string; resetBtn?: string; uploadBtn?: string; + pleaseWaitMessage: string; dragNDropBox?: string; attachPinBtn?: string; afterUploadMsg_success?: string; diff --git a/projects/ngx-file-uploader/src/public-api.ts b/projects/ngx-file-uploader/src/public-api.ts new file mode 100644 index 0000000..c486e8b --- /dev/null +++ b/projects/ngx-file-uploader/src/public-api.ts @@ -0,0 +1,7 @@ +/* + * Public API Surface of ngx-file-uploader + */ + +export * from './lib/ngx-file-uploader.component'; +export * from './lib/ngx-file-uploader.module'; +export * from './lib/ngx-file-uploader.types'; diff --git a/projects/angular-file-uploader/tsconfig.lib.json b/projects/ngx-file-uploader/tsconfig.lib.json similarity index 100% rename from projects/angular-file-uploader/tsconfig.lib.json rename to projects/ngx-file-uploader/tsconfig.lib.json diff --git a/projects/angular-file-uploader/tsconfig.lib.prod.json b/projects/ngx-file-uploader/tsconfig.lib.prod.json similarity index 100% rename from projects/angular-file-uploader/tsconfig.lib.prod.json rename to projects/ngx-file-uploader/tsconfig.lib.prod.json diff --git a/projects/angular-file-uploader/tslint.json b/projects/ngx-file-uploader/tslint.json similarity index 100% rename from projects/angular-file-uploader/tslint.json rename to projects/ngx-file-uploader/tslint.json diff --git a/tsconfig.base.json b/tsconfig.base.json index 2eb33eb..70238d1 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -16,9 +16,9 @@ "dom" ], "paths": { - /* "angular-file-uploader": [ - "dist/angular-file-uploader/angular-file-uploader", - "dist/angular-file-uploader" + /* "ngx-file-uploader": [ + "dist/ngx-file-uploader/ngx-file-uploader", + "dist/ngx-file-uploader" ] */ } } diff --git a/tsconfig.json b/tsconfig.json index 191c1d1..9995ce5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "files": [], "references": [ { - "path": "./projects/angular-file-uploader/tsconfig.lib.json" + "path": "./projects/ngx-file-uploader/tsconfig.lib.json" }, { "path": "./projects/lib-demo/tsconfig.app.json"