devexpress-gantt 4.0.8 → 4.0.9

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/dist/dx-gantt.css CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt)
3
- * Version: 4.0.8
4
- * Build date: Fri Feb 04 2022
3
+ * Version: 4.0.9
4
+ * Build date: Tue Feb 08 2022
5
5
  *
6
6
  * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
package/dist/dx-gantt.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt)
3
- * Version: 4.0.8
4
- * Build date: Fri Feb 04 2022
3
+ * Version: 4.0.9
4
+ * Build date: Tue Feb 08 2022
5
5
  *
6
6
  * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
@@ -740,7 +740,7 @@ var DomUtils = (function () {
740
740
  return getAbsolutePositionX_IE(element);
741
741
  else if (browser_1.Browser.Firefox && browser_1.Browser.Version >= 3)
742
742
  return getAbsolutePositionX_FF3(element);
743
- else if (browser_1.Browser.Opera)
743
+ else if (browser_1.Browser.Opera && browser_1.Browser.Version <= 12)
744
744
  return getAbsolutePositionX_Opera(element);
745
745
  else if (browser_1.Browser.NetscapeFamily && (!browser_1.Browser.Firefox || browser_1.Browser.Version < 3))
746
746
  return getAbsolutePositionX_NS(element);
@@ -802,10 +802,11 @@ var DomUtils = (function () {
802
802
  DomUtils.getChildNodesByClassName = function (parent, className) {
803
803
  function nodeListToArray(nodeList, filter) {
804
804
  var result = [];
805
- nodeList.forEach(function (element) {
805
+ for (var i = 0; i < nodeList.length; i++) {
806
+ var element = nodeList[i];
806
807
  if (filter(element))
807
808
  result.push(element);
808
- });
809
+ }
809
810
  return result;
810
811
  }
811
812
  if (parent.querySelectorAll) {
@@ -1382,21 +1383,28 @@ var EvtUtils = (function () {
1382
1383
  function EvtUtils() {
1383
1384
  }
1384
1385
  EvtUtils.preventEvent = function (evt) {
1386
+ if (!evt.cancelable)
1387
+ return;
1385
1388
  if (evt.preventDefault)
1386
1389
  evt.preventDefault();
1387
1390
  else
1388
1391
  evt.returnValue = false;
1389
1392
  };
1390
1393
  EvtUtils.getEventSource = function (evt) {
1391
- if (!common_1.isDefined(evt))
1392
- return null;
1393
- return evt.srcElement ? evt.srcElement : evt.target;
1394
+ return common_1.isDefined(evt) ? EvtUtils.getEventSourceCore(evt) : null;
1394
1395
  };
1395
1396
  EvtUtils.getEventSourceByPosition = function (evt) {
1396
1397
  if (!common_1.isDefined(evt))
1397
1398
  return null;
1398
- if (document.elementFromPoint && EvtUtils.getEventX(evt) !== undefined && EvtUtils.getEventY(evt) !== undefined)
1399
- return document.elementFromPoint(EvtUtils.getEventX(evt), EvtUtils.getEventY(evt));
1399
+ if (!document.elementFromPoint)
1400
+ return EvtUtils.getEventSourceCore(evt);
1401
+ var eventX = EvtUtils.getEventX(evt);
1402
+ var eventY = EvtUtils.getEventY(evt);
1403
+ if (eventX === undefined || eventY === undefined)
1404
+ return EvtUtils.getEventSourceCore(evt);
1405
+ return document.elementFromPoint(eventX, eventY);
1406
+ };
1407
+ EvtUtils.getEventSourceCore = function (evt) {
1400
1408
  return evt.srcElement ? evt.srcElement : evt.target;
1401
1409
  };
1402
1410
  EvtUtils.getMouseWheelEventName = function () {
@@ -1412,24 +1420,19 @@ var EvtUtils = (function () {
1412
1420
  evt = (browser_1.Browser.IE && common_1.isDefined(event)) ? event : evt;
1413
1421
  if (!evt)
1414
1422
  return false;
1415
- if (browser_1.Browser.IE && browser_1.Browser.Version < 11) {
1416
- if (browser_1.Browser.MSTouchUI)
1417
- return true;
1418
- return evt.button % 2 === 1;
1419
- }
1420
- else if (browser_1.Browser.WebKitFamily) {
1421
- if (evt.type === 'pointermove')
1422
- return evt.buttons === 1;
1423
- return evt.which === 1;
1424
- }
1425
- else if (browser_1.Browser.NetscapeFamily || browser_1.Browser.Edge || (browser_1.Browser.IE && browser_1.Browser.Version >= 11)) {
1426
- if (evt.type === touch_1.TouchUtils.touchMouseMoveEventName)
1427
- return evt.buttons === 1;
1428
- return evt.which === 1;
1429
- }
1430
- else if (browser_1.Browser.Opera)
1431
- return evt.button === 0;
1432
- return true;
1423
+ if (browser_1.Browser.IE && browser_1.Browser.Version < 11)
1424
+ return browser_1.Browser.MSTouchUI ? true : evt.button % 2 === 1;
1425
+ if (browser_1.Browser.WebKitFamily)
1426
+ return evt.type === 'pointermove' ? evt.buttons === 1 : evt.which === 1;
1427
+ if (browser_1.Browser.NetscapeFamily || browser_1.Browser.Edge || (browser_1.Browser.IE && browser_1.Browser.Version >= 11))
1428
+ return EvtUtils.isMoveEventName(evt.type) ? evt.buttons === 1 : evt.which === 1;
1429
+ return browser_1.Browser.Opera ? evt.button === 0 : true;
1430
+ };
1431
+ EvtUtils.isMoveEventName = function (type) {
1432
+ return type === touch_1.TouchUtils.touchMouseMoveEventName || type === EvtUtils.getMoveEventName();
1433
+ };
1434
+ EvtUtils.getMoveEventName = function () {
1435
+ return window.PointerEvent ? 'pointermove' : (browser_1.Browser.TouchUI ? 'touchmove' : 'mousemove');
1433
1436
  };
1434
1437
  EvtUtils.preventEventAndBubble = function (evt) {
1435
1438
  EvtUtils.preventEvent(evt);
@@ -1594,9 +1597,19 @@ var Browser = (function () {
1594
1597
  return '';
1595
1598
  };
1596
1599
  Browser.isTouchEnabled = function () {
1597
- return ('ontouchstart' in window) ||
1598
- (navigator['maxTouchPoints'] > 0) ||
1599
- (navigator['msMaxTouchPoints'] > 0);
1600
+ return Browser.hasTouchStart() || Browser.hasMaxTouchPoints() || Browser.hasMsMaxTouchPoints();
1601
+ };
1602
+ Browser.hasTouchStart = function () {
1603
+ return ('ontouchstart' in window);
1604
+ };
1605
+ Browser.hasMaxTouchPoints = function () {
1606
+ return navigator['maxTouchPoints'] > 0;
1607
+ };
1608
+ Browser.hasMsMaxTouchPoints = function () {
1609
+ return navigator['msMaxTouchPoints'] > 0;
1610
+ };
1611
+ Browser.hasNavigator = function () {
1612
+ return typeof navigator !== 'undefined';
1600
1613
  };
1601
1614
  Browser.fillUserAgentInfo = function (browserTypesOrderedList, browserType, version, platform, isSamsungAndroidDevice) {
1602
1615
  if (isSamsungAndroidDevice === void 0) { isSamsungAndroidDevice = false; }
@@ -1613,9 +1626,6 @@ var Browser = (function () {
1613
1626
  Browser.WindowsPhonePlatform = platform === 'WinPhone';
1614
1627
  Browser.WebKitFamily = Browser.Safari || Browser.Chrome || Browser.Opera && Browser.MajorVersion >= 15;
1615
1628
  Browser.NetscapeFamily = Browser.Netscape || Browser.Mozilla || Browser.Firefox;
1616
- Browser.HardwareAcceleration = (Browser.IE && Browser.MajorVersion >= 9) || (Browser.Firefox && Browser.MajorVersion >= 4) ||
1617
- (Browser.AndroidMobilePlatform && Browser.Chrome) || (Browser.Chrome && Browser.MajorVersion >= 37) ||
1618
- (Browser.Safari && !Browser.WindowsPlatform) || Browser.Edge || (Browser.Opera && Browser.MajorVersion >= 46);
1619
1629
  Browser.WebKitTouchUI = Browser.MacOSMobilePlatform || Browser.AndroidMobilePlatform;
1620
1630
  var isIETouchUI = Browser.IE && Browser.MajorVersion > 9 && Browser.WindowsPlatform && Browser.UserAgent.toLowerCase().indexOf('touch') >= 0;
1621
1631
  Browser.MSTouchUI = isIETouchUI || (Browser.Edge && !!window.navigator.maxTouchPoints);
@@ -1679,7 +1689,7 @@ var Browser = (function () {
1679
1689
  }
1680
1690
  };
1681
1691
  Browser.getUserAgent = function () {
1682
- return typeof navigator !== 'undefined' && navigator.userAgent ? navigator.userAgent.toLowerCase() : '';
1692
+ return Browser.hasNavigator() && navigator.userAgent ? navigator.userAgent.toLowerCase() : '';
1683
1693
  };
1684
1694
  Browser.UserAgent = Browser.getUserAgent();
1685
1695
  Browser._foo = Browser.IdentUserAgent(Browser.UserAgent);
@@ -6404,6 +6414,10 @@ var GanttView = (function () {
6404
6414
  GanttView.prototype.destroyTemplate = function (container) {
6405
6415
  this.ganttOwner.destroyTemplate ? this.ganttOwner.destroyTemplate(container) : container.innerHTML = "";
6406
6416
  };
6417
+ GanttView.prototype.onTaskAreaSizeChanged = function (info) {
6418
+ if (this.ganttOwner.onTaskAreaSizeChanged)
6419
+ this.ganttOwner.onTaskAreaSizeChanged(info);
6420
+ };
6407
6421
  GanttView.prototype.showTaskEditDialog = function () {
6408
6422
  this.commandManager.showTaskEditDialog.execute();
6409
6423
  };
@@ -7543,6 +7557,8 @@ var KeyUtils = (function () {
7543
7557
  result |= ModifierKey.Ctrl;
7544
7558
  if (evt.shiftKey)
7545
7559
  result |= ModifierKey.Shift;
7560
+ if (evt.metaKey)
7561
+ result |= ModifierKey.Meta;
7546
7562
  return result;
7547
7563
  };
7548
7564
  KeyUtils.getShortcutCode = function (keyCode, isCtrlKey, isShiftKey, isAltKey, isMetaKey) {
@@ -16034,7 +16050,16 @@ var RenderHelper = (function () {
16034
16050
  parent.appendChild(this._taskArea);
16035
16051
  };
16036
16052
  RenderHelper.prototype.setSizeForTaskArea = function () {
16037
- this._taskAreaRender.setSizeForTaskArea();
16053
+ var width = this.getTaskAreaWidth();
16054
+ var height = this.getTaskAreaHeight();
16055
+ this._taskAreaRender.setSizeForTaskArea(width, height);
16056
+ this._ganttView.onTaskAreaSizeChanged({ width: width, height: height });
16057
+ };
16058
+ RenderHelper.prototype.getTaskAreaWidth = function () {
16059
+ return this.gridLayoutCalculator.getTotalWidth();
16060
+ };
16061
+ RenderHelper.prototype.getTaskAreaHeight = function () {
16062
+ return this.gridLayoutCalculator.getVerticalGridLineHeight();
16038
16063
  };
16039
16064
  RenderHelper.prototype.getTaskAreaContainerScrollLeft = function () {
16040
16065
  return this._taskAreaRender.taskAreaContainer.scrollLeft;
@@ -16060,9 +16085,6 @@ var RenderHelper = (function () {
16060
16085
  RenderHelper.prototype.getSmallTaskWidth = function (etalonPaddingLeft) {
16061
16086
  return this._taskRender.getSmallTaskWidth(etalonPaddingLeft);
16062
16087
  };
16063
- RenderHelper.prototype.getTaskAreaWidth = function () {
16064
- return this._taskAreaRender.getTaskAreaWidth();
16065
- };
16066
16088
  RenderHelper.prototype.createTaskElement = function (index) {
16067
16089
  this._taskRender.createTaskElement(index, this._ganttView.settings.taskContentTemplate);
16068
16090
  };
@@ -18342,15 +18364,9 @@ var TaskAreaRender = (function () {
18342
18364
  TaskAreaRender.prototype.getTaskAreaBordersDictionary = function (isVertical) {
18343
18365
  return isVertical ? this.vertTaskAreaBorders : this.horTaskAreaBorders;
18344
18366
  };
18345
- TaskAreaRender.prototype.setSizeForTaskArea = function () {
18346
- this.taskArea.style.width = this.getTaskAreaWidth() + "px";
18347
- this.taskArea.style.height = this.getTaskAreaHeight() + "px";
18348
- };
18349
- TaskAreaRender.prototype.getTaskAreaWidth = function () {
18350
- return this.gridLayoutCalculator.getTotalWidth();
18351
- };
18352
- TaskAreaRender.prototype.getTaskAreaHeight = function () {
18353
- return this.gridLayoutCalculator.getVerticalGridLineHeight();
18367
+ TaskAreaRender.prototype.setSizeForTaskArea = function (width, height) {
18368
+ this.taskArea.style.width = width + "px";
18369
+ this.taskArea.style.height = height + "px";
18354
18370
  };
18355
18371
  TaskAreaRender.prototype.createHighlightRowElement = function (index) {
18356
18372
  var hlRowInfo = this.gridLayoutCalculator.getHighlightRowInfo(index);
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt.min)
3
- * Version: 4.0.8
4
- * Build date: Fri Feb 04 2022
3
+ * Version: 4.0.9
4
+ * Build date: Tue Feb 08 2022
5
5
  *
6
6
  * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs