@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
@@ -0,0 +1,151 @@
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
+ ], function() {
9
+ "use strict";
10
+ /**
11
+ * @private
12
+ * Provides helper methods for print configurations.
13
+ * @author SAP SE
14
+ * @version 1.127.0
15
+ * @alias sap.gantt.simple.PrintUtils
16
+ * @since 1.127
17
+ */
18
+ var PrintUtils = {
19
+
20
+ /**
21
+ * List of paper configurations.
22
+ * @returns {object} Paper configurations.
23
+ * @private
24
+ */
25
+ _getPaperConfiguarations: function() {
26
+ return {
27
+ "A5": {
28
+ width: this._mmToPx(148),
29
+ height: this._mmToPx(210)
30
+ },
31
+ "A4": {
32
+ width: this._mmToPx(210),
33
+ height: this._mmToPx(297)
34
+ },
35
+ "A3": {
36
+ width: this._mmToPx(297),
37
+ height: this._mmToPx(420)
38
+ },
39
+ "A2": {
40
+ width: this._mmToPx(420),
41
+ height: this._mmToPx(594)
42
+ },
43
+ "A1": {
44
+ width: this._mmToPx(594),
45
+ height: this._mmToPx(841)
46
+ },
47
+ "A0": {
48
+ width: this._mmToPx(841),
49
+ height: this._mmToPx(1189)
50
+ },
51
+ "Letter": {
52
+ width: this._inToPx(8.5),
53
+ height: this._inToPx(11)
54
+ },
55
+ "Legal": {
56
+ width: this._inToPx(8.5),
57
+ height: this._inToPx(14)
58
+ },
59
+ "Tabloid": {
60
+ width: this._inToPx(11),
61
+ height: this._inToPx(17)
62
+ },
63
+ "Custom": {
64
+ width: undefined,
65
+ height: undefined
66
+ }
67
+ };
68
+ },
69
+
70
+ /**
71
+ * @param {number} mm - value in milimeter to be converted into pixel.
72
+ * @returns {number} - value in pixel.
73
+ * @private
74
+ */
75
+ _mmToPx: function (mm) {
76
+ return mm * 3.78;
77
+ },
78
+
79
+ /**
80
+ * @param {Number} iIn - value in inches to be converted into pixel.
81
+ * @returns {number} - value in pixel.
82
+ * @private
83
+ */
84
+ _inToPx: function(iIn) {
85
+ return iIn / 0.01042;
86
+ },
87
+
88
+ /**
89
+ * @param {number} fPx - value in pixel to be converted into milimeter.
90
+ * @returns {number} - value in milimeter.
91
+ * @private
92
+ */
93
+ _pxToMm: function(fPx) {
94
+ // 1 millimeter = 3.78 pixel
95
+ return fPx / 3.78;
96
+ },
97
+
98
+ /**
99
+ * @param {number} fPx - value in pixel to be converted into inches.
100
+ * @returns {number} - value in inches.
101
+ * @private
102
+ */
103
+ _pxToIn: function(fPx) {
104
+ // 1 inch = pixel 0.01042 pixel
105
+ return fPx * 0.01042;
106
+ },
107
+
108
+ /**
109
+ * Converts given value to a pixel based on unit.
110
+ * @param {number} value - The value to be converted.
111
+ * @param {string} unit - The unit of the value.
112
+ * @returns {number} - The converted value in pixels.
113
+ * @private
114
+ */
115
+ _convertUnitToPx: function(value, unit) {
116
+ switch (unit) {
117
+ case "mm":
118
+ return value * 3.78;
119
+ case "cm":
120
+ return value * 3.78 * 10;
121
+ case "in":
122
+ return value / 0.01042;
123
+ default:
124
+ return undefined;
125
+ }
126
+ },
127
+
128
+ /**
129
+ * converts pixel value to given unit.
130
+ * @param {number} fPx - The value to be converted.
131
+ * @param {string} unit - The unit to which the value is to be converted.
132
+ * @returns {number} - The converted value in given unit.
133
+ * @private
134
+ */
135
+ _convertPxToUnit: function (fPx,unit) {
136
+ switch (unit) {
137
+ case "mm":
138
+ return this._pxToMm(fPx);
139
+ case "cm":
140
+ return this._pxToMm(fPx) / 10;
141
+ case "in":
142
+ return this._pxToIn(fPx);
143
+ default:
144
+ return undefined;
145
+ }
146
+ }
147
+ };
148
+
149
+ return PrintUtils;
150
+
151
+ }, /* bExport= */ true);
@@ -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.127.0
54
54
  *
55
55
  * @constructor
56
56
  * @public
@@ -19,7 +19,7 @@ sap.ui.define(['sap/ui/core/Element'], function (Element) {
19
19
  * @extends sap.ui.core.Element
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.125.0
22
+ * @version 1.127.0
23
23
  *
24
24
  * @constructor
25
25
  * @public
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.gantt.simple.UtilizationChart
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.125.0
31
+ * @version 1.127.0
32
32
  * @since 1.95
33
33
  *
34
34
  * @constructor
@@ -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.95
28
28
  *
29
29
  * @constructor
@@ -24,7 +24,7 @@ sap.ui.define(["sap/ui/core/Element"], function(Element){
24
24
  * @extends sap.ui.core.Element
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.125.0
27
+ * @version 1.127.0
28
28
  *
29
29
  * @constructor
30
30
  * @public
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @extends sap.gantt.simple.UtilizationChart
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
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.gantt.simple.BaseShape
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.125.0
29
+ * @version 1.127.0
30
30
  *
31
31
  * @constructor
32
32
  * @abstract
@@ -93,6 +93,9 @@ sap.ui.define([
93
93
  iStartTime = this.getTime().valueOf();
94
94
  iEndTime = this.getEndTime().valueOf();
95
95
  iTimeDiff = iEndTime - iStartTime;
96
+ if (oAxisTime.discontinuityProvider) { // when skip time pattern is applied, use distance method to calculate time difference
97
+ iTimeDiff = oAxisTime._discontinuityProviderInstance.distance(this.getTime(), this.getEndTime());
98
+ }
96
99
  iZoomRate = oAxisTime.getZoomRate();
97
100
  viewOffset = oAxisTime.getViewOffset();
98
101
  viewRange = oAxisTime.getViewRange()[1];
@@ -20,7 +20,7 @@ sap.ui.define(["sap/ui/core/Element"], function(Element){
20
20
  * @extends sap.ui.core.Element
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.125.0
23
+ * @version 1.127.0
24
24
  *
25
25
  * @constructor
26
26
  * @public
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @extends sap.gantt.simple.UtilizationChart
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
@@ -24,7 +24,7 @@ sap.ui.define(["sap/ui/core/Element"], function(Element){
24
24
  * @extends sap.ui.core.Element
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.125.0
27
+ * @version 1.127.0
28
28
  *
29
29
  * @constructor
30
30
  * @public
@@ -6,13 +6,13 @@
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/gantt/simple/BaseShape",
9
- "sap/ui/thirdparty/jquery",
10
9
  "sap/gantt/misc/Format",
11
10
  "sap/ui/core/theming/Parameters",
12
11
  "sap/gantt/utils/GanttChartConfigurationUtils",
13
- "sap/ui/core/RenderManager"
14
- ], function (BaseShape, jQuery, Format, Parameters,
15
- GanttChartConfigurationUtils, RenderManager) {
12
+ "sap/ui/core/RenderManager",
13
+ "sap/gantt/misc/Utility"
14
+ ], function (BaseShape, Format, Parameters,
15
+ GanttChartConfigurationUtils, RenderManager, Utility) {
16
16
  "use strict";
17
17
 
18
18
  var DEFAULT_ROW_PADDING = 12;
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.gantt.simple.BaseShape
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.125.0
35
+ * @version 1.127.0
36
36
  *
37
37
  * @abstract
38
38
  * @constructor
@@ -201,7 +201,7 @@ sap.ui.define([
201
201
  var startTime = oAxisTime.timeToView(Format.abapTimestampToDate(this.getTime())),
202
202
  endTime = oAxisTime.timeToView(Format.abapTimestampToDate(this.getEndTime()));
203
203
 
204
- if (jQuery.isNumeric(startTime) && jQuery.isNumeric(endTime)) {
204
+ if (Utility.isNumeric(startTime) && Utility.isNumeric(endTime)) {
205
205
  return Math.abs(endTime - startTime);
206
206
  } else {
207
207
  return 0;
@@ -38,7 +38,7 @@ sap.ui.define([
38
38
  * @extends sap.gantt.simple.shapes.Shape
39
39
  *
40
40
  * @author SAP SE
41
- * @version 1.125.0
41
+ * @version 1.127.0
42
42
  *
43
43
  * @constructor
44
44
  * @public
@@ -0,0 +1,63 @@
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/core/Element"
9
+ ], function (Element) {
10
+ "use strict";
11
+ /**
12
+ * Creates and initializes a new class for day interval.
13
+ *
14
+ * @param {string} [sId] ID of the new control. The ID is generated automatically if it is not provided.
15
+ * @param {object} [mSetting] Initial settings for the new control
16
+ *
17
+ * @class
18
+ * Enables the user to define skip time pattern within a day.
19
+ *
20
+ * @extends sap.ui.core.Element
21
+ *
22
+ * @author SAP SE
23
+ * @version 1.127.0
24
+ * @since 1.126
25
+ *
26
+ * @constructor
27
+ * @public
28
+ * @alias sap.gantt.skipTime.DayInterval
29
+ */
30
+ var DayInterval = Element.extend("sap.gantt.skipTime.DayInterval", /** @lends sap.gantt.skipTime.DayInterval.prototype */ {
31
+ metadata: {
32
+ library: "sap.gantt",
33
+ defaultAggregation: "skipIntervals",
34
+ properties: {
35
+ /**
36
+ * Non-working day, supported values: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"
37
+ * @since 1.126
38
+ */
39
+ day: {type: "string"}
40
+ },
41
+ aggregations: {
42
+ /**
43
+ * Time intervals to be skipped for the day.
44
+ * @since 1.126
45
+ */
46
+ skipIntervals: {type: "sap.gantt.skipTime.SkipInterval", multiple: true, singularName: "skipInterval"}
47
+ }
48
+ }
49
+ });
50
+
51
+ /**
52
+ * Utility method to format skip intervals
53
+ * @returns {Array} returns array of formatted skip intervals
54
+ * @private
55
+ */
56
+ DayInterval.prototype._getFormattedSkipIntervals = function () {
57
+ return this.getSkipIntervals().map(function (oInterval) {
58
+ return oInterval._getFormattedTime();
59
+ });
60
+ };
61
+
62
+ return DayInterval;
63
+ });
@@ -0,0 +1,54 @@
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
+ ], function () {
9
+ 'use strict';
10
+ /**
11
+ * Creates and initializes a new class for DiscontinuousProvider.
12
+ * Enables the user to define custom discontinuous provider.
13
+ *
14
+ * @author SAP SE
15
+ * @version 1.127.0
16
+ * @since 1.126
17
+ *
18
+ * @constructor
19
+ * @public
20
+ * @alias sap.gantt.skipTime.DiscontinuousProvider
21
+ */
22
+ function DiscontinuousProvider () {}
23
+
24
+ // Returns whether the discontinuous provider is to be used or not. This method can be overriden to define custom conditions.
25
+ DiscontinuousProvider.prototype.useDiscontinuousScale = function(){
26
+ return true;
27
+ };
28
+
29
+ // If the given date falls within a discontinuity (i.e. an excluded domain range), it must be moved forward to the discontinuity boundary. Otherwise, it should be returned unchanged.
30
+ DiscontinuousProvider.prototype.clampUp = function (oDate) {
31
+ return oDate;
32
+ };
33
+
34
+ // If the given date falls within a discontinuity, it must be shifted backwards to the discontinuity boundary. Otherwise, it should be returned unchanged.
35
+ DiscontinuousProvider.prototype.clampDown = function (oDate) {
36
+ return oDate;
37
+ };
38
+
39
+ // returns the number of milliseconds between the start and end dates after removing the discontinuities in between.
40
+ DiscontinuousProvider.prototype.distance = function (start, end) {
41
+ return end - start;
42
+ };
43
+
44
+ // When given a date and an offset in milliseconds, the date should be advanced by the offset value, skipping any discontinuities, to return the final value.
45
+ DiscontinuousProvider.prototype.offset = function (oDate, offset) {
46
+ return new Date(oDate.getTime() + offset);
47
+ };
48
+
49
+ DiscontinuousProvider.prototype.tickFilter = function (aTicks) {
50
+ return aTicks;
51
+ };
52
+
53
+ return DiscontinuousProvider;
54
+ });
@@ -0,0 +1,76 @@
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/core/Element"
9
+ ], function (Element) {
10
+ "use strict";
11
+
12
+ /**
13
+ * Creates and initializes a new class for skip interval.
14
+ *
15
+ * @param {string} [sId] ID of the new control. The ID is generated automatically if it is not provided.
16
+ * @param {object} [mSetting] Initial settings for the new control
17
+ *
18
+ * @class
19
+ * Enables the user to define skip time interval.
20
+ *
21
+ * @extends sap.ui.core.Element
22
+ *
23
+ * @author SAP SE
24
+ * @version 1.127.0
25
+ * @since 1.126
26
+ *
27
+ * @constructor
28
+ * @public
29
+ * @alias sap.gantt.skipTime.SkipInterval
30
+ */
31
+
32
+ var SkipInterval = Element.extend("sap.gantt.skipTime.SkipInterval", /** @lends sap.gantt.skipTime.SkipInterval.prototype */ {
33
+ metadata: {
34
+ library: "sap.gantt",
35
+ properties: {
36
+ /**
37
+ * Start time with in a day from which time is to be skipped. Format: HHMMSS.
38
+ * @since 1.126
39
+ */
40
+ startTime: { type: "string", group: "Misc", defaultValue: "000000" },
41
+
42
+ /**
43
+ * End time with in a day till which time is to be skipped. Format: HHMMSS.
44
+ * @since 1.126
45
+ */
46
+ endTime: { type: "string", group: "Misc", defaultValue: "235959" }
47
+ }
48
+ }
49
+ });
50
+
51
+ /**
52
+ * Utility method to format the time slices to d3fc supported value
53
+ * @returns {Array} returns the formatted start and end pair
54
+ * @private
55
+ */
56
+ SkipInterval.prototype._getFormattedTime = function () {
57
+ var sStartTime = this.getStartTime();
58
+ var sEndTime = this.getEndTime();
59
+
60
+ if (sStartTime.slice(0, 4) === "0000") {
61
+ sStartTime = "SOD";
62
+ } else {
63
+ sStartTime = sStartTime.slice(0, 2) + ":" + sStartTime.slice(2, 4);
64
+ }
65
+
66
+ if (sEndTime.slice(0, 4) === "2359") {
67
+ sEndTime = "EOD";
68
+ } else {
69
+ sEndTime = sEndTime.slice(0, 2) + ":" + sEndTime.slice(2, 4);
70
+ }
71
+
72
+ return [sStartTime, sEndTime];
73
+ };
74
+
75
+ return SkipInterval;
76
+ });
@@ -0,0 +1,64 @@
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/core/Element",
9
+ "sap/gantt/thirdparty/d3fc-discontinuous-scale"
10
+ ], function (Element) {
11
+ "use strict";
12
+
13
+ /**
14
+ * Creates and initializes a new class for skip time pattern.
15
+ *
16
+ * @param {string} [sId] ID of the new control. The ID is generated automatically if it is not provided.
17
+ * @param {object} [mSetting] Initial settings for the new control
18
+ *
19
+ * @class
20
+ * Enables the user to define skip time pattern.
21
+ *
22
+ * @extends sap.ui.core.Element
23
+ *
24
+ * @author SAP SE
25
+ * @version 1.127.0
26
+ * @since 1.126
27
+ *
28
+ * @constructor
29
+ * @public
30
+ * @alias sap.gantt.skipTime.SkipPattern
31
+ */
32
+
33
+ var SkipPattern = Element.extend("sap.gantt.skipTime.SkipPattern", /** @lends sap.gantt.skipTime.SkipPattern.prototype */ {
34
+ metadata: {
35
+ library: "sap.gantt",
36
+ "abstract": true
37
+ }
38
+ });
39
+
40
+ /**
41
+ * Returns the discontinuity provider of the skip pattern. Default value is null
42
+ * @return {sap.gantt.skipTime.DiscontinuousProvider} Discontinuity provider of the skip pattern
43
+ * @public
44
+ */
45
+ SkipPattern.prototype.getDiscontinuityProvider = function () {
46
+ return null;
47
+ };
48
+
49
+ /**
50
+ * Updates the discontinuity provider for the gantt chart timeline.
51
+ * @param {sap.gantt.skipTime.DiscontinuousProvider} oDiscontinuousProvider Discontinuous provider to be set
52
+ * @param {Boolean} bSuppressInvalidate Flag to suppress re-rendering of the control.
53
+ * @public
54
+ */
55
+ SkipPattern.prototype.updateDiscontinuousProvider = function (oDiscontinuousProvider, bSuppressInvalidate) {
56
+ var oAxisTimeStrategy = this.getParent();
57
+ if (oAxisTimeStrategy && oAxisTimeStrategy.isA("sap.gantt.axistime.StepwiseZoomStrategy")) {
58
+ delete oAxisTimeStrategy._nGanttVisibleWidth;
59
+ oAxisTimeStrategy.setProperty("_discontinuousProvider", oDiscontinuousProvider, bSuppressInvalidate);
60
+ }
61
+ };
62
+
63
+ return SkipPattern;
64
+ });
@@ -0,0 +1,118 @@
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/gantt/skipTime/SkipPattern",
9
+ "./WeeklyDiscontinuousProvider"
10
+ ], function (SkipPattern, WeeklyDiscontinuousProvider) {
11
+ "use strict";
12
+
13
+ /**
14
+ * Creates and initializes a new class for weekly time pattern.
15
+ *
16
+ * @param {string} [sId] ID of the new control. The ID is generated automatically if it is not provided.
17
+ * @param {object} [mSetting] Initial settings for the new control
18
+ *
19
+ * @class
20
+ * Enables the user to define weekly skip pattern.
21
+ * Non working hours are to be removed for timeLineOptions with innerInterval unit as <code>sap.gantt.config.TimeUnit.day<code>, <code>sap.gantt.config.TimeUnit.hour<code> and <code>sap.gantt.config.TimeUnit.minute<code>
22
+ *
23
+ * @extends sap.gantt.skipTime.SkipPattern
24
+ *
25
+ * @author SAP SE
26
+ * @version 1.127.0
27
+ * @since 1.126
28
+ *
29
+ * @constructor
30
+ * @public
31
+ * @alias sap.gantt.skipTime.WeekPattern
32
+ */
33
+
34
+ var WeekPattern = SkipPattern.extend("sap.gantt.skipTime.WeekPattern", /** @lends sap.gantt.skipTime.WeekPattern.prototype */ {
35
+ metadata: {
36
+ library: "sap.gantt",
37
+ defaultAggregation: "dailyIntervals",
38
+ properties: {
39
+ /**
40
+ * If this property is set to true, week pattern is applied to the gantt chart.
41
+ * @since 1.126
42
+ */
43
+ enabled: {type: "boolean", defaultValue: true}
44
+ },
45
+ aggregations: {
46
+ /**
47
+ * Day-wise non working time. These intervals are going to be skipped for the specified day.
48
+ * @since 1.126
49
+ */
50
+ dailyIntervals: {type: "sap.gantt.skipTime.DayInterval", multiple: true, singularName: "dailyInterval"},
51
+ /**
52
+ * Weekly non working time. This time is going to be skipped for all the days unless dailyIntervals are defined for that day.
53
+ * @since 1.126
54
+ */
55
+ weeklyIntervals: {type: "sap.gantt.skipTime.SkipInterval", multiple: true, singularName: "weeklyInterval"}
56
+ }
57
+ }
58
+ });
59
+
60
+ /**
61
+ * Utility method to format the time slices to d3fc supported value
62
+ * @returns {object} returns the formatted start and end pair
63
+ * @private
64
+ */
65
+ WeekPattern.prototype._getWeekPattern = function () {
66
+ var oWeeklyPattern = {};
67
+ var aDailyInterval = this.getDailyIntervals();
68
+ var aWeeklyInterval = this.getWeeklyIntervals();
69
+
70
+ var aAllDays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
71
+
72
+ if (aWeeklyInterval && aWeeklyInterval.length > 0) {
73
+ var aSkipWeekly = [];
74
+
75
+ aWeeklyInterval.forEach(function (oWeeklyInterval) {
76
+ aSkipWeekly.push(oWeeklyInterval._getFormattedTime());
77
+ });
78
+
79
+ aAllDays.forEach(function (sDay) {
80
+ oWeeklyPattern[sDay] = aSkipWeekly;
81
+ });
82
+ }
83
+
84
+ aDailyInterval.forEach(function (oDayInterval) {
85
+ var oDailyInterval = oDayInterval._getFormattedSkipIntervals();
86
+ if (oDailyInterval.length) {
87
+ oWeeklyPattern[oDayInterval.getDay()] = oDayInterval._getFormattedSkipIntervals();
88
+ }
89
+ });
90
+
91
+ return oWeeklyPattern;
92
+ };
93
+
94
+ /**
95
+ * Utility method to calculate the discontinuity provider for the week pattern
96
+ * @returns {object} returns the discontinuity provider of the week pattern
97
+ * @public
98
+ */
99
+ WeekPattern.prototype.getDiscontinuityProvider = function () {
100
+ if (this.getEnabled()) {
101
+ var oWeeklyPattern = this._getWeekPattern();
102
+ return Object.keys(oWeeklyPattern).length === 0 ? null : WeeklyDiscontinuousProvider.providers.weeklyPattern(oWeeklyPattern);
103
+ }
104
+ return null;
105
+ };
106
+ /**
107
+
108
+ * Method to enable or disable the week pattern
109
+ * @param {boolean} bEnable flag to enable or disable the week pattern
110
+ * @public
111
+ */
112
+ WeekPattern.prototype.setEnabled = function (bEnable) {
113
+ this.setProperty("enabled", bEnable, true);
114
+ this.updateDiscontinuousProvider(this.getDiscontinuityProvider());
115
+ };
116
+
117
+ return WeekPattern;
118
+ });