@klippa/ngx-enhancy-forms 16.7.2 → 16.7.7
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/elements/select/select.component.mjs +15 -2
- package/esm2022/lib/form/form-element/form-element.component.mjs +2 -2
- package/esm2022/lib/form/form-error/form-error.component.mjs +10 -3
- package/esm2022/lib/form/form.component.mjs +3 -3
- package/fesm2022/klippa-ngx-enhancy-forms.mjs +26 -7
- package/fesm2022/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/lib/elements/select/select.component.d.ts +6 -3
- package/lib/form/form-error/form-error.component.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, EventEmitter, InjectionToken, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, InjectionToken, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
2
|
import { ControlContainer } from '@angular/forms';
|
|
3
3
|
import { ValueAccessorBase } from '../value-accessor-base/value-accessor-base.component';
|
|
4
4
|
import { FormElementComponent } from '../../form/form-element/form-element.component';
|
|
@@ -16,7 +16,7 @@ export declare class KlpSelectOptionTemplateDirective {
|
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<KlpSelectOptionTemplateDirective, never>;
|
|
17
17
|
static ɵdir: i0.ɵɵDirectiveDeclaration<KlpSelectOptionTemplateDirective, "[klpSelectOptionTpl]", never, {}, {}, never, never, false, never>;
|
|
18
18
|
}
|
|
19
|
-
export declare class SelectComponent extends ValueAccessorBase<string | string[]> implements OnChanges, AfterViewInit {
|
|
19
|
+
export declare class SelectComponent extends ValueAccessorBase<string | string[]> implements OnChanges, AfterViewInit, OnDestroy {
|
|
20
20
|
protected parent: FormElementComponent;
|
|
21
21
|
protected controlContainer: ControlContainer;
|
|
22
22
|
private translations;
|
|
@@ -44,12 +44,14 @@ export declare class SelectComponent extends ValueAccessorBase<string | string[]
|
|
|
44
44
|
onClosed: EventEmitter<void>;
|
|
45
45
|
onBlur: EventEmitter<void>;
|
|
46
46
|
onClear: EventEmitter<void>;
|
|
47
|
+
onEnterKey: EventEmitter<string>;
|
|
47
48
|
ngSelect: any;
|
|
48
49
|
customOptionTpl: TemplateRef<any>;
|
|
49
50
|
private lastItemIndexReached;
|
|
50
51
|
dropdownPositionToUse: 'auto' | 'bottom' | 'top' | 'left' | 'right';
|
|
51
52
|
constructor(parent: FormElementComponent, controlContainer: ControlContainer, translations: any, elRef: ElementRef);
|
|
52
53
|
ngAfterViewInit(): void;
|
|
54
|
+
private keyListener;
|
|
53
55
|
private addPrefix;
|
|
54
56
|
ngOnChanges(changes: SimpleChanges): void;
|
|
55
57
|
getDefaultTranslation(key: string): (x: any) => string;
|
|
@@ -63,6 +65,7 @@ export declare class SelectComponent extends ValueAccessorBase<string | string[]
|
|
|
63
65
|
focus: () => void;
|
|
64
66
|
close: () => void;
|
|
65
67
|
onClose(): void;
|
|
68
|
+
ngOnDestroy(): void;
|
|
66
69
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, [{ optional: true; host: true; }, { optional: true; host: true; }, { optional: true; }, null]>;
|
|
67
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "klp-form-select", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "prefix": { "alias": "prefix"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "options": { "alias": "options"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "multipleDisplayedAsAmount": { "alias": "multipleDisplayedAsAmount"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "truncateOptions": { "alias": "truncateOptions"; "required": false; }; "withSeparatingLine": { "alias": "withSeparatingLine"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "dropdownPosition": { "alias": "dropdownPosition"; "required": false; }; "customSearchFn": { "alias": "customSearchFn"; "required": false; }; "footerElement": { "alias": "footerElement"; "required": false; }; }, { "onSearch": "onSearch"; "onEndReached": "onEndReached"; "onOpened": "onOpened"; "onClosed": "onClosed"; "onBlur": "onBlur"; "onClear": "onClear"; }, ["customOptionTpl"], never, false, never>;
|
|
70
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "klp-form-select", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "prefix": { "alias": "prefix"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "options": { "alias": "options"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "multipleDisplayedAsAmount": { "alias": "multipleDisplayedAsAmount"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "truncateOptions": { "alias": "truncateOptions"; "required": false; }; "withSeparatingLine": { "alias": "withSeparatingLine"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "dropdownPosition": { "alias": "dropdownPosition"; "required": false; }; "customSearchFn": { "alias": "customSearchFn"; "required": false; }; "footerElement": { "alias": "footerElement"; "required": false; }; }, { "onSearch": "onSearch"; "onEndReached": "onEndReached"; "onOpened": "onOpened"; "onClosed": "onClosed"; "onBlur": "onBlur"; "onClear": "onClear"; "onEnterKey": "onEnterKey"; }, ["customOptionTpl"], never, false, never>;
|
|
68
71
|
}
|
|
@@ -5,10 +5,12 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class FormErrorComponent implements OnInit {
|
|
6
6
|
private parent;
|
|
7
7
|
error: ErrorTypes;
|
|
8
|
+
showErrorValueAsMessage: boolean;
|
|
8
9
|
showError: boolean;
|
|
9
10
|
contentRef: ElementRef;
|
|
10
11
|
constructor(parent: FormElementComponent);
|
|
11
12
|
ngOnInit(): void;
|
|
13
|
+
getErrorValueMessage(): string;
|
|
12
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormErrorComponent, [{ optional: true; host: true; }]>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormErrorComponent, "klp-form-error", never, { "error": { "alias": "error"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormErrorComponent, "klp-form-error", never, { "error": { "alias": "error"; "required": false; }; "showErrorValueAsMessage": { "alias": "showErrorValueAsMessage"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
14
16
|
}
|