ng2-select
Advanced tools
Comparing version 0.0.1 to 0.42.0
{ | ||
"name": "ng2-select", | ||
"version": "0.0.1", | ||
"description": "Angular2 based replacement for select boxes", | ||
"main": "index.js", | ||
"version": "0.42.0", | ||
"description": "angular2 select component", | ||
"scripts": { | ||
"test": "npm test" | ||
"deploy": "NODE_ENV=production webpack -p --progress --color --optimize-minimize --optimize-dedupe --optimize-occurence-order", | ||
"prepublish": "gulp clean && tsc && mkdir -p dist/css && cp components/css/ng2-select.css dist/css", | ||
"prestart": "npm install", | ||
"server": "webpack-dev-server --hot --inline --colors --display-error-details --display-cached", | ||
"start": "npm run server", | ||
"test": "gulp lint" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/valor-software/ng2-select.git" | ||
}, | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"components" | ||
], | ||
"keywords": [ | ||
"angular2", | ||
"ng2", | ||
"select", | ||
"angular2-select", | ||
"ng2-select" | ||
"bootstrap", | ||
"angularjs", | ||
"twitter-bootstrap" | ||
], | ||
"author": "Dmitriy Shekhovtsov <valorkin@gmail.com>", | ||
"author": "Vyacheslav Chub <vyacheslav.chub@valor-software.com>", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/valor-software/ng2-select.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/valor-software/ng2-select/issues" | ||
}, | ||
"homepage": "https://github.com/valor-software/ng2-select#readme" | ||
"homepage": "https://github.com/valor-software/ng2-select#readme", | ||
"dependencies": { | ||
"angular2": "2.0.0-alpha.42", | ||
"ng2-bootstrap": "0.42.0", | ||
"reflect-metadata": "0.1.2", | ||
"ts-loader": "0.5.6", | ||
"zone.js": "0.5.8" | ||
}, | ||
"devDependencies": { | ||
"bootstrap": "3.3.5", | ||
"clean-webpack-plugin": "0.1.3", | ||
"compression-webpack-plugin": "0.2.0", | ||
"eslint": "1.6.0", | ||
"exports-loader": "0.6.2", | ||
"file-loader": "0.8.4", | ||
"gulp": "3.9.0", | ||
"gulp-clean": "0.3.1", | ||
"gulp-eslint": "1.0.0", | ||
"gulp-size": "2.0.0", | ||
"gulp-tsc": "1.1.1", | ||
"gulp-tslint": "3.3.1", | ||
"html-loader": "0.3.0", | ||
"markdown-loader": "0.1.7", | ||
"marked": "0.3.5", | ||
"moment": "2.10.6", | ||
"pre-commit": "1.1.1", | ||
"prismjs": "valorkin/prism", | ||
"prismjs-loader": "0.0.2", | ||
"raw-loader": "0.5.1", | ||
"require-dir": "0.3.0", | ||
"transfer-webpack-plugin": "0.1.4", | ||
"typescript": "1.6.2", | ||
"webpack": "1.12.2", | ||
"webpack-dev-server": "1.12.0" | ||
} | ||
} |
# ng2-select | ||
Angular2 based replacement for select boxes | ||
## Placeholder for `ng2-select` angular2 module | ||
Native Select Angular2 component | ||
Please read central `ng2` modules [readme](https://github.com/valor-software/ng2-plans) for details, plans and approach | ||
## Quick start | ||
1. A recommended way to install ***ng2-select*** is through [npm](https://www.npmjs.com/search?q=ng2-select) package manager using the following command: | ||
`npm i ng2-select --save` | ||
Alternatively, you can [download it in a ZIP file](https://github.com/valor-software/ng2-select/archive/master.zip). | ||
2. Include `ng2-select.css` in your project | ||
3. More information regarding of using ***ng2-select*** is located in | ||
[demo](http://valor-software.github.io/ng2-select/) and [demo sources](https://github.com/valor-software/ng2-select/tree/master/demo). | ||
## API | ||
### Properties | ||
- `items` - (`Array<any>`) - Array of items from which to select. Should be an array of objects with `id` and `text` properties. | ||
As convenience, you may also pass an array of strings, in which case the same string is used for both the ID and the text. | ||
Items may be nested by adding a `children` property to any item, whose value should be another array of items. Items that have children may omit having an ID. | ||
If `items` are specified, all items are expected to be available locally and all selection operations operate on this local array only. | ||
If omitted, items are not available locally, and the `query` option should be provided to fetch data. | ||
- `data` (`?Array<any>`) - Initial selection data to set. This should be an object with `id` and `text` properties in the case of input type 'Single', | ||
or an array of such objects otherwise. This option is mutually exclusive with value. | ||
- `allowClear` (`?boolean=false`) (*not yet supported*) - Set to `true` to allow the selection to be cleared. This option only applies to single-value inputs. | ||
- `placeholder` (`?string=''`) - Placeholder text to display when the element has no focus and selected items. | ||
- `disabled` (`?boolean=false`) - When `true`, it specifies that the component should be disabled. | ||
- `multiple` - (`?boolean=false`) - Mode of this component. If set `true` user can select more than one option. | ||
This option only applies to single-value inputs, as multiple-value inputs don't have the search input in the dropdown to begin with. | ||
### Events | ||
- `data` - it fires during all events of this component; returns `Array<any>` - current selected data | ||
- `selected` - it fires after a new option selected; returns object with `id` and `text` properties that describes a new option. | ||
- `removed` - it fires after an option removed; returns object with `id` and `text` properties that describes a removed option. | ||
- `typed` - it fires after changing of search input; returns `string` with that value. | ||
# Troubleshooting | ||
Please follow this guidelines when reporting bugs and feature requests: | ||
1. Use [GitHub Issues](https://github.com/valor-software/ng2-select/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-select/blob/master/LICENSE) file for the full text) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
97969
30
1762
54
5
25
3
+ Addedangular2@2.0.0-alpha.42
+ Addedng2-bootstrap@0.42.0
+ Addedreflect-metadata@0.1.2
+ Addedts-loader@0.5.6
+ Addedzone.js@0.5.8
+ Added@reactivex/rxjs@0.0.0-prealpha.3(transitive)
+ Addedangular2@2.0.0-alpha.42(transitive)
+ Addedarrify@1.0.1(transitive)
+ Addedbig.js@3.2.0(transitive)
+ Addedcolors@1.4.0(transitive)
+ Addedemojis-list@2.1.0(transitive)
+ Addedenhanced-resolve@0.9.1(transitive)
+ Addedes6-promise@3.3.1(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedjson5@0.5.1(transitive)
+ Addedloader-utils@0.2.17(transitive)
+ Addedmemory-fs@0.2.0(transitive)
+ Addedng2-bootstrap@0.42.0(transitive)
+ Addedobject-assign@2.1.14.1.1(transitive)
+ Addedreflect-metadata@0.1.10.1.2(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedtapable@0.1.10(transitive)
+ Addedts-loader@0.5.6(transitive)
+ Addedzone.js@0.5.8(transitive)