@progress/kendo-angular-filter
Version:
Kendo UI Angular Filter
76 lines (75 loc) • 4.89 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* 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 { DatePickerComponent, DatePickerCustomMessagesComponent } from '@progress/kendo-angular-dateinputs';
import { LocalizationService } from '@progress/kendo-angular-l10n';
import { AriaLabelValueDirective } from '../aria-label.directive';
import * as i0 from "@angular/core";
import * as i1 from "@progress/kendo-angular-l10n";
/**
* @hidden
*/
export class FilterDateEditorComponent {
localization;
currentItem;
isDisabled;
format;
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: FilterDateEditorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FilterDateEditorComponent, isStandalone: true, selector: "kendo-filter-date-editor", inputs: { currentItem: "currentItem", isDisabled: "isDisabled", format: "format" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
<kendo-datepicker
[tabindex]="-1"
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
[value]="currentItem.value"
(valueChange)="onValueChange($event)"
[disabled]="isDisabled"
[format]="format">
<kendo-datepicker-messages
[toggle]="messageFor('editorDateToggleText')"
[today]="messageFor('editorDateTodayText')">
</kendo-datepicker-messages>
</kendo-datepicker>
`, isInline: true, dependencies: [{ kind: "component", type: DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "clearButton", "inputAttributes", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "footer", "navigationItemTemplate", "weekDaysFormat", "showOtherMonthDays", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "enableMouseWheel", "allowCaretMode", "autoFill", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "adaptiveTitle", "adaptiveSubtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close", "escape"], exportAs: ["kendo-datepicker"] }, { kind: "directive", type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }, { kind: "component", type: DatePickerCustomMessagesComponent, selector: "kendo-datepicker-messages" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterDateEditorComponent, decorators: [{
type: Component,
args: [{
selector: 'kendo-filter-date-editor',
template: `
<kendo-datepicker
[tabindex]="-1"
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
[value]="currentItem.value"
(valueChange)="onValueChange($event)"
[disabled]="isDisabled"
[format]="format">
<kendo-datepicker-messages
[toggle]="messageFor('editorDateToggleText')"
[today]="messageFor('editorDateTodayText')">
</kendo-datepicker-messages>
</kendo-datepicker>
`,
standalone: true,
imports: [DatePickerComponent, AriaLabelValueDirective, DatePickerCustomMessagesComponent]
}]
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
type: Input
}], isDisabled: [{
type: Input
}], format: [{
type: Input
}], valueChange: [{
type: Output
}] } });