UNPKG

@progress/kendo-angular-filter

Version:
63 lines (62 loc) 3.59 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { LocalizationService } from '@progress/kendo-angular-l10n'; import { AriaLabelValueDirective } from '../aria-label.directive'; import { TextBoxComponent } from '@progress/kendo-angular-inputs'; import * as i0 from "@angular/core"; import * as i1 from "@progress/kendo-angular-l10n"; /** * @hidden */ export class FilterTextEditorComponent { localization; currentItem; isDisabled; valueChange = new EventEmitter(); constructor(localization) { this.localization = localization; } messageFor(key) { return this.localization.get(key); } onValueChange(value) { this.currentItem.value = value; this.valueChange.emit(); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterTextEditorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FilterTextEditorComponent, isStandalone: true, selector: "kendo-filter-text-editor", inputs: { currentItem: "currentItem", isDisabled: "isDisabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: ` <kendo-textbox [tabindex]="-1" [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')" [value]="currentItem.value" (valueChange)="onValueChange($event)" [disabled]="isDisabled"> </kendo-textbox> `, isInline: true, dependencies: [{ kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "directive", type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterTextEditorComponent, decorators: [{ type: Component, args: [{ selector: 'kendo-filter-text-editor', template: ` <kendo-textbox [tabindex]="-1" [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')" [value]="currentItem.value" (valueChange)="onValueChange($event)" [disabled]="isDisabled"> </kendo-textbox> `, standalone: true, imports: [TextBoxComponent, AriaLabelValueDirective] }] }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{ type: Input }], isDisabled: [{ type: Input }], valueChange: [{ type: Output }] } });