@elderbyte/ngx-starter 16.4.3 → 16.4.4
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/esm2022/lib/common/data/filters/filter-context.mjs +4 -5
- package/esm2022/lib/components/forms/search/domain/context/search-context.mjs +27 -9
- package/esm2022/lib/components/forms/search/domain/input/search-input.mjs +1 -1
- package/esm2022/lib/components/forms/search/domain/url/elder-search-url.directive.mjs +2 -2
- package/esm2022/lib/components/forms/search/elder-search-context.directive.mjs +15 -13
- package/esm2022/lib/components/forms/search/elder-search-input.directive.mjs +11 -17
- package/fesm2022/elderbyte-ngx-starter.mjs +52 -38
- package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
- package/lib/common/data/filters/filter-context.d.ts +1 -1
- package/lib/components/forms/search/domain/context/search-context.d.ts +5 -3
- package/lib/components/forms/search/domain/input/search-input.d.ts +0 -1
- package/lib/components/forms/search/elder-search-context.directive.d.ts +4 -3
- package/lib/components/forms/search/elder-search-input.directive.d.ts +2 -4
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ export declare class FilterContext {
|
|
|
20
20
|
* @param updatedFilters
|
|
21
21
|
*/
|
|
22
22
|
static updateFilters(filters: Filter[], updatedFilters: Filter[]): Filter[];
|
|
23
|
-
static of(filters: Filter[]):
|
|
23
|
+
static of(filters: Filter[]): FilterContext;
|
|
24
24
|
/***************************************************************************
|
|
25
25
|
* *
|
|
26
26
|
* Read API *
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FilterContext } from '../../../../../common/data/filters/filter-context';
|
|
2
1
|
import { Observable } from 'rxjs';
|
|
3
2
|
import { Filter } from '../../../../../common/data/filters/filter';
|
|
4
3
|
export declare class SearchContext {
|
|
@@ -25,13 +24,16 @@ export declare class SearchContext {
|
|
|
25
24
|
* *
|
|
26
25
|
**************************************************************************/
|
|
27
26
|
get allFiltersChanged(): Observable<Filter[]>;
|
|
28
|
-
get userFilters():
|
|
29
|
-
get
|
|
27
|
+
get userFilters(): Filter[];
|
|
28
|
+
get userFilters$(): Observable<Filter[]>;
|
|
29
|
+
get forcedFilters(): Filter[];
|
|
30
30
|
/***************************************************************************
|
|
31
31
|
* *
|
|
32
32
|
* Public API *
|
|
33
33
|
* *
|
|
34
34
|
**************************************************************************/
|
|
35
|
+
private acceptDefaultFilters;
|
|
36
|
+
updateDefaultFilters(filters: Filter[]): boolean;
|
|
35
37
|
updateUserFilters(filters: Filter[]): void;
|
|
36
38
|
replaceUserFilters(filters: Filter[]): void;
|
|
37
39
|
replaceForcedFilters(filters: Filter[]): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { SearchInput } from './domain/input/search-input';
|
|
4
4
|
import { Filter } from '../../../common/data/filters/filter';
|
|
@@ -14,7 +14,7 @@ import * as i0 from "@angular/core";
|
|
|
14
14
|
* It also binds the SearchContext to a FilterContext (DataContext).
|
|
15
15
|
* TODO Maybe separate this??
|
|
16
16
|
*/
|
|
17
|
-
export declare class ElderSearchContextDirective implements OnInit, OnDestroy,
|
|
17
|
+
export declare class ElderSearchContextDirective implements OnInit, OnDestroy, AfterViewInit {
|
|
18
18
|
/***************************************************************************
|
|
19
19
|
* *
|
|
20
20
|
* Fields *
|
|
@@ -39,7 +39,7 @@ export declare class ElderSearchContextDirective implements OnInit, OnDestroy, A
|
|
|
39
39
|
* *
|
|
40
40
|
**************************************************************************/
|
|
41
41
|
ngOnInit(): void;
|
|
42
|
-
|
|
42
|
+
ngAfterViewInit(): void;
|
|
43
43
|
ngOnDestroy(): void;
|
|
44
44
|
/***************************************************************************
|
|
45
45
|
* *
|
|
@@ -84,6 +84,7 @@ export declare class ElderSearchContextDirective implements OnInit, OnDestroy, A
|
|
|
84
84
|
* *
|
|
85
85
|
**************************************************************************/
|
|
86
86
|
private applyDefaultFiltersToSearchContext;
|
|
87
|
+
private applyAsDefaultsUntilUserAction;
|
|
87
88
|
private syncSearchInputsToSearchContext;
|
|
88
89
|
private syncSearchContextToBoundFilterContext;
|
|
89
90
|
private applyToBoundFilterContext;
|
|
@@ -38,7 +38,7 @@ export declare class ElderSearchInputDirective implements SearchInput, OnInit, A
|
|
|
38
38
|
*/
|
|
39
39
|
fallbackValue: string | string[];
|
|
40
40
|
valueAsId: BooleanInput;
|
|
41
|
-
private readonly _state
|
|
41
|
+
private readonly _state$;
|
|
42
42
|
private _extractedName;
|
|
43
43
|
private readonly destroy$;
|
|
44
44
|
private readonly log;
|
|
@@ -62,7 +62,6 @@ export declare class ElderSearchInputDirective implements SearchInput, OnInit, A
|
|
|
62
62
|
* *
|
|
63
63
|
**************************************************************************/
|
|
64
64
|
get state$(): Observable<SearchInputState>;
|
|
65
|
-
get stateSnapshot(): SearchInputState;
|
|
66
65
|
get name(): string;
|
|
67
66
|
get value(): any;
|
|
68
67
|
get readonly(): boolean;
|
|
@@ -80,11 +79,10 @@ export declare class ElderSearchInputDirective implements SearchInput, OnInit, A
|
|
|
80
79
|
* *
|
|
81
80
|
**************************************************************************/
|
|
82
81
|
private get valueChanges$();
|
|
83
|
-
private
|
|
82
|
+
private buildInputStateObservable;
|
|
84
83
|
private buildInputState;
|
|
85
84
|
private convertQueryStringToRawModelValue;
|
|
86
85
|
private convertRawModelValueToQueryString;
|
|
87
|
-
emitState(state: SearchInputState): void;
|
|
88
86
|
private checkAndConvertFaultyValuesToNull;
|
|
89
87
|
private convertEmptyArrayToNull;
|
|
90
88
|
private convertEmptyStringToNull;
|