@elderbyte/ngx-starter 16.4.3 → 16.4.5
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/directives/elder-initial-value.directive.mjs +2 -24
- 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 +25 -15
- package/esm2022/lib/components/forms/search/elder-search-input.directive.mjs +13 -19
- package/fesm2022/elderbyte-ngx-starter.mjs +65 -65
- package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
- package/lib/common/data/filters/filter-context.d.ts +1 -1
- package/lib/components/forms/directives/elder-initial-value.directive.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 +1 -2
- package/lib/components/forms/search/elder-search-context.directive.d.ts +5 -3
- package/lib/components/forms/search/elder-search-input.directive.d.ts +3 -5
- 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 *
|
|
@@ -32,7 +32,7 @@ export declare class ElderInitialValueDirective implements OnDestroy {
|
|
|
32
32
|
* *
|
|
33
33
|
**************************************************************************/
|
|
34
34
|
get valueChanges$(): import("rxjs").Observable<any>;
|
|
35
|
-
|
|
35
|
+
setValue(value: any): void;
|
|
36
36
|
ngOnDestroy(): void;
|
|
37
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElderInitialValueDirective, [{ host: true; }]>;
|
|
38
38
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ElderInitialValueDirective, "[elderInitialValue]", ["elderInitialValue"], {}, {}, never, never, false, never>;
|
|
@@ -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;
|
|
@@ -9,7 +9,6 @@ export interface SearchInput {
|
|
|
9
9
|
*/
|
|
10
10
|
readonly name: string;
|
|
11
11
|
readonly state$: Observable<SearchInputState>;
|
|
12
|
-
readonly stateSnapshot: SearchInputState;
|
|
13
12
|
/**
|
|
14
13
|
* States if the search name is cannot be changed.
|
|
15
14
|
*/
|
|
@@ -18,5 +17,5 @@ export interface SearchInput {
|
|
|
18
17
|
* Reset the name value
|
|
19
18
|
*/
|
|
20
19
|
reset(): void;
|
|
21
|
-
|
|
20
|
+
setValue(value: string | string[] | null): void;
|
|
22
21
|
}
|
|
@@ -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 *
|
|
@@ -22,6 +22,7 @@ export declare class ElderSearchContextDirective implements OnInit, OnDestroy, A
|
|
|
22
22
|
**************************************************************************/
|
|
23
23
|
private readonly log;
|
|
24
24
|
private readonly destroy$;
|
|
25
|
+
private readonly filtersToApplyAtRegistration;
|
|
25
26
|
private readonly _searchInputs$;
|
|
26
27
|
private readonly _searchStates$;
|
|
27
28
|
private readonly _filterContext$;
|
|
@@ -39,7 +40,7 @@ export declare class ElderSearchContextDirective implements OnInit, OnDestroy, A
|
|
|
39
40
|
* *
|
|
40
41
|
**************************************************************************/
|
|
41
42
|
ngOnInit(): void;
|
|
42
|
-
|
|
43
|
+
ngAfterViewInit(): void;
|
|
43
44
|
ngOnDestroy(): void;
|
|
44
45
|
/***************************************************************************
|
|
45
46
|
* *
|
|
@@ -84,6 +85,7 @@ export declare class ElderSearchContextDirective implements OnInit, OnDestroy, A
|
|
|
84
85
|
* *
|
|
85
86
|
**************************************************************************/
|
|
86
87
|
private applyDefaultFiltersToSearchContext;
|
|
88
|
+
private applyAsDefaultsUntilUserAction;
|
|
87
89
|
private syncSearchInputsToSearchContext;
|
|
88
90
|
private syncSearchContextToBoundFilterContext;
|
|
89
91
|
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;
|
|
@@ -72,7 +71,7 @@ export declare class ElderSearchInputDirective implements SearchInput, OnInit, A
|
|
|
72
71
|
* Public API *
|
|
73
72
|
* *
|
|
74
73
|
**************************************************************************/
|
|
75
|
-
|
|
74
|
+
setValue(queryString: string | string[] | null): void;
|
|
76
75
|
reset(): void;
|
|
77
76
|
/***************************************************************************
|
|
78
77
|
* *
|
|
@@ -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;
|