@recursyve/nice-data-filter-kit 14.2.2 → 14.3.0
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/esm2020/lib/components/base-list/store/base-list.service.mjs +1 -1
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/advanced-filters-trigger.directive.mjs +83 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.component.mjs +67 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.constant.mjs +3 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.form.mjs +127 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.module.mjs +143 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/button/advanced-filters-button.component.mjs +42 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/filter-selection/filter-selection.component.mjs +49 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/models/icons.model.mjs +21 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/public-api.mjs +6 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/date/date-filter.component.mjs +40 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/filter.component.mjs +29 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/number/number-filter.component.mjs +28 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/radio/radio-filter.component.mjs +30 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/select/select-filter.component.mjs +87 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/text/text-filter.component.mjs +31 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/rule.component.mjs +71 -0
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/utils/advanced-filters.utils.mjs +83 -0
- package/esm2020/lib/components/nice-filter-view/directives/mat-sort.mjs +4 -1
- package/esm2020/lib/components/nice-filter-view/pipes/filter-group-icon.pipe.mjs +32 -0
- package/esm2020/lib/components/nice-filter-view/public-api.mjs +2 -1
- package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.query.mjs +7 -1
- package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.service.mjs +11 -1
- package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.store.mjs +5 -1
- package/esm2020/lib/components/query-builder/pipes/filter-group-icon.pipe.mjs +9 -4
- package/esm2020/lib/directive/selectable-list/selectable-list-checkbox.directive.mjs +8 -2
- package/esm2020/lib/directive/selectable-list/store/selectable-list.service.mjs +1 -1
- package/fesm2015/recursyve-nice-data-filter-kit.mjs +1007 -171
- package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/fesm2020/recursyve-nice-data-filter-kit.mjs +994 -161
- package/fesm2020/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/lib/components/base-list/store/base-list.service.d.ts +1 -1
- package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters-trigger.directive.d.ts +27 -0
- package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.component.d.ts +27 -0
- package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.constant.d.ts +2 -0
- package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.form.d.ts +20 -0
- package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.module.d.ts +41 -0
- package/lib/components/nice-filter-view/components/advanced-filters/button/advanced-filters-button.component.d.ts +17 -0
- package/lib/components/nice-filter-view/components/advanced-filters/filter-selection/filter-selection.component.d.ts +16 -0
- package/lib/components/nice-filter-view/components/advanced-filters/models/icons.model.d.ts +10 -0
- package/lib/components/nice-filter-view/components/advanced-filters/public-api.d.ts +5 -0
- package/lib/components/nice-filter-view/components/advanced-filters/rule/components/date/date-filter.component.d.ts +9 -0
- package/lib/components/nice-filter-view/components/advanced-filters/rule/components/filter.component.d.ts +13 -0
- package/lib/components/nice-filter-view/components/advanced-filters/rule/components/number/number-filter.component.d.ts +6 -0
- package/lib/components/nice-filter-view/components/advanced-filters/rule/components/radio/radio-filter.component.d.ts +8 -0
- package/lib/components/nice-filter-view/components/advanced-filters/rule/components/select/select-filter.component.d.ts +22 -0
- package/lib/components/nice-filter-view/components/advanced-filters/rule/components/text/text-filter.component.d.ts +8 -0
- package/lib/components/nice-filter-view/components/advanced-filters/rule/rule.component.d.ts +26 -0
- package/lib/components/nice-filter-view/components/advanced-filters/utils/advanced-filters.utils.d.ts +11 -0
- package/lib/components/nice-filter-view/pipes/filter-group-icon.pipe.d.ts +11 -0
- package/lib/components/nice-filter-view/public-api.d.ts +1 -0
- package/lib/components/nice-filter-view/store/nice-filter-view.query.d.ts +2 -0
- package/lib/components/nice-filter-view/store/nice-filter-view.service.d.ts +1 -0
- package/lib/components/nice-filter-view/store/nice-filter-view.store.d.ts +1 -0
- package/lib/components/query-builder/pipes/filter-group-icon.pipe.d.ts +3 -3
- package/lib/directive/selectable-list/selectable-list-checkbox.directive.d.ts +4 -2
- package/lib/directive/selectable-list/store/selectable-list.service.d.ts +2 -2
- package/package.json +1 -1
- package/src/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.theme.scss +25 -0
- package/src/lib/components/nice-filter-view/components/advanced-filters/filter-selection/filter-selection.theme.scss +29 -0
- package/src/lib/components/nice-filter-view/components/advanced-filters/rule/rule.theme.scss +96 -0
- package/src/lib/nice-data-filter.theme.scss +2 -0
|
@@ -17,7 +17,7 @@ export declare class NiceBaseListService<Filter extends NiceFilterService<any> =
|
|
|
17
17
|
protected appRef: ApplicationRef;
|
|
18
18
|
queryParamsLoaded$: Subject<unknown>;
|
|
19
19
|
protected downloadFileName: string;
|
|
20
|
-
protected unsubscribeAll$: Subject<
|
|
20
|
+
protected unsubscribeAll$: Subject<void>;
|
|
21
21
|
protected loadingData: boolean;
|
|
22
22
|
constructor(store: NiceBaseListStore, filterService: Filter, disableQueryParams: boolean, activatedRoute: ActivatedRoute, router: Router, appRef: ApplicationRef);
|
|
23
23
|
get filter(): Filter;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Overlay, OverlayPositionBuilder } from "@angular/cdk/overlay";
|
|
2
|
+
import { Platform } from "@angular/cdk/platform";
|
|
3
|
+
import { ElementRef, EventEmitter, Injector } from "@angular/core";
|
|
4
|
+
import { FilterConfigurationModel } from "../../../../models/filter.model";
|
|
5
|
+
import { NiceFilterViewQuery } from "../../store/nice-filter-view.query";
|
|
6
|
+
import { NiceFilterViewService } from "../../store/nice-filter-view.service";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class AdvancedFiltersTriggerDirective {
|
|
9
|
+
private query;
|
|
10
|
+
private service;
|
|
11
|
+
private overlayPositionBuilder;
|
|
12
|
+
private elementRef;
|
|
13
|
+
private overlay;
|
|
14
|
+
private platform;
|
|
15
|
+
private injector;
|
|
16
|
+
private overlayRef;
|
|
17
|
+
private filterSelectionRef;
|
|
18
|
+
position: "topRight" | "bottomCenter";
|
|
19
|
+
advancedFilterSelected: EventEmitter<FilterConfigurationModel>;
|
|
20
|
+
private get connectedPosition();
|
|
21
|
+
constructor(query: NiceFilterViewQuery, service: NiceFilterViewService, overlayPositionBuilder: OverlayPositionBuilder, elementRef: ElementRef, overlay: Overlay, platform: Platform, injector: Injector);
|
|
22
|
+
click(): void;
|
|
23
|
+
private close;
|
|
24
|
+
private updateFilterSelectionComponent;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AdvancedFiltersTriggerDirective, never>;
|
|
26
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AdvancedFiltersTriggerDirective, "[niceAdvancedFiltersTrigger]", ["niceAdvancedFiltersTrigger"], { "position": "position"; }, { "advancedFilterSelected": "advancedFilterSelected"; }, never, never, false>;
|
|
27
|
+
}
|
package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.component.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnInit } from "@angular/core";
|
|
2
|
+
import { GeneratedFormArray, GeneratedFormGroup } from "@recursyve/ngx-form-generator";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import { FilterConfigurationModel } from "../../../../models/filter.model";
|
|
5
|
+
import { NiceFilterViewQuery } from "../../store/nice-filter-view.query";
|
|
6
|
+
import { NiceFilterViewService } from "../../store/nice-filter-view.service";
|
|
7
|
+
import { AdvancedFiltersForm, FilterForm } from "./advanced-filters.form";
|
|
8
|
+
import { NiceAdvancedFilterIconOptions } from "./models/icons.model";
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class NiceAdvancedFiltersComponent implements OnInit {
|
|
11
|
+
icons: NiceAdvancedFilterIconOptions;
|
|
12
|
+
formGroup: GeneratedFormGroup<AdvancedFiltersForm>;
|
|
13
|
+
private query;
|
|
14
|
+
private service;
|
|
15
|
+
private changeDetectorRef;
|
|
16
|
+
config$: Observable<FilterConfigurationModel[]>;
|
|
17
|
+
rules$: Observable<FilterForm[]>;
|
|
18
|
+
rulesFormArray: GeneratedFormArray<FilterForm>;
|
|
19
|
+
constructor(icons: NiceAdvancedFilterIconOptions, formGroup: GeneratedFormGroup<AdvancedFiltersForm>, query: NiceFilterViewQuery, service: NiceFilterViewService, changeDetectorRef: ChangeDetectorRef);
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
onClickAddRule(filterConfigurationModel: FilterConfigurationModel): void;
|
|
22
|
+
onClickDeleteRule(index: number): void;
|
|
23
|
+
onClose(): void;
|
|
24
|
+
onRefresh(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceAdvancedFiltersComponent, [{ optional: true; }, null, null, null, null]>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceAdvancedFiltersComponent, "nice-advanced-filters", never, {}, {}, never, never, false>;
|
|
27
|
+
}
|
package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.form.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Condition, QueryModel, QueryRuleModel } from "../../../../models/query.model";
|
|
2
|
+
export declare class FilterFormValues {
|
|
3
|
+
value: any;
|
|
4
|
+
secondValue: any;
|
|
5
|
+
}
|
|
6
|
+
export declare class FilterForm {
|
|
7
|
+
id: string;
|
|
8
|
+
operation: string;
|
|
9
|
+
needsTwoValues: boolean;
|
|
10
|
+
condition: Condition;
|
|
11
|
+
values: FilterFormValues[];
|
|
12
|
+
constructor(value: QueryModel | QueryRuleModel);
|
|
13
|
+
transform(): QueryModel | QueryRuleModel;
|
|
14
|
+
}
|
|
15
|
+
export declare class AdvancedFiltersForm {
|
|
16
|
+
rules: FilterForm[];
|
|
17
|
+
condition: Condition;
|
|
18
|
+
constructor(query: QueryModel);
|
|
19
|
+
transform(): QueryModel;
|
|
20
|
+
}
|
package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.module.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ModuleWithProviders, Type } from "@angular/core";
|
|
2
|
+
import { NiceFilterGroupService } from "../../../query-builder/providers/filter-group.service";
|
|
3
|
+
import { NiceAdvancedFilterIconOptions } from "./models/icons.model";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "./advanced-filters.component";
|
|
6
|
+
import * as i2 from "./button/advanced-filters-button.component";
|
|
7
|
+
import * as i3 from "./filter-selection/filter-selection.component";
|
|
8
|
+
import * as i4 from "./rule/rule.component";
|
|
9
|
+
import * as i5 from "./rule/components/date/date-filter.component";
|
|
10
|
+
import * as i6 from "./rule/components/number/number-filter.component";
|
|
11
|
+
import * as i7 from "./rule/components/radio/radio-filter.component";
|
|
12
|
+
import * as i8 from "./rule/components/select/select-filter.component";
|
|
13
|
+
import * as i9 from "./rule/components/text/text-filter.component";
|
|
14
|
+
import * as i10 from "./advanced-filters-trigger.directive";
|
|
15
|
+
import * as i11 from "../../pipes/filter-group-icon.pipe";
|
|
16
|
+
import * as i12 from "@angular/common";
|
|
17
|
+
import * as i13 from "@angular/forms";
|
|
18
|
+
import * as i14 from "@angular/material/radio";
|
|
19
|
+
import * as i15 from "@angular/material/card";
|
|
20
|
+
import * as i16 from "@angular/material/list";
|
|
21
|
+
import * as i17 from "@recursyve/nice-ui-kit.v2";
|
|
22
|
+
import * as i18 from "@angular/material/icon";
|
|
23
|
+
import * as i19 from "@angular/material/core";
|
|
24
|
+
import * as i20 from "@angular/material/button";
|
|
25
|
+
import * as i21 from "@angular/material/form-field";
|
|
26
|
+
import * as i22 from "@angular/material/select";
|
|
27
|
+
import * as i23 from "@angular/material/input";
|
|
28
|
+
import * as i24 from "@angular/material/button-toggle";
|
|
29
|
+
import * as i25 from "@ngx-translate/core";
|
|
30
|
+
import * as i26 from "@angular/material/datepicker";
|
|
31
|
+
import * as i27 from "ngx-mask";
|
|
32
|
+
export interface NiceAdvancedFiltersOptions {
|
|
33
|
+
icons?: NiceAdvancedFilterIconOptions;
|
|
34
|
+
filterGroupService?: Type<NiceFilterGroupService<any>>;
|
|
35
|
+
}
|
|
36
|
+
export declare class NiceAdvancedFiltersModule {
|
|
37
|
+
static forRoot(options?: NiceAdvancedFiltersOptions): ModuleWithProviders<NiceAdvancedFiltersModule>;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceAdvancedFiltersModule, never>;
|
|
39
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NiceAdvancedFiltersModule, [typeof i1.NiceAdvancedFiltersComponent, typeof i2.NiceAdvancedFiltersButtonComponent, typeof i3.NiceAdvancedFilterSelectionComponent, typeof i4.NiceAdvancedRuleComponent, typeof i5.NiceAdvancedDateFilterComponent, typeof i6.NiceAdvancedNumberFilterComponent, typeof i7.NiceAdvancedRadioFilterComponent, typeof i8.NiceAdvancedSelectFilterComponent, typeof i9.NiceAdvancedTextFilterComponent, typeof i10.AdvancedFiltersTriggerDirective, typeof i11.NiceFilterGroupIconPipe], [typeof i12.CommonModule, typeof i13.ReactiveFormsModule, typeof i14.MatRadioModule, typeof i15.MatCardModule, typeof i16.MatListModule, typeof i17.NiceLoadingSpinnerModule, typeof i18.MatIconModule, typeof i19.MatRippleModule, typeof i20.MatButtonModule, typeof i21.MatFormFieldModule, typeof i19.MatOptionModule, typeof i22.MatSelectModule, typeof i13.FormsModule, typeof i23.MatInputModule, typeof i24.MatButtonToggleModule, typeof i25.TranslateModule, typeof i26.MatDatepickerModule, typeof i17.NiceTypeaheadModule, typeof i27.NgxMaskModule], [typeof i1.NiceAdvancedFiltersComponent, typeof i2.NiceAdvancedFiltersButtonComponent, typeof i10.AdvancedFiltersTriggerDirective]>;
|
|
40
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NiceAdvancedFiltersModule>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FilterConfigurationModel } from "../../../../../models/filter.model";
|
|
2
|
+
import { NiceBaseIconOptions } from "../../../../base-list/models/icons.model";
|
|
3
|
+
import { NiceFilterViewQuery } from "../../../store/nice-filter-view.query";
|
|
4
|
+
import { NiceFilterViewService } from "../../../store/nice-filter-view.service";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NiceAdvancedFiltersButtonComponent {
|
|
7
|
+
icons: NiceBaseIconOptions;
|
|
8
|
+
private query;
|
|
9
|
+
private service;
|
|
10
|
+
shouldShowAdvancedFilters$: import("rxjs").Observable<boolean>;
|
|
11
|
+
hasParameters$: import("rxjs").Observable<boolean>;
|
|
12
|
+
constructor(icons: NiceBaseIconOptions, query: NiceFilterViewQuery, service: NiceFilterViewService);
|
|
13
|
+
clickToggleShowAdvancedFilters(): void;
|
|
14
|
+
onSelectedFilter(filter: FilterConfigurationModel): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceAdvancedFiltersButtonComponent, [{ optional: true; }, null, null]>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceAdvancedFiltersButtonComponent, "nice-advanced-filters-button", never, {}, {}, never, never, false>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import { FilterConfigurationModel, FilterGroupConfiguration } from "../../../../../models/filter.model";
|
|
3
|
+
import { NiceFilterViewQuery } from "../../../store/nice-filter-view.query";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NiceAdvancedFilterSelectionComponent {
|
|
6
|
+
private query;
|
|
7
|
+
filterSelected: EventEmitter<FilterConfigurationModel>;
|
|
8
|
+
loading$: import("rxjs").Observable<boolean>;
|
|
9
|
+
filterGroups$: import("rxjs").Observable<[FilterGroupConfiguration, FilterConfigurationModel[]][]>;
|
|
10
|
+
constructor(query: NiceFilterViewQuery);
|
|
11
|
+
selectFilter(filterConfigurationModel: FilterConfigurationModel): void;
|
|
12
|
+
trackGroups(index: number, value: [FilterGroupConfiguration, FilterConfigurationModel[]]): any;
|
|
13
|
+
trackFilter(index: number, value: FilterConfigurationModel): any;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceAdvancedFilterSelectionComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceAdvancedFilterSelectionComponent, "nice-advanced-filter-selection", never, {}, { "filterSelected": "filterSelected"; }, never, never, false>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NiceBaseListIcons } from "../../../../base-list/models/icons.model";
|
|
2
|
+
export interface NiceAdvancedFilterIconOptions {
|
|
3
|
+
add?: NiceBaseListIcons;
|
|
4
|
+
close?: NiceBaseListIcons;
|
|
5
|
+
refresh?: NiceBaseListIcons;
|
|
6
|
+
delete?: NiceBaseListIcons;
|
|
7
|
+
arrowDown?: NiceBaseListIcons;
|
|
8
|
+
datePicker?: NiceBaseListIcons;
|
|
9
|
+
}
|
|
10
|
+
export declare const defaultIcons: NiceAdvancedFilterIconOptions;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NiceAdvancedFilterIconOptions } from "../../../models/icons.model";
|
|
2
|
+
import { FilterComponent } from "../filter.component";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NiceAdvancedDateFilterComponent extends FilterComponent<string> {
|
|
5
|
+
icons: NiceAdvancedFilterIconOptions;
|
|
6
|
+
constructor(icons: NiceAdvancedFilterIconOptions);
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceAdvancedDateFilterComponent, [{ optional: true; }]>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceAdvancedDateFilterComponent, "nice-advanced-date-filter", never, {}, {}, never, never, false>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ControlValueAccessor } from "@angular/forms";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FilterComponent<T> implements ControlValueAccessor {
|
|
4
|
+
private _value;
|
|
5
|
+
get value(): T | undefined;
|
|
6
|
+
protected propagateChanges: (_: T) => void;
|
|
7
|
+
registerOnTouched(fn: any): void;
|
|
8
|
+
registerOnChange(fn: (_: T) => void): void;
|
|
9
|
+
writeValue(value: T): void;
|
|
10
|
+
onValueChange(value: T): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterComponent<any>, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent<any>, "ng-component", never, {}, {}, never, never, false>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FilterComponent } from "../filter.component";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NiceAdvancedNumberFilterComponent extends FilterComponent<number> {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceAdvancedNumberFilterComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceAdvancedNumberFilterComponent, "nice-advanced-number-filter", never, {}, {}, never, never, false>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FilterConfigurationModel } from "../../../../../../../models/filter.model";
|
|
2
|
+
import { FilterComponent } from "../filter.component";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NiceAdvancedRadioFilterComponent extends FilterComponent<string> {
|
|
5
|
+
filterConfig: FilterConfigurationModel;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceAdvancedRadioFilterComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceAdvancedRadioFilterComponent, "nice-advanced-radio-filter", never, { "filterConfig": "filterConfig"; }, {}, never, never, false>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
|
|
2
|
+
import { Subject } from "rxjs";
|
|
3
|
+
import { FilterConfigurationModel, SelectFilterValue } from "../../../../../../../models/filter.model";
|
|
4
|
+
import { NiceFilterService } from "../../../../../../base-list/providers/base-filter.service";
|
|
5
|
+
import { FilterComponent } from "../filter.component";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class NiceAdvancedSelectFilterComponent extends FilterComponent<unknown> implements OnInit, OnDestroy, OnChanges {
|
|
8
|
+
protected filterService: NiceFilterService<any>;
|
|
9
|
+
filterConfig: FilterConfigurationModel;
|
|
10
|
+
values: SelectFilterValue[];
|
|
11
|
+
search$: Subject<string>;
|
|
12
|
+
private searchSub$;
|
|
13
|
+
constructor(filterService: NiceFilterService<any>);
|
|
14
|
+
ngOnInit(): Promise<void>;
|
|
15
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
16
|
+
private searchValue;
|
|
17
|
+
onValueChange(value: unknown): void;
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
writeValue(value: unknown): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceAdvancedSelectFilterComponent, [{ optional: true; }]>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceAdvancedSelectFilterComponent, "nice-advanced-select-filter", never, { "filterConfig": "filterConfig"; }, {}, never, never, false>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FilterConfigurationModel } from "../../../../../../../models/filter.model";
|
|
2
|
+
import { FilterComponent } from "../filter.component";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NiceAdvancedTextFilterComponent extends FilterComponent<string> {
|
|
5
|
+
filterConfig: FilterConfigurationModel;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceAdvancedTextFilterComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceAdvancedTextFilterComponent, "nice-advanced-text-filter", never, { "filterConfig": "filterConfig"; }, {}, never, never, false>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from "@angular/core";
|
|
2
|
+
import { FormGroupName } from "@angular/forms";
|
|
3
|
+
import { GeneratedFormArray, GeneratedFormGroup } from "@recursyve/ngx-form-generator";
|
|
4
|
+
import { Observable } from "rxjs";
|
|
5
|
+
import { FilterConfigurationModel } from "../../../../../models/filter.model";
|
|
6
|
+
import { FilterForm, FilterFormValues } from "../advanced-filters.form";
|
|
7
|
+
import { NiceAdvancedFilterIconOptions } from "../models/icons.model";
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class NiceAdvancedRuleComponent implements OnInit {
|
|
10
|
+
icons: NiceAdvancedFilterIconOptions;
|
|
11
|
+
private formGroupName;
|
|
12
|
+
filterConfigs: FilterConfigurationModel[] | null;
|
|
13
|
+
remove: EventEmitter<any>;
|
|
14
|
+
formGroup: GeneratedFormGroup<FilterForm>;
|
|
15
|
+
valuesFormArray: GeneratedFormArray<FilterFormValues>;
|
|
16
|
+
isSingleInput$: Observable<boolean>;
|
|
17
|
+
isDoubleInput$: Observable<boolean>;
|
|
18
|
+
get filterConfig(): FilterConfigurationModel;
|
|
19
|
+
constructor(icons: NiceAdvancedFilterIconOptions, formGroupName: FormGroupName);
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
onUpdateFilterConfig(config: FilterConfigurationModel): void;
|
|
22
|
+
addValue(index: number): void;
|
|
23
|
+
removeValue(i: number): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceAdvancedRuleComponent, [{ optional: true; }, null]>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceAdvancedRuleComponent, "nice-advanced-rule", never, { "filterConfigs": "filterConfigs"; }, { "remove": "remove"; }, never, never, false>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FilterConfigurationModel } from "../../../../../models/filter.model";
|
|
2
|
+
import { FilterOperators, QueryRuleModel } from "../../../../../models/query.model";
|
|
3
|
+
export declare class AdvancedFiltersUtils {
|
|
4
|
+
static noInputOperators: FilterOperators[];
|
|
5
|
+
static singleInputOperators: FilterOperators[];
|
|
6
|
+
static doubleInputOperators: FilterOperators[];
|
|
7
|
+
static isSingleInput(filterOperator?: FilterOperators): boolean;
|
|
8
|
+
static isDoubleInput(filterOperator?: FilterOperators): boolean;
|
|
9
|
+
static isNoInput(filterOperator?: FilterOperators): boolean;
|
|
10
|
+
static createRule(config: FilterConfigurationModel, operator?: FilterOperators): QueryRuleModel;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import { NiceBaseListIcons } from "../../base-list/models/icons.model";
|
|
3
|
+
import { NiceFilterGroupService } from "../../query-builder/providers/filter-group.service";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NiceFilterGroupIconPipe implements PipeTransform {
|
|
6
|
+
private service?;
|
|
7
|
+
constructor(service?: NiceFilterGroupService<any>);
|
|
8
|
+
transform(value: string): NiceBaseListIcons;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterGroupIconPipe, [{ optional: true; }]>;
|
|
10
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<NiceFilterGroupIconPipe, "niceFilterGroupIcon", false>;
|
|
11
|
+
}
|
|
@@ -6,11 +6,13 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
export declare class NiceFilterViewQuery extends QueryEntity<NiceFilterViewState> {
|
|
7
7
|
protected store: NiceFilterViewStore;
|
|
8
8
|
constructor(store: NiceFilterViewStore);
|
|
9
|
+
selectSubState<T>(name: string): Observable<T>;
|
|
9
10
|
selectFilterConfigLoading(): Observable<boolean>;
|
|
10
11
|
selectFilterConfig(): Observable<FilterConfigurationModel[]>;
|
|
11
12
|
selectFilterParameters(): Observable<FilterParametersModel>;
|
|
12
13
|
selectFilterResult(): Observable<FilterResultModel | null>;
|
|
13
14
|
getParameters(): FilterParametersModel;
|
|
15
|
+
getSubState<T>(name: string): T;
|
|
14
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterViewQuery, never>;
|
|
15
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<NiceFilterViewQuery>;
|
|
16
18
|
}
|
|
@@ -11,6 +11,7 @@ export declare class NiceFilterViewService<Filter extends NiceFilterService<any>
|
|
|
11
11
|
constructor(store: NiceFilterViewStore, filterService: Filter);
|
|
12
12
|
reset(): void;
|
|
13
13
|
disable(): void;
|
|
14
|
+
updateSubState<T>(name: string, value: T): void;
|
|
14
15
|
enable(): void;
|
|
15
16
|
setAutoLoad(autoLoad: boolean): void;
|
|
16
17
|
setLoading(loading: boolean): void;
|
|
@@ -28,6 +28,7 @@ export declare class NiceFilterViewStore extends EntityStore<NiceFilterViewState
|
|
|
28
28
|
upsertValue(value: any, key?: string): void;
|
|
29
29
|
removeValue(value: any, key?: string): void;
|
|
30
30
|
getParameters(filterParameters?: FilterParametersModel): FilterParametersModel;
|
|
31
|
+
getSubState<T>(name: string): T;
|
|
31
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterViewStore, never>;
|
|
32
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<NiceFilterViewStore>;
|
|
33
34
|
}
|
|
@@ -3,9 +3,9 @@ import { NiceBaseListIcons } from "../../base-list/models/icons.model";
|
|
|
3
3
|
import { NiceFilterGroupService } from "../providers/filter-group.service";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class FilterGroupIconPipe implements PipeTransform {
|
|
6
|
-
private service
|
|
7
|
-
constructor(service
|
|
6
|
+
private service?;
|
|
7
|
+
constructor(service?: NiceFilterGroupService<any>);
|
|
8
8
|
transform(value: string): NiceBaseListIcons;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilterGroupIconPipe,
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterGroupIconPipe, [{ optional: true; }]>;
|
|
10
10
|
static ɵpipe: i0.ɵɵPipeDeclaration<FilterGroupIconPipe, "filterGroupIcon", false>;
|
|
11
11
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from "@angular/core";
|
|
1
|
+
import { DoCheck, OnDestroy, OnInit } from "@angular/core";
|
|
2
2
|
import { MatCheckbox } from "@angular/material/checkbox";
|
|
3
3
|
import { SelectableListContentService } from "./providers/selectable-list-content.service";
|
|
4
4
|
import { SelectableListService } from "./store/selectable-list.service";
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class NiceSelectableListCheckboxDirective implements OnInit, OnDestroy {
|
|
6
|
+
export declare class NiceSelectableListCheckboxDirective implements OnInit, OnDestroy, DoCheck {
|
|
7
7
|
readonly checkbox: MatCheckbox;
|
|
8
8
|
private service;
|
|
9
9
|
private selectableListService;
|
|
@@ -12,10 +12,12 @@ export declare class NiceSelectableListCheckboxDirective implements OnInit, OnDe
|
|
|
12
12
|
private selectableListStateService;
|
|
13
13
|
private selectableListStateQuery;
|
|
14
14
|
private unsubscribeAll$;
|
|
15
|
+
private initialized;
|
|
15
16
|
private get currentId();
|
|
16
17
|
constructor(checkbox: MatCheckbox, service: SelectableListContentService, selectableListService: SelectableListService);
|
|
17
18
|
ngOnInit(): void;
|
|
18
19
|
ngOnDestroy(): void;
|
|
20
|
+
ngDoCheck(): void;
|
|
19
21
|
private handleSelectableEntity;
|
|
20
22
|
private handleSelectPage;
|
|
21
23
|
private updateCheckboxState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityStore
|
|
1
|
+
import { EntityStore } from "@datorama/akita";
|
|
2
2
|
import { NiceSelectableListOptions } from "../model/selectable-list-options.model";
|
|
3
3
|
import { NicePreloadSelectedEntitiesProvider } from "../providers/preload-selected-entities.provider";
|
|
4
4
|
import { SelectableListStateQuery } from "./selectable-list-state.query";
|
|
@@ -18,7 +18,7 @@ export declare class SelectableListService {
|
|
|
18
18
|
query: SelectableListStateQuery<any>;
|
|
19
19
|
};
|
|
20
20
|
withState<T, ID = any>(stateName: string, options?: NiceSelectableListOptions): SelectableListStateService<T, ID>;
|
|
21
|
-
query<T>(stateName: string):
|
|
21
|
+
query<T>(stateName: string): SelectableListStateQuery<T>;
|
|
22
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectableListService, [{ optional: true; }]>;
|
|
23
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<SelectableListService>;
|
|
24
24
|
}
|
package/package.json
CHANGED
package/src/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.theme.scss
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@import "./filter-selection/filter-selection.theme";
|
|
2
|
+
@import "./rule/rule.theme";
|
|
3
|
+
|
|
4
|
+
@mixin nice-advanced-filters-theme($theme) {
|
|
5
|
+
@include advanced-filter-selection-theme();
|
|
6
|
+
@include advanced-rule-theme($theme);
|
|
7
|
+
|
|
8
|
+
nice-advanced-filters {
|
|
9
|
+
.advanced-filter-title {
|
|
10
|
+
@apply text-xl;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.advanced-filter-condition {
|
|
14
|
+
@apply text-lg;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.add-condition {
|
|
18
|
+
@apply min-h-12 rounded border-accent #{!important};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.close-button, .refresh-button {
|
|
22
|
+
@apply min-h-12;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@mixin advanced-filter-selection-theme() {
|
|
2
|
+
nice-advanced-filter-selection {
|
|
3
|
+
.filter-selection-container {
|
|
4
|
+
@apply min-h-36 min-w-36 max-h-[600px] max-w-[600px] p-8 overflow-auto;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.filter-group {
|
|
8
|
+
.group-icon {
|
|
9
|
+
@apply text-accent icon-size-8;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.group-name {
|
|
13
|
+
@apply text-lg font-bold;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.filter-item {
|
|
18
|
+
@apply cursor-pointer p-2 pl-4 border border-transparent;
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
@apply bg-accent/10;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.mat-ripple-element {
|
|
25
|
+
@apply bg-accent/20 #{!important};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
|
|
3
|
+
@mixin advanced-rule-theme($theme) {
|
|
4
|
+
$isDark: map-get($theme, is-dark);
|
|
5
|
+
$primary: map-get($theme, primary);
|
|
6
|
+
$background: map-get($theme, background);
|
|
7
|
+
$foreground: map-get($theme, foreground);
|
|
8
|
+
|
|
9
|
+
nice-advanced-rule {
|
|
10
|
+
background: transparent;
|
|
11
|
+
|
|
12
|
+
.select-filter {
|
|
13
|
+
@apply w-full min-h-12 rounded;
|
|
14
|
+
|
|
15
|
+
.mat-button-wrapper {
|
|
16
|
+
@apply w-full px-2;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.config-name {
|
|
21
|
+
@apply flex flex-auto max-w-50 truncate;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.mat-form-field {
|
|
25
|
+
@apply w-full min-h-12;
|
|
26
|
+
|
|
27
|
+
.mat-form-field-wrapper {
|
|
28
|
+
@apply m-0 p-0 #{!important};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.mat-form-field-subscript-wrapper {
|
|
32
|
+
@apply hidden;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.mat-form-field-infix {
|
|
36
|
+
border-top: 0.5em solid transparent;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.mat-form-field-flex {
|
|
40
|
+
@apply rounded #{!important};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.condition-toggle {
|
|
45
|
+
@apply w-full min-h-12 rounded border border-accent #{!important};
|
|
46
|
+
|
|
47
|
+
mat-button-toggle {
|
|
48
|
+
@apply flex-auto border-accent #{!important};
|
|
49
|
+
|
|
50
|
+
&.mat-button-toggle-checked {
|
|
51
|
+
@apply bg-accent/20;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:not(.mat-button-toggle-checked) {
|
|
55
|
+
@apply bg-transparent;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.mat-button-toggle-button {
|
|
59
|
+
@apply h-full text-accent;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.add-button {
|
|
65
|
+
@apply w-12 max-w-12 h-12 max-h-12 rounded;
|
|
66
|
+
|
|
67
|
+
.mat-button-wrapper {
|
|
68
|
+
@apply w-full h-full border border-accent rounded #{!important};
|
|
69
|
+
|
|
70
|
+
.mat-icon {
|
|
71
|
+
@apply text-accent #{!important};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mat-ripple-element {
|
|
76
|
+
@apply bg-accent #{!important};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.remove-button {
|
|
81
|
+
@apply w-12 max-w-12 h-12 max-h-12 rounded;
|
|
82
|
+
|
|
83
|
+
.mat-button-wrapper {
|
|
84
|
+
@apply w-full h-full rounded #{!important};
|
|
85
|
+
|
|
86
|
+
.mat-icon {
|
|
87
|
+
@apply text-accent #{!important};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.mat-ripple-element {
|
|
92
|
+
@apply bg-accent #{!important};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
@import "./components/base-list/base-list.theme";
|
|
2
|
+
@import "./components/nice-filter-view/components/advanced-filters/advanced-filters.theme";
|
|
2
3
|
@import "./components/query-builder/query-builder.theme";
|
|
3
4
|
|
|
4
5
|
@mixin nice-data-filter-kit-theme($theme) {
|
|
5
6
|
@include nice-base-list-theme($theme);
|
|
6
7
|
@include nice-query-builder-theme($theme);
|
|
8
|
+
@include nice-advanced-filters-theme($theme);
|
|
7
9
|
|
|
8
10
|
// TODO: Figure out a better way ot use tailwind
|
|
9
11
|
nice-filter-search {
|