# ng-ecommerce-filter

> It's a very simple angular eCommerce filter which is returns selected value in array format

Latest version **0.0.1** (published 2022-05-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install ng-ecommerce-filter
pnpm add ng-ecommerce-filter
yarn add ng-ecommerce-filter
bun add ng-ecommerce-filter
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2022-05-02 |
| First published | 2022-05-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 92.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | KUNDAN KUMAR |
| Maintainers | onlykundan |
| Keywords | angular filter, angular ecommerce filter, angular filters, ng ecommerce filter, ng filter, angular checkbox, angular checkbox drop list, angular drop checkbox, angular search bar |

## Links

- npm: https://www.npmjs.com/package/ng-ecommerce-filter
- npm.io page: https://npm.io/package/ng-ecommerce-filter

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.3.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2022-05-02

## README

# Angular Ecommerce Filter
## _Developed By [ Kundan Kumar](https://shorturl.at/frALR)_

[![N|Solid](https://raw.githubusercontent.com/kundan24/ng-ecommerce-filter/master/screenshot-localhost_4200-2022.05.02-16_24_21.png)](https://nodesource.com/products/nsolid)
[![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger)
# About
Whenever u will use this package it will return a checked item array in response() function you may write your business logic

## Installation



```sh
ng add @angular/material #import in your app module or nearest module
npm i ng-ecommerce-filter
```

```sh
#app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgEcommerceFilterModule } from 'ng-ecommerce-filter';
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    NgEcommerceFilterModule,
    BrowserAnimationsModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```
```sh
#app.component.html
<lib-ng-ecommerce-filter 
[FilterName]="'Color Filter'"
[ShowColorDots]="true" 
[ShowStars]="false"
[FilterWidth]="'30vw'"
[FilterHeight]="'100px'"
[isOpen]="true"
[ShowSelected]="true"
[ShowClearFilter]="true"
[ShowSerachBar]="true"
[contentSort]="'asc'"
[ObjectArr]="[
{'title':'Orange','value':'orange','color_code':'#fcba03'},
{'title':'Green','value':'green','color_code':'#4a944e'},
{'title':'Pink','value':'pink','color_code':'#911062'},
]" (response)="myreponse($event)"></lib-ng-ecommerce-filter>

<!--
leave as empty color_code field if u 
don't wan't color filter like this 
{'title':'Medimix','value':'medimix','color_code':''},

-->
```

```sh
#app.component.ts
import { Component } from '@angular/core';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  title = 'mypro';
  myreponse(e:any){
  console.log(e)
  }
}
```

## About Params
| Params | Usage |
| ------ | ------ |
| [FilterName] | write your desire filter name like Color,Pattern,Price etc |
| [ShowColorDots] | true means you want show color indicator for color filter |
| [ShowStars] | true means you want show star icon for a rating filter |
| [FilterWidth] | Always give width in vw 30vw == (30% of entire width) |
| [FilterHeight] | Filter Height in px of vh |
| [isOpen] | true means whenever component load filter will open  |
| [ShowSelected] | true means it will show how many item u checked  |
| [ShowSerachBar] | true means it will show input search bar  |
| [contentSort] | asc,des,no for array sorting |
| [ObjectArr] | Array format for color filter like this [{'title':'Red','value':'Red','color_code':'#4a944e'}]
|
| [ObjectArr] | Array format for non color filter like this [{'title':'Red','value':'Red','color_code':''}] please leave 'color_code' field blank
|




## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)

---
_Source: https://npm.io/package/ng-ecommerce-filter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
