Skip to content

Commit

Permalink
Scheduler: Additional fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Vinogradov committed Sep 7, 2023
1 parent e022ca3 commit d530e89
Show file tree
Hide file tree
Showing 21 changed files with 64 additions and 65 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@js/ui/scheduler/recurrence_editor';
import '../m_recurrence_editor';
import '@js/ui/text_area';
import '@js/ui/tag_box';
import '@js/ui/switch';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class VirtualScrollingDispatcher {

_onScrollHandler: any;

constructor(public options) {
constructor(public options?: any) {
if (options) {
this._rowHeight = this.getCellHeight();
this._cellWidth = this.getCellWidth();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ViewDataGenerator {

readonly isWorkView: boolean = false;

readonly tableAllDay: boolean = false;
readonly tableAllDay = false;

hiddenInterval: any;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ export class ViewDataGeneratorMonth extends ViewDataGenerator {

_maxVisibleDate: any;

// @ts-expect-error
get tableAllDay() { return undefined; }
readonly tableAllDay = false;

// eslint-disable-next-line @typescript-eslint/no-unused-vars
getCellData(rowIndex, columnIndex, options, allDay) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Scheduler, viewFunction as ViewFunction } from '../scheduler';
import { Widget, WidgetProps } from '../../common/widget';
import * as viewsModel from '../model/views';
import { ViewType } from '../types';
import ViewDataProvider from '../../../../ui/scheduler/workspaces/view_model/view_data_provider';
import ViewDataProvider from '../../../../__internal/scheduler/workspaces/view_model/m_view_data_provider';
import { WorkSpace } from '../workspaces/base/work_space';
import { SchedulerToolbar } from '../header/header';
import * as resourceUtils from '../../../../__internal/scheduler/resources/m_utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
getMaxWidth,
} from './popup_config';
// eslint-disable-next-line import/named
import { dxSchedulerAppointment } from '../../../../ui/scheduler';
import type { dxSchedulerAppointment } from '../../../../ui/scheduler';
import { EditForm } from './edit_form/layout';
import { DataAccessorType } from '../types';
import { AppointmentData } from '../appointment/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { shallow } from 'enzyme';
// https://github.com/benmosher/eslint-plugin-import/issues/1699
/* eslint-disable-next-line import/named */
import { dxSchedulerAppointment } from '../../../../../ui/scheduler';
import type { dxSchedulerAppointment } from '../../../../../ui/scheduler';
import {
TooltipItemLayout,
viewFunction as TooltipItemLayoutView,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
OneWay, Template, Event, JSXTemplate,
} from '@devextreme-generator/declarations';
/* eslint-disable-next-line import/named */
import { dxSchedulerAppointment } from '../../../../ui/scheduler';
import type { dxSchedulerAppointment } from '../../../../ui/scheduler';
import {
AppointmentItem,
FormattedContent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://github.com/benmosher/eslint-plugin-import/issues/1699
// eslint-disable-next-line import/named
import { dxSchedulerAppointment } from '../../../../ui/scheduler';
import type { dxSchedulerAppointment } from '../../../../ui/scheduler';

export type Color = string | undefined;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FormattedContent } from '../types';
/* eslint-disable-next-line import/named */
import { dxSchedulerAppointment } from '../../../../../ui/scheduler';
import type { dxSchedulerAppointment } from '../../../../../ui/scheduler';

export const defaultGetTextAndFormatDate = (): FormattedContent => ({ text: '', formatDate: '' });
export const defaultGetSingleAppointment = (): dxSchedulerAppointment => ({});
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AppointmentItem } from '../types';
/* eslint-disable-next-line import/named */
import { dxSchedulerAppointment } from '../../../../../ui/scheduler';
import type { dxSchedulerAppointment } from '../../../../../ui/scheduler';

export default (appointmentItem: AppointmentItem): dxSchedulerAppointment => {
const { settings, data, currentData } = appointmentItem;
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme/js/renovation/ui/scheduler/common.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { utils } from '../../../ui/scheduler/utils';
import { utils } from '../../../__internal/scheduler/m_utils';
import { DataAccessorsProps } from './props';
import { DataAccessorType } from './types';
import { ViewDataProviderValidationOptions } from './workspaces/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ViewDataProvider from '../../../../../ui/scheduler/workspaces/view_model/view_data_provider';
import ViewDataProvider from '../../../../../__internal/scheduler/workspaces/view_model/m_view_data_provider';
import { SchedulerProps, ViewProps } from '../../props';
import { ViewType } from '../../types';
import { prepareGenerationOptions } from '../../workspaces/base/work_space';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@devextreme-generator/declarations';
import { TimeZoneCalculator } from './timeZoneCalculator/utils';
// eslint-disable-next-line import/named
import { Appointment } from '../../../ui/scheduler';
import type { Appointment } from '../../../ui/scheduler';
import { ViewProps, SchedulerProps } from './props';

import { Widget } from '../common/widget';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TimeZoneCalculator } from './utils';
import timeZoneUtils from '../../../../ui/scheduler/utils.timeZone';
import timeZoneUtils from '../../../../__internal/scheduler/m_utils_time_zone';

export const createTimeZoneCalculator = (
currentTimeZone: string,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ViewDataProvider from '../../../../../../ui/scheduler/workspaces/view_model/view_data_provider';
import ViewDataProvider from '../../../../../../__internal/scheduler/workspaces/view_model/m_view_data_provider';
import { SchedulerProps, ViewProps } from '../../../props';
import { DataAccessorType, ViewType } from '../../../types';
import { prepareGenerationOptions } from '../../../workspaces/base/work_space';
Expand All @@ -13,8 +13,8 @@ import { AppointmentsConfigType } from '../../../model/types';
import { TimeZoneCalculator } from '../../../timeZoneCalculator/utils';
import { getCurrentViewConfig } from '../../../model/views';

jest.mock('../../../../../../ui/scheduler/workspaces/helpers/positionHelper', () => ({
...jest.requireActual('../../../../../../ui/scheduler/workspaces/helpers/positionHelper'),
jest.mock('../../../../../../__internal/scheduler/workspaces/helpers/m_position_helper', () => ({
...jest.requireActual('../../../../../../__internal/scheduler/workspaces/helpers/m_position_helper'),
PositionHelper: jest.fn(() => ({
getHorizontalMax: (): number => 100,
getResizableStep: (): number => 110,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import errors from '../../../../../../../ui/widget/ui.errors';
import dateUtils from '../../../../../../../core/utils/date';
import { isDefined } from '../../../../../../../core/utils/type';
import dateLocalization from '../../../../../../../localization/date';
import timeZoneUtils from '../../../../../../../ui/scheduler/utils.timeZone';
import timeZoneUtils from '../../../../../../../__internal/scheduler/m_utils_time_zone';
import { VERTICAL_GROUP_COUNT_CLASSES } from '../../../../../../../__internal/scheduler/m_classes';
import { VIEWS } from '../../../../../../../__internal/scheduler/m_constants';
import { getGroupCount } from '../../../../../../../__internal/scheduler/resources/m_utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import timeZoneUtils from '../../../../../../../ui/scheduler/utils.timeZone';
import timeZoneUtils from '../../../../../../../__internal/scheduler/m_utils_time_zone';
import { GetDateForHeaderText } from '../types';
import { getStartViewDateWithoutDST } from './base';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
getViewStartByOptions,
setOptionHour,
} from './base';
import timeZoneUtils from '../../../../../../../ui/scheduler/utils.timeZone';
import timeZoneUtils from '../../../../../../../__internal/scheduler/m_utils_time_zone';
import { CalculateStartViewDate } from '../types';

export const getIntervalDuration = (
Expand Down
Loading

0 comments on commit d530e89

Please sign in to comment.