@enigmatry/entry-components 1.2.64 → 1.2.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/search-filter/README.md +59 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enigmatry/entry-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.66",
|
|
4
4
|
"author": "Enigmatry",
|
|
5
5
|
"description": "Enigmatry entry angular material components",
|
|
6
6
|
"homepage": "https://github.com/enigmatry/entry-angular-building-blocks/tree/master/projects/entry-components#readme",
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Entry Search Filter
|
|
2
|
+
|
|
3
|
+
Entry component for providing standard filtering capabilities that can be consumed by entry-table component, but also any other list data represetation component like Angular material table component.
|
|
4
|
+
|
|
5
|
+
## Imports
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { EntrySearchFilterModule } from '@enigmatry/entry-components/search-filter';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic usage
|
|
12
|
+
|
|
13
|
+
`entry-search-filter` is used to provide simple configuration and usage of data filtering:
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<entry-search-filter
|
|
17
|
+
[searchFilters]="query.filters"
|
|
18
|
+
(searchFilterChange)="searchFilterChange($event)">
|
|
19
|
+
</entry-search-filter>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Configuration
|
|
23
|
+
|
|
24
|
+
`ENTRY_SEARCH_FILTER_CONFIG`: `InjectionToken<EntrySearchFilterConfig>` - Optional configuration used to override defaults.
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import {
|
|
28
|
+
EntrySearchFilterModule,
|
|
29
|
+
ENTRY_SEARCH_FILTER_CONFIG,
|
|
30
|
+
EntrySearchFilterConfig
|
|
31
|
+
} from '@enigmatry/entry-components/search-filter';
|
|
32
|
+
// ...
|
|
33
|
+
|
|
34
|
+
@NgModule({
|
|
35
|
+
imports: [
|
|
36
|
+
EntrySearchFilterModule
|
|
37
|
+
],
|
|
38
|
+
providers: [
|
|
39
|
+
{
|
|
40
|
+
provide: ENTRY_SEARCH_FILTER_CONFIG,
|
|
41
|
+
useFactory: () => new EntrySearchFilterConfig({
|
|
42
|
+
applyButtonText: 'Filter'
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
export class AppModule { }
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Classes and Interfaces
|
|
51
|
+
|
|
52
|
+
| `EntrySearchFilterComponent` | |
|
|
53
|
+
| - | - |
|
|
54
|
+
| @Input() searchFilters: `SearchFilterBase<string>[]` | Accepts the configuration of the search filters inputs that will be displayed in the search-filter component. |
|
|
55
|
+
| @Output() searchFilterChange: `EventEmitter<SearchFilterParams>` | Emits the change in SearchFilterParams so the containing component can apply them and retreive the filtered results. SearchFilterParams are the same type as @angular/router type Params for easy integration. |
|
|
56
|
+
|
|
57
|
+
| `EntryDialogConfig` | |
|
|
58
|
+
| - | - |
|
|
59
|
+
| applyButtonText: `string` | Apply filters button text (default: 'Apply') |
|