-
Notifications
You must be signed in to change notification settings - Fork 665
Scheduler: refactor Header module #32258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 26_1
Are you sure you want to change the base?
Changes from all commits
df229e2
bcc5570
ec8a94a
9ec0d4e
56a217c
58d7324
ce2e03a
2ea8c28
1747a00
bb9648f
2e72021
a312599
0dc2548
ebf6cec
097b90a
dd4dc57
7e10d94
c5434c1
be2f023
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,62 +1,66 @@ | ||||||||||||||||||
| import registerComponent from '@js/core/component_registrator'; | ||||||||||||||||||
| import devices from '@js/core/devices'; | ||||||||||||||||||
| import type { dxElementWrapper } from '@js/core/renderer'; | ||||||||||||||||||
| import $ from '@js/core/renderer'; | ||||||||||||||||||
| import Calendar from '@js/ui/calendar'; | ||||||||||||||||||
| import type { DateLike } from '@js/ui/calendar'; | ||||||||||||||||||
| import Popover from '@js/ui/popover/ui.popover'; | ||||||||||||||||||
| import Popup from '@js/ui/popup/ui.popup'; | ||||||||||||||||||
| import type { dxSchedulerOptions } from '@js/ui/scheduler'; | ||||||||||||||||||
| import Scrollable from '@js/ui/scroll_view/ui.scrollable'; | ||||||||||||||||||
| import Widget from '@js/ui/widget/ui.widget'; | ||||||||||||||||||
| import Widget from '@ts/core/widget/widget'; | ||||||||||||||||||
| import type { KeyboardKeyDownEvent } from '@ts/events/core/m_keyboard_processor'; | ||||||||||||||||||
| import type { CalendarProperties } from '@ts/ui/calendar/calendar'; | ||||||||||||||||||
| import Calendar from '@ts/ui/calendar/calendar'; | ||||||||||||||||||
| import Scrollable from '@ts/ui/scroll_view/scrollable'; | ||||||||||||||||||
|
|
||||||||||||||||||
| import type { HeaderCalendarOptions } from './types'; | ||||||||||||||||||
|
|
||||||||||||||||||
| const CALENDAR_CLASS = 'dx-scheduler-navigator-calendar'; | ||||||||||||||||||
| const CALENDAR_POPOVER_CLASS = 'dx-scheduler-navigator-calendar-popover'; | ||||||||||||||||||
|
|
||||||||||||||||||
| export default class SchedulerCalendar extends Widget<dxSchedulerOptions> { | ||||||||||||||||||
| _overlay: any; | ||||||||||||||||||
| export default class SchedulerCalendar extends Widget<HeaderCalendarOptions> { | ||||||||||||||||||
| _overlay?: Popup | Popover; | ||||||||||||||||||
|
|
||||||||||||||||||
| _calendar: any; | ||||||||||||||||||
| _calendar?: Calendar; | ||||||||||||||||||
|
|
||||||||||||||||||
| show(target) { | ||||||||||||||||||
| if (!this._isMobileLayout()) { | ||||||||||||||||||
| this._overlay.option('target', target); | ||||||||||||||||||
| async show(target: HTMLElement): Promise<void> { | ||||||||||||||||||
| if (!SchedulerCalendar._isMobileLayout()) { | ||||||||||||||||||
| this._overlay?.option('target', target); | ||||||||||||||||||
| } | ||||||||||||||||||
| this._overlay.show(); | ||||||||||||||||||
|
|
||||||||||||||||||
| await this._overlay?.show(); | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| hide() { | ||||||||||||||||||
| this._overlay.hide(); | ||||||||||||||||||
| async hide(): Promise<void> { | ||||||||||||||||||
| await this._overlay?.hide(); | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| _keyboardHandler(opts): void { | ||||||||||||||||||
| _keyboardHandler(opts: KeyboardKeyDownEvent): boolean { | ||||||||||||||||||
| this._calendar?._keyboardHandler(opts); | ||||||||||||||||||
| return true; | ||||||||||||||||||
|
Comment on lines
31
to
+38
|
||||||||||||||||||
| this._calendar?._keyboardHandler(opts); | |
| return true; | |
| const handled = this._calendar?._keyboardHandler(opts); | |
| if (typeof handled === 'boolean') { | |
| return handled; | |
| } | |
| return !!this._calendar; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'tsconfigRootDir' path appears to be incorrect. It's set to '${__dirname}/js/__internal', but the tsconfig.json is located at the package root. This should likely be just '__dirname' or the path should correctly resolve to where tsconfig.json exists. This misconfiguration could cause TypeScript parsing issues in the ESLint rules.