devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
48 lines (47 loc) • 1.52 kB
JavaScript
/**
* DevExtreme (esm/__internal/scheduler/appointments_new/view_item.js)
* Version: 26.1.3
* Build date: Wed Jun 10 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)
}
}