@sapui5/sap.suite.ui.commons 1.116.0 → 1.118.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 +55 -10
- package/src/sap/suite/ui/commons/MicroProcessFlow.js +4 -4
- package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +1 -1
- package/src/sap/suite/ui/commons/ProcessFlow.js +1 -1
- package/src/sap/suite/ui/commons/ProcessFlowLaneHeader.js +1 -0
- package/src/sap/suite/ui/commons/ProcessFlowNode.js +3 -3
- package/src/sap/suite/ui/commons/ProcessFlowNodeRenderer.js +0 -3
- package/src/sap/suite/ui/commons/Timeline.js +25 -8
- 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 +50 -27
- 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_ca.properties +4 -4
- package/src/sap/suite/ui/commons/messagebundle_de.properties +1 -1
- package/src/sap/suite/ui/commons/messagebundle_es.properties +2 -2
- package/src/sap/suite/ui/commons/messagebundle_es_MX.properties +3 -3
- package/src/sap/suite/ui/commons/messagebundle_fr_CA.properties +4 -4
- package/src/sap/suite/ui/commons/messagebundle_hi.properties +3 -3
- package/src/sap/suite/ui/commons/messagebundle_it.properties +8 -8
- package/src/sap/suite/ui/commons/networkgraph/Graph.js +5 -18
- package/src/sap/suite/ui/commons/networkgraph/Group.js +1 -1
- package/src/sap/suite/ui/commons/networkgraph/Node.js +22 -6
- package/src/sap/suite/ui/commons/networkgraph/layout/LayoutTask.js +3 -2
- 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 +3 -3
- package/src/sap/suite/ui/commons/taccount/TAccount.js +1 -2
- 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 +5 -1
- package/src/sap/suite/ui/commons/themes/base/NetworkNode.less +12 -12
- package/src/sap/suite/ui/commons/util/ManagedObjectRegister.js +4 -3
- package/src/sap/suite/ui/commons/util/RenderUtils.js +5 -0
package/package.json
CHANGED
|
@@ -111,7 +111,7 @@ sap.ui.define([
|
|
|
111
111
|
* @class
|
|
112
112
|
* @public
|
|
113
113
|
* @internal
|
|
114
|
-
* @version 1.
|
|
114
|
+
* @version 1.118.1
|
|
115
115
|
*/
|
|
116
116
|
var CloudFilePicker = Dialog.extend("sap.suite.ui.commons.CloudFilePicker", {
|
|
117
117
|
metadata: {
|
|
@@ -199,6 +199,13 @@ sap.ui.define([
|
|
|
199
199
|
type: "sap.suite.ui.commons.FilePickerType",
|
|
200
200
|
group: "Data",
|
|
201
201
|
defaultValue: "Export"
|
|
202
|
+
},
|
|
203
|
+
/**
|
|
204
|
+
* Specifies the MIME type of the file during Export
|
|
205
|
+
*/
|
|
206
|
+
MIMEType: {
|
|
207
|
+
type: "string",
|
|
208
|
+
group: "Data"
|
|
202
209
|
}
|
|
203
210
|
},
|
|
204
211
|
events: {
|
|
@@ -562,6 +569,7 @@ sap.ui.define([
|
|
|
562
569
|
dataReceived: function () {
|
|
563
570
|
this.oTableControl.setNoData(null);
|
|
564
571
|
this.oTableControl.setNoDataText(oResourceBundle.getText("CFP_NO_DATA_FILESHARE"));
|
|
572
|
+
this.oTableControl.setBusy(false);
|
|
565
573
|
this.setBusy(false);
|
|
566
574
|
}.bind(this)
|
|
567
575
|
},
|
|
@@ -722,7 +730,7 @@ sap.ui.define([
|
|
|
722
730
|
var sFileShareKey = this.oSelectControl.getSelectedKey();
|
|
723
731
|
var sSearchText = oEvent.target.value;
|
|
724
732
|
var sDocumentType = "folder";
|
|
725
|
-
this._checkForDuplicateFileAndFolder(sSearchText, sFileShareKey, sDocumentType)
|
|
733
|
+
this._checkForDuplicateFileAndFolder(sSearchText, sFileShareKey, sDocumentType, "")
|
|
726
734
|
.then(function (oSuccess) {
|
|
727
735
|
this.setBusy(false);
|
|
728
736
|
if (oSuccess.value.length) {
|
|
@@ -768,10 +776,10 @@ sap.ui.define([
|
|
|
768
776
|
});
|
|
769
777
|
};
|
|
770
778
|
|
|
771
|
-
CloudFilePicker.prototype._checkForDuplicateFileAndFolder = function (sSearchText, sFileShareKey, sDocumentType) {
|
|
779
|
+
CloudFilePicker.prototype._checkForDuplicateFileAndFolder = function (sSearchText, sFileShareKey, sDocumentType, sContentType) {
|
|
772
780
|
var sFileShareItem = this.aVisibleLinks[this.aVisibleLinks.length - 1].fileShareItemId;
|
|
773
781
|
var sPath = "/FileShareItems(FileShare='" + sFileShareKey + "',FileShareItem='" + sFileShareItem + "')/_Query";
|
|
774
|
-
var oContextBinding = this.getModel().bindContext(sPath, "", {"$filter":"FileShareItemName eq \'" + sSearchText + "\'and FileShareItemKind eq \'" + sDocumentType + "\'"});
|
|
782
|
+
var oContextBinding = this.getModel().bindContext(sPath, "", {"$filter": "FileShareItemName eq \'" + sSearchText + "\'and FileShareItemKind eq \'" + sDocumentType + "\'and FileShareItemContentType eq \'" + sContentType + "\'"});
|
|
775
783
|
return oContextBinding.requestObject();
|
|
776
784
|
};
|
|
777
785
|
|
|
@@ -797,7 +805,7 @@ sap.ui.define([
|
|
|
797
805
|
var oNewFolderContext = oBinding.create({
|
|
798
806
|
FileShareItemName: sFolderName,
|
|
799
807
|
FileShareItemKind: 'folder'
|
|
800
|
-
},
|
|
808
|
+
}, false, false, false);
|
|
801
809
|
|
|
802
810
|
// handle success/failure of POST request triggered for a #create on this binding
|
|
803
811
|
var fnCreateCompleted = function(oEvent) {
|
|
@@ -961,20 +969,38 @@ sap.ui.define([
|
|
|
961
969
|
enabled: false,
|
|
962
970
|
press: function () {
|
|
963
971
|
this.setBusy(true);
|
|
964
|
-
var
|
|
965
|
-
|
|
972
|
+
var sCurrentItemInputName = this.oFileNameControl.getValue();
|
|
973
|
+
//Appending MIME type only for Excel as it is not necessary for Google Sheets
|
|
974
|
+
if (this.getMIMEType() && this.getMIMEType() === ".xlsx" && sCurrentItemInputName.indexOf(".xlsx") < 0) {
|
|
975
|
+
sCurrentItemInputName = sCurrentItemInputName + this.getMIMEType();
|
|
976
|
+
}
|
|
977
|
+
if ((this.getFilePickerMode() === FilePickerModes.FileOnly) || sCurrentItemInputName) {
|
|
966
978
|
if (this.getEnableDuplicateCheck()) {
|
|
967
979
|
var sDocumentType = "document";
|
|
968
|
-
|
|
980
|
+
var oFileMIMETypes = {
|
|
981
|
+
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
982
|
+
".gsheet": "application/vnd.google-apps.spreadsheet"
|
|
983
|
+
};
|
|
984
|
+
var sCurrentFileMIMEType = oFileMIMETypes[this.getMIMEType()];
|
|
985
|
+
this._checkForDuplicateFileAndFolder(sCurrentItemInputName, this.oSelectControl.getSelectedKey(), sDocumentType, sCurrentFileMIMEType ? sCurrentFileMIMEType : '')
|
|
969
986
|
.then(function (oSuccess) {
|
|
970
987
|
this.setBusy(false);
|
|
971
|
-
|
|
972
|
-
|
|
988
|
+
var sExportingMIMEType = this.getMIMEType() ? oFileMIMETypes[this.getMIMEType()] : oFileMIMETypes[".gsheet"];
|
|
989
|
+
this.oReturnedDupFileInfo = oSuccess.value.find(function(oValue) {
|
|
990
|
+
return oValue.FileShareItemContentType === sExportingMIMEType;
|
|
991
|
+
});
|
|
992
|
+
if (this.oReturnedDupFileInfo) {
|
|
993
|
+
this._showOverwriteMessage(sCurrentItemInputName);
|
|
973
994
|
} else {
|
|
995
|
+
this.oFileNameControl.setValue(sCurrentItemInputName);
|
|
974
996
|
this._closeDialog();
|
|
975
997
|
}
|
|
998
|
+
}.bind(this))
|
|
999
|
+
.catch(function (oError) {
|
|
1000
|
+
this._closeDialog();
|
|
976
1001
|
}.bind(this));
|
|
977
1002
|
} else {
|
|
1003
|
+
this.oFileNameControl.setValue(sCurrentItemInputName);
|
|
978
1004
|
this._closeDialog();
|
|
979
1005
|
}
|
|
980
1006
|
}
|
|
@@ -1067,6 +1093,8 @@ sap.ui.define([
|
|
|
1067
1093
|
var oSelectedItem = this.oTableControl.getSelectedItem();
|
|
1068
1094
|
if (oSelectedItem) {
|
|
1069
1095
|
mParameters.selectedFiles.push(this._createSelectionParameter(oSelectedItem));
|
|
1096
|
+
} else if (bReplaceExistingFile) {
|
|
1097
|
+
mParameters.selectedFiles.push(this._createFileParameters(this.oReturnedDupFileInfo));
|
|
1070
1098
|
}
|
|
1071
1099
|
|
|
1072
1100
|
this.fireEvent("select", mParameters);
|
|
@@ -1077,6 +1105,23 @@ sap.ui.define([
|
|
|
1077
1105
|
}.bind(this));
|
|
1078
1106
|
};
|
|
1079
1107
|
|
|
1108
|
+
CloudFilePicker.prototype._createFileParameters = function(oValue) {
|
|
1109
|
+
var oCloudFileInfo = new CloudFileInfo();
|
|
1110
|
+
oCloudFileInfo.setFileShareId(oValue.FileShare);
|
|
1111
|
+
oCloudFileInfo.setFileShareItemId(oValue.FileShareItem);
|
|
1112
|
+
oCloudFileInfo.setParentFileShareItemId(oValue.ParentFileShareItem);
|
|
1113
|
+
oCloudFileInfo.setIsFolder(oValue.FileShareItemKind === "folder");
|
|
1114
|
+
oCloudFileInfo.setFileShareItemName(oValue.FileShareItemName);
|
|
1115
|
+
oCloudFileInfo.setCreatedByUser(oValue.CreatedByUser);
|
|
1116
|
+
oCloudFileInfo.setCreationDateTime(oValue.CreationDateTime);
|
|
1117
|
+
oCloudFileInfo.setLastChangedByUser(oValue.LastChangedByUser);
|
|
1118
|
+
oCloudFileInfo.setLastChangeDateTime(oValue.LastChangeDateTime);
|
|
1119
|
+
oCloudFileInfo.setFileShareItemContentType(oValue.FileShareItemContentType);
|
|
1120
|
+
oCloudFileInfo.setFileShareItemContentSize(oValue.FileShareItemContentSize);
|
|
1121
|
+
oCloudFileInfo.setFileShareItemContentLink(oValue.FileShareItemContentLink);
|
|
1122
|
+
return oCloudFileInfo;
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1080
1125
|
CloudFilePicker.prototype._createSelectionParameter = function (oSelectedItem, oContextBinding) {
|
|
1081
1126
|
var oCloudFileInfo = new CloudFileInfo();
|
|
1082
1127
|
var oContext;
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @extends sap.ui.core.Control
|
|
29
29
|
*
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.118.1
|
|
32
32
|
*
|
|
33
33
|
* @constructor
|
|
34
34
|
* @public
|
|
@@ -101,7 +101,7 @@ sap.ui.define([
|
|
|
101
101
|
|
|
102
102
|
if (oMicroProcessFlow._hasScrolling()) {
|
|
103
103
|
oRM.openStart("div");
|
|
104
|
-
oRM.attr("tabindex", "
|
|
104
|
+
oRM.attr("tabindex", "-1");
|
|
105
105
|
oRM.attr("id", oMicroProcessFlow.getId() + "-leftscroller");
|
|
106
106
|
oRM.class("sapSuiteUiCommonsMicroProcessFlowScroller").class("sapSuiteUiCommonsMicroProcessFlowLeftScroller");
|
|
107
107
|
oRM.openEnd();
|
|
@@ -140,7 +140,7 @@ sap.ui.define([
|
|
|
140
140
|
if (oMicroProcessFlow._hasScrolling()) {
|
|
141
141
|
oRM.openStart("div");
|
|
142
142
|
oRM.attr("id", oMicroProcessFlow.getId() + "-rightscroller");
|
|
143
|
-
oRM.attr("tabindex", "
|
|
143
|
+
oRM.attr("tabindex", "-1");
|
|
144
144
|
oRM.class("sapSuiteUiCommonsMicroProcessFlowScroller").class("sapSuiteUiCommonsMicroProcessFlowRightScroller");
|
|
145
145
|
oRM.openEnd();
|
|
146
146
|
oRM.openStart("span");
|
|
@@ -446,7 +446,7 @@ sap.ui.define([
|
|
|
446
446
|
MicroProcessFlow.prototype._getLeftScroller = function () {
|
|
447
447
|
if (!this._oLeftScroller) {
|
|
448
448
|
this._oLeftScroller = new Icon(this.getId() + "leftscroller", {
|
|
449
|
-
src: "sap-icon://
|
|
449
|
+
src: "sap-icon://navigation-left-arrow"
|
|
450
450
|
});
|
|
451
451
|
this._oLeftScroller.addStyleClass("sapSuiteUiCommonsMicroProcessFlowArrow");
|
|
452
452
|
}
|
|
@@ -1263,7 +1263,7 @@ sap.ui.define([
|
|
|
1263
1263
|
* @public
|
|
1264
1264
|
*/
|
|
1265
1265
|
ProcessFlow.prototype.destroyLanes = function () {
|
|
1266
|
-
this.removeAllAggregation("lanes");
|
|
1266
|
+
//this.removeAllAggregation("lanes");
|
|
1267
1267
|
for (var i = 0; i < this._internalLanes.length; i++) {
|
|
1268
1268
|
this._internalLanes[i].destroy();
|
|
1269
1269
|
}
|
|
@@ -503,6 +503,7 @@ sap.ui.define([
|
|
|
503
503
|
*
|
|
504
504
|
* @private
|
|
505
505
|
* @param {sap.ui.core.RenderManager} oRm the render manager into which the control will be rendered
|
|
506
|
+
* @returns {Array<{state: sap.suites.ui.commons.ProcessFlowNodeState,value: number}>}The array of attribubtes each containing the state and value of the state as an integer
|
|
506
507
|
* @since 1.22
|
|
507
508
|
*/
|
|
508
509
|
ProcessFlowLaneHeader.prototype._renderDonutPercentages = function(oRm) { // EXC_SAP_006_1
|
|
@@ -849,17 +849,17 @@ sap.ui.define([
|
|
|
849
849
|
* Sets tag.
|
|
850
850
|
*
|
|
851
851
|
* @private
|
|
852
|
-
* @param {object} newTag The new tag
|
|
852
|
+
* @param {object<ProcessFlowNodeTag>} newTag The new tag is set for the ProcessFlowMode
|
|
853
853
|
*/
|
|
854
854
|
ProcessFlowNode.prototype._setTag = function (newTag) {
|
|
855
855
|
this._tag = newTag;
|
|
856
856
|
};
|
|
857
857
|
|
|
858
858
|
/**
|
|
859
|
-
* Gets tag.
|
|
859
|
+
* Gets tag of the ProcccesFlowNode.
|
|
860
860
|
*
|
|
861
861
|
* @private
|
|
862
|
-
* @returns {
|
|
862
|
+
* @returns {ProcessFlowNodeTag} The current tag of the ProcessFlowNode
|
|
863
863
|
*/
|
|
864
864
|
ProcessFlowNode.prototype._getTag = function () {
|
|
865
865
|
return this._tag;
|
|
@@ -201,9 +201,6 @@ sap.ui.define([
|
|
|
201
201
|
*/
|
|
202
202
|
ProcessFlowNodeRenderer._assignNodeClasses = function (oRm, oControl, nodeLevel) { // EXC_SAP_006_1, EXC_JSHINT_047
|
|
203
203
|
switch (nodeLevel) {
|
|
204
|
-
case ProcessFlowNodeRenderer._nodeLevels.iLevel0:
|
|
205
|
-
//oRm.writeAttribute("id", oControl.getId() + "-base-container");
|
|
206
|
-
break;
|
|
207
204
|
case ProcessFlowNodeRenderer._nodeLevels.iLevel1:
|
|
208
205
|
oRm.attr("id", oControl.getId() + "-corner-container");
|
|
209
206
|
break;
|
|
@@ -539,7 +539,19 @@ sap.ui.define([
|
|
|
539
539
|
}),
|
|
540
540
|
MonthDay: DateFormat.getDateInstance({
|
|
541
541
|
style: "medium"
|
|
542
|
-
})
|
|
542
|
+
}),
|
|
543
|
+
YearQuarter: DateFormat.getDateInstance({
|
|
544
|
+
pattern: "yyyy/QQ"
|
|
545
|
+
}),
|
|
546
|
+
YearMonth: DateFormat.getDateInstance({
|
|
547
|
+
pattern: "yyyy/MM"
|
|
548
|
+
}),
|
|
549
|
+
YearMonthWeek: DateFormat.getDateInstance({
|
|
550
|
+
pattern: "yyyy/MM/w"
|
|
551
|
+
}),
|
|
552
|
+
YearMonthDay: DateFormat.getDateInstance({
|
|
553
|
+
pattern: "yyyy/MM/dd"
|
|
554
|
+
})
|
|
543
555
|
};
|
|
544
556
|
|
|
545
557
|
/**
|
|
@@ -645,6 +657,10 @@ sap.ui.define([
|
|
|
645
657
|
*
|
|
646
658
|
* @param {function} fnGroupBy Grouping function.
|
|
647
659
|
* @public
|
|
660
|
+
* @returns {key: date|title :date|date :date} An object with three properties:
|
|
661
|
+
* key: The key of the related group
|
|
662
|
+
* title: The title of the related group
|
|
663
|
+
* date: the date from the input
|
|
648
664
|
*/
|
|
649
665
|
Timeline.prototype.setCustomGrouping = function (fnGroupBy) {
|
|
650
666
|
var oBindingInfo = this.getBindingInfo("content");
|
|
@@ -864,17 +880,17 @@ sap.ui.define([
|
|
|
864
880
|
if (oDate instanceof Date) {
|
|
865
881
|
switch (sType) {
|
|
866
882
|
case TimelineGroupType.Year:
|
|
867
|
-
sKey =
|
|
883
|
+
sKey = DateFormats.Year.format(oDate);
|
|
868
884
|
sTitle = DateFormats.Year.format(oDate);
|
|
869
885
|
break;
|
|
870
886
|
|
|
871
887
|
case TimelineGroupType.Quarter:
|
|
872
|
-
sKey =
|
|
888
|
+
sKey = DateFormats.YearQuarter.format(oDate);
|
|
873
889
|
sTitle = DateFormats.Quarter.format(oDate);
|
|
874
890
|
break;
|
|
875
891
|
|
|
876
892
|
case TimelineGroupType.Month:
|
|
877
|
-
sKey =
|
|
893
|
+
sKey = DateFormats.YearMonth.format(oDate);
|
|
878
894
|
sTitle = DateFormats.Month.format(oDate);
|
|
879
895
|
break;
|
|
880
896
|
|
|
@@ -882,6 +898,7 @@ sap.ui.define([
|
|
|
882
898
|
var dateFrom = UI5Date.getInstance(oDate),
|
|
883
899
|
dateTo = UI5Date.getInstance(oDate),
|
|
884
900
|
year = oDate.getFullYear(),
|
|
901
|
+
month = oDate.getMonth(),
|
|
885
902
|
week = DateFormats.Week.format(oDate),
|
|
886
903
|
// find first and last day of the week
|
|
887
904
|
first = oDate.getDate() - oDate.getDay(),
|
|
@@ -889,13 +906,13 @@ sap.ui.define([
|
|
|
889
906
|
firstDay = UI5Date.getInstance(dateFrom.setDate(first)),
|
|
890
907
|
lastDay = UI5Date.getInstance(dateTo.setDate(last));
|
|
891
908
|
|
|
892
|
-
sKey =
|
|
909
|
+
sKey = DateFormats.YearMonthWeek.format(oDate);
|
|
893
910
|
|
|
894
911
|
sTitle = DateFormats.MonthDay.format(firstDay) + " \u2013 " + DateFormats.MonthDay.format(lastDay);
|
|
895
912
|
break;
|
|
896
913
|
|
|
897
914
|
case TimelineGroupType.Day:
|
|
898
|
-
sKey =
|
|
915
|
+
sKey = DateFormats.YearMonthDay.format(oDate);
|
|
899
916
|
sTitle = DateFormats.Day.format(oDate);
|
|
900
917
|
break;
|
|
901
918
|
|
|
@@ -1199,8 +1216,8 @@ sap.ui.define([
|
|
|
1199
1216
|
} else {
|
|
1200
1217
|
this.aPrevFilters = aFilters.map(function (val) { return val; });
|
|
1201
1218
|
oBinding.filter(aFilters, FilterType.Control);
|
|
1202
|
-
}
|
|
1203
|
-
}
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1204
1221
|
} else {
|
|
1205
1222
|
// for usecase without binding we just invalidate, because all filtering is done right before render is called
|
|
1206
1223
|
this.invalidate();
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* @extends sap.ui.core.Control
|
|
43
43
|
*
|
|
44
44
|
* @author SAP SE
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.118.1
|
|
46
46
|
* @since 1.66.0
|
|
47
47
|
*
|
|
48
48
|
* @constructor
|
|
@@ -87,7 +87,12 @@ sap.ui.define([
|
|
|
87
87
|
<br>If set to <code>true</code>, the crop area is scaled up or down when the zoom level is changed.
|
|
88
88
|
<br>If set to <code>false</code>, the crop area remains unchanged and keeps its size.
|
|
89
89
|
*/
|
|
90
|
-
scaleCropArea: {type: "boolean", defaultValue: false}
|
|
90
|
+
scaleCropArea: {type: "boolean", defaultValue: false},
|
|
91
|
+
/**
|
|
92
|
+
* Defines the behaviour where if the property is set to true, the images are displayed as per the exif orientation
|
|
93
|
+
* @since 1.118.0
|
|
94
|
+
*/
|
|
95
|
+
useExifOrientation: {type: "boolean", defaultValue: false}
|
|
91
96
|
},
|
|
92
97
|
events: {
|
|
93
98
|
/**
|
|
@@ -251,14 +256,16 @@ sap.ui.define([
|
|
|
251
256
|
|
|
252
257
|
ImageEditor.prototype._getExifOrientation = function(oFile) {
|
|
253
258
|
var oFileReader = new FileReader(),
|
|
254
|
-
iOffset, oResult, oView, iLength, iMarker, iLittle, iTags, i, iError,
|
|
259
|
+
iOffset, oResult, oView, iLength, iMarker, iLittle, iTags, i, iValue, iError,
|
|
255
260
|
CONSTANTS = {
|
|
256
261
|
FIRST_CHECK: 65496,
|
|
257
|
-
SECOND_CHECK:
|
|
262
|
+
SECOND_CHECK: 9,
|
|
263
|
+
THIRD_CHECK: 65505,
|
|
258
264
|
CORRECT_FORMAT_CHECK: 1165519206,
|
|
259
265
|
LITTLE_CHECK: 18761,
|
|
260
266
|
FOURTH_CHECK: 65280,
|
|
261
267
|
EXIF_CHECK: 274,
|
|
268
|
+
ERR_GENERAL: -1,
|
|
262
269
|
ERR_FILE_FORMAT: -2,
|
|
263
270
|
OFFSET_STEP: 2, OFFSET_STEP_MED: 4, OFFSET_STEP_BIG: 6
|
|
264
271
|
};
|
|
@@ -273,45 +280,58 @@ sap.ui.define([
|
|
|
273
280
|
iError = 0;
|
|
274
281
|
|
|
275
282
|
try {
|
|
276
|
-
|
|
277
|
-
|
|
283
|
+
iValue = oView.getUint16(0, false);
|
|
284
|
+
|
|
285
|
+
if (iValue !== CONSTANTS.FIRST_CHECK) {
|
|
286
|
+
iError = CONSTANTS.ERR_FILE_FORMAT;
|
|
278
287
|
}
|
|
279
288
|
|
|
280
|
-
while (iOffset
|
|
289
|
+
while (!iError && iOffset <= iLength - 1) {
|
|
290
|
+
iValue = oView.getUint16(iOffset + CONSTANTS.OFFSET_STEP, false);
|
|
291
|
+
|
|
292
|
+
if (iValue < CONSTANTS.SECOND_CHECK) {
|
|
293
|
+
iError = CONSTANTS.ERR_GENERAL;
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
|
|
281
297
|
iMarker = oView.getUint16(iOffset, false);
|
|
282
|
-
iOffset
|
|
298
|
+
iOffset = iOffset + 2;
|
|
283
299
|
|
|
284
|
-
if (iMarker
|
|
285
|
-
iOffset += CONSTANTS.OFFSET_STEP;
|
|
300
|
+
if (iMarker === CONSTANTS.THIRD_CHECK) {
|
|
301
|
+
iValue = oView.getUint32(iOffset += CONSTANTS.OFFSET_STEP, false);
|
|
286
302
|
|
|
287
|
-
if (
|
|
288
|
-
|
|
303
|
+
if (iValue !== CONSTANTS.CORRECT_FORMAT_CHECK) {
|
|
304
|
+
iError = CONSTANTS.ERR_GENERAL;
|
|
305
|
+
break;
|
|
289
306
|
}
|
|
290
307
|
|
|
291
|
-
iOffset += CONSTANTS.OFFSET_STEP_BIG;
|
|
292
|
-
iLittle = oView.getUint16(iOffset, false) == CONSTANTS.LITTLE_CHECK;
|
|
308
|
+
iLittle = oView.getUint16(iOffset += CONSTANTS.OFFSET_STEP_BIG, false) === CONSTANTS.LITTLE_CHECK;
|
|
293
309
|
iOffset += oView.getUint32(iOffset + CONSTANTS.OFFSET_STEP_MED, iLittle);
|
|
294
310
|
iTags = oView.getUint16(iOffset, iLittle);
|
|
295
|
-
iOffset +=
|
|
311
|
+
iOffset += 2;
|
|
312
|
+
|
|
313
|
+
for (i = 0; i <= iTags - 1; i++) {
|
|
314
|
+
iValue = oView.getUint16(iOffset + (i * 12), iLittle);
|
|
296
315
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return oView.getUint16(iOffset + (i * 12) + 8, iLittle);
|
|
316
|
+
if (iValue === CONSTANTS.EXIF_CHECK) {
|
|
317
|
+
return resolve(oView.getUint16(iOffset + (i * 12) + 8, iLittle));
|
|
300
318
|
}
|
|
301
319
|
}
|
|
302
|
-
} else if ((iMarker & CONSTANTS.FOURTH_CHECK)
|
|
320
|
+
} else if ((iMarker & CONSTANTS.FOURTH_CHECK) !== CONSTANTS.FOURTH_CHECK) {
|
|
321
|
+
iError = CONSTANTS.ERR_GENERAL;
|
|
303
322
|
break;
|
|
304
323
|
} else {
|
|
305
324
|
iOffset += oView.getUint16(iOffset, false);
|
|
306
325
|
}
|
|
307
326
|
}
|
|
327
|
+
return resolve(iError);
|
|
308
328
|
} catch (oErr) {
|
|
309
329
|
// probably wrong file format
|
|
310
330
|
return resolve(CONSTANTS.ERR_FILE_FORMAT);
|
|
311
331
|
}
|
|
312
332
|
};
|
|
313
333
|
|
|
314
|
-
oFileReader.readAsArrayBuffer(oFile
|
|
334
|
+
oFileReader.readAsArrayBuffer(oFile);
|
|
315
335
|
});
|
|
316
336
|
};
|
|
317
337
|
|
|
@@ -450,7 +470,9 @@ sap.ui.define([
|
|
|
450
470
|
if (typeof vSrc === "string") {
|
|
451
471
|
sSrc = vSrc;
|
|
452
472
|
this._oOriginalBlob = this._fetchUrlAsBlob(sSrc).then(function(oBlob) {
|
|
453
|
-
that.
|
|
473
|
+
if (that.getUseExifOrientation()) {
|
|
474
|
+
that._handleExifOrientation(oBlob);
|
|
475
|
+
}
|
|
454
476
|
that._oOriginalBlob = oBlob;
|
|
455
477
|
that._sOriginalFileType = oBlob.type;
|
|
456
478
|
});
|
|
@@ -463,8 +485,9 @@ sap.ui.define([
|
|
|
463
485
|
oUrl = window.URL;
|
|
464
486
|
sSrc = oUrl.createObjectURL(vSrc);
|
|
465
487
|
oUrl.revokeObjectURL(vSrc);
|
|
466
|
-
|
|
467
|
-
|
|
488
|
+
if (this.getUseExifOrientation()) {
|
|
489
|
+
that._handleExifOrientation(vSrc);
|
|
490
|
+
}
|
|
468
491
|
this._oOriginalBlob = vSrc;
|
|
469
492
|
this._sOriginalFileType = vSrc.type;
|
|
470
493
|
|
|
@@ -1363,10 +1386,10 @@ sap.ui.define([
|
|
|
1363
1386
|
};
|
|
1364
1387
|
|
|
1365
1388
|
/**
|
|
1366
|
-
* Returns
|
|
1367
|
-
* @param {sap.suite.ui.commons.ImageFormat} [sFormat] File format of the returned image
|
|
1368
|
-
* @param {float} [fQuality] Only applied when JPEG format is used. Quality of the returned image, ranging from 0 to 1. 0
|
|
1369
|
-
* @return {Promise} Promise that resolves into the
|
|
1389
|
+
* Returns the blob object containing the image in a specified format. If the original format is not supported by the browser's <code>canvas.toDataURL</code> method, either the original format of the image is used or a PNG is used.
|
|
1390
|
+
* @param {sap.suite.ui.commons.ImageFormat} [sFormat] File format of the returned image blob. If the selected format is not supported by the browser's <code>canvas.toDataURL</code> method, PNG is returned instead.
|
|
1391
|
+
* @param {float} [fQuality] Only applied when JPEG format is used. Quality of the returned image, ranging from 0 to 1. 0 implies highly compressed image and 1 implies uncompressed image. When no value is provided, canvas default compression level is used.
|
|
1392
|
+
* @return {Promise<Blob>} Promise that resolves into the blob object
|
|
1370
1393
|
* @public
|
|
1371
1394
|
*/
|
|
1372
1395
|
ImageEditor.prototype.getImageAsBlob = function(sFormat, fQuality) {
|