@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.
- package/package.json +1 -1
- package/src/sap/gantt/.library +6 -1
- package/src/sap/gantt/AdhocLine.js +1 -1
- package/src/sap/gantt/GanttChart.js +1 -1
- package/src/sap/gantt/GanttChartBase.js +1 -1
- package/src/sap/gantt/GanttChartContainer.js +1 -1
- package/src/sap/gantt/GanttChartWithTable.js +1 -1
- package/src/sap/gantt/axistime/AxisTimeStrategyBase.js +58 -8
- package/src/sap/gantt/axistime/FullScreenStrategy.js +1 -1
- package/src/sap/gantt/axistime/ProportionZoomStrategy.js +1 -1
- package/src/sap/gantt/axistime/StepwiseZoomStrategy.js +10 -4
- package/src/sap/gantt/changeHandlers/simple/AdhocLine.js +1 -1
- package/src/sap/gantt/changeHandlers/simple/DeltaLine.js +1 -1
- package/src/sap/gantt/changeHandlers/simple/GanttChartContainer.js +1 -1
- package/src/sap/gantt/changeHandlers/simple/GanttChartWithTable.js +1 -1
- package/src/sap/gantt/config/BirdEyeGroup.js +1 -1
- package/src/sap/gantt/config/ChartScheme.js +1 -1
- package/src/sap/gantt/config/ColumnAttribute.js +1 -1
- package/src/sap/gantt/config/ContainerLayout.js +1 -1
- package/src/sap/gantt/config/ExpandChart.js +1 -1
- package/src/sap/gantt/config/ExpandChartGroup.js +1 -1
- package/src/sap/gantt/config/GanttChartLayout.js +1 -1
- package/src/sap/gantt/config/Hierarchy.js +1 -1
- package/src/sap/gantt/config/HierarchyColumn.js +1 -1
- package/src/sap/gantt/config/LayoutGroup.js +1 -1
- package/src/sap/gantt/config/Locale.js +1 -1
- package/src/sap/gantt/config/Mode.js +1 -1
- package/src/sap/gantt/config/ModeGroup.js +1 -1
- package/src/sap/gantt/config/ObjectType.js +1 -1
- package/src/sap/gantt/config/SettingGroup.js +1 -1
- package/src/sap/gantt/config/SettingItem.js +1 -1
- package/src/sap/gantt/config/Shape.js +1 -1
- package/src/sap/gantt/config/TimeAxis.js +1 -1
- package/src/sap/gantt/config/TimeHorizon.js +1 -1
- package/src/sap/gantt/config/TimeZoomGroup.js +1 -1
- package/src/sap/gantt/config/ToolbarGroup.js +1 -1
- package/src/sap/gantt/config/ToolbarScheme.js +1 -1
- package/src/sap/gantt/control/Cell.js +1 -1
- package/src/sap/gantt/def/DefBase.js +1 -1
- package/src/sap/gantt/def/SvgDefs.js +1 -1
- package/src/sap/gantt/def/cal/Calendar.js +1 -1
- package/src/sap/gantt/def/cal/CalendarDefs.js +1 -1
- package/src/sap/gantt/def/cal/TimeInterval.js +1 -1
- package/src/sap/gantt/def/filter/MorphologyFilter.js +1 -1
- package/src/sap/gantt/def/gradient/LinearGradient.js +1 -1
- package/src/sap/gantt/def/gradient/RadialGradient.js +1 -1
- package/src/sap/gantt/def/gradient/Stop.js +1 -1
- package/src/sap/gantt/def/pattern/BackSlashPattern.js +1 -1
- package/src/sap/gantt/def/pattern/PatternBase.js +1 -1
- package/src/sap/gantt/def/pattern/SlashPattern.js +1 -1
- package/src/sap/gantt/drawer/Drawer.js +1 -1
- package/src/sap/gantt/eventHandler/AutoScrollHandler.js +1 -1
- package/src/sap/gantt/eventHandler/BirdEyeHandler.js +1 -1
- package/src/sap/gantt/eventHandler/MouseWheelHandler.js +1 -1
- package/src/sap/gantt/eventHandler/ShapeHoverHandler.js +1 -1
- package/src/sap/gantt/eventHandler/ShapeResizeHandler.js +1 -1
- package/src/sap/gantt/eventHandler/TimePeriodZoomHandler.js +1 -1
- package/src/sap/gantt/eventHandler/TimePopoverHandler.js +1 -1
- package/src/sap/gantt/layouts/SidePanel.js +1 -1
- package/src/sap/gantt/legend/DimensionLegend.js +1 -1
- package/src/sap/gantt/legend/LegendBase.js +1 -1
- package/src/sap/gantt/legend/LegendContainer.js +1 -1
- package/src/sap/gantt/legend/ListLegend.js +1 -1
- package/src/sap/gantt/library.js +13 -3
- package/src/sap/gantt/messagebundle_sh.properties +30 -30
- package/src/sap/gantt/misc/AxisTime.js +80 -22
- package/src/sap/gantt/misc/Memoizer.js +1 -1
- package/src/sap/gantt/misc/RelativeTimeFormatter.js +1 -1
- package/src/sap/gantt/misc/ShapeManager.js +1 -1
- package/src/sap/gantt/overlays/GanttRowOverlay.js +80 -16
- package/src/sap/gantt/overlays/Overlay.js +1 -1
- package/src/sap/gantt/polyfills/lib.js +1 -1
- package/src/sap/gantt/polyfills/time.js +7 -7
- package/src/sap/gantt/polyfills/{time-utils → timeUtils}/dayCount.js +1 -1
- package/src/sap/gantt/shape/Circle.js +1 -1
- package/src/sap/gantt/shape/ClipPath.js +1 -1
- package/src/sap/gantt/shape/Definitions.js +1 -1
- package/src/sap/gantt/shape/Group.js +1 -1
- package/src/sap/gantt/shape/Image.js +1 -1
- package/src/sap/gantt/shape/Line.js +1 -1
- package/src/sap/gantt/shape/Path.js +1 -1
- package/src/sap/gantt/shape/Polygon.js +1 -1
- package/src/sap/gantt/shape/Polyline.js +1 -1
- package/src/sap/gantt/shape/Rectangle.js +1 -1
- package/src/sap/gantt/shape/ResizeShadowShape.js +1 -1
- package/src/sap/gantt/shape/SelectedShape.js +1 -1
- package/src/sap/gantt/shape/Shape.js +1 -1
- package/src/sap/gantt/shape/Text.js +1 -1
- package/src/sap/gantt/shape/cal/Calendar.js +1 -1
- package/src/sap/gantt/shape/ext/Chevron.js +1 -1
- package/src/sap/gantt/shape/ext/Cursor.js +1 -1
- package/src/sap/gantt/shape/ext/Diamond.js +1 -1
- package/src/sap/gantt/shape/ext/Iconfont.js +1 -1
- package/src/sap/gantt/shape/ext/Pentangle.js +1 -1
- package/src/sap/gantt/shape/ext/TextRepeat.js +1 -1
- package/src/sap/gantt/shape/ext/Triangle.js +1 -1
- package/src/sap/gantt/shape/ext/rls/Relationship.js +1 -1
- package/src/sap/gantt/shape/ext/rls/SelectedRelationship.js +2 -2
- package/src/sap/gantt/shape/ext/ubc/UbcBorderPath.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcOverCapacityZonePolygon.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcPolygon.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcShortageCapacityPolygon.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcTooltipRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcUnderCapacityZonePolygon.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcUsedPolygon.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UtilizationBarChart.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcBorderPath.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcClipPath.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcClipingPath.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcDimension.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcMiddleLine.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcOverCapacityZoneRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcOverClipRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcTooltipRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcUnderClipRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UtilizationLineChart.js +1 -1
- package/src/sap/gantt/simple/AdhocDiamond.js +1 -1
- package/src/sap/gantt/simple/AdhocLine.js +1 -1
- package/src/sap/gantt/simple/AggregationUtils.js +11 -58
- package/src/sap/gantt/simple/BaseCalendar.js +1 -1
- package/src/sap/gantt/simple/BaseChevron.js +1 -1
- package/src/sap/gantt/simple/BaseConditionalShape.js +1 -1
- package/src/sap/gantt/simple/BaseCursor.js +1 -1
- package/src/sap/gantt/simple/BaseDeltaRectangle.js +4 -1
- package/src/sap/gantt/simple/BaseDiamond.js +1 -1
- package/src/sap/gantt/simple/BaseGroup.js +1 -1
- package/src/sap/gantt/simple/BaseImage.js +1 -1
- package/src/sap/gantt/simple/BaseLine.js +1 -1
- package/src/sap/gantt/simple/BasePath.js +1 -1
- package/src/sap/gantt/simple/BasePseudoShape.js +1 -1
- package/src/sap/gantt/simple/BaseRectangle.js +4 -1
- package/src/sap/gantt/simple/BaseShape.js +1 -1
- package/src/sap/gantt/simple/BaseText.js +1 -1
- package/src/sap/gantt/simple/BaseTriangle.js +1 -1
- package/src/sap/gantt/simple/ContainerToolbar.js +13 -4
- package/src/sap/gantt/simple/ContainerToolbarPlaceholder.js +1 -1
- package/src/sap/gantt/simple/CoordinateUtils.js +1 -1
- package/src/sap/gantt/simple/CustomVariantHandler.js +1 -1
- package/src/sap/gantt/simple/DeltaLine.js +1 -1
- package/src/sap/gantt/simple/ExpandModel.js +1 -3
- package/src/sap/gantt/simple/GanttAdaptationData.js +1 -1
- package/src/sap/gantt/simple/GanttChartContainer.js +8 -2
- package/src/sap/gantt/simple/GanttChartWithTable.js +36 -2
- package/src/sap/gantt/simple/GanttDragDropExtension.js +8 -1
- package/src/sap/gantt/simple/GanttExtension.js +1 -1
- package/src/sap/gantt/simple/GanttHeader.js +1 -1
- package/src/sap/gantt/simple/GanttPointerExtension.js +1 -1
- package/src/sap/gantt/simple/GanttPopoverExtension.js +1 -1
- package/src/sap/gantt/simple/GanttPrinting.js +3 -2
- package/src/sap/gantt/simple/GanttRowAction.js +1 -1
- package/src/sap/gantt/simple/GanttRowSettings.js +30 -1
- package/src/sap/gantt/simple/GanttScrollExtension.js +19 -4
- package/src/sap/gantt/simple/GanttUtils.js +85 -0
- package/src/sap/gantt/simple/InnerGanttChart.js +1 -1
- package/src/sap/gantt/simple/LegendContainer.js +1 -1
- package/src/sap/gantt/simple/LegendShapeGroup.js +1 -1
- package/src/sap/gantt/simple/MultiActivityGroup.js +1 -1
- package/src/sap/gantt/simple/MultiActivityRowSettings.js +1 -1
- package/src/sap/gantt/simple/Relationship.js +1 -1
- package/src/sap/gantt/simple/ShapeScheme.js +1 -1
- package/src/sap/gantt/simple/StockChart.js +1 -1
- package/src/sap/gantt/simple/StockChartDimension.js +1 -1
- package/src/sap/gantt/simple/StockChartPeriod.js +1 -1
- package/src/sap/gantt/simple/UtilizationBarChart.js +1 -1
- package/src/sap/gantt/simple/UtilizationChart.js +4 -1
- package/src/sap/gantt/simple/UtilizationDimension.js +1 -1
- package/src/sap/gantt/simple/UtilizationLineChart.js +1 -1
- package/src/sap/gantt/simple/UtilizationPeriod.js +1 -1
- package/src/sap/gantt/simple/shapes/Shape.js +1 -1
- package/src/sap/gantt/simple/shapes/Task.js +1 -1
- package/src/sap/gantt/skipTime/DayInterval.js +63 -0
- package/src/sap/gantt/skipTime/DiscontinuousProvider.js +48 -0
- package/src/sap/gantt/skipTime/SkipInterval.js +76 -0
- package/src/sap/gantt/skipTime/SkipPattern.js +64 -0
- package/src/sap/gantt/skipTime/WeekPattern.js +118 -0
- package/src/sap/gantt/skipTime/WeeklyDiscontinuousProvider.js +78 -0
- package/src/sap/gantt/themes/sap_hcb/base_Gantt.less +899 -0
- package/src/sap/gantt/themes/sap_hcb/base_GanttPrinting.less +101 -0
- package/src/sap/gantt/themes/sap_hcb/base_GanttSyncedControl.less +96 -0
- package/src/sap/gantt/themes/sap_hcb/library.source.less +15 -1
- package/src/sap/gantt/thirdparty/d3fc-discontinuous-scale.js +1129 -0
- package/src/sap/gantt/thirdparty/d3fc-rebind.js +103 -0
- package/src/sap/gantt/thirdparty/licenses/d3fc-MIT-LICENSE.txt +21 -0
- /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/day.js +0 -0
- /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/days.js +0 -0
- /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/interval.js +0 -0
- /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/millisecond.js +0 -0
- /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/monday.js +0 -0
- /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/saturday.js +0 -0
- /package/src/sap/gantt/polyfills/{time-utils → timeUtils}/weeks.js +0 -0
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @extends sap.gantt.simple.BaseShape
|
|
24
24
|
*
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
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];
|
|
@@ -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.
|
|
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
|
|
|
@@ -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.
|
|
20
|
+
* @version 1.126.0
|
|
21
21
|
*
|
|
22
22
|
* @private
|
|
23
23
|
* @static
|
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @extends sap.gantt.simple.ExpandModel
|
|
27
27
|
*
|
|
28
28
|
* @author SAP SE
|
|
29
|
-
* @version 1.
|
|
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
|
}
|
|
@@ -52,7 +52,7 @@ sap.ui.define([
|
|
|
52
52
|
* @extends sap.ui.core.Control
|
|
53
53
|
*
|
|
54
54
|
* @author SAP SE
|
|
55
|
-
* @version 1.
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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
|
|
|
@@ -158,7 +158,7 @@ sap.ui.define([
|
|
|
158
158
|
* @extend sap.ui.core.Element
|
|
159
159
|
*
|
|
160
160
|
* @author SAP SE
|
|
161
|
-
* @version 1.
|
|
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
|
|
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.RowSettings
|
|
28
28
|
*
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
|