UNPKG

devextreme

Version:

JavaScript/TypeScript Component Suite for Responsive Web Development

48 lines (47 loc) 1.57 kB
/** * DevExtreme (esm/__internal/scheduler/appointments_new/view_item.js) * Version: 25.2.8 * Build date: Mon Jun 08 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import DOMComponent from "../../core/widget/dom_component"; import { focus, keyboard } from "../../events/m_short"; export const EVENTS_NAMESPACE = { namespace: "dxSchedulerViewItem" }; export class ViewItem extends DOMComponent { _getSynchronizableOptionsForCreateComponent() { return super._getSynchronizableOptionsForCreateComponent() } _dispose() { super._dispose(); focus.off(this.$element(), EVENTS_NAMESPACE); keyboard.off(this.keyboardListenerId) } resize(geometry) {} setTabIndex(tabIndex) { this.option("tabIndex", tabIndex) } attachFocusEvents() { focus.off(this.$element(), EVENTS_NAMESPACE); focus.on(this.$element(), this.onFocusIn.bind(this), this.onFocusOut.bind(this), EVENTS_NAMESPACE) } attachKeydownEvents() { keyboard.off(this.keyboardListenerId); this.keyboardListenerId = keyboard.on(this.$element(), this.$element(), this.onKeyDown.bind(this)) } onFocusIn() { this.option().onFocusIn(this.option().sortedIndex) } onFocusOut(e) { this.option().onFocusOut(e, this.option().sortedIndex) } onKeyDown(e) { this.option().onKeyDown(this, e) } }