@syncfusion/ej2-schedule 20.4.51 → 20.4.53
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 +53 -19
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +53 -19
- 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 +12 -12
- package/src/recurrence-editor/recurrence-editor.js +3 -3
- package/src/schedule/actions/crud.js +13 -2
- package/src/schedule/actions/drag.js +6 -1
- package/src/schedule/actions/keyboard.d.ts +1 -1
- package/src/schedule/actions/keyboard.js +7 -6
- package/src/schedule/actions/virtual-scroll.js +2 -2
- package/src/schedule/base/resource.js +3 -1
- package/src/schedule/base/schedule.d.ts +7 -0
- package/src/schedule/base/schedule.js +17 -2
- package/src/schedule/event-renderer/event-base.js +1 -1
- package/src/schedule/popups/event-window.js +1 -1
- package/GitLeaksReport.json +0 -1
- package/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
|
@@ -2058,7 +2058,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2058
2058
|
if (this.parent.eventWindow) {
|
|
2059
2059
|
this.parent.eventWindow.convertToEventData(this.parent.activeCellsData, cellData);
|
|
2060
2060
|
}
|
|
2061
|
-
var selectedCells = this.parent.
|
|
2061
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
2062
2062
|
var args = {
|
|
2063
2063
|
data: cellData, element: this.parent.activeCellsData.element, event: e,
|
|
2064
2064
|
requestType: cellSelect, showQuickPopup: false
|
|
@@ -2410,7 +2410,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2410
2410
|
return;
|
|
2411
2411
|
}
|
|
2412
2412
|
var target = (e.target);
|
|
2413
|
-
var selectedElements = this.parent.
|
|
2413
|
+
var selectedElements = this.parent.getSelectedCells();
|
|
2414
2414
|
var selectedEventElements = this.parent.eventBase.getSelectedAppointments();
|
|
2415
2415
|
var moreEventWrapper = this.parent.element.querySelector('.' + MORE_POPUP_WRAPPER_CLASS);
|
|
2416
2416
|
var quickPopupWrapper = this.getQuickPopupElement();
|
|
@@ -2457,7 +2457,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2457
2457
|
return;
|
|
2458
2458
|
}
|
|
2459
2459
|
var target = (e.target);
|
|
2460
|
-
var selectedCells = this.parent.
|
|
2460
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
2461
2461
|
var selectedElements = this.parent.eventBase.getSelectedAppointments();
|
|
2462
2462
|
var moreEventWrapper = this.parent.element.querySelector('.' + MORE_POPUP_WRAPPER_CLASS);
|
|
2463
2463
|
var quickPopupWrapper = this.getQuickPopupElement();
|
|
@@ -2565,7 +2565,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2565
2565
|
if (this.isCancelLeftRightAction(e, isMultiple, isTimelineYear)) {
|
|
2566
2566
|
return;
|
|
2567
2567
|
}
|
|
2568
|
-
var selectedCells = this.parent.
|
|
2568
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
2569
2569
|
var targetCell;
|
|
2570
2570
|
var selectedAppointments = this.parent.eventBase.getSelectedAppointments();
|
|
2571
2571
|
var target = (e.target);
|
|
@@ -2637,7 +2637,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2637
2637
|
return;
|
|
2638
2638
|
}
|
|
2639
2639
|
var target = (e.target);
|
|
2640
|
-
var selectedCells = this.parent.
|
|
2640
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
2641
2641
|
var targetCell;
|
|
2642
2642
|
if (selectedCells.length > 0 && !target.classList.contains(WORK_CELLS_CLASS) &&
|
|
2643
2643
|
!target.classList.contains(ALLDAY_CELLS_CLASS)) {
|
|
@@ -2862,7 +2862,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2862
2862
|
}
|
|
2863
2863
|
return;
|
|
2864
2864
|
}
|
|
2865
|
-
var selectedCells = this.parent.
|
|
2865
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
2866
2866
|
if (selectedCells.length > 0 && !target.classList.contains(APPOINTMENT_CLASS)) {
|
|
2867
2867
|
target = selectedCells[selectedCells.length - 1];
|
|
2868
2868
|
this.selectAppointmentElementFromWorkCell(isReverse, target);
|
|
@@ -2981,6 +2981,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2981
2981
|
*/
|
|
2982
2982
|
KeyboardInteraction.prototype.destroy = function () {
|
|
2983
2983
|
this.removeEventListener();
|
|
2984
|
+
this.selectedCells = [];
|
|
2984
2985
|
this.keyboardModule.destroy();
|
|
2985
2986
|
};
|
|
2986
2987
|
return KeyboardInteraction;
|
|
@@ -5771,7 +5772,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
5771
5772
|
return;
|
|
5772
5773
|
}
|
|
5773
5774
|
var activeEle = document.activeElement;
|
|
5774
|
-
var selectedCell = this.parent.
|
|
5775
|
+
var selectedCell = this.parent.getSelectedCells();
|
|
5775
5776
|
if (selectedCell.length > 0 && ((activeEle && (this.parent.element.contains(activeEle) ||
|
|
5776
5777
|
selectedCell.indexOf(activeEle) !== -1)) || isFocused)) {
|
|
5777
5778
|
if (this.parent.keyboardInteractionModule) {
|
|
@@ -11239,7 +11240,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11239
11240
|
'"label="' + REPEATELEMENT.substr(2) + '" />' +
|
|
11240
11241
|
'</div><div class="' + INPUTWARAPPER + ' ' +
|
|
11241
11242
|
INTERVALCLASS + ' ' + FORMRIGHT + '"><table class="' + RECURRENCETABLE + ' ' + REPEATCONTENTWRAPPER + '"><tr>' +
|
|
11242
|
-
'<td><input type="text" tabindex="0" class="' + REPEATINTERVAL +
|
|
11243
|
+
'<td><input type="text" tabindex="0" id="' + this.element.id + '_' + REPEATINTERVAL + '" class="' + REPEATINTERVAL +
|
|
11243
11244
|
'"title="' + this.localeObj.getConstant('repeatEvery') + '" /></td>' +
|
|
11244
11245
|
'<td><span class="' + REPEATCONTENT + '"></span></td>' +
|
|
11245
11246
|
'</tr></table></div><div class="' + INPUTWARAPPERSIDE + ' ' + DAYWRAPPER + ' ' + FORMLEFT + '">' +
|
|
@@ -11263,7 +11264,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11263
11264
|
'<input class="' + MONTHEXPANDERELEMENT + '"title="' + this.localeObj.getConstant('monthExpander') + '" type="radio">' +
|
|
11264
11265
|
'</div></td>' +
|
|
11265
11266
|
'<td colspan="2"><div class="' + INPUTWARAPPER + ' ' + MONTHDAYELEMENT + '">' +
|
|
11266
|
-
'<input type="text" tabindex="0" class="' + MONTHDAYWRAPPER + '"title="' +
|
|
11267
|
+
'<input type="text" tabindex="0" id="' + this.element.id + '_' + MONTHDAYWRAPPER + '" class="' + MONTHDAYWRAPPER + '"title="' +
|
|
11267
11268
|
this.localeObj.getConstant('on') + '" />' +
|
|
11268
11269
|
'</div></td></tr>' +
|
|
11269
11270
|
'<tr><td>' +
|
|
@@ -11286,7 +11287,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11286
11287
|
'<input type="text" tabindex="0" class="' + UNTILDATE + '"title="' + this.localeObj.getConstant(UNTIL$1) + '" />' +
|
|
11287
11288
|
'</div>' +
|
|
11288
11289
|
'<div class="' + INPUTWARAPPER + ' ' + ENDONCOUNTWRAPPER + '">' +
|
|
11289
|
-
'<input type="text" tabindex="0" class="' + ENDONCOUNT + '"title="' + this.localeObj.getConstant(COUNT) + '" />' +
|
|
11290
|
+
'<input type="text" tabindex="0" id="' + this.element.id + '_' + ENDONCOUNT + '" class="' + ENDONCOUNT + '"title="' + this.localeObj.getConstant(COUNT) + '" />' +
|
|
11290
11291
|
'</div></div>' +
|
|
11291
11292
|
'</div></div>';
|
|
11292
11293
|
};
|
|
@@ -11990,7 +11991,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
11990
11991
|
return parentDiv;
|
|
11991
11992
|
};
|
|
11992
11993
|
EventWindow.prototype.createRecurrenceEditor = function (parentDiv) {
|
|
11993
|
-
var recurrenceEditor = this.
|
|
11994
|
+
var recurrenceEditor = createElement('div', { id: this.parent.element.id + '_recurrence_editor' });
|
|
11994
11995
|
parentDiv.appendChild(recurrenceEditor);
|
|
11995
11996
|
this.recurrenceEditor = this.renderRecurrenceEditor();
|
|
11996
11997
|
this.recurrenceEditor.appendTo(recurrenceEditor);
|
|
@@ -13640,7 +13641,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
13640
13641
|
}
|
|
13641
13642
|
if (!isNullOrUndefined(resCollection) && resCollection.length > 0) {
|
|
13642
13643
|
this.parent.showSpinner();
|
|
13643
|
-
var selectedEle = this.parent.
|
|
13644
|
+
var selectedEle = this.parent.getSelectedCells();
|
|
13644
13645
|
this.focusedEle = selectedEle[selectedEle.length - 1] || this.focusedEle;
|
|
13645
13646
|
this.updateContent(resWrap, conWrap, eventWrap, resCollection);
|
|
13646
13647
|
this.setTranslate(resWrap, conWrap, eventWrap, timeIndicator);
|
|
@@ -13825,7 +13826,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
13825
13826
|
};
|
|
13826
13827
|
VirtualScroll.prototype.updateHorizontalContent = function (conWrap, resCollection) {
|
|
13827
13828
|
this.parent.resourceBase.expandedResources = resCollection;
|
|
13828
|
-
var selectedEle = this.parent.
|
|
13829
|
+
var selectedEle = this.parent.getSelectedCells();
|
|
13829
13830
|
this.focusedEle = selectedEle[selectedEle.length - 1] || this.focusedEle;
|
|
13830
13831
|
var renderedLength = conWrap.querySelectorAll('tbody tr').length;
|
|
13831
13832
|
for (var i = 0; i < renderedLength; i++) {
|
|
@@ -14294,7 +14295,9 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14294
14295
|
}
|
|
14295
14296
|
}
|
|
14296
14297
|
}
|
|
14297
|
-
|
|
14298
|
+
if (templateNames.length > 0) {
|
|
14299
|
+
this.parent.resetTemplates(templateNames);
|
|
14300
|
+
}
|
|
14298
14301
|
}
|
|
14299
14302
|
if (isVirtualScrollAction) {
|
|
14300
14303
|
this.parent.notify(dataReady, { processedData: this.parent.eventsProcessed });
|
|
@@ -14375,6 +14378,9 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14375
14378
|
return;
|
|
14376
14379
|
}
|
|
14377
14380
|
var addEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
14381
|
+
if (addEvents.length === 0) {
|
|
14382
|
+
return;
|
|
14383
|
+
}
|
|
14378
14384
|
var args = {
|
|
14379
14385
|
requestType: 'eventCreate', cancel: false, data: addEvents,
|
|
14380
14386
|
addedRecords: addEvents, changedRecords: [], deletedRecords: []
|
|
@@ -14414,6 +14420,10 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14414
14420
|
this.parent.quickPopup.openValidationError('blockAlert', eventData);
|
|
14415
14421
|
return;
|
|
14416
14422
|
}
|
|
14423
|
+
var updateEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
14424
|
+
if (updateEvents.length === 0) {
|
|
14425
|
+
return;
|
|
14426
|
+
}
|
|
14417
14427
|
this.parent.currentAction = action;
|
|
14418
14428
|
if (action) {
|
|
14419
14429
|
switch (action) {
|
|
@@ -14432,7 +14442,6 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14432
14442
|
}
|
|
14433
14443
|
}
|
|
14434
14444
|
else {
|
|
14435
|
-
var updateEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
14436
14445
|
var args = {
|
|
14437
14446
|
requestType: 'eventChange', cancel: false, data: eventData,
|
|
14438
14447
|
addedRecords: [], changedRecords: updateEvents, deletedRecords: []
|
|
@@ -14479,6 +14488,9 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14479
14488
|
else {
|
|
14480
14489
|
deleteEvents = (eventData instanceof Array ? eventData : [eventData]);
|
|
14481
14490
|
}
|
|
14491
|
+
if (deleteEvents.length === 0) {
|
|
14492
|
+
return;
|
|
14493
|
+
}
|
|
14482
14494
|
if (action) {
|
|
14483
14495
|
switch (action) {
|
|
14484
14496
|
case 'Delete':
|
|
@@ -16471,7 +16483,9 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
|
|
|
16471
16483
|
if (this.treeViewObj) {
|
|
16472
16484
|
if (this.treeViewObj.portals && this.treeViewObj.portals.length > 0) {
|
|
16473
16485
|
var treeViewTemplates = this.treeViewObj.portals.map(function (x) { return x.propName; });
|
|
16474
|
-
|
|
16486
|
+
if (treeViewTemplates.length > 0) {
|
|
16487
|
+
this.parent.resetTemplates(treeViewTemplates);
|
|
16488
|
+
}
|
|
16475
16489
|
}
|
|
16476
16490
|
this.treeViewObj.destroy();
|
|
16477
16491
|
this.treeViewObj = null;
|
|
@@ -17250,13 +17264,16 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17250
17264
|
* @private
|
|
17251
17265
|
*/
|
|
17252
17266
|
Schedule.prototype.removeSelectedClass = function () {
|
|
17253
|
-
var selectedCells = this.
|
|
17267
|
+
var selectedCells = this.getSelectedCells();
|
|
17254
17268
|
for (var _i = 0, selectedCells_1 = selectedCells; _i < selectedCells_1.length; _i++) {
|
|
17255
17269
|
var cell = selectedCells_1[_i];
|
|
17256
17270
|
cell.setAttribute('aria-selected', 'false');
|
|
17257
17271
|
cell.removeAttribute('tabindex');
|
|
17258
17272
|
}
|
|
17259
17273
|
removeClass(selectedCells, SELECTED_CELL_CLASS);
|
|
17274
|
+
if (this.keyboardInteractionModule && this.keyboardInteractionModule.selectedCells.length > 0) {
|
|
17275
|
+
this.keyboardInteractionModule.selectedCells = [];
|
|
17276
|
+
}
|
|
17260
17277
|
};
|
|
17261
17278
|
/**
|
|
17262
17279
|
* Method to add selected class
|
|
@@ -17636,6 +17653,15 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17636
17653
|
}
|
|
17637
17654
|
return undefined;
|
|
17638
17655
|
};
|
|
17656
|
+
/**
|
|
17657
|
+
* Retrieves the selected cells.
|
|
17658
|
+
*
|
|
17659
|
+
* @returns {Element[]} The elements of currently selected cells will be returned.
|
|
17660
|
+
* @private
|
|
17661
|
+
*/
|
|
17662
|
+
Schedule.prototype.getSelectedCells = function () {
|
|
17663
|
+
return [].slice.call(this.element.querySelectorAll('.' + SELECTED_CELL_CLASS));
|
|
17664
|
+
};
|
|
17639
17665
|
/**
|
|
17640
17666
|
* Method to generate the announcement string
|
|
17641
17667
|
*
|
|
@@ -18326,7 +18352,10 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18326
18352
|
* @returns {Element[]} The elements of currently selected cells will be returned.
|
|
18327
18353
|
*/
|
|
18328
18354
|
Schedule.prototype.getSelectedElements = function () {
|
|
18329
|
-
|
|
18355
|
+
if (this.keyboardInteractionModule && this.keyboardInteractionModule.selectedCells.length > 0) {
|
|
18356
|
+
return this.keyboardInteractionModule.selectedCells;
|
|
18357
|
+
}
|
|
18358
|
+
return this.getSelectedCells();
|
|
18330
18359
|
};
|
|
18331
18360
|
/**
|
|
18332
18361
|
* To get the resource collection
|
|
@@ -21662,7 +21691,12 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21662
21691
|
};
|
|
21663
21692
|
DragAndDrop.prototype.getDayIndex = function (event) {
|
|
21664
21693
|
var eventObj = extend({}, event, null, true);
|
|
21665
|
-
var
|
|
21694
|
+
var startDate = resetTime(eventObj[this.parent.eventFields.startTime]);
|
|
21695
|
+
if (this.parent.activeViewOptions.timeScale.enable && !eventObj[this.parent.eventFields.isAllDay]) {
|
|
21696
|
+
var startHour = this.parent.activeView.getStartHour();
|
|
21697
|
+
startDate.setMilliseconds(startHour.getTime() - resetTime(startHour).getTime());
|
|
21698
|
+
}
|
|
21699
|
+
var startTime = startDate.getTime();
|
|
21666
21700
|
var query = '';
|
|
21667
21701
|
var wrapper = DAY_WRAPPER_CLASS;
|
|
21668
21702
|
if (this.parent.activeViewOptions.timeScale.enable && (eventObj[this.parent.eventFields.isAllDay])) {
|