@alfresco/aca-content 5.3.0-12276708246 → 5.3.0-12388060796
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/components/search/search-input-control/search-input-control.component.mjs +23 -10
- package/fesm2022/alfresco-aca-content.mjs +19 -7
- package/fesm2022/alfresco-aca-content.mjs.map +1 -1
- package/folder-rules/assets/i18n/de.json +1 -1
- package/lib/components/search/search-input-control/search-input-control.component.d.ts +9 -5
- package/package.json +1 -1
package/esm2022/lib/components/search/search-input-control/search-input-control.component.mjs
CHANGED
|
@@ -21,14 +21,15 @@
|
|
|
21
21
|
* You should have received a copy of the GNU Lesser General Public License
|
|
22
22
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
|
23
23
|
*/
|
|
24
|
-
import { Component,
|
|
24
|
+
import { Component, EventEmitter, Input, Output, ViewEncapsulation, ViewChild, ElementRef, inject, DestroyRef } from '@angular/core';
|
|
25
25
|
import { CommonModule } from '@angular/common';
|
|
26
26
|
import { TranslateModule } from '@ngx-translate/core';
|
|
27
27
|
import { MatButtonModule } from '@angular/material/button';
|
|
28
28
|
import { MatIconModule } from '@angular/material/icon';
|
|
29
29
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
30
30
|
import { MatInputModule } from '@angular/material/input';
|
|
31
|
-
import { FormsModule } from '@angular/forms';
|
|
31
|
+
import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
32
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
32
33
|
import * as i0 from "@angular/core";
|
|
33
34
|
import * as i1 from "@angular/common";
|
|
34
35
|
import * as i2 from "@ngx-translate/core";
|
|
@@ -38,6 +39,7 @@ import * as i5 from "@angular/material/form-field";
|
|
|
38
39
|
import * as i6 from "@angular/material/input";
|
|
39
40
|
import * as i7 from "@angular/forms";
|
|
40
41
|
class SearchInputControlComponent {
|
|
42
|
+
destroyRef = inject(DestroyRef);
|
|
41
43
|
/** Type of the input field to render, e.g. "search" or "text" (default). */
|
|
42
44
|
inputType = 'text';
|
|
43
45
|
/** Emitted when the search is submitted pressing ENTER button.
|
|
@@ -52,12 +54,23 @@ class SearchInputControlComponent {
|
|
|
52
54
|
*/
|
|
53
55
|
searchChange = new EventEmitter();
|
|
54
56
|
searchInput;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
this.
|
|
57
|
+
searchFieldFormControl = new FormControl('');
|
|
58
|
+
get searchTerm() {
|
|
59
|
+
return this.searchFieldFormControl.value.replace('text:', 'TEXT:');
|
|
58
60
|
}
|
|
59
|
-
|
|
60
|
-
this.
|
|
61
|
+
set searchTerm(value) {
|
|
62
|
+
this.searchFieldFormControl.setValue(value);
|
|
63
|
+
}
|
|
64
|
+
ngOnInit() {
|
|
65
|
+
this.searchFieldFormControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((searchTermValue) => {
|
|
66
|
+
this.searchFieldFormControl.markAsTouched();
|
|
67
|
+
this.searchChange.emit(searchTermValue);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
searchSubmit() {
|
|
71
|
+
if (!this.searchFieldFormControl.errors) {
|
|
72
|
+
this.submit.emit(this.searchTerm);
|
|
73
|
+
}
|
|
61
74
|
}
|
|
62
75
|
clear() {
|
|
63
76
|
this.searchTerm = '';
|
|
@@ -67,12 +80,12 @@ class SearchInputControlComponent {
|
|
|
67
80
|
return !!(this.searchTerm && this.searchTerm.length < 2);
|
|
68
81
|
}
|
|
69
82
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SearchInputControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SearchInputControlComponent, isStandalone: true, selector: "app-search-input-control", inputs: { inputType: "inputType" }, outputs: { submit: "submit", searchChange: "searchChange" }, host: { classAttribute: "app-search-control" }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"app-search-container\">\n <mat-form-field class=\"app-input-form-field\" appearance=\"outline\">\n\n <button\n mat-icon-button\n matPrefix\n class=\"app-search-button\"\n (click)=\"searchSubmit(
|
|
83
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SearchInputControlComponent, isStandalone: true, selector: "app-search-input-control", inputs: { inputType: "inputType" }, outputs: { submit: "submit", searchChange: "searchChange" }, host: { classAttribute: "app-search-control" }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"app-search-container\">\n <mat-form-field class=\"app-input-form-field\" appearance=\"outline\">\n\n <button\n mat-icon-button\n matPrefix\n class=\"app-search-button\"\n (click)=\"searchSubmit()\"\n [title]=\"'SEARCH.BUTTON.TOOLTIP' | translate\"\n >\n <mat-icon [attr.aria-label]=\"'SEARCH.BUTTON.ARIA-LABEL' | translate\">search</mat-icon>\n </button>\n\n <input\n matInput\n #searchInput\n [attr.aria-label]=\"'SEARCH.INPUT.ARIA-LABEL' | translate\"\n [type]=\"inputType\"\n id=\"app-control-input\"\n [formControl]=\"searchFieldFormControl\"\n (keyup.enter)=\"searchSubmit()\"\n [placeholder]=\"'SEARCH.INPUT.PLACEHOLDER' | translate\"\n autocomplete=\"off\"\n />\n <div matSuffix>\n <button mat-icon-button (click)=\"clear()\">\n <mat-icon *ngIf=\"searchFieldFormControl.value.length\" class=\"app-suffix-icon\">clear</mat-icon>\n </button>\n </div>\n </mat-form-field>\n</div>\n", styles: [".app-search-container{font-size:16px;box-sizing:border-box;height:64px;display:flex;flex-direction:row;align-items:center}.app-search-container .app-suffix-icon{width:18px;height:18px;font-size:18px}.app-search-container .mdc-notched-outline{display:none}.app-search-container .app-input-form-field{letter-spacing:-.7px;font-size:16px;width:100%;height:64px;line-height:32px}.app-search-container .app-input-form-field-input{letter-spacing:-.7px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.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: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
71
84
|
}
|
|
72
85
|
export { SearchInputControlComponent };
|
|
73
86
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SearchInputControlComponent, decorators: [{
|
|
74
87
|
type: Component,
|
|
75
|
-
args: [{ standalone: true, imports: [CommonModule, TranslateModule, MatButtonModule, MatIconModule, MatFormFieldModule, MatInputModule, FormsModule], selector: 'app-search-input-control', encapsulation: ViewEncapsulation.None, host: { class: 'app-search-control' }, template: "<div class=\"app-search-container\">\n <mat-form-field class=\"app-input-form-field\" appearance=\"outline\">\n\n <button\n mat-icon-button\n matPrefix\n class=\"app-search-button\"\n (click)=\"searchSubmit(
|
|
88
|
+
args: [{ standalone: true, imports: [CommonModule, TranslateModule, MatButtonModule, MatIconModule, MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule], selector: 'app-search-input-control', encapsulation: ViewEncapsulation.None, host: { class: 'app-search-control' }, template: "<div class=\"app-search-container\">\n <mat-form-field class=\"app-input-form-field\" appearance=\"outline\">\n\n <button\n mat-icon-button\n matPrefix\n class=\"app-search-button\"\n (click)=\"searchSubmit()\"\n [title]=\"'SEARCH.BUTTON.TOOLTIP' | translate\"\n >\n <mat-icon [attr.aria-label]=\"'SEARCH.BUTTON.ARIA-LABEL' | translate\">search</mat-icon>\n </button>\n\n <input\n matInput\n #searchInput\n [attr.aria-label]=\"'SEARCH.INPUT.ARIA-LABEL' | translate\"\n [type]=\"inputType\"\n id=\"app-control-input\"\n [formControl]=\"searchFieldFormControl\"\n (keyup.enter)=\"searchSubmit()\"\n [placeholder]=\"'SEARCH.INPUT.PLACEHOLDER' | translate\"\n autocomplete=\"off\"\n />\n <div matSuffix>\n <button mat-icon-button (click)=\"clear()\">\n <mat-icon *ngIf=\"searchFieldFormControl.value.length\" class=\"app-suffix-icon\">clear</mat-icon>\n </button>\n </div>\n </mat-form-field>\n</div>\n", styles: [".app-search-container{font-size:16px;box-sizing:border-box;height:64px;display:flex;flex-direction:row;align-items:center}.app-search-container .app-suffix-icon{width:18px;height:18px;font-size:18px}.app-search-container .mdc-notched-outline{display:none}.app-search-container .app-input-form-field{letter-spacing:-.7px;font-size:16px;width:100%;height:64px;line-height:32px}.app-search-container .app-input-form-field-input{letter-spacing:-.7px}\n"] }]
|
|
76
89
|
}], propDecorators: { inputType: [{
|
|
77
90
|
type: Input
|
|
78
91
|
}],
|
|
@@ -85,4 +98,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
85
98
|
type: ViewChild,
|
|
86
99
|
args: ['searchInput', { static: true }]
|
|
87
100
|
}] } });
|
|
88
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
101
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhcmNoLWlucHV0LWNvbnRyb2wuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYWNhLWNvbnRlbnQvc3JjL2xpYi9jb21wb25lbnRzL3NlYXJjaC9zZWFyY2gtaW5wdXQtY29udHJvbC9zZWFyY2gtaW5wdXQtY29udHJvbC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hY2EtY29udGVudC9zcmMvbGliL2NvbXBvbmVudHMvc2VhcmNoL3NlYXJjaC1pbnB1dC1jb250cm9sL3NlYXJjaC1pbnB1dC1jb250cm9sLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBc0JHO0FBRUgsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxpQkFBaU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XCI+c2VhcmNoPC9tYXQtaWNvbj5cbiAgICA8L2J1dHRvbj5cblxuICAgIDxpbnB1dFxuICAgICAgbWF0SW5wdXRcbiAgICAgICNzZWFyY2hJbnB1dFxuICAgICAgW2F0dHIuYXJpYS1sYWJlbF09XCInU0VBUkNILklOUFVULkFSSUEtTEFCRUwnIHwgdHJhbnNsYXRlXCJcbiAgICAgIFt0eXBlXT1cImlucHV0VHlwZVwiXG4gICAgICBpZD1cImFwcC1jb250cm9sLWlucHV0XCJcbiAgICAgIFtmb3JtQ29udHJvbF09XCJzZWFyY2hGaWVsZEZvcm1Db250cm9sXCJcbiAgICAgIChrZXl1cC5lbnRlcik9XCJzZWFyY2hTdWJtaXQoKVwiXG4gICAgICBbcGxhY2Vob2xkZXJdPVwiJ1NFQVJDSC5JTlBVVC5QTEFDRUhPTERFUicgfCB0cmFuc2xhdGVcIlxuICAgICAgYXV0b2NvbXBsZXRlPVwib2ZmXCJcbiAgICAvPlxuICAgIDxkaXYgbWF0U3VmZml4PlxuICAgICAgPGJ1dHRvbiBtYXQtaWNvbi1idXR0b24gKGNsaWNrKT1cImNsZWFyKClcIj5cbiAgICAgICAgPG1hdC1pY29uICpuZ0lmPVwic2VhcmNoRmllbGRGb3JtQ29udHJvbC52YWx1ZS5sZW5ndGhcIiBjbGFzcz1cImFwcC1zdWZmaXgtaWNvblwiPmNsZWFyPC9tYXQtaWNvbj5cbiAgICAgIDwvYnV0dG9uPlxuICAgIDwvZGl2PlxuICA8L21hdC1mb3JtLWZpZWxkPlxuPC9kaXY+XG4iXX0=
|
|
@@ -6578,6 +6578,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
6578
6578
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
|
6579
6579
|
*/
|
|
6580
6580
|
class SearchInputControlComponent {
|
|
6581
|
+
destroyRef = inject(DestroyRef);
|
|
6581
6582
|
/** Type of the input field to render, e.g. "search" or "text" (default). */
|
|
6582
6583
|
inputType = 'text';
|
|
6583
6584
|
/** Emitted when the search is submitted pressing ENTER button.
|
|
@@ -6592,12 +6593,23 @@ class SearchInputControlComponent {
|
|
|
6592
6593
|
*/
|
|
6593
6594
|
searchChange = new EventEmitter();
|
|
6594
6595
|
searchInput;
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
this.
|
|
6596
|
+
searchFieldFormControl = new FormControl('');
|
|
6597
|
+
get searchTerm() {
|
|
6598
|
+
return this.searchFieldFormControl.value.replace('text:', 'TEXT:');
|
|
6599
|
+
}
|
|
6600
|
+
set searchTerm(value) {
|
|
6601
|
+
this.searchFieldFormControl.setValue(value);
|
|
6602
|
+
}
|
|
6603
|
+
ngOnInit() {
|
|
6604
|
+
this.searchFieldFormControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((searchTermValue) => {
|
|
6605
|
+
this.searchFieldFormControl.markAsTouched();
|
|
6606
|
+
this.searchChange.emit(searchTermValue);
|
|
6607
|
+
});
|
|
6598
6608
|
}
|
|
6599
|
-
|
|
6600
|
-
this.
|
|
6609
|
+
searchSubmit() {
|
|
6610
|
+
if (!this.searchFieldFormControl.errors) {
|
|
6611
|
+
this.submit.emit(this.searchTerm);
|
|
6612
|
+
}
|
|
6601
6613
|
}
|
|
6602
6614
|
clear() {
|
|
6603
6615
|
this.searchTerm = '';
|
|
@@ -6607,11 +6619,11 @@ class SearchInputControlComponent {
|
|
|
6607
6619
|
return !!(this.searchTerm && this.searchTerm.length < 2);
|
|
6608
6620
|
}
|
|
6609
6621
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SearchInputControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6610
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SearchInputControlComponent, isStandalone: true, selector: "app-search-input-control", inputs: { inputType: "inputType" }, outputs: { submit: "submit", searchChange: "searchChange" }, host: { classAttribute: "app-search-control" }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"app-search-container\">\n <mat-form-field class=\"app-input-form-field\" appearance=\"outline\">\n\n <button\n mat-icon-button\n matPrefix\n class=\"app-search-button\"\n (click)=\"searchSubmit(
|
|
6622
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SearchInputControlComponent, isStandalone: true, selector: "app-search-input-control", inputs: { inputType: "inputType" }, outputs: { submit: "submit", searchChange: "searchChange" }, host: { classAttribute: "app-search-control" }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"app-search-container\">\n <mat-form-field class=\"app-input-form-field\" appearance=\"outline\">\n\n <button\n mat-icon-button\n matPrefix\n class=\"app-search-button\"\n (click)=\"searchSubmit()\"\n [title]=\"'SEARCH.BUTTON.TOOLTIP' | translate\"\n >\n <mat-icon [attr.aria-label]=\"'SEARCH.BUTTON.ARIA-LABEL' | translate\">search</mat-icon>\n </button>\n\n <input\n matInput\n #searchInput\n [attr.aria-label]=\"'SEARCH.INPUT.ARIA-LABEL' | translate\"\n [type]=\"inputType\"\n id=\"app-control-input\"\n [formControl]=\"searchFieldFormControl\"\n (keyup.enter)=\"searchSubmit()\"\n [placeholder]=\"'SEARCH.INPUT.PLACEHOLDER' | translate\"\n autocomplete=\"off\"\n />\n <div matSuffix>\n <button mat-icon-button (click)=\"clear()\">\n <mat-icon *ngIf=\"searchFieldFormControl.value.length\" class=\"app-suffix-icon\">clear</mat-icon>\n </button>\n </div>\n </mat-form-field>\n</div>\n", styles: [".app-search-container{font-size:16px;box-sizing:border-box;height:64px;display:flex;flex-direction:row;align-items:center}.app-search-container .app-suffix-icon{width:18px;height:18px;font-size:18px}.app-search-container .mdc-notched-outline{display:none}.app-search-container .app-input-form-field{letter-spacing:-.7px;font-size:16px;width:100%;height:64px;line-height:32px}.app-search-container .app-input-form-field-input{letter-spacing:-.7px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i7$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i7$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i8.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: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
6611
6623
|
}
|
|
6612
6624
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SearchInputControlComponent, decorators: [{
|
|
6613
6625
|
type: Component,
|
|
6614
|
-
args: [{ standalone: true, imports: [CommonModule, TranslateModule, MatButtonModule, MatIconModule, MatFormFieldModule, MatInputModule, FormsModule], selector: 'app-search-input-control', encapsulation: ViewEncapsulation.None, host: { class: 'app-search-control' }, template: "<div class=\"app-search-container\">\n <mat-form-field class=\"app-input-form-field\" appearance=\"outline\">\n\n <button\n mat-icon-button\n matPrefix\n class=\"app-search-button\"\n (click)=\"searchSubmit(
|
|
6626
|
+
args: [{ standalone: true, imports: [CommonModule, TranslateModule, MatButtonModule, MatIconModule, MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule], selector: 'app-search-input-control', encapsulation: ViewEncapsulation.None, host: { class: 'app-search-control' }, template: "<div class=\"app-search-container\">\n <mat-form-field class=\"app-input-form-field\" appearance=\"outline\">\n\n <button\n mat-icon-button\n matPrefix\n class=\"app-search-button\"\n (click)=\"searchSubmit()\"\n [title]=\"'SEARCH.BUTTON.TOOLTIP' | translate\"\n >\n <mat-icon [attr.aria-label]=\"'SEARCH.BUTTON.ARIA-LABEL' | translate\">search</mat-icon>\n </button>\n\n <input\n matInput\n #searchInput\n [attr.aria-label]=\"'SEARCH.INPUT.ARIA-LABEL' | translate\"\n [type]=\"inputType\"\n id=\"app-control-input\"\n [formControl]=\"searchFieldFormControl\"\n (keyup.enter)=\"searchSubmit()\"\n [placeholder]=\"'SEARCH.INPUT.PLACEHOLDER' | translate\"\n autocomplete=\"off\"\n />\n <div matSuffix>\n <button mat-icon-button (click)=\"clear()\">\n <mat-icon *ngIf=\"searchFieldFormControl.value.length\" class=\"app-suffix-icon\">clear</mat-icon>\n </button>\n </div>\n </mat-form-field>\n</div>\n", styles: [".app-search-container{font-size:16px;box-sizing:border-box;height:64px;display:flex;flex-direction:row;align-items:center}.app-search-container .app-suffix-icon{width:18px;height:18px;font-size:18px}.app-search-container .mdc-notched-outline{display:none}.app-search-container .app-input-form-field{letter-spacing:-.7px;font-size:16px;width:100%;height:64px;line-height:32px}.app-search-container .app-input-form-field-input{letter-spacing:-.7px}\n"] }]
|
|
6615
6627
|
}], propDecorators: { inputType: [{
|
|
6616
6628
|
type: Input
|
|
6617
6629
|
}],
|