@syncfusion/ej2-schedule 20.4.53 → 21.1.37
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 +18 -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 +339 -144
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +374 -165
- 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/schedule/actions/action-base.js +5 -0
- package/src/schedule/actions/crud.js +1 -0
- package/src/schedule/actions/data.d.ts +14 -2
- package/src/schedule/actions/data.js +26 -2
- package/src/schedule/actions/keyboard.js +15 -14
- package/src/schedule/base/interface.d.ts +23 -23
- package/src/schedule/base/resource.js +5 -6
- package/src/schedule/base/schedule-model.d.ts +34 -27
- package/src/schedule/base/schedule.d.ts +50 -27
- package/src/schedule/base/schedule.js +44 -8
- 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 +2 -1
- package/src/schedule/event-renderer/event-base.js +34 -13
- 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 +26 -5
- 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 +3 -2
- 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/styles/recurrence-editor/_material3-definition.scss +0 -13
- package/styles/schedule/_material3-definition.scss +0 -283
|
@@ -87,8 +87,9 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
YearEvent.prototype.timelineYearViewEvents = function () {
|
|
90
|
+
var _this = this;
|
|
90
91
|
var workCell = this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS + ':not(.' + cls.OTHERMONTH_CLASS + ')');
|
|
91
|
-
this.cellWidth = workCell.
|
|
92
|
+
this.cellWidth = workCell.getBoundingClientRect().width;
|
|
92
93
|
this.cellHeader = util.getOuterHeight(workCell.querySelector('.' + cls.DATE_HEADER_CLASS));
|
|
93
94
|
var eventTable = this.parent.element.querySelector('.' + cls.EVENT_TABLE_CLASS);
|
|
94
95
|
this.eventHeight = util.getElementHeightFromClass(eventTable, cls.APPOINTMENT_CLASS);
|
|
@@ -114,10 +115,10 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
114
115
|
if (this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
115
116
|
var wrapper_1 = wrapperCollection[parseInt(dayIndex.toString(), 10)];
|
|
116
117
|
td = dayIndex + 1;
|
|
117
|
-
|
|
118
|
-
if (!
|
|
119
|
-
|
|
120
|
-
wrapper_1.appendChild(
|
|
118
|
+
eventWrapper = wrapper_1.querySelector('.' + cls.APPOINTMENT_WRAPPER_CLASS);
|
|
119
|
+
if (!eventWrapper) {
|
|
120
|
+
eventWrapper = createElement('div', { className: cls.APPOINTMENT_WRAPPER_CLASS });
|
|
121
|
+
wrapper_1.appendChild(eventWrapper);
|
|
121
122
|
}
|
|
122
123
|
if (this.parent.enableRtl) {
|
|
123
124
|
rightValue = row * this.cellWidth;
|
|
@@ -170,8 +171,7 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
170
171
|
return "continue";
|
|
171
172
|
}
|
|
172
173
|
}
|
|
173
|
-
|
|
174
|
-
if (isRowAutoHeight || this_1.cellHeight > availedHeight) {
|
|
174
|
+
if (this_1.parent.rowAutoHeight || this_1.cellHeight > availedHeight) {
|
|
175
175
|
this_1.renderEvent(eventWrapper, eventData, row, leftValue, rightValue, monthStart, dayIndex);
|
|
176
176
|
this_1.updateCellHeight(rowTd, availedHeight);
|
|
177
177
|
isSpannedCollection.push(eventData);
|
|
@@ -197,6 +197,19 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
+
if (this.parent.rowAutoHeight && this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
201
|
+
var appContainer = [].slice.call(this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CONTAINER_CLASS));
|
|
202
|
+
var tr_1 = [].slice.call(this.parent.element.querySelectorAll('.' + cls.CONTENT_TABLE_CLASS + ' tbody tr'));
|
|
203
|
+
appContainer.forEach(function (ele, index) {
|
|
204
|
+
var app = [].slice.call(ele.querySelectorAll('.' + cls.APPOINTMENT_CLASS));
|
|
205
|
+
var appTop = tr_1[parseInt(index.toString(), 10)].offsetTop + _this.cellHeader + EVENT_GAP;
|
|
206
|
+
app.forEach(function (app) {
|
|
207
|
+
var overlap = parseInt(app.getAttribute('data-index'), 10);
|
|
208
|
+
app.style.top = appTop + (overlap * _this.eventHeight) + 'px';
|
|
209
|
+
app.removeAttribute('data-index');
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
}
|
|
200
213
|
};
|
|
201
214
|
YearEvent.prototype.updateSpannedEvents = function (eventObj, dayStart, dayEnd) {
|
|
202
215
|
var isLeftRightResize = (this.isResource && this.parent.activeViewOptions.orientation === 'Vertical') ||
|
|
@@ -211,7 +224,8 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
211
224
|
}
|
|
212
225
|
}
|
|
213
226
|
if ((dayEnd.getTime() >= eventObj[this.fields.endTime].getTime()) || (isLeftRightResize && !this.isResource &&
|
|
214
|
-
util.addDays(dayEnd, -1).getMonth() === eventObj[this.fields.endTime].getMonth())
|
|
227
|
+
util.addDays(dayEnd, -1).getMonth() === eventObj[this.fields.endTime].getMonth()) ||
|
|
228
|
+
(isLeftRightResize && this.isResource && (dayEnd.getTime() <= eventObj[this.fields.endTime].getTime()))) {
|
|
215
229
|
if (isLeftRightResize) {
|
|
216
230
|
data.isRight = false;
|
|
217
231
|
}
|
|
@@ -222,8 +236,11 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
222
236
|
eventObj.data = data;
|
|
223
237
|
};
|
|
224
238
|
YearEvent.prototype.timelineResourceEvents = function () {
|
|
239
|
+
var _this = this;
|
|
240
|
+
var contentTable = this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS);
|
|
241
|
+
var isVerticalScrollbarAvail = contentTable.offsetWidth > contentTable.clientWidth;
|
|
225
242
|
var workCell = this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS);
|
|
226
|
-
this.cellWidth = workCell.
|
|
243
|
+
this.cellWidth = workCell.getBoundingClientRect().width;
|
|
227
244
|
this.cellHeader = 0;
|
|
228
245
|
var eventTable = this.parent.element.querySelector('.' + cls.EVENT_TABLE_CLASS);
|
|
229
246
|
this.eventHeight = util.getElementHeightFromClass(eventTable, cls.APPOINTMENT_CLASS);
|
|
@@ -251,6 +268,39 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
251
268
|
}
|
|
252
269
|
}
|
|
253
270
|
}
|
|
271
|
+
if (this.parent.rowAutoHeight && !isVerticalScrollbarAvail && contentTable.offsetWidth > contentTable.clientWidth) {
|
|
272
|
+
var appointments = [].slice.call(this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CLASS));
|
|
273
|
+
appointments.forEach(function (ele) {
|
|
274
|
+
ele.style.removeProperty('left');
|
|
275
|
+
ele.style.removeProperty('right');
|
|
276
|
+
});
|
|
277
|
+
var appContainer = [].slice.call(this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CONTAINER_CLASS));
|
|
278
|
+
var conTable_1 = this.parent.element.querySelector('.' + cls.CONTENT_TABLE_CLASS);
|
|
279
|
+
var tr_2 = [].slice.call(conTable_1.querySelectorAll('tbody tr'));
|
|
280
|
+
appContainer.forEach(function (ele, index) {
|
|
281
|
+
var appWrapper = [].slice.call(ele.children);
|
|
282
|
+
var row = tr_2[parseInt(index.toString(), 10)];
|
|
283
|
+
appWrapper.forEach(function (appWrap, cellIndex) {
|
|
284
|
+
var td = row.querySelector("td:nth-child(" + (cellIndex + 1) + ")");
|
|
285
|
+
var app = [].slice.call(appWrap.children);
|
|
286
|
+
var width = td.getBoundingClientRect().width;
|
|
287
|
+
var left = td.offsetLeft;
|
|
288
|
+
if (_this.parent.enableRtl) {
|
|
289
|
+
var right_1 = conTable_1.offsetWidth - left - td.offsetWidth;
|
|
290
|
+
app.forEach(function (app) {
|
|
291
|
+
app.style.width = Math.floor(parseInt(app.style.width, 10) / width) * width + 'px';
|
|
292
|
+
app.style.right = right_1 + 'px';
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
app.forEach(function (app) {
|
|
297
|
+
app.style.width = Math.floor(parseInt(app.style.width, 10) / width) * width + 'px';
|
|
298
|
+
app.style.left = left + 'px';
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
});
|
|
303
|
+
}
|
|
254
304
|
};
|
|
255
305
|
YearEvent.prototype.renderResourceEvent = function (wrapper, resource, month, index, monthStart) {
|
|
256
306
|
var eventWrapper = createElement('div', { className: cls.APPOINTMENT_WRAPPER_CLASS });
|
|
@@ -261,39 +311,60 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
261
311
|
var td = this.parent.element.querySelector(".e-content-wrap tr:nth-child(" + (rowIndex + 1) + ") td");
|
|
262
312
|
this.cellHeight = td.offsetHeight;
|
|
263
313
|
this.groupOrder = resource.groupOrder;
|
|
264
|
-
|
|
314
|
+
var isSpannedCollection = [];
|
|
315
|
+
var _loop_2 = function (a) {
|
|
265
316
|
var data = eventDatas[parseInt(a.toString(), 10)];
|
|
266
317
|
var overlapIndex = void 0;
|
|
267
318
|
var eventData = extend({}, data, null, true);
|
|
268
|
-
if (
|
|
269
|
-
var eventObj =
|
|
270
|
-
overlapIndex =
|
|
319
|
+
if (this_2.parent.activeViewOptions.group.resources.length > 0) {
|
|
320
|
+
var eventObj = this_2.isSpannedEvent(eventData, monthStart);
|
|
321
|
+
overlapIndex = this_2.getIndex(eventObj[this_2.fields.startTime]);
|
|
271
322
|
eventData.Index = overlapIndex;
|
|
272
323
|
}
|
|
273
324
|
else {
|
|
274
|
-
overlapIndex =
|
|
325
|
+
overlapIndex = this_2.getIndex(eventData[this_2.fields.startTime]);
|
|
275
326
|
eventData.Index = overlapIndex;
|
|
276
327
|
}
|
|
277
|
-
var availedHeight =
|
|
278
|
-
var leftValue = (
|
|
279
|
-
month *
|
|
280
|
-
if (!
|
|
281
|
-
return;
|
|
328
|
+
var availedHeight = this_2.cellHeader + (this_2.eventHeight * (a + 1)) + EVENT_GAP + this_2.moreIndicatorHeight;
|
|
329
|
+
var leftValue = (this_2.parent.activeViewOptions.orientation === 'Vertical') ?
|
|
330
|
+
month * this_2.cellWidth : index * this_2.cellWidth;
|
|
331
|
+
if (!this_2.parent.isMinMaxDate(eventData[this_2.fields.startTime])) {
|
|
332
|
+
return { value: void 0 };
|
|
282
333
|
}
|
|
283
|
-
if (
|
|
284
|
-
|
|
285
|
-
|
|
334
|
+
if (this_2.parent.activeViewOptions.orientation === 'Vertical' && this_2.parent.activeViewOptions.group.resources.length > 0) {
|
|
335
|
+
var isRendered = this_2.renderedEvents.filter(function (eventObj) {
|
|
336
|
+
return eventObj.Guid === eventData.Guid;
|
|
337
|
+
});
|
|
338
|
+
var isSpanned = isSpannedCollection.filter(function (eventObj) {
|
|
339
|
+
return eventObj.Guid === eventData.Guid;
|
|
340
|
+
});
|
|
341
|
+
if (isRendered.length > 0 || isSpanned.length > 0) {
|
|
342
|
+
return "continue";
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if (this_2.parent.rowAutoHeight || this_2.cellHeight > availedHeight) {
|
|
346
|
+
this_2.renderEvent(eventWrapper, eventData, month, leftValue, leftValue, monthStart, index);
|
|
347
|
+
this_2.updateCellHeight(td, availedHeight);
|
|
348
|
+
isSpannedCollection.push(eventData);
|
|
286
349
|
}
|
|
287
350
|
else {
|
|
288
|
-
var moreIndex =
|
|
289
|
-
|
|
290
|
-
if (
|
|
351
|
+
var moreIndex = this_2.parent.activeViewOptions.orientation === 'Horizontal' ? month : index;
|
|
352
|
+
this_2.renderMoreIndicator(eventWrapper, eventDatas.length - a, monthStart, moreIndex, leftValue, leftValue, index);
|
|
353
|
+
if (this_2.parent.activeViewOptions.orientation === 'Horizontal') {
|
|
291
354
|
for (var i = index; i < eventDatas.length; i++) {
|
|
292
|
-
|
|
355
|
+
this_2.renderedEvents.push(extend({}, eventDatas[parseInt(i.toString(), 10)], { Index: overlapIndex + i }, true));
|
|
293
356
|
}
|
|
294
357
|
}
|
|
295
|
-
break;
|
|
358
|
+
return "break";
|
|
296
359
|
}
|
|
360
|
+
};
|
|
361
|
+
var this_2 = this;
|
|
362
|
+
for (var a = 0; a < eventDatas.length; a++) {
|
|
363
|
+
var state_1 = _loop_2(a);
|
|
364
|
+
if (typeof state_1 === "object")
|
|
365
|
+
return state_1.value;
|
|
366
|
+
if (state_1 === "break")
|
|
367
|
+
break;
|
|
297
368
|
}
|
|
298
369
|
};
|
|
299
370
|
// eslint-disable-next-line max-len
|
|
@@ -319,13 +390,16 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
319
390
|
}
|
|
320
391
|
else {
|
|
321
392
|
index = rowIndex + 1;
|
|
322
|
-
width = this.cellWidth;
|
|
393
|
+
width = this.isResource ? eventObj.isSpanned.count * this.cellWidth : this.cellWidth;
|
|
323
394
|
}
|
|
324
395
|
var rowTd = this.parent.element.querySelector(".e-content-wrap tr:nth-child(" + index + ") td");
|
|
325
396
|
var top = rowTd.offsetTop + this.cellHeader + (this.eventHeight * eventObj.Index) + EVENT_GAP;
|
|
326
397
|
setStyleAttribute(wrap, {
|
|
327
398
|
'width': width + 'px', 'height': this.eventHeight + 'px', 'left': left + 'px', 'right': right + 'px', 'top': top + 'px'
|
|
328
399
|
});
|
|
400
|
+
if (!this.isResource && this.parent.rowAutoHeight && this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
401
|
+
wrap.setAttribute('data-index', eventObj.Index.toString());
|
|
402
|
+
}
|
|
329
403
|
var args = { data: eventObj, element: wrap, cancel: false, type: 'event' };
|
|
330
404
|
this.parent.trigger(events.eventRendered, args, function (eventArgs) {
|
|
331
405
|
if (!eventArgs.cancel) {
|
|
@@ -431,6 +505,7 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
431
505
|
var appointmentDetails = createElement('div', { className: cls.APPOINTMENT_DETAILS });
|
|
432
506
|
append(templateElement, appointmentDetails);
|
|
433
507
|
eventWrapper.appendChild(appointmentDetails);
|
|
508
|
+
this.parent.eventBase.renderSpannedIcon(eventWrapper, record.isSpanned);
|
|
434
509
|
this.renderResizeHandler(eventWrapper, record.data, record[this.fields.isReadonly]);
|
|
435
510
|
this.applyResourceColor(eventWrapper, eventObj, 'backgroundColor', this.groupOrder);
|
|
436
511
|
return eventWrapper;
|
|
@@ -442,24 +517,28 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
442
517
|
var eventStart = eventData[this.fields.startTime];
|
|
443
518
|
var eventEnd = eventData[this.fields.endTime];
|
|
444
519
|
var isSpanned = { isLeft: false, isRight: false, count: 1 };
|
|
520
|
+
var yearStart = new Date(this.parent.selectedDate.getFullYear(), this.parent.firstMonthOfYear, 1);
|
|
521
|
+
var yearEnd = util.addMonths(yearStart, this.parent.monthsCount);
|
|
445
522
|
if (this.isResource) {
|
|
446
523
|
this.updateSpannedEvents(eventObj, monthStart, monthEnd);
|
|
447
524
|
}
|
|
448
|
-
if (
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
isSpanned.isRight = true;
|
|
525
|
+
if (this.parent.activeViewOptions.orientation === 'Vertical' && this.parent.activeViewOptions.group.resources.length > 0) {
|
|
526
|
+
this.updateSpannedEventDetails(eventStart, eventEnd, yearStart, yearEnd, eventData, isSpanned);
|
|
527
|
+
var originalStartTime = eventData[this.fields.startTime];
|
|
528
|
+
var originalEndTime = new Date(eventData[this.fields.endTime] - 1);
|
|
529
|
+
isSpanned.count = (originalEndTime.getMonth() - originalStartTime.getMonth()) +
|
|
530
|
+
(this.parent.monthsCount * (originalEndTime.getFullYear() - originalStartTime.getFullYear())) + 1;
|
|
455
531
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
532
|
+
else {
|
|
533
|
+
this.updateSpannedEventDetails(eventStart, eventEnd, monthStart, monthEnd, eventData, isSpanned);
|
|
534
|
+
if (this.parent.activeViewOptions.group.resources.length === 0 || this.parent.uiStateValues.isGroupAdaptive) {
|
|
535
|
+
var end = util.resetTime(eventData[this.fields.endTime]).getTime();
|
|
536
|
+
var start = util.resetTime(eventData[this.fields.startTime]).getTime();
|
|
537
|
+
if (eventObj[this.fields.isAllDay] && end === eventObj[this.fields.endTime].getTime() || isSpanned.isRight) {
|
|
538
|
+
end = util.addDays(new Date(end), -1).getTime();
|
|
539
|
+
}
|
|
540
|
+
isSpanned.count = Math.ceil((end - start) / util.MS_PER_DAY) + 1;
|
|
461
541
|
}
|
|
462
|
-
isSpanned.count = Math.ceil((end - start) / util.MS_PER_DAY) + 1;
|
|
463
542
|
}
|
|
464
543
|
eventData.isSpanned = isSpanned;
|
|
465
544
|
if (util.resetTime(eventStart).getTime() < util.resetTime(this.parent.minDate).getTime()) {
|
|
@@ -470,6 +549,16 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
470
549
|
}
|
|
471
550
|
return eventData;
|
|
472
551
|
};
|
|
552
|
+
YearEvent.prototype.updateSpannedEventDetails = function (eventStart, eventEnd, viewStart, viewEnd, eventObj, isSpanned) {
|
|
553
|
+
if (eventStart.getTime() < viewStart.getTime()) {
|
|
554
|
+
eventObj[this.fields.startTime] = viewStart;
|
|
555
|
+
isSpanned.isLeft = true;
|
|
556
|
+
}
|
|
557
|
+
if (eventEnd.getTime() > viewEnd.getTime()) {
|
|
558
|
+
eventObj[this.fields.endTime] = viewEnd;
|
|
559
|
+
isSpanned.isRight = true;
|
|
560
|
+
}
|
|
561
|
+
};
|
|
473
562
|
YearEvent.prototype.getOverlapEvents = function (date, appointments) {
|
|
474
563
|
var appointmentsList = [];
|
|
475
564
|
var dateStart;
|
|
@@ -493,19 +582,11 @@ var YearEvent = /** @class */ (function (_super) {
|
|
|
493
582
|
var app = appointments_1[_i];
|
|
494
583
|
var appStart = new Date(app[this.fields.startTime].getTime());
|
|
495
584
|
var appEnd = new Date(app[this.fields.endTime].getTime());
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
else {
|
|
503
|
-
var timeCondition = app[this.fields.isAllDay] ? util.resetTime(appEnd).getTime() > dateStart :
|
|
504
|
-
util.resetTime(appEnd).getTime() >= dateStart;
|
|
505
|
-
if (((util.resetTime(appStart).getTime() <= dateStart) && (timeCondition)) ||
|
|
506
|
-
(util.resetTime(appStart).getTime() >= dateStart) && (util.resetTime(appEnd).getTime() <= dateEnd)) {
|
|
507
|
-
appointmentsList.push(app);
|
|
508
|
-
}
|
|
585
|
+
var timeCondition = app[this.fields.isAllDay] ? util.resetTime(appEnd).getTime() > dateStart :
|
|
586
|
+
util.resetTime(appEnd).getTime() >= dateStart;
|
|
587
|
+
if (((util.resetTime(appStart).getTime() <= dateStart) && (timeCondition)) ||
|
|
588
|
+
(util.resetTime(appStart).getTime() >= dateStart) && (util.resetTime(appEnd).getTime() <= dateEnd)) {
|
|
589
|
+
appointmentsList.push(app);
|
|
509
590
|
}
|
|
510
591
|
}
|
|
511
592
|
return appointmentsList;
|
|
@@ -51,8 +51,8 @@ export interface EventSettingsModel {
|
|
|
51
51
|
/**
|
|
52
52
|
* Defines the option to render the spanned events (more than 24 hours) in either `AllDayRow` or `TimeSlot`. By default it renders in `AllDayRow`.
|
|
53
53
|
* This property is applicable for `Day`, `Week` and `WorkWeek` views only. The possible values for this property as follows
|
|
54
|
-
* * AllDayRow
|
|
55
|
-
* * TimeSlot
|
|
54
|
+
* * `AllDayRow`: Denotes the rendering of spanned events in an all-day row.
|
|
55
|
+
* * `TimeSlot`: Denotes the rendering of spanned events in an time slot row.
|
|
56
56
|
* {% codeBlock src='schedule/spannedEventPlacement/index.md' %}{% endcodeBlock %}
|
|
57
57
|
*
|
|
58
58
|
* @default 'AllDayRow'
|
|
@@ -144,4 +144,13 @@ export interface EventSettingsModel {
|
|
|
144
144
|
*/
|
|
145
145
|
sortComparer?: SortComparerFunction;
|
|
146
146
|
|
|
147
|
+
/**
|
|
148
|
+
* Gets or sets a value that determines whether the start date and end date filter conditions should be included in the query itself when requesting data from the server, or passed as query parameters in the API call.
|
|
149
|
+
* When set to <c>true</c> the filter conditions will be part of the query itself, potentially reducing the size of the request and minimizing the time needed to parse the response.
|
|
150
|
+
* However, it can also lead to longer query strings, which could result in issues with maximum URL length or server limitations on query string length.
|
|
151
|
+
*
|
|
152
|
+
* @default false
|
|
153
|
+
*/
|
|
154
|
+
includeFiltersInQuery?: boolean;
|
|
155
|
+
|
|
147
156
|
}
|
|
@@ -48,8 +48,8 @@ export declare class EventSettings extends ChildProperty<EventSettings> {
|
|
|
48
48
|
/**
|
|
49
49
|
* Defines the option to render the spanned events (more than 24 hours) in either `AllDayRow` or `TimeSlot`. By default it renders in `AllDayRow`.
|
|
50
50
|
* This property is applicable for `Day`, `Week` and `WorkWeek` views only. The possible values for this property as follows
|
|
51
|
-
* * AllDayRow
|
|
52
|
-
* * TimeSlot
|
|
51
|
+
* * `AllDayRow`: Denotes the rendering of spanned events in an all-day row.
|
|
52
|
+
* * `TimeSlot`: Denotes the rendering of spanned events in an time slot row.
|
|
53
53
|
* {% codeBlock src='schedule/spannedEventPlacement/index.md' %}{% endcodeBlock %}
|
|
54
54
|
*
|
|
55
55
|
* @default 'AllDayRow'
|
|
@@ -129,4 +129,12 @@ export declare class EventSettings extends ChildProperty<EventSettings> {
|
|
|
129
129
|
* @default null
|
|
130
130
|
*/
|
|
131
131
|
sortComparer: SortComparerFunction;
|
|
132
|
+
/**
|
|
133
|
+
* Gets or sets a value that determines whether the start date and end date filter conditions should be included in the query itself when requesting data from the server, or passed as query parameters in the API call.
|
|
134
|
+
* When set to <c>true</c> the filter conditions will be part of the query itself, potentially reducing the size of the request and minimizing the time needed to parse the response.
|
|
135
|
+
* However, it can also lead to longer query strings, which could result in issues with maximum URL length or server limitations on query string length.
|
|
136
|
+
*
|
|
137
|
+
* @default false
|
|
138
|
+
*/
|
|
139
|
+
includeFiltersInQuery: boolean;
|
|
132
140
|
}
|
|
@@ -79,6 +79,9 @@ var EventSettings = /** @class */ (function (_super) {
|
|
|
79
79
|
__decorate([
|
|
80
80
|
Property()
|
|
81
81
|
], EventSettings.prototype, "sortComparer", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
Property()
|
|
84
|
+
], EventSettings.prototype, "includeFiltersInQuery", void 0);
|
|
82
85
|
return EventSettings;
|
|
83
86
|
}(ChildProperty));
|
|
84
87
|
export { EventSettings };
|
|
@@ -44,7 +44,8 @@ export interface FieldModel {
|
|
|
44
44
|
endTime?: FieldOptionsModel;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* It maps the `startTimezone` field from the dataSource and usually accepts the valid
|
|
47
|
+
* It maps the `startTimezone` field from the dataSource and usually accepts the valid
|
|
48
|
+
* [`IANA timezone names`](https://docs.actian.com/ingres/11.0/index.html#page/Ing_Install/IANA_World_Regions_and_Time_Zone_Names.htm).
|
|
48
49
|
* It is assumed that the value provided for this field is taken into consideration while processing
|
|
49
50
|
* the `startTime` field. When this field is not mapped with any timezone names,
|
|
50
51
|
* then the events will be processed based on the timezone assigned to the Schedule.
|
|
@@ -54,7 +55,8 @@ export interface FieldModel {
|
|
|
54
55
|
startTimezone?: FieldOptionsModel;
|
|
55
56
|
|
|
56
57
|
/**
|
|
57
|
-
* It maps the `endTimezone` field from the dataSource and usually accepts the valid
|
|
58
|
+
* It maps the `endTimezone` field from the dataSource and usually accepts the valid
|
|
59
|
+
* [`IANA timezone names`](https://docs.actian.com/ingres/11.0/index.html#page/Ing_Install/IANA_World_Regions_and_Time_Zone_Names.htm).
|
|
58
60
|
* It is assumed that the value provided for this field is taken into consideration while processing the `endTime` field.
|
|
59
61
|
* When this field is not mapped with any timezone names, then the events will be processed based on the timezone assigned
|
|
60
62
|
* to the Schedule.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChildProperty } from '@syncfusion/ej2-base';
|
|
2
2
|
import { FieldOptionsModel } from './field-options-model';
|
|
3
3
|
/**
|
|
4
|
-
* A
|
|
5
|
-
* fields along with its available configuration settings. Each field in it accepts both string and
|
|
4
|
+
* A class that holds the collection of event fields that requires to be mapped with the dataSource
|
|
5
|
+
* fields along with its available configuration settings. Each field in it accepts both string and object
|
|
6
6
|
* data type. When each of the field is assigned with simple `string` value, it is assumed that the dataSource field
|
|
7
7
|
* name is mapped with it. If the `object` type is defined on each fields, then the validation related settings and mapping of
|
|
8
8
|
* those fields with dataSource can be given altogether within it.
|
|
@@ -42,7 +42,8 @@ export declare class Field extends ChildProperty<Field> {
|
|
|
42
42
|
*/
|
|
43
43
|
endTime: FieldOptionsModel;
|
|
44
44
|
/**
|
|
45
|
-
* It maps the `startTimezone` field from the dataSource and usually accepts the valid
|
|
45
|
+
* It maps the `startTimezone` field from the dataSource and usually accepts the valid
|
|
46
|
+
* [`IANA timezone names`](https://docs.actian.com/ingres/11.0/index.html#page/Ing_Install/IANA_World_Regions_and_Time_Zone_Names.htm).
|
|
46
47
|
* It is assumed that the value provided for this field is taken into consideration while processing
|
|
47
48
|
* the `startTime` field. When this field is not mapped with any timezone names,
|
|
48
49
|
* then the events will be processed based on the timezone assigned to the Schedule.
|
|
@@ -51,7 +52,8 @@ export declare class Field extends ChildProperty<Field> {
|
|
|
51
52
|
*/
|
|
52
53
|
startTimezone: FieldOptionsModel;
|
|
53
54
|
/**
|
|
54
|
-
* It maps the `endTimezone` field from the dataSource and usually accepts the valid
|
|
55
|
+
* It maps the `endTimezone` field from the dataSource and usually accepts the valid
|
|
56
|
+
* [`IANA timezone names`](https://docs.actian.com/ingres/11.0/index.html#page/Ing_Install/IANA_World_Regions_and_Time_Zone_Names.htm).
|
|
55
57
|
* It is assumed that the value provided for this field is taken into consideration while processing the `endTime` field.
|
|
56
58
|
* When this field is not mapped with any timezone names, then the events will be processed based on the timezone assigned
|
|
57
59
|
* to the Schedule.
|
|
@@ -20,8 +20,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
20
20
|
import { Property, ChildProperty, Complex } from '@syncfusion/ej2-base';
|
|
21
21
|
import { FieldOptions } from './field-options';
|
|
22
22
|
/**
|
|
23
|
-
* A
|
|
24
|
-
* fields along with its available configuration settings. Each field in it accepts both string and
|
|
23
|
+
* A class that holds the collection of event fields that requires to be mapped with the dataSource
|
|
24
|
+
* fields along with its available configuration settings. Each field in it accepts both string and object
|
|
25
25
|
* data type. When each of the field is assigned with simple `string` value, it is assumed that the dataSource field
|
|
26
26
|
* name is mapped with it. If the `object` type is defined on each fields, then the validation related settings and mapping of
|
|
27
27
|
* those fields with dataSource can be given altogether within it.
|
|
@@ -7,11 +7,11 @@ export interface HeaderRowsModel {
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* It defines the header row type, which accepts either of the following values.
|
|
10
|
-
* * Year
|
|
11
|
-
* * Month
|
|
12
|
-
* * Week
|
|
13
|
-
* * Date
|
|
14
|
-
* * Hour
|
|
10
|
+
* * `Year`: Denotes the year row in the header bar.
|
|
11
|
+
* * `Month`: Denotes the month row in the header bar.
|
|
12
|
+
* * `Week`: Denotes the week row in the header bar.
|
|
13
|
+
* * `Date`: Denotes the date row in the header bar.
|
|
14
|
+
* * `Hour`: Denotes the hour row in the header bar.
|
|
15
15
|
*
|
|
16
16
|
* @default null
|
|
17
17
|
*/
|
|
@@ -6,11 +6,11 @@ import { HeaderRowType } from '../base/type';
|
|
|
6
6
|
export declare class HeaderRows extends ChildProperty<HeaderRows> {
|
|
7
7
|
/**
|
|
8
8
|
* It defines the header row type, which accepts either of the following values.
|
|
9
|
-
* * Year
|
|
10
|
-
* * Month
|
|
11
|
-
* * Week
|
|
12
|
-
* * Date
|
|
13
|
-
* * Hour
|
|
9
|
+
* * `Year`: Denotes the year row in the header bar.
|
|
10
|
+
* * `Month`: Denotes the month row in the header bar.
|
|
11
|
+
* * `Week`: Denotes the week row in the header bar.
|
|
12
|
+
* * `Date`: Denotes the date row in the header bar.
|
|
13
|
+
* * `Hour`: Denotes the hour row in the header bar.
|
|
14
14
|
*
|
|
15
15
|
* @default null
|
|
16
16
|
*/
|
|
@@ -8,9 +8,9 @@ export interface QuickInfoTemplatesModel {
|
|
|
8
8
|
/**
|
|
9
9
|
* Template option to customize the header section of quick popup.
|
|
10
10
|
* The applicable template types are,
|
|
11
|
-
* * Both
|
|
12
|
-
* * Cell
|
|
13
|
-
* * Event
|
|
11
|
+
* * `Both`: Denotes the template applies both to the event and cell.
|
|
12
|
+
* * `Cell`: Denotes the template applies only to the cell.
|
|
13
|
+
* * `Event`: Denotes the template applies to the event alone.
|
|
14
14
|
*
|
|
15
15
|
* @default 'Both'
|
|
16
16
|
*/
|
|
@@ -7,9 +7,9 @@ export declare class QuickInfoTemplates extends ChildProperty<QuickInfoTemplates
|
|
|
7
7
|
/**
|
|
8
8
|
* Template option to customize the header section of quick popup.
|
|
9
9
|
* The applicable template types are,
|
|
10
|
-
* * Both
|
|
11
|
-
* * Cell
|
|
12
|
-
* * Event
|
|
10
|
+
* * `Both`: Denotes the template applies both to the event and cell.
|
|
11
|
+
* * `Cell`: Denotes the template applies only to the cell.
|
|
12
|
+
* * `Event`: Denotes the template applies to the event alone.
|
|
13
13
|
*
|
|
14
14
|
* @default 'Both'
|
|
15
15
|
*/
|
|
@@ -8,18 +8,18 @@ export interface ViewsModel {
|
|
|
8
8
|
/**
|
|
9
9
|
* It accepts the schedule view name, based on which we can define with its related properties in a single object.
|
|
10
10
|
* The applicable view names are,
|
|
11
|
-
* * Day
|
|
12
|
-
* * Week
|
|
13
|
-
* * WorkWeek
|
|
14
|
-
* * Month
|
|
15
|
-
* * Year
|
|
16
|
-
* * Agenda
|
|
17
|
-
* * MonthAgenda
|
|
18
|
-
* * TimelineDay
|
|
19
|
-
* * TimelineWeek
|
|
20
|
-
* * TimelineWorkWeek
|
|
21
|
-
* * TimelineMonth
|
|
22
|
-
* * TimelineYear
|
|
11
|
+
* * Day - Denotes Day view of the scheduler.
|
|
12
|
+
* * Week - Denotes Week view of the scheduler.
|
|
13
|
+
* * WorkWeek - Denotes Work Week view of the scheduler.
|
|
14
|
+
* * Month - Denotes Month view of the scheduler.
|
|
15
|
+
* * Year - Denotes Year view of the scheduler.
|
|
16
|
+
* * Agenda - Denotes Agenda view of the scheduler.
|
|
17
|
+
* * MonthAgenda - Denotes Month Agenda view of the scheduler.
|
|
18
|
+
* * TimelineDay - Denotes Timeline Day view of the scheduler.
|
|
19
|
+
* * TimelineWeek - Denotes Timeline Week view of the scheduler.
|
|
20
|
+
* * TimelineWorkWeek - Denotes Timeline Work Week view of the scheduler.
|
|
21
|
+
* * TimelineMonth - Denotes Timeline Month view of the scheduler.
|
|
22
|
+
* * TimelineYear - Denotes Timeline Year view of the scheduler.
|
|
23
23
|
*
|
|
24
24
|
* @default null
|
|
25
25
|
*/
|
|
@@ -27,7 +27,8 @@ export interface ViewsModel {
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* To denote whether the view name given on the `option` is active or not.
|
|
30
|
-
* It acts similar to the `currentView`
|
|
30
|
+
* It acts similar to the [`currentView`](../../schedule/#current-view/)
|
|
31
|
+
* property and defines the active view of Schedule.
|
|
31
32
|
*
|
|
32
33
|
* @default false
|
|
33
34
|
*/
|
|
@@ -235,8 +236,8 @@ export interface ViewsModel {
|
|
|
235
236
|
/**
|
|
236
237
|
* It is used to specify the year view rendering orientation on the schedule.
|
|
237
238
|
* The applicable orientation values are,
|
|
238
|
-
* * Horizontal
|
|
239
|
-
* * Vertical
|
|
239
|
+
* * Horizontal - Denotes the horizontal orientation of Timeline Year view.
|
|
240
|
+
* * Vertical - Denotes the vertical orientation of Timeline Year view.
|
|
240
241
|
*
|
|
241
242
|
* @default 'Horizontal'
|
|
242
243
|
*/
|
|
@@ -8,25 +8,26 @@ export declare class Views extends ChildProperty<Views> {
|
|
|
8
8
|
/**
|
|
9
9
|
* It accepts the schedule view name, based on which we can define with its related properties in a single object.
|
|
10
10
|
* The applicable view names are,
|
|
11
|
-
* * Day
|
|
12
|
-
* * Week
|
|
13
|
-
* * WorkWeek
|
|
14
|
-
* * Month
|
|
15
|
-
* * Year
|
|
16
|
-
* * Agenda
|
|
17
|
-
* * MonthAgenda
|
|
18
|
-
* * TimelineDay
|
|
19
|
-
* * TimelineWeek
|
|
20
|
-
* * TimelineWorkWeek
|
|
21
|
-
* * TimelineMonth
|
|
22
|
-
* * TimelineYear
|
|
11
|
+
* * Day - Denotes Day view of the scheduler.
|
|
12
|
+
* * Week - Denotes Week view of the scheduler.
|
|
13
|
+
* * WorkWeek - Denotes Work Week view of the scheduler.
|
|
14
|
+
* * Month - Denotes Month view of the scheduler.
|
|
15
|
+
* * Year - Denotes Year view of the scheduler.
|
|
16
|
+
* * Agenda - Denotes Agenda view of the scheduler.
|
|
17
|
+
* * MonthAgenda - Denotes Month Agenda view of the scheduler.
|
|
18
|
+
* * TimelineDay - Denotes Timeline Day view of the scheduler.
|
|
19
|
+
* * TimelineWeek - Denotes Timeline Week view of the scheduler.
|
|
20
|
+
* * TimelineWorkWeek - Denotes Timeline Work Week view of the scheduler.
|
|
21
|
+
* * TimelineMonth - Denotes Timeline Month view of the scheduler.
|
|
22
|
+
* * TimelineYear - Denotes Timeline Year view of the scheduler.
|
|
23
23
|
*
|
|
24
24
|
* @default null
|
|
25
25
|
*/
|
|
26
26
|
option: View;
|
|
27
27
|
/**
|
|
28
28
|
* To denote whether the view name given on the `option` is active or not.
|
|
29
|
-
* It acts similar to the `currentView`
|
|
29
|
+
* It acts similar to the [`currentView`](../../schedule/#current-view/)
|
|
30
|
+
* property and defines the active view of Schedule.
|
|
30
31
|
*
|
|
31
32
|
* @default false
|
|
32
33
|
*/
|
|
@@ -210,8 +211,8 @@ export declare class Views extends ChildProperty<Views> {
|
|
|
210
211
|
/**
|
|
211
212
|
* It is used to specify the year view rendering orientation on the schedule.
|
|
212
213
|
* The applicable orientation values are,
|
|
213
|
-
* * Horizontal
|
|
214
|
-
* * Vertical
|
|
214
|
+
* * Horizontal - Denotes the horizontal orientation of Timeline Year view.
|
|
215
|
+
* * Vertical - Denotes the vertical orientation of Timeline Year view.
|
|
215
216
|
*
|
|
216
217
|
* @default 'Horizontal'
|
|
217
218
|
*/
|
|
@@ -20,7 +20,8 @@ var EventTooltip = /** @class */ (function () {
|
|
|
20
20
|
target: this.getTargets(),
|
|
21
21
|
beforeRender: this.onBeforeRender.bind(this),
|
|
22
22
|
beforeClose: this.onBeforeClose.bind(this),
|
|
23
|
-
enableRtl: this.parent.enableRtl
|
|
23
|
+
enableRtl: this.parent.enableRtl,
|
|
24
|
+
enableHtmlSanitizer: this.parent.enableHtmlSanitizer
|
|
24
25
|
});
|
|
25
26
|
this.tooltipObj.appendTo(this.parent.element);
|
|
26
27
|
}
|