@syncfusion/ej2-schedule 24.2.8 → 25.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/ej2-schedule.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +145 -39
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +146 -36
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +16 -16
- package/src/recurrence-editor/recurrence-editor.js +1 -2
- package/src/schedule/actions/crud.js +9 -0
- package/src/schedule/actions/keyboard.d.ts +1 -0
- package/src/schedule/actions/keyboard.js +11 -4
- package/src/schedule/base/css-constant.d.ts +2 -0
- package/src/schedule/base/css-constant.js +2 -0
- package/src/schedule/base/interface.d.ts +1 -0
- package/src/schedule/base/schedule.d.ts +4 -1
- package/src/schedule/base/schedule.js +16 -1
- package/src/schedule/base/type.d.ts +1 -0
- package/src/schedule/event-renderer/agenda-base.d.ts +1 -1
- package/src/schedule/event-renderer/agenda-base.js +36 -14
- package/src/schedule/event-renderer/event-base.js +4 -2
- package/src/schedule/event-renderer/vertical-view.js +7 -1
- package/src/schedule/popups/quick-popups.js +11 -0
- package/src/schedule/renderer/agenda.d.ts +1 -0
- package/src/schedule/renderer/agenda.js +38 -9
- package/src/schedule/renderer/renderer.js +11 -3
- package/styles/bootstrap-dark.css +12 -2
- package/styles/bootstrap.css +12 -2
- package/styles/bootstrap4.css +9 -3
- package/styles/bootstrap5-dark.css +9 -3
- package/styles/bootstrap5.css +9 -3
- package/styles/fabric-dark.css +8 -2
- package/styles/fabric.css +8 -2
- package/styles/fluent-dark.css +13 -2
- package/styles/fluent.css +13 -2
- package/styles/highcontrast-light.css +8 -2
- package/styles/highcontrast.css +8 -2
- package/styles/material-dark.css +17 -2
- package/styles/material.css +17 -2
- package/styles/material3-dark.css +9 -3
- package/styles/material3.css +9 -3
- package/styles/recurrence-editor/_bds-definition.scss +15 -0
- package/styles/schedule/_bds-definition.scss +287 -0
- package/styles/schedule/_bootstrap4-definition.scss +1 -1
- package/styles/schedule/_bootstrap5-definition.scss +1 -1
- package/styles/schedule/_fusionnew-definition.scss +1 -1
- package/styles/schedule/_layout.scss +6 -1
- package/styles/schedule/_material3-definition.scss +1 -1
- package/styles/schedule/_tailwind-definition.scss +1 -1
- package/styles/schedule/bootstrap-dark.css +12 -2
- package/styles/schedule/bootstrap.css +12 -2
- package/styles/schedule/bootstrap4.css +9 -3
- package/styles/schedule/bootstrap5-dark.css +9 -3
- package/styles/schedule/bootstrap5.css +9 -3
- package/styles/schedule/fabric-dark.css +8 -2
- package/styles/schedule/fabric.css +8 -2
- package/styles/schedule/fluent-dark.css +13 -2
- package/styles/schedule/fluent.css +13 -2
- package/styles/schedule/highcontrast-light.css +8 -2
- package/styles/schedule/highcontrast.css +8 -2
- package/styles/schedule/icons/_bds.scss +235 -0
- package/styles/schedule/material-dark.css +17 -2
- package/styles/schedule/material.css +17 -2
- package/styles/schedule/material3-dark.css +9 -3
- package/styles/schedule/material3.css +9 -3
- package/styles/schedule/tailwind-dark.css +9 -3
- package/styles/schedule/tailwind.css +9 -3
- package/styles/tailwind-dark.css +9 -3
- package/styles/tailwind.css +9 -3
|
@@ -672,6 +672,8 @@ var TIMELINE_WRAPPER_CLASS = 'e-timeline-wrapper';
|
|
|
672
672
|
/** @private */
|
|
673
673
|
var APPOINTMENT_WRAPPER_CLASS = 'e-appointment-wrapper';
|
|
674
674
|
/** @private */
|
|
675
|
+
var APPOINTMENT_WRAPPER_HIDDEN_CLASS = 'e-appointment-wrapper-hidden';
|
|
676
|
+
/** @private */
|
|
675
677
|
var DAY_WRAPPER_CLASS = 'e-day-wrapper';
|
|
676
678
|
/** @private */
|
|
677
679
|
var TOOLBAR_CONTAINER = 'e-schedule-toolbar-container';
|
|
@@ -2592,6 +2594,13 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2592
2594
|
}
|
|
2593
2595
|
}
|
|
2594
2596
|
};
|
|
2597
|
+
KeyboardInteraction.prototype.isCalendarTarget = function (e) {
|
|
2598
|
+
var keyTarget = e.currentTarget || e.target;
|
|
2599
|
+
if (keyTarget && !isNullOrUndefined(keyTarget.querySelector('.e-header-popup.e-popup-open'))) {
|
|
2600
|
+
return true;
|
|
2601
|
+
}
|
|
2602
|
+
return false;
|
|
2603
|
+
};
|
|
2595
2604
|
KeyboardInteraction.prototype.cancelUpDownAction = function (isTimelineYear) {
|
|
2596
2605
|
var isVerticalYear = isTimelineYear && this.parent.activeViewOptions.orientation === 'Vertical';
|
|
2597
2606
|
var isGroup = this.parent.activeViewOptions.group.resources.length > 0;
|
|
@@ -2605,7 +2614,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2605
2614
|
};
|
|
2606
2615
|
KeyboardInteraction.prototype.processUp = function (e, isMultiple) {
|
|
2607
2616
|
var isTimelineYear = this.parent.currentView === 'TimelineYear';
|
|
2608
|
-
if (isMultiple && this.cancelUpDownAction(isTimelineYear)) {
|
|
2617
|
+
if (isMultiple && this.cancelUpDownAction(isTimelineYear) || (this.isCalendarTarget(e))) {
|
|
2609
2618
|
return;
|
|
2610
2619
|
}
|
|
2611
2620
|
var target = (e.target);
|
|
@@ -2653,7 +2662,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2653
2662
|
};
|
|
2654
2663
|
KeyboardInteraction.prototype.processDown = function (e, isMultiple) {
|
|
2655
2664
|
var isTimelineYear = this.parent.currentView === 'TimelineYear';
|
|
2656
|
-
if (isMultiple && this.cancelUpDownAction(isTimelineYear)) {
|
|
2665
|
+
if (isMultiple && this.cancelUpDownAction(isTimelineYear) || (this.isCalendarTarget(e))) {
|
|
2657
2666
|
return;
|
|
2658
2667
|
}
|
|
2659
2668
|
var target = (e.target);
|
|
@@ -2763,7 +2772,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2763
2772
|
};
|
|
2764
2773
|
KeyboardInteraction.prototype.processRight = function (e, isMultiple) {
|
|
2765
2774
|
var isTimelineYear = this.parent.currentView === 'TimelineYear';
|
|
2766
|
-
if (this.isCancelLeftRightAction(e, isMultiple, isTimelineYear)) {
|
|
2775
|
+
if (this.isCancelLeftRightAction(e, isMultiple, isTimelineYear) || (this.isCalendarTarget(e))) {
|
|
2767
2776
|
return;
|
|
2768
2777
|
}
|
|
2769
2778
|
var selectedCells = this.parent.getSelectedCells();
|
|
@@ -2834,7 +2843,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2834
2843
|
};
|
|
2835
2844
|
KeyboardInteraction.prototype.processLeft = function (e, isMultiple) {
|
|
2836
2845
|
var isTimelineYear = this.parent.currentView === 'TimelineYear';
|
|
2837
|
-
if (this.isCancelLeftRightAction(e, isMultiple, isTimelineYear)) {
|
|
2846
|
+
if (this.isCancelLeftRightAction(e, isMultiple, isTimelineYear) || (this.isCalendarTarget(e))) {
|
|
2838
2847
|
return;
|
|
2839
2848
|
}
|
|
2840
2849
|
var target = (e.target);
|
|
@@ -6738,11 +6747,13 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6738
6747
|
if (index === void 0) { index = 0; }
|
|
6739
6748
|
var tr = createElement('tr');
|
|
6740
6749
|
var levels = this.parent.activeView.colLevels.slice(-1)[0];
|
|
6750
|
+
var className = this.parent.isReact && this.parent.activeViewOptions.eventTemplate ?
|
|
6751
|
+
' ' + APPOINTMENT_WRAPPER_HIDDEN_CLASS : '';
|
|
6741
6752
|
for (var i = 0, len = levels.length; i < len; i++) {
|
|
6742
6753
|
var col = levels[parseInt(i.toString(), 10)];
|
|
6743
6754
|
var appointmentWrap = createElement('td', {
|
|
6744
|
-
className: (type === 'allDay') ? ALLDAY_APPOINTMENT_WRAPPER_CLASS : (type === 'timeIndicator') ?
|
|
6745
|
-
TIMELINE_WRAPPER_CLASS : DAY_WRAPPER_CLASS, attrs: { 'data-date': col.date.getTime().toString() }
|
|
6755
|
+
className: (type === 'allDay') ? ALLDAY_APPOINTMENT_WRAPPER_CLASS + className : (type === 'timeIndicator') ?
|
|
6756
|
+
TIMELINE_WRAPPER_CLASS : DAY_WRAPPER_CLASS + className, attrs: { 'data-date': col.date.getTime().toString() }
|
|
6746
6757
|
});
|
|
6747
6758
|
if (!isNullOrUndefined(col.groupIndex)) {
|
|
6748
6759
|
appointmentWrap.setAttribute('data-group-index', col.groupIndex.toString());
|
|
@@ -6865,6 +6876,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6865
6876
|
return _this;
|
|
6866
6877
|
}
|
|
6867
6878
|
VerticalEvent.prototype.renderAppointments = function () {
|
|
6879
|
+
var _this = this;
|
|
6868
6880
|
if (isNullOrUndefined(this.parent)) {
|
|
6869
6881
|
return;
|
|
6870
6882
|
}
|
|
@@ -6924,7 +6936,12 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6924
6936
|
if (isDragging) {
|
|
6925
6937
|
this.parent.crudModule.crudObj.isCrudAction = false;
|
|
6926
6938
|
}
|
|
6927
|
-
this.parent.renderTemplates()
|
|
6939
|
+
this.parent.renderTemplates(function () {
|
|
6940
|
+
if (_this.parent.isReact && _this.parent.activeViewOptions.eventTemplate) {
|
|
6941
|
+
var wraps = [].slice.call(_this.parent.element.querySelectorAll('.' + APPOINTMENT_WRAPPER_HIDDEN_CLASS));
|
|
6942
|
+
removeClass(wraps, APPOINTMENT_WRAPPER_HIDDEN_CLASS);
|
|
6943
|
+
}
|
|
6944
|
+
});
|
|
6928
6945
|
};
|
|
6929
6946
|
VerticalEvent.prototype.initializeValues = function () {
|
|
6930
6947
|
this.resources = (this.parent.activeViewOptions.group.resources.length > 0) ? this.parent.uiStateValues.isGroupAdaptive ?
|
|
@@ -10671,6 +10688,17 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
|
|
|
10671
10688
|
instance.destroy();
|
|
10672
10689
|
}
|
|
10673
10690
|
}
|
|
10691
|
+
if (popupName === 'quickPopup') {
|
|
10692
|
+
var input = popup.element.querySelector('input.' + SUBJECT_CLASS);
|
|
10693
|
+
if (input) {
|
|
10694
|
+
input.remove();
|
|
10695
|
+
}
|
|
10696
|
+
var form = this.quickPopup.element.querySelector('form.' + FORM_CLASS);
|
|
10697
|
+
if (form) {
|
|
10698
|
+
removeChildren(form);
|
|
10699
|
+
form.remove();
|
|
10700
|
+
}
|
|
10701
|
+
}
|
|
10674
10702
|
};
|
|
10675
10703
|
QuickPopups.prototype.refreshQuickDialog = function () {
|
|
10676
10704
|
this.destroyQuickDialog();
|
|
@@ -11580,7 +11608,6 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11580
11608
|
RecurrenceEditor.prototype.setTemplate = function () {
|
|
11581
11609
|
var dayData = this.getDayData('narrow');
|
|
11582
11610
|
var fullDay = this.getDayData('wide');
|
|
11583
|
-
var labelId = this.element.id + '_' + 'end_label';
|
|
11584
11611
|
this.element.innerHTML = '<div class="' + HEADER + '">' +
|
|
11585
11612
|
'<div class="' + INPUTWARAPPER + ' ' + FORMLEFT + '">' +
|
|
11586
11613
|
'<input type="text" tabindex="0" class="' + REPEATELEMENT +
|
|
@@ -11627,7 +11654,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11627
11654
|
'</div></div>' +
|
|
11628
11655
|
'<div class="' + INPUTWARAPPERSIDE + ' ' + ENDON + ' ' + FORMRIGHT + '">' +
|
|
11629
11656
|
'<div class="' + INPUTWARAPPER + ' ' + ENDONLEFT + '">' +
|
|
11630
|
-
'<input type="text" tabindex="0" class="' + ENDONELEMENT + '"
|
|
11657
|
+
'<input type="text" tabindex="0" class="' + ENDONELEMENT + '"title="' + this.localeObj.getConstant(END) + '" />' +
|
|
11631
11658
|
'</div>' +
|
|
11632
11659
|
'<div class="' + INPUTWARAPPER + ' ' + ENDONDATE + '" >' +
|
|
11633
11660
|
'<input type="text" tabindex="0" class="' + UNTILDATE + '"title="' + this.localeObj.getConstant(UNTIL$1) + '" />' +
|
|
@@ -14493,15 +14520,21 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
14493
14520
|
break;
|
|
14494
14521
|
case 'TimelineDay':
|
|
14495
14522
|
this.parent.activeView = this.parent.timelineViewsModule;
|
|
14496
|
-
this.parent.activeView
|
|
14523
|
+
if (!isNullOrUndefined(this.parent.activeView)) {
|
|
14524
|
+
this.parent.activeView.viewClass = 'e-timeline-day-view';
|
|
14525
|
+
}
|
|
14497
14526
|
break;
|
|
14498
14527
|
case 'TimelineWorkWeek':
|
|
14499
14528
|
this.parent.activeView = this.parent.timelineViewsModule;
|
|
14500
|
-
this.parent.activeView
|
|
14529
|
+
if (!isNullOrUndefined(this.parent.activeView)) {
|
|
14530
|
+
this.parent.activeView.viewClass = 'e-timeline-work-week-view';
|
|
14531
|
+
}
|
|
14501
14532
|
break;
|
|
14502
14533
|
case 'TimelineWeek':
|
|
14503
14534
|
this.parent.activeView = this.parent.timelineViewsModule;
|
|
14504
|
-
this.parent.activeView
|
|
14535
|
+
if (!isNullOrUndefined(this.parent.activeView)) {
|
|
14536
|
+
this.parent.activeView.viewClass = 'e-timeline-week-view';
|
|
14537
|
+
}
|
|
14505
14538
|
break;
|
|
14506
14539
|
case 'TimelineMonth':
|
|
14507
14540
|
this.parent.activeView = this.parent.timelineMonthModule;
|
|
@@ -14518,6 +14551,8 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
14518
14551
|
this.parent.headerModule.updateActiveView();
|
|
14519
14552
|
this.parent.headerModule.setCalendarView();
|
|
14520
14553
|
}
|
|
14554
|
+
console.warn('[WARNING] :: Module "' + viewName + '" is not available in Schedule component!' +
|
|
14555
|
+
' You either misspelled the module name or forgot to load it.');
|
|
14521
14556
|
return this.initializeLayout(firstView);
|
|
14522
14557
|
}
|
|
14523
14558
|
throw Error('Inject required modules');
|
|
@@ -14769,6 +14804,12 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14769
14804
|
if (!this.parent.activeView) {
|
|
14770
14805
|
return;
|
|
14771
14806
|
}
|
|
14807
|
+
if (this.parent.uiStateValues && this.parent.uiStateValues.isPreventEventRefresh) {
|
|
14808
|
+
this.parent.uiStateValues.isPreventEventRefresh = false;
|
|
14809
|
+
this.parent.refreshEvents(false);
|
|
14810
|
+
this.parent.hideSpinner();
|
|
14811
|
+
return;
|
|
14812
|
+
}
|
|
14772
14813
|
var start = this.parent.activeView.startDate();
|
|
14773
14814
|
var end = this.parent.activeView.endDate();
|
|
14774
14815
|
var dataManager = this.parent.dataModule.getData(this.parent.dataModule.generateQuery(start, end));
|
|
@@ -14780,6 +14821,9 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14780
14821
|
return;
|
|
14781
14822
|
}
|
|
14782
14823
|
this.parent.trigger(dataBinding, e, function (args) {
|
|
14824
|
+
if (args.cancel) {
|
|
14825
|
+
return;
|
|
14826
|
+
}
|
|
14783
14827
|
var resultData = extend([], args.result, null, true);
|
|
14784
14828
|
_this.parent.eventsData = resultData.filter(function (data) { return !data[_this.parent.eventFields.isBlock]; });
|
|
14785
14829
|
_this.parent.blockData = resultData.filter(function (data) { return data[_this.parent.eventFields.isBlock]; });
|
|
@@ -19093,9 +19137,14 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
19093
19137
|
*
|
|
19094
19138
|
* @function setResourceCollections
|
|
19095
19139
|
* @param {ResourcesModel[]} resourceCol Accepts the resource collections in ResourcesModel type
|
|
19140
|
+
* @param {boolean} isEventDataRefresh Accepts the boolean to refresh the appointment data source from remote or local
|
|
19096
19141
|
* @returns {void}
|
|
19097
19142
|
*/
|
|
19098
|
-
Schedule.prototype.setResourceCollections = function (resourceCol) {
|
|
19143
|
+
Schedule.prototype.setResourceCollections = function (resourceCol, isEventDataRefresh) {
|
|
19144
|
+
if (isEventDataRefresh === void 0) { isEventDataRefresh = true; }
|
|
19145
|
+
if (!isEventDataRefresh && this.uiStateValues) {
|
|
19146
|
+
this.uiStateValues.isPreventEventRefresh = true;
|
|
19147
|
+
}
|
|
19099
19148
|
this.setProperties({ resources: resourceCol }, false);
|
|
19100
19149
|
};
|
|
19101
19150
|
/**
|
|
@@ -19215,6 +19264,8 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
19215
19264
|
this.iCalendarExportModule.initializeCalendarExport(fileName, customData);
|
|
19216
19265
|
}
|
|
19217
19266
|
else {
|
|
19267
|
+
console.warn('[WARNING] :: Module "ICalendarExport" is not available in Schedule component!' +
|
|
19268
|
+
' You either misspelled the module name or forgot to load it.');
|
|
19218
19269
|
throw Error('Inject ICalendarExport module');
|
|
19219
19270
|
}
|
|
19220
19271
|
};
|
|
@@ -19231,6 +19282,8 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
19231
19282
|
this.iCalendarImportModule.initializeCalendarImport(fileContent);
|
|
19232
19283
|
}
|
|
19233
19284
|
else {
|
|
19285
|
+
console.warn('[WARNING] :: Module "ICalendarImport" is not available in Schedule component!' +
|
|
19286
|
+
' You either misspelled the module name or forgot to load it.');
|
|
19234
19287
|
throw Error('Inject ICalendarImport module');
|
|
19235
19288
|
}
|
|
19236
19289
|
};
|
|
@@ -19276,6 +19329,8 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
19276
19329
|
this.excelExportModule.initializeExcelExport(excelExportOptions);
|
|
19277
19330
|
}
|
|
19278
19331
|
else {
|
|
19332
|
+
console.warn('[WARNING] :: Module "ExcelExport" is not available in Schedule component!' +
|
|
19333
|
+
' You either misspelled the module name or forgot to load it.');
|
|
19279
19334
|
throw Error('Inject ExcelExport module');
|
|
19280
19335
|
}
|
|
19281
19336
|
};
|
|
@@ -19292,6 +19347,8 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
19292
19347
|
this.printModule.print(printOptions);
|
|
19293
19348
|
}
|
|
19294
19349
|
else {
|
|
19350
|
+
console.warn('[WARNING] :: Module "Print" is not available in Schedule component!' +
|
|
19351
|
+
' You either misspelled the module name or forgot to load it.');
|
|
19295
19352
|
throw Error('Inject Print module');
|
|
19296
19353
|
}
|
|
19297
19354
|
};
|
|
@@ -19575,6 +19632,8 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
19575
19632
|
};
|
|
19576
19633
|
/**
|
|
19577
19634
|
* To check whether the given time range slots are available for event creation or already occupied by other events.
|
|
19635
|
+
* This method currently focuses on validating appointments within the current view date range.
|
|
19636
|
+
* However, it does not extend this availability check to recurrence occurrences outside of the current date range.
|
|
19578
19637
|
*
|
|
19579
19638
|
* @function isSlotAvailable
|
|
19580
19639
|
* @param {Date | Object} startTime Denotes the start time of the slot.
|
|
@@ -26036,7 +26095,8 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26036
26095
|
EventHandler.add(element, 'click', this.parent.agendaModule.dayNavigationClick, this);
|
|
26037
26096
|
}
|
|
26038
26097
|
};
|
|
26039
|
-
AgendaBase.prototype.calculateResourceTableElement = function (tBody, noOfDays, agendaDate) {
|
|
26098
|
+
AgendaBase.prototype.calculateResourceTableElement = function (tBody, noOfDays, agendaDate, agendaEnd) {
|
|
26099
|
+
if (agendaEnd === void 0) { agendaEnd = null; }
|
|
26040
26100
|
if (isNullOrUndefined(this.parent.resourceBase.lastResourceLevel)) {
|
|
26041
26101
|
var level = this.getDateSlots(this.renderDates, this.parent.activeViewOptions.workDays);
|
|
26042
26102
|
this.parent.resourceBase.generateResourceLevels(level);
|
|
@@ -26045,7 +26105,9 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26045
26105
|
var days = (this.parent.activeViewOptions.group.byDate || this.parent.currentView === 'MonthAgenda') ? noOfDays : 1;
|
|
26046
26106
|
var resColl = this.parent.resourceBase.resourceCollection;
|
|
26047
26107
|
var resData = this.parent.resourceBase.lastResourceLevel;
|
|
26108
|
+
var agendaStart = agendaDate;
|
|
26048
26109
|
var initialDate = agendaDate;
|
|
26110
|
+
var showWeekend = this.parent.activeViewOptions.showWeekend;
|
|
26049
26111
|
for (var i = 0; i < days; i++) {
|
|
26050
26112
|
var lastLevelInfo = [];
|
|
26051
26113
|
var tempLastLevelInfo = [];
|
|
@@ -26053,6 +26115,21 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26053
26115
|
var eventObj = void 0;
|
|
26054
26116
|
var dateObj = void 0;
|
|
26055
26117
|
var firstDate = addDays(initialDate, i);
|
|
26118
|
+
if (this.parent.currentView === 'Agenda' && this.parent.activeViewOptions.group.byDate &&
|
|
26119
|
+
this.parent.activeViewOptions.allowVirtualScrolling && !showWeekend && !this.isWorkDay(firstDate)) {
|
|
26120
|
+
do {
|
|
26121
|
+
firstDate = addDays(firstDate, 1);
|
|
26122
|
+
if (firstDate >= agendaEnd) {
|
|
26123
|
+
break;
|
|
26124
|
+
}
|
|
26125
|
+
} while (!this.isWorkDay(firstDate) ||
|
|
26126
|
+
this.parent.eventBase.filterEvents(firstDate, addDays(firstDate, 1)).length < 1);
|
|
26127
|
+
if (firstDate >= agendaEnd) {
|
|
26128
|
+
break;
|
|
26129
|
+
}
|
|
26130
|
+
initialDate = addDays(firstDate, -i);
|
|
26131
|
+
agendaLastDate = addDays(firstDate, 1);
|
|
26132
|
+
}
|
|
26056
26133
|
var finalDate = (this.parent.activeViewOptions.group.byDate || this.parent.currentView === 'MonthAgenda')
|
|
26057
26134
|
? addDays(firstDate, 1) : agendaLastDate;
|
|
26058
26135
|
var agendaCollection = this.parent.eventBase.filterEvents(firstDate, finalDate);
|
|
@@ -26067,7 +26144,9 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26067
26144
|
for (var r = 0; r < noOfDays; r++) {
|
|
26068
26145
|
// eslint-disable-next-line max-len
|
|
26069
26146
|
var resDayCollection = this.parent.eventBase.filterEvents(agendaDate, addDays(agendaDate, 1), resDataCollection, undefined);
|
|
26070
|
-
if (
|
|
26147
|
+
if (((showWeekend || !showWeekend && (this.parent.group.byDate ? this.isWorkDay(agendaDate) :
|
|
26148
|
+
this.isWorkDay(agendaDate, resData[parseInt(res.toString(), 10)].workDays)))
|
|
26149
|
+
&& (resDayCollection.length > 0 || !this.parent.hideEmptyAgendaDays)) ||
|
|
26071
26150
|
this.parent.currentView === 'MonthAgenda') {
|
|
26072
26151
|
data.push(resDayCollection[0]);
|
|
26073
26152
|
eventObj = {
|
|
@@ -26093,16 +26172,18 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26093
26172
|
agendaDate = addDays(agendaDate, 1);
|
|
26094
26173
|
if (agendaDate.getTime() >= agendaLastDate.getTime() || this.parent.activeViewOptions.group.byDate
|
|
26095
26174
|
|| this.parent.currentView === 'MonthAgenda') {
|
|
26096
|
-
|
|
26097
|
-
|
|
26098
|
-
|
|
26099
|
-
|
|
26100
|
-
|
|
26101
|
-
|
|
26102
|
-
|
|
26103
|
-
|
|
26104
|
-
|
|
26105
|
-
|
|
26175
|
+
if (data.length > 0) {
|
|
26176
|
+
lastLevelInfo[lastLevelInfo.length - 1][1].cssClass = AGENDA_DAY_BORDER_CLASS;
|
|
26177
|
+
var tempObj = {
|
|
26178
|
+
rowSpan: data.length, type: 'resourceColumn', resource: resColl[parseInt((resColl.length - 1).toString(), 10)],
|
|
26179
|
+
groupOrder: resData[parseInt(res.toString(), 10)].groupOrder.slice(0, -1),
|
|
26180
|
+
resourceData: resData[parseInt(res.toString(), 10)].resourceData,
|
|
26181
|
+
groupIndex: (lastLevelInfo.length - data.length), className: [RESOURCE_NAME],
|
|
26182
|
+
date: agendaDate
|
|
26183
|
+
};
|
|
26184
|
+
lastLevelInfo[parseInt((lastLevelInfo.length - data.length).toString(), 10)].push(tempObj);
|
|
26185
|
+
tempLastLevelInfo.push(extend({}, tempObj, null, true));
|
|
26186
|
+
}
|
|
26106
26187
|
break;
|
|
26107
26188
|
}
|
|
26108
26189
|
}
|
|
@@ -26137,9 +26218,9 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26137
26218
|
this.createResourceTableRow(lastLevelInfo, tBody);
|
|
26138
26219
|
}
|
|
26139
26220
|
}
|
|
26140
|
-
var totalCollection = this.parent.eventBase.filterEvents(
|
|
26221
|
+
var totalCollection = this.parent.eventBase.filterEvents(agendaStart, agendaLastDate);
|
|
26141
26222
|
if (totalCollection.length === 0 && !this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) {
|
|
26142
|
-
this.renderEmptyContent(tBody,
|
|
26223
|
+
this.renderEmptyContent(tBody, agendaStart);
|
|
26143
26224
|
}
|
|
26144
26225
|
};
|
|
26145
26226
|
AgendaBase.prototype.createResourceTableRow = function (tContent, tBody) {
|
|
@@ -26412,9 +26493,20 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
26412
26493
|
var firstDate = new Date(agendaDate.getTime());
|
|
26413
26494
|
var isObject = this.appointmentFiltering(firstDate, lastDate);
|
|
26414
26495
|
if (isObject.length > 0 && this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) {
|
|
26415
|
-
|
|
26416
|
-
|
|
26417
|
-
|
|
26496
|
+
if (!this.parent.activeViewOptions.showWeekend && !this.isAgendaWorkDay(isObject[0][fieldMapping.startTime])) {
|
|
26497
|
+
for (var _i = 0, isObject_1 = isObject; _i < isObject_1.length; _i++) {
|
|
26498
|
+
var event_2 = isObject_1[_i];
|
|
26499
|
+
if (this.isAgendaWorkDay(event_2[fieldMapping.startTime])) {
|
|
26500
|
+
agendaDate = new Date(new Date(event_2[fieldMapping.startTime].getTime()).setHours(0, 0, 0, 0));
|
|
26501
|
+
this.updateHeaderText(event_2[fieldMapping.startTime]);
|
|
26502
|
+
break;
|
|
26503
|
+
}
|
|
26504
|
+
}
|
|
26505
|
+
}
|
|
26506
|
+
else {
|
|
26507
|
+
agendaDate = new Date(new Date(isObject[0][fieldMapping.startTime].getTime()).setHours(0, 0, 0, 0));
|
|
26508
|
+
this.updateHeaderText(isObject[0][fieldMapping.startTime]);
|
|
26509
|
+
}
|
|
26418
26510
|
}
|
|
26419
26511
|
var endDate;
|
|
26420
26512
|
if (!this.parent.hideEmptyAgendaDays || (this.parent.agendaDaysCount > 0 && isObject.length > 0)) {
|
|
@@ -26428,18 +26520,25 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
26428
26520
|
this.parent.headerModule.updateHeaderItems('remove');
|
|
26429
26521
|
}
|
|
26430
26522
|
}
|
|
26431
|
-
this.calculateResourceTableElement(tBody, this.parent.agendaDaysCount, date);
|
|
26523
|
+
this.calculateResourceTableElement(tBody, this.parent.agendaDaysCount, date, lastDate);
|
|
26432
26524
|
}
|
|
26433
26525
|
else {
|
|
26434
26526
|
for (var day = 0; day < this.parent.agendaDaysCount; day++) {
|
|
26435
|
-
var filterData = this.appointmentFiltering(agendaDate);
|
|
26436
26527
|
var nTr = this.createTableRowElement(agendaDate, 'data');
|
|
26437
|
-
|
|
26528
|
+
var virtualContent = this.element.querySelector('tr[data-row-index="' + (+(nTr.dataset.rowIndex)) + '"]');
|
|
26529
|
+
if (virtualContent || !this.parent.activeViewOptions.showWeekend && !this.isAgendaWorkDay(agendaDate)) {
|
|
26438
26530
|
agendaDate = addDays(agendaDate, 1);
|
|
26531
|
+
if (!virtualContent && this.parent.activeViewOptions.allowVirtualScrolling) {
|
|
26532
|
+
day--;
|
|
26533
|
+
}
|
|
26534
|
+
if (agendaDate.getTime() > lastDate.getTime()) {
|
|
26535
|
+
break;
|
|
26536
|
+
}
|
|
26439
26537
|
continue;
|
|
26440
26538
|
}
|
|
26441
26539
|
var dTd = nTr.children[0];
|
|
26442
26540
|
var aTd = nTr.children[1];
|
|
26541
|
+
var filterData = this.appointmentFiltering(agendaDate);
|
|
26443
26542
|
if (filterData.length > 0 || (!this.parent.hideEmptyAgendaDays && filterData.length === 0)) {
|
|
26444
26543
|
var elementType = (!this.parent.hideEmptyAgendaDays && filterData.length === 0) ? 'noEvents' : 'data';
|
|
26445
26544
|
dTd.appendChild(this.createDateHeaderElement(agendaDate));
|
|
@@ -26466,6 +26565,14 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
26466
26565
|
}
|
|
26467
26566
|
this.agendaDates = { start: firstDate, end: endDate };
|
|
26468
26567
|
};
|
|
26568
|
+
Agenda.prototype.isAgendaWorkDay = function (date) {
|
|
26569
|
+
if (this.parent.uiStateValues.isGroupAdaptive && !this.parent.group.byDate) {
|
|
26570
|
+
return this.isWorkDay(date, this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].workDays);
|
|
26571
|
+
}
|
|
26572
|
+
else {
|
|
26573
|
+
return this.isWorkDay(date);
|
|
26574
|
+
}
|
|
26575
|
+
};
|
|
26469
26576
|
Agenda.prototype.agendaScrolling = function (event) {
|
|
26470
26577
|
if (this.parent.quickPopup) {
|
|
26471
26578
|
this.parent.quickPopup.quickPopupHide();
|
|
@@ -26570,9 +26677,12 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
26570
26677
|
var lastDate = this.getEndDateFromStartDate(date);
|
|
26571
26678
|
var daysCount = 0;
|
|
26572
26679
|
do {
|
|
26573
|
-
|
|
26574
|
-
|
|
26575
|
-
|
|
26680
|
+
if (this.parent.activeViewOptions.showWeekend || !this.parent.activeViewOptions.showWeekend &&
|
|
26681
|
+
this.isAgendaWorkDay(currentDate)) {
|
|
26682
|
+
var filterData = this.appointmentFiltering(currentDate);
|
|
26683
|
+
if (filterData.length > 0 || !this.parent.hideEmptyAgendaDays) {
|
|
26684
|
+
daysCount++;
|
|
26685
|
+
}
|
|
26576
26686
|
}
|
|
26577
26687
|
currentDate = addDays(currentDate, (type === 'next') ? 1 : -1);
|
|
26578
26688
|
if (currentDate < firstDate || currentDate > lastDate) {
|