@sapui5/sap.suite.ui.commons 1.138.0 → 1.139.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 +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +1 -1
- 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/CalculationBuilderItem.js +1 -1
- 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/MicroProcessFlow.js +1 -1
- package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +1 -1
- package/src/sap/suite/ui/commons/TimelineItemRenderer.js +46 -3
- package/src/sap/suite/ui/commons/TimelineRenderManager.js +1 -1
- package/src/sap/suite/ui/commons/collaboration/CollaborationHelper.js +110 -22
- package/src/sap/suite/ui/commons/collaboration/ContactPopover.fragment.xml +17 -17
- package/src/sap/suite/ui/commons/collaboration/TeamsHelperService.js +2 -1
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +2 -2
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js +4 -1
- 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 +4 -1
- package/src/sap/suite/ui/commons/messagebundle_ar.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_bg.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_ca.properties +3 -3
- package/src/sap/suite/ui/commons/messagebundle_cnr.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_cs.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_cy.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_da.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_de.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_el.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_en.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_en_GB.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_en_US_saprigi.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_es.properties +4 -4
- package/src/sap/suite/ui/commons/messagebundle_es_MX.properties +2 -2
- package/src/sap/suite/ui/commons/messagebundle_et.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_fi.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_fr.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_fr_CA.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_hi.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_hr.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_hu.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_id.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_it.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_iw.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_ja.properties +2 -2
- package/src/sap/suite/ui/commons/messagebundle_kk.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_ko.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_lt.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_lv.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_mk.properties +3 -3
- package/src/sap/suite/ui/commons/messagebundle_ms.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_nl.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_no.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_pl.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_pt.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_pt_PT.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_ro.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_ru.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_sh.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_sk.properties +3 -3
- package/src/sap/suite/ui/commons/messagebundle_sl.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_sr.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_sv.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_th.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_tr.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_uk.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_vi.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_zh_CN.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_zh_TW.properties +1 -1
- package/src/sap/suite/ui/commons/networkgraph/Node.js +19 -9
- 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/statusindicator/StatusIndicatorRenderer.js +6 -2
- 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/windowmessages/CollaborationMessageBroker.js +5 -1
package/package.json
CHANGED
|
@@ -296,7 +296,14 @@ sap.ui.define([
|
|
|
296
296
|
|
|
297
297
|
eBarWrapper.addChild(eText);
|
|
298
298
|
eText.addClass("sapSuiteUiCommonsTimelineGroupHeaderSpan");
|
|
299
|
-
|
|
299
|
+
|
|
300
|
+
// Use the new _getGroupTypeLabel method
|
|
301
|
+
var sGroupTypeLabel = this._getGroupTypeLabel(oTimelineItem);
|
|
302
|
+
if (sGroupTypeLabel) {
|
|
303
|
+
eText.addChildEscaped(" " + sGroupTypeLabel + ": " + oTimelineItem.getTitle());
|
|
304
|
+
} else {
|
|
305
|
+
eText.addChildEscaped(" " + oTimelineItem.getTitle());
|
|
306
|
+
}
|
|
300
307
|
|
|
301
308
|
if (oTimelineItem._orientation === "V") {
|
|
302
309
|
eTimelineItem.addChild(eIconBarWrapper);
|
|
@@ -576,14 +583,50 @@ sap.ui.define([
|
|
|
576
583
|
eTimelineItem.setAttribute("aria-setsize", oTimelineItem._callParentFn("_getItemsCount"));
|
|
577
584
|
}
|
|
578
585
|
if (bIsGroupHeader) {
|
|
586
|
+
var sGroupTypeLabel = this._getGroupTypeLabel(oTimelineItem);
|
|
579
587
|
if (!oTimelineItem._isGroupCollapsed()) {
|
|
580
|
-
|
|
588
|
+
if (sGroupTypeLabel) {
|
|
589
|
+
sGroupHeader = oResBundle.getText("TIMELINE_ACCESSIBILITY_GROUP_HEADER") + ": " + sGroupTypeLabel + " " + oTimelineItem.getTitle() + " " + oResBundle.getText("TIMELINE_ACCESSIBILITY_GROUP_EXPAND");
|
|
590
|
+
} else {
|
|
591
|
+
sGroupHeader = oResBundle.getText("TIMELINE_ACCESSIBILITY_GROUP_HEADER") + ": " + oTimelineItem.getTitle() + " " + oResBundle.getText("TIMELINE_ACCESSIBILITY_GROUP_EXPAND");
|
|
592
|
+
}
|
|
581
593
|
} else {
|
|
582
|
-
|
|
594
|
+
if (sGroupTypeLabel) {
|
|
595
|
+
sGroupHeader = oResBundle.getText("TIMELINE_ACCESSIBILITY_GROUP_HEADER") + ": " + sGroupTypeLabel + " " + oTimelineItem.getTitle() + " " + oResBundle.getText("TIMELINE_ACCESSIBILITY_GROUP_COLLAPSE");
|
|
596
|
+
} else {
|
|
597
|
+
sGroupHeader = oResBundle.getText("TIMELINE_ACCESSIBILITY_GROUP_HEADER") + ": " + oTimelineItem.getTitle() + " " + oResBundle.getText("TIMELINE_ACCESSIBILITY_GROUP_COLLAPSE");
|
|
598
|
+
}
|
|
583
599
|
}
|
|
584
600
|
eTimelineItem.setAttribute("aria-label", sGroupHeader, false);
|
|
585
601
|
}
|
|
586
602
|
};
|
|
587
603
|
|
|
604
|
+
/**
|
|
605
|
+
* Returns the localized label for the current Timeline grouping type (Year, Month, Quarter, Week, Day).
|
|
606
|
+
* Looks up the value of the GroupByType property from the parent Timeline control and returns the corresponding
|
|
607
|
+
* localized string from the resource bundle. If the type is not recognized, returns undefined.
|
|
608
|
+
* @param {sap.suite.ui.commons.TimelineItem} oTimelineItem The item to be rendered
|
|
609
|
+
* @returns {string|undefined} The localized label for the group type, or undefined if not found.
|
|
610
|
+
* @private
|
|
611
|
+
*/
|
|
612
|
+
TimelineItemRenderer._getGroupTypeLabel = function (oTimelineItem) {
|
|
613
|
+
var oTimeline = oTimelineItem.getParent();
|
|
614
|
+
var sType = oTimeline.getGroupByType();
|
|
615
|
+
|
|
616
|
+
// Compare against enum values from library
|
|
617
|
+
var mTypeToKey = {};
|
|
618
|
+
mTypeToKey[library.TimelineGroupType.Year] = "TIMELINE_YEAR";
|
|
619
|
+
mTypeToKey[library.TimelineGroupType.Month] = "TIMELINE_MONTH";
|
|
620
|
+
mTypeToKey[library.TimelineGroupType.Quarter] = "TIMELINE_QUARTER";
|
|
621
|
+
mTypeToKey[library.TimelineGroupType.Week] = "TIMELINE_WEEK";
|
|
622
|
+
mTypeToKey[library.TimelineGroupType.Day] = "TIMELINE_DAY";
|
|
623
|
+
|
|
624
|
+
var sKey = mTypeToKey[sType];
|
|
625
|
+
if (sKey && oResBundle.hasText(sKey)) {
|
|
626
|
+
return oResBundle.getText(sKey);
|
|
627
|
+
}
|
|
628
|
+
return undefined;
|
|
629
|
+
};
|
|
630
|
+
|
|
588
631
|
return TimelineItemRenderer;
|
|
589
632
|
}, true);
|
|
@@ -1117,7 +1117,7 @@ sap.ui.define([
|
|
|
1117
1117
|
that._filterDialogRangePage.setFilterCount(0);
|
|
1118
1118
|
that._objects.getTimestampFilterPicker().clearDates();
|
|
1119
1119
|
if (that._rangeFilterType == "None") {
|
|
1120
|
-
that.toggleGroupTypeSelector();
|
|
1120
|
+
that.toggleGroupTypeSelector(that._rangeFilterType);
|
|
1121
1121
|
}
|
|
1122
1122
|
},
|
|
1123
1123
|
filterDetailPageOpened: function (oItem) {
|
|
@@ -13,6 +13,7 @@ sap.ui.define(
|
|
|
13
13
|
var PARAM_SAP_STAGEVIEW_HASH = "&sap-stageview-hash";
|
|
14
14
|
var PARAM_SAP_CARD_ID = "&sap-ui-cardId";
|
|
15
15
|
var PARAM_SAP_XX_CARD_ID = "&sap-ui-xx-cardId";
|
|
16
|
+
var PARAM_SAP_CARD_INFO = "&info=";
|
|
16
17
|
var TRANSIENT_KEY = "transient";
|
|
17
18
|
var oLogger = Log.getLogger("sap.suite.ui.commons.collaboration.CollaborationHelper");
|
|
18
19
|
|
|
@@ -107,8 +108,9 @@ sap.ui.define(
|
|
|
107
108
|
* @return {Promise} Return the resolved promise when the redirection of the URL is done.
|
|
108
109
|
* @public
|
|
109
110
|
*/
|
|
110
|
-
CollaborationHelper.processAndExpandHash = function () {
|
|
111
|
-
this.
|
|
111
|
+
CollaborationHelper.processAndExpandHash = async function () {
|
|
112
|
+
const bTeamsModeActive = await this.isTeamsModeActive();
|
|
113
|
+
this._hideAvatarFromShellbar(bTeamsModeActive);
|
|
112
114
|
return this._getCurrentUrl().then(async function (sCurrentUrl) {
|
|
113
115
|
//if the current url has url param, sap-url-hash, then we have to redirect to an actual url.
|
|
114
116
|
if (sCurrentUrl.indexOf(URL_KEY) > -1) {
|
|
@@ -116,7 +118,7 @@ sap.ui.define(
|
|
|
116
118
|
if (sCurrentUrl.indexOf(PARAM_SAP_STAGEVIEW_HASH) > 0) {
|
|
117
119
|
sHash = sHash.split(PARAM_SAP_STAGEVIEW_HASH)[0];
|
|
118
120
|
} else if (sCurrentUrl.includes("info=")) {
|
|
119
|
-
|
|
121
|
+
sHash = sHash.includes(",") ? sHash.split(",")[0] : sHash.split("&")[0];
|
|
120
122
|
} else if (sCurrentUrl.indexOf(PARAM_SAP_CARD_ID) > 0 || sCurrentUrl.indexOf(PARAM_SAP_XX_CARD_ID) > 0) {
|
|
121
123
|
if (sCurrentUrl.indexOf(PARAM_SAP_CARD_ID) > 0){
|
|
122
124
|
sHash = sHash.split(PARAM_SAP_CARD_ID)[0];
|
|
@@ -128,46 +130,132 @@ sap.ui.define(
|
|
|
128
130
|
}
|
|
129
131
|
return this._retrieveURL(sHash).then(function (oAppState) {
|
|
130
132
|
if (oAppState.getData()) {
|
|
131
|
-
|
|
133
|
+
this._redirectToUrl(oAppState.getData());
|
|
132
134
|
} else {
|
|
133
135
|
// In case AppState couldn't found value for the hash, so removing it and redirecting to LR
|
|
134
136
|
const sUrl = sCurrentUrl.split(URL_KEY)[0];
|
|
135
|
-
|
|
137
|
+
this._redirectToUrl(sUrl);
|
|
136
138
|
}
|
|
137
139
|
return Promise.resolve();
|
|
138
|
-
});
|
|
140
|
+
}.bind(this));
|
|
139
141
|
} else if (sCurrentUrl.indexOf(PARAM_SAP_CARD_ID) > -1) {
|
|
140
142
|
const sUrl = sCurrentUrl.split(PARAM_SAP_CARD_ID)[0];
|
|
141
|
-
|
|
143
|
+
this._redirectToUrl(sUrl);
|
|
142
144
|
} else if (sCurrentUrl.indexOf(PARAM_SAP_CARD_TITLE) > -1) {
|
|
143
|
-
const UshellContainer = sap.ui.require("sap/ushell/Container");
|
|
144
145
|
const sUrl = sCurrentUrl.split(PARAM_SAP_CARD_TITLE)[0];
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
window.location.replace(sUrl);
|
|
150
|
-
}
|
|
146
|
+
await this._redirectBasedOnRuntime(sUrl);
|
|
147
|
+
} else if (bTeamsModeActive && sCurrentUrl.includes(PARAM_SAP_CARD_INFO)) {
|
|
148
|
+
const sUrl = sCurrentUrl.split(PARAM_SAP_CARD_INFO)[0];
|
|
149
|
+
await this._redirectBasedOnRuntime(sUrl);
|
|
151
150
|
}
|
|
152
151
|
return Promise.resolve();
|
|
153
152
|
}.bind(this));
|
|
154
153
|
};
|
|
155
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Handles URL redirection according to the runtime environment.
|
|
157
|
+
*
|
|
158
|
+
* - In AppRuntime (e.g., BTP Fiori App in S/Cube), updates the top-level URL.
|
|
159
|
+
* - Otherwise, performs a standard window location redirect.
|
|
160
|
+
*
|
|
161
|
+
* @param {string} sUrl - The target URL for redirection.
|
|
162
|
+
* @private
|
|
163
|
+
*/
|
|
164
|
+
CollaborationHelper._redirectBasedOnRuntime = async function (sUrl) {
|
|
165
|
+
const UshellContainer = sap.ui.require("sap/ushell/Container");
|
|
166
|
+
|
|
167
|
+
// Get indication is if we are in AppRuntime (for special use cases handling, e.g. BTP Fiori App in S/Cube)
|
|
168
|
+
if (UshellContainer && UshellContainer.inAppRuntime()) {
|
|
169
|
+
await CollaborationMessageConsumer.updateTopLevelURLforAppRuntime(sUrl);
|
|
170
|
+
} else {
|
|
171
|
+
const targetUrl = this._stripTeamsParams(sUrl);
|
|
172
|
+
this._redirectToUrl(targetUrl);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Removes 'sap-ushell-config' and 'sap-collaboration-teams' query parameters
|
|
178
|
+
* from the given URL while preserving the hash fragment.
|
|
179
|
+
*
|
|
180
|
+
* @param {string} sUrl - The original full URL
|
|
181
|
+
* @returns {string} - The cleaned URL
|
|
182
|
+
* @private
|
|
183
|
+
*/
|
|
184
|
+
CollaborationHelper._removeTeamsParams = function (sUrl) {
|
|
185
|
+
try {
|
|
186
|
+
const urlParts = sUrl.split("#");
|
|
187
|
+
const baseUrl = urlParts[0];
|
|
188
|
+
const hashPart = urlParts[1] ? "#" + urlParts[1] : "";
|
|
189
|
+
|
|
190
|
+
const [path, queryString] = baseUrl.split("?");
|
|
191
|
+
if (!queryString) {
|
|
192
|
+
return sUrl;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const params = new URLSearchParams(queryString);
|
|
196
|
+
params.delete("sap-ushell-config");
|
|
197
|
+
params.delete("sap-collaboration-teams");
|
|
198
|
+
|
|
199
|
+
const newBaseUrl = params.toString()
|
|
200
|
+
? `${path}?${params.toString()}`
|
|
201
|
+
: path;
|
|
202
|
+
|
|
203
|
+
return newBaseUrl + hashPart;
|
|
204
|
+
} catch (e) {
|
|
205
|
+
return sUrl;
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* If the current window is the top window, we assume it's not running inside an iframe, e.g. Microsoft Teams.
|
|
211
|
+
* In this case, we remove the Teams parameters from the URL.
|
|
212
|
+
*
|
|
213
|
+
* @param {string} sUrl The URL to be cleaned of Teams parameters.
|
|
214
|
+
* @returns {string} - The cleaned URL
|
|
215
|
+
* @private
|
|
216
|
+
*/
|
|
217
|
+
CollaborationHelper._stripTeamsParams = function (sUrl) {
|
|
218
|
+
if (this._isTopWindow()) {
|
|
219
|
+
return this._removeTeamsParams(sUrl);
|
|
220
|
+
}
|
|
221
|
+
return sUrl;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Determines whether the current window is the top-level window.
|
|
226
|
+
* This is typically used to detect if the application is running inside an iframe (e.g., in Microsoft Teams).
|
|
227
|
+
*
|
|
228
|
+
* @returns {boolean} - Returns true if the current window is not inside an iframe, false otherwise.
|
|
229
|
+
* @private
|
|
230
|
+
*/
|
|
231
|
+
CollaborationHelper._isTopWindow = function () {
|
|
232
|
+
return window.self === window.top;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Redirects the browser to a specified URL.
|
|
237
|
+
*
|
|
238
|
+
* @private
|
|
239
|
+
* @param {string} sUrl - The target URL to redirect to
|
|
240
|
+
*/
|
|
241
|
+
CollaborationHelper._redirectToUrl = function(sUrl) {
|
|
242
|
+
window.location.replace(sUrl);
|
|
243
|
+
};
|
|
244
|
+
|
|
156
245
|
/**
|
|
157
246
|
* Hides the avatar of the user if the app is running in the Microsoft Teams application.
|
|
247
|
+
* @param {boolean} bTeamsModeActive Indicates if Teams mode is active
|
|
158
248
|
* @private
|
|
159
249
|
* @ui5-restricted sap.suite.suite-ui-commons
|
|
160
250
|
* @experimental since 1.108
|
|
161
251
|
*/
|
|
162
|
-
CollaborationHelper._hideAvatarFromShellbar = function () {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
oAvatar.setVisible(false);
|
|
168
|
-
}
|
|
252
|
+
CollaborationHelper._hideAvatarFromShellbar = function (bTeamsModeActive) {
|
|
253
|
+
if (bTeamsModeActive) {
|
|
254
|
+
var oAvatar = Element.getElementById('userActionsMenuHeaderButton');
|
|
255
|
+
if (oAvatar) {
|
|
256
|
+
oAvatar.setVisible(false);
|
|
169
257
|
}
|
|
170
|
-
}
|
|
258
|
+
}
|
|
171
259
|
};
|
|
172
260
|
|
|
173
261
|
/**
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
class="sapUiContentPadding"
|
|
8
8
|
placement="Auto"
|
|
9
9
|
showHeader="false"
|
|
10
|
-
contentWidth="
|
|
10
|
+
contentWidth="21.875rem"
|
|
11
11
|
afterClose="afterClose"
|
|
12
12
|
afterOpen="afterOpen">
|
|
13
13
|
<VBox visible="{userData>/isUserExistsInTeams}">
|
|
14
|
-
<HBox
|
|
14
|
+
<HBox>
|
|
15
15
|
<Avatar id="avatar" src="{= ${userData>/photo} ? ${userData>/photo} : 'sap-icon://person-placeholder' }"
|
|
16
16
|
displaySize="M" class="sapUiSmallMarginEnd" displayShape="Circle" macrodata:email="{userData>/mail}" fesr:press="MST:ContactAction"
|
|
17
17
|
macrodata:type="chat" tooltip="{userData>/badgeTooltip}" badgeValueState="{userData>/badgeValueState}" badgeTooltip="{userData>/badgeTooltip}" badgeIcon="{userData>/badgeIcon}"/>
|
|
@@ -20,9 +20,8 @@
|
|
|
20
20
|
<Text text="{userData>/jobtitle}"/>
|
|
21
21
|
</VBox>
|
|
22
22
|
</HBox>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
<Title text="{i18n>COLLABORATION_MSTEAMS_SHARE}" level="H5" class="sapUiTinyMarginBegin"/>
|
|
23
|
+
<OverflowToolbar visible="{userData>/isDirectCommunicationEnabled}" class="sapMFlexItem sapUiNoContentPadding sapUiTinyMarginTop">
|
|
24
|
+
<Title text="{i18n>COLLABORATION_MSTEAMS_SHARE}" level="H5"/>
|
|
26
25
|
<ToolbarSpacer/>
|
|
27
26
|
<Button
|
|
28
27
|
press="handleMSTeamsPress"
|
|
@@ -30,8 +29,8 @@
|
|
|
30
29
|
macrodata:type="chat"
|
|
31
30
|
tooltip="{i18n>CHAT_BUTTON_TOOLTIP}"
|
|
32
31
|
icon="sap-icon://discussion"
|
|
33
|
-
type="
|
|
34
|
-
|
|
32
|
+
type="Transparent"
|
|
33
|
+
class="sapUiTinyMarginEnd"
|
|
35
34
|
fesr:press="MST:ContactAction"
|
|
36
35
|
/>
|
|
37
36
|
<Button
|
|
@@ -40,8 +39,8 @@
|
|
|
40
39
|
macrodata:type="videoCall"
|
|
41
40
|
tooltip="{i18n>VIDEOCALL_BUTTON_TOOLTIP}"
|
|
42
41
|
icon="sap-icon://video"
|
|
43
|
-
type="
|
|
44
|
-
|
|
42
|
+
type="Transparent"
|
|
43
|
+
class="sapUiTinyMarginEnd"
|
|
45
44
|
fesr:press="MST:ContactAction"
|
|
46
45
|
/>
|
|
47
46
|
<Button
|
|
@@ -50,31 +49,32 @@
|
|
|
50
49
|
macrodata:type="call"
|
|
51
50
|
tooltip="{i18n>CALL_BUTTON_TOOLTIP}"
|
|
52
51
|
icon="sap-icon://call"
|
|
53
|
-
type="
|
|
52
|
+
type="Transparent"
|
|
53
|
+
class="sapUiTinyMarginEnd"
|
|
54
54
|
fesr:press="MST:ContactAction"
|
|
55
55
|
/>
|
|
56
56
|
</OverflowToolbar >
|
|
57
|
-
|
|
58
|
-
<VBox class="
|
|
57
|
+
|
|
58
|
+
<VBox class="sapMFlexItem sapUiNoContentPadding sapUiSmallMarginTop">
|
|
59
59
|
|
|
60
60
|
<Title text="{i18n>POPOVER_CONTACT_DETAILS}" level="H5" class="sapUiTinyMarginBottom sapUiTinyMarginTop" />
|
|
61
61
|
|
|
62
|
-
<VBox visible="{= !!${userData>/mobilephone}}" class="sapUiTinyMarginBottom" >
|
|
62
|
+
<VBox visible="{= !!${userData>/mobilephone}}" class="sapUiTinyMarginTop sapUiTinyMarginBottom" >
|
|
63
63
|
<Label id="UserMobile" text="{i18n>POPOVER_CONTACT_SECTION_MOBILE}:" />
|
|
64
64
|
<Link text="{userData>/mobilephone}" href="{path: 'userData>/mobilephone', formatter: '.formatUri'}" ariaLabelledBy="UserMobile"/>
|
|
65
65
|
</VBox>
|
|
66
66
|
|
|
67
|
-
<VBox visible="{= !!${userData>/businessphone}}" class="sapUiTinyMarginBottom" >
|
|
67
|
+
<VBox visible="{= !!${userData>/businessphone}}" class="sapUiTinyMarginTop sapUiTinyMarginBottom" >
|
|
68
68
|
<Label id="UserPhone" text="{i18n>POPOVER_CONTACT_SECTION_PHONE}:" />
|
|
69
69
|
<Link text="{userData>/businessphone}" href="{path: 'userData>/businessphone', formatter: '.formatUri'}" ariaLabelledBy="UserPhone"/>
|
|
70
70
|
</VBox>
|
|
71
71
|
|
|
72
|
-
<VBox visible="{= !!${userData>/mail}}" class="sapUiTinyMarginBottom" >
|
|
72
|
+
<VBox visible="{= !!${userData>/mail}}" class="sapUiTinyMarginTop sapUiTinyMarginBottom" >
|
|
73
73
|
<Label id="UserEmail" text="{i18n>POPOVER_CONTACT_SECTION_EMAIL}:" />
|
|
74
74
|
<Link text="{userData>/mail}" href="{path: 'userData>/mail', formatter: '.formatUri'}" ariaLabelledBy="UserEmail"/>
|
|
75
75
|
</VBox>
|
|
76
76
|
|
|
77
|
-
<VBox visible="{= !!${userData>/officelocation}}" class="sapUiTinyMarginBottom" >
|
|
77
|
+
<VBox visible="{= !!${userData>/officelocation}}" class="sapUiTinyMarginTop sapUiTinyMarginBottom" >
|
|
78
78
|
<Label text="{i18n>POPOVER_CONTACT_SECTION_OFFICE_LOCATION}:" />
|
|
79
79
|
<Text text="{userData>/officelocation}" />
|
|
80
80
|
</VBox>
|
|
@@ -90,4 +90,4 @@
|
|
|
90
90
|
</IllustratedMessage >
|
|
91
91
|
</HBox>
|
|
92
92
|
</Popover>
|
|
93
|
-
</core:FragmentDefinition>
|
|
93
|
+
</core:FragmentDefinition>
|
|
@@ -476,8 +476,9 @@ sap.ui.define([
|
|
|
476
476
|
encodeURIComponent(sAppTitle)
|
|
477
477
|
].filter(Boolean);
|
|
478
478
|
sUrl += `&${PARAM_SAP_CARD_INFO}=${aInfoField.join(",")}`;
|
|
479
|
+
const encodeUrl = encodeURIComponent(sUrl);
|
|
479
480
|
// add the domain prefix to solve link unfurling issue for systems with different domain patterns
|
|
480
|
-
return `${this._providerConfig.shareAsLinkUrl}?href=${encodeURIComponent(CARD_URL_PREFIX +
|
|
481
|
+
return `${this._providerConfig.shareAsLinkUrl}?href=${encodeURIComponent(CARD_URL_PREFIX + encodeUrl)}`;
|
|
481
482
|
};
|
|
482
483
|
|
|
483
484
|
TeamsHelperService.prototype._getShareAsTabUrl = function () {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
sap.ui.require.preload({
|
|
2
2
|
"sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js":function(){
|
|
3
|
-
sap.ui.define(["sap/ui/core/Component","sap/base/Log","../../ServiceContainer","../../CollaborationHelper"],function(n,a,e,t){var i=
|
|
3
|
+
sap.ui.define(["sap/ui/core/Component","sap/ushell/EventHub","sap/base/Log","../../ServiceContainer","../../CollaborationHelper"],function(n,a,e,t,o){var i=e.getLogger("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component");const r="sap-collaboration-authEndUrl";const s="CollaborationMSPluginLoaded";return n.extend("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component",{metadata:{manifest:"json",properties:{isShareAsLinkEnabled:{name:"isShareAsLinkEnabled",type:"string"},isShareAsTabEnabled:{name:"isShareAsTabEnabled",type:"string"},isShareAsCardEnabled:{name:"isShareAsCardEnabled",type:"string"},applicationId:{name:"applicationId",type:"string"},tenantId:{name:"tenantId",type:"string"},isDirectCommunicationEnabled:{name:"isDirectCommunicationEnabled",type:"string"}}},init:function(){var n=this._loadPluginConfigData();if(n){o._getCurrentUrl().then(function(n){try{const a=new URL(n);if(a.searchParams.has(r)){const n=decodeURIComponent(a.searchParams.get(r));window.location.replace(n)}}catch(n){i.error(`Error while redirecting to auth end url`)}});t.setCollaborationType("COLLABORATION_MSTEAMS",n)}else{i.error("Collaboration configuration for Microsoft Teams Integration could not be loaded.")}a.emit(s)},_loadPluginConfigData:function(){var n=this.getComponentData();if(n){return n.config}}})});
|
|
4
4
|
},
|
|
5
5
|
"sap/suite/ui/commons/collaboration/BaseHelperService.js":function(){
|
|
6
6
|
sap.ui.define(["sap/ui/base/Object"],function(t){var o=t.extend("sap.suite.ui.commons.collaboration.BaseHelperService",{constructor:function(t){this._providerConfig=t}});o.prototype.getProviderConfig=function(){return this._providerConfig};o.prototype.getOptions=function(t){return[]};o.prototype.share=function(t,o){};o.prototype.isContactsCollaborationSupported=function(){return false};o.prototype.enableContactsCollaboration=async function(t,o){return Promise.resolve({})};o.prototype.getTeamsContactCollabOptions=async function(){return Promise.resolve({})};o.prototype.isFeatureFlagEnabled=function(){return false};o.prototype.getTeamsContactStatus=async function(t){return Promise.resolve({})};o.prototype.getCollaborationPopover=function(t,o,e,n,r){};return o});
|
|
@@ -12,7 +12,7 @@ sap.ui.require.preload({
|
|
|
12
12
|
sap.ui.define(["sap/ui/base/Object"],function(t){var n="/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/";var e=n+"aps_ui_contact/0001/";var a="APS_UI_C_CONTACT";var o=n+"aps_ui_contact/0001/"+a;var r=n+"aps_ui_contact/0001/"+a;var c="APS_UI_C_PRESENCE";var i=n+"aps_ui_contact/0001/"+c;var u="APS_UI_C_CALENDAR";var h=n+"aps_ui_contact/0001/"+u;var f=n+"aps_ui_contact/0001/"+"APS_UI_C_CHECK_SERVICE";var s="GET";var C="HEAD";var d=t.extend("sap.suite.ui.commons.collaboration.CollaborationContactInfoHelper");d.fetchCSRFToken=function(){return fetch(e,{method:C,headers:{"X-CSRF-Token":"Fetch"}}).then(function(t){var n=t.headers.get("X-CSRF-Token");if(t.ok&&n){return n}return undefined})};d.fetchContact=function(t){return this.fetchCSRFToken().then(function(n){return fetch(o+"/"+t,{method:s,headers:{"X-CSRF-Token":n,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(t){return t.json()})})};d.fetchContactCalendar=function(t){var n=new Date;var e=h+"?$filter=mail eq '"+t+"'";if(n){e=h+"?$filter=(mail eq '"+t+"'&start_datetime eq '"+n.toISOString()+"')"}return this.fetchCSRFToken().then(function(t){return fetch(e,{method:s,headers:{"X-CSRF-Token":t,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(t){return t.json()})})};d.fetchContactPicture=function(t){return this.fetchCSRFToken().then(function(n){return fetch(r+"/"+t+"/photo",{method:s,headers:{"X-CSRF-Token":n}}).then(function(t){return t.blob()})})};d.fetchContactStatus=function(t){return this.fetchCSRFToken().then(function(n){return fetch(i+"?$filter=id eq '"+t+"'",{method:s,headers:{"X-CSRF-Token":n,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(t){return t.json()})})};d.fetchServiceStatus=function(){return this.fetchCSRFToken().then(function(t){return fetch(f,{method:s,headers:{"X-CSRF-Token":t,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(t){return t.json()})})};return d});
|
|
13
13
|
},
|
|
14
14
|
"sap/suite/ui/commons/collaboration/CollaborationHelper.js":function(){
|
|
15
|
-
sap.ui.define(["sap/base/Log","sap/ui/base/Object","sap/ui/core/Element","../windowmessages/CollaborationMessageConsumer"],function(e,t,n
|
|
15
|
+
sap.ui.define(["sap/base/Log","sap/ui/base/Object","sap/ui/core/Element","../windowmessages/CollaborationMessageConsumer"],function(e,t,i,n){var r="sap-url-hash";var s="&sap-ui-cardTitle";var a="&sap-stageview-hash";var o="&sap-ui-cardId";var c="&sap-ui-xx-cardId";var u="&info=";var l="transient";var f=e.getLogger("sap.suite.ui.commons.collaboration.CollaborationHelper");var p=t.extend("sap.suite.ui.commons.collaboration.CollaborationHelper");p.compactHash=function(e){const t=sap.ui.require("sap/ushell/Container");if(!t){return{url:e}}return t&&t.getServiceAsync("AppState").then(async function(t){var i=t.createEmptyAppState(undefined,false);var n=this._getNextKey(i);if(!this._isEligibleForBackendPersistency(t)){f.warning("Transient flag is true. URL will not be shortened");return{url:e}}var s=this._extractURLBeforeHash(e);var a=await this._extractSemanticObjectAndAction(e);var o=false;try{o=await this._isMinificationFeasible(e)}catch(e){}if(!a||!o){return{url:e}}return this._storeUrl(e,i).then(function(){return{url:s+"#"+a+"&/"+r+"="+n}}).catch(function(t){f.warning("URL is not shortened due to an error."+t.toString());return{url:e}})}.bind(this))};p._getCurrentUrl=function(){const e=sap.ui.require("sap/ushell/Container");return e&&e?new Promise(function(t){e.getFLPUrlAsync(true).then(function(e){t(e)})}):Promise.resolve(document.URL)};p.processAndExpandHash=async function(){const e=await this.isTeamsModeActive();this._hideAvatarFromShellbar(e);return this._getCurrentUrl().then(async function(t){if(t.indexOf(r)>-1){var i=t.split(r)[1].split("=")[1];if(t.indexOf(a)>0){i=i.split(a)[0]}else if(t.includes("info=")){i=i.includes(",")?i.split(",")[0]:i.split("&")[0]}else if(t.indexOf(o)>0||t.indexOf(c)>0){if(t.indexOf(o)>0){i=i.split(o)[0]}else{i=i.split(c)[0]}}else if(t.indexOf(s)>0){i=i.split(s)[0]}return this._retrieveURL(i).then(function(e){if(e.getData()){this._redirectToUrl(e.getData())}else{const e=t.split(r)[0];this._redirectToUrl(e)}return Promise.resolve()}.bind(this))}else if(t.indexOf(o)>-1){const e=t.split(o)[0];this._redirectToUrl(e)}else if(t.indexOf(s)>-1){const e=t.split(s)[0];await this._redirectBasedOnRuntime(e)}else if(e&&t.includes(u)){const e=t.split(u)[0];await this._redirectBasedOnRuntime(e)}return Promise.resolve()}.bind(this))};p._redirectBasedOnRuntime=async function(e){const t=sap.ui.require("sap/ushell/Container");if(t&&t.inAppRuntime()){await n.updateTopLevelURLforAppRuntime(e)}else{const t=this._stripTeamsParams(e);this._redirectToUrl(t)}};p._removeTeamsParams=function(e){try{const t=e.split("#");const i=t[0];const n=t[1]?"#"+t[1]:"";const[r,s]=i.split("?");if(!s){return e}const a=new URLSearchParams(s);a.delete("sap-ushell-config");a.delete("sap-collaboration-teams");const o=a.toString()?`${r}?${a.toString()}`:r;return o+n}catch(t){return e}};p._stripTeamsParams=function(e){if(this._isTopWindow()){return this._removeTeamsParams(e)}return e};p._isTopWindow=function(){return window.self===window.top};p._redirectToUrl=function(e){window.location.replace(e)};p._hideAvatarFromShellbar=function(e){if(e){var t=i.getElementById("userActionsMenuHeaderButton");if(t){t.setVisible(false)}}};p.isTeamsModeActive=function(){var e=false;const t=sap.ui.require("sap/ushell/Container");if(t){return t.getServiceAsync("URLParsing").then(function(t){return this._getCurrentUrl().then(function(i){var n=i.split("#")[0];if(n.indexOf("?")!==-1){var r=t&&t.parseParameters(n.substring(n.indexOf("?")));if(r&&r["sap-collaboration-teams"]&&r["sap-collaboration-teams"][0]&&r["sap-collaboration-teams"][0]==="true"){e=true}var s=false;if(r&&r["sap-ushell-config"]&&r["sap-ushell-config"][0]&&r["sap-ushell-config"][0]==="lean"){s=true}return Promise.resolve(e&&s)}else{return Promise.resolve(false)}})}.bind(this))}else{return Promise.resolve(false)}};p._retrieveURL=function(e){const t=sap.ui.require("sap/ushell/Container");return t&&t.getServiceAsync("AppState").then(function(t){return t.getAppState(e)})};p._isEligibleForBackendPersistency=function(e){return e&&e._oConfig&&l in e._oConfig&&!e._oConfig[l]};p._getNextKey=function(e){return e.getKey()};p._extractSemanticObjectAndAction=function(e){const t=sap.ui.require("sap/ushell/Container");return t&&t.getServiceAsync("URLParsing").then(function(t){var i=t.parseShellHash(this._extractURLHash(e));if(i){return Promise.resolve(i.contextRaw?i.semanticObject+"-"+i.action+"~"+i.contextRaw:i.semanticObject+"-"+i.action)}}.bind(this))};p._isMinificationFeasible=async function(e){const t=sap.ui.require("sap/ushell/Container");if(t){const r=await t.getServiceAsync("NavTargetResolution");const s=await t.getServiceAsync("URLParsing");var i=s.parseShellHash(this._extractURLHash(e));var n=Object.keys(i.params).length;if(n>0){return r.resolveHashFragment(`#${i.semanticObject}-${i.action}`).then(function(e){return true}).catch(function(e){return false})}else{return Promise.resolve(true)}}return Promise.resolve(false)};p._extractURLBeforeHash=function(e){var t=e.split("#")[0];return t};p._extractURLHash=function(e){var t=e.substring(e.indexOf("#"));return t};p._storeUrl=function(e,t){t.setData(e);return t.save()};return p});
|
|
16
16
|
},
|
|
17
17
|
"sap/suite/ui/commons/collaboration/CollaborationManagerService.js":function(){
|
|
18
18
|
sap.ui.define(["sap/base/Log","sap/ui/core/Core","./BaseHelperService","sap/ui/Device","sap/ui/core/Lib","sap/suite/ui/commons/collaboration/channels/MessageChannel"],function(e,o,a,s,t,i){var n=a.extend("sap.suite.ui.commons.collaboration.CollaborationManagerService");var r=t.getResourceBundleFor("sap.suite.ui.commons");var l=e.getLogger("sap.suite.ui.commons.collaboration.CollaborationManagerService");n.prototype.triggerH2HChat=function(e,o,a){this.publishData({sAppTitle:e,sCurrentURL:o,sEmailId:a})};n.prototype.getOptions=function(){var e=window["sap-ushell-config"]&&window["sap-ushell-config"].bootstrapPlugins&&window["sap-ushell-config"].bootstrapPlugins.H2H_CHAT_PLUGIN;if(s.system.desktop){if(e){return{text:r.getText("COLLABORATION_MANGER"),icon:"sap-icon://BusinessSuiteInAppSymbols/icon-collaboration-manager",press:this.triggerH2HChat.bind(this),fesrStepName:"CM:ShareLink"}}else{l.info("Consumer disable Collaboration Manager option")}}else{l.info("Collaboration Manager is not supported in Phone and Tablet")}return null};n.prototype.publishData=async function(e){try{const o=await i.getInstance();o.postMessage(e)}catch(e){l.error("Failed to publish data:",e)}};return n});
|
|
@@ -7,14 +7,16 @@
|
|
|
7
7
|
sap.ui.define(
|
|
8
8
|
[
|
|
9
9
|
"sap/ui/core/Component",
|
|
10
|
+
"sap/ushell/EventHub",
|
|
10
11
|
"sap/base/Log",
|
|
11
12
|
"../../ServiceContainer",
|
|
12
13
|
"../../CollaborationHelper"
|
|
13
14
|
],
|
|
14
|
-
function (Component, Log, ServiceContainer, CollaborationHelper) {
|
|
15
|
+
function (Component, EventHub, Log, ServiceContainer, CollaborationHelper) {
|
|
15
16
|
"use strict";
|
|
16
17
|
var oLogger = Log.getLogger("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component");
|
|
17
18
|
const sTeamsAuthEndUrl = "sap-collaboration-authEndUrl";
|
|
19
|
+
const sCollaborationMSPluginLoaded = "CollaborationMSPluginLoaded";
|
|
18
20
|
/**
|
|
19
21
|
* Provides the collaboration plugin information for Microsoft Teams Integration.
|
|
20
22
|
* @extends sap.ui.core.Component
|
|
@@ -92,6 +94,7 @@ sap.ui.define(
|
|
|
92
94
|
} else {
|
|
93
95
|
oLogger.error("Collaboration configuration for Microsoft Teams Integration could not be loaded.");
|
|
94
96
|
}
|
|
97
|
+
EventHub.emit(sCollaborationMSPluginLoaded);
|
|
95
98
|
},
|
|
96
99
|
|
|
97
100
|
_loadPluginConfigData: function () {
|