@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.
- package/esm2020/lib/components/select/elder-entity-value-accessor.mjs +5 -4
- package/esm2020/lib/components/select/elder-select/elder-select.component.mjs +1 -1
- package/esm2020/lib/components/select/elder-select-on-tab.directive.mjs +42 -19
- package/fesm2015/elderbyte-ngx-starter.mjs +44 -20
- package/fesm2015/elderbyte-ngx-starter.mjs.map +1 -1
- package/fesm2020/elderbyte-ngx-starter.mjs +44 -20
- package/fesm2020/elderbyte-ngx-starter.mjs.map +1 -1
- package/lib/components/select/elder-entity-value-accessor.d.ts +7 -2
- package/lib/components/select/elder-select/elder-select.component.d.ts +2 -2
- package/lib/components/select/elder-select-on-tab.directive.d.ts +12 -4
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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
|
-
|
|
45
|
-
|
|
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
|
}
|