@sapui5/sap.suite.ui.commons 1.141.0 → 1.142.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 +1 -1
- 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/CalculationBuilderItem.js +12 -6
- 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/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 +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 +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/CollaborationPopover.less +29 -1
- package/src/sap/suite/ui/commons/themes/base/NetworkGraph.less +5 -0
package/package.json
CHANGED
|
@@ -148,7 +148,7 @@ sap.ui.define([
|
|
|
148
148
|
* @extends sap.ui.core.Control
|
|
149
149
|
*
|
|
150
150
|
* @author SAP SE
|
|
151
|
-
* @version 1.
|
|
151
|
+
* @version 1.142.0
|
|
152
152
|
* @since 1.56.0
|
|
153
153
|
*
|
|
154
154
|
* @constructor
|
|
@@ -1592,7 +1592,7 @@ sap.ui.define([
|
|
|
1592
1592
|
this.getItems().forEach(function (oItem) {
|
|
1593
1593
|
aDomRefs.push(oItem.getFocusDomRef());
|
|
1594
1594
|
if (oItem.isExpandable()) {
|
|
1595
|
-
aDomRefs.push(oItem.$("expandbutton"));
|
|
1595
|
+
aDomRefs.push(oItem.$("expandbutton")[0]);
|
|
1596
1596
|
}
|
|
1597
1597
|
});
|
|
1598
1598
|
aDomRefs.push(this._getNewItem().getFocusDomRef());
|
|
@@ -1650,10 +1650,14 @@ sap.ui.define([
|
|
|
1650
1650
|
CalculationBuilderExpression.prototype._printErrors = function () {
|
|
1651
1651
|
this.getItems().forEach(function (oItem) {
|
|
1652
1652
|
var oError = oItem._getItemError(),
|
|
1653
|
-
$this = oItem.$()
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1653
|
+
$this = oItem.$();
|
|
1654
|
+
if (oError) {
|
|
1655
|
+
oItem._oArrowNavigtionInvisibleText.setText(oResourceBundle.getText("CALCULATION_BUILDER_NEGATIVE_ACTION") + " " + oResourceBundle.getText("CALCULATION_BUILDER_NAVIGATION"));
|
|
1656
|
+
$this.addClass("sapCalculationBuilderItemErrorSyntax");
|
|
1657
|
+
} else {
|
|
1658
|
+
oItem._oArrowNavigtionInvisibleText.setText(oResourceBundle.getText("CALCULATION_BUILDER_NAVIGATION"));
|
|
1659
|
+
$this.removeClass("sapCalculationBuilderItemErrorSyntax");
|
|
1660
|
+
}
|
|
1657
1661
|
});
|
|
1658
1662
|
|
|
1659
1663
|
if (this.getParent().getLayoutType() === LayoutTypes.VisualOnly) {
|
|
@@ -1662,7 +1666,7 @@ sap.ui.define([
|
|
|
1662
1666
|
};
|
|
1663
1667
|
|
|
1664
1668
|
CalculationBuilderExpression.prototype._validateSyntax = function (mParameters) {
|
|
1665
|
-
//Usually The map creation is done on the onBeforeRendering hook of this class but this method is getting invoked even before the onBeforeRendering is called
|
|
1669
|
+
//Usually The map creation is done on the onBeforeRendering hook of this class but this method is getting invoked even before the onBeforeRendering is called
|
|
1666
1670
|
//Its getting called from the "sap.suite.ui.commons.CalculationBuilder.js"
|
|
1667
1671
|
//To handle this case we are calling the _createMap function to ensure all maps are created appropriately
|
|
1668
1672
|
this._createMap();
|
|
@@ -14,11 +14,12 @@ sap.ui.define([
|
|
|
14
14
|
"sap/base/security/encodeXML",
|
|
15
15
|
"./Utils",
|
|
16
16
|
"sap/ui/core/Lib",
|
|
17
|
+
"sap/ui/core/InvisibleText",
|
|
17
18
|
"sap/ui/thirdparty/jqueryui/jquery-ui-core",
|
|
18
19
|
"sap/ui/thirdparty/jqueryui/jquery-ui-widget",
|
|
19
20
|
"sap/ui/thirdparty/jqueryui/jquery-ui-mouse",
|
|
20
21
|
"sap/ui/thirdparty/jqueryui/jquery-ui-draggable"
|
|
21
|
-
], function (jQuery, library, BaseObject, Control, MessageBox, encodeXML, Utils, CoreLib) {
|
|
22
|
+
], function (jQuery, library, BaseObject, Control, MessageBox, encodeXML, Utils, CoreLib, InvisibleText) {
|
|
22
23
|
"use strict";
|
|
23
24
|
|
|
24
25
|
var ItemType = library.CalculationBuilderItemType,
|
|
@@ -39,7 +40,7 @@ sap.ui.define([
|
|
|
39
40
|
* @extends sap.ui.core.Control
|
|
40
41
|
*
|
|
41
42
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
43
|
+
* @version 1.142.0
|
|
43
44
|
* @since 1.56.0
|
|
44
45
|
*
|
|
45
46
|
* @constructor
|
|
@@ -146,7 +147,8 @@ sap.ui.define([
|
|
|
146
147
|
oRm.class("sapCalculationBuilderItemContent");
|
|
147
148
|
oRm.attr("title", this.getParent()._operatorTooltip[sLabel] ? oResourceBundle.getText(this.getParent()._operatorTooltip[sLabel]) : "");
|
|
148
149
|
if (this._bIsNew || this._isEmpty()) {
|
|
149
|
-
oRm.attr("title",oResourceBundle.getText("CALCULATION_BUILDER_NEW_ITEM_TITLE"));
|
|
150
|
+
oRm.attr("title", oResourceBundle.getText("CALCULATION_BUILDER_NEW_ITEM_TITLE"));
|
|
151
|
+
fnGetItemAriaLabel(oRm, "CALCULATION_BUILDER_NEW_ITEM_TITLE");
|
|
150
152
|
} else if (oItemsWithAriaLabel[sLabel]) {
|
|
151
153
|
fnGetItemAriaLabel(oRm, "CALCULATION_BUILDER_" + oItemsWithAriaLabel[sLabel] + "_ARIA_LABEL");
|
|
152
154
|
}
|
|
@@ -251,10 +253,9 @@ sap.ui.define([
|
|
|
251
253
|
oRm.attr("id",this.getId());
|
|
252
254
|
oRm.attr("tabindex", sTabIndexAttr);
|
|
253
255
|
oRm.attr("title", sTooltipAttr);
|
|
254
|
-
oRm.attr("role",
|
|
256
|
+
oRm.attr("role", "button");
|
|
257
|
+
oRm.attr("aria-describedby", this._oArrowNavigtionInvisibleText.getId())
|
|
255
258
|
oRm.openEnd();
|
|
256
|
-
// for now we can't add data-sap-ui as it collide with dragging selected items (for unknown reason)
|
|
257
|
-
//sHtml += "<div " + " class=\"" + this._getClass(!!oError) + "\" data-sap-ui=\"" + this.getId() + "\" id=\"" + this.getId() + "\" tabindex=\"" + (bIsItemInBuilder ? "-1" : "0") + "\"" + sTooltipAttr + ">";
|
|
258
259
|
this._innerRender(oRm);
|
|
259
260
|
oRm.close("div");
|
|
260
261
|
};
|
|
@@ -265,6 +266,11 @@ sap.ui.define([
|
|
|
265
266
|
CalculationBuilderItem.prototype.init = function () {
|
|
266
267
|
// Indicates whether the item is NewItem
|
|
267
268
|
this._bIsNew = false;
|
|
269
|
+
if (!this._oArrowNavigtionInvisibleText) {
|
|
270
|
+
this._oArrowNavigtionInvisibleText = new InvisibleText();
|
|
271
|
+
this._oArrowNavigtionInvisibleText.toStatic();
|
|
272
|
+
this._oArrowNavigtionInvisibleText.setText(oResourceBundle.getText("CALCULATION_BUILDER_NAVIGATION"));
|
|
273
|
+
}
|
|
268
274
|
};
|
|
269
275
|
|
|
270
276
|
CalculationBuilderItem.prototype.onBeforeRendering = function () {
|
|
@@ -33,7 +33,8 @@ sap.ui.define([
|
|
|
33
33
|
"sap/m/OverflowToolbar",
|
|
34
34
|
"sap/m/ToolbarSpacer",
|
|
35
35
|
"sap/m/Title",
|
|
36
|
-
"sap/m/table/columnmenu/
|
|
36
|
+
"sap/m/table/columnmenu/QuickSort",
|
|
37
|
+
"sap/m/table/columnmenu/QuickSortItem",
|
|
37
38
|
"sap/m/table/columnmenu/Menu",
|
|
38
39
|
"sap/ui/core/CustomData",
|
|
39
40
|
"sap/ui/model/Sorter",
|
|
@@ -77,8 +78,9 @@ sap.ui.define([
|
|
|
77
78
|
OverflowToolbar,
|
|
78
79
|
ToolbarSpacer,
|
|
79
80
|
Title,
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
QuickSort,
|
|
82
|
+
QuickSortItem,
|
|
83
|
+
ColumnMenu,
|
|
82
84
|
CustomData,
|
|
83
85
|
Sorter,
|
|
84
86
|
SearchField,
|
|
@@ -118,7 +120,7 @@ sap.ui.define([
|
|
|
118
120
|
* @class
|
|
119
121
|
* @public
|
|
120
122
|
* @internal
|
|
121
|
-
* @version 1.
|
|
123
|
+
* @version 1.142.0
|
|
122
124
|
*/
|
|
123
125
|
var CloudFilePicker = Dialog.extend("sap.suite.ui.commons.CloudFilePicker", {
|
|
124
126
|
metadata: {
|
|
@@ -707,23 +709,19 @@ sap.ui.define([
|
|
|
707
709
|
if (sColumnType === "CreatedByUser" || sColumnType === "FileShareItemContentSize" || sColumnType === "FileShareItemContentType") {
|
|
708
710
|
return;
|
|
709
711
|
}
|
|
710
|
-
var oColumnMenu = new
|
|
711
|
-
|
|
712
|
-
new
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
}),
|
|
718
|
-
new ActionItem({
|
|
719
|
-
icon: "sap-icon://sort-descending",
|
|
720
|
-
press: function() {
|
|
721
|
-
this._fHandleSorting(oColumn, false);
|
|
712
|
+
var oColumnMenu = new ColumnMenu({
|
|
713
|
+
quickActions: [
|
|
714
|
+
new QuickSort({
|
|
715
|
+
items: new QuickSortItem({key: sColumnType, label: oColumn.getHeader().getText()}),
|
|
716
|
+
change: function(oEvent) {
|
|
717
|
+
const sSortOrder = oEvent.getParameter("item").getSortOrder();
|
|
718
|
+
this._fHandleSorting(oColumn, sSortOrder);
|
|
722
719
|
}.bind(this)
|
|
723
720
|
})
|
|
724
721
|
]
|
|
725
722
|
});
|
|
726
723
|
|
|
724
|
+
oColumnMenu.getQuickActions()[0].getItems()[0].setSortOrder(oColumn.getSortIndicator());
|
|
727
725
|
oColumnMenu.openBy(oColumn);
|
|
728
726
|
}.bind(this));
|
|
729
727
|
|
|
@@ -962,16 +960,18 @@ sap.ui.define([
|
|
|
962
960
|
oApproveDialog.open();
|
|
963
961
|
};
|
|
964
962
|
|
|
965
|
-
CloudFilePicker.prototype._fHandleSorting = function(oColumn,
|
|
963
|
+
CloudFilePicker.prototype._fHandleSorting = function(oColumn, sSortOrder) {
|
|
966
964
|
this._clearCheckboxFileSelections();
|
|
967
|
-
var
|
|
968
|
-
if (
|
|
969
|
-
|
|
965
|
+
var bIsAsc = false
|
|
966
|
+
if (sSortOrder === SortOrder.Ascending) {
|
|
967
|
+
bIsAsc = true;
|
|
968
|
+
} else if (sSortOrder === SortOrder.Descending) {
|
|
969
|
+
bIsAsc = false;
|
|
970
970
|
}
|
|
971
971
|
this.oTableControl.getColumns().forEach(function(oColumn){
|
|
972
972
|
oColumn.setSortIndicator("None");
|
|
973
973
|
});
|
|
974
|
-
oColumn.setSortIndicator(
|
|
974
|
+
oColumn.setSortIndicator(sSortOrder);
|
|
975
975
|
var sSortProperty = oColumn.data("bindingProperty");
|
|
976
976
|
var oItemBinding = this.oTableControl.getBinding("items");
|
|
977
977
|
oItemBinding.sort([
|
|
@@ -47,7 +47,7 @@ sap.ui.define([
|
|
|
47
47
|
* @extends sap.ui.core.Control
|
|
48
48
|
*
|
|
49
49
|
* @author SAP SE
|
|
50
|
-
* @version 1.
|
|
50
|
+
* @version 1.142.0
|
|
51
51
|
*
|
|
52
52
|
* @constructor
|
|
53
53
|
* @public
|
|
@@ -107,7 +107,7 @@ sap.ui.define([
|
|
|
107
107
|
|
|
108
108
|
oRM.openStart("div", oMicroProcessFlow);
|
|
109
109
|
|
|
110
|
-
oRM.attr("role", "
|
|
110
|
+
oRM.attr("role", "list");
|
|
111
111
|
oRM.attr("aria-roledescription", oResourceBundle.getText("ACC_CTR_TYPE_MICRO_PROCESS_FLOW"));
|
|
112
112
|
oRM.attr("aria-label",sLabel);
|
|
113
113
|
|
|
@@ -38,7 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
* @extends sap.ui.core.Control
|
|
39
39
|
*
|
|
40
40
|
* @author SAP SE
|
|
41
|
-
* @version 1.
|
|
41
|
+
* @version 1.142.0
|
|
42
42
|
*
|
|
43
43
|
* @constructor
|
|
44
44
|
* @public
|
|
@@ -202,9 +202,12 @@ sap.ui.define([
|
|
|
202
202
|
oRM.attr("tabindex", "0");
|
|
203
203
|
oRM.class("sapSuiteUiCommonsMicroProcessFlowItem").class("sapSuiteUiCommonsMicroProcessFlowItem" + oMicroProcessFlowItem.getState());
|
|
204
204
|
oRM.attr("aria-label", oMicroProcessFlowItem._getAriaText());
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
if (oMicroProcessFlowItem.hasListeners("press")) {
|
|
206
|
+
oRM.attr("role", "button");
|
|
207
|
+
oRM.attr("aria-roledescription", oResourceBundle.getText("MICRO_PROCESS_FLOW_ITEM_ACC_BUTTON",[oMicroProcessFlowItem._iIndex,oMicroProcessFlowItem._iItemsCount]));
|
|
208
|
+
} else {
|
|
209
|
+
oRM.attr("role", "listitem");
|
|
210
|
+
}
|
|
208
211
|
oRM.openEnd();
|
|
209
212
|
|
|
210
213
|
if (sIcon) {
|
|
@@ -242,7 +245,6 @@ sap.ui.define([
|
|
|
242
245
|
$item.attr("tabindex", 0);
|
|
243
246
|
}
|
|
244
247
|
$item.attr("aria-label", sAriaLabel);
|
|
245
|
-
$item.attr("role", "option");
|
|
246
248
|
$item.attr("aria-posinset", this._iIndex);
|
|
247
249
|
$item.attr("aria-setsize", this._iItemsCount);
|
|
248
250
|
this._setItemContentAccessibility();
|
|
@@ -262,8 +264,6 @@ sap.ui.define([
|
|
|
262
264
|
|
|
263
265
|
if (bHasPressEvent) {
|
|
264
266
|
$item.css("cursor", "pointer");
|
|
265
|
-
$item.attr("role", "button");
|
|
266
|
-
$item.attr("aria-hidden", "true");
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
269
|
|
|
@@ -355,11 +355,9 @@ sap.ui.define([
|
|
|
355
355
|
var selectedItem = document.getElementsByClassName('sapSuiteMicroProcessFlowItemSelected')[0];
|
|
356
356
|
var item = this._getAccessibleItem()[0];
|
|
357
357
|
if (selectedItem) {
|
|
358
|
-
selectedItem.setAttribute("aria-selected", false);
|
|
359
358
|
selectedItem.classList.remove("sapSuiteMicroProcessFlowItemSelected");
|
|
360
359
|
}
|
|
361
360
|
if (item.tabIndex == "0") {
|
|
362
|
-
item.setAttribute("aria-selected", true);
|
|
363
361
|
item.classList.add("sapSuiteMicroProcessFlowItemSelected");
|
|
364
362
|
}
|
|
365
363
|
};
|
|
@@ -33,9 +33,10 @@ sap.ui.define([
|
|
|
33
33
|
"sap/ui/core/Configuration",
|
|
34
34
|
"./TimelineRenderer",
|
|
35
35
|
"sap/ui/core/Lib",
|
|
36
|
-
"sap/base/i18n/Localization"
|
|
36
|
+
"sap/base/i18n/Localization",
|
|
37
|
+
"sap/base/util/deepEqual"
|
|
37
38
|
], function (jQuery, library, Control, ResizeHandler, DateFormat, ClientListBinding, FilterType, TimelineNavigator, DateUtils, ManagedObjectRegister,
|
|
38
|
-
JSONModel, Sorter, Filter, FilterOperator, ManagedObject, TimelineItem, TimelineRenderManager, ScrollEnablement, BaseObject, assert, Log, UI5Date, Configuration, TimelineRenderer, CoreLib, Localization) {
|
|
39
|
+
JSONModel, Sorter, Filter, FilterOperator, ManagedObject, TimelineItem, TimelineRenderManager, ScrollEnablement, BaseObject, assert, Log, UI5Date, Configuration, TimelineRenderer, CoreLib, Localization, deepEqual) {
|
|
39
40
|
"use strict";
|
|
40
41
|
|
|
41
42
|
var ScrollingFadeout = library.TimelineScrollingFadeout,
|
|
@@ -1183,7 +1184,7 @@ sap.ui.define([
|
|
|
1183
1184
|
aCurrentFilters = [];
|
|
1184
1185
|
if (oBinding) {
|
|
1185
1186
|
if (!bResetAll) {
|
|
1186
|
-
aFilters = oBinding.aFilters.length != 0 ? [...oBinding.aFilters] : this.aPrevFilters || [];
|
|
1187
|
+
aFilters = oBinding.aFilters.length != 0 ? [...oBinding.aFilters] : this.aPrevFilters.map(val => val) || [];
|
|
1187
1188
|
}
|
|
1188
1189
|
|
|
1189
1190
|
if (this._dataFilter) {
|
|
@@ -1214,6 +1215,10 @@ sap.ui.define([
|
|
|
1214
1215
|
aFilters.push(this._filter);
|
|
1215
1216
|
}
|
|
1216
1217
|
if (aFilters.length) {
|
|
1218
|
+
if(deepEqual(aFilters, this.aPrevFilters)){
|
|
1219
|
+
this._setBusy(false);
|
|
1220
|
+
return;
|
|
1221
|
+
}
|
|
1217
1222
|
this.aPrevFilters = aFilters.map(function (val) { return val; });
|
|
1218
1223
|
oBinding.filter(aFilters, FilterType.Control);
|
|
1219
1224
|
} else {
|
|
@@ -1603,16 +1608,16 @@ sap.ui.define([
|
|
|
1603
1608
|
*/
|
|
1604
1609
|
Timeline.prototype._clearFilter = function () {
|
|
1605
1610
|
var fnClearTimeRangeFilter = function () {
|
|
1606
|
-
var
|
|
1607
|
-
oSlider = this._objects.getTimeRangeSlider();
|
|
1611
|
+
var oSlider = this._objects.getTimeRangeSlider();
|
|
1608
1612
|
this._startDate = null;
|
|
1609
1613
|
this._endDate = null;
|
|
1610
1614
|
this._rangeMessage = null;
|
|
1611
1615
|
|
|
1612
1616
|
oSlider.setRange([oSlider.getMin(), oSlider.getMax()]);
|
|
1613
1617
|
|
|
1618
|
+
// Fire event but don't let it prevent filter clearing
|
|
1614
1619
|
if (this._useModelFilter()) {
|
|
1615
|
-
|
|
1620
|
+
this._fireSelectionChange({
|
|
1616
1621
|
clear: true,
|
|
1617
1622
|
timeKeys: {
|
|
1618
1623
|
from: null,
|
|
@@ -1621,40 +1626,33 @@ sap.ui.define([
|
|
|
1621
1626
|
type: TimelineFilterType.Range
|
|
1622
1627
|
});
|
|
1623
1628
|
}
|
|
1624
|
-
return
|
|
1629
|
+
return true; // Always return true to ensure filter clearing
|
|
1625
1630
|
}.bind(this),
|
|
1626
1631
|
fnClearDataFilter = function () {
|
|
1627
|
-
var bExecuteDefault;
|
|
1628
1632
|
|
|
1629
1633
|
this._currentFilterKeys = [];
|
|
1630
1634
|
if (this._useModelFilter()) {
|
|
1631
|
-
|
|
1635
|
+
this._fireSelectionChange({
|
|
1632
1636
|
clear: true,
|
|
1633
1637
|
selectedItems: [],
|
|
1634
1638
|
selectedItem: "",
|
|
1635
1639
|
type: TimelineFilterType.Data
|
|
1636
1640
|
});
|
|
1637
1641
|
}
|
|
1638
|
-
return
|
|
1642
|
+
return true; // Always return true to ensure filter clearing
|
|
1639
1643
|
}.bind(this);
|
|
1640
1644
|
|
|
1641
|
-
|
|
1642
|
-
|
|
1645
|
+
// Execute both clear functions
|
|
1646
|
+
fnClearDataFilter(),
|
|
1647
|
+
fnClearTimeRangeFilter();
|
|
1643
1648
|
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
if (bDataDefault || bRangeDefault) {
|
|
1647
|
-
if (bDataDefault) {
|
|
1649
|
+
// Always clear filters regardless of event handling
|
|
1650
|
+
this._customFilterMessage = "";
|
|
1648
1651
|
this._dataFilter = null;
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
if (bRangeDefault) {
|
|
1652
1652
|
this._rangeDataFilter = null;
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
this.invalidate();
|
|
1657
|
-
}
|
|
1653
|
+
|
|
1654
|
+
/*force clear custom filters*/
|
|
1655
|
+
this.recreateFilter(true);
|
|
1658
1656
|
|
|
1659
1657
|
//reset filter
|
|
1660
1658
|
// this is a bit overkill but we are so far unable to reset filter to it's init state without some filter's internal errors
|
|
@@ -366,7 +366,6 @@ sap.ui.define([
|
|
|
366
366
|
eTimelineItem.setAttribute("aria-level", 2);
|
|
367
367
|
}
|
|
368
368
|
eTimelineItem.addClass("sapSuiteUiCommonsTimelineItem");
|
|
369
|
-
eTimelineItem.setAttribute("aria-labelledby", oTimelineItem.getAriaLabelledBy().join(" "), true);
|
|
370
369
|
|
|
371
370
|
if (oTimelineItem._isLast) {
|
|
372
371
|
eTimelineItem.addClass("sapSuiteUiCommonsTimelineLastItem");
|
|
@@ -476,6 +475,7 @@ sap.ui.define([
|
|
|
476
475
|
eShellItem.addChild(oTimelineItem._objects.getInfoBar());
|
|
477
476
|
eShellItem.addChild(eHeaderWrapper);
|
|
478
477
|
|
|
478
|
+
eHeaderWrapper.setId(oTimelineItem.getId() + "-headerWrapper");
|
|
479
479
|
eHeaderWrapper.addClass("sapSuiteUiCommonsTimelineItemHeaderWrapper");
|
|
480
480
|
|
|
481
481
|
oUserPicture = oTimelineItem._getUserPictureControl();
|
|
@@ -511,7 +511,7 @@ sap.ui.define([
|
|
|
511
511
|
eDateTime.addChildEscaped(this._getFormatedDateTime(oTimelineItem));
|
|
512
512
|
eDateTime.setAttribute("aria-label", sAriaLabelForDateTime, false);
|
|
513
513
|
eHeader.addChild(eDateTime);
|
|
514
|
-
|
|
514
|
+
eBody.setId(oTimelineItem.getId() + "-shellbody");
|
|
515
515
|
eBody.addClass("sapSuiteUiCommonsTimelineItemShellBody");
|
|
516
516
|
eShellItem.addChild(eBody);
|
|
517
517
|
|
|
@@ -598,6 +598,16 @@ sap.ui.define([
|
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
600
|
eTimelineItem.setAttribute("aria-label", sGroupHeader, false);
|
|
601
|
+
} else {
|
|
602
|
+
const aAriaLabelledByIds = [oTimelineItem.getId() + "-headerWrapper"];
|
|
603
|
+
if (!oTimelineItem.getEmbeddedControl()) {
|
|
604
|
+
aAriaLabelledByIds.push(oTimelineItem.getId() + "-shellbody");
|
|
605
|
+
}
|
|
606
|
+
var aLabelledBy = [...aAriaLabelledByIds, ...oTimelineItem.getAriaLabelledBy()];
|
|
607
|
+
if (oTimelineItem._objects && oTimelineItem._objects.getLineIcon) {
|
|
608
|
+
aLabelledBy.push(oTimelineItem._objects.getLineIcon().getId());
|
|
609
|
+
}
|
|
610
|
+
eTimelineItem.setAttribute("aria-labelledby", aLabelledBy.join(" "));
|
|
601
611
|
}
|
|
602
612
|
};
|
|
603
613
|
|
|
@@ -580,7 +580,7 @@ sap.ui.define([
|
|
|
580
580
|
*/
|
|
581
581
|
TeamsHelperService.prototype._getCardInfoUrl = function(sUrl, oParams, oCardData) {
|
|
582
582
|
const isValid = this._isValidDomain(sUrl);
|
|
583
|
-
const sAppTitle = oParams
|
|
583
|
+
const sAppTitle = oParams?.appTitle;
|
|
584
584
|
if (isValid) {
|
|
585
585
|
return this._generateCardUnfurlingUrl(sUrl, oCardData, { appTitle: sAppTitle });
|
|
586
586
|
} else {
|
|
@@ -737,8 +737,6 @@ sap.ui.define([
|
|
|
737
737
|
return this.oContactHelper.getTeamsContactStatus(sEmail);
|
|
738
738
|
};
|
|
739
739
|
|
|
740
|
-
|
|
741
|
-
|
|
742
740
|
/**
|
|
743
741
|
* Opens a Popup that helps to share content to teams, mail.
|
|
744
742
|
* @param { object } oParams Optional argument in case consumer wants to influence the options, otherwise pass as undefined
|
|
@@ -960,5 +958,156 @@ sap.ui.define([
|
|
|
960
958
|
sap.m.URLHelper.redirect(sURL, true);
|
|
961
959
|
|
|
962
960
|
};
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Shares the current or unfurled URL via email.
|
|
964
|
+
* @param {Object} oParams - Parameters for sharing.
|
|
965
|
+
* @param {string} [oParams.url] - The base URL to share.
|
|
966
|
+
* @param {string} [oParams.appTitle] - The subject of the email.
|
|
967
|
+
* @returns {Promise<void>} A promise that resolves when the email sharing process is complete.
|
|
968
|
+
*/
|
|
969
|
+
TeamsHelperService.prototype._shareToEmail = async function (oParams) {
|
|
970
|
+
let sUnfurlingUrl = oParams?.url || window.location.href;
|
|
971
|
+
try {
|
|
972
|
+
sUnfurlingUrl = await this._getUnfurlingUrl(oParams);
|
|
973
|
+
} catch (error) {
|
|
974
|
+
oLogger.error("getUnfurlingUrl failed: " + error.message);
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
const sSubject = oParams?.appTitle?.trim() ? oParams.appTitle : null;
|
|
978
|
+
sap.m.URLHelper.triggerEmail(null, sSubject, sUnfurlingUrl);
|
|
979
|
+
};
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Shares a card from the collaboration bar.
|
|
983
|
+
* @param {Object} params - Parameters for sharing the card.
|
|
984
|
+
*/
|
|
985
|
+
TeamsHelperService.prototype._shareAsChatFromCollabBar = async function (params) {
|
|
986
|
+
try {
|
|
987
|
+
await this._shareAsCard(params);
|
|
988
|
+
} catch (error) {
|
|
989
|
+
oLogger.error("Failed to share card from collaboration bar: " + error.message);
|
|
990
|
+
}
|
|
991
|
+
};
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* Copies the unfurled card URL to the clipboard.
|
|
995
|
+
* @param {Object} oParams - Parameters for sharing.
|
|
996
|
+
* @param {string} [oParams.url] - The base URL to copy.
|
|
997
|
+
* @returns {Promise<void>} A promise that resolves when the URL has been copied to the clipboard.
|
|
998
|
+
*/
|
|
999
|
+
TeamsHelperService.prototype._copyLink = async function (oParams) {
|
|
1000
|
+
let sUnfurlingUrl = oParams?.url || window.location.href;
|
|
1001
|
+
try {
|
|
1002
|
+
sUnfurlingUrl = await this._getUnfurlingUrl(oParams);
|
|
1003
|
+
} catch (error) {
|
|
1004
|
+
oLogger.error("getUnfurlingUrl failed: " + error.message);
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
this._copyCardUrlToClipboard(sUnfurlingUrl);
|
|
1008
|
+
};
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Copies a given URL string into the clipboard.
|
|
1012
|
+
* @param {string} sUrl - The URL to copy into the clipboard.
|
|
1013
|
+
* @returns {Promise<void>} A promise that resolves when the URL has been copied to the clipboard.
|
|
1014
|
+
*/
|
|
1015
|
+
TeamsHelperService.prototype._copyCardUrlToClipboard = async function(sUrl) {
|
|
1016
|
+
try {
|
|
1017
|
+
if (typeof window.navigator !== "undefined" &&
|
|
1018
|
+
window.navigator.clipboard &&
|
|
1019
|
+
typeof window.navigator.clipboard.writeText === "function") {
|
|
1020
|
+
try {
|
|
1021
|
+
await window.navigator.clipboard.writeText(sUrl);
|
|
1022
|
+
oLogger.info("Card URL copied to clipboard successfully.");
|
|
1023
|
+
sap.m.MessageToast.show(oResourceBundle.getText("COLLABORATION_POPOVER_MSGSTRIP_SUCCESS"));
|
|
1024
|
+
} catch (e) {
|
|
1025
|
+
oLogger.error("Clipboard write failed: " + e.message);
|
|
1026
|
+
}
|
|
1027
|
+
} else {
|
|
1028
|
+
oLogger.error("Clipboard API is not available.");
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
} catch (err) {
|
|
1032
|
+
oLogger.error("Failed to generate or copy Card URL", err);
|
|
1033
|
+
}
|
|
1034
|
+
};
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Gets the unfurling URL for a card.
|
|
1038
|
+
* If cardId and cardManifest are provided, saves the card data and shows a busy dialog.
|
|
1039
|
+
* Otherwise, returns a base unfurling URL.
|
|
1040
|
+
* @param {Object} oParams - Parameters for the card.
|
|
1041
|
+
* @param {string} [oParams.url] - Base URL for the card.
|
|
1042
|
+
* @param {string} [oParams.cardId] - The card ID.
|
|
1043
|
+
* @param {Object} [oParams.cardManifest] - The card manifest definition.
|
|
1044
|
+
* @returns {Promise<string>} The unfurling URL.
|
|
1045
|
+
*/
|
|
1046
|
+
TeamsHelperService.prototype._getUnfurlingUrl = async function(oParams) {
|
|
1047
|
+
if (!oParams?.cardId || !oParams.cardId.length || !oParams.cardManifest || !this.isFeatureFlagEnabled()) {
|
|
1048
|
+
// Base Card to unfurl
|
|
1049
|
+
return this._generateUnfurlingUrl(oParams, {});
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
let sUnfurlingUrl = "";
|
|
1053
|
+
let oCardData = {};
|
|
1054
|
+
try {
|
|
1055
|
+
// Card Id and Card Manifest Passed. It will show busy helper and store card into DB.
|
|
1056
|
+
try {
|
|
1057
|
+
const oDialog = await Fragment.load({
|
|
1058
|
+
name: "sap.suite.ui.commons.collaboration.CollaborationBusyDialog",
|
|
1059
|
+
controller: this,
|
|
1060
|
+
type: "XML"
|
|
1061
|
+
});
|
|
1062
|
+
oBusyDialog = oDialog;
|
|
1063
|
+
oBusyDialog.open();
|
|
1064
|
+
|
|
1065
|
+
// Automatically close the dialog after a fixed time
|
|
1066
|
+
iBusyDialogTimeoutId = setTimeout(() => {
|
|
1067
|
+
oBusyDialog.close();
|
|
1068
|
+
oBusyDialog.destroy();
|
|
1069
|
+
}, AUTO_CLOSE_BUSY_DIALOG_TIME);
|
|
1070
|
+
} catch (err) {
|
|
1071
|
+
oLogger.error("Fragment load failed: " + err.message);
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
oCardData = await this._buildCardInfo(oParams);
|
|
1075
|
+
} catch (err) {
|
|
1076
|
+
oLogger.error("buildCardInfo failed: " + err.message);
|
|
1077
|
+
} finally {
|
|
1078
|
+
if (oCardData && Object.keys(oCardData).length === 0) {
|
|
1079
|
+
oLogger.warn("Card info could not be saved.");
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
// Auth/Base card to unfurl
|
|
1083
|
+
sUnfurlingUrl = this._generateUnfurlingUrl(oParams, oCardData);
|
|
1084
|
+
this._closeBusyDialog();
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
return sUnfurlingUrl;
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* Generates a URL for unfurling a card in Microsoft Teams.
|
|
1092
|
+
* Handles minification, share-as-tab logic, and adds navigation modes.
|
|
1093
|
+
* @param {Object} oParams - Parameters for the card.
|
|
1094
|
+
* @param {Object} oCardData - The card data (id, version, etc.).
|
|
1095
|
+
* @returns {Promise<string>} The generated unfurling URL.
|
|
1096
|
+
*/
|
|
1097
|
+
TeamsHelperService.prototype._generateUnfurlingUrl = async function(oParams, oCardData) {
|
|
1098
|
+
let sModifiedUrl = oParams?.url || window.location.href;
|
|
1099
|
+
try {
|
|
1100
|
+
if (oParams?.minifyUrlForChat) {
|
|
1101
|
+
sModifiedUrl = await this._getModifiedUrlForSharing(oParams);
|
|
1102
|
+
} else if (oTeamsParams.isShareAsTabEnabled && this._providerConfig.isShareAsTabEnabled) {
|
|
1103
|
+
const sUrlForTab = await this._modifyUrlForShareAsTab(sModifiedUrl, "MST:C");
|
|
1104
|
+
sModifiedUrl = await this._addNavmodeInUrl(sUrlForTab, 'inplace');
|
|
1105
|
+
}
|
|
1106
|
+
} catch (error) {
|
|
1107
|
+
oLogger.error("Error while modifying URL for sharing: " + error.message);
|
|
1108
|
+
}
|
|
1109
|
+
return this._getCardInfoUrl(sModifiedUrl, oParams, oCardData);
|
|
1110
|
+
};
|
|
1111
|
+
|
|
963
1112
|
return TeamsHelperService;
|
|
964
1113
|
});
|