@sapui5/sap.fe.macros 1.142.0 → 1.142.2

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.
Files changed (83) hide show
  1. package/package.json +1 -1
  2. package/src/sap/fe/macros/.library +1 -1
  3. package/src/sap/fe/macros/Field.js +5 -5
  4. package/src/sap/fe/macros/Field.ts +5 -3
  5. package/src/sap/fe/macros/FooterContent.js +3 -2
  6. package/src/sap/fe/macros/FooterContent.tsx +2 -10
  7. package/src/sap/fe/macros/MessageButton.js +3 -3
  8. package/src/sap/fe/macros/MessageButton.tsx +3 -2
  9. package/src/sap/fe/macros/Page.js +8 -4
  10. package/src/sap/fe/macros/Page.tsx +13 -4
  11. package/src/sap/fe/macros/RichTextEditor.js +12 -14
  12. package/src/sap/fe/macros/RichTextEditor.tsx +10 -13
  13. package/src/sap/fe/macros/ai/EasyFillDialog.js +2 -1
  14. package/src/sap/fe/macros/ai/EasyFillDialog.tsx +1 -0
  15. package/src/sap/fe/macros/ai/SummarizationButton.js +6 -4
  16. package/src/sap/fe/macros/ai/SummarizationButton.tsx +5 -3
  17. package/src/sap/fe/macros/chart/Action.js +19 -7
  18. package/src/sap/fe/macros/chart/Action.ts +8 -0
  19. package/src/sap/fe/macros/chart/ChartDelegate.js +13 -2
  20. package/src/sap/fe/macros/chart/ChartDelegate.ts +20 -1
  21. package/src/sap/fe/macros/chart/MdcChartTemplate.js +8 -6
  22. package/src/sap/fe/macros/chart/MdcChartTemplate.tsx +13 -22
  23. package/src/sap/fe/macros/controls/FileWrapper.js +4 -3
  24. package/src/sap/fe/macros/controls/FileWrapper.ts +3 -2
  25. package/src/sap/fe/macros/controls/FilterBar.js +1 -1
  26. package/src/sap/fe/macros/controls/FilterBar.ts +8 -1
  27. package/src/sap/fe/macros/controls/Section.js +3 -2
  28. package/src/sap/fe/macros/controls/Section.ts +1 -1
  29. package/src/sap/fe/macros/controls/TextLink.js +15 -1
  30. package/src/sap/fe/macros/controls/TextLink.tsx +19 -0
  31. package/src/sap/fe/macros/coreUI/OperationParameterDialog.js +23 -18
  32. package/src/sap/fe/macros/coreUI/OperationParameterDialog.tsx +27 -25
  33. package/src/sap/fe/macros/field/FieldRuntimeHelper.js +4 -2
  34. package/src/sap/fe/macros/field/FieldRuntimeHelper.ts +7 -7
  35. package/src/sap/fe/macros/field/FieldTemplating.js +8 -3
  36. package/src/sap/fe/macros/field/FieldTemplating.ts +8 -3
  37. package/src/sap/fe/macros/filterBar/FilterBar.block.js +10 -1
  38. package/src/sap/fe/macros/filterBar/FilterBar.block.tsx +10 -0
  39. package/src/sap/fe/macros/form/FormContainer.block.js +9 -8
  40. package/src/sap/fe/macros/form/FormContainer.block.ts +10 -7
  41. package/src/sap/fe/macros/internal/field/DisplayStyle.js +3 -2
  42. package/src/sap/fe/macros/internal/field/DisplayStyle.tsx +1 -0
  43. package/src/sap/fe/macros/internal/field/EditStyle.js +11 -6
  44. package/src/sap/fe/macros/internal/field/EditStyle.tsx +7 -3
  45. package/src/sap/fe/macros/internal/valuehelp/AdditionalValueFormatter.js +36 -7
  46. package/src/sap/fe/macros/internal/valuehelp/AdditionalValueFormatter.ts +35 -6
  47. package/src/sap/fe/macros/internal/valuehelp/AdditionalValueHelper.js +54 -1
  48. package/src/sap/fe/macros/internal/valuehelp/AdditionalValueHelper.ts +59 -0
  49. package/src/sap/fe/macros/internal/valuehelp/ValueListHelper.js +23 -3
  50. package/src/sap/fe/macros/internal/valuehelp/ValueListHelper.ts +24 -2
  51. package/src/sap/fe/macros/library.js +5 -6
  52. package/src/sap/fe/macros/{library.ts → library.tsx} +1 -1
  53. package/src/sap/fe/macros/messagebundle.properties +6 -0
  54. package/src/sap/fe/macros/messages/MessageButton.js +21 -12
  55. package/src/sap/fe/macros/messages/MessageButton.ts +21 -11
  56. package/src/sap/fe/macros/multivaluefield/MultiValueFieldDelegate.js +8 -3
  57. package/src/sap/fe/macros/multivaluefield/MultiValueFieldDelegate.ts +9 -2
  58. package/src/sap/fe/macros/quickView/QuickView.js +5 -4
  59. package/src/sap/fe/macros/quickView/QuickView.tsx +10 -3
  60. package/src/sap/fe/macros/table/ActionsTemplating.js +6 -5
  61. package/src/sap/fe/macros/table/ActionsTemplating.tsx +4 -4
  62. package/src/sap/fe/macros/table/MdcTableTemplate.js +31 -13
  63. package/src/sap/fe/macros/table/MdcTableTemplate.tsx +35 -7
  64. package/src/sap/fe/macros/table/Table.block.js +3 -1
  65. package/src/sap/fe/macros/table/Table.block.tsx +7 -4
  66. package/src/sap/fe/macros/table/TableAPI.js +62 -28
  67. package/src/sap/fe/macros/table/TableAPI.ts +73 -32
  68. package/src/sap/fe/macros/table/TableEventHandlerProvider.js +15 -4
  69. package/src/sap/fe/macros/table/TableEventHandlerProvider.ts +16 -3
  70. package/src/sap/fe/macros/table/TableRuntime.js +6 -4
  71. package/src/sap/fe/macros/table/TableRuntime.ts +16 -3
  72. package/src/sap/fe/macros/table/delegates/TableDelegate.js +3 -3
  73. package/src/sap/fe/macros/table/delegates/TableDelegate.ts +3 -4
  74. package/src/sap/fe/macros/table/massEdit/MassEditDialog.js +41 -15
  75. package/src/sap/fe/macros/table/massEdit/MassEditDialog.tsx +41 -22
  76. package/src/sap/fe/macros/table/mixin/ContextMenuHandler.js +2 -4
  77. package/src/sap/fe/macros/table/mixin/ContextMenuHandler.ts +1 -2
  78. package/src/sap/fe/macros/table/mixin/EmptyRowsHandler.js +10 -4
  79. package/src/sap/fe/macros/table/mixin/EmptyRowsHandler.ts +9 -3
  80. package/src/sap/fe/macros/table/mixin/TableHierarchy.js +6 -6
  81. package/src/sap/fe/macros/table/mixin/TableHierarchy.ts +5 -5
  82. package/src/sap/fe/macros/valuehelp/ValueHelpDelegate.js +28 -10
  83. package/src/sap/fe/macros/valuehelp/ValueHelpDelegate.ts +33 -14
@@ -34,6 +34,7 @@ import type FilterBarBase from "sap/ui/mdc/filterbar/FilterBarBase";
34
34
  import TypeMap from "sap/ui/mdc/odata/v4/TypeMap";
35
35
  import StateUtil from "sap/ui/mdc/p13n/StateUtil";
36
36
  import type MDCPopover from "sap/ui/mdc/valuehelp/Popover";
37
+ import RequestShowContainerDefault from "sap/ui/mdc/valuehelp/RequestShowContainerDefault";
37
38
  import type Container from "sap/ui/mdc/valuehelp/base/Container";
38
39
  import type Content from "sap/ui/mdc/valuehelp/base/Content";
39
40
  import type FilterableListContent from "sap/ui/mdc/valuehelp/base/FilterableListContent";
@@ -786,7 +787,9 @@ This cannot happen in case of action parameter dialog, which can be identified b
786
787
  const condition = this._createInitialFilterCondition(values[i], inParameter.initialValueIsSignificant);
787
788
 
788
789
  if (condition) {
789
- inConditions[inParameter.helpPath] = [condition];
790
+ // Use conditionPath if available, otherwise fallback to helpPath for backward compatibility
791
+ const conditionKey = inParameter.conditionPath || inParameter.helpPath;
792
+ inConditions[conditionKey] = [condition];
790
793
  }
791
794
  }
792
795
  }
@@ -830,7 +833,7 @@ This cannot happen in case of action parameter dialog, which can be identified b
830
833
  // last part of localData is a property name, thus it cannot match. Otherwise matchCount could be -1 if everything matches
831
834
  // (if we want to additionally secure against this situation, the most appropriate would be to set matchCount = localDataParts.length – 1)
832
835
  return relativePathParts
833
- .slice(0, -matchCount) // remove all matched parts (from the end)
836
+ .slice(0, -matchCount ? -matchCount : undefined) // remove all matched parts (from the end)
834
837
  .map((part) => part.part)
835
838
  .concat(localDataParts.slice(matchCount)) // remove the matched parts from localData (from the beginning)
836
839
  .join("/"); // transfer back to string (but only once at the end ;) )
@@ -858,7 +861,9 @@ This cannot happen in case of action parameter dialog, which can be identified b
858
861
 
859
862
  const conditions = this._getConditionsFromInParameter(sourceField as string, state);
860
863
  if (conditions) {
861
- inConditions[inParameter.helpPath] = conditions;
864
+ // Use conditionPath if available, otherwise fallback to helpPath for backward compatibility
865
+ const conditionKey = inParameter.conditionPath || inParameter.helpPath;
866
+ inConditions[conditionKey] = conditions;
862
867
  }
863
868
  }
864
869
  return inConditions;
@@ -941,7 +946,9 @@ This cannot happen in case of action parameter dialog, which can be identified b
941
946
  isObjectPage ? inParameter.initialValueIsSignificant : false // no filter with "empty" on ListReport
942
947
  );
943
948
  if (condition) {
944
- inConditions[inParameter.helpPath] = [condition];
949
+ // Use conditionPath if available, otherwise fallback to helpPath for backward compatibility
950
+ const conditionKey = inParameter.conditionPath || inParameter.helpPath;
951
+ inConditions[conditionKey] = [condition];
945
952
  }
946
953
  }
947
954
 
@@ -1183,16 +1190,26 @@ This cannot happen in case of action parameter dialog, which can be identified b
1183
1190
  );
1184
1191
 
1185
1192
  let recentValuesContextData: FieldDataType[] = [];
1186
- if (!payload.isValueListWithFixedValues) {
1187
- // no history for values lists with fixed values (they are usually short)
1188
- recentValuesContextData = await this._getHistoryData(payload, field);
1189
- recentValuesContextData = additionalValueHelper.getRelevantRecentValuesContextData(
1190
- othersValuesContextData,
1191
- recentValuesContextData,
1192
- valueHelpKeys,
1193
- (bindingInfo.parameters as BindingInfoParameters).$search?.replaceAll('"', ""),
1194
- bindingInfo
1195
- );
1193
+ try {
1194
+ if (!payload.isValueListWithFixedValues) {
1195
+ // no history for values lists with fixed values (they are usually short)
1196
+ recentValuesContextData = await this._getHistoryData(payload, field);
1197
+ recentValuesContextData = additionalValueHelper.getRelevantRecentValuesContextData(
1198
+ othersValuesContextData,
1199
+ recentValuesContextData,
1200
+ valueHelpKeys,
1201
+ (bindingInfo.parameters as BindingInfoParameters).$search?.replaceAll('"', ""),
1202
+ bindingInfo
1203
+ );
1204
+ }
1205
+ } catch (error) {
1206
+ // For recently used values we use a UI5 json model.
1207
+ // We take the OData filter and apply it to the JSON model.
1208
+ // This works in most cases but not in a 1:n scenario where OData uses a Lambda Syntax.
1209
+ // To support this we would have to implement a converter which converters the Lambda filters into simple Javascript filters which can work on the JSON model.
1210
+ // As this is a corner case hence we just log the error and continue without recently used values.
1211
+ recentValuesContextData = [];
1212
+ Log.warning("Could not determine recently used values");
1196
1213
  }
1197
1214
 
1198
1215
  othersValuesContextData = additionalValueHelper.getRelevantOthersValuesContextData(
@@ -1394,6 +1411,8 @@ This cannot happen in case of action parameter dialog, which can be identified b
1394
1411
  return this.conditionForRequestShowContainer(valueHelp, container);
1395
1412
  } else if ([RequestShowContainerReason.Typing, RequestShowContainerReason.Filter].includes(requestShowContainerReason)) {
1396
1413
  return this.typeAheadForFilterableContent(valueHelp, container);
1414
+ } else if ([RequestShowContainerReason.Navigate].includes(requestShowContainerReason)) {
1415
+ return RequestShowContainerDefault.Navigate(valueHelp, container);
1397
1416
  }
1398
1417
  return RequestShowContainerReason.ValueHelpRequest === requestShowContainerReason;
1399
1418
  }