@apipass/inputs 1.0.120 → 1.0.122
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,6 +1,8 @@
|
|
|
1
1
|
import { Component, EventEmitter, forwardRef, Input, Output, ViewEncapsulation } from '@angular/core';
|
|
2
2
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
3
|
import { ValueAccessorBase } from '../value-acessor-base';
|
|
4
|
+
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
import * as i1 from "@angular/common";
|
|
6
8
|
import * as i2 from "@angular/forms";
|
|
@@ -14,8 +16,21 @@ class InputTextComponent extends ValueAccessorBase {
|
|
|
14
16
|
iconPrefix = '';
|
|
15
17
|
autoComplete = 'on';
|
|
16
18
|
size = 'DEFAULT';
|
|
19
|
+
debounceTime = 0;
|
|
17
20
|
suffixIconClick = new EventEmitter();
|
|
18
21
|
prefixIconClick = new EventEmitter();
|
|
22
|
+
onDebounce = new EventEmitter();
|
|
23
|
+
searchTerms = new Subject();
|
|
24
|
+
ngOnInit() {
|
|
25
|
+
this.searchTerms.pipe(debounceTime(this.debounceTime), distinctUntilChanged()).subscribe((value) => {
|
|
26
|
+
this.onDebounce.emit(value);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
onSearchInput() {
|
|
30
|
+
if (this.debounceTime) {
|
|
31
|
+
this.searchTerms.next(this.value);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
19
34
|
onKeyDown(event) {
|
|
20
35
|
if (event.which === 32) {
|
|
21
36
|
event.target.value += ' ';
|
|
@@ -35,11 +50,11 @@ class InputTextComponent extends ValueAccessorBase {
|
|
|
35
50
|
return this.size === 'DEFAULT';
|
|
36
51
|
}
|
|
37
52
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: InputTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: InputTextComponent, selector: "input-text", inputs: { label: "label", disabled: "disabled", iconSuffix: "iconSuffix", iconPrefix: "iconPrefix", autoComplete: "autoComplete", size: "size" }, outputs: { suffixIconClick: "suffixIconClick", prefixIconClick: "prefixIconClick" }, providers: [{
|
|
53
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: InputTextComponent, selector: "input-text", inputs: { label: "label", disabled: "disabled", iconSuffix: "iconSuffix", iconPrefix: "iconPrefix", autoComplete: "autoComplete", size: "size", debounceTime: "debounceTime" }, outputs: { suffixIconClick: "suffixIconClick", prefixIconClick: "prefixIconClick", onDebounce: "onDebounce" }, providers: [{
|
|
39
54
|
provide: NG_VALUE_ACCESSOR,
|
|
40
55
|
useExisting: forwardRef(() => InputTextComponent),
|
|
41
56
|
multi: true
|
|
42
|
-
}], usesInheritance: true, ngImport: i0, template: "<mat-form-field class=\"apipass-input-text\" [ngClass]=\"{'apipass-input-text-slim': isSlim(), 'apipass-input-text': isDefault()}\" appearance=\"outline\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-icon class=\"mat-icon-prefix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matPrefix *ngIf=\"iconPrefix\" (click)=\"prefixClick()\">{{iconPrefix}}</mat-icon>\n <input matInput type=\"text\" class=\"input-text\" [(ngModel)]=\"value\" [disabled]=\"disabled\" [autocomplete]=\"autoComplete\" />\n <mat-icon class=\"mat-icon-suffix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matSuffix *ngIf=\"iconSuffix\" (click)=\"suffixClick()\">{{iconSuffix}}</mat-icon>\n</mat-form-field>\n", styles: [".apipass-input-text{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
57
|
+
}], usesInheritance: true, ngImport: i0, template: "<mat-form-field class=\"apipass-input-text\" [ngClass]=\"{'apipass-input-text-slim': isSlim(), 'apipass-input-text': isDefault()}\" appearance=\"outline\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-icon class=\"mat-icon-prefix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matPrefix *ngIf=\"iconPrefix\" (click)=\"prefixClick()\">{{iconPrefix}}</mat-icon>\n <input matInput type=\"text\" class=\"input-text\" [(ngModel)]=\"value\" [disabled]=\"disabled\" [autocomplete]=\"autoComplete\"\n (input)=\"onSearchInput()\" />\n <mat-icon class=\"mat-icon-suffix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matSuffix *ngIf=\"iconSuffix\" (click)=\"suffixClick()\">{{iconSuffix}}</mat-icon>\n</mat-form-field>\n", styles: [".apipass-input-text{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
43
58
|
}
|
|
44
59
|
export { InputTextComponent };
|
|
45
60
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: InputTextComponent, decorators: [{
|
|
@@ -48,7 +63,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
|
48
63
|
provide: NG_VALUE_ACCESSOR,
|
|
49
64
|
useExisting: forwardRef(() => InputTextComponent),
|
|
50
65
|
multi: true
|
|
51
|
-
}], encapsulation: ViewEncapsulation.None, template: "<mat-form-field class=\"apipass-input-text\" [ngClass]=\"{'apipass-input-text-slim': isSlim(), 'apipass-input-text': isDefault()}\" appearance=\"outline\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-icon class=\"mat-icon-prefix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matPrefix *ngIf=\"iconPrefix\" (click)=\"prefixClick()\">{{iconPrefix}}</mat-icon>\n <input matInput type=\"text\" class=\"input-text\" [(ngModel)]=\"value\" [disabled]=\"disabled\" [autocomplete]=\"autoComplete\" />\n <mat-icon class=\"mat-icon-suffix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matSuffix *ngIf=\"iconSuffix\" (click)=\"suffixClick()\">{{iconSuffix}}</mat-icon>\n</mat-form-field>\n", styles: [".apipass-input-text{width:100%}\n"] }]
|
|
66
|
+
}], encapsulation: ViewEncapsulation.None, template: "<mat-form-field class=\"apipass-input-text\" [ngClass]=\"{'apipass-input-text-slim': isSlim(), 'apipass-input-text': isDefault()}\" appearance=\"outline\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-icon class=\"mat-icon-prefix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matPrefix *ngIf=\"iconPrefix\" (click)=\"prefixClick()\">{{iconPrefix}}</mat-icon>\n <input matInput type=\"text\" class=\"input-text\" [(ngModel)]=\"value\" [disabled]=\"disabled\" [autocomplete]=\"autoComplete\"\n (input)=\"onSearchInput()\" />\n <mat-icon class=\"mat-icon-suffix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matSuffix *ngIf=\"iconSuffix\" (click)=\"suffixClick()\">{{iconSuffix}}</mat-icon>\n</mat-form-field>\n", styles: [".apipass-input-text{width:100%}\n"] }]
|
|
52
67
|
}], propDecorators: { label: [{
|
|
53
68
|
type: Input
|
|
54
69
|
}], disabled: [{
|
|
@@ -61,9 +76,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
|
61
76
|
type: Input
|
|
62
77
|
}], size: [{
|
|
63
78
|
type: Input
|
|
79
|
+
}], debounceTime: [{
|
|
80
|
+
type: Input
|
|
64
81
|
}], suffixIconClick: [{
|
|
65
82
|
type: Output
|
|
66
83
|
}], prefixIconClick: [{
|
|
67
84
|
type: Output
|
|
85
|
+
}], onDebounce: [{
|
|
86
|
+
type: Output
|
|
68
87
|
}] } });
|
|
69
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
88
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtdGV4dC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9pbnB1dHMvc3JjL2lucHV0LXRleHQvaW5wdXQtdGV4dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9pbnB1dHMvc3JjL2lucHV0LXRleHQvaW5wdXQtdGV4dC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxVQUFVLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRS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pfVwiIGFwcGVhcmFuY2U9XCJvdXRsaW5lXCI+XG4gIDxtYXQtbGFiZWwgKm5nSWY9XCJsYWJlbFwiPnt7bGFiZWx9fTwvbWF0LWxhYmVsPlxuICA8bWF0LWljb24gY2xhc3M9XCJtYXQtaWNvbi1wcmVmaXhcIiBbbmdDbGFzc109XCJ7J21hdC1pY29uLXNsaW0nOiBpc1NsaW0oKX1cIiBtYXRQcmVmaXggKm5nSWY9XCJpY29uUHJlZml4XCIgKGNsaWNrKT1cInByZWZpeENsaWNrKClcIj57e2ljb25QcmVmaXh9fTwvbWF0LWljb24+XG4gIDxpbnB1dCBtYXRJbnB1dCB0eXBlPVwidGV4dFwiIGNsYXNzPVwiaW5wdXQtdGV4dFwiIFsobmdNb2RlbCldPVwidmFsdWVcIiBbZGlzYWJsZWRdPVwiZGlzYWJsZWRcIiBbYXV0b2NvbXBsZXRlXT1cImF1dG9Db21wbGV0ZVwiXG4gICAgKGlucHV0KT1cIm9uU2VhcmNoSW5wdXQoKVwiIC8+XG4gIDxtYXQtaWNvbiBjbGFzcz1cIm1hdC1pY29uLXN1ZmZpeFwiIFtuZ0NsYXNzXT1cInsnbWF0LWljb24tc2xpbSc6IGlzU2xpbSgpfVwiIG1hdFN1ZmZpeCAqbmdJZj1cImljb25TdWZmaXhcIiAoY2xpY2spPVwic3VmZml4Q2xpY2soKVwiPnt7aWNvblN1ZmZpeH19PC9tYXQtaWNvbj5cbjwvbWF0LWZvcm0tZmllbGQ+XG4iXX0=
|
|
@@ -21,10 +21,10 @@ import * as i5 from '@angular/material/icon';
|
|
|
21
21
|
import { MatIconModule } from '@angular/material/icon';
|
|
22
22
|
import * as i3$1 from '@angular/material/tooltip';
|
|
23
23
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
24
|
+
import { debounceTime, distinctUntilChanged, takeUntil, tap, skip } from 'rxjs/operators';
|
|
25
|
+
import { Subject, fromEvent } from 'rxjs';
|
|
24
26
|
import * as i2$1 from '@apipass/icons';
|
|
25
27
|
import { IconsModule } from '@apipass/icons';
|
|
26
|
-
import { Subject, fromEvent } from 'rxjs';
|
|
27
|
-
import { debounceTime, distinctUntilChanged, takeUntil, tap, skip } from 'rxjs/operators';
|
|
28
28
|
import * as i3$2 from '@ng-select/ng-select';
|
|
29
29
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
30
30
|
import * as i1$2 from '@angular/cdk/overlay';
|
|
@@ -129,8 +129,21 @@ class InputTextComponent extends ValueAccessorBase {
|
|
|
129
129
|
iconPrefix = '';
|
|
130
130
|
autoComplete = 'on';
|
|
131
131
|
size = 'DEFAULT';
|
|
132
|
+
debounceTime = 0;
|
|
132
133
|
suffixIconClick = new EventEmitter();
|
|
133
134
|
prefixIconClick = new EventEmitter();
|
|
135
|
+
onDebounce = new EventEmitter();
|
|
136
|
+
searchTerms = new Subject();
|
|
137
|
+
ngOnInit() {
|
|
138
|
+
this.searchTerms.pipe(debounceTime(this.debounceTime), distinctUntilChanged()).subscribe((value) => {
|
|
139
|
+
this.onDebounce.emit(value);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
onSearchInput() {
|
|
143
|
+
if (this.debounceTime) {
|
|
144
|
+
this.searchTerms.next(this.value);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
134
147
|
onKeyDown(event) {
|
|
135
148
|
if (event.which === 32) {
|
|
136
149
|
event.target.value += ' ';
|
|
@@ -150,11 +163,11 @@ class InputTextComponent extends ValueAccessorBase {
|
|
|
150
163
|
return this.size === 'DEFAULT';
|
|
151
164
|
}
|
|
152
165
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: InputTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
153
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: InputTextComponent, selector: "input-text", inputs: { label: "label", disabled: "disabled", iconSuffix: "iconSuffix", iconPrefix: "iconPrefix", autoComplete: "autoComplete", size: "size" }, outputs: { suffixIconClick: "suffixIconClick", prefixIconClick: "prefixIconClick" }, providers: [{
|
|
166
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: InputTextComponent, selector: "input-text", inputs: { label: "label", disabled: "disabled", iconSuffix: "iconSuffix", iconPrefix: "iconPrefix", autoComplete: "autoComplete", size: "size", debounceTime: "debounceTime" }, outputs: { suffixIconClick: "suffixIconClick", prefixIconClick: "prefixIconClick", onDebounce: "onDebounce" }, providers: [{
|
|
154
167
|
provide: NG_VALUE_ACCESSOR,
|
|
155
168
|
useExisting: forwardRef(() => InputTextComponent),
|
|
156
169
|
multi: true
|
|
157
|
-
}], usesInheritance: true, ngImport: i0, template: "<mat-form-field class=\"apipass-input-text\" [ngClass]=\"{'apipass-input-text-slim': isSlim(), 'apipass-input-text': isDefault()}\" appearance=\"outline\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-icon class=\"mat-icon-prefix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matPrefix *ngIf=\"iconPrefix\" (click)=\"prefixClick()\">{{iconPrefix}}</mat-icon>\n <input matInput type=\"text\" class=\"input-text\" [(ngModel)]=\"value\" [disabled]=\"disabled\" [autocomplete]=\"autoComplete\" />\n <mat-icon class=\"mat-icon-suffix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matSuffix *ngIf=\"iconSuffix\" (click)=\"suffixClick()\">{{iconSuffix}}</mat-icon>\n</mat-form-field>\n", styles: [".apipass-input-text{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
170
|
+
}], usesInheritance: true, ngImport: i0, template: "<mat-form-field class=\"apipass-input-text\" [ngClass]=\"{'apipass-input-text-slim': isSlim(), 'apipass-input-text': isDefault()}\" appearance=\"outline\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-icon class=\"mat-icon-prefix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matPrefix *ngIf=\"iconPrefix\" (click)=\"prefixClick()\">{{iconPrefix}}</mat-icon>\n <input matInput type=\"text\" class=\"input-text\" [(ngModel)]=\"value\" [disabled]=\"disabled\" [autocomplete]=\"autoComplete\"\n (input)=\"onSearchInput()\" />\n <mat-icon class=\"mat-icon-suffix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matSuffix *ngIf=\"iconSuffix\" (click)=\"suffixClick()\">{{iconSuffix}}</mat-icon>\n</mat-form-field>\n", styles: [".apipass-input-text{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
158
171
|
}
|
|
159
172
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: InputTextComponent, decorators: [{
|
|
160
173
|
type: Component,
|
|
@@ -162,7 +175,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
|
162
175
|
provide: NG_VALUE_ACCESSOR,
|
|
163
176
|
useExisting: forwardRef(() => InputTextComponent),
|
|
164
177
|
multi: true
|
|
165
|
-
}], encapsulation: ViewEncapsulation.None, template: "<mat-form-field class=\"apipass-input-text\" [ngClass]=\"{'apipass-input-text-slim': isSlim(), 'apipass-input-text': isDefault()}\" appearance=\"outline\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-icon class=\"mat-icon-prefix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matPrefix *ngIf=\"iconPrefix\" (click)=\"prefixClick()\">{{iconPrefix}}</mat-icon>\n <input matInput type=\"text\" class=\"input-text\" [(ngModel)]=\"value\" [disabled]=\"disabled\" [autocomplete]=\"autoComplete\" />\n <mat-icon class=\"mat-icon-suffix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matSuffix *ngIf=\"iconSuffix\" (click)=\"suffixClick()\">{{iconSuffix}}</mat-icon>\n</mat-form-field>\n", styles: [".apipass-input-text{width:100%}\n"] }]
|
|
178
|
+
}], encapsulation: ViewEncapsulation.None, template: "<mat-form-field class=\"apipass-input-text\" [ngClass]=\"{'apipass-input-text-slim': isSlim(), 'apipass-input-text': isDefault()}\" appearance=\"outline\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-icon class=\"mat-icon-prefix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matPrefix *ngIf=\"iconPrefix\" (click)=\"prefixClick()\">{{iconPrefix}}</mat-icon>\n <input matInput type=\"text\" class=\"input-text\" [(ngModel)]=\"value\" [disabled]=\"disabled\" [autocomplete]=\"autoComplete\"\n (input)=\"onSearchInput()\" />\n <mat-icon class=\"mat-icon-suffix\" [ngClass]=\"{'mat-icon-slim': isSlim()}\" matSuffix *ngIf=\"iconSuffix\" (click)=\"suffixClick()\">{{iconSuffix}}</mat-icon>\n</mat-form-field>\n", styles: [".apipass-input-text{width:100%}\n"] }]
|
|
166
179
|
}], propDecorators: { label: [{
|
|
167
180
|
type: Input
|
|
168
181
|
}], disabled: [{
|
|
@@ -175,10 +188,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
|
175
188
|
type: Input
|
|
176
189
|
}], size: [{
|
|
177
190
|
type: Input
|
|
191
|
+
}], debounceTime: [{
|
|
192
|
+
type: Input
|
|
178
193
|
}], suffixIconClick: [{
|
|
179
194
|
type: Output
|
|
180
195
|
}], prefixIconClick: [{
|
|
181
196
|
type: Output
|
|
197
|
+
}], onDebounce: [{
|
|
198
|
+
type: Output
|
|
182
199
|
}] } });
|
|
183
200
|
|
|
184
201
|
class InputAvatarComponent {
|