@sapui5/sap.fe.core 1.124.2 → 1.124.4
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/fe/core/.library +1 -1
- package/src/sap/fe/core/AppStateHandler.js +2 -2
- package/src/sap/fe/core/AppStateHandler.ts +1 -1
- package/src/sap/fe/core/controllerextensions/EditFlow.js +38 -37
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +40 -39
- package/src/sap/fe/core/controllerextensions/SideEffects.js +35 -29
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +48 -32
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +3 -2
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +2 -1
- package/src/sap/fe/core/converters/ManifestWrapper.js +3 -2
- package/src/sap/fe/core/converters/ManifestWrapper.ts +2 -2
- package/src/sap/fe/core/converters/annotations/DataField.js +36 -13
- package/src/sap/fe/core/converters/annotations/DataField.ts +50 -14
- package/src/sap/fe/core/converters/controls/Common/Table.js +47 -38
- package/src/sap/fe/core/converters/controls/Common/Table.ts +33 -25
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +33 -37
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +30 -28
- package/src/sap/fe/core/fpm/manifest.json +1 -1
- package/src/sap/fe/core/library.js +1 -1
- package/src/sap/fe/core/services/CollaborativeToolsServiceFactory.js +2 -2
- package/src/sap/fe/core/services/CollaborativeToolsServiceFactory.ts +1 -1
|
@@ -405,6 +405,7 @@ export type ColumnExportSettings = Partial<{
|
|
|
405
405
|
isCurrency: boolean;
|
|
406
406
|
property: string[];
|
|
407
407
|
width: number;
|
|
408
|
+
autoScale: boolean;
|
|
408
409
|
}>;
|
|
409
410
|
// Properties for Annotation Columns
|
|
410
411
|
export type AnnotationTableColumn = AnnotationTableColumnForOverride & {
|
|
@@ -877,44 +878,48 @@ function findColumnByPath(path: string, tableColumns: TableColumn[]): TableColum
|
|
|
877
878
|
});
|
|
878
879
|
}
|
|
879
880
|
/**
|
|
880
|
-
* Sets the 'unit' and '
|
|
881
|
+
* Sets the 'unit', 'textArrangement', 'timezone' and 'exportsettings' properties in columns when necessary.
|
|
881
882
|
*
|
|
882
883
|
* @param entityType The entity type displayed in the table
|
|
883
884
|
* @param tableColumns The columns to be updated
|
|
884
885
|
*/
|
|
885
886
|
export function updateLinkedProperties(entityType: EntityType, tableColumns: TableColumn[]): void {
|
|
886
887
|
tableColumns.forEach((oColumn) => {
|
|
887
|
-
const
|
|
888
|
-
if (
|
|
889
|
-
const
|
|
890
|
-
if (
|
|
891
|
-
const
|
|
892
|
-
const
|
|
893
|
-
const
|
|
894
|
-
if (
|
|
895
|
-
const
|
|
896
|
-
|
|
888
|
+
const tableColumn = oColumn as AnnotationTableColumn;
|
|
889
|
+
if (tableColumn.propertyInfos === undefined && tableColumn.relativePath) {
|
|
890
|
+
const property = entityType.entityProperties.find((prop: Property) => prop.name === tableColumn.relativePath);
|
|
891
|
+
if (property) {
|
|
892
|
+
const unitProperty = getAssociatedCurrencyProperty(property) || getAssociatedUnitProperty(property);
|
|
893
|
+
const timezoneProperty = getAssociatedTimezoneProperty(property);
|
|
894
|
+
const timezone = property?.annotations?.Common?.Timezone;
|
|
895
|
+
if (unitProperty) {
|
|
896
|
+
const unitColumn = findColumnByPath(unitProperty.name, tableColumns);
|
|
897
|
+
tableColumn.unit = unitColumn?.name;
|
|
897
898
|
} else {
|
|
898
|
-
const
|
|
899
|
-
if (
|
|
900
|
-
|
|
899
|
+
const unit = property?.annotations?.Measures?.ISOCurrency || property?.annotations?.Measures?.Unit;
|
|
900
|
+
if (unit) {
|
|
901
|
+
tableColumn.unitText = `${unit}`;
|
|
901
902
|
}
|
|
902
903
|
}
|
|
903
|
-
if (
|
|
904
|
-
const oTimezoneColumn = findColumnByPath(
|
|
905
|
-
|
|
906
|
-
} else if (
|
|
907
|
-
|
|
904
|
+
if (timezoneProperty) {
|
|
905
|
+
const oTimezoneColumn = findColumnByPath(timezoneProperty.name, tableColumns);
|
|
906
|
+
tableColumn.timezone = oTimezoneColumn?.name;
|
|
907
|
+
} else if (timezone) {
|
|
908
|
+
tableColumn.timezoneText = timezone.toString();
|
|
908
909
|
}
|
|
909
|
-
const displayMode = getDisplayMode(
|
|
910
|
-
textAnnotation =
|
|
910
|
+
const displayMode = getDisplayMode(property),
|
|
911
|
+
textAnnotation = property.annotations.Common?.Text;
|
|
911
912
|
if (isPathAnnotationExpression(textAnnotation) && displayMode !== "Value") {
|
|
912
|
-
const
|
|
913
|
-
if (
|
|
914
|
-
|
|
915
|
-
textProperty:
|
|
913
|
+
const textColumn = findColumnByPath(textAnnotation.path, tableColumns);
|
|
914
|
+
if (textColumn && textColumn.name !== tableColumn.name) {
|
|
915
|
+
tableColumn.textArrangement = {
|
|
916
|
+
textProperty: textColumn.name,
|
|
916
917
|
mode: displayMode
|
|
917
918
|
};
|
|
919
|
+
// If text properties are used but hidden, we must include them to the export as there are used in the paste
|
|
920
|
+
if (!textColumn.exportSettings) {
|
|
921
|
+
textColumn.exportSettings = { type: "String" };
|
|
922
|
+
}
|
|
918
923
|
}
|
|
919
924
|
}
|
|
920
925
|
}
|
|
@@ -2012,6 +2017,9 @@ const createColumnExportSettings = function (
|
|
|
2012
2017
|
wrap: relatedPropertiesInfo?.exportSettings.wrap,
|
|
2013
2018
|
utc: utc
|
|
2014
2019
|
};
|
|
2020
|
+
if (exportSettings.unitProperty || exportSettings.unit) {
|
|
2021
|
+
exportSettings.autoScale = true;
|
|
2022
|
+
}
|
|
2015
2023
|
return removeUndefinedFromExportSettings(exportSettings);
|
|
2016
2024
|
};
|
|
2017
2025
|
/**
|