@elderbyte/ngx-starter 16.4.0 → 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.
@@ -1,5 +1,5 @@
1
- import { OnDestroy } from "@angular/core";
2
- import { NgModel } from "@angular/forms";
1
+ import { OnDestroy } from '@angular/core';
2
+ import { NgModel } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * Search name adapter for input controls.
@@ -12,7 +12,7 @@ export declare class SearchContext {
12
12
  readonly id: string;
13
13
  private readonly userFilterContext;
14
14
  private readonly forcedFilterContext;
15
- private readonly _allFilters$;
15
+ private readonly allFilters$;
16
16
  /***************************************************************************
17
17
  * *
18
18
  * Constructor *
@@ -34,4 +34,5 @@ export declare class SearchContext {
34
34
  **************************************************************************/
35
35
  updateUserFilters(filters: Filter[]): void;
36
36
  replaceUserFilters(filters: Filter[]): void;
37
+ replaceForcedFilters(filters: Filter[]): void;
37
38
  }
@@ -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, AfterViewInit, OnDestroy, OnInit } from '@angular/core';
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, AfterViewInit, OnDestroy, AfterContentInit {
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(): void;
90
+ private applySearchContextToInputs;
92
91
  private applyFiltersToInputs;
93
- private findFilterForInput;
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, AfterViewInit, ElementRef, OnDestroy, OnInit } from '@angular/core';
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 OnInit, OnDestroy, AfterViewInit, AfterContentInit {
12
- readonly searchModel: ElderSearchContextDirective;
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(searchModel: ElderSearchContextDirective);
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
  /***************************************************************************
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elderbyte/ngx-starter",
3
- "version": "16.4.0",
3
+ "version": "16.4.2",
4
4
  "peerDependencies": {
5
5
  "@angular/core": "^16.0.0 || ^17.0.0",
6
6
  "@angular/common": "^16.0.0 || ^17.0.0",