UNPKG

28.2 kBJavaScriptView Raw
1import * as i0 from '@angular/core';
2import { EventEmitter, forwardRef, ElementRef, Component, ChangeDetectionStrategy, Optional, ViewChild, Input, Output, NgModule } from '@angular/core';
3import * as i7 from '@angular/common';
4import { CommonModule } from '@angular/common';
5import * as i6 from '@angular/forms';
6import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
7import * as i5 from '@angular/material/input';
8import { MatInput, MatInputModule } from '@angular/material/input';
9import * as i4 from '@angular/material/icon';
10import { MatIconModule } from '@angular/material/icon';
11import * as i3 from '@angular/material/button';
12import { MatButtonModule } from '@angular/material/button';
13import { trigger, state, style, transition, animate, AUTO_STYLE } from '@angular/animations';
14import * as i1 from '@angular/cdk/bidi';
15import { Subject, fromEvent, noop } from 'rxjs';
16import { debounceTime, skip, takeUntil } from 'rxjs/operators';
17import { mixinControlValueAccessor } from '@covalent/core/common';
18import * as i2 from '@angular/material/form-field';
19
20class TdSearchInputBase {
21 constructor(_changeDetectorRef) {
22 this._changeDetectorRef = _changeDetectorRef;
23 }
24}
25const _TdSearchInputMixinBase = mixinControlValueAccessor(TdSearchInputBase);
26class TdSearchInputComponent extends _TdSearchInputMixinBase {
27 constructor(_dir, _changeDetectorRef, _ngZone) {
28 super(_changeDetectorRef);
29 this._dir = _dir;
30 this._changeDetectorRef = _changeDetectorRef;
31 this._ngZone = _ngZone;
32 /**
33 * appearance?: MatFormFieldAppearance
34 * Appearance style for the underlying input component.
35 */
36 this.appearance = 'legacy';
37 /**
38 * showUnderline?: boolean
39 * Sets if the input underline should be visible. Defaults to 'false'.
40 */
41 this.showUnderline = false;
42 /**
43 * debounce?: number
44 * Debounce timeout between keypresses. Defaults to 400.
45 */
46 this.debounce = 400;
47 /**
48 * placeholder?: string
49 * Placeholder for the underlying input component.
50 */
51 this.placeholder = '';
52 /**
53 * clearIcon?: string
54 * The icon used to clear the search input.
55 * Defaults to 'cancel' icon.
56 */
57 this.clearIcon = 'cancel';
58 /**
59 * searchDebounce: function($event)
60 * Event emitted after the [debounce] timeout.
61 */
62 this.searchDebounce = new EventEmitter();
63 /**
64 * search: function($event)
65 * Event emitted after the key enter has been pressed.
66 */
67 this.search = new EventEmitter();
68 /**
69 * clear: function()
70 * Event emitted after the clear icon has been clicked.
71 */
72 this.clear = new EventEmitter();
73 /**
74 * blur: function()
75 * Event emitted after the blur event has been called in underlying input.
76 */
77 this.blurSearch = new EventEmitter();
78 this._destroy$ = new Subject();
79 }
80 get isRTL() {
81 if (this._dir) {
82 return this._dir.dir === 'rtl';
83 }
84 return false;
85 }
86 ngOnInit() {
87 this._input?.ngControl?.valueChanges
88 ?.pipe(debounceTime(this.debounce), skip(1), // skip first change when value is set to undefined
89 takeUntil(this._destroy$))
90 .subscribe((value) => {
91 this._searchTermChanged(value);
92 });
93 this._ngZone.runOutsideAngular(() => fromEvent(this._searchElement.nativeElement, 'search')
94 .pipe(takeUntil(this._destroy$))
95 .subscribe(this._stopPropagation));
96 }
97 ngOnDestroy() {
98 this._destroy$.next();
99 }
100 /**
101 * Method to focus to underlying input.
102 */
103 focus() {
104 this._input?.focus();
105 }
106 handleBlur() {
107 this.blurSearch.emit();
108 }
109 handleSearch(event) {
110 this._stopPropagation(event);
111 if (typeof this.value == 'string') {
112 this.search.emit(this.value);
113 }
114 }
115 /**
116 * Method to clear the underlying input.
117 */
118 clearSearch() {
119 this.value = '';
120 this._changeDetectorRef.markForCheck();
121 this.clear.emit();
122 }
123 _searchTermChanged(value) {
124 this.searchDebounce.emit(value);
125 }
126 _stopPropagation(event) {
127 event.stopPropagation();
128 }
129}
130TdSearchInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdSearchInputComponent, deps: [{ token: i1.Dir, optional: true }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
131TdSearchInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TdSearchInputComponent, selector: "td-search-input", inputs: { appearance: "appearance", showUnderline: "showUnderline", debounce: "debounce", placeholder: "placeholder", clearIcon: "clearIcon", value: "value" }, outputs: { searchDebounce: "searchDebounce", search: "search", clear: "clear", blurSearch: "blurSearch" }, providers: [
132 {
133 provide: NG_VALUE_ACCESSOR,
134 useExisting: forwardRef(() => TdSearchInputComponent),
135 multi: true,
136 },
137 ], viewQueries: [{ propertyName: "_input", first: true, predicate: MatInput, descendants: true, static: true }, { propertyName: "_searchElement", first: true, predicate: ["searchElement"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"td-search-input\">\n <mat-form-field\n class=\"td-search-input-field\"\n [class.mat-hide-underline]=\"!showUnderline\"\n [appearance]=\"appearance\"\n floatLabel=\"never\"\n >\n <input\n matInput\n #searchElement\n type=\"search\"\n [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (blur)=\"handleBlur()\"\n (keyup.enter)=\"handleSearch($event)\"\n />\n <span\n matSuffix\n *ngIf=\"\n appearance === 'fill' ||\n appearance === 'outline' ||\n appearance === 'standard'\n \"\n >\n <ng-template [ngTemplateOutlet]=\"clearButton\"></ng-template>\n </span>\n </mat-form-field>\n <ng-template\n *ngIf=\"!appearance || appearance === 'legacy'\"\n [ngTemplateOutlet]=\"clearButton\"\n ></ng-template>\n</div>\n<ng-template #clearButton>\n <button\n mat-icon-button\n class=\"td-search-input-clear\"\n type=\"button\"\n [@searchState]=\"\n searchElement.value ? 'show' : isRTL ? 'hide-left' : 'hide-right'\n \"\n (click)=\"clearSearch()\"\n >\n <mat-icon>{{ clearIcon }}</mat-icon>\n </button>\n</ng-template>\n", styles: [":host .td-search-input{overflow-x:hidden;box-sizing:border-box;display:flex;flex-direction:row;align-items:baseline;align-content:center;max-width:100%;justify-content:flex-end}:host .td-search-input .td-search-input-field{flex:1}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-outline .mat-form-field-wrapper{padding-bottom:0}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-fill .mat-form-field-wrapper{padding-bottom:0}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-fill .mat-form-field-wrapper .mat-form-field-flex{height:52px}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-fill .mat-form-field-wrapper .mat-form-field-underline{bottom:0}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-standard .mat-form-field-wrapper{padding-bottom:0}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-standard .mat-form-field-wrapper .mat-form-field-infix{bottom:.4em}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-standard .mat-form-field-wrapper .mat-form-field-underline{bottom:0}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-legacy .mat-form-field-infix{align-self:center}:host .td-search-input ::ng-deep mat-form-field .mat-input-element{caret-color:currentColor}:host .td-search-input ::ng-deep mat-form-field.mat-hide-underline .mat-form-field-underline{display:none}:host .td-search-input .td-search-input-clear{flex:0 0 auto;align-self:center}\n"], components: [{ type: i2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i5.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"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MatSuffix, selector: "[matSuffix]" }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
138 trigger('searchState', [
139 state('hide-left', style({
140 transform: 'translateX(-150%)',
141 display: 'none',
142 })),
143 state('hide-right', style({
144 transform: 'translateX(150%)',
145 display: 'none',
146 })),
147 state('show', style({
148 transform: 'translateX(0%)',
149 display: 'block',
150 })),
151 transition('* => show', animate('200ms ease-in')),
152 transition('show => *', animate('200ms ease-out')),
153 ]),
154 ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
155i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdSearchInputComponent, decorators: [{
156 type: Component,
157 args: [{ providers: [
158 {
159 provide: NG_VALUE_ACCESSOR,
160 useExisting: forwardRef(() => TdSearchInputComponent),
161 multi: true,
162 },
163 ], selector: 'td-search-input', changeDetection: ChangeDetectionStrategy.OnPush, animations: [
164 trigger('searchState', [
165 state('hide-left', style({
166 transform: 'translateX(-150%)',
167 display: 'none',
168 })),
169 state('hide-right', style({
170 transform: 'translateX(150%)',
171 display: 'none',
172 })),
173 state('show', style({
174 transform: 'translateX(0%)',
175 display: 'block',
176 })),
177 transition('* => show', animate('200ms ease-in')),
178 transition('show => *', animate('200ms ease-out')),
179 ]),
180 ], template: "<div class=\"td-search-input\">\n <mat-form-field\n class=\"td-search-input-field\"\n [class.mat-hide-underline]=\"!showUnderline\"\n [appearance]=\"appearance\"\n floatLabel=\"never\"\n >\n <input\n matInput\n #searchElement\n type=\"search\"\n [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (blur)=\"handleBlur()\"\n (keyup.enter)=\"handleSearch($event)\"\n />\n <span\n matSuffix\n *ngIf=\"\n appearance === 'fill' ||\n appearance === 'outline' ||\n appearance === 'standard'\n \"\n >\n <ng-template [ngTemplateOutlet]=\"clearButton\"></ng-template>\n </span>\n </mat-form-field>\n <ng-template\n *ngIf=\"!appearance || appearance === 'legacy'\"\n [ngTemplateOutlet]=\"clearButton\"\n ></ng-template>\n</div>\n<ng-template #clearButton>\n <button\n mat-icon-button\n class=\"td-search-input-clear\"\n type=\"button\"\n [@searchState]=\"\n searchElement.value ? 'show' : isRTL ? 'hide-left' : 'hide-right'\n \"\n (click)=\"clearSearch()\"\n >\n <mat-icon>{{ clearIcon }}</mat-icon>\n </button>\n</ng-template>\n", styles: [":host .td-search-input{overflow-x:hidden;box-sizing:border-box;display:flex;flex-direction:row;align-items:baseline;align-content:center;max-width:100%;justify-content:flex-end}:host .td-search-input .td-search-input-field{flex:1}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-outline .mat-form-field-wrapper{padding-bottom:0}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-fill .mat-form-field-wrapper{padding-bottom:0}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-fill .mat-form-field-wrapper .mat-form-field-flex{height:52px}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-fill .mat-form-field-wrapper .mat-form-field-underline{bottom:0}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-standard .mat-form-field-wrapper{padding-bottom:0}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-standard .mat-form-field-wrapper .mat-form-field-infix{bottom:.4em}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-standard .mat-form-field-wrapper .mat-form-field-underline{bottom:0}:host .td-search-input ::ng-deep mat-form-field.mat-form-field-appearance-legacy .mat-form-field-infix{align-self:center}:host .td-search-input ::ng-deep mat-form-field .mat-input-element{caret-color:currentColor}:host .td-search-input ::ng-deep mat-form-field.mat-hide-underline .mat-form-field-underline{display:none}:host .td-search-input .td-search-input-clear{flex:0 0 auto;align-self:center}\n"] }]
181 }], ctorParameters: function () { return [{ type: i1.Dir, decorators: [{
182 type: Optional
183 }] }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; }, propDecorators: { _input: [{
184 type: ViewChild,
185 args: [MatInput, { static: true }]
186 }], _searchElement: [{
187 type: ViewChild,
188 args: ['searchElement', { static: true, read: ElementRef }]
189 }], appearance: [{
190 type: Input
191 }], showUnderline: [{
192 type: Input
193 }], debounce: [{
194 type: Input
195 }], placeholder: [{
196 type: Input
197 }], clearIcon: [{
198 type: Input
199 }], value: [{
200 type: Input
201 }], searchDebounce: [{
202 type: Output
203 }], search: [{
204 type: Output
205 }], clear: [{
206 type: Output
207 }], blurSearch: [{
208 type: Output
209 }] } });
210
211class TdSearchBoxBase {
212 constructor(_changeDetectorRef) {
213 this._changeDetectorRef = _changeDetectorRef;
214 }
215}
216class TdSearchBoxComponent {
217 constructor(_changeDetectorRef) {
218 this._changeDetectorRef = _changeDetectorRef;
219 this._searchVisible = false;
220 /**
221 * backIcon?: string
222 * The icon used to close the search toggle, only shown when [alwaysVisible] is false.
223 * Defaults to 'search' icon.
224 */
225 this.backIcon = 'search';
226 /**
227 * searchIcon?: string
228 * The icon used to open/focus the search toggle.
229 * Defaults to 'search' icon.
230 */
231 this.searchIcon = 'search';
232 /**
233 * clearIcon?: string
234 * The icon used to clear the search input.
235 * Defaults to 'cancel' icon.
236 */
237 this.clearIcon = 'cancel';
238 /**
239 * showUnderline?: boolean
240 * Sets if the input underline should be visible. Defaults to 'false'.
241 */
242 this.showUnderline = false;
243 /**
244 * debounce?: number
245 * Debounce timeout between keypresses. Defaults to 400.
246 */
247 this.debounce = 400;
248 /**
249 * alwaysVisible?: boolean
250 * Sets if the input should always be visible. Defaults to 'false'.
251 */
252 this.alwaysVisible = false;
253 /**
254 * placeholder?: string
255 * Placeholder for the underlying input component.
256 */
257 this.placeholder = '';
258 /**
259 * searchDebounce: function($event)
260 * Event emitted after the [debounce] timeout.
261 */
262 this.searchDebounce = new EventEmitter();
263 /**
264 * search: function($event)
265 * Event emitted after the key enter has been pressed.
266 */
267 this.search = new EventEmitter();
268 /**
269 * clear: function()
270 * Event emitted after the clear icon has been clicked.
271 */
272 this.clear = new EventEmitter();
273 /**
274 * blur: function()
275 * Event emitted after the blur event has been called in underlying input.
276 */
277 this.blurSearch = new EventEmitter();
278 }
279 get searchVisible() {
280 return this._searchVisible;
281 }
282 writeValue(value) {
283 this.value = value;
284 this._changeDetectorRef.markForCheck();
285 }
286 registerOnChange() {
287 noop;
288 }
289 registerOnTouched() {
290 noop;
291 }
292 /**
293 * Method executed when the search icon is clicked.
294 */
295 searchClicked() {
296 if (!this.alwaysVisible && this._searchVisible) {
297 this.value = '';
298 this.handleClear();
299 }
300 else if (this.alwaysVisible || !this._searchVisible) {
301 this._searchInput?.focus();
302 }
303 this.toggleVisibility();
304 }
305 toggleVisibility() {
306 this._searchVisible = !this._searchVisible;
307 this._changeDetectorRef.markForCheck();
308 }
309 handleSearchDebounce(value) {
310 this.searchDebounce.emit(value);
311 }
312 handleSearch(value) {
313 this.search.emit(value);
314 }
315 handleClear() {
316 this.clear.emit();
317 }
318 handleBlur() {
319 this.blurSearch.emit();
320 }
321}
322TdSearchBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdSearchBoxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
323TdSearchBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TdSearchBoxComponent, selector: "td-search-box", inputs: { backIcon: "backIcon", searchIcon: "searchIcon", clearIcon: "clearIcon", showUnderline: "showUnderline", debounce: "debounce", alwaysVisible: "alwaysVisible", placeholder: "placeholder", value: "value" }, outputs: { searchDebounce: "searchDebounce", search: "search", clear: "clear", blurSearch: "blurSearch" }, providers: [
324 {
325 provide: NG_VALUE_ACCESSOR,
326 useExisting: forwardRef(() => TdSearchBoxComponent),
327 multi: true,
328 },
329 ], viewQueries: [{ propertyName: "_searchInput", first: true, predicate: TdSearchInputComponent, descendants: true, static: true }], ngImport: i0, template: "<div class=\"td-search-box\">\n <button\n mat-icon-button\n type=\"button\"\n class=\"td-search-icon\"\n (click)=\"searchClicked()\"\n >\n <mat-icon *ngIf=\"searchVisible && !alwaysVisible\">{{ backIcon }}</mat-icon>\n <mat-icon *ngIf=\"!searchVisible || alwaysVisible\">{{\n searchIcon\n }}</mat-icon>\n </button>\n <td-search-input\n #searchInput\n [@inputState]=\"alwaysVisible || searchVisible\"\n [debounce]=\"debounce\"\n [(ngModel)]=\"value\"\n [showUnderline]=\"showUnderline\"\n [placeholder]=\"placeholder\"\n [clearIcon]=\"clearIcon\"\n (searchDebounce)=\"handleSearchDebounce($event)\"\n (search)=\"handleSearch($event)\"\n (clear)=\"handleClear(); toggleVisibility()\"\n (blur)=\"handleBlur()\"\n ></td-search-input>\n</div>\n", styles: [":host{display:block}.td-search-box{box-sizing:border-box;display:flex;flex-direction:row;align-items:baseline;align-content:center;max-width:100%;justify-content:flex-end}.td-search-box .td-search-icon{flex:0 0 auto;align-self:center}.td-search-box td-search-input{margin-left:12px}::ng-deep [dir=rtl] .td-search-box td-search-input{margin-right:12px;margin-left:0!important}.td-search-box td-search-input ::ng-deep .mat-form.field.mat-form-field-appearance-legacy .mat-form-field-wrapper{padding-bottom:1em}\n"], components: [{ type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: TdSearchInputComponent, selector: "td-search-input", inputs: ["appearance", "showUnderline", "debounce", "placeholder", "clearIcon", "value"], outputs: ["searchDebounce", "search", "clear", "blurSearch"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [
330 trigger('inputState', [
331 state('0', style({
332 width: '0%',
333 margin: '0px',
334 })),
335 state('1', style({
336 width: '100%',
337 margin: AUTO_STYLE,
338 })),
339 transition('0 => 1', animate('200ms ease-in')),
340 transition('1 => 0', animate('200ms ease-out')),
341 ]),
342 ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
343i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdSearchBoxComponent, decorators: [{
344 type: Component,
345 args: [{ providers: [
346 {
347 provide: NG_VALUE_ACCESSOR,
348 useExisting: forwardRef(() => TdSearchBoxComponent),
349 multi: true,
350 },
351 ], selector: 'td-search-box', changeDetection: ChangeDetectionStrategy.OnPush, animations: [
352 trigger('inputState', [
353 state('0', style({
354 width: '0%',
355 margin: '0px',
356 })),
357 state('1', style({
358 width: '100%',
359 margin: AUTO_STYLE,
360 })),
361 transition('0 => 1', animate('200ms ease-in')),
362 transition('1 => 0', animate('200ms ease-out')),
363 ]),
364 ], template: "<div class=\"td-search-box\">\n <button\n mat-icon-button\n type=\"button\"\n class=\"td-search-icon\"\n (click)=\"searchClicked()\"\n >\n <mat-icon *ngIf=\"searchVisible && !alwaysVisible\">{{ backIcon }}</mat-icon>\n <mat-icon *ngIf=\"!searchVisible || alwaysVisible\">{{\n searchIcon\n }}</mat-icon>\n </button>\n <td-search-input\n #searchInput\n [@inputState]=\"alwaysVisible || searchVisible\"\n [debounce]=\"debounce\"\n [(ngModel)]=\"value\"\n [showUnderline]=\"showUnderline\"\n [placeholder]=\"placeholder\"\n [clearIcon]=\"clearIcon\"\n (searchDebounce)=\"handleSearchDebounce($event)\"\n (search)=\"handleSearch($event)\"\n (clear)=\"handleClear(); toggleVisibility()\"\n (blur)=\"handleBlur()\"\n ></td-search-input>\n</div>\n", styles: [":host{display:block}.td-search-box{box-sizing:border-box;display:flex;flex-direction:row;align-items:baseline;align-content:center;max-width:100%;justify-content:flex-end}.td-search-box .td-search-icon{flex:0 0 auto;align-self:center}.td-search-box td-search-input{margin-left:12px}::ng-deep [dir=rtl] .td-search-box td-search-input{margin-right:12px;margin-left:0!important}.td-search-box td-search-input ::ng-deep .mat-form.field.mat-form-field-appearance-legacy .mat-form-field-wrapper{padding-bottom:1em}\n"] }]
365 }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { _searchInput: [{
366 type: ViewChild,
367 args: [TdSearchInputComponent, { static: true }]
368 }], backIcon: [{
369 type: Input
370 }], searchIcon: [{
371 type: Input
372 }], clearIcon: [{
373 type: Input
374 }], showUnderline: [{
375 type: Input
376 }], debounce: [{
377 type: Input
378 }], alwaysVisible: [{
379 type: Input
380 }], placeholder: [{
381 type: Input
382 }], value: [{
383 type: Input
384 }], searchDebounce: [{
385 type: Output
386 }], search: [{
387 type: Output
388 }], clear: [{
389 type: Output
390 }], blurSearch: [{
391 type: Output
392 }] } });
393
394class CovalentSearchModule {
395}
396CovalentSearchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSearchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
397CovalentSearchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSearchModule, declarations: [TdSearchInputComponent, TdSearchBoxComponent], imports: [FormsModule,
398 CommonModule,
399 MatInputModule,
400 MatIconModule,
401 MatButtonModule], exports: [TdSearchInputComponent, TdSearchBoxComponent] });
402CovalentSearchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSearchModule, imports: [[
403 FormsModule,
404 CommonModule,
405 MatInputModule,
406 MatIconModule,
407 MatButtonModule,
408 ]] });
409i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSearchModule, decorators: [{
410 type: NgModule,
411 args: [{
412 imports: [
413 FormsModule,
414 CommonModule,
415 MatInputModule,
416 MatIconModule,
417 MatButtonModule,
418 ],
419 declarations: [TdSearchInputComponent, TdSearchBoxComponent],
420 exports: [TdSearchInputComponent, TdSearchBoxComponent],
421 }]
422 }] });
423
424/**
425 * Generated bundle index. Do not edit.
426 */
427
428export { CovalentSearchModule, TdSearchBoxBase, TdSearchBoxComponent, TdSearchInputBase, TdSearchInputComponent, _TdSearchInputMixinBase };
429//# sourceMappingURL=covalent-core-search.mjs.map