@elderbyte/ngx-starter 13.9.2 → 13.9.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.
@@ -1,5 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
- export interface IElderEntityValueAccessor<TEntity, TId> {
2
+ export interface IElderEntityValueAccessor<TEntity, TId, TValue> {
3
3
  /**
4
4
  * Gets or sets the entity
5
5
  */
@@ -23,5 +23,10 @@ export interface IElderEntityValueAccessor<TEntity, TId> {
23
23
  * @param entity
24
24
  */
25
25
  updateValueByEntity(entity: TEntity): void;
26
+ /**
27
+ * Convert an entity to a value for this control.
28
+ * @param entity
29
+ */
30
+ entityToValue(entity: TEntity): TValue;
26
31
  }
27
- export declare function isElderEntityValueAccessor(object: any): object is IElderEntityValueAccessor<any, any>;
32
+ export declare function isElderEntityValueAccessor(object: any): object is IElderEntityValueAccessor<any, any, any>;
@@ -21,7 +21,7 @@ declare class EntityContext<T> {
21
21
  * - Support entity id handling, input / output is the entity id vs full value.
22
22
  *
23
23
  */
24
- export declare class ElderSelectComponent<TEntity = any, TId = any, TValue = TEntity | TId> extends ElderSelectBase<TId, TEntity, TValue> implements IElderEntityValueAccessor<TEntity, TId>, OnInit, OnDestroy {
24
+ export declare class ElderSelectComponent<TEntity = any, TId = any, TValue = TEntity | TId> extends ElderSelectBase<TId, TEntity, TValue> implements IElderEntityValueAccessor<TEntity, TId, TValue>, OnInit, OnDestroy {
25
25
  /***************************************************************************
26
26
  * *
27
27
  * Fields *
@@ -131,7 +131,7 @@ export declare class ElderSelectComponent<TEntity = any, TId = any, TValue = TEn
131
131
  private selectEntityById;
132
132
  private loadEntityById;
133
133
  private findInDataContext;
134
- private entityToValue;
134
+ entityToValue(entity: TEntity): TValue;
135
135
  /**
136
136
  * This method is invoked after a value has been written to this control.
137
137
  *
@@ -2,7 +2,7 @@ import { AfterViewInit, OnDestroy } from '@angular/core';
2
2
  import { MatAutocompleteTrigger } from '@angular/material/autocomplete';
3
3
  import { ElderSelectBase } from './elder-select-base';
4
4
  import * as i0 from "@angular/core";
5
- export declare class ElderSelectOnTabDirective<TEntity = any, TId = any> implements AfterViewInit, OnDestroy {
5
+ export declare class ElderSelectOnTabDirective<TEntity = any, TId = any, TValue = TEntity | TId> implements AfterViewInit, OnDestroy {
6
6
  private readonly autoTrigger;
7
7
  /***************************************************************************
8
8
  * *
@@ -32,8 +32,8 @@ export declare class ElderSelectOnTabDirective<TEntity = any, TId = any> impleme
32
32
  * Event Listener *
33
33
  * *
34
34
  **************************************************************************/
35
+ onOptionSelect(): void;
35
36
  onBlur(): void;
36
- private updateValueByEntity;
37
37
  /***************************************************************************
38
38
  * *
39
39
  * Life Cycle *
@@ -41,6 +41,14 @@ export declare class ElderSelectOnTabDirective<TEntity = any, TId = any> impleme
41
41
  **************************************************************************/
42
42
  ngAfterViewInit(): void;
43
43
  ngOnDestroy(): void;
44
- static ɵfac: i0.ɵɵFactoryDeclaration<ElderSelectOnTabDirective<any, any>, [null, { skipSelf: true; }]>;
45
- static ɵdir: i0.ɵɵDirectiveDeclaration<ElderSelectOnTabDirective<any, any>, "[elderSelectOnTab]", never, {}, {}, never>;
44
+ /***************************************************************************
45
+ * *
46
+ * Private methods *
47
+ * *
48
+ **************************************************************************/
49
+ private reset;
50
+ private writeEntity;
51
+ private entityToValue;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<ElderSelectOnTabDirective<any, any, any>, [null, { skipSelf: true; }]>;
53
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ElderSelectOnTabDirective<any, any, any>, "[elderSelectOnTab]", never, {}, {}, never>;
46
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elderbyte/ngx-starter",
3
- "version": "13.9.2",
3
+ "version": "13.9.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.0.0",
6
6
  "@angular/core": "^13.0.0",