@syncfusion/ej2-schedule 28.2.11 → 29.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitleaksignore +4 -0
- package/README.md +2 -2
- package/dist/ej2-schedule.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +518 -146
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +570 -186
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +24 -26
- package/src/recurrence-editor/recurrence-editor-model.d.ts +14 -0
- package/src/recurrence-editor/recurrence-editor.d.ts +12 -0
- package/src/recurrence-editor/recurrence-editor.js +8 -1
- package/src/schedule/actions/action-base.js +4 -1
- package/src/schedule/actions/crud.d.ts +3 -0
- package/src/schedule/actions/crud.js +129 -63
- package/src/schedule/actions/drag.js +3 -0
- package/src/schedule/actions/resize.js +4 -1
- package/src/schedule/actions/virtual-scroll.js +3 -1
- package/src/schedule/base/constant.d.ts +6 -0
- package/src/schedule/base/constant.js +6 -0
- package/src/schedule/base/interface.d.ts +53 -0
- package/src/schedule/base/schedule-model.d.ts +54 -1
- package/src/schedule/base/schedule.d.ts +68 -2
- package/src/schedule/base/schedule.js +67 -0
- package/src/schedule/base/type.d.ts +2 -1
- package/src/schedule/event-renderer/event-base.d.ts +5 -0
- package/src/schedule/event-renderer/event-base.js +123 -27
- package/src/schedule/event-renderer/inline-edit.d.ts +3 -1
- package/src/schedule/event-renderer/inline-edit.js +18 -6
- package/src/schedule/event-renderer/month.d.ts +1 -0
- package/src/schedule/event-renderer/month.js +25 -0
- package/src/schedule/event-renderer/timeline-view.d.ts +1 -1
- package/src/schedule/event-renderer/timeline-view.js +12 -19
- package/src/schedule/event-renderer/vertical-view.js +2 -2
- package/src/schedule/event-renderer/year.js +1 -1
- package/src/schedule/exports/excel-export.js +9 -2
- package/src/schedule/exports/print.d.ts +2 -0
- package/src/schedule/exports/print.js +90 -52
- package/src/schedule/models/views-model.d.ts +32 -0
- package/src/schedule/models/views.d.ts +30 -0
- package/src/schedule/models/views.js +6 -0
- package/src/schedule/popups/event-tooltip.js +18 -0
- package/src/schedule/popups/event-window.d.ts +1 -0
- package/src/schedule/popups/event-window.js +35 -4
- package/src/schedule/popups/quick-popups.js +11 -4
- package/src/schedule/renderer/month.js +3 -1
- package/styles/bds-lite.css +35 -6
- package/styles/bds.css +37 -21
- package/styles/bootstrap-dark-lite.css +46 -17
- package/styles/bootstrap-dark.css +49 -33
- package/styles/bootstrap-lite.css +42 -13
- package/styles/bootstrap.css +44 -28
- package/styles/bootstrap4-lite.css +55 -26
- package/styles/bootstrap4.css +57 -41
- package/styles/bootstrap5-dark-lite.css +128 -99
- package/styles/bootstrap5-dark.css +131 -115
- package/styles/bootstrap5-lite.css +50 -21
- package/styles/bootstrap5.3-lite.css +35 -6
- package/styles/bootstrap5.3.css +37 -21
- package/styles/bootstrap5.css +52 -36
- package/styles/fabric-dark-lite.css +46 -17
- package/styles/fabric-dark.css +49 -33
- package/styles/fabric-lite.css +56 -27
- package/styles/fabric.css +58 -42
- package/styles/fluent-dark-lite.css +39 -10
- package/styles/fluent-dark.css +40 -24
- package/styles/fluent-lite.css +39 -10
- package/styles/fluent.css +40 -24
- package/styles/fluent2-lite.css +35 -6
- package/styles/fluent2.css +38 -22
- package/styles/highcontrast-light-lite.css +53 -24
- package/styles/highcontrast-light.css +56 -40
- package/styles/highcontrast-lite.css +53 -24
- package/styles/highcontrast.css +56 -40
- package/styles/material-dark-lite.css +34 -5
- package/styles/material-dark.css +35 -19
- package/styles/material-lite.css +34 -5
- package/styles/material.css +35 -19
- package/styles/material3-dark-lite.css +36 -7
- package/styles/material3-dark.css +39 -23
- package/styles/material3-lite.css +36 -7
- package/styles/material3.css +39 -23
- package/styles/recurrence-editor/_layout.scss +6 -1
- package/styles/recurrence-editor/bds.css +5 -1
- package/styles/recurrence-editor/bootstrap-dark.css +5 -1
- package/styles/recurrence-editor/bootstrap.css +5 -1
- package/styles/recurrence-editor/bootstrap4.css +5 -1
- package/styles/recurrence-editor/bootstrap5-dark.css +5 -1
- package/styles/recurrence-editor/bootstrap5.3.css +5 -1
- package/styles/recurrence-editor/bootstrap5.css +5 -1
- package/styles/recurrence-editor/fabric-dark.css +5 -1
- package/styles/recurrence-editor/fabric.css +5 -1
- package/styles/recurrence-editor/fluent-dark.css +5 -1
- package/styles/recurrence-editor/fluent.css +5 -1
- package/styles/recurrence-editor/fluent2.css +5 -1
- package/styles/recurrence-editor/highcontrast-light.css +5 -1
- package/styles/recurrence-editor/highcontrast.css +5 -1
- package/styles/recurrence-editor/material-dark.css +5 -1
- package/styles/recurrence-editor/material.css +5 -1
- package/styles/recurrence-editor/material3-dark.css +5 -1
- package/styles/recurrence-editor/material3.css +5 -1
- package/styles/recurrence-editor/tailwind-dark.css +5 -1
- package/styles/recurrence-editor/tailwind.css +5 -1
- package/styles/recurrence-editor/tailwind3.css +5 -1
- package/styles/schedule/_bds-definition.scss +2 -0
- package/styles/schedule/_bigger.scss +2 -17
- package/styles/schedule/_bootstrap-dark-definition.scss +5 -1
- package/styles/schedule/_bootstrap-definition.scss +5 -1
- package/styles/schedule/_bootstrap4-definition.scss +9 -5
- package/styles/schedule/_bootstrap5-definition.scss +5 -1
- package/styles/schedule/_bootstrap5.3-definition.scss +2 -0
- package/styles/schedule/_fabric-dark-definition.scss +2 -0
- package/styles/schedule/_fabric-definition.scss +5 -1
- package/styles/schedule/_fluent-definition.scss +3 -1
- package/styles/schedule/_fluent2-definition.scss +3 -1
- package/styles/schedule/_fusionnew-definition.scss +2 -0
- package/styles/schedule/_highcontrast-definition.scss +6 -2
- package/styles/schedule/_highcontrast-light-definition.scss +6 -2
- package/styles/schedule/_layout.scss +39 -9
- package/styles/schedule/_material-dark-definition.scss +2 -0
- package/styles/schedule/_material-definition.scss +2 -0
- package/styles/schedule/_material3-definition.scss +4 -2
- package/styles/schedule/_tailwind-definition.scss +2 -0
- package/styles/schedule/_tailwind3-definition.scss +4 -2
- package/styles/schedule/bds.css +32 -20
- package/styles/schedule/bootstrap-dark.css +44 -32
- package/styles/schedule/bootstrap.css +39 -27
- package/styles/schedule/bootstrap4.css +52 -40
- package/styles/schedule/bootstrap5-dark.css +126 -114
- package/styles/schedule/bootstrap5.3.css +32 -20
- package/styles/schedule/bootstrap5.css +47 -35
- package/styles/schedule/fabric-dark.css +44 -32
- package/styles/schedule/fabric.css +53 -41
- package/styles/schedule/fluent-dark.css +35 -23
- package/styles/schedule/fluent.css +35 -23
- package/styles/schedule/fluent2.css +33 -21
- package/styles/schedule/highcontrast-light.css +51 -39
- package/styles/schedule/highcontrast.css +51 -39
- package/styles/schedule/material-dark.css +30 -18
- package/styles/schedule/material.css +30 -18
- package/styles/schedule/material3-dark.css +34 -22
- package/styles/schedule/material3.css +34 -22
- package/styles/schedule/tailwind-dark.css +49 -37
- package/styles/schedule/tailwind.css +32 -20
- package/styles/schedule/tailwind3.css +34 -22
- package/styles/tailwind-dark-lite.css +52 -23
- package/styles/tailwind-dark.css +54 -38
- package/styles/tailwind-lite.css +35 -6
- package/styles/tailwind.css +37 -21
- package/styles/tailwind3-lite.css +36 -7
- package/styles/tailwind3.css +39 -23
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, ModuleDeclaration, Property, Event, Animation, Collection, append } from '@syncfusion/ej2-base';import { EventHandler, EmitType, Browser, Internationalization, getDefaultDateObject, cldrData, L10n } from '@syncfusion/ej2-base';import { getValue, compile, extend, isNullOrUndefined, NotifyPropertyChanges, INotifyPropertyChanged, Complex } from '@syncfusion/ej2-base';import { getElement, removeClass, addClass, classList, remove, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';import { HeaderRenderer } from '../renderer/header-renderer';import { Scroll } from '../actions/scroll';import { ScheduleTouch } from '../actions/touch';import { KeyboardInteraction } from '../actions/keyboard';import { Data } from '../actions/data';import { View, CurrentAction, ReturnType, WeekRule, NavigationDirection } from '../base/type';import { EventBase } from '../event-renderer/event-base';import { InlineEdit } from '../event-renderer/inline-edit';import { QuickPopups } from '../popups/quick-popups';import { EventTooltip } from '../popups/event-tooltip';import { EventWindow } from '../popups/event-window';import { Render } from '../renderer/renderer';import { Day } from '../renderer/day';import { Week } from '../renderer/week';import { WorkWeek } from '../renderer/work-week';import { Month } from '../renderer/month';import { Year } from '../renderer/year';import { Agenda } from '../renderer/agenda';import { MonthAgenda } from '../renderer/month-agenda';import { TimelineViews } from '../renderer/timeline-view';import { TimelineMonth } from '../renderer/timeline-month';import { TimelineYear } from '../renderer/timeline-year';import { WorkHours } from '../models/work-hours';import { TimeScale } from '../models/time-scale';import { QuickInfoTemplates } from '../models/quick-info-templates';import { HeaderRows } from '../models/header-rows';import { Crud } from '../actions/crud';import { Resize } from '../actions/resize';import { DragAndDrop } from '../actions/drag';import { VirtualScroll } from '../actions/virtual-scroll';import { WorkCellInteraction } from '../actions/work-cells';import { WorkHoursModel, ViewsModel, EventSettingsModel, GroupModel, ResourcesModel, TimeScaleModel, ToolbarItemModel } from '../models/models';import { QuickInfoTemplatesModel, HeaderRowsModel } from '../models/models';import { EventSettings } from '../models/event-settings';import { Group } from '../models/group';import { Resources } from '../models/resources';import { ICalendarExport } from '../exports/calendar-export';import { ICalendarImport } from '../exports/calendar-import';import { ExcelExport } from '../exports/excel-export';import { Print } from '../exports/print';import { IRenderer, ActionEventArgs, NavigatingEventArgs, CellClickEventArgs, RenderCellEventArgs, ScrollCss, TimezoneFields, BeforePasteEventArgs } from '../base/interface';import { EventClickArgs, EventRenderedArgs, PopupOpenEventArgs, UIStateArgs, DragEventArgs, ResizeEventArgs } from '../base/interface';import { EventFieldsMapping, TdData, ResourceDetails, ResizeEdges, StateArgs, ExportOptions, SelectEventArgs } from '../base/interface';import { ViewsData, PopupCloseEventArgs, HoverEventArgs, MoreEventsClickArgs, ScrollEventArgs, CallbackFunction } from '../base/interface';import { CalendarUtil, Gregorian, Islamic, CalendarType } from '../../common/calendar-util';import { ResourceBase } from '../base/resource';import { Timezone, timezoneData } from '../timezone/timezone';import { RecurrenceEditor } from '../../recurrence-editor/recurrence-editor';import * as events from '../base/constant';import * as cls from '../base/css-constant';import * as util from '../base/util';import { ToolbarItem } from '../models/toolbar';
|
|
1
|
+
import { Component, ModuleDeclaration, Property, Event, Animation, Collection, append } from '@syncfusion/ej2-base';import { EventHandler, EmitType, Browser, Internationalization, getDefaultDateObject, cldrData, L10n } from '@syncfusion/ej2-base';import { getValue, compile, extend, isNullOrUndefined, NotifyPropertyChanges, INotifyPropertyChanged, Complex } from '@syncfusion/ej2-base';import { getElement, removeClass, addClass, classList, remove, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';import { HeaderRenderer } from '../renderer/header-renderer';import { Scroll } from '../actions/scroll';import { ScheduleTouch } from '../actions/touch';import { KeyboardInteraction } from '../actions/keyboard';import { Data } from '../actions/data';import { View, CurrentAction, ReturnType, WeekRule, NavigationDirection } from '../base/type';import { EventBase } from '../event-renderer/event-base';import { InlineEdit } from '../event-renderer/inline-edit';import { QuickPopups } from '../popups/quick-popups';import { EventTooltip } from '../popups/event-tooltip';import { EventWindow } from '../popups/event-window';import { Render } from '../renderer/renderer';import { Day } from '../renderer/day';import { Week } from '../renderer/week';import { WorkWeek } from '../renderer/work-week';import { Month } from '../renderer/month';import { Year } from '../renderer/year';import { Agenda } from '../renderer/agenda';import { MonthAgenda } from '../renderer/month-agenda';import { TimelineViews } from '../renderer/timeline-view';import { TimelineMonth } from '../renderer/timeline-month';import { TimelineYear } from '../renderer/timeline-year';import { WorkHours } from '../models/work-hours';import { TimeScale } from '../models/time-scale';import { QuickInfoTemplates } from '../models/quick-info-templates';import { HeaderRows } from '../models/header-rows';import { Crud } from '../actions/crud';import { Resize } from '../actions/resize';import { DragAndDrop } from '../actions/drag';import { VirtualScroll } from '../actions/virtual-scroll';import { WorkCellInteraction } from '../actions/work-cells';import { WorkHoursModel, ViewsModel, EventSettingsModel, GroupModel, ResourcesModel, TimeScaleModel, ToolbarItemModel } from '../models/models';import { QuickInfoTemplatesModel, HeaderRowsModel } from '../models/models';import { EventSettings } from '../models/event-settings';import { Group } from '../models/group';import { Resources } from '../models/resources';import { ICalendarExport } from '../exports/calendar-export';import { ICalendarImport } from '../exports/calendar-import';import { ExcelExport } from '../exports/excel-export';import { Print } from '../exports/print';import { IRenderer, ActionEventArgs, NavigatingEventArgs, CellClickEventArgs, RenderCellEventArgs, ScrollCss, TimezoneFields, ExcelExportEventArgs, BeforePasteEventArgs, TooltipOpenEventArgs } from '../base/interface';import { EventClickArgs, EventRenderedArgs, PopupOpenEventArgs, UIStateArgs, DragEventArgs, ResizeEventArgs } from '../base/interface';import { EventFieldsMapping, TdData, ResourceDetails, ResizeEdges, StateArgs, ExportOptions, SelectEventArgs } from '../base/interface';import { ViewsData, PopupCloseEventArgs, HoverEventArgs, MoreEventsClickArgs, ScrollEventArgs, CallbackFunction, BeforePrintEventArgs } from '../base/interface';import { CalendarUtil, Gregorian, Islamic, CalendarType } from '../../common/calendar-util';import { ResourceBase } from '../base/resource';import { Timezone, timezoneData } from '../timezone/timezone';import { RecurrenceEditor } from '../../recurrence-editor/recurrence-editor';import * as events from '../base/constant';import * as cls from '../base/css-constant';import * as util from '../base/util';import { ToolbarItem } from '../models/toolbar';
|
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -54,6 +54,38 @@ export interface ScheduleModel extends ComponentModel{
|
|
|
54
54
|
*/
|
|
55
55
|
allowSwiping?: boolean;
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Specifies whether overlapping appointments are allowed within the same time slot in the Scheduler.
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* When set to `false`, the Scheduler enforces restrictions to prevent creating or displaying overlapping appointments within the same time duration.
|
|
62
|
+
* This setting includes the following limitations:
|
|
63
|
+
*
|
|
64
|
+
* - **Initial Loading**: The alert for overlapping appointments will not display during the initial load. Overlapping events will be ignored in rendering, including occurrences.
|
|
65
|
+
*
|
|
66
|
+
* - **Dynamic Add/Edit**: When adding or editing events dynamically, overlapping validation is performed. If an overlap is detected for a single event, an alert will be shown, and the event will not be saved.
|
|
67
|
+
*
|
|
68
|
+
* For recurring events, an alert will be displayed, and the event will not be saved. To save recurring events while ignoring overlapping occurrences, trigger the `PopupOpen` event. The `Data` field will contain the parent recurrence data, and the `overlapEvents` field will contain the overlap events. Using these details, users can include exceptions in the recurrence events and save them with the `addEvent` method.
|
|
69
|
+
*
|
|
70
|
+
* - **Out-of-Date-Range Events**: The `allowOverlap` setting only prevents overlaps for events within the current view date range. To validate overlap events outside the current date range, use the `actionBegin` event to send a request to the server for validation and return a promise-based response. Assign this promise response to the `promise` field in `ActionEventArgs` to handle asynchronous server validation.
|
|
71
|
+
*
|
|
72
|
+
* @default true
|
|
73
|
+
*/
|
|
74
|
+
allowOverlap?: boolean;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Specifies the number of additional rows or columns to render outside the visible area during virtual scrolling.
|
|
78
|
+
* This property helps in achieving smoother scrolling by pre-loading data just outside the visible region.
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* The default value is 3. Increasing this value can result in smoother scrolling but may impact performance
|
|
82
|
+
* with larger datasets. Decreasing it can improve performance but may cause more frequent data fetches during scrolling.
|
|
83
|
+
* This property only takes effect when `allowVirtualScrolling` is enabled for the current view.
|
|
84
|
+
*
|
|
85
|
+
* @default 3
|
|
86
|
+
*/
|
|
87
|
+
overscanCount?: number;
|
|
88
|
+
|
|
57
89
|
/**
|
|
58
90
|
* To render the custom toolbar items, the `toolbarItems` property can be used. It contains built-in and custom toolbar items.
|
|
59
91
|
* To avail the built-in toolbar items, the below string values are assigned to the `name` property of the `ToolbarItemModel`.
|
|
@@ -874,4 +906,25 @@ export interface ScheduleModel extends ComponentModel{
|
|
|
874
906
|
*/
|
|
875
907
|
beforePaste?: EmitType<BeforePasteEventArgs>;
|
|
876
908
|
|
|
909
|
+
/**
|
|
910
|
+
* Triggers when the print event is called.
|
|
911
|
+
*
|
|
912
|
+
* @event 'beforePrint'
|
|
913
|
+
*/
|
|
914
|
+
beforePrint?: EmitType<BeforePrintEventArgs>;
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* Triggers before the Excel export process begins.
|
|
918
|
+
*
|
|
919
|
+
* @event 'excelExport'
|
|
920
|
+
*/
|
|
921
|
+
excelExport?: EmitType<ExcelExportEventArgs>;
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Triggers before the tooltip is rendered.
|
|
925
|
+
*
|
|
926
|
+
* @event 'tooltipOpen'
|
|
927
|
+
*/
|
|
928
|
+
tooltipOpen?: EmitType<TooltipOpenEventArgs>;
|
|
929
|
+
|
|
877
930
|
}
|
|
@@ -35,10 +35,10 @@ import { ICalendarExport } from '../exports/calendar-export';
|
|
|
35
35
|
import { ICalendarImport } from '../exports/calendar-import';
|
|
36
36
|
import { ExcelExport } from '../exports/excel-export';
|
|
37
37
|
import { Print } from '../exports/print';
|
|
38
|
-
import { IRenderer, ActionEventArgs, NavigatingEventArgs, CellClickEventArgs, RenderCellEventArgs, ScrollCss, TimezoneFields, BeforePasteEventArgs } from '../base/interface';
|
|
38
|
+
import { IRenderer, ActionEventArgs, NavigatingEventArgs, CellClickEventArgs, RenderCellEventArgs, ScrollCss, TimezoneFields, ExcelExportEventArgs, BeforePasteEventArgs, TooltipOpenEventArgs } from '../base/interface';
|
|
39
39
|
import { EventClickArgs, EventRenderedArgs, PopupOpenEventArgs, UIStateArgs, DragEventArgs, ResizeEventArgs } from '../base/interface';
|
|
40
40
|
import { EventFieldsMapping, TdData, ResourceDetails, ResizeEdges, ExportOptions, SelectEventArgs } from '../base/interface';
|
|
41
|
-
import { ViewsData, PopupCloseEventArgs, HoverEventArgs, MoreEventsClickArgs, ScrollEventArgs, CallbackFunction } from '../base/interface';
|
|
41
|
+
import { ViewsData, PopupCloseEventArgs, HoverEventArgs, MoreEventsClickArgs, ScrollEventArgs, CallbackFunction, BeforePrintEventArgs } from '../base/interface';
|
|
42
42
|
import { CalendarUtil, CalendarType } from '../../common/calendar-util';
|
|
43
43
|
import { ResourceBase } from '../base/resource';
|
|
44
44
|
import { Timezone } from '../timezone/timezone';
|
|
@@ -125,6 +125,7 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
|
|
|
125
125
|
editorTitles: EventFieldsMapping;
|
|
126
126
|
eventsData: Record<string, any>[];
|
|
127
127
|
eventsProcessed: Record<string, any>[];
|
|
128
|
+
overlapAppointments: Record<string, any>[];
|
|
128
129
|
blockData: Record<string, any>[];
|
|
129
130
|
blockProcessed: Record<string, any>[];
|
|
130
131
|
resourceCollection: ResourcesModel[];
|
|
@@ -183,6 +184,36 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
|
|
|
183
184
|
* @default true
|
|
184
185
|
*/
|
|
185
186
|
allowSwiping: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Specifies whether overlapping appointments are allowed within the same time slot in the Scheduler.
|
|
189
|
+
*
|
|
190
|
+
* @remarks
|
|
191
|
+
* When set to `false`, the Scheduler enforces restrictions to prevent creating or displaying overlapping appointments within the same time duration.
|
|
192
|
+
* This setting includes the following limitations:
|
|
193
|
+
*
|
|
194
|
+
* - **Initial Loading**: The alert for overlapping appointments will not display during the initial load. Overlapping events will be ignored in rendering, including occurrences.
|
|
195
|
+
*
|
|
196
|
+
* - **Dynamic Add/Edit**: When adding or editing events dynamically, overlapping validation is performed. If an overlap is detected for a single event, an alert will be shown, and the event will not be saved.
|
|
197
|
+
*
|
|
198
|
+
* For recurring events, an alert will be displayed, and the event will not be saved. To save recurring events while ignoring overlapping occurrences, trigger the `PopupOpen` event. The `Data` field will contain the parent recurrence data, and the `overlapEvents` field will contain the overlap events. Using these details, users can include exceptions in the recurrence events and save them with the `addEvent` method.
|
|
199
|
+
*
|
|
200
|
+
* - **Out-of-Date-Range Events**: The `allowOverlap` setting only prevents overlaps for events within the current view date range. To validate overlap events outside the current date range, use the `actionBegin` event to send a request to the server for validation and return a promise-based response. Assign this promise response to the `promise` field in `ActionEventArgs` to handle asynchronous server validation.
|
|
201
|
+
*
|
|
202
|
+
* @default true
|
|
203
|
+
*/
|
|
204
|
+
allowOverlap: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Specifies the number of additional rows or columns to render outside the visible area during virtual scrolling.
|
|
207
|
+
* This property helps in achieving smoother scrolling by pre-loading data just outside the visible region.
|
|
208
|
+
*
|
|
209
|
+
* @remarks
|
|
210
|
+
* The default value is 3. Increasing this value can result in smoother scrolling but may impact performance
|
|
211
|
+
* with larger datasets. Decreasing it can improve performance but may cause more frequent data fetches during scrolling.
|
|
212
|
+
* This property only takes effect when `allowVirtualScrolling` is enabled for the current view.
|
|
213
|
+
*
|
|
214
|
+
* @default 3
|
|
215
|
+
*/
|
|
216
|
+
overscanCount: number;
|
|
186
217
|
/**
|
|
187
218
|
* To render the custom toolbar items, the `toolbarItems` property can be used. It contains built-in and custom toolbar items.
|
|
188
219
|
* To avail the built-in toolbar items, the below string values are assigned to the `name` property of the `ToolbarItemModel`.
|
|
@@ -917,6 +948,24 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
|
|
|
917
948
|
* @event 'beforePaste'
|
|
918
949
|
*/
|
|
919
950
|
beforePaste: EmitType<BeforePasteEventArgs>;
|
|
951
|
+
/**
|
|
952
|
+
* Triggers when the print event is called.
|
|
953
|
+
*
|
|
954
|
+
* @event 'beforePrint'
|
|
955
|
+
*/
|
|
956
|
+
beforePrint: EmitType<BeforePrintEventArgs>;
|
|
957
|
+
/**
|
|
958
|
+
* Triggers before the Excel export process begins.
|
|
959
|
+
*
|
|
960
|
+
* @event 'excelExport'
|
|
961
|
+
*/
|
|
962
|
+
excelExport: EmitType<ExcelExportEventArgs>;
|
|
963
|
+
/**
|
|
964
|
+
* Triggers before the tooltip is rendered.
|
|
965
|
+
*
|
|
966
|
+
* @event 'tooltipOpen'
|
|
967
|
+
*/
|
|
968
|
+
tooltipOpen: EmitType<TooltipOpenEventArgs>;
|
|
920
969
|
/**
|
|
921
970
|
* Constructor for creating the Schedule widget
|
|
922
971
|
*
|
|
@@ -1821,6 +1870,23 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
|
|
|
1821
1870
|
* @returns {void}
|
|
1822
1871
|
*/
|
|
1823
1872
|
closeQuickInfoPopup(): void;
|
|
1873
|
+
/**
|
|
1874
|
+
* To manually open the overlap validation Alert.
|
|
1875
|
+
*
|
|
1876
|
+
* @param {PopupOpenEventArgs} args The arguments for opening the popup.
|
|
1877
|
+
* @param {string} args.type Defines the type of overlap alert (e.g., 'OverlapAlert').
|
|
1878
|
+
* @param {Record<string, any>} args.data The data associated with the popup.
|
|
1879
|
+
* @param {Record<string, any>[]} args.overlapEvents The overlap events.
|
|
1880
|
+
* @returns {void}
|
|
1881
|
+
*/
|
|
1882
|
+
openOverlapAlert(args: PopupOpenEventArgs): void;
|
|
1883
|
+
/**
|
|
1884
|
+
* To manually close the overlap validation Alert.
|
|
1885
|
+
*
|
|
1886
|
+
* @function closeOverlapValidationAlert
|
|
1887
|
+
* @returns {void}
|
|
1888
|
+
*/
|
|
1889
|
+
closeOverlapAlert(): void;
|
|
1824
1890
|
/**
|
|
1825
1891
|
* Closes the tooltip.
|
|
1826
1892
|
* For example, when the context menu is opened for an event,
|
|
@@ -393,6 +393,8 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
393
393
|
readonly: this.readonly,
|
|
394
394
|
startHour: this.startHour,
|
|
395
395
|
allowVirtualScrolling: false,
|
|
396
|
+
allowOverlap: this.allowOverlap,
|
|
397
|
+
overscanCount: this.overscanCount,
|
|
396
398
|
cellHeaderTemplate: this.cellHeaderTemplate,
|
|
397
399
|
dayHeaderTemplate: this.dayHeaderTemplate,
|
|
398
400
|
monthHeaderTemplate: this.monthHeaderTemplate,
|
|
@@ -852,6 +854,7 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
852
854
|
startEndError: 'The selected end date occurs before the start date.',
|
|
853
855
|
invalidDateError: 'The entered date value is invalid.',
|
|
854
856
|
blockAlert: 'Events cannot be scheduled within the blocked time range.',
|
|
857
|
+
overlapAlert: 'Events cannot be scheduled during the chosen time as it overlaps with another event.',
|
|
855
858
|
ok: 'Ok',
|
|
856
859
|
yes: 'Yes',
|
|
857
860
|
no: 'No',
|
|
@@ -1751,6 +1754,7 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
1751
1754
|
case 'allowDragAndDrop':
|
|
1752
1755
|
case 'allowResizing':
|
|
1753
1756
|
case 'eventDragArea':
|
|
1757
|
+
case 'allowOverlap':
|
|
1754
1758
|
this.refreshEvents(false);
|
|
1755
1759
|
break;
|
|
1756
1760
|
case 'weekRule':
|
|
@@ -2806,6 +2810,54 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
2806
2810
|
this.quickPopup.quickPopupHide(true);
|
|
2807
2811
|
}
|
|
2808
2812
|
};
|
|
2813
|
+
/**
|
|
2814
|
+
* To manually open the overlap validation Alert.
|
|
2815
|
+
*
|
|
2816
|
+
* @param {PopupOpenEventArgs} args The arguments for opening the popup.
|
|
2817
|
+
* @param {string} args.type Defines the type of overlap alert (e.g., 'OverlapAlert').
|
|
2818
|
+
* @param {Record<string, any>} args.data The data associated with the popup.
|
|
2819
|
+
* @param {Record<string, any>[]} args.overlapEvents The overlap events.
|
|
2820
|
+
* @returns {void}
|
|
2821
|
+
*/
|
|
2822
|
+
Schedule.prototype.openOverlapAlert = function (args) {
|
|
2823
|
+
var _this = this;
|
|
2824
|
+
if (this.quickPopup) {
|
|
2825
|
+
var eventProp = {
|
|
2826
|
+
type: 'OverlapAlert',
|
|
2827
|
+
cancel: false,
|
|
2828
|
+
element: this.quickPopup.quickDialog.element,
|
|
2829
|
+
data: args.data,
|
|
2830
|
+
overlapEvents: args.overlapEvents
|
|
2831
|
+
};
|
|
2832
|
+
this.trigger(events.popupOpen, eventProp, function (popupArgs) {
|
|
2833
|
+
if (!popupArgs.cancel) {
|
|
2834
|
+
_this.quickPopup.openValidationError('overlapAlert', args.data);
|
|
2835
|
+
}
|
|
2836
|
+
});
|
|
2837
|
+
}
|
|
2838
|
+
};
|
|
2839
|
+
/**
|
|
2840
|
+
* To manually close the overlap validation Alert.
|
|
2841
|
+
*
|
|
2842
|
+
* @function closeOverlapValidationAlert
|
|
2843
|
+
* @returns {void}
|
|
2844
|
+
*/
|
|
2845
|
+
Schedule.prototype.closeOverlapAlert = function () {
|
|
2846
|
+
var _this = this;
|
|
2847
|
+
if (this.quickPopup) {
|
|
2848
|
+
var args = {
|
|
2849
|
+
type: 'OverlapAlert',
|
|
2850
|
+
cancel: false,
|
|
2851
|
+
data: this.activeEventData.event,
|
|
2852
|
+
element: this.quickPopup.quickDialog.element
|
|
2853
|
+
};
|
|
2854
|
+
this.trigger(events.popupClose, args, function (popupArgs) {
|
|
2855
|
+
if (!popupArgs.cancel) {
|
|
2856
|
+
_this.quickPopup.quickDialog.hide();
|
|
2857
|
+
}
|
|
2858
|
+
});
|
|
2859
|
+
}
|
|
2860
|
+
};
|
|
2809
2861
|
/**
|
|
2810
2862
|
* Closes the tooltip.
|
|
2811
2863
|
* For example, when the context menu is opened for an event,
|
|
@@ -3001,6 +3053,12 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
3001
3053
|
__decorate([
|
|
3002
3054
|
Property(true)
|
|
3003
3055
|
], Schedule.prototype, "allowSwiping", void 0);
|
|
3056
|
+
__decorate([
|
|
3057
|
+
Property(true)
|
|
3058
|
+
], Schedule.prototype, "allowOverlap", void 0);
|
|
3059
|
+
__decorate([
|
|
3060
|
+
Property(3)
|
|
3061
|
+
], Schedule.prototype, "overscanCount", void 0);
|
|
3004
3062
|
__decorate([
|
|
3005
3063
|
Collection([], ToolbarItem)
|
|
3006
3064
|
], Schedule.prototype, "toolbarItems", void 0);
|
|
@@ -3259,6 +3317,15 @@ var Schedule = /** @class */ (function (_super) {
|
|
|
3259
3317
|
__decorate([
|
|
3260
3318
|
Event()
|
|
3261
3319
|
], Schedule.prototype, "beforePaste", void 0);
|
|
3320
|
+
__decorate([
|
|
3321
|
+
Event()
|
|
3322
|
+
], Schedule.prototype, "beforePrint", void 0);
|
|
3323
|
+
__decorate([
|
|
3324
|
+
Event()
|
|
3325
|
+
], Schedule.prototype, "excelExport", void 0);
|
|
3326
|
+
__decorate([
|
|
3327
|
+
Event()
|
|
3328
|
+
], Schedule.prototype, "tooltipOpen", void 0);
|
|
3262
3329
|
Schedule = __decorate([
|
|
3263
3330
|
NotifyPropertyChanges
|
|
3264
3331
|
], Schedule);
|
|
@@ -51,13 +51,14 @@ export declare type ReturnType = {
|
|
|
51
51
|
* Editor :- Denotes the detailed editor window.
|
|
52
52
|
* EventContainer :- Denotes the more indicator popup.
|
|
53
53
|
* QuickInfo :- Denotes the quick popup.
|
|
54
|
+
* OverlapAlert :- Denotes the popup showing overlap events.
|
|
54
55
|
* RecurrenceAlert :- Denotes the popup showing recurrence alerts.
|
|
55
56
|
* RecurrenceValidationAlert :- Denotes the popup showing recurrence validation alerts.
|
|
56
57
|
* ValidationAlert :- Denotes the popup showing validation alerts.
|
|
57
58
|
* ViewEventInfo :- Denotes the quick popup on the cells in responsive mode.
|
|
58
59
|
* ```
|
|
59
60
|
*/
|
|
60
|
-
export declare type PopupType = 'Editor' | 'EventContainer' | 'QuickInfo' | 'RecurrenceAlert' | 'DeleteAlert' | 'ViewEventInfo' | 'EditEventInfo' | 'ValidationAlert' | 'RecurrenceValidationAlert';
|
|
61
|
+
export declare type PopupType = 'Editor' | 'EventContainer' | 'QuickInfo' | 'RecurrenceAlert' | 'DeleteAlert' | 'ViewEventInfo' | 'EditEventInfo' | 'ValidationAlert' | 'RecurrenceValidationAlert' | 'OverlapAlert';
|
|
61
62
|
/**
|
|
62
63
|
* An enum that holds the header row type in the timeline scheduler.
|
|
63
64
|
* ```props
|
|
@@ -9,6 +9,7 @@ export declare class EventBase {
|
|
|
9
9
|
slots: number[];
|
|
10
10
|
cssClass: string;
|
|
11
11
|
groupOrder: string[];
|
|
12
|
+
processedData: Record<string, any>[];
|
|
12
13
|
private isDoubleTapped;
|
|
13
14
|
/**
|
|
14
15
|
* Constructor for EventBase
|
|
@@ -17,6 +18,10 @@ export declare class EventBase {
|
|
|
17
18
|
*/
|
|
18
19
|
constructor(parent: Schedule);
|
|
19
20
|
processData(events: Record<string, any>[], timeZonePropChanged?: boolean, oldTimezone?: string): Record<string, any>[];
|
|
21
|
+
private findOverlappingData;
|
|
22
|
+
private isOverlapRange;
|
|
23
|
+
private compareResourceValues;
|
|
24
|
+
checkOverlap(eventData: Record<string, any> | Record<string, any>[]): boolean;
|
|
20
25
|
updateEventDateTime(eventData: Record<string, any>): Record<string, any>;
|
|
21
26
|
getProcessedEvents(eventCollection?: Record<string, any>[]): Record<string, any>[];
|
|
22
27
|
timezonePropertyChange(oldTimezone: string): void;
|
|
@@ -18,6 +18,7 @@ var EventBase = /** @class */ (function () {
|
|
|
18
18
|
*/
|
|
19
19
|
function EventBase(parent) {
|
|
20
20
|
this.slots = [];
|
|
21
|
+
this.processedData = [];
|
|
21
22
|
this.isDoubleTapped = false;
|
|
22
23
|
this.parent = parent;
|
|
23
24
|
}
|
|
@@ -97,11 +98,35 @@ var EventBase = /** @class */ (function () {
|
|
|
97
98
|
return !data[_this.parent.eventFields.isBlock];
|
|
98
99
|
});
|
|
99
100
|
this.parent.eventsProcessed = this.filterEvents(start, end, eventData);
|
|
101
|
+
if (!this.parent.activeViewOptions.allowOverlap && this.parent.eventsProcessed.length > 0) {
|
|
102
|
+
this.processedData = this.parent.eventsProcessed;
|
|
103
|
+
var nonOverlapList = [];
|
|
104
|
+
var fields_1 = this.parent.eventFields;
|
|
105
|
+
for (var _a = 0, _b = this.parent.eventsProcessed; _a < _b.length; _a++) {
|
|
106
|
+
var data = _b[_a];
|
|
107
|
+
var overlappingData = this.findOverlappingData(data, nonOverlapList);
|
|
108
|
+
if (!overlappingData) {
|
|
109
|
+
nonOverlapList.push(data);
|
|
110
|
+
}
|
|
111
|
+
else if (!this.parent.eventSettings.sortComparer) {
|
|
112
|
+
var dataDuration = new Date(data[fields_1.endTime]).getTime() - new Date(data[fields_1.startTime]).getTime();
|
|
113
|
+
var duplicateDuration = new Date(overlappingData[fields_1.endTime]).getTime() - new Date(overlappingData[fields_1.startTime]).getTime();
|
|
114
|
+
if ((dataDuration > duplicateDuration && data[fields_1.startTime] === overlappingData[fields_1.startTime]) || (data[fields_1.isAllDay] === true)) {
|
|
115
|
+
var index = nonOverlapList.indexOf(overlappingData);
|
|
116
|
+
if (index !== -1) {
|
|
117
|
+
nonOverlapList.splice(index, 1);
|
|
118
|
+
}
|
|
119
|
+
nonOverlapList.push(data);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
this.parent.eventsProcessed = nonOverlapList;
|
|
124
|
+
}
|
|
100
125
|
var blockData = processed.filter(function (data) {
|
|
101
126
|
return data[_this.parent.eventFields.isBlock];
|
|
102
127
|
});
|
|
103
|
-
for (var
|
|
104
|
-
var eventObj = blockData_1[
|
|
128
|
+
for (var _c = 0, blockData_1 = blockData; _c < blockData_1.length; _c++) {
|
|
129
|
+
var eventObj = blockData_1[_c];
|
|
105
130
|
if (eventObj[fields.isAllDay]) {
|
|
106
131
|
var isDifferentDate = util.resetTime(new Date(eventObj[fields.startTime].getTime())) <
|
|
107
132
|
util.resetTime(new Date(eventObj[fields.endTime].getTime()));
|
|
@@ -114,6 +139,77 @@ var EventBase = /** @class */ (function () {
|
|
|
114
139
|
this.parent.blockProcessed = blockData;
|
|
115
140
|
return eventData;
|
|
116
141
|
};
|
|
142
|
+
EventBase.prototype.findOverlappingData = function (eventData, eventList) {
|
|
143
|
+
var isResource = this.parent.activeViewOptions.group.resources.length > 0;
|
|
144
|
+
var resourceCollection = isResource ? this.parent.resourceBase.resourceCollection : [];
|
|
145
|
+
var lastLevelResource = isResource ? resourceCollection[resourceCollection.length - 1].field : null;
|
|
146
|
+
var fields = this.parent.eventFields;
|
|
147
|
+
var newStartTime = new Date(eventData[fields.startTime]);
|
|
148
|
+
var newEndTime = new Date(eventData[fields.endTime]);
|
|
149
|
+
for (var _i = 0, eventList_1 = eventList; _i < eventList_1.length; _i++) {
|
|
150
|
+
var existingEvent = eventList_1[_i];
|
|
151
|
+
if (newStartTime < existingEvent[fields.endTime] &&
|
|
152
|
+
newEndTime > existingEvent[fields.startTime] &&
|
|
153
|
+
existingEvent[fields.id] !== eventData[fields.id] &&
|
|
154
|
+
(!isResource || isNullOrUndefined(lastLevelResource) ||
|
|
155
|
+
this.compareResourceValues(existingEvent["" + lastLevelResource], eventData["" + lastLevelResource]))) {
|
|
156
|
+
return existingEvent;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return undefined;
|
|
160
|
+
};
|
|
161
|
+
EventBase.prototype.isOverlapRange = function (eventData, currentAction) {
|
|
162
|
+
var _this = this;
|
|
163
|
+
if (currentAction === void 0) { currentAction = null; }
|
|
164
|
+
var isResource = this.parent.activeViewOptions.group.resources.length > 0;
|
|
165
|
+
var resourceCollection = isResource ? this.parent.resourceBase.resourceCollection : [];
|
|
166
|
+
var lastLevelResource = isResource ? resourceCollection[resourceCollection.length - 1].field : null;
|
|
167
|
+
var eventCollection = Array.isArray(eventData) ? eventData : [eventData];
|
|
168
|
+
var fields = this.parent.eventFields;
|
|
169
|
+
var processOverlappingEvents = function (data) {
|
|
170
|
+
return _this.processedData.filter(function (x) {
|
|
171
|
+
return data[fields.startTime] < x[fields.endTime] &&
|
|
172
|
+
data[fields.endTime] > x[fields.startTime] &&
|
|
173
|
+
x[fields.id] !== data[fields.id] &&
|
|
174
|
+
(!isResource || isNullOrUndefined(lastLevelResource) || _this.compareResourceValues(x["" + lastLevelResource], data["" + lastLevelResource]));
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
var overlappedEvents = [];
|
|
178
|
+
var isOverlapAlert = false;
|
|
179
|
+
for (var _i = 0, eventCollection_1 = eventCollection; _i < eventCollection_1.length; _i++) {
|
|
180
|
+
var event_2 = eventCollection_1[_i];
|
|
181
|
+
var dataCol = !isNullOrUndefined(event_2[fields.recurrenceRule]) &&
|
|
182
|
+
(isNullOrUndefined(event_2[fields.recurrenceID]) || event_2[fields.recurrenceID] === event_2[fields.id]) &&
|
|
183
|
+
(isNullOrUndefined(event_2[fields.recurrenceID]) || currentAction === 'EditSeries')
|
|
184
|
+
? this.generateOccurrence(event_2)
|
|
185
|
+
: [event_2];
|
|
186
|
+
for (var _a = 0, dataCol_1 = dataCol; _a < dataCol_1.length; _a++) {
|
|
187
|
+
var data = dataCol_1[_a];
|
|
188
|
+
var overlappingEvents = processOverlappingEvents(data);
|
|
189
|
+
if (overlappingEvents.length > 0) {
|
|
190
|
+
overlappedEvents.push.apply(overlappedEvents, overlappingEvents);
|
|
191
|
+
}
|
|
192
|
+
if (this.findOverlappingData(data, this.parent.eventsProcessed)) {
|
|
193
|
+
isOverlapAlert = true;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
this.parent.overlapAppointments = overlappedEvents;
|
|
198
|
+
return isOverlapAlert;
|
|
199
|
+
};
|
|
200
|
+
EventBase.prototype.compareResourceValues = function (a, b) {
|
|
201
|
+
var getValue = function (value) { return Array.isArray(value) ? value[0] : value; };
|
|
202
|
+
return getValue(a) === getValue(b);
|
|
203
|
+
};
|
|
204
|
+
EventBase.prototype.checkOverlap = function (eventData) {
|
|
205
|
+
if (!this.parent.activeViewOptions.allowOverlap) {
|
|
206
|
+
if (this.isOverlapRange(eventData)) {
|
|
207
|
+
this.parent.quickPopup.openValidationError('overlapAlert', eventData);
|
|
208
|
+
return true;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return false;
|
|
212
|
+
};
|
|
117
213
|
EventBase.prototype.updateEventDateTime = function (eventData) {
|
|
118
214
|
if (typeof eventData[this.parent.eventFields.startTime] === 'string') {
|
|
119
215
|
eventData[this.parent.eventFields.startTime] = util.getDateFromString(eventData[this.parent.eventFields.startTime]);
|
|
@@ -126,14 +222,14 @@ var EventBase = /** @class */ (function () {
|
|
|
126
222
|
EventBase.prototype.getProcessedEvents = function (eventCollection) {
|
|
127
223
|
if (eventCollection === void 0) { eventCollection = this.parent.eventsData; }
|
|
128
224
|
var processed = [];
|
|
129
|
-
for (var _i = 0,
|
|
130
|
-
var
|
|
131
|
-
if (!isNullOrUndefined(
|
|
132
|
-
isNullOrUndefined(
|
|
133
|
-
processed = processed.concat(this.generateOccurrence(
|
|
225
|
+
for (var _i = 0, eventCollection_2 = eventCollection; _i < eventCollection_2.length; _i++) {
|
|
226
|
+
var event_3 = eventCollection_2[_i];
|
|
227
|
+
if (!isNullOrUndefined(event_3[this.parent.eventFields.recurrenceRule]) &&
|
|
228
|
+
isNullOrUndefined(event_3[this.parent.eventFields.recurrenceID])) {
|
|
229
|
+
processed = processed.concat(this.generateOccurrence(event_3));
|
|
134
230
|
}
|
|
135
231
|
else {
|
|
136
|
-
processed.push(
|
|
232
|
+
processed.push(event_3);
|
|
137
233
|
}
|
|
138
234
|
}
|
|
139
235
|
return processed;
|
|
@@ -1031,13 +1127,13 @@ var EventBase = /** @class */ (function () {
|
|
|
1031
1127
|
} while (followingEvent);
|
|
1032
1128
|
var collections = {};
|
|
1033
1129
|
if (childObj) {
|
|
1034
|
-
var
|
|
1130
|
+
var fields_2 = this.parent.eventFields;
|
|
1035
1131
|
collections = {
|
|
1036
1132
|
follow: followingCollection.filter(function (eventData) {
|
|
1037
|
-
return eventData[
|
|
1133
|
+
return eventData[fields_2.startTime] >= childObj[fields_2.startTime];
|
|
1038
1134
|
}),
|
|
1039
1135
|
occurrence: occurrenceCollection.filter(function (eventData) {
|
|
1040
|
-
return eventData[
|
|
1136
|
+
return eventData[fields_2.startTime] >= childObj[fields_2.startTime];
|
|
1041
1137
|
})
|
|
1042
1138
|
};
|
|
1043
1139
|
}
|
|
@@ -1079,9 +1175,9 @@ var EventBase = /** @class */ (function () {
|
|
|
1079
1175
|
var occurrenceCollection = [];
|
|
1080
1176
|
var parentObject = this.parent.eventsData.filter(function (obj) { return obj[fields.id] === id; });
|
|
1081
1177
|
for (var _i = 0, parentObject_1 = parentObject; _i < parentObject_1.length; _i++) {
|
|
1082
|
-
var
|
|
1083
|
-
if (!isNullOrUndefined(
|
|
1084
|
-
occurrenceCollection = occurrenceCollection.concat(this.generateOccurrence(
|
|
1178
|
+
var event_4 = parentObject_1[_i];
|
|
1179
|
+
if (!isNullOrUndefined(event_4[fields.recurrenceRule])) {
|
|
1180
|
+
occurrenceCollection = occurrenceCollection.concat(this.generateOccurrence(event_4));
|
|
1085
1181
|
}
|
|
1086
1182
|
}
|
|
1087
1183
|
return occurrenceCollection;
|
|
@@ -1090,9 +1186,9 @@ var EventBase = /** @class */ (function () {
|
|
|
1090
1186
|
var fields = this.parent.eventFields;
|
|
1091
1187
|
var occurrenceCollection = [];
|
|
1092
1188
|
for (var _i = 0, _a = this.parent.eventsData; _i < _a.length; _i++) {
|
|
1093
|
-
var
|
|
1094
|
-
if (!isNullOrUndefined(
|
|
1095
|
-
occurrenceCollection = occurrenceCollection.concat(this.generateOccurrence(
|
|
1189
|
+
var event_5 = _a[_i];
|
|
1190
|
+
if (!isNullOrUndefined(event_5[fields.recurrenceRule])) {
|
|
1191
|
+
occurrenceCollection = occurrenceCollection.concat(this.generateOccurrence(event_5));
|
|
1096
1192
|
}
|
|
1097
1193
|
}
|
|
1098
1194
|
var filter = occurrenceCollection.filter(function (obj) {
|
|
@@ -1200,17 +1296,17 @@ var EventBase = /** @class */ (function () {
|
|
|
1200
1296
|
var isBlockAlert = false;
|
|
1201
1297
|
var fields = this.parent.eventFields;
|
|
1202
1298
|
for (var _i = 0, _a = eventCollection; _i < _a.length; _i++) {
|
|
1203
|
-
var
|
|
1299
|
+
var event_6 = _a[_i];
|
|
1204
1300
|
var dataCol = [];
|
|
1205
|
-
if (!isNullOrUndefined(
|
|
1206
|
-
(isNullOrUndefined(
|
|
1207
|
-
dataCol = this.generateOccurrence(
|
|
1301
|
+
if (!isNullOrUndefined(event_6[fields.recurrenceRule]) &&
|
|
1302
|
+
(isNullOrUndefined(event_6[fields.recurrenceID]) || event_6[fields.id] === event_6[fields.recurrenceID])) {
|
|
1303
|
+
dataCol = this.generateOccurrence(event_6);
|
|
1208
1304
|
}
|
|
1209
1305
|
else {
|
|
1210
|
-
dataCol.push(
|
|
1306
|
+
dataCol.push(event_6);
|
|
1211
1307
|
}
|
|
1212
|
-
for (var _b = 0,
|
|
1213
|
-
var data =
|
|
1308
|
+
for (var _b = 0, dataCol_2 = dataCol; _b < dataCol_2.length; _b++) {
|
|
1309
|
+
var data = dataCol_2[_b];
|
|
1214
1310
|
var filterBlockEvents = this.filterBlockEvents(data);
|
|
1215
1311
|
if (filterBlockEvents.length > 0) {
|
|
1216
1312
|
isBlockAlert = true;
|
|
@@ -1255,9 +1351,9 @@ var EventBase = /** @class */ (function () {
|
|
|
1255
1351
|
var deleteRecurrenceEventList = [];
|
|
1256
1352
|
var delEditedEvents;
|
|
1257
1353
|
for (var _i = 0, deleteFutureEditEventList_1 = deleteFutureEditEventList; _i < deleteFutureEditEventList_1.length; _i++) {
|
|
1258
|
-
var
|
|
1259
|
-
var delEventQuery = new Predicate(fields.recurrenceID, 'equal',
|
|
1260
|
-
or(new Predicate(fields.recurrenceID, 'equal',
|
|
1354
|
+
var event_7 = deleteFutureEditEventList_1[_i];
|
|
1355
|
+
var delEventQuery = new Predicate(fields.recurrenceID, 'equal', event_7[fields.id]).
|
|
1356
|
+
or(new Predicate(fields.recurrenceID, 'equal', event_7[fields.followingID]).
|
|
1261
1357
|
and(new Predicate(fields.recurrenceID, 'notequal', undefined)).
|
|
1262
1358
|
and(new Predicate(fields.recurrenceID, 'notequal', null)));
|
|
1263
1359
|
if (this.parent.currentAction === 'EditFollowingEvents' || this.parent.currentAction === 'DeleteFollowingEvents') {
|
|
@@ -4,6 +4,7 @@ import { Schedule } from '../base/schedule';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare class InlineEdit {
|
|
6
6
|
private parent;
|
|
7
|
+
private inlineInputEle;
|
|
7
8
|
constructor(parent: Schedule);
|
|
8
9
|
private inlineEdit;
|
|
9
10
|
private cellEdit;
|
|
@@ -13,9 +14,10 @@ export declare class InlineEdit {
|
|
|
13
14
|
private createTimelineViewInline;
|
|
14
15
|
private getEventDaysCount;
|
|
15
16
|
private generateEventData;
|
|
16
|
-
documentClick(): void;
|
|
17
|
+
documentClick(target: HTMLInputElement): void;
|
|
17
18
|
inlineCrudActions(target: HTMLTableCellElement): void;
|
|
18
19
|
createInlineAppointmentElement(inlineData?: Record<string, any>): HTMLElement;
|
|
19
20
|
removeInlineAppointmentElement(): void;
|
|
21
|
+
getInlineElement(): HTMLInputElement | null;
|
|
20
22
|
destroy(): void;
|
|
21
23
|
}
|
|
@@ -77,7 +77,8 @@ var InlineEdit = /** @class */ (function () {
|
|
|
77
77
|
else {
|
|
78
78
|
subject = args.data[this.parent.eventFields.subject];
|
|
79
79
|
}
|
|
80
|
-
inlineSubject =
|
|
80
|
+
inlineSubject = this.inlineInputEle =
|
|
81
|
+
createElement('input', { className: cls.INLINE_SUBJECT_CLASS, attrs: { value: subject } });
|
|
81
82
|
if (closest(args.element, '.' + cls.MORE_POPUP_WRAPPER_CLASS)) {
|
|
82
83
|
args.element.insertBefore(inlineSubject, subEle);
|
|
83
84
|
}
|
|
@@ -196,8 +197,7 @@ var InlineEdit = /** @class */ (function () {
|
|
|
196
197
|
}
|
|
197
198
|
return saveObj;
|
|
198
199
|
};
|
|
199
|
-
InlineEdit.prototype.documentClick = function () {
|
|
200
|
-
var target = this.parent.element.querySelector('.' + cls.INLINE_SUBJECT_CLASS);
|
|
200
|
+
InlineEdit.prototype.documentClick = function (target) {
|
|
201
201
|
if (target && target.value !== '') {
|
|
202
202
|
this.inlineCrudActions(target);
|
|
203
203
|
}
|
|
@@ -229,7 +229,8 @@ var InlineEdit = /** @class */ (function () {
|
|
|
229
229
|
});
|
|
230
230
|
var inlineDetails = createElement('div', { className: cls.APPOINTMENT_DETAILS });
|
|
231
231
|
inlineAppointmentElement.appendChild(inlineDetails);
|
|
232
|
-
var inline =
|
|
232
|
+
var inline = this.inlineInputEle =
|
|
233
|
+
createElement('input', { className: cls.INLINE_SUBJECT_CLASS });
|
|
233
234
|
inlineDetails.appendChild(inline);
|
|
234
235
|
if (inlineData) {
|
|
235
236
|
this.parent.eventBase.applyResourceColor(inlineAppointmentElement, inlineData, 'backgroundColor');
|
|
@@ -239,9 +240,15 @@ var InlineEdit = /** @class */ (function () {
|
|
|
239
240
|
InlineEdit.prototype.removeInlineAppointmentElement = function () {
|
|
240
241
|
var inlineAppointment = [].slice.call(this.parent.element.querySelectorAll('.' + cls.INLINE_APPOINTMENT_CLASS));
|
|
241
242
|
if (inlineAppointment.length > 0) {
|
|
242
|
-
inlineAppointment.forEach(function (node) {
|
|
243
|
+
inlineAppointment.forEach(function (node) {
|
|
244
|
+
var inlineSubject = node.querySelector('.' + cls.INLINE_SUBJECT_CLASS);
|
|
245
|
+
if (!isNullOrUndefined(inlineSubject)) {
|
|
246
|
+
inlineSubject.blur();
|
|
247
|
+
}
|
|
248
|
+
remove(node);
|
|
249
|
+
});
|
|
243
250
|
}
|
|
244
|
-
var inlineSubject = this.
|
|
251
|
+
var inlineSubject = this.getInlineElement();
|
|
245
252
|
if (inlineSubject) {
|
|
246
253
|
var appointmentSubject = closest(inlineSubject, '.' + cls.APPOINTMENT_CLASS);
|
|
247
254
|
var subject = appointmentSubject.querySelector('.' + cls.SUBJECT_CLASS);
|
|
@@ -250,8 +257,13 @@ var InlineEdit = /** @class */ (function () {
|
|
|
250
257
|
}
|
|
251
258
|
remove(inlineSubject);
|
|
252
259
|
}
|
|
260
|
+
this.inlineInputEle = null;
|
|
261
|
+
};
|
|
262
|
+
InlineEdit.prototype.getInlineElement = function () {
|
|
263
|
+
return this.inlineInputEle;
|
|
253
264
|
};
|
|
254
265
|
InlineEdit.prototype.destroy = function () {
|
|
266
|
+
this.inlineInputEle = null;
|
|
255
267
|
this.parent.off(events.inlineClick, this.inlineEdit);
|
|
256
268
|
};
|
|
257
269
|
return InlineEdit;
|
|
@@ -41,6 +41,7 @@ export declare class MonthEvent extends EventBase {
|
|
|
41
41
|
createAppointmentElement(record: Record<string, any>, resIndex: number, isCloneElement?: boolean): HTMLElement;
|
|
42
42
|
private appendEventIcons;
|
|
43
43
|
renderEvents(event: Record<string, any>, resIndex: number, eventsList?: Record<string, any>[]): void;
|
|
44
|
+
adjustAppointments(conWidth: number): void;
|
|
44
45
|
updateCellHeight(cell: HTMLElement, height: number): void;
|
|
45
46
|
updateBlockElements(): void;
|
|
46
47
|
getFilteredEvents(startDate: Date, endDate: Date, groupIndex: string, eventsList?: Record<string, any>[]): Record<string, any>[];
|