2023-09-12 15:07:33 +03:00
|
|
|
<!--
|
|
|
|
|
|
2023-10-19 17:30:02 +03:00
|
|
|
Copyright © 2016-2023 The Thingsboard Authors
|
2023-09-12 15:07:33 +03:00
|
|
|
|
2023-10-19 17:30:02 +03:00
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
2023-09-12 15:07:33 +03:00
|
|
|
|
2023-10-19 17:30:02 +03:00
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
2023-09-12 15:07:33 +03:00
|
|
|
|
2023-10-19 17:30:02 +03:00
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
2023-09-12 15:07:33 +03:00
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
<mat-form-field fxFlex appearance="outline" class="tb-inline-field tb-suffix-show-on-hover" subscriptSizing="dynamic" style="width: 100%">
|
|
|
|
|
<input matInput #nameInput [formControl]="selectionFormControl"
|
|
|
|
|
placeholder="{{ 'widget-config.set' | translate }}"
|
|
|
|
|
(focusin)="onFocus()"
|
|
|
|
|
[matAutocomplete]="optionsAutocomplete">
|
|
|
|
|
<button *ngIf="selectionFormControl.value && !disabled && selectionFormControl.valid"
|
|
|
|
|
type="button"
|
|
|
|
|
class="tb-icon-24"
|
|
|
|
|
matSuffix mat-icon-button aria-label="Clear"
|
|
|
|
|
(click)="clear()">
|
|
|
|
|
<mat-icon class="material-icons">close</mat-icon>
|
|
|
|
|
</button>
|
|
|
|
|
<mat-icon matSuffix
|
|
|
|
|
matTooltipPosition="above"
|
|
|
|
|
matTooltipClass="tb-error-tooltip"
|
|
|
|
|
[matTooltip]="'widget-config.units-required' | translate"
|
|
|
|
|
*ngIf="selectionFormControl.hasError('required')" class="material-icons tb-suffix-show-always tb-error">
|
|
|
|
|
warning
|
|
|
|
|
</mat-icon>
|
|
|
|
|
<mat-autocomplete
|
|
|
|
|
#optionsAutocomplete="matAutocomplete"
|
|
|
|
|
class="tb-autocomplete tb-options-input-autocomplete"
|
|
|
|
|
panelWidth="fit-content">
|
|
|
|
|
<mat-option *ngFor="let option of filteredOptions | async" [value]="option">
|
|
|
|
|
<span class="tb-option-name" fxFlex [innerHTML]="option | highlight:searchText:true:'ig'"></span>
|
|
|
|
|
</mat-option>
|
|
|
|
|
</mat-autocomplete>
|
|
|
|
|
</mat-form-field>
|