@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
|
@@ -107,15 +107,16 @@ const MS_PER_MINUTE = 60000;
|
|
|
107
107
|
*
|
|
108
108
|
* @param {Element} container Accepts the DOM element
|
|
109
109
|
* @param {string} elementClass Accepts the element class
|
|
110
|
+
* @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
|
|
110
111
|
* @returns {number} Returns the height of the element
|
|
111
112
|
*/
|
|
112
|
-
function getElementHeightFromClass(container, elementClass) {
|
|
113
|
+
function getElementHeightFromClass(container, elementClass, isTransformed) {
|
|
113
114
|
let height = 0;
|
|
114
115
|
const el = createElement('div', { className: elementClass }).cloneNode();
|
|
115
116
|
el.style.visibility = 'hidden';
|
|
116
117
|
el.style.position = 'absolute';
|
|
117
118
|
container.appendChild(el);
|
|
118
|
-
height = getElementHeight(el);
|
|
119
|
+
height = getElementHeight(el, isTransformed);
|
|
119
120
|
remove(el);
|
|
120
121
|
return height;
|
|
121
122
|
}
|
|
@@ -124,15 +125,16 @@ function getElementHeightFromClass(container, elementClass) {
|
|
|
124
125
|
*
|
|
125
126
|
* @param {Element} container Accepts the DOM element
|
|
126
127
|
* @param {string} elementClass Accepts the element class
|
|
128
|
+
* @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
|
|
127
129
|
* @returns {number} Returns the width of the element
|
|
128
130
|
*/
|
|
129
|
-
function getElementWidthFromClass(container, elementClass) {
|
|
131
|
+
function getElementWidthFromClass(container, elementClass, isTransformed) {
|
|
130
132
|
let width = 0;
|
|
131
133
|
const el = createElement('div', { className: elementClass }).cloneNode();
|
|
132
134
|
el.style.visibility = 'hidden';
|
|
133
135
|
el.style.position = 'absolute';
|
|
134
136
|
container.appendChild(el);
|
|
135
|
-
width = getElementWidth(el);
|
|
137
|
+
width = getElementWidth(el, isTransformed);
|
|
136
138
|
remove(el);
|
|
137
139
|
return width;
|
|
138
140
|
}
|
|
@@ -523,28 +525,31 @@ function capitalizeFirstWord(inputString, type) {
|
|
|
523
525
|
* Method to get element cell width
|
|
524
526
|
*
|
|
525
527
|
* @param {HTMLElement} element Accepts the DOM element
|
|
528
|
+
* @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
|
|
526
529
|
* @returns {number} Returns the width of the given element
|
|
527
530
|
*/
|
|
528
|
-
function getElementWidth(element) {
|
|
529
|
-
return
|
|
531
|
+
function getElementWidth(element, isTransformed) {
|
|
532
|
+
return isTransformed ? element.offsetWidth : element.getBoundingClientRect().width;
|
|
530
533
|
}
|
|
531
534
|
/**
|
|
532
535
|
* Method to get element cell Height
|
|
533
536
|
*
|
|
534
537
|
* @param {HTMLElement} element Accepts the DOM element
|
|
538
|
+
* @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
|
|
535
539
|
* @returns {number} Returns the Height of the given element
|
|
536
540
|
*/
|
|
537
|
-
function getElementHeight(element) {
|
|
538
|
-
return
|
|
541
|
+
function getElementHeight(element, isTransformed) {
|
|
542
|
+
return isTransformed ? element.offsetHeight : element.getBoundingClientRect().height;
|
|
539
543
|
}
|
|
540
544
|
/**
|
|
541
545
|
* Method to get element cell Top
|
|
542
546
|
*
|
|
543
547
|
* @param {HTMLElement} element Accepts the DOM element
|
|
548
|
+
* @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
|
|
544
549
|
* @returns {number} Returns the top value of the given element
|
|
545
550
|
*/
|
|
546
|
-
function getElementTop(element) {
|
|
547
|
-
return
|
|
551
|
+
function getElementTop(element, isTransformed) {
|
|
552
|
+
return isTransformed ? element.offsetTop : element.getBoundingClientRect().top;
|
|
548
553
|
}
|
|
549
554
|
|
|
550
555
|
/**
|
|
@@ -1079,10 +1084,12 @@ class HeaderRenderer {
|
|
|
1079
1084
|
items: args.items,
|
|
1080
1085
|
overflowMode: 'Popup',
|
|
1081
1086
|
clicked: this.toolbarClickHandler.bind(this),
|
|
1087
|
+
created: this.toolbarCreateHandler.bind(this),
|
|
1082
1088
|
enableRtl: this.parent.enableRtl,
|
|
1083
1089
|
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
|
1084
1090
|
locale: this.parent.locale
|
|
1085
1091
|
});
|
|
1092
|
+
this.toolbarObj.isStringTemplate = true;
|
|
1086
1093
|
this.toolbarObj.root = this.parent.root ? this.parent.root : this.parent;
|
|
1087
1094
|
this.toolbarObj.appendTo(this.parent.element.querySelector('.' + HEADER_TOOLBAR));
|
|
1088
1095
|
this.toolbarObj.element.setAttribute('aria-label', 'Scheduler');
|
|
@@ -1511,6 +1518,12 @@ class HeaderRenderer {
|
|
|
1511
1518
|
const views = [].slice.call(this.element.querySelectorAll('.e-views'));
|
|
1512
1519
|
return views.indexOf(target);
|
|
1513
1520
|
}
|
|
1521
|
+
toolbarCreateHandler() {
|
|
1522
|
+
if (this.parent && this.parent.portals && this.toolbarObj && this.toolbarObj.portals) {
|
|
1523
|
+
this.parent.portals = this.parent.portals.concat(this.toolbarObj.portals);
|
|
1524
|
+
this.parent['renderReactTemplates']();
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1514
1527
|
toolbarClickHandler(args) {
|
|
1515
1528
|
if (!args.item) {
|
|
1516
1529
|
return;
|
|
@@ -1654,7 +1667,7 @@ class HeaderRenderer {
|
|
|
1654
1667
|
let firstDate = new Date(dates[0].getTime());
|
|
1655
1668
|
let lastDate = new Date(dates[dates.length - 1].getTime());
|
|
1656
1669
|
if (this.parent.currentView === 'WorkWeek' || this.parent.currentView === 'TimelineWorkWeek') {
|
|
1657
|
-
firstDate = getWeekFirstDate(resetTime(this.parent.selectedDate), this.parent.firstDayOfWeek);
|
|
1670
|
+
firstDate = getWeekFirstDate(resetTime(this.parent.selectedDate), this.parent.activeViewOptions.firstDayOfWeek);
|
|
1658
1671
|
lastDate = addDays(firstDate, 7 * this.parent.activeViewOptions.interval);
|
|
1659
1672
|
}
|
|
1660
1673
|
else if (this.parent.currentView === 'Month') {
|
|
@@ -1910,6 +1923,7 @@ class ScheduleTouch {
|
|
|
1910
1923
|
this.parent.selectedElements = [];
|
|
1911
1924
|
this.parent.eventBase.getSelectedEventElements(target);
|
|
1912
1925
|
if (this.parent.resizeModule && closest(e.originalEvent.target, '.' + EVENT_RESIZE_CLASS)) {
|
|
1926
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1913
1927
|
this.parent.resizeModule.resizeStart(e.originalEvent);
|
|
1914
1928
|
}
|
|
1915
1929
|
}
|
|
@@ -1995,6 +2009,9 @@ class ScheduleTouch {
|
|
|
1995
2009
|
this.element.style.transform = 'translatex(' + (this.parent.enableRtl ? prevWidth : -this.currentPanel.element.offsetLeft) + 'px)';
|
|
1996
2010
|
}
|
|
1997
2011
|
onTransitionEnd() {
|
|
2012
|
+
if (!isNullOrUndefined(this.element) && !this.element.classList.contains(TRANSLATE_CLASS)) {
|
|
2013
|
+
return;
|
|
2014
|
+
}
|
|
1998
2015
|
removeClass([this.element], TRANSLATE_CLASS);
|
|
1999
2016
|
this.element.style.transitionDuration = '';
|
|
2000
2017
|
this.element.style.transform = '';
|
|
@@ -2079,7 +2096,9 @@ class KeyboardInteraction {
|
|
|
2079
2096
|
ctrlShiftUpArrow: 'ctrl+shift+uparrow',
|
|
2080
2097
|
ctrlShiftDownArrow: 'ctrl+shift+downarrow',
|
|
2081
2098
|
ctrlShiftLeftArrow: 'ctrl+shift+leftarrow',
|
|
2082
|
-
ctrlShiftRightArrow: 'ctrl+shift+rightarrow'
|
|
2099
|
+
ctrlShiftRightArrow: 'ctrl+shift+rightarrow',
|
|
2100
|
+
shiftAltY: 'shift+alt+y',
|
|
2101
|
+
shiftAltN: 'shift+alt+n'
|
|
2083
2102
|
};
|
|
2084
2103
|
this.parent = parent;
|
|
2085
2104
|
this.parent.element.tabIndex = this.parent.element.tabIndex === -1 ? 0 : this.parent.element.tabIndex;
|
|
@@ -2160,6 +2179,43 @@ class KeyboardInteraction {
|
|
|
2160
2179
|
this.processFTwelve(e);
|
|
2161
2180
|
}
|
|
2162
2181
|
break;
|
|
2182
|
+
case 'shiftAltY':
|
|
2183
|
+
this.parent.changeDate(new Date(), e);
|
|
2184
|
+
break;
|
|
2185
|
+
case 'shiftAltN':
|
|
2186
|
+
if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda' ||
|
|
2187
|
+
this.parent.currentView === 'Year') {
|
|
2188
|
+
return;
|
|
2189
|
+
}
|
|
2190
|
+
this.processShiftAltN(e);
|
|
2191
|
+
break;
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
processShiftAltN(e) {
|
|
2195
|
+
const selectedCells = this.parent.getSelectedCells();
|
|
2196
|
+
const target = e.target;
|
|
2197
|
+
let cellData = extend({}, null, true);
|
|
2198
|
+
if (selectedCells.length > 0 && (closest(target, '.' + WORK_CELLS_CLASS)
|
|
2199
|
+
|| closest(target, '.' + ALLDAY_CELLS_CLASS) || closest(target, '.' + HEADER_CELLS_CLASS))) {
|
|
2200
|
+
cellData = this.getSelectedElements(target);
|
|
2201
|
+
}
|
|
2202
|
+
else if (closest(target, '.' + APPOINTMENT_CLASS) && !isNullOrUndefined(this.parent.activeEventData.event)) {
|
|
2203
|
+
const event = this.parent.activeEventData.event;
|
|
2204
|
+
cellData.startTime = event.StartTime;
|
|
2205
|
+
cellData.endTime = event.EndTime;
|
|
2206
|
+
cellData.isAllDay = event.IsAllDay;
|
|
2207
|
+
}
|
|
2208
|
+
else {
|
|
2209
|
+
const workHour = this.parent.getStartEndTime(this.parent.workHours.start);
|
|
2210
|
+
const slotInterval = this.parent.activeViewOptions.timeScale.interval /
|
|
2211
|
+
this.parent.activeViewOptions.timeScale.slotCount;
|
|
2212
|
+
cellData.startTime = new Date(this.parent.selectedDate);
|
|
2213
|
+
cellData.startTime.setHours(workHour.getHours(), workHour.getMinutes(), 0, 0);
|
|
2214
|
+
cellData.endTime = new Date(cellData.startTime.getTime() + slotInterval * 60000);
|
|
2215
|
+
}
|
|
2216
|
+
const args = extend(cellData, { cancel: false, event: e });
|
|
2217
|
+
if (args != null) {
|
|
2218
|
+
this.parent.eventWindow.openEditor(args, 'Add');
|
|
2163
2219
|
}
|
|
2164
2220
|
}
|
|
2165
2221
|
processFTwelve(e) {
|
|
@@ -2580,8 +2636,11 @@ class KeyboardInteraction {
|
|
|
2580
2636
|
return this.parent.eventBase.selectWorkCellByTime([selectedObject]);
|
|
2581
2637
|
}
|
|
2582
2638
|
processViewNavigation(e) {
|
|
2583
|
-
|
|
2584
|
-
|
|
2639
|
+
if (isNullOrUndefined(e.code)) {
|
|
2640
|
+
return;
|
|
2641
|
+
}
|
|
2642
|
+
const index = parseInt(e.code.slice(e.code.length - 1), 10) - 1;
|
|
2643
|
+
if (!isNaN(index) && !isNullOrUndefined(this.parent.views) && index < this.parent.views.length) {
|
|
2585
2644
|
const view = this.parent.viewCollections[parseInt(index.toString(), 10)].option;
|
|
2586
2645
|
this.parent.changeView(view, e, undefined, index);
|
|
2587
2646
|
if (this.parent.headerModule) {
|
|
@@ -4127,6 +4186,9 @@ function weeklyType(startDate, endDate, data, ruleObject) {
|
|
|
4127
4186
|
}
|
|
4128
4187
|
else {
|
|
4129
4188
|
tempDate = getStartDateForWeek(startDate, ruleObject.day);
|
|
4189
|
+
if (interval > 1 && dayIndex.indexOf(ruleObject.day[0]) < startDate.getDay()) {
|
|
4190
|
+
tempDate.setDate(tempDate.getDate() + ((interval - 1) * 7));
|
|
4191
|
+
}
|
|
4130
4192
|
while (compareDates(tempDate, endDate)) {
|
|
4131
4193
|
weekState = validateRules(tempDate, ruleObject);
|
|
4132
4194
|
if (weekState && (expectedDays.indexOf(DAYINDEX[tempDate.getDay()]) > -1)) {
|
|
@@ -6295,7 +6357,7 @@ class EventBase {
|
|
|
6295
6357
|
this.parent.activeEventData = { event: eventObject, element: target };
|
|
6296
6358
|
}
|
|
6297
6359
|
generateOccurrence(event, viewDate, isMaxCount) {
|
|
6298
|
-
|
|
6360
|
+
let startDate = event[this.parent.eventFields.startTime];
|
|
6299
6361
|
const endDate = event[this.parent.eventFields.endTime];
|
|
6300
6362
|
const eventRule = event[this.parent.eventFields.recurrenceRule];
|
|
6301
6363
|
const timeZoneDiff = endDate.getTimezoneOffset() - startDate.getTimezoneOffset();
|
|
@@ -6309,6 +6371,10 @@ class EventBase {
|
|
|
6309
6371
|
const newTimezone = this.parent.timezone || this.parent.tzModule.getLocalTimezoneName();
|
|
6310
6372
|
const firstDay = this.parent.activeViewOptions.firstDayOfWeek;
|
|
6311
6373
|
const calendarMode = this.parent.calendarMode;
|
|
6374
|
+
if (event[this.parent.eventFields.recurrenceRule] && event[this.parent.eventFields.recurrenceRule].includes('BYMONTHDAY') &&
|
|
6375
|
+
this.parent.timezone && event[this.parent.eventFields.startTimezone] && event[this.parent.eventFields.endTimezone]) {
|
|
6376
|
+
startDate = this.parent.tzModule.convert(event[this.parent.eventFields.startTime], this.parent.timezone, event[this.parent.eventFields.startTimezone]);
|
|
6377
|
+
}
|
|
6312
6378
|
const dates = generate(startDate, eventRule, exception, firstDay, maxCount, viewDate, calendarMode, newTimezone);
|
|
6313
6379
|
if (this.parent.currentView === 'Agenda' && eventRule.indexOf('COUNT') === -1 && eventRule.indexOf('UNTIL') === -1) {
|
|
6314
6380
|
if (isNullOrUndefined(event.generatedDates)) {
|
|
@@ -6323,10 +6389,18 @@ class EventBase {
|
|
|
6323
6389
|
}
|
|
6324
6390
|
}
|
|
6325
6391
|
}
|
|
6392
|
+
let isDSTAdjusted = false;
|
|
6393
|
+
let convertedDates = [];
|
|
6394
|
+
if (event[this.parent.eventFields.recurrenceRule] && event[this.parent.eventFields.recurrenceRule].includes('BYMONTHDAY') &&
|
|
6395
|
+
this.parent.timezone && event[this.parent.eventFields.startTimezone] && event[this.parent.eventFields.endTimezone]) {
|
|
6396
|
+
isDSTAdjusted = true;
|
|
6397
|
+
convertedDates.push(...dates.map((date) => this.parent.tzModule.convert(new Date(date), event[this.parent.eventFields.startTimezone], this.parent.timezone).getTime()));
|
|
6398
|
+
}
|
|
6399
|
+
convertedDates = convertedDates.length > 0 ? convertedDates : dates;
|
|
6326
6400
|
const occurrenceCollection = [];
|
|
6327
|
-
for (let date of
|
|
6401
|
+
for (let date of convertedDates) {
|
|
6328
6402
|
const clonedObject = extend({}, event, null, true);
|
|
6329
|
-
date = this.getDSTAdjustedTime(date, clonedObject);
|
|
6403
|
+
date = !isDSTAdjusted ? this.getDSTAdjustedTime(date, clonedObject) : date;
|
|
6330
6404
|
clonedObject[this.parent.eventFields.startTime] = new Date(date);
|
|
6331
6405
|
clonedObject[this.parent.eventFields.endTime] = new Date(new Date(date).setMilliseconds(duration));
|
|
6332
6406
|
clonedObject[this.parent.eventFields.recurrenceID] = clonedObject[this.parent.eventFields.id];
|
|
@@ -6766,8 +6840,8 @@ class VerticalEvent extends EventBase {
|
|
|
6766
6840
|
this.slotCount = this.parent.activeViewOptions.timeScale.slotCount;
|
|
6767
6841
|
this.interval = this.parent.activeViewOptions.timeScale.interval;
|
|
6768
6842
|
this.allDayLevel = 0;
|
|
6769
|
-
this.startHour = this.parent.
|
|
6770
|
-
this.endHour = this.parent.
|
|
6843
|
+
this.startHour = this.getStartEndHours(this.parent.activeViewOptions.startHour);
|
|
6844
|
+
this.endHour = this.getStartEndHours(this.parent.activeViewOptions.endHour);
|
|
6771
6845
|
this.element = this.parent.activeView.getPanel();
|
|
6772
6846
|
this.fields = this.parent.eventFields;
|
|
6773
6847
|
this.animation = new Animation({ progress: this.animationUiUpdate.bind(this) });
|
|
@@ -6855,7 +6929,7 @@ class VerticalEvent extends EventBase {
|
|
|
6855
6929
|
this.resources = this.parent.resourceBase.renderedResources;
|
|
6856
6930
|
}
|
|
6857
6931
|
this.cellHeight =
|
|
6858
|
-
parseFloat(getElementHeight(this.parent.element.querySelector('.e-content-wrap tbody tr')).toFixed(2));
|
|
6932
|
+
parseFloat(this.parent.getElementHeight(this.parent.element.querySelector('.e-content-wrap tbody tr')).toFixed(2));
|
|
6859
6933
|
this.dateRender[0] = this.parent.activeView.renderDates;
|
|
6860
6934
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
6861
6935
|
for (let i = 0, len = this.resources.length; i < len; i++) {
|
|
@@ -6895,7 +6969,7 @@ class VerticalEvent extends EventBase {
|
|
|
6895
6969
|
const renderDates = this.dateRender[parseInt(resource.toString(), 10)];
|
|
6896
6970
|
for (let day = 0, length = renderDates.length; day < length; day++) {
|
|
6897
6971
|
const startDate = new Date(renderDates[parseInt(day.toString(), 10)].getTime());
|
|
6898
|
-
const endDate = addDays(renderDates[parseInt(day.toString(), 10)], 1);
|
|
6972
|
+
const endDate = resetTime(addDays(renderDates[parseInt(day.toString(), 10)], 1));
|
|
6899
6973
|
const filterEvents = this.filterEvents(startDate, endDate, this.parent.blockProcessed, this.resources[parseInt(resource.toString(), 10)]);
|
|
6900
6974
|
for (const event of filterEvents) {
|
|
6901
6975
|
if (this.parent.resourceBase) {
|
|
@@ -6925,7 +6999,7 @@ class VerticalEvent extends EventBase {
|
|
|
6925
6999
|
}
|
|
6926
7000
|
else {
|
|
6927
7001
|
blockHeight = formatUnit(this.getHeight(eStart, eEnd));
|
|
6928
|
-
blockTop = formatUnit(this.getTopValue(eStart
|
|
7002
|
+
blockTop = formatUnit(this.getTopValue(eStart));
|
|
6929
7003
|
}
|
|
6930
7004
|
const appointmentElement = this.createBlockAppointmentElement(eventObj, resource, this.isResourceEventTemplate);
|
|
6931
7005
|
setStyleAttribute(appointmentElement, { 'width': '100%', 'height': blockHeight, 'top': blockTop });
|
|
@@ -6939,7 +7013,7 @@ class VerticalEvent extends EventBase {
|
|
|
6939
7013
|
const resources = this.getResourceList();
|
|
6940
7014
|
let dateCount = this.getStartCount();
|
|
6941
7015
|
let isRender;
|
|
6942
|
-
const appHeight = eventType === 'allDayEvents' ? getElementHeightFromClass(this.element.querySelector('.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS), APPOINTMENT_CLASS) : 0;
|
|
7016
|
+
const appHeight = eventType === 'allDayEvents' ? this.parent.getElementHeightFromClass(this.element.querySelector('.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS), APPOINTMENT_CLASS) : 0;
|
|
6943
7017
|
const allDayRowTop = eventType === 'allDayEvents' && this.allDayElement.length > 0 ? this.allDayElement[0].offsetTop : 0;
|
|
6944
7018
|
for (const resource of resources) {
|
|
6945
7019
|
isRender = true;
|
|
@@ -6958,7 +7032,7 @@ class VerticalEvent extends EventBase {
|
|
|
6958
7032
|
renderDates[parseInt(day.toString(), 10)] <= renderedDate[renderedDate.length - 1]; day++) {
|
|
6959
7033
|
this.renderedEvents = [];
|
|
6960
7034
|
const startDate = new Date(renderDates[parseInt(day.toString(), 10)].getTime());
|
|
6961
|
-
const endDate = addDays(renderDates[parseInt(day.toString(), 10)], 1);
|
|
7035
|
+
const endDate = resetTime(addDays(renderDates[parseInt(day.toString(), 10)], 1));
|
|
6962
7036
|
const filterEvents = this.filterEvents(startDate, endDate, eventCollection, this.resources[parseInt(resource.toString(), 10)]);
|
|
6963
7037
|
if (isRender) {
|
|
6964
7038
|
for (const event of filterEvents) {
|
|
@@ -7172,7 +7246,10 @@ class VerticalEvent extends EventBase {
|
|
|
7172
7246
|
const field = this.parent.eventFields;
|
|
7173
7247
|
const schedule = getStartEndHours(currentDate, this.startHour, this.endHour);
|
|
7174
7248
|
const event = extend({}, record, null, true);
|
|
7175
|
-
event.isSpanned = {
|
|
7249
|
+
event.isSpanned = {
|
|
7250
|
+
isBottom: false, isTop: false,
|
|
7251
|
+
isSameDuration: event[field.startTime].getTime() === event[field.endTime].getTime()
|
|
7252
|
+
};
|
|
7176
7253
|
if (record[field.startTime].getTime() < schedule.startHour.getTime()) {
|
|
7177
7254
|
event[field.startTime] = schedule.startHour;
|
|
7178
7255
|
event.isSpanned.isTop = true;
|
|
@@ -7285,9 +7362,9 @@ class VerticalEvent extends EventBase {
|
|
|
7285
7362
|
return;
|
|
7286
7363
|
}
|
|
7287
7364
|
if (eStart <= eEnd && isValidEvent && this.isWorkDayAvailable(resource, eStart)) {
|
|
7288
|
-
const appHeight = this.getHeight(eStart, eEnd);
|
|
7365
|
+
const appHeight = record.isSpanned.isSameDuration ? this.cellHeight : this.getHeight(eStart, eEnd);
|
|
7289
7366
|
if (eStart.getTime() >= schedule.startHour.getTime()) {
|
|
7290
|
-
topValue = this.getTopValue(eStart
|
|
7367
|
+
topValue = this.getTopValue(eStart);
|
|
7291
7368
|
}
|
|
7292
7369
|
const appIndex = this.getOverlapIndex(record, dayIndex, false, resource);
|
|
7293
7370
|
record.Index = appIndex;
|
|
@@ -7348,13 +7425,20 @@ class VerticalEvent extends EventBase {
|
|
|
7348
7425
|
const tempLeft = (parseFloat(appWidth) + 1) * index;
|
|
7349
7426
|
return (tempLeft > 99 ? 99 : tempLeft) + '%';
|
|
7350
7427
|
}
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7428
|
+
getStartEndHours(startEndTime) {
|
|
7429
|
+
if (!isNullOrUndefined(startEndTime) && startEndTime !== '') {
|
|
7430
|
+
const startEndDate = new Date(2000, 0, 0, 0);
|
|
7431
|
+
const timeString = startEndTime.split(':');
|
|
7432
|
+
if (timeString.length === 2) {
|
|
7433
|
+
startEndDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0);
|
|
7434
|
+
}
|
|
7435
|
+
return startEndDate;
|
|
7436
|
+
}
|
|
7437
|
+
return null;
|
|
7438
|
+
}
|
|
7439
|
+
getTopValue(date) {
|
|
7440
|
+
const startHour = this.getStartEndHours(this.parent.activeViewOptions.startHour);
|
|
7441
|
+
const diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
|
|
7358
7442
|
return (this.parent.activeViewOptions.timeScale.enable) ? ((diffInMinutes * this.cellHeight * this.slotCount) / this.interval) : 0;
|
|
7359
7443
|
}
|
|
7360
7444
|
getOverlapIndex(record, day, isAllDay, resource) {
|
|
@@ -7385,8 +7469,27 @@ class VerticalEvent extends EventBase {
|
|
|
7385
7469
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
7386
7470
|
this.overlapList = this.filterEventsByResource(this.resources[parseInt(resource.toString(), 10)], this.overlapList);
|
|
7387
7471
|
}
|
|
7472
|
+
const queue = [];
|
|
7388
7473
|
this.overlapList.forEach((obj) => {
|
|
7389
|
-
|
|
7474
|
+
queue.push(obj);
|
|
7475
|
+
let filterList = [];
|
|
7476
|
+
const processedIds = new Set();
|
|
7477
|
+
while (queue.length > 0) {
|
|
7478
|
+
const currentObj = queue.shift();
|
|
7479
|
+
const overlaps = appointmentList.filter((data) => {
|
|
7480
|
+
return data[fieldMapping.endTime] > currentObj[fieldMapping.startTime] &&
|
|
7481
|
+
data[fieldMapping.startTime] <= currentObj[fieldMapping.endTime] &&
|
|
7482
|
+
!processedIds.has(data[fieldMapping.id]);
|
|
7483
|
+
});
|
|
7484
|
+
overlaps.forEach((overlap) => {
|
|
7485
|
+
filterList.push(overlap);
|
|
7486
|
+
processedIds.add(overlap[fieldMapping.id]);
|
|
7487
|
+
queue.push(overlap);
|
|
7488
|
+
});
|
|
7489
|
+
if (processedIds.size < appointmentList.length - 1) {
|
|
7490
|
+
break;
|
|
7491
|
+
}
|
|
7492
|
+
}
|
|
7390
7493
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
7391
7494
|
filterList = this.filterEventsByResource(this.resources[parseInt(resource.toString(), 10)], filterList);
|
|
7392
7495
|
}
|
|
@@ -7652,7 +7755,7 @@ class MonthEvent extends EventBase {
|
|
|
7652
7755
|
this.monthHeaderHeight = wrapper.offsetTop - cellTd.offsetTop;
|
|
7653
7756
|
cellTd.removeChild(wrapper);
|
|
7654
7757
|
}
|
|
7655
|
-
this.eventHeight = getElementHeightFromClass(this.element, APPOINTMENT_CLASS);
|
|
7758
|
+
this.eventHeight = this.parent.getElementHeightFromClass(this.element, APPOINTMENT_CLASS);
|
|
7656
7759
|
const selector = '.' + CONTENT_TABLE_CLASS + ' tbody tr';
|
|
7657
7760
|
this.addCellHeight(selector, this.eventHeight, (this.parent.currentView === 'Month' ? EVENT_GAP : 2), this.monthHeaderHeight, this.moreIndicatorHeight);
|
|
7658
7761
|
const scrollTop = conWrap.scrollTop;
|
|
@@ -7731,8 +7834,8 @@ class MonthEvent extends EventBase {
|
|
|
7731
7834
|
});
|
|
7732
7835
|
}
|
|
7733
7836
|
const cellDetail = this.workCells[this.parent.activeView.isTimelineView() ? 0 : this.workCells.length - 1];
|
|
7734
|
-
this.cellWidth = getElementWidth(cellDetail);
|
|
7735
|
-
this.cellHeight = getElementHeight(cellDetail);
|
|
7837
|
+
this.cellWidth = this.parent.getElementWidth(cellDetail);
|
|
7838
|
+
this.cellHeight = this.parent.getElementHeight(cellDetail);
|
|
7736
7839
|
this.dateRender = dateRender;
|
|
7737
7840
|
const filteredDates = this.getRenderedDates(dateRender);
|
|
7738
7841
|
this.getSlotDates(workDays || this.parent.activeViewOptions.workDays);
|
|
@@ -7898,7 +8001,10 @@ class MonthEvent extends EventBase {
|
|
|
7898
8001
|
if (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) {
|
|
7899
8002
|
for (let i = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; i < len; i++) {
|
|
7900
8003
|
const sourceRes = this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)];
|
|
7901
|
-
this.
|
|
8004
|
+
if (!this.parent.uiStateValues.isGroupAdaptive ||
|
|
8005
|
+
(this.parent.uiStateValues.groupIndex === sourceRes.groupIndex && this.parent.uiStateValues.isGroupAdaptive)) {
|
|
8006
|
+
this.renderEventsHandler(sourceRes.renderDates, sourceRes.workDays, sourceRes);
|
|
8007
|
+
}
|
|
7902
8008
|
if (this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex !==
|
|
7903
8009
|
this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex) {
|
|
7904
8010
|
const target = this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)];
|
|
@@ -8285,7 +8391,7 @@ class TimelineEvent extends MonthEvent {
|
|
|
8285
8391
|
this.parent.activeViewOptions.headerRows.slice(-1)[0].option !== 'Hour') {
|
|
8286
8392
|
this.renderType = 'day';
|
|
8287
8393
|
const workCell = this.content.querySelector('.' + WORK_CELLS_CLASS);
|
|
8288
|
-
this.cellWidth = getElementWidth(workCell) / +(workCell.getAttribute('colspan') || 1);
|
|
8394
|
+
this.cellWidth = this.parent.getElementWidth(workCell) / +(workCell.getAttribute('colspan') || 1);
|
|
8289
8395
|
this.slotsPerDay = 1;
|
|
8290
8396
|
}
|
|
8291
8397
|
else {
|
|
@@ -8363,7 +8469,10 @@ class TimelineEvent extends MonthEvent {
|
|
|
8363
8469
|
for (let i = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; i < len; i++) {
|
|
8364
8470
|
const source = this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)];
|
|
8365
8471
|
this.rowIndex = source.groupIndex;
|
|
8366
|
-
|
|
8472
|
+
if (!this.parent.uiStateValues.isGroupAdaptive ||
|
|
8473
|
+
(this.parent.uiStateValues.groupIndex === source.groupIndex && this.parent.uiStateValues.isGroupAdaptive)) {
|
|
8474
|
+
this.renderEventsHandler(this.parent.activeView.renderDates, this.parent.activeViewOptions.workDays, source);
|
|
8475
|
+
}
|
|
8367
8476
|
if (this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)] && this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(), 10)].groupIndex !==
|
|
8368
8477
|
this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)].groupIndex) {
|
|
8369
8478
|
const target = this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(), 10)];
|
|
@@ -8448,14 +8557,14 @@ class TimelineEvent extends MonthEvent {
|
|
|
8448
8557
|
this.wireAppointmentEvents(appointmentElement, event);
|
|
8449
8558
|
if (this.parent.rowAutoHeight) {
|
|
8450
8559
|
const conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
8451
|
-
const conWidth = getElementWidth(conWrap);
|
|
8560
|
+
const conWidth = this.parent.getElementWidth(conWrap);
|
|
8452
8561
|
const isWithoutScroll = conWrap.offsetHeight === conWrap.clientHeight &&
|
|
8453
8562
|
conWrap.offsetWidth === conWrap.clientWidth;
|
|
8454
8563
|
this.renderEventElement(event, appointmentElement, cellTd);
|
|
8455
8564
|
const firstChild = this.getFirstChild(resIndex);
|
|
8456
8565
|
this.updateCellHeight(firstChild, height);
|
|
8457
8566
|
if (isWithoutScroll &&
|
|
8458
|
-
(conWrap.offsetWidth > conWrap.clientWidth || conWidth !== getElementWidth(conWrap))) {
|
|
8567
|
+
(conWrap.offsetWidth > conWrap.clientWidth || conWidth !== this.parent.getElementWidth(conWrap))) {
|
|
8459
8568
|
this.adjustAppointments(conWidth);
|
|
8460
8569
|
}
|
|
8461
8570
|
}
|
|
@@ -8573,7 +8682,7 @@ class TimelineEvent extends MonthEvent {
|
|
|
8573
8682
|
}
|
|
8574
8683
|
adjustAppointments(conWidth) {
|
|
8575
8684
|
const tr = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody tr');
|
|
8576
|
-
const actualCellWidth = getElementWidth(this.workCells[0]);
|
|
8685
|
+
const actualCellWidth = this.parent.getElementWidth(this.workCells[0]);
|
|
8577
8686
|
this.cellWidth = actualCellWidth / +(this.workCells[0].getAttribute('colspan') || 1);
|
|
8578
8687
|
const currentPercentage = (actualCellWidth * tr.children.length) / (conWidth / 100);
|
|
8579
8688
|
const apps = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
@@ -8916,7 +9025,15 @@ class InlineEdit {
|
|
|
8916
9025
|
subjectWrap.insertBefore(inlineSubject, subjectWrap.firstChild);
|
|
8917
9026
|
}
|
|
8918
9027
|
else {
|
|
8919
|
-
|
|
9028
|
+
const elementSelector = ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek', 'TimelineMonth'].indexOf(this.parent.currentView) > -1 ?
|
|
9029
|
+
'.e-inner-wrap' : '.e-appointment-details';
|
|
9030
|
+
const innerWrapElement = args.element.querySelector(elementSelector);
|
|
9031
|
+
if (isNullOrUndefined(innerWrapElement)) {
|
|
9032
|
+
args.element.querySelector('.e-appointment-details').prepend(inlineSubject);
|
|
9033
|
+
}
|
|
9034
|
+
else {
|
|
9035
|
+
innerWrapElement.prepend(inlineSubject);
|
|
9036
|
+
}
|
|
8920
9037
|
}
|
|
8921
9038
|
inlineSubject.focus();
|
|
8922
9039
|
}
|
|
@@ -8933,11 +9050,11 @@ class InlineEdit {
|
|
|
8933
9050
|
const allDayElements = [].slice.call(this.parent.element.querySelectorAll('.' + ALLDAY_APPOINTMENT_CLASS));
|
|
8934
9051
|
let allDayLevel = 0;
|
|
8935
9052
|
if (allDayElements.length > 0) {
|
|
8936
|
-
allDayLevel = Math.floor(getElementHeight(this.parent.element.querySelector('.' + ALLDAY_ROW_CLASS)) /
|
|
9053
|
+
allDayLevel = Math.floor(this.parent.getElementHeight(this.parent.element.querySelector('.' + ALLDAY_ROW_CLASS)) /
|
|
8937
9054
|
allDayElements[0].offsetHeight) - 1;
|
|
8938
9055
|
}
|
|
8939
9056
|
verticalEvent.allDayLevel = allDayLevel;
|
|
8940
|
-
const appHeight = getElementHeightFromClass(this.parent.element.querySelector('.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS), APPOINTMENT_CLASS);
|
|
9057
|
+
const appHeight = this.parent.getElementHeightFromClass(this.parent.element.querySelector('.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS), APPOINTMENT_CLASS);
|
|
8941
9058
|
const cellTop = verticalEvent.allDayElement.length > 0 ? verticalEvent.allDayElement[0].offsetTop : 0;
|
|
8942
9059
|
verticalEvent.renderAllDayEvents(saveObj, index, resIndex, daysCount, this.parent.allowInline, cellTop, appHeight);
|
|
8943
9060
|
}
|
|
@@ -8965,7 +9082,7 @@ class InlineEdit {
|
|
|
8965
9082
|
monthEvent.cellWidth = monthEvent.workCells[0].offsetWidth;
|
|
8966
9083
|
monthEvent.cellHeight = monthEvent.workCells[0].offsetHeight;
|
|
8967
9084
|
monthEvent.eventHeight =
|
|
8968
|
-
getElementHeightFromClass(this.parent.monthModule.element || monthEvent.element, APPOINTMENT_CLASS);
|
|
9085
|
+
this.parent.getElementHeightFromClass(this.parent.monthModule.element || monthEvent.element, APPOINTMENT_CLASS);
|
|
8969
9086
|
monthEvent.getSlotDates(workDays);
|
|
8970
9087
|
const filteredDates = monthEvent.getRenderedDates(renderDates);
|
|
8971
9088
|
const spannedEvents = monthEvent.splitEvent(saveObject, filteredDates || renderDates);
|
|
@@ -8988,7 +9105,7 @@ class InlineEdit {
|
|
|
8988
9105
|
const dayLength = this.parent.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody tr').length === 0 ?
|
|
8989
9106
|
0 : this.parent.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody tr')[0].children.length;
|
|
8990
9107
|
timelineView.slotsPerDay = dayLength / timelineView.dateRender.length;
|
|
8991
|
-
timelineView.eventHeight = getElementHeightFromClass(timelineView.element, APPOINTMENT_CLASS);
|
|
9108
|
+
timelineView.eventHeight = this.parent.getElementHeightFromClass(timelineView.element, APPOINTMENT_CLASS);
|
|
8992
9109
|
timelineView.renderEvents(saveObject, resIndex);
|
|
8993
9110
|
}
|
|
8994
9111
|
getEventDaysCount(saveObj) {
|
|
@@ -10645,7 +10762,8 @@ class EventTooltip {
|
|
|
10645
10762
|
const fields = this.parent.eventFields;
|
|
10646
10763
|
const eventStart = new Date('' + record[fields.startTime]);
|
|
10647
10764
|
let eventEnd = new Date('' + record[fields.endTime]);
|
|
10648
|
-
eventEnd = (eventEnd.
|
|
10765
|
+
eventEnd = ((eventEnd.getTime() - eventStart.getTime() !== 0) && eventEnd.getHours() === 0 && eventEnd.getMinutes() === 0) ?
|
|
10766
|
+
new Date(eventEnd.setMilliseconds(-1000)) : eventEnd;
|
|
10649
10767
|
const startDate = resetTime(new Date('' + eventStart));
|
|
10650
10768
|
const endDate = resetTime(new Date('' + eventEnd));
|
|
10651
10769
|
const tooltipSubject = (record[fields.subject] || this.parent.eventSettings.fields.subject.default
|
|
@@ -10714,12 +10832,12 @@ class EventTooltip {
|
|
|
10714
10832
|
}
|
|
10715
10833
|
}
|
|
10716
10834
|
|
|
10717
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
10718
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
10719
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10720
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
10721
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10722
|
-
};
|
|
10835
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
10836
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
10837
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10838
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
10839
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10840
|
+
};
|
|
10723
10841
|
const HEADER = 'e-editor';
|
|
10724
10842
|
const INPUTWARAPPER = 'e-input-wrapper';
|
|
10725
10843
|
const INPUTWARAPPERSIDE = 'e-input-wrapper-side';
|
|
@@ -11978,8 +12096,13 @@ class EventWindow {
|
|
|
11978
12096
|
this.addEventHandlers();
|
|
11979
12097
|
}
|
|
11980
12098
|
if (!isNullOrUndefined(this.parent.editorTemplate)) {
|
|
11981
|
-
this.renderFormElements(this.element.querySelector('.e-schedule-form'), data);
|
|
12099
|
+
this.renderFormElements(this.element.querySelector('.e-schedule-form'), data, type, repeatType);
|
|
12100
|
+
}
|
|
12101
|
+
else {
|
|
12102
|
+
this.setEditorContent(data, type, repeatType);
|
|
11982
12103
|
}
|
|
12104
|
+
}
|
|
12105
|
+
setEditorContent(data, type, repeatType) {
|
|
11983
12106
|
if (!this.parent.isAdaptive && isNullOrUndefined(this.parent.editorTemplate)) {
|
|
11984
12107
|
removeClass([this.dialogObject.element.querySelector('.e-recurrenceeditor')], DISABLE_CLASS);
|
|
11985
12108
|
}
|
|
@@ -12158,7 +12281,7 @@ class EventWindow {
|
|
|
12158
12281
|
container.appendChild(form);
|
|
12159
12282
|
return container;
|
|
12160
12283
|
}
|
|
12161
|
-
renderFormElements(form, args) {
|
|
12284
|
+
renderFormElements(form, args, type, repeatType) {
|
|
12162
12285
|
if (!isNullOrUndefined(this.parent.editorTemplate)) {
|
|
12163
12286
|
if (args) {
|
|
12164
12287
|
if (this.fieldValidator) {
|
|
@@ -12185,15 +12308,17 @@ class EventWindow {
|
|
|
12185
12308
|
this.parent.renderTemplates(() => {
|
|
12186
12309
|
if (this.element) {
|
|
12187
12310
|
this.applyFormValidation();
|
|
12188
|
-
if (
|
|
12189
|
-
this.
|
|
12190
|
-
this.eventCrudData = null;
|
|
12311
|
+
if (args) {
|
|
12312
|
+
this.setEditorContent(args, type, repeatType);
|
|
12191
12313
|
}
|
|
12192
12314
|
}
|
|
12193
12315
|
});
|
|
12194
12316
|
}
|
|
12195
12317
|
else {
|
|
12196
12318
|
form.appendChild(this.getDefaultEventWindowContent());
|
|
12319
|
+
if (args) {
|
|
12320
|
+
this.setEditorContent(args, type, repeatType);
|
|
12321
|
+
}
|
|
12197
12322
|
}
|
|
12198
12323
|
}
|
|
12199
12324
|
getDefaultEventWindowContent() {
|
|
@@ -12779,13 +12904,9 @@ class EventWindow {
|
|
|
12779
12904
|
this.fieldValidator.renderFormValidator(form, rules, this.element, this.parent.locale);
|
|
12780
12905
|
}
|
|
12781
12906
|
showDetails(eventData) {
|
|
12782
|
-
this.eventData =
|
|
12907
|
+
this.eventData = eventData;
|
|
12783
12908
|
const eventObj = extend({}, eventData, null, true);
|
|
12784
12909
|
const formElements = this.getFormElements(EVENT_WINDOW_DIALOG_CLASS);
|
|
12785
|
-
if (this.parent.isReact && formElements.length < 1 && !this.cellClickAction) {
|
|
12786
|
-
this.eventCrudData = eventObj;
|
|
12787
|
-
return;
|
|
12788
|
-
}
|
|
12789
12910
|
if ((!this.cellClickAction || this.cellClickAction && !isNullOrUndefined(this.parent.editorTemplate)) &&
|
|
12790
12911
|
eventObj[this.fields.endTime].getHours() === 0 && eventObj[this.fields.endTime].getMinutes() === 0) {
|
|
12791
12912
|
this.trimAllDay(eventObj);
|
|
@@ -13789,6 +13910,8 @@ class VirtualScroll {
|
|
|
13789
13910
|
this.renderedLength = 0;
|
|
13790
13911
|
this.averageRowHeight = 0;
|
|
13791
13912
|
this.startIndex = 0;
|
|
13913
|
+
this.existingDataCollection = [];
|
|
13914
|
+
this.enableTransition = true;
|
|
13792
13915
|
this.parent = parent;
|
|
13793
13916
|
this.addEventListener();
|
|
13794
13917
|
}
|
|
@@ -13861,10 +13984,10 @@ class VirtualScroll {
|
|
|
13861
13984
|
}
|
|
13862
13985
|
setItemSize() {
|
|
13863
13986
|
if (this.isHorizontalScroll) {
|
|
13864
|
-
this.itemSize = getElementWidthFromClass(this.parent.activeView.element, WORK_CELLS_CLASS) || this.itemSize;
|
|
13987
|
+
this.itemSize = getElementWidthFromClass(this.parent.activeView.element, WORK_CELLS_CLASS, this.parent.uiStateValues.isTransformed) || this.itemSize;
|
|
13865
13988
|
}
|
|
13866
13989
|
else {
|
|
13867
|
-
this.itemSize = getElementHeightFromClass(this.parent.activeView.element, WORK_CELLS_CLASS) || this.itemSize;
|
|
13990
|
+
this.itemSize = this.parent.getElementHeightFromClass(this.parent.activeView.element, WORK_CELLS_CLASS) || this.itemSize;
|
|
13868
13991
|
}
|
|
13869
13992
|
}
|
|
13870
13993
|
refreshLayout() {
|
|
@@ -13878,11 +14001,16 @@ class VirtualScroll {
|
|
|
13878
14001
|
const resWrap = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
|
|
13879
14002
|
const conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
13880
14003
|
const eventWrap = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
|
|
14004
|
+
if (!this.parent.rowAutoHeight) {
|
|
14005
|
+
this.enableTransition = false;
|
|
14006
|
+
removeClass([conWrap, resWrap], 'e-transition');
|
|
14007
|
+
}
|
|
13881
14008
|
let firstTDIndex = parseInt(resWrap.querySelector('tbody td').getAttribute('data-group-index'), 10);
|
|
13882
14009
|
const endIndex = (firstTDIndex + this.renderedLength);
|
|
13883
14010
|
firstTDIndex = (endIndex > this.parent.resourceBase.expandedResources.length) ?
|
|
13884
14011
|
(this.parent.resourceBase.expandedResources.length - this.renderedLength) : firstTDIndex;
|
|
13885
14012
|
firstTDIndex = firstTDIndex < 0 ? 0 : firstTDIndex;
|
|
14013
|
+
this.existingDataCollection = this.parent.resourceBase.renderedResources;
|
|
13886
14014
|
this.parent.resourceBase.renderedResources = this.parent.resourceBase.expandedResources.slice(firstTDIndex, endIndex);
|
|
13887
14015
|
if (this.parent.resourceBase.renderedResources.length > 0) {
|
|
13888
14016
|
this.updateContent(resWrap, conWrap, eventWrap, this.parent.resourceBase.renderedResources);
|
|
@@ -13931,6 +14059,7 @@ class VirtualScroll {
|
|
|
13931
14059
|
const scrollHeight = this.parent.rowAutoHeight ?
|
|
13932
14060
|
(conTable.offsetHeight - conWrap.offsetHeight) : this.bufferCount * this.itemSize;
|
|
13933
14061
|
let resCollection = [];
|
|
14062
|
+
this.existingDataCollection = this.parent.resourceBase.renderedResources;
|
|
13934
14063
|
if ((conWrap.scrollTop) - this.translateY < 0) {
|
|
13935
14064
|
resCollection = this.upScroll(conWrap, firstTDIndex);
|
|
13936
14065
|
}
|
|
@@ -14128,56 +14257,132 @@ class VirtualScroll {
|
|
|
14128
14257
|
this.parent.element.focus();
|
|
14129
14258
|
}
|
|
14130
14259
|
for (let i = 0; i < renderedLength; i++) {
|
|
14131
|
-
remove(resWrap.querySelector('tbody tr'));
|
|
14132
|
-
remove(conWrap.querySelector('tbody tr'));
|
|
14133
14260
|
remove(eventWrap.querySelector('div'));
|
|
14134
14261
|
}
|
|
14135
14262
|
this.parent.resourceBase.renderedResources = resCollection;
|
|
14263
|
+
const currentGroupIndices = this.parent.activeView.getGroupIndices(resCollection);
|
|
14264
|
+
const previousGroupIndices = this.parent.activeView.getGroupIndices(this.existingDataCollection);
|
|
14265
|
+
const newGroupIndices = currentGroupIndices.filter((index) => previousGroupIndices.indexOf(index) < 0);
|
|
14266
|
+
const resWrapRows = Array.from(resWrap.querySelectorAll('tbody tr'));
|
|
14267
|
+
const conWrapRows = Array.from(conWrap.querySelectorAll('tbody tr'));
|
|
14268
|
+
const resWrapBody = resWrap.querySelector('tbody');
|
|
14269
|
+
const conWrapBody = conWrap.querySelector('tbody');
|
|
14270
|
+
this.removeObsoleteRows(resWrapRows, currentGroupIndices);
|
|
14271
|
+
this.removeObsoleteRows(conWrapRows, currentGroupIndices);
|
|
14136
14272
|
const resourceRows = this.parent.resourceBase.getContentRows(resCollection, true);
|
|
14137
14273
|
const contentRows = this.parent.activeView.getContentRows();
|
|
14138
14274
|
const eventRows = this.parent.activeView.getEventRows(resCollection.length);
|
|
14139
|
-
|
|
14140
|
-
|
|
14275
|
+
for (let i = 0; i < newGroupIndices.length; i++) {
|
|
14276
|
+
const index = currentGroupIndices.indexOf(newGroupIndices[parseInt(i.toString(), 10)]);
|
|
14277
|
+
if (index === 0) {
|
|
14278
|
+
prepend([resourceRows[parseInt(i.toString(), 10)]], resWrapBody);
|
|
14279
|
+
prepend([contentRows[parseInt(i.toString(), 10)]], conWrapBody);
|
|
14280
|
+
}
|
|
14281
|
+
else if (resWrapBody && conWrapBody && resWrapBody.children[parseInt(index.toString(), 10)] &&
|
|
14282
|
+
conWrapBody.children[parseInt(index.toString(), 10)]) {
|
|
14283
|
+
resWrapBody.insertBefore(resourceRows[parseInt(i.toString(), 10)], resWrapBody.children[parseInt(index.toString(), 10)]);
|
|
14284
|
+
conWrapBody.insertBefore(contentRows[parseInt(i.toString(), 10)], conWrapBody.children[parseInt(index.toString(), 10)]);
|
|
14285
|
+
}
|
|
14286
|
+
else {
|
|
14287
|
+
append([resourceRows[parseInt(i.toString(), 10)]], resWrapBody);
|
|
14288
|
+
append([contentRows[parseInt(i.toString(), 10)]], conWrapBody);
|
|
14289
|
+
}
|
|
14290
|
+
}
|
|
14141
14291
|
append(eventRows, eventWrap);
|
|
14142
14292
|
}
|
|
14293
|
+
removeObsoleteRows(elements, currentGroupIndices) {
|
|
14294
|
+
elements.forEach((element) => {
|
|
14295
|
+
const groupIndex = parseInt(element.firstElementChild.getAttribute('data-group-index'), 10);
|
|
14296
|
+
if (currentGroupIndices.indexOf(groupIndex) < 0) {
|
|
14297
|
+
remove(element);
|
|
14298
|
+
}
|
|
14299
|
+
});
|
|
14300
|
+
}
|
|
14143
14301
|
updateHorizontalContent(conWrap, resCollection) {
|
|
14302
|
+
this.existingDataCollection = this.parent.resourceBase.expandedResources;
|
|
14144
14303
|
this.parent.resourceBase.expandedResources = resCollection;
|
|
14145
14304
|
const selectedEle = this.parent.getSelectedCells();
|
|
14146
14305
|
this.focusedEle = selectedEle[selectedEle.length - 1] || this.focusedEle;
|
|
14147
|
-
const
|
|
14306
|
+
const tbody = conWrap.querySelector('tbody');
|
|
14307
|
+
const renderedRows = Array.from(tbody.querySelectorAll('tr'));
|
|
14308
|
+
if (this.parent.currentView === 'Month') {
|
|
14309
|
+
this.updateMonthViewContent(conWrap, resCollection);
|
|
14310
|
+
}
|
|
14311
|
+
else {
|
|
14312
|
+
this.updateOtherViewContent(conWrap, resCollection, renderedRows);
|
|
14313
|
+
}
|
|
14314
|
+
}
|
|
14315
|
+
updateMonthViewContent(conWrap, resCollection) {
|
|
14316
|
+
const renderedLength = conWrap.querySelectorAll(' tr').length;
|
|
14148
14317
|
for (let i = 0; i < renderedLength; i++) {
|
|
14149
14318
|
remove(conWrap.querySelector('tbody tr'));
|
|
14150
14319
|
}
|
|
14151
|
-
if (this.parent.
|
|
14152
|
-
|
|
14153
|
-
this.parent.activeView.colLevels[0] = resCollection;
|
|
14154
|
-
}
|
|
14155
|
-
else {
|
|
14156
|
-
this.parent.activeView.colLevels[this.parent.activeView.colLevels.length - 2] = resCollection;
|
|
14157
|
-
}
|
|
14158
|
-
const contentRows = this.parent.activeView.getContentRows();
|
|
14159
|
-
append(contentRows, conWrap.querySelector('tbody'));
|
|
14320
|
+
if (this.parent.activeViewOptions.group.byDate) {
|
|
14321
|
+
this.parent.activeView.colLevels[0] = resCollection;
|
|
14160
14322
|
}
|
|
14161
14323
|
else {
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14169
|
-
|
|
14170
|
-
|
|
14171
|
-
|
|
14172
|
-
|
|
14324
|
+
this.parent.activeView.colLevels[this.parent.activeView.colLevels.length - 2] = resCollection;
|
|
14325
|
+
}
|
|
14326
|
+
const contentRows = this.parent.activeView.getContentRows();
|
|
14327
|
+
append(contentRows, conWrap.querySelector('tbody'));
|
|
14328
|
+
}
|
|
14329
|
+
updateOtherViewContent(conWrap, resCollection, renderedRows) {
|
|
14330
|
+
const tbody = conWrap.querySelector('tbody');
|
|
14331
|
+
const colGroup = conWrap.querySelector('colgroup');
|
|
14332
|
+
const thead = conWrap.querySelector('thead');
|
|
14333
|
+
const table = conWrap.querySelector('table');
|
|
14334
|
+
this.parent.activeView.colLevels[this.parent.activeView.colLevels.length - 1] = resCollection;
|
|
14335
|
+
const newGroupIndices = new Set(resCollection.map((data) => data.groupIndex));
|
|
14336
|
+
renderedRows.forEach((row) => {
|
|
14337
|
+
const tdElements = row.querySelectorAll('td');
|
|
14338
|
+
tdElements.forEach((td) => {
|
|
14339
|
+
const groupIndex = parseInt(td.getAttribute('data-group-index'), 10);
|
|
14340
|
+
if (!newGroupIndices.has(groupIndex)) {
|
|
14341
|
+
td.remove();
|
|
14342
|
+
}
|
|
14173
14343
|
});
|
|
14174
|
-
|
|
14175
|
-
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
|
|
14344
|
+
});
|
|
14345
|
+
const col = [].slice.call(conWrap.querySelector('colgroup').children);
|
|
14346
|
+
for (let i = 0; i < col.length; i++) {
|
|
14347
|
+
remove(col[parseInt(i.toString(), 10)]);
|
|
14348
|
+
}
|
|
14349
|
+
resCollection.forEach(() => colGroup.appendChild(createElement('col')));
|
|
14350
|
+
const tHead = [].slice.call(conWrap.querySelector('thead').children);
|
|
14351
|
+
for (let i = 0; i < tHead.length; i++) {
|
|
14352
|
+
remove(tHead[parseInt(i.toString(), 10)]);
|
|
14180
14353
|
}
|
|
14354
|
+
thead.appendChild(this.parent.eventBase.createEventWrapper('', this.startIndex > 0 ? this.startIndex : 0));
|
|
14355
|
+
if (this.parent.activeViewOptions.timeScale.enable) {
|
|
14356
|
+
thead.appendChild(this.parent.eventBase.createEventWrapper('timeIndicator'));
|
|
14357
|
+
}
|
|
14358
|
+
prepend([thead], table);
|
|
14359
|
+
const contentRows = this.parent.activeView.getContentRows();
|
|
14360
|
+
this.mergeNewTdData(tbody, contentRows);
|
|
14361
|
+
}
|
|
14362
|
+
mergeNewTdData(tbody, contentRows) {
|
|
14363
|
+
const existingRows = Array.from(tbody.querySelectorAll('tr'));
|
|
14364
|
+
existingRows.forEach((existingRow, rowIndex) => {
|
|
14365
|
+
if (rowIndex < contentRows.length) {
|
|
14366
|
+
const newRow = contentRows[parseInt(rowIndex.toString(), 10)];
|
|
14367
|
+
const existingTds = Array.from(existingRow.querySelectorAll('td'));
|
|
14368
|
+
const newTds = Array.from(newRow.querySelectorAll('td'));
|
|
14369
|
+
newTds.forEach((newTd) => {
|
|
14370
|
+
const newGroupIndex = parseInt(newTd.getAttribute('data-group-index').toString(), 10);
|
|
14371
|
+
let inserted = false;
|
|
14372
|
+
for (const existingTd of existingTds) {
|
|
14373
|
+
const existingGroupIndex = parseInt(existingTd.getAttribute('data-group-index').toString(), 10);
|
|
14374
|
+
if (newGroupIndex < existingGroupIndex) {
|
|
14375
|
+
existingRow.insertBefore(newTd, existingTd);
|
|
14376
|
+
inserted = true;
|
|
14377
|
+
break;
|
|
14378
|
+
}
|
|
14379
|
+
}
|
|
14380
|
+
if (!inserted) {
|
|
14381
|
+
existingRow.appendChild(newTd);
|
|
14382
|
+
}
|
|
14383
|
+
});
|
|
14384
|
+
}
|
|
14385
|
+
});
|
|
14181
14386
|
}
|
|
14182
14387
|
getBufferCollection(startIndex, endIndex) {
|
|
14183
14388
|
return this.parent.resourceBase.expandedResources.slice(startIndex, endIndex);
|
|
@@ -14390,12 +14595,12 @@ class Render {
|
|
|
14390
14595
|
}
|
|
14391
14596
|
}
|
|
14392
14597
|
|
|
14393
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14394
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14395
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14396
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14397
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14398
|
-
};
|
|
14598
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14599
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14600
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14601
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14602
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14603
|
+
};
|
|
14399
14604
|
/**
|
|
14400
14605
|
* A class that represents the configuration of working hours related options of scheduler.
|
|
14401
14606
|
*/
|
|
@@ -14411,12 +14616,12 @@ __decorate$1([
|
|
|
14411
14616
|
Property('18:00')
|
|
14412
14617
|
], WorkHours.prototype, "end", void 0);
|
|
14413
14618
|
|
|
14414
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14415
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14416
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14417
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14418
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14419
|
-
};
|
|
14619
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14620
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14621
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14622
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14623
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14624
|
+
};
|
|
14420
14625
|
/**
|
|
14421
14626
|
* A class that represents the configuration of options related to timescale on scheduler.
|
|
14422
14627
|
*/
|
|
@@ -14438,12 +14643,12 @@ __decorate$2([
|
|
|
14438
14643
|
Property()
|
|
14439
14644
|
], TimeScale.prototype, "majorSlotTemplate", void 0);
|
|
14440
14645
|
|
|
14441
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14442
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14443
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14444
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14445
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14446
|
-
};
|
|
14646
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14647
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14648
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14649
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14650
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14651
|
+
};
|
|
14447
14652
|
/**
|
|
14448
14653
|
* A class that defines the template options available to customize the quick popup of scheduler.
|
|
14449
14654
|
*/
|
|
@@ -14462,12 +14667,12 @@ __decorate$3([
|
|
|
14462
14667
|
Property()
|
|
14463
14668
|
], QuickInfoTemplates.prototype, "footer", void 0);
|
|
14464
14669
|
|
|
14465
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14466
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14467
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14468
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14469
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14470
|
-
};
|
|
14670
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14671
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14672
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14673
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14674
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14675
|
+
};
|
|
14471
14676
|
/**
|
|
14472
14677
|
* A class that represents the header rows related configurations on timeline views.
|
|
14473
14678
|
*/
|
|
@@ -14584,10 +14789,10 @@ class Crud {
|
|
|
14584
14789
|
addedRecords: args.editParams.addedRecords, changedRecords: args.editParams.changedRecords,
|
|
14585
14790
|
deletedRecords: args.editParams.deletedRecords
|
|
14586
14791
|
};
|
|
14587
|
-
if (this.parent.dragAndDropModule && this.parent.dragAndDropModule.actionObj && this.parent.dragAndDropModule.actionObj.element) {
|
|
14792
|
+
if (this.parent.dragAndDropModule && this.parent.dragAndDropModule.actionObj && this.parent.dragAndDropModule.actionObj.element && this.parent.dragAndDropModule.actionObj.action) {
|
|
14588
14793
|
this.parent.dragAndDropModule.actionObj.element.style.display = 'none';
|
|
14589
14794
|
}
|
|
14590
|
-
if (this.parent.resizeModule && this.parent.resizeModule.actionObj && this.parent.resizeModule.actionObj.element) {
|
|
14795
|
+
if (this.parent.resizeModule && this.parent.resizeModule.actionObj && this.parent.resizeModule.actionObj.element && this.parent.resizeModule.actionObj.action) {
|
|
14591
14796
|
this.parent.resizeModule.actionObj.element.style.display = 'none';
|
|
14592
14797
|
}
|
|
14593
14798
|
if (this.parent.isSpecificResourceEvents()) {
|
|
@@ -14950,16 +15155,32 @@ class Crud {
|
|
|
14950
15155
|
const updateSeriesEvents = (eventData instanceof Array) ? eventData : [eventData];
|
|
14951
15156
|
const args = {
|
|
14952
15157
|
requestType: action === 'EditSeries' ? 'eventChange' : 'eventRemove', cancel: false,
|
|
14953
|
-
addedRecords: [], changedRecords:
|
|
15158
|
+
addedRecords: [], changedRecords: [], deletedRecords: []
|
|
14954
15159
|
};
|
|
14955
15160
|
args.data = seriesData;
|
|
15161
|
+
if (action === 'EditSeries') {
|
|
15162
|
+
args.changedRecords = updateSeriesEvents;
|
|
15163
|
+
}
|
|
15164
|
+
else {
|
|
15165
|
+
args.deletedRecords = updateSeriesEvents;
|
|
15166
|
+
}
|
|
15167
|
+
if (action === 'EditSeries' && !this.parent.uiStateValues.isIgnoreOccurrence) {
|
|
15168
|
+
const seriesEvents = seriesData instanceof Array ? seriesData : [seriesData];
|
|
15169
|
+
for (let a = 0, count = args.changedRecords.length; a < count; a++) {
|
|
15170
|
+
const parentEvent = seriesEvents[parseInt(a.toString(), 10)];
|
|
15171
|
+
const eventCollections = this.parent.eventBase.getEventCollections(parentEvent);
|
|
15172
|
+
const deletedEvents = eventCollections.follow.concat(eventCollections.occurrence);
|
|
15173
|
+
args.deletedRecords = args.deletedRecords.concat(deletedEvents);
|
|
15174
|
+
}
|
|
15175
|
+
}
|
|
14956
15176
|
this.parent.trigger(actionBegin, args, (seriesArgs) => {
|
|
14957
15177
|
if (!seriesArgs.cancel) {
|
|
14958
15178
|
const fields = this.parent.eventFields;
|
|
14959
15179
|
const editParams = { addedRecords: [], changedRecords: [], deletedRecords: [] };
|
|
14960
15180
|
const seriesEvents = seriesData instanceof Array ? seriesData : [seriesData];
|
|
14961
|
-
|
|
14962
|
-
|
|
15181
|
+
const records = action === 'EditSeries' ? seriesArgs.changedRecords : seriesArgs.deletedRecords;
|
|
15182
|
+
for (let a = 0, count = records.length; a < count; a++) {
|
|
15183
|
+
const childEvent = records[parseInt(a.toString(), 10)];
|
|
14963
15184
|
const parentEvent = seriesEvents[parseInt(a.toString(), 10)];
|
|
14964
15185
|
const eventCollections = this.parent.eventBase.getEventCollections(parentEvent);
|
|
14965
15186
|
const deletedEvents = eventCollections.follow.concat(eventCollections.occurrence);
|
|
@@ -14988,7 +15209,7 @@ class Crud {
|
|
|
14988
15209
|
}
|
|
14989
15210
|
}
|
|
14990
15211
|
const promise = this.parent.dataModule.dataManager.saveChanges(editParams, fields.id, this.getTable(), this.getQuery());
|
|
14991
|
-
const cloneEvent = extend({},
|
|
15212
|
+
const cloneEvent = extend({}, records[records.length - 1], null, true);
|
|
14992
15213
|
this.parent.eventBase.selectWorkCellByTime(action === 'EditSeries' ? [this.parent.eventBase.processTimezone(cloneEvent)] : [cloneEvent]);
|
|
14993
15214
|
const crudArgs = {
|
|
14994
15215
|
requestType: action === 'EditSeries' ? 'eventChanged' : 'eventRemoved',
|
|
@@ -15312,12 +15533,12 @@ class WorkCellInteraction {
|
|
|
15312
15533
|
}
|
|
15313
15534
|
}
|
|
15314
15535
|
|
|
15315
|
-
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15316
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15317
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15318
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15319
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15320
|
-
};
|
|
15536
|
+
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15537
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15538
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15539
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15540
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15541
|
+
};
|
|
15321
15542
|
/**
|
|
15322
15543
|
* Configuration that applies on each appointment field options of scheduler.
|
|
15323
15544
|
*/
|
|
@@ -15336,12 +15557,12 @@ __decorate$5([
|
|
|
15336
15557
|
Property({})
|
|
15337
15558
|
], FieldOptions.prototype, "validation", void 0);
|
|
15338
15559
|
|
|
15339
|
-
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15340
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15341
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15342
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15343
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15344
|
-
};
|
|
15560
|
+
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15561
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15562
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15563
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15564
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15565
|
+
};
|
|
15345
15566
|
/**
|
|
15346
15567
|
* A class that holds the collection of event fields that requires to be mapped with the dataSource
|
|
15347
15568
|
* fields along with its available configuration settings. Each field in it accepts both string and object
|
|
@@ -15397,12 +15618,12 @@ __decorate$6([
|
|
|
15397
15618
|
Property('FollowingID')
|
|
15398
15619
|
], Field.prototype, "followingID", void 0);
|
|
15399
15620
|
|
|
15400
|
-
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15401
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15402
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15403
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15404
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15405
|
-
};
|
|
15621
|
+
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15622
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15623
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15624
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15625
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15626
|
+
};
|
|
15406
15627
|
/**
|
|
15407
15628
|
* Holds the configuration of event related options and dataSource binding to Schedule.
|
|
15408
15629
|
*/
|
|
@@ -15463,12 +15684,12 @@ __decorate$7([
|
|
|
15463
15684
|
Property()
|
|
15464
15685
|
], EventSettings.prototype, "includeFiltersInQuery", void 0);
|
|
15465
15686
|
|
|
15466
|
-
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15467
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15468
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15469
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15470
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15471
|
-
};
|
|
15687
|
+
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15688
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15689
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15690
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15691
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15692
|
+
};
|
|
15472
15693
|
/**
|
|
15473
15694
|
* A class that holds the resource grouping related configurations on Schedule.
|
|
15474
15695
|
*/
|
|
@@ -15496,12 +15717,12 @@ __decorate$8([
|
|
|
15496
15717
|
Property(false)
|
|
15497
15718
|
], Group.prototype, "hideNonWorkingDays", void 0);
|
|
15498
15719
|
|
|
15499
|
-
var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15500
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15501
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15502
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15503
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15504
|
-
};
|
|
15720
|
+
var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15721
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15722
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15723
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15724
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15725
|
+
};
|
|
15505
15726
|
/**
|
|
15506
15727
|
* A class that represents the resource related configurations and its data binding options.
|
|
15507
15728
|
*/
|
|
@@ -15642,7 +15863,11 @@ class ResourceBase {
|
|
|
15642
15863
|
const resColl = this.resourceCollection;
|
|
15643
15864
|
const tr = createElement('tr');
|
|
15644
15865
|
const td = createElement('td', { attrs: { tabindex: isVirtualScroll ? '-1' : '0' } });
|
|
15866
|
+
const existingGroupIndices = this.parent.activeView.getGroupIndices();
|
|
15645
15867
|
for (let i = 0; i < resData.length; i++) {
|
|
15868
|
+
if (existingGroupIndices.length > 0 && existingGroupIndices.indexOf(resData[parseInt(i.toString(), 10)].groupIndex) > -1) {
|
|
15869
|
+
continue;
|
|
15870
|
+
}
|
|
15646
15871
|
const ntd = td.cloneNode();
|
|
15647
15872
|
rIndex = findIndexInData(resColl, 'name', resData[parseInt(i.toString(), 10)].resource.name);
|
|
15648
15873
|
if (rIndex === resColl.length - 1) {
|
|
@@ -15821,6 +16046,7 @@ class ResourceBase {
|
|
|
15821
16046
|
this.setExpandedResources();
|
|
15822
16047
|
const resourceCount = this.parent.virtualScrollModule.getRenderedCount();
|
|
15823
16048
|
const startIndex = this.expandedResources.indexOf(this.renderedResources[0]);
|
|
16049
|
+
this.parent.virtualScrollModule.existingDataCollection = this.renderedResources;
|
|
15824
16050
|
this.renderedResources = this.expandedResources.slice(startIndex, startIndex + resourceCount);
|
|
15825
16051
|
if (this.renderedResources.length < resourceCount) {
|
|
15826
16052
|
let sIndex = this.expandedResources.length - resourceCount;
|
|
@@ -16587,12 +16813,12 @@ class ResourceBase {
|
|
|
16587
16813
|
}
|
|
16588
16814
|
}
|
|
16589
16815
|
|
|
16590
|
-
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
16591
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16592
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16593
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16594
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16595
|
-
};
|
|
16816
|
+
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
16817
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16818
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16819
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16820
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16821
|
+
};
|
|
16596
16822
|
class ToolbarItem extends ChildProperty {
|
|
16597
16823
|
}
|
|
16598
16824
|
__decorate$a([
|
|
@@ -16653,12 +16879,12 @@ __decorate$a([
|
|
|
16653
16879
|
Event()
|
|
16654
16880
|
], ToolbarItem.prototype, "click", void 0);
|
|
16655
16881
|
|
|
16656
|
-
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
16657
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16658
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16659
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16660
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16661
|
-
};
|
|
16882
|
+
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
16883
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16884
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16885
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16886
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16887
|
+
};
|
|
16662
16888
|
/**
|
|
16663
16889
|
* Represents the Schedule component that displays a list of events scheduled against specific date and timings,
|
|
16664
16890
|
* thus helping us to plan and manage it properly.
|
|
@@ -16754,6 +16980,37 @@ let Schedule = class Schedule extends Component {
|
|
|
16754
16980
|
}
|
|
16755
16981
|
return templateName;
|
|
16756
16982
|
}
|
|
16983
|
+
/**
|
|
16984
|
+
* Method to get element width
|
|
16985
|
+
*
|
|
16986
|
+
* @param {HTMLElement} element Accepts the DOM element
|
|
16987
|
+
* @returns {number} Returns the width of the given element
|
|
16988
|
+
* @private
|
|
16989
|
+
*/
|
|
16990
|
+
getElementWidth(element) {
|
|
16991
|
+
return getElementWidth(element, this.uiStateValues.isTransformed);
|
|
16992
|
+
}
|
|
16993
|
+
/**
|
|
16994
|
+
* Method to get element height
|
|
16995
|
+
*
|
|
16996
|
+
* @param {HTMLElement} element Accepts the DOM element
|
|
16997
|
+
* @returns {number} Returns the Height of the given element
|
|
16998
|
+
* @private
|
|
16999
|
+
*/
|
|
17000
|
+
getElementHeight(element) {
|
|
17001
|
+
return getElementHeight(element, this.uiStateValues.isTransformed);
|
|
17002
|
+
}
|
|
17003
|
+
/**
|
|
17004
|
+
* Method to get height from element
|
|
17005
|
+
*
|
|
17006
|
+
* @param {Element} element Accepts the DOM element
|
|
17007
|
+
* @param {string} elementClass Accepts the element class
|
|
17008
|
+
* @returns {number} Returns the height of the element
|
|
17009
|
+
* @private
|
|
17010
|
+
*/
|
|
17011
|
+
getElementHeightFromClass(element, elementClass) {
|
|
17012
|
+
return getElementHeightFromClass(element, elementClass, this.uiStateValues.isTransformed);
|
|
17013
|
+
}
|
|
16757
17014
|
/**
|
|
16758
17015
|
* Method to render react templates
|
|
16759
17016
|
*
|
|
@@ -16833,6 +17090,7 @@ let Schedule = class Schedule extends Component {
|
|
|
16833
17090
|
this.headerModule = new HeaderRenderer(this);
|
|
16834
17091
|
}
|
|
16835
17092
|
this.renderTableContainer();
|
|
17093
|
+
this.uiStateValues.isTransformed = Math.round(this.element.getBoundingClientRect().width) !== this.element.offsetWidth;
|
|
16836
17094
|
if (Browser.isDevice || Browser.isTouch) {
|
|
16837
17095
|
this.scheduleTouchModule = new ScheduleTouch(this);
|
|
16838
17096
|
}
|
|
@@ -17327,7 +17585,7 @@ let Schedule = class Schedule extends Component {
|
|
|
17327
17585
|
this.uiStateValues = {
|
|
17328
17586
|
expand: false, isInitial: true, left: 0, top: 0, isGroupAdaptive: false,
|
|
17329
17587
|
isIgnoreOccurrence: false, groupIndex: this.adaptiveGroupIndex, action: false,
|
|
17330
|
-
isBlock: false, isCustomMonth: true, isPreventTimezone: false
|
|
17588
|
+
isBlock: false, isCustomMonth: true, isPreventTimezone: false, isTransformed: false
|
|
17331
17589
|
};
|
|
17332
17590
|
}
|
|
17333
17591
|
this.currentTimezoneDate = this.getCurrentTime();
|
|
@@ -17819,7 +18077,8 @@ let Schedule = class Schedule extends Component {
|
|
|
17819
18077
|
}
|
|
17820
18078
|
onScheduleResize() {
|
|
17821
18079
|
if (isNullOrUndefined(this.activeView) || ((this.isAdaptive || isMobile()) && document.activeElement
|
|
17822
|
-
&& document.activeElement.classList.contains(SUBJECT_CLASS)
|
|
18080
|
+
&& (document.activeElement.classList.contains(SUBJECT_CLASS) ||
|
|
18081
|
+
document.activeElement.classList.contains(INLINE_SUBJECT_CLASS))) || this.uiStateValues.isTapHold) {
|
|
17823
18082
|
return;
|
|
17824
18083
|
}
|
|
17825
18084
|
if (this.virtualScrollModule && this.activeView.isTimelineView()) {
|
|
@@ -17842,6 +18101,12 @@ let Schedule = class Schedule extends Component {
|
|
|
17842
18101
|
this.virtualScrollModule.isRemoteRefresh = false;
|
|
17843
18102
|
}
|
|
17844
18103
|
this.refreshEvents(isRemoteRefresh);
|
|
18104
|
+
if (this.virtualScrollModule && !this.virtualScrollModule.enableTransition) {
|
|
18105
|
+
const resWrap = this.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
|
|
18106
|
+
const conWrap = this.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
18107
|
+
this.virtualScrollModule.enableTransition = true;
|
|
18108
|
+
addClass([conWrap, resWrap], 'e-transition');
|
|
18109
|
+
}
|
|
17845
18110
|
}
|
|
17846
18111
|
else {
|
|
17847
18112
|
this.notify(contentReady, {});
|
|
@@ -18712,6 +18977,9 @@ let Schedule = class Schedule extends Component {
|
|
|
18712
18977
|
* @returns {void}
|
|
18713
18978
|
*/
|
|
18714
18979
|
scrollTo(hour, scrollDate) {
|
|
18980
|
+
if (this.currentView.indexOf('Agenda') < 0 && isNullOrUndefined(this.element.querySelector('.e-work-cells'))) {
|
|
18981
|
+
return;
|
|
18982
|
+
}
|
|
18715
18983
|
if (this.activeView.scrollToDate && isNullOrUndefined(hour) && scrollDate) {
|
|
18716
18984
|
this.activeView.scrollToDate(scrollDate);
|
|
18717
18985
|
}
|
|
@@ -20187,8 +20455,8 @@ class Resize extends ActionBase {
|
|
|
20187
20455
|
};
|
|
20188
20456
|
this.actionObj.groupIndex = this.parent.uiStateValues.isGroupAdaptive ? this.parent.uiStateValues.groupIndex : 0;
|
|
20189
20457
|
const workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
|
|
20190
|
-
this.actionObj.cellWidth = getElementWidth(workCell);
|
|
20191
|
-
this.actionObj.cellHeight = getElementHeight(workCell);
|
|
20458
|
+
this.actionObj.cellWidth = this.parent.getElementWidth(workCell);
|
|
20459
|
+
this.actionObj.cellHeight = this.parent.getElementHeight(workCell);
|
|
20192
20460
|
const hRows = this.parent.activeViewOptions.headerRows.map((row) => row.option);
|
|
20193
20461
|
if (this.parent.activeView.isTimelineView() && hRows.length > 0 && ['Date', 'Hour'].indexOf(hRows.slice(-1)[0]) < 0) {
|
|
20194
20462
|
const tr = this.parent.getContentTable().querySelector('tr');
|
|
@@ -20415,6 +20683,7 @@ class Resize extends ActionBase {
|
|
|
20415
20683
|
EventHandler.remove(document, Browser.touchEndEvent, this.resizeStop);
|
|
20416
20684
|
clearInterval(this.actionObj.scrollInterval);
|
|
20417
20685
|
this.actionObj.scrollInterval = null;
|
|
20686
|
+
this.actionObj.action = null;
|
|
20418
20687
|
this.removeCloneElementClasses();
|
|
20419
20688
|
this.removeCloneElement();
|
|
20420
20689
|
this.actionClass('removeClass');
|
|
@@ -20490,10 +20759,10 @@ class Resize extends ActionBase {
|
|
|
20490
20759
|
parseInt(this.actionObj.clone.style.left, 10);
|
|
20491
20760
|
offsetValue = Math.round(offsetValue / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
20492
20761
|
if (!isLeft) {
|
|
20493
|
-
offsetValue += (getElementWidth(this.actionObj.clone) - this.actionObj.cellWidth);
|
|
20762
|
+
offsetValue += (this.parent.getElementWidth(this.actionObj.clone) - this.actionObj.cellWidth);
|
|
20494
20763
|
}
|
|
20495
|
-
cellIndex = !isTimelineMonth ? Math.round(offsetValue / (getElementWidth(tr) / noOfDays)) :
|
|
20496
|
-
Math.floor(offsetValue / Math.floor(getElementWidth(tr) / noOfDays));
|
|
20764
|
+
cellIndex = !isTimelineMonth ? Math.round(offsetValue / (this.parent.getElementWidth(tr) / noOfDays)) :
|
|
20765
|
+
Math.floor(offsetValue / Math.floor(this.parent.getElementWidth(tr) / noOfDays));
|
|
20497
20766
|
isDateHeader = isTimeViews && headerName === 'Date';
|
|
20498
20767
|
cellIndex = isLeft ? cellIndex : isTimelineMonth ? cellIndex + 1 : cellIndex;
|
|
20499
20768
|
isLastCell = cellIndex === tdCollections.length;
|
|
@@ -20502,7 +20771,7 @@ class Resize extends ActionBase {
|
|
|
20502
20771
|
else {
|
|
20503
20772
|
const cellWidth = this.actionObj.cellWidth;
|
|
20504
20773
|
cellIndex = isLeft ? Math.floor(offset / this.actionObj.cellWidth) :
|
|
20505
|
-
Math.ceil((offset + (getElementWidth(this.actionObj.clone) - cellWidth)) / this.actionObj.cellWidth);
|
|
20774
|
+
Math.ceil((offset + (this.parent.getElementWidth(this.actionObj.clone) - cellWidth)) / this.actionObj.cellWidth);
|
|
20506
20775
|
if (this.parent.enableRtl) {
|
|
20507
20776
|
let cellOffsetWidth = 0;
|
|
20508
20777
|
if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
|
|
@@ -20510,7 +20779,7 @@ class Resize extends ActionBase {
|
|
|
20510
20779
|
cellOffsetWidth = this.actionObj.cellWidth;
|
|
20511
20780
|
}
|
|
20512
20781
|
const offsetWidth = (Math.floor(offset / this.actionObj.cellWidth) *
|
|
20513
|
-
this.actionObj.cellWidth) + (isLeft ? 0 : getElementWidth(this.actionObj.clone) - cellOffsetWidth);
|
|
20782
|
+
this.actionObj.cellWidth) + (isLeft ? 0 : this.parent.getElementWidth(this.actionObj.clone) - cellOffsetWidth);
|
|
20514
20783
|
cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
|
|
20515
20784
|
}
|
|
20516
20785
|
isLastCell = cellIndex === tdCollections.length;
|
|
@@ -20529,7 +20798,7 @@ class Resize extends ActionBase {
|
|
|
20529
20798
|
}
|
|
20530
20799
|
else {
|
|
20531
20800
|
if (!isLeft) {
|
|
20532
|
-
offset += getElementWidth(this.actionObj.clone);
|
|
20801
|
+
offset += this.parent.getElementWidth(this.actionObj.clone);
|
|
20533
20802
|
}
|
|
20534
20803
|
let spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
|
|
20535
20804
|
(offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
|
|
@@ -20541,9 +20810,9 @@ class Resize extends ActionBase {
|
|
|
20541
20810
|
}
|
|
20542
20811
|
else {
|
|
20543
20812
|
const cloneIndex = closest(this.actionObj.clone, 'td').cellIndex;
|
|
20544
|
-
const originalWidth = Math.ceil((isLeft ? getElementWidth(this.actionObj.element) : 0) /
|
|
20813
|
+
const originalWidth = Math.ceil((isLeft ? this.parent.getElementWidth(this.actionObj.element) : 0) /
|
|
20545
20814
|
this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
20546
|
-
const noOfDays = Math.ceil((getElementWidth(this.actionObj.clone) - originalWidth) /
|
|
20815
|
+
const noOfDays = Math.ceil((this.parent.getElementWidth(this.actionObj.clone) - originalWidth) /
|
|
20547
20816
|
this.actionObj.cellWidth);
|
|
20548
20817
|
const tr = closest(this.actionObj.clone, 'tr');
|
|
20549
20818
|
let dayIndex = isLeft ? cloneIndex - noOfDays : cloneIndex + noOfDays - 1;
|
|
@@ -20606,9 +20875,9 @@ class Resize extends ActionBase {
|
|
|
20606
20875
|
const slotInterval = (this.actionObj.cellWidth / this.actionObj.slotInterval) * this.actionObj.interval;
|
|
20607
20876
|
const pageWidth = isLeft ? (this.actionObj.X - this.actionObj.pageX) : (this.actionObj.pageX - this.actionObj.X);
|
|
20608
20877
|
const targetWidth = isTimelineView ?
|
|
20609
|
-
(getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth :
|
|
20610
|
-
this.parent.currentView === 'Month' ? getElementWidth(this.actionObj.element) :
|
|
20611
|
-
Math.ceil(getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
20878
|
+
(this.parent.getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth :
|
|
20879
|
+
this.parent.currentView === 'Month' ? this.parent.getElementWidth(this.actionObj.element) :
|
|
20880
|
+
Math.ceil(this.parent.getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
20612
20881
|
let offsetWidth = targetWidth + (Math.ceil(pageWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth);
|
|
20613
20882
|
const left = (this.parent.enableRtl) ? parseInt(this.actionObj.element.style.right, 10) : this.actionObj.clone.offsetLeft;
|
|
20614
20883
|
if (isTimeViews) {
|
|
@@ -20623,7 +20892,7 @@ class Resize extends ActionBase {
|
|
|
20623
20892
|
this.actionObj.event[this.parent.eventFields.isAllDay] = false;
|
|
20624
20893
|
}
|
|
20625
20894
|
let width = !isLeft && ((offsetWidth + this.actionObj.clone.offsetLeft > this.scrollArgs.width)) ?
|
|
20626
|
-
getElementWidth(this.actionObj.clone) : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
|
|
20895
|
+
this.parent.getElementWidth(this.actionObj.clone) : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
|
|
20627
20896
|
if (this.parent.enableRtl) {
|
|
20628
20897
|
let rightValue = isTimelineView ? parseInt(this.actionObj.element.style.right, 10) :
|
|
20629
20898
|
-(offsetWidth - this.actionObj.cellWidth);
|
|
@@ -20637,7 +20906,7 @@ class Resize extends ActionBase {
|
|
|
20637
20906
|
}
|
|
20638
20907
|
rightValue = rightValue >= this.scrollArgs.width ? this.scrollArgs.width - this.actionObj.cellWidth : rightValue;
|
|
20639
20908
|
styles.right = formatUnit(rightValue);
|
|
20640
|
-
width = width + rightValue > this.scrollArgs.width ? getElementWidth(this.actionObj.clone) : width;
|
|
20909
|
+
width = width + rightValue > this.scrollArgs.width ? this.parent.getElementWidth(this.actionObj.clone) : width;
|
|
20641
20910
|
}
|
|
20642
20911
|
else {
|
|
20643
20912
|
let offsetLeft = isLeft ? this.actionObj.element.offsetLeft - (this.actionObj.X - this.actionObj.pageX) :
|
|
@@ -20645,12 +20914,12 @@ class Resize extends ActionBase {
|
|
|
20645
20914
|
if (isTimelineView) {
|
|
20646
20915
|
offsetLeft = isLeft ? offsetLeft : parseInt(this.actionObj.clone.style.left, 10);
|
|
20647
20916
|
if (this.parent.enableRtl) {
|
|
20648
|
-
offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - getElementWidth(this.actionObj.clone))
|
|
20917
|
+
offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.parent.getElementWidth(this.actionObj.clone))
|
|
20649
20918
|
? parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
|
|
20650
20919
|
}
|
|
20651
20920
|
else {
|
|
20652
|
-
offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + getElementWidth(this.actionObj.clone) &&
|
|
20653
|
-
getElementWidth(this.actionObj.clone) === this.actionObj.cellWidth) ?
|
|
20921
|
+
offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.parent.getElementWidth(this.actionObj.clone) &&
|
|
20922
|
+
this.parent.getElementWidth(this.actionObj.clone) === this.actionObj.cellWidth) ?
|
|
20654
20923
|
parseInt(this.actionObj.clone.style.left, 10) : offsetLeft : offsetLeft;
|
|
20655
20924
|
}
|
|
20656
20925
|
}
|
|
@@ -20666,10 +20935,10 @@ class Resize extends ActionBase {
|
|
|
20666
20935
|
}
|
|
20667
20936
|
else {
|
|
20668
20937
|
offsetLeft = 0;
|
|
20669
|
-
width = getElementWidth(this.actionObj.clone);
|
|
20938
|
+
width = this.parent.getElementWidth(this.actionObj.clone);
|
|
20670
20939
|
}
|
|
20671
20940
|
}
|
|
20672
|
-
const cloneWidth = Math.ceil(getElementWidth(this.actionObj.clone) / this.actionObj.cellWidth) *
|
|
20941
|
+
const cloneWidth = Math.ceil(this.parent.getElementWidth(this.actionObj.clone) / this.actionObj.cellWidth) *
|
|
20673
20942
|
this.actionObj.cellWidth;
|
|
20674
20943
|
if (isLeft) {
|
|
20675
20944
|
styles.left = formatUnit(isTimelineView ? offsetLeft : isLeft ? leftValue < 0 ? -offsetLeft :
|
|
@@ -20761,8 +21030,8 @@ class YearEvent extends TimelineEvent {
|
|
|
20761
21030
|
const monthDate = new Date(this.parent.selectedDate.getFullYear(), month, 1);
|
|
20762
21031
|
const monthStart = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
20763
21032
|
const monthEnd = this.parent.calendarUtil.getMonthEndDate(new Date(monthDate.getTime()));
|
|
20764
|
-
let startDate = getWeekFirstDate(monthStart, this.parent.firstDayOfWeek);
|
|
20765
|
-
const endDate = addDays(getWeekLastDate(monthEnd, this.parent.firstDayOfWeek), 1);
|
|
21033
|
+
let startDate = getWeekFirstDate(monthStart, this.parent.activeViewOptions.firstDayOfWeek);
|
|
21034
|
+
const endDate = addDays(getWeekLastDate(monthEnd, this.parent.activeViewOptions.firstDayOfWeek), 1);
|
|
20766
21035
|
for (let index = 0; startDate.getTime() < endDate.getTime(); index++) {
|
|
20767
21036
|
const start = resetTime(new Date(startDate.getTime()));
|
|
20768
21037
|
const end = addDays(new Date(start.getTime()), 1);
|
|
@@ -20782,10 +21051,10 @@ class YearEvent extends TimelineEvent {
|
|
|
20782
21051
|
}
|
|
20783
21052
|
timelineYearViewEvents() {
|
|
20784
21053
|
const workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')');
|
|
20785
|
-
this.cellWidth = getElementWidth(workCell);
|
|
21054
|
+
this.cellWidth = this.parent.getElementWidth(workCell);
|
|
20786
21055
|
this.cellHeader = getOuterHeight(workCell.querySelector('.' + DATE_HEADER_CLASS));
|
|
20787
21056
|
const eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
|
|
20788
|
-
this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
|
|
21057
|
+
this.eventHeight = this.parent.getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
|
|
20789
21058
|
const selector = `.${MONTH_HEADER_WRAPPER} tbody tr,.${RESOURCE_COLUMN_TABLE_CLASS} tbody tr,.${CONTENT_TABLE_CLASS} tbody tr`;
|
|
20790
21059
|
this.addCellHeight(selector, this.eventHeight, EVENT_GAP$2, this.cellHeader, this.moreIndicatorHeight);
|
|
20791
21060
|
const wrapperCollection = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
|
|
@@ -20932,10 +21201,10 @@ class YearEvent extends TimelineEvent {
|
|
|
20932
21201
|
const contentTable = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
20933
21202
|
const isVerticalScrollbarAvail = contentTable.offsetWidth > contentTable.clientWidth;
|
|
20934
21203
|
const workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
|
|
20935
|
-
this.cellWidth = getElementWidth(workCell);
|
|
21204
|
+
this.cellWidth = this.parent.getElementWidth(workCell);
|
|
20936
21205
|
this.cellHeader = 0;
|
|
20937
21206
|
const eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
|
|
20938
|
-
this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
|
|
21207
|
+
this.eventHeight = this.parent.getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
|
|
20939
21208
|
const selector = `.${MONTH_HEADER_WRAPPER} tbody tr,.${RESOURCE_COLUMN_TABLE_CLASS} tbody tr,.${CONTENT_TABLE_CLASS} tbody tr`;
|
|
20940
21209
|
this.addCellHeight(selector, this.eventHeight, EVENT_GAP$2, this.cellHeader, this.moreIndicatorHeight);
|
|
20941
21210
|
const wrapperCollection = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
|
|
@@ -20977,7 +21246,7 @@ class YearEvent extends TimelineEvent {
|
|
|
20977
21246
|
appWrapper.forEach((appWrap, cellIndex) => {
|
|
20978
21247
|
const td = row.querySelector(`td:nth-child(${cellIndex + 1})`);
|
|
20979
21248
|
const app = [].slice.call(appWrap.children);
|
|
20980
|
-
const width = getElementWidth(td);
|
|
21249
|
+
const width = this.parent.getElementWidth(td);
|
|
20981
21250
|
const left = td.offsetLeft;
|
|
20982
21251
|
if (this.parent.enableRtl) {
|
|
20983
21252
|
const right = conTable.offsetWidth - left - td.offsetWidth;
|
|
@@ -21320,13 +21589,18 @@ class DragAndDrop extends ActionBase {
|
|
|
21320
21589
|
this.isAllDayTarget = false;
|
|
21321
21590
|
this.targetTd = null;
|
|
21322
21591
|
this.isCursorAhead = false;
|
|
21592
|
+
this.enableCurrentViewDrag = false;
|
|
21593
|
+
this.isPreventMultiDrag = false;
|
|
21594
|
+
this.slotsUptoCursor = -1;
|
|
21595
|
+
this.eleTop = 0;
|
|
21323
21596
|
}
|
|
21324
21597
|
wireDragEvent(element) {
|
|
21598
|
+
const isVerticalView = ['Day', 'Week', 'WorkWeek'].indexOf(this.parent.currentView) > -1;
|
|
21325
21599
|
new Draggable(element, {
|
|
21326
21600
|
abort: '.' + EVENT_RESIZE_CLASS,
|
|
21327
21601
|
clone: true,
|
|
21328
21602
|
isDragScroll: true,
|
|
21329
|
-
enableTailMode: (this.parent.eventDragArea) ? true : false,
|
|
21603
|
+
enableTailMode: (this.parent.eventDragArea || isVerticalView) ? true : false,
|
|
21330
21604
|
cursorAt: (this.parent.eventDragArea) ? { left: -20, top: -20 } : { left: 0, top: 0 },
|
|
21331
21605
|
dragArea: this.dragArea,
|
|
21332
21606
|
dragStart: this.dragStart.bind(this),
|
|
@@ -21349,6 +21623,8 @@ class DragAndDrop extends ActionBase {
|
|
|
21349
21623
|
}
|
|
21350
21624
|
this.setDragActionDefaultValues();
|
|
21351
21625
|
this.actionObj.element = e.element;
|
|
21626
|
+
this.eleTop = parseFloat(this.actionObj.element.style.top);
|
|
21627
|
+
this.slotsUptoCursor = -1;
|
|
21352
21628
|
this.actionObj.action = 'drag';
|
|
21353
21629
|
let elements = [];
|
|
21354
21630
|
if (!this.parent.allowMultiDrag || isNullOrUndefined(this.parent.selectedElements) || this.parent.selectedElements.length === 0 ||
|
|
@@ -21427,12 +21703,21 @@ class DragAndDrop extends ActionBase {
|
|
|
21427
21703
|
}
|
|
21428
21704
|
let top = parseInt(e.top, 10);
|
|
21429
21705
|
top = top < 0 ? 0 : top;
|
|
21430
|
-
|
|
21706
|
+
if (this.slotsUptoCursor < 0) {
|
|
21707
|
+
const cellsCountUptoCursor = Math.floor(top / cellHeight);
|
|
21708
|
+
const cellsCountUptoEleTop = Math.floor(this.eleTop / cellHeight);
|
|
21709
|
+
this.slotsUptoCursor = cellsCountUptoCursor - cellsCountUptoEleTop;
|
|
21710
|
+
}
|
|
21711
|
+
top = (Math.floor((top + 1) / cellHeight) - this.slotsUptoCursor) * cellHeight;
|
|
21712
|
+
topValue = formatUnit(top < 0 ? 0 : top);
|
|
21431
21713
|
const scrollHeight = this.parent.element.querySelector('.e-content-wrap').scrollHeight;
|
|
21432
21714
|
const cloneBottom = parseInt(topValue, 10) + this.actionObj.clone.offsetHeight;
|
|
21433
21715
|
if (cloneBottom > scrollHeight) {
|
|
21434
21716
|
topValue = (parseInt(topValue, 10) - (cloneBottom - scrollHeight)) + 'px';
|
|
21435
21717
|
}
|
|
21718
|
+
if (this.isPreventMultiDrag) {
|
|
21719
|
+
topValue = formatUnit(this.actionObj.clone.offsetTop);
|
|
21720
|
+
}
|
|
21436
21721
|
}
|
|
21437
21722
|
return { left: leftValue, top: topValue };
|
|
21438
21723
|
}
|
|
@@ -21483,6 +21768,7 @@ class DragAndDrop extends ActionBase {
|
|
|
21483
21768
|
this.actionObj.interval = dragEventArgs.interval;
|
|
21484
21769
|
this.actionObj.navigation = dragEventArgs.navigation;
|
|
21485
21770
|
this.actionObj.scroll = dragEventArgs.scroll;
|
|
21771
|
+
this.enableCurrentViewDrag = dragArgs.dragWithinRange && !dragArgs.navigation.enable && this.parent.allowMultiDrag;
|
|
21486
21772
|
this.actionObj.excludeSelectors = dragEventArgs.excludeSelectors;
|
|
21487
21773
|
const viewElement = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
21488
21774
|
this.scrollArgs = { element: viewElement, width: viewElement.scrollWidth, height: viewElement.scrollHeight };
|
|
@@ -21641,6 +21927,7 @@ class DragAndDrop extends ActionBase {
|
|
|
21641
21927
|
}
|
|
21642
21928
|
dragStop(e) {
|
|
21643
21929
|
this.isCursorAhead = false;
|
|
21930
|
+
this.isPreventMultiDrag = false;
|
|
21644
21931
|
this.removeCloneElementClasses();
|
|
21645
21932
|
this.removeCloneElement();
|
|
21646
21933
|
clearInterval(this.actionObj.navigationInterval);
|
|
@@ -21708,7 +21995,7 @@ class DragAndDrop extends ActionBase {
|
|
|
21708
21995
|
this.timelineEventModule.cellWidth = this.actionObj.cellWidth;
|
|
21709
21996
|
this.timelineEventModule.getSlotDates();
|
|
21710
21997
|
this.actionObj.cellWidth = this.isHeaderRows ? this.timelineEventModule.cellWidth :
|
|
21711
|
-
getElementWidth(this.parent.element.querySelector('.' + WORK_CELLS_CLASS));
|
|
21998
|
+
this.parent.getElementWidth(this.parent.element.querySelector('.' + WORK_CELLS_CLASS));
|
|
21712
21999
|
this.calculateTimelineTime(e);
|
|
21713
22000
|
}
|
|
21714
22001
|
else {
|
|
@@ -21851,7 +22138,7 @@ class DragAndDrop extends ActionBase {
|
|
|
21851
22138
|
(dragArea.scrollTop + dragArea.offsetHeight - this.actionObj.clone.offsetHeight + window.pageYOffset) +
|
|
21852
22139
|
(this.actionObj.clone.offsetHeight - this.heightUptoCursorPoint);
|
|
21853
22140
|
offsetTop = Math.round(offsetTop / this.actionObj.cellHeight) * this.actionObj.cellHeight;
|
|
21854
|
-
if (dragArea.scrollTop > 0) {
|
|
22141
|
+
if (dragArea.scrollTop > 0 && offsetTop < dragArea.scrollHeight) {
|
|
21855
22142
|
this.actionObj.clone.style.top = formatUnit(offsetTop);
|
|
21856
22143
|
}
|
|
21857
22144
|
}
|
|
@@ -21883,7 +22170,9 @@ class DragAndDrop extends ActionBase {
|
|
|
21883
22170
|
let dragStart;
|
|
21884
22171
|
let dragEnd;
|
|
21885
22172
|
if (this.parent.activeViewOptions.timeScale.enable && !this.isAllDayDrag) {
|
|
21886
|
-
this.
|
|
22173
|
+
if (!this.enableCurrentViewDrag || this.multiData.length === 0) {
|
|
22174
|
+
this.appendCloneElement(this.getEventWrapper(colIndex));
|
|
22175
|
+
}
|
|
21887
22176
|
dragStart = this.parent.getDateFromElement(td);
|
|
21888
22177
|
dragStart.setMinutes(dragStart.getMinutes() + (diffInMinutes / heightPerMinute));
|
|
21889
22178
|
dragEnd = new Date(dragStart.getTime());
|
|
@@ -21939,18 +22228,34 @@ class DragAndDrop extends ActionBase {
|
|
|
21939
22228
|
this.startTime = eventObj[this.parent.eventFields.startTime].getTime();
|
|
21940
22229
|
}
|
|
21941
22230
|
const startTimeDiff = event[this.parent.eventFields.startTime].getTime() - this.startTime;
|
|
21942
|
-
|
|
21943
|
-
this.
|
|
21944
|
-
|
|
21945
|
-
|
|
21946
|
-
|
|
21947
|
-
const
|
|
21948
|
-
|
|
21949
|
-
|
|
21950
|
-
|
|
21951
|
-
|
|
21952
|
-
|
|
21953
|
-
|
|
22231
|
+
if (this.enableCurrentViewDrag) {
|
|
22232
|
+
const renderDates = this.getRenderedDates();
|
|
22233
|
+
for (let i = 0; i < this.multiData.length; i++) {
|
|
22234
|
+
const eventObj = extend({}, this.multiData[parseInt(i.toString(), 10)], null, true);
|
|
22235
|
+
const startTime = new Date(eventObj[this.parent.eventFields.startTime].getTime() + startTimeDiff);
|
|
22236
|
+
const dayIndex = this.parent.getIndexOfDate(renderDates, resetTime(startTime));
|
|
22237
|
+
if (dayIndex < 0) {
|
|
22238
|
+
this.isPreventMultiDrag = true;
|
|
22239
|
+
break;
|
|
22240
|
+
}
|
|
22241
|
+
this.isPreventMultiDrag = false;
|
|
22242
|
+
}
|
|
22243
|
+
}
|
|
22244
|
+
if (!this.isPreventMultiDrag) {
|
|
22245
|
+
for (let index = 0; index < this.multiData.length; index++) {
|
|
22246
|
+
this.updatedData[parseInt(index.toString(), 10)] =
|
|
22247
|
+
this.updateMultipleData(this.multiData[parseInt(index.toString(), 10)], startTimeDiff);
|
|
22248
|
+
const dayIndex = this.getDayIndex(this.updatedData[parseInt(index.toString(), 10)]);
|
|
22249
|
+
if (dayIndex >= 0) {
|
|
22250
|
+
const isAllDay = this.updatedData[parseInt(index.toString(), 10)][this.parent.eventFields.isAllDay];
|
|
22251
|
+
const wrapper = this.getEventWrapper(dayIndex, isAllDay);
|
|
22252
|
+
this.appendCloneElement(wrapper, this.actionObj.cloneElement[parseInt(index.toString(), 10)]);
|
|
22253
|
+
this.updateEventHeight(this.updatedData[parseInt(index.toString(), 10)], index, dayIndex);
|
|
22254
|
+
}
|
|
22255
|
+
else {
|
|
22256
|
+
if (!isNullOrUndefined(this.actionObj.cloneElement[parseInt(index.toString(), 10)].parentNode)) {
|
|
22257
|
+
remove(this.actionObj.cloneElement[parseInt(index.toString(), 10)]);
|
|
22258
|
+
}
|
|
21954
22259
|
}
|
|
21955
22260
|
}
|
|
21956
22261
|
}
|
|
@@ -22080,7 +22385,7 @@ class DragAndDrop extends ActionBase {
|
|
|
22080
22385
|
let appHeight = this.parent.activeViewOptions.timeScale.enable ? this.verticalEvent.getHeight(eStart, eEnd) :
|
|
22081
22386
|
this.actionObj.element.offsetHeight;
|
|
22082
22387
|
let topValue = this.parent.activeViewOptions.timeScale.enable ?
|
|
22083
|
-
this.verticalEvent.getTopValue(eStart
|
|
22388
|
+
this.verticalEvent.getTopValue(eStart) : this.actionObj.element.offsetTop;
|
|
22084
22389
|
if (isNullOrUndefined(index)) {
|
|
22085
22390
|
if (i === 0) {
|
|
22086
22391
|
this.actionObj.clone.style.top = formatUnit(topValue);
|
|
@@ -22166,6 +22471,9 @@ class DragAndDrop extends ActionBase {
|
|
|
22166
22471
|
}
|
|
22167
22472
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
22168
22473
|
swapDragging(e) {
|
|
22474
|
+
if (this.isPreventMultiDrag) {
|
|
22475
|
+
return;
|
|
22476
|
+
}
|
|
22169
22477
|
const colIndex = !isNullOrUndefined(closest(this.actionObj.target, 'td')) && closest(this.actionObj.target, 'td').cellIndex;
|
|
22170
22478
|
if (closest(this.actionObj.target, '.' + DATE_HEADER_WRAP_CLASS) &&
|
|
22171
22479
|
!closest(this.actionObj.clone, '.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS)) {
|
|
@@ -22289,7 +22597,7 @@ class DragAndDrop extends ActionBase {
|
|
|
22289
22597
|
getUniversalTime(eventObj[this.parent.eventFields.startTime]);
|
|
22290
22598
|
let offsetLeft = this.parent.enableRtl ? Math.abs(this.actionObj.clone.offsetLeft) - this.actionObj.clone.offsetWidth :
|
|
22291
22599
|
parseInt(this.actionObj.clone.style.left, 10);
|
|
22292
|
-
offsetLeft = Math.
|
|
22600
|
+
offsetLeft = Math.round(offsetLeft / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
22293
22601
|
let rightOffset;
|
|
22294
22602
|
if (this.parent.enableRtl) {
|
|
22295
22603
|
rightOffset = Math.abs(parseInt(this.actionObj.clone.style.right, 10));
|
|
@@ -22475,7 +22783,7 @@ class DragAndDrop extends ActionBase {
|
|
|
22475
22783
|
return 0;
|
|
22476
22784
|
}
|
|
22477
22785
|
getColumnIndex(offsetLeft) {
|
|
22478
|
-
const index = Math.
|
|
22786
|
+
const index = Math.round(offsetLeft / this.actionObj.cellWidth);
|
|
22479
22787
|
if (this.isHeaderRows) {
|
|
22480
22788
|
return index;
|
|
22481
22789
|
}
|
|
@@ -22520,7 +22828,7 @@ class DragAndDrop extends ActionBase {
|
|
|
22520
22828
|
~~(dragArea.querySelector('table').offsetHeight / trCollection.length) : this.actionObj.cellHeight;
|
|
22521
22829
|
let rowIndex = Math.floor(Math.floor((this.actionObj.Y +
|
|
22522
22830
|
(dragArea.scrollTop - translateY - (window.scrollY || window.pageYOffset))) -
|
|
22523
|
-
getElementTop(dragArea)) / rowHeight);
|
|
22831
|
+
getElementTop(dragArea, this.parent.uiStateValues.isTransformed)) / rowHeight);
|
|
22524
22832
|
rowIndex = (rowIndex < 0) ? 0 : (rowIndex > trCollection.length - 1) ? trCollection.length - 1 : rowIndex;
|
|
22525
22833
|
this.actionObj.index = rowIndex;
|
|
22526
22834
|
const eventContainer = this.parent.element.querySelectorAll('.e-appointment-container:not(.e-hidden)').item(rowIndex);
|
|
@@ -22536,7 +22844,7 @@ class DragAndDrop extends ActionBase {
|
|
|
22536
22844
|
if (!isNullOrUndefined(this.parent.eventDragArea)) {
|
|
22537
22845
|
return;
|
|
22538
22846
|
}
|
|
22539
|
-
let top = getElementHeight(trCollection[parseInt(rowIndex.toString(), 10)]) * rowIndex;
|
|
22847
|
+
let top = this.parent.getElementHeight(trCollection[parseInt(rowIndex.toString(), 10)]) * rowIndex;
|
|
22540
22848
|
if (this.parent.rowAutoHeight) {
|
|
22541
22849
|
const cursorElement = this.getCursorElement(e);
|
|
22542
22850
|
if (cursorElement) {
|
|
@@ -22865,6 +23173,10 @@ class ViewBase {
|
|
|
22865
23173
|
}
|
|
22866
23174
|
startHour.setMilliseconds(0);
|
|
22867
23175
|
endHour.setMilliseconds(0);
|
|
23176
|
+
if (resetTime(date).getTime() !== resetTime(startHour).getTime()) {
|
|
23177
|
+
startHour = new Date(2000, 0, 0, startHour.getHours(), startHour.getMinutes(), startHour.getMilliseconds());
|
|
23178
|
+
endHour = new Date(2000, 0, 0, endHour.getHours(), endHour.getMinutes(), endHour.getMilliseconds());
|
|
23179
|
+
}
|
|
22868
23180
|
return !(getDateInMs(date) < getDateInMs(startHour) || getDateInMs(date) >= getDateInMs(endHour) ||
|
|
22869
23181
|
!this.isWorkDay(date, workDays));
|
|
22870
23182
|
}
|
|
@@ -23093,7 +23405,7 @@ class ViewBase {
|
|
|
23093
23405
|
if (this.isTimelineView()) {
|
|
23094
23406
|
const colElements = this.getColElements();
|
|
23095
23407
|
const contentBody = this.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody');
|
|
23096
|
-
const colWidth = (getElementWidth(contentBody) / (colElements.length / 2));
|
|
23408
|
+
const colWidth = (this.parent.getElementWidth(contentBody) / (colElements.length / 2));
|
|
23097
23409
|
if (content.offsetHeight !== content.clientHeight) {
|
|
23098
23410
|
const resourceColumn = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
|
|
23099
23411
|
if (!isNullOrUndefined(resourceColumn) && resourceColumn.offsetHeight !== content.clientHeight) {
|
|
@@ -23223,6 +23535,15 @@ class ViewBase {
|
|
|
23223
23535
|
this.parent.resourceBase.expandedResources = this.colLevels[this.colLevels.length - 1];
|
|
23224
23536
|
}
|
|
23225
23537
|
}
|
|
23538
|
+
getGroupIndices(dataCollection) {
|
|
23539
|
+
let groupIndices = [];
|
|
23540
|
+
if (this.parent.virtualScrollModule && this.parent.activeViewOptions.group.resources.length > 0 && (dataCollection ||
|
|
23541
|
+
this.parent.virtualScrollModule.existingDataCollection.length > 0) && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
23542
|
+
dataCollection = isNullOrUndefined(dataCollection) ? this.parent.virtualScrollModule.existingDataCollection : dataCollection;
|
|
23543
|
+
groupIndices = dataCollection.map((data) => data.groupIndex);
|
|
23544
|
+
}
|
|
23545
|
+
return groupIndices;
|
|
23546
|
+
}
|
|
23226
23547
|
destroy() {
|
|
23227
23548
|
if (this.element && this.element.parentNode) {
|
|
23228
23549
|
remove(this.element);
|
|
@@ -23453,11 +23774,8 @@ class VerticalView extends ViewBase {
|
|
|
23453
23774
|
const currentDate = this.parent.getCurrentTime();
|
|
23454
23775
|
if (this.parent.showTimeIndicator && this.isWorkHourRange(currentDate)) {
|
|
23455
23776
|
const currentDateIndex = this.getCurrentTimeIndicatorIndex();
|
|
23456
|
-
if (currentDateIndex.length > 0) {
|
|
23457
|
-
|
|
23458
|
-
if (workCells.length > 0) {
|
|
23459
|
-
this.changeCurrentTimePosition();
|
|
23460
|
-
}
|
|
23777
|
+
if (currentDateIndex.length > 0 && !isNullOrUndefined(this.element.querySelector('.' + WORK_CELLS_CLASS))) {
|
|
23778
|
+
this.changeCurrentTimePosition();
|
|
23461
23779
|
if (isNullOrUndefined(this.currentTimeIndicatorTimer)) {
|
|
23462
23780
|
const interval = MS_PER_MINUTE - ((currentDate.getSeconds() * 1000) + currentDate.getMilliseconds());
|
|
23463
23781
|
if (interval <= (MS_PER_MINUTE - 1000)) {
|
|
@@ -23554,7 +23872,11 @@ class VerticalView extends ViewBase {
|
|
|
23554
23872
|
curTimeWrap[parseInt(i.toString(), 10)].appendChild(createElement('div', { className: PREVIOUS_TIMELINE_CLASS, styles: 'top:' + topInPx }));
|
|
23555
23873
|
}
|
|
23556
23874
|
for (const day of currentDateIndex) {
|
|
23557
|
-
curTimeWrap
|
|
23875
|
+
if (curTimeWrap.length > day) {
|
|
23876
|
+
curTimeWrap[parseInt(day.toString(), 10)].appendChild(createElement('div', {
|
|
23877
|
+
className: CURRENT_TIMELINE_CLASS, styles: 'top:' + topInPx
|
|
23878
|
+
}));
|
|
23879
|
+
}
|
|
23558
23880
|
}
|
|
23559
23881
|
const currentTimeEle = createElement('div', {
|
|
23560
23882
|
innerHTML: this.parent.getTimeString(this.parent.getCurrentTime()),
|
|
@@ -23571,13 +23893,13 @@ class VerticalView extends ViewBase {
|
|
|
23571
23893
|
}
|
|
23572
23894
|
}
|
|
23573
23895
|
getTopFromDateTime(date) {
|
|
23574
|
-
const startHour = this.
|
|
23896
|
+
const startHour = this.getStartEndHours(this.parent.activeViewOptions.startHour);
|
|
23575
23897
|
const diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
|
|
23576
23898
|
return (diffInMinutes * this.getWorkCellHeight() * this.parent.activeViewOptions.timeScale.slotCount) /
|
|
23577
23899
|
this.parent.activeViewOptions.timeScale.interval;
|
|
23578
23900
|
}
|
|
23579
23901
|
getWorkCellHeight() {
|
|
23580
|
-
return parseFloat(getElementHeight(this.element.querySelector('.' + WORK_CELLS_CLASS)).toFixed(2));
|
|
23902
|
+
return parseFloat(this.parent.getElementHeight(this.element.querySelector('.' + WORK_CELLS_CLASS)).toFixed(2));
|
|
23581
23903
|
}
|
|
23582
23904
|
getTdContent(date, type, groupIndex) {
|
|
23583
23905
|
let cntEle;
|
|
@@ -23878,11 +24200,20 @@ class VerticalView extends ViewBase {
|
|
|
23878
24200
|
const rows = [];
|
|
23879
24201
|
const tr = createElement('tr');
|
|
23880
24202
|
const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
|
|
24203
|
+
const existingGroupIndices = this.getGroupIndices();
|
|
23881
24204
|
const handler = (r) => {
|
|
23882
24205
|
const ntr = tr.cloneNode();
|
|
23883
24206
|
for (const tdData of this.colLevels[this.colLevels.length - 1]) {
|
|
23884
|
-
|
|
23885
|
-
|
|
24207
|
+
let isAllowTdCreation = true;
|
|
24208
|
+
if (this.parent.virtualScrollModule && this.parent.activeViewOptions.group.resources.length > 0) {
|
|
24209
|
+
if (existingGroupIndices.indexOf(tdData.groupIndex) > -1) {
|
|
24210
|
+
isAllowTdCreation = false;
|
|
24211
|
+
}
|
|
24212
|
+
}
|
|
24213
|
+
if (isAllowTdCreation) {
|
|
24214
|
+
const ntd = this.createContentTd(tdData, r, td);
|
|
24215
|
+
ntr.appendChild(ntd);
|
|
24216
|
+
}
|
|
23886
24217
|
}
|
|
23887
24218
|
rows.push(ntr);
|
|
23888
24219
|
return r;
|
|
@@ -24604,7 +24935,13 @@ class Month extends ViewBase {
|
|
|
24604
24935
|
const tr = createElement('tr');
|
|
24605
24936
|
const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
|
|
24606
24937
|
const slotDatas = this.getContentSlots();
|
|
24938
|
+
const isTimeline = this.parent.currentView === 'TimelineMonth';
|
|
24939
|
+
const existingGroupIndices = isTimeline ? this.getGroupIndices() : [];
|
|
24607
24940
|
for (let row = 0; row < slotDatas.length; row++) {
|
|
24941
|
+
if (existingGroupIndices.length > 0 &&
|
|
24942
|
+
existingGroupIndices.indexOf(slotDatas[parseInt(row.toString(), 10)][0].groupIndex) > -1) {
|
|
24943
|
+
continue;
|
|
24944
|
+
}
|
|
24608
24945
|
const ntr = tr.cloneNode();
|
|
24609
24946
|
for (let col = 0; col < slotDatas[parseInt(row.toString(), 10)].length; col++) {
|
|
24610
24947
|
const ntd = this.createContentTd(slotDatas[parseInt(row.toString(), 10)][parseInt(col.toString(), 10)], td);
|
|
@@ -24933,7 +25270,7 @@ class Year extends ViewBase {
|
|
|
24933
25270
|
this.setAriaAttributes(contentTable);
|
|
24934
25271
|
const thead = createElement('thead', { className: 'e-week-header' });
|
|
24935
25272
|
const tr = createElement('tr');
|
|
24936
|
-
let currentWeek = getWeekFirstDate(firstDateOfMonth(currentDate), this.parent.firstDayOfWeek);
|
|
25273
|
+
let currentWeek = getWeekFirstDate(firstDateOfMonth(currentDate), this.parent.activeViewOptions.firstDayOfWeek);
|
|
24937
25274
|
if (this.parent.activeViewOptions.showWeekNumber) {
|
|
24938
25275
|
tr.appendChild(createElement('th'));
|
|
24939
25276
|
}
|
|
@@ -25059,7 +25396,7 @@ class Year extends ViewBase {
|
|
|
25059
25396
|
return dateCol;
|
|
25060
25397
|
}
|
|
25061
25398
|
getMonthDates(date) {
|
|
25062
|
-
const startDate = getWeekFirstDate(firstDateOfMonth(date), this.parent.firstDayOfWeek);
|
|
25399
|
+
const startDate = getWeekFirstDate(firstDateOfMonth(date), this.parent.activeViewOptions.firstDayOfWeek);
|
|
25063
25400
|
const endDate = addDays(new Date(+startDate), (6 * WEEK_LENGTH));
|
|
25064
25401
|
const dateCollection = [];
|
|
25065
25402
|
for (let start = startDate; start.getTime() < endDate.getTime(); start = addDays(start, 1)) {
|
|
@@ -25191,10 +25528,10 @@ class Year extends ViewBase {
|
|
|
25191
25528
|
return addDays(addMonths(this.getStartDate(), this.parent.monthsCount), -1);
|
|
25192
25529
|
}
|
|
25193
25530
|
startDate() {
|
|
25194
|
-
return this.parent.currentView === 'Year' ? getWeekFirstDate(this.getStartDate(), this.parent.firstDayOfWeek) : this.getStartDate();
|
|
25531
|
+
return this.parent.currentView === 'Year' ? getWeekFirstDate(this.getStartDate(), this.parent.activeViewOptions.firstDayOfWeek) : this.getStartDate();
|
|
25195
25532
|
}
|
|
25196
25533
|
endDate() {
|
|
25197
|
-
return this.parent.currentView === 'Year' ? addDays(getWeekLastDate(this.getEndDate(), this.parent.firstDayOfWeek), 1) :
|
|
25534
|
+
return this.parent.currentView === 'Year' ? addDays(getWeekLastDate(this.getEndDate(), this.parent.activeViewOptions.firstDayOfWeek), 1) :
|
|
25198
25535
|
addDays(this.getEndDate(), 1);
|
|
25199
25536
|
}
|
|
25200
25537
|
getEndDateFromStartDate(start) {
|
|
@@ -26314,7 +26651,7 @@ class TimelineHeaderRow {
|
|
|
26314
26651
|
const jsDate = +new Date(1970, 0, 1);
|
|
26315
26652
|
const tzOffsetDiff = d.getTimezoneOffset() - new Date(1970, 0, 1).getTimezoneOffset();
|
|
26316
26653
|
let key = Math.ceil(((((+d - jsDate) - (tzOffsetDiff * 60 * 1000)) / MS_PER_DAY) + new Date(jsDate).getDay() + 1) / 7);
|
|
26317
|
-
if (this.parent.firstDayOfWeek && this.parent.firstDayOfWeek > new Date(+d).getDay()) {
|
|
26654
|
+
if (this.parent.activeViewOptions.firstDayOfWeek && this.parent.activeViewOptions.firstDayOfWeek > new Date(+d).getDay()) {
|
|
26318
26655
|
key = key - 1;
|
|
26319
26656
|
}
|
|
26320
26657
|
result[parseInt(key.toString(), 10)] = result[parseInt(key.toString(), 10)] || [];
|
|
@@ -26452,7 +26789,7 @@ class TimelineViews extends VerticalView {
|
|
|
26452
26789
|
}
|
|
26453
26790
|
let scrollLeft;
|
|
26454
26791
|
if (isNullOrUndefined(hour) || !this.parent.activeViewOptions.timeScale.enable) {
|
|
26455
|
-
scrollLeft = index * getElementWidth(this.element.querySelector('.e-work-cells'));
|
|
26792
|
+
scrollLeft = index * this.parent.getElementWidth(this.element.querySelector('.e-work-cells'));
|
|
26456
26793
|
}
|
|
26457
26794
|
else {
|
|
26458
26795
|
scrollLeft = isNullOrUndefined(scrollDate) ? this.getLeftFromDateTime(null, date) :
|
|
@@ -26536,7 +26873,7 @@ class TimelineViews extends VerticalView {
|
|
|
26536
26873
|
if (this.parent.activeView.colLevels[parseInt(index.toString(), 10)] &&
|
|
26537
26874
|
this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan) {
|
|
26538
26875
|
diffInDates = currentDateIndex[0] * this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan *
|
|
26539
|
-
getElementWidth(this.element.querySelector('.e-work-cells'));
|
|
26876
|
+
this.parent.getElementWidth(this.element.querySelector('.e-work-cells'));
|
|
26540
26877
|
}
|
|
26541
26878
|
else {
|
|
26542
26879
|
const endHour = this.getEndHour();
|
|
@@ -26546,8 +26883,8 @@ class TimelineViews extends VerticalView {
|
|
|
26546
26883
|
}
|
|
26547
26884
|
}
|
|
26548
26885
|
}
|
|
26549
|
-
return diffInDates + ((diffInMinutes * getElementWidth(this.element.querySelector('.e-work-cells'))
|
|
26550
|
-
this.parent.activeViewOptions.timeScale.interval);
|
|
26886
|
+
return diffInDates + ((diffInMinutes * this.parent.getElementWidth(this.element.querySelector('.e-work-cells'))
|
|
26887
|
+
* this.parent.activeViewOptions.timeScale.slotCount) / this.parent.activeViewOptions.timeScale.interval);
|
|
26551
26888
|
}
|
|
26552
26889
|
renderHeader() {
|
|
26553
26890
|
const tr = createElement('tr');
|
|
@@ -26614,7 +26951,12 @@ class TimelineViews extends VerticalView {
|
|
|
26614
26951
|
const tr = createElement('tr');
|
|
26615
26952
|
const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
|
|
26616
26953
|
const trCount = this.getRowCount();
|
|
26954
|
+
const existingGroupIndices = this.getGroupIndices();
|
|
26617
26955
|
for (let i = 0; i < trCount; i++) {
|
|
26956
|
+
if (existingGroupIndices.length > 0 &&
|
|
26957
|
+
existingGroupIndices.indexOf(this.parent.resourceBase.renderedResources[parseInt(i.toString(), 10)].groupIndex) > -1) {
|
|
26958
|
+
continue;
|
|
26959
|
+
}
|
|
26618
26960
|
const ntr = tr.cloneNode();
|
|
26619
26961
|
for (let tdData of this.colLevels[this.colLevels.length - 1]) {
|
|
26620
26962
|
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
@@ -27098,13 +27440,17 @@ class TimelineYear extends Year {
|
|
|
27098
27440
|
getContentRows() {
|
|
27099
27441
|
const tRow = [];
|
|
27100
27442
|
const monthCells = this.getMonths();
|
|
27443
|
+
const existingGroupIndices = this.getGroupIndices();
|
|
27101
27444
|
for (let row = 0; row < this.parent.resourceBase.renderedResources.length; row++) {
|
|
27102
|
-
const tr = createElement('tr');
|
|
27103
|
-
tRow.push(tr);
|
|
27104
27445
|
let resData;
|
|
27105
27446
|
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
27106
27447
|
resData = this.parent.resourceBase.renderedResources[parseInt(row.toString(), 10)];
|
|
27448
|
+
if (existingGroupIndices.length > 0 && existingGroupIndices.indexOf(resData.groupIndex) > -1) {
|
|
27449
|
+
continue;
|
|
27450
|
+
}
|
|
27107
27451
|
}
|
|
27452
|
+
const tr = createElement('tr');
|
|
27453
|
+
tRow.push(tr);
|
|
27108
27454
|
let monthDate = new Date(this.parent.selectedDate.getFullYear(), monthCells[parseInt(row.toString(), 10)], 1);
|
|
27109
27455
|
let date = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
|
|
27110
27456
|
for (let month = 0; month < this.columnCount; month++) {
|
|
@@ -27809,6 +28155,7 @@ class Print {
|
|
|
27809
28155
|
Schedule.Inject(Day, Week, WorkWeek, Month, Agenda, MonthAgenda, TimelineViews, TimelineMonth, Year, TimelineYear);
|
|
27810
28156
|
this.printInstance = new Schedule(this.getPrintScheduleModel(printOptions));
|
|
27811
28157
|
this.printInstance.isPrinting = true;
|
|
28158
|
+
this.printInstance.registeredTemplate = this.parent.registeredTemplate;
|
|
27812
28159
|
this.printInstance.root = this.parent.root ? this.parent.root : this.parent;
|
|
27813
28160
|
this.printInstance.appendTo(element);
|
|
27814
28161
|
this.printInstance.on(print, this.contentReady, this);
|