@sapui5/sap.gantt 1.125.0 → 1.127.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 (220) 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/FullScreenTimeLineOptions.js +7 -1
  11. package/src/sap/gantt/axistime/ProportionTimeLineOptions.js +7 -1
  12. package/src/sap/gantt/axistime/ProportionZoomStrategy.js +1 -1
  13. package/src/sap/gantt/axistime/StepwiseTimeLineOptions.js +7 -1
  14. package/src/sap/gantt/axistime/StepwiseZoomStrategy.js +10 -4
  15. package/src/sap/gantt/changeHandlers/simple/AdhocLine.js +1 -1
  16. package/src/sap/gantt/changeHandlers/simple/DeltaLine.js +1 -1
  17. package/src/sap/gantt/changeHandlers/simple/GanttChartContainer.js +1 -1
  18. package/src/sap/gantt/changeHandlers/simple/GanttChartWithTable.js +1 -1
  19. package/src/sap/gantt/config/BirdEyeGroup.js +1 -1
  20. package/src/sap/gantt/config/ChartScheme.js +1 -1
  21. package/src/sap/gantt/config/ColumnAttribute.js +1 -1
  22. package/src/sap/gantt/config/ContainerLayout.js +1 -1
  23. package/src/sap/gantt/config/ExpandChart.js +1 -1
  24. package/src/sap/gantt/config/ExpandChartGroup.js +1 -1
  25. package/src/sap/gantt/config/GanttChartLayout.js +1 -1
  26. package/src/sap/gantt/config/Hierarchy.js +1 -1
  27. package/src/sap/gantt/config/HierarchyColumn.js +1 -1
  28. package/src/sap/gantt/config/LayoutGroup.js +1 -1
  29. package/src/sap/gantt/config/Locale.js +1 -1
  30. package/src/sap/gantt/config/Mode.js +1 -1
  31. package/src/sap/gantt/config/ModeGroup.js +1 -1
  32. package/src/sap/gantt/config/ObjectType.js +1 -1
  33. package/src/sap/gantt/config/SettingGroup.js +1 -1
  34. package/src/sap/gantt/config/SettingItem.js +1 -1
  35. package/src/sap/gantt/config/Shape.js +1 -1
  36. package/src/sap/gantt/config/TimeAxis.js +1 -1
  37. package/src/sap/gantt/config/TimeHorizon.js +1 -1
  38. package/src/sap/gantt/config/TimeZoomGroup.js +1 -1
  39. package/src/sap/gantt/config/ToolbarGroup.js +1 -1
  40. package/src/sap/gantt/config/ToolbarScheme.js +1 -1
  41. package/src/sap/gantt/control/Cell.js +1 -1
  42. package/src/sap/gantt/def/DefBase.js +1 -1
  43. package/src/sap/gantt/def/SvgDefs.js +1 -1
  44. package/src/sap/gantt/def/cal/Calendar.js +1 -1
  45. package/src/sap/gantt/def/cal/CalendarDefs.js +1 -1
  46. package/src/sap/gantt/def/cal/TimeInterval.js +1 -1
  47. package/src/sap/gantt/def/filter/MorphologyFilter.js +1 -1
  48. package/src/sap/gantt/def/gradient/LinearGradient.js +1 -1
  49. package/src/sap/gantt/def/gradient/RadialGradient.js +1 -1
  50. package/src/sap/gantt/def/gradient/Stop.js +1 -1
  51. package/src/sap/gantt/def/pattern/BackSlashPattern.js +1 -1
  52. package/src/sap/gantt/def/pattern/PatternBase.js +1 -1
  53. package/src/sap/gantt/def/pattern/SlashPattern.js +1 -1
  54. package/src/sap/gantt/drawer/AdhocLine.js +1 -1
  55. package/src/sap/gantt/drawer/Drawer.js +1 -1
  56. package/src/sap/gantt/drawer/Legend.js +6 -0
  57. package/src/sap/gantt/drawer/VerticalLine.js +1 -1
  58. package/src/sap/gantt/eventHandler/AutoScrollHandler.js +1 -1
  59. package/src/sap/gantt/eventHandler/BirdEyeHandler.js +7 -1
  60. package/src/sap/gantt/eventHandler/MouseWheelHandler.js +1 -1
  61. package/src/sap/gantt/eventHandler/ShapeHoverHandler.js +1 -1
  62. package/src/sap/gantt/eventHandler/ShapeResizeHandler.js +1 -1
  63. package/src/sap/gantt/eventHandler/TimePeriodZoomHandler.js +1 -1
  64. package/src/sap/gantt/eventHandler/TimePopoverHandler.js +1 -1
  65. package/src/sap/gantt/flexibility/simple/AdhocLine.flexibility.js +7 -1
  66. package/src/sap/gantt/flexibility/simple/DeltaLine.flexibility.js +7 -1
  67. package/src/sap/gantt/flexibility/simple/GanttChartWithTable.flexibility.js +7 -1
  68. package/src/sap/gantt/flexibility/simple/GanttTableColumn.flexibility.js +6 -7
  69. package/src/sap/gantt/layouts/SidePanel.js +1 -1
  70. package/src/sap/gantt/legend/DimensionLegend.js +1 -1
  71. package/src/sap/gantt/legend/LegendBase.js +1 -1
  72. package/src/sap/gantt/legend/LegendContainer.js +1 -1
  73. package/src/sap/gantt/legend/ListLegend.js +1 -1
  74. package/src/sap/gantt/library.js +13 -3
  75. package/src/sap/gantt/messagebundle.properties +8 -2
  76. package/src/sap/gantt/messagebundle_sh.properties +30 -30
  77. package/src/sap/gantt/misc/AxisOrdinal.js +1 -1
  78. package/src/sap/gantt/misc/AxisTime.js +80 -22
  79. package/src/sap/gantt/misc/Format.js +2 -2
  80. package/src/sap/gantt/misc/Memoizer.js +1 -1
  81. package/src/sap/gantt/misc/RelativeTimeFormatter.js +1 -1
  82. package/src/sap/gantt/misc/ShapeManager.js +1 -1
  83. package/src/sap/gantt/misc/Utility.js +11 -0
  84. package/src/sap/gantt/overlays/GanttRowOverlay.js +80 -16
  85. package/src/sap/gantt/overlays/Overlay.js +1 -1
  86. package/src/sap/gantt/polyfills/lib.js +7 -1
  87. package/src/sap/gantt/polyfills/time.js +13 -7
  88. package/src/sap/gantt/polyfills/timeUtils/day.js +13 -0
  89. package/src/sap/gantt/polyfills/{time-utils → timeUtils}/dayCount.js +7 -1
  90. package/src/sap/gantt/polyfills/timeUtils/days.js +13 -0
  91. package/src/sap/gantt/polyfills/{time-utils → timeUtils}/interval.js +6 -0
  92. package/src/sap/gantt/polyfills/{time-utils → timeUtils}/millisecond.js +6 -0
  93. package/src/sap/gantt/polyfills/timeUtils/monday.js +13 -0
  94. package/src/sap/gantt/polyfills/timeUtils/saturday.js +13 -0
  95. package/src/sap/gantt/polyfills/timeUtils/weeks.js +13 -0
  96. package/src/sap/gantt/shape/Circle.js +1 -1
  97. package/src/sap/gantt/shape/ClipPath.js +1 -1
  98. package/src/sap/gantt/shape/Definitions.js +1 -1
  99. package/src/sap/gantt/shape/Group.js +1 -1
  100. package/src/sap/gantt/shape/Image.js +1 -1
  101. package/src/sap/gantt/shape/Line.js +1 -1
  102. package/src/sap/gantt/shape/Path.js +1 -1
  103. package/src/sap/gantt/shape/Polygon.js +1 -1
  104. package/src/sap/gantt/shape/Polyline.js +1 -1
  105. package/src/sap/gantt/shape/Rectangle.js +1 -1
  106. package/src/sap/gantt/shape/ResizeShadowShape.js +1 -1
  107. package/src/sap/gantt/shape/SelectedShape.js +1 -1
  108. package/src/sap/gantt/shape/Shape.js +1 -1
  109. package/src/sap/gantt/shape/Text.js +1 -1
  110. package/src/sap/gantt/shape/cal/Calendar.js +1 -1
  111. package/src/sap/gantt/shape/ext/Chevron.js +1 -1
  112. package/src/sap/gantt/shape/ext/Cursor.js +1 -1
  113. package/src/sap/gantt/shape/ext/Diamond.js +1 -1
  114. package/src/sap/gantt/shape/ext/Iconfont.js +1 -1
  115. package/src/sap/gantt/shape/ext/Pentangle.js +1 -1
  116. package/src/sap/gantt/shape/ext/TextRepeat.js +1 -1
  117. package/src/sap/gantt/shape/ext/Triangle.js +1 -1
  118. package/src/sap/gantt/shape/ext/rls/Relationship.js +1 -1
  119. package/src/sap/gantt/shape/ext/rls/SelectedRelationship.js +2 -2
  120. package/src/sap/gantt/shape/ext/ubc/UbcBorderPath.js +1 -1
  121. package/src/sap/gantt/shape/ext/ubc/UbcOverCapacityZonePolygon.js +1 -1
  122. package/src/sap/gantt/shape/ext/ubc/UbcPolygon.js +1 -1
  123. package/src/sap/gantt/shape/ext/ubc/UbcShortageCapacityPolygon.js +1 -1
  124. package/src/sap/gantt/shape/ext/ubc/UbcTooltipRectangle.js +1 -1
  125. package/src/sap/gantt/shape/ext/ubc/UbcUnderCapacityZonePolygon.js +1 -1
  126. package/src/sap/gantt/shape/ext/ubc/UbcUsedPolygon.js +1 -1
  127. package/src/sap/gantt/shape/ext/ubc/UtilizationBarChart.js +1 -1
  128. package/src/sap/gantt/shape/ext/ulc/UlcBorderPath.js +1 -1
  129. package/src/sap/gantt/shape/ext/ulc/UlcClipPath.js +1 -1
  130. package/src/sap/gantt/shape/ext/ulc/UlcClipingPath.js +1 -1
  131. package/src/sap/gantt/shape/ext/ulc/UlcDimension.js +1 -1
  132. package/src/sap/gantt/shape/ext/ulc/UlcMiddleLine.js +1 -1
  133. package/src/sap/gantt/shape/ext/ulc/UlcOverCapacityZoneRectangle.js +1 -1
  134. package/src/sap/gantt/shape/ext/ulc/UlcOverClipRectangle.js +1 -1
  135. package/src/sap/gantt/shape/ext/ulc/UlcRectangle.js +1 -1
  136. package/src/sap/gantt/shape/ext/ulc/UlcTooltipRectangle.js +1 -1
  137. package/src/sap/gantt/shape/ext/ulc/UlcUnderClipRectangle.js +1 -1
  138. package/src/sap/gantt/shape/ext/ulc/UtilizationLineChart.js +1 -1
  139. package/src/sap/gantt/simple/AdhocDiamond.js +1 -1
  140. package/src/sap/gantt/simple/AdhocLine.js +1 -1
  141. package/src/sap/gantt/simple/AggregationUtils.js +11 -58
  142. package/src/sap/gantt/simple/BaseCalendar.js +1 -1
  143. package/src/sap/gantt/simple/BaseChevron.js +1 -1
  144. package/src/sap/gantt/simple/BaseConditionalShape.js +1 -1
  145. package/src/sap/gantt/simple/BaseCursor.js +7 -7
  146. package/src/sap/gantt/simple/BaseDeltaRectangle.js +7 -4
  147. package/src/sap/gantt/simple/BaseDiamond.js +1 -1
  148. package/src/sap/gantt/simple/BaseGroup.js +1 -1
  149. package/src/sap/gantt/simple/BaseImage.js +1 -1
  150. package/src/sap/gantt/simple/BaseLine.js +1 -1
  151. package/src/sap/gantt/simple/BasePath.js +1 -1
  152. package/src/sap/gantt/simple/BasePseudoShape.js +1 -1
  153. package/src/sap/gantt/simple/BaseRectangle.js +5 -2
  154. package/src/sap/gantt/simple/BaseShape.js +7 -5
  155. package/src/sap/gantt/simple/BaseText.js +1 -1
  156. package/src/sap/gantt/simple/BaseTriangle.js +7 -1
  157. package/src/sap/gantt/simple/ContainerToolbar.js +19 -4
  158. package/src/sap/gantt/simple/ContainerToolbarPlaceholder.js +1 -1
  159. package/src/sap/gantt/simple/CoordinateUtils.js +1 -1
  160. package/src/sap/gantt/simple/CustomVariantHandler.js +8 -2
  161. package/src/sap/gantt/simple/DeltaLine.js +1 -1
  162. package/src/sap/gantt/simple/ExpandModel.js +2 -4
  163. package/src/sap/gantt/simple/FindAndSelectUtils.js +6 -0
  164. package/src/sap/gantt/simple/FullScreenUtil.js +7 -1
  165. package/src/sap/gantt/simple/GanttAdaptationData.js +8 -2
  166. package/src/sap/gantt/simple/GanttChartContainer.js +8 -2
  167. package/src/sap/gantt/simple/GanttChartWithTable.js +63 -5
  168. package/src/sap/gantt/simple/GanttDragDropExtension.js +17 -5
  169. package/src/sap/gantt/simple/GanttExtension.js +1 -1
  170. package/src/sap/gantt/simple/GanttHeader.js +1 -1
  171. package/src/sap/gantt/simple/GanttPointerExtension.js +1 -1
  172. package/src/sap/gantt/simple/GanttPopoverExtension.js +2 -2
  173. package/src/sap/gantt/simple/GanttPrinting.js +313 -198
  174. package/src/sap/gantt/simple/GanttRowAction.js +1 -1
  175. package/src/sap/gantt/simple/GanttRowSettings.js +30 -1
  176. package/src/sap/gantt/simple/GanttScrollExtension.js +20 -5
  177. package/src/sap/gantt/simple/GanttSearchSidePanel.js +7 -1
  178. package/src/sap/gantt/simple/GanttUtils.js +86 -1
  179. package/src/sap/gantt/simple/GanttZoomExtension.js +4 -4
  180. package/src/sap/gantt/simple/InnerGanttChart.js +1 -1
  181. package/src/sap/gantt/simple/LegendContainer.js +1 -1
  182. package/src/sap/gantt/simple/LegendShapeGroup.js +1 -1
  183. package/src/sap/gantt/simple/MultiActivityGroup.js +1 -1
  184. package/src/sap/gantt/simple/MultiActivityRowSettings.js +1 -1
  185. package/src/sap/gantt/simple/PrintConfig.js +314 -0
  186. package/src/sap/gantt/simple/PrintDialogTemplate.js +38 -0
  187. package/src/sap/gantt/simple/PrintUtils.js +151 -0
  188. package/src/sap/gantt/simple/Relationship.js +1 -1
  189. package/src/sap/gantt/simple/ShapeScheme.js +1 -1
  190. package/src/sap/gantt/simple/StockChart.js +1 -1
  191. package/src/sap/gantt/simple/StockChartDimension.js +1 -1
  192. package/src/sap/gantt/simple/StockChartPeriod.js +1 -1
  193. package/src/sap/gantt/simple/UtilizationBarChart.js +1 -1
  194. package/src/sap/gantt/simple/UtilizationChart.js +4 -1
  195. package/src/sap/gantt/simple/UtilizationDimension.js +1 -1
  196. package/src/sap/gantt/simple/UtilizationLineChart.js +1 -1
  197. package/src/sap/gantt/simple/UtilizationPeriod.js +1 -1
  198. package/src/sap/gantt/simple/shapes/Shape.js +6 -6
  199. package/src/sap/gantt/simple/shapes/Task.js +1 -1
  200. package/src/sap/gantt/skipTime/DayInterval.js +63 -0
  201. package/src/sap/gantt/skipTime/DiscontinuousProvider.js +54 -0
  202. package/src/sap/gantt/skipTime/SkipInterval.js +76 -0
  203. package/src/sap/gantt/skipTime/SkipPattern.js +64 -0
  204. package/src/sap/gantt/skipTime/WeekPattern.js +118 -0
  205. package/src/sap/gantt/skipTime/WeeklyDiscontinuousProvider.js +84 -0
  206. package/src/sap/gantt/themes/sap_hcb/base_Gantt.less +899 -0
  207. package/src/sap/gantt/themes/sap_hcb/base_GanttPrinting.less +101 -0
  208. package/src/sap/gantt/themes/sap_hcb/base_GanttSyncedControl.less +96 -0
  209. package/src/sap/gantt/themes/sap_hcb/library.source.less +15 -1
  210. package/src/sap/gantt/thirdparty/d3fc-discontinuous-scale.js +1129 -0
  211. package/src/sap/gantt/thirdparty/d3fc-rebind.js +103 -0
  212. package/src/sap/gantt/thirdparty/licenses/d3fc-MIT-LICENSE.txt +21 -0
  213. package/src/sap/gantt/utils/GanttChartConfigurationUtils.js +6 -0
  214. package/src/sap/gantt/utils/GanttCustomisationUtils.js +7 -1
  215. package/src/sap/gantt/utils/GanttFlexibilityUtils.js +7 -1
  216. package/src/sap/gantt/polyfills/time-utils/day.js +0 -7
  217. package/src/sap/gantt/polyfills/time-utils/days.js +0 -7
  218. package/src/sap/gantt/polyfills/time-utils/monday.js +0 -7
  219. package/src/sap/gantt/polyfills/time-utils/saturday.js +0 -7
  220. package/src/sap/gantt/polyfills/time-utils/weeks.js +0 -7
@@ -42,25 +42,61 @@ sap.ui.define([
42
42
  */
43
43
 
44
44
  var AxisTime = BaseObject.extend("sap.gantt.misc.AxisTime", {
45
- constructor : function (timeRange, viewRange, zoomRate, zoomOrigin, viewOffset, locale, oZoomStrategy) {
46
- BaseObject.call(this);
47
- this.scale = d3.time.scale().domain(timeRange).range(viewRange).clamp(false);
45
+ constructor : function (timeRange, viewRange, zoomRate, zoomOrigin, viewOffset, locale, oZoomStrategy) {
46
+ BaseObject.call(this);
48
47
 
49
- this.timeRange = timeRange;
50
- this.viewRange = viewRange;
48
+ this.timeRange = timeRange;
49
+ this.viewRange = viewRange;
51
50
 
52
- this.zoomRate = Utility.assign(zoomRate, 1);
53
- this.zoomOrigin = Utility.assign(zoomOrigin, 0);
51
+ this.zoomRate = Utility.assign(zoomRate, 1);
52
+ this.zoomOrigin = Utility.assign(zoomOrigin, 0);
54
53
 
55
- this.viewOffset = Utility.assign(viewOffset, 0);
54
+ this.viewOffset = Utility.assign(viewOffset, 0);
56
55
 
57
- this.locale = locale;
58
- this._shapeWidthValue = Memoizer.createCache();
59
- this.timeZoneOffset = 0;
56
+ this.locale = locale;
57
+ this._shapeWidthValue = Memoizer.createCache();
58
+ this.timeZoneOffset = 0;
60
59
 
61
- this._oZoomStrategy = oZoomStrategy;
62
- }
63
- });
60
+ this._oZoomStrategy = oZoomStrategy;
61
+
62
+ if (oZoomStrategy) {
63
+ this._discontinuityProviderInstance = oZoomStrategy.getProperty("_discontinuousProvider");
64
+ this.timelineOption = oZoomStrategy.getTimeLineOption();
65
+ }
66
+
67
+ this.continuousScale = d3.time.scale().domain(timeRange).range(viewRange).clamp(false);
68
+ this.discontinuousScale = null;
69
+
70
+ if (this._discontinuityProviderInstance) {
71
+ this.discontinuousScale = window.fc.scaleDiscontinuous(
72
+ d3.time.scale()
73
+ .domain(timeRange)
74
+ .range(viewRange)
75
+ .clamp(false)
76
+ ).discontinuityProvider(this._discontinuityProviderInstance)
77
+ .domain(timeRange)
78
+ .range(viewRange)
79
+ .clamp(false);
80
+ }
81
+
82
+ Object.defineProperty(this, 'scale', {
83
+ get: function () {
84
+ if (this._discontinuityProviderInstance && this._discontinuityProviderInstance.useDiscontinuousScale(this.timelineOption.smallInterval.unit)) {
85
+ return this.discontinuousScale;
86
+ }
87
+ return this.continuousScale;
88
+ }
89
+ });
90
+ Object.defineProperty(this, 'discontinuityProvider', {
91
+ get: function () {
92
+ if (this._discontinuityProviderInstance && this._discontinuityProviderInstance.useDiscontinuousScale(this.timelineOption.smallInterval.unit)) {
93
+ return this._discontinuityProviderInstance;
94
+ }
95
+ return null;
96
+ }
97
+ });
98
+ }
99
+ });
64
100
 
65
101
  /*
66
102
  * Constants
@@ -125,7 +161,12 @@ sap.ui.define([
125
161
  this._shapeWidthValue.clearCache();
126
162
  }
127
163
  this.timeRange = timeRange;
128
- this.scale.domain(timeRange);
164
+ this.continuousScale.domain(timeRange);
165
+
166
+ if (this.discontinuousScale) {
167
+ this.discontinuousScale.domain(timeRange);
168
+ }
169
+
129
170
  return this;
130
171
  };
131
172
 
@@ -138,7 +179,7 @@ sap.ui.define([
138
179
  */
139
180
 
140
181
  AxisTime.prototype.getTimeRange = function(){
141
- return this.scale.domain();
182
+ return this.continuousScale.domain();
142
183
  };
143
184
 
144
185
  /**
@@ -169,9 +210,14 @@ sap.ui.define([
169
210
  * @public
170
211
  */
171
212
 
172
- AxisTime.prototype.setViewRange = function(viewRange){
213
+ AxisTime.prototype.setViewRange = function (viewRange, timelineOption){
173
214
  this.viewRange = viewRange;
174
- this.scale.range(viewRange);
215
+ this.timelineOption = timelineOption;
216
+ this.continuousScale.range(viewRange);
217
+
218
+ if (this.discontinuousScale) {
219
+ this.discontinuousScale.range(viewRange);
220
+ }
175
221
  return this;
176
222
  };
177
223
 
@@ -184,7 +230,7 @@ sap.ui.define([
184
230
  */
185
231
 
186
232
  AxisTime.prototype.getViewRange = function(){
187
- var range = this.scale.range();
233
+ var range = this.continuousScale.range();
188
234
  return [Math.round((range[0] - this.zoomOrigin) * this.zoomRate - this.viewOffset),
189
235
  Math.round((range[1] - this.zoomOrigin) * this.zoomRate - this.viewOffset)];
190
236
  };
@@ -731,7 +777,7 @@ sap.ui.define([
731
777
  return visibleScale.ticks(ObjectPath.get(oTimeInterval.unit).range, oTimeInterval.span);
732
778
  }
733
779
  //when time interval is week
734
- var aWeekFirstDays = [
780
+ var aWeekDays = [
735
781
  "d3.time.sunday",
736
782
  "d3.time.monday",
737
783
  "d3.time.tuesday",
@@ -740,7 +786,12 @@ sap.ui.define([
740
786
  "d3.time.friday",
741
787
  "d3.time.saturday"
742
788
  ];
743
- return visibleScale.ticks(ObjectPath.get(aWeekFirstDays[this.getZoomStrategy().getFirstDayOfWeek()]).range, oTimeInterval.span);
789
+
790
+ var firstDayOfWeek = this.getZoomStrategy().getFirstDayOfWeek();
791
+ var discontinuityProviderInstance = (this.discontinuityProvider || {});
792
+ var aWeekFirstDay = "firstTradingDayOfWeek" in discontinuityProviderInstance ? discontinuityProviderInstance.firstTradingDayOfWeek(firstDayOfWeek) : firstDayOfWeek;
793
+
794
+ return visibleScale.ticks(ObjectPath.get(aWeekDays[aWeekFirstDay]).range, oTimeInterval.span);
744
795
  };
745
796
 
746
797
  AxisTime.prototype._calculateScale = function(timeRangeSet, viewRangeSet, timeRange, viewRange, localTimeRange){
@@ -763,7 +814,7 @@ sap.ui.define([
763
814
  }
764
815
  }
765
816
  } else if (localTimeRange) {
766
- visibleScale = new AxisTime(localTimeRange, this.viewRange, this.zoomRate, this.zoomOrigin, this.viewOffset, null).scale;
817
+ visibleScale = new AxisTime(localTimeRange, this.viewRange, this.zoomRate, this.zoomOrigin, this.viewOffset, null, this._oZoomStrategy).scale;
767
818
  } else {
768
819
  timeRange = [
769
820
  this.convertToTimezone(timeRange[0]),
@@ -772,6 +823,13 @@ sap.ui.define([
772
823
 
773
824
  visibleScale = new AxisTime(timeRange, viewRange, this.zoomRate, this.zoomOrigin, this.viewOffset, null, this._oZoomStrategy).scale;
774
825
  }
826
+ if (this.discontinuityProvider) { // increase visibleScale domain so that first tick renders properly
827
+ var oTotalHorizonStartTime = Format.abapTimestampToDate(this._oZoomStrategy.getTotalHorizon().getStartTime());
828
+ if (visibleScale.domain()[0].getTime() == this._discontinuityProviderInstance.clampUp(oTotalHorizonStartTime).getTime()) {
829
+ var oEndTime = visibleScale.domain()[1];
830
+ visibleScale.domain([this._discontinuityProviderInstance.clampDown(oTotalHorizonStartTime), oEndTime]);
831
+ }
832
+ }
775
833
  var retVal = {"viewRangeSet": viewRangeSet, "visibleScale" : visibleScale, "dstScale" : dstScale, "normalScale" : normalScale};
776
834
  return retVal;
777
835
  };
@@ -71,7 +71,7 @@ sap.ui.define([
71
71
  sTimestamp.substr(10, 2),
72
72
  sTimestamp.substr(12, 2));
73
73
  //In case ts is in format of "Fri Jun 12 2015 08:00:00 GMT+0800 (China Standard Time)"
74
- if (!jQuery.isNumeric(date.getTime())){
74
+ if (isNaN(date.getTime())){
75
75
  date = new Date(sTimestamp);
76
76
  //In case ts is in ISO format of "2021-04-19T17:13:10.000Z"
77
77
  if (!isNaN(date.getTime()) && (date.toISOString() === sTimestamp)) {
@@ -85,7 +85,7 @@ sap.ui.define([
85
85
  }
86
86
  }
87
87
  return date;
88
- } else if (jQuery.type(sTimestamp) === "date"){
88
+ } else if (sTimestamp instanceof Date){
89
89
  return sTimestamp;
90
90
  }
91
91
  return null;
@@ -13,7 +13,7 @@ sap.ui.define([
13
13
  * Caching the values of control and returning them when the same inputs are used again.
14
14
  *
15
15
  * @author SAP SE
16
- * @version 1.125.0
16
+ * @version 1.127.0
17
17
  *
18
18
  * @private
19
19
  * @alias sap.gantt.misc.Memoizer
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * @param {string} sPrefix the prefix of the time label
19
19
  *
20
20
  * @author SAP SE
21
- * @version 1.125.0
21
+ * @version 1.127.0
22
22
  *
23
23
  * @constructor
24
24
  * @private
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.base.EventProvider
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.125.0
31
+ * @version 1.127.0
32
32
  *
33
33
  * @param {int} oGantt <code>sap.gantt.GanttChartBase</code>
34
34
  *
@@ -560,5 +560,16 @@ sap.ui.define([
560
560
  return oFormatter.format(oDate, sLocalTimezone);
561
561
  };
562
562
 
563
+ /**
564
+ * @param {object} value value to be checked
565
+ * @returns {boolean} returns whether the given value is coercible to number
566
+ */
567
+ Utility.isNumeric = function (value) {
568
+ var type = typeof value;
569
+
570
+ return (type === "number" || type === "string") &&
571
+ (value - parseFloat(value) + 1) >= 0;
572
+ };
573
+
563
574
  return Utility;
564
575
  }, /* bExport= */ true);
@@ -21,7 +21,7 @@ sap.ui.define(
21
21
  * @extends sap.ui.core.Element
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.125.0
24
+ * @version 1.127.0
25
25
  * @since 1.120
26
26
  * @experimental since 1.120
27
27
  *
@@ -59,26 +59,90 @@ sap.ui.define(
59
59
  );
60
60
 
61
61
  GanttRowOverlay.prototype.init = function () {
62
- this._oLocaleBindingInfo = {};
62
+ if (!this._oLocalBindingInfo) {
63
+ this._oLocalBindingInfo = {};
64
+ }
65
+
66
+ Element.prototype.init.apply(this, arguments);
63
67
  };
64
68
 
65
- /**
66
- * bindAggregation method of element is stored to add expanded shapes when actual expand is called.
67
- */
68
- GanttRowOverlay.prototype._bindAddon = Element.prototype.bindAggregation;
69
+ GanttRowOverlay.prototype.setParent = function (oParent) {
70
+ if (oParent) {
71
+ oParent.addEventDelegate({
72
+ onRowExpanded: () => this.setExpanded(true),
73
+ onRowCollapsed: () => this.setExpanded(false)
74
+ }, this);
69
75
 
70
- /**
71
- * @param {string} sName Name of a public aggregation to bind
72
- * @param {sap.ui.base.ManagedObject.AggregationBindingInfo} oBindingInfo Binding info
73
- * BindAggregation is overriden so that only staticOverlay aggregation's shapes are added by default.
74
- */
75
- GanttRowOverlay.prototype.bindAggregation = function(sName, oBindingInfo){
76
- if (oBindingInfo){
77
- this._oLocaleBindingInfo[sName] = oBindingInfo;
78
- if (sName == "staticOverlay"){
79
- this._bindAddon(sName,oBindingInfo);
76
+ this.setExpanded(oParent._isExpanded());
77
+ }
78
+
79
+ Element.prototype.setParent.apply(this, arguments);
80
+ };
81
+
82
+ GanttRowOverlay.prototype.setExpanded = function (bExpanded) {
83
+ this._bExpanded = bExpanded;
84
+
85
+ if (this._bExpanded) {
86
+ this.unbindAggregation("staticOverlay");
87
+ this.bindAggregation("expandedOverlay");
88
+ } else {
89
+ this.unbindAggregation("expandedOverlay");
90
+ this.bindAggregation("staticOverlay");
91
+ }
92
+ };
93
+
94
+ GanttRowOverlay.prototype.getActiveOverlays = function () {
95
+ if (this._bExpanded) {
96
+ return this.getAggregation("expandedOverlay");
97
+ } else {
98
+ return this.getAggregation("staticOverlay");
99
+ }
100
+ };
101
+
102
+ GanttRowOverlay.prototype.unbindAggregation = function (sName) {
103
+ var oBindingInfo = this.getBindingInfo(sName);
104
+
105
+ if (oBindingInfo && this._oLocalBindingInfo) {
106
+ this._oLocalBindingInfo[sName] = oBindingInfo;
107
+ }
108
+
109
+ Element.prototype.unbindAggregation.apply(this, [sName]);
110
+ };
111
+
112
+ GanttRowOverlay.prototype.bindAggregation = function (sName, oBindingInfo) {
113
+ if (!oBindingInfo && this._oLocalBindingInfo) {
114
+ oBindingInfo = this._oLocalBindingInfo[sName];
115
+ }
116
+
117
+ if (oBindingInfo) {
118
+ Element.prototype.bindAggregation.apply(this, [sName, oBindingInfo]);
119
+ }
120
+ };
121
+
122
+ GanttRowOverlay.prototype.clone = function () {
123
+ var oClone = Element.prototype.clone.call(this);
124
+
125
+ oClone._oLocalBindingInfo = {};
126
+
127
+ if (this._oLocalBindingInfo !== undefined) {
128
+ const staticInfo = this._oLocalBindingInfo["staticOverlay"];
129
+ const expandedInfo = this._oLocalBindingInfo["expandedOverlay"];
130
+
131
+ if (staticInfo) {
132
+ oClone._oLocalBindingInfo["staticOverlay"] = Object.assign({}, staticInfo);
133
+ }
134
+
135
+ if (expandedInfo) {
136
+ oClone._oLocalBindingInfo["expandedOverlay"] = Object.assign({}, expandedInfo);
80
137
  }
81
138
  }
139
+
140
+ oClone._bExpanded = this._bExpanded;
141
+
142
+ oClone.unbindAggregation("staticOverlay");
143
+ oClone.unbindAggregation("expandedOverlay");
144
+
145
+ return oClone;
82
146
  };
83
147
 
84
148
 
@@ -23,7 +23,7 @@ sap.ui.define(
23
23
  * @extends sap.ui.core.Element
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.125.0
26
+ * @version 1.127.0
27
27
  * @since 1.120
28
28
  * @experimental since 1.120
29
29
  *
@@ -1,6 +1,12 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
1
7
  sap.ui.define([
2
8
  "sap/gantt/library",
3
- "./time"
9
+ "sap/gantt/polyfills/time"
4
10
  ], function (library, time) {
5
11
  "use strict";
6
12
 
@@ -1,11 +1,17 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
1
7
  sap.ui.define([
2
- "./time-utils/day",
3
- "./time-utils/days",
4
- "./time-utils/millisecond",
5
- "./time-utils/monday",
6
- "./time-utils/saturday",
7
- "./time-utils/weeks",
8
- "./time-utils/dayCount"
8
+ "./timeUtils/day",
9
+ "./timeUtils/days",
10
+ "./timeUtils/millisecond",
11
+ "./timeUtils/monday",
12
+ "./timeUtils/saturday",
13
+ "./timeUtils/weeks",
14
+ "./timeUtils/dayCount"
9
15
  ], function (day, days, millisecond, monday, saturday, weeks, dayCount) {
10
16
  "use strict";
11
17
 
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
7
+ sap.ui.define([
8
+ "sap/ui/thirdparty/d3"
9
+ ], function () {
10
+ "use strict";
11
+
12
+ return d3.time.day;
13
+ });
@@ -1,3 +1,9 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
1
7
  sap.ui.define([], function () {
2
8
  "use strict";
3
9
 
@@ -15,7 +21,7 @@ sap.ui.define([], function () {
15
21
  t0.setHours(0, 0, 0, 0);
16
22
  t1.setHours(0, 0, 0, 0);
17
23
 
18
- return Math.floor((end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay);
24
+ return Math.floor((t1 - t0 - (t1.getTimezoneOffset() - t0.getTimezoneOffset()) * durationMinute) / durationDay);
19
25
  }
20
26
 
21
27
  return count;
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
7
+ sap.ui.define([
8
+ "sap/ui/thirdparty/d3"
9
+ ], function () {
10
+ "use strict";
11
+
12
+ return d3.time.days;
13
+ });
@@ -1,3 +1,9 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
1
7
  sap.ui.define([], function () {
2
8
  "use strict";
3
9
 
@@ -1,3 +1,9 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
1
7
  sap.ui.define(["./interval"], function (interval) {
2
8
  "use strict";
3
9
 
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
7
+ sap.ui.define([
8
+ "sap/ui/thirdparty/d3"
9
+ ], function () {
10
+ "use strict";
11
+
12
+ return d3.time.monday;
13
+ });
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
7
+ sap.ui.define([
8
+ "sap/ui/thirdparty/d3"
9
+ ], function () {
10
+ "use strict";
11
+
12
+ return d3.time.saturday;
13
+ });
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
7
+ sap.ui.define([
8
+ "sap/ui/thirdparty/d3"
9
+ ], function () {
10
+ "use strict";
11
+
12
+ return d3.time.weeks;
13
+ });
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extend sap.gantt.shape.Shape
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.125.0
31
+ * @version 1.127.0
32
32
  *
33
33
  * @constructor
34
34
  * @public
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @extend sap.gantt.shape.Shape
37
37
  *
38
38
  * @author SAP SE
39
- * @version 1.125.0
39
+ * @version 1.127.0
40
40
  *
41
41
  * @constructor
42
42
  * @public
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extend sap.gantt.shape.Shape
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.125.0
31
+ * @version 1.127.0
32
32
  *
33
33
  * @constructor
34
34
  * @public
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @extend sap.gantt.shape.Shape
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.125.0
24
+ * @version 1.127.0
25
25
  *
26
26
  * @constructor
27
27
  * @public
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @extend sap.gantt.shape.Shape
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.125.0
24
+ * @version 1.127.0
25
25
  *
26
26
  * @constructor
27
27
  * @public
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * @extend sap.gantt.shape.Shape
35
35
  *
36
36
  * @author SAP SE
37
- * @version 1.125.0
37
+ * @version 1.127.0
38
38
  *
39
39
  * @constructor
40
40
  * @public
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
  * @extend sap.gantt.shape.Shape
51
51
  *
52
52
  * @author SAP SE
53
- * @version 1.125.0
53
+ * @version 1.127.0
54
54
  *
55
55
  * @constructor
56
56
  * @public
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @extend sap.gantt.shape.Shape
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.125.0
32
+ * @version 1.127.0
33
33
  *
34
34
  * @constructor
35
35
  * @public
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @extend sap.gantt.shape.Shape
31
31
  *
32
32
  * @author SAP SE
33
- * @version 1.125.0
33
+ * @version 1.127.0
34
34
  *
35
35
  * @constructor
36
36
  * @public
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @extend sap.gantt.shape.Shape
37
37
  *
38
38
  * @author SAP SE
39
- * @version 1.125.0
39
+ * @version 1.127.0
40
40
  *
41
41
  * @constructor
42
42
  * @public
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  *
26
26
  * @extends sap.gantt.shape.Path
27
- * @version 1.125.0
27
+ * @version 1.127.0
28
28
  *
29
29
  * @constructor
30
30
  * @public
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  *
26
26
  * @extends sap.gantt.shape.Path
27
- * @version 1.125.0
27
+ * @version 1.127.0
28
28
  *
29
29
  * @constructor
30
30
  * @public
@@ -62,7 +62,7 @@ sap.ui.define([
62
62
  * @abstract
63
63
  *
64
64
  * @author SAP SE
65
- * @version 1.125.0
65
+ * @version 1.127.0
66
66
  *
67
67
  * @constructor
68
68
  * @public
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  * @extend sap.gantt.shape.Shape
45
45
  *
46
46
  * @author SAP SE
47
- * @version 1.125.0
47
+ * @version 1.127.0
48
48
  *
49
49
  * @constructor
50
50
  * @public
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @extends sap.gantt.shape.Rectangle
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.125.0
28
+ * @version 1.127.0
29
29
  *
30
30
  * @constructor
31
31
  * @public