UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

56 lines (55 loc) 2.15 kB
/** * DevExtreme (esm/__internal/ui/button/generated_wrapper.js) * Version: 24.2.6 * Build date: Mon Mar 17 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import registerComponent from "../../../core/component_registrator"; import { Button as ButtonComponent, defaultOptions } from "./button"; import BaseComponent from "./wrapper"; export default class Button extends BaseComponent { getProps() { const props = super.getProps(); props.onKeyDown = this._wrapKeyDownHandler(props.onKeyDown); return props } focus() { let _this$viewRef; return null === (_this$viewRef = this.viewRef) || void 0 === _this$viewRef ? void 0 : _this$viewRef.focus(...arguments) } activate() { let _this$viewRef2; return null === (_this$viewRef2 = this.viewRef) || void 0 === _this$viewRef2 ? void 0 : _this$viewRef2.activate(...arguments) } deactivate() { let _this$viewRef3; return null === (_this$viewRef3 = this.viewRef) || void 0 === _this$viewRef3 ? void 0 : _this$viewRef3.deactivate(...arguments) } _getActionConfigs() { return { onClick: { excludeValidators: ["readOnly"] }, onSubmit: {} } } get _propsInfo() { return { twoWay: [], allowNull: [], elements: ["onSubmit"], templates: ["template", "iconTemplate"], props: ["activeStateEnabled", "hoverStateEnabled", "icon", "iconPosition", "onClick", "onSubmit", "pressed", "stylingMode", "template", "iconTemplate", "text", "type", "useInkRipple", "useSubmitBehavior", "templateData", "className", "accessKey", "disabled", "focusStateEnabled", "height", "hint", "onKeyDown", "rtlEnabled", "tabIndex", "visible", "width"] } } get _viewComponent() { return ButtonComponent } } registerComponent("dxButton", Button); Button.defaultOptions = defaultOptions;