@sapui5/sap.suite.ui.commons 1.145.1 → 1.147.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/suite/ui/commons/.library +1 -1
- package/src/sap/suite/ui/commons/AriaProperties.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilder.js +83 -4
- package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +87 -14
- package/src/sap/suite/ui/commons/CalculationBuilderFunction.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderGroup.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderInput.js +11 -0
- package/src/sap/suite/ui/commons/CalculationBuilderItem.js +16 -3
- package/src/sap/suite/ui/commons/CalculationBuilderValidationResult.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderVariable.js +1 -1
- package/src/sap/suite/ui/commons/CloudFilePicker.js +1 -1
- package/src/sap/suite/ui/commons/ControlProxy.js +7 -4
- package/src/sap/suite/ui/commons/MicroProcessFlow.js +1 -1
- package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +1 -1
- package/src/sap/suite/ui/commons/ProcessFlowRenderer.js +3 -0
- package/src/sap/suite/ui/commons/collaboration/ContactHelper.js +5 -1
- package/src/sap/suite/ui/commons/collaboration/ContactPopover.fragment.xml +10 -10
- package/src/sap/suite/ui/commons/collaboration/MinimalContactPopover.fragment.xml +12 -10
- package/src/sap/suite/ui/commons/collaboration/ServiceContainer.js +12 -2
- package/src/sap/suite/ui/commons/flexibility/changeHandler/PropertyChangeMapper.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropCustomShapeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropEllipseHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropRectangleHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CustomSizeItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FilterHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FlipHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/HistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditor.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorContainer.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorResponsiveContainer.js +9 -6
- package/src/sap/suite/ui/commons/imageeditor/ResizeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/RotateHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/library.js +4 -4
- package/src/sap/suite/ui/commons/messagebundle.properties +16 -8
- package/src/sap/suite/ui/commons/messagebundle_ar.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_bg.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_ca.properties +10 -4
- package/src/sap/suite/ui/commons/messagebundle_cnr.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_cs.properties +7 -1
- package/src/sap/suite/ui/commons/messagebundle_cy.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_da.properties +10 -4
- package/src/sap/suite/ui/commons/messagebundle_de.properties +8 -2
- package/src/sap/suite/ui/commons/messagebundle_el.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_en.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_en_GB.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_en_US_saprigi.properties +9 -5
- package/src/sap/suite/ui/commons/messagebundle_es.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_es_MX.properties +10 -4
- package/src/sap/suite/ui/commons/messagebundle_et.properties +6 -0
- package/src/sap/suite/ui/commons/messagebundle_fi.properties +10 -4
- package/src/sap/suite/ui/commons/messagebundle_fr.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_fr_CA.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_hi.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_hr.properties +10 -4
- package/src/sap/suite/ui/commons/messagebundle_hu.properties +9 -3
- package/src/sap/suite/ui/commons/messagebundle_id.properties +12 -6
- package/src/sap/suite/ui/commons/messagebundle_it.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_iw.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_ja.properties +9 -3
- package/src/sap/suite/ui/commons/messagebundle_kk.properties +10 -4
- package/src/sap/suite/ui/commons/messagebundle_ko.properties +10 -4
- package/src/sap/suite/ui/commons/messagebundle_lt.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_lv.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_mk.properties +9 -3
- package/src/sap/suite/ui/commons/messagebundle_ms.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_nl.properties +8 -2
- package/src/sap/suite/ui/commons/messagebundle_no.properties +10 -4
- package/src/sap/suite/ui/commons/messagebundle_pl.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_pt.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_pt_PT.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_ro.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_ru.properties +12 -6
- package/src/sap/suite/ui/commons/messagebundle_sh.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_sk.properties +10 -4
- package/src/sap/suite/ui/commons/messagebundle_sl.properties +10 -4
- package/src/sap/suite/ui/commons/messagebundle_sr.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_sv.properties +10 -4
- package/src/sap/suite/ui/commons/messagebundle_th.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_tr.properties +8 -2
- package/src/sap/suite/ui/commons/messagebundle_uk.properties +14 -8
- package/src/sap/suite/ui/commons/messagebundle_vi.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_zh_CN.properties +11 -5
- package/src/sap/suite/ui/commons/messagebundle_zh_TW.properties +11 -5
- package/src/sap/suite/ui/commons/networkgraph/Graph.js +149 -40
- package/src/sap/suite/ui/commons/networkgraph/GraphMap.js +25 -3
- package/src/sap/suite/ui/commons/networkgraph/KeyboardNavigator.js +332 -13
- package/src/sap/suite/ui/commons/networkgraph/Line.js +110 -12
- package/src/sap/suite/ui/commons/networkgraph/Node.js +67 -5
- package/src/sap/suite/ui/commons/networkgraph/Utils.js +249 -10
- package/src/sap/suite/ui/commons/networkgraph/layout/NoopLayout.js +55 -8
- package/src/sap/suite/ui/commons/networkgraph/util/ConnectionPathUtils.js +34 -4
- package/src/sap/suite/ui/commons/networkgraph/util/DependencyLayoutHelper.js +230 -82
- package/src/sap/suite/ui/commons/networkgraph/util/DragDropManager.js +52 -50
- package/src/sap/suite/ui/commons/networkgraph/util/PortManager.js +12 -3
- package/src/sap/suite/ui/commons/statusindicator/Circle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/CustomShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/DiscreteThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/FillingOption.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/LibraryShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Path.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/PropertyThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Rectangle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Shape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/ShapeGroup.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/SimpleShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/StatusIndicator.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccount.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountGroup.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItem.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItemProperty.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountPanel.js +1 -1
- package/src/sap/suite/ui/commons/themes/base/BusinessCard.less +5 -4
- package/src/sap/suite/ui/commons/themes/base/CalculationBuilder.less +33 -24
- package/src/sap/suite/ui/commons/themes/base/CalculationBuilderExpression.less +40 -31
- package/src/sap/suite/ui/commons/themes/base/CalculationBuilderInput.less +26 -10
- package/src/sap/suite/ui/commons/themes/base/CalculationBuilderItem.less +76 -63
- package/src/sap/suite/ui/commons/themes/base/ChartContainer.less +8 -11
- package/src/sap/suite/ui/commons/themes/base/ChartTile.less +5 -8
- package/src/sap/suite/ui/commons/themes/base/CollaborationPopover.less +116 -106
- package/src/sap/suite/ui/commons/themes/base/DateRangeScroller.less +5 -5
- package/src/sap/suite/ui/commons/themes/base/DateRangeSliderInternal.less +9 -10
- package/src/sap/suite/ui/commons/themes/base/FacetOverview.less +9 -10
- package/src/sap/suite/ui/commons/themes/base/FeedItemHeader.less +9 -12
- package/src/sap/suite/ui/commons/themes/base/FeedTile.less +23 -27
- package/src/sap/suite/ui/commons/themes/base/GenericTile2X2.less +15 -15
- package/src/sap/suite/ui/commons/themes/base/HeaderCell.less +7 -6
- package/src/sap/suite/ui/commons/themes/base/HeaderContainer.less +35 -37
- package/src/sap/suite/ui/commons/themes/base/ImageEditor.less +28 -10
- package/src/sap/suite/ui/commons/themes/base/ImageEditorContainer.less +29 -22
- package/src/sap/suite/ui/commons/themes/base/InfoTile.less +10 -4
- package/src/sap/suite/ui/commons/themes/base/InfoTileSize.less +5 -4
- package/src/sap/suite/ui/commons/themes/base/KpiTile.less +10 -11
- package/src/sap/suite/ui/commons/themes/base/LaunchTile.less +9 -8
- package/src/sap/suite/ui/commons/themes/base/LinkActionSheet.less +14 -43
- package/src/sap/suite/ui/commons/themes/base/MicroProcessFlow.less +51 -47
- package/src/sap/suite/ui/commons/themes/base/MonitoringContent.less +5 -5
- package/src/sap/suite/ui/commons/themes/base/NetworkGraph.less +57 -62
- package/src/sap/suite/ui/commons/themes/base/NetworkGroup.less +61 -65
- package/src/sap/suite/ui/commons/themes/base/NetworkLine.less +58 -55
- package/src/sap/suite/ui/commons/themes/base/NetworkNode.less +3 -0
- package/src/sap/suite/ui/commons/themes/base/NetworkTooltip.less +21 -25
- package/src/sap/suite/ui/commons/themes/base/NoteTaker.less +13 -18
- package/src/sap/suite/ui/commons/themes/base/NoteTakerCard.less +26 -27
- package/src/sap/suite/ui/commons/themes/base/NoteTakerFeeder.less +22 -44
- package/src/sap/suite/ui/commons/themes/base/NumericTile.less +7 -5
- package/src/sap/suite/ui/commons/themes/base/PictureZoomIn.less +6 -5
- package/src/sap/suite/ui/commons/themes/base/ProcessFlow.less +57 -76
- package/src/sap/suite/ui/commons/themes/base/ProcessFlowConnection.less +71 -17
- package/src/sap/suite/ui/commons/themes/base/ProcessFlowConnectionLabel.less +9 -13
- package/src/sap/suite/ui/commons/themes/base/ProcessFlowLaneHeader.less +37 -96
- package/src/sap/suite/ui/commons/themes/base/ProcessFlowNode.less +219 -238
- package/src/sap/suite/ui/commons/themes/base/SemanticColorMixins.less +55 -0
- package/src/sap/suite/ui/commons/themes/base/SplitButton.less +7 -20
- package/src/sap/suite/ui/commons/themes/base/StatusIndicator.less +10 -9
- package/src/sap/suite/ui/commons/themes/base/TAccount.less +78 -73
- package/src/sap/suite/ui/commons/themes/base/TargetFilter.less +50 -58
- package/src/sap/suite/ui/commons/themes/base/ThingCollection.less +18 -13
- package/src/sap/suite/ui/commons/themes/base/ThreePanelThingViewer.less +14 -14
- package/src/sap/suite/ui/commons/themes/base/TileContent2X2.less +9 -13
- package/src/sap/suite/ui/commons/themes/base/Timeline.less +16 -19
- package/src/sap/suite/ui/commons/themes/base/TimelineItem.less +95 -103
- package/src/sap/suite/ui/commons/themes/base/UnifiedThingGroup.less +7 -9
- package/src/sap/suite/ui/commons/themes/base/UnifiedThingInspector.less +12 -9
- package/src/sap/suite/ui/commons/themes/base/VerticalNavigationBar.less +10 -15
- package/src/sap/suite/ui/commons/themes/base/ViewRepeater.less +8 -9
- package/src/sap/suite/ui/commons/themes/base/library.source.less +0 -2
- package/src/sap/suite/ui/commons/themes/sap_fiori_3/MicroProcessFlow.less +9 -3
- package/src/sap/suite/ui/commons/themes/sap_fiori_3/ProcessFlowConnection.less +14 -7
- package/src/sap/suite/ui/commons/themes/sap_fiori_3/ProcessFlowConnectionLabel.less +38 -35
- package/src/sap/suite/ui/commons/themes/sap_fiori_3/ProcessFlowLaneHeader.less +29 -30
- package/src/sap/suite/ui/commons/themes/sap_fiori_3/ProcessFlowNode.less +158 -102
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_dark/MicroProcessFlow.less +9 -3
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_dark/ProcessFlowConnection.less +14 -7
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_dark/ProcessFlowConnectionLabel.less +38 -35
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_dark/ProcessFlowLaneHeader.less +30 -31
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_dark/ProcessFlowNode.less +157 -101
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcb/ProcessFlowConnection.less +14 -7
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcb/ProcessFlowConnectionLabel.less +38 -35
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcb/ProcessFlowLaneHeader.less +30 -31
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcb/ProcessFlowNode.less +147 -101
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcw/ProcessFlowConnection.less +14 -7
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcw/ProcessFlowConnectionLabel.less +38 -35
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcw/ProcessFlowLaneHeader.less +30 -31
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcw/ProcessFlowNode.less +158 -102
- package/src/sap/suite/ui/commons/themes/sap_horizon/MicroProcessFlow.less +5 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon/NetworkLine.less +12 -8
- package/src/sap/suite/ui/commons/themes/sap_horizon/ProcessFlowConnection.less +17 -10
- package/src/sap/suite/ui/commons/themes/sap_horizon/ProcessFlowConnectionLabel.less +154 -133
- package/src/sap/suite/ui/commons/themes/sap_horizon/ProcessFlowLaneHeader.less +30 -32
- package/src/sap/suite/ui/commons/themes/sap_horizon/ProcessFlowNode.less +113 -214
- package/src/sap/suite/ui/commons/themes/sap_horizon/TimelineItem.less +43 -39
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/MicroProcessFlow.less +5 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/NetworkLine.less +12 -12
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/ProcessFlowConnection.less +17 -10
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/ProcessFlowConnectionLabel.less +154 -133
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/ProcessFlowLaneHeader.less +30 -31
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/ProcessFlowNode.less +114 -216
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/TimelineItem.less +41 -39
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/MicroProcessFlow.less +4 -4
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/ProcessFlowConnection.less +17 -10
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/ProcessFlowConnectionLabel.less +153 -131
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/ProcessFlowLaneHeader.less +29 -30
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/ProcessFlowNode.less +159 -103
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/TimelineItem.less +41 -39
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/MicroProcessFlow.less +4 -4
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/ProcessFlowConnection.less +16 -9
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/ProcessFlowConnectionLabel.less +153 -131
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/ProcessFlowLaneHeader.less +29 -30
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/ProcessFlowNode.less +157 -101
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/TimelineItem.less +41 -39
- package/src/sap/suite/ui/commons/windowmessages/CollaborationMessageConsumer.js +3 -3
- package/src/sap/suite/ui/commons/themes/base/DateRangeSlider.less +0 -3
- package/src/sap/suite/ui/commons/themes/base/MonitoringTile.less +0 -3
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
sap.ui.define([], function () {
|
|
8
|
+
sap.ui.define(["sap/base/Log"], function (Log) {
|
|
9
9
|
"use strict";
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -24,6 +24,8 @@ sap.ui.define([], function () {
|
|
|
24
24
|
'BACKGROUND-COLOR': 'backgroundSemanticColor',
|
|
25
25
|
BORDER: 'borderSemanticColor',
|
|
26
26
|
'BORDER-COLOR': 'borderSemanticColor',
|
|
27
|
+
OUTLINE: 'outlineSemanticColor',
|
|
28
|
+
'OUTLINE-COLOR': 'outlineSemanticColor',
|
|
27
29
|
TEXT: 'textSemanticColor',
|
|
28
30
|
FILL: 'fillSemanticColor',
|
|
29
31
|
STROKE: 'strokeSemanticColor',
|
|
@@ -73,15 +75,252 @@ sap.ui.define([], function () {
|
|
|
73
75
|
* @returns {function} throttled function.
|
|
74
76
|
*/
|
|
75
77
|
Utils.throttle = (mainFunction, delay) => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
return (...args) => {
|
|
79
|
+
if (timeFlag === null) {
|
|
80
|
+
mainFunction(...args);
|
|
81
|
+
timeFlag = setTimeout(() => {
|
|
82
|
+
timeFlag = null;
|
|
83
|
+
}, delay);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Helper function to convert CSS outline to border for drag image elements.
|
|
90
|
+
* This is needed because some browsers don't capture outline in drag images.
|
|
91
|
+
*
|
|
92
|
+
* @param {HTMLElement} oElement - The DOM element to apply border to
|
|
93
|
+
* @param {CSSStyleDeclaration} oComputedStyle - The computed style of the element
|
|
94
|
+
* @param {string} [sBorderProperty="border"] - The CSS border property to set ("border", "borderBottom", etc.)
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
var _applyOutlineAsBorder = function (oElement, oComputedStyle, sBorderProperty) {
|
|
98
|
+
var sOutlineWidth = oComputedStyle.outlineWidth;
|
|
99
|
+
if (sOutlineWidth && sOutlineWidth !== "0px") {
|
|
100
|
+
var sBorderValue = sOutlineWidth + " " + oComputedStyle.outlineStyle + " " + oComputedStyle.outlineColor;
|
|
101
|
+
oElement.style[sBorderProperty || "border"] = sBorderValue;
|
|
102
|
+
oElement.style.outline = "none";
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Clones the inner div element and applies basic styles for drag image.
|
|
108
|
+
*
|
|
109
|
+
* @param {HTMLElement} oInnerDiv - Inner div element to clone
|
|
110
|
+
* @returns {HTMLElement} The cloned and styled node
|
|
111
|
+
* @private
|
|
112
|
+
*/
|
|
113
|
+
var _cloneAndStyleNode = function (oInnerDiv) {
|
|
114
|
+
var oClonedNode = oInnerDiv.cloneNode(true);
|
|
115
|
+
var oComputedStyle = window.getComputedStyle(oInnerDiv);
|
|
116
|
+
|
|
117
|
+
// Apply computed styles to ensure the clone looks identical
|
|
118
|
+
oClonedNode.style.width = oComputedStyle.width;
|
|
119
|
+
oClonedNode.style.height = oComputedStyle.height;
|
|
120
|
+
oClonedNode.style.position = "absolute";
|
|
121
|
+
oClonedNode.style.top = "-9999px";
|
|
122
|
+
oClonedNode.style.left = "-9999px";
|
|
123
|
+
oClonedNode.style.pointerEvents = "none";
|
|
124
|
+
|
|
125
|
+
// Convert outline to border for the drag image
|
|
126
|
+
_applyOutlineAsBorder(oClonedNode, oComputedStyle);
|
|
127
|
+
|
|
128
|
+
// Retain border-radius for rounded corners
|
|
129
|
+
var sBorderRadius = oComputedStyle.borderRadius;
|
|
130
|
+
if (sBorderRadius && sBorderRadius !== "0px") {
|
|
131
|
+
oClonedNode.style.borderRadius = sBorderRadius;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Retain background color
|
|
135
|
+
var sBackgroundColor = oComputedStyle.backgroundColor;
|
|
136
|
+
if (sBackgroundColor) {
|
|
137
|
+
oClonedNode.style.backgroundColor = sBackgroundColor;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return oClonedNode;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Processes header element styling in the cloned node.
|
|
145
|
+
*
|
|
146
|
+
* @param {HTMLElement} oClonedNode - The cloned node to process
|
|
147
|
+
* @param {HTMLElement} oInnerDiv - Original inner div element
|
|
148
|
+
* @private
|
|
149
|
+
*/
|
|
150
|
+
var _processHeaderElement = function (oClonedNode, oInnerDiv) {
|
|
151
|
+
var oOriginalHeader = oInnerDiv.querySelector(".sapSuiteUiCommonsNetworkGraphDivHeader");
|
|
152
|
+
if (!oOriginalHeader) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
var oHeaderComputedStyle = window.getComputedStyle(oOriginalHeader);
|
|
157
|
+
var oHeaderElement = oClonedNode.querySelector(".sapSuiteUiCommonsNetworkGraphDivHeader");
|
|
158
|
+
|
|
159
|
+
if (!oHeaderElement) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Retain header background color
|
|
164
|
+
if (oHeaderComputedStyle.backgroundColor) {
|
|
165
|
+
oHeaderElement.style.backgroundColor = oHeaderComputedStyle.backgroundColor;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Convert header outline to border
|
|
169
|
+
_applyOutlineAsBorder(oHeaderElement, oHeaderComputedStyle, "borderBottom");
|
|
170
|
+
|
|
171
|
+
// Process separate header color wrapper if it exists (skip if combined class)
|
|
172
|
+
if (!oHeaderElement.classList.contains("sapSuiteUiCommonsNetworkGraphDivHeaderColor")) {
|
|
173
|
+
var oOriginalHeaderColor = oInnerDiv.querySelector(".sapSuiteUiCommonsNetworkGraphDivHeaderColor");
|
|
174
|
+
if (oOriginalHeaderColor) {
|
|
175
|
+
var oHeaderColorComputedStyle = window.getComputedStyle(oOriginalHeaderColor);
|
|
176
|
+
var oHeaderColorElement = oHeaderElement.querySelector(".sapSuiteUiCommonsNetworkGraphDivHeaderColor");
|
|
177
|
+
|
|
178
|
+
if (oHeaderColorElement) {
|
|
179
|
+
// Retain border
|
|
180
|
+
if (oHeaderColorComputedStyle.border && oHeaderColorComputedStyle.border !== "0px none rgb(0, 0, 0)") {
|
|
181
|
+
oHeaderColorElement.style.border = oHeaderColorComputedStyle.border;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Retain border-radius
|
|
185
|
+
if (oHeaderColorComputedStyle.borderRadius && oHeaderColorComputedStyle.borderRadius !== "0px") {
|
|
186
|
+
oHeaderColorElement.style.borderRadius = oHeaderColorComputedStyle.borderRadius;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Retain background color
|
|
190
|
+
if (oHeaderColorComputedStyle.backgroundColor) {
|
|
191
|
+
oHeaderColorElement.style.backgroundColor = oHeaderColorComputedStyle.backgroundColor;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Retain color
|
|
195
|
+
if (oHeaderColorComputedStyle.color) {
|
|
196
|
+
oHeaderColorElement.style.color = oHeaderColorComputedStyle.color;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Creates a custom drag image for the node that includes borders, border-radius, and background colors.
|
|
205
|
+
* This is necessary because the default browser drag image doesn't capture CSS outline properties for few browsers e.g. Chrome.
|
|
206
|
+
*
|
|
207
|
+
* @param {sap.suite.ui.commons.networkgraph.Node} oNode - The node being dragged
|
|
208
|
+
* @param {Event} oBrowserEvent - The native browser drag event
|
|
209
|
+
* @returns {HTMLElement|null} The cloned node attached to DOM, or null if creation failed. Caller is responsible for cleanup.
|
|
210
|
+
*/
|
|
211
|
+
Utils.createCustomDragImage = function (oNode, oBrowserEvent) {
|
|
212
|
+
if (!oNode || !oBrowserEvent || !oBrowserEvent.dataTransfer) {
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// Get the graph instance to check the ghost image mode
|
|
217
|
+
var oGraph = oNode.getParent();
|
|
218
|
+
if (!oGraph) {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
try {
|
|
223
|
+
var oDomRef = oNode.getDomRef();
|
|
224
|
+
if (!oDomRef) {
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
var oInnerDiv = oDomRef.querySelector(".sapSuiteUiCommonsNetworkGraphDivInner");
|
|
229
|
+
if (!oInnerDiv) {
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// Clone and apply basic styles
|
|
234
|
+
var oClonedNode = _cloneAndStyleNode(oInnerDiv);
|
|
235
|
+
|
|
236
|
+
// Process header element styling
|
|
237
|
+
_processHeaderElement(oClonedNode, oInnerDiv);
|
|
238
|
+
|
|
239
|
+
// Attach to DOM temporarily
|
|
240
|
+
document.body.appendChild(oClonedNode);
|
|
241
|
+
|
|
242
|
+
// Set drag image with correct offset
|
|
243
|
+
var oRect = oInnerDiv.getBoundingClientRect();
|
|
244
|
+
var iOffsetX = oBrowserEvent.clientX - oRect.left;
|
|
245
|
+
var iOffsetY = oBrowserEvent.clientY - oRect.top;
|
|
246
|
+
oBrowserEvent.dataTransfer.setDragImage(oClonedNode, iOffsetX, iOffsetY);
|
|
247
|
+
|
|
248
|
+
// Return the cloned node for cleanup by caller
|
|
249
|
+
return oClonedNode;
|
|
250
|
+
} catch (oError) {
|
|
251
|
+
Log.warning("Utils: Failed to create custom drag image", oError);
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Retains the scroll position of the graph after DOM operations.
|
|
258
|
+
* This method ensures that the viewport remains stable after operations like
|
|
259
|
+
* drag-drop, connection creation, or other DOM manipulations.
|
|
260
|
+
*
|
|
261
|
+
* @param {sap.suite.ui.commons.networkgraph.Graph} oGraph - The graph control
|
|
262
|
+
* @param {number} scrollLeft - The horizontal scroll position to maintain
|
|
263
|
+
* @param {number} scrollTop - The vertical scroll position to maintain
|
|
264
|
+
*/
|
|
265
|
+
Utils.retainScrollPosition = function (oGraph, scrollLeft, scrollTop) {
|
|
266
|
+
if (!oGraph || !oGraph.$scroller || !oGraph.$scroller[0]) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const scrollerElement = oGraph.$scroller[0];
|
|
271
|
+
|
|
272
|
+
// Use requestAnimationFrame for better performance and timing
|
|
273
|
+
requestAnimationFrame(() => {
|
|
274
|
+
try {
|
|
275
|
+
scrollerElement.scrollLeft = scrollLeft;
|
|
276
|
+
scrollerElement.scrollTop = scrollTop;
|
|
277
|
+
|
|
278
|
+
// Fallback verification - ensure the scroll position was actually set
|
|
279
|
+
if (Math.abs(scrollerElement.scrollLeft - scrollLeft) > 1 ||
|
|
280
|
+
Math.abs(scrollerElement.scrollTop - scrollTop) > 1) {
|
|
281
|
+
|
|
282
|
+
// If the scroll position wasn't set correctly, try again after DOM updates
|
|
283
|
+
setTimeout(() => {
|
|
284
|
+
scrollerElement.scrollLeft = scrollLeft;
|
|
285
|
+
scrollerElement.scrollTop = scrollTop;
|
|
286
|
+
}, 10);
|
|
287
|
+
}
|
|
288
|
+
} catch (error) {
|
|
289
|
+
Log.error("retainScrollPosition: Error setting scroll position - " + error.message, "sap.suite.ui.commons.networkgraph.Utils");
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Preserves the scroll position of the graph by scheduling restoration after DOM updates.
|
|
296
|
+
* This is a convenience wrapper that handles the setTimeout + restoration logic.
|
|
297
|
+
*
|
|
298
|
+
* @param {sap.suite.ui.commons.networkgraph.Graph} oGraph - The graph control
|
|
299
|
+
* @param {number} scrollLeft - The horizontal scroll position to restore
|
|
300
|
+
* @param {number} scrollTop - The vertical scroll position to restore
|
|
301
|
+
* @param {number} [iDelay=0] - Delay in milliseconds before restoring scroll position
|
|
302
|
+
* @public
|
|
303
|
+
*/
|
|
304
|
+
Utils.preserveScrollPosition = function (oGraph, scrollLeft, scrollTop, iDelay) {
|
|
305
|
+
if (!oGraph || !oGraph.$scroller || !oGraph.$scroller[0]) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const delay = typeof iDelay === "number" ? iDelay : 0;
|
|
310
|
+
|
|
311
|
+
// Schedule restoration after DOM updates
|
|
312
|
+
setTimeout(() => {
|
|
313
|
+
Utils.retainScrollPosition(oGraph, scrollLeft, scrollTop);
|
|
314
|
+
}, delay);
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
// RTL swap map for connection types: mirrors Left↔Right side labels.
|
|
318
|
+
Utils.mRTLSwap = {
|
|
319
|
+
"LeftToLeft": "RightToRight",
|
|
320
|
+
"LeftToRight": "RightToLeft",
|
|
321
|
+
"RightToLeft": "LeftToRight",
|
|
322
|
+
"RightToRight": "LeftToLeft"
|
|
323
|
+
};
|
|
85
324
|
|
|
86
325
|
return Utils;
|
|
87
326
|
}, true);
|
|
@@ -9,11 +9,13 @@ sap.ui.define([
|
|
|
9
9
|
"sap/suite/ui/commons/library",
|
|
10
10
|
"./LayoutAlgorithm",
|
|
11
11
|
"./LayoutTask",
|
|
12
|
-
"../util/ConnectionPathUtils"
|
|
13
|
-
|
|
12
|
+
"../util/ConnectionPathUtils",
|
|
13
|
+
"../util/DependencyLayoutHelper"
|
|
14
|
+
], function (library, LayoutAlgorithm, LayoutTask, ConnectionPathUtils, DependencyLayoutHelper) {
|
|
14
15
|
"use strict";
|
|
15
16
|
|
|
16
|
-
var
|
|
17
|
+
var oLayoutRenderType = library.networkgraph.LayoutRenderType,
|
|
18
|
+
oComponentArrangement = library.networkgraph.ComponentArrangement;
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* Constructor for a new NoopLayout.
|
|
@@ -37,9 +39,17 @@ sap.ui.define([
|
|
|
37
39
|
* Enables advanced line routing algorithm that creates orthogonal bends along the pathfinding process for line creation.
|
|
38
40
|
*
|
|
39
41
|
* @public
|
|
40
|
-
* @since 1.144
|
|
41
42
|
*/
|
|
42
|
-
enableOptimizedLineAlgorithm: { type: "boolean", group: "Behavior", defaultValue: false }
|
|
43
|
+
enableOptimizedLineAlgorithm: { type: "boolean", group: "Behavior", defaultValue: false },
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Defines how separate connected components should be arranged in the graph.
|
|
47
|
+
* Components can be arranged either horizontally (side-by-side) or vertically (stacked).
|
|
48
|
+
*
|
|
49
|
+
* @since 1.146
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
componentArrangement: { type: "sap.suite.ui.commons.networkgraph.ComponentArrangement", group: "Behavior", defaultValue: oComponentArrangement.Horizontal }
|
|
43
53
|
}
|
|
44
54
|
}
|
|
45
55
|
});
|
|
@@ -54,11 +64,14 @@ sap.ui.define([
|
|
|
54
64
|
* @public
|
|
55
65
|
*/
|
|
56
66
|
NoopLayout.prototype.getLayoutRenderType = function () {
|
|
57
|
-
return
|
|
67
|
+
return oLayoutRenderType.LayeredWithGroups;
|
|
58
68
|
};
|
|
59
69
|
|
|
60
70
|
/**
|
|
61
71
|
* Executes the layout algorithm.
|
|
72
|
+
* Automatically calculates initial positions for unpositioned nodes using DependencyLayoutHelper,
|
|
73
|
+
* then normalizes line coordinates.
|
|
74
|
+
*
|
|
62
75
|
* @returns {sap.suite.ui.commons.networkgraph.layout.LayoutTask} Task to get the layout calculated.
|
|
63
76
|
* @public
|
|
64
77
|
*/
|
|
@@ -76,6 +89,19 @@ sap.ui.define([
|
|
|
76
89
|
return;
|
|
77
90
|
}
|
|
78
91
|
|
|
92
|
+
// Check if positioning should be calculated
|
|
93
|
+
// Note: DependencyLayoutHelper only repositions nodes without valid coordinates
|
|
94
|
+
if (this._shouldCalculatePositions(oGraph)) {
|
|
95
|
+
DependencyLayoutHelper.calculatePositions(oGraph, {
|
|
96
|
+
componentArrangement: this.getComponentArrangement()
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// Reset flag after calculation
|
|
100
|
+
if (oGraph._bTriggerLayoutCalculation) {
|
|
101
|
+
oGraph._bTriggerLayoutCalculation = false;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
79
105
|
if (this.getEnableOptimizedLineAlgorithm()) {
|
|
80
106
|
// Use the ConnectionPathUtils utility to normalize lines
|
|
81
107
|
ConnectionPathUtils.normalizeLines(oGraph, {
|
|
@@ -86,11 +112,32 @@ sap.ui.define([
|
|
|
86
112
|
this._normalizeLines();
|
|
87
113
|
}
|
|
88
114
|
|
|
89
|
-
|
|
90
|
-
|
|
91
115
|
fnResolve();
|
|
92
116
|
}.bind(this));
|
|
93
117
|
};
|
|
94
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Determines if initial positions should be calculated.
|
|
121
|
+
* Only returns true if there are unpositioned nodes or if explicitly triggered.
|
|
122
|
+
*
|
|
123
|
+
* @param {sap.suite.ui.commons.networkgraph.Graph} oGraph - The graph instance
|
|
124
|
+
* @returns {boolean} True if positions should be calculated
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
127
|
+
NoopLayout.prototype._shouldCalculatePositions = function (oGraph) {
|
|
128
|
+
// Check if explicit trigger flag is set
|
|
129
|
+
// Even when triggered, DependencyLayoutHelper only affects unpositioned nodes
|
|
130
|
+
if (oGraph._bTriggerLayoutCalculation) {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Auto-detect unpositioned nodes (coordinates 0,0 or undefined)
|
|
135
|
+
return oGraph.getNodes().some(function (oNode) {
|
|
136
|
+
var fX = oNode.getX();
|
|
137
|
+
var fY = oNode.getY();
|
|
138
|
+
return (fX === 0 || fX === undefined) && (fY === 0 || fY === undefined);
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
|
|
95
142
|
return NoopLayout;
|
|
96
143
|
});
|
|
@@ -21,6 +21,31 @@ sap.ui.define([
|
|
|
21
21
|
* @since 1.144
|
|
22
22
|
*/
|
|
23
23
|
var ConnectionPathUtils = {
|
|
24
|
+
/**
|
|
25
|
+
* Gets the effective connection type for path calculation based on RTL mode.
|
|
26
|
+
* In RTL mode, semantic directions are reversed since nodes are already mirrored.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} sConnectionType - The configured connection type
|
|
29
|
+
* @param {boolean} bIsRTL - Whether RTL mode is enabled
|
|
30
|
+
* @returns {string} The effective connection type to use for calculations
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
_getEffectiveConnectionType: function (sConnectionType, bIsRTL) {
|
|
34
|
+
if (!bIsRTL) {
|
|
35
|
+
return sConnectionType;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// In RTL mode, semantic directions are reversed (nodes are already mirrored)
|
|
39
|
+
const rtlMapping = {
|
|
40
|
+
[ConnectionType.RightToLeft]: ConnectionType.LeftToRight,
|
|
41
|
+
[ConnectionType.LeftToRight]: ConnectionType.RightToLeft,
|
|
42
|
+
[ConnectionType.LeftToLeft]: ConnectionType.RightToRight,
|
|
43
|
+
[ConnectionType.RightToRight]: ConnectionType.LeftToLeft
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return rtlMapping[sConnectionType] || sConnectionType;
|
|
47
|
+
},
|
|
48
|
+
|
|
24
49
|
/**
|
|
25
50
|
* Normalizes lines in a network graph by calculating path coordinates
|
|
26
51
|
* between source and target nodes based on connection types.
|
|
@@ -40,20 +65,25 @@ sap.ui.define([
|
|
|
40
65
|
// Enable multiple directed arrows feature when using ConnectionPathUtils
|
|
41
66
|
oGraph._enableMultipleDirectedArrows = true;
|
|
42
67
|
|
|
68
|
+
// Detect RTL mode from graph
|
|
69
|
+
const bIsRTL = oGraph._bIsRtl || false;
|
|
70
|
+
|
|
43
71
|
// Iterate over all lines in the graph
|
|
44
72
|
oGraph.getLines().forEach((oLine) => {
|
|
45
|
-
const
|
|
73
|
+
const configuredConnectionType = oLine.getConnectionType(); // Get the connection type, if not configured at Line level then the default is Right to Left from source to target.
|
|
74
|
+
// In RTL mode, use effective connection type (semantically reversed)
|
|
75
|
+
const effectiveConnectionType = this._getEffectiveConnectionType(configuredConnectionType, bIsRTL);
|
|
46
76
|
const oSourceNode = oLine.getFromNode();
|
|
47
77
|
const oTargetNode = oLine.getToNode();
|
|
48
78
|
// Get anchor coordinates for source and target nodes, usually the center of the respective sides
|
|
49
|
-
const oSourceAnchor = this._getNodeAnchorCoordinates(oLine.getFromNode(),
|
|
50
|
-
const oTargetAnchor = this._getNodeAnchorCoordinates(oLine.getToNode(),
|
|
79
|
+
const oSourceAnchor = this._getNodeAnchorCoordinates(oLine.getFromNode(), effectiveConnectionType, "source");
|
|
80
|
+
const oTargetAnchor = this._getNodeAnchorCoordinates(oLine.getToNode(), effectiveConnectionType, "target");
|
|
51
81
|
const mParams = {
|
|
52
82
|
sourceAnchor: oSourceAnchor,
|
|
53
83
|
targetAnchor: oTargetAnchor,
|
|
54
84
|
sourceNode: oSourceNode,
|
|
55
85
|
targetNode: oTargetNode,
|
|
56
|
-
sConnectionType:
|
|
86
|
+
sConnectionType: effectiveConnectionType,
|
|
57
87
|
gridSize: config.gridSize,
|
|
58
88
|
minEdgeLength: config.minEdgeLength
|
|
59
89
|
};
|