Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5df48f5
refactor: add simple return types
web-flow Jun 23, 2026
5e91cc3
refactor: enhance type safety for time zone calculator in scheduler
web-flow Jun 23, 2026
20a1eb3
refactor: improve type annotations for scheduler methods
web-flow Jun 23, 2026
52ebedc
refactor: add type to workspace in scheduler
web-flow Jun 23, 2026
13a4d29
refactor: improve type definitions for deferred
web-flow Jun 23, 2026
8b17963
refactor: add type for actions
web-flow Jun 23, 2026
5dba430
refactor: type appointment collection options
web-flow Jun 23, 2026
744c1bb
refactor: type workSpace config
web-flow Jun 23, 2026
232fa0b
refactor: type arguments in methods
web-flow Jun 23, 2026
f8695c1
refactor: enhance type definitions and improve type safety in scheduler
web-flow Jun 23, 2026
c02ca1f
fix: fix build
web-flow Jun 24, 2026
c5340fb
fix: fix tests
web-flow Jun 24, 2026
bde4f6a
fix: await appointment addition in tooltip test
web-flow Jun 24, 2026
c79067d
Merge branch '26_1' into issue-4610_26_1
sjbur Jun 24, 2026
d900cd8
fix: fix tests related with deferred scrollto
web-flow Jun 24, 2026
0eb9505
fix; try to fix tests
web-flow Jun 24, 2026
208022d
fix; try to fix tests
web-flow Jun 24, 2026
1d1aab6
refactor: refactor after fixes
web-flow Jun 24, 2026
769941a
refactor: refactor types
web-flow Jun 25, 2026
f9ea2cf
fix: fix build
web-flow Jun 25, 2026
c5c8b88
Merge branch '26_1' into issue-4610_26_1
web-flow Jun 25, 2026
c91a837
feat: add getAppointmentSettings method to SchedulerAppointmentsHost …
web-flow Jun 25, 2026
8d03ecf
refactor: remove useless interface
web-flow Jun 25, 2026
5b5a391
refactor: remove useless interface
web-flow Jun 25, 2026
30f637e
refactor: remove comment
web-flow Jun 25, 2026
f01d6d2
refactor: remove strict ts warning
web-flow Jun 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ describe.each([

const initialTarget = POM.tooltip.target;

scheduler.addAppointment({
await scheduler.addAppointment({
text: 'New Apt',
startDate: new Date(2017, 4, 20, 9, 30),
endDate: new Date(2017, 4, 20, 10, 30),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,28 @@ import { each } from '@js/core/utils/iterator';
import { getBoundingRect } from '@js/core/utils/position';
import { setOuterHeight, setOuterWidth } from '@js/core/utils/size';
import { isDeferred, isPlainObject } from '@js/core/utils/type';
import type {
AppointmentClickEvent,
AppointmentContextMenuEvent,
AppointmentDblClickEvent,
AppointmentRenderedEvent,
} from '@js/ui/scheduler';
import { dateUtilsTs } from '@ts/core/utils/date';
import type { SupportedKeys } from '@ts/core/widget/widget';
import CollectionWidget from '@ts/ui/collection/collection_widget.edit';

import type NotifyScheduler from '../base/widget_notify_scheduler';
import {
AGENDA_LAST_IN_DATE_APPOINTMENT_CLASS,
APPOINTMENT_CONTENT_CLASSES,
APPOINTMENT_DRAG_SOURCE_CLASS,
APPOINTMENT_ITEM_CLASS,
} from '../classes';
import { APPOINTMENT_SETTINGS_KEY } from '../constants';
import type { CompactAppointmentOptions } from '../types';
import type { TimeZoneCalculator } from '../r1/timezone_calculator/index';
import type { DesktopTooltipStrategy } from '../tooltip_strategies/desktop_tooltip_strategy';
import type { MobileTooltipStrategy } from '../tooltip_strategies/mobile_tooltip_strategy';
import type { CompactAppointmentOptions, DOMMetaData, ScrollToGroupValuesOrOptions } from '../types';
import { AppointmentAdapter } from '../utils/appointment_adapter/appointment_adapter';
import type { AppointmentDataAccessor } from '../utils/data_accessor/appointment_data_accessor';
import {
Expand All @@ -38,13 +48,15 @@ import { getAppointmentGroupValues } from '../utils/resource_manager/appointment
import { getGroupTexts } from '../utils/resource_manager/group_utils';
import type { ResourceManager } from '../utils/resource_manager/resource_manager';
import timeZoneUtils from '../utils_time_zone';
import type { AppointmentDataSource } from '../view_model/m_appointment_data_source';
import type {
AppointmentAgendaViewModel,
AppointmentCollectorViewModel,
AppointmentItemViewModel,
AppointmentViewModelPlain,
SortedEntity,
} from '../view_model/types';
import type ViewDataProvider from '../workspaces/view_model/view_data_provider';
import { AgendaAppointment } from './appointment/agenda_appointment';
import { Appointment } from './appointment/m_appointment';
import { createAgendaAppointmentLayout, createAppointmentLayout } from './m_appointment_layout';
Expand All @@ -54,6 +66,40 @@ import { getAppointmentDateRange } from './resizing/m_core';
import { isNeedToAdd } from './utils/get_arrays_diff';
import { getViewModelDiff } from './utils/get_view_model_diff';

export interface AppointmentCollectionOptions {
getResourceManager: () => ResourceManager;
getAppointmentDataSource: () => AppointmentDataSource;
getSortedAppointments: () => SortedEntity[];
scrollTo: (
date: Date,
groupValuesOrOptions?: ScrollToGroupValuesOrOptions,
allDay?: boolean,
) => void;
appointmentTooltip: MobileTooltipStrategy | DesktopTooltipStrategy;
dataAccessors: AppointmentDataAccessor;
notifyScheduler: NotifyScheduler;
onItemRendered: (args: AppointmentRenderedEvent) => void;
onItemClick: (args: AppointmentClickEvent) => void;
onItemContextMenu: (args: AppointmentContextMenuEvent) => void;
onAppointmentDblClick: (args: AppointmentDblClickEvent) => void;
tabIndex: number;
focusStateEnabled: boolean;
allowDrag: boolean;
allowDelete: boolean;
allowResize: boolean;
allowAllDayResize: boolean;
rtlEnabled: boolean;
groups: string[];
groupByDate: boolean;
timeZoneCalculator: TimeZoneCalculator;
getResizableStep: () => number;
getDOMElementsMetaData: () => DOMMetaData | undefined;
getViewDataProvider: () => ViewDataProvider | undefined;
isVerticalGroupedWorkSpace: () => boolean;
isDateAndTimeView: () => boolean;
onContentReady: () => void;
}

const COMPONENT_CLASS = 'dx-scheduler-scrollable-appointments';

const DBLCLICK_EVENT_NAME = addNamespace(dblclickEvent, 'dxSchedulerAppointment');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class CompactAppointmentsHelper {
getItemSettings,
};

workSpace.createDragBehaviorBase($element, $schedulerElement, options);
workSpace?.createDragBehaviorBase($element, $schedulerElement, options);
};
}

Expand All @@ -105,7 +105,6 @@ export class CompactAppointmentsHelper {
private createCompactButton(template, options: CompactAppointmentOptions) {
const $button = this.createCompactButtonElement(options);

// @ts-expect-error
return this.instance._createComponent($button, Button, {
type: 'default',
width: options.width,
Expand Down
Loading
Loading