|
| 1 | +# ngx-selecto |
1 | 2 |
|
2 |
| -<p align="middle" ><img src="https://daybrush.com/selecto/images/logo.png" /></p> |
3 |
| -<h2 align="middle">Angular Selecto</h2> |
4 |
| -<p align="middle"> |
5 |
| -<a href="https://www.npmjs.com/package/ngx-selecto" target="_blank"><img src="https://img.shields.io/npm/v/ngx-selecto.svg?style=flat-square&color=007acc&label=version" alt="npm version" /></a> |
6 |
| -<img src="https://img.shields.io/badge/language-typescript-blue.svg?style=flat-square"/> |
7 |
| -<a href="https://github.com/daybrush/selecto/blob/master/LICENSE" target="_blank"><img src="https://img.shields.io/github/license/daybrush/selecto.svg?style=flat-square&label=license&color=08CE5D"/></a> |
8 |
| -<a href="https://github.com/daybrush/selecto/tree/master/packages/react-selecto" target="_blank"><img alt="React" src="https://img.shields.io/static/v1.svg?label=&message=React&style=flat-square&color=61daeb"></a> |
9 |
| -<a href="https://github.com/daybrush/selecto/tree/master/packages/preact-selecto" target="_blank"><img alt="Preact" src="https://img.shields.io/static/v1.svg?label=&message=Preact&style=flat-square&color=673ab8"></a> |
10 |
| -<a href="https://github.com/daybrush/selecto/tree/master/packages/ngx-selecto" target="_blank"><img alt="Angular" src="https://img.shields.io/static/v1.svg?label=&message=Angular&style=flat-square&color=C82B38"></a> |
11 |
| -<a href="https://github.com/daybrush/selecto/tree/master/packages/vue-selecto" target="_blank"><img |
12 |
| - alt="Vue" |
13 |
| - src="https://img.shields.io/static/v1.svg?label=&message=Vue&style=flat-square&color=3fb984"></a> |
14 |
| -<a href="https://github.com/daybrush/selecto/tree/master/packages/svelte-selecto" target="_blank"><img |
15 |
| - alt="Svelte" |
16 |
| - src="https://img.shields.io/static/v1.svg?label=&message=Svelte&style=flat-square&color=C82B38"></a> |
17 |
| -<a href="https://github.com/daybrush/selecto/tree/master/packages/lit-selecto" target="_blank"><img |
18 |
| - alt="Lit" |
19 |
| - src="https://img.shields.io/static/v1.svg?label=&message=Lit&style=flat-square&color=4E8EE0"></a> |
20 |
| -</p> |
21 |
| -<p align="middle">Angular Selecto is an Angular Component that allows you to select elements in the drag area using the mouse or touch.</p> |
22 |
| - |
23 |
| -<p align="middle"> |
24 |
| - <a href="https://daybrush.com/selecto" target="_blank"><strong>Demo</strong></a> / |
25 |
| - <a href="https://daybrush.com/selecto/release/latest/doc/" target="_blank"><strong>API</strong></a> / |
26 |
| - <a href="https://github.com/daybrush/scena" target="_blank"><strong>Main Project</strong></a> |
27 |
| -</p> |
28 |
| - |
29 |
| -## ⚙️ Installation |
30 |
| -### npm |
31 |
| -```bash |
32 |
| -$ npm install ngx-selecto |
33 |
| -``` |
34 |
| - |
35 |
| -## 🚀 How to use |
36 |
| -```js |
37 |
| -import { BrowserModule } from '@angular/platform-browser'; |
38 |
| -import { NgModule } from '@angular/core'; |
39 |
| -import { AppComponent } from './app.component'; |
40 |
| -import { NgxSelectoComponent, NgxSelectoModule } from "ngx-selecto"; |
41 |
| - |
42 |
| -@NgModule({ |
43 |
| - declarations: [ |
44 |
| - AppComponent, |
45 |
| - NgxSelectoComponent, |
46 |
| - ], |
47 |
| - imports: [ |
48 |
| - BrowserModule, |
49 |
| - // NgxSelectoModule, |
50 |
| - ], |
51 |
| - providers: [], |
52 |
| - bootstrap: [AppComponent] |
53 |
| -}) |
54 |
| -export class AppModule { } |
55 |
| -``` |
56 |
| -### Template |
57 |
| -```html |
58 |
| -<ngx-selecto |
59 |
| - [container]="document.body" |
60 |
| - dragContainer=".elements" |
61 |
| - [selectableTargets]='[".target", document.querySelector(".target2")]' |
62 |
| - [selectByClick]="true" |
63 |
| - [selectFromInside]="true" |
64 |
| - [continueSelect]="false" |
65 |
| - [toggleContinueSelect]="'shift'" |
66 |
| - [keyContainer]="window" |
67 |
| - [hitRate]="100" |
68 |
| - (dragStart)="onDragStart($event)" |
69 |
| - (selectStart)="onSelectStart($event)" |
70 |
| - (select)="onSelect($event)" |
71 |
| - (selectEnd)="onSelectEnd($event)" |
72 |
| -></ngx-selecto> |
73 |
| -``` |
74 |
| - |
75 |
| -## ⚙️ Developments |
76 |
| -### `ng serve` |
77 |
| - |
78 |
| -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. |
79 |
| - |
80 |
| -## ⭐️ Show Your Support |
81 |
| -Please give a ⭐️ if this project helped you! |
82 |
| - |
83 |
| - |
84 |
| -## 👏 Contributing |
85 |
| - |
86 |
| -If you have any questions or requests or want to contribute to `selecto` or other packages, please write the [issue](https://github.com/daybrush/selecto/issues) or give me a Pull Request freely. |
87 |
| - |
88 |
| -## 🐞 Bug Report |
89 |
| - |
90 |
| -If you find a bug, please report to us opening a new [Issue](https://github.com/daybrush/selecto/issues) on GitHub. |
91 |
| - |
92 |
| - |
93 |
| -## 📝 License |
94 |
| - |
95 |
| -This project is [MIT](https://github.com/daybrush/selecto/blob/master/LICENSE) licensed. |
96 |
| - |
97 |
| -``` |
98 |
| -MIT License |
99 |
| -
|
100 |
| -Copyright (c) 2020 Daybrush |
101 |
| -
|
102 |
| -Permission is hereby granted, free of charge, to any person obtaining a copy |
103 |
| -of this software and associated documentation files (the "Software"), to deal |
104 |
| -in the Software without restriction, including without limitation the rights |
105 |
| -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
106 |
| -copies of the Software, and to permit persons to whom the Software is |
107 |
| -furnished to do so, subject to the following conditions: |
108 |
| -
|
109 |
| -The above copyright notice and this permission notice shall be included in all |
110 |
| -copies or substantial portions of the Software. |
111 |
| -
|
112 |
| -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
113 |
| -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
114 |
| -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
115 |
| -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
116 |
| -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
117 |
| -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
118 |
| -SOFTWARE. |
119 |
| -``` |
120 |
| - |
| 3 | +See [readme](./projects/ngx-selecto/README.md) for more info. |
0 commit comments