@elderbyte/ngx-starter 16.2.1 → 16.2.3
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/enums/elder-enum-translation.service.mjs +14 -11
- package/esm2022/lib/components/forms/search/elder-search-context.directive.mjs +56 -24
- package/esm2022/lib/components/forms/search/elder-search-input.directive.mjs +1 -2
- package/esm2022/lib/components/forms/search/search-box/elder-search-box.component.mjs +3 -3
- package/fesm2022/elderbyte-ngx-starter.mjs +64 -31
- package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
- package/lib/common/enums/elder-enum-translation.service.d.ts +4 -3
- package/lib/components/forms/search/elder-search-context.directive.d.ts +20 -6
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TranslateService } from
|
|
2
|
-
import { Observable } from
|
|
3
|
-
import { IDataSource } from
|
|
1
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { IDataSource } from "../data/datasource/data-source";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class TranslatedEnumValue {
|
|
6
6
|
value: string;
|
|
@@ -38,6 +38,7 @@ export declare class ElderEnumTranslationService {
|
|
|
38
38
|
* @param enumKey key of the translation to load
|
|
39
39
|
*/
|
|
40
40
|
translateOne(translationPrefix: string, enumKey: string): Observable<TranslatedEnumValue>;
|
|
41
|
+
private addPrefixIfNotNull;
|
|
41
42
|
/**
|
|
42
43
|
* Creates a data source of translations of the given enum class.
|
|
43
44
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, OnDestroy, QueryList } from "@angular/core";
|
|
1
|
+
import { AfterContentInit, AfterViewInit, OnDestroy, QueryList } from "@angular/core";
|
|
2
2
|
import { Observable } from "rxjs/internal/Observable";
|
|
3
3
|
import { SearchInput } from "./model/search-input";
|
|
4
4
|
import { Filter } from "../../../common/data/filters/filter";
|
|
@@ -10,26 +10,34 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
* The search container manages a group of search-inputs
|
|
11
11
|
* and holds their values in a central search model.
|
|
12
12
|
*/
|
|
13
|
-
export declare class ElderSearchContextDirective implements AfterViewInit, OnDestroy {
|
|
14
|
-
|
|
13
|
+
export declare class ElderSearchContextDirective implements AfterViewInit, OnDestroy, AfterContentInit {
|
|
14
|
+
private parentContext;
|
|
15
15
|
/***************************************************************************
|
|
16
16
|
* *
|
|
17
17
|
* Fields *
|
|
18
18
|
* *
|
|
19
19
|
**************************************************************************/
|
|
20
|
+
searchInputs: QueryList<ElderSearchInputDirective>;
|
|
21
|
+
private childSearchInputs$;
|
|
20
22
|
private forcedFilters$;
|
|
21
23
|
private readonly log;
|
|
22
24
|
private readonly _unsubscribe$;
|
|
23
|
-
private readonly _searchInputs;
|
|
24
25
|
private readonly _searchStates;
|
|
25
26
|
private readonly _filters$;
|
|
26
27
|
private readonly _initialFilters$;
|
|
27
28
|
private _filterContext;
|
|
29
|
+
/***************************************************************************
|
|
30
|
+
* *
|
|
31
|
+
* Constructor *
|
|
32
|
+
* *
|
|
33
|
+
**************************************************************************/
|
|
34
|
+
constructor(parentContext: ElderSearchContextDirective);
|
|
28
35
|
/***************************************************************************
|
|
29
36
|
* *
|
|
30
37
|
* Life Cycle *
|
|
31
38
|
* *
|
|
32
39
|
**************************************************************************/
|
|
40
|
+
ngAfterContentInit(): void;
|
|
33
41
|
ngAfterViewInit(): void;
|
|
34
42
|
ngOnDestroy(): void;
|
|
35
43
|
/***************************************************************************
|
|
@@ -37,7 +45,7 @@ export declare class ElderSearchContextDirective implements AfterViewInit, OnDes
|
|
|
37
45
|
* Properties *
|
|
38
46
|
* *
|
|
39
47
|
**************************************************************************/
|
|
40
|
-
set filterContext(value: FilterContext);
|
|
48
|
+
set filterContext(value: FilterContext | string);
|
|
41
49
|
get filterContext(): FilterContext;
|
|
42
50
|
/**
|
|
43
51
|
* Forced filters are always merged into the final FilterContext.
|
|
@@ -66,6 +74,7 @@ export declare class ElderSearchContextDirective implements AfterViewInit, OnDes
|
|
|
66
74
|
* Public API *
|
|
67
75
|
* *
|
|
68
76
|
**************************************************************************/
|
|
77
|
+
registerInput(searchInputs: ElderSearchInputDirective[]): void;
|
|
69
78
|
registerInitialFilters(filters: Filter[]): void;
|
|
70
79
|
reset(): void;
|
|
71
80
|
/***************************************************************************
|
|
@@ -73,8 +82,13 @@ export declare class ElderSearchContextDirective implements AfterViewInit, OnDes
|
|
|
73
82
|
* Private *
|
|
74
83
|
* *
|
|
75
84
|
**************************************************************************/
|
|
85
|
+
private registerInputsToParentContext;
|
|
86
|
+
private isParentContextNull;
|
|
87
|
+
private subscribeSearchInputs;
|
|
88
|
+
private zipInputsWithChildInputs;
|
|
89
|
+
private subscribeInitialFilters;
|
|
76
90
|
private convertToFilters;
|
|
77
91
|
private applyFilters;
|
|
78
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ElderSearchContextDirective,
|
|
92
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElderSearchContextDirective, [{ optional: true; skipSelf: true; }]>;
|
|
79
93
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ElderSearchContextDirective, "[elderSearchContext]", ["elderSearchContext"], { "filterContext": { "alias": "elderSearchContext"; "required": false; }; "forcedFilters": { "alias": "forcedFilters"; "required": false; }; }, {}, ["searchInputs"], never, false, never>;
|
|
80
94
|
}
|