@elderbyte/ngx-starter 16.4.1 → 16.4.2
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/components/forms/directives/elder-initial-value.directive.mjs +11 -8
- package/esm2022/lib/components/forms/search/domain/input/search-input-state.mjs +9 -4
- package/esm2022/lib/components/forms/search/elder-search-context.directive.mjs +24 -22
- package/esm2022/lib/components/forms/search/elder-search-input.directive.mjs +20 -12
- package/esm2022/lib/components/forms/search/search-box/elder-search-box.component.mjs +9 -10
- package/fesm2022/elderbyte-ngx-starter.mjs +62 -45
- package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
- package/lib/components/forms/directives/elder-initial-value.directive.d.ts +2 -2
- package/lib/components/forms/search/domain/input/search-input-state.d.ts +9 -1
- package/lib/components/forms/search/elder-search-context.directive.d.ts +4 -5
- package/lib/components/forms/search/elder-search-input.directive.d.ts +2 -0
- package/lib/components/forms/search/search-box/elder-search-box.component.d.ts +6 -7
- package/package.json +1 -1
|
@@ -18,6 +18,10 @@ export declare class SearchInputState {
|
|
|
18
18
|
* pristine Has the user touched this?
|
|
19
19
|
*/
|
|
20
20
|
readonly pristine: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Was the input changed by a user interaction
|
|
23
|
+
*/
|
|
24
|
+
readonly userEvent: boolean;
|
|
21
25
|
static unknown(): SearchInputState;
|
|
22
26
|
/***************************************************************************
|
|
23
27
|
* *
|
|
@@ -40,7 +44,11 @@ export declare class SearchInputState {
|
|
|
40
44
|
/**
|
|
41
45
|
* pristine Has the user touched this?
|
|
42
46
|
*/
|
|
43
|
-
pristine: boolean
|
|
47
|
+
pristine: boolean,
|
|
48
|
+
/**
|
|
49
|
+
* Was the input changed by a user interaction
|
|
50
|
+
*/
|
|
51
|
+
userEvent: boolean);
|
|
44
52
|
/***************************************************************************
|
|
45
53
|
* *
|
|
46
54
|
* Private methods *
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterContentInit,
|
|
1
|
+
import { AfterContentInit, 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,
|
|
17
|
+
export declare class ElderSearchContextDirective implements OnInit, OnDestroy, AfterContentInit {
|
|
18
18
|
/***************************************************************************
|
|
19
19
|
* *
|
|
20
20
|
* Fields *
|
|
@@ -40,7 +40,6 @@ export declare class ElderSearchContextDirective implements OnInit, AfterViewIni
|
|
|
40
40
|
**************************************************************************/
|
|
41
41
|
ngOnInit(): void;
|
|
42
42
|
ngAfterContentInit(): void;
|
|
43
|
-
ngAfterViewInit(): void;
|
|
44
43
|
ngOnDestroy(): void;
|
|
45
44
|
/***************************************************************************
|
|
46
45
|
* *
|
|
@@ -88,9 +87,9 @@ export declare class ElderSearchContextDirective implements OnInit, AfterViewIni
|
|
|
88
87
|
private syncSearchInputsToSearchContext;
|
|
89
88
|
private syncSearchContextToBoundFilterContext;
|
|
90
89
|
private applyToBoundFilterContext;
|
|
91
|
-
applySearchContextToInputs
|
|
90
|
+
private applySearchContextToInputs;
|
|
92
91
|
private applyFiltersToInputs;
|
|
93
|
-
private
|
|
92
|
+
private searchInputsByName;
|
|
94
93
|
private convertToFilters;
|
|
95
94
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElderSearchContextDirective, never>;
|
|
96
95
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ElderSearchContextDirective, "[elderSearchContext]", ["elderSearchContext"], { "searchContextId": { "alias": "searchContextId"; "required": false; }; "filterContext": { "alias": "elderSearchContext"; "required": false; }; "forcedFilters": { "alias": "forcedFilters"; "required": false; }; }, {}, never, never, false, never>;
|
|
@@ -79,7 +79,9 @@ export declare class ElderSearchInputDirective implements SearchInput, OnInit, A
|
|
|
79
79
|
* Private methods *
|
|
80
80
|
* *
|
|
81
81
|
**************************************************************************/
|
|
82
|
+
private get valueChanges$();
|
|
82
83
|
private stateObservable;
|
|
84
|
+
private buildInputState;
|
|
83
85
|
private convertQueryStringToRawModelValue;
|
|
84
86
|
private convertRawModelValueToQueryString;
|
|
85
87
|
emitState(state: SearchInputState): void;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { AfterContentInit,
|
|
1
|
+
import { AfterContentInit, ElementRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { ElderSearchContextDirective } from '../elder-search-context.directive';
|
|
3
3
|
import { ElderSearchPanelComponent } from './elder-search-panel.component';
|
|
4
|
-
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
5
5
|
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class OverlayState {
|
|
8
8
|
hasOverlay: boolean;
|
|
9
9
|
constructor(hasOverlay: boolean);
|
|
10
10
|
}
|
|
11
|
-
export declare class ElderSearchBoxComponent implements
|
|
12
|
-
readonly
|
|
11
|
+
export declare class ElderSearchBoxComponent implements OnDestroy, AfterContentInit {
|
|
12
|
+
readonly searchContextDirective: ElderSearchContextDirective;
|
|
13
13
|
/***************************************************************************
|
|
14
14
|
* *
|
|
15
15
|
* Fields *
|
|
@@ -37,19 +37,18 @@ export declare class ElderSearchBoxComponent implements OnInit, OnDestroy, After
|
|
|
37
37
|
private _dense;
|
|
38
38
|
autocomplete: string;
|
|
39
39
|
appearance: MatFormFieldAppearance;
|
|
40
|
+
readonly userFilters$: Observable<any[]>;
|
|
40
41
|
/***************************************************************************
|
|
41
42
|
* *
|
|
42
43
|
* Constructor *
|
|
43
44
|
* *
|
|
44
45
|
**************************************************************************/
|
|
45
|
-
constructor(
|
|
46
|
+
constructor(searchContextDirective: ElderSearchContextDirective);
|
|
46
47
|
/***************************************************************************
|
|
47
48
|
* *
|
|
48
49
|
* Life Cycle *
|
|
49
50
|
* *
|
|
50
51
|
**************************************************************************/
|
|
51
|
-
ngOnInit(): void;
|
|
52
|
-
ngAfterViewInit(): void;
|
|
53
52
|
ngAfterContentInit(): void;
|
|
54
53
|
ngOnDestroy(): void;
|
|
55
54
|
/***************************************************************************
|