@sapui5/sap.fe.macros 1.139.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.
Files changed (55) hide show
  1. package/package.json +1 -1
  2. package/src/sap/fe/macros/.library +1 -1
  3. package/src/sap/fe/macros/Chart.js +1 -1
  4. package/src/sap/fe/macros/Chart.tsx +1 -1
  5. package/src/sap/fe/macros/RichTextEditor.js +1 -2
  6. package/src/sap/fe/macros/RichTextEditor.tsx +0 -1
  7. package/src/sap/fe/macros/ValueHelp.js +4 -28
  8. package/src/sap/fe/macros/ValueHelp.tsx +2 -42
  9. package/src/sap/fe/macros/chart/MdcChartTemplate.js +2 -4
  10. package/src/sap/fe/macros/chart/MdcChartTemplate.tsx +1 -4
  11. package/src/sap/fe/macros/controls/BuildingBlockObjectProperty.js +5 -1
  12. package/src/sap/fe/macros/controls/BuildingBlockObjectProperty.ts +4 -0
  13. package/src/sap/fe/macros/controls/FilterBar.js +39 -3
  14. package/src/sap/fe/macros/controls/FilterBar.ts +42 -1
  15. package/src/sap/fe/macros/controls/Section.js +3 -2
  16. package/src/sap/fe/macros/controls/Section.ts +2 -1
  17. package/src/sap/fe/macros/draftIndicator/DraftIndicator.js +2 -2
  18. package/src/sap/fe/macros/draftIndicator/DraftIndicator.tsx +1 -1
  19. package/src/sap/fe/macros/field/FieldBaseDelegate.js +13 -7
  20. package/src/sap/fe/macros/field/FieldBaseDelegate.ts +12 -8
  21. package/src/sap/fe/macros/field/FieldRuntime.js +38 -8
  22. package/src/sap/fe/macros/field/FieldRuntime.ts +65 -7
  23. package/src/sap/fe/macros/filter/FilterUtils.js +7 -1
  24. package/src/sap/fe/macros/filter/FilterUtils.ts +7 -0
  25. package/src/sap/fe/macros/form/Form.block.js +6 -2
  26. package/src/sap/fe/macros/form/Form.block.ts +4 -1
  27. package/src/sap/fe/macros/form/FormDelegate.js +20 -1
  28. package/src/sap/fe/macros/form/FormDelegate.ts +25 -0
  29. package/src/sap/fe/macros/internal/field/DisplayStyle.js +4 -2
  30. package/src/sap/fe/macros/internal/field/DisplayStyle.tsx +3 -1
  31. package/src/sap/fe/macros/internal/valuehelp/TableDelegate.js +4 -4
  32. package/src/sap/fe/macros/internal/valuehelp/TableDelegate.ts +3 -3
  33. package/src/sap/fe/macros/internal/valuehelp/ValueListHelper.js +5 -1
  34. package/src/sap/fe/macros/internal/valuehelp/ValueListHelper.ts +4 -0
  35. package/src/sap/fe/macros/library.js +1 -1
  36. package/src/sap/fe/macros/mdc/adapter/StateHelper.js +5 -5
  37. package/src/sap/fe/macros/mdc/adapter/StateHelper.ts +5 -4
  38. package/src/sap/fe/macros/table/MdcTableTemplate.js +3 -1
  39. package/src/sap/fe/macros/table/MdcTableTemplate.tsx +2 -1
  40. package/src/sap/fe/macros/table/Table.js +7 -1
  41. package/src/sap/fe/macros/table/Table.tsx +7 -1
  42. package/src/sap/fe/macros/table/TableAPI.js +8 -1
  43. package/src/sap/fe/macros/table/TableAPI.ts +15 -2
  44. package/src/sap/fe/macros/table/TableSizeHelper.js +3 -3
  45. package/src/sap/fe/macros/table/TableSizeHelper.ts +5 -2
  46. package/src/sap/fe/macros/table/TreeTable.js +7 -1
  47. package/src/sap/fe/macros/table/TreeTable.tsx +7 -1
  48. package/src/sap/fe/macros/table/delegates/TableDelegate.js +3 -2
  49. package/src/sap/fe/macros/table/delegates/TableDelegate.ts +10 -3
  50. package/src/sap/fe/macros/table/massEdit/MassEditDialog.js +10 -10
  51. package/src/sap/fe/macros/table/massEdit/MassEditDialog.tsx +11 -9
  52. package/src/sap/fe/macros/table/massEdit/MassEditDialogHelper.js +8 -8
  53. package/src/sap/fe/macros/table/massEdit/MassEditDialogHelper.tsx +7 -6
  54. package/src/sap/fe/macros/valuehelp/ValueHelpDelegate.js +27 -3
  55. package/src/sap/fe/macros/valuehelp/ValueHelpDelegate.ts +28 -2
@@ -1,7 +1,6 @@
1
1
  import type { ConvertedMetadata, Property } from "@sap-ux/vocabularies-types";
2
2
  import Log from "sap/base/Log";
3
3
  import ObjectPath from "sap/base/util/ObjectPath";
4
- import deepEqual from "sap/base/util/deepEqual";
5
4
  import CommonUtils from "sap/fe/core/CommonUtils";
6
5
  import { Activity } from "sap/fe/core/controllerextensions/collaboration/CollaborationCommon";
7
6
  import { convertTypes } from "sap/fe/core/converters/MetaModelConverter";
@@ -119,6 +118,33 @@ export default Object.assign({}, ValueHelpDelegate, {
119
118
  return appComponent.getValueHelpHistoryService();
120
119
  },
121
120
 
121
+ /**
122
+ * Compares two condition objects for equality based on operator and values.
123
+ * @param oldCondition First condition to compare
124
+ * @param newCondition Second condition to compare
125
+ * @returns True if conditions are equal, false otherwise
126
+ */
127
+ checkConditionsEqual(oldCondition: ConditionObject, newCondition: ConditionObject): boolean {
128
+ // Compare operators
129
+ if (oldCondition.operator !== newCondition.operator) {
130
+ return false;
131
+ }
132
+
133
+ // Compare values arrays
134
+ const values1 = oldCondition.values ?? [];
135
+ const values2 = newCondition.values ?? [];
136
+
137
+ if (values1.length !== values2.length) {
138
+ return false;
139
+ }
140
+
141
+ // Sort values for comparison to handle order differences
142
+ const sortedValues1 = [...values1].sort((firstValue, secondValue) => String(firstValue).localeCompare(String(secondValue)));
143
+ const sortedValues2 = [...values2].sort((firstValue, secondValue) => String(firstValue).localeCompare(String(secondValue)));
144
+
145
+ return sortedValues1.every((value, index) => value === sortedValues2[index]);
146
+ },
147
+
122
148
  /**
123
149
  * Get the history data for the value list property from the history service.
124
150
  * No history data is fetched for fields annotated with IsPotentiallySensitive.
@@ -436,7 +462,7 @@ export default Object.assign({}, ValueHelpDelegate, {
436
462
  const conditionPath = filterBarProperty.conditionPath as string;
437
463
  const conditionAlreadyExists = state.filter[conditionPath]?.find((testCondition) => {
438
464
  delete testCondition.filtered;
439
- if (deepEqual(testCondition, newCondition)) {
465
+ if (this.checkConditionsEqual(testCondition, newCondition)) {
440
466
  return true;
441
467
  }
442
468
  // reset filtered to false