@syncfusion/ej2-schedule 20.4.52 → 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 +15 -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 +10 -10
- 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
|
@@ -2049,7 +2049,7 @@ class KeyboardInteraction {
|
|
|
2049
2049
|
if (this.parent.eventWindow) {
|
|
2050
2050
|
this.parent.eventWindow.convertToEventData(this.parent.activeCellsData, cellData);
|
|
2051
2051
|
}
|
|
2052
|
-
const selectedCells = this.parent.
|
|
2052
|
+
const selectedCells = this.parent.getSelectedCells();
|
|
2053
2053
|
const args = {
|
|
2054
2054
|
data: cellData, element: this.parent.activeCellsData.element, event: e,
|
|
2055
2055
|
requestType: cellSelect, showQuickPopup: false
|
|
@@ -2397,7 +2397,7 @@ class KeyboardInteraction {
|
|
|
2397
2397
|
return;
|
|
2398
2398
|
}
|
|
2399
2399
|
let target = (e.target);
|
|
2400
|
-
const selectedElements = this.parent.
|
|
2400
|
+
const selectedElements = this.parent.getSelectedCells();
|
|
2401
2401
|
const selectedEventElements = this.parent.eventBase.getSelectedAppointments();
|
|
2402
2402
|
const moreEventWrapper = this.parent.element.querySelector('.' + MORE_POPUP_WRAPPER_CLASS);
|
|
2403
2403
|
const quickPopupWrapper = this.getQuickPopupElement();
|
|
@@ -2444,7 +2444,7 @@ class KeyboardInteraction {
|
|
|
2444
2444
|
return;
|
|
2445
2445
|
}
|
|
2446
2446
|
let target = (e.target);
|
|
2447
|
-
const selectedCells = this.parent.
|
|
2447
|
+
const selectedCells = this.parent.getSelectedCells();
|
|
2448
2448
|
const selectedElements = this.parent.eventBase.getSelectedAppointments();
|
|
2449
2449
|
const moreEventWrapper = this.parent.element.querySelector('.' + MORE_POPUP_WRAPPER_CLASS);
|
|
2450
2450
|
const quickPopupWrapper = this.getQuickPopupElement();
|
|
@@ -2552,7 +2552,7 @@ class KeyboardInteraction {
|
|
|
2552
2552
|
if (this.isCancelLeftRightAction(e, isMultiple, isTimelineYear)) {
|
|
2553
2553
|
return;
|
|
2554
2554
|
}
|
|
2555
|
-
const selectedCells = this.parent.
|
|
2555
|
+
const selectedCells = this.parent.getSelectedCells();
|
|
2556
2556
|
let targetCell;
|
|
2557
2557
|
const selectedAppointments = this.parent.eventBase.getSelectedAppointments();
|
|
2558
2558
|
let target = (e.target);
|
|
@@ -2624,7 +2624,7 @@ class KeyboardInteraction {
|
|
|
2624
2624
|
return;
|
|
2625
2625
|
}
|
|
2626
2626
|
let target = (e.target);
|
|
2627
|
-
const selectedCells = this.parent.
|
|
2627
|
+
const selectedCells = this.parent.getSelectedCells();
|
|
2628
2628
|
let targetCell;
|
|
2629
2629
|
if (selectedCells.length > 0 && !target.classList.contains(WORK_CELLS_CLASS) &&
|
|
2630
2630
|
!target.classList.contains(ALLDAY_CELLS_CLASS)) {
|
|
@@ -2848,7 +2848,7 @@ class KeyboardInteraction {
|
|
|
2848
2848
|
}
|
|
2849
2849
|
return;
|
|
2850
2850
|
}
|
|
2851
|
-
const selectedCells = this.parent.
|
|
2851
|
+
const selectedCells = this.parent.getSelectedCells();
|
|
2852
2852
|
if (selectedCells.length > 0 && !target.classList.contains(APPOINTMENT_CLASS)) {
|
|
2853
2853
|
target = selectedCells[selectedCells.length - 1];
|
|
2854
2854
|
this.selectAppointmentElementFromWorkCell(isReverse, target);
|
|
@@ -2967,6 +2967,7 @@ class KeyboardInteraction {
|
|
|
2967
2967
|
*/
|
|
2968
2968
|
destroy() {
|
|
2969
2969
|
this.removeEventListener();
|
|
2970
|
+
this.selectedCells = [];
|
|
2970
2971
|
this.keyboardModule.destroy();
|
|
2971
2972
|
}
|
|
2972
2973
|
}
|
|
@@ -5706,7 +5707,7 @@ class EventBase {
|
|
|
5706
5707
|
return;
|
|
5707
5708
|
}
|
|
5708
5709
|
const activeEle = document.activeElement;
|
|
5709
|
-
const selectedCell = this.parent.
|
|
5710
|
+
const selectedCell = this.parent.getSelectedCells();
|
|
5710
5711
|
if (selectedCell.length > 0 && ((activeEle && (this.parent.element.contains(activeEle) ||
|
|
5711
5712
|
selectedCell.indexOf(activeEle) !== -1)) || isFocused)) {
|
|
5712
5713
|
if (this.parent.keyboardInteractionModule) {
|
|
@@ -10981,7 +10982,7 @@ let RecurrenceEditor = class RecurrenceEditor extends Component {
|
|
|
10981
10982
|
'"label="' + REPEATELEMENT.substr(2) + '" />' +
|
|
10982
10983
|
'</div><div class="' + INPUTWARAPPER + ' ' +
|
|
10983
10984
|
INTERVALCLASS + ' ' + FORMRIGHT + '"><table class="' + RECURRENCETABLE + ' ' + REPEATCONTENTWRAPPER + '"><tr>' +
|
|
10984
|
-
'<td><input type="text" tabindex="0" class="' + REPEATINTERVAL +
|
|
10985
|
+
'<td><input type="text" tabindex="0" id="' + this.element.id + '_' + REPEATINTERVAL + '" class="' + REPEATINTERVAL +
|
|
10985
10986
|
'"title="' + this.localeObj.getConstant('repeatEvery') + '" /></td>' +
|
|
10986
10987
|
'<td><span class="' + REPEATCONTENT + '"></span></td>' +
|
|
10987
10988
|
'</tr></table></div><div class="' + INPUTWARAPPERSIDE + ' ' + DAYWRAPPER + ' ' + FORMLEFT + '">' +
|
|
@@ -11005,7 +11006,7 @@ let RecurrenceEditor = class RecurrenceEditor extends Component {
|
|
|
11005
11006
|
'<input class="' + MONTHEXPANDERELEMENT + '"title="' + this.localeObj.getConstant('monthExpander') + '" type="radio">' +
|
|
11006
11007
|
'</div></td>' +
|
|
11007
11008
|
'<td colspan="2"><div class="' + INPUTWARAPPER + ' ' + MONTHDAYELEMENT + '">' +
|
|
11008
|
-
'<input type="text" tabindex="0" class="' + MONTHDAYWRAPPER + '"title="' +
|
|
11009
|
+
'<input type="text" tabindex="0" id="' + this.element.id + '_' + MONTHDAYWRAPPER + '" class="' + MONTHDAYWRAPPER + '"title="' +
|
|
11009
11010
|
this.localeObj.getConstant('on') + '" />' +
|
|
11010
11011
|
'</div></td></tr>' +
|
|
11011
11012
|
'<tr><td>' +
|
|
@@ -11028,7 +11029,7 @@ let RecurrenceEditor = class RecurrenceEditor extends Component {
|
|
|
11028
11029
|
'<input type="text" tabindex="0" class="' + UNTILDATE + '"title="' + this.localeObj.getConstant(UNTIL$1) + '" />' +
|
|
11029
11030
|
'</div>' +
|
|
11030
11031
|
'<div class="' + INPUTWARAPPER + ' ' + ENDONCOUNTWRAPPER + '">' +
|
|
11031
|
-
'<input type="text" tabindex="0" class="' + ENDONCOUNT + '"title="' + this.localeObj.getConstant(COUNT) + '" />' +
|
|
11032
|
+
'<input type="text" tabindex="0" id="' + this.element.id + '_' + ENDONCOUNT + '" class="' + ENDONCOUNT + '"title="' + this.localeObj.getConstant(COUNT) + '" />' +
|
|
11032
11033
|
'</div></div>' +
|
|
11033
11034
|
'</div></div>';
|
|
11034
11035
|
}
|
|
@@ -11720,7 +11721,7 @@ class EventWindow {
|
|
|
11720
11721
|
return parentDiv;
|
|
11721
11722
|
}
|
|
11722
11723
|
createRecurrenceEditor(parentDiv) {
|
|
11723
|
-
const recurrenceEditor = this.
|
|
11724
|
+
const recurrenceEditor = createElement('div', { id: this.parent.element.id + '_recurrence_editor' });
|
|
11724
11725
|
parentDiv.appendChild(recurrenceEditor);
|
|
11725
11726
|
this.recurrenceEditor = this.renderRecurrenceEditor();
|
|
11726
11727
|
this.recurrenceEditor.appendTo(recurrenceEditor);
|
|
@@ -13334,7 +13335,7 @@ class VirtualScroll {
|
|
|
13334
13335
|
}
|
|
13335
13336
|
if (!isNullOrUndefined(resCollection) && resCollection.length > 0) {
|
|
13336
13337
|
this.parent.showSpinner();
|
|
13337
|
-
const selectedEle = this.parent.
|
|
13338
|
+
const selectedEle = this.parent.getSelectedCells();
|
|
13338
13339
|
this.focusedEle = selectedEle[selectedEle.length - 1] || this.focusedEle;
|
|
13339
13340
|
this.updateContent(resWrap, conWrap, eventWrap, resCollection);
|
|
13340
13341
|
this.setTranslate(resWrap, conWrap, eventWrap, timeIndicator);
|
|
@@ -13514,7 +13515,7 @@ class VirtualScroll {
|
|
|
13514
13515
|
}
|
|
13515
13516
|
updateHorizontalContent(conWrap, resCollection) {
|
|
13516
13517
|
this.parent.resourceBase.expandedResources = resCollection;
|
|
13517
|
-
const selectedEle = this.parent.
|
|
13518
|
+
const selectedEle = this.parent.getSelectedCells();
|
|
13518
13519
|
this.focusedEle = selectedEle[selectedEle.length - 1] || this.focusedEle;
|
|
13519
13520
|
const renderedLength = conWrap.querySelectorAll('tbody tr').length;
|
|
13520
13521
|
for (let i = 0; i < renderedLength; i++) {
|
|
@@ -13904,7 +13905,9 @@ class Crud {
|
|
|
13904
13905
|
}
|
|
13905
13906
|
}
|
|
13906
13907
|
}
|
|
13907
|
-
|
|
13908
|
+
if (templateNames.length > 0) {
|
|
13909
|
+
this.parent.resetTemplates(templateNames);
|
|
13910
|
+
}
|
|
13908
13911
|
}
|
|
13909
13912
|
if (isVirtualScrollAction) {
|
|
13910
13913
|
this.parent.notify(dataReady, { processedData: this.parent.eventsProcessed });
|
|
@@ -13978,6 +13981,9 @@ class Crud {
|
|
|
13978
13981
|
return;
|
|
13979
13982
|
}
|
|
13980
13983
|
const addEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
13984
|
+
if (addEvents.length === 0) {
|
|
13985
|
+
return;
|
|
13986
|
+
}
|
|
13981
13987
|
const args = {
|
|
13982
13988
|
requestType: 'eventCreate', cancel: false, data: addEvents,
|
|
13983
13989
|
addedRecords: addEvents, changedRecords: [], deletedRecords: []
|
|
@@ -14015,6 +14021,10 @@ class Crud {
|
|
|
14015
14021
|
this.parent.quickPopup.openValidationError('blockAlert', eventData);
|
|
14016
14022
|
return;
|
|
14017
14023
|
}
|
|
14024
|
+
const updateEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
14025
|
+
if (updateEvents.length === 0) {
|
|
14026
|
+
return;
|
|
14027
|
+
}
|
|
14018
14028
|
this.parent.currentAction = action;
|
|
14019
14029
|
if (action) {
|
|
14020
14030
|
switch (action) {
|
|
@@ -14033,7 +14043,6 @@ class Crud {
|
|
|
14033
14043
|
}
|
|
14034
14044
|
}
|
|
14035
14045
|
else {
|
|
14036
|
-
const updateEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
14037
14046
|
const args = {
|
|
14038
14047
|
requestType: 'eventChange', cancel: false, data: eventData,
|
|
14039
14048
|
addedRecords: [], changedRecords: updateEvents, deletedRecords: []
|
|
@@ -14076,6 +14085,9 @@ class Crud {
|
|
|
14076
14085
|
else {
|
|
14077
14086
|
deleteEvents = (eventData instanceof Array ? eventData : [eventData]);
|
|
14078
14087
|
}
|
|
14088
|
+
if (deleteEvents.length === 0) {
|
|
14089
|
+
return;
|
|
14090
|
+
}
|
|
14079
14091
|
if (action) {
|
|
14080
14092
|
switch (action) {
|
|
14081
14093
|
case 'Delete':
|
|
@@ -15874,7 +15886,9 @@ class ResourceBase {
|
|
|
15874
15886
|
if (this.treeViewObj) {
|
|
15875
15887
|
if (this.treeViewObj.portals && this.treeViewObj.portals.length > 0) {
|
|
15876
15888
|
const treeViewTemplates = this.treeViewObj.portals.map((x) => x.propName);
|
|
15877
|
-
|
|
15889
|
+
if (treeViewTemplates.length > 0) {
|
|
15890
|
+
this.parent.resetTemplates(treeViewTemplates);
|
|
15891
|
+
}
|
|
15878
15892
|
}
|
|
15879
15893
|
this.treeViewObj.destroy();
|
|
15880
15894
|
this.treeViewObj = null;
|
|
@@ -16627,12 +16641,15 @@ let Schedule = class Schedule extends Component {
|
|
|
16627
16641
|
* @private
|
|
16628
16642
|
*/
|
|
16629
16643
|
removeSelectedClass() {
|
|
16630
|
-
const selectedCells = this.
|
|
16644
|
+
const selectedCells = this.getSelectedCells();
|
|
16631
16645
|
for (const cell of selectedCells) {
|
|
16632
16646
|
cell.setAttribute('aria-selected', 'false');
|
|
16633
16647
|
cell.removeAttribute('tabindex');
|
|
16634
16648
|
}
|
|
16635
16649
|
removeClass(selectedCells, SELECTED_CELL_CLASS);
|
|
16650
|
+
if (this.keyboardInteractionModule && this.keyboardInteractionModule.selectedCells.length > 0) {
|
|
16651
|
+
this.keyboardInteractionModule.selectedCells = [];
|
|
16652
|
+
}
|
|
16636
16653
|
}
|
|
16637
16654
|
/**
|
|
16638
16655
|
* Method to add selected class
|
|
@@ -17011,6 +17028,15 @@ let Schedule = class Schedule extends Component {
|
|
|
17011
17028
|
}
|
|
17012
17029
|
return undefined;
|
|
17013
17030
|
}
|
|
17031
|
+
/**
|
|
17032
|
+
* Retrieves the selected cells.
|
|
17033
|
+
*
|
|
17034
|
+
* @returns {Element[]} The elements of currently selected cells will be returned.
|
|
17035
|
+
* @private
|
|
17036
|
+
*/
|
|
17037
|
+
getSelectedCells() {
|
|
17038
|
+
return [].slice.call(this.element.querySelectorAll('.' + SELECTED_CELL_CLASS));
|
|
17039
|
+
}
|
|
17014
17040
|
/**
|
|
17015
17041
|
* Method to generate the announcement string
|
|
17016
17042
|
*
|
|
@@ -17696,7 +17722,10 @@ let Schedule = class Schedule extends Component {
|
|
|
17696
17722
|
* @returns {Element[]} The elements of currently selected cells will be returned.
|
|
17697
17723
|
*/
|
|
17698
17724
|
getSelectedElements() {
|
|
17699
|
-
|
|
17725
|
+
if (this.keyboardInteractionModule && this.keyboardInteractionModule.selectedCells.length > 0) {
|
|
17726
|
+
return this.keyboardInteractionModule.selectedCells;
|
|
17727
|
+
}
|
|
17728
|
+
return this.getSelectedCells();
|
|
17700
17729
|
}
|
|
17701
17730
|
/**
|
|
17702
17731
|
* To get the resource collection
|
|
@@ -20922,7 +20951,12 @@ class DragAndDrop extends ActionBase {
|
|
|
20922
20951
|
}
|
|
20923
20952
|
getDayIndex(event) {
|
|
20924
20953
|
const eventObj = extend({}, event, null, true);
|
|
20925
|
-
const
|
|
20954
|
+
const startDate = resetTime(eventObj[this.parent.eventFields.startTime]);
|
|
20955
|
+
if (this.parent.activeViewOptions.timeScale.enable && !eventObj[this.parent.eventFields.isAllDay]) {
|
|
20956
|
+
const startHour = this.parent.activeView.getStartHour();
|
|
20957
|
+
startDate.setMilliseconds(startHour.getTime() - resetTime(startHour).getTime());
|
|
20958
|
+
}
|
|
20959
|
+
const startTime = startDate.getTime();
|
|
20926
20960
|
let query = '';
|
|
20927
20961
|
let wrapper = DAY_WRAPPER_CLASS;
|
|
20928
20962
|
if (this.parent.activeViewOptions.timeScale.enable && (eventObj[this.parent.eventFields.isAllDay])) {
|