@sapui5/sap.suite.ui.commons 1.141.0 → 1.142.1
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 +18 -12
- package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +11 -7
- 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 +5 -5
- package/src/sap/suite/ui/commons/CalculationBuilderItem.js +26 -7
- 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 +21 -21
- package/src/sap/suite/ui/commons/MicroProcessFlow.js +2 -2
- package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +7 -9
- package/src/sap/suite/ui/commons/Timeline.js +22 -24
- package/src/sap/suite/ui/commons/TimelineItemRenderer.js +12 -2
- package/src/sap/suite/ui/commons/collaboration/ServiceContainer.js +18 -2
- package/src/sap/suite/ui/commons/collaboration/TeamsHelperService.js +152 -3
- package/src/sap/suite/ui/commons/collaboration/UniversalCollaborationBar.js +366 -0
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +5 -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 +1 -1
- 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 +1 -1
- package/src/sap/suite/ui/commons/messagebundle.properties +16 -1
- package/src/sap/suite/ui/commons/messagebundle_en.properties +3 -0
- package/src/sap/suite/ui/commons/networkgraph/Graph.js +105 -5
- package/src/sap/suite/ui/commons/networkgraph/Node.js +33 -11
- package/src/sap/suite/ui/commons/networkgraph/util/DragDropManager.js +197 -0
- 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/CalculationBuilderItem.less +11 -3
- package/src/sap/suite/ui/commons/themes/base/CollaborationPopover.less +29 -1
- package/src/sap/suite/ui/commons/themes/base/NetworkGraph.less +5 -0
- package/src/sap/suite/ui/commons/windowmessages/CollaborationMessageBroker.js +3 -3
- package/src/sap/suite/ui/commons/windowmessages/CollaborationMessageConsumer.js +5 -4
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
SAP UI development toolkit for HTML5 (SAPUI5)
|
|
4
|
+
(c) Copyright 2009-2015 SAP SE. All rights reserved
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/core/dnd/DragInfo",
|
|
9
|
+
"sap/ui/core/dnd/DropInfo",
|
|
10
|
+
"sap/base/Log"
|
|
11
|
+
], function (DragInfo, DropInfo, Log) {
|
|
12
|
+
"use strict";
|
|
13
|
+
|
|
14
|
+
// Instance object: Only one will exist
|
|
15
|
+
var instance = null;
|
|
16
|
+
var sDragSessionKey = "networkGraphDragSession";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Constructor for DragDropManager.
|
|
20
|
+
* This class is for internal use only
|
|
21
|
+
*
|
|
22
|
+
* @class
|
|
23
|
+
* Manages drag and drop functionality for network graph components.
|
|
24
|
+
* This class handles drag start, drag end, drag over, and drop events
|
|
25
|
+
* for both Graph and Node controls in the network graph library.
|
|
26
|
+
*
|
|
27
|
+
* @private
|
|
28
|
+
*/
|
|
29
|
+
function DragDropManager() { }
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Validates if the given control is supported for drag and drop operations.
|
|
33
|
+
*
|
|
34
|
+
* @param oControl - The control to validate
|
|
35
|
+
* @returns {boolean} True if the control is eligible for drag and drop, otherwise false
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
DragDropManager.prototype.isValidControl = function (oControl) {
|
|
39
|
+
if (!oControl || typeof oControl !== 'object') {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Check if it's an empty object
|
|
44
|
+
if (Object.keys(oControl).length === 0 && oControl.constructor === Object) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Check if it has the required isA method
|
|
49
|
+
if (typeof oControl.isA !== 'function') {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return oControl.isA("sap.suite.ui.commons.networkgraph.Graph") ||
|
|
54
|
+
oControl.isA("sap.suite.ui.commons.networkgraph.Node");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Handles the drag start event for nodes.
|
|
59
|
+
*
|
|
60
|
+
* @param {sap.ui.base.Event} oEvent - The drag start event handler
|
|
61
|
+
* @private
|
|
62
|
+
*/
|
|
63
|
+
DragDropManager.prototype._handleDragStart = function (oEvent) {
|
|
64
|
+
let dragSession = oEvent.getParameter("dragSession");
|
|
65
|
+
let browserEvent = oEvent.getParameter("browserEvent");
|
|
66
|
+
dragSession.setComplexData(sDragSessionKey, {
|
|
67
|
+
cursorX: browserEvent.clientX,
|
|
68
|
+
cursorY: browserEvent.clientY
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Handles the drag end event for nodes.
|
|
74
|
+
*
|
|
75
|
+
* @param {sap.ui.base.Event} oEvent - The drag End event handler
|
|
76
|
+
* @private
|
|
77
|
+
*/
|
|
78
|
+
DragDropManager.prototype._handleDragEnd = function (oEvent) {
|
|
79
|
+
|
|
80
|
+
let oBrowserEvent = oEvent.getParameter("browserEvent");
|
|
81
|
+
|
|
82
|
+
if (!oBrowserEvent) {
|
|
83
|
+
Log.warn("No native browser event available in drag end event.");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Handles the drag over event for nodes.
|
|
90
|
+
*
|
|
91
|
+
* @param {sap.ui.base.Event} oEvent - The drag over event handler
|
|
92
|
+
* @private
|
|
93
|
+
*/
|
|
94
|
+
DragDropManager.prototype._handleDragOver = function (oEvent) {
|
|
95
|
+
// Optional: Implement visual feedback of drag ghost for Lasso selection
|
|
96
|
+
let oBrowserEvent = oEvent.getParameter("browserEvent");
|
|
97
|
+
|
|
98
|
+
if (!oBrowserEvent) {
|
|
99
|
+
Log.warn("No native browser event available in drag over event.");
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Handles the drop event.
|
|
106
|
+
*
|
|
107
|
+
* @param {sap.ui.base.Event} oEvent - The drop event
|
|
108
|
+
* @param {sap.suite.ui.commons.networkgraph.Graph} oGraph - The graph control
|
|
109
|
+
* @private
|
|
110
|
+
*/
|
|
111
|
+
DragDropManager.prototype._handleDrop = function (oEvent, oGraph) {
|
|
112
|
+
let oBrowserEvent = oEvent.getParameter("browserEvent") || {};
|
|
113
|
+
let { clientX = 0, clientY = 0 } = oBrowserEvent,
|
|
114
|
+
oDraggedControl = oEvent.getParameter("draggedControl");
|
|
115
|
+
if (!oBrowserEvent) {
|
|
116
|
+
Log.warn("No native browser event available in drop event.");
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (oEvent.getParameter("draggedControl")?.isA("sap.suite.ui.commons.networkgraph.Node")) {
|
|
121
|
+
let dragSessionComplexData = oEvent.getParameter("dragSession").getComplexData(sDragSessionKey),
|
|
122
|
+
deltaX = clientX - (dragSessionComplexData?.cursorX || 0),
|
|
123
|
+
deltaY = clientY - (dragSessionComplexData?.cursorY || 0);
|
|
124
|
+
|
|
125
|
+
oGraph.fireEvent("nodeDropped", {
|
|
126
|
+
node: oDraggedControl,
|
|
127
|
+
newX: oDraggedControl.getX() + deltaX,
|
|
128
|
+
newY: oDraggedControl.getY() + deltaY
|
|
129
|
+
});
|
|
130
|
+
} else {
|
|
131
|
+
let boundingRect = oGraph?._$innerscroller[0]?.getBoundingClientRect() || { left: 0, top: 0 },
|
|
132
|
+
x = clientX - boundingRect.left,
|
|
133
|
+
y = clientY - boundingRect.top;
|
|
134
|
+
|
|
135
|
+
oGraph.fireEvent("nodeDropped", {
|
|
136
|
+
...oEvent.getParameters(),
|
|
137
|
+
node: oDraggedControl,
|
|
138
|
+
newX: x,
|
|
139
|
+
newY: y
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// Add drag and drop config if needed
|
|
145
|
+
DragDropManager.prototype.injectDnD = function (oControl) {
|
|
146
|
+
if (!this.isValidControl(oControl)) {
|
|
147
|
+
throw new Error("DragDropManager: Control is not valid for DnD");
|
|
148
|
+
}
|
|
149
|
+
var sControlType = oControl.getMetadata().getName();
|
|
150
|
+
switch (sControlType) {
|
|
151
|
+
case "sap.suite.ui.commons.networkgraph.Graph":
|
|
152
|
+
var dragInfo = new DragInfo({
|
|
153
|
+
sourceAggregation: "nodes",
|
|
154
|
+
dragEnd: this._handleDragEnd.bind(this)
|
|
155
|
+
});
|
|
156
|
+
var dropInfo = new DropInfo({
|
|
157
|
+
dropPosition: "Between",
|
|
158
|
+
drop: function (oEvent) {
|
|
159
|
+
this._handleDrop(oEvent, oControl);
|
|
160
|
+
}.bind(this),
|
|
161
|
+
dragOver: this._handleDragOver.bind(this)
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
oControl.addDragDropConfig(dragInfo);
|
|
165
|
+
oControl.addDragDropConfig(dropInfo);
|
|
166
|
+
break;
|
|
167
|
+
case "sap.suite.ui.commons.networkgraph.Node":
|
|
168
|
+
var dragInfo = new DragInfo({
|
|
169
|
+
dragStart: this._handleDragStart.bind(this),
|
|
170
|
+
});
|
|
171
|
+
oControl.addDragDropConfig(dragInfo);
|
|
172
|
+
break;
|
|
173
|
+
default:
|
|
174
|
+
throw new Error("DragDropManager: Control type " + sControlType + " is not supported");
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
// Remove DnD config
|
|
179
|
+
DragDropManager.prototype.removeDnD = function (oControl) {
|
|
180
|
+
if (!this.isValidControl(oControl)) {
|
|
181
|
+
throw new Error("DragDropManager: Control is not valid for DnD");
|
|
182
|
+
}
|
|
183
|
+
// Check if control has any drag drop configurations
|
|
184
|
+
if (!oControl.getDragDropConfig || oControl.getDragDropConfig().length === 0) {
|
|
185
|
+
return true; // Not an error, just nothing to remove
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
oControl?.destroyDragDropConfig();
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// Exported singleton object - instantiate on first access
|
|
192
|
+
if (!instance) {
|
|
193
|
+
instance = new DragDropManager();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return instance;
|
|
197
|
+
}, /* bExport= */true);
|
|
@@ -231,9 +231,17 @@
|
|
|
231
231
|
|
|
232
232
|
.sapCalculationBuilderItemExpandButtonFocus {
|
|
233
233
|
position: absolute;
|
|
234
|
-
height:
|
|
235
|
-
width:
|
|
236
|
-
left:
|
|
234
|
+
height: 1.375rem;
|
|
235
|
+
width: 1.375rem;
|
|
236
|
+
left: 0.188rem;
|
|
237
|
+
box-sizing: border-box;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.sapUiSizeCozy .sapCalculationBuilderItemExpandButtonFocus {
|
|
241
|
+
position: absolute;
|
|
242
|
+
height: 2.25rem;
|
|
243
|
+
width: 2rem;
|
|
244
|
+
left: 0.188rem;
|
|
237
245
|
box-sizing: border-box;
|
|
238
246
|
}
|
|
239
247
|
|
|
@@ -137,4 +137,32 @@
|
|
|
137
137
|
.sapSuiteCollaborationBarMsgStrip {
|
|
138
138
|
background-color: @sapLegendBackgroundColor6 !important;
|
|
139
139
|
border-width: 0px !important;
|
|
140
|
-
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.sapSuiteCollaborationBarMenu {
|
|
143
|
+
.sapSuiteUiCommonsCollaborationMail {
|
|
144
|
+
.sapUiIcon {
|
|
145
|
+
color: @sapLegendColor6;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.sapSuiteUiCommonsCollaborationMSTeamsShare,
|
|
150
|
+
.sapSuiteUiCommonsCollaborationChat,
|
|
151
|
+
.sapSuiteUiCommonsCollaborationTab {
|
|
152
|
+
.sapUiIcon {
|
|
153
|
+
color: @sapLegendColor20;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.sapSuiteUiCommonsCollaborationManager {
|
|
158
|
+
.sapUiIcon {
|
|
159
|
+
color: @sapLegendColor17;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.sapSuiteUiCommonsCollaborationLink {
|
|
164
|
+
.sapUiIcon {
|
|
165
|
+
color: @sapLegendColor18;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -38,7 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
try {
|
|
39
39
|
const oMessageBrokerService = await UshellContainer.getServiceAsync("MessageBroker");
|
|
40
40
|
const sResponseData = JSON.stringify(oResponseData);
|
|
41
|
-
await oMessageBrokerService.publish(CHANNEL_ID, CLIENT_ID,
|
|
41
|
+
await oMessageBrokerService.publish(CHANNEL_ID, CLIENT_ID, sMessageName, [sClientId], sResponseData);
|
|
42
42
|
oLogger.info(`Published successfully to CLIENT_ID: ${sClientId} on CHANNEL_ID: ${CHANNEL_ID} DATA: ${sResponseData}`);
|
|
43
43
|
} catch (error) {
|
|
44
44
|
oLogger.error(`Failed to publish message: ${error}`);
|
|
@@ -85,9 +85,9 @@ sap.ui.define([
|
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
UshellContainer.getServiceAsync("MessageBroker").then(function (oMessageBrokerService) {
|
|
88
|
-
oMessageBrokerService.connect(CLIENT_ID).then(function() {
|
|
88
|
+
oMessageBrokerService.connect(CLIENT_ID, Function.prototype).then(function() {
|
|
89
89
|
oLogger.info("Client ID: " + CLIENT_ID + " is connected successfully");
|
|
90
|
-
oMessageBrokerService.subscribe(CLIENT_ID, aSubscribedChannels, fnMessageCallback
|
|
90
|
+
oMessageBrokerService.subscribe(CLIENT_ID, aSubscribedChannels, fnMessageCallback);
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
}
|
|
@@ -70,14 +70,14 @@ sap.ui.define([
|
|
|
70
70
|
oMessageBrokerService = await UshellContainer.getServiceAsync("MessageBroker");
|
|
71
71
|
|
|
72
72
|
try {
|
|
73
|
-
await oMessageBrokerService.connect(sClientId);
|
|
73
|
+
await oMessageBrokerService.connect(sClientId, Function.prototype);
|
|
74
74
|
oLogger.info(`Client ID: ${sClientId} is connected successfully`);
|
|
75
75
|
} catch {
|
|
76
76
|
oLogger.warn("Could not connect to the Message Broker");
|
|
77
77
|
return null;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
await oMessageBrokerService.subscribe(sClientId, channels, callback
|
|
80
|
+
await oMessageBrokerService.subscribe(sClientId, channels, callback);
|
|
81
81
|
return oMessageBrokerService;
|
|
82
82
|
} catch (error) {
|
|
83
83
|
oLogger.error(`Error during connect or subscribe: ${error}`);
|
|
@@ -106,7 +106,7 @@ sap.ui.define([
|
|
|
106
106
|
try {
|
|
107
107
|
oMessageBrokerService = await connectAndSubscribe(CLIENT_ID, SUBSCRIBED_CHANNELS, fnMessageCallback);
|
|
108
108
|
if (oMessageBrokerService) {
|
|
109
|
-
await oMessageBrokerService.publish(CHANNEL_ID, CLIENT_ID,
|
|
109
|
+
await oMessageBrokerService.publish(CHANNEL_ID, CLIENT_ID, MSG_NAME, TARGET_CLIENT_IDS);
|
|
110
110
|
|
|
111
111
|
try {
|
|
112
112
|
oMessageBrokerService.disconnect(CLIENT_ID);
|
|
@@ -123,6 +123,7 @@ sap.ui.define([
|
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
125
|
},
|
|
126
|
+
|
|
126
127
|
updateTopLevelURLforAppRuntime: async function (sUrl) {
|
|
127
128
|
let oMessageBrokerService;
|
|
128
129
|
|
|
@@ -131,7 +132,7 @@ sap.ui.define([
|
|
|
131
132
|
|
|
132
133
|
if (oMessageBrokerService) {
|
|
133
134
|
const payload = JSON.stringify({ url: sUrl });
|
|
134
|
-
await oMessageBrokerService.publish(CHANNEL_ID, CLIENT_ID,
|
|
135
|
+
await oMessageBrokerService.publish(CHANNEL_ID, CLIENT_ID, UPDATE_TOP_LEVEL_URL_MSG_NAME, TARGET_CLIENT_IDS, payload);
|
|
135
136
|
|
|
136
137
|
try {
|
|
137
138
|
oMessageBrokerService.disconnect(CLIENT_ID);
|