Skip to content

Commit

Permalink
Scheduler: Fix TS modules
Browse files Browse the repository at this point in the history
- Fix eslint issue
- Create re-export JS modules
- Move doc / style comments
  • Loading branch information
Ilya Vinogradov committed Sep 8, 2023
1 parent 2adc8da commit 7016a9c
Show file tree
Hide file tree
Showing 73 changed files with 12,939 additions and 12,505 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ class RowsView extends ColumnsView {
if (loadPanel.option('visible') && !isLoading) {
that._hideLoadingTimeoutID = setTimeout(() => {
loadPanel.option(visibilityOptions);
}, LOADPANEL_HIDE_TIMEOUT);
}, LOADPANEL_HIDE_TIMEOUT) as unknown as number;
} else {
loadPanel.option(visibilityOptions);
}
Expand Down
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 All @@ -13,8 +13,8 @@ import DataSource from '@js/data/data_source';
import messageLocalization from '@js/localization/message';
import { Semaphore } from '@js/renovation/ui/scheduler/utils/semaphore/semaphore';
import Form from '@js/ui/form';
import { createAppointmentAdapter } from '@js/ui/scheduler/appointmentAdapter';

import { createAppointmentAdapter } from '../m_appointment_adapter';
import timeZoneDataUtils from '../timezones/m_utils_timezones_data';

const SCREEN_SIZE_OF_SINGLE_COLUMN = 600;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
isPopupFullScreenNeeded,
} from '@js/renovation/ui/scheduler/appointment_edit_form/popup_config';
import Popup from '@js/ui/popup/ui.popup';
import { createAppointmentAdapter } from '@js/ui/scheduler/appointmentAdapter';
import { hide as hideLoading, show as showLoading } from '@js/ui/scheduler/loading';

import { createAppointmentAdapter } from '../m_appointment_adapter';
import { hide as hideLoading, show as showLoading } from '../m_loading';
import { getNormalizedResources } from '../resources/m_utils';

const toMs = dateUtils.dateToMilliseconds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
isDateAndTimeView as calculateIsDateAndTimeView,
isTimelineView,
} from '@js/renovation/ui/scheduler/view_model/to_test/views/utils/base';
import { createAppointmentAdapter } from '@js/ui/scheduler/appointmentAdapter';
import { getRecurrenceProcessor } from '@js/ui/scheduler/recurrence';

import { createAppointmentAdapter } from '../../m_appointment_adapter';
import { getRecurrenceProcessor } from '../../m_recurrence';
import {
getResourcesDataByGroups,
} from '../../resources/m_utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import dateUtils from '@js/core/utils/date';
import dateSerialization from '@js/core/utils/date_serialization';
import { ExpressionUtils } from '@js/ui/scheduler/expressionUtils';
import timeZoneUtils from '@js/ui/scheduler/utils.timeZone';

import { ExpressionUtils } from '../../m_expression_utils';

const toMs = dateUtils.dateToMilliseconds;

const FULL_DATE_FORMAT = 'yyyyMMddTHHmmss';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { addNamespace } from '@js/events/utils/index';
import dateLocalization from '@js/localization/date';
import messageLocalization from '@js/localization/message';
import Resizable from '@js/ui/resizable';
import { hide, show } from '@js/ui/tooltip/ui.tooltip';

import {
ALL_DAY_APPOINTMENT_CLASS,
APPOINTMENT_CONTENT_CLASSES,
Expand All @@ -21,10 +23,9 @@ import {
REDUCED_APPOINTMENT_CLASS,
REDUCED_APPOINTMENT_ICON,
REDUCED_APPOINTMENT_PARTS_CLASSES,
} from '@js/ui/scheduler/classes';
import { ExpressionUtils } from '@js/ui/scheduler/expressionUtils';
import { getRecurrenceProcessor } from '@js/ui/scheduler/recurrence';
import { hide, show } from '@js/ui/tooltip/ui.tooltip';
} from '../m_classes';
import { ExpressionUtils } from '../m_expression_utils';
import { getRecurrenceProcessor } from '../m_recurrence';

const DEFAULT_HORIZONTAL_HANDLES = 'left right';
const DEFAULT_VERTICAL_HANDLES = 'top bottom';
Expand Down Expand Up @@ -191,7 +192,7 @@ export class Appointment extends DOMComponent {
}

_renderReducedAppointment() {
const reducedPart = this.option('reduced');
const reducedPart: any = this.option('reduced');

if (!reducedPart) {
return;
Expand Down Expand Up @@ -253,7 +254,7 @@ export class Appointment extends DOMComponent {
}

_renderDirection() {
(this.$element() as any).addClass(DIRECTION_APPOINTMENT_CLASSES[this.option('direction')]);
(this.$element() as any).addClass(DIRECTION_APPOINTMENT_CLASSES[this.option('direction') as any]);
}

_createResizingConfig() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import eventsEngine from '@js/events/core/events_engine';
import { name as dblclickEvent } from '@js/events/double_click';
import { addNamespace, isFakeClickEvent } from '@js/events/utils/index';
import CollectionWidget from '@js/ui/collection/ui.collection_widget.edit';
import { createAppointmentAdapter } from '@js/ui/scheduler/appointmentAdapter';
import { APPOINTMENT_DRAG_SOURCE_CLASS, APPOINTMENT_ITEM_CLASS } from '@js/ui/scheduler/classes';
import { APPOINTMENT_SETTINGS_KEY } from '@js/ui/scheduler/constants';
import { ExpressionUtils } from '@js/ui/scheduler/expressionUtils';
import { getRecurrenceProcessor } from '@js/ui/scheduler/recurrence';
import timeZoneUtils from '@js/ui/scheduler/utils.timeZone';

import { createAppointmentAdapter } from '../m_appointment_adapter';
import { APPOINTMENT_DRAG_SOURCE_CLASS, APPOINTMENT_ITEM_CLASS } from '../m_classes';
import { APPOINTMENT_SETTINGS_KEY } from '../m_constants';
import { ExpressionUtils } from '../m_expression_utils';
import { getRecurrenceProcessor } from '../m_recurrence';
import { getAppointmentTakesSeveralDays, sortAppointmentsByStartDate } from './data_provider/m_utils';
import { AgendaAppointment, Appointment } from './m_appointment';
import { createAgendaAppointmentLayout, createAppointmentLayout } from './m_appointment_layout';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import domAdapter from '@js/core/dom_adapter';
import $ from '@js/core/renderer';
import messageLocalization from '@js/localization/message';
import { APPOINTMENT_CONTENT_CLASSES } from '@js/ui/scheduler/classes';

import { APPOINTMENT_CONTENT_CLASSES } from '../m_classes';

const allDayText = ` ${messageLocalization.format('dxScheduler-allDay')}: `;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import $ from '@js/core/renderer';
import { utils } from '@js/ui/scheduler/utils';

// @ts-expect-error
import dxrAppointmentLayout from '../../../renovation/ui/scheduler/appointment/layout.j';
import { utils } from '../m_utils';

// This is temporary - to creating appointments from the old code
export const renderAppointments = (options) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import dateUtils from '@js/core/utils/date';
import { extend } from '@js/core/utils/extend';
import { isEmptyObject } from '@js/core/utils/type';
import { isDateAndTimeView } from '@js/renovation/ui/scheduler/view_model/to_test/views/utils/base';
import { createAppointmentAdapter } from '@js/ui/scheduler/appointmentAdapter';
import { ExpressionUtils } from '@js/ui/scheduler/expressionUtils';
import { getRecurrenceProcessor } from '@js/ui/scheduler/recurrence';
import timeZoneUtils from '@js/ui/scheduler/utils.timeZone';

import { createAppointmentAdapter } from '../m_appointment_adapter';
import { ExpressionUtils } from '../m_expression_utils';
import { getRecurrenceProcessor } from '../m_recurrence';
import {
createResourcesTree, getDataAccessors, getGroupCount, getResourceTreeLeaves,
} from '../resources/m_utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import dateUtils from '@js/core/utils/date';
import { each } from '@js/core/utils/iterator';
import { createAppointmentAdapter } from '@js/ui/scheduler/appointmentAdapter';
import { ExpressionUtils } from '@js/ui/scheduler/expressionUtils';

import { createAppointmentAdapter } from '../../m_appointment_adapter';
import { ExpressionUtils } from '../../m_expression_utils';
import { groupAppointmentsByResources } from '../../resources/m_utils';
import { getAppointmentTakesSeveralDays, replaceWrongEndDate } from '../data_provider/m_utils';
import BaseRenderingStrategy from './m_strategy_base';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import dateUtils from '@js/core/utils/date';
import { extend } from '@js/core/utils/extend';
import { isNumeric, isObject } from '@js/core/utils/type';
import { getAppointmentTakesAllDay } from '@js/renovation/ui/scheduler/appointment/utils/getAppointmentTakesAllDay';
import { createAppointmentAdapter } from '@js/ui/scheduler/appointmentAdapter';
import timeZoneUtils from '@js/ui/scheduler/utils.timeZone';
import { current as currentTheme } from '@js/ui/themes';

import { createAppointmentAdapter } from '../../m_appointment_adapter';
import { AppointmentSettingsGenerator } from '../m_settings_generator';
import AdaptivePositioningStrategy from './m_appointments_positioning_strategy_adaptive';
import AppointmentPositioningStrategy from './m_appointments_positioning_strategy_base';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import dateUtils from '@js/core/utils/date';
import getSkippedHoursInRange from '@js/renovation/ui/scheduler/view_model/appointments/utils/getSkippedHoursInRange';
import { ExpressionUtils } from '@js/ui/scheduler/expressionUtils';

import { ExpressionUtils } from '../../m_expression_utils';
import BaseAppointmentsStrategy from './m_strategy_base';

const DEFAULT_APPOINTMENT_HEIGHT = 60;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dateUtils from '@js/core/utils/date';
import { getGroupWidth } from '@js/ui/scheduler/workspaces/helpers/positionHelper';

import { getGroupWidth } from '../../workspaces/helpers/m_position_helper';
import HorizontalMonthLineRenderingStrategy from './m_strategy_horizontal_month_line';

const MONTH_APPOINTMENT_HEIGHT_RATIO = 0.6;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { roundFloatPart } from '@js/core/utils/math';
import { isNumeric } from '@js/core/utils/type';
import { getAppointmentTakesAllDay } from '@js/renovation/ui/scheduler/appointment/utils/getAppointmentTakesAllDay';
import getSkippedHoursInRange from '@js/renovation/ui/scheduler/view_model/appointments/utils/getSkippedHoursInRange';
import { createAppointmentAdapter } from '@js/ui/scheduler/appointmentAdapter';
import { ExpressionUtils } from '@js/ui/scheduler/expressionUtils';
import timeZoneUtils from '@js/ui/scheduler/utils.timeZone';

import { createAppointmentAdapter } from '../../m_appointment_adapter';
import { ExpressionUtils } from '../../m_expression_utils';
import BaseAppointmentsStrategy from './m_strategy_base';

const ALLDAY_APPOINTMENT_MIN_VERTICAL_OFFSET = 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { camelize } from '@js/core/utils/inflector';
import { isFunction, isObject } from '@js/core/utils/type';
import dateLocalization from '@js/localization/date';
import messageLocalization from '@js/localization/message';
import { VIEWS } from '@js/ui/scheduler/constants';

import { VIEWS } from '../m_constants';

const DAY_FORMAT = 'd';

Expand Down
Loading

0 comments on commit 7016a9c

Please sign in to comment.