Compare commits
14 Commits
v2.0.0-0
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f5ac1cb94 | ||
|
|
fc21870c82 | ||
|
|
4ee06384dd | ||
|
|
ad01e31cf8 | ||
|
|
6608960cec | ||
|
|
19ec08cc02 | ||
|
|
0cf7db94f2 | ||
|
|
02a1b2a53c | ||
|
|
2d8947e07c | ||
|
|
020d55182d | ||
|
|
8f3b7cf534 | ||
|
|
2cc794a04b | ||
|
|
6cc1909aae | ||
|
|
326e3ac1a8 |
@@ -8,12 +8,7 @@
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {
|
||||
"@nrwl/nx/enforce-module-boundaries": [
|
||||
"error",
|
||||
@@ -21,39 +16,25 @@
|
||||
"enforceBuildableLibDependency": true,
|
||||
"allow": [],
|
||||
"depConstraints": [
|
||||
{
|
||||
"sourceTag": "*",
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/typescript"
|
||||
],
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"extends": ["plugin:@nrwl/nx/typescript"],
|
||||
"parserOptions": { "project": "./tsconfig.*?.json" },
|
||||
"rules": {
|
||||
"semi": "off",
|
||||
"@typescript-eslint/semi": ["error"]
|
||||
"@typescript-eslint/semi": ["error"],
|
||||
"@typescript-eslint/ban-ts-comment": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/javascript"
|
||||
],
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"extends": ["plugin:@nrwl/nx/javascript"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
|
||||
32
.github/workflows/on-publish.yml
vendored
32
.github/workflows/on-publish.yml
vendored
@@ -26,8 +26,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: one_run
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/cache@v2.1.4
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
id: cache
|
||||
with:
|
||||
path: node_modules
|
||||
@@ -40,25 +40,27 @@ jobs:
|
||||
needs: install
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/cache@v2.1.4
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: node_modules
|
||||
key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||
- uses: actions/cache@v2.1.4
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
dist
|
||||
key: dist-${{ github.run_id }}
|
||||
- run: npx ng build --prod
|
||||
- run: |
|
||||
npx nx run ng2-file-upload:build --configuration production
|
||||
npx nx run ng2-file-upload-demo:build --configuration production
|
||||
|
||||
# update release notes in github
|
||||
update_release_draft:
|
||||
needs: install
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/cache@v2.1.4
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: node_modules
|
||||
key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||
@@ -69,17 +71,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: 'gh-pages'
|
||||
path: 'gh-pages'
|
||||
|
||||
- uses: actions/cache@v2.1.4
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: node_modules
|
||||
key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||
- uses: actions/cache@v2.1.4
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
dist
|
||||
@@ -104,12 +106,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/cache@v2.1.4
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: node_modules
|
||||
key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||
- uses: actions/cache@v2.1.4
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
dist
|
||||
|
||||
2
.github/workflows/on-push-or-pull.yml
vendored
2
.github/workflows/on-push-or-pull.yml
vendored
@@ -59,7 +59,7 @@ jobs:
|
||||
with:
|
||||
path: ${{ env.CACHE_DIST_PATH }}
|
||||
key: dist-${{ github.run_id }}
|
||||
- run: npx ng build --prod
|
||||
- run: npx nx run ng2-file-upload-demo:build
|
||||
|
||||
# run unit tests
|
||||
unit_tests_with_coverage:
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,6 +12,7 @@
|
||||
.settings/
|
||||
|
||||
# misc
|
||||
/.angular/cache
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
|
||||
155
CHANGELOG.md
155
CHANGELOG.md
@@ -1,185 +1,168 @@
|
||||
# [3.0.0]()
|
||||
|
||||
Updated the library and test project to Angular 13
|
||||
|
||||
# [2.0.0-3](https://github.com/valor-software/ng2-file-upload/compare/v2.0.0-2...v2.0.0-3) (2021-09-07)
|
||||
|
||||
### Features
|
||||
|
||||
- **demo:** updated up to bootstrap 5 ([#1186](https://github.com/valor-software/ng2-file-upload/issues/1186)) ([02a1b2a](https://github.com/valor-software/ng2-file-upload/commit/02a1b2a53c331e2088ea05d2202be6eb2b1d051f))
|
||||
|
||||
# [2.0.0-2](https://github.com/valor-software/ng2-file-upload/compare/v2.0.0-1...v2.0.0-2) (2021-09-03)
|
||||
|
||||
# [2.0.0-1](https://github.com/valor-software/ng2-file-upload/compare/v2.0.0-0...v2.0.0-1) (2021-09-03)
|
||||
|
||||
### Features
|
||||
|
||||
- **version:** added npm versions ([#1183](https://github.com/valor-software/ng2-file-upload/issues/1183)) ([326e3ac](https://github.com/valor-software/ng2-file-upload/commit/326e3ac1a884f000f57b3fb6e30cd32f5ec4622c))
|
||||
|
||||
# [2.0.0-0](https://github.com/valor-software/ng2-file-upload/compare/v1.2.0...v2.0.0-0) (2021-09-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** fix xvfb service issue ([33ac156](https://github.com/valor-software/ng2-file-upload/commit/33ac156208bfcf57851210f037719107e1ca9eb9))
|
||||
* **typo:** fix grammatical mistake in readme ([#1119](https://github.com/valor-software/ng2-file-upload/issues/1119)) ([8171bc8](https://github.com/valor-software/ng2-file-upload/commit/8171bc831b69692d04b650be19ff82f04ff56662))
|
||||
|
||||
- **ci:** fix xvfb service issue ([33ac156](https://github.com/valor-software/ng2-file-upload/commit/33ac156208bfcf57851210f037719107e1ca9eb9))
|
||||
- **typo:** fix grammatical mistake in readme ([#1119](https://github.com/valor-software/ng2-file-upload/issues/1119)) ([8171bc8](https://github.com/valor-software/ng2-file-upload/commit/8171bc831b69692d04b650be19ff82f04ff56662))
|
||||
|
||||
### Features
|
||||
|
||||
* **package:** relaxed peer dependencies to allow ng v4 ([#713](https://github.com/valor-software/ng2-file-upload/issues/713)) ([7704e0e](https://github.com/valor-software/ng2-file-upload/commit/7704e0e970276ebcd8bfefe34bf153f82108a11e))
|
||||
|
||||
|
||||
- **package:** relaxed peer dependencies to allow ng v4 ([#713](https://github.com/valor-software/ng2-file-upload/issues/713)) ([7704e0e](https://github.com/valor-software/ng2-file-upload/commit/7704e0e970276ebcd8bfefe34bf153f82108a11e))
|
||||
|
||||
# [1.3.0](https://github.com/valor-software/ng2-file-upload/compare/v1.2.0...v1.3.0) (2021-08-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** fix xvfb service issue ([33ac156](https://github.com/valor-software/ng2-file-upload/commit/33ac156208bfcf57851210f037719107e1ca9eb9))
|
||||
* **style:** delete extra rule ([b5917b9](https://github.com/valor-software/ng2-file-upload/commit/b5917b9fa77e63c4c1b06598abc817b8033730c3))
|
||||
* **typo:** fix grammatical mistake in readme ([#1119](https://github.com/valor-software/ng2-file-upload/issues/1119)) ([8171bc8](https://github.com/valor-software/ng2-file-upload/commit/8171bc831b69692d04b650be19ff82f04ff56662))
|
||||
|
||||
- **ci:** fix xvfb service issue ([33ac156](https://github.com/valor-software/ng2-file-upload/commit/33ac156208bfcf57851210f037719107e1ca9eb9))
|
||||
- **style:** delete extra rule ([b5917b9](https://github.com/valor-software/ng2-file-upload/commit/b5917b9fa77e63c4c1b06598abc817b8033730c3))
|
||||
- **typo:** fix grammatical mistake in readme ([#1119](https://github.com/valor-software/ng2-file-upload/issues/1119)) ([8171bc8](https://github.com/valor-software/ng2-file-upload/commit/8171bc831b69692d04b650be19ff82f04ff56662))
|
||||
|
||||
### Features
|
||||
|
||||
* **bump:** added strict mode, doesn't build in dist, should be resolved ([69cd64d](https://github.com/valor-software/ng2-file-upload/commit/69cd64dc287c9bdd1c35af1062e27ce32a47e977))
|
||||
* **core:** added nx ([de738f7](https://github.com/valor-software/ng2-file-upload/commit/de738f7c63d7f37e07019bc596c02e9f4320f563))
|
||||
* **package:** relaxed peer dependencies to allow ng v4 ([#713](https://github.com/valor-software/ng2-file-upload/issues/713)) ([7704e0e](https://github.com/valor-software/ng2-file-upload/commit/7704e0e970276ebcd8bfefe34bf153f82108a11e))
|
||||
* **upgrade:** updated up to angular 11 tests are failed ([ce9dc20](https://github.com/valor-software/ng2-file-upload/commit/ce9dc20056cc6c7cd58e502af05d7d97043c8f3a))
|
||||
|
||||
|
||||
- **bump:** added strict mode, doesn't build in dist, should be resolved ([69cd64d](https://github.com/valor-software/ng2-file-upload/commit/69cd64dc287c9bdd1c35af1062e27ce32a47e977))
|
||||
- **core:** added nx ([de738f7](https://github.com/valor-software/ng2-file-upload/commit/de738f7c63d7f37e07019bc596c02e9f4320f563))
|
||||
- **package:** relaxed peer dependencies to allow ng v4 ([#713](https://github.com/valor-software/ng2-file-upload/issues/713)) ([7704e0e](https://github.com/valor-software/ng2-file-upload/commit/7704e0e970276ebcd8bfefe34bf153f82108a11e))
|
||||
- **upgrade:** updated up to angular 11 tests are failed ([ce9dc20](https://github.com/valor-software/ng2-file-upload/commit/ce9dc20056cc6c7cd58e502af05d7d97043c8f3a))
|
||||
|
||||
# [1.3.0](https://github.com/valor-software/ng2-file-upload/compare/v1.2.0...v1.3.0) (2021-08-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** fix xvfb service issue ([33ac156](https://github.com/valor-software/ng2-file-upload/commit/33ac156208bfcf57851210f037719107e1ca9eb9))
|
||||
* **style:** delete extra rule ([b5917b9](https://github.com/valor-software/ng2-file-upload/commit/b5917b9fa77e63c4c1b06598abc817b8033730c3))
|
||||
* **typo:** fix grammatical mistake in readme ([#1119](https://github.com/valor-software/ng2-file-upload/issues/1119)) ([8171bc8](https://github.com/valor-software/ng2-file-upload/commit/8171bc831b69692d04b650be19ff82f04ff56662))
|
||||
|
||||
- **ci:** fix xvfb service issue ([33ac156](https://github.com/valor-software/ng2-file-upload/commit/33ac156208bfcf57851210f037719107e1ca9eb9))
|
||||
- **style:** delete extra rule ([b5917b9](https://github.com/valor-software/ng2-file-upload/commit/b5917b9fa77e63c4c1b06598abc817b8033730c3))
|
||||
- **typo:** fix grammatical mistake in readme ([#1119](https://github.com/valor-software/ng2-file-upload/issues/1119)) ([8171bc8](https://github.com/valor-software/ng2-file-upload/commit/8171bc831b69692d04b650be19ff82f04ff56662))
|
||||
|
||||
### Features
|
||||
|
||||
* **bump:** added strict mode, doesn't build in dist, should be resolved ([69cd64d](https://github.com/valor-software/ng2-file-upload/commit/69cd64dc287c9bdd1c35af1062e27ce32a47e977))
|
||||
* **package:** relaxed peer dependencies to allow ng v4 ([#713](https://github.com/valor-software/ng2-file-upload/issues/713)) ([7704e0e](https://github.com/valor-software/ng2-file-upload/commit/7704e0e970276ebcd8bfefe34bf153f82108a11e))
|
||||
* **upgrade:** updated up to angular 11 tests are failed ([ce9dc20](https://github.com/valor-software/ng2-file-upload/commit/ce9dc20056cc6c7cd58e502af05d7d97043c8f3a))
|
||||
|
||||
|
||||
- **bump:** added strict mode, doesn't build in dist, should be resolved ([69cd64d](https://github.com/valor-software/ng2-file-upload/commit/69cd64dc287c9bdd1c35af1062e27ce32a47e977))
|
||||
- **package:** relaxed peer dependencies to allow ng v4 ([#713](https://github.com/valor-software/ng2-file-upload/issues/713)) ([7704e0e](https://github.com/valor-software/ng2-file-upload/commit/7704e0e970276ebcd8bfefe34bf153f82108a11e))
|
||||
- **upgrade:** updated up to angular 11 tests are failed ([ce9dc20](https://github.com/valor-software/ng2-file-upload/commit/ce9dc20056cc6c7cd58e502af05d7d97043c8f3a))
|
||||
|
||||
<a name="1.3.0"></a>
|
||||
|
||||
# [1.3.0](https://github.com/valor-software/ng2-file-upload/compare/v1.2.0...v1.3.0) (2017-11-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **file-upload:** Add response and function to modify the request body ([#901](https://github.com/valor-software/ng2-file-upload/pull/901))
|
||||
* **file-upload** add file type .zip ([#911](https://github.com/valor-software/ng2-file-upload/pull/911))
|
||||
- **file-upload:** Add response and function to modify the request body ([#901](https://github.com/valor-software/ng2-file-upload/pull/901))
|
||||
- **file-upload** add file type .zip ([#911](https://github.com/valor-software/ng2-file-upload/pull/911))
|
||||
|
||||
### Bug Fixes
|
||||
* **file-uploader** Update: setOptions ([#904](https://github.com/valor-software/ng2-file-upload/pull/904))
|
||||
* **docs** Fix correct path for isHTML5 option ([#844](https://github.com/valor-software/ng2-file-upload/pull/844))
|
||||
* **docs** Added onFileDrop() event to documentation ([#857](https://github.com/valor-software/ng2-file-upload/pull/857))
|
||||
|
||||
- **file-uploader** Update: setOptions ([#904](https://github.com/valor-software/ng2-file-upload/pull/904))
|
||||
- **docs** Fix correct path for isHTML5 option ([#844](https://github.com/valor-software/ng2-file-upload/pull/844))
|
||||
- **docs** Added onFileDrop() event to documentation ([#857](https://github.com/valor-software/ng2-file-upload/pull/857))
|
||||
|
||||
<a name="1.2.1"></a>
|
||||
|
||||
## [1.2.1](https://github.com/valor-software/ng2-file-upload/compare/v1.2.0...v1.2.1) (2017-04-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **package:** relaxed peer dependencies to allow ng v4 ([#713](https://github.com/valor-software/ng2-file-upload/issues/713)) ([7704e0e](https://github.com/valor-software/ng2-file-upload/commit/7704e0e))
|
||||
|
||||
|
||||
- **package:** relaxed peer dependencies to allow ng v4 ([#713](https://github.com/valor-software/ng2-file-upload/issues/713)) ([7704e0e](https://github.com/valor-software/ng2-file-upload/commit/7704e0e))
|
||||
|
||||
<a name="1.2.0"></a>
|
||||
|
||||
# [1.2.0](https://github.com/valor-software/ng2-file-upload/compare/v1.1.3-0...v1.2.0) (2017-01-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **headers:** Add FileItem headers to XHR ([#553](https://github.com/valor-software/ng2-file-upload/issues/553)) ([e4a7099](https://github.com/valor-software/ng2-file-upload/commit/e4a7099)), closes [#552](https://github.com/valor-software/ng2-file-upload/issues/552)
|
||||
|
||||
- **headers:** Add FileItem headers to XHR ([#553](https://github.com/valor-software/ng2-file-upload/issues/553)) ([e4a7099](https://github.com/valor-software/ng2-file-upload/commit/e4a7099)), closes [#552](https://github.com/valor-software/ng2-file-upload/issues/552)
|
||||
|
||||
### Features
|
||||
|
||||
* **file-select:** Clear file select automatically ([#524](https://github.com/valor-software/ng2-file-upload/issues/524)) ([410efda](https://github.com/valor-software/ng2-file-upload/commit/410efda))
|
||||
* **fileUpload:** added additionalParameter ([#565](https://github.com/valor-software/ng2-file-upload/issues/565)) ([397de09](https://github.com/valor-software/ng2-file-upload/commit/397de09))
|
||||
* **package:** upgrade to ng v2.3+ ([#574](https://github.com/valor-software/ng2-file-upload/issues/574)) ([3cc6a99](https://github.com/valor-software/ng2-file-upload/commit/3cc6a99))
|
||||
|
||||
|
||||
- **file-select:** Clear file select automatically ([#524](https://github.com/valor-software/ng2-file-upload/issues/524)) ([410efda](https://github.com/valor-software/ng2-file-upload/commit/410efda))
|
||||
- **fileUpload:** added additionalParameter ([#565](https://github.com/valor-software/ng2-file-upload/issues/565)) ([397de09](https://github.com/valor-software/ng2-file-upload/commit/397de09))
|
||||
- **package:** upgrade to ng v2.3+ ([#574](https://github.com/valor-software/ng2-file-upload/issues/574)) ([3cc6a99](https://github.com/valor-software/ng2-file-upload/commit/3cc6a99))
|
||||
|
||||
<a name="1.1.3-0"></a>
|
||||
|
||||
## [1.1.3-0](https://github.com/valor-software/ng2-file-upload/compare/v1.1.2...v1.1.3-0) (2016-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **typing:** added authTokenHeader property to options and file upload class ([b55c852](https://github.com/valor-software/ng2-file-upload/commit/b55c852))
|
||||
|
||||
- **typing:** added authTokenHeader property to options and file upload class ([b55c852](https://github.com/valor-software/ng2-file-upload/commit/b55c852))
|
||||
|
||||
### Features
|
||||
|
||||
* **build:** added support for AoT and ng-cli ([f0b2879](https://github.com/valor-software/ng2-file-upload/commit/f0b2879)), closes [#436](https://github.com/valor-software/ng2-file-upload/issues/436)
|
||||
* **file-upload:** Add the possibility of set the token header ([#213](https://github.com/valor-software/ng2-file-upload/issues/213)) ([282295c](https://github.com/valor-software/ng2-file-upload/commit/282295c))
|
||||
|
||||
|
||||
- **build:** added support for AoT and ng-cli ([f0b2879](https://github.com/valor-software/ng2-file-upload/commit/f0b2879)), closes [#436](https://github.com/valor-software/ng2-file-upload/issues/436)
|
||||
- **file-upload:** Add the possibility of set the token header ([#213](https://github.com/valor-software/ng2-file-upload/issues/213)) ([282295c](https://github.com/valor-software/ng2-file-upload/commit/282295c))
|
||||
|
||||
<a name="1.1.2"></a>
|
||||
|
||||
## [1.1.2](https://github.com/valor-software/ng2-file-upload/compare/v1.1.1...v1.1.2) (2016-10-17)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **package:** allow of ng2 v2.0.* and v2.*.* ([87395e6](https://github.com/valor-software/ng2-file-upload/commit/87395e6))
|
||||
|
||||
|
||||
- **package:** allow of ng2 v2.0._ and v2._.\* ([87395e6](https://github.com/valor-software/ng2-file-upload/commit/87395e6))
|
||||
|
||||
<a name="1.1.1"></a>
|
||||
|
||||
## [1.1.1](https://github.com/valor-software/ng2-file-upload/compare/v1.0.3...v1.1.1) (2016-10-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **uploader:** Add the ability to upload files via PUT instead of POST ([#239](https://github.com/valor-software/ng2-file-upload/issues/239)) ([e068511](https://github.com/valor-software/ng2-file-upload/commit/e068511))
|
||||
* **zone.js:** error in Safari, Added Typings ([#221](https://github.com/valor-software/ng2-file-upload/issues/221)) ([db77e89](https://github.com/valor-software/ng2-file-upload/commit/db77e89))
|
||||
|
||||
- **uploader:** Add the ability to upload files via PUT instead of POST ([#239](https://github.com/valor-software/ng2-file-upload/issues/239)) ([e068511](https://github.com/valor-software/ng2-file-upload/commit/e068511))
|
||||
- **zone.js:** error in Safari, Added Typings ([#221](https://github.com/valor-software/ng2-file-upload/issues/221)) ([db77e89](https://github.com/valor-software/ng2-file-upload/commit/db77e89))
|
||||
|
||||
### Features
|
||||
|
||||
* **multipart:** Create disableMultipart option in FileUploader ([#224](https://github.com/valor-software/ng2-file-upload/issues/224)) ([22307d2](https://github.com/valor-software/ng2-file-upload/commit/22307d2))
|
||||
* **package:** angular ~2.0.1 stable release ([#425](https://github.com/valor-software/ng2-file-upload/issues/425)) ([3fec385](https://github.com/valor-software/ng2-file-upload/commit/3fec385))
|
||||
* **package:** updated to typescript 2 ([4fef496](https://github.com/valor-software/ng2-file-upload/commit/4fef496))
|
||||
|
||||
|
||||
- **multipart:** Create disableMultipart option in FileUploader ([#224](https://github.com/valor-software/ng2-file-upload/issues/224)) ([22307d2](https://github.com/valor-software/ng2-file-upload/commit/22307d2))
|
||||
- **package:** angular ~2.0.1 stable release ([#425](https://github.com/valor-software/ng2-file-upload/issues/425)) ([3fec385](https://github.com/valor-software/ng2-file-upload/commit/3fec385))
|
||||
- **package:** updated to typescript 2 ([4fef496](https://github.com/valor-software/ng2-file-upload/commit/4fef496))
|
||||
|
||||
<a name="1.1.0"></a>
|
||||
# [1.1.0](https://github.com/valor-software/ng2-file-upload/compare/v1.0.3...v1.1.0) (2016-09-21)
|
||||
|
||||
# [1.1.0](https://github.com/valor-software/ng2-file-upload/compare/v1.0.3...v1.1.0) (2016-09-21)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **uploader:** Add the ability to upload files via PUT instead of POST ([#239](https://github.com/valor-software/ng2-file-upload/issues/239)) ([e068511](https://github.com/valor-software/ng2-file-upload/commit/e068511))
|
||||
* **zone.js:** error in Safari, Added Typings ([#221](https://github.com/valor-software/ng2-file-upload/issues/221)) ([db77e89](https://github.com/valor-software/ng2-file-upload/commit/db77e89))
|
||||
|
||||
- **uploader:** Add the ability to upload files via PUT instead of POST ([#239](https://github.com/valor-software/ng2-file-upload/issues/239)) ([e068511](https://github.com/valor-software/ng2-file-upload/commit/e068511))
|
||||
- **zone.js:** error in Safari, Added Typings ([#221](https://github.com/valor-software/ng2-file-upload/issues/221)) ([db77e89](https://github.com/valor-software/ng2-file-upload/commit/db77e89))
|
||||
|
||||
### Features
|
||||
|
||||
* **multipart:** Create disableMultipart option in FileUploader ([#224](https://github.com/valor-software/ng2-file-upload/issues/224)) ([22307d2](https://github.com/valor-software/ng2-file-upload/commit/22307d2))
|
||||
* **package:** updated to typescript 2 ([4fef496](https://github.com/valor-software/ng2-file-upload/commit/4fef496))
|
||||
|
||||
|
||||
- **multipart:** Create disableMultipart option in FileUploader ([#224](https://github.com/valor-software/ng2-file-upload/issues/224)) ([22307d2](https://github.com/valor-software/ng2-file-upload/commit/22307d2))
|
||||
- **package:** updated to typescript 2 ([4fef496](https://github.com/valor-software/ng2-file-upload/commit/4fef496))
|
||||
|
||||
<a name="1.0.3"></a>
|
||||
|
||||
## [1.0.3](https://github.com/valor-software/ng2-file-upload/compare/v1.0.2...v1.0.3) (2016-05-12)
|
||||
|
||||
|
||||
|
||||
<a name="1.0.2"></a>
|
||||
## 1.0.2 (2016-05-12)
|
||||
|
||||
## 1.0.2 (2016-05-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **upload:** merge fix and get filters fix ([ef6091c](https://github.com/valor-software/ng2-file-upload/commit/ef6091c))
|
||||
|
||||
- **upload:** merge fix and get filters fix ([ef6091c](https://github.com/valor-software/ng2-file-upload/commit/ef6091c))
|
||||
|
||||
### Chores
|
||||
|
||||
* **build:** ng2 style guide applied ([aee69d8](https://github.com/valor-software/ng2-file-upload/commit/aee69d8))
|
||||
|
||||
- **build:** ng2 style guide applied ([aee69d8](https://github.com/valor-software/ng2-file-upload/commit/aee69d8))
|
||||
|
||||
### Features
|
||||
|
||||
* **package:** upgrade to angular 2.0.0-rc.1 ([#176](https://github.com/valor-software/ng2-file-upload/issues/176)) ([13c5c35](https://github.com/valor-software/ng2-file-upload/commit/13c5c35)), closes [#180](https://github.com/valor-software/ng2-file-upload/issues/180)
|
||||
|
||||
- **package:** upgrade to angular 2.0.0-rc.1 ([#176](https://github.com/valor-software/ng2-file-upload/issues/176)) ([13c5c35](https://github.com/valor-software/ng2-file-upload/commit/13c5c35)), closes [#180](https://github.com/valor-software/ng2-file-upload/issues/180)
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- directives and selectors renamed to ng2FileSelect and ng2FileDrop
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# ng2-file-upload [](http://badge.fury.io/js/ng2-file-upload) [](https://npmjs.org/ng2-file-upload)[](https://ngx-slack.herokuapp.com)
|
||||
# ng2-file-upload [](http://badge.fury.io/js/ng2-file-upload) [](https://npmjs.org/ng2-file-upload)
|
||||
Easy to use Angular2 directives for files upload ([demo](http://valor-software.github.io/ng2-file-upload/))
|
||||
|
||||
[](https://github.com/mgechev/angular2-style-guide)
|
||||
|
||||
56
angular.json
56
angular.json
@@ -2,11 +2,10 @@
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"defaultProject": "ng2-file-upload-demo",
|
||||
"projects": {
|
||||
"ng2-file-upload": {
|
||||
"root": "libs/ng2-file-upload",
|
||||
"sourceRoot": "libs/ng2-file-upload/src",
|
||||
"sourceRoot": "libs/ng2-file-upload/",
|
||||
"projectType": "library",
|
||||
"architect": {
|
||||
"build": {
|
||||
@@ -30,7 +29,10 @@
|
||||
"lintFilePatterns": [
|
||||
"libs/ng2-file-upload/**/*.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"builder": "@nrwl/jest:jest",
|
||||
@@ -38,14 +40,13 @@
|
||||
"coverage/libs/ng2-file-upload"
|
||||
],
|
||||
"options": {
|
||||
"jestConfig": "libs/ng2-file-upload/jest.config.js",
|
||||
"jestConfig": "libs/ng2-file-upload/jest.config.ts",
|
||||
"passWithNoTests": true
|
||||
}
|
||||
},
|
||||
"version": {
|
||||
"builder": "@nrwl/workspace:run-commands",
|
||||
"outputs": [
|
||||
],
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"commands": [
|
||||
"ts-node ./scripts/set-version.ts",
|
||||
@@ -59,7 +60,10 @@
|
||||
"production": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"ng2-file-upload-demo": {
|
||||
"root": "apps/demo",
|
||||
@@ -77,7 +81,14 @@
|
||||
"apps/demo/src/assets"
|
||||
],
|
||||
"styles": [],
|
||||
"scripts": []
|
||||
"scripts": [],
|
||||
"aot": false,
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"buildOptimizer": false,
|
||||
"sourceMap": true,
|
||||
"optimization": false,
|
||||
"namedChunks": true
|
||||
},
|
||||
"dependsOn": [
|
||||
{
|
||||
@@ -90,7 +101,6 @@
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
@@ -103,16 +113,17 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "ng2-file-upload-demo:build"
|
||||
"browserTarget": "ng2-file-upload-demo:build:production"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "ng2-file-upload-demo:build:production"
|
||||
"browserTarget": "ng2-file-upload-demo:build"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -122,19 +133,16 @@
|
||||
"lintFilePatterns": [
|
||||
"apps/demo/**/*.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "ng2-file-upload-demo",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"prefix": "",
|
||||
"styleext": "css"
|
||||
},
|
||||
"@schematics/angular:directive": {
|
||||
"prefix": ""
|
||||
},
|
||||
"tags": [],
|
||||
"implicitDependencies": [
|
||||
"ng2-file-upload"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,28 @@
|
||||
{
|
||||
"extends": ["../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"extends": [
|
||||
"../../.eslintrc.json"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"files": [
|
||||
"*.ts"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular",
|
||||
"plugin:@angular-eslint/template/process-inline-templates"
|
||||
],
|
||||
"parserOptions": { "project": ["src/accordion/tsconfig.*?.json"] },
|
||||
"rules": {
|
||||
}
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||
"files": [
|
||||
"*.html"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular-template"
|
||||
],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -7,12 +7,24 @@ const gettingStarted = require('html-loader!markdown-loader!../getting-started.m
|
||||
template: `
|
||||
<main class="bd-pageheader">
|
||||
<div class="container">
|
||||
<h1>ng2-file-upload</h1>
|
||||
<p>The Angular2 File Upload directives</p>
|
||||
<a class="btn btn-primary" href="https://github.com/valor-software/ng2-file-upload">View on GitHub</a>
|
||||
<div class="row">
|
||||
<div class="col-lg-1"><iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-file-upload&type=star&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></div>
|
||||
<div class="col-lg-1"><iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-file-upload&type=fork&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></div>
|
||||
<h1>ng2-file-upload</h1>
|
||||
<p>The Angular2 File Upload directives</p>
|
||||
<p>
|
||||
<a class="btn btn-light w-auto" href="https://github.com/valor-software/ng2-file-upload">View on GitHub</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row" style="padding-top: 15px">
|
||||
<div class="d-flex flex-wrap">
|
||||
<a href="https://npmjs.org/ng2-file-upload" class="me-2 d-flex mb-2">
|
||||
<img src="https://img.shields.io/npm/v/ng2-file-upload/latest.svg" alt="npm latest version" >
|
||||
</a>
|
||||
<a href="https://npmjs.org/ng2-file-upload" class="me-2 d-flex mb-2">
|
||||
<img src="https://img.shields.io/npm/v/ng2-file-upload/next.svg" alt="npm next version" >
|
||||
</a>
|
||||
<iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-file-upload&type=star&count=true" frameborder="0" scrolling="0" width="100px" height="20px" class="me-2 mb-2"></iframe>
|
||||
<iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-file-upload&type=fork&count=true" frameborder="0" scrolling="0" width="100px" height="20px" class="mb-2"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -2,39 +2,40 @@
|
||||
<div class="row">
|
||||
<tabset>
|
||||
<tab *ngFor="let desc of tabs" heading="{{desc.heading}}" (select)="select($event)">
|
||||
<div class="card card-block panel panel-default panel-body">
|
||||
|
||||
<div class="card card-block p-3 border-top-0">
|
||||
<simple-demo></simple-demo>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row" style="margin: 0px;">
|
||||
<tabset>
|
||||
<tab heading="Markup">
|
||||
<div class="card card-block panel panel-default panel-body">
|
||||
<pre class="prettyprint linenums lang-html">{{desc.html}}</pre>
|
||||
</div>
|
||||
</tab>
|
||||
<tab heading="TypeScript">
|
||||
<div class="card card-block panel panel-default panel-body">
|
||||
<pre class="prettyprint linenums lang-js">{{desc.ts}}</pre>
|
||||
<pre class="language-typescript"><code class="language-typescript" ng-non-bindable [innerHTML]="desc.ts"></code></pre>
|
||||
</div>
|
||||
</tab>
|
||||
<tab heading="Backend Demo">
|
||||
<div class="card card-block panel panel-default panel-body">
|
||||
<pre class="prettyprint linenums lang-js">{{desc.js}}</pre>
|
||||
</div>
|
||||
</tab>
|
||||
</tabset>
|
||||
<div class="container p-0">
|
||||
<div class="row" style="margin: 0px;">
|
||||
<tabset class="p-0">
|
||||
<tab heading="Markup">
|
||||
<div class="card card-block p-3 border-top-0">
|
||||
<pre class="prettyprint linenums lang-html">{{desc.html}}</pre>
|
||||
</div>
|
||||
</tab>
|
||||
<tab heading="TypeScript">
|
||||
<div class="card card-block p-3 border-top-0">
|
||||
<pre class="prettyprint linenums lang-js">{{desc.ts}}</pre>
|
||||
<pre class="language-typescript"><code class="language-typescript" ng-non-bindable [innerHTML]="desc.ts"></code></pre>
|
||||
</div>
|
||||
</tab>
|
||||
<tab heading="Backend Demo">
|
||||
<div class="card card-block p-3 border-top-0">
|
||||
<pre class="prettyprint linenums lang-js">{{desc.js}}</pre>
|
||||
</div>
|
||||
</tab>
|
||||
</tabset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tab>
|
||||
</tabset>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<h2>API</h2>
|
||||
<div class="card card-block panel panel-default panel-body" [innerHTML]="doc"></div>
|
||||
<div class="container">
|
||||
<div class="row mt-3">
|
||||
<h2>API</h2>
|
||||
<div class="card card-block p-3" [innerHTML]="doc"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
.my-drop-zone { border: dotted 3px lightgray; }
|
||||
.nv-file-over { border: dotted 3px red; } /* Default class applied to drop zones on over */
|
||||
.another-file-over-class { border: dotted 3px green; }
|
||||
|
||||
html, body { height: 100%; }
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<div class="container p-0">
|
||||
|
||||
<div class="navbar navbar-default">
|
||||
<div class="navbar">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href>Angular2 File Upload</a>
|
||||
</div>
|
||||
@@ -24,7 +23,7 @@
|
||||
[ngClass]="{'nv-file-over': hasBaseDropZoneOver}"
|
||||
(fileOver)="fileOverBase($event)"
|
||||
[uploader]="uploader"
|
||||
class="well my-drop-zone">
|
||||
class="well my-drop-zone p-2 mb-3">
|
||||
Base drop zone
|
||||
</div>
|
||||
|
||||
@@ -32,21 +31,21 @@
|
||||
[ngClass]="{'another-file-over-class': hasAnotherDropZoneOver}"
|
||||
(fileOver)="fileOverAnother($event)"
|
||||
[uploader]="uploader"
|
||||
class="well my-drop-zone">
|
||||
class="well my-drop-zone p-2 mb-3">
|
||||
Another drop zone
|
||||
</div>
|
||||
|
||||
Multiple
|
||||
<input type="file" ng2FileSelect [uploader]="uploader" multiple /><br/>
|
||||
Multiple<br>
|
||||
<input class="mt-2 mb-3" type="file" ng2FileSelect [uploader]="uploader" multiple /><br/>
|
||||
|
||||
Single
|
||||
<input type="file" ng2FileSelect [uploader]="uploader" />
|
||||
Single<br>
|
||||
<input class="mt-2 mb-3" type="file" ng2FileSelect [uploader]="uploader" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-9" style="margin-bottom: 40px">
|
||||
|
||||
<h3>Upload queue</h3>
|
||||
<p>Queue length: {{ uploader?.queue?.length }}</p>
|
||||
<p>Queue length: {{ uploader?.queue?.length ? uploader?.queue?.length : 'Empty'}}</p>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
@@ -58,21 +57,21 @@
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody *ngIf="uploader?.queue?.length">
|
||||
<tr *ngFor="let item of uploader.queue">
|
||||
<td><strong>{{ item?.file?.name }}</strong></td>
|
||||
<td *ngIf="uploader.options.isHTML5" nowrap>{{ item?.file?.size/1024/1024 | number:'.2' }} MB</td>
|
||||
<td *ngIf="uploader.options.isHTML5">
|
||||
<td data-label="Name"><strong>{{ item?.file?.name }}</strong></td>
|
||||
<td data-label="Size" *ngIf="uploader.options.isHTML5" nowrap>{{ item?.file?.size/1024/1024 | number:'.2' }} MB</td>
|
||||
<td data-label="Progress" *ngIf="uploader.options.isHTML5">
|
||||
<div class="progress" style="margin-bottom: 0;">
|
||||
<div class="progress-bar" role="progressbar" [ngStyle]="{ 'width': item.progress + '%' }"></div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td data-label="Status" class="text-center">
|
||||
<span *ngIf="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
|
||||
<span *ngIf="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
|
||||
<span *ngIf="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<td data-label="Actions" nowrap>
|
||||
<button type="button" class="btn btn-success btn-xs"
|
||||
(click)="item.upload()" [disabled]="item.isReady || item.isUploading || item.isSuccess">
|
||||
<span class="glyphicon glyphicon-upload"></span> Upload
|
||||
@@ -93,15 +92,15 @@
|
||||
<div>
|
||||
<div>
|
||||
Queue progress:
|
||||
<div class="progress" style="">
|
||||
<div class="progress mt-2 mb-3" style="">
|
||||
<div class="progress-bar" role="progressbar" [ngStyle]="{ 'width': uploader.progress + '%' }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-success btn-s"
|
||||
<button type="button" class="btn btn-success btn-s me-2"
|
||||
(click)="uploader.uploadAll()" [disabled]="!uploader.getNotUploadedItems().length">
|
||||
<span class="glyphicon glyphicon-upload"></span> Upload all
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning btn-s"
|
||||
<button type="button" class="btn btn-warning btn-s me-2"
|
||||
(click)="uploader.cancelAll()" [disabled]="!uploader.isUploading">
|
||||
<span class="glyphicon glyphicon-ban-circle"></span> Cancel all
|
||||
</button>
|
||||
@@ -119,9 +118,9 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Response</div>
|
||||
<div class="panel-body">
|
||||
<div class="card">
|
||||
<div class="card-header">Response</div>
|
||||
<div class="card-body">
|
||||
{{ response }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,15 @@
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
a, .nav-tabs a.nav-link {
|
||||
text-decoration: none;
|
||||
color: #6f5499;
|
||||
}
|
||||
|
||||
.btn-group-lg > .btn, .btn-lg {
|
||||
font-size: 18px;
|
||||
}
|
||||
@@ -22,10 +31,6 @@ section {
|
||||
padding-top: 30px;
|
||||
}
|
||||
|
||||
.bd-pageheader {
|
||||
margin-top: 51px;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
padding-bottom: 9px;
|
||||
margin: 40px 0 20px;
|
||||
@@ -37,43 +42,24 @@ section {
|
||||
}
|
||||
|
||||
.navbar {
|
||||
padding: 0;
|
||||
padding: 15px;
|
||||
background-color: #f8f8f8;
|
||||
border-color: #e7e7e7;
|
||||
}
|
||||
|
||||
.navbar-nav .nav-item {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.nav > li > a {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.nav .navbar-brand {
|
||||
float: left;
|
||||
height: 50px;
|
||||
padding: 15px 15px;
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
color: #777;
|
||||
float: left;
|
||||
height: 50px;
|
||||
padding: 15px 15px;
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.navbar-toggler {
|
||||
margin-top: 8px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.navbar-default .navbar-nav > li > a:focus, .navbar-default .navbar-nav > li > a:hover {
|
||||
.navbar-nav > li > a:focus, .navbar-default .navbar-nav > li > a:hover {
|
||||
color: #333;
|
||||
background-color: transparent;
|
||||
}
|
||||
@@ -113,22 +99,8 @@ section {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.scrollable-menu .nav-link {
|
||||
color: #337ab7;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.scrollable-menu .nav-link:hover {
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
simple-demo {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
simple-demo >.container {
|
||||
max-width: 100%;
|
||||
.card {
|
||||
border-radius: 0 0 .25rem .25rem;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
@@ -175,6 +147,53 @@ simple-demo >.container {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
table caption {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
table thead {
|
||||
border: none;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
table tr {
|
||||
border-bottom: 3px solid #ddd;
|
||||
display: block;
|
||||
margin-bottom: .625em;
|
||||
}
|
||||
|
||||
table td {
|
||||
border-bottom: 1px solid #ddd;
|
||||
font-size: .8em;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
table td::before {
|
||||
content: attr(data-label);
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
table td:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
td[data-label="Progress"] .progress {
|
||||
width: 75%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
@@ -193,13 +212,6 @@ simple-demo >.container {
|
||||
* iOS Resolution Quick Reference: http://www.iosres.com/
|
||||
*/
|
||||
|
||||
.scrollable-menu {
|
||||
height: 90vh !important;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
padding: 0 0 20px;
|
||||
}
|
||||
|
||||
/**
|
||||
* iPad with portrait orientation.
|
||||
*/
|
||||
@@ -228,29 +240,22 @@ simple-demo >.container {
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-default .navbar-toggle .icon-bar {
|
||||
background-color: #888;
|
||||
}
|
||||
|
||||
.navbar-toggle:focus {
|
||||
outline: 0
|
||||
}
|
||||
|
||||
.navbar-toggle .icon-bar {
|
||||
display: block;
|
||||
width: 22px;
|
||||
height: 2px;
|
||||
border-radius: 1px
|
||||
}
|
||||
|
||||
.navbar-toggle .icon-bar + .icon-bar {
|
||||
margin-top: 4px
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap; /* CSS 3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
line-height: 1.42857143;
|
||||
color: #333;
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
pre.prettyprint {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<link rel="author" href="https://github.com/valor-software/ng2-file-upload/graphs/contributors">
|
||||
|
||||
<!--link to bootstrap.css-->
|
||||
<link rel="stylesheet" crossorigin="anonymous" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="assets/css/style.css">
|
||||
<link rel="stylesheet" href="assets/css/prettify-angulario.css">
|
||||
<style media="screen">
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [
|
||||
"./src/main.ts",
|
||||
"../../scripts/polyfills.ts"
|
||||
"./src/main.ts",
|
||||
"../../scripts/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"./src/typings.d.ts"
|
||||
],
|
||||
"include": ["./src/typings.d.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.app.json"
|
||||
@@ -16,5 +18,10 @@
|
||||
"path": "./tsconfig.editor.json"
|
||||
}
|
||||
],
|
||||
"exclude": ["**/*.spec.ts"]
|
||||
"exclude": [
|
||||
"**/*.spec.ts"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"target": "es2020"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
projects: [
|
||||
'<rootDir>/libs/ng2-file-upload'
|
||||
]
|
||||
};
|
||||
3
jest.config.ts
Normal file
3
jest.config.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
const { getJestProjects } = require('@nrwl/jest');
|
||||
|
||||
export default {"projects": getJestProjects()};
|
||||
@@ -1,4 +1,4 @@
|
||||
const nxPreset = require('@nrwl/jest/preset');
|
||||
const nxPreset = require('@nrwl/jest/preset').default;
|
||||
module.exports = {
|
||||
...nxPreset,
|
||||
...{
|
||||
|
||||
@@ -1,20 +1,28 @@
|
||||
{
|
||||
"extends": ["../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"extends": [
|
||||
"../../.eslintrc.json"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"files": [
|
||||
"*.ts"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular",
|
||||
"plugin:@angular-eslint/template/process-inline-templates"
|
||||
],
|
||||
"parserOptions": { "project": ["src/accordion/tsconfig.*?.json"] },
|
||||
"rules": {
|
||||
}
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||
"files": [
|
||||
"*.html"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular-template"
|
||||
],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,10 +1,89 @@
|
||||
# libs-ng2-file-upload
|
||||
# ng2-file-upload [](http://badge.fury.io/js/ng2-file-upload) [](https://npmjs.org/ng2-file-upload)
|
||||
Easy to use Angular2 directives for files upload ([demo](http://valor-software.github.io/ng2-file-upload/))
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
[](https://github.com/mgechev/angular2-style-guide)
|
||||
[](https://travis-ci.org/valor-software/ng2-file-upload)
|
||||
[](https://david-dm.org/valor-software/ng2-file-upload)
|
||||
|
||||
## Quick start
|
||||
|
||||
## Running unit tests
|
||||
1. A recommended way to install ***ng2-file-upload*** is through [npm](https://www.npmjs.com/search?q=ng2-file-upload) package manager using the following command:
|
||||
|
||||
Run `nx test libs-ng2-file-upload` to execute the unit tests via [Jest](https://jestjs.io).
|
||||
`npm i ng2-file-upload --save`
|
||||
|
||||
Alternatively, you can [download it in a ZIP file](https://github.com/valor-software/ng2-file-upload/archive/master.zip).
|
||||
|
||||
2. Currently `ng2-file-upload` contains two directives: `ng2-file-select` and `ng2-file-drop`. `ng2-file-select` is used for 'file-input' field of form and
|
||||
`ng2-file-drop` is used for area that will be used for dropping of file or files.
|
||||
|
||||
3. More information regarding using of ***ng2-file-upload*** is located in
|
||||
[demo](http://valor-software.github.io/ng2-file-upload/) and [demo sources](https://github.com/valor-software/ng2-file-upload/tree/master/demo).
|
||||
|
||||
## Using ***ng2-file-upload*** in a project
|
||||
|
||||
1. Install as shown in the above section.
|
||||
|
||||
2. Import `FileUploadModule` into the module that declares the component using ***ng2-file-upload***:
|
||||
|
||||
```import { FileUploadModule } from 'ng2-file-upload';```
|
||||
|
||||
3. Add it to `[imports]` under `@NgModule`:
|
||||
|
||||
```imports: [ ... FileUploadModule, ... ]```
|
||||
|
||||
4. Import `FileUploader` into the component:
|
||||
|
||||
```import { FileUploader } from 'ng2-file-upload';```
|
||||
|
||||
5. Create a variable for the API url:
|
||||
|
||||
```const URL = 'path_to_api';```
|
||||
|
||||
6. Initialize it:
|
||||
|
||||
```public uploader:FileUploader = new FileUploader({url: URL}); ```
|
||||
|
||||
## API for `ng2FileSelect`
|
||||
|
||||
### Properties
|
||||
|
||||
- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)
|
||||
|
||||
### Events
|
||||
- `onFileSelected` - fires when files are selected and added to the uploader queue
|
||||
|
||||
## API for `ng2FileDrop`
|
||||
|
||||
### Properties
|
||||
|
||||
- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)
|
||||
|
||||
Parameters supported by this object:
|
||||
|
||||
1. `url` - URL of File Uploader's route
|
||||
2. `authToken` - Auth token that will be applied as 'Authorization' header during file send.
|
||||
3. `disableMultipart` - If 'true', disable using a multipart form for file upload and instead stream the file. Some APIs (e.g. Amazon S3) may expect the file to be streamed rather than sent via a form. Defaults to false.
|
||||
4. `itemAlias` - item alias (form name redefinition)
|
||||
5. `formatDataFunction` - Function to modify the request body. 'DisableMultipart' must be 'true' for this function to be called.
|
||||
6. `formatDataFunctionIsAsync` - Informs if the function sent in 'formatDataFunction' is asynchronous. Defaults to false.
|
||||
7. `parametersBeforeFiles` - States if additional parameters should be appended before or after the file. Defaults to false.
|
||||
|
||||
### Events
|
||||
|
||||
- `fileOver` - it fires during 'over' and 'out' events for Drop Area; returns `boolean`: `true` if file is over Drop Area, `false` in case of out.
|
||||
See using in [ts demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts) and
|
||||
[html demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.html)
|
||||
- `onFileDrop` - it fires after a file has been dropped on a Drop Area; you can pass in `$event` to get the list of files that were dropped. i.e. `(onFileDrop)="dropped($event)"`
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
Please follow these guidelines when reporting bugs and feature requests:
|
||||
|
||||
1. Use [GitHub Issues](https://github.com/valor-software/ng2-file-upload/issues) board to report bugs and feature requests (not our email address)
|
||||
2. Please **always** write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.
|
||||
|
||||
Thanks for understanding!
|
||||
|
||||
### License
|
||||
|
||||
The MIT License (see the [LICENSE](https://github.com/valor-software/ng2-file-upload/blob/master/LICENSE) file for the full text)
|
||||
|
||||
@@ -3,6 +3,8 @@ import { NgModule } from '@angular/core';
|
||||
|
||||
import { FileDropDirective } from './file-drop.directive';
|
||||
import { FileSelectDirective } from './file-select.directive';
|
||||
export { FileDropDirective } from './file-drop.directive';
|
||||
export { FileSelectDirective } from './file-select.directive';
|
||||
|
||||
@NgModule({
|
||||
imports: [ CommonModule ],
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
export * from './file-upload/file-drop.directive';
|
||||
export * from './file-upload/file-uploader.class';
|
||||
export * from './file-upload/file-item.class';
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
module.exports = {
|
||||
displayName: 'ng2-file-upload',
|
||||
preset: '../../jest.preset.js',
|
||||
setupFilesAfterEnv: ['<rootDir>/testing/test-setup.ts'],
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
astTransformers: {
|
||||
before: [
|
||||
'jest-preset-angular/build/InlineFilesTransformer',
|
||||
'jest-preset-angular/build/StripStylesTransformer',
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
transform: {
|
||||
'^.+\\.[tj]sx?$': 'ts-jest'
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
coverageDirectory: '../../coverage/libs/ng2-file-upload',
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
|
||||
'jest-preset-angular/build/AngularSnapshotSerializer.js',
|
||||
'jest-preset-angular/build/HTMLCommentSerializer.js',
|
||||
]
|
||||
};
|
||||
21
libs/ng2-file-upload/jest.config.ts
Normal file
21
libs/ng2-file-upload/jest.config.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
/* eslint-disable */
|
||||
export default {
|
||||
displayName: 'ng2-file-upload',
|
||||
preset: '../../jest.preset.js',
|
||||
setupFilesAfterEnv: ['<rootDir>/testing/test-setup.ts'],
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
|
||||
}
|
||||
},
|
||||
coverageDirectory: '../../coverage/libs/ng2-file-upload',
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/serializers/no-ng-attributes',
|
||||
'jest-preset-angular/build/serializers/ng-snapshot',
|
||||
'jest-preset-angular/build/serializers/html-comment'
|
||||
],
|
||||
transform: { '^.+.(ts|mjs|js|html)$': 'jest-preset-angular' },
|
||||
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
|
||||
moduleFileExtensions: ['mjs', 'ts', 'js', 'html']
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/libs/ng2-file-upload",
|
||||
"dest": "../../dist/libs/ng2-file-upload/",
|
||||
"lib": {
|
||||
"entryFile": "index.ts"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,31 @@
|
||||
{
|
||||
"name": "ng2-file-upload",
|
||||
"version": "2.0.0-0",
|
||||
"version": "3.0.0",
|
||||
"description": "Angular file uploader",
|
||||
"author": "Dmitriy Shekhovtsov <valorkin@gmail.com>",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@angular/common": "*",
|
||||
"@angular/core": "*"
|
||||
}
|
||||
"@angular/core": "^14.0.0",
|
||||
"@angular/common": "^14.0.0"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/",
|
||||
"tag": "next"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/valor-software/ng2-file-upload.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/valor-software/ng2-file-upload/issues"
|
||||
},
|
||||
"homepage": "https://github.com/valor-software/ng2-file-upload#readme",
|
||||
"keywords": [
|
||||
"angular",
|
||||
"upload file",
|
||||
"ng",
|
||||
"ng2",
|
||||
"angular2"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, DebugElement } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { inject, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FileUploader } from '../../file-upload/file-uploader.class';
|
||||
import { FileUploadModule } from '../../file-upload/file-upload.module';
|
||||
@@ -28,7 +28,7 @@ describe('Directive: FileDropDirective', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ FileUploadModule ],
|
||||
declarations: [ ContainerComponent ],
|
||||
declarations: [ ContainerComponent, FileDropDirective ],
|
||||
providers: [ ContainerComponent ]
|
||||
});
|
||||
});
|
||||
@@ -72,19 +72,21 @@ describe('Directive: FileDropDirective', () => {
|
||||
const filters = fileDropDirective.getFilters();
|
||||
|
||||
// TODO: Update test once implemented
|
||||
expect(filters).toEqual({});
|
||||
expect(filters).toBeFalsy();
|
||||
});
|
||||
|
||||
it('handles drop event', () => {
|
||||
spyOn(fileDropDirective, 'onDrop');
|
||||
|
||||
const drop = jest.spyOn(fileDropDirective, 'onDrop');
|
||||
directiveElement.triggerEventHandler('drop', getFakeEventData());
|
||||
|
||||
expect(fileDropDirective.onDrop).toHaveBeenCalled();
|
||||
expect(drop).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('adds file to upload', () => {
|
||||
spyOn(fileDropDirective.uploader, 'addToQueue');
|
||||
let addToQueue;
|
||||
if (fileDropDirective.uploader?.addToQueue) {
|
||||
addToQueue = jest.spyOn(fileDropDirective.uploader, 'addToQueue');
|
||||
}
|
||||
|
||||
let fileOverData;
|
||||
fileDropDirective.fileOver.subscribe((data: any) => fileOverData = data);
|
||||
@@ -96,13 +98,13 @@ describe('Directive: FileDropDirective', () => {
|
||||
|
||||
const uploadedFiles = getFakeEventData().dataTransfer.files;
|
||||
|
||||
expect(fileDropDirective.uploader.addToQueue).toHaveBeenCalledWith(uploadedFiles, fileDropDirective.getOptions(), fileDropDirective.getFilters());
|
||||
expect(addToQueue).toHaveBeenCalledWith(uploadedFiles, fileDropDirective.getOptions(), fileDropDirective.getFilters());
|
||||
expect(fileOverData).toBeFalsy();
|
||||
expect(fileDropData).toEqual(uploadedFiles);
|
||||
});
|
||||
|
||||
it('handles dragover event', () => {
|
||||
spyOn(fileDropDirective, 'onDragOver');
|
||||
jest.spyOn(fileDropDirective, 'onDragOver');
|
||||
|
||||
directiveElement.triggerEventHandler('dragover', getFakeEventData());
|
||||
|
||||
@@ -119,7 +121,7 @@ describe('Directive: FileDropDirective', () => {
|
||||
});
|
||||
|
||||
it('handles dragleave event', () => {
|
||||
spyOn(fileDropDirective, 'onDragLeave');
|
||||
jest.spyOn(fileDropDirective, 'onDragLeave');
|
||||
|
||||
directiveElement.triggerEventHandler('dragleave', getFakeEventData());
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ describe('Directive: FileSelectDirective', () => {
|
||||
const filters = fileSelectDirective.getFilters();
|
||||
|
||||
// TODO: Update test once implemented
|
||||
expect(filters).toEqual({});
|
||||
expect(filters).toEqual('');
|
||||
});
|
||||
|
||||
it('can check if element is empty', () => {
|
||||
@@ -82,18 +82,20 @@ describe('Directive: FileSelectDirective', () => {
|
||||
});
|
||||
|
||||
it('can listed on change event', () => {
|
||||
spyOn(fileSelectDirective, 'onChange');
|
||||
const change = jest.spyOn(fileSelectDirective, 'onChange');
|
||||
|
||||
directiveElement.triggerEventHandler('change', {});
|
||||
|
||||
expect(fileSelectDirective.onChange).toHaveBeenCalled();
|
||||
expect(change).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('handles change event', () => {
|
||||
spyOn(fileSelectDirective.uploader, 'addToQueue');
|
||||
|
||||
let addToQueue;
|
||||
if (fileSelectDirective.uploader?.addToQueue) {
|
||||
addToQueue = jest.spyOn(fileSelectDirective.uploader, 'addToQueue');
|
||||
}
|
||||
fileSelectDirective.onChange();
|
||||
|
||||
expect(fileSelectDirective.uploader.addToQueue).toHaveBeenCalledWith(directiveElement.nativeElement.files, fileSelectDirective.getOptions(), fileSelectDirective.getFilters());
|
||||
expect(addToQueue).toHaveBeenCalledWith(directiveElement.nativeElement.files, fileSelectDirective.getOptions(), fileSelectDirective.getFilters());
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1 +1 @@
|
||||
import 'jest-preset-angular';
|
||||
import 'jest-preset-angular/setup-jest';
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"target": "es2020"
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"strictInjectionParameters": true,
|
||||
@@ -25,4 +26,3 @@
|
||||
"fullTemplateTypeCheck": true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,15 @@
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"target": "es2015",
|
||||
"target": "es2020",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"inlineSources": true,
|
||||
"types": [],
|
||||
"lib": ["dom", "es2018"]
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2018"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"skipTemplateCodegen": true,
|
||||
@@ -18,6 +21,8 @@
|
||||
"**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"**/*.spec.ts"
|
||||
"**/*.spec.ts",
|
||||
"**/*.test.ts",
|
||||
"jest.config.ts"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.lib.json",
|
||||
"compilerOptions": {
|
||||
"declarationMap": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableIvy": false
|
||||
}
|
||||
"compilationMode": "partial"
|
||||
},
|
||||
"exclude": [
|
||||
"jest.config.ts"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,10 +3,18 @@
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"module": "commonjs",
|
||||
"types": ["jest", "node"]
|
||||
"types": [
|
||||
"jest",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"testing/test-setup.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
"**/*.d.ts"
|
||||
"**/*.test.ts",
|
||||
"**/*.d.ts",
|
||||
"jest.config.ts"
|
||||
]
|
||||
}
|
||||
|
||||
35
nx.json
35
nx.json
@@ -8,31 +8,32 @@
|
||||
".eslintrc.json": "*",
|
||||
"nx.json": "*"
|
||||
},
|
||||
"projects": {
|
||||
"ng2-file-upload": {
|
||||
"tags": [
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"ng2-file-upload-demo": {
|
||||
"tags": [],
|
||||
"implicitDependencies": [
|
||||
"ng2-file-upload"
|
||||
]
|
||||
|
||||
}
|
||||
},
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"runner": "@nrwl/workspace/tasks-runners/default",
|
||||
"runner": "nx/tasks-runners/default",
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"test",
|
||||
"e2e"
|
||||
]
|
||||
],
|
||||
"parallel": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"affected": {
|
||||
"defaultBase": "master"
|
||||
},
|
||||
"defaultProject": "ng2-file-upload-demo",
|
||||
"generators": {
|
||||
"@schematics/angular:component": {
|
||||
"prefix": "",
|
||||
"styleext": "css"
|
||||
},
|
||||
"@schematics/angular:directive": {
|
||||
"prefix": ""
|
||||
}
|
||||
},
|
||||
"$schema": "./node_modules/nx/schemas/nx-schema.json"
|
||||
}
|
||||
|
||||
29934
package-lock.json
generated
29934
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
91
package.json
91
package.json
@@ -1,23 +1,22 @@
|
||||
{
|
||||
"name": "ng2-file-upload-base",
|
||||
"version": "2.0.0-0",
|
||||
"version": "2.0.0-3",
|
||||
"private": true,
|
||||
"description": "Angular file upload directives",
|
||||
"scripts": {
|
||||
"ng": "nx",
|
||||
"start": "ng serve",
|
||||
"demo.build": "ng build",
|
||||
"demo.build-prod": "ng build --prod",
|
||||
"demo.build-prod": "ng build",
|
||||
"build": "nx run ng2-file-upload:build",
|
||||
"build-prod": "nx run ng2-file-upload:build:production",
|
||||
"build.watch": "nx run ng2-file-upload:build --watch",
|
||||
"test": "nx run-many --all --target=test",
|
||||
"build-prod": "nx run ng2-file-upload:build",
|
||||
"lint": "nx run-many --target=lint --all",
|
||||
"test": "nx run-many --target=test --all",
|
||||
"version": "nx run ng2-file-upload:version",
|
||||
"lint": "nx run-many --all --target=lint",
|
||||
"pretest": "run-s lint build",
|
||||
"test-coverage": "nx run-many --all --target=test --codeCoverage",
|
||||
"demo.gh-pages": "run-s build demo.build demo.deploy",
|
||||
"demo.deploy": "gh-pages -d dist/apps/ng2-file-upload",
|
||||
"demo.deploy": "gh-pages -d dist/apps/demo",
|
||||
"postinstall": "node ./decorate-angular-cli.js",
|
||||
"flow.github-release": "conventional-github-releaser -p angular"
|
||||
},
|
||||
@@ -40,62 +39,63 @@
|
||||
"homepage": "https://github.com/valor-software/ng2-file-upload#readme",
|
||||
"peerDependencies": {},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.1102.13",
|
||||
"@angular-devkit/build-ng-packagr": "^0.1002.0",
|
||||
"@angular/animations": "~11.2.14",
|
||||
"@angular/cli": "~11.2.14",
|
||||
"@angular/common": "~11.2.14",
|
||||
"@angular/compiler": "~11.2.14",
|
||||
"@angular/compiler-cli": "~11.2.14",
|
||||
"@angular/core": "~11.2.14",
|
||||
"@angular/forms": "~11.2.14",
|
||||
"@angular/platform-browser": "~11.2.14",
|
||||
"@angular/platform-browser-dynamic": "~11.2.14",
|
||||
"@angular-eslint/eslint-plugin": "4.3.0",
|
||||
"@angular-eslint/eslint-plugin-template": "4.3.0",
|
||||
"@angular-eslint/template-parser": "4.3.0",
|
||||
"@nrwl/angular": "11.2.12",
|
||||
"@nrwl/cli": "11.2.12",
|
||||
"@nrwl/node": "11.2.12",
|
||||
"@nrwl/eslint-plugin-nx": "11.2.12",
|
||||
"@nrwl/jest": "11.2.12",
|
||||
"@nrwl/linter": "11.2.12",
|
||||
"@angular-devkit/build-angular": "14.2.3",
|
||||
"@angular-eslint/eslint-plugin": "14.0.4",
|
||||
"@angular-eslint/eslint-plugin-template": "14.0.4",
|
||||
"@angular-eslint/template-parser": "14.0.4",
|
||||
"@angular/animations": "14.2.2",
|
||||
"@angular/cli": "~14.2.0",
|
||||
"@angular/common": "14.2.2",
|
||||
"@angular/compiler": "14.2.2",
|
||||
"@angular/compiler-cli": "14.2.2",
|
||||
"@angular/core": "14.2.2",
|
||||
"@angular/forms": "14.2.2",
|
||||
"@angular/platform-browser": "14.2.2",
|
||||
"@angular/platform-browser-dynamic": "14.2.2",
|
||||
"@nrwl/angular": "14.7.5",
|
||||
"@nrwl/cli": "14.7.5",
|
||||
"@nrwl/eslint-plugin-nx": "14.7.5",
|
||||
"@nrwl/jest": "14.7.5",
|
||||
"@nrwl/linter": "14.7.5",
|
||||
"@nrwl/node": "14.7.5",
|
||||
"@types/fs-extra": "9.0.7",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "^12.11.1",
|
||||
"@types/jest": "28.1.8",
|
||||
"@types/node": "18.7.1",
|
||||
"@types/webpack": "^5.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "~4.28.3",
|
||||
"@typescript-eslint/parser": "~4.28.3",
|
||||
"@typescript-eslint/eslint-plugin": "5.33.1",
|
||||
"@typescript-eslint/parser": "5.33.1",
|
||||
"bootstrap": "3.3.7",
|
||||
"classlist-polyfill": "1.2.0",
|
||||
"codecov": "3.8.2",
|
||||
"codelyzer": "^6.0.0",
|
||||
"conventional-changelog-cli": "2.1.1",
|
||||
"conventional-github-releaser": "3.1.5",
|
||||
"core-js": "^3.14.0",
|
||||
"eslint": "7.22.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint": "8.15.0",
|
||||
"eslint-config-prettier": "8.1.0",
|
||||
"fs-extra": "9.1.0",
|
||||
"gh-pages": "3.2.2",
|
||||
"google-code-prettify": "1.0.5",
|
||||
"html-loader": "^1.3.2",
|
||||
"jest": "26.6.3",
|
||||
"jest": "28.1.3",
|
||||
"jest-createspyobj": "2.0.0",
|
||||
"jest-preset-angular": "8.3.2",
|
||||
"jest-environment-jsdom": "28.1.1",
|
||||
"jest-preset-angular": "12.2.2",
|
||||
"markdown-loader": "^6.0.0",
|
||||
"ng-packagr": "^11.2.4",
|
||||
"ngx-bootstrap": "6.2.0",
|
||||
"ng-packagr": "14.2.1",
|
||||
"ngx-bootstrap": "8.0.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss": "^8.3.9",
|
||||
"postcss-import": "14.1.0",
|
||||
"postcss-preset-env": "7.5.0",
|
||||
"postcss-url": "10.1.3",
|
||||
"protractor": "~7.0.0",
|
||||
"raw-loader": "^4.0.2",
|
||||
"rxjs": "^6.6.0",
|
||||
"ts-helpers": "^1.1.2",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "^6.1.0",
|
||||
"tslint-config-valorsoft": "^2.2.1",
|
||||
"typescript": "4.1.5",
|
||||
"zone.js": "~0.11.3"
|
||||
"ts-jest": "28.0.8",
|
||||
"ts-node": "10.9.1",
|
||||
"typescript": "4.7.4",
|
||||
"zone.js": "0.11.5"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
@@ -120,7 +120,8 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@nrwl/workspace": "^12.8.0",
|
||||
"@nrwl/workspace": "14.7.5",
|
||||
"nx": "14.7.5",
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This file includes polyfills needed by Angular 2 and is loaded before
|
||||
// the app. You can add your own extra polyfills to this file.
|
||||
import 'ts-helpers';
|
||||
import 'zone.js/dist/zone';
|
||||
import 'zone.js';
|
||||
import 'classlist-polyfill';
|
||||
|
||||
12
tslint.json
12
tslint.json
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"extends": "tslint-config-valorsoft",
|
||||
"rulesDirectory": "./node_modules/codelyzer",
|
||||
"rules": {
|
||||
"no-forward-ref": false,
|
||||
"no-null-keyword": false,
|
||||
"only-arrow-functions": false,
|
||||
"no-access-missing-member": false,
|
||||
"directive-selector": false,
|
||||
"component-selector": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user