@progress/kendo-angular-inputs
Version:
Kendo UI for Angular Inputs Package - Everything you need to build professional form functionality (Checkbox, ColorGradient, ColorPalette, ColorPicker, FlatColorPicker, FormField, MaskedTextBox, NumericTextBox, RadioButton, RangeSlider, Slider, Switch, Te
113 lines (112 loc) • 5.64 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, HostBinding, EventEmitter, Output, ElementRef, ViewChild, Input } from '@angular/core';
import { LocalizationService } from '@progress/kendo-angular-l10n';
import { ButtonComponent } from '@progress/kendo-angular-buttons';
import * as i0 from "@angular/core";
import * as i1 from "@progress/kendo-angular-l10n";
/**
* @hidden
*/
export class FlatColorPickerActionButtonsComponent {
localizationService;
hostClasses = true;
innerTabIndex = -1;
size;
actionButtonClick = new EventEmitter();
tabOut = new EventEmitter();
firstButton;
lastButton;
constructor(localizationService) {
this.localizationService = localizationService;
}
getText(text) {
return this.localizationService.get(text);
}
onActionButtonClick(type, ev) {
const args = {
target: type,
originalEvent: ev
};
this.actionButtonClick.emit(args);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatColorPickerActionButtonsComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FlatColorPickerActionButtonsComponent, isStandalone: true, selector: "[kendoFlatColorPickerActionButtons]", inputs: { innerTabIndex: "innerTabIndex", size: "size" }, outputs: { actionButtonClick: "actionButtonClick", tabOut: "tabOut" }, host: { properties: { "class.k-coloreditor-footer": "this.hostClasses", "class.k-actions": "this.hostClasses", "class.k-actions-horizontal": "this.hostClasses" } }, viewQueries: [{ propertyName: "firstButton", first: true, predicate: ["first"], descendants: true, read: ElementRef }, { propertyName: "lastButton", first: true, predicate: ["last"], descendants: true, read: ElementRef }], ngImport: i0, template: `
<button
kendoButton
class="k-coloreditor-cancel"
[ ]="size"
[ ]="getText('cancelButton')"
(click)="onActionButtonClick('cancel', $event)"
type="button"
[ ]="innerTabIndex.toString()"
>{{getText('cancelButton')}}</button>
<button
kendoButton
themeColor="primary"
[ ]="size"
class="k-coloreditor-apply"
[ ]="getText('applyButton')"
(click)="onActionButtonClick('apply', $event)"
type="button"
[ ]="innerTabIndex.toString()"
(keydown.tab)="$event.preventDefault(); tabOut.emit();"
>{{getText('applyButton')}}</button>
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatColorPickerActionButtonsComponent, decorators: [{
type: Component,
args: [{
// eslint-disable-next-line @angular-eslint/component-selector
selector: '[kendoFlatColorPickerActionButtons]',
template: `
<button
kendoButton
class="k-coloreditor-cancel"
[ ]="size"
[ ]="getText('cancelButton')"
(click)="onActionButtonClick('cancel', $event)"
type="button"
[ ]="innerTabIndex.toString()"
>{{getText('cancelButton')}}</button>
<button
kendoButton
themeColor="primary"
[ ]="size"
class="k-coloreditor-apply"
[ ]="getText('applyButton')"
(click)="onActionButtonClick('apply', $event)"
type="button"
[ ]="innerTabIndex.toString()"
(keydown.tab)="$event.preventDefault(); tabOut.emit();"
>{{getText('applyButton')}}</button>
`,
standalone: true,
imports: [ButtonComponent]
}]
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { hostClasses: [{
type: HostBinding,
args: ['class.k-coloreditor-footer']
}, {
type: HostBinding,
args: ['class.k-actions']
}, {
type: HostBinding,
args: ['class.k-actions-horizontal']
}], innerTabIndex: [{
type: Input
}], size: [{
type: Input
}], actionButtonClick: [{
type: Output
}], tabOut: [{
type: Output
}], firstButton: [{
type: ViewChild,
args: ['first', { read: ElementRef }]
}], lastButton: [{
type: ViewChild,
args: ['last', { read: ElementRef }]
}] } });