@syncfusion/ej2-schedule 20.4.52 → 21.1.35
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/CHANGELOG.md +30 -0
- 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 +374 -153
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +409 -174
- 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 +16 -16
- package/src/common/calendar-util.d.ts +7 -0
- package/src/recurrence-editor/recurrence-editor.d.ts +10 -0
- package/src/recurrence-editor/recurrence-editor.js +3 -3
- package/src/schedule/actions/action-base.js +5 -0
- package/src/schedule/actions/crud.js +14 -2
- package/src/schedule/actions/data.d.ts +14 -2
- package/src/schedule/actions/data.js +26 -2
- package/src/schedule/actions/drag.js +6 -1
- package/src/schedule/actions/keyboard.d.ts +1 -1
- package/src/schedule/actions/keyboard.js +17 -15
- package/src/schedule/actions/virtual-scroll.js +2 -2
- package/src/schedule/base/interface.d.ts +23 -23
- package/src/schedule/base/resource.js +8 -7
- package/src/schedule/base/schedule-model.d.ts +34 -27
- package/src/schedule/base/schedule.d.ts +57 -27
- package/src/schedule/base/schedule.js +56 -9
- package/src/schedule/base/type.d.ts +66 -1
- package/src/schedule/event-renderer/agenda-base.js +6 -2
- package/src/schedule/event-renderer/event-base.d.ts +1 -0
- package/src/schedule/event-renderer/event-base.js +27 -10
- package/src/schedule/event-renderer/month.js +4 -5
- package/src/schedule/event-renderer/vertical-view.d.ts +0 -1
- package/src/schedule/event-renderer/vertical-view.js +6 -30
- package/src/schedule/event-renderer/year.d.ts +1 -0
- package/src/schedule/event-renderer/year.js +135 -54
- package/src/schedule/models/event-settings-model.d.ts +11 -2
- package/src/schedule/models/event-settings.d.ts +10 -2
- package/src/schedule/models/event-settings.js +3 -0
- package/src/schedule/models/fields-model.d.ts +4 -2
- package/src/schedule/models/fields.d.ts +6 -4
- package/src/schedule/models/fields.js +2 -2
- package/src/schedule/models/header-rows-model.d.ts +5 -5
- package/src/schedule/models/header-rows.d.ts +5 -5
- package/src/schedule/models/quick-info-templates-model.d.ts +3 -3
- package/src/schedule/models/quick-info-templates.d.ts +3 -3
- package/src/schedule/models/views-model.d.ts +16 -15
- package/src/schedule/models/views.d.ts +16 -15
- package/src/schedule/popups/event-tooltip.js +2 -1
- package/src/schedule/popups/event-window.js +27 -6
- package/src/schedule/popups/quick-popups.js +32 -10
- package/src/schedule/renderer/header-renderer.js +1 -0
- package/src/schedule/renderer/month-agenda.d.ts +2 -1
- package/src/schedule/renderer/month-agenda.js +5 -0
- package/src/schedule/renderer/month.d.ts +1 -0
- package/src/schedule/renderer/month.js +5 -3
- package/src/schedule/renderer/timeline-year.js +12 -8
- package/src/schedule/renderer/vertical-view.js +1 -1
- package/src/schedule/renderer/view-base.js +3 -4
- package/src/schedule/renderer/year.js +5 -1
- package/styles/bootstrap-dark.css +99 -89
- package/styles/bootstrap.css +99 -89
- package/styles/bootstrap4.css +99 -89
- package/styles/bootstrap5-dark.css +110 -100
- package/styles/bootstrap5.css +110 -100
- package/styles/fabric-dark.css +98 -88
- package/styles/fabric.css +98 -88
- package/styles/fluent-dark.css +109 -99
- package/styles/fluent.css +109 -99
- package/styles/highcontrast-light.css +98 -88
- package/styles/highcontrast.css +98 -88
- package/styles/material-dark.css +98 -88
- package/styles/material.css +98 -88
- package/styles/recurrence-editor/_bootstrap5-definition.scss +1 -1
- package/styles/recurrence-editor/_fluent-definition.scss +1 -1
- package/styles/recurrence-editor/_tailwind-definition.scss +1 -1
- package/styles/schedule/_bootstrap-dark-definition.scss +8 -1
- package/styles/schedule/_bootstrap-definition.scss +8 -1
- package/styles/schedule/_bootstrap4-definition.scss +7 -0
- package/styles/schedule/_bootstrap5-definition.scss +17 -10
- package/styles/schedule/_fabric-dark-definition.scss +7 -0
- package/styles/schedule/_fabric-definition.scss +7 -0
- package/styles/schedule/_fluent-definition.scss +15 -8
- package/styles/schedule/_fusionnew-definition.scss +7 -0
- package/styles/schedule/_highcontrast-definition.scss +7 -0
- package/styles/schedule/_highcontrast-light-definition.scss +7 -0
- package/styles/schedule/_layout.scss +63 -48
- package/styles/schedule/_material-dark-definition.scss +7 -0
- package/styles/schedule/_material-definition.scss +7 -0
- package/styles/schedule/_tailwind-definition.scss +17 -10
- package/styles/schedule/_theme.scss +40 -41
- package/styles/schedule/bootstrap-dark.css +99 -89
- package/styles/schedule/bootstrap.css +99 -89
- package/styles/schedule/bootstrap4.css +99 -89
- package/styles/schedule/bootstrap5-dark.css +110 -100
- package/styles/schedule/bootstrap5.css +110 -100
- package/styles/schedule/fabric-dark.css +98 -88
- package/styles/schedule/fabric.css +98 -88
- package/styles/schedule/fluent-dark.css +109 -99
- package/styles/schedule/fluent.css +109 -99
- package/styles/schedule/highcontrast-light.css +98 -88
- package/styles/schedule/highcontrast.css +98 -88
- package/styles/schedule/material-dark.css +98 -88
- package/styles/schedule/material.css +98 -88
- package/styles/schedule/tailwind-dark.css +106 -96
- package/styles/schedule/tailwind.css +106 -96
- package/styles/tailwind-dark.css +106 -96
- package/styles/tailwind.css +106 -96
- package/GitLeaksReport.json +0 -1
- package/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
- package/styles/recurrence-editor/_material3-definition.scss +0 -13
- package/styles/schedule/_material3-definition.scss +0 -283
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 21.1.35
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-schedule@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-schedule@20.
|
|
3
|
+
"_id": "@syncfusion/ej2-schedule@20.9.3",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-K6UC0wZI336AFlzdF5eDnjkWDciLjVvVuDLhr0wN61M48p8SPo799ZQRb6fF5zmhIRbaJNRe9TZ9ZeeAqUt8Aw==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-schedule",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-schedule",
|
|
24
24
|
"/@syncfusion/ej2-vue-schedule"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-schedule/-/ej2-schedule-20.9.3.tgz",
|
|
27
|
+
"_shasum": "e7705d82f1d75f19054bc4259b54f526b84d464d",
|
|
28
28
|
"_spec": "@syncfusion/ej2-schedule@*",
|
|
29
|
-
"_where": "/jenkins/workspace/
|
|
29
|
+
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Syncfusion Inc."
|
|
32
32
|
},
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~
|
|
39
|
-
"@syncfusion/ej2-buttons": "~
|
|
40
|
-
"@syncfusion/ej2-calendars": "~
|
|
41
|
-
"@syncfusion/ej2-data": "~
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~
|
|
43
|
-
"@syncfusion/ej2-excel-export": "~
|
|
44
|
-
"@syncfusion/ej2-inputs": "~
|
|
45
|
-
"@syncfusion/ej2-lists": "~
|
|
46
|
-
"@syncfusion/ej2-navigations": "~
|
|
47
|
-
"@syncfusion/ej2-popups": "~
|
|
38
|
+
"@syncfusion/ej2-base": "~21.1.35",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~21.1.35",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~21.1.35",
|
|
41
|
+
"@syncfusion/ej2-data": "~21.1.35",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~21.1.35",
|
|
43
|
+
"@syncfusion/ej2-excel-export": "~21.1.35",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~21.1.35",
|
|
45
|
+
"@syncfusion/ej2-lists": "~21.1.35",
|
|
46
|
+
"@syncfusion/ej2-navigations": "~21.1.35",
|
|
47
|
+
"@syncfusion/ej2-popups": "~21.1.35"
|
|
48
48
|
},
|
|
49
49
|
"deprecated": false,
|
|
50
50
|
"description": "Flexible scheduling library with more built-in features and enhanced customization options similar to outlook and google calendar, allowing the users to plan and manage their appointments with efficient data-binding support.",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
74
74
|
},
|
|
75
75
|
"typings": "index.d.ts",
|
|
76
|
-
"version": "
|
|
76
|
+
"version": "21.1.35",
|
|
77
77
|
"sideEffects": false
|
|
78
78
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Calendar functionalities
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* Defines the calendar type of the scheduler.
|
|
6
|
+
* ```props
|
|
7
|
+
* Islamic :- Denotes the Islamic calendar.
|
|
8
|
+
* Gregorian :- Denotes the Gregorian calendar.
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
4
11
|
export declare type CalendarType = 'Islamic' | 'Gregorian';
|
|
5
12
|
/** @private */
|
|
6
13
|
export interface CalendarUtil {
|
|
@@ -203,4 +203,14 @@ export interface RecurrenceEditorChangeEventArgs {
|
|
|
203
203
|
/** Returns the current recurrence rule. */
|
|
204
204
|
value: string;
|
|
205
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* Defines the repeat type of the recurrence editor.
|
|
208
|
+
* ```props
|
|
209
|
+
* none :- Denotes no repetition.
|
|
210
|
+
* daily :- Denotes repetition every day.
|
|
211
|
+
* weekly :- Denotes repetition every week.
|
|
212
|
+
* monthly :- Denotes repetition every month.
|
|
213
|
+
* yearly :- Denotes repetition every year.
|
|
214
|
+
* ```
|
|
215
|
+
*/
|
|
206
216
|
export declare type RepeatType = 'none' | 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
@@ -724,7 +724,7 @@ var RecurrenceEditor = /** @class */ (function (_super) {
|
|
|
724
724
|
'"label="' + REPEATELEMENT.substr(2) + '" />' +
|
|
725
725
|
'</div><div class="' + INPUTWARAPPER + ' ' +
|
|
726
726
|
INTERVALCLASS + ' ' + FORMRIGHT + '"><table class="' + RECURRENCETABLE + ' ' + REPEATCONTENTWRAPPER + '"><tr>' +
|
|
727
|
-
'<td><input type="text" tabindex="0" class="' + REPEATINTERVAL +
|
|
727
|
+
'<td><input type="text" tabindex="0" id="' + this.element.id + '_' + REPEATINTERVAL + '" class="' + REPEATINTERVAL +
|
|
728
728
|
'"title="' + this.localeObj.getConstant('repeatEvery') + '" /></td>' +
|
|
729
729
|
'<td><span class="' + REPEATCONTENT + '"></span></td>' +
|
|
730
730
|
'</tr></table></div><div class="' + INPUTWARAPPERSIDE + ' ' + DAYWRAPPER + ' ' + FORMLEFT + '">' +
|
|
@@ -748,7 +748,7 @@ var RecurrenceEditor = /** @class */ (function (_super) {
|
|
|
748
748
|
'<input class="' + MONTHEXPANDERELEMENT + '"title="' + this.localeObj.getConstant('monthExpander') + '" type="radio">' +
|
|
749
749
|
'</div></td>' +
|
|
750
750
|
'<td colspan="2"><div class="' + INPUTWARAPPER + ' ' + MONTHDAYELEMENT + '">' +
|
|
751
|
-
'<input type="text" tabindex="0" class="' + MONTHDAYWRAPPER + '"title="' +
|
|
751
|
+
'<input type="text" tabindex="0" id="' + this.element.id + '_' + MONTHDAYWRAPPER + '" class="' + MONTHDAYWRAPPER + '"title="' +
|
|
752
752
|
this.localeObj.getConstant('on') + '" />' +
|
|
753
753
|
'</div></td></tr>' +
|
|
754
754
|
'<tr><td>' +
|
|
@@ -771,7 +771,7 @@ var RecurrenceEditor = /** @class */ (function (_super) {
|
|
|
771
771
|
'<input type="text" tabindex="0" class="' + UNTILDATE + '"title="' + this.localeObj.getConstant(UNTIL) + '" />' +
|
|
772
772
|
'</div>' +
|
|
773
773
|
'<div class="' + INPUTWARAPPER + ' ' + ENDONCOUNTWRAPPER + '">' +
|
|
774
|
-
'<input type="text" tabindex="0" class="' + ENDONCOUNT + '"title="' + this.localeObj.getConstant(COUNT) + '" />' +
|
|
774
|
+
'<input type="text" tabindex="0" id="' + this.element.id + '_' + ENDONCOUNT + '" class="' + ENDONCOUNT + '"title="' + this.localeObj.getConstant(COUNT) + '" />' +
|
|
775
775
|
'</div></div>' +
|
|
776
776
|
'</div></div>';
|
|
777
777
|
};
|
|
@@ -63,6 +63,7 @@ var ActionBase = /** @class */ (function () {
|
|
|
63
63
|
parseInt(this.actionObj.element.getAttribute('data-group-index'), 10) === this.actionObj.groupIndex : true;
|
|
64
64
|
if (+eventObj[this.parent.eventFields.startTime] === +this.actionObj.event[this.parent.eventFields.startTime] &&
|
|
65
65
|
+eventObj[this.parent.eventFields.endTime] === +this.actionObj.event[this.parent.eventFields.endTime] && isSameResource) {
|
|
66
|
+
this.parent.crudModule.crudObj.isCrudAction = false;
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
68
69
|
if (eventObj[this.parent.eventFields.recurrenceRule]) {
|
|
@@ -344,6 +345,10 @@ var ActionBase = /** @class */ (function () {
|
|
|
344
345
|
}
|
|
345
346
|
appWidth = eventObj.isSpanned.count * this.actionObj.cellWidth;
|
|
346
347
|
}
|
|
348
|
+
if (!isResize && this.parent.activeViewOptions.orientation === 'Vertical' && this.parent.activeViewOptions.group.resources.length !== 0) {
|
|
349
|
+
var eventObj = this.yearEvent.isSpannedEvent(event, event[this.parent.eventFields.startTime]);
|
|
350
|
+
appWidth = eventObj.isSpanned.count * this.actionObj.cellWidth;
|
|
351
|
+
}
|
|
347
352
|
var appointmentElement = this.createAppointmentElement(this.actionObj.groupIndex, event[this.parent.eventFields.subject]);
|
|
348
353
|
appointmentElement.setAttribute('drag', 'true');
|
|
349
354
|
addClass([appointmentElement], cls.CLONE_ELEMENT_CLASS);
|
|
@@ -81,7 +81,9 @@ var Crud = /** @class */ (function () {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
if (templateNames.length > 0) {
|
|
85
|
+
this.parent.resetTemplates(templateNames);
|
|
86
|
+
}
|
|
85
87
|
}
|
|
86
88
|
if (isVirtualScrollAction) {
|
|
87
89
|
this.parent.notify(events.dataReady, { processedData: this.parent.eventsProcessed });
|
|
@@ -162,6 +164,9 @@ var Crud = /** @class */ (function () {
|
|
|
162
164
|
return;
|
|
163
165
|
}
|
|
164
166
|
var addEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
167
|
+
if (addEvents.length === 0) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
165
170
|
var args = {
|
|
166
171
|
requestType: 'eventCreate', cancel: false, data: addEvents,
|
|
167
172
|
addedRecords: addEvents, changedRecords: [], deletedRecords: []
|
|
@@ -199,6 +204,11 @@ var Crud = /** @class */ (function () {
|
|
|
199
204
|
if (this.parent.currentAction !== 'EditFollowingEvents' && !this.isBlockEvent(eventData)
|
|
200
205
|
&& this.parent.eventBase.isBlockRange(eventData)) {
|
|
201
206
|
this.parent.quickPopup.openValidationError('blockAlert', eventData);
|
|
207
|
+
this.parent.crudModule.crudObj.isCrudAction = false;
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
var updateEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
211
|
+
if (updateEvents.length === 0) {
|
|
202
212
|
return;
|
|
203
213
|
}
|
|
204
214
|
this.parent.currentAction = action;
|
|
@@ -219,7 +229,6 @@ var Crud = /** @class */ (function () {
|
|
|
219
229
|
}
|
|
220
230
|
}
|
|
221
231
|
else {
|
|
222
|
-
var updateEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
223
232
|
var args = {
|
|
224
233
|
requestType: 'eventChange', cancel: false, data: eventData,
|
|
225
234
|
addedRecords: [], changedRecords: updateEvents, deletedRecords: []
|
|
@@ -266,6 +275,9 @@ var Crud = /** @class */ (function () {
|
|
|
266
275
|
else {
|
|
267
276
|
deleteEvents = (eventData instanceof Array ? eventData : [eventData]);
|
|
268
277
|
}
|
|
278
|
+
if (deleteEvents.length === 0) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
269
281
|
if (action) {
|
|
270
282
|
switch (action) {
|
|
271
283
|
case 'Delete':
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Query, DataManager } from '@syncfusion/ej2-data';
|
|
1
|
+
import { Query, DataManager, Predicate } from '@syncfusion/ej2-data';
|
|
2
|
+
import { Schedule } from '../base/schedule';
|
|
2
3
|
/**
|
|
3
4
|
* data module is used to generate query and data source.
|
|
4
5
|
*
|
|
@@ -7,14 +8,16 @@ import { Query, DataManager } from '@syncfusion/ej2-data';
|
|
|
7
8
|
export declare class Data {
|
|
8
9
|
dataManager: DataManager;
|
|
9
10
|
private query;
|
|
11
|
+
private parent;
|
|
10
12
|
/**
|
|
11
13
|
* Constructor for data module
|
|
12
14
|
*
|
|
15
|
+
* @param {Schedule} parent Accepts the schedule element instance
|
|
13
16
|
* @param {Object | DataManager} dataSource Accepts the datasource as JSON objects or DataManager
|
|
14
17
|
* @param {Query} query Accepts the query to process the data
|
|
15
18
|
* @private
|
|
16
19
|
*/
|
|
17
|
-
constructor(dataSource?: Record<string, any>[] | DataManager, query?: Query);
|
|
20
|
+
constructor(parent: Schedule, dataSource?: Record<string, any>[] | DataManager, query?: Query);
|
|
18
21
|
/**
|
|
19
22
|
* The function used to initialize dataManager and query
|
|
20
23
|
*
|
|
@@ -33,6 +36,15 @@ export declare class Data {
|
|
|
33
36
|
* @private
|
|
34
37
|
*/
|
|
35
38
|
generateQuery(startDate?: Date, endDate?: Date): Query;
|
|
39
|
+
/**
|
|
40
|
+
* The function used to generate updated Query from schedule model
|
|
41
|
+
*
|
|
42
|
+
* @param {Date} startDate Accepts the start date
|
|
43
|
+
* @param {Date} endDate Accepts the end date
|
|
44
|
+
* @returns {void}
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
getStartEndQuery(startDate?: Date, endDate?: Date): Predicate;
|
|
36
48
|
/**
|
|
37
49
|
* The function used to get dataSource by executing given Query
|
|
38
50
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { Query, DataManager } from '@syncfusion/ej2-data';
|
|
2
|
+
import { Query, DataManager, Predicate } from '@syncfusion/ej2-data';
|
|
3
3
|
/**
|
|
4
4
|
* data module is used to generate query and data source.
|
|
5
5
|
*
|
|
@@ -9,11 +9,13 @@ var Data = /** @class */ (function () {
|
|
|
9
9
|
/**
|
|
10
10
|
* Constructor for data module
|
|
11
11
|
*
|
|
12
|
+
* @param {Schedule} parent Accepts the schedule element instance
|
|
12
13
|
* @param {Object | DataManager} dataSource Accepts the datasource as JSON objects or DataManager
|
|
13
14
|
* @param {Query} query Accepts the query to process the data
|
|
14
15
|
* @private
|
|
15
16
|
*/
|
|
16
|
-
function Data(dataSource, query) {
|
|
17
|
+
function Data(parent, dataSource, query) {
|
|
18
|
+
this.parent = parent;
|
|
17
19
|
this.initDataManager(dataSource, query);
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
@@ -38,6 +40,11 @@ var Data = /** @class */ (function () {
|
|
|
38
40
|
*/
|
|
39
41
|
Data.prototype.generateQuery = function (startDate, endDate) {
|
|
40
42
|
var query = this.query.clone();
|
|
43
|
+
if (this.parent && this.parent.eventSettings.includeFiltersInQuery && startDate && endDate) {
|
|
44
|
+
var dateQuery = this.getStartEndQuery(startDate, endDate);
|
|
45
|
+
var recurrenceQuery = new Predicate(this.parent.eventFields.recurrenceRule, 'notequal', null).and(new Predicate(this.parent.eventFields.recurrenceRule, 'notequal', ''));
|
|
46
|
+
return query.where(dateQuery.or(recurrenceQuery));
|
|
47
|
+
}
|
|
41
48
|
if (startDate) {
|
|
42
49
|
query.addParams('StartDate', startDate.toISOString());
|
|
43
50
|
}
|
|
@@ -46,6 +53,23 @@ var Data = /** @class */ (function () {
|
|
|
46
53
|
}
|
|
47
54
|
return query;
|
|
48
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* The function used to generate updated Query from schedule model
|
|
58
|
+
*
|
|
59
|
+
* @param {Date} startDate Accepts the start date
|
|
60
|
+
* @param {Date} endDate Accepts the end date
|
|
61
|
+
* @returns {void}
|
|
62
|
+
* @private
|
|
63
|
+
*/
|
|
64
|
+
Data.prototype.getStartEndQuery = function (startDate, endDate) {
|
|
65
|
+
var fieldMapping = this.parent.eventFields;
|
|
66
|
+
var dateQuery = new Predicate(fieldMapping.startTime, 'greaterthanorequal', startDate)
|
|
67
|
+
.and(new Predicate(fieldMapping.endTime, 'greaterthanorequal', startDate))
|
|
68
|
+
.and(new Predicate(fieldMapping.startTime, 'lessthan', endDate))
|
|
69
|
+
.or(new Predicate(fieldMapping.startTime, 'lessthanorequal', startDate)
|
|
70
|
+
.and(new Predicate(fieldMapping.endTime, 'greaterthan', startDate)));
|
|
71
|
+
return dateQuery;
|
|
72
|
+
};
|
|
49
73
|
/**
|
|
50
74
|
* The function used to get dataSource by executing given Query
|
|
51
75
|
*
|
|
@@ -740,7 +740,12 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
740
740
|
};
|
|
741
741
|
DragAndDrop.prototype.getDayIndex = function (event) {
|
|
742
742
|
var eventObj = extend({}, event, null, true);
|
|
743
|
-
var
|
|
743
|
+
var startDate = util.resetTime(eventObj[this.parent.eventFields.startTime]);
|
|
744
|
+
if (this.parent.activeViewOptions.timeScale.enable && !eventObj[this.parent.eventFields.isAllDay]) {
|
|
745
|
+
var startHour = this.parent.activeView.getStartHour();
|
|
746
|
+
startDate.setMilliseconds(startHour.getTime() - util.resetTime(startHour).getTime());
|
|
747
|
+
}
|
|
748
|
+
var startTime = startDate.getTime();
|
|
744
749
|
var query = '';
|
|
745
750
|
var wrapper = cls.DAY_WRAPPER_CLASS;
|
|
746
751
|
if (this.parent.activeViewOptions.timeScale.enable && (eventObj[this.parent.eventFields.isAllDay])) {
|
|
@@ -219,7 +219,7 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
219
219
|
if (this.parent.eventWindow) {
|
|
220
220
|
this.parent.eventWindow.convertToEventData(this.parent.activeCellsData, cellData);
|
|
221
221
|
}
|
|
222
|
-
var selectedCells = this.parent.
|
|
222
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
223
223
|
var args = {
|
|
224
224
|
data: cellData, element: this.parent.activeCellsData.element, event: e,
|
|
225
225
|
requestType: cellSelect, showQuickPopup: false
|
|
@@ -446,15 +446,16 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
446
446
|
var args = {
|
|
447
447
|
element: target, requestType: cellSelect
|
|
448
448
|
};
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
449
|
+
// activeCellsData is not reset on schedule property changed(group properties)
|
|
450
|
+
// const cellData: Record<string, any> = {};
|
|
451
|
+
// const cellDetails: CellClickEventArgs = this.parent.getCellDetails(target);
|
|
452
|
+
// if (this.parent.eventWindow && cellDetails) {
|
|
453
|
+
// if (this.parent.activeCellsData.element !== cellDetails.element) {
|
|
454
|
+
// this.parent.activeCellsData = cellDetails;
|
|
455
|
+
// }
|
|
456
|
+
// this.parent.eventWindow.convertToEventData(this.parent.activeCellsData as unknown as Record<string, any>, cellData);
|
|
457
|
+
// args.data = cellData;
|
|
458
|
+
// }
|
|
458
459
|
this.parent.trigger(event.select, args, function () {
|
|
459
460
|
_this.initialTarget = target;
|
|
460
461
|
_this.selectedCells = [target];
|
|
@@ -571,7 +572,7 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
571
572
|
return;
|
|
572
573
|
}
|
|
573
574
|
var target = (e.target);
|
|
574
|
-
var selectedElements = this.parent.
|
|
575
|
+
var selectedElements = this.parent.getSelectedCells();
|
|
575
576
|
var selectedEventElements = this.parent.eventBase.getSelectedAppointments();
|
|
576
577
|
var moreEventWrapper = this.parent.element.querySelector('.' + cls.MORE_POPUP_WRAPPER_CLASS);
|
|
577
578
|
var quickPopupWrapper = this.getQuickPopupElement();
|
|
@@ -618,7 +619,7 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
618
619
|
return;
|
|
619
620
|
}
|
|
620
621
|
var target = (e.target);
|
|
621
|
-
var selectedCells = this.parent.
|
|
622
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
622
623
|
var selectedElements = this.parent.eventBase.getSelectedAppointments();
|
|
623
624
|
var moreEventWrapper = this.parent.element.querySelector('.' + cls.MORE_POPUP_WRAPPER_CLASS);
|
|
624
625
|
var quickPopupWrapper = this.getQuickPopupElement();
|
|
@@ -726,7 +727,7 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
726
727
|
if (this.isCancelLeftRightAction(e, isMultiple, isTimelineYear)) {
|
|
727
728
|
return;
|
|
728
729
|
}
|
|
729
|
-
var selectedCells = this.parent.
|
|
730
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
730
731
|
var targetCell;
|
|
731
732
|
var selectedAppointments = this.parent.eventBase.getSelectedAppointments();
|
|
732
733
|
var target = (e.target);
|
|
@@ -798,7 +799,7 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
798
799
|
return;
|
|
799
800
|
}
|
|
800
801
|
var target = (e.target);
|
|
801
|
-
var selectedCells = this.parent.
|
|
802
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
802
803
|
var targetCell;
|
|
803
804
|
if (selectedCells.length > 0 && !target.classList.contains(cls.WORK_CELLS_CLASS) &&
|
|
804
805
|
!target.classList.contains(cls.ALLDAY_CELLS_CLASS)) {
|
|
@@ -1023,7 +1024,7 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
1023
1024
|
}
|
|
1024
1025
|
return;
|
|
1025
1026
|
}
|
|
1026
|
-
var selectedCells = this.parent.
|
|
1027
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
1027
1028
|
if (selectedCells.length > 0 && !target.classList.contains(cls.APPOINTMENT_CLASS)) {
|
|
1028
1029
|
target = selectedCells[selectedCells.length - 1];
|
|
1029
1030
|
this.selectAppointmentElementFromWorkCell(isReverse, target);
|
|
@@ -1142,6 +1143,7 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
1142
1143
|
*/
|
|
1143
1144
|
KeyboardInteraction.prototype.destroy = function () {
|
|
1144
1145
|
this.removeEventListener();
|
|
1146
|
+
this.selectedCells = [];
|
|
1145
1147
|
this.keyboardModule.destroy();
|
|
1146
1148
|
};
|
|
1147
1149
|
return KeyboardInteraction;
|
|
@@ -126,7 +126,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
126
126
|
}
|
|
127
127
|
if (!isNullOrUndefined(resCollection) && resCollection.length > 0) {
|
|
128
128
|
this.parent.showSpinner();
|
|
129
|
-
var selectedEle = this.parent.
|
|
129
|
+
var selectedEle = this.parent.getSelectedCells();
|
|
130
130
|
this.focusedEle = selectedEle[selectedEle.length - 1] || this.focusedEle;
|
|
131
131
|
this.updateContent(resWrap, conWrap, eventWrap, resCollection);
|
|
132
132
|
this.setTranslate(resWrap, conWrap, eventWrap, timeIndicator);
|
|
@@ -311,7 +311,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
311
311
|
};
|
|
312
312
|
VirtualScroll.prototype.updateHorizontalContent = function (conWrap, resCollection) {
|
|
313
313
|
this.parent.resourceBase.expandedResources = resCollection;
|
|
314
|
-
var selectedEle = this.parent.
|
|
314
|
+
var selectedEle = this.parent.getSelectedCells();
|
|
315
315
|
this.focusedEle = selectedEle[selectedEle.length - 1] || this.focusedEle;
|
|
316
316
|
var renderedLength = conWrap.querySelectorAll('tbody tr').length;
|
|
317
317
|
for (var i = 0; i < renderedLength; i++) {
|
|
@@ -118,15 +118,15 @@ export interface PopupOpenEventArgs extends BaseEventArgs {
|
|
|
118
118
|
/**
|
|
119
119
|
* Returns the type of the popup which is currently being opted to open.
|
|
120
120
|
* The available type values are as follows,
|
|
121
|
-
* * DeleteAlert
|
|
122
|
-
* * EditEventInfo
|
|
123
|
-
* * Editor
|
|
124
|
-
* * EventContainer
|
|
125
|
-
* * QuickInfo
|
|
126
|
-
* * RecurrenceAlert
|
|
127
|
-
* * RecurrenceValidationAlert
|
|
128
|
-
* * ValidationAlert
|
|
129
|
-
* * ViewEventInfo
|
|
121
|
+
* * `DeleteAlert`: Denotes the popup showing delete confirmation message.
|
|
122
|
+
* * `EditEventInfo`: Denotes the quick popup on the events in responsive mode.
|
|
123
|
+
* * `Editor`: Denotes the detailed editor window.
|
|
124
|
+
* * `EventContainer`: Denotes the more indicator popup.
|
|
125
|
+
* * `QuickInfo`: Denotes the quick popup.
|
|
126
|
+
* * `RecurrenceAlert`: Denotes the popup showing recurrence alerts.
|
|
127
|
+
* * `RecurrenceValidationAlert`: Denotes the popup showing recurrence validation alerts.
|
|
128
|
+
* * `ValidationAlert`: Denotes the popup showing validation alerts.
|
|
129
|
+
* * `ViewEventInfo`: Denotes the quick popup on the cells in responsive mode.
|
|
130
130
|
*/
|
|
131
131
|
type: PopupType;
|
|
132
132
|
/** Returns the cell or event data. */
|
|
@@ -150,15 +150,15 @@ export interface PopupCloseEventArgs extends BaseEventArgs {
|
|
|
150
150
|
/**
|
|
151
151
|
* Returns the type of the popup which is currently being opted to open.
|
|
152
152
|
* The available type values are as follows,
|
|
153
|
-
* * DeleteAlert
|
|
154
|
-
* * EditEventInfo
|
|
155
|
-
* * Editor
|
|
156
|
-
* * EventContainer
|
|
157
|
-
* * QuickInfo
|
|
158
|
-
* * RecurrenceAlert
|
|
159
|
-
* * RecurrenceValidationAlert
|
|
160
|
-
* * ValidationAlert
|
|
161
|
-
* * ViewEventInfo
|
|
153
|
+
* * `DeleteAlert`: Denotes the popup showing delete confirmation message.
|
|
154
|
+
* * `EditEventInfo`: Denotes the quick popup on the events in responsive mode.
|
|
155
|
+
* * `Editor`: Denotes the detailed editor window.
|
|
156
|
+
* * `EventContainer`: Denotes the more indicator popup.
|
|
157
|
+
* * `QuickInfo`: Denotes the quick popup.
|
|
158
|
+
* * `RecurrenceAlert`: Denotes the popup showing recurrence alerts.
|
|
159
|
+
* * `RecurrenceValidationAlert`: Denotes the popup showing recurrence validation alerts.
|
|
160
|
+
* * `ValidationAlert`: Denotes the popup showing validation alerts.
|
|
161
|
+
* * `ViewEventInfo`: Denotes the quick popup on the cells in responsive mode.
|
|
162
162
|
*/
|
|
163
163
|
type: PopupType;
|
|
164
164
|
/** Returns the cell or event data. */
|
|
@@ -313,7 +313,7 @@ export interface ResourceDetails {
|
|
|
313
313
|
export interface TimezoneFields {
|
|
314
314
|
/** Assigns the timezone display text. */
|
|
315
315
|
Text: string;
|
|
316
|
-
/** Assigns the IANA timezone value. */
|
|
316
|
+
/** Assigns the [`IANA`](https://docs.actian.com/ingres/11.0/index.html#page/Ing_Install/IANA_World_Regions_and_Time_Zone_Names.htm) timezone value. */
|
|
317
317
|
Value: string;
|
|
318
318
|
}
|
|
319
319
|
/** An interface that holds options of events once it bound to scheduler. */
|
|
@@ -328,6 +328,10 @@ export interface DataBindingEventArgs extends BaseEventArgs {
|
|
|
328
328
|
count?: number;
|
|
329
329
|
aggregates?: Record<string, any>;
|
|
330
330
|
}
|
|
331
|
+
/** An interface that holds the custom sort comparer function. */
|
|
332
|
+
export interface SortComparerFunction {
|
|
333
|
+
(param: Record<string, any>[]): Record<string, any>[];
|
|
334
|
+
}
|
|
331
335
|
/** @private */
|
|
332
336
|
export interface InlineClickArgs extends BaseEventArgs {
|
|
333
337
|
data?: Record<string, any>;
|
|
@@ -581,7 +585,3 @@ export interface CrudAction {
|
|
|
581
585
|
export interface CallbackFunction extends Function {
|
|
582
586
|
bind<T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, args0: A0, args1: A1, args2: A2, args3: A3, ...args: A[]) => R, thisArgs: T, args0: A0, args1: A1, args2: A2, args3: A3): (...args: A[]) => R;
|
|
583
587
|
}
|
|
584
|
-
/** @private */
|
|
585
|
-
export interface SortComparerFunction {
|
|
586
|
-
(param: Record<string, any>[]): Record<string, any>[];
|
|
587
|
-
}
|
|
@@ -196,7 +196,7 @@ var ResourceBase = /** @class */ (function () {
|
|
|
196
196
|
classList(target, [cls.RESOURCE_COLLAPSE_CLASS], [cls.RESOURCE_EXPAND_CLASS]);
|
|
197
197
|
hide = false;
|
|
198
198
|
}
|
|
199
|
-
var eventElements = [].slice.call(_this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CLASS));
|
|
199
|
+
var eventElements = [].slice.call(_this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CLASS + ',.' + cls.MORE_INDICATOR_CLASS));
|
|
200
200
|
for (var _i = 0, eventElements_1 = eventElements; _i < eventElements_1.length; _i++) {
|
|
201
201
|
var element = eventElements_1[_i];
|
|
202
202
|
remove(element);
|
|
@@ -326,6 +326,7 @@ var ResourceBase = /** @class */ (function () {
|
|
|
326
326
|
this.treeViewObj = new TreeView({
|
|
327
327
|
cssClass: this.parent.cssClass,
|
|
328
328
|
enableRtl: this.parent.enableRtl,
|
|
329
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
329
330
|
fields: {
|
|
330
331
|
dataSource: [].slice.call(this.generateTreeData()),
|
|
331
332
|
id: 'resourceId',
|
|
@@ -430,10 +431,8 @@ var ResourceBase = /** @class */ (function () {
|
|
|
430
431
|
var resourceText = resourceLevel.dataSource.filter(function (resData) {
|
|
431
432
|
return resData[resourceLevel.idField] === resource.groupOrder[parseInt(i.toString(), 10)];
|
|
432
433
|
});
|
|
433
|
-
var resourceName = createElement('div', {
|
|
434
|
-
|
|
435
|
-
innerHTML: resourceText[0][resourceLevel.textField]
|
|
436
|
-
});
|
|
434
|
+
var resourceName = createElement('div', { className: cls.RESOURCE_NAME });
|
|
435
|
+
resourceName.innerText = this_2.parent.sanitize(resourceText[0][resourceLevel.textField]);
|
|
437
436
|
headerCollection.push(resourceName);
|
|
438
437
|
var levelIcon = createElement('div', { className: 'e-icons e-icon-next' });
|
|
439
438
|
headerCollection.push(levelIcon);
|
|
@@ -513,7 +512,7 @@ var ResourceBase = /** @class */ (function () {
|
|
|
513
512
|
var promises = [];
|
|
514
513
|
for (var _i = 0, _a = this.parent.resources; _i < _a.length; _i++) {
|
|
515
514
|
var resource = _a[_i];
|
|
516
|
-
var dataModule = new Data(resource.dataSource, resource.query);
|
|
515
|
+
var dataModule = new Data(this.parent, resource.dataSource, resource.query);
|
|
517
516
|
promises.push(dataModule.getData(dataModule.generateQuery()));
|
|
518
517
|
}
|
|
519
518
|
Promise.all(promises).then(function (e) { return _this.dataManagerSuccess(e, isSetModel); })
|
|
@@ -1086,7 +1085,9 @@ var ResourceBase = /** @class */ (function () {
|
|
|
1086
1085
|
if (this.treeViewObj) {
|
|
1087
1086
|
if (this.treeViewObj.portals && this.treeViewObj.portals.length > 0) {
|
|
1088
1087
|
var treeViewTemplates = this.treeViewObj.portals.map(function (x) { return x.propName; });
|
|
1089
|
-
|
|
1088
|
+
if (treeViewTemplates.length > 0) {
|
|
1089
|
+
this.parent.resetTemplates(treeViewTemplates);
|
|
1090
|
+
}
|
|
1090
1091
|
}
|
|
1091
1092
|
this.treeViewObj.destroy();
|
|
1092
1093
|
this.treeViewObj = null;
|