@syncfusion/ej2-schedule 20.3.58 → 20.4.38
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/.eslintrc.json +16 -1
- package/CHANGELOG.md +10 -0
- package/README.md +62 -46
- 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 +821 -528
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +860 -539
- 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 +22 -30
- package/src/common/calendar-util.js +1 -1
- package/src/recurrence-editor/date-generator.js +26 -26
- package/src/recurrence-editor/recurrence-editor.js +5 -5
- package/src/schedule/actions/action-base.js +3 -3
- package/src/schedule/actions/crud.js +16 -16
- package/src/schedule/actions/drag.js +36 -32
- package/src/schedule/actions/keyboard.js +10 -8
- package/src/schedule/actions/resize.js +6 -6
- package/src/schedule/actions/touch.js +4 -3
- package/src/schedule/actions/virtual-scroll.js +10 -7
- package/src/schedule/base/interface.d.ts +8 -1
- package/src/schedule/base/resource.d.ts +1 -0
- package/src/schedule/base/resource.js +179 -93
- package/src/schedule/base/schedule-model.d.ts +7 -0
- package/src/schedule/base/schedule.d.ts +23 -0
- package/src/schedule/base/schedule.js +73 -22
- package/src/schedule/base/util.js +4 -6
- package/src/schedule/event-renderer/agenda-base.js +36 -31
- package/src/schedule/event-renderer/event-base.js +25 -25
- package/src/schedule/event-renderer/inline-edit.js +8 -5
- package/src/schedule/event-renderer/month.js +17 -14
- package/src/schedule/event-renderer/timeline-view.js +11 -11
- package/src/schedule/event-renderer/vertical-view.d.ts +1 -0
- package/src/schedule/event-renderer/vertical-view.js +97 -70
- package/src/schedule/event-renderer/year.js +25 -17
- package/src/schedule/exports/calendar-export.js +4 -4
- package/src/schedule/exports/calendar-import.js +14 -15
- package/src/schedule/exports/excel-export.js +1 -1
- package/src/schedule/exports/print.js +39 -4
- package/src/schedule/models/group-model.d.ts +8 -0
- package/src/schedule/models/group.d.ts +7 -0
- package/src/schedule/models/group.js +3 -0
- package/src/schedule/models/views-model.d.ts +8 -1
- package/src/schedule/models/views.d.ts +7 -1
- package/src/schedule/models/views.js +3 -0
- package/src/schedule/popups/event-tooltip.js +3 -2
- package/src/schedule/popups/event-window.js +36 -30
- package/src/schedule/popups/quick-popups.js +6 -6
- package/src/schedule/renderer/agenda.js +5 -5
- package/src/schedule/renderer/header-renderer.d.ts +1 -1
- package/src/schedule/renderer/header-renderer.js +21 -5
- package/src/schedule/renderer/month-agenda.js +11 -4
- package/src/schedule/renderer/month.js +44 -16
- package/src/schedule/renderer/renderer.js +3 -3
- package/src/schedule/renderer/timeline-header-row.js +7 -7
- package/src/schedule/renderer/timeline-month.js +5 -5
- package/src/schedule/renderer/timeline-view.js +2 -2
- package/src/schedule/renderer/timeline-year.js +20 -14
- package/src/schedule/renderer/vertical-view.js +24 -9
- package/src/schedule/renderer/view-base.d.ts +3 -0
- package/src/schedule/renderer/view-base.js +11 -3
- package/src/schedule/renderer/year.js +11 -5
- package/styles/bootstrap-dark.css +364 -101
- package/styles/bootstrap.css +363 -99
- package/styles/bootstrap4.css +375 -141
- package/styles/bootstrap5-dark.css +339 -137
- package/styles/bootstrap5.css +339 -137
- package/styles/fabric-dark.css +330 -101
- package/styles/fabric.css +316 -106
- package/styles/fluent-dark.css +395 -102
- package/styles/fluent.css +395 -102
- package/styles/highcontrast-light.css +407 -98
- package/styles/highcontrast.css +399 -113
- package/styles/material-dark.css +362 -110
- package/styles/material.css +404 -110
- package/styles/recurrence-editor/_layout.scss +42 -28
- package/styles/recurrence-editor/bootstrap-dark.css +137 -28
- package/styles/recurrence-editor/bootstrap-dark.scss +5 -0
- package/styles/recurrence-editor/bootstrap.css +137 -28
- package/styles/recurrence-editor/bootstrap.scss +5 -0
- package/styles/recurrence-editor/bootstrap4.css +171 -28
- package/styles/recurrence-editor/bootstrap4.scss +5 -0
- package/styles/recurrence-editor/bootstrap5-dark.css +178 -28
- package/styles/recurrence-editor/bootstrap5-dark.scss +5 -0
- package/styles/recurrence-editor/bootstrap5.css +178 -28
- package/styles/recurrence-editor/bootstrap5.scss +5 -0
- package/styles/recurrence-editor/fabric-dark.css +113 -28
- package/styles/recurrence-editor/fabric-dark.scss +5 -0
- package/styles/recurrence-editor/fabric.css +106 -28
- package/styles/recurrence-editor/fabric.scss +5 -0
- package/styles/recurrence-editor/fluent-dark.css +158 -28
- package/styles/recurrence-editor/fluent-dark.scss +5 -0
- package/styles/recurrence-editor/fluent.css +158 -28
- package/styles/recurrence-editor/fluent.scss +5 -0
- package/styles/recurrence-editor/highcontrast-light.css +110 -28
- package/styles/recurrence-editor/highcontrast-light.scss +5 -0
- package/styles/recurrence-editor/highcontrast.css +110 -28
- package/styles/recurrence-editor/highcontrast.scss +5 -0
- package/styles/recurrence-editor/material-dark.css +138 -28
- package/styles/recurrence-editor/material-dark.scss +5 -0
- package/styles/recurrence-editor/material.css +163 -28
- package/styles/recurrence-editor/material.scss +5 -0
- package/styles/recurrence-editor/tailwind-dark.css +126 -28
- package/styles/recurrence-editor/tailwind-dark.scss +5 -0
- package/styles/recurrence-editor/tailwind.css +126 -28
- package/styles/recurrence-editor/tailwind.scss +5 -0
- package/styles/schedule/_bootstrap-dark-definition.scss +63 -4
- package/styles/schedule/_bootstrap-definition.scss +62 -3
- package/styles/schedule/_bootstrap4-definition.scss +65 -5
- package/styles/schedule/_bootstrap5-definition.scss +63 -5
- package/styles/schedule/_fabric-dark-definition.scss +61 -3
- package/styles/schedule/_fabric-definition.scss +62 -3
- package/styles/schedule/_fluent-definition.scss +63 -6
- package/styles/schedule/_fusionnew-definition.scss +60 -3
- package/styles/schedule/_highcontrast-definition.scss +62 -3
- package/styles/schedule/_highcontrast-light-definition.scss +62 -3
- package/styles/schedule/_layout.scss +117 -506
- package/styles/schedule/_material-dark-definition.scss +63 -4
- package/styles/schedule/_material-definition.scss +63 -4
- package/styles/schedule/_material3-definition.scss +62 -3
- package/styles/schedule/_tailwind-definition.scss +63 -6
- package/styles/schedule/_theme.scss +97 -62
- package/styles/schedule/bootstrap-dark.css +332 -73
- package/styles/schedule/bootstrap-dark.scss +11 -0
- package/styles/schedule/bootstrap.css +331 -71
- package/styles/schedule/bootstrap.scss +11 -0
- package/styles/schedule/bootstrap4.css +343 -113
- package/styles/schedule/bootstrap4.scss +11 -0
- package/styles/schedule/bootstrap5-dark.css +307 -109
- package/styles/schedule/bootstrap5-dark.scss +11 -0
- package/styles/schedule/bootstrap5.css +307 -109
- package/styles/schedule/bootstrap5.scss +11 -0
- package/styles/schedule/fabric-dark.css +298 -73
- package/styles/schedule/fabric-dark.scss +11 -0
- package/styles/schedule/fabric.css +284 -78
- package/styles/schedule/fabric.scss +11 -0
- package/styles/schedule/fluent-dark.css +363 -74
- package/styles/schedule/fluent-dark.scss +11 -0
- package/styles/schedule/fluent.css +363 -74
- package/styles/schedule/fluent.scss +11 -0
- package/styles/schedule/highcontrast-light.css +375 -70
- package/styles/schedule/highcontrast-light.scss +11 -0
- package/styles/schedule/highcontrast.css +367 -85
- package/styles/schedule/highcontrast.scss +11 -0
- package/styles/schedule/material-dark.css +330 -82
- package/styles/schedule/material-dark.scss +11 -0
- package/styles/schedule/material.css +372 -82
- package/styles/schedule/material.scss +11 -0
- package/styles/schedule/tailwind-dark.css +246 -111
- package/styles/schedule/tailwind-dark.scss +11 -0
- package/styles/schedule/tailwind.css +246 -111
- package/styles/schedule/tailwind.scss +11 -0
- package/styles/tailwind-dark.css +279 -140
- package/styles/tailwind.css +279 -140
|
@@ -356,8 +356,6 @@ function getDateFromString(date) {
|
|
|
356
356
|
return date.indexOf('Date') !== -1 ? new Date(parseInt(date.match(/\d+/g).toString(), 10)) :
|
|
357
357
|
date.indexOf('T') !== -1 ? new Date(date) : new Date(date.replace(/-/g, '/'));
|
|
358
358
|
}
|
|
359
|
-
/** @private */
|
|
360
|
-
var scrollWidth = null;
|
|
361
359
|
/**
|
|
362
360
|
* Method to get scrollbar width
|
|
363
361
|
*
|
|
@@ -373,7 +371,7 @@ function getScrollBarWidth() {
|
|
|
373
371
|
Math.ceil(devicePixelRatio % 1) : Math.floor(devicePixelRatio % 1) : 0;
|
|
374
372
|
value = (divNode.offsetWidth - divNode.clientWidth - ratio) | 0;
|
|
375
373
|
document.body.removeChild(divNode);
|
|
376
|
-
return
|
|
374
|
+
return value;
|
|
377
375
|
}
|
|
378
376
|
/**
|
|
379
377
|
* Method to find the index from data collection
|
|
@@ -388,12 +386,12 @@ function getScrollBarWidth() {
|
|
|
388
386
|
// eslint-disable-next-line max-len
|
|
389
387
|
function findIndexInData(data, field, value, event, resourceCollection) {
|
|
390
388
|
for (var i = 0, length_1 = data.length; i < length_1; i++) {
|
|
391
|
-
if (data[i][field] === value) {
|
|
389
|
+
if (data[parseInt(i.toString(), 10)]["" + field] === value) {
|
|
392
390
|
if (event) {
|
|
393
391
|
var field_1 = resourceCollection.slice(-2)[0].field;
|
|
394
|
-
var res = (event[field_1] instanceof Array ? event[field_1] : [event[field_1]]);
|
|
392
|
+
var res = (event["" + field_1] instanceof Array ? event["" + field_1] : [event["" + field_1]]);
|
|
395
393
|
var resData = res.join(',');
|
|
396
|
-
if (resData.includes(data[i][resourceCollection.slice(-1)[0].groupIDField])) {
|
|
394
|
+
if (resData.includes(data[parseInt(i.toString(), 10)][resourceCollection.slice(-1)[0].groupIDField])) {
|
|
397
395
|
return i;
|
|
398
396
|
}
|
|
399
397
|
}
|
|
@@ -1101,13 +1099,29 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
|
|
|
1101
1099
|
addClass([selEle[this.parent.viewIndex]], ['e-active-view']);
|
|
1102
1100
|
}
|
|
1103
1101
|
};
|
|
1104
|
-
HeaderRenderer.prototype.updateDateRange = function (
|
|
1102
|
+
HeaderRenderer.prototype.updateDateRange = function (date) {
|
|
1105
1103
|
var selEle = this.toolbarObj.element.querySelector('.e-date-range');
|
|
1106
|
-
if (selEle) {
|
|
1104
|
+
if (!selEle) {
|
|
1105
|
+
return;
|
|
1106
|
+
}
|
|
1107
|
+
var textEle = selEle.querySelector('.e-tbar-btn-text');
|
|
1108
|
+
if (this.parent.activeViewOptions.dateRangeTemplate) {
|
|
1109
|
+
textEle.textContent = '';
|
|
1110
|
+
var args = {
|
|
1111
|
+
startDate: this.parent.activeView.getStartDate(),
|
|
1112
|
+
endDate: this.parent.activeView.getEndDate(), currentView: this.parent.currentView
|
|
1113
|
+
};
|
|
1114
|
+
var viewName = this.parent.activeViewOptions.dateRangeTemplateName;
|
|
1115
|
+
var templateId = this.parent.element.id + '_' + viewName + 'dateRangeTemplate';
|
|
1116
|
+
var dateTemplate = [].slice.call(this.parent.getDateRangeTemplate()(args, this.parent, 'dateRangeTemplate', templateId, false));
|
|
1117
|
+
append(dateTemplate, textEle);
|
|
1118
|
+
}
|
|
1119
|
+
else {
|
|
1120
|
+
var text = this.parent.activeView.getDateRangeText(date);
|
|
1107
1121
|
selEle.setAttribute('aria-label', text);
|
|
1108
|
-
|
|
1109
|
-
this.refresh();
|
|
1122
|
+
textEle.textContent = text;
|
|
1110
1123
|
}
|
|
1124
|
+
this.refresh();
|
|
1111
1125
|
};
|
|
1112
1126
|
HeaderRenderer.prototype.refresh = function () {
|
|
1113
1127
|
if (this.toolbarObj) {
|
|
@@ -1610,8 +1624,9 @@ var ScheduleTouch = /** @__PURE__ @class */ (function () {
|
|
|
1610
1624
|
}
|
|
1611
1625
|
ScheduleTouch.prototype.scrollHandler = function (e) {
|
|
1612
1626
|
if (this.parent.currentView === 'Agenda' || this.parent.uiStateValues.action || !this.parent.allowSwiping ||
|
|
1613
|
-
(e.originalEvent && e.originalEvent.target &&
|
|
1614
|
-
|
|
1627
|
+
(e.originalEvent && e.originalEvent.target &&
|
|
1628
|
+
(e.originalEvent.target.classList.contains(APPOINTMENT_CLASS) ||
|
|
1629
|
+
closest(e.originalEvent.target, '.' + APPOINTMENT_CLASS)) && !this.parent.isAdaptive)) {
|
|
1615
1630
|
return;
|
|
1616
1631
|
}
|
|
1617
1632
|
if (!this.timeStampStart) {
|
|
@@ -1763,7 +1778,7 @@ var ScheduleTouch = /** @__PURE__ @class */ (function () {
|
|
|
1763
1778
|
addClass([_this.element], TRANSLATE_CLASS);
|
|
1764
1779
|
_this.element.style.transform = 'translatex(' + translateX + 'px)';
|
|
1765
1780
|
if (_this.parent.headerModule) {
|
|
1766
|
-
_this.parent.headerModule.updateDateRange(
|
|
1781
|
+
_this.parent.headerModule.updateDateRange();
|
|
1767
1782
|
}
|
|
1768
1783
|
_this.parent.renderTemplates();
|
|
1769
1784
|
_this.parent.crudModule.refreshDataManager();
|
|
@@ -2342,7 +2357,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2342
2357
|
var appointmentElements = [];
|
|
2343
2358
|
appointments.map(function (value) { return value.getAttribute('data-guid'); }).filter(function (value, index, self) {
|
|
2344
2359
|
if (self.indexOf(value) === index) {
|
|
2345
|
-
appointmentElements.push(appointments[index]);
|
|
2360
|
+
appointmentElements.push(appointments[parseInt(index.toString(), 10)]);
|
|
2346
2361
|
}
|
|
2347
2362
|
});
|
|
2348
2363
|
return appointmentElements;
|
|
@@ -2354,7 +2369,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2354
2369
|
KeyboardInteraction.prototype.processViewNavigation = function (e) {
|
|
2355
2370
|
var index = parseInt(e.key, 10) - 1;
|
|
2356
2371
|
if (index < this.parent.views.length) {
|
|
2357
|
-
var view = this.parent.viewCollections[index].option;
|
|
2372
|
+
var view = this.parent.viewCollections[parseInt(index.toString(), 10)].option;
|
|
2358
2373
|
this.parent.changeView(view, e, undefined, index);
|
|
2359
2374
|
if (this.parent.headerModule) {
|
|
2360
2375
|
this.parent.headerModule.element.querySelector('.e-active-view button').focus();
|
|
@@ -2467,10 +2482,11 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2467
2482
|
}
|
|
2468
2483
|
};
|
|
2469
2484
|
KeyboardInteraction.prototype.getYearUpDownCell = function (tableRows, rowIndex, cellIndex, isUp) {
|
|
2470
|
-
while (tableRows[rowIndex
|
|
2485
|
+
while (tableRows[parseInt(rowIndex.toString(), 10)] &&
|
|
2486
|
+
tableRows[parseInt(rowIndex.toString(), 10)].cells[parseInt(cellIndex.toString(), 10)].classList.contains(OTHERMONTH_CLASS)) {
|
|
2471
2487
|
rowIndex = rowIndex + (isUp ? -1 : 1);
|
|
2472
2488
|
}
|
|
2473
|
-
return tableRows[rowIndex].cells[cellIndex];
|
|
2489
|
+
return tableRows[parseInt(rowIndex.toString(), 10)].cells[parseInt(cellIndex.toString(), 10)];
|
|
2474
2490
|
};
|
|
2475
2491
|
// eslint-disable-next-line max-len
|
|
2476
2492
|
KeyboardInteraction.prototype.getHorizontalUpDownCell = function (tableRows, target, curRowIndex, isUp) {
|
|
@@ -2489,7 +2505,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2489
2505
|
var hasRow = isUp && curRowIndex > 0 || !isUp && curRowIndex < tableRows.length - 1;
|
|
2490
2506
|
var targetCell = hasRow ? tableRows[curRowIndex + (isUp ? -1 : 1)].cells[target.cellIndex] : undefined;
|
|
2491
2507
|
if (!targetCell || targetCell.classList.contains(OTHERMONTH_CLASS)) {
|
|
2492
|
-
var column = tableRows[curRowIndex].cells[target.cellIndex - (isUp ? 1 : -1)];
|
|
2508
|
+
var column = tableRows[parseInt(curRowIndex.toString(), 10)].cells[target.cellIndex - (isUp ? 1 : -1)];
|
|
2493
2509
|
if (column) {
|
|
2494
2510
|
var dateAttr = +target.getAttribute('data-date') - (isUp ? MS_PER_DAY : -MS_PER_DAY);
|
|
2495
2511
|
return this.parent.getContentTable().querySelector('.' + WORK_CELLS_CLASS + '[data-date="' + dateAttr + '"]');
|
|
@@ -2505,7 +2521,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2505
2521
|
element: tableEle,
|
|
2506
2522
|
rowIndex: curRowIndex,
|
|
2507
2523
|
columnIndex: target.cellIndex,
|
|
2508
|
-
maxIndex: tableEle.rows[curRowIndex].cells.length
|
|
2524
|
+
maxIndex: tableEle.rows[parseInt(curRowIndex.toString(), 10)].cells.length
|
|
2509
2525
|
};
|
|
2510
2526
|
return key;
|
|
2511
2527
|
};
|
|
@@ -2578,7 +2594,8 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2578
2594
|
var rowIndex = this.isInverseTableSelect() ? key.rowIndex : 0;
|
|
2579
2595
|
this.parent.changeDate(this.parent.activeView.getNextPreviousDate('next'), e);
|
|
2580
2596
|
var tableEle = this.parent.getContentTable();
|
|
2581
|
-
var cell = isMonthEnd ? tableEle.rows[rowIndex].querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')')
|
|
2597
|
+
var cell = isMonthEnd ? tableEle.rows[parseInt(rowIndex.toString(), 10)].querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')')
|
|
2598
|
+
: tableEle.rows[parseInt(rowIndex.toString(), 10)].cells[0];
|
|
2582
2599
|
this.selectCells(false, cell);
|
|
2583
2600
|
}
|
|
2584
2601
|
}
|
|
@@ -2648,7 +2665,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2648
2665
|
this.parent.changeDate(this.parent.activeView.getNextPreviousDate('previous'), e);
|
|
2649
2666
|
var tableEle = this.parent.getContentTable();
|
|
2650
2667
|
var rowIndex = this.isInverseTableSelect() ? key.rowIndex : tableEle.rows.length - 1;
|
|
2651
|
-
var cell = tableEle.rows[rowIndex].cells[key.maxIndex - 1];
|
|
2668
|
+
var cell = tableEle.rows[parseInt(rowIndex.toString(), 10)].cells[key.maxIndex - 1];
|
|
2652
2669
|
if (isMonthStart) {
|
|
2653
2670
|
var tbody = this.parent.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody');
|
|
2654
2671
|
cell = tbody.item(tbody.length - 1).querySelector(':not(.' + OTHERMONTH_CLASS + ')[data-date="' + this.parent.activeView.getEndDate().getTime() + '"]');
|
|
@@ -3179,7 +3196,7 @@ var Islamic = /** @__PURE__ @class */ (function () {
|
|
|
3179
3196
|
var hDate = this.getHijriDate(date);
|
|
3180
3197
|
var day = [];
|
|
3181
3198
|
for (var i = 0; i < days.length; i++) {
|
|
3182
|
-
var gDate = HijriParser.toGregorian(hDate.year, hDate.month, days[i]);
|
|
3199
|
+
var gDate = HijriParser.toGregorian(hDate.year, hDate.month, days[parseInt(i.toString(), 10)]);
|
|
3183
3200
|
day.push(gDate.getDate());
|
|
3184
3201
|
}
|
|
3185
3202
|
return day;
|
|
@@ -3596,7 +3613,7 @@ function generateSummary(rule, localeObject, locale, calendarType) {
|
|
|
3596
3613
|
case 'WEEKLY':
|
|
3597
3614
|
summary += localeObject.getConstant(WEEKS) + ' ' + localeObject.getConstant(ON) + ' ';
|
|
3598
3615
|
ruleObject.day.forEach(function (day, index) {
|
|
3599
|
-
summary += capitalizeFirstWord(getValue(DAYINDEXOBJECT[day], cldrObj), 'single');
|
|
3616
|
+
summary += capitalizeFirstWord(getValue(DAYINDEXOBJECT["" + day], cldrObj), 'single');
|
|
3600
3617
|
summary += (((ruleObject.day.length - 1) === index) ? '' : ', ');
|
|
3601
3618
|
});
|
|
3602
3619
|
break;
|
|
@@ -3694,7 +3711,7 @@ function generate(startDate, rule, excludeDate, startDayOfWeek, maximumCount, vi
|
|
|
3694
3711
|
return data;
|
|
3695
3712
|
}
|
|
3696
3713
|
maxOccurrence = maximumCount;
|
|
3697
|
-
setFirstDayOfWeek(DAYINDEX[startDayOfWeek]);
|
|
3714
|
+
setFirstDayOfWeek(DAYINDEX[parseInt(startDayOfWeek.toString(), 10)]);
|
|
3698
3715
|
if (ruleObject.until) {
|
|
3699
3716
|
var end = resetTime(ruleObject.until);
|
|
3700
3717
|
ruleObject.until = new Date(end.getFullYear(), end.getMonth(), end.getDate(), 23, 59, 59);
|
|
@@ -3970,7 +3987,7 @@ function processWeekNo(startDate, endDate, data, ruleObject) {
|
|
|
3970
3987
|
startDay = dayIndex.indexOf(DAYINDEX[stDate.getDay()]);
|
|
3971
3988
|
firstWeekSpan = (6 - startDay) + 1;
|
|
3972
3989
|
for (var index = 0; index < weekNos.length; index++) {
|
|
3973
|
-
weekNo = weekNos[index];
|
|
3990
|
+
weekNo = weekNos[parseInt(index.toString(), 10)];
|
|
3974
3991
|
weekNo = (weekNo > 0) ? weekNo : 53 + weekNo + 1;
|
|
3975
3992
|
maxDate = (weekNo === 1) ? firstWeekSpan : firstWeekSpan + ((weekNo - 1) * 7);
|
|
3976
3993
|
minDate = (weekNo === 1) ? firstWeekSpan - 7 : firstWeekSpan + ((weekNo - 2) * 7);
|
|
@@ -4017,7 +4034,7 @@ function processYearDay(startDate, endDate, data, ruleObject) {
|
|
|
4017
4034
|
var expectedDays = ruleObject.day;
|
|
4018
4035
|
while (compareDates(stDate, endDate)) {
|
|
4019
4036
|
for (var index = 0; index < ruleObject.yearDay.length; index++) {
|
|
4020
|
-
date = ruleObject.yearDay[index];
|
|
4037
|
+
date = ruleObject.yearDay[parseInt(index.toString(), 10)];
|
|
4021
4038
|
tempDate = new Date(stDate.getTime());
|
|
4022
4039
|
if ((date === calendarUtil.getLeapYearDaysCount() || date === -calendarUtil.getLeapYearDaysCount()) &&
|
|
4023
4040
|
(!calendarUtil.isLeapYear(calendarUtil.getFullYear(tempDate), 1))) {
|
|
@@ -4177,7 +4194,7 @@ function monthlyDateTypeProcessforMonthFreq(startDate, endDate, data, ruleObject
|
|
|
4177
4194
|
*/
|
|
4178
4195
|
function processDateCollectionForByMonthDay(ruleObject, recRuleVariables, endDate, isByMonth, startDate, data) {
|
|
4179
4196
|
for (var index = 0; index < ruleObject.monthDay.length; index++) {
|
|
4180
|
-
recRuleVariables.date = ruleObject.monthDay[index];
|
|
4197
|
+
recRuleVariables.date = ruleObject.monthDay[parseInt(index.toString(), 10)];
|
|
4181
4198
|
recRuleVariables.tempDate = calendarUtil.getMonthStartDate(recRuleVariables.tempDate);
|
|
4182
4199
|
var maxDate = calendarUtil.getMonthDaysCount(recRuleVariables.tempDate);
|
|
4183
4200
|
recRuleVariables.date = recRuleVariables.date > 0 ? recRuleVariables.date : (maxDate + recRuleVariables.date + 1);
|
|
@@ -4221,7 +4238,7 @@ function setNextValidDate(tempDate, ruleObject, monthInit, beginDate, interval)
|
|
|
4221
4238
|
if (ruleObject.month.length) {
|
|
4222
4239
|
monthInit++;
|
|
4223
4240
|
monthInit = monthInit % ruleObject.month.length;
|
|
4224
|
-
calendarUtil.setMonth(tempDate, ruleObject.month[monthInit], 1);
|
|
4241
|
+
calendarUtil.setMonth(tempDate, ruleObject.month[parseInt(monthInit.toString(), 10)], 1);
|
|
4225
4242
|
if (monthInit === 0) {
|
|
4226
4243
|
calendarUtil.addYears(tempDate, interval, ruleObject.month[0]);
|
|
4227
4244
|
}
|
|
@@ -4266,7 +4283,7 @@ function getMonthCollection(startDate, endDate, data, ruleObject) {
|
|
|
4266
4283
|
var isHavingNumber = expectedDays.map(function (item) { return HASNUMBER.test(item); });
|
|
4267
4284
|
if (isHavingNumber.indexOf(true) > -1) {
|
|
4268
4285
|
for (var j = 0; j <= expectedDays.length - 1; j++) {
|
|
4269
|
-
var expectedDaysArray = expectedDays[j].match(SPLITNUMBERANDSTRING);
|
|
4286
|
+
var expectedDaysArray = expectedDays[parseInt(j.toString(), 10)].match(SPLITNUMBERANDSTRING);
|
|
4270
4287
|
var position = parseInt(expectedDaysArray[0], 10);
|
|
4271
4288
|
tempDate = new Date(tempDate.getTime());
|
|
4272
4289
|
tempDate = calendarUtil.getMonthStartDate(tempDate);
|
|
@@ -4327,8 +4344,8 @@ function getMonthCollection(startDate, endDate, data, ruleObject) {
|
|
|
4327
4344
|
index = 0;
|
|
4328
4345
|
var datas = [];
|
|
4329
4346
|
for (var week = 0; week < monthCollection.length; week++) {
|
|
4330
|
-
for (var row = 0; row < monthCollection[week].length; row++) {
|
|
4331
|
-
datas.push(monthCollection[week][row]);
|
|
4347
|
+
for (var row = 0; row < monthCollection[parseInt(week.toString(), 10)].length; row++) {
|
|
4348
|
+
datas.push(monthCollection[parseInt(week.toString(), 10)][parseInt(row.toString(), 10)]);
|
|
4332
4349
|
}
|
|
4333
4350
|
}
|
|
4334
4351
|
monthCollection = [datas];
|
|
@@ -4520,8 +4537,8 @@ function processDateCollectionforByDayWithInteger(startDate, endDate, data, rule
|
|
|
4520
4537
|
while (calendarUtil.isSameYear(currentMonthDate, tempDate)) {
|
|
4521
4538
|
currentMonthDate = new Date(tempDate.getTime());
|
|
4522
4539
|
if (ruleObject.month.length === 0 ||
|
|
4523
|
-
(ruleObject.month.length > 0 && ruleObject.month[i] === calendarUtil.getMonth(currentMonthDate))) {
|
|
4524
|
-
var expectedDaysArray = expectedDays[j].match(SPLITNUMBERANDSTRING);
|
|
4540
|
+
(ruleObject.month.length > 0 && ruleObject.month[parseInt(i.toString(), 10)] === calendarUtil.getMonth(currentMonthDate))) {
|
|
4541
|
+
var expectedDaysArray = expectedDays[parseInt(j.toString(), 10)].match(SPLITNUMBERANDSTRING);
|
|
4525
4542
|
var position = parseInt(expectedDaysArray[0], 10);
|
|
4526
4543
|
currentDate = new Date(tempDate.getTime());
|
|
4527
4544
|
while (calendarUtil.isSameYear(currentDate, tempDate)
|
|
@@ -4640,8 +4657,8 @@ function insertDataCollection(dateCollection, state, startDate, endDate, data, r
|
|
|
4640
4657
|
function getDateCollectionforBySetPosNull(monthCollection) {
|
|
4641
4658
|
var datas = [];
|
|
4642
4659
|
for (var week = 0; week < monthCollection.length; week++) {
|
|
4643
|
-
for (var row = 0; row < monthCollection[week].length; row++) {
|
|
4644
|
-
datas.push(new Date(monthCollection[week][row]).getTime());
|
|
4660
|
+
for (var row = 0; row < monthCollection[parseInt(week.toString(), 10)].length; row++) {
|
|
4661
|
+
datas.push(new Date(monthCollection[parseInt(week.toString(), 10)][parseInt(row.toString(), 10)]).getTime());
|
|
4645
4662
|
}
|
|
4646
4663
|
}
|
|
4647
4664
|
monthCollection = datas.length > 0 ? [datas] : [];
|
|
@@ -4687,8 +4704,8 @@ function insertDateCollectionBasedonIndex(monthCollection, startDate, endDate, d
|
|
|
4687
4704
|
* @private
|
|
4688
4705
|
*/
|
|
4689
4706
|
function filterDateCollectionByIndex(monthCollection, index, datas) {
|
|
4690
|
-
for (var week = 0; week < monthCollection[index].length; week++) {
|
|
4691
|
-
datas.push(monthCollection[index][week]);
|
|
4707
|
+
for (var week = 0; week < monthCollection[parseInt(index.toString(), 10)].length; week++) {
|
|
4708
|
+
datas.push(monthCollection[parseInt(index.toString(), 10)][parseInt(week.toString(), 10)]);
|
|
4692
4709
|
}
|
|
4693
4710
|
return datas;
|
|
4694
4711
|
}
|
|
@@ -4732,7 +4749,7 @@ function weekCount(year, startDayOfWeek, monthCollection, week, ruleObject) {
|
|
|
4732
4749
|
var firstWeekDay = (firstOfMonth.getDay() - firstDayOfWeek + 7) % 7;
|
|
4733
4750
|
var used = firstWeekDay + numberOfDaysInMonth;
|
|
4734
4751
|
var count = Math.ceil(used / 7) - 1;
|
|
4735
|
-
var dayData = monthCollection[week][count];
|
|
4752
|
+
var dayData = monthCollection[parseInt(week.toString(), 10)][parseInt(count.toString(), 10)];
|
|
4736
4753
|
var chDate = new Date(dayData);
|
|
4737
4754
|
var state = validateRules(chDate, ruleObject);
|
|
4738
4755
|
return (state) ? count : count - 1;
|
|
@@ -4752,15 +4769,15 @@ function weekCount(year, startDayOfWeek, monthCollection, week, ruleObject) {
|
|
|
4752
4769
|
function insertDateCollectionBasedonBySetPos(monthCollection, state, startDate, endDate, data, ruleObject) {
|
|
4753
4770
|
if (monthCollection.length > 0) {
|
|
4754
4771
|
for (var week = 0; week < monthCollection.length; week++) {
|
|
4755
|
-
monthCollection[week].sort();
|
|
4772
|
+
monthCollection[parseInt(week.toString(), 10)].sort();
|
|
4756
4773
|
var expectedDays = ruleObject.day;
|
|
4757
4774
|
var isHavingNumber = expectedDays.map(function (item) { return HASNUMBER.test(item); });
|
|
4758
4775
|
var weekIndex = (ruleObject.freq === 'YEARLY' && (ruleObject.validRules.indexOf('BYMONTH') > -1) &&
|
|
4759
4776
|
!(isHavingNumber.indexOf(true) > -1)) ?
|
|
4760
4777
|
weekCount(new Date(monthCollection[0][0]).getFullYear(), 0, monthCollection, week, ruleObject)
|
|
4761
|
-
: (monthCollection[week].length + ruleObject.setPosition);
|
|
4778
|
+
: (monthCollection[parseInt(week.toString(), 10)].length + ruleObject.setPosition);
|
|
4762
4779
|
var index = ((ruleObject.setPosition < 1) ? weekIndex : ruleObject.setPosition - 1);
|
|
4763
|
-
var dayData = monthCollection[week][index];
|
|
4780
|
+
var dayData = monthCollection[parseInt(week.toString(), 10)][parseInt(index.toString(), 10)];
|
|
4764
4781
|
insertDateCollection(state, startDate, endDate, data, ruleObject, dayData);
|
|
4765
4782
|
}
|
|
4766
4783
|
}
|
|
@@ -4783,9 +4800,9 @@ function insertDatasIntoExistingCollection(monthCollection, state, startDate, en
|
|
|
4783
4800
|
index = !isNullOrUndefined(index) ? index :
|
|
4784
4801
|
((ruleObject.setPosition < 1)
|
|
4785
4802
|
? (monthCollection.length + ruleObject.setPosition) : ruleObject.setPosition - 1);
|
|
4786
|
-
monthCollection[index].sort();
|
|
4787
|
-
for (var week = 0; week < monthCollection[index].length; week++) {
|
|
4788
|
-
var dayData = monthCollection[index][week];
|
|
4803
|
+
monthCollection[parseInt(index.toString(), 10)].sort();
|
|
4804
|
+
for (var week = 0; week < monthCollection[parseInt(index.toString(), 10)].length; week++) {
|
|
4805
|
+
var dayData = monthCollection[parseInt(index.toString(), 10)][parseInt(week.toString(), 10)];
|
|
4789
4806
|
insertDateCollection(state, startDate, endDate, data, ruleObject, dayData);
|
|
4790
4807
|
}
|
|
4791
4808
|
}
|
|
@@ -4832,7 +4849,7 @@ function checkDayIndex(day, expectedDays) {
|
|
|
4832
4849
|
sortedExpectedDays.push(expectedDaysNumberSplit[0]);
|
|
4833
4850
|
}
|
|
4834
4851
|
});
|
|
4835
|
-
return (sortedExpectedDays.indexOf(DAYINDEX[day]) === -1);
|
|
4852
|
+
return (sortedExpectedDays.indexOf(DAYINDEX[parseInt(day.toString(), 10)]) === -1);
|
|
4836
4853
|
}
|
|
4837
4854
|
/**
|
|
4838
4855
|
* Internal method to get start date of week
|
|
@@ -4848,7 +4865,7 @@ function getStartDateForWeek(startDate, expectedDays) {
|
|
|
4848
4865
|
if (expectedDays.length > 0) {
|
|
4849
4866
|
var expectedDaysArr = [];
|
|
4850
4867
|
for (var i = 0; i <= expectedDays.length - 1; i++) {
|
|
4851
|
-
newstr = getDayString(expectedDays[i]);
|
|
4868
|
+
newstr = getDayString(expectedDays[parseInt(i.toString(), 10)]);
|
|
4852
4869
|
expectedDaysArr.push(newstr);
|
|
4853
4870
|
}
|
|
4854
4871
|
if (expectedDaysArr.indexOf(DAYINDEX[tempDate.getDay()]) === -1) {
|
|
@@ -4962,10 +4979,10 @@ function processWeekDays(expectedDays) {
|
|
|
4962
4979
|
while (temp % 7 !== dayIndex.indexOf(expectedDays[0])) {
|
|
4963
4980
|
temp++;
|
|
4964
4981
|
}
|
|
4965
|
-
dayCycle[element] = temp - startIndex;
|
|
4982
|
+
dayCycle["" + element] = temp - startIndex;
|
|
4966
4983
|
}
|
|
4967
4984
|
else {
|
|
4968
|
-
dayCycle[element] = dayIndex.indexOf(expectedDays[(index + 1)]) - dayIndex.indexOf(element);
|
|
4985
|
+
dayCycle["" + element] = dayIndex.indexOf(expectedDays[(index + 1)]) - dayIndex.indexOf(element);
|
|
4969
4986
|
}
|
|
4970
4987
|
});
|
|
4971
4988
|
return dayCycle;
|
|
@@ -5224,8 +5241,8 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5224
5241
|
event_1 = this_1.processTimezone(event_1);
|
|
5225
5242
|
}
|
|
5226
5243
|
for (var level = 0; level < resourceCollection.length; level++) {
|
|
5227
|
-
if (event_1[resourceCollection[level].field] === null || event_1[resourceCollection[level].field] === 0) {
|
|
5228
|
-
event_1[resourceCollection[level].field] = undefined;
|
|
5244
|
+
if (event_1[resourceCollection[parseInt(level.toString(), 10)].field] === null || event_1[resourceCollection[parseInt(level.toString(), 10)].field] === 0) {
|
|
5245
|
+
event_1[resourceCollection[parseInt(level.toString(), 10)].field] = undefined;
|
|
5229
5246
|
}
|
|
5230
5247
|
}
|
|
5231
5248
|
if (!isNullOrUndefined(event_1[fields.recurrenceRule]) && event_1[fields.recurrenceRule] === '') {
|
|
@@ -5397,7 +5414,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5397
5414
|
var resourceData;
|
|
5398
5415
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
5399
5416
|
var data = this.getGroupIndexFromEvent(eventObj);
|
|
5400
|
-
resourceData = this.parent.resourceBase.lastResourceLevel[data];
|
|
5417
|
+
resourceData = this.parent.resourceBase.lastResourceLevel[parseInt(data.toString(), 10)];
|
|
5401
5418
|
}
|
|
5402
5419
|
var blockEvents = extend([], this.parent.blockProcessed, null, true);
|
|
5403
5420
|
for (var _i = 0, blockEvents_1 = blockEvents; _i < blockEvents_1.length; _i++) {
|
|
@@ -5449,15 +5466,15 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5449
5466
|
var predicate = {};
|
|
5450
5467
|
var resourceCollection = this.parent.resourceBase.resourceCollection;
|
|
5451
5468
|
for (var level = 0; level < resourceCollection.length; level++) {
|
|
5452
|
-
predicate[resourceCollection[level].field] = resourceTdData.groupOrder[level];
|
|
5469
|
+
predicate[resourceCollection[parseInt(level.toString(), 10)].field] = resourceTdData.groupOrder[parseInt(level.toString(), 10)];
|
|
5453
5470
|
}
|
|
5454
5471
|
var keys = Object.keys(predicate);
|
|
5455
5472
|
var filteredCollection = appointments.filter(function (eventObj) { return keys.every(function (key) {
|
|
5456
|
-
if (eventObj[key] instanceof Array) {
|
|
5457
|
-
return eventObj[key].indexOf(predicate[key]) > -1;
|
|
5473
|
+
if (eventObj["" + key] instanceof Array) {
|
|
5474
|
+
return eventObj["" + key].indexOf(predicate["" + key]) > -1;
|
|
5458
5475
|
}
|
|
5459
5476
|
else {
|
|
5460
|
-
return eventObj[key] === predicate[key];
|
|
5477
|
+
return eventObj["" + key] === predicate["" + key];
|
|
5461
5478
|
}
|
|
5462
5479
|
}); });
|
|
5463
5480
|
return filteredCollection;
|
|
@@ -5562,7 +5579,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5562
5579
|
}
|
|
5563
5580
|
var cStart = start;
|
|
5564
5581
|
for (var level = 0; level < this.slots.length; level++) {
|
|
5565
|
-
var slot = this.slots[level];
|
|
5582
|
+
var slot = this.slots[parseInt(level.toString(), 10)];
|
|
5566
5583
|
if (this.parent.currentView === 'WorkWeek' || this.parent.currentView === 'TimelineWorkWeek'
|
|
5567
5584
|
|| this.parent.activeViewOptions.group.byDate || this.parent.activeViewOptions.showWeekend) {
|
|
5568
5585
|
var slotDates = [];
|
|
@@ -5597,9 +5614,9 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5597
5614
|
var hasBreak = endIndex !== -1;
|
|
5598
5615
|
endIndex = hasBreak ? endIndex : slot.length - 1;
|
|
5599
5616
|
var count = ((endIndex - startIndex) + 1);
|
|
5600
|
-
var isLeft = (slot[startIndex] !== orgStart);
|
|
5601
|
-
var isRight = (slot[endIndex] !== orgEnd);
|
|
5602
|
-
ranges.push(this.cloneEventObject(event, slot[startIndex], slot[endIndex], count, isLeft, isRight));
|
|
5617
|
+
var isLeft = (slot[parseInt(startIndex.toString(), 10)] !== orgStart);
|
|
5618
|
+
var isRight = (slot[parseInt(endIndex.toString(), 10)] !== orgEnd);
|
|
5619
|
+
ranges.push(this.cloneEventObject(event, slot[parseInt(startIndex.toString(), 10)], slot[parseInt(endIndex.toString(), 10)], count, isLeft, isRight));
|
|
5603
5620
|
if (hasBreak) {
|
|
5604
5621
|
break;
|
|
5605
5622
|
}
|
|
@@ -5609,8 +5626,8 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5609
5626
|
if (this.dateInRange(cStart, slot[0], slot[slot.length - 1])) {
|
|
5610
5627
|
var availSlot = [];
|
|
5611
5628
|
for (var i = 0; i < slot.length; i++) {
|
|
5612
|
-
if (this.dateInRange(slot[i], orgStart, orgEnd)) {
|
|
5613
|
-
availSlot.push(slot[i]);
|
|
5629
|
+
if (this.dateInRange(slot[parseInt(i.toString(), 10)], orgStart, orgEnd)) {
|
|
5630
|
+
availSlot.push(slot[parseInt(i.toString(), 10)]);
|
|
5614
5631
|
}
|
|
5615
5632
|
}
|
|
5616
5633
|
if (availSlot.length > 0) {
|
|
@@ -5786,9 +5803,9 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5786
5803
|
var levelName;
|
|
5787
5804
|
var idField;
|
|
5788
5805
|
for (var i = this.parent.resourceBase.resourceCollection.length - 1; i >= 0; i--) {
|
|
5789
|
-
var resourceData = eventData[this.parent.resourceBase.resourceCollection[i].field];
|
|
5806
|
+
var resourceData = eventData[this.parent.resourceBase.resourceCollection[parseInt(i.toString(), 10)].field];
|
|
5790
5807
|
if (!isNullOrUndefined(resourceData)) {
|
|
5791
|
-
resource = this.parent.resourceBase.resourceCollection[i];
|
|
5808
|
+
resource = this.parent.resourceBase.resourceCollection[parseInt(i.toString(), 10)];
|
|
5792
5809
|
levelIndex = i;
|
|
5793
5810
|
levelName = resource.name;
|
|
5794
5811
|
idField = resource.field;
|
|
@@ -5807,8 +5824,8 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5807
5824
|
return null;
|
|
5808
5825
|
})[0];
|
|
5809
5826
|
}
|
|
5810
|
-
var id = ((eventData[idField] instanceof Array) ?
|
|
5811
|
-
eventData[idField][0] : eventData[idField]);
|
|
5827
|
+
var id = ((eventData["" + idField] instanceof Array) ?
|
|
5828
|
+
eventData["" + idField][0] : eventData["" + idField]);
|
|
5812
5829
|
if (levelIndex > 0) {
|
|
5813
5830
|
var parentField = this.parent.resourceCollection[levelIndex - 1].field;
|
|
5814
5831
|
return this.parent.resourceBase.getIndexFromResourceId(id, levelName, resource, eventData, parentField);
|
|
@@ -6185,7 +6202,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6185
6202
|
var idField = isGuid ? 'Guid' : (isFollowing) ? this.parent.eventFields.followingID : this.parent.eventFields.recurrenceID;
|
|
6186
6203
|
var fieldKey = isGuid ? 'Guid' : this.parent.eventFields.id;
|
|
6187
6204
|
var dataSource = isGuid ? this.parent.eventsProcessed : this.parent.eventsData;
|
|
6188
|
-
return dataSource.filter(function (data) { return data[idField] === eventObj[fieldKey]; });
|
|
6205
|
+
return dataSource.filter(function (data) { return data["" + idField] === eventObj["" + fieldKey]; });
|
|
6189
6206
|
};
|
|
6190
6207
|
EventBase.prototype.getOccurrencesByID = function (id) {
|
|
6191
6208
|
var fields = this.parent.eventFields;
|
|
@@ -6229,14 +6246,14 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6229
6246
|
var exDateString_1 = parentObject[fields.recurrenceException].split(',');
|
|
6230
6247
|
var _loop_3 = function (i, len) {
|
|
6231
6248
|
var edited = this_2.parent.eventsData.filter(function (eventObj) {
|
|
6232
|
-
return eventObj[fields.recurrenceID] === parentObject[fields.id] && eventObj[fields.recurrenceException] === exDateString_1[i];
|
|
6249
|
+
return eventObj[fields.recurrenceID] === parentObject[fields.id] && eventObj[fields.recurrenceException] === exDateString_1[parseInt(i.toString(), 10)];
|
|
6233
6250
|
});
|
|
6234
6251
|
if (edited.length === 0) {
|
|
6235
|
-
var exDate = getDateFromRecurrenceDateString(exDateString_1[i]);
|
|
6252
|
+
var exDate = getDateFromRecurrenceDateString(exDateString_1[parseInt(i.toString(), 10)]);
|
|
6236
6253
|
var childObject = extend({}, recurrenceData, null, true);
|
|
6237
6254
|
childObject[fields.recurrenceID] = parentObject[fields.id];
|
|
6238
6255
|
delete childObject[fields.followingID];
|
|
6239
|
-
childObject[fields.recurrenceException] = exDateString_1[i];
|
|
6256
|
+
childObject[fields.recurrenceException] = exDateString_1[parseInt(i.toString(), 10)];
|
|
6240
6257
|
var startDate = new Date(exDate.getTime());
|
|
6241
6258
|
var time = parentObject[fields.endTime].getTime() - parentObject[fields.startTime].getTime();
|
|
6242
6259
|
var endDate = new Date(startDate.getTime());
|
|
@@ -6388,14 +6405,14 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6388
6405
|
var filteredDates;
|
|
6389
6406
|
if (dateRender[0] < this.parent.minDate && dateRender[dateRender.length - 1] > this.parent.maxDate) {
|
|
6390
6407
|
for (var i = 0; i < dateRender.length; i++) {
|
|
6391
|
-
if (resetTime(dateRender[i]).getTime() === resetTime(new Date(this.parent.minDate)).getTime()) {
|
|
6408
|
+
if (resetTime(dateRender[parseInt(i.toString(), 10)]).getTime() === resetTime(new Date(this.parent.minDate)).getTime()) {
|
|
6392
6409
|
firstDate = i;
|
|
6393
6410
|
}
|
|
6394
|
-
if (resetTime(dateRender[i]).getTime() === resetTime(new Date(this.parent.maxDate)).getTime()) {
|
|
6411
|
+
if (resetTime(dateRender[parseInt(i.toString(), 10)]).getTime() === resetTime(new Date(this.parent.maxDate)).getTime()) {
|
|
6395
6412
|
lastDate = i;
|
|
6396
6413
|
}
|
|
6397
6414
|
}
|
|
6398
|
-
filteredDates = dateRender.filter(function (date) { return date >= dateRender[firstDate] && date <= dateRender[lastDate]; });
|
|
6415
|
+
filteredDates = dateRender.filter(function (date) { return date >= dateRender[parseInt(firstDate.toString(), 10)] && date <= dateRender[parseInt(lastDate.toString(), 10)]; });
|
|
6399
6416
|
}
|
|
6400
6417
|
return filteredDates;
|
|
6401
6418
|
};
|
|
@@ -6446,7 +6463,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6446
6463
|
var tr = createElement('tr');
|
|
6447
6464
|
var levels = this.parent.activeView.colLevels.slice(-1)[0];
|
|
6448
6465
|
for (var i = 0, len = levels.length; i < len; i++) {
|
|
6449
|
-
var col = levels[i];
|
|
6466
|
+
var col = levels[parseInt(i.toString(), 10)];
|
|
6450
6467
|
var appointmentWrap = createElement('td', {
|
|
6451
6468
|
className: (type === 'allDay') ? ALLDAY_APPOINTMENT_WRAPPER_CLASS : (type === 'timeIndicator') ?
|
|
6452
6469
|
TIMELINE_WRAPPER_CLASS : DAY_WRAPPER_CLASS, attrs: { 'data-date': col.date.getTime().toString() }
|
|
@@ -6536,8 +6553,8 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6536
6553
|
wrapper.classList.contains(ROW_COUNT_WRAPPER_CLASS))) {
|
|
6537
6554
|
var groupIndex = parseInt(wrapper.getAttribute('data-group-index'), 10);
|
|
6538
6555
|
for (var j = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; j < len; j++) {
|
|
6539
|
-
if (groupIndex === this.parent.crudModule.crudObj.sourceEvent[j].groupIndex ||
|
|
6540
|
-
groupIndex === this.parent.crudModule.crudObj.targetEvent[j].groupIndex) {
|
|
6556
|
+
if (groupIndex === this.parent.crudModule.crudObj.sourceEvent[parseInt(j.toString(), 10)].groupIndex ||
|
|
6557
|
+
groupIndex === this.parent.crudModule.crudObj.targetEvent[parseInt(j.toString(), 10)].groupIndex) {
|
|
6541
6558
|
remove(wrapper);
|
|
6542
6559
|
}
|
|
6543
6560
|
}
|
|
@@ -6592,7 +6609,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6592
6609
|
this.dateRender[0] = this.parent.activeView.renderDates;
|
|
6593
6610
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
6594
6611
|
for (var i = 0, len = this.resources.length; i < len; i++) {
|
|
6595
|
-
this.dateRender[i] = this.resources[i].renderDates;
|
|
6612
|
+
this.dateRender[parseInt(i.toString(), 10)] = this.resources[parseInt(i.toString(), 10)].renderDates;
|
|
6596
6613
|
}
|
|
6597
6614
|
}
|
|
6598
6615
|
};
|
|
@@ -6626,11 +6643,11 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6626
6643
|
var dateCount = this.getStartCount();
|
|
6627
6644
|
for (var _i = 0, resources_1 = resources; _i < resources_1.length; _i++) {
|
|
6628
6645
|
var resource = resources_1[_i];
|
|
6629
|
-
var renderDates = this.dateRender[resource];
|
|
6646
|
+
var renderDates = this.dateRender[parseInt(resource.toString(), 10)];
|
|
6630
6647
|
for (var day = 0, length_1 = renderDates.length; day < length_1; day++) {
|
|
6631
|
-
var startDate = new Date(renderDates[day].getTime());
|
|
6632
|
-
var endDate = addDays(renderDates[day], 1);
|
|
6633
|
-
var filterEvents = this.filterEvents(startDate, endDate, this.parent.blockProcessed, this.resources[resource]);
|
|
6648
|
+
var startDate = new Date(renderDates[parseInt(day.toString(), 10)].getTime());
|
|
6649
|
+
var endDate = addDays(renderDates[parseInt(day.toString(), 10)], 1);
|
|
6650
|
+
var filterEvents = this.filterEvents(startDate, endDate, this.parent.blockProcessed, this.resources[parseInt(resource.toString(), 10)]);
|
|
6634
6651
|
for (var _a = 0, filterEvents_1 = filterEvents; _a < filterEvents_1.length; _a++) {
|
|
6635
6652
|
var event_1 = filterEvents_1[_a];
|
|
6636
6653
|
if (this.parent.resourceBase) {
|
|
@@ -6648,9 +6665,9 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6648
6665
|
var spannedData = this.isSpannedEvent(eventObj, dayIndex, resource);
|
|
6649
6666
|
var eStart = spannedData[this.fields.startTime];
|
|
6650
6667
|
var eEnd = spannedData[this.fields.endTime];
|
|
6651
|
-
var currentDate = resetTime(new Date(this.dateRender[resource][dayIndex].getTime()));
|
|
6668
|
+
var currentDate = resetTime(new Date(this.dateRender[parseInt(resource.toString(), 10)][parseInt(dayIndex.toString(), 10)].getTime()));
|
|
6652
6669
|
var schedule = getStartEndHours(currentDate, this.startHour, this.endHour);
|
|
6653
|
-
if (eStart <= eEnd && this.isValidEvent(eventObj, eStart, eEnd, schedule)) {
|
|
6670
|
+
if (eStart <= eEnd && this.isValidEvent(eventObj, eStart, eEnd, schedule) && this.isWorkDayAvailable(resource, eStart)) {
|
|
6654
6671
|
var blockTop = void 0;
|
|
6655
6672
|
var blockHeight = void 0;
|
|
6656
6673
|
if (spannedData[this.fields.isAllDay]) {
|
|
@@ -6664,9 +6681,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6664
6681
|
}
|
|
6665
6682
|
var appointmentElement = this.createBlockAppointmentElement(eventObj, resource, this.isResourceEventTemplate);
|
|
6666
6683
|
setStyleAttribute(appointmentElement, { 'width': '100%', 'height': blockHeight, 'top': blockTop });
|
|
6667
|
-
var
|
|
6668
|
-
var index = this.parent.activeViewOptions.group.byDate ?
|
|
6669
|
-
(this.resources.length * renderedIndex) + resource : dayCount;
|
|
6684
|
+
var index = this.getDayIndex(dayIndex, resource, dayCount);
|
|
6670
6685
|
this.appendEvent(eventObj, appointmentElement, index, '0px');
|
|
6671
6686
|
}
|
|
6672
6687
|
};
|
|
@@ -6686,15 +6701,15 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6686
6701
|
}
|
|
6687
6702
|
}
|
|
6688
6703
|
this_1.slots = [];
|
|
6689
|
-
var renderDates = this_1.dateRender[resource];
|
|
6704
|
+
var renderDates = this_1.dateRender[parseInt(resource.toString(), 10)];
|
|
6690
6705
|
var renderedDate = this_1.getRenderedDates(renderDates) || renderDates;
|
|
6691
6706
|
this_1.slots.push(renderDates.map(function (date) { return +date; }));
|
|
6692
6707
|
for (var day = 0, length_2 = renderDates.length; day < length_2 &&
|
|
6693
|
-
renderDates[day] <= renderedDate[renderedDate.length - 1]; day++) {
|
|
6708
|
+
renderDates[parseInt(day.toString(), 10)] <= renderedDate[renderedDate.length - 1]; day++) {
|
|
6694
6709
|
this_1.renderedEvents = [];
|
|
6695
|
-
var startDate = new Date(renderDates[day].getTime());
|
|
6696
|
-
var endDate = addDays(renderDates[day], 1);
|
|
6697
|
-
var filterEvents = this_1.filterEvents(startDate, endDate, eventCollection, this_1.resources[resource]);
|
|
6710
|
+
var startDate = new Date(renderDates[parseInt(day.toString(), 10)].getTime());
|
|
6711
|
+
var endDate = addDays(renderDates[parseInt(day.toString(), 10)], 1);
|
|
6712
|
+
var filterEvents = this_1.filterEvents(startDate, endDate, eventCollection, this_1.resources[parseInt(resource.toString(), 10)]);
|
|
6698
6713
|
if (isRender) {
|
|
6699
6714
|
for (var _i = 0, filterEvents_2 = filterEvents; _i < filterEvents_2.length; _i++) {
|
|
6700
6715
|
var event_2 = filterEvents_2[_i];
|
|
@@ -6742,15 +6757,37 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6742
6757
|
return this.parent.virtualScrollModule && this.parent.activeViewOptions.allowVirtualScrolling && this.parent.timeScale.enable ?
|
|
6743
6758
|
parseInt(this.element.querySelector('.' + APPOINTMENT_WRAPPER_CLASS).getAttribute('id').split('-').slice(-1)[0], 10) : 0;
|
|
6744
6759
|
};
|
|
6745
|
-
VerticalEvent.prototype.getDayIndex = function (dayIndex, resource) {
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6760
|
+
VerticalEvent.prototype.getDayIndex = function (dayIndex, resource, dayCount) {
|
|
6761
|
+
var _this = this;
|
|
6762
|
+
if (!this.parent.activeViewOptions.group.byDate) {
|
|
6763
|
+
return dayCount;
|
|
6764
|
+
}
|
|
6765
|
+
if (this.parent.activeViewOptions.group.byDate && !this.parent.activeViewOptions.group.hideNonWorkingDays) {
|
|
6766
|
+
var renderedIndex = this.parent.resourceBase.lastResourceLevel[0].renderDates.indexOf(this.dateRender[parseInt(resource.toString(), 10)][parseInt(dayIndex.toString(), 10)]);
|
|
6767
|
+
return (this.resources.length * renderedIndex) + resource;
|
|
6768
|
+
}
|
|
6769
|
+
var dateIndex = 0;
|
|
6770
|
+
var firstColumn = this.parent.activeView.colLevels[0];
|
|
6771
|
+
var currentDate = this.dateRender[parseInt(resource.toString(), 10)][parseInt(dayIndex.toString(), 10)].getTime();
|
|
6772
|
+
var currentResources = [];
|
|
6773
|
+
for (var i = 0; i < firstColumn.length; i++) {
|
|
6774
|
+
currentResources = this.parent.resourceBase.resourceDateTree[parseInt(i.toString(), 10)];
|
|
6775
|
+
if (currentDate === firstColumn[parseInt(i.toString(), 10)].date.getTime()) {
|
|
6776
|
+
break;
|
|
6777
|
+
}
|
|
6778
|
+
dateIndex = dateIndex + firstColumn[parseInt(i.toString(), 10)].colSpan;
|
|
6779
|
+
}
|
|
6780
|
+
var resIndex = currentResources.findIndex(function (x) { return x.groupOrder.toString() ===
|
|
6781
|
+
_this.resources[parseInt(resource.toString(), 10)].groupOrder.toString(); });
|
|
6782
|
+
if (resIndex < 0) {
|
|
6783
|
+
return dateIndex;
|
|
6784
|
+
}
|
|
6785
|
+
return dateIndex + resIndex;
|
|
6749
6786
|
};
|
|
6750
6787
|
VerticalEvent.prototype.setValues = function (event, resourceIndex) {
|
|
6751
6788
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
6752
|
-
this.cssClass = this.resources[resourceIndex].cssClass;
|
|
6753
|
-
this.groupOrder = this.resources[resourceIndex].groupOrder;
|
|
6789
|
+
this.cssClass = this.resources[parseInt(resourceIndex.toString(), 10)].cssClass;
|
|
6790
|
+
this.groupOrder = this.resources[parseInt(resourceIndex.toString(), 10)].groupOrder;
|
|
6754
6791
|
}
|
|
6755
6792
|
else {
|
|
6756
6793
|
this.cssClass = this.parent.resourceBase.getCssClass(event);
|
|
@@ -6863,7 +6900,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6863
6900
|
};
|
|
6864
6901
|
VerticalEvent.prototype.createMoreIndicator = function (allDayRow, count, currentDay) {
|
|
6865
6902
|
var index = currentDay + count;
|
|
6866
|
-
var countWrapper = allDayRow[index];
|
|
6903
|
+
var countWrapper = allDayRow[parseInt(index.toString(), 10)];
|
|
6867
6904
|
if (countWrapper.childElementCount <= 0) {
|
|
6868
6905
|
var innerCountWrap = createElement('div', {
|
|
6869
6906
|
className: ROW_COUNT_WRAPPER_CLASS,
|
|
@@ -6909,8 +6946,8 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6909
6946
|
}
|
|
6910
6947
|
};
|
|
6911
6948
|
VerticalEvent.prototype.isSpannedEvent = function (record, day, resource) {
|
|
6912
|
-
var currentDate = resetTime(this.dateRender[resource][day]);
|
|
6913
|
-
var renderedDate = this.getRenderedDates(this.dateRender[resource]) || [currentDate];
|
|
6949
|
+
var currentDate = resetTime(this.dateRender[parseInt(resource.toString(), 10)][parseInt(day.toString(), 10)]);
|
|
6950
|
+
var renderedDate = this.getRenderedDates(this.dateRender[parseInt(resource.toString(), 10)]) || [currentDate];
|
|
6914
6951
|
var currentDay = renderedDate.filter(function (date) { return date.getDay() === day; });
|
|
6915
6952
|
if (currentDay.length === 0) {
|
|
6916
6953
|
currentDate = resetTime(renderedDate[0]);
|
|
@@ -6932,12 +6969,22 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6932
6969
|
event[field.endTime] = eventDates.endDate;
|
|
6933
6970
|
return event;
|
|
6934
6971
|
};
|
|
6972
|
+
VerticalEvent.prototype.isWorkDayAvailable = function (resource, start) {
|
|
6973
|
+
if (this.parent.activeViewOptions.group.hideNonWorkingDays && this.resources.length > 0) {
|
|
6974
|
+
var workDays = this.resources[parseInt(resource.toString(), 10)].
|
|
6975
|
+
resourceData[this.resources[parseInt(resource.toString(), 10)].resource.workDaysField] ||
|
|
6976
|
+
this.parent.activeViewOptions.workDays;
|
|
6977
|
+
return workDays && workDays.indexOf(start.getDay()) >= 0;
|
|
6978
|
+
}
|
|
6979
|
+
return true;
|
|
6980
|
+
};
|
|
6935
6981
|
VerticalEvent.prototype.renderAllDayEvents = function (eventObj, dayIndex, resource, dayCount, inline) {
|
|
6936
6982
|
var _this = this;
|
|
6937
|
-
var currentDates = this.getRenderedDates(this.dateRender[resource]) ||
|
|
6983
|
+
var currentDates = this.getRenderedDates(this.dateRender[parseInt(resource.toString(), 10)]) ||
|
|
6984
|
+
this.dateRender[parseInt(resource.toString(), 10)];
|
|
6938
6985
|
if (this.parent.activeViewOptions.group.byDate) {
|
|
6939
|
-
this.slots[0] = [this.dateRender[resource][dayIndex].getTime()];
|
|
6940
|
-
currentDates = [this.dateRender[resource][dayIndex]];
|
|
6986
|
+
this.slots[0] = [this.dateRender[parseInt(resource.toString(), 10)][parseInt(dayIndex.toString(), 10)].getTime()];
|
|
6987
|
+
currentDates = [this.dateRender[parseInt(resource.toString(), 10)][parseInt(dayIndex.toString(), 10)]];
|
|
6941
6988
|
}
|
|
6942
6989
|
var record = this.splitEvent(eventObj, currentDates)[0];
|
|
6943
6990
|
var allDayRowCell = this.element.querySelector('.' + ALLDAY_CELLS_CLASS + ':first-child');
|
|
@@ -6948,16 +6995,17 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6948
6995
|
var topValue = 1;
|
|
6949
6996
|
var isDateRange = currentDates[0].getTime() <= eStart.getTime() &&
|
|
6950
6997
|
addDays(currentDates.slice(-1)[0], 1).getTime() >= eStart.getTime();
|
|
6951
|
-
if (eStart <= eEnd && isDateRange) {
|
|
6998
|
+
if (eStart <= eEnd && isDateRange && this.isWorkDayAvailable(resource, eStart)) {
|
|
6952
6999
|
var isAlreadyRendered = [];
|
|
6953
|
-
if (this.renderedAllDayEvents[resource]) {
|
|
6954
|
-
isAlreadyRendered = this.renderedAllDayEvents[resource].filter(function (event) {
|
|
7000
|
+
if (this.renderedAllDayEvents[parseInt(resource.toString(), 10)]) {
|
|
7001
|
+
isAlreadyRendered = this.renderedAllDayEvents[parseInt(resource.toString(), 10)].filter(function (event) {
|
|
6955
7002
|
return event.Guid === eventObj.Guid;
|
|
6956
7003
|
});
|
|
6957
7004
|
if (this.parent.activeViewOptions.group.byDate) {
|
|
6958
7005
|
isAlreadyRendered = isAlreadyRendered.filter(function (event) {
|
|
6959
|
-
return event[_this.parent.eventFields.startTime] >= currentDates[dayIndex] &&
|
|
6960
|
-
event[_this.parent.eventFields.endTime] <=
|
|
7006
|
+
return event[_this.parent.eventFields.startTime] >= currentDates[parseInt(dayIndex.toString(), 10)] &&
|
|
7007
|
+
event[_this.parent.eventFields.endTime] <=
|
|
7008
|
+
addDays(new Date(+currentDates[parseInt(dayIndex.toString(), 10)]), 1);
|
|
6961
7009
|
});
|
|
6962
7010
|
}
|
|
6963
7011
|
}
|
|
@@ -6971,14 +7019,12 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6971
7019
|
if (allDayDifference_1 >= 0) {
|
|
6972
7020
|
appWidth = (allDayDifference_1 * 100) - widthAdjustment;
|
|
6973
7021
|
}
|
|
6974
|
-
if (isNullOrUndefined(this.renderedAllDayEvents[resource])) {
|
|
6975
|
-
this.renderedAllDayEvents[resource] = [];
|
|
7022
|
+
if (isNullOrUndefined(this.renderedAllDayEvents[parseInt(resource.toString(), 10)])) {
|
|
7023
|
+
this.renderedAllDayEvents[parseInt(resource.toString(), 10)] = [];
|
|
6976
7024
|
}
|
|
6977
|
-
|
|
6978
|
-
this.renderedAllDayEvents[resource].push(extend({}, record, null, true));
|
|
7025
|
+
this.renderedAllDayEvents[parseInt(resource.toString(), 10)].push(extend({}, record, null, true));
|
|
6979
7026
|
var allDayRow_1 = [].slice.call(this.element.querySelector('.' + ALLDAY_ROW_CLASS).children);
|
|
6980
|
-
var wIndex_1 = this.
|
|
6981
|
-
(this.resources.length * renderedIndex) + resource : dayCount;
|
|
7027
|
+
var wIndex_1 = this.getDayIndex(dayIndex, resource, dayCount);
|
|
6982
7028
|
var eventWrapper_1 = this.element.querySelector('.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS +
|
|
6983
7029
|
':nth-child(' + (wIndex_1 + 1) + ')');
|
|
6984
7030
|
var appointmentElement_1;
|
|
@@ -7022,13 +7068,13 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7022
7068
|
var appWidth = '0%';
|
|
7023
7069
|
var appLeft = '0%';
|
|
7024
7070
|
var topValue = 0;
|
|
7025
|
-
var currentDate = resetTime(new Date(this.dateRender[resource][dayIndex].getTime()));
|
|
7071
|
+
var currentDate = resetTime(new Date(this.dateRender[parseInt(resource.toString(), 10)][parseInt(dayIndex.toString(), 10)].getTime()));
|
|
7026
7072
|
var schedule = getStartEndHours(currentDate, this.startHour, this.endHour);
|
|
7027
7073
|
var isValidEvent = this.isValidEvent(eventObj, eStart, eEnd, schedule);
|
|
7028
7074
|
if ((eStart.getTime() < this.parent.minDate.getTime()) || (eEnd.getTime() > this.parent.maxDate.getTime())) {
|
|
7029
7075
|
return;
|
|
7030
7076
|
}
|
|
7031
|
-
if (eStart <= eEnd && isValidEvent) {
|
|
7077
|
+
if (eStart <= eEnd && isValidEvent && this.isWorkDayAvailable(resource, eStart)) {
|
|
7032
7078
|
var appHeight_1 = this.getHeight(eStart, eEnd);
|
|
7033
7079
|
if (eStart.getTime() > schedule.startHour.getTime()) {
|
|
7034
7080
|
topValue = this.getTopValue(eStart, dayIndex, resource);
|
|
@@ -7037,27 +7083,26 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7037
7083
|
record.Index = appIndex;
|
|
7038
7084
|
this.overlapList.push(record);
|
|
7039
7085
|
if (this.overlapList.length > 1) {
|
|
7040
|
-
if (isNullOrUndefined(this.overlapEvents[appIndex])) {
|
|
7041
|
-
this.overlapEvents[appIndex] = [];
|
|
7086
|
+
if (isNullOrUndefined(this.overlapEvents[parseInt(appIndex.toString(), 10)])) {
|
|
7087
|
+
this.overlapEvents[parseInt(appIndex.toString(), 10)] = [];
|
|
7042
7088
|
}
|
|
7043
|
-
this.overlapEvents[appIndex].push(record);
|
|
7089
|
+
this.overlapEvents[parseInt(appIndex.toString(), 10)].push(record);
|
|
7044
7090
|
}
|
|
7045
7091
|
else {
|
|
7046
7092
|
this.overlapEvents = [];
|
|
7047
7093
|
this.overlapEvents.push([record]);
|
|
7048
7094
|
}
|
|
7049
7095
|
appWidth = this.getEventWidth();
|
|
7050
|
-
var renderedIndex = this.getDayIndex(dayIndex, resource);
|
|
7051
7096
|
var argsData = {
|
|
7052
7097
|
index: appIndex, left: appLeft, width: appWidth,
|
|
7053
|
-
day:
|
|
7098
|
+
day: dayCount, dayIndex: dayIndex, record: record, resource: resource
|
|
7054
7099
|
};
|
|
7055
7100
|
var tempData = this.adjustOverlapElements(argsData);
|
|
7056
7101
|
appWidth = (tempData.appWidth);
|
|
7057
|
-
if (isNullOrUndefined(this.renderedEvents[resource])) {
|
|
7058
|
-
this.renderedEvents[resource] = [];
|
|
7102
|
+
if (isNullOrUndefined(this.renderedEvents[parseInt(resource.toString(), 10)])) {
|
|
7103
|
+
this.renderedEvents[parseInt(resource.toString(), 10)] = [];
|
|
7059
7104
|
}
|
|
7060
|
-
this.renderedEvents[resource].push(extend({}, record, null, true));
|
|
7105
|
+
this.renderedEvents[parseInt(resource.toString(), 10)].push(extend({}, record, null, true));
|
|
7061
7106
|
var appointmentElement = void 0;
|
|
7062
7107
|
if (inline) {
|
|
7063
7108
|
appointmentElement = this.parent.inlineModule.createInlineAppointmentElement(eventObj);
|
|
@@ -7075,8 +7120,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7075
7120
|
if (!this.parent.isAdaptive && subjectElement) {
|
|
7076
7121
|
subjectElement.style.maxHeight = formatUnit(maxHeight);
|
|
7077
7122
|
}
|
|
7078
|
-
var index = this.
|
|
7079
|
-
(this.resources.length * renderedIndex) + resource : dayCount;
|
|
7123
|
+
var index = this.getDayIndex(dayIndex, resource, dayCount);
|
|
7080
7124
|
var eventData = {};
|
|
7081
7125
|
eventData[this.fields.startTime] = eventObj[this.fields.startTime];
|
|
7082
7126
|
eventData[this.fields.endTime] = eventObj[this.fields.endTime];
|
|
@@ -7101,7 +7145,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7101
7145
|
return (tempLeft > 99 ? 99 : tempLeft) + '%';
|
|
7102
7146
|
};
|
|
7103
7147
|
VerticalEvent.prototype.getTopValue = function (date, day, resource) {
|
|
7104
|
-
var startEndHours = getStartEndHours(resetTime(this.dateRender[resource][day]), this.startHour, this.endHour);
|
|
7148
|
+
var startEndHours = getStartEndHours(resetTime(this.dateRender[parseInt(resource.toString(), 10)][parseInt(day.toString(), 10)]), this.startHour, this.endHour);
|
|
7105
7149
|
var startHour = startEndHours.startHour;
|
|
7106
7150
|
var diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
|
|
7107
7151
|
return (this.parent.activeViewOptions.timeScale.enable) ? ((diffInMinutes * this.cellHeight * this.slotCount) / this.interval) : 0;
|
|
@@ -7113,20 +7157,20 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7113
7157
|
var appIndex = -1;
|
|
7114
7158
|
this.overlapEvents = [];
|
|
7115
7159
|
if (isAllDay) {
|
|
7116
|
-
if (!isNullOrUndefined(this.renderedAllDayEvents[resource])) {
|
|
7117
|
-
var date_1 = resetTime(new Date(this.dateRender[resource][day].getTime()));
|
|
7118
|
-
eventsList = this.renderedAllDayEvents[resource].filter(function (app) {
|
|
7160
|
+
if (!isNullOrUndefined(this.renderedAllDayEvents[parseInt(resource.toString(), 10)])) {
|
|
7161
|
+
var date_1 = resetTime(new Date(this.dateRender[parseInt(resource.toString(), 10)][parseInt(day.toString(), 10)].getTime()));
|
|
7162
|
+
eventsList = this.renderedAllDayEvents[parseInt(resource.toString(), 10)].filter(function (app) {
|
|
7119
7163
|
return resetTime(app[fieldMapping.startTime]).getTime() <= date_1.getTime() &&
|
|
7120
7164
|
resetTime(app[fieldMapping.endTime]).getTime() >= date_1.getTime();
|
|
7121
7165
|
});
|
|
7122
7166
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
7123
|
-
eventsList = this.filterEventsByResource(this.resources[resource], eventsList);
|
|
7167
|
+
eventsList = this.filterEventsByResource(this.resources[parseInt(resource.toString(), 10)], eventsList);
|
|
7124
7168
|
}
|
|
7125
7169
|
}
|
|
7126
7170
|
}
|
|
7127
7171
|
else {
|
|
7128
|
-
var appointmentList_1 = !isNullOrUndefined(this.renderedEvents[resource]) ?
|
|
7129
|
-
this.renderedEvents[resource] : [];
|
|
7172
|
+
var appointmentList_1 = !isNullOrUndefined(this.renderedEvents[parseInt(resource.toString(), 10)]) ?
|
|
7173
|
+
this.renderedEvents[parseInt(resource.toString(), 10)] : [];
|
|
7130
7174
|
var appointment_1 = [];
|
|
7131
7175
|
var recordStart_1 = record[fieldMapping.startTime];
|
|
7132
7176
|
var recordEnd_1 = record[fieldMapping.endTime];
|
|
@@ -7137,14 +7181,14 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7137
7181
|
data[fieldMapping.startTime].getTime() === recordStart_1.getTime() && data[fieldMapping.endTime] < recordEnd_1);
|
|
7138
7182
|
});
|
|
7139
7183
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
7140
|
-
this.overlapList = this.filterEventsByResource(this.resources[resource], this.overlapList);
|
|
7184
|
+
this.overlapList = this.filterEventsByResource(this.resources[parseInt(resource.toString(), 10)], this.overlapList);
|
|
7141
7185
|
}
|
|
7142
7186
|
this.overlapList.forEach(function (obj) {
|
|
7143
7187
|
var filterList = appointmentList_1.filter(function (data) {
|
|
7144
7188
|
return data[fieldMapping.endTime] > obj[fieldMapping.startTime] && data[fieldMapping.startTime] <= obj[fieldMapping.endTime];
|
|
7145
7189
|
});
|
|
7146
7190
|
if (_this.parent.activeViewOptions.group.resources.length > 0) {
|
|
7147
|
-
filterList = _this.filterEventsByResource(_this.resources[resource], filterList);
|
|
7191
|
+
filterList = _this.filterEventsByResource(_this.resources[parseInt(resource.toString(), 10)], filterList);
|
|
7148
7192
|
}
|
|
7149
7193
|
var collection = filterList.filter(function (val) {
|
|
7150
7194
|
return _this.overlapList.indexOf(val) === -1;
|
|
@@ -7155,7 +7199,8 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7155
7199
|
});
|
|
7156
7200
|
for (var i = 0; i < appointment_1.length - 1; i++) {
|
|
7157
7201
|
for (var j = i + 1; j < appointment_1.length; j++) {
|
|
7158
|
-
if (appointment_1[i
|
|
7202
|
+
if (appointment_1[parseInt(i.toString(), 10)][fieldMapping.id] ===
|
|
7203
|
+
appointment_1[parseInt(j.toString(), 10)][fieldMapping.id]) {
|
|
7159
7204
|
appointment_1.splice(j, 1);
|
|
7160
7205
|
j--;
|
|
7161
7206
|
}
|
|
@@ -7167,11 +7212,11 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7167
7212
|
var event_4 = eventsList_1[_i];
|
|
7168
7213
|
var record_1 = event_4;
|
|
7169
7214
|
var index = record_1.Index;
|
|
7170
|
-
if (isNullOrUndefined(this.overlapEvents[index])) {
|
|
7171
|
-
this.overlapEvents[index] = [event_4];
|
|
7215
|
+
if (isNullOrUndefined(this.overlapEvents[parseInt(index.toString(), 10)])) {
|
|
7216
|
+
this.overlapEvents[parseInt(index.toString(), 10)] = [event_4];
|
|
7172
7217
|
}
|
|
7173
7218
|
else {
|
|
7174
|
-
this.overlapEvents[index].push(event_4);
|
|
7219
|
+
this.overlapEvents[parseInt(index.toString(), 10)].push(event_4);
|
|
7175
7220
|
}
|
|
7176
7221
|
}
|
|
7177
7222
|
}
|
|
@@ -7195,13 +7240,12 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7195
7240
|
VerticalEvent.prototype.adjustOverlapElements = function (args) {
|
|
7196
7241
|
var data = { appWidth: args.width, appLeft: args.left };
|
|
7197
7242
|
for (var i = 0, length1 = this.overlapEvents.length; i < length1; i++) {
|
|
7198
|
-
if (!isNullOrUndefined(this.overlapEvents[i])) {
|
|
7199
|
-
for (var j = 0, length2 = this.overlapEvents[i].length; j < length2; j++) {
|
|
7200
|
-
var dayCount = this.
|
|
7201
|
-
(this.resources.length * args.day) + args.resource : args.dayIndex;
|
|
7243
|
+
if (!isNullOrUndefined(this.overlapEvents[parseInt(i.toString(), 10)])) {
|
|
7244
|
+
for (var j = 0, length2 = this.overlapEvents[parseInt(i.toString(), 10)].length; j < length2; j++) {
|
|
7245
|
+
var dayCount = this.getDayIndex(args.dayIndex, args.resource, args.day);
|
|
7202
7246
|
var element = this.element.querySelector('#e-appointment-wrapper-' + dayCount);
|
|
7203
7247
|
if (element && element.childElementCount > 0) {
|
|
7204
|
-
var eleGuid = this.overlapEvents[i][j].Guid;
|
|
7248
|
+
var eleGuid = this.overlapEvents[parseInt(i.toString(), 10)][parseInt(j.toString(), 10)].Guid;
|
|
7205
7249
|
if (element.querySelectorAll('div[data-guid="' + eleGuid + '"]').length > 0 && eleGuid !== args.record.Guid) {
|
|
7206
7250
|
var apps = element.querySelector('div[data-guid="' + eleGuid + '"]');
|
|
7207
7251
|
if (parseFloat(args.width) <= parseFloat(apps.style.width)) {
|
|
@@ -7379,7 +7423,8 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7379
7423
|
}
|
|
7380
7424
|
MonthEvent.prototype.removeEventWrapper = function (appElement) {
|
|
7381
7425
|
if (appElement.length > 0) {
|
|
7382
|
-
appElement = (this.parent.currentView === 'Month'
|
|
7426
|
+
appElement = (this.parent.currentView === 'Month' || (!this.parent.activeView.isTimelineView() &&
|
|
7427
|
+
!this.parent.activeViewOptions.timeScale.enable)) ? appElement : [appElement[0]];
|
|
7383
7428
|
for (var _i = 0, appElement_1 = appElement; _i < appElement_1.length; _i++) {
|
|
7384
7429
|
var wrap = appElement_1[_i];
|
|
7385
7430
|
if (wrap.parentElement && wrap.parentElement.parentNode) {
|
|
@@ -7402,12 +7447,13 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7402
7447
|
if (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) {
|
|
7403
7448
|
for (var i = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; i < len; i++) {
|
|
7404
7449
|
var appElement = [].slice.call(this.element.querySelectorAll('.e-appointment-wrapper ' + '[data-group-index="' +
|
|
7405
|
-
this.parent.crudModule.crudObj.sourceEvent[i].groupIndex + '"]'));
|
|
7450
|
+
this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex + '"]'));
|
|
7406
7451
|
this.removeEventWrapper(appElement);
|
|
7407
|
-
if (this.parent.crudModule.crudObj.targetEvent[i] &&
|
|
7408
|
-
this.parent.crudModule.crudObj.
|
|
7452
|
+
if (this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)] &&
|
|
7453
|
+
this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex !==
|
|
7454
|
+
this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex) {
|
|
7409
7455
|
var ele = [].slice.call(this.element.querySelectorAll('.e-appointment-wrapper ' + '[data-group-index="' +
|
|
7410
|
-
this.parent.crudModule.crudObj.targetEvent[i].groupIndex + '"]'));
|
|
7456
|
+
this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex + '"]'));
|
|
7411
7457
|
this.removeEventWrapper(ele);
|
|
7412
7458
|
}
|
|
7413
7459
|
}
|
|
@@ -7469,7 +7515,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7469
7515
|
var totalCells_1 = [].slice.call(this.parent.element.querySelectorAll('.e-content-wrap table tr td:first-child'));
|
|
7470
7516
|
var weekNumberCells = [].slice.call(this.parent.element.querySelectorAll('.' + WEEK_NUMBER_CLASS));
|
|
7471
7517
|
weekNumberCells.forEach(function (cell, i) {
|
|
7472
|
-
var height = totalCells_1[i].offsetHeight;
|
|
7518
|
+
var height = totalCells_1[parseInt(i.toString(), 10)].offsetHeight;
|
|
7473
7519
|
setStyleAttribute(cell, { 'height': height + 'px' });
|
|
7474
7520
|
});
|
|
7475
7521
|
this.parent.element.querySelector('.' + WEEK_NUMBER_WRAPPER_CLASS).scrollTop =
|
|
@@ -7523,7 +7569,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7523
7569
|
}
|
|
7524
7570
|
for (var level = 0; level < this.slots.length; level++) {
|
|
7525
7571
|
this.renderedEvents = [];
|
|
7526
|
-
var slot = this.slots[level];
|
|
7572
|
+
var slot = this.slots[parseInt(level.toString(), 10)];
|
|
7527
7573
|
var endDate = addDays(new Date(slot[slot.length - 1]), 1);
|
|
7528
7574
|
var spannedEvents = this.filterEvents(new Date(slot[0]), endDate, events);
|
|
7529
7575
|
for (var _a = 0, spannedEvents_1 = spannedEvents; _a < spannedEvents_1.length; _a++) {
|
|
@@ -7631,7 +7677,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7631
7677
|
return event[this.fields.endTime];
|
|
7632
7678
|
};
|
|
7633
7679
|
MonthEvent.prototype.getCellTd = function (day) {
|
|
7634
|
-
return this.workCells[day];
|
|
7680
|
+
return this.workCells[parseInt(day.toString(), 10)];
|
|
7635
7681
|
};
|
|
7636
7682
|
MonthEvent.prototype.getEventWidth = function (startDate, endDate, isAllDay, count) {
|
|
7637
7683
|
return count * this.cellWidth - 1;
|
|
@@ -7678,11 +7724,11 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7678
7724
|
this.parent.resourceBase.renderedResources;
|
|
7679
7725
|
if (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) {
|
|
7680
7726
|
for (var i = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; i < len; i++) {
|
|
7681
|
-
var sourceRes = this.parent.crudModule.crudObj.sourceEvent[i];
|
|
7727
|
+
var sourceRes = this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)];
|
|
7682
7728
|
this.renderEventsHandler(sourceRes.renderDates, sourceRes.workDays, sourceRes);
|
|
7683
|
-
if (this.parent.crudModule.crudObj.sourceEvent[i].groupIndex !==
|
|
7684
|
-
this.parent.crudModule.crudObj.targetEvent[i].groupIndex) {
|
|
7685
|
-
var target = this.parent.crudModule.crudObj.targetEvent[i];
|
|
7729
|
+
if (this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex !==
|
|
7730
|
+
this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex) {
|
|
7731
|
+
var target = this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)];
|
|
7686
7732
|
this.renderEventsHandler(target.renderDates, target.workDays, target);
|
|
7687
7733
|
}
|
|
7688
7734
|
}
|
|
@@ -7698,7 +7744,8 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7698
7744
|
MonthEvent.prototype.getSlotDates = function (workDays) {
|
|
7699
7745
|
this.slots = [];
|
|
7700
7746
|
var dates = this.dateRender.map(function (date) { return +date; });
|
|
7701
|
-
var noOfDays = this.parent.activeViewOptions.showWeekend
|
|
7747
|
+
var noOfDays = !this.parent.activeViewOptions.showWeekend || (this.parent.activeViewOptions.group.byDate &&
|
|
7748
|
+
this.parent.activeViewOptions.group.hideNonWorkingDays) ? workDays.length : WEEK_LENGTH;
|
|
7702
7749
|
while (dates.length > 0) {
|
|
7703
7750
|
this.slots.push(dates.splice(0, noOfDays));
|
|
7704
7751
|
}
|
|
@@ -7835,7 +7882,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7835
7882
|
var diffInDays = event.data.count;
|
|
7836
7883
|
if (startTime.getTime() <= endTime.getTime()) {
|
|
7837
7884
|
var appWidth = (diffInDays * this.cellWidth) - 5;
|
|
7838
|
-
var cellTd = this.workCells[day];
|
|
7885
|
+
var cellTd = this.workCells[parseInt(day.toString(), 10)];
|
|
7839
7886
|
var appTop = (overlapCount * (this.eventHeight + EVENT_GAP));
|
|
7840
7887
|
var height = this.monthHeaderHeight + ((overlapCount + 1) * (this.eventHeight + EVENT_GAP)) + this.moreIndicatorHeight;
|
|
7841
7888
|
var enableAppRender = this.maxOrIndicator ? overlapCount < 1 ? true : false : this.cellHeight > height;
|
|
@@ -8151,12 +8198,12 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
8151
8198
|
this.parent.resourceBase.renderedResources;
|
|
8152
8199
|
if (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) {
|
|
8153
8200
|
for (var i = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; i < len; i++) {
|
|
8154
|
-
var source = this.parent.crudModule.crudObj.sourceEvent[i];
|
|
8201
|
+
var source = this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)];
|
|
8155
8202
|
this.rowIndex = source.groupIndex;
|
|
8156
8203
|
this.renderEventsHandler(this.parent.activeView.renderDates, this.parent.activeViewOptions.workDays, source);
|
|
8157
|
-
if (this.parent.crudModule.crudObj.targetEvent[i] && this.parent.crudModule.crudObj.sourceEvent[i].groupIndex !==
|
|
8158
|
-
this.parent.crudModule.crudObj.targetEvent[i].groupIndex) {
|
|
8159
|
-
var target = this.parent.crudModule.crudObj.targetEvent[i];
|
|
8204
|
+
if (this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)] && this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex !==
|
|
8205
|
+
this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex) {
|
|
8206
|
+
var target = this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)];
|
|
8160
8207
|
this.rowIndex = target.groupIndex;
|
|
8161
8208
|
this.renderEventsHandler(this.parent.activeView.renderDates, this.parent.activeViewOptions.workDays, target);
|
|
8162
8209
|
}
|
|
@@ -8166,7 +8213,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
8166
8213
|
else {
|
|
8167
8214
|
for (var i = 0; i < resources.length; i++) {
|
|
8168
8215
|
this.rowIndex = i;
|
|
8169
|
-
this.renderEventsHandler(this.parent.activeView.renderDates, this.parent.activeViewOptions.workDays, resources[i]);
|
|
8216
|
+
this.renderEventsHandler(this.parent.activeView.renderDates, this.parent.activeViewOptions.workDays, resources[parseInt(i.toString(), 10)]);
|
|
8170
8217
|
}
|
|
8171
8218
|
}
|
|
8172
8219
|
};
|
|
@@ -8212,10 +8259,10 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
8212
8259
|
var position = this.getPosition(startTime, endTime, event[this.fields.isAllDay], this.day);
|
|
8213
8260
|
appWidth_1 = (appWidth_1 <= 0) ? this.cellWidth : appWidth_1; // appWidth 0 when start and end time as same
|
|
8214
8261
|
this.renderedEvents.push(extend({}, event, null, true));
|
|
8215
|
-
if (isNullOrUndefined(this.cellTops[resIndex])) {
|
|
8216
|
-
this.cellTops[resIndex] = this.getRowTop(resIndex);
|
|
8262
|
+
if (isNullOrUndefined(this.cellTops[parseInt(resIndex.toString(), 10)])) {
|
|
8263
|
+
this.cellTops[parseInt(resIndex.toString(), 10)] = this.getRowTop(resIndex);
|
|
8217
8264
|
}
|
|
8218
|
-
var top_1 = this.cellTops[resIndex];
|
|
8265
|
+
var top_1 = this.cellTops[parseInt(resIndex.toString(), 10)];
|
|
8219
8266
|
var appTop = (top_1 + (this.maxHeight ? 0 : EVENT_GAP$1)) + (overlapCount * (appHeight + EVENT_GAP$1));
|
|
8220
8267
|
appLeft = (this.parent.enableRtl) ? 0 : position;
|
|
8221
8268
|
appRight = (this.parent.enableRtl) ? position : 0;
|
|
@@ -8481,7 +8528,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
8481
8528
|
if (this.renderType === 'day' || isAllDay) {
|
|
8482
8529
|
return (day * this.slotsPerDay) * this.cellWidth;
|
|
8483
8530
|
}
|
|
8484
|
-
var currentDate = resetTime(new Date(this.dateRender[day].getTime()));
|
|
8531
|
+
var currentDate = resetTime(new Date(this.dateRender[parseInt(day.toString(), 10)].getTime()));
|
|
8485
8532
|
var schedule = getStartEndHours(currentDate, this.startHour, this.endHour);
|
|
8486
8533
|
var cellIndex;
|
|
8487
8534
|
if (schedule.endHour.getTime() <= endTime.getTime() && schedule.startHour.getTime() >= startTime.getTime()) {
|
|
@@ -8511,7 +8558,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
8511
8558
|
for (var i = 0; i < moreIndicator.length; i++) {
|
|
8512
8559
|
var indicatorPos = void 0;
|
|
8513
8560
|
if (moreIndicator) {
|
|
8514
|
-
indicatorPos = (this.parent.enableRtl) ? moreIndicator[i].style.right : moreIndicator[i].style.left;
|
|
8561
|
+
indicatorPos = (this.parent.enableRtl) ? moreIndicator[parseInt(i.toString(), 10)].style.right : moreIndicator[parseInt(i.toString(), 10)].style.left;
|
|
8515
8562
|
}
|
|
8516
8563
|
if (parseInt(indicatorPos, 10) === Math.floor(appPos)) {
|
|
8517
8564
|
return true;
|
|
@@ -8528,7 +8575,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
8528
8575
|
};
|
|
8529
8576
|
TimelineEvent.prototype.getCellTd = function () {
|
|
8530
8577
|
var wrapIndex = this.parent.uiStateValues.isGroupAdaptive ? 0 : this.rowIndex;
|
|
8531
|
-
return this.eventContainers[wrapIndex];
|
|
8578
|
+
return this.eventContainers[parseInt(wrapIndex.toString(), 10)];
|
|
8532
8579
|
};
|
|
8533
8580
|
TimelineEvent.prototype.renderBlockIndicator = function (cellTd, position, resIndex) {
|
|
8534
8581
|
// No need to render block icon for Year, Month and Week header rows
|
|
@@ -8619,11 +8666,12 @@ var InlineEdit = /** @__PURE__ @class */ (function () {
|
|
|
8619
8666
|
var start = resetTime(new Date('' + saveObj[this.parent.eventFields.startTime])).getTime();
|
|
8620
8667
|
var end = resetTime(new Date('' + saveObj[this.parent.eventFields.endTime])).getTime();
|
|
8621
8668
|
var resIndex = args.groupIndex || 0;
|
|
8622
|
-
|
|
8669
|
+
var isVertical = this.parent.currentView === 'Day' || this.parent.currentView === 'Week' || this.parent.currentView === 'WorkWeek';
|
|
8670
|
+
if (this.parent.activeViewOptions.timeScale.enable && isVertical) {
|
|
8623
8671
|
var dayIndex = saveObj[this.parent.eventFields.startTime].getDay();
|
|
8624
8672
|
this.createVerticalViewInline(saveObj, dayIndex, resIndex, cellIndex);
|
|
8625
8673
|
}
|
|
8626
|
-
else if (this.parent.currentView === 'Month') {
|
|
8674
|
+
else if (this.parent.currentView === 'Month' || (!this.parent.activeViewOptions.timeScale.enable && isVertical)) {
|
|
8627
8675
|
this.createMonthViewInline(saveObj, resIndex, start, end);
|
|
8628
8676
|
}
|
|
8629
8677
|
else {
|
|
@@ -8673,7 +8721,7 @@ var InlineEdit = /** @__PURE__ @class */ (function () {
|
|
|
8673
8721
|
var count = this.getEventDaysCount(saveObj);
|
|
8674
8722
|
var verticalEvent = new VerticalEvent(this.parent);
|
|
8675
8723
|
verticalEvent.initializeValues();
|
|
8676
|
-
var index = verticalEvent.dateRender[resIndex].map(function (date) { return date.getDay(); }).indexOf(dayIndex);
|
|
8724
|
+
var index = verticalEvent.dateRender[parseInt(resIndex.toString(), 10)].map(function (date) { return date.getDay(); }).indexOf(dayIndex);
|
|
8677
8725
|
if (count >= 1) {
|
|
8678
8726
|
verticalEvent.allDayElement = [].slice.call(this.parent.element.querySelectorAll('.' + ALLDAY_CELLS_CLASS));
|
|
8679
8727
|
(_a = verticalEvent.slots).push.apply(_a, this.parent.activeView.renderDates.map(function (date) { return +date; }));
|
|
@@ -8701,14 +8749,16 @@ var InlineEdit = /** @__PURE__ @class */ (function () {
|
|
|
8701
8749
|
var monthCellSelector = '.' + WORK_CELLS_CLASS;
|
|
8702
8750
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
8703
8751
|
monthCellSelector += '[data-group-index="' + index + '"]';
|
|
8704
|
-
var resourceData = this.parent.resourceBase.lastResourceLevel[index];
|
|
8752
|
+
var resourceData = this.parent.resourceBase.lastResourceLevel[parseInt(index.toString(), 10)];
|
|
8705
8753
|
renderDates = resourceData.renderDates;
|
|
8706
8754
|
workDays = resourceData.workDays;
|
|
8707
8755
|
}
|
|
8756
|
+
monthEvent.dateRender = renderDates;
|
|
8708
8757
|
monthEvent.workCells = [].slice.call(this.parent.element.querySelectorAll(monthCellSelector));
|
|
8709
8758
|
monthEvent.cellWidth = monthEvent.workCells[0].offsetWidth;
|
|
8710
8759
|
monthEvent.cellHeight = monthEvent.workCells[0].offsetHeight;
|
|
8711
|
-
monthEvent.eventHeight =
|
|
8760
|
+
monthEvent.eventHeight =
|
|
8761
|
+
getElementHeightFromClass(this.parent.monthModule.element || monthEvent.element, APPOINTMENT_CLASS);
|
|
8712
8762
|
monthEvent.getSlotDates(workDays);
|
|
8713
8763
|
var filteredDates = monthEvent.getRenderedDates(renderDates);
|
|
8714
8764
|
var spannedEvents = monthEvent.splitEvent(saveObject, filteredDates || renderDates);
|
|
@@ -9636,9 +9686,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9636
9686
|
var resourceData = void 0;
|
|
9637
9687
|
var lastResource_1;
|
|
9638
9688
|
for (var i = this.parent.resourceBase.resourceCollection.length - 1; i >= 0; i--) {
|
|
9639
|
-
resourceData = eventData[this.parent.resourceBase.resourceCollection[i].field];
|
|
9689
|
+
resourceData = eventData[this.parent.resourceBase.resourceCollection[parseInt(i.toString(), 10)].field];
|
|
9640
9690
|
if (!isNullOrUndefined(resourceData)) {
|
|
9641
|
-
lastResource_1 = this.parent.resourceBase.resourceCollection[i];
|
|
9691
|
+
lastResource_1 = this.parent.resourceBase.resourceCollection[parseInt(i.toString(), 10)];
|
|
9642
9692
|
break;
|
|
9643
9693
|
}
|
|
9644
9694
|
}
|
|
@@ -9651,7 +9701,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9651
9701
|
var text;
|
|
9652
9702
|
var i = findIndexInData(lastResourceData_1, lastResource_1.idField, value);
|
|
9653
9703
|
if (i > -1) {
|
|
9654
|
-
text = lastResourceData_1[i][lastResource_1.textField];
|
|
9704
|
+
text = lastResourceData_1[parseInt(i.toString(), 10)][lastResource_1.textField];
|
|
9655
9705
|
}
|
|
9656
9706
|
if (text) {
|
|
9657
9707
|
resNames_1.push(text);
|
|
@@ -9662,7 +9712,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9662
9712
|
else {
|
|
9663
9713
|
var argsData = args;
|
|
9664
9714
|
var groupIndex = !isNullOrUndefined(argsData.groupIndex) ? argsData.groupIndex : 0;
|
|
9665
|
-
var resourceDetails = this.parent.resourceBase.lastResourceLevel[groupIndex];
|
|
9715
|
+
var resourceDetails = this.parent.resourceBase.lastResourceLevel[parseInt(groupIndex.toString(), 10)];
|
|
9666
9716
|
resourceValue = resourceDetails.resourceData[resourceDetails.resource.textField];
|
|
9667
9717
|
}
|
|
9668
9718
|
}
|
|
@@ -9739,9 +9789,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
9739
9789
|
var workCells = [].slice.call(this.parent.element.querySelectorAll('.' + CONTENT_WRAP_CLASS +
|
|
9740
9790
|
' tbody tr td[data-group-index="' + gIndex + '"]'));
|
|
9741
9791
|
for (var i = 0; i < workCells.length; i++) {
|
|
9742
|
-
var date = workCells[i].getAttribute('data-date');
|
|
9792
|
+
var date = workCells[parseInt(i.toString(), 10)].getAttribute('data-date');
|
|
9743
9793
|
if (date < tdDate) {
|
|
9744
|
-
this.morePopup.relateTo = workCells[i];
|
|
9794
|
+
this.morePopup.relateTo = workCells[parseInt(i.toString(), 10)];
|
|
9745
9795
|
}
|
|
9746
9796
|
}
|
|
9747
9797
|
}
|
|
@@ -10308,12 +10358,13 @@ var EventTooltip = /** @__PURE__ @class */ (function () {
|
|
|
10308
10358
|
var resCollection = void 0;
|
|
10309
10359
|
if (this.parent.activeView.isTimelineView()) {
|
|
10310
10360
|
var index = parseInt(args.target.getAttribute('data-group-index'), 10);
|
|
10311
|
-
resCollection = this.parent.resourceBase.lastResourceLevel[index];
|
|
10361
|
+
resCollection = this.parent.resourceBase.lastResourceLevel[parseInt(index.toString(), 10)];
|
|
10312
10362
|
}
|
|
10313
10363
|
else {
|
|
10314
10364
|
var rowIndex = args.target.parentNode.sectionRowIndex;
|
|
10315
10365
|
var cellIndex = args.target.cellIndex;
|
|
10316
|
-
resCollection =
|
|
10366
|
+
resCollection =
|
|
10367
|
+
this.parent.activeView.getColumnLevels()[parseInt(rowIndex.toString(), 10)][parseInt(cellIndex.toString(), 10)];
|
|
10317
10368
|
}
|
|
10318
10369
|
var data = {
|
|
10319
10370
|
resource: resCollection.resource,
|
|
@@ -11075,7 +11126,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11075
11126
|
var self = this;
|
|
11076
11127
|
var dataSource = [];
|
|
11077
11128
|
monthpos.forEach(function (data) {
|
|
11078
|
-
dataSource.push({ text: self.localeObj.getConstant(data), value: monthposValue[data] });
|
|
11129
|
+
dataSource.push({ text: self.localeObj.getConstant(data), value: monthposValue["" + data] });
|
|
11079
11130
|
});
|
|
11080
11131
|
return dataSource;
|
|
11081
11132
|
};
|
|
@@ -11095,7 +11146,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11095
11146
|
for (var _i = 0, weekday_1 = weekday; _i < weekday_1.length; _i++) {
|
|
11096
11147
|
var obj = weekday_1[_i];
|
|
11097
11148
|
var day = getValue(obj, cldrObj);
|
|
11098
|
-
dayData.push({ text: format === 'narrow' ? day : capitalizeFirstWord(day, 'single'), value: valueData[obj] });
|
|
11149
|
+
dayData.push({ text: format === 'narrow' ? day : capitalizeFirstWord(day, 'single'), value: valueData["" + obj] });
|
|
11099
11150
|
}
|
|
11100
11151
|
return dayData;
|
|
11101
11152
|
};
|
|
@@ -11185,7 +11236,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11185
11236
|
var weekday = [RULESUNDAY, RULEMONDAY, RULETUESDAY, RULEWEDNESDAY, RULETHURSDAY, RULEFRIDAY, RULESATURDAY];
|
|
11186
11237
|
this.rotateArray(weekday, this.firstDayOfWeek);
|
|
11187
11238
|
for (var index = 0; index < elements.length; index++) {
|
|
11188
|
-
ruleData += weekday[parseInt(elements[index].getAttribute('data-index'), 10)] + (index === (elements.length - 1) ? '' : COMMA);
|
|
11239
|
+
ruleData += weekday[parseInt(elements[parseInt(index.toString(), 10)].getAttribute('data-index'), 10)] + (index === (elements.length - 1) ? '' : COMMA);
|
|
11189
11240
|
}
|
|
11190
11241
|
return ruleData + SEMICOLON;
|
|
11191
11242
|
};
|
|
@@ -11215,7 +11266,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11215
11266
|
for (var _i = 0, _a = this.dayButtons; _i < _a.length; _i++) {
|
|
11216
11267
|
var obj = _a[_i];
|
|
11217
11268
|
var index = parseInt(obj.element.getAttribute('data-index'), 10);
|
|
11218
|
-
if (keys.indexOf(weekday[index]) !== -1) {
|
|
11269
|
+
if (keys.indexOf(weekday[parseInt(index.toString(), 10)]) !== -1) {
|
|
11219
11270
|
obj.setProperties({ isPrimary: true });
|
|
11220
11271
|
}
|
|
11221
11272
|
else {
|
|
@@ -11233,7 +11284,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11233
11284
|
this.monthWeekPos.setProperties({ value: this.ruleObject.setPosition });
|
|
11234
11285
|
for (var _i = 0, _a = Object.keys(valueData); _i < _a.length; _i++) {
|
|
11235
11286
|
var key = _a[_i];
|
|
11236
|
-
if (valueData[key] === this.ruleObject.day[0]) {
|
|
11287
|
+
if (valueData["" + key] === this.ruleObject.day[0]) {
|
|
11237
11288
|
this.monthWeekDays.setProperties({ value: this.ruleObject.day[0] });
|
|
11238
11289
|
break;
|
|
11239
11290
|
}
|
|
@@ -12041,14 +12092,14 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12041
12092
|
var resourceCollection = this.parent.resourceBase.resourceCollection;
|
|
12042
12093
|
var fieldName = args.element.getAttribute('name') || this.getColumnName(args.element);
|
|
12043
12094
|
for (var i = 0; i < resourceCollection.length; i++) {
|
|
12044
|
-
if (resourceCollection[i].field === fieldName && i < resourceCollection.length - 1) {
|
|
12095
|
+
if (resourceCollection[parseInt(i.toString(), 10)].field === fieldName && i < resourceCollection.length - 1) {
|
|
12045
12096
|
var resObject = this.createInstance(i);
|
|
12046
12097
|
var datasource = [];
|
|
12047
12098
|
var _loop_1 = function (j) {
|
|
12048
12099
|
var resourceModel = resourceCollection[i + 1];
|
|
12049
12100
|
// eslint-disable-next-line max-len
|
|
12050
12101
|
var filter = resourceModel.dataSource.filter(function (data) {
|
|
12051
|
-
return data[resourceModel.groupIDField] === args.value[j];
|
|
12102
|
+
return data[resourceModel.groupIDField] === args.value[parseInt(j.toString(), 10)];
|
|
12052
12103
|
})[0];
|
|
12053
12104
|
var groupId = (!isNullOrUndefined(filter)) ?
|
|
12054
12105
|
filter[resourceCollection[i + 1].groupIDField] : null;
|
|
@@ -12078,9 +12129,9 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12078
12129
|
var fieldName = args.element.getAttribute('name') || this.getColumnName(args.element);
|
|
12079
12130
|
var resourceCollection = this.parent.resourceBase.resourceCollection;
|
|
12080
12131
|
for (var i = 0; i < resourceCollection.length; i++) {
|
|
12081
|
-
if ((i < resourceCollection.length - 1) && resourceCollection[i].field === fieldName) {
|
|
12132
|
+
if ((i < resourceCollection.length - 1) && resourceCollection[parseInt(i.toString(), 10)].field === fieldName) {
|
|
12082
12133
|
var resObj = this.createInstance(i);
|
|
12083
|
-
var groupId = args.itemData[resourceCollection[i].idField];
|
|
12134
|
+
var groupId = args.itemData[resourceCollection[parseInt(i.toString(), 10)].idField];
|
|
12084
12135
|
resObj.dataSource = this.filterDatasource(i, groupId);
|
|
12085
12136
|
resObj.dataBind();
|
|
12086
12137
|
var resValue = (resObj.dataSource.length > 0) ?
|
|
@@ -12405,7 +12456,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12405
12456
|
var columnName = curElement.name || this.getColumnName(curElement);
|
|
12406
12457
|
if (!isNullOrUndefined(columnName) && columnName !== '') {
|
|
12407
12458
|
if (keyNames.indexOf(columnName) !== -1) {
|
|
12408
|
-
this.setValueToElement(curElement, eventObj[columnName]);
|
|
12459
|
+
this.setValueToElement(curElement, eventObj["" + columnName]);
|
|
12409
12460
|
}
|
|
12410
12461
|
else {
|
|
12411
12462
|
this.setDefaultValueToElement(curElement);
|
|
@@ -12852,7 +12903,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12852
12903
|
var currentElement = formElement_2[_i];
|
|
12853
12904
|
var columnName = currentElement.name || this.getColumnName(currentElement);
|
|
12854
12905
|
if (!isNullOrUndefined(columnName) && columnName !== '') {
|
|
12855
|
-
eventObj[columnName] = this.getValueFromElement(currentElement);
|
|
12906
|
+
eventObj["" + columnName] = this.getValueFromElement(currentElement);
|
|
12856
12907
|
}
|
|
12857
12908
|
}
|
|
12858
12909
|
return eventObj;
|
|
@@ -12914,11 +12965,13 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12914
12965
|
case 'WEEKLY':
|
|
12915
12966
|
types = recEditor.value.split(';')[1].split('=')[1].split(',');
|
|
12916
12967
|
for (var index = 0; index < types.length * (interval + 1); index++) {
|
|
12917
|
-
temp[index
|
|
12968
|
+
temp[parseInt(index.toString(), 10)] =
|
|
12969
|
+
(types.length > index) ? obj[types[parseInt(index.toString(), 10)]] :
|
|
12970
|
+
temp[index - types.length] + (7 * interval);
|
|
12918
12971
|
}
|
|
12919
12972
|
tempValue = temp.sort(function (a, b) { return a - b; });
|
|
12920
12973
|
for (var index = 1; index < tempValue.length; index++) {
|
|
12921
|
-
tempDiff.push(tempValue[index] - tempValue[index - 1]);
|
|
12974
|
+
tempDiff.push(tempValue[parseInt(index.toString(), 10)] - tempValue[index - 1]);
|
|
12922
12975
|
}
|
|
12923
12976
|
if ((((endDate.getTime() - startDate.getTime()) / (1000 * 3600)) >= Math.min.apply(Math, tempDiff) * 24)
|
|
12924
12977
|
|| isNullOrUndefined(interval)) {
|
|
@@ -12954,7 +13007,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
12954
13007
|
EventWindow.prototype.getRecurrenceIndex = function (recColl, event) {
|
|
12955
13008
|
var recIndex;
|
|
12956
13009
|
for (var index = 0; index < recColl.length; index++) {
|
|
12957
|
-
if (event[this.fields.startTime].valueOf() === recColl[index][this.fields.startTime].valueOf()) {
|
|
13010
|
+
if (event[this.fields.startTime].valueOf() === recColl[parseInt(index.toString(), 10)][this.fields.startTime].valueOf()) {
|
|
12958
13011
|
recIndex = index;
|
|
12959
13012
|
break;
|
|
12960
13013
|
}
|
|
@@ -13057,8 +13110,8 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
13057
13110
|
if (temp.length > 0) {
|
|
13058
13111
|
temp[0][_this.fields.id] = eventObj[_this.fields.id];
|
|
13059
13112
|
for (var k = 1; k < temp.length; k++) {
|
|
13060
|
-
temp[k][_this.fields.id] = _this.parent.eventBase.getEventMaxID(i);
|
|
13061
|
-
eventList.push(temp[k]);
|
|
13113
|
+
temp[parseInt(k.toString(), 10)][_this.fields.id] = _this.parent.eventBase.getEventMaxID(i);
|
|
13114
|
+
eventList.push(temp[parseInt(k.toString(), 10)]);
|
|
13062
13115
|
_this.parent.saveEvent(temp[0], currentAction);
|
|
13063
13116
|
}
|
|
13064
13117
|
}
|
|
@@ -13070,8 +13123,8 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
13070
13123
|
else {
|
|
13071
13124
|
if (temp.length > 0) {
|
|
13072
13125
|
for (var j = 0; j < temp.length; j++) {
|
|
13073
|
-
temp[j][_this.fields.id] = _this.parent.eventBase.getEventMaxID(j);
|
|
13074
|
-
eventList.push(temp[j]);
|
|
13126
|
+
temp[parseInt(j.toString(), 10)][_this.fields.id] = _this.parent.eventBase.getEventMaxID(j);
|
|
13127
|
+
eventList.push(temp[parseInt(j.toString(), 10)]);
|
|
13075
13128
|
}
|
|
13076
13129
|
}
|
|
13077
13130
|
else {
|
|
@@ -13085,50 +13138,54 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
13085
13138
|
var resCol = this_2.parent.resourceCollection;
|
|
13086
13139
|
var index = void 0;
|
|
13087
13140
|
if (resCol.length > 1) {
|
|
13088
|
-
index =
|
|
13141
|
+
index =
|
|
13142
|
+
findIndexInData(lastResource, lastResourceData.idField, resourceData[parseInt(i.toString(), 10)], events, resCol);
|
|
13089
13143
|
}
|
|
13090
13144
|
else {
|
|
13091
|
-
index =
|
|
13145
|
+
index =
|
|
13146
|
+
findIndexInData(lastResource, lastResourceData.idField, resourceData[parseInt(i.toString(), 10)]);
|
|
13092
13147
|
}
|
|
13093
13148
|
if (index < 0) {
|
|
13094
13149
|
return { value: void 0 };
|
|
13095
13150
|
}
|
|
13096
|
-
var groupId_1 = lastResource[index][lastResourceData.groupIDField];
|
|
13097
|
-
var filter = lastLevel.filter(function (obj) { return obj.resourceData[lastResourceData.idField] ===
|
|
13151
|
+
var groupId_1 = lastResource[parseInt(index.toString(), 10)][lastResourceData.groupIDField];
|
|
13152
|
+
var filter = lastLevel.filter(function (obj) { return obj.resourceData[lastResourceData.idField] ===
|
|
13153
|
+
resourceData[parseInt(i.toString(), 10)]; }).
|
|
13098
13154
|
filter(function (obj) { return obj.resourceData[lastResourceData.groupIDField] === groupId_1; })[0];
|
|
13099
13155
|
var groupOrder = filter.groupOrder;
|
|
13100
13156
|
for (var index_1 = 0; index_1 < this_2.parent.resourceBase.resourceCollection.length; index_1++) {
|
|
13101
|
-
var field = this_2.parent.resourceBase.resourceCollection[index_1].field;
|
|
13102
|
-
events[field] = (groupOrder[index_1] instanceof Array) ? groupOrder[index_1][0] :
|
|
13157
|
+
var field = this_2.parent.resourceBase.resourceCollection[parseInt(index_1.toString(), 10)].field;
|
|
13158
|
+
events["" + field] = (groupOrder[parseInt(index_1.toString(), 10)] instanceof Array) ? groupOrder[parseInt(index_1.toString(), 10)][0] :
|
|
13159
|
+
groupOrder[parseInt(index_1.toString(), 10)];
|
|
13103
13160
|
}
|
|
13104
13161
|
addValues();
|
|
13105
13162
|
}
|
|
13106
13163
|
else {
|
|
13107
13164
|
for (var index = 0; index < this_2.parent.resourceBase.resourceCollection.length - 1; index++) {
|
|
13108
|
-
var field = this_2.parent.resourceBase.resourceCollection[index].field;
|
|
13109
|
-
if (events[field] instanceof Array && events[field].length > 1) {
|
|
13110
|
-
for (var k = 0; k < events[field].length; k++) {
|
|
13165
|
+
var field = this_2.parent.resourceBase.resourceCollection[parseInt(index.toString(), 10)].field;
|
|
13166
|
+
if (events["" + field] instanceof Array && events["" + field].length > 1) {
|
|
13167
|
+
for (var k = 0; k < events["" + field].length; k++) {
|
|
13111
13168
|
var event_3 = extend({}, events, null, true);
|
|
13112
|
-
event_3[field] = eventObj[field][k];
|
|
13113
|
-
event_3[lastResourceData.field] = resourceData[i];
|
|
13169
|
+
event_3["" + field] = eventObj["" + field][parseInt(k.toString(), 10)];
|
|
13170
|
+
event_3[lastResourceData.field] = resourceData[parseInt(i.toString(), 10)];
|
|
13114
13171
|
temp.push(event_3);
|
|
13115
13172
|
}
|
|
13116
13173
|
}
|
|
13117
13174
|
else {
|
|
13118
13175
|
if (temp.length === 0) {
|
|
13119
|
-
events[field] = (eventObj[field] instanceof Array) ?
|
|
13120
|
-
eventObj[field][0] : eventObj[field];
|
|
13121
|
-
events[lastResourceData.field] = resourceData[i];
|
|
13176
|
+
events["" + field] = (eventObj["" + field] instanceof Array) ?
|
|
13177
|
+
eventObj["" + field][0] : eventObj["" + field];
|
|
13178
|
+
events[lastResourceData.field] = resourceData[parseInt(i.toString(), 10)];
|
|
13122
13179
|
}
|
|
13123
13180
|
else {
|
|
13124
13181
|
for (var l = 0; l < temp.length; l++) {
|
|
13125
|
-
temp[l][field] = (eventObj[field] instanceof Array) ?
|
|
13126
|
-
eventObj[field][0] : eventObj[field];
|
|
13182
|
+
temp[parseInt(l.toString(), 10)]["" + field] = (eventObj["" + field] instanceof Array) ?
|
|
13183
|
+
eventObj["" + field][0] : eventObj["" + field];
|
|
13127
13184
|
}
|
|
13128
13185
|
}
|
|
13129
13186
|
}
|
|
13130
13187
|
}
|
|
13131
|
-
events[lastResourceData.field] = resourceData[i];
|
|
13188
|
+
events[lastResourceData.field] = resourceData[parseInt(i.toString(), 10)];
|
|
13132
13189
|
addValues();
|
|
13133
13190
|
}
|
|
13134
13191
|
};
|
|
@@ -13619,21 +13676,24 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
13619
13676
|
var resCollection = [];
|
|
13620
13677
|
var index = { startIndex: 0, endIndex: 0 };
|
|
13621
13678
|
if (this.parent.activeViewOptions.group.byDate) {
|
|
13622
|
-
if (lastLevel[startIndex
|
|
13623
|
-
|
|
13679
|
+
if (lastLevel[parseInt(startIndex.toString(), 10)].date.getTime() ===
|
|
13680
|
+
this.parent.resourceBase.expandedResources[0].date.getTime() &&
|
|
13681
|
+
lastLevel[parseInt(endIndex.toString(), 10)].date.getTime() ===
|
|
13624
13682
|
this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length - 1].date.getTime()) {
|
|
13625
13683
|
return this.parent.resourceBase.expandedResources;
|
|
13626
13684
|
}
|
|
13627
|
-
resCollection =
|
|
13685
|
+
resCollection =
|
|
13686
|
+
this.getByDateCollection(lastLevel[parseInt(startIndex.toString(), 10)], lastLevel[parseInt(endIndex.toString(), 10)], index);
|
|
13628
13687
|
this.setRenderedDates(resCollection);
|
|
13629
13688
|
}
|
|
13630
13689
|
else {
|
|
13631
|
-
if (lastLevel[startIndex].groupIndex === this.parent.resourceBase.expandedResources[0].groupIndex &&
|
|
13632
|
-
lastLevel[endIndex].groupIndex ===
|
|
13690
|
+
if (lastLevel[parseInt(startIndex.toString(), 10)].groupIndex === this.parent.resourceBase.expandedResources[0].groupIndex &&
|
|
13691
|
+
lastLevel[parseInt(endIndex.toString(), 10)].groupIndex ===
|
|
13633
13692
|
this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length - 1].groupIndex) {
|
|
13634
13693
|
return this.parent.resourceBase.expandedResources;
|
|
13635
13694
|
}
|
|
13636
|
-
resCollection =
|
|
13695
|
+
resCollection =
|
|
13696
|
+
this.getByIdCollection(lastLevel[parseInt(startIndex.toString(), 10)], lastLevel[parseInt(endIndex.toString(), 10)], index);
|
|
13637
13697
|
}
|
|
13638
13698
|
if (this.parent.currentView !== 'Month') {
|
|
13639
13699
|
this.startIndex = index.startIndex;
|
|
@@ -13713,7 +13773,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
13713
13773
|
else {
|
|
13714
13774
|
var col = [].slice.call(conWrap.querySelector('colgroup').children);
|
|
13715
13775
|
for (var i = 0; i < col.length; i++) {
|
|
13716
|
-
remove(col[i]);
|
|
13776
|
+
remove(col[parseInt(i.toString(), 10)]);
|
|
13717
13777
|
}
|
|
13718
13778
|
this.parent.activeView.colLevels[this.parent.activeView.colLevels.length - 1] = resCollection;
|
|
13719
13779
|
var contentRows = this.parent.activeView.getContentRows();
|
|
@@ -13805,8 +13865,8 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
13805
13865
|
if (this.parent.activeView) {
|
|
13806
13866
|
var templates = [
|
|
13807
13867
|
'cellTemplate', 'eventTemplate', 'tooltipTemplate', 'majorSlotTemplate', 'minorSlotTemplate',
|
|
13808
|
-
'headerTooltipTemplate', 'dateHeaderTemplate', 'dayHeaderTemplate', '
|
|
13809
|
-
'headerIndentTemplate', 'resourceHeaderTemplate', 'cellHeaderTemplate'
|
|
13868
|
+
'headerTooltipTemplate', 'dateHeaderTemplate', 'dayHeaderTemplate', 'monthHeaderTemplate',
|
|
13869
|
+
'headerIndentTemplate', 'resourceHeaderTemplate', 'cellHeaderTemplate', 'dateRangeTemplate'
|
|
13810
13870
|
];
|
|
13811
13871
|
this.parent.resetTemplates(templates);
|
|
13812
13872
|
this.parent.activeView.removeEventListener();
|
|
@@ -13910,7 +13970,7 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
13910
13970
|
else if (this.parent.element.classList.contains(READ_ONLY)) {
|
|
13911
13971
|
removeClass([this.parent.element], READ_ONLY);
|
|
13912
13972
|
}
|
|
13913
|
-
this.parent.headerModule.updateDateRange(
|
|
13973
|
+
this.parent.headerModule.updateDateRange();
|
|
13914
13974
|
this.parent.headerModule.updateHeaderItems('remove');
|
|
13915
13975
|
}
|
|
13916
13976
|
};
|
|
@@ -14156,10 +14216,10 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14156
14216
|
['Agenda', 'MonthAgenda', 'Year', 'TimelineYear'].indexOf(this.parent.currentView) === -1) {
|
|
14157
14217
|
templateNames = [];
|
|
14158
14218
|
for (var i = 0, len = this.crudObj.sourceEvent.length; i < len; i++) {
|
|
14159
|
-
templateNames.push('eventTemplate_' + this.crudObj.sourceEvent[i].groupIndex);
|
|
14160
|
-
if (this.crudObj.targetEvent[i] && this.crudObj.sourceEvent[i].groupIndex !==
|
|
14161
|
-
this.crudObj.targetEvent[i].groupIndex) {
|
|
14162
|
-
templateNames.push('eventTemplate_' + this.crudObj.targetEvent[i].groupIndex);
|
|
14219
|
+
templateNames.push('eventTemplate_' + this.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex);
|
|
14220
|
+
if (this.crudObj.targetEvent[parseInt(i.toString(), 10)] && this.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex !==
|
|
14221
|
+
this.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex) {
|
|
14222
|
+
templateNames.push('eventTemplate_' + this.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex);
|
|
14163
14223
|
}
|
|
14164
14224
|
}
|
|
14165
14225
|
}
|
|
@@ -14200,7 +14260,7 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14200
14260
|
var groupIndex = this_1.parent.eventBase.getGroupIndexFromEvent(data);
|
|
14201
14261
|
if (groupIndex > -1 && this_1.parent.crudModule.crudObj.sourceEvent.filter(function (tdData) { return tdData.groupIndex === groupIndex; }).length === 0
|
|
14202
14262
|
&& this_1.crudObj.isCrudAction) {
|
|
14203
|
-
this_1.crudObj.sourceEvent.push(this_1.parent.resourceBase.lastResourceLevel[groupIndex]);
|
|
14263
|
+
this_1.crudObj.sourceEvent.push(this_1.parent.resourceBase.lastResourceLevel[parseInt(groupIndex.toString(), 10)]);
|
|
14204
14264
|
}
|
|
14205
14265
|
};
|
|
14206
14266
|
var this_1 = this;
|
|
@@ -14418,8 +14478,8 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14418
14478
|
var editParams = { addedRecords: [], changedRecords: [], deletedRecords: [] };
|
|
14419
14479
|
var occurrenceEvents = (occurrenceData instanceof Array ? occurrenceData : [occurrenceData]);
|
|
14420
14480
|
var _loop_2 = function (a, count) {
|
|
14421
|
-
var childEvent = occurrenceArgs.changedRecords[a];
|
|
14422
|
-
var parentEvent = occurrenceEvents[a].parent;
|
|
14481
|
+
var childEvent = occurrenceArgs.changedRecords[parseInt(a.toString(), 10)];
|
|
14482
|
+
var parentEvent = occurrenceEvents[parseInt(a.toString(), 10)].parent;
|
|
14423
14483
|
var parentException = parentEvent[fields.recurrenceException];
|
|
14424
14484
|
var editedData = void 0;
|
|
14425
14485
|
var exceptionDate = void 0;
|
|
@@ -14490,8 +14550,8 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14490
14550
|
var editParams = { addedRecords: [], changedRecords: [], deletedRecords: [] };
|
|
14491
14551
|
var followEvents = followData instanceof Array ? followData : [followData];
|
|
14492
14552
|
var _loop_3 = function (a, count) {
|
|
14493
|
-
var childEvent = followArgs.changedRecords[a];
|
|
14494
|
-
var parentEvent = followEvents[a].parent;
|
|
14553
|
+
var childEvent = followArgs.changedRecords[parseInt(a.toString(), 10)];
|
|
14554
|
+
var parentEvent = followEvents[parseInt(a.toString(), 10)].parent;
|
|
14495
14555
|
var followData_1 = _this.parent.eventBase.getEventCollections(parentEvent, childEvent);
|
|
14496
14556
|
var isSpanned = void 0;
|
|
14497
14557
|
switch (action) {
|
|
@@ -14567,8 +14627,8 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14567
14627
|
var editParams = { addedRecords: [], changedRecords: [], deletedRecords: [] };
|
|
14568
14628
|
var seriesEvents = seriesData instanceof Array ? seriesData : [seriesData];
|
|
14569
14629
|
var _loop_4 = function (a, count) {
|
|
14570
|
-
var childEvent = seriesArgs.changedRecords[a];
|
|
14571
|
-
var parentEvent = seriesEvents[a];
|
|
14630
|
+
var childEvent = seriesArgs.changedRecords[parseInt(a.toString(), 10)];
|
|
14631
|
+
var parentEvent = seriesEvents[parseInt(a.toString(), 10)];
|
|
14572
14632
|
var eventCollections = _this.parent.eventBase.getEventCollections(parentEvent);
|
|
14573
14633
|
var deletedEvents = eventCollections.follow.concat(eventCollections.occurrence);
|
|
14574
14634
|
switch (action) {
|
|
@@ -14633,13 +14693,13 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14633
14693
|
var fields_3 = _this.parent.eventFields;
|
|
14634
14694
|
var editParams = { addedRecords: [], changedRecords: [], deletedRecords: [] };
|
|
14635
14695
|
var _loop_5 = function (a, count) {
|
|
14636
|
-
var isDelete = isNullOrUndefined(deleteArgs.deletedRecords[a][_this.parent.eventFields.recurrenceRule]);
|
|
14696
|
+
var isDelete = isNullOrUndefined(deleteArgs.deletedRecords[parseInt(a.toString(), 10)][_this.parent.eventFields.recurrenceRule]);
|
|
14637
14697
|
if (!isDelete) {
|
|
14638
|
-
var parentEvent_1 = deleteData[a].parent;
|
|
14698
|
+
var parentEvent_1 = deleteData[parseInt(a.toString(), 10)].parent;
|
|
14639
14699
|
var isEdited = editParams.changedRecords.filter(function (obj) {
|
|
14640
14700
|
return obj[fields_3.id] === parentEvent_1[fields_3.id];
|
|
14641
14701
|
});
|
|
14642
|
-
var editedDate = deleteArgs.deletedRecords[a][fields_3.startTime];
|
|
14702
|
+
var editedDate = deleteArgs.deletedRecords[parseInt(a.toString(), 10)][fields_3.startTime];
|
|
14643
14703
|
if (isEdited.length > 0) {
|
|
14644
14704
|
var editedData = isEdited[0];
|
|
14645
14705
|
editedData[fields_3.recurrenceException] =
|
|
@@ -14652,10 +14712,10 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14652
14712
|
if (isEdited.length === 0) {
|
|
14653
14713
|
editParams.changedRecords.push(_this.parent.eventBase.processTimezone(parentEvent_1, true));
|
|
14654
14714
|
}
|
|
14655
|
-
isDelete = deleteArgs.deletedRecords[a][fields_3.id] !== parentEvent_1[fields_3.id];
|
|
14715
|
+
isDelete = deleteArgs.deletedRecords[parseInt(a.toString(), 10)][fields_3.id] !== parentEvent_1[fields_3.id];
|
|
14656
14716
|
}
|
|
14657
14717
|
if (isDelete) {
|
|
14658
|
-
editParams.deletedRecords.push(deleteArgs.deletedRecords[a]);
|
|
14718
|
+
editParams.deletedRecords.push(deleteArgs.deletedRecords[parseInt(a.toString(), 10)]);
|
|
14659
14719
|
}
|
|
14660
14720
|
};
|
|
14661
14721
|
for (var a = 0, count = deleteArgs.deletedRecords.length; a < count; a++) {
|
|
@@ -15178,6 +15238,9 @@ var Group = /** @__PURE__ @class */ (function (_super) {
|
|
|
15178
15238
|
__decorate$9([
|
|
15179
15239
|
Property()
|
|
15180
15240
|
], Group.prototype, "headerTooltipTemplate", void 0);
|
|
15241
|
+
__decorate$9([
|
|
15242
|
+
Property(false)
|
|
15243
|
+
], Group.prototype, "hideNonWorkingDays", void 0);
|
|
15181
15244
|
return Group;
|
|
15182
15245
|
}(ChildProperty));
|
|
15183
15246
|
|
|
@@ -15263,6 +15326,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15263
15326
|
function ResourceBase(parent) {
|
|
15264
15327
|
this.resourceCollection = [];
|
|
15265
15328
|
this.leftPixel = 25;
|
|
15329
|
+
this.resourceDateTree = [];
|
|
15266
15330
|
this.parent = parent;
|
|
15267
15331
|
}
|
|
15268
15332
|
ResourceBase.prototype.renderResourceHeaderIndent = function (tr) {
|
|
@@ -15285,8 +15349,8 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15285
15349
|
}
|
|
15286
15350
|
var trCount = this.lastResourceLevel.length;
|
|
15287
15351
|
for (var i = 0; i < trCount; i++) {
|
|
15288
|
-
var resData = this.lastResourceLevel[i].resourceData;
|
|
15289
|
-
var res = this.lastResourceLevel[i].resource;
|
|
15352
|
+
var resData = this.lastResourceLevel[parseInt(i.toString(), 10)].resourceData;
|
|
15353
|
+
var res = this.lastResourceLevel[parseInt(i.toString(), 10)].resource;
|
|
15290
15354
|
if (resData.ClassName === RESOURCE_PARENT_CLASS && !resData[res.expandedField] &&
|
|
15291
15355
|
!isNullOrUndefined(resData[res.expandedField])) {
|
|
15292
15356
|
var trCollection = [].slice.call(tBody.children);
|
|
@@ -15329,10 +15393,10 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15329
15393
|
ResourceBase.prototype.setExpandedResources = function () {
|
|
15330
15394
|
var resources = [];
|
|
15331
15395
|
for (var i = 0; i < this.lastResourceLevel.length; i++) {
|
|
15332
|
-
var resource = this.lastResourceLevel[i].resourceData;
|
|
15396
|
+
var resource = this.lastResourceLevel[parseInt(i.toString(), 10)].resourceData;
|
|
15333
15397
|
var count = resource.Count;
|
|
15334
|
-
resources.push(this.lastResourceLevel[i]);
|
|
15335
|
-
var isExpanded = resource[this.lastResourceLevel[i].resource.expandedField];
|
|
15398
|
+
resources.push(this.lastResourceLevel[parseInt(i.toString(), 10)]);
|
|
15399
|
+
var isExpanded = resource[this.lastResourceLevel[parseInt(i.toString(), 10)].resource.expandedField];
|
|
15336
15400
|
if (!isNullOrUndefined(isExpanded) && !isExpanded && count > 0) {
|
|
15337
15401
|
i = i + count;
|
|
15338
15402
|
}
|
|
@@ -15348,21 +15412,21 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15348
15412
|
var td = createElement('td', { attrs: { tabindex: isVirtualScroll ? '-1' : '0' } });
|
|
15349
15413
|
for (var i = 0; i < resData.length; i++) {
|
|
15350
15414
|
var ntd = td.cloneNode();
|
|
15351
|
-
rIndex = findIndexInData(resColl, 'name', resData[i].resource.name);
|
|
15415
|
+
rIndex = findIndexInData(resColl, 'name', resData[parseInt(i.toString(), 10)].resource.name);
|
|
15352
15416
|
if (rIndex === resColl.length - 1) {
|
|
15353
|
-
extend(resData[i].resourceData, { ClassName: RESOURCE_CHILD_CLASS });
|
|
15354
|
-
this.renderedResources[i].className = [RESOURCE_CHILD_CLASS];
|
|
15417
|
+
extend(resData[parseInt(i.toString(), 10)].resourceData, { ClassName: RESOURCE_CHILD_CLASS });
|
|
15418
|
+
this.renderedResources[parseInt(i.toString(), 10)].className = [RESOURCE_CHILD_CLASS];
|
|
15355
15419
|
}
|
|
15356
15420
|
else {
|
|
15357
|
-
extend(resData[i].resourceData, { ClassName: RESOURCE_PARENT_CLASS });
|
|
15358
|
-
this.renderedResources[i].className = [RESOURCE_PARENT_CLASS];
|
|
15421
|
+
extend(resData[parseInt(i.toString(), 10)].resourceData, { ClassName: RESOURCE_PARENT_CLASS });
|
|
15422
|
+
this.renderedResources[parseInt(i.toString(), 10)].className = [RESOURCE_PARENT_CLASS];
|
|
15359
15423
|
}
|
|
15360
15424
|
left = (rIndex * this.leftPixel) + 'px';
|
|
15361
|
-
if (resData[i].resourceData.ClassName === RESOURCE_PARENT_CLASS
|
|
15362
|
-
&& !isNullOrUndefined(resData[i].resourceData.Count) && (resData[i].resourceData.Count > 0)) {
|
|
15425
|
+
if (resData[parseInt(i.toString(), 10)].resourceData.ClassName === RESOURCE_PARENT_CLASS
|
|
15426
|
+
&& !isNullOrUndefined(resData[parseInt(i.toString(), 10)].resourceData.Count) && (resData[parseInt(i.toString(), 10)].resourceData.Count > 0)) {
|
|
15363
15427
|
var iconClass = void 0;
|
|
15364
|
-
if (resData[i].resourceData[resColl[rIndex].expandedField] ||
|
|
15365
|
-
isNullOrUndefined(resData[i].resourceData[resColl[rIndex].expandedField])) {
|
|
15428
|
+
if (resData[parseInt(i.toString(), 10)].resourceData[resColl[parseInt(rIndex.toString(), 10)].expandedField] ||
|
|
15429
|
+
isNullOrUndefined(resData[parseInt(i.toString(), 10)].resourceData[resColl[parseInt(rIndex.toString(), 10)].expandedField])) {
|
|
15366
15430
|
iconClass = RESOURCE_COLLAPSE_CLASS;
|
|
15367
15431
|
}
|
|
15368
15432
|
else {
|
|
@@ -15376,15 +15440,15 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15376
15440
|
EventHandler.add(iconDiv, 'click', this.onTreeIconClick, this);
|
|
15377
15441
|
}
|
|
15378
15442
|
}
|
|
15379
|
-
this.parent.activeView.setResourceHeaderContent(ntd, resData[i], RESOURCE_TEXT_CLASS);
|
|
15380
|
-
ntd.setAttribute('data-group-index', resData[i].groupIndex.toString());
|
|
15381
|
-
ntd.setAttribute('aria-label', resData[i].resourceData[resData[i].resource.textField] + ' resource');
|
|
15443
|
+
this.parent.activeView.setResourceHeaderContent(ntd, resData[parseInt(i.toString(), 10)], RESOURCE_TEXT_CLASS);
|
|
15444
|
+
ntd.setAttribute('data-group-index', resData[parseInt(i.toString(), 10)].groupIndex.toString());
|
|
15445
|
+
ntd.setAttribute('aria-label', resData[parseInt(i.toString(), 10)].resourceData[resData[parseInt(i.toString(), 10)].resource.textField] + ' resource');
|
|
15382
15446
|
if (!this.parent.activeViewOptions.resourceHeaderTemplate) {
|
|
15383
15447
|
this.setMargin(ntd.querySelector('.' + RESOURCE_TEXT_CLASS), left);
|
|
15384
15448
|
}
|
|
15385
|
-
var classCollection = [RESOURCE_CELLS_CLASS, resData[i].resourceData.ClassName];
|
|
15449
|
+
var classCollection = [RESOURCE_CELLS_CLASS, resData[parseInt(i.toString(), 10)].resourceData.ClassName];
|
|
15386
15450
|
addClass([ntd], classCollection);
|
|
15387
|
-
var args = { elementType: 'resourceHeader', element: ntd, groupIndex: resData[i].groupIndex };
|
|
15451
|
+
var args = { elementType: 'resourceHeader', element: ntd, groupIndex: resData[parseInt(i.toString(), 10)].groupIndex };
|
|
15388
15452
|
this.parent.trigger(renderCell, args);
|
|
15389
15453
|
var ntr = tr.cloneNode();
|
|
15390
15454
|
ntr.appendChild(ntd);
|
|
@@ -15407,17 +15471,17 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15407
15471
|
for (var x = 0; x < data.length; x++) {
|
|
15408
15472
|
var totalCount = 0;
|
|
15409
15473
|
if (this.parent.activeViewOptions.group.byGroupID) {
|
|
15410
|
-
var query = new Query().where(wholeCollection[wholeCollection.length - 1].groupIDField, 'equal', data[x][parentCollection[parentCollection.length - (y + 1)].idField]);
|
|
15474
|
+
var query = new Query().where(wholeCollection[wholeCollection.length - 1].groupIDField, 'equal', data[parseInt(x.toString(), 10)][parentCollection[parentCollection.length - (y + 1)].idField]);
|
|
15411
15475
|
collection = new DataManager(wholeCollection[wholeCollection.length - 1].dataSource).executeLocal(query);
|
|
15412
15476
|
}
|
|
15413
15477
|
else {
|
|
15414
15478
|
collection = wholeCollection[wholeCollection.length - 1].dataSource;
|
|
15415
15479
|
}
|
|
15416
15480
|
for (var z = 0; z < collection.length; z++) {
|
|
15417
|
-
totalCount = totalCount + parseInt(collection[z].Count, 10);
|
|
15481
|
+
totalCount = totalCount + parseInt(collection[parseInt(z.toString(), 10)].Count, 10);
|
|
15418
15482
|
}
|
|
15419
|
-
totalCount = totalCount + parseInt(data[x].Count, 10);
|
|
15420
|
-
extend(data[x], { Count: totalCount });
|
|
15483
|
+
totalCount = totalCount + parseInt(data[parseInt(x.toString(), 10)].Count, 10);
|
|
15484
|
+
extend(data[parseInt(x.toString(), 10)], { Count: totalCount });
|
|
15421
15485
|
}
|
|
15422
15486
|
wholeCollection = wholeCollection.slice(0, -1);
|
|
15423
15487
|
}
|
|
@@ -15473,7 +15537,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15473
15537
|
var workCellCollection = [];
|
|
15474
15538
|
var headerRowCollection = [];
|
|
15475
15539
|
var pNode;
|
|
15476
|
-
var clickedRes = this.lastResourceLevel[index].resourceData;
|
|
15540
|
+
var clickedRes = this.lastResourceLevel[parseInt(index.toString(), 10)].resourceData;
|
|
15477
15541
|
var resRows = [].slice.call(this.parent.element.querySelectorAll('.' + RESOURCE_COLUMN_WRAP_CLASS + ' ' + 'tr'));
|
|
15478
15542
|
var contentRows = [].slice.call(this.parent.element.querySelectorAll('.' + CONTENT_WRAP_CLASS + ' ' + 'tbody tr'));
|
|
15479
15543
|
var eventRows = [].slice.call(this.parent.element.querySelectorAll('.' + CONTENT_WRAP_CLASS + ' .' + APPOINTMENT_CONTAINER_CLASS));
|
|
@@ -15485,45 +15549,45 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15485
15549
|
var clonedCollection = this.lastResourceLevel;
|
|
15486
15550
|
for (var i = 0; i < rowCollection.length; i++) {
|
|
15487
15551
|
var expanded = true;
|
|
15488
|
-
pNode = rowCollection[i].children[0].classList.contains(RESOURCE_PARENT_CLASS);
|
|
15489
|
-
clonedCollection[index].resourceData[clonedCollection[index].resource.expandedField] = !hide;
|
|
15552
|
+
pNode = rowCollection[parseInt(i.toString(), 10)].children[0].classList.contains(RESOURCE_PARENT_CLASS);
|
|
15553
|
+
clonedCollection[parseInt(index.toString(), 10)].resourceData[clonedCollection[parseInt(index.toString(), 10)].resource.expandedField] = !hide;
|
|
15490
15554
|
if (hide) {
|
|
15491
15555
|
if (pNode) {
|
|
15492
|
-
var trElem = rowCollection[i].querySelector('.' + RESOURCE_TREE_ICON_CLASS);
|
|
15556
|
+
var trElem = rowCollection[parseInt(i.toString(), 10)].querySelector('.' + RESOURCE_TREE_ICON_CLASS);
|
|
15493
15557
|
if (trElem) {
|
|
15494
15558
|
classList(trElem, [RESOURCE_EXPAND_CLASS], [RESOURCE_COLLAPSE_CLASS]);
|
|
15495
15559
|
}
|
|
15496
15560
|
}
|
|
15497
|
-
if (!rowCollection[i].classList.contains(HIDDEN_CLASS)) {
|
|
15498
|
-
addClass([rowCollection[i], workCellCollection[i], headerRowCollection[i]], HIDDEN_CLASS);
|
|
15561
|
+
if (!rowCollection[parseInt(i.toString(), 10)].classList.contains(HIDDEN_CLASS)) {
|
|
15562
|
+
addClass([rowCollection[parseInt(i.toString(), 10)], workCellCollection[parseInt(i.toString(), 10)], headerRowCollection[parseInt(i.toString(), 10)]], HIDDEN_CLASS);
|
|
15499
15563
|
}
|
|
15500
15564
|
}
|
|
15501
15565
|
else {
|
|
15502
15566
|
if (pNode) {
|
|
15503
|
-
var rowIndex = rowCollection[i].rowIndex;
|
|
15504
|
-
if (!clonedCollection[rowIndex].resourceData[clonedCollection[rowIndex].resource.expandedField]
|
|
15505
|
-
&& !isNullOrUndefined(clonedCollection[rowIndex].resourceData[clonedCollection[rowIndex].resource.expandedField])) {
|
|
15506
|
-
rowCollection.splice(i + 1, (parseInt(clonedCollection[rowIndex].resourceData.Count, 10)));
|
|
15507
|
-
workCellCollection.splice(i + 1, (parseInt(clonedCollection[rowIndex].resourceData.Count, 10)));
|
|
15508
|
-
headerRowCollection.splice(i + 1, (parseInt(clonedCollection[rowIndex].resourceData.Count, 10)));
|
|
15567
|
+
var rowIndex = rowCollection[parseInt(i.toString(), 10)].rowIndex;
|
|
15568
|
+
if (!clonedCollection[parseInt(rowIndex.toString(), 10)].resourceData[clonedCollection[parseInt(rowIndex.toString(), 10)].resource.expandedField]
|
|
15569
|
+
&& !isNullOrUndefined(clonedCollection[parseInt(rowIndex.toString(), 10)].resourceData[clonedCollection[parseInt(rowIndex.toString(), 10)].resource.expandedField])) {
|
|
15570
|
+
rowCollection.splice(i + 1, (parseInt(clonedCollection[parseInt(rowIndex.toString(), 10)].resourceData.Count, 10)));
|
|
15571
|
+
workCellCollection.splice(i + 1, (parseInt(clonedCollection[parseInt(rowIndex.toString(), 10)].resourceData.Count, 10)));
|
|
15572
|
+
headerRowCollection.splice(i + 1, (parseInt(clonedCollection[parseInt(rowIndex.toString(), 10)].resourceData.Count, 10)));
|
|
15509
15573
|
expanded = false;
|
|
15510
15574
|
}
|
|
15511
15575
|
if (expanded) {
|
|
15512
|
-
var trElem = rowCollection[i].querySelector('.' + RESOURCE_TREE_ICON_CLASS);
|
|
15576
|
+
var trElem = rowCollection[parseInt(i.toString(), 10)].querySelector('.' + RESOURCE_TREE_ICON_CLASS);
|
|
15513
15577
|
if (trElem) {
|
|
15514
15578
|
classList(trElem, [RESOURCE_COLLAPSE_CLASS], [RESOURCE_EXPAND_CLASS]);
|
|
15515
15579
|
}
|
|
15516
15580
|
}
|
|
15517
15581
|
}
|
|
15518
|
-
if (rowCollection[i].classList.contains(HIDDEN_CLASS)) {
|
|
15519
|
-
removeClass([rowCollection[i], workCellCollection[i], headerRowCollection[i]], HIDDEN_CLASS);
|
|
15582
|
+
if (rowCollection[parseInt(i.toString(), 10)].classList.contains(HIDDEN_CLASS)) {
|
|
15583
|
+
removeClass([rowCollection[parseInt(i.toString(), 10)], workCellCollection[parseInt(i.toString(), 10)], headerRowCollection[parseInt(i.toString(), 10)]], HIDDEN_CLASS);
|
|
15520
15584
|
}
|
|
15521
15585
|
}
|
|
15522
15586
|
}
|
|
15523
15587
|
};
|
|
15524
15588
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15525
15589
|
ResourceBase.prototype.updateVirtualContent = function (index, expand, e, target) {
|
|
15526
|
-
this.lastResourceLevel[index].resourceData[this.lastResourceLevel[index].resource.expandedField] = !expand;
|
|
15590
|
+
this.lastResourceLevel[parseInt(index.toString(), 10)].resourceData[this.lastResourceLevel[parseInt(index.toString(), 10)].resource.expandedField] = !expand;
|
|
15527
15591
|
this.setExpandedResources();
|
|
15528
15592
|
var resourceCount = this.parent.virtualScrollModule.getRenderedCount();
|
|
15529
15593
|
var startIndex = this.expandedResources.indexOf(this.renderedResources[0]);
|
|
@@ -15614,7 +15678,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15614
15678
|
var groupIndex = 0;
|
|
15615
15679
|
var _loop_1 = function (i, len) {
|
|
15616
15680
|
var treeHandler = function (treeLevel, index, levelId) {
|
|
15617
|
-
var resource = _this.resourceCollection[index];
|
|
15681
|
+
var resource = _this.resourceCollection[parseInt(index.toString(), 10)];
|
|
15618
15682
|
var treeArgs;
|
|
15619
15683
|
var resObj;
|
|
15620
15684
|
if (!isTimeLine) {
|
|
@@ -15654,10 +15718,10 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15654
15718
|
return treeArgs;
|
|
15655
15719
|
};
|
|
15656
15720
|
if (!isTimeLine) {
|
|
15657
|
-
treeCollection.push(treeHandler(this_1.resourceTreeLevel[i], 0, (i + 1).toString()));
|
|
15721
|
+
treeCollection.push(treeHandler(this_1.resourceTreeLevel[parseInt(i.toString(), 10)], 0, (i + 1).toString()));
|
|
15658
15722
|
}
|
|
15659
15723
|
else {
|
|
15660
|
-
treeHandler(this_1.resourceTreeLevel[i], 0, (i + 1).toString());
|
|
15724
|
+
treeHandler(this_1.resourceTreeLevel[parseInt(i.toString(), 10)], 0, (i + 1).toString());
|
|
15661
15725
|
}
|
|
15662
15726
|
};
|
|
15663
15727
|
var this_1 = this;
|
|
@@ -15676,9 +15740,9 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15676
15740
|
var resource = this.lastResourceLevel[this.parent.uiStateValues.groupIndex];
|
|
15677
15741
|
var headerCollection = [];
|
|
15678
15742
|
var _loop_2 = function (i, len) {
|
|
15679
|
-
var resourceLevel = this_2.resourceCollection[i];
|
|
15743
|
+
var resourceLevel = this_2.resourceCollection[parseInt(i.toString(), 10)];
|
|
15680
15744
|
var resourceText = resourceLevel.dataSource.filter(function (resData) {
|
|
15681
|
-
return resData[resourceLevel.idField] === resource.groupOrder[i];
|
|
15745
|
+
return resData[resourceLevel.idField] === resource.groupOrder[parseInt(i.toString(), 10)];
|
|
15682
15746
|
});
|
|
15683
15747
|
var resourceName = createElement('div', {
|
|
15684
15748
|
className: RESOURCE_NAME,
|
|
@@ -15775,8 +15839,8 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15775
15839
|
}
|
|
15776
15840
|
this.parent.resourceCollection = [];
|
|
15777
15841
|
for (var i = 0, length_1 = e.length; i < length_1; i++) {
|
|
15778
|
-
var resource = this.parent.resources[i];
|
|
15779
|
-
var resourceObj = this.getResourceModel(resource, e[i].result);
|
|
15842
|
+
var resource = this.parent.resources[parseInt(i.toString(), 10)];
|
|
15843
|
+
var resourceObj = this.getResourceModel(resource, e[parseInt(i.toString(), 10)].result);
|
|
15780
15844
|
this.parent.resourceCollection.push(resourceObj);
|
|
15781
15845
|
}
|
|
15782
15846
|
this.refreshLayout(isSetModel);
|
|
@@ -15815,7 +15879,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15815
15879
|
var resource = _a[_i];
|
|
15816
15880
|
var index_1 = findIndexInData(this.parent.resourceCollection, 'name', resource);
|
|
15817
15881
|
if (index_1 >= 0) {
|
|
15818
|
-
requiredResources.push(this.parent.resourceCollection[index_1]);
|
|
15882
|
+
requiredResources.push(this.parent.resourceCollection[parseInt(index_1.toString(), 10)]);
|
|
15819
15883
|
}
|
|
15820
15884
|
}
|
|
15821
15885
|
}
|
|
@@ -15860,8 +15924,8 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15860
15924
|
if (prevOrder && prevOrder.length > 0) {
|
|
15861
15925
|
groupOrder = groupOrder.concat(prevOrder);
|
|
15862
15926
|
}
|
|
15863
|
-
groupOrder.push(data[i][resource.idField]);
|
|
15864
|
-
var items = group(resources.slice(1), index + 1, resource, data[i], groupOrder);
|
|
15927
|
+
groupOrder.push(data[parseInt(i.toString(), 10)][resource.idField]);
|
|
15928
|
+
var items = group(resources.slice(1), index + 1, resource, data[parseInt(i.toString(), 10)], groupOrder);
|
|
15865
15929
|
// Here validate child item empty top level resource only
|
|
15866
15930
|
if (index === 0 && items.length === 0 && _this.resourceCollection.length > 1) {
|
|
15867
15931
|
continue;
|
|
@@ -15870,9 +15934,9 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15870
15934
|
var renderDates = _this.parent.activeView.renderDates;
|
|
15871
15935
|
var resWorkDays = void 0;
|
|
15872
15936
|
if (!_this.parent.activeViewOptions.group.byDate && index + 1 === _this.resourceCollection.length) {
|
|
15873
|
-
var workDays = data[i][resource.workDaysField];
|
|
15874
|
-
var resStartHour = data[i][resource.startHourField];
|
|
15875
|
-
var resEndHour = data[i][resource.endHourField];
|
|
15937
|
+
var workDays = data[parseInt(i.toString(), 10)][resource.workDaysField];
|
|
15938
|
+
var resStartHour = data[parseInt(i.toString(), 10)][resource.startHourField];
|
|
15939
|
+
var resEndHour = data[parseInt(i.toString(), 10)][resource.endHourField];
|
|
15876
15940
|
if (workDays && workDays.length > 0) {
|
|
15877
15941
|
renderDates = _this.parent.activeView.getRenderDates(workDays);
|
|
15878
15942
|
resWorkDays = workDays;
|
|
@@ -15885,22 +15949,22 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15885
15949
|
var dateSlots = _this.generateCustomHours(dateCol, resStartHour, resEndHour, groupOrder);
|
|
15886
15950
|
lastColumnDates = lastColumnDates.concat(dateSlots);
|
|
15887
15951
|
}
|
|
15888
|
-
var resCssClass = data[i][resource.cssClassField];
|
|
15952
|
+
var resCssClass = data[parseInt(i.toString(), 10)][resource.cssClassField];
|
|
15889
15953
|
var slotData = {
|
|
15890
15954
|
type: 'resourceHeader', className: ['e-resource-cells'],
|
|
15891
15955
|
resourceLevelIndex: index, groupOrder: groupOrder,
|
|
15892
|
-
resource: resource, resourceData: data[i],
|
|
15956
|
+
resource: resource, resourceData: data[parseInt(i.toString(), 10)],
|
|
15893
15957
|
colSpan: _this.parent.activeViewOptions.group.byDate ? 1 : dateCol.length,
|
|
15894
15958
|
renderDates: renderDates, workDays: resWorkDays, cssClass: resCssClass,
|
|
15895
15959
|
child: items
|
|
15896
15960
|
};
|
|
15897
15961
|
resTree.push(slotData);
|
|
15898
15962
|
}
|
|
15899
|
-
if (!resTreeGroup[index]) {
|
|
15900
|
-
resTreeGroup[index] = [];
|
|
15963
|
+
if (!resTreeGroup[parseInt(index.toString(), 10)]) {
|
|
15964
|
+
resTreeGroup[parseInt(index.toString(), 10)] = [];
|
|
15901
15965
|
}
|
|
15902
15966
|
if (resTree.length > 0) {
|
|
15903
|
-
resTreeGroup[index].push(resTree);
|
|
15967
|
+
resTreeGroup[parseInt(index.toString(), 10)].push(resTree);
|
|
15904
15968
|
}
|
|
15905
15969
|
return resTree;
|
|
15906
15970
|
}
|
|
@@ -15929,12 +15993,12 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15929
15993
|
var headerLevels = [];
|
|
15930
15994
|
for (var i = resTreeGroup.length - 1; i >= 0; i--) {
|
|
15931
15995
|
var temp = 0;
|
|
15932
|
-
for (var _i = 0, _a = resTreeGroup[i]; _i < _a.length; _i++) {
|
|
15996
|
+
for (var _i = 0, _a = resTreeGroup[parseInt(i.toString(), 10)]; _i < _a.length; _i++) {
|
|
15933
15997
|
var currentLevelChilds = _a[_i];
|
|
15934
15998
|
for (var _b = 0, currentLevelChilds_1 = currentLevelChilds; _b < currentLevelChilds_1.length; _b++) {
|
|
15935
15999
|
var currentLevelChild = currentLevelChilds_1[_b];
|
|
15936
16000
|
if (resTreeGroup[i + 1] && resTreeGroup[i + 1].length > 0) {
|
|
15937
|
-
var nextLevelChilds = resTreeGroup[i + 1][temp];
|
|
16001
|
+
var nextLevelChilds = resTreeGroup[parseInt((i + 1).toString(), 10)][parseInt(temp.toString(), 10)];
|
|
15938
16002
|
if (!nextLevelChilds) {
|
|
15939
16003
|
continue;
|
|
15940
16004
|
}
|
|
@@ -15962,7 +16026,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15962
16026
|
for (var _d = 0, _e = this.lastResourceLevel; _d < _e.length; _d++) {
|
|
15963
16027
|
var lastLevelResource = _e[_d];
|
|
15964
16028
|
for (var i = 0; i < lastLevelResource.colSpan; i++) {
|
|
15965
|
-
lastColumnDates[index].groupIndex = lastLevelResource.groupIndex;
|
|
16029
|
+
lastColumnDates[parseInt(index.toString(), 10)].groupIndex = lastLevelResource.groupIndex;
|
|
15966
16030
|
index++;
|
|
15967
16031
|
}
|
|
15968
16032
|
}
|
|
@@ -15971,21 +16035,106 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15971
16035
|
}
|
|
15972
16036
|
var dateHeaderLevels = [];
|
|
15973
16037
|
var levels = extend([], headerLevels, null, true);
|
|
16038
|
+
var datesColumn = [];
|
|
16039
|
+
if (this.parent.activeViewOptions.group.hideNonWorkingDays) {
|
|
16040
|
+
var renderDates_1 = [];
|
|
16041
|
+
var dateIndex = 0;
|
|
16042
|
+
var _loop_3 = function (headerDate) {
|
|
16043
|
+
this_3.resourceDateTree[parseInt(dateIndex.toString(), 10)] = [];
|
|
16044
|
+
var currentDateLevels = [];
|
|
16045
|
+
var _loop_4 = function (j) {
|
|
16046
|
+
var workDays = this_3.lastResourceLevel[parseInt(j.toString(), 10)].resourceData[this_3.lastResourceLevel[parseInt(j.toString(), 10)].resource.workDaysField];
|
|
16047
|
+
if (!workDays) {
|
|
16048
|
+
workDays = this_3.parent.activeViewOptions.workDays;
|
|
16049
|
+
}
|
|
16050
|
+
if (workDays.indexOf(headerDate.date.getDay()) !== -1) {
|
|
16051
|
+
var resTd_1 = extend({}, this_3.lastResourceLevel[parseInt(j.toString(), 10)], null, true);
|
|
16052
|
+
resTd_1.date = headerDate.date;
|
|
16053
|
+
this_3.lastResourceLevel[parseInt(j.toString(), 10)].workDays = workDays;
|
|
16054
|
+
resTd_1.startHour = this_3.parent.getStartEndTime(resTd_1.resourceData[resTd_1.resource.startHourField]) ||
|
|
16055
|
+
headerDate.startHour;
|
|
16056
|
+
resTd_1.endHour = this_3.parent.getStartEndTime(resTd_1.resourceData[resTd_1.resource.endHourField]) ||
|
|
16057
|
+
headerDate.endHour;
|
|
16058
|
+
this_3.resourceDateTree[parseInt(dateIndex.toString(), 10)].push(resTd_1);
|
|
16059
|
+
var _loop_5 = function (k) {
|
|
16060
|
+
if (!currentDateLevels[parseInt(k.toString(), 10)]) {
|
|
16061
|
+
currentDateLevels[parseInt(k.toString(), 10)] = [];
|
|
16062
|
+
}
|
|
16063
|
+
if (k === resTd_1.groupOrder.length - 1) {
|
|
16064
|
+
if (!renderDates_1[parseInt(j.toString(), 10)]) {
|
|
16065
|
+
renderDates_1[parseInt(j.toString(), 10)] = [];
|
|
16066
|
+
}
|
|
16067
|
+
var filterDates = resTd_1.renderDates.filter(function (x) { return x.getDay() === headerDate.date.getDay(); });
|
|
16068
|
+
renderDates_1[parseInt(j.toString(), 10)] = renderDates_1[parseInt(j.toString(), 10)].concat(filterDates);
|
|
16069
|
+
currentDateLevels[parseInt(k.toString(), 10)].push(resTd_1);
|
|
16070
|
+
return "continue";
|
|
16071
|
+
}
|
|
16072
|
+
var currentLevel = levels[parseInt(k.toString(), 10)];
|
|
16073
|
+
var filteredResource = currentLevel.filter(function (data) {
|
|
16074
|
+
return data.resourceData[data.resource.idField] === resTd_1.groupOrder[parseInt(k.toString(), 10)];
|
|
16075
|
+
});
|
|
16076
|
+
if (filteredResource && filteredResource.length > 0) {
|
|
16077
|
+
var existedResource = currentDateLevels[parseInt(k.toString(), 10)].filter(function (data) {
|
|
16078
|
+
return data.resourceData[data.resource.idField] === resTd_1.groupOrder[parseInt(k.toString(), 10)];
|
|
16079
|
+
});
|
|
16080
|
+
if (existedResource && existedResource.length > 0) {
|
|
16081
|
+
existedResource[0].colSpan += 1;
|
|
16082
|
+
}
|
|
16083
|
+
else {
|
|
16084
|
+
var filteredTd = extend({}, filteredResource[0], null, true);
|
|
16085
|
+
filteredTd.colSpan = 1;
|
|
16086
|
+
currentDateLevels[parseInt(k.toString(), 10)].push(filteredTd);
|
|
16087
|
+
}
|
|
16088
|
+
}
|
|
16089
|
+
};
|
|
16090
|
+
for (var k = 0; k < resTd_1.groupOrder.length; k++) {
|
|
16091
|
+
_loop_5(k);
|
|
16092
|
+
}
|
|
16093
|
+
}
|
|
16094
|
+
};
|
|
16095
|
+
for (var j = 0; j < this_3.lastResourceLevel.length; j++) {
|
|
16096
|
+
_loop_4(j);
|
|
16097
|
+
}
|
|
16098
|
+
if (currentDateLevels.length > 0) {
|
|
16099
|
+
for (var l = 0; l < levels.length; l++) {
|
|
16100
|
+
if (!dateHeaderLevels[parseInt(l.toString(), 10)]) {
|
|
16101
|
+
dateHeaderLevels[parseInt(l.toString(), 10)] = [];
|
|
16102
|
+
}
|
|
16103
|
+
dateHeaderLevels[parseInt(l.toString(), 10)] = dateHeaderLevels[parseInt(l.toString(), 10)].concat(currentDateLevels[parseInt(l.toString(), 10)]);
|
|
16104
|
+
}
|
|
16105
|
+
headerDate.colSpan = currentDateLevels[currentDateLevels.length - 1].length;
|
|
16106
|
+
datesColumn.push(headerDate);
|
|
16107
|
+
}
|
|
16108
|
+
dateIndex++;
|
|
16109
|
+
};
|
|
16110
|
+
var this_3 = this;
|
|
16111
|
+
for (var _f = 0, headerDates_1 = headerDates; _f < headerDates_1.length; _f++) {
|
|
16112
|
+
var headerDate = headerDates_1[_f];
|
|
16113
|
+
_loop_3(headerDate);
|
|
16114
|
+
}
|
|
16115
|
+
this.resourceDateTree = this.resourceDateTree.filter(function (data) { return data.length > 0; });
|
|
16116
|
+
this.lastResourceLevel.forEach(function (x, index) {
|
|
16117
|
+
if (renderDates_1[parseInt(index.toString(), 10)]) {
|
|
16118
|
+
x.renderDates = renderDates_1[parseInt(index.toString(), 10)].sort(function (a, b) { return a.getTime() - b.getTime(); });
|
|
16119
|
+
}
|
|
16120
|
+
});
|
|
16121
|
+
dateHeaderLevels.unshift(datesColumn);
|
|
16122
|
+
return dateHeaderLevels;
|
|
16123
|
+
}
|
|
15974
16124
|
var dateColSpan = 0;
|
|
15975
|
-
for (var
|
|
15976
|
-
var firstRowTd = _g
|
|
16125
|
+
for (var _g = 0, _h = levels[0]; _g < _h.length; _g++) {
|
|
16126
|
+
var firstRowTd = _h[_g];
|
|
15977
16127
|
dateColSpan += firstRowTd.colSpan;
|
|
15978
16128
|
}
|
|
15979
|
-
var
|
|
15980
|
-
|
|
15981
|
-
var headerDate = headerDates_1[_h];
|
|
16129
|
+
for (var _j = 0, headerDates_2 = headerDates; _j < headerDates_2.length; _j++) {
|
|
16130
|
+
var headerDate = headerDates_2[_j];
|
|
15982
16131
|
headerDate.colSpan = dateColSpan;
|
|
15983
16132
|
datesColumn.push(headerDate);
|
|
15984
16133
|
var resGroup = extend([], levels, null, true);
|
|
15985
16134
|
for (var k = 0, length_2 = resGroup.length; k < length_2; k++) {
|
|
15986
16135
|
if (k === resGroup.length - 1) {
|
|
15987
|
-
for (var
|
|
15988
|
-
var resTd = _k
|
|
16136
|
+
for (var _k = 0, _l = resGroup[parseInt(k.toString(), 10)]; _k < _l.length; _k++) {
|
|
16137
|
+
var resTd = _l[_k];
|
|
15989
16138
|
resTd.date = headerDate.date;
|
|
15990
16139
|
resTd.workDays = headerDate.workDays;
|
|
15991
16140
|
resTd.startHour = this.parent.getStartEndTime(resTd.resourceData[resTd.resource.startHourField]) ||
|
|
@@ -15994,10 +16143,10 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
15994
16143
|
headerDate.endHour;
|
|
15995
16144
|
}
|
|
15996
16145
|
}
|
|
15997
|
-
if (!dateHeaderLevels[k]) {
|
|
15998
|
-
dateHeaderLevels[k] = [];
|
|
16146
|
+
if (!dateHeaderLevels[parseInt(k.toString(), 10)]) {
|
|
16147
|
+
dateHeaderLevels[parseInt(k.toString(), 10)] = [];
|
|
15999
16148
|
}
|
|
16000
|
-
dateHeaderLevels[k] = dateHeaderLevels[k].concat(resGroup[k]);
|
|
16149
|
+
dateHeaderLevels[parseInt(k.toString(), 10)] = dateHeaderLevels[parseInt(k.toString(), 10)].concat(resGroup[parseInt(k.toString(), 10)]);
|
|
16001
16150
|
}
|
|
16002
16151
|
}
|
|
16003
16152
|
dateHeaderLevels.unshift(datesColumn);
|
|
@@ -16006,11 +16155,11 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
16006
16155
|
ResourceBase.prototype.setResourceValues = function (eventObj, groupIndex) {
|
|
16007
16156
|
var _this = this;
|
|
16008
16157
|
var setValues = function (index, field, value) {
|
|
16009
|
-
if (_this.resourceCollection[index].allowMultiple && _this.parent.activeViewOptions.group.allowGroupEdit) {
|
|
16010
|
-
eventObj[field] = [value];
|
|
16158
|
+
if (_this.resourceCollection[parseInt(index.toString(), 10)].allowMultiple && _this.parent.activeViewOptions.group.allowGroupEdit) {
|
|
16159
|
+
eventObj["" + field] = [value];
|
|
16011
16160
|
}
|
|
16012
16161
|
else {
|
|
16013
|
-
eventObj[field] = value;
|
|
16162
|
+
eventObj["" + field] = value;
|
|
16014
16163
|
}
|
|
16015
16164
|
};
|
|
16016
16165
|
if (groupIndex === void 0) {
|
|
@@ -16018,16 +16167,16 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
16018
16167
|
this.parent.activeCellsData.groupIndex;
|
|
16019
16168
|
}
|
|
16020
16169
|
if (this.parent.activeViewOptions.group.resources.length > 0 && !isNullOrUndefined(groupIndex)) {
|
|
16021
|
-
var groupOrder = this.lastResourceLevel[groupIndex].groupOrder;
|
|
16170
|
+
var groupOrder = this.lastResourceLevel[parseInt(groupIndex.toString(), 10)].groupOrder;
|
|
16022
16171
|
for (var index = 0; index < this.resourceCollection.length; index++) {
|
|
16023
|
-
setValues(index, this.resourceCollection[index].field, groupOrder[index]);
|
|
16172
|
+
setValues(index, this.resourceCollection[parseInt(index.toString(), 10)].field, groupOrder[parseInt(index.toString(), 10)]);
|
|
16024
16173
|
}
|
|
16025
16174
|
}
|
|
16026
16175
|
else if (this.parent.resourceCollection.length > 0) {
|
|
16027
16176
|
for (var index = 0; index < this.resourceCollection.length; index++) {
|
|
16028
|
-
var data = this.resourceCollection[index].dataSource[0];
|
|
16177
|
+
var data = this.resourceCollection[parseInt(index.toString(), 10)].dataSource[0];
|
|
16029
16178
|
if (data) {
|
|
16030
|
-
setValues(index, this.resourceCollection[index].field, data[this.resourceCollection[index].idField]);
|
|
16179
|
+
setValues(index, this.resourceCollection[parseInt(index.toString(), 10)].field, data[this.resourceCollection[parseInt(index.toString(), 10)].idField]);
|
|
16031
16180
|
}
|
|
16032
16181
|
}
|
|
16033
16182
|
}
|
|
@@ -16035,11 +16184,11 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
16035
16184
|
ResourceBase.prototype.getResourceColor = function (eventObj, groupOrder) {
|
|
16036
16185
|
var colorFieldIndex = (!isNullOrUndefined(groupOrder) &&
|
|
16037
16186
|
this.colorIndex > groupOrder.length - 1) ? groupOrder.length - 1 : this.colorIndex;
|
|
16038
|
-
var resource = this.resourceCollection[colorFieldIndex];
|
|
16187
|
+
var resource = this.resourceCollection[parseInt(colorFieldIndex.toString(), 10)];
|
|
16039
16188
|
if (isNullOrUndefined(groupOrder) && this.parent.activeViewOptions.group.allowGroupEdit && resource.allowMultiple) {
|
|
16040
16189
|
return undefined;
|
|
16041
16190
|
}
|
|
16042
|
-
var id = isNullOrUndefined(groupOrder) ? eventObj[resource.field] : groupOrder[colorFieldIndex];
|
|
16191
|
+
var id = isNullOrUndefined(groupOrder) ? eventObj[resource.field] : groupOrder[parseInt(colorFieldIndex.toString(), 10)];
|
|
16043
16192
|
var data = this.filterData(resource.dataSource, resource.idField, id);
|
|
16044
16193
|
if (data.length > 0) {
|
|
16045
16194
|
return data[0][resource.colorField];
|
|
@@ -16068,35 +16217,35 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
16068
16217
|
return renderDates;
|
|
16069
16218
|
};
|
|
16070
16219
|
ResourceBase.prototype.filterData = function (dataSource, field, value) {
|
|
16071
|
-
return dataSource.filter(function (data) { return data[field] === value; });
|
|
16220
|
+
return dataSource.filter(function (data) { return data["" + field] === value; });
|
|
16072
16221
|
};
|
|
16073
16222
|
ResourceBase.prototype.getResourceData = function (eventObj, index, groupEditIndex) {
|
|
16074
16223
|
if (this.parent.activeViewOptions.group.allowGroupEdit) {
|
|
16075
16224
|
var resourceObj = {};
|
|
16076
16225
|
for (var _i = 0, groupEditIndex_1 = groupEditIndex; _i < groupEditIndex_1.length; _i++) {
|
|
16077
16226
|
var groupIndex = groupEditIndex_1[_i];
|
|
16078
|
-
var resourceLevel = this.lastResourceLevel[groupIndex].groupOrder;
|
|
16227
|
+
var resourceLevel = this.lastResourceLevel[parseInt(groupIndex.toString(), 10)].groupOrder;
|
|
16079
16228
|
for (var level = 0, length_3 = resourceLevel.length; level < length_3; level++) {
|
|
16080
|
-
var fieldName = this.resourceCollection[level].field;
|
|
16081
|
-
if (isNullOrUndefined(resourceObj[fieldName])) {
|
|
16082
|
-
resourceObj[fieldName] = [];
|
|
16229
|
+
var fieldName = this.resourceCollection[parseInt(level.toString(), 10)].field;
|
|
16230
|
+
if (isNullOrUndefined(resourceObj["" + fieldName])) {
|
|
16231
|
+
resourceObj["" + fieldName] = [];
|
|
16083
16232
|
}
|
|
16084
|
-
resourceObj[fieldName].push(resourceLevel[level]);
|
|
16233
|
+
resourceObj["" + fieldName].push(resourceLevel[parseInt(level.toString(), 10)]);
|
|
16085
16234
|
}
|
|
16086
16235
|
}
|
|
16087
16236
|
eventObj = extend(eventObj, resourceObj);
|
|
16088
16237
|
}
|
|
16089
16238
|
else {
|
|
16090
16239
|
for (var level = 0, length_4 = this.resourceCollection.length; level < length_4; level++) {
|
|
16091
|
-
if (this.lastResourceLevel[index]) {
|
|
16092
|
-
eventObj[this.resourceCollection[level].field] = this.lastResourceLevel[index].groupOrder[level];
|
|
16240
|
+
if (this.lastResourceLevel[parseInt(index.toString(), 10)]) {
|
|
16241
|
+
eventObj[this.resourceCollection[parseInt(level.toString(), 10)].field] = this.lastResourceLevel[parseInt(index.toString(), 10)].groupOrder[parseInt(level.toString(), 10)];
|
|
16093
16242
|
}
|
|
16094
16243
|
}
|
|
16095
16244
|
}
|
|
16096
16245
|
};
|
|
16097
16246
|
ResourceBase.prototype.addResource = function (resources, name, index) {
|
|
16098
16247
|
var resourceCollection = (resources instanceof Array) ? resources : [resources];
|
|
16099
|
-
var
|
|
16248
|
+
var _loop_6 = function (resource) {
|
|
16100
16249
|
if (resource.name === name) {
|
|
16101
16250
|
resourceCollection.forEach(function (addObj, i) {
|
|
16102
16251
|
return new DataManager({ json: resource.dataSource }).insert(addObj, null, null, index + i);
|
|
@@ -16106,7 +16255,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
16106
16255
|
};
|
|
16107
16256
|
for (var _i = 0, _a = this.parent.resourceCollection; _i < _a.length; _i++) {
|
|
16108
16257
|
var resource = _a[_i];
|
|
16109
|
-
var state_1 =
|
|
16258
|
+
var state_1 = _loop_6(resource);
|
|
16110
16259
|
if (state_1 === "break")
|
|
16111
16260
|
break;
|
|
16112
16261
|
}
|
|
@@ -16114,7 +16263,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
16114
16263
|
};
|
|
16115
16264
|
ResourceBase.prototype.removeResource = function (resourceId, name) {
|
|
16116
16265
|
var resourceCollection = (resourceId instanceof Array) ? resourceId : [resourceId];
|
|
16117
|
-
var
|
|
16266
|
+
var _loop_7 = function (resource) {
|
|
16118
16267
|
if (resource.name === name) {
|
|
16119
16268
|
resourceCollection.forEach(function (removeObj) {
|
|
16120
16269
|
return new DataManager({ json: resource.dataSource }).remove(resource.idField, removeObj);
|
|
@@ -16124,7 +16273,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
16124
16273
|
};
|
|
16125
16274
|
for (var _i = 0, _a = this.parent.resourceCollection; _i < _a.length; _i++) {
|
|
16126
16275
|
var resource = _a[_i];
|
|
16127
|
-
var state_2 =
|
|
16276
|
+
var state_2 = _loop_7(resource);
|
|
16128
16277
|
if (state_2 === "break")
|
|
16129
16278
|
break;
|
|
16130
16279
|
}
|
|
@@ -16140,7 +16289,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
16140
16289
|
}
|
|
16141
16290
|
var resource = resourceData.dataSource.filter(function (e) {
|
|
16142
16291
|
if (event && e[resourceData.idField] === id) {
|
|
16143
|
-
if (e[resourceData.groupIDField] === event[parentField]) {
|
|
16292
|
+
if (e[resourceData.groupIDField] === event["" + parentField]) {
|
|
16144
16293
|
return e[resourceData.idField] === id;
|
|
16145
16294
|
}
|
|
16146
16295
|
return null;
|
|
@@ -16243,7 +16392,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
16243
16392
|
}
|
|
16244
16393
|
var offsetTarget = this.parent.element.querySelector("." + HEADER_ROW_CLASS + ":nth-child(" + (levelIndex + 1) + ")");
|
|
16245
16394
|
var offset = [].slice.call(offsetTarget.children).map(function (node) { return node.offsetLeft; });
|
|
16246
|
-
scrollElement.scrollLeft = offset[index];
|
|
16395
|
+
scrollElement.scrollLeft = offset[parseInt(index.toString(), 10)];
|
|
16247
16396
|
}
|
|
16248
16397
|
};
|
|
16249
16398
|
ResourceBase.prototype.destroy = function () {
|
|
@@ -16459,7 +16608,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16459
16608
|
};
|
|
16460
16609
|
Schedule.prototype.getViewIndex = function (viewName) {
|
|
16461
16610
|
for (var item = 0; item < this.viewCollections.length; item++) {
|
|
16462
|
-
var checkIndex = this.viewCollections[item].option;
|
|
16611
|
+
var checkIndex = this.viewCollections[parseInt(item.toString(), 10)].option;
|
|
16463
16612
|
if (checkIndex === viewName) {
|
|
16464
16613
|
return item;
|
|
16465
16614
|
}
|
|
@@ -16496,6 +16645,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16496
16645
|
var fieldViewName = viewName.charAt(0).toLowerCase() + viewName.slice(1);
|
|
16497
16646
|
obj.cellHeaderTemplateName = obj.cellHeaderTemplate ? obj.option : '';
|
|
16498
16647
|
obj.dateHeaderTemplateName = obj.dateHeaderTemplate ? obj.option : '';
|
|
16648
|
+
obj.dateRangeTemplateName = obj.dateRangeTemplate ? obj.option : '';
|
|
16499
16649
|
obj.cellTemplateName = obj.cellTemplate ? obj.option : '';
|
|
16500
16650
|
obj.dayHeaderTemplateName = obj.dayHeaderTemplate ? obj.option : '';
|
|
16501
16651
|
obj.monthHeaderTemplateName = obj.monthHeaderTemplate ? obj.option : '';
|
|
@@ -16509,11 +16659,11 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16509
16659
|
delete obj.interval;
|
|
16510
16660
|
}
|
|
16511
16661
|
this.viewCollections.push(obj);
|
|
16512
|
-
if (isNullOrUndefined(this.viewOptions[fieldViewName])) {
|
|
16513
|
-
this.viewOptions[fieldViewName] = [obj];
|
|
16662
|
+
if (isNullOrUndefined(this.viewOptions["" + fieldViewName])) {
|
|
16663
|
+
this.viewOptions["" + fieldViewName] = [obj];
|
|
16514
16664
|
}
|
|
16515
16665
|
else {
|
|
16516
|
-
this.viewOptions[fieldViewName].push(obj);
|
|
16666
|
+
this.viewOptions["" + fieldViewName].push(obj);
|
|
16517
16667
|
}
|
|
16518
16668
|
count++;
|
|
16519
16669
|
}
|
|
@@ -16541,7 +16691,8 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16541
16691
|
allowGroupEdit: this.group.allowGroupEdit,
|
|
16542
16692
|
resources: this.group.resources,
|
|
16543
16693
|
headerTooltipTemplate: this.group.headerTooltipTemplate,
|
|
16544
|
-
enableCompactView: this.group.enableCompactView
|
|
16694
|
+
enableCompactView: this.group.enableCompactView,
|
|
16695
|
+
hideNonWorkingDays: ['Day', 'Week', 'WorkWeek', 'Month'].indexOf(this.currentView) > -1 ? this.group.hideNonWorkingDays : false
|
|
16545
16696
|
};
|
|
16546
16697
|
var workDays = this.viewCollections[this.viewIndex].workDays ? [] : this.workDays;
|
|
16547
16698
|
var scheduleOptions = {
|
|
@@ -16558,6 +16709,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16558
16709
|
cellTemplate: this.cellTemplate,
|
|
16559
16710
|
eventTemplate: this.eventSettings.template,
|
|
16560
16711
|
dateHeaderTemplate: this.dateHeaderTemplate,
|
|
16712
|
+
dateRangeTemplate: this.dateRangeTemplate,
|
|
16561
16713
|
resourceHeaderTemplate: this.resourceHeaderTemplate,
|
|
16562
16714
|
headerIndentTemplate: this.headerIndentTemplate,
|
|
16563
16715
|
firstMonthOfYear: this.firstMonthOfYear,
|
|
@@ -16637,6 +16789,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16637
16789
|
this.monthHeaderTemplateFn = this.templateParser(this.activeViewOptions.monthHeaderTemplate);
|
|
16638
16790
|
this.cellTemplateFn = this.templateParser(this.activeViewOptions.cellTemplate);
|
|
16639
16791
|
this.dateHeaderTemplateFn = this.templateParser(this.activeViewOptions.dateHeaderTemplate);
|
|
16792
|
+
this.dateRangeTemplateFn = this.templateParser(this.activeViewOptions.dateRangeTemplate);
|
|
16640
16793
|
this.majorSlotTemplateFn = this.templateParser(this.activeViewOptions.timeScale.majorSlotTemplate);
|
|
16641
16794
|
this.minorSlotTemplateFn = this.templateParser(this.activeViewOptions.timeScale.minorSlotTemplate);
|
|
16642
16795
|
this.appointmentTemplateFn = this.templateParser(this.activeViewOptions.eventTemplate);
|
|
@@ -16749,16 +16902,18 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16749
16902
|
if (!muteOnChange && index === this.viewIndex && this.currentView === view || index < 0) {
|
|
16750
16903
|
return;
|
|
16751
16904
|
}
|
|
16752
|
-
this.
|
|
16905
|
+
var previousView = this.activeViewOptions ? this.activeViewOptions.option : this.currentView;
|
|
16753
16906
|
var args = { requestType: 'viewNavigate', cancel: false, event: event };
|
|
16754
16907
|
this.trigger(actionBegin, args, function (actionArgs) {
|
|
16755
16908
|
if (!actionArgs.cancel) {
|
|
16756
16909
|
var navArgs = {
|
|
16757
|
-
action: 'view', cancel: false, currentDate: _this.selectedDate, previousView:
|
|
16910
|
+
action: 'view', cancel: false, currentDate: _this.selectedDate, previousView: previousView, currentView: view, viewIndex: index
|
|
16758
16911
|
};
|
|
16759
16912
|
_this.trigger(navigating, navArgs, function (navigationArgs) {
|
|
16760
16913
|
if (!navigationArgs.cancel) {
|
|
16761
|
-
|
|
16914
|
+
var isVertical = ['Day', 'Week', 'WorkWeek'].indexOf(view) > -1 && ['Day', 'Week', 'WorkWeek'].indexOf(previousView) < 0;
|
|
16915
|
+
_this.uiStateValues.isInitial = isVertical || view.indexOf('Timeline') > -1 || view.indexOf('Year') > -1;
|
|
16916
|
+
_this.uiStateValues.top = view.indexOf('Timeline') > -1 && previousView.indexOf('Timeline') < 0 ? 0 : _this.uiStateValues.top;
|
|
16762
16917
|
_this.viewIndex = navigationArgs.viewIndex;
|
|
16763
16918
|
_this.setProperties({ currentView: view }, true);
|
|
16764
16919
|
if (_this.headerModule) {
|
|
@@ -16771,8 +16926,14 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16771
16926
|
args = { requestType: 'viewNavigate', cancel: false, event: event };
|
|
16772
16927
|
_this.trigger(actionComplete, args);
|
|
16773
16928
|
}
|
|
16929
|
+
else {
|
|
16930
|
+
_this.currentView = previousView;
|
|
16931
|
+
}
|
|
16774
16932
|
});
|
|
16775
16933
|
}
|
|
16934
|
+
else {
|
|
16935
|
+
_this.currentView = previousView;
|
|
16936
|
+
}
|
|
16776
16937
|
});
|
|
16777
16938
|
};
|
|
16778
16939
|
/**
|
|
@@ -16793,7 +16954,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
16793
16954
|
};
|
|
16794
16955
|
_this.trigger(navigating, navArgs, function (navigationArgs) {
|
|
16795
16956
|
if (!navigationArgs.cancel) {
|
|
16796
|
-
_this.uiStateValues.isInitial = _this.activeView.isTimelineView()
|
|
16957
|
+
_this.uiStateValues.isInitial = _this.activeView.isTimelineView() && _this.currentView !== 'TimelineYear';
|
|
16797
16958
|
_this.validateDate(navigationArgs.currentDate);
|
|
16798
16959
|
if (_this.headerModule) {
|
|
16799
16960
|
_this.headerModule.setCalendarDate(navigationArgs.currentDate);
|
|
@@ -17200,6 +17361,15 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17200
17361
|
Schedule.prototype.getDateHeaderTemplate = function () {
|
|
17201
17362
|
return this.dateHeaderTemplateFn;
|
|
17202
17363
|
};
|
|
17364
|
+
/**
|
|
17365
|
+
* Method to process date range template
|
|
17366
|
+
*
|
|
17367
|
+
* @returns {CallbackFunction} Returns the callback function
|
|
17368
|
+
* @private
|
|
17369
|
+
*/
|
|
17370
|
+
Schedule.prototype.getDateRangeTemplate = function () {
|
|
17371
|
+
return this.dateRangeTemplateFn;
|
|
17372
|
+
};
|
|
17203
17373
|
/**
|
|
17204
17374
|
* Method to process major slot template
|
|
17205
17375
|
*
|
|
@@ -17559,14 +17729,14 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17559
17729
|
case 'dateFormat':
|
|
17560
17730
|
this.activeViewOptions = this.getActiveViewOptions();
|
|
17561
17731
|
if (this.headerModule) {
|
|
17562
|
-
this.headerModule.updateDateRange(
|
|
17732
|
+
this.headerModule.updateDateRange();
|
|
17563
17733
|
}
|
|
17564
17734
|
break;
|
|
17565
17735
|
case 'showHeaderBar':
|
|
17566
17736
|
this.destroyHeaderModule();
|
|
17567
17737
|
if (newProp.showHeaderBar) {
|
|
17568
17738
|
this.headerModule = new HeaderRenderer(this);
|
|
17569
|
-
this.headerModule.updateDateRange(
|
|
17739
|
+
this.headerModule.updateDateRange();
|
|
17570
17740
|
}
|
|
17571
17741
|
this.notify(scrollUiUpdate, { cssProperties: this.getCssProperties() });
|
|
17572
17742
|
if (this.activeView.isTimelineView()) {
|
|
@@ -17623,6 +17793,13 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17623
17793
|
this.dateHeaderTemplateFn = this.templateParser(this.activeViewOptions.dateHeaderTemplate);
|
|
17624
17794
|
state.isLayout = true;
|
|
17625
17795
|
break;
|
|
17796
|
+
case 'dateRangeTemplate':
|
|
17797
|
+
this.activeViewOptions.dateRangeTemplate = newProp.dateRangeTemplate;
|
|
17798
|
+
this.dateRangeTemplateFn = this.templateParser(this.activeViewOptions.dateRangeTemplate);
|
|
17799
|
+
if (this.headerModule) {
|
|
17800
|
+
this.headerModule.updateDateRange();
|
|
17801
|
+
}
|
|
17802
|
+
break;
|
|
17626
17803
|
case 'dayHeaderTemplate':
|
|
17627
17804
|
this.activeViewOptions.dayHeaderTemplate = newProp.dayHeaderTemplate;
|
|
17628
17805
|
this.dayHeaderTemplateFn = this.templateParser(this.activeViewOptions.dayHeaderTemplate);
|
|
@@ -17802,7 +17979,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17802
17979
|
if (this.showHeaderBar && this.headerModule) {
|
|
17803
17980
|
this.destroyHeaderModule();
|
|
17804
17981
|
this.headerModule = new HeaderRenderer(this);
|
|
17805
|
-
this.headerModule.updateDateRange(
|
|
17982
|
+
this.headerModule.updateDateRange();
|
|
17806
17983
|
}
|
|
17807
17984
|
state.isLayout = true;
|
|
17808
17985
|
break;
|
|
@@ -17825,7 +18002,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17825
18002
|
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
17826
18003
|
var prop = _a[_i];
|
|
17827
18004
|
if (prop === 'headerTooltipTemplate') {
|
|
17828
|
-
this.headerTooltipTemplateFn = this.templateParser(newProp
|
|
18005
|
+
this.headerTooltipTemplateFn = this.templateParser(newProp.headerTooltipTemplate);
|
|
17829
18006
|
}
|
|
17830
18007
|
else {
|
|
17831
18008
|
state.isLayout = true;
|
|
@@ -18000,7 +18177,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18000
18177
|
resetTime(date);
|
|
18001
18178
|
var renderDates = this.activeView.renderDates;
|
|
18002
18179
|
if (!isNullOrUndefined(groupIndex) && this.resourceBase && !this.activeView.isTimelineView()) {
|
|
18003
|
-
renderDates = this.resourceBase.lastResourceLevel[groupIndex].renderDates;
|
|
18180
|
+
renderDates = this.resourceBase.lastResourceLevel[parseInt(groupIndex.toString(), 10)].renderDates;
|
|
18004
18181
|
}
|
|
18005
18182
|
var colIndex = this.getIndexOfDate(renderDates, date);
|
|
18006
18183
|
if (colIndex >= 0) {
|
|
@@ -18012,16 +18189,16 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18012
18189
|
for (var i = startIndex; i < endIndex; i++) {
|
|
18013
18190
|
if (this.activeView.isTimelineView()) {
|
|
18014
18191
|
var rowIndex = (!isNullOrUndefined(groupIndex)) ? groupIndex : 0;
|
|
18015
|
-
cells.push(tableEle.rows[rowIndex].cells[i]);
|
|
18192
|
+
cells.push(tableEle.rows[parseInt(rowIndex.toString(), 10)].cells[parseInt(i.toString(), 10)]);
|
|
18016
18193
|
}
|
|
18017
18194
|
else {
|
|
18018
18195
|
if (!isNullOrUndefined(groupIndex)) {
|
|
18019
18196
|
var selector = '.' + WORK_CELLS_CLASS + '[data-group-index="' + groupIndex + '"]';
|
|
18020
|
-
var tds = [].slice.call(tableEle.rows[i].querySelectorAll(selector));
|
|
18021
|
-
cells.push(tds[colIndex]);
|
|
18197
|
+
var tds = [].slice.call(tableEle.rows[parseInt(i.toString(), 10)].querySelectorAll(selector));
|
|
18198
|
+
cells.push(tds[parseInt(colIndex.toString(), 10)]);
|
|
18022
18199
|
}
|
|
18023
18200
|
else {
|
|
18024
|
-
cells.push(tableEle.rows[i].cells[colIndex]);
|
|
18201
|
+
cells.push(tableEle.rows[parseInt(i.toString(), 10)].cells[parseInt(colIndex.toString(), 10)]);
|
|
18025
18202
|
}
|
|
18026
18203
|
}
|
|
18027
18204
|
}
|
|
@@ -18106,7 +18283,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18106
18283
|
Schedule.prototype.changeCurrentView = function (viewName, viewIndex) {
|
|
18107
18284
|
var index = this.getViewIndex(viewName);
|
|
18108
18285
|
var view = viewName.charAt(0).toLowerCase() + viewName.slice(1);
|
|
18109
|
-
var viewOptions = this.viewOptions[view];
|
|
18286
|
+
var viewOptions = this.viewOptions["" + view];
|
|
18110
18287
|
if (viewOptions) {
|
|
18111
18288
|
index = this.viewCollections.indexOf(viewOptions[viewIndex || 0]);
|
|
18112
18289
|
}
|
|
@@ -18135,7 +18312,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18135
18312
|
if (index < 0 || index >= this.resourceBase.lastResourceLevel.length) {
|
|
18136
18313
|
return undefined;
|
|
18137
18314
|
}
|
|
18138
|
-
var data = this.resourceBase.lastResourceLevel[index];
|
|
18315
|
+
var data = this.resourceBase.lastResourceLevel[parseInt(index.toString(), 10)];
|
|
18139
18316
|
var groupData = {};
|
|
18140
18317
|
this.resourceBase.setResourceValues(groupData, index);
|
|
18141
18318
|
return { resource: data.resource, resourceData: data.resourceData, groupData: groupData };
|
|
@@ -18477,6 +18654,12 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18477
18654
|
this.dateHeaderTemplateFn = this.templateParser(this.activeViewOptions.dateHeaderTemplate);
|
|
18478
18655
|
this.activeView.refreshHeader();
|
|
18479
18656
|
break;
|
|
18657
|
+
case 'dateRangeTemplate':
|
|
18658
|
+
this.dateRangeTemplateFn = this.templateParser(this.activeViewOptions.dateRangeTemplate);
|
|
18659
|
+
if (this.headerModule) {
|
|
18660
|
+
this.headerModule.refresh();
|
|
18661
|
+
}
|
|
18662
|
+
break;
|
|
18480
18663
|
case 'resourceHeaderTemplate':
|
|
18481
18664
|
this.resourceHeaderTemplateFn = this.templateParser(this.activeViewOptions.resourceHeaderTemplate);
|
|
18482
18665
|
if (this.activeView.isTimelineView()) {
|
|
@@ -18582,7 +18765,8 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18582
18765
|
eventEnd = this.getDateTime(eventEnd);
|
|
18583
18766
|
var eventCollection = this.eventBase.filterEvents(eventStart, eventEnd);
|
|
18584
18767
|
if (!isNullOrUndefined(groupIndex) && this.resourceBase && this.resourceBase.lastResourceLevel.length > 0) {
|
|
18585
|
-
eventCollection =
|
|
18768
|
+
eventCollection =
|
|
18769
|
+
this.eventBase.filterEventsByResource(this.resourceBase.lastResourceLevel[parseInt(groupIndex.toString(), 10)], eventCollection);
|
|
18586
18770
|
}
|
|
18587
18771
|
if (eventObj) {
|
|
18588
18772
|
if (eventObj.Guid) {
|
|
@@ -18715,6 +18899,19 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18715
18899
|
this.quickPopup.quickPopupHide(true);
|
|
18716
18900
|
}
|
|
18717
18901
|
};
|
|
18902
|
+
/**
|
|
18903
|
+
* Closes the tooltip.
|
|
18904
|
+
* For example, when the context menu is opened for an event,
|
|
18905
|
+
* the tooltip can be closed by calling this method.
|
|
18906
|
+
*
|
|
18907
|
+
* @function closeTooltip
|
|
18908
|
+
* @returns {void}
|
|
18909
|
+
*/
|
|
18910
|
+
Schedule.prototype.closeTooltip = function () {
|
|
18911
|
+
if (this.eventTooltip) {
|
|
18912
|
+
this.eventTooltip.close();
|
|
18913
|
+
}
|
|
18914
|
+
};
|
|
18718
18915
|
/**
|
|
18719
18916
|
* Select the resource based on group index in mobile mode.
|
|
18720
18917
|
*
|
|
@@ -18827,7 +19024,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18827
19024
|
];
|
|
18828
19025
|
for (var _i = 0, modules_1 = modules; _i < modules_1.length; _i++) {
|
|
18829
19026
|
var module = modules_1[_i];
|
|
18830
|
-
this[module] = null;
|
|
19027
|
+
this["" + module] = null;
|
|
18831
19028
|
}
|
|
18832
19029
|
removeChildren(this.element);
|
|
18833
19030
|
var removeClasses = [ROOT, RTL, DEVICE_CLASS, MULTI_DRAG];
|
|
@@ -18920,6 +19117,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18920
19117
|
__decorate([
|
|
18921
19118
|
Property()
|
|
18922
19119
|
], Schedule.prototype, "dateHeaderTemplate", void 0);
|
|
19120
|
+
__decorate([
|
|
19121
|
+
Property()
|
|
19122
|
+
], Schedule.prototype, "dateRangeTemplate", void 0);
|
|
18923
19123
|
__decorate([
|
|
18924
19124
|
Property()
|
|
18925
19125
|
], Schedule.prototype, "cellHeaderTemplate", void 0);
|
|
@@ -19223,8 +19423,8 @@ var ActionBase = /** @__PURE__ @class */ (function () {
|
|
|
19223
19423
|
var startTime = this.actionObj.start;
|
|
19224
19424
|
var endTime = this.actionObj.end;
|
|
19225
19425
|
if (multiData && multiData.length > 0) {
|
|
19226
|
-
startTime = multiData[index][this.parent.eventFields.startTime];
|
|
19227
|
-
endTime = multiData[index][this.parent.eventFields.endTime];
|
|
19426
|
+
startTime = multiData[parseInt(index.toString(), 10)][this.parent.eventFields.startTime];
|
|
19427
|
+
endTime = multiData[parseInt(index.toString(), 10)][this.parent.eventFields.endTime];
|
|
19228
19428
|
}
|
|
19229
19429
|
timeElement.innerHTML = this.parent.getTimeString(startTime) + ' - ' +
|
|
19230
19430
|
this.parent.getTimeString(endTime);
|
|
@@ -19522,7 +19722,7 @@ var ActionBase = /** @__PURE__ @class */ (function () {
|
|
|
19522
19722
|
addClass([appointmentElement], CLONE_ELEMENT_CLASS);
|
|
19523
19723
|
this.monthEvent.applyResourceColor(appointmentElement, event_1, 'backgroundColor', groupOrder);
|
|
19524
19724
|
setStyleAttribute(appointmentElement, { 'width': appWidth + 'px', 'border': '0px', 'pointer-events': 'none' });
|
|
19525
|
-
var cellTd = workCells[day];
|
|
19725
|
+
var cellTd = workCells[parseInt(day.toString(), 10)];
|
|
19526
19726
|
if (cellTd && isNullOrUndefined(this.parent.eventDragArea)) {
|
|
19527
19727
|
this.monthEvent.renderElement(cellTd, appointmentElement, true);
|
|
19528
19728
|
this.actionObj.cloneElement.push(appointmentElement);
|
|
@@ -19573,9 +19773,9 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19573
19773
|
Resize.prototype.resizeHelper = function () {
|
|
19574
19774
|
if (this.parent.activeViewOptions.group.resources.length > 0 && this.parent.activeViewOptions.group.allowGroupEdit) {
|
|
19575
19775
|
for (var i = 0, len = this.actionObj.originalElement.length; i < len; i++) {
|
|
19576
|
-
var cloneElement = this.createCloneElement(this.actionObj.originalElement[i]);
|
|
19577
|
-
this.actionObj.cloneElement[i] = cloneElement;
|
|
19578
|
-
if (this.actionObj.element === this.actionObj.originalElement[i]) {
|
|
19776
|
+
var cloneElement = this.createCloneElement(this.actionObj.originalElement[parseInt(i.toString(), 10)]);
|
|
19777
|
+
this.actionObj.cloneElement[parseInt(i.toString(), 10)] = cloneElement;
|
|
19778
|
+
if (this.actionObj.element === this.actionObj.originalElement[parseInt(i.toString(), 10)]) {
|
|
19579
19779
|
this.actionObj.clone = cloneElement;
|
|
19580
19780
|
}
|
|
19581
19781
|
}
|
|
@@ -19940,10 +20140,10 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19940
20140
|
}
|
|
19941
20141
|
var resizeDate = void 0;
|
|
19942
20142
|
if (['Year', 'Month', 'Week', 'Date'].indexOf(headerName) !== -1) {
|
|
19943
|
-
resizeDate = new Date(this.parent.activeView.renderDates[cellIndex].getTime());
|
|
20143
|
+
resizeDate = new Date(this.parent.activeView.renderDates[parseInt(cellIndex.toString(), 10)].getTime());
|
|
19944
20144
|
}
|
|
19945
20145
|
else {
|
|
19946
|
-
resizeDate = this.parent.getDateFromElement(tr.children[cellIndex]);
|
|
20146
|
+
resizeDate = this.parent.getDateFromElement(tr.children[parseInt(cellIndex.toString(), 10)]);
|
|
19947
20147
|
}
|
|
19948
20148
|
if (['TimelineMonth', 'Year', 'Month', 'Week', 'Date'].indexOf(headerName) !== -1 ||
|
|
19949
20149
|
!this.parent.activeViewOptions.timeScale.enable) {
|
|
@@ -19970,7 +20170,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19970
20170
|
var tr = closest(this.actionObj.clone, 'tr');
|
|
19971
20171
|
var dayIndex = isLeft ? cloneIndex - noOfDays : cloneIndex + noOfDays - 1;
|
|
19972
20172
|
dayIndex = this.getIndex(dayIndex);
|
|
19973
|
-
resizeTime = this.parent.getDateFromElement(tr.children[dayIndex]);
|
|
20173
|
+
resizeTime = this.parent.getDateFromElement(tr.children[parseInt(dayIndex.toString(), 10)]);
|
|
19974
20174
|
if (isLeft) {
|
|
19975
20175
|
resizeTime.setHours(eventStart.getHours(), eventStart.getMinutes(), eventStart.getSeconds());
|
|
19976
20176
|
}
|
|
@@ -20188,14 +20388,17 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20188
20388
|
for (var index = 0; startDate.getTime() < endDate.getTime(); index++) {
|
|
20189
20389
|
var start = resetTime(new Date(startDate.getTime()));
|
|
20190
20390
|
var end = addDays(new Date(start.getTime()), 1);
|
|
20391
|
+
startDate = addDays(new Date(startDate.getTime()), 1);
|
|
20392
|
+
if (!this.parent.isMinMaxDate(start)) {
|
|
20393
|
+
continue;
|
|
20394
|
+
}
|
|
20191
20395
|
var filterEvents = this.parent.eventBase.filterEvents(start, end);
|
|
20192
20396
|
if (filterEvents.length > 0) {
|
|
20193
|
-
var workCell = workCells[index];
|
|
20397
|
+
var workCell = workCells[parseInt(index.toString(), 10)];
|
|
20194
20398
|
if (workCell) {
|
|
20195
20399
|
workCell.appendChild(createElement('div', { className: APPOINTMENT_CLASS }));
|
|
20196
20400
|
}
|
|
20197
20401
|
}
|
|
20198
|
-
startDate = addDays(new Date(startDate.getTime()), 1);
|
|
20199
20402
|
}
|
|
20200
20403
|
}
|
|
20201
20404
|
};
|
|
@@ -20207,12 +20410,14 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20207
20410
|
this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
|
|
20208
20411
|
var wrapperCollection = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
|
|
20209
20412
|
var months = this.getMonths();
|
|
20413
|
+
var groupIndex = (this.parent.activeViewOptions.group.resources.length > 0 && this.parent.uiStateValues.isGroupAdaptive) ?
|
|
20414
|
+
this.parent.uiStateValues.groupIndex : undefined;
|
|
20210
20415
|
for (var row = 0; row < months.length; row++) {
|
|
20211
|
-
var wrapper = wrapperCollection[row];
|
|
20416
|
+
var wrapper = wrapperCollection[parseInt(row.toString(), 10)];
|
|
20212
20417
|
var td = row + 1;
|
|
20213
20418
|
var eventWrapper = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
|
|
20214
20419
|
wrapper.appendChild(eventWrapper);
|
|
20215
|
-
var monthStart = new Date(this.parent.selectedDate.getFullYear(), months[row], 1);
|
|
20420
|
+
var monthStart = new Date(this.parent.selectedDate.getFullYear(), months[parseInt(row.toString(), 10)], 1);
|
|
20216
20421
|
var monthEnd = new Date(monthStart.getFullYear(), monthStart.getMonth() + 1, 0);
|
|
20217
20422
|
var dayIndex = monthStart.getDay();
|
|
20218
20423
|
var isSpannedCollection = [];
|
|
@@ -20223,7 +20428,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20223
20428
|
var leftValue = void 0;
|
|
20224
20429
|
var rightValue = void 0;
|
|
20225
20430
|
if (this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
20226
|
-
var wrapper_1 = wrapperCollection[dayIndex];
|
|
20431
|
+
var wrapper_1 = wrapperCollection[parseInt(dayIndex.toString(), 10)];
|
|
20227
20432
|
td = dayIndex + 1;
|
|
20228
20433
|
var eventWrapper_1 = wrapper_1.querySelector('.' + APPOINTMENT_WRAPPER_CLASS);
|
|
20229
20434
|
if (!eventWrapper_1) {
|
|
@@ -20256,7 +20461,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20256
20461
|
var dayEvents = this.parent.eventBase.filterEvents(dayStart, dayEnd, undefined, resource);
|
|
20257
20462
|
dayEvents = this.parent.eventBase.sortByDateTime(dayEvents);
|
|
20258
20463
|
var _loop_1 = function (index, count) {
|
|
20259
|
-
var eventData = extend({}, dayEvents[index], null, true);
|
|
20464
|
+
var eventData = extend({}, dayEvents[parseInt(index.toString(), 10)], null, true);
|
|
20260
20465
|
this_1.updateSpannedEvents(eventData, dayStart, dayEnd);
|
|
20261
20466
|
var overlapIndex = this_1.getIndex(dayStart);
|
|
20262
20467
|
eventData.Index = overlapIndex;
|
|
@@ -20274,7 +20479,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20274
20479
|
});
|
|
20275
20480
|
if (isRendered.length > 0 && isRendered[0].MoreIndicator || isSpanned.length > 0 && isSpanned[0].MoreIndicator) {
|
|
20276
20481
|
var moreIndex = this_1.parent.activeViewOptions.orientation === 'Horizontal' ? row : dayIndex;
|
|
20277
|
-
this_1.renderMoreIndicator(eventWrapper, moreIndicatorCount, dayStart, moreIndex, leftValue, rightValue);
|
|
20482
|
+
this_1.renderMoreIndicator(eventWrapper, moreIndicatorCount, dayStart, moreIndex, leftValue, rightValue, groupIndex);
|
|
20278
20483
|
return "continue";
|
|
20279
20484
|
}
|
|
20280
20485
|
else if (isRendered.length > 0 || isSpanned.length > 0) {
|
|
@@ -20289,7 +20494,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20289
20494
|
}
|
|
20290
20495
|
else {
|
|
20291
20496
|
var moreIndex = this_1.parent.activeViewOptions.orientation === 'Horizontal' ? row : dayIndex;
|
|
20292
|
-
this_1.renderMoreIndicator(eventWrapper, moreIndicatorCount, dayStart, moreIndex, leftValue, rightValue);
|
|
20497
|
+
this_1.renderMoreIndicator(eventWrapper, moreIndicatorCount, dayStart, moreIndex, leftValue, rightValue, groupIndex);
|
|
20293
20498
|
if (this_1.parent.activeViewOptions.orientation === 'Horizontal') {
|
|
20294
20499
|
eventData.MoreIndicator = true;
|
|
20295
20500
|
this_1.renderedEvents.push(eventData);
|
|
@@ -20346,10 +20551,10 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20346
20551
|
var months = this.getMonths();
|
|
20347
20552
|
if (this.parent.activeViewOptions.orientation === 'Horizontal') {
|
|
20348
20553
|
for (var month = 0; month < months.length; month++) {
|
|
20349
|
-
var monthStart = new Date(this.parent.selectedDate.getFullYear(), months[month], 1);
|
|
20554
|
+
var monthStart = new Date(this.parent.selectedDate.getFullYear(), months[parseInt(month.toString(), 10)], 1);
|
|
20350
20555
|
for (var i = 0, len = resources.length; i < len; i++) {
|
|
20351
20556
|
this.renderedEvents = [];
|
|
20352
|
-
this.renderResourceEvent(wrapperCollection[month], resources[i], month, i, monthStart);
|
|
20557
|
+
this.renderResourceEvent(wrapperCollection[parseInt(month.toString(), 10)], resources[parseInt(i.toString(), 10)], month, i, monthStart);
|
|
20353
20558
|
}
|
|
20354
20559
|
}
|
|
20355
20560
|
}
|
|
@@ -20357,8 +20562,8 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20357
20562
|
for (var i = 0, len = resources.length; i < len; i++) {
|
|
20358
20563
|
this.renderedEvents = [];
|
|
20359
20564
|
for (var month = 0; month < months.length; month++) {
|
|
20360
|
-
var monthStart = new Date(this.parent.selectedDate.getFullYear(), months[month], 1);
|
|
20361
|
-
this.renderResourceEvent(wrapperCollection[i], resources[i], month, i, monthStart);
|
|
20565
|
+
var monthStart = new Date(this.parent.selectedDate.getFullYear(), months[parseInt(month.toString(), 10)], 1);
|
|
20566
|
+
this.renderResourceEvent(wrapperCollection[parseInt(i.toString(), 10)], resources[parseInt(i.toString(), 10)], month, i, monthStart);
|
|
20362
20567
|
}
|
|
20363
20568
|
}
|
|
20364
20569
|
}
|
|
@@ -20373,7 +20578,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20373
20578
|
this.cellHeight = td.offsetHeight;
|
|
20374
20579
|
this.groupOrder = resource.groupOrder;
|
|
20375
20580
|
for (var a = 0; a < eventDatas.length; a++) {
|
|
20376
|
-
var data = eventDatas[a];
|
|
20581
|
+
var data = eventDatas[parseInt(a.toString(), 10)];
|
|
20377
20582
|
var overlapIndex = void 0;
|
|
20378
20583
|
var eventData = extend({}, data, null, true);
|
|
20379
20584
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
@@ -20388,6 +20593,9 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20388
20593
|
var availedHeight = this.cellHeader + (this.eventHeight * (a + 1)) + EVENT_GAP$2 + this.moreIndicatorHeight;
|
|
20389
20594
|
var leftValue = (this.parent.activeViewOptions.orientation === 'Vertical') ?
|
|
20390
20595
|
month * this.cellWidth : index * this.cellWidth;
|
|
20596
|
+
if (!this.parent.isMinMaxDate(eventData[this.fields.startTime])) {
|
|
20597
|
+
return;
|
|
20598
|
+
}
|
|
20391
20599
|
if (this.parent.rowAutoHeight || this.cellHeight > availedHeight) {
|
|
20392
20600
|
this.renderEvent(eventWrapper, eventData, month, leftValue, leftValue, monthStart, index);
|
|
20393
20601
|
this.updateCellHeight(td, availedHeight);
|
|
@@ -20397,7 +20605,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20397
20605
|
this.renderMoreIndicator(eventWrapper, eventDatas.length - a, monthStart, moreIndex, leftValue, leftValue, index);
|
|
20398
20606
|
if (this.parent.activeViewOptions.orientation === 'Horizontal') {
|
|
20399
20607
|
for (var i = index; i < eventDatas.length; i++) {
|
|
20400
|
-
this.renderedEvents.push(extend({}, eventDatas[i], { Index: overlapIndex + i }, true));
|
|
20608
|
+
this.renderedEvents.push(extend({}, eventDatas[parseInt(i.toString(), 10)], { Index: overlapIndex + i }, true));
|
|
20401
20609
|
}
|
|
20402
20610
|
}
|
|
20403
20611
|
break;
|
|
@@ -20458,7 +20666,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20458
20666
|
return;
|
|
20459
20667
|
}
|
|
20460
20668
|
var endDate;
|
|
20461
|
-
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
20669
|
+
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
20462
20670
|
endDate = addDays(lastDateOfMonth(new Date(startDate.getTime())), 1);
|
|
20463
20671
|
}
|
|
20464
20672
|
else {
|
|
@@ -20561,7 +20769,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20561
20769
|
eventData[this.fields.endTime] = monthEnd;
|
|
20562
20770
|
isSpanned.isRight = true;
|
|
20563
20771
|
}
|
|
20564
|
-
if (this.parent.activeViewOptions.group.resources.length === 0) {
|
|
20772
|
+
if (this.parent.activeViewOptions.group.resources.length === 0 || this.parent.uiStateValues.isGroupAdaptive) {
|
|
20565
20773
|
var end = resetTime(eventData[this.fields.endTime]).getTime();
|
|
20566
20774
|
var start = resetTime(eventData[this.fields.startTime]).getTime();
|
|
20567
20775
|
if (eventObj[this.fields.isAllDay] && end === eventObj[this.fields.endTime].getTime() || isSpanned.isRight) {
|
|
@@ -20582,7 +20790,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
20582
20790
|
var appointmentsList = [];
|
|
20583
20791
|
var dateStart;
|
|
20584
20792
|
var dateEnd;
|
|
20585
|
-
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
20793
|
+
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
20586
20794
|
var monthStart = this.parent.calendarUtil.getMonthStartDate(new Date(date.getTime()));
|
|
20587
20795
|
var monthEnd = addDays(this.parent.calendarUtil.getMonthEndDate(new Date(date.getTime())), -1);
|
|
20588
20796
|
dateStart = resetTime(new Date(monthStart.getTime())).getTime();
|
|
@@ -21027,7 +21235,8 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21027
21235
|
_this.parent.crudModule.crudObj.sourceEvent =
|
|
21028
21236
|
[_this.parent.resourceBase.lastResourceLevel[parseInt(dragArgs.element.getAttribute('data-group-index'), 10)]];
|
|
21029
21237
|
var currentGroupIndex = parseInt(dragArgs.target.getAttribute('data-group-index'), 10) || _this.actionObj.groupIndex;
|
|
21030
|
-
_this.parent.crudModule.crudObj.targetEvent =
|
|
21238
|
+
_this.parent.crudModule.crudObj.targetEvent =
|
|
21239
|
+
[_this.parent.resourceBase.lastResourceLevel[parseInt(currentGroupIndex.toString(), 10)]];
|
|
21031
21240
|
}
|
|
21032
21241
|
_this.saveChangedData(dragEventArgs, _this.isMultiSelect);
|
|
21033
21242
|
});
|
|
@@ -21222,7 +21431,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21222
21431
|
}
|
|
21223
21432
|
else {
|
|
21224
21433
|
var trCollections = [].slice.call(this.parent.getContentTable().querySelectorAll('tr'));
|
|
21225
|
-
tr = trCollections[rowIndex];
|
|
21434
|
+
tr = trCollections[parseInt(rowIndex.toString(), 10)];
|
|
21226
21435
|
}
|
|
21227
21436
|
var index;
|
|
21228
21437
|
if (closest(this.actionObj.target, 'td').classList.contains(WORK_CELLS_CLASS) ||
|
|
@@ -21234,7 +21443,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21234
21443
|
if (isNullOrUndefined(tr)) {
|
|
21235
21444
|
return;
|
|
21236
21445
|
}
|
|
21237
|
-
var td = tr.children[colIndex];
|
|
21446
|
+
var td = tr.children[parseInt(colIndex.toString(), 10)];
|
|
21238
21447
|
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
21239
21448
|
this.actionObj.groupIndex = parseInt(td.getAttribute('data-group-index'), 10);
|
|
21240
21449
|
}
|
|
@@ -21299,16 +21508,17 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21299
21508
|
}
|
|
21300
21509
|
var startTimeDiff = event[this.parent.eventFields.startTime].getTime() - this.startTime;
|
|
21301
21510
|
for (var index_2 = 0; index_2 < this.multiData.length; index_2++) {
|
|
21302
|
-
this.updatedData[index_2
|
|
21303
|
-
|
|
21511
|
+
this.updatedData[parseInt(index_2.toString(), 10)] =
|
|
21512
|
+
this.updateMultipleData(this.multiData[parseInt(index_2.toString(), 10)], startTimeDiff);
|
|
21513
|
+
var dayIndex = this.getDayIndex(this.updatedData[parseInt(index_2.toString(), 10)]);
|
|
21304
21514
|
if (dayIndex >= 0) {
|
|
21305
|
-
var wrapper = this.getEventWrapper(dayIndex, this.updatedData[index_2][this.parent.eventFields.isAllDay]);
|
|
21306
|
-
this.appendCloneElement(wrapper, this.actionObj.cloneElement[index_2]);
|
|
21307
|
-
this.updateEventHeight(this.updatedData[index_2], index_2, dayIndex);
|
|
21515
|
+
var wrapper = this.getEventWrapper(dayIndex, this.updatedData[parseInt(index_2.toString(), 10)][this.parent.eventFields.isAllDay]);
|
|
21516
|
+
this.appendCloneElement(wrapper, this.actionObj.cloneElement[parseInt(index_2.toString(), 10)]);
|
|
21517
|
+
this.updateEventHeight(this.updatedData[parseInt(index_2.toString(), 10)], index_2, dayIndex);
|
|
21308
21518
|
}
|
|
21309
21519
|
else {
|
|
21310
|
-
if (!isNullOrUndefined(this.actionObj.cloneElement[index_2].parentNode)) {
|
|
21311
|
-
remove(this.actionObj.cloneElement[index_2]);
|
|
21520
|
+
if (!isNullOrUndefined(this.actionObj.cloneElement[parseInt(index_2.toString(), 10)].parentNode)) {
|
|
21521
|
+
remove(this.actionObj.cloneElement[parseInt(index_2.toString(), 10)]);
|
|
21312
21522
|
}
|
|
21313
21523
|
}
|
|
21314
21524
|
}
|
|
@@ -21336,7 +21546,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21336
21546
|
}
|
|
21337
21547
|
var index = eventData.length - 1;
|
|
21338
21548
|
eventData[0][eventFields.startTime] = startTime;
|
|
21339
|
-
eventData[index][eventFields.endTime] = endTime;
|
|
21549
|
+
eventData[parseInt(index.toString(), 10)][eventFields.endTime] = endTime;
|
|
21340
21550
|
}
|
|
21341
21551
|
else {
|
|
21342
21552
|
eventData.push(event);
|
|
@@ -21393,8 +21603,8 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21393
21603
|
var datesCount = this.verticalEvent.getStartCount();
|
|
21394
21604
|
if (!this.parent.uiStateValues.isGroupAdaptive) {
|
|
21395
21605
|
for (var i = 0; i < this.actionObj.groupIndex; i++) {
|
|
21396
|
-
if (this.verticalEvent.dateRender[i]) {
|
|
21397
|
-
datesCount = datesCount + this.verticalEvent.dateRender[i].length;
|
|
21606
|
+
if (this.verticalEvent.dateRender[parseInt(i.toString(), 10)]) {
|
|
21607
|
+
datesCount = datesCount + this.verticalEvent.dateRender[parseInt(i.toString(), 10)].length;
|
|
21398
21608
|
}
|
|
21399
21609
|
}
|
|
21400
21610
|
}
|
|
@@ -21405,7 +21615,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21405
21615
|
var dynamicIndex = -1;
|
|
21406
21616
|
var dayIndex = !this.parent.activeViewOptions.group.byDate ?
|
|
21407
21617
|
isNullOrUndefined(index) ? this.actionObj.index - datesCount : colIndex - datesCount
|
|
21408
|
-
: this.parent.getIndexOfDate(this.verticalEvent.dateRender[indexGroup], resetTime(
|
|
21618
|
+
: this.parent.getIndexOfDate(this.verticalEvent.dateRender[parseInt(indexGroup.toString(), 10)], resetTime(
|
|
21409
21619
|
// eslint-disable-next-line max-len
|
|
21410
21620
|
this.parent.getDateFromElement(isNullOrUndefined(index) ? this.actionObj.target : this.targetTd)));
|
|
21411
21621
|
var splitEvents = this.splitEvent(event);
|
|
@@ -21413,7 +21623,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21413
21623
|
this.parent.eventSettings.spannedEventPlacement !== 'TimeSlot' ? [event] : splitEvents;
|
|
21414
21624
|
for (var i = 0; i < events_1.length; i++) {
|
|
21415
21625
|
if (i > 0) {
|
|
21416
|
-
var filterQuery = ".e-day-wrapper[data-date=\"" + resetTime(events_1[i][this.parent.eventFields.startTime]).getTime() + "\"]";
|
|
21626
|
+
var filterQuery = ".e-day-wrapper[data-date=\"" + resetTime(events_1[parseInt(i.toString(), 10)][this.parent.eventFields.startTime]).getTime() + "\"]";
|
|
21417
21627
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
21418
21628
|
filterQuery = filterQuery.concat('[data-group-index = "' + this.actionObj.groupIndex + '"]');
|
|
21419
21629
|
}
|
|
@@ -21427,7 +21637,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21427
21637
|
}
|
|
21428
21638
|
}
|
|
21429
21639
|
if (dayIndex >= 0) {
|
|
21430
|
-
var record = this.verticalEvent.isSpannedEvent(events_1[i], dayIndex, indexGroup);
|
|
21640
|
+
var record = this.verticalEvent.isSpannedEvent(events_1[parseInt(i.toString(), 10)], dayIndex, indexGroup);
|
|
21431
21641
|
var eStart = record[this.verticalEvent.fields.startTime];
|
|
21432
21642
|
var eEnd = record[this.verticalEvent.fields.endTime];
|
|
21433
21643
|
var appHeight = this.parent.activeViewOptions.timeScale.enable ? this.verticalEvent.getHeight(eStart, eEnd) :
|
|
@@ -21455,12 +21665,12 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21455
21665
|
appWidth = (allDayDifference * this.actionObj.cellWidth);
|
|
21456
21666
|
}
|
|
21457
21667
|
}
|
|
21458
|
-
if (this.actionObj.cloneElement[index]) {
|
|
21668
|
+
if (this.actionObj.cloneElement[parseInt(index.toString(), 10)]) {
|
|
21459
21669
|
if (i === 0) {
|
|
21460
|
-
this.actionObj.cloneElement[index].style.top = formatUnit(topValue);
|
|
21461
|
-
this.actionObj.cloneElement[index].style.height = formatUnit(appHeight);
|
|
21462
|
-
this.actionObj.cloneElement[index].style.width = formatUnit(appWidth);
|
|
21463
|
-
this.actionObj.cloneElement[index].style.left = formatUnit(0);
|
|
21670
|
+
this.actionObj.cloneElement[parseInt(index.toString(), 10)].style.top = formatUnit(topValue);
|
|
21671
|
+
this.actionObj.cloneElement[parseInt(index.toString(), 10)].style.height = formatUnit(appHeight);
|
|
21672
|
+
this.actionObj.cloneElement[parseInt(index.toString(), 10)].style.width = formatUnit(appWidth);
|
|
21673
|
+
this.actionObj.cloneElement[parseInt(index.toString(), 10)].style.left = formatUnit(0);
|
|
21464
21674
|
}
|
|
21465
21675
|
else {
|
|
21466
21676
|
this.renderSpannedEvents(record, dynamicIndex, topValue, appHeight);
|
|
@@ -21485,7 +21695,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21485
21695
|
'border': '0px'
|
|
21486
21696
|
});
|
|
21487
21697
|
var appointmentWrap = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_WRAPPER_CLASS));
|
|
21488
|
-
appointmentWrap[index].appendChild(appointmentElement);
|
|
21698
|
+
appointmentWrap[parseInt(index.toString(), 10)].appendChild(appointmentElement);
|
|
21489
21699
|
}
|
|
21490
21700
|
};
|
|
21491
21701
|
DragAndDrop.prototype.getRenderedDates = function () {
|
|
@@ -21603,12 +21813,13 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21603
21813
|
startTimeDiff += startTime.getMonth();
|
|
21604
21814
|
}
|
|
21605
21815
|
for (var index = 0; index < this.multiData.length; index++) {
|
|
21606
|
-
this.updatedData[index
|
|
21816
|
+
this.updatedData[parseInt(index.toString(), 10)] =
|
|
21817
|
+
this.updateMultipleVerticalDate(this.multiData[parseInt(index.toString(), 10)], startTimeDiff);
|
|
21607
21818
|
if (this.parent.currentView === 'TimelineYear') {
|
|
21608
|
-
this.dynamicYearlyEventsRendering(this.updatedData[index]);
|
|
21819
|
+
this.dynamicYearlyEventsRendering(this.updatedData[parseInt(index.toString(), 10)]);
|
|
21609
21820
|
}
|
|
21610
21821
|
else {
|
|
21611
|
-
this.dynamicEventsRendering(this.updatedData[index]);
|
|
21822
|
+
this.dynamicEventsRendering(this.updatedData[parseInt(index.toString(), 10)]);
|
|
21612
21823
|
}
|
|
21613
21824
|
}
|
|
21614
21825
|
}
|
|
@@ -21671,8 +21882,8 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21671
21882
|
var tr = this.parent.getContentTable().querySelector('tr');
|
|
21672
21883
|
var index = this.getCursorCurrentIndex(colIndex, cloneIndex, tr);
|
|
21673
21884
|
index = index < 0 ? 0 : index;
|
|
21674
|
-
var eventStart = this.isHeaderRows ? new Date(this.timelineEventModule.dateRender[index].getTime()) :
|
|
21675
|
-
this.parent.getDateFromElement(tr.children[index]);
|
|
21885
|
+
var eventStart = this.isHeaderRows ? new Date(this.timelineEventModule.dateRender[parseInt(index.toString(), 10)].getTime()) :
|
|
21886
|
+
this.parent.getDateFromElement(tr.children[parseInt(index.toString(), 10)]);
|
|
21676
21887
|
if (this.isStepDragging) {
|
|
21677
21888
|
var widthDiff = this.getWidthDiff(tr, index);
|
|
21678
21889
|
if (widthDiff !== 0) {
|
|
@@ -21723,12 +21934,13 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21723
21934
|
if (this.multiData.length > 0) {
|
|
21724
21935
|
var startTimeDiff = eventsData[0][this.parent.eventFields.startTime].getTime() - this.startTime;
|
|
21725
21936
|
for (var i = 0; i < this.multiData.length; i++) {
|
|
21726
|
-
this.updatedData[i
|
|
21937
|
+
this.updatedData[parseInt(i.toString(), 10)] =
|
|
21938
|
+
this.updateMultipleData(this.multiData[parseInt(i.toString(), 10)], startTimeDiff);
|
|
21727
21939
|
}
|
|
21728
21940
|
eventsData = this.updatedData;
|
|
21729
21941
|
}
|
|
21730
21942
|
for (var dataIndex = 0; dataIndex < eventsData.length; dataIndex++) {
|
|
21731
|
-
var events_2 = this.timelineEventModule.splitEvent(eventsData[dataIndex], this.timelineEventModule.dateRender);
|
|
21943
|
+
var events_2 = this.timelineEventModule.splitEvent(eventsData[parseInt(dataIndex.toString(), 10)], this.timelineEventModule.dateRender);
|
|
21732
21944
|
var eventData = events_2[0].data;
|
|
21733
21945
|
var startTime = this.timelineEventModule.getStartTime(events_2[0], eventData);
|
|
21734
21946
|
var endTime = this.timelineEventModule.getEndTime(events_2[0], eventData);
|
|
@@ -21738,7 +21950,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21738
21950
|
var day = this.parent.getIndexOfDate(this.timelineEventModule.dateRender, resetTime(new Date(startTime.getTime())));
|
|
21739
21951
|
day = day < 0 ? 0 : day;
|
|
21740
21952
|
var left = this.timelineEventModule.getPosition(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], day);
|
|
21741
|
-
var cloneElement = this.multiData.length > 0 ? this.actionObj.cloneElement[dataIndex] : this.actionObj.clone;
|
|
21953
|
+
var cloneElement = this.multiData.length > 0 ? this.actionObj.cloneElement[parseInt(dataIndex.toString(), 10)] : this.actionObj.clone;
|
|
21742
21954
|
if (this.parent.enableRtl) {
|
|
21743
21955
|
cloneElement.style.right = formatUnit(left);
|
|
21744
21956
|
}
|
|
@@ -21798,7 +22010,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21798
22010
|
DragAndDrop.prototype.getWidthDiff = function (tr, index) {
|
|
21799
22011
|
var pages = this.scrollArgs.element.getBoundingClientRect();
|
|
21800
22012
|
if (pages.left <= this.actionObj.pageX && pages.right >= this.actionObj.pageX) {
|
|
21801
|
-
var targetLeft = tr.children[index].offsetLeft;
|
|
22013
|
+
var targetLeft = tr.children[parseInt(index.toString(), 10)].offsetLeft;
|
|
21802
22014
|
var pageX = this.actionObj.pageX - pages.left;
|
|
21803
22015
|
if (this.parent.enableRtl) {
|
|
21804
22016
|
return (targetLeft + this.actionObj.cellWidth) - (this.scrollArgs.element.scrollLeft + pageX);
|
|
@@ -21868,7 +22080,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21868
22080
|
var td = closest(this.actionObj.target, 'td');
|
|
21869
22081
|
this.actionObj.groupIndex = (td && !isNaN(parseInt(td.getAttribute('data-group-index'), 10)))
|
|
21870
22082
|
? parseInt(td.getAttribute('data-group-index'), 10) : this.actionObj.groupIndex;
|
|
21871
|
-
var top = trCollection[rowIndex].getBoundingClientRect().height * rowIndex;
|
|
22083
|
+
var top = trCollection[parseInt(rowIndex.toString(), 10)].getBoundingClientRect().height * rowIndex;
|
|
21872
22084
|
if (this.parent.rowAutoHeight) {
|
|
21873
22085
|
var cursorElement = this.getCursorElement(e);
|
|
21874
22086
|
if (cursorElement) {
|
|
@@ -21952,6 +22164,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
21952
22164
|
* @param {Schedule} parent Accepts the schedule instance
|
|
21953
22165
|
*/
|
|
21954
22166
|
function ViewBase(parent) {
|
|
22167
|
+
this.previousNextAction = 'next';
|
|
21955
22168
|
this.parent = parent;
|
|
21956
22169
|
}
|
|
21957
22170
|
ViewBase.prototype.isTimelineView = function () {
|
|
@@ -22001,7 +22214,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
22001
22214
|
for (var row = 0; row < trCount; row++) {
|
|
22002
22215
|
eventContainer = createElement('div', { className: APPOINTMENT_CONTAINER_CLASS });
|
|
22003
22216
|
if (this.parent.resourceBase && !this.parent.uiStateValues.isGroupAdaptive && this.parent.resourceBase.renderedResources) {
|
|
22004
|
-
eventContainer.setAttribute('data-group-index', this.parent.resourceBase.renderedResources[row].groupIndex.toString());
|
|
22217
|
+
eventContainer.setAttribute('data-group-index', this.parent.resourceBase.renderedResources[parseInt(row.toString(), 10)].groupIndex.toString());
|
|
22005
22218
|
}
|
|
22006
22219
|
eventRows.push(eventContainer);
|
|
22007
22220
|
}
|
|
@@ -22129,6 +22342,12 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
22129
22342
|
ViewBase.prototype.highlightCurrentTime = function () {
|
|
22130
22343
|
// Here showTimeIndicator functionalities
|
|
22131
22344
|
};
|
|
22345
|
+
ViewBase.prototype.getStartDate = function () {
|
|
22346
|
+
return this.renderDates[0];
|
|
22347
|
+
};
|
|
22348
|
+
ViewBase.prototype.getEndDate = function () {
|
|
22349
|
+
return this.renderDates[this.renderDates.length - 1];
|
|
22350
|
+
};
|
|
22132
22351
|
ViewBase.prototype.startDate = function () {
|
|
22133
22352
|
return this.renderDates[0];
|
|
22134
22353
|
};
|
|
@@ -22228,6 +22447,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
22228
22447
|
return renderDates;
|
|
22229
22448
|
};
|
|
22230
22449
|
ViewBase.prototype.getNextPreviousDate = function (type) {
|
|
22450
|
+
this.previousNextAction = type;
|
|
22231
22451
|
if (this.parent.currentView === 'Day' || this.parent.currentView === 'TimelineDay') {
|
|
22232
22452
|
if (this.parent.activeViewOptions.showWeekend) {
|
|
22233
22453
|
var daysCount = this.parent.activeViewOptions.interval;
|
|
@@ -22498,8 +22718,8 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
22498
22718
|
if (index >= renderedCount) {
|
|
22499
22719
|
break;
|
|
22500
22720
|
}
|
|
22501
|
-
index += lastLevel[i].colSpan;
|
|
22502
|
-
this.parent.resourceBase.expandedResources.push(lastLevel[i]);
|
|
22721
|
+
index += lastLevel[parseInt(i.toString(), 10)].colSpan;
|
|
22722
|
+
this.parent.resourceBase.expandedResources.push(lastLevel[parseInt(i.toString(), 10)]);
|
|
22503
22723
|
}
|
|
22504
22724
|
if (this.parent.activeViewOptions.group.byDate) {
|
|
22505
22725
|
this.colLevels[0] = this.parent.resourceBase.expandedResources;
|
|
@@ -22635,6 +22855,9 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22635
22855
|
}
|
|
22636
22856
|
if (!args.isPreventScrollUpdate) {
|
|
22637
22857
|
if (this.parent.uiStateValues.isInitial) {
|
|
22858
|
+
if (this.parent.currentView.indexOf('Timeline') > -1) {
|
|
22859
|
+
content.scrollTop = this.parent.uiStateValues.top;
|
|
22860
|
+
}
|
|
22638
22861
|
this.scrollToWorkHour();
|
|
22639
22862
|
this.parent.uiStateValues.isInitial = false;
|
|
22640
22863
|
}
|
|
@@ -22700,6 +22923,18 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22700
22923
|
var columnLevels = [];
|
|
22701
22924
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
22702
22925
|
columnLevels = this.parent.resourceBase.generateResourceLevels(level);
|
|
22926
|
+
if (this.parent.activeViewOptions.group.hideNonWorkingDays) {
|
|
22927
|
+
while (columnLevels[0].length === 0) {
|
|
22928
|
+
this.parent.setProperties({ selectedDate: this.parent.activeView.getNextPreviousDate(this.previousNextAction) }, true);
|
|
22929
|
+
this.parent.activeView.getRenderDates();
|
|
22930
|
+
if (this.parent.headerModule) {
|
|
22931
|
+
this.parent.headerModule.setCalendarDate(this.parent.selectedDate);
|
|
22932
|
+
this.parent.headerModule.updateDateRange();
|
|
22933
|
+
}
|
|
22934
|
+
level = this.getDateSlots(this.renderDates, this.parent.activeViewOptions.workDays);
|
|
22935
|
+
columnLevels = this.parent.resourceBase.generateResourceLevels(level);
|
|
22936
|
+
}
|
|
22937
|
+
}
|
|
22703
22938
|
if (this.parent.uiStateValues.isGroupAdaptive && this.parent.resourceBase.lastResourceLevel.length > 0) {
|
|
22704
22939
|
var resourceLevel = this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];
|
|
22705
22940
|
var resStartHour = resourceLevel.resourceData[resourceLevel.resource.startHourField];
|
|
@@ -22847,11 +23082,11 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22847
23082
|
}
|
|
22848
23083
|
var curTimeWrap = [].slice.call(this.element.querySelectorAll('.' + TIMELINE_WRAPPER_CLASS));
|
|
22849
23084
|
for (var i = 0, length_1 = currentDateIndex[0]; i < length_1; i++) {
|
|
22850
|
-
curTimeWrap[i].appendChild(createElement('div', { className: PREVIOUS_TIMELINE_CLASS, styles: 'top:' + topInPx }));
|
|
23085
|
+
curTimeWrap[parseInt(i.toString(), 10)].appendChild(createElement('div', { className: PREVIOUS_TIMELINE_CLASS, styles: 'top:' + topInPx }));
|
|
22851
23086
|
}
|
|
22852
23087
|
for (var _i = 0, currentDateIndex_1 = currentDateIndex; _i < currentDateIndex_1.length; _i++) {
|
|
22853
23088
|
var day = currentDateIndex_1[_i];
|
|
22854
|
-
curTimeWrap[day].appendChild(createElement('div', { className: CURRENT_TIMELINE_CLASS, styles: 'top:' + topInPx }));
|
|
23089
|
+
curTimeWrap[parseInt(day.toString(), 10)].appendChild(createElement('div', { className: CURRENT_TIMELINE_CLASS, styles: 'top:' + topInPx }));
|
|
22855
23090
|
}
|
|
22856
23091
|
var currentTimeEle = createElement('div', {
|
|
22857
23092
|
innerHTML: this.parent.getTimeString(this.parent.getCurrentTime()),
|
|
@@ -22860,8 +23095,8 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
22860
23095
|
});
|
|
22861
23096
|
if (rowIndex <= timeTrs.length) {
|
|
22862
23097
|
removeClass(timeCellsWrap.querySelectorAll('.' + HIDE_CHILDS_CLASS), HIDE_CHILDS_CLASS);
|
|
22863
|
-
if (timeTrs[rowIndex]) {
|
|
22864
|
-
addClass([timeTrs[rowIndex].lastElementChild], HIDE_CHILDS_CLASS);
|
|
23098
|
+
if (timeTrs[parseInt(rowIndex.toString(), 10)]) {
|
|
23099
|
+
addClass([timeTrs[parseInt(rowIndex.toString(), 10)].lastElementChild], HIDE_CHILDS_CLASS);
|
|
22865
23100
|
}
|
|
22866
23101
|
prepend([currentTimeEle], timeCellsWrap);
|
|
22867
23102
|
currentTimeEle.style.top = formatUnit(currentTimeEle.offsetTop - (currentTimeEle.offsetHeight / 2));
|
|
@@ -23020,7 +23255,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23020
23255
|
var nth;
|
|
23021
23256
|
for (var i = 0; i < rowCount; i++) {
|
|
23022
23257
|
var ntr_1 = trEle.cloneNode();
|
|
23023
|
-
var data_1 = { className: [(this.colLevels[i][0] && this.colLevels[i][0].className[0])], type: 'emptyCells' };
|
|
23258
|
+
var data_1 = { className: [(this.colLevels[parseInt(i.toString(), 10)][0] && this.colLevels[parseInt(i.toString(), 10)][0].className[0])], type: 'emptyCells' };
|
|
23024
23259
|
if (this.parent.activeViewOptions.showWeekNumber && data_1.className.indexOf(HEADER_CELLS_CLASS) !== -1) {
|
|
23025
23260
|
data_1.className.push(WEEK_NUMBER_CLASS);
|
|
23026
23261
|
var weekNo = this.parent.getWeekNumberContent(this.renderDates);
|
|
@@ -23062,9 +23297,9 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23062
23297
|
var lastLevel = this.colLevels[rowCount - 1];
|
|
23063
23298
|
for (var i = 0; i < rowCount; i++) {
|
|
23064
23299
|
var ntr = trEle.cloneNode();
|
|
23065
|
-
var level = this.colLevels[i];
|
|
23300
|
+
var level = this.colLevels[parseInt(i.toString(), 10)];
|
|
23066
23301
|
for (var j = 0; j < level.length; j++) {
|
|
23067
|
-
ntr.appendChild(this.createTd(level[j]));
|
|
23302
|
+
ntr.appendChild(this.createTd(level[parseInt(j.toString(), 10)]));
|
|
23068
23303
|
}
|
|
23069
23304
|
tbl.querySelector('tbody').appendChild(ntr);
|
|
23070
23305
|
}
|
|
@@ -23076,7 +23311,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23076
23311
|
VerticalView.prototype.createAllDayRow = function (table, tdData) {
|
|
23077
23312
|
var ntr = createElement('tr', { className: ALLDAY_ROW_CLASS });
|
|
23078
23313
|
for (var j = 0; j < tdData.length; j++) {
|
|
23079
|
-
var td = extend({}, tdData[j]);
|
|
23314
|
+
var td = extend({}, tdData[parseInt(j.toString(), 10)]);
|
|
23080
23315
|
td.className = [ALLDAY_CELLS_CLASS];
|
|
23081
23316
|
td.type = 'alldayCells';
|
|
23082
23317
|
var ntd = this.createTd(td);
|
|
@@ -23305,7 +23540,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
23305
23540
|
var startDate = new Date(new Date(timeSlots[0].date.getTime()).
|
|
23306
23541
|
setHours(startTime.getHours(), startTime.getMinutes(), startTime.getMilliseconds()));
|
|
23307
23542
|
for (var i = 0; i < timeSlots.length; i++) {
|
|
23308
|
-
if (timeSlots[i].date.getTime() > startDate.getTime()) {
|
|
23543
|
+
if (timeSlots[parseInt(i.toString(), 10)].date.getTime() > startDate.getTime()) {
|
|
23309
23544
|
startTime.setHours(timeSlots[i - 1].date.getHours(), timeSlots[i - 1].date.getMinutes(), timeSlots[i - 1].date.getMilliseconds());
|
|
23310
23545
|
return new Date(startTime);
|
|
23311
23546
|
}
|
|
@@ -23598,7 +23833,9 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
23598
23833
|
}
|
|
23599
23834
|
if (leftPanelElement) {
|
|
23600
23835
|
if (this.parent.currentView === 'MonthAgenda') {
|
|
23601
|
-
height = this.
|
|
23836
|
+
height = (this.parent.activeViewOptions.interval > 1) ?
|
|
23837
|
+
this.getContentAreaElement().firstElementChild.offsetHeight :
|
|
23838
|
+
this.element.querySelector('.' + CONTENT_TABLE_CLASS).offsetHeight;
|
|
23602
23839
|
}
|
|
23603
23840
|
leftPanelElement.style.height = 'auto';
|
|
23604
23841
|
leftPanelElement.style.height = formatUnit(height - this.getScrollXIndent(content));
|
|
@@ -23614,7 +23851,14 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
23614
23851
|
}
|
|
23615
23852
|
if (this.parent.uiStateValues.isGroupAdaptive && this.parent.resourceBase.lastResourceLevel.length > 0) {
|
|
23616
23853
|
var resourceLevel = this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];
|
|
23617
|
-
|
|
23854
|
+
var levels_1 = this.getDateSlots(resourceLevel.renderDates, resourceLevel.workDays);
|
|
23855
|
+
if (this.parent.activeViewOptions.group.byDate && this.parent.activeViewOptions.group.hideNonWorkingDays) {
|
|
23856
|
+
var index = levels_1.findIndex(function (x, index) {
|
|
23857
|
+
return index !== 0 && x.date.getDay() === levels_1[0].date.getDay();
|
|
23858
|
+
});
|
|
23859
|
+
levels_1 = index > -1 ? levels_1.slice(0, index) : levels_1;
|
|
23860
|
+
}
|
|
23861
|
+
colLevels = [levels_1];
|
|
23618
23862
|
}
|
|
23619
23863
|
}
|
|
23620
23864
|
else {
|
|
@@ -23633,7 +23877,7 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
23633
23877
|
if (isCurrentMonth && currentDateIndex.indexOf(this.parent.getCurrentTime().getDay()) === col) {
|
|
23634
23878
|
classList$$1.push(CURRENT_DAY_CLASS);
|
|
23635
23879
|
}
|
|
23636
|
-
dateSlots.push({ date: renderDates[col], type: 'monthDay', className: classList$$1, colSpan: 1, workDays: workDays });
|
|
23880
|
+
dateSlots.push({ date: renderDates[parseInt(col.toString(), 10)], type: 'monthDay', className: classList$$1, colSpan: 1, workDays: workDays });
|
|
23637
23881
|
}
|
|
23638
23882
|
return dateSlots;
|
|
23639
23883
|
};
|
|
@@ -23650,6 +23894,9 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
23650
23894
|
clsList.push(type);
|
|
23651
23895
|
if (this.parent.activeViewOptions.group.byDate) {
|
|
23652
23896
|
clsList.push('e-by-date');
|
|
23897
|
+
if (this.parent.currentView !== 'Month') {
|
|
23898
|
+
this.parent.activeViewOptions.group.hideNonWorkingDays = false;
|
|
23899
|
+
}
|
|
23653
23900
|
}
|
|
23654
23901
|
if (this.parent.activeViewOptions.allowVirtualScrolling && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
23655
23902
|
clsList.push(VIRTUAL_SCROLL_CLASS);
|
|
@@ -23763,10 +24010,10 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
23763
24010
|
this.createColGroup(table, this.colLevels[this.colLevels.length - 1]);
|
|
23764
24011
|
var trEle = createElement('tr');
|
|
23765
24012
|
for (var i = 0; i < this.colLevels.length; i++) {
|
|
23766
|
-
var level = this.colLevels[i];
|
|
24013
|
+
var level = this.colLevels[parseInt(i.toString(), 10)];
|
|
23767
24014
|
var ntr = trEle.cloneNode();
|
|
23768
24015
|
for (var j = 0; j < level.length; j++) {
|
|
23769
|
-
var td = level[j];
|
|
24016
|
+
var td = level[parseInt(j.toString(), 10)];
|
|
23770
24017
|
ntr.appendChild(this.createHeaderCell(td));
|
|
23771
24018
|
}
|
|
23772
24019
|
table.querySelector('tbody').appendChild(ntr);
|
|
@@ -23824,10 +24071,10 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
23824
24071
|
date: new Date(+renderDate), groupIndex: resData.groupIndex, workDays: resData.workDays,
|
|
23825
24072
|
type: 'monthCells', className: classList$$1 || [WORK_CELLS_CLASS]
|
|
23826
24073
|
};
|
|
23827
|
-
if (!slotDatas[rowIndex]) {
|
|
23828
|
-
slotDatas[rowIndex] = [];
|
|
24074
|
+
if (!slotDatas[parseInt(rowIndex.toString(), 10)]) {
|
|
24075
|
+
slotDatas[parseInt(rowIndex.toString(), 10)] = [];
|
|
23829
24076
|
}
|
|
23830
|
-
slotDatas[rowIndex].push(data);
|
|
24077
|
+
slotDatas[parseInt(rowIndex.toString(), 10)].push(data);
|
|
23831
24078
|
};
|
|
23832
24079
|
var includeResource = this.parent.currentView !== 'MonthAgenda' &&
|
|
23833
24080
|
this.parent.activeViewOptions.group.resources.length > 0;
|
|
@@ -23853,22 +24100,38 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
23853
24100
|
var startIndex = this.renderDates.map(Number).indexOf(+level[0].date);
|
|
23854
24101
|
for (var i = 0; i < (this.renderDates.length / count); i++) {
|
|
23855
24102
|
var colDates = dates.splice(0, count);
|
|
23856
|
-
|
|
23857
|
-
|
|
24103
|
+
var k = startIndex;
|
|
24104
|
+
var _loop_1 = function (j) {
|
|
24105
|
+
var colDate = colDates[parseInt(k.toString(), 10)];
|
|
24106
|
+
k++;
|
|
23858
24107
|
if (includeResource) {
|
|
23859
|
-
var lastRow =
|
|
23860
|
-
var
|
|
24108
|
+
var lastRow = this_1.colLevels[(this_1.colLevels.length - 1)];
|
|
24109
|
+
var rowCount = lastRow.length / count;
|
|
24110
|
+
var resourcesTd = lastRow.slice(0, rowCount);
|
|
24111
|
+
if (this_1.parent.activeViewOptions.group.hideNonWorkingDays) {
|
|
24112
|
+
resourcesTd = lastRow.filter(function (x) { return x.date.getDay() === colDate.getDay(); });
|
|
24113
|
+
if (resourcesTd.length === 0) {
|
|
24114
|
+
j = j - 1;
|
|
24115
|
+
return out_j_1 = j, "continue";
|
|
24116
|
+
}
|
|
24117
|
+
}
|
|
23861
24118
|
for (var resIndex = 0; resIndex < resourcesTd.length; resIndex++) {
|
|
23862
24119
|
var clsList = void 0;
|
|
23863
24120
|
if (resIndex !== 0) {
|
|
23864
24121
|
clsList = [WORK_CELLS_CLASS, DISABLE_DATE];
|
|
23865
24122
|
}
|
|
23866
|
-
prepareSlots(i, colDate, resourcesTd[resIndex], clsList);
|
|
24123
|
+
prepareSlots(i, colDate, resourcesTd[parseInt(resIndex.toString(), 10)], clsList);
|
|
23867
24124
|
}
|
|
23868
24125
|
}
|
|
23869
24126
|
else {
|
|
23870
|
-
prepareSlots(i, colDate,
|
|
24127
|
+
prepareSlots(i, colDate, this_1.colLevels[this_1.colLevels.length - 1][0]);
|
|
23871
24128
|
}
|
|
24129
|
+
out_j_1 = j;
|
|
24130
|
+
};
|
|
24131
|
+
var this_1 = this, out_j_1;
|
|
24132
|
+
for (var j = startIndex; j < (this.colLevels[0].length + startIndex) && j < colDates.length; j++) {
|
|
24133
|
+
_loop_1(j);
|
|
24134
|
+
j = out_j_1;
|
|
23872
24135
|
}
|
|
23873
24136
|
}
|
|
23874
24137
|
}
|
|
@@ -23912,8 +24175,8 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
23912
24175
|
var slotDatas = this.getContentSlots();
|
|
23913
24176
|
for (var row = 0; row < slotDatas.length; row++) {
|
|
23914
24177
|
var ntr = tr.cloneNode();
|
|
23915
|
-
for (var col = 0; col < slotDatas[row].length; col++) {
|
|
23916
|
-
var ntd = this.createContentTd(slotDatas[row][col], td);
|
|
24178
|
+
for (var col = 0; col < slotDatas[parseInt(row.toString(), 10)].length; col++) {
|
|
24179
|
+
var ntd = this.createContentTd(slotDatas[parseInt(row.toString(), 10)][parseInt(col.toString(), 10)], td);
|
|
23917
24180
|
ntr.appendChild(ntd);
|
|
23918
24181
|
}
|
|
23919
24182
|
trows.push(ntr);
|
|
@@ -24235,7 +24498,7 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24235
24498
|
Year.prototype.renderCalendarHeader = function (currentDate) {
|
|
24236
24499
|
var headerWrapper = createElement('div', { className: 'e-header e-month' });
|
|
24237
24500
|
var headerContent = createElement('div', { className: 'e-day e-title' });
|
|
24238
|
-
if (this.parent.monthHeaderTemplate) {
|
|
24501
|
+
if (this.parent.activeViewOptions.monthHeaderTemplate) {
|
|
24239
24502
|
var args = { date: currentDate, type: 'monthHeader' };
|
|
24240
24503
|
this.renderTemplates(this.parent.getMonthHeaderTemplate(), args, 'monthHeaderTemplate', this.parent.activeViewOptions.monthHeaderTemplateName, headerContent);
|
|
24241
24504
|
}
|
|
@@ -24259,7 +24522,7 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24259
24522
|
tr.appendChild(createElement('th'));
|
|
24260
24523
|
}
|
|
24261
24524
|
for (var i = 0; i < WEEK_LENGTH; i++) {
|
|
24262
|
-
if (this.parent.dayHeaderTemplate) {
|
|
24525
|
+
if (this.parent.activeViewOptions.dayHeaderTemplate) {
|
|
24263
24526
|
var th = createElement('th');
|
|
24264
24527
|
var args = { date: currentWeek, type: 'dayHeader' };
|
|
24265
24528
|
this.renderTemplates(this.parent.getDayHeaderTemplate(), args, 'dayHeaderTemplate', this.parent.activeViewOptions.dayHeaderTemplateName, th);
|
|
@@ -24318,9 +24581,14 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24318
24581
|
addClass([td], classList$$1);
|
|
24319
24582
|
}
|
|
24320
24583
|
tr_1.appendChild(td);
|
|
24321
|
-
|
|
24322
|
-
|
|
24323
|
-
|
|
24584
|
+
if (!this.parent.isMinMaxDate(date)) {
|
|
24585
|
+
addClass([td], DISABLE_DATES);
|
|
24586
|
+
}
|
|
24587
|
+
else {
|
|
24588
|
+
EventHandler.add(td, 'click', this.onCellClick, this);
|
|
24589
|
+
if (!this.parent.isAdaptive) {
|
|
24590
|
+
EventHandler.add(td, 'dblclick', this.parent.workCellAction.cellDblClick, this.parent.workCellAction);
|
|
24591
|
+
}
|
|
24324
24592
|
}
|
|
24325
24593
|
this.parent.trigger(renderCell, { elementType: 'workCells', element: td, date: date });
|
|
24326
24594
|
}
|
|
@@ -24488,6 +24756,7 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24488
24756
|
if (!args.isPreventScrollUpdate) {
|
|
24489
24757
|
if (this.parent.uiStateValues.isInitial) {
|
|
24490
24758
|
this.parent.uiStateValues.isInitial = false;
|
|
24759
|
+
this.parent.uiStateValues.top = this.parent.uiStateValues.left = 0;
|
|
24491
24760
|
}
|
|
24492
24761
|
else {
|
|
24493
24762
|
if (leftPanelElement) {
|
|
@@ -24623,40 +24892,41 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
24623
24892
|
listElements.forEach(function (element, li) {
|
|
24624
24893
|
var appWrapper = createElement('div', {
|
|
24625
24894
|
className: APPOINTMENT_CLASS, attrs: {
|
|
24626
|
-
'data-id': 'Appointment_' + listData[li][_this.parent.eventFields.id],
|
|
24627
|
-
'data-guid': listData[li].Guid,
|
|
24895
|
+
'data-id': 'Appointment_' + listData[parseInt(li.toString(), 10)]["" + _this.parent.eventFields.id],
|
|
24896
|
+
'data-guid': listData[parseInt(li.toString(), 10)].Guid,
|
|
24628
24897
|
'role': 'button',
|
|
24629
24898
|
'tabindex': '0',
|
|
24630
|
-
'aria-disabled': _this.parent.eventBase.getReadonlyAttribute(listData[li]),
|
|
24899
|
+
'aria-disabled': _this.parent.eventBase.getReadonlyAttribute(listData[parseInt(li.toString(), 10)]),
|
|
24631
24900
|
'aria-pressed': 'false',
|
|
24632
|
-
'aria-label': _this.parent.getAnnouncementString(listData[li])
|
|
24901
|
+
'aria-label': _this.parent.getAnnouncementString(listData[parseInt(li.toString(), 10)])
|
|
24633
24902
|
}
|
|
24634
24903
|
});
|
|
24635
24904
|
if (!isNullOrUndefined(groupIndex)) {
|
|
24636
24905
|
appWrapper.setAttribute('data-group-index', groupIndex.toString());
|
|
24637
24906
|
}
|
|
24638
|
-
_this.parent.eventBase.applyResourceColor(appWrapper, listData[li], 'borderColor', groupOrder);
|
|
24907
|
+
_this.parent.eventBase.applyResourceColor(appWrapper, listData[parseInt(li.toString(), 10)], 'borderColor', groupOrder);
|
|
24639
24908
|
var templateEle;
|
|
24640
24909
|
if (!isNullOrUndefined(_this.parent.activeViewOptions.eventTemplate)) {
|
|
24641
24910
|
addClass([appWrapper], EVENT_TEMPLATE);
|
|
24642
24911
|
var scheduleId = _this.parent.element.id + '_';
|
|
24643
24912
|
var viewName = _this.parent.activeViewOptions.eventTemplateName;
|
|
24644
24913
|
var templateId = scheduleId + viewName + 'eventTemplate';
|
|
24645
|
-
templateEle = _this.parent.getAppointmentTemplate()(listData[li], _this.parent, 'eventTemplate', templateId, false);
|
|
24646
|
-
if (!isNullOrUndefined(listData[li][fieldMapping.recurrenceRule])) {
|
|
24647
|
-
var iconClass = (listData[li][fieldMapping.id] ===
|
|
24914
|
+
templateEle = _this.parent.getAppointmentTemplate()(listData[parseInt(li.toString(), 10)], _this.parent, 'eventTemplate', templateId, false);
|
|
24915
|
+
if (!isNullOrUndefined(listData[parseInt(li.toString(), 10)][fieldMapping.recurrenceRule])) {
|
|
24916
|
+
var iconClass = (listData[parseInt(li.toString(), 10)][fieldMapping.id] ===
|
|
24917
|
+
listData[parseInt(li.toString(), 10)][fieldMapping.recurrenceID]) ?
|
|
24648
24918
|
EVENT_RECURRENCE_ICON_CLASS : EVENT_RECURRENCE_EDIT_ICON_CLASS;
|
|
24649
24919
|
appWrapper.appendChild(createElement('div', { className: ICON + ' ' + iconClass }));
|
|
24650
24920
|
}
|
|
24651
24921
|
}
|
|
24652
24922
|
else {
|
|
24653
|
-
templateEle = _this.createAppointment(listData[li]);
|
|
24923
|
+
templateEle = _this.createAppointment(listData[parseInt(li.toString(), 10)]);
|
|
24654
24924
|
}
|
|
24655
24925
|
append([].slice.call(templateEle), appWrapper);
|
|
24656
24926
|
removeChildren(element);
|
|
24657
24927
|
element.appendChild(appWrapper);
|
|
24658
24928
|
var args = {
|
|
24659
|
-
data: extend({}, listData[li], null, true),
|
|
24929
|
+
data: extend({}, listData[parseInt(li.toString(), 10)], null, true),
|
|
24660
24930
|
element: element, cancel: false
|
|
24661
24931
|
};
|
|
24662
24932
|
_this.parent.trigger(eventRendered, args, function (eventArgs) {
|
|
@@ -24758,7 +25028,7 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
24758
25028
|
var data = [];
|
|
24759
25029
|
agendaDate = firstDate;
|
|
24760
25030
|
// eslint-disable-next-line max-len
|
|
24761
|
-
var resDataCollection = this.parent.eventBase.filterEvents(agendaDate, agendaLastDate, agendaCollection, resData[res]);
|
|
25031
|
+
var resDataCollection = this.parent.eventBase.filterEvents(agendaDate, agendaLastDate, agendaCollection, resData[parseInt(res.toString(), 10)]);
|
|
24762
25032
|
if (resDataCollection.length > 0 || !this.parent.hideEmptyAgendaDays || this.parent.currentView === 'MonthAgenda') {
|
|
24763
25033
|
for (var r = 0; r < noOfDays; r++) {
|
|
24764
25034
|
// eslint-disable-next-line max-len
|
|
@@ -24768,19 +25038,22 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
24768
25038
|
data.push(resDayCollection[0]);
|
|
24769
25039
|
eventObj = {
|
|
24770
25040
|
rowSpan: 1, type: 'eventColumn', resource: resColl[resColl.length - 1],
|
|
24771
|
-
groupIndex: resData[res
|
|
24772
|
-
|
|
25041
|
+
groupIndex: resData[parseInt(res.toString(), 10)].groupIndex,
|
|
25042
|
+
groupOrder: resData[parseInt(res.toString(), 10)].groupOrder,
|
|
25043
|
+
resourceData: resData[parseInt(res.toString(), 10)].resourceData,
|
|
25044
|
+
eventData: resDayCollection, date: agendaDate
|
|
24773
25045
|
};
|
|
24774
25046
|
dateObj = {
|
|
24775
|
-
rowSpan: 1, type: 'dateColumn', resource: resColl[resColl.length - 1],
|
|
24776
|
-
groupOrder: resData[res
|
|
25047
|
+
rowSpan: 1, type: 'dateColumn', resource: resColl[parseInt((resColl.length - 1).toString(), 10)],
|
|
25048
|
+
groupOrder: resData[parseInt(res.toString(), 10)].groupOrder,
|
|
25049
|
+
resourceData: resData[parseInt(res.toString(), 10)].resourceData,
|
|
24777
25050
|
date: agendaDate
|
|
24778
25051
|
};
|
|
24779
|
-
if (!lastLevelInfo[tempIndex]) {
|
|
24780
|
-
lastLevelInfo[tempIndex] = [];
|
|
25052
|
+
if (!lastLevelInfo[parseInt(tempIndex.toString(), 10)]) {
|
|
25053
|
+
lastLevelInfo[parseInt(tempIndex.toString(), 10)] = [];
|
|
24781
25054
|
}
|
|
24782
|
-
lastLevelInfo[tempIndex].push(eventObj);
|
|
24783
|
-
lastLevelInfo[tempIndex].push(dateObj);
|
|
25055
|
+
lastLevelInfo[parseInt(tempIndex.toString(), 10)].push(eventObj);
|
|
25056
|
+
lastLevelInfo[parseInt(tempIndex.toString(), 10)].push(dateObj);
|
|
24784
25057
|
tempIndex++;
|
|
24785
25058
|
}
|
|
24786
25059
|
agendaDate = addDays(agendaDate, 1);
|
|
@@ -24788,12 +25061,13 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
24788
25061
|
|| this.parent.currentView === 'MonthAgenda') {
|
|
24789
25062
|
lastLevelInfo[lastLevelInfo.length - 1][1].cssClass = AGENDA_DAY_BORDER_CLASS;
|
|
24790
25063
|
var tempObj = {
|
|
24791
|
-
rowSpan: data.length, type: 'resourceColumn', resource: resColl[resColl.length - 1],
|
|
24792
|
-
groupOrder: resData[res].groupOrder.slice(0, -1),
|
|
25064
|
+
rowSpan: data.length, type: 'resourceColumn', resource: resColl[parseInt((resColl.length - 1).toString(), 10)],
|
|
25065
|
+
groupOrder: resData[parseInt(res.toString(), 10)].groupOrder.slice(0, -1),
|
|
25066
|
+
resourceData: resData[parseInt(res.toString(), 10)].resourceData,
|
|
24793
25067
|
groupIndex: (lastLevelInfo.length - data.length), className: [RESOURCE_NAME],
|
|
24794
25068
|
date: agendaDate
|
|
24795
25069
|
};
|
|
24796
|
-
lastLevelInfo[lastLevelInfo.length - data.length].push(tempObj);
|
|
25070
|
+
lastLevelInfo[parseInt((lastLevelInfo.length - data.length).toString(), 10)].push(tempObj);
|
|
24797
25071
|
tempLastLevelInfo.push(extend({}, tempObj, null, true));
|
|
24798
25072
|
break;
|
|
24799
25073
|
}
|
|
@@ -24809,15 +25083,15 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
24809
25083
|
var z = 0;
|
|
24810
25084
|
for (var u = 0; u < tempLastLevelInfo.length; u++) {
|
|
24811
25085
|
// eslint-disable-next-line max-len
|
|
24812
|
-
if (tempLastLevelInfo[u].groupOrder[topResources.length - (y + 1)] === data[x][topResources[topResources.length - (y + 1)].idField]) {
|
|
24813
|
-
totalRowSpan = totalRowSpan + tempLastLevelInfo[u].rowSpan;
|
|
24814
|
-
tempGroupedData.push(extend({}, tempLastLevelInfo[u], null, true));
|
|
25086
|
+
if (tempLastLevelInfo[parseInt(u.toString(), 10)].groupOrder[topResources.length - (y + 1)] === data[parseInt(x.toString(), 10)][topResources[topResources.length - (y + 1)].idField]) {
|
|
25087
|
+
totalRowSpan = totalRowSpan + tempLastLevelInfo[parseInt(u.toString(), 10)].rowSpan;
|
|
25088
|
+
tempGroupedData.push(extend({}, tempLastLevelInfo[parseInt(u.toString(), 10)], null, true));
|
|
24815
25089
|
}
|
|
24816
25090
|
if (++z === tempLastLevelInfo.length && tempGroupedData.length > 0) {
|
|
24817
25091
|
tempGroupedData[0].rowSpan = totalRowSpan;
|
|
24818
25092
|
tempGroupedData[0].type = 'parentColumnLevel_' + (y + 1);
|
|
24819
25093
|
tempGroupedData[0].resource = topResources[topResources.length - (y + 1)];
|
|
24820
|
-
tempGroupedData[0].resourceData = data[x];
|
|
25094
|
+
tempGroupedData[0].resourceData = data[parseInt(x.toString(), 10)];
|
|
24821
25095
|
tempGroupedData[0].date = agendaDate;
|
|
24822
25096
|
lastLevelInfo[tempGroupedData[0].groupIndex].push(tempGroupedData[0]);
|
|
24823
25097
|
tempGroupedData = [];
|
|
@@ -24845,22 +25119,22 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
24845
25119
|
var tContentCollection = [];
|
|
24846
25120
|
var parentCollection = this.parent.resourceBase.resourceCollection.slice(0, -1);
|
|
24847
25121
|
for (var w = 0; w < tContent.length; w++) {
|
|
24848
|
-
tContentCollection = tContentCollection.concat(tContent[w]);
|
|
25122
|
+
tContentCollection = tContentCollection.concat(tContent[parseInt(w.toString(), 10)]);
|
|
24849
25123
|
}
|
|
24850
25124
|
level = (parentCollection.length > 0) ? 'parentColumnLevel_' + parentCollection.length : 'resourceColumn';
|
|
24851
25125
|
var rowSpanCollection = tContentCollection.filter(function (data) { return data.type === level; });
|
|
24852
25126
|
for (var x = 0; x < rowSpanCollection.length; x++) {
|
|
24853
|
-
rowSpan = rowSpan + rowSpanCollection[x].rowSpan;
|
|
25127
|
+
rowSpan = rowSpan + rowSpanCollection[parseInt(x.toString(), 10)].rowSpan;
|
|
24854
25128
|
}
|
|
24855
25129
|
}
|
|
24856
25130
|
for (var row = 0; row < tContent.length; row++) {
|
|
24857
25131
|
ntr = tr.cloneNode();
|
|
24858
|
-
for (var col = tContent[row].length - 1; col >= 0; col--) {
|
|
24859
|
-
var data = tContent[row][col];
|
|
25132
|
+
for (var col = tContent[parseInt(row.toString(), 10)].length - 1; col >= 0; col--) {
|
|
25133
|
+
var data = tContent[parseInt(row.toString(), 10)][parseInt(col.toString(), 10)];
|
|
24860
25134
|
var ntd = td.cloneNode();
|
|
24861
25135
|
if (data.type === 'dateColumn') {
|
|
24862
25136
|
if (this.parent.activeViewOptions.group.byDate || this.parent.currentView === 'MonthAgenda') {
|
|
24863
|
-
tempData = tContent[row][col];
|
|
25137
|
+
tempData = tContent[parseInt(row.toString(), 10)][parseInt(col.toString(), 10)];
|
|
24864
25138
|
continue;
|
|
24865
25139
|
}
|
|
24866
25140
|
ntd.setAttribute('data-date', data.date.getTime().toString());
|
|
@@ -25113,7 +25387,7 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
25113
25387
|
this.parent.activeViewOptions.allowVirtualScrolling = false;
|
|
25114
25388
|
date = firstDate;
|
|
25115
25389
|
if (this.parent.headerModule) {
|
|
25116
|
-
this.parent.headerModule.updateDateRange(
|
|
25390
|
+
this.parent.headerModule.updateDateRange();
|
|
25117
25391
|
this.parent.headerModule.updateHeaderItems('remove');
|
|
25118
25392
|
}
|
|
25119
25393
|
}
|
|
@@ -25187,8 +25461,8 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
25187
25461
|
prepend([].slice.call(emptyTBody.childNodes), tBody);
|
|
25188
25462
|
this.wireEventActions();
|
|
25189
25463
|
for (var s = 0, element = tBody.children; s < element.length; s++) {
|
|
25190
|
-
if (element[s].getAttribute('data-row-index') === topElement.getAttribute('data-column-index')) {
|
|
25191
|
-
var scrollToValue = element[s].offsetTop -
|
|
25464
|
+
if (element[parseInt(s.toString(), 10)].getAttribute('data-row-index') === topElement.getAttribute('data-column-index')) {
|
|
25465
|
+
var scrollToValue = element[parseInt(s.toString(), 10)].offsetTop -
|
|
25192
25466
|
this.element.querySelector('.e-agenda-item').offsetHeight;
|
|
25193
25467
|
target.scrollTop = scrollToValue;
|
|
25194
25468
|
break;
|
|
@@ -25237,7 +25511,7 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
25237
25511
|
}
|
|
25238
25512
|
else {
|
|
25239
25513
|
for (var a = 0, length_1 = liCollection.length; a < length_1; a++) {
|
|
25240
|
-
li = liCollection[a];
|
|
25514
|
+
li = liCollection[parseInt(a.toString(), 10)];
|
|
25241
25515
|
liDetails = li.getBoundingClientRect();
|
|
25242
25516
|
if (liDetails.top >= 0) {
|
|
25243
25517
|
filterElement = closest(li, '.' + AGENDA_CELLS_CLASS);
|
|
@@ -25250,7 +25524,7 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
25250
25524
|
};
|
|
25251
25525
|
Agenda.prototype.updateHeaderText = function (date) {
|
|
25252
25526
|
if (this.parent.showHeaderBar) {
|
|
25253
|
-
this.parent.headerModule.updateDateRange(
|
|
25527
|
+
this.parent.headerModule.updateDateRange(date);
|
|
25254
25528
|
}
|
|
25255
25529
|
};
|
|
25256
25530
|
Agenda.prototype.getPreviousNextDate = function (date, type) {
|
|
@@ -25472,11 +25746,18 @@ var MonthAgenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
25472
25746
|
}
|
|
25473
25747
|
var contentArea = this.getContentAreaElement().firstElementChild;
|
|
25474
25748
|
var dateHeader = this.element.querySelector('.' + DATE_HEADER_WRAP_CLASS);
|
|
25475
|
-
var availHeight = this.parent.element.offsetHeight - headerHeight - dateHeader.offsetHeight
|
|
25749
|
+
var availHeight = this.parent.element.offsetHeight - headerHeight - dateHeader.offsetHeight;
|
|
25750
|
+
var contentAreaHeight = (this.parent.activeViewOptions.interval > 1) ?
|
|
25751
|
+
Math.round(availHeight * 0.8) : contentArea.offsetHeight;
|
|
25752
|
+
var appContainerHeight = availHeight - contentAreaHeight;
|
|
25476
25753
|
var wrapperContainer = this.element.querySelector('.' + WRAPPER_CONTAINER_CLASS);
|
|
25477
25754
|
var eventWrapper = this.element.querySelector('.' + APPOINTMENT_WRAP_CLASS);
|
|
25478
25755
|
if (this.parent.height !== 'auto') {
|
|
25479
|
-
|
|
25756
|
+
if (this.parent.activeViewOptions.interval > 1) {
|
|
25757
|
+
contentArea.style.height = formatUnit(contentAreaHeight);
|
|
25758
|
+
EventHandler.add(contentArea, 'scroll', this.onContentScroll, this);
|
|
25759
|
+
}
|
|
25760
|
+
wrapperContainer.style.height = eventWrapper.style.height = formatUnit(appContainerHeight);
|
|
25480
25761
|
}
|
|
25481
25762
|
};
|
|
25482
25763
|
MonthAgenda.prototype.onDataReady = function (args) {
|
|
@@ -25493,7 +25774,7 @@ var MonthAgenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
25493
25774
|
for (var _i = 0, _a = this.renderDates; _i < _a.length; _i++) {
|
|
25494
25775
|
var date = _a[_i];
|
|
25495
25776
|
var filterData = this.appointmentFiltering(date);
|
|
25496
|
-
var workCell = this.element.querySelectorAll('.' + WORK_CELLS_CLASS)[count];
|
|
25777
|
+
var workCell = this.element.querySelectorAll('.' + WORK_CELLS_CLASS)[parseInt(count.toString(), 10)];
|
|
25497
25778
|
if (filterData.length > 0) {
|
|
25498
25779
|
if (!workCell.querySelector('.' + APPOINTMENT_INDICATOR_CLASS)) {
|
|
25499
25780
|
workCell.appendChild(createElement('div', { className: APPOINTMENT_INDICATOR_CLASS }));
|
|
@@ -25598,8 +25879,8 @@ var TimelineHeaderRow = /** @__PURE__ @class */ (function () {
|
|
|
25598
25879
|
for (var _i = 0, dates_1 = dates; _i < dates_1.length; _i++) {
|
|
25599
25880
|
var d = dates_1[_i];
|
|
25600
25881
|
var key = d.getFullYear();
|
|
25601
|
-
result[key] = result[key] || [];
|
|
25602
|
-
result[key].push(d);
|
|
25882
|
+
result[parseInt(key.toString(), 10)] = result[parseInt(key.toString(), 10)] || [];
|
|
25883
|
+
result[parseInt(key.toString(), 10)].push(d);
|
|
25603
25884
|
}
|
|
25604
25885
|
return result;
|
|
25605
25886
|
};
|
|
@@ -25608,8 +25889,8 @@ var TimelineHeaderRow = /** @__PURE__ @class */ (function () {
|
|
|
25608
25889
|
for (var _i = 0, dates_2 = dates; _i < dates_2.length; _i++) {
|
|
25609
25890
|
var d = dates_2[_i];
|
|
25610
25891
|
var key = (d.getFullYear() - 1970) * 12 + d.getMonth();
|
|
25611
|
-
result[key] = result[key] || [];
|
|
25612
|
-
result[key].push(d);
|
|
25892
|
+
result[parseInt(key.toString(), 10)] = result[parseInt(key.toString(), 10)] || [];
|
|
25893
|
+
result[parseInt(key.toString(), 10)].push(d);
|
|
25613
25894
|
}
|
|
25614
25895
|
return result;
|
|
25615
25896
|
};
|
|
@@ -25623,8 +25904,8 @@ var TimelineHeaderRow = /** @__PURE__ @class */ (function () {
|
|
|
25623
25904
|
if (this.parent.firstDayOfWeek && this.parent.firstDayOfWeek > new Date(+d).getDay()) {
|
|
25624
25905
|
key = key - 1;
|
|
25625
25906
|
}
|
|
25626
|
-
result[key] = result[key] || [];
|
|
25627
|
-
result[key].push(d);
|
|
25907
|
+
result[parseInt(key.toString(), 10)] = result[parseInt(key.toString(), 10)] || [];
|
|
25908
|
+
result[parseInt(key.toString(), 10)].push(d);
|
|
25628
25909
|
}
|
|
25629
25910
|
return result;
|
|
25630
25911
|
};
|
|
@@ -25636,7 +25917,7 @@ var TimelineHeaderRow = /** @__PURE__ @class */ (function () {
|
|
|
25636
25917
|
var tdDatas = [];
|
|
25637
25918
|
var keys = Object.keys(data);
|
|
25638
25919
|
for (var i = 0; i < keys.length; i++) {
|
|
25639
|
-
var dates = data[keys[i]];
|
|
25920
|
+
var dates = data[keys[parseInt(i.toString(), 10)]];
|
|
25640
25921
|
var htmlCol = void 0;
|
|
25641
25922
|
if (row.template) {
|
|
25642
25923
|
var args = { date: dates[0], type: type };
|
|
@@ -25918,7 +26199,7 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
|
|
|
25918
26199
|
return 1;
|
|
25919
26200
|
};
|
|
25920
26201
|
TimelineViews.prototype.getResourceTdData = function (i, tdData) {
|
|
25921
|
-
var resLevel = this.parent.resourceBase.renderedResources[i];
|
|
26202
|
+
var resLevel = this.parent.resourceBase.renderedResources[parseInt(i.toString(), 10)];
|
|
25922
26203
|
var resSHr = resLevel.resourceData[resLevel.resource.startHourField] || this.parent.workHours.start;
|
|
25923
26204
|
var resEHr = resLevel.resourceData[resLevel.resource.endHourField] || this.parent.workHours.end;
|
|
25924
26205
|
tdData.startHour = this.parent.getStartEndTime(resSHr);
|
|
@@ -25968,7 +26249,7 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
|
|
|
25968
26249
|
else {
|
|
25969
26250
|
var timeSlots = this.colLevels[this.colLevels.length - 1];
|
|
25970
26251
|
for (var i = 0; i < timeSlots.length; i++) {
|
|
25971
|
-
if (timeSlots[i].date.getTime() > date.getTime()) {
|
|
26252
|
+
if (timeSlots[parseInt(i.toString(), 10)].date.getTime() > date.getTime()) {
|
|
25972
26253
|
return timeSlots[i - 1].date;
|
|
25973
26254
|
}
|
|
25974
26255
|
}
|
|
@@ -26084,7 +26365,7 @@ var TimelineMonth = /** @__PURE__ @class */ (function (_super) {
|
|
|
26084
26365
|
var data = _a[_i];
|
|
26085
26366
|
data.className = [WORK_CELLS_CLASS];
|
|
26086
26367
|
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
26087
|
-
var resLevel = this.parent.resourceBase.renderedResources[row];
|
|
26368
|
+
var resLevel = this.parent.resourceBase.renderedResources[parseInt(row.toString(), 10)];
|
|
26088
26369
|
data.workDays = resLevel.resourceData[resLevel.resource.workDaysField] || this.parent.workDays;
|
|
26089
26370
|
data.className = data.className.concat(resLevel.className);
|
|
26090
26371
|
data.groupIndex = resLevel.groupIndex;
|
|
@@ -26094,10 +26375,10 @@ var TimelineMonth = /** @__PURE__ @class */ (function (_super) {
|
|
|
26094
26375
|
date: new Date(+data.date), colSpan: data.colSpan, groupIndex: data.groupIndex, workDays: data.workDays,
|
|
26095
26376
|
type: 'monthCells', className: data.className
|
|
26096
26377
|
};
|
|
26097
|
-
if (!slotDatas[row]) {
|
|
26098
|
-
slotDatas[row] = [];
|
|
26378
|
+
if (!slotDatas[parseInt(row.toString(), 10)]) {
|
|
26379
|
+
slotDatas[parseInt(row.toString(), 10)] = [];
|
|
26099
26380
|
}
|
|
26100
|
-
slotDatas[row].push(slotData);
|
|
26381
|
+
slotDatas[parseInt(row.toString(), 10)].push(slotData);
|
|
26101
26382
|
}
|
|
26102
26383
|
}
|
|
26103
26384
|
return slotDatas;
|
|
@@ -26136,7 +26417,7 @@ var TimelineMonth = /** @__PURE__ @class */ (function (_super) {
|
|
|
26136
26417
|
TimelineMonth.prototype.getAdjustedDate = function (startTime) {
|
|
26137
26418
|
var timeSlots = this.colLevels[this.colLevels.length - 1];
|
|
26138
26419
|
for (var i = 0; i < timeSlots.length; i++) {
|
|
26139
|
-
if (timeSlots[i].date.getTime() > startTime.getTime()) {
|
|
26420
|
+
if (timeSlots[parseInt(i.toString(), 10)].date.getTime() > startTime.getTime()) {
|
|
26140
26421
|
return timeSlots[i - 1].date;
|
|
26141
26422
|
}
|
|
26142
26423
|
}
|
|
@@ -26224,11 +26505,11 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26224
26505
|
var months = this.getMonths();
|
|
26225
26506
|
var dayHeaderDates = this.getMonthDates(new Date(this.parent.selectedDate.getFullYear(), months[0], 1));
|
|
26226
26507
|
for (var column = 0; column < this.columnCount; column++) {
|
|
26227
|
-
var date = new Date(this.parent.selectedDate.getFullYear(), months[column], 1);
|
|
26508
|
+
var date = new Date(this.parent.selectedDate.getFullYear(), months[parseInt(column.toString(), 10)], 1);
|
|
26228
26509
|
var innerTd = createElement('td', { className: HEADER_CELLS_CLASS });
|
|
26229
26510
|
if (this.parent.activeViewOptions.orientation === 'Horizontal') {
|
|
26230
26511
|
if (this.parent.dayHeaderTemplate) {
|
|
26231
|
-
append(this.renderDayMonthHeaderTemplate(dayHeaderDates[column], column, 'dayHeaderTemplate'), innerTd);
|
|
26512
|
+
append(this.renderDayMonthHeaderTemplate(dayHeaderDates[parseInt(column.toString(), 10)], column, 'dayHeaderTemplate'), innerTd);
|
|
26232
26513
|
}
|
|
26233
26514
|
else {
|
|
26234
26515
|
innerTd.innerHTML = "<span>" + this.parent.getDayNames('abbreviated')[column % 7] + "</span>";
|
|
@@ -26236,7 +26517,7 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26236
26517
|
}
|
|
26237
26518
|
else {
|
|
26238
26519
|
if (this.parent.monthHeaderTemplate) {
|
|
26239
|
-
append(this.renderDayMonthHeaderTemplate(date, months[column], 'monthHeaderTemplate'), innerTd);
|
|
26520
|
+
append(this.renderDayMonthHeaderTemplate(date, months[parseInt(column.toString(), 10)], 'monthHeaderTemplate'), innerTd);
|
|
26240
26521
|
}
|
|
26241
26522
|
else {
|
|
26242
26523
|
innerTd.innerHTML = "<span>" + this.getMonthName(date) + "</span>";
|
|
@@ -26352,7 +26633,7 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26352
26633
|
var dayHeaderDates = this.getMonthDates(new Date(this.parent.selectedDate.getFullYear(), months[0], 1));
|
|
26353
26634
|
for (var month = 0; month < this.rowCount; month++) {
|
|
26354
26635
|
wrapper.appendChild(createElement('div', { className: APPOINTMENT_CONTAINER_CLASS }));
|
|
26355
|
-
var monthDate = new Date(this.parent.selectedDate.getFullYear(), months[month], 1);
|
|
26636
|
+
var monthDate = new Date(this.parent.selectedDate.getFullYear(), months[parseInt(month.toString(), 10)], 1);
|
|
26356
26637
|
var monthStart = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
26357
26638
|
var monthEnd = this.parent.calendarUtil.getMonthEndDate(new Date(monthDate.getTime()));
|
|
26358
26639
|
var tr = createElement('tr');
|
|
@@ -26372,7 +26653,7 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26372
26653
|
}
|
|
26373
26654
|
else {
|
|
26374
26655
|
if (this.parent.dayHeaderTemplate) {
|
|
26375
|
-
append(this.renderDayMonthHeaderTemplate(dayHeaderDates[month], month, 'dayHeaderTemplate'), monthTd);
|
|
26656
|
+
append(this.renderDayMonthHeaderTemplate(dayHeaderDates[parseInt(month.toString(), 10)], month, 'dayHeaderTemplate'), monthTd);
|
|
26376
26657
|
}
|
|
26377
26658
|
else {
|
|
26378
26659
|
monthTd.innerHTML = "<span>" + this.parent.getDayNames('abbreviated')[month % 7] + "</span>";
|
|
@@ -26384,11 +26665,11 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26384
26665
|
for (var column = 0; column < this.columnCount; column++) {
|
|
26385
26666
|
var isDateAvail = void 0;
|
|
26386
26667
|
if (this.parent.activeViewOptions.orientation === 'Vertical') {
|
|
26387
|
-
monthDate = new Date(this.parent.selectedDate.getFullYear(), months[column], 1);
|
|
26668
|
+
monthDate = new Date(this.parent.selectedDate.getFullYear(), months[parseInt(column.toString(), 10)], 1);
|
|
26388
26669
|
monthStart = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
26389
26670
|
monthEnd = this.parent.calendarUtil.getMonthEndDate(new Date(monthDate.getTime()));
|
|
26390
26671
|
var dayDate = (month - monthStart.getDay()) + 1;
|
|
26391
|
-
date = new Date(this.parent.selectedDate.getFullYear(), months[column], dayDate);
|
|
26672
|
+
date = new Date(this.parent.selectedDate.getFullYear(), months[parseInt(column.toString(), 10)], dayDate);
|
|
26392
26673
|
isDateAvail = dayDate > 0 && date.getTime() < monthEnd.getTime();
|
|
26393
26674
|
}
|
|
26394
26675
|
else {
|
|
@@ -26414,6 +26695,9 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26414
26695
|
if (this.parent.activeViewOptions.workDays.indexOf(date.getDay()) > -1) {
|
|
26415
26696
|
classList$$1.push(WORKDAY_CLASS);
|
|
26416
26697
|
}
|
|
26698
|
+
if (!this.parent.isMinMaxDate(date)) {
|
|
26699
|
+
addClass([td], DISABLE_DATES);
|
|
26700
|
+
}
|
|
26417
26701
|
if (this.isCurrentDate(date)) {
|
|
26418
26702
|
classList$$1.push(CURRENT_DAY_CLASS);
|
|
26419
26703
|
if (this.parent.activeViewOptions.orientation === 'Horizontal') {
|
|
@@ -26429,6 +26713,9 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26429
26713
|
}
|
|
26430
26714
|
else {
|
|
26431
26715
|
addClass([td], OTHERMONTH_CLASS);
|
|
26716
|
+
if (!this.parent.isMinMaxDate(date)) {
|
|
26717
|
+
addClass([td], DISABLE_DATES);
|
|
26718
|
+
}
|
|
26432
26719
|
}
|
|
26433
26720
|
if (td.classList.contains(OTHERMONTH_CLASS)) {
|
|
26434
26721
|
continue;
|
|
@@ -26456,9 +26743,9 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26456
26743
|
tRow.push(tr);
|
|
26457
26744
|
var resData = void 0;
|
|
26458
26745
|
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
26459
|
-
resData = this.parent.resourceBase.renderedResources[row];
|
|
26746
|
+
resData = this.parent.resourceBase.renderedResources[parseInt(row.toString(), 10)];
|
|
26460
26747
|
}
|
|
26461
|
-
var monthDate = new Date(this.parent.selectedDate.getFullYear(), monthCells[row], 1);
|
|
26748
|
+
var monthDate = new Date(this.parent.selectedDate.getFullYear(), monthCells[parseInt(row.toString(), 10)], 1);
|
|
26462
26749
|
var date = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
26463
26750
|
for (var month = 0; month < this.columnCount; month++) {
|
|
26464
26751
|
var classList$$1 = [];
|
|
@@ -26470,7 +26757,7 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26470
26757
|
else {
|
|
26471
26758
|
classList$$1.push(WORKDAY_CLASS);
|
|
26472
26759
|
}
|
|
26473
|
-
monthDate = new Date(this.parent.selectedDate.getFullYear(), monthCells[month], 1);
|
|
26760
|
+
monthDate = new Date(this.parent.selectedDate.getFullYear(), monthCells[parseInt(month.toString(), 10)], 1);
|
|
26474
26761
|
date = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
26475
26762
|
var tdELe = createElement('td', {
|
|
26476
26763
|
className: WORK_CELLS_CLASS,
|
|
@@ -26497,9 +26784,9 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26497
26784
|
contentBody.appendChild(tr);
|
|
26498
26785
|
var resData = void 0;
|
|
26499
26786
|
if (this.parent.activeViewOptions.orientation === 'Vertical' && this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
26500
|
-
resData = this.parent.resourceBase.renderedResources[row];
|
|
26787
|
+
resData = this.parent.resourceBase.renderedResources[parseInt(row.toString(), 10)];
|
|
26501
26788
|
}
|
|
26502
|
-
var monthDate = new Date(this.parent.selectedDate.getFullYear(), months[row], 1);
|
|
26789
|
+
var monthDate = new Date(this.parent.selectedDate.getFullYear(), months[parseInt(row.toString(), 10)], 1);
|
|
26503
26790
|
var date = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
26504
26791
|
if (this.parent.activeViewOptions.orientation === 'Horizontal') {
|
|
26505
26792
|
var monthTr = tr.cloneNode();
|
|
@@ -26528,11 +26815,11 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26528
26815
|
else {
|
|
26529
26816
|
classList$$1.push(WORKDAY_CLASS);
|
|
26530
26817
|
}
|
|
26531
|
-
monthDate = new Date(this.parent.selectedDate.getFullYear(), months[month], 1);
|
|
26818
|
+
monthDate = new Date(this.parent.selectedDate.getFullYear(), months[parseInt(month.toString(), 10)], 1);
|
|
26532
26819
|
date = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
26533
26820
|
}
|
|
26534
26821
|
else {
|
|
26535
|
-
groupIndex = this.colLevels.slice(-1)[0][month].groupIndex;
|
|
26822
|
+
groupIndex = this.colLevels.slice(-1)[0][parseInt(month.toString(), 10)].groupIndex;
|
|
26536
26823
|
classList$$1.push(WORKDAY_CLASS);
|
|
26537
26824
|
}
|
|
26538
26825
|
var td = createElement('td', {
|
|
@@ -26690,7 +26977,7 @@ var ICalendarExport = /** @__PURE__ @class */ (function () {
|
|
|
26690
26977
|
var exDate = eventObj[fields.recurrenceException].split(',');
|
|
26691
26978
|
for (var i = 0; i < exDate.length - 1; i++) {
|
|
26692
26979
|
calendarEvent.splice(5, 0, 'EXDATE:' +
|
|
26693
|
-
_this.convertDateToString(getDateFromRecurrenceDateString(exDate[i]), eventObj[fields.isAllDay]));
|
|
26980
|
+
_this.convertDateToString(getDateFromRecurrenceDateString(exDate[parseInt(i.toString(), 10)]), eventObj[fields.isAllDay]));
|
|
26694
26981
|
}
|
|
26695
26982
|
}
|
|
26696
26983
|
if (eventObj[fields.recurrenceID]) {
|
|
@@ -26700,7 +26987,7 @@ var ICalendarExport = /** @__PURE__ @class */ (function () {
|
|
|
26700
26987
|
var customFields = _this.customFieldFilter(eventObj, fields);
|
|
26701
26988
|
if (customFields.length > 0) {
|
|
26702
26989
|
customFields.forEach(function (customField) {
|
|
26703
|
-
return calendarEvent.splice(4, 0, customField + ':' + (eventObj[customField] || ''));
|
|
26990
|
+
return calendarEvent.splice(4, 0, customField + ':' + (eventObj["" + customField] || ''));
|
|
26704
26991
|
});
|
|
26705
26992
|
}
|
|
26706
26993
|
var app = extend({}, eventObj);
|
|
@@ -26721,7 +27008,7 @@ var ICalendarExport = /** @__PURE__ @class */ (function () {
|
|
|
26721
27008
|
return icsString;
|
|
26722
27009
|
};
|
|
26723
27010
|
ICalendarExport.prototype.customFieldFilter = function (eventObj, fields) {
|
|
26724
|
-
var defaultFields = Object.keys(fields).map(function (key) { return fields[key]; });
|
|
27011
|
+
var defaultFields = Object.keys(fields).map(function (key) { return fields["" + key]; });
|
|
26725
27012
|
var eventFields = Object.keys(eventObj);
|
|
26726
27013
|
return eventFields.filter(function (value) { return (defaultFields.indexOf(value) === -1) && (value !== 'Guid'); });
|
|
26727
27014
|
};
|
|
@@ -26755,7 +27042,7 @@ var ICalendarExport = /** @__PURE__ @class */ (function () {
|
|
|
26755
27042
|
}
|
|
26756
27043
|
};
|
|
26757
27044
|
ICalendarExport.prototype.filterEvents = function (data, field, value) {
|
|
26758
|
-
return data.filter(function (e) { return e[field] === value; });
|
|
27045
|
+
return data.filter(function (e) { return e["" + field] === value; });
|
|
26759
27046
|
};
|
|
26760
27047
|
ICalendarExport.prototype.getModuleName = function () {
|
|
26761
27048
|
return 'iCalendarExport';
|
|
@@ -26846,7 +27133,7 @@ var ICalendarImport = /** @__PURE__ @class */ (function () {
|
|
|
26846
27133
|
case 'BEGIN':
|
|
26847
27134
|
break;
|
|
26848
27135
|
case 'UID':
|
|
26849
|
-
curEvent[uId] = value;
|
|
27136
|
+
curEvent["" + uId] = value;
|
|
26850
27137
|
if (typeof (id) == 'number') {
|
|
26851
27138
|
curEvent[fields.id] = parseInt(value, 10);
|
|
26852
27139
|
if (isNaN(curEvent[fields.id])) {
|
|
@@ -26876,10 +27163,10 @@ var ICalendarImport = /** @__PURE__ @class */ (function () {
|
|
|
26876
27163
|
default:
|
|
26877
27164
|
if (_this.parent.resourceCollection.length > 0) {
|
|
26878
27165
|
var resData = _this.parent.resourceCollection.filter(function (data) { return data.field === type; });
|
|
26879
|
-
curEvent[type] = (resData.length > 0 && (typeof (resData[0].dataSource[0][resData[0].idField]) == 'number')) ? parseInt(value, 10) : value;
|
|
27166
|
+
curEvent["" + type] = (resData.length > 0 && (typeof (resData[0].dataSource[0][resData[0].idField]) == 'number')) ? parseInt(value, 10) : value;
|
|
26880
27167
|
}
|
|
26881
27168
|
else {
|
|
26882
|
-
curEvent[type] = value;
|
|
27169
|
+
curEvent["" + type] = value;
|
|
26883
27170
|
}
|
|
26884
27171
|
}
|
|
26885
27172
|
}
|
|
@@ -26906,29 +27193,29 @@ var ICalendarImport = /** @__PURE__ @class */ (function () {
|
|
|
26906
27193
|
id = eventObj[fields.id];
|
|
26907
27194
|
}
|
|
26908
27195
|
if (appointmentIds.indexOf(eventObj[fields.id]) < 0) {
|
|
26909
|
-
var data = app.filter(function (data) { return data.UID === eventObj[uId]; });
|
|
27196
|
+
var data = app.filter(function (data) { return data.UID === eventObj["" + uId]; });
|
|
26910
27197
|
if (data.length > 1 && isNullOrUndefined(eventObj[fields.recurrenceID])) {
|
|
26911
27198
|
id = typeof (maxId) === 'number' ? maxId++ : id;
|
|
26912
27199
|
for (var i = 0; i < data.length; i++) {
|
|
26913
27200
|
// eslint-disable-next-line no-prototype-builtins
|
|
26914
|
-
if (data[i].hasOwnProperty(fields.recurrenceID)) {
|
|
26915
|
-
var exdate = data[i][fields.recurrenceID];
|
|
26916
|
-
data[i][fields.id] = typeof (maxId) === 'number' ? maxId++ : _this.parent.eventBase.generateGuid();
|
|
26917
|
-
data[i][fields.recurrenceID] = id;
|
|
26918
|
-
data[i][fields.recurrenceException] = null;
|
|
27201
|
+
if (data[parseInt(i.toString(), 10)].hasOwnProperty(fields.recurrenceID)) {
|
|
27202
|
+
var exdate = data[parseInt(i.toString(), 10)][fields.recurrenceID];
|
|
27203
|
+
data[parseInt(i.toString(), 10)][fields.id] = typeof (maxId) === 'number' ? maxId++ : _this.parent.eventBase.generateGuid();
|
|
27204
|
+
data[parseInt(i.toString(), 10)][fields.recurrenceID] = id;
|
|
27205
|
+
data[parseInt(i.toString(), 10)][fields.recurrenceException] = null;
|
|
26919
27206
|
parentObj[fields.recurrenceException] =
|
|
26920
27207
|
_this.getExcludeDateString(parentObj[fields.recurrenceException], exdate);
|
|
26921
|
-
delete data[i][uId];
|
|
26922
|
-
appoint.push(data[i]);
|
|
27208
|
+
delete data[parseInt(i.toString(), 10)]["" + uId];
|
|
27209
|
+
appoint.push(data[parseInt(i.toString(), 10)]);
|
|
26923
27210
|
}
|
|
26924
27211
|
}
|
|
26925
|
-
delete parentObj[uId];
|
|
27212
|
+
delete parentObj["" + uId];
|
|
26926
27213
|
parentObj[fields.id] = id;
|
|
26927
27214
|
appoint.push(parentObj);
|
|
26928
27215
|
// eslint-disable-next-line no-prototype-builtins
|
|
26929
27216
|
}
|
|
26930
27217
|
else if (!eventObj.hasOwnProperty(fields.recurrenceID)) {
|
|
26931
|
-
delete eventObj[uId];
|
|
27218
|
+
delete eventObj["" + uId];
|
|
26932
27219
|
eventObj[fields.id] = typeof (maxId) === 'number' ? maxId++ : id;
|
|
26933
27220
|
appoint.push(eventObj);
|
|
26934
27221
|
}
|
|
@@ -26957,8 +27244,7 @@ var ICalendarImport = /** @__PURE__ @class */ (function () {
|
|
|
26957
27244
|
return (value.replace(/\\\,/g, ',').replace(/\\\;/g, ';').replace(/\\[nN]/g, '\n').replace(/\\\\/g, '\\'));
|
|
26958
27245
|
};
|
|
26959
27246
|
ICalendarImport.prototype.dateParsing = function (element) {
|
|
26960
|
-
var
|
|
26961
|
-
var split = (element.match(expression)).slice(1);
|
|
27247
|
+
var split = element.split(':');
|
|
26962
27248
|
var value = split[split.length - 1];
|
|
26963
27249
|
var newDate = new Date(this.getDateString(value));
|
|
26964
27250
|
if (element && (element.indexOf('VALUE=DATE') > -1 || element.indexOf('RECURRENCE-ID;TZID') > -1)) {
|
|
@@ -27050,7 +27336,7 @@ var ExcelExport = /** @__PURE__ @class */ (function () {
|
|
|
27050
27336
|
var exportColumns = exportOptions.fieldsInfo || [];
|
|
27051
27337
|
if (exportColumns.length === 0) {
|
|
27052
27338
|
var fields = exportOptions.fields || Object.keys(this.parent.eventFields).map(function (field) {
|
|
27053
|
-
return _this.parent.eventFields[field];
|
|
27339
|
+
return _this.parent.eventFields["" + field];
|
|
27054
27340
|
});
|
|
27055
27341
|
fields.forEach(function (field) { exportColumns.push({ name: field, text: field }); });
|
|
27056
27342
|
}
|
|
@@ -27139,17 +27425,23 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
27139
27425
|
'dateFormat', 'enableRtl', 'endHour', 'eventSettings', 'firstDayOfWeek',
|
|
27140
27426
|
'firstMonthOfYear', 'group', 'height', 'locale', 'maxDate', 'minDate', 'readonly',
|
|
27141
27427
|
'resources', 'rowAutoHeight', 'selectedDate', 'showHeaderBar', 'showTimeIndicator', 'showWeekNumber',
|
|
27142
|
-
'showWeekend', 'startHour', 'timeFormat', 'timeScale', 'timezone', 'views', 'width', 'workDays', 'workHours'
|
|
27428
|
+
'showWeekend', 'startHour', 'timeFormat', 'timeScale', 'timezone', 'views', 'width', 'workDays', 'workHours',
|
|
27429
|
+
'dateHeaderTemplate', 'dateRangeTemplate', 'cellHeaderTemplate', 'dayHeaderTemplate', 'monthHeaderTemplate',
|
|
27430
|
+
'cellTemplate', 'resourceHeaderTemplate', 'headerIndentTemplate'
|
|
27143
27431
|
];
|
|
27432
|
+
var scheduleTemplates = ['cellHeaderTemplate', 'dayHeaderTemplate', 'monthHeaderTemplate', 'cellTemplate',
|
|
27433
|
+
'dateHeaderTemplate', 'dateRangeTemplate', 'eventTemplate', 'resourceHeaderTemplate', 'headerIndentTemplate'];
|
|
27144
27434
|
var eventSettings;
|
|
27145
27435
|
var group;
|
|
27436
|
+
var timeScale;
|
|
27437
|
+
var views;
|
|
27146
27438
|
for (var _i = 0, scheduleProps_1 = scheduleProps; _i < scheduleProps_1.length; _i++) {
|
|
27147
27439
|
var key = scheduleProps_1[_i];
|
|
27148
27440
|
switch (key) {
|
|
27149
27441
|
case 'eventSettings':
|
|
27150
27442
|
eventSettings = Object.assign({}, this.parent.eventSettings.properties);
|
|
27151
27443
|
eventSettings.dataSource = this.parent.eventsData;
|
|
27152
|
-
eventSettings.template = null;
|
|
27444
|
+
eventSettings.template = typeof (eventSettings.template) === 'function' ? null : eventSettings.template;
|
|
27153
27445
|
printModel.eventSettings = eventSettings;
|
|
27154
27446
|
break;
|
|
27155
27447
|
case 'group':
|
|
@@ -27157,9 +27449,38 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
27157
27449
|
group.headerTooltipTemplate = null;
|
|
27158
27450
|
printModel.group = group;
|
|
27159
27451
|
break;
|
|
27452
|
+
case 'timeScale':
|
|
27453
|
+
timeScale = isNullOrUndefined(printOptions.timeScale) ? this.parent.timeScale : printOptions.timeScale;
|
|
27454
|
+
timeScale.majorSlotTemplate = typeof (timeScale.majorSlotTemplate) === 'function' ? null : timeScale.majorSlotTemplate;
|
|
27455
|
+
timeScale.minorSlotTemplate = typeof (timeScale.minorSlotTemplate) === 'function' ? null : timeScale.minorSlotTemplate;
|
|
27456
|
+
printOptions.timeScale = timeScale;
|
|
27457
|
+
break;
|
|
27458
|
+
case 'views':
|
|
27459
|
+
views = isNullOrUndefined(printOptions.views) ? this.parent.views : printOptions.views;
|
|
27460
|
+
if (views && views.length > 0 && typeof (views[0]) === 'object') {
|
|
27461
|
+
var _loop_1 = function (view) {
|
|
27462
|
+
scheduleTemplates.forEach(function (x) {
|
|
27463
|
+
if (!isNullOrUndefined(view["" + x])) {
|
|
27464
|
+
view["" + x] = typeof (view["" + x]) === 'function' ? null : view["" + x];
|
|
27465
|
+
}
|
|
27466
|
+
});
|
|
27467
|
+
};
|
|
27468
|
+
for (var _a = 0, views_1 = views; _a < views_1.length; _a++) {
|
|
27469
|
+
var view = views_1[_a];
|
|
27470
|
+
_loop_1(view);
|
|
27471
|
+
}
|
|
27472
|
+
}
|
|
27473
|
+
printModel.views = views;
|
|
27474
|
+
break;
|
|
27160
27475
|
default:
|
|
27161
|
-
|
|
27162
|
-
|
|
27476
|
+
if (scheduleTemplates.indexOf(key) > -1) {
|
|
27477
|
+
printModel["" + key] = isNullOrUndefined(printOptions["" + key]) ?
|
|
27478
|
+
(typeof (this.parent["" + key]) === 'function' ? null : this.parent["" + key]) :
|
|
27479
|
+
(typeof (printOptions["" + key]) === 'function' ? null : printOptions["" + key]);
|
|
27480
|
+
break;
|
|
27481
|
+
}
|
|
27482
|
+
printModel["" + key] = isNullOrUndefined(printOptions["" + key]) ?
|
|
27483
|
+
this.parent["" + key] : printOptions["" + key];
|
|
27163
27484
|
break;
|
|
27164
27485
|
}
|
|
27165
27486
|
}
|