@syncfusion/ej2-schedule 26.1.40 → 26.1.41-16103
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 +243 -260
- package/README.md +82 -82
- package/dist/ej2-schedule.umd.min.js +1 -10
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +591 -244
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +1057 -703
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/helpers/e2e/index.js +3 -3
- package/helpers/e2e/recurrence-editor.js +13 -13
- package/helpers/e2e/schedule.js +13 -13
- package/license +9 -9
- package/package.json +79 -79
- package/src/recurrence-editor/date-generator.js +3 -0
- package/src/recurrence-editor/recurrence-editor-model.d.ts +65 -65
- package/src/recurrence-editor/recurrence-editor.js +19 -19
- package/src/schedule/actions/crud.js +22 -6
- package/src/schedule/actions/drag.d.ts +4 -0
- package/src/schedule/actions/drag.js +73 -34
- package/src/schedule/actions/keyboard.d.ts +1 -0
- package/src/schedule/actions/keyboard.js +45 -3
- package/src/schedule/actions/resize.js +34 -33
- package/src/schedule/actions/touch.js +4 -0
- package/src/schedule/actions/virtual-scroll.d.ts +6 -0
- package/src/schedule/actions/virtual-scroll.js +119 -34
- package/src/schedule/base/interface.d.ts +6 -2
- package/src/schedule/base/resource.js +5 -0
- package/src/schedule/base/schedule-model.d.ts +805 -805
- package/src/schedule/base/schedule.d.ts +26 -0
- package/src/schedule/base/schedule.js +63 -21
- package/src/schedule/base/util.d.ts +10 -5
- package/src/schedule/base/util.js +15 -10
- package/src/schedule/event-renderer/agenda-base.js +13 -13
- package/src/schedule/event-renderer/event-base.js +18 -3
- package/src/schedule/event-renderer/inline-edit.js +13 -5
- package/src/schedule/event-renderer/month.js +20 -17
- package/src/schedule/event-renderer/timeline-view.js +21 -18
- package/src/schedule/event-renderer/vertical-view.d.ts +2 -1
- package/src/schedule/event-renderer/vertical-view.js +65 -33
- package/src/schedule/event-renderer/year.js +20 -20
- package/src/schedule/exports/print.js +1 -0
- package/src/schedule/models/event-settings-model.d.ts +155 -155
- package/src/schedule/models/event-settings.js +19 -19
- package/src/schedule/models/field-options-model.d.ts +22 -22
- package/src/schedule/models/field-options.js +19 -19
- package/src/schedule/models/fields-model.d.ts +92 -92
- package/src/schedule/models/fields.js +19 -19
- package/src/schedule/models/group-model.d.ts +48 -48
- package/src/schedule/models/group.js +19 -19
- package/src/schedule/models/header-rows-model.d.ts +22 -22
- package/src/schedule/models/header-rows.js +19 -19
- package/src/schedule/models/quick-info-templates-model.d.ts +37 -37
- package/src/schedule/models/quick-info-templates.js +19 -19
- package/src/schedule/models/resources-model.d.ts +85 -85
- package/src/schedule/models/resources.js +19 -19
- package/src/schedule/models/time-scale-model.d.ts +40 -40
- package/src/schedule/models/time-scale.js +19 -19
- package/src/schedule/models/toolbar-model.d.ts +187 -187
- package/src/schedule/models/toolbar.js +19 -19
- package/src/schedule/models/views-model.d.ts +329 -329
- package/src/schedule/models/views.js +19 -19
- package/src/schedule/models/work-hours-model.d.ts +16 -16
- package/src/schedule/models/work-hours.js +19 -19
- package/src/schedule/popups/event-tooltip.js +2 -1
- package/src/schedule/popups/event-window.d.ts +1 -0
- package/src/schedule/popups/event-window.js +13 -10
- package/src/schedule/renderer/agenda.js +13 -13
- package/src/schedule/renderer/day.js +13 -13
- package/src/schedule/renderer/header-renderer.d.ts +1 -0
- package/src/schedule/renderer/header-renderer.js +20 -12
- package/src/schedule/renderer/month-agenda.js +13 -13
- package/src/schedule/renderer/month.js +19 -13
- package/src/schedule/renderer/timeline-header-row.js +1 -1
- package/src/schedule/renderer/timeline-month.js +13 -13
- package/src/schedule/renderer/timeline-view.js +22 -17
- package/src/schedule/renderer/timeline-year.js +19 -15
- package/src/schedule/renderer/vertical-view.js +33 -23
- package/src/schedule/renderer/view-base.d.ts +1 -0
- package/src/schedule/renderer/view-base.js +14 -1
- package/src/schedule/renderer/week.js +13 -13
- package/src/schedule/renderer/work-week.js +13 -13
- package/src/schedule/renderer/year.js +17 -17
- package/styles/bootstrap-dark-lite.css +4174 -0
- package/styles/bootstrap-dark-lite.scss +18 -0
- package/styles/bootstrap-dark.css +823 -595
- package/styles/bootstrap-dark.scss +3 -2
- package/styles/bootstrap-lite.css +4169 -0
- package/styles/bootstrap-lite.scss +18 -0
- package/styles/bootstrap.css +823 -595
- package/styles/bootstrap.scss +3 -2
- package/styles/bootstrap4-lite.css +4216 -0
- package/styles/bootstrap4-lite.scss +18 -0
- package/styles/bootstrap4.css +809 -636
- package/styles/bootstrap4.scss +3 -2
- package/styles/bootstrap5-dark-lite.css +4215 -0
- package/styles/bootstrap5-dark-lite.scss +18 -0
- package/styles/bootstrap5-dark.css +824 -596
- package/styles/bootstrap5-dark.scss +3 -2
- package/styles/bootstrap5-lite.css +4215 -0
- package/styles/bootstrap5-lite.scss +18 -0
- package/styles/bootstrap5.3-lite.css +4261 -0
- package/styles/bootstrap5.3-lite.scss +18 -0
- package/styles/bootstrap5.3.css +5023 -0
- package/styles/bootstrap5.3.scss +20 -0
- package/styles/bootstrap5.css +824 -596
- package/styles/bootstrap5.scss +3 -2
- package/styles/fabric-dark-lite.css +4144 -0
- package/styles/fabric-dark-lite.scss +18 -0
- package/styles/fabric-dark.css +830 -594
- package/styles/fabric-dark.scss +3 -2
- package/styles/fabric-lite.css +4141 -0
- package/styles/fabric-lite.scss +18 -0
- package/styles/fabric.css +830 -587
- package/styles/fabric.scss +3 -2
- package/styles/fluent-dark-lite.css +4207 -0
- package/styles/fluent-dark-lite.scss +18 -0
- package/styles/fluent-dark.css +828 -592
- package/styles/fluent-dark.scss +3 -2
- package/styles/fluent-lite.css +4207 -0
- package/styles/fluent-lite.scss +18 -0
- package/styles/fluent.css +828 -592
- package/styles/fluent.scss +3 -2
- package/styles/fluent2-lite.css +4427 -0
- package/styles/fluent2-lite.scss +18 -0
- package/styles/fluent2.css +863 -1627
- package/styles/fluent2.scss +3 -2
- package/styles/highcontrast-light-lite.css +4233 -0
- package/styles/highcontrast-light-lite.scss +18 -0
- package/styles/highcontrast-light.css +833 -583
- package/styles/highcontrast-light.scss +3 -2
- package/styles/highcontrast-lite.css +4242 -0
- package/styles/highcontrast-lite.scss +18 -0
- package/styles/highcontrast.css +834 -584
- package/styles/highcontrast.scss +3 -2
- package/styles/material-dark-lite.css +4221 -0
- package/styles/material-dark-lite.scss +18 -0
- package/styles/material-dark.css +839 -581
- package/styles/material-dark.scss +3 -2
- package/styles/material-lite.css +4247 -0
- package/styles/material-lite.scss +18 -0
- package/styles/material.css +836 -599
- package/styles/material.scss +3 -2
- package/styles/material3-dark-lite.css +4238 -0
- package/styles/material3-dark-lite.scss +18 -0
- package/styles/material3-dark.css +832 -656
- package/styles/material3-dark.scss +4 -3
- package/styles/material3-lite.css +4240 -0
- package/styles/material3-lite.scss +18 -0
- package/styles/material3.css +831 -709
- package/styles/material3.scss +4 -3
- package/styles/recurrence-editor/_all.scss +2 -2
- package/styles/recurrence-editor/_bds-definition.scss +14 -14
- package/styles/recurrence-editor/_bigger.scss +134 -0
- package/styles/recurrence-editor/_bootstrap-dark-definition.scss +14 -14
- package/styles/recurrence-editor/_bootstrap-definition.scss +14 -14
- package/styles/recurrence-editor/_bootstrap4-definition.scss +14 -14
- package/styles/recurrence-editor/_bootstrap5-definition.scss +14 -14
- package/styles/recurrence-editor/_bootstrap5.3-definition.scss +14 -14
- package/styles/recurrence-editor/_fabric-dark-definition.scss +14 -14
- package/styles/recurrence-editor/_fabric-definition.scss +14 -14
- package/styles/recurrence-editor/_fluent-definition.scss +14 -14
- package/styles/recurrence-editor/_fluent2-definition.scss +14 -14
- package/styles/recurrence-editor/_fusionnew-definition.scss +14 -14
- package/styles/recurrence-editor/_highcontrast-definition.scss +14 -14
- package/styles/recurrence-editor/_highcontrast-light-definition.scss +14 -14
- package/styles/recurrence-editor/_layout.scss +415 -525
- package/styles/recurrence-editor/_material-dark-definition.scss +14 -14
- package/styles/recurrence-editor/_material-definition.scss +14 -14
- package/styles/recurrence-editor/_material3-definition.scss +14 -14
- package/styles/recurrence-editor/_tailwind-definition.scss +14 -14
- package/styles/recurrence-editor/_theme.scss +1 -1
- package/styles/recurrence-editor/bootstrap-dark.css +87 -131
- package/styles/recurrence-editor/bootstrap-dark.scss +1 -0
- package/styles/recurrence-editor/bootstrap.css +87 -131
- package/styles/recurrence-editor/bootstrap.scss +1 -0
- package/styles/recurrence-editor/bootstrap4.css +87 -149
- package/styles/recurrence-editor/bootstrap4.scss +1 -0
- package/styles/recurrence-editor/bootstrap5-dark.css +87 -135
- package/styles/recurrence-editor/bootstrap5-dark.scss +1 -0
- package/styles/recurrence-editor/bootstrap5.3.css +501 -0
- package/styles/recurrence-editor/bootstrap5.3.scss +9 -0
- package/styles/recurrence-editor/bootstrap5.css +87 -135
- package/styles/recurrence-editor/bootstrap5.scss +1 -0
- package/styles/recurrence-editor/fabric-dark.css +87 -130
- package/styles/recurrence-editor/fabric-dark.scss +1 -0
- package/styles/recurrence-editor/fabric.css +87 -123
- package/styles/recurrence-editor/fabric.scss +1 -0
- package/styles/recurrence-editor/fluent-dark.css +87 -122
- package/styles/recurrence-editor/fluent-dark.scss +1 -0
- package/styles/recurrence-editor/fluent.css +87 -122
- package/styles/recurrence-editor/fluent.scss +1 -0
- package/styles/recurrence-editor/fluent2.css +94 -1148
- package/styles/recurrence-editor/fluent2.scss +1 -0
- package/styles/recurrence-editor/highcontrast-light.css +87 -118
- package/styles/recurrence-editor/highcontrast-light.scss +1 -0
- package/styles/recurrence-editor/highcontrast.css +87 -118
- package/styles/recurrence-editor/highcontrast.scss +1 -0
- package/styles/recurrence-editor/material-dark.css +87 -115
- package/styles/recurrence-editor/material-dark.scss +1 -0
- package/styles/recurrence-editor/material.css +87 -136
- package/styles/recurrence-editor/material.scss +1 -0
- package/styles/recurrence-editor/material3-dark.css +88 -194
- package/styles/recurrence-editor/material3-dark.scss +2 -1
- package/styles/recurrence-editor/material3.css +89 -249
- package/styles/recurrence-editor/material3.scss +2 -1
- package/styles/recurrence-editor/tailwind-dark.css +87 -116
- package/styles/recurrence-editor/tailwind-dark.scss +1 -0
- package/styles/recurrence-editor/tailwind.css +87 -116
- package/styles/recurrence-editor/tailwind.scss +1 -0
- package/styles/schedule/_all.scss +2 -2
- package/styles/schedule/_bds-definition.scss +272 -272
- package/styles/schedule/_bigger.scss +810 -0
- package/styles/schedule/_bootstrap-dark-definition.scss +270 -270
- package/styles/schedule/_bootstrap-definition.scss +270 -270
- package/styles/schedule/_bootstrap4-definition.scss +273 -273
- package/styles/schedule/_bootstrap5-definition.scss +274 -274
- package/styles/schedule/_bootstrap5.3-definition.scss +276 -273
- package/styles/schedule/_fabric-dark-definition.scss +271 -271
- package/styles/schedule/_fabric-definition.scss +270 -270
- package/styles/schedule/_fluent-definition.scss +276 -276
- package/styles/schedule/_fluent2-definition.scss +273 -273
- package/styles/schedule/_fusionnew-definition.scss +273 -273
- package/styles/schedule/_highcontrast-definition.scss +271 -271
- package/styles/schedule/_highcontrast-light-definition.scss +271 -271
- package/styles/schedule/_layout.scss +3787 -4218
- package/styles/schedule/_material-dark-definition.scss +270 -270
- package/styles/schedule/_material-definition.scss +270 -270
- package/styles/schedule/_material3-definition.scss +275 -275
- package/styles/schedule/_tailwind-definition.scss +271 -271
- package/styles/schedule/_theme.scss +589 -567
- package/styles/schedule/bootstrap-dark.css +706 -484
- package/styles/schedule/bootstrap-dark.scss +1 -0
- package/styles/schedule/bootstrap.css +706 -484
- package/styles/schedule/bootstrap.scss +1 -0
- package/styles/schedule/bootstrap4.css +699 -532
- package/styles/schedule/bootstrap4.scss +1 -0
- package/styles/schedule/bootstrap5-dark.css +714 -492
- package/styles/schedule/bootstrap5-dark.scss +1 -0
- package/styles/schedule/bootstrap5.3.css +4621 -0
- package/styles/schedule/bootstrap5.3.scss +17 -0
- package/styles/schedule/bootstrap5.css +714 -492
- package/styles/schedule/bootstrap5.scss +1 -0
- package/styles/schedule/fabric-dark.css +713 -483
- package/styles/schedule/fabric-dark.scss +1 -0
- package/styles/schedule/fabric.css +713 -476
- package/styles/schedule/fabric.scss +1 -0
- package/styles/schedule/fluent-dark.css +723 -493
- package/styles/schedule/fluent-dark.scss +1 -0
- package/styles/schedule/fluent.css +723 -493
- package/styles/schedule/fluent.scss +1 -0
- package/styles/schedule/fluent2.css +752 -1525
- package/styles/schedule/fluent2.scss +1 -0
- package/styles/schedule/highcontrast-light.css +721 -477
- package/styles/schedule/highcontrast-light.scss +1 -0
- package/styles/schedule/highcontrast.css +721 -477
- package/styles/schedule/highcontrast.scss +1 -0
- package/styles/schedule/icons/_bds.scss +220 -220
- package/styles/schedule/icons/_bootstrap-dark.scss +223 -223
- package/styles/schedule/icons/_bootstrap.scss +223 -223
- package/styles/schedule/icons/_bootstrap4.scss +217 -217
- package/styles/schedule/icons/_bootstrap5.3.scss +220 -220
- package/styles/schedule/icons/_bootstrap5.scss +220 -220
- package/styles/schedule/icons/_fabric-dark.scss +223 -223
- package/styles/schedule/icons/_fabric.scss +223 -223
- package/styles/schedule/icons/_fluent.scss +220 -220
- package/styles/schedule/icons/_fluent2.scss +220 -220
- package/styles/schedule/icons/_fusionnew.scss +220 -220
- package/styles/schedule/icons/_highcontrast-light.scss +223 -223
- package/styles/schedule/icons/_highcontrast.scss +223 -223
- package/styles/schedule/icons/_material-dark.scss +223 -223
- package/styles/schedule/icons/_material.scss +223 -223
- package/styles/schedule/icons/_material3.scss +220 -220
- package/styles/schedule/icons/_tailwind.scss +220 -220
- package/styles/schedule/material-dark.css +732 -480
- package/styles/schedule/material-dark.scss +1 -0
- package/styles/schedule/material.css +729 -498
- package/styles/schedule/material.scss +1 -0
- package/styles/schedule/material3-dark.css +713 -543
- package/styles/schedule/material3-dark.scss +2 -1
- package/styles/schedule/material3.css +714 -598
- package/styles/schedule/material3.scss +2 -1
- package/styles/schedule/tailwind-dark.css +725 -484
- package/styles/schedule/tailwind-dark.scss +1 -0
- package/styles/schedule/tailwind.css +725 -484
- package/styles/schedule/tailwind.scss +1 -0
- package/styles/tailwind-dark-lite.css +4184 -0
- package/styles/tailwind-dark-lite.scss +18 -0
- package/styles/tailwind-dark.css +832 -585
- package/styles/tailwind-dark.scss +3 -2
- package/styles/tailwind-lite.css +4184 -0
- package/styles/tailwind-lite.scss +18 -0
- package/styles/tailwind.css +832 -585
- package/styles/tailwind.scss +3 -2
- package/dist/ej2-schedule.min.js +0 -10
- package/dist/global/ej2-schedule.min.js +0 -11
- package/dist/global/ej2-schedule.min.js.map +0 -1
- package/dist/global/index.d.ts +0 -14
- package/tslint.json +0 -111
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
14
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
15
15
|
import { createElement, closest, Draggable, extend, formatUnit, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
16
16
|
import { addClass, remove, removeClass, setStyleAttribute } from '@syncfusion/ej2-base';
|
|
@@ -49,14 +49,19 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
49
49
|
_this.isAllDayTarget = false;
|
|
50
50
|
_this.targetTd = null;
|
|
51
51
|
_this.isCursorAhead = false;
|
|
52
|
+
_this.enableCurrentViewDrag = false;
|
|
53
|
+
_this.isPreventMultiDrag = false;
|
|
54
|
+
_this.slotsUptoCursor = -1;
|
|
55
|
+
_this.eleTop = 0;
|
|
52
56
|
return _this;
|
|
53
57
|
}
|
|
54
58
|
DragAndDrop.prototype.wireDragEvent = function (element) {
|
|
59
|
+
var isVerticalView = ['Day', 'Week', 'WorkWeek'].indexOf(this.parent.currentView) > -1;
|
|
55
60
|
new Draggable(element, {
|
|
56
61
|
abort: '.' + cls.EVENT_RESIZE_CLASS,
|
|
57
62
|
clone: true,
|
|
58
63
|
isDragScroll: true,
|
|
59
|
-
enableTailMode: (this.parent.eventDragArea) ? true : false,
|
|
64
|
+
enableTailMode: (this.parent.eventDragArea || isVerticalView) ? true : false,
|
|
60
65
|
cursorAt: (this.parent.eventDragArea) ? { left: -20, top: -20 } : { left: 0, top: 0 },
|
|
61
66
|
dragArea: this.dragArea,
|
|
62
67
|
dragStart: this.dragStart.bind(this),
|
|
@@ -80,6 +85,8 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
80
85
|
}
|
|
81
86
|
this.setDragActionDefaultValues();
|
|
82
87
|
this.actionObj.element = e.element;
|
|
88
|
+
this.eleTop = parseFloat(this.actionObj.element.style.top);
|
|
89
|
+
this.slotsUptoCursor = -1;
|
|
83
90
|
this.actionObj.action = 'drag';
|
|
84
91
|
var elements = [];
|
|
85
92
|
if (!this.parent.allowMultiDrag || isNullOrUndefined(this.parent.selectedElements) || this.parent.selectedElements.length === 0 ||
|
|
@@ -158,12 +165,21 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
158
165
|
}
|
|
159
166
|
var top_1 = parseInt(e.top, 10);
|
|
160
167
|
top_1 = top_1 < 0 ? 0 : top_1;
|
|
161
|
-
|
|
168
|
+
if (this.slotsUptoCursor < 0) {
|
|
169
|
+
var cellsCountUptoCursor = Math.floor(top_1 / cellHeight);
|
|
170
|
+
var cellsCountUptoEleTop = Math.floor(this.eleTop / cellHeight);
|
|
171
|
+
this.slotsUptoCursor = cellsCountUptoCursor - cellsCountUptoEleTop;
|
|
172
|
+
}
|
|
173
|
+
top_1 = (Math.floor((top_1 + 1) / cellHeight) - this.slotsUptoCursor) * cellHeight;
|
|
174
|
+
topValue = formatUnit(top_1 < 0 ? 0 : top_1);
|
|
162
175
|
var scrollHeight = this.parent.element.querySelector('.e-content-wrap').scrollHeight;
|
|
163
176
|
var cloneBottom = parseInt(topValue, 10) + this.actionObj.clone.offsetHeight;
|
|
164
177
|
if (cloneBottom > scrollHeight) {
|
|
165
178
|
topValue = (parseInt(topValue, 10) - (cloneBottom - scrollHeight)) + 'px';
|
|
166
179
|
}
|
|
180
|
+
if (this.isPreventMultiDrag) {
|
|
181
|
+
topValue = formatUnit(this.actionObj.clone.offsetTop);
|
|
182
|
+
}
|
|
167
183
|
}
|
|
168
184
|
return { left: leftValue, top: topValue };
|
|
169
185
|
};
|
|
@@ -215,6 +231,7 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
215
231
|
_this.actionObj.interval = dragEventArgs.interval;
|
|
216
232
|
_this.actionObj.navigation = dragEventArgs.navigation;
|
|
217
233
|
_this.actionObj.scroll = dragEventArgs.scroll;
|
|
234
|
+
_this.enableCurrentViewDrag = dragArgs.dragWithinRange && !dragArgs.navigation.enable && _this.parent.allowMultiDrag;
|
|
218
235
|
_this.actionObj.excludeSelectors = dragEventArgs.excludeSelectors;
|
|
219
236
|
var viewElement = _this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS);
|
|
220
237
|
_this.scrollArgs = { element: viewElement, width: viewElement.scrollWidth, height: viewElement.scrollHeight };
|
|
@@ -375,6 +392,7 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
375
392
|
DragAndDrop.prototype.dragStop = function (e) {
|
|
376
393
|
var _this = this;
|
|
377
394
|
this.isCursorAhead = false;
|
|
395
|
+
this.isPreventMultiDrag = false;
|
|
378
396
|
this.removeCloneElementClasses();
|
|
379
397
|
this.removeCloneElement();
|
|
380
398
|
clearInterval(this.actionObj.navigationInterval);
|
|
@@ -443,7 +461,7 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
443
461
|
this.timelineEventModule.cellWidth = this.actionObj.cellWidth;
|
|
444
462
|
this.timelineEventModule.getSlotDates();
|
|
445
463
|
this.actionObj.cellWidth = this.isHeaderRows ? this.timelineEventModule.cellWidth :
|
|
446
|
-
|
|
464
|
+
this.parent.getElementWidth(this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS));
|
|
447
465
|
this.calculateTimelineTime(e);
|
|
448
466
|
}
|
|
449
467
|
else {
|
|
@@ -588,7 +606,7 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
588
606
|
(dragArea.scrollTop + dragArea.offsetHeight - this.actionObj.clone.offsetHeight + window.pageYOffset) +
|
|
589
607
|
(this.actionObj.clone.offsetHeight - this.heightUptoCursorPoint);
|
|
590
608
|
offsetTop = Math.round(offsetTop / this.actionObj.cellHeight) * this.actionObj.cellHeight;
|
|
591
|
-
if (dragArea.scrollTop > 0) {
|
|
609
|
+
if (dragArea.scrollTop > 0 && offsetTop < dragArea.scrollHeight) {
|
|
592
610
|
this.actionObj.clone.style.top = formatUnit(offsetTop);
|
|
593
611
|
}
|
|
594
612
|
}
|
|
@@ -620,7 +638,9 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
620
638
|
var dragStart;
|
|
621
639
|
var dragEnd;
|
|
622
640
|
if (this.parent.activeViewOptions.timeScale.enable && !this.isAllDayDrag) {
|
|
623
|
-
this.
|
|
641
|
+
if (!this.enableCurrentViewDrag || this.multiData.length === 0) {
|
|
642
|
+
this.appendCloneElement(this.getEventWrapper(colIndex));
|
|
643
|
+
}
|
|
624
644
|
dragStart = this.parent.getDateFromElement(td);
|
|
625
645
|
dragStart.setMinutes(dragStart.getMinutes() + (diffInMinutes / heightPerMinute));
|
|
626
646
|
dragEnd = new Date(dragStart.getTime());
|
|
@@ -677,18 +697,34 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
677
697
|
this.startTime = eventObj_1[this.parent.eventFields.startTime].getTime();
|
|
678
698
|
}
|
|
679
699
|
var startTimeDiff = event[this.parent.eventFields.startTime].getTime() - this.startTime;
|
|
680
|
-
|
|
681
|
-
this.
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
var
|
|
686
|
-
|
|
687
|
-
|
|
700
|
+
if (this.enableCurrentViewDrag) {
|
|
701
|
+
var renderDates = this.getRenderedDates();
|
|
702
|
+
for (var i = 0; i < this.multiData.length; i++) {
|
|
703
|
+
var eventObj_2 = extend({}, this.multiData[parseInt(i.toString(), 10)], null, true);
|
|
704
|
+
var startTime = new Date(eventObj_2[this.parent.eventFields.startTime].getTime() + startTimeDiff);
|
|
705
|
+
var dayIndex = this.parent.getIndexOfDate(renderDates, util.resetTime(startTime));
|
|
706
|
+
if (dayIndex < 0) {
|
|
707
|
+
this.isPreventMultiDrag = true;
|
|
708
|
+
break;
|
|
709
|
+
}
|
|
710
|
+
this.isPreventMultiDrag = false;
|
|
688
711
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
712
|
+
}
|
|
713
|
+
if (!this.isPreventMultiDrag) {
|
|
714
|
+
for (var index_2 = 0; index_2 < this.multiData.length; index_2++) {
|
|
715
|
+
this.updatedData[parseInt(index_2.toString(), 10)] =
|
|
716
|
+
this.updateMultipleData(this.multiData[parseInt(index_2.toString(), 10)], startTimeDiff);
|
|
717
|
+
var dayIndex = this.getDayIndex(this.updatedData[parseInt(index_2.toString(), 10)]);
|
|
718
|
+
if (dayIndex >= 0) {
|
|
719
|
+
var isAllDay = this.updatedData[parseInt(index_2.toString(), 10)][this.parent.eventFields.isAllDay];
|
|
720
|
+
var wrapper = this.getEventWrapper(dayIndex, isAllDay);
|
|
721
|
+
this.appendCloneElement(wrapper, this.actionObj.cloneElement[parseInt(index_2.toString(), 10)]);
|
|
722
|
+
this.updateEventHeight(this.updatedData[parseInt(index_2.toString(), 10)], index_2, dayIndex);
|
|
723
|
+
}
|
|
724
|
+
else {
|
|
725
|
+
if (!isNullOrUndefined(this.actionObj.cloneElement[parseInt(index_2.toString(), 10)].parentNode)) {
|
|
726
|
+
remove(this.actionObj.cloneElement[parseInt(index_2.toString(), 10)]);
|
|
727
|
+
}
|
|
692
728
|
}
|
|
693
729
|
}
|
|
694
730
|
}
|
|
@@ -818,7 +854,7 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
818
854
|
var appHeight = this.parent.activeViewOptions.timeScale.enable ? this.verticalEvent.getHeight(eStart, eEnd) :
|
|
819
855
|
this.actionObj.element.offsetHeight;
|
|
820
856
|
var topValue = this.parent.activeViewOptions.timeScale.enable ?
|
|
821
|
-
this.verticalEvent.getTopValue(eStart
|
|
857
|
+
this.verticalEvent.getTopValue(eStart) : this.actionObj.element.offsetTop;
|
|
822
858
|
if (isNullOrUndefined(index)) {
|
|
823
859
|
if (i === 0) {
|
|
824
860
|
this.actionObj.clone.style.top = formatUnit(topValue);
|
|
@@ -906,6 +942,9 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
906
942
|
};
|
|
907
943
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
908
944
|
DragAndDrop.prototype.swapDragging = function (e) {
|
|
945
|
+
if (this.isPreventMultiDrag) {
|
|
946
|
+
return;
|
|
947
|
+
}
|
|
909
948
|
var colIndex = !isNullOrUndefined(closest(this.actionObj.target, 'td')) && closest(this.actionObj.target, 'td').cellIndex;
|
|
910
949
|
if (closest(this.actionObj.target, '.' + cls.DATE_HEADER_WRAP_CLASS) &&
|
|
911
950
|
!closest(this.actionObj.clone, '.' + cls.ALLDAY_APPOINTMENT_WRAPPER_CLASS)) {
|
|
@@ -1031,7 +1070,7 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
1031
1070
|
util.getUniversalTime(eventObj[this.parent.eventFields.startTime]);
|
|
1032
1071
|
var offsetLeft = this.parent.enableRtl ? Math.abs(this.actionObj.clone.offsetLeft) - this.actionObj.clone.offsetWidth :
|
|
1033
1072
|
parseInt(this.actionObj.clone.style.left, 10);
|
|
1034
|
-
offsetLeft = Math.
|
|
1073
|
+
offsetLeft = Math.round(offsetLeft / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
1035
1074
|
var rightOffset;
|
|
1036
1075
|
if (this.parent.enableRtl) {
|
|
1037
1076
|
rightOffset = Math.abs(parseInt(this.actionObj.clone.style.right, 10));
|
|
@@ -1217,7 +1256,7 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
1217
1256
|
return 0;
|
|
1218
1257
|
};
|
|
1219
1258
|
DragAndDrop.prototype.getColumnIndex = function (offsetLeft) {
|
|
1220
|
-
var index = Math.
|
|
1259
|
+
var index = Math.round(offsetLeft / this.actionObj.cellWidth);
|
|
1221
1260
|
if (this.isHeaderRows) {
|
|
1222
1261
|
return index;
|
|
1223
1262
|
}
|
|
@@ -1262,7 +1301,7 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
1262
1301
|
~~(dragArea.querySelector('table').offsetHeight / trCollection.length) : this.actionObj.cellHeight;
|
|
1263
1302
|
var rowIndex = Math.floor(Math.floor((this.actionObj.Y +
|
|
1264
1303
|
(dragArea.scrollTop - translateY - (window.scrollY || window.pageYOffset))) -
|
|
1265
|
-
util.getElementTop(dragArea)) / rowHeight);
|
|
1304
|
+
util.getElementTop(dragArea, this.parent.uiStateValues.isTransformed)) / rowHeight);
|
|
1266
1305
|
rowIndex = (rowIndex < 0) ? 0 : (rowIndex > trCollection.length - 1) ? trCollection.length - 1 : rowIndex;
|
|
1267
1306
|
this.actionObj.index = rowIndex;
|
|
1268
1307
|
var eventContainer = this.parent.element.querySelectorAll('.e-appointment-container:not(.e-hidden)').item(rowIndex);
|
|
@@ -1278,7 +1317,7 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
1278
1317
|
if (!isNullOrUndefined(this.parent.eventDragArea)) {
|
|
1279
1318
|
return;
|
|
1280
1319
|
}
|
|
1281
|
-
var top =
|
|
1320
|
+
var top = this.parent.getElementHeight(trCollection[parseInt(rowIndex.toString(), 10)]) * rowIndex;
|
|
1282
1321
|
if (this.parent.rowAutoHeight) {
|
|
1283
1322
|
var cursorElement = this.getCursorElement(e);
|
|
1284
1323
|
if (cursorElement) {
|
|
@@ -43,7 +43,9 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
43
43
|
ctrlShiftUpArrow: 'ctrl+shift+uparrow',
|
|
44
44
|
ctrlShiftDownArrow: 'ctrl+shift+downarrow',
|
|
45
45
|
ctrlShiftLeftArrow: 'ctrl+shift+leftarrow',
|
|
46
|
-
ctrlShiftRightArrow: 'ctrl+shift+rightarrow'
|
|
46
|
+
ctrlShiftRightArrow: 'ctrl+shift+rightarrow',
|
|
47
|
+
shiftAltY: 'shift+alt+y',
|
|
48
|
+
shiftAltN: 'shift+alt+n'
|
|
47
49
|
};
|
|
48
50
|
this.parent = parent;
|
|
49
51
|
this.parent.element.tabIndex = this.parent.element.tabIndex === -1 ? 0 : this.parent.element.tabIndex;
|
|
@@ -124,6 +126,43 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
124
126
|
this.processFTwelve(e);
|
|
125
127
|
}
|
|
126
128
|
break;
|
|
129
|
+
case 'shiftAltY':
|
|
130
|
+
this.parent.changeDate(new Date(), e);
|
|
131
|
+
break;
|
|
132
|
+
case 'shiftAltN':
|
|
133
|
+
if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda' ||
|
|
134
|
+
this.parent.currentView === 'Year') {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
this.processShiftAltN(e);
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
KeyboardInteraction.prototype.processShiftAltN = function (e) {
|
|
142
|
+
var selectedCells = this.parent.getSelectedCells();
|
|
143
|
+
var target = e.target;
|
|
144
|
+
var cellData = extend({}, null, true);
|
|
145
|
+
if (selectedCells.length > 0 && (closest(target, '.' + cls.WORK_CELLS_CLASS)
|
|
146
|
+
|| closest(target, '.' + cls.ALLDAY_CELLS_CLASS) || closest(target, '.' + cls.HEADER_CELLS_CLASS))) {
|
|
147
|
+
cellData = this.getSelectedElements(target);
|
|
148
|
+
}
|
|
149
|
+
else if (closest(target, '.' + cls.APPOINTMENT_CLASS) && !isNullOrUndefined(this.parent.activeEventData.event)) {
|
|
150
|
+
var event_1 = this.parent.activeEventData.event;
|
|
151
|
+
cellData.startTime = event_1.StartTime;
|
|
152
|
+
cellData.endTime = event_1.EndTime;
|
|
153
|
+
cellData.isAllDay = event_1.IsAllDay;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
var workHour = this.parent.getStartEndTime(this.parent.workHours.start);
|
|
157
|
+
var slotInterval = this.parent.activeViewOptions.timeScale.interval /
|
|
158
|
+
this.parent.activeViewOptions.timeScale.slotCount;
|
|
159
|
+
cellData.startTime = new Date(this.parent.selectedDate);
|
|
160
|
+
cellData.startTime.setHours(workHour.getHours(), workHour.getMinutes(), 0, 0);
|
|
161
|
+
cellData.endTime = new Date(cellData.startTime.getTime() + slotInterval * 60000);
|
|
162
|
+
}
|
|
163
|
+
var args = extend(cellData, { cancel: false, event: e });
|
|
164
|
+
if (args != null) {
|
|
165
|
+
this.parent.eventWindow.openEditor(args, 'Add');
|
|
127
166
|
}
|
|
128
167
|
};
|
|
129
168
|
KeyboardInteraction.prototype.processFTwelve = function (e) {
|
|
@@ -549,8 +588,11 @@ var KeyboardInteraction = /** @class */ (function () {
|
|
|
549
588
|
return this.parent.eventBase.selectWorkCellByTime([selectedObject]);
|
|
550
589
|
};
|
|
551
590
|
KeyboardInteraction.prototype.processViewNavigation = function (e) {
|
|
552
|
-
|
|
553
|
-
|
|
591
|
+
if (isNullOrUndefined(e.code)) {
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
var index = parseInt(e.code.slice(e.code.length - 1), 10) - 1;
|
|
595
|
+
if (!isNaN(index) && !isNullOrUndefined(this.parent.views) && index < this.parent.views.length) {
|
|
554
596
|
var view = this.parent.viewCollections[parseInt(index.toString(), 10)].option;
|
|
555
597
|
this.parent.changeView(view, e, undefined, index);
|
|
556
598
|
if (this.parent.headerModule) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
14
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
15
15
|
import { addClass, Browser, EventHandler, remove, closest, extend, formatUnit, setStyleAttribute, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
16
16
|
import { ActionBase } from '../actions/action-base';
|
|
@@ -86,8 +86,8 @@ var Resize = /** @class */ (function (_super) {
|
|
|
86
86
|
};
|
|
87
87
|
_this.actionObj.groupIndex = _this.parent.uiStateValues.isGroupAdaptive ? _this.parent.uiStateValues.groupIndex : 0;
|
|
88
88
|
var workCell = _this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS);
|
|
89
|
-
_this.actionObj.cellWidth =
|
|
90
|
-
_this.actionObj.cellHeight =
|
|
89
|
+
_this.actionObj.cellWidth = _this.parent.getElementWidth(workCell);
|
|
90
|
+
_this.actionObj.cellHeight = _this.parent.getElementHeight(workCell);
|
|
91
91
|
var hRows = _this.parent.activeViewOptions.headerRows.map(function (row) { return row.option; });
|
|
92
92
|
if (_this.parent.activeView.isTimelineView() && hRows.length > 0 && ['Date', 'Hour'].indexOf(hRows.slice(-1)[0]) < 0) {
|
|
93
93
|
var tr = _this.parent.getContentTable().querySelector('tr');
|
|
@@ -321,6 +321,7 @@ var Resize = /** @class */ (function (_super) {
|
|
|
321
321
|
EventHandler.remove(document, Browser.touchEndEvent, this.resizeStop);
|
|
322
322
|
clearInterval(this.actionObj.scrollInterval);
|
|
323
323
|
this.actionObj.scrollInterval = null;
|
|
324
|
+
this.actionObj.action = null;
|
|
324
325
|
this.removeCloneElementClasses();
|
|
325
326
|
this.removeCloneElement();
|
|
326
327
|
this.actionClass('removeClass');
|
|
@@ -397,10 +398,10 @@ var Resize = /** @class */ (function (_super) {
|
|
|
397
398
|
parseInt(this.actionObj.clone.style.left, 10);
|
|
398
399
|
offsetValue = Math.round(offsetValue / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
399
400
|
if (!isLeft) {
|
|
400
|
-
offsetValue += (
|
|
401
|
+
offsetValue += (this.parent.getElementWidth(this.actionObj.clone) - this.actionObj.cellWidth);
|
|
401
402
|
}
|
|
402
|
-
cellIndex = !isTimelineMonth ? Math.round(offsetValue / (
|
|
403
|
-
Math.floor(offsetValue / Math.floor(
|
|
403
|
+
cellIndex = !isTimelineMonth ? Math.round(offsetValue / (this.parent.getElementWidth(tr) / noOfDays)) :
|
|
404
|
+
Math.floor(offsetValue / Math.floor(this.parent.getElementWidth(tr) / noOfDays));
|
|
404
405
|
isDateHeader = isTimeViews && headerName === 'Date';
|
|
405
406
|
cellIndex = isLeft ? cellIndex : isTimelineMonth ? cellIndex + 1 : cellIndex;
|
|
406
407
|
isLastCell = cellIndex === tdCollections.length;
|
|
@@ -409,7 +410,7 @@ var Resize = /** @class */ (function (_super) {
|
|
|
409
410
|
else {
|
|
410
411
|
var cellWidth = this.actionObj.cellWidth;
|
|
411
412
|
cellIndex = isLeft ? Math.floor(offset / this.actionObj.cellWidth) :
|
|
412
|
-
Math.ceil((offset + (
|
|
413
|
+
Math.ceil((offset + (this.parent.getElementWidth(this.actionObj.clone) - cellWidth)) / this.actionObj.cellWidth);
|
|
413
414
|
if (this.parent.enableRtl) {
|
|
414
415
|
var cellOffsetWidth = 0;
|
|
415
416
|
if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
|
|
@@ -417,7 +418,7 @@ var Resize = /** @class */ (function (_super) {
|
|
|
417
418
|
cellOffsetWidth = this.actionObj.cellWidth;
|
|
418
419
|
}
|
|
419
420
|
var offsetWidth = (Math.floor(offset / this.actionObj.cellWidth) *
|
|
420
|
-
this.actionObj.cellWidth) + (isLeft ? 0 :
|
|
421
|
+
this.actionObj.cellWidth) + (isLeft ? 0 : this.parent.getElementWidth(this.actionObj.clone) - cellOffsetWidth);
|
|
421
422
|
cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
|
|
422
423
|
}
|
|
423
424
|
isLastCell = cellIndex === tdCollections.length;
|
|
@@ -436,7 +437,7 @@ var Resize = /** @class */ (function (_super) {
|
|
|
436
437
|
}
|
|
437
438
|
else {
|
|
438
439
|
if (!isLeft) {
|
|
439
|
-
offset +=
|
|
440
|
+
offset += this.parent.getElementWidth(this.actionObj.clone);
|
|
440
441
|
}
|
|
441
442
|
var spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
|
|
442
443
|
(offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
|
|
@@ -448,9 +449,9 @@ var Resize = /** @class */ (function (_super) {
|
|
|
448
449
|
}
|
|
449
450
|
else {
|
|
450
451
|
var cloneIndex = closest(this.actionObj.clone, 'td').cellIndex;
|
|
451
|
-
var originalWidth = Math.ceil((isLeft ?
|
|
452
|
+
var originalWidth = Math.ceil((isLeft ? this.parent.getElementWidth(this.actionObj.element) : 0) /
|
|
452
453
|
this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
453
|
-
var noOfDays = Math.ceil((
|
|
454
|
+
var noOfDays = Math.ceil((this.parent.getElementWidth(this.actionObj.clone) - originalWidth) /
|
|
454
455
|
this.actionObj.cellWidth);
|
|
455
456
|
var tr = closest(this.actionObj.clone, 'tr');
|
|
456
457
|
var dayIndex = isLeft ? cloneIndex - noOfDays : cloneIndex + noOfDays - 1;
|
|
@@ -513,9 +514,9 @@ var Resize = /** @class */ (function (_super) {
|
|
|
513
514
|
var slotInterval = (this.actionObj.cellWidth / this.actionObj.slotInterval) * this.actionObj.interval;
|
|
514
515
|
var pageWidth = isLeft ? (this.actionObj.X - this.actionObj.pageX) : (this.actionObj.pageX - this.actionObj.X);
|
|
515
516
|
var targetWidth = isTimelineView ?
|
|
516
|
-
(
|
|
517
|
-
this.parent.currentView === 'Month' ?
|
|
518
|
-
Math.ceil(
|
|
517
|
+
(this.parent.getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth :
|
|
518
|
+
this.parent.currentView === 'Month' ? this.parent.getElementWidth(this.actionObj.element) :
|
|
519
|
+
Math.ceil(this.parent.getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
519
520
|
var offsetWidth = targetWidth + (Math.ceil(pageWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth);
|
|
520
521
|
var left = (this.parent.enableRtl) ? parseInt(this.actionObj.element.style.right, 10) : this.actionObj.clone.offsetLeft;
|
|
521
522
|
if (isTimeViews) {
|
|
@@ -530,7 +531,7 @@ var Resize = /** @class */ (function (_super) {
|
|
|
530
531
|
this.actionObj.event[this.parent.eventFields.isAllDay] = false;
|
|
531
532
|
}
|
|
532
533
|
var width = !isLeft && ((offsetWidth + this.actionObj.clone.offsetLeft > this.scrollArgs.width)) ?
|
|
533
|
-
|
|
534
|
+
this.parent.getElementWidth(this.actionObj.clone) : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
|
|
534
535
|
if (this.parent.enableRtl) {
|
|
535
536
|
var rightValue = isTimelineView ? parseInt(this.actionObj.element.style.right, 10) :
|
|
536
537
|
-(offsetWidth - this.actionObj.cellWidth);
|
|
@@ -544,7 +545,7 @@ var Resize = /** @class */ (function (_super) {
|
|
|
544
545
|
}
|
|
545
546
|
rightValue = rightValue >= this.scrollArgs.width ? this.scrollArgs.width - this.actionObj.cellWidth : rightValue;
|
|
546
547
|
styles.right = formatUnit(rightValue);
|
|
547
|
-
width = width + rightValue > this.scrollArgs.width ?
|
|
548
|
+
width = width + rightValue > this.scrollArgs.width ? this.parent.getElementWidth(this.actionObj.clone) : width;
|
|
548
549
|
}
|
|
549
550
|
else {
|
|
550
551
|
var offsetLeft = isLeft ? this.actionObj.element.offsetLeft - (this.actionObj.X - this.actionObj.pageX) :
|
|
@@ -552,12 +553,12 @@ var Resize = /** @class */ (function (_super) {
|
|
|
552
553
|
if (isTimelineView) {
|
|
553
554
|
offsetLeft = isLeft ? offsetLeft : parseInt(this.actionObj.clone.style.left, 10);
|
|
554
555
|
if (this.parent.enableRtl) {
|
|
555
|
-
offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X -
|
|
556
|
+
offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.parent.getElementWidth(this.actionObj.clone))
|
|
556
557
|
? parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
|
|
557
558
|
}
|
|
558
559
|
else {
|
|
559
|
-
offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X +
|
|
560
|
-
|
|
560
|
+
offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.parent.getElementWidth(this.actionObj.clone) &&
|
|
561
|
+
this.parent.getElementWidth(this.actionObj.clone) === this.actionObj.cellWidth) ?
|
|
561
562
|
parseInt(this.actionObj.clone.style.left, 10) : offsetLeft : offsetLeft;
|
|
562
563
|
}
|
|
563
564
|
}
|
|
@@ -573,10 +574,10 @@ var Resize = /** @class */ (function (_super) {
|
|
|
573
574
|
}
|
|
574
575
|
else {
|
|
575
576
|
offsetLeft = 0;
|
|
576
|
-
width =
|
|
577
|
+
width = this.parent.getElementWidth(this.actionObj.clone);
|
|
577
578
|
}
|
|
578
579
|
}
|
|
579
|
-
var cloneWidth = Math.ceil(
|
|
580
|
+
var cloneWidth = Math.ceil(this.parent.getElementWidth(this.actionObj.clone) / this.actionObj.cellWidth) *
|
|
580
581
|
this.actionObj.cellWidth;
|
|
581
582
|
if (isLeft) {
|
|
582
583
|
styles.left = formatUnit(isTimelineView ? offsetLeft : isLeft ? leftValue < 0 ? -offsetLeft :
|
|
@@ -125,6 +125,7 @@ var ScheduleTouch = /** @class */ (function () {
|
|
|
125
125
|
this.parent.selectedElements = [];
|
|
126
126
|
this.parent.eventBase.getSelectedEventElements(target);
|
|
127
127
|
if (this.parent.resizeModule && closest(e.originalEvent.target, '.' + cls.EVENT_RESIZE_CLASS)) {
|
|
128
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
128
129
|
this.parent.resizeModule.resizeStart(e.originalEvent);
|
|
129
130
|
}
|
|
130
131
|
}
|
|
@@ -211,6 +212,9 @@ var ScheduleTouch = /** @class */ (function () {
|
|
|
211
212
|
this.element.style.transform = 'translatex(' + (this.parent.enableRtl ? prevWidth : -this.currentPanel.element.offsetLeft) + 'px)';
|
|
212
213
|
};
|
|
213
214
|
ScheduleTouch.prototype.onTransitionEnd = function () {
|
|
215
|
+
if (!isNullOrUndefined(this.element) && !this.element.classList.contains(cls.TRANSLATE_CLASS)) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
214
218
|
removeClass([this.element], cls.TRANSLATE_CLASS);
|
|
215
219
|
this.element.style.transitionDuration = '';
|
|
216
220
|
this.element.style.transform = '';
|
|
@@ -16,6 +16,8 @@ export declare class VirtualScroll {
|
|
|
16
16
|
isHorizontalScroll: boolean;
|
|
17
17
|
isRemoteRefresh: boolean;
|
|
18
18
|
private startIndex;
|
|
19
|
+
existingDataCollection: TdData[];
|
|
20
|
+
enableTransition: boolean;
|
|
19
21
|
constructor(parent: Schedule);
|
|
20
22
|
private addEventListener;
|
|
21
23
|
private removeEventListener;
|
|
@@ -39,7 +41,11 @@ export declare class VirtualScroll {
|
|
|
39
41
|
private getByIdCollection;
|
|
40
42
|
private setStartEndIndex;
|
|
41
43
|
updateContent(resWrap: HTMLElement, conWrap: HTMLElement, eventWrap: HTMLElement, resCollection: TdData[]): void;
|
|
44
|
+
private removeObsoleteRows;
|
|
42
45
|
private updateHorizontalContent;
|
|
46
|
+
private updateMonthViewContent;
|
|
47
|
+
private updateOtherViewContent;
|
|
48
|
+
private mergeNewTdData;
|
|
43
49
|
private getBufferCollection;
|
|
44
50
|
private setTranslate;
|
|
45
51
|
updateFocusedWorkCell(): void;
|