@sapui5/sap.gantt 1.125.0 → 1.126.0

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.
Files changed (191) hide show
  1. package/package.json +1 -1
  2. package/src/sap/gantt/.library +6 -1
  3. package/src/sap/gantt/AdhocLine.js +1 -1
  4. package/src/sap/gantt/GanttChart.js +1 -1
  5. package/src/sap/gantt/GanttChartBase.js +1 -1
  6. package/src/sap/gantt/GanttChartContainer.js +1 -1
  7. package/src/sap/gantt/GanttChartWithTable.js +1 -1
  8. package/src/sap/gantt/axistime/AxisTimeStrategyBase.js +58 -8
  9. package/src/sap/gantt/axistime/FullScreenStrategy.js +1 -1
  10. package/src/sap/gantt/axistime/ProportionZoomStrategy.js +1 -1
  11. package/src/sap/gantt/axistime/StepwiseZoomStrategy.js +10 -4
  12. package/src/sap/gantt/changeHandlers/simple/AdhocLine.js +1 -1
  13. package/src/sap/gantt/changeHandlers/simple/DeltaLine.js +1 -1
  14. package/src/sap/gantt/changeHandlers/simple/GanttChartContainer.js +1 -1
  15. package/src/sap/gantt/changeHandlers/simple/GanttChartWithTable.js +1 -1
  16. package/src/sap/gantt/config/BirdEyeGroup.js +1 -1
  17. package/src/sap/gantt/config/ChartScheme.js +1 -1
  18. package/src/sap/gantt/config/ColumnAttribute.js +1 -1
  19. package/src/sap/gantt/config/ContainerLayout.js +1 -1
  20. package/src/sap/gantt/config/ExpandChart.js +1 -1
  21. package/src/sap/gantt/config/ExpandChartGroup.js +1 -1
  22. package/src/sap/gantt/config/GanttChartLayout.js +1 -1
  23. package/src/sap/gantt/config/Hierarchy.js +1 -1
  24. package/src/sap/gantt/config/HierarchyColumn.js +1 -1
  25. package/src/sap/gantt/config/LayoutGroup.js +1 -1
  26. package/src/sap/gantt/config/Locale.js +1 -1
  27. package/src/sap/gantt/config/Mode.js +1 -1
  28. package/src/sap/gantt/config/ModeGroup.js +1 -1
  29. package/src/sap/gantt/config/ObjectType.js +1 -1
  30. package/src/sap/gantt/config/SettingGroup.js +1 -1
  31. package/src/sap/gantt/config/SettingItem.js +1 -1
  32. package/src/sap/gantt/config/Shape.js +1 -1
  33. package/src/sap/gantt/config/TimeAxis.js +1 -1
  34. package/src/sap/gantt/config/TimeHorizon.js +1 -1
  35. package/src/sap/gantt/config/TimeZoomGroup.js +1 -1
  36. package/src/sap/gantt/config/ToolbarGroup.js +1 -1
  37. package/src/sap/gantt/config/ToolbarScheme.js +1 -1
  38. package/src/sap/gantt/control/Cell.js +1 -1
  39. package/src/sap/gantt/def/DefBase.js +1 -1
  40. package/src/sap/gantt/def/SvgDefs.js +1 -1
  41. package/src/sap/gantt/def/cal/Calendar.js +1 -1
  42. package/src/sap/gantt/def/cal/CalendarDefs.js +1 -1
  43. package/src/sap/gantt/def/cal/TimeInterval.js +1 -1
  44. package/src/sap/gantt/def/filter/MorphologyFilter.js +1 -1
  45. package/src/sap/gantt/def/gradient/LinearGradient.js +1 -1
  46. package/src/sap/gantt/def/gradient/RadialGradient.js +1 -1
  47. package/src/sap/gantt/def/gradient/Stop.js +1 -1
  48. package/src/sap/gantt/def/pattern/BackSlashPattern.js +1 -1
  49. package/src/sap/gantt/def/pattern/PatternBase.js +1 -1
  50. package/src/sap/gantt/def/pattern/SlashPattern.js +1 -1
  51. package/src/sap/gantt/drawer/Drawer.js +1 -1
  52. package/src/sap/gantt/eventHandler/AutoScrollHandler.js +1 -1
  53. package/src/sap/gantt/eventHandler/BirdEyeHandler.js +1 -1
  54. package/src/sap/gantt/eventHandler/MouseWheelHandler.js +1 -1
  55. package/src/sap/gantt/eventHandler/ShapeHoverHandler.js +1 -1
  56. package/src/sap/gantt/eventHandler/ShapeResizeHandler.js +1 -1
  57. package/src/sap/gantt/eventHandler/TimePeriodZoomHandler.js +1 -1
  58. package/src/sap/gantt/eventHandler/TimePopoverHandler.js +1 -1
  59. package/src/sap/gantt/layouts/SidePanel.js +1 -1
  60. package/src/sap/gantt/legend/DimensionLegend.js +1 -1
  61. package/src/sap/gantt/legend/LegendBase.js +1 -1
  62. package/src/sap/gantt/legend/LegendContainer.js +1 -1
  63. package/src/sap/gantt/legend/ListLegend.js +1 -1
  64. package/src/sap/gantt/library.js +13 -3
  65. package/src/sap/gantt/messagebundle_sh.properties +30 -30
  66. package/src/sap/gantt/misc/AxisTime.js +80 -22
  67. package/src/sap/gantt/misc/Memoizer.js +1 -1
  68. package/src/sap/gantt/misc/RelativeTimeFormatter.js +1 -1
  69. package/src/sap/gantt/misc/ShapeManager.js +1 -1
  70. package/src/sap/gantt/overlays/GanttRowOverlay.js +80 -16
  71. package/src/sap/gantt/overlays/Overlay.js +1 -1
  72. package/src/sap/gantt/polyfills/lib.js +1 -1
  73. package/src/sap/gantt/polyfills/time.js +7 -7
  74. package/src/sap/gantt/polyfills/{time-utils → timeUtils}/dayCount.js +1 -1
  75. package/src/sap/gantt/shape/Circle.js +1 -1
  76. package/src/sap/gantt/shape/ClipPath.js +1 -1
  77. package/src/sap/gantt/shape/Definitions.js +1 -1
  78. package/src/sap/gantt/shape/Group.js +1 -1
  79. package/src/sap/gantt/shape/Image.js +1 -1
  80. package/src/sap/gantt/shape/Line.js +1 -1
  81. package/src/sap/gantt/shape/Path.js +1 -1
  82. package/src/sap/gantt/shape/Polygon.js +1 -1
  83. package/src/sap/gantt/shape/Polyline.js +1 -1
  84. package/src/sap/gantt/shape/Rectangle.js +1 -1
  85. package/src/sap/gantt/shape/ResizeShadowShape.js +1 -1
  86. package/src/sap/gantt/shape/SelectedShape.js +1 -1
  87. package/src/sap/gantt/shape/Shape.js +1 -1
  88. package/src/sap/gantt/shape/Text.js +1 -1
  89. package/src/sap/gantt/shape/cal/Calendar.js +1 -1
  90. package/src/sap/gantt/shape/ext/Chevron.js +1 -1
  91. package/src/sap/gantt/shape/ext/Cursor.js +1 -1
  92. package/src/sap/gantt/shape/ext/Diamond.js +1 -1
  93. package/src/sap/gantt/shape/ext/Iconfont.js +1 -1
  94. package/src/sap/gantt/shape/ext/Pentangle.js +1 -1
  95. package/src/sap/gantt/shape/ext/TextRepeat.js +1 -1
  96. package/src/sap/gantt/shape/ext/Triangle.js +1 -1
  97. package/src/sap/gantt/shape/ext/rls/Relationship.js +1 -1
  98. package/src/sap/gantt/shape/ext/rls/SelectedRelationship.js +2 -2
  99. package/src/sap/gantt/shape/ext/ubc/UbcBorderPath.js +1 -1
  100. package/src/sap/gantt/shape/ext/ubc/UbcOverCapacityZonePolygon.js +1 -1
  101. package/src/sap/gantt/shape/ext/ubc/UbcPolygon.js +1 -1
  102. package/src/sap/gantt/shape/ext/ubc/UbcShortageCapacityPolygon.js +1 -1
  103. package/src/sap/gantt/shape/ext/ubc/UbcTooltipRectangle.js +1 -1
  104. package/src/sap/gantt/shape/ext/ubc/UbcUnderCapacityZonePolygon.js +1 -1
  105. package/src/sap/gantt/shape/ext/ubc/UbcUsedPolygon.js +1 -1
  106. package/src/sap/gantt/shape/ext/ubc/UtilizationBarChart.js +1 -1
  107. package/src/sap/gantt/shape/ext/ulc/UlcBorderPath.js +1 -1
  108. package/src/sap/gantt/shape/ext/ulc/UlcClipPath.js +1 -1
  109. package/src/sap/gantt/shape/ext/ulc/UlcClipingPath.js +1 -1
  110. package/src/sap/gantt/shape/ext/ulc/UlcDimension.js +1 -1
  111. package/src/sap/gantt/shape/ext/ulc/UlcMiddleLine.js +1 -1
  112. package/src/sap/gantt/shape/ext/ulc/UlcOverCapacityZoneRectangle.js +1 -1
  113. package/src/sap/gantt/shape/ext/ulc/UlcOverClipRectangle.js +1 -1
  114. package/src/sap/gantt/shape/ext/ulc/UlcRectangle.js +1 -1
  115. package/src/sap/gantt/shape/ext/ulc/UlcTooltipRectangle.js +1 -1
  116. package/src/sap/gantt/shape/ext/ulc/UlcUnderClipRectangle.js +1 -1
  117. package/src/sap/gantt/shape/ext/ulc/UtilizationLineChart.js +1 -1
  118. package/src/sap/gantt/simple/AdhocDiamond.js +1 -1
  119. package/src/sap/gantt/simple/AdhocLine.js +1 -1
  120. package/src/sap/gantt/simple/AggregationUtils.js +11 -58
  121. package/src/sap/gantt/simple/BaseCalendar.js +1 -1
  122. package/src/sap/gantt/simple/BaseChevron.js +1 -1
  123. package/src/sap/gantt/simple/BaseConditionalShape.js +1 -1
  124. package/src/sap/gantt/simple/BaseCursor.js +1 -1
  125. package/src/sap/gantt/simple/BaseDeltaRectangle.js +4 -1
  126. package/src/sap/gantt/simple/BaseDiamond.js +1 -1
  127. package/src/sap/gantt/simple/BaseGroup.js +1 -1
  128. package/src/sap/gantt/simple/BaseImage.js +1 -1
  129. package/src/sap/gantt/simple/BaseLine.js +1 -1
  130. package/src/sap/gantt/simple/BasePath.js +1 -1
  131. package/src/sap/gantt/simple/BasePseudoShape.js +1 -1
  132. package/src/sap/gantt/simple/BaseRectangle.js +4 -1
  133. package/src/sap/gantt/simple/BaseShape.js +1 -1
  134. package/src/sap/gantt/simple/BaseText.js +1 -1
  135. package/src/sap/gantt/simple/BaseTriangle.js +1 -1
  136. package/src/sap/gantt/simple/ContainerToolbar.js +13 -4
  137. package/src/sap/gantt/simple/ContainerToolbarPlaceholder.js +1 -1
  138. package/src/sap/gantt/simple/CoordinateUtils.js +1 -1
  139. package/src/sap/gantt/simple/CustomVariantHandler.js +1 -1
  140. package/src/sap/gantt/simple/DeltaLine.js +1 -1
  141. package/src/sap/gantt/simple/ExpandModel.js +1 -3
  142. package/src/sap/gantt/simple/GanttAdaptationData.js +1 -1
  143. package/src/sap/gantt/simple/GanttChartContainer.js +8 -2
  144. package/src/sap/gantt/simple/GanttChartWithTable.js +36 -2
  145. package/src/sap/gantt/simple/GanttDragDropExtension.js +8 -1
  146. package/src/sap/gantt/simple/GanttExtension.js +1 -1
  147. package/src/sap/gantt/simple/GanttHeader.js +1 -1
  148. package/src/sap/gantt/simple/GanttPointerExtension.js +1 -1
  149. package/src/sap/gantt/simple/GanttPopoverExtension.js +1 -1
  150. package/src/sap/gantt/simple/GanttPrinting.js +3 -2
  151. package/src/sap/gantt/simple/GanttRowAction.js +1 -1
  152. package/src/sap/gantt/simple/GanttRowSettings.js +30 -1
  153. package/src/sap/gantt/simple/GanttScrollExtension.js +19 -4
  154. package/src/sap/gantt/simple/GanttUtils.js +85 -0
  155. package/src/sap/gantt/simple/InnerGanttChart.js +1 -1
  156. package/src/sap/gantt/simple/LegendContainer.js +1 -1
  157. package/src/sap/gantt/simple/LegendShapeGroup.js +1 -1
  158. package/src/sap/gantt/simple/MultiActivityGroup.js +1 -1
  159. package/src/sap/gantt/simple/MultiActivityRowSettings.js +1 -1
  160. package/src/sap/gantt/simple/Relationship.js +1 -1
  161. package/src/sap/gantt/simple/ShapeScheme.js +1 -1
  162. package/src/sap/gantt/simple/StockChart.js +1 -1
  163. package/src/sap/gantt/simple/StockChartDimension.js +1 -1
  164. package/src/sap/gantt/simple/StockChartPeriod.js +1 -1
  165. package/src/sap/gantt/simple/UtilizationBarChart.js +1 -1
  166. package/src/sap/gantt/simple/UtilizationChart.js +4 -1
  167. package/src/sap/gantt/simple/UtilizationDimension.js +1 -1
  168. package/src/sap/gantt/simple/UtilizationLineChart.js +1 -1
  169. package/src/sap/gantt/simple/UtilizationPeriod.js +1 -1
  170. package/src/sap/gantt/simple/shapes/Shape.js +1 -1
  171. package/src/sap/gantt/simple/shapes/Task.js +1 -1
  172. package/src/sap/gantt/skipTime/DayInterval.js +63 -0
  173. package/src/sap/gantt/skipTime/DiscontinuousProvider.js +48 -0
  174. package/src/sap/gantt/skipTime/SkipInterval.js +76 -0
  175. package/src/sap/gantt/skipTime/SkipPattern.js +64 -0
  176. package/src/sap/gantt/skipTime/WeekPattern.js +118 -0
  177. package/src/sap/gantt/skipTime/WeeklyDiscontinuousProvider.js +78 -0
  178. package/src/sap/gantt/themes/sap_hcb/base_Gantt.less +899 -0
  179. package/src/sap/gantt/themes/sap_hcb/base_GanttPrinting.less +101 -0
  180. package/src/sap/gantt/themes/sap_hcb/base_GanttSyncedControl.less +96 -0
  181. package/src/sap/gantt/themes/sap_hcb/library.source.less +15 -1
  182. package/src/sap/gantt/thirdparty/d3fc-discontinuous-scale.js +1129 -0
  183. package/src/sap/gantt/thirdparty/d3fc-rebind.js +103 -0
  184. package/src/sap/gantt/thirdparty/licenses/d3fc-MIT-LICENSE.txt +21 -0
  185. /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/day.js +0 -0
  186. /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/days.js +0 -0
  187. /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/interval.js +0 -0
  188. /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/millisecond.js +0 -0
  189. /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/monday.js +0 -0
  190. /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/saturday.js +0 -0
  191. /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/weeks.js +0 -0
@@ -19,7 +19,7 @@ sap.ui.define(["./BaseRectangle", "./BasePath", "sap/gantt/misc/Utility", "sap/g
19
19
  * @extends sap.gantt.simple.BaseRectangle
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.125.0
22
+ * @version 1.126.0
23
23
  *
24
24
  * @constructor
25
25
  * @public
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @extends sap.gantt.simple.BaseShape
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.125.0
24
+ * @version 1.126.0
25
25
  *
26
26
  * @constructor
27
27
  * @public
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @extends sap.gantt.simple.BaseText
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.125.0
24
+ * @version 1.126.0
25
25
  *
26
26
  * @constructor
27
27
  * @public
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @extends sap.gantt.simple.BaseShape
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.125.0
24
+ * @version 1.126.0
25
25
  *
26
26
  * @constructor
27
27
  * @public
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @extends sap.gantt.simple.BaseShape
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.125.0
24
+ * @version 1.126.0
25
25
  *
26
26
  * @constructor
27
27
  * @public
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @extends sap.gantt.simple.MultiActivityGroup
31
31
  *
32
32
  * @author SAP SE
33
- * @version 1.125.0
33
+ * @version 1.126.0
34
34
  * @since 1.109
35
35
  *
36
36
  * @constructor
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @extends sap.gantt.simple.BaseShape
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.125.0
26
+ * @version 1.126.0
27
27
  *
28
28
  * @constructor
29
29
  * @public
@@ -144,6 +144,9 @@ sap.ui.define([
144
144
  iStartTime = this.getTime().valueOf();
145
145
  iEndTime = this.getEndTime().valueOf();
146
146
  iTimeDiff = iEndTime - iStartTime;
147
+ if (oAxisTime.discontinuityProvider) { // when skip time pattern is applied, use distance method to calculate time difference
148
+ iTimeDiff = oAxisTime._discontinuityProviderInstance.distance(this.getTime(), this.getEndTime());
149
+ }
147
150
  iZoomRate = oAxisTime.getZoomRate();
148
151
  viewOffset = oAxisTime.getViewOffset();
149
152
  viewRange = oAxisTime.getViewRange()[1];
@@ -55,7 +55,7 @@ sap.ui.define([
55
55
  * @extends sap.ui.core.Element
56
56
  *
57
57
  * @author SAP SE
58
- * @version 1.125.0
58
+ * @version 1.126.0
59
59
  *
60
60
  * @abstract
61
61
  * @constructor
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @extends sap.gantt.simple.BaseShape
37
37
  *
38
38
  * @author SAP SE
39
- * @version 1.125.0
39
+ * @version 1.126.0
40
40
  *
41
41
  * @constructor
42
42
  * @public
@@ -14,7 +14,7 @@ sap.ui.define(
14
14
  * @extends sap.gantt.simple.BaseRectangle
15
15
  *
16
16
  * @author SAP SE
17
- * @version 1.125.0
17
+ * @version 1.126.0
18
18
  * @since 1.84
19
19
  *
20
20
  * @constructor
@@ -26,7 +26,8 @@ sap.ui.define([
26
26
  "./FindAndSelectUtils",
27
27
  'sap/ui/core/InvisibleText',
28
28
  "sap/ui/core/Element",
29
- "sap/ui/core/Lib"
29
+ "sap/ui/core/Lib",
30
+ "./GanttUtils"
30
31
  ], function (
31
32
  Core,
32
33
  library,
@@ -55,7 +56,8 @@ sap.ui.define([
55
56
  FindAndSelectUtils,
56
57
  InvisibleText,
57
58
  Element,
58
- Lib
59
+ Lib,
60
+ GanttUtils
59
61
  ) {
60
62
  "use strict";
61
63
 
@@ -81,7 +83,7 @@ sap.ui.define([
81
83
  * @extends sap.m.OverflowToolbar
82
84
  *
83
85
  * @author SAP SE
84
- * @version 1.125.0
86
+ * @version 1.126.0
85
87
  *
86
88
  * @constructor
87
89
  * @public
@@ -695,6 +697,13 @@ sap.ui.define([
695
697
  return aSelectItems;
696
698
  };
697
699
 
700
+ ContainerToolbar.prototype._focusOnZoom = function(iCurrentZoomLevel, iZoomLevel) {
701
+ var oGanttContainer = this.getParent();
702
+ if (oGanttContainer && oGanttContainer.isA("sap.gantt.simple.GanttChartContainer") && oGanttContainer.getEnableAutoFocusOnZoom() && iCurrentZoomLevel < iZoomLevel) {
703
+ GanttUtils._calculateSelectedShapeMinTime(oGanttContainer);
704
+ }
705
+ };
706
+
698
707
  ContainerToolbar.prototype._genTimeZoomGroupControls = function() {
699
708
  var ZoomControlType = library.config.ZoomControlType;
700
709
 
@@ -703,7 +712,7 @@ sap.ui.define([
703
712
  var fnUpdateZoomLevel = function(iZoomLevel) {
704
713
  clearTimeout(this._iLiveChangeTimer);
705
714
  this._iLiveChangeTimer = -1;
706
-
715
+ this._focusOnZoom(this.getZoomLevel(), iZoomLevel);
707
716
  this.setZoomLevel(iZoomLevel, true);
708
717
  };
709
718
 
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.ui.core.Control
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.125.0
30
+ * @version 1.126.0
31
31
  * @since 1.66.0
32
32
  *
33
33
  * @constructor
@@ -17,7 +17,7 @@ sap.ui.define(['sap/ui/thirdparty/jquery', "sap/ui/Device"], function(jQuery, De
17
17
  * @class Utility functionality to work with SVG coordination, e.g. find x position of cursor
18
18
  *
19
19
  * @author SAP SE
20
- * @version 1.125.0
20
+ * @version 1.126.0
21
21
  *
22
22
  * @private
23
23
  * @static
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  * @extends sap.ui.core.Element
16
16
  *
17
17
  * @author SAP SE
18
- * @version 1.125.0
18
+ * @version 1.126.0
19
19
  *
20
20
  * @constructor
21
21
  * @public
@@ -25,7 +25,7 @@ sap.ui.define(
25
25
  * @extends sap.ui.core.Element
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.125.0
28
+ * @version 1.126.0
29
29
  * @since 1.84
30
30
  *
31
31
  * @constructor
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.gantt.simple.ExpandModel
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.125.0
29
+ * @version 1.126.0
30
30
  *
31
31
  * @constructor
32
32
  * @private
@@ -69,8 +69,6 @@ sap.ui.define([
69
69
 
70
70
  var oRowSettings = GanttUtils.getSelectedTableRowSettings(oTable, iSelectedIndex),overlayAggList;
71
71
  if (oRowSettings){
72
- //add expand or staticOverlay aggreagtion shapes
73
- AggregationUtils._addExpandStaticOverlay(oRowSettings,bExpanded,oGantt);
74
72
  //fetch overlay aggreagtion shapes
75
73
  overlayAggList = AggregationUtils._fetchOverlayAggregation(oRowSettings,false, "", aShapeSchemeKeys);
76
74
  }
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  * @extend sap.ui.core.CustomData
16
16
  *
17
17
  * @author SAP SE
18
- * @version 1.125.0
18
+ * @version 1.126.0
19
19
  * @since 1.90
20
20
  *
21
21
  * @constructor
@@ -52,7 +52,7 @@ sap.ui.define([
52
52
  * @extends sap.ui.core.Control
53
53
  *
54
54
  * @author SAP SE
55
- * @version 1.125.0
55
+ * @version 1.126.0
56
56
  *
57
57
  * @constructor
58
58
  * @public
@@ -203,7 +203,13 @@ sap.ui.define([
203
203
  * This property enables the auto selection of a shape upon search and find.
204
204
  * @experimental since 1.111
205
205
  */
206
- enableAutoSelectOnFind: { type: "boolean", defaultValue: true}
206
+ enableAutoSelectOnFind: { type: "boolean", defaultValue: true},
207
+
208
+ /**
209
+ * This property enables auto focus while zooming in on a selected shape.
210
+ * @since 1.126
211
+ */
212
+ enableAutoFocusOnZoom: { type: "boolean", defaultValue: false}
207
213
  },
208
214
  defaultAggregation : "ganttCharts",
209
215
  aggregations: {
@@ -170,7 +170,7 @@ sap.ui.define([
170
170
  * @extend sap.ui.core.Control
171
171
  *
172
172
  * @author SAP SE
173
- * @version 1.125.0
173
+ * @version 1.126.0
174
174
  * @since 1.60
175
175
  *
176
176
  * @constructor
@@ -3184,7 +3184,7 @@ sap.ui.define([
3184
3184
  var oPrevTimelineOptionInterval = oAxisTimeStrategy._oZoom.base.timeLineOption.innerInterval,
3185
3185
  oCurrentTimelineOptionInterval = oAxisTimeStrategy.getTimeLineOption().innerInterval;
3186
3186
  var bChangeInInterval = (oPrevTimelineOptionInterval.unit != oCurrentTimelineOptionInterval.unit ||
3187
- oPrevTimelineOptionInterval.range != oCurrentTimelineOptionInterval.range ||
3187
+ oAxisTimeStrategy._getTimeLineRange(oAxisTimeStrategy._oZoom.base.timeLineOption) != oAxisTimeStrategy._getTimeLineRange(oAxisTimeStrategy.getTimeLineOption()) ||
3188
3188
  oPrevTimelineOptionInterval.span != oCurrentTimelineOptionInterval.span) && sReasonCode != "horizontalScroll" && sReasonCode != "jumpToPosition" && sReasonCode != "syncVisibleHorizon";
3189
3189
  if (sReasonCode === "initialRender" || bChangeInInterval ){
3190
3190
  if (!oAxisTimeStrategy.isA("sap.gantt.axistime.StepwiseZoomStrategy")) {
@@ -3872,6 +3872,7 @@ sap.ui.define([
3872
3872
 
3873
3873
  var oPrimaryScheme = this.getPrimaryShapeScheme();
3874
3874
 
3875
+ this._syncRowExpandState(vRowIndex, bExpanded, bPseudoShapeExpand);
3875
3876
  this._bExpandToggled = this._oExpandModel.isTableRowHeightNeedChange(bExpanded, this.getTable(), aIndices, oPrimaryScheme, aExpandScheme);
3876
3877
  if (this._bExpandToggled) {
3877
3878
  if (this.getEnablePseudoShapes()){
@@ -3879,6 +3880,8 @@ sap.ui.define([
3879
3880
  }
3880
3881
  this._createInnerGanttRenderPromise();
3881
3882
  this.getTable().invalidate();
3883
+ } else {
3884
+ this._syncRowExpandState(vRowIndex, !bExpanded, bPseudoShapeExpand);
3882
3885
  }
3883
3886
  };
3884
3887
 
@@ -4593,6 +4596,37 @@ sap.ui.define([
4593
4596
  }
4594
4597
  };
4595
4598
 
4599
+ /**
4600
+ * sync the row expand state with the row settings
4601
+ * @param {number} vRowIndex row indices
4602
+ * @param {boolean} bExpanded whether is to expand or not
4603
+ * @param {boolean} bPseudoShapeExpand whether pseudo shape is enabled or not
4604
+ * @private
4605
+ */
4606
+ GanttChartWithTable.prototype._syncRowExpandState = function(vRowIndex, bExpanded, bPseudoShapeExpand) {
4607
+ var aRows = this.getTable().getRows(), aRowIndices = [];
4608
+
4609
+ if (typeof vRowIndex === "number") {
4610
+ aRowIndices = [vRowIndex];
4611
+ } else if (Array.isArray(vRowIndex)) {
4612
+ aRowIndices = vRowIndex;
4613
+ }
4614
+
4615
+ const iStartIndex = aRows[0].getIndex();
4616
+
4617
+ for (const iIndex of aRowIndices) {
4618
+ var oRow = aRows[iIndex - iStartIndex];
4619
+ var oRowSettings = oRow && oRow.getAggregation("_settings");
4620
+
4621
+ if (oRowSettings) {
4622
+ oRowSettings._onRowExpandToggle({
4623
+ expanded: bExpanded,
4624
+ pseudoShapeExpand: bPseudoShapeExpand
4625
+ });
4626
+ }
4627
+ }
4628
+ };
4629
+
4596
4630
  return GanttChartWithTable;
4597
4631
 
4598
4632
  }, true);
@@ -100,7 +100,7 @@ sap.ui.define([
100
100
  *
101
101
  * @extends sap.gantt.simple.GanttExtension
102
102
  * @author SAP SE
103
- * @version 1.125.0
103
+ * @version 1.126.0
104
104
  * @constructor
105
105
  * @private
106
106
  * @alias sap.gantt.simple.GanttExtension
@@ -353,6 +353,10 @@ sap.ui.define([
353
353
  endTime: oDraggedShape.getEndTime()
354
354
  };
355
355
 
356
+ if (this.oSourceRow) {
357
+ this.oSourceRow.destroy();
358
+ }
359
+
356
360
  //Set SourceRow = Row instance from where the shape is dragged
357
361
  this.oSourceRow = this.getRowByShape(oDraggedShape);
358
362
 
@@ -373,6 +377,9 @@ sap.ui.define([
373
377
  this._bEnableRowHighlight = oDraggedShape.getDragHighlightRows().length > 0 && !this.bMultipleGhosts;
374
378
 
375
379
  DragDropHelper.addDragDropEventListeners(this.getGantt());
380
+ } else if (this.oSourceRow) {
381
+ this.oSourceRow.destroy();
382
+ this.oSourceRow = undefined;
376
383
  }
377
384
  };
378
385
 
@@ -18,7 +18,7 @@ sap.ui.define([ "sap/ui/base/Object" ],function(BaseObject) {
18
18
  * @abstract
19
19
  * @extends sap.ui.base.Object
20
20
  * @author SAP SE
21
- * @version 1.125.0
21
+ * @version 1.126.0
22
22
  * @constructor
23
23
  * @private
24
24
  * @alias sap.gantt.simple.GanttExtension
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  * @extend sap.ui.core.Element
36
36
  *
37
37
  * @author SAP SE
38
- * @version 1.125.0
38
+ * @version 1.126.0
39
39
  *
40
40
  * @constructor
41
41
  * @private
@@ -240,7 +240,7 @@ sap.ui.define([
240
240
  *
241
241
  * @extends sap.gantt.simple.GanttExtension
242
242
  * @author SAP SE
243
- * @version 1.125.0
243
+ * @version 1.126.0
244
244
  * @constructor
245
245
  * @private
246
246
  * @alias sap.gantt.simple.GanttPointerExtension
@@ -83,7 +83,7 @@ function(
83
83
  *
84
84
  * @extends sap.gantt.simple.GanttExtension
85
85
  * @author SAP SE
86
- * @version 1.125.0
86
+ * @version 1.126.0
87
87
  * @constructor
88
88
  * @private
89
89
  * @alias sap.gantt.simple.GanttPopoverExtension
@@ -158,7 +158,7 @@ sap.ui.define([
158
158
  * @extend sap.ui.core.Element
159
159
  *
160
160
  * @author SAP SE
161
- * @version 1.125.0
161
+ * @version 1.126.0
162
162
  * @since 1.66
163
163
  *
164
164
  * @constructor
@@ -2670,7 +2670,8 @@ sap.ui.define([
2670
2670
  }
2671
2671
 
2672
2672
  var oGanttChartSvg = this._oDomToPrint[counter].getElementsByClassName("sapGanttChartSvg")[0].cloneNode(true);
2673
- var oGanttChartSvgDef = this._oDomToPrint[counter].getElementsByClassName("sapGanttChartSvgDefs")[0].cloneNode(true);
2673
+ var oSvgDefs = this._getOriginalGanttChart().getDomRef() ? this._getOriginalGanttChart().getDomRef().getElementsByClassName("sapGanttChartSvgDefs") : null;
2674
+ var oGanttChartSvgDef = (oSvgDefs && oSvgDefs.length > 0) ? oSvgDefs[0].cloneNode(true) : null;
2674
2675
 
2675
2676
  //Redrawing the vertical lines
2676
2677
  if (oGanttChartSvg.getElementsByClassName("sapGanttChartVerticalLine") && oGanttChartSvg.getElementsByClassName("sapGanttChartVerticalLine").length) {
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.ui.table.RowAction
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.125.0
30
+ * @version 1.126.0
31
31
  *
32
32
  * @constructor
33
33
  * @experimental
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.ui.table.RowSettings
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.125.0
30
+ * @version 1.126.0
31
31
  *
32
32
  * @constructor
33
33
  * @public
@@ -286,5 +286,34 @@ sap.ui.define([
286
286
  return this;
287
287
  };
288
288
 
289
+ GanttRowSettings.prototype._onRowExpandToggle = function(oExpandInfo) {
290
+ if (!oExpandInfo) {
291
+ return;
292
+ }
293
+
294
+ if (this._oRowExpandInfo && (this._oRowExpandInfo.expanded === oExpandInfo.expanded && this._oRowExpandInfo.pseudoShapeExpand === oExpandInfo.pseudoShapeExpand)) {
295
+ return;
296
+ }
297
+
298
+ this._oRowExpandInfo = oExpandInfo;
299
+
300
+ if (this._isExpanded()) {
301
+ this._handleEvent(new jQuery.Event("RowExpanded"));
302
+ } else {
303
+ this._handleEvent(new jQuery.Event("RowCollapsed"));
304
+ }
305
+ };
306
+
307
+ GanttRowSettings.prototype._isExpanded = function() {
308
+ return this._oRowExpandInfo && (this._oRowExpandInfo.expanded && !this._oRowExpandInfo.pseudoShapeExpand);
309
+ };
310
+
311
+ GanttRowSettings.prototype.clone = function () {
312
+ var oClone = TableRowSettings.prototype.clone.call(this);
313
+ oClone._oRowExpandInfo = this._oRowExpandInfo;
314
+
315
+ return oClone;
316
+ };
317
+
289
318
  return GanttRowSettings;
290
319
  });
@@ -467,11 +467,11 @@ sap.ui.define([
467
467
  // usually the visible horizon or zoom rate changed
468
468
  this.updateGanttScrollWidth();
469
469
  }
470
-
470
+ var oGantt = this.getGantt();
471
471
  if (!bToolbarSettingsItemChanged && sReasonCode !== "initialRender" && this.mOffsetWidth && this.doesSvgScrollWithinBuffer() && !this.getGantt().getSyncedControl().getRowsHeightChanged()) {
472
472
  this._scrollTableToVisibleHorizon(true);
473
473
  this.scrollGanttChartToVisibleHorizon();
474
- this.getGantt().getSyncedControl().scrollContentIfNecessary();
474
+ oGantt.getSyncedControl().scrollContentIfNecessary();
475
475
  return false;
476
476
  }
477
477
 
@@ -482,10 +482,25 @@ sap.ui.define([
482
482
  this.updateSvgOffsetWidth();
483
483
 
484
484
  if ((sReasonCode !== "initialRender" || (sReasonCode === "initialRender" && bToolbarSettingsItemChanged)) && fnRedrawGanttChart) {
485
- fnRedrawGanttChart.apply(this.getGantt());
485
+ fnRedrawGanttChart.apply(oGantt);
486
486
  // It has to be called after fnRedrawGanttChart because of svg width is set over there.
487
487
  this.scrollGanttChartToVisibleHorizon();
488
- this.getGantt().getSyncedControl().scrollContentIfNecessary();
488
+ oGantt.getSyncedControl().scrollContentIfNecessary();
489
+ }
490
+ if (oGantt._minTime && oGantt._minEndTime) {
491
+ var iMinTime = oGantt._minTime.getTime();
492
+ var iMinEndTime = oGantt._minEndTime.getTime();
493
+ delete oGantt._minTime;
494
+ delete oGantt._minEndTime;
495
+ var oVisibleHorizon = oGantt.getAxisTimeStrategy().getVisibleHorizon();
496
+ var iVisibleHorizonStartTime = Format.abapTimestampToDate(oVisibleHorizon.getStartTime()).getTime();
497
+ var iVisibleHorizonEndTime = Format.abapTimestampToDate(oVisibleHorizon.getEndTime()).getTime();
498
+ if ((iMinEndTime <= iVisibleHorizonStartTime) || (iMinTime >= iVisibleHorizonEndTime)) {
499
+ var nVisibleWidth = oGantt.getVisibleWidth();
500
+ var timeRangePerPixel = (iVisibleHorizonEndTime - iVisibleHorizonStartTime) / nVisibleWidth;
501
+ var oMinTime = new Date(iMinTime - timeRangePerPixel * 5); // buffer of 5px before the start time, similar to bird eye
502
+ oGantt.jumpToPosition(oMinTime);
503
+ }
489
504
  }
490
505
 
491
506
  return true;
@@ -1335,6 +1335,91 @@ sap.ui.define([
1335
1335
  return sText ? sText.length : 0;
1336
1336
  }
1337
1337
  return (nCount >= 0 && nCount <= sText.length) ? nCount : 0;
1338
+ },
1339
+
1340
+ /**
1341
+ * Calculates the selected shape with minimum start time among all the gantt charts in gantt container
1342
+ * @param {object} oGanttContainer Gantt chart container control
1343
+ * @private
1344
+ */
1345
+ _calculateSelectedShapeMinTime: function(oGanttContainer) {
1346
+ var that = this;
1347
+ var _getShapeWithTime = function(oShape, oGantt) {
1348
+ if (!oShape || oShape.isA("sap.gantt.simple.Relationship")) {
1349
+ return;
1350
+ }
1351
+ if (oShape.isA("sap.gantt.simple.BaseConditionalShape")) {
1352
+ oShape = oShape._getActiveShapeElement();
1353
+ }
1354
+ if (oShape.getTime() || oShape.getEndTime()) {
1355
+ that._oFoundShape = oShape;
1356
+ } else if (oShape instanceof sap.gantt.simple.BaseGroup) {
1357
+ if (oGantt.getSelectOnlyGraphicalShape()) {
1358
+ oShape._eachChildOfGroup(oShape, function (labelGroup, nonLabelGroup) {
1359
+ nonLabelGroup.forEach(function(oChild) {
1360
+ if (!that._oFoundShape) {
1361
+ _getShapeWithTime(oChild, oGantt);
1362
+ }
1363
+ });
1364
+ });
1365
+ } else {
1366
+ oShape._eachChildOfGroup(oShape, function (oChild) {
1367
+ if (!that._oFoundShape) {
1368
+ _getShapeWithTime(oChild, oGantt);
1369
+ }
1370
+ });
1371
+ }
1372
+ }
1373
+ };
1374
+
1375
+ var oMinGantt, oOverallMinTime, oOverallMinEndTime;
1376
+ var bSync = oGanttContainer.getEnableTimeScrollSync();
1377
+ var aGanttCharts = oGanttContainer.getGanttCharts();
1378
+ var oGanttChart = aGanttCharts[0];
1379
+ if (oGanttChart) {
1380
+ oOverallMinTime = Format.abapTimestampToDate(oGanttChart.getAxisTimeStrategy().getTotalHorizon().getEndTime());
1381
+ }
1382
+ aGanttCharts.forEach(function (oGantt) {
1383
+ var oMinTime = Format.abapTimestampToDate(oGantt.getAxisTimeStrategy().getTotalHorizon().getEndTime()), oMinEndTime;
1384
+ var aSelectedShapeUid = oGantt.getSelectedShapeUid();
1385
+ if (aSelectedShapeUid && aSelectedShapeUid.length > 0) {
1386
+ var aShapes = this.getShapesWithUid(oGantt.sId, aSelectedShapeUid);
1387
+ var oVisibleHorizon = oGantt.getAxisTimeStrategy().getVisibleHorizon();
1388
+ var iVisibleHorizonStartTime = Format.abapTimestampToDate(oVisibleHorizon.getStartTime()).getTime();
1389
+ var iVisibleHorizonEndTime = Format.abapTimestampToDate(oVisibleHorizon.getEndTime()).getTime();
1390
+ aShapes.forEach(function(oShape) {
1391
+ this._oFoundShape = null;
1392
+ _getShapeWithTime(oShape, oGantt);
1393
+ if (this._oFoundShape) {
1394
+ var oStartTime = this._oFoundShape.getTime() ? this._oFoundShape.getTime() : this._oFoundShape.getEndTime();
1395
+ var oEndTime = this._oFoundShape.getEndTime() ? this._oFoundShape.getEndTime() : this._oFoundShape.getTime();
1396
+ var iStartTime = oStartTime.getTime();
1397
+ var iEndTime = oEndTime.getTime();
1398
+ var bShapeInVisibleHorizon = (iStartTime >= iVisibleHorizonStartTime && iStartTime < iVisibleHorizonEndTime) || (iEndTime > iVisibleHorizonStartTime && iEndTime <= iVisibleHorizonEndTime) || (iStartTime < iVisibleHorizonStartTime && iEndTime > iVisibleHorizonEndTime);
1399
+ if (bShapeInVisibleHorizon) {
1400
+ if (bSync) {
1401
+ if (iStartTime < oOverallMinTime.getTime()) {
1402
+ oOverallMinTime = oStartTime;
1403
+ oOverallMinEndTime = oEndTime;
1404
+ oMinGantt = oGantt;
1405
+ }
1406
+ } else if (iStartTime < oMinTime.getTime()) {
1407
+ oMinTime = oStartTime;
1408
+ oMinEndTime = oEndTime;
1409
+ }
1410
+ }
1411
+ }
1412
+ }.bind(this));
1413
+ }
1414
+ if (!bSync && oMinEndTime) {
1415
+ oGantt._minTime = oMinTime;
1416
+ oGantt._minEndTime = oMinEndTime;
1417
+ }
1418
+ }.bind(this));
1419
+ if (bSync && oMinGantt) {
1420
+ oMinGantt._minTime = oOverallMinTime;
1421
+ oMinGantt._minEndTime = oOverallMinEndTime;
1422
+ }
1338
1423
  }
1339
1424
  };
1340
1425
 
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @extend sap.ui.core.Control
40
40
  *
41
41
  * @author SAP SE
42
- * @version 1.125.0
42
+ * @version 1.126.0
43
43
  *
44
44
  * @constructor
45
45
  * @private
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @extends sap.ui.core.Control
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.125.0
36
+ * @version 1.126.0
37
37
  *
38
38
  * @constructor
39
39
  * @public
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @extends sap.gantt.simple.BaseShape
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.125.0
25
+ * @version 1.126.0
26
26
  * @since 1.84
27
27
  *
28
28
  * @constructor
@@ -19,7 +19,7 @@ sap.ui.define(["sap/gantt/simple/BaseGroup"], function (BaseGroup) {
19
19
  * @extends sap.gantt.simple.BaseGroup
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.125.0
22
+ * @version 1.126.0
23
23
  * @since 1.85
24
24
  *
25
25
  * @constructor
@@ -21,7 +21,7 @@
21
21
  * @extends sap.gantt.simple.GanttRowSettings
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.125.0
24
+ * @version 1.126.0
25
25
  * @since 1.85
26
26
  *
27
27
  * @constructor
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
  * @extends sap.gantt.simple.BasePath
51
51
  *
52
52
  * @author SAP SE
53
- * @version 1.125.0
53
+ * @version 1.126.0
54
54
  *
55
55
  * @constructor
56
56
  * @public