@sapui5/sap.suite.ui.generic.template 1.151.1 → 1.153.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.
Files changed (87) hide show
  1. package/package.json +1 -1
  2. package/src/sap/suite/ui/generic/template/.library +1 -1
  3. package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/SmartVisualFilterBar.js +4 -3
  4. package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
  5. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  6. package/src/sap/suite/ui/generic/template/ListReport/Component.js +4 -2
  7. package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +0 -6
  8. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sv.properties +1 -1
  9. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  10. package/src/sap/suite/ui/generic/template/ListReport/view/fragments/FullscreenPage.fragment.xml +3 -0
  11. package/src/sap/suite/ui/generic/template/ObjectPage/Component.js +5 -0
  12. package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +31 -0
  13. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  14. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
  15. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  16. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  17. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +13 -7
  18. package/src/sap/suite/ui/generic/template/genericUtilities/designtime/messagebundle.properties +0 -0
  19. package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +21 -17
  20. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +19 -3
  21. package/src/sap/suite/ui/generic/template/lib/ShareUtils.js +1 -1
  22. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillAIOrchestrator.js +16 -6
  23. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillApplyHandler.js +35 -47
  24. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillDialogController.js +80 -64
  25. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFieldCollector.js +442 -259
  26. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFormRenderer.js +186 -161
  27. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +137 -161
  28. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillTableRenderer.js +157 -191
  29. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +67 -85
  30. package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +56 -4
  31. package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +11 -2
  32. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +7 -1
  33. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +7 -1
  34. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +7 -1
  35. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +7 -1
  36. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +7 -1
  37. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +7 -1
  38. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +7 -1
  39. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +7 -1
  40. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +7 -1
  41. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +7 -1
  42. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +7 -1
  43. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_sappsd.properties +7 -1
  44. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +7 -1
  45. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saptrc.properties +13 -7
  46. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +7 -1
  47. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +7 -1
  48. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +7 -1
  49. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +11 -5
  50. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +10 -4
  51. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +7 -1
  52. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +7 -1
  53. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +7 -1
  54. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +7 -1
  55. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +7 -1
  56. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +7 -1
  57. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +7 -1
  58. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +7 -1
  59. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +7 -1
  60. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +7 -1
  61. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +7 -1
  62. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +7 -1
  63. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +7 -1
  64. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +7 -1
  65. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +7 -1
  66. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +7 -1
  67. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +7 -1
  68. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +7 -1
  69. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +7 -1
  70. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +7 -1
  71. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +7 -1
  72. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +7 -1
  73. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +7 -1
  74. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +8 -2
  75. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +7 -1
  76. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +7 -1
  77. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +7 -1
  78. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +7 -1
  79. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +7 -1
  80. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +7 -1
  81. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +7 -1
  82. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +7 -1
  83. package/src/sap/suite/ui/generic/template/lib/insights/InsightsCardHelper.js +40 -8
  84. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +3 -2
  85. package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +4 -0
  86. package/src/sap/suite/ui/generic/template/library.js +1 -1
  87. package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.151.1",
3
+ "version": "1.153.0",
4
4
  "description": "SAPUI5 Library sap.suite.ui.generic.template",
5
5
  "keywords": [
6
6
  "sapui5",
@@ -7,7 +7,7 @@
7
7
 
8
8
  (c) Copyright 2009-2015 SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.151.1</version>
10
+ <version>1.153.0</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -13,6 +13,7 @@ sap.ui.define([
13
13
  "sap/m/VBox",
14
14
  "sap/m/Button",
15
15
  "sap/m/Title",
16
+ "sap/m/Text",
16
17
  "sap/suite/ui/generic/template/AnalyticalListPage/controller/DropDownController",
17
18
  "sap/suite/ui/generic/template/AnalyticalListPage/controller/DynamicDateRangeController",
18
19
  "sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/FilterItemMicroBar",
@@ -49,6 +50,7 @@ sap.ui.define([
49
50
  VBox,
50
51
  Button,
51
52
  Title,
53
+ Text,
52
54
  DropDownController,
53
55
  DynamicDateRangeController,
54
56
  FilterItemMicroBar,
@@ -854,10 +856,9 @@ sap.ui.define([
854
856
  titleMD.addStyleClass("sapSmartTemplatesAnalyticalListPageRequired");
855
857
  }
856
858
  //second part of the title i.e unit and currency
857
- var titleUnitCurr = new Title({
859
+ var titleUnitCurr = new Text({
858
860
  text: titleObject.titleUnitCurr.length > 1 ? "| " + titleObject.titleUnitCurr : "",
859
- titleStyle: SapCoreLibrary.TitleLevel.H6,
860
- level: SapCoreLibrary.TitleLevel.Auto,
861
+ wrapping: false,
861
862
  width: titleObject.titleUnitCurr.length > 1 ? "4.15rem" : "0rem"
862
863
  });
863
864
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.151.1"
11
+ "version": "1.153.0"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.151.1"
11
+ "version": "1.153.0"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -59,8 +59,10 @@ sap.ui.define(["sap/ui/core/mvc/OverrideExecution",
59
59
  var oTemplatePrivate = oComponent.getModel("_templPriv");
60
60
  oTemplatePrivate.setProperty("/listReport", {}); // Note that component properties are not yet available here
61
61
  },
62
- onActivate: function() {
63
- oViewProxy.onComponentActivate();
62
+ onActivate: function(sBindingPath, bIsComponentCurrentlyActive, bIsBackwards) {
63
+ if (bIsBackwards) {
64
+ oViewProxy.onComponentActivate();
65
+ }
64
66
  },
65
67
  adaptToChildContext: function(sCurrentChildContext) {
66
68
  oViewProxy.adaptToChildContext(sCurrentChildContext);
@@ -933,12 +933,6 @@ sap.ui.define([
933
933
  var oTempModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
934
934
  if (oTempModel.getProperty("/listReport/filterMode") === "easyFilter") {
935
935
  oSmartFilterbar.setVisible(false);
936
- // Only show gray overlay when data in table is present.
937
- // filters scenario where gray overlay shows up when No data Illustrated msg is rendered
938
- if (oTempModel.getProperty("/generic/bDataAreShownInTable")) {
939
- oTempModel.setProperty("/listReport/firstSelection", true);
940
- oTempModel.setProperty("/generic/bDataAreShownInTable", false);
941
- }
942
936
  } else {
943
937
  PXFeedback.triggerPXIntegration("toggleSwitchV2");
944
938
  oSmartFilterbar.setVisible(true);
@@ -73,7 +73,7 @@ CANCEL_AND_DISCARD=F\u00F6rkasta utkast?
73
73
 
74
74
  DISCARD_EDIT=F\u00F6rkasta alla \u00E4ndringar?
75
75
 
76
- DISCARD=F\u00F6rkasta
76
+ DISCARD=Kasta
77
77
 
78
78
  DELETE=Radera
79
79
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.151.1"
11
+ "version": "1.153.0"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -93,6 +93,9 @@
93
93
  </template:with>
94
94
  </OverflowToolbar>
95
95
  </f:footer>
96
+ <f:landmarkInfo>
97
+ <f:DynamicPageAccessibleLandmarkInfo footerRole="ContentInfo"/>
98
+ </f:landmarkInfo>
96
99
  </f:DynamicPage>
97
100
  </template:with>
98
101
  </template:with>
@@ -126,6 +126,11 @@ sap.ui.define(["sap/suite/ui/generic/template/lib/TemplateAssembler",
126
126
  "type": "boolean",
127
127
  "defaultValue": false
128
128
  },
129
+ // shall Smart Summarization entry point be visible on this object page?
130
+ "hideSummarizationButton": {
131
+ "type": "boolean",
132
+ "defaultValue": false
133
+ },
129
134
  // shall confirmation popup be shown in object page while saving?
130
135
  "showConfirmationOnDraftActivate": {
131
136
  "type": "boolean",
@@ -1907,6 +1907,11 @@ sap.ui.define([
1907
1907
 
1908
1908
  oViewProxy.onComponentActivate = function(sBindingPath, bIsComponentCurrentlyActive){
1909
1909
  oBase.onComponentActivate(sBindingPath, bIsComponentCurrentlyActive);
1910
+ // Seed showRelatedApps for paths that skip startup-parameter processing (cross-app nav, direct URL).
1911
+ var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
1912
+ if (oTemplatePrivateModel.getProperty("/objectPage/showRelatedApps") === undefined) {
1913
+ oTemplatePrivateModel.setProperty("/objectPage/showRelatedApps", oController.getOwnerComponent().getShowRelatedApps());
1914
+ }
1910
1915
  mTablesWithSelectionChangeDuringDraftEdit = Object.create(null);
1911
1916
  };
1912
1917
 
@@ -2420,12 +2425,36 @@ sap.ui.define([
2420
2425
  return;
2421
2426
  }
2422
2427
 
2428
+ // Check manifest opt-out: global takes precedence, then page-level
2429
+ if (oTemplPrivGlobal.getProperty("/generic/fioriAI/hideSummarizationButtonGlobal")) {
2430
+ return;
2431
+ }
2432
+ var oTemplPriv = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
2433
+ if (oTemplPriv.getProperty("/objectPage/hideSummarizationButton")) {
2434
+ return;
2435
+ }
2436
+
2423
2437
  // Find "Summarize" button
2424
2438
  var oButton = oController.byId("summarize");
2425
2439
  if (oButton) {
2426
2440
  oButton.firePress();
2427
2441
  }
2428
2442
  }
2443
+
2444
+ // Calculate summarization rendering based on global and per-object page settings.
2445
+ function setSummarizationButtonVisibility() {
2446
+ var oComponentUtils = oTemplateUtils.oComponentUtils;
2447
+ var bHideSummarizationButtonGlobal = oComponentUtils.getTemplatePrivateGlobalModel().getProperty("/generic/fioriAI/hideSummarizationButtonGlobal");
2448
+ var bHideSummarizationButton = false;
2449
+ if (oComponentUtils.getSettings().hideSummarizationButton !== undefined) {
2450
+ if (typeof oComponentUtils.getSettings().hideSummarizationButton !== "boolean") {
2451
+ oLogger.warning("Manifest setting 'hideSummarizationButton' must be a boolean. Falling back to default: false.");
2452
+ } else {
2453
+ bHideSummarizationButton = oComponentUtils.getSettings().hideSummarizationButton;
2454
+ }
2455
+ }
2456
+ oComponentUtils.getTemplatePrivateModel().setProperty("/objectPage/hideSummarizationButton", bHideSummarizationButtonGlobal || bHideSummarizationButton);
2457
+ }
2429
2458
 
2430
2459
  // Generation of Event Handlers
2431
2460
  var oControllerImplementation = {
@@ -2434,6 +2463,8 @@ sap.ui.define([
2434
2463
  var bHeaderContent = oObjectPage.getShowHeaderContent();
2435
2464
  var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
2436
2465
  oTemplatePrivateModel.setProperty("/objectPage/headerContentVisible", bHeaderContent);
2466
+ // Calculate summarization rendering based on global and per-object page settings.
2467
+ setSummarizationButtonVisibility();
2437
2468
  // Create a wrapper around the object page
2438
2469
  // Use this wrapper to store/restore the pinned status of the header.
2439
2470
  oObjectPageLayoutWrapper = oTemplateUtils.oCommonUtils.getControlStateWrapper(oObjectPage);
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.151.1"
9
+ "version": "1.153.0"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -149,7 +149,7 @@
149
149
  fesr:press="fe:sum:summarize"
150
150
  type="Ghost"
151
151
  dt:designtime="not-adaptable"
152
- visible="{_templPrivGlobal>/generic/fioriAI/isSummarizationEnabled}" />
152
+ visible="{= ${_templPrivGlobal>/generic/fioriAI/isSummarizationEnabled} &amp;&amp; !${_templPriv>/objectPage/hideSummarizationButton} }"/>
153
153
  <uxap:ObjectPageHeaderActionButton id="{:= ${parameter>/stableId}.getStableId({type: 'ObjectPageAction', subType: 'RelatedApps'}) }"
154
154
  text="{i18n>RELATED_APPS}"
155
155
  hideText="false"
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.151.1"
9
+ "version": "1.153.0"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.151.1"
9
+ "version": "1.153.0"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -33,6 +33,8 @@ sap.ui.define([
33
33
  // not yet been called (race condition on second navigation: bAllControlsInitialized=true
34
34
  // causes fnApplyVariantState to run synchronously, triggering afterVariantLoad before the
35
35
  // Promise.all in SmartVariantManagementWrapper resolves and calls setSVMWrapperCallbacks).
36
+ // Cold-start _CUSTOM restore is also handled there: afterVariantLoad("INIT") fires before
37
+ // getInitializedPromise() resolves, so modifyStartupExtension always gets the final word.
36
38
  var oSVMWrapperCallbacks = null;
37
39
 
38
40
  var oVariantManagementInitializedPromise;
@@ -59,10 +61,9 @@ sap.ui.define([
59
61
  if (oCustomData && oCustomData[dataPropertyNameGeneric]) {
60
62
  oGenericData = oCustomData[dataPropertyNameGeneric];
61
63
  } else {
62
- // getCustomFilterData() returns null on cold start (no prior sap-iapp-state) because
63
- // setCustomFilterData() is only called from beforeVariantFetch (variant save path),
64
- // never during the initial LREP variant load. The _CUSTOM section is present in the
65
- // variant content — fall back to reading it via getVariantContent().
64
+ // getCustomFilterData() returns null when no beforeVariantFetch has run yet for this
65
+ // variant (e.g. a named variant being switched to for the first time in the session, or cold-start INIT).
66
+ // The _CUSTOM section is present in the variant content — fall back to reading it via getVariantContent().
66
67
  try {
67
68
  var oSVM = oSmartFilterBar.getSmartVariant();
68
69
  // getCurrentVariantId() converts STANDARDVARIANTKEY to "" which _getVariantById can't look up.
@@ -189,7 +190,13 @@ sap.ui.define([
189
190
  function fnSetState(oState) {
190
191
  // Don't cause side effects (filter change event), if setting state is no real change.
191
192
  // If this comparison fails for state that actually are identically, maybe it needs to be enhanced (e.g. ignoring order in some arrays might be needed)
192
- if (JSON.stringify(oState) === JSON.stringify(fnGetState())){
193
+ // If default values present - always set state, to ensure that DefaultValues will be converted to tokens.
194
+ // SFB will have DefaultValues only in case then SFB currently have selected variant with DefaultValues.
195
+ // In case then application is restored from state, SFB will load variant with DefaultValues.
196
+ // SFB ui state and state from URL will be equals. But SFB will have DefaultValues in corresponding ValueHelp controls.
197
+ // To override DefaultValues and to convert to tokens, FEv2 will set state from URL.
198
+ var oUiState = oSmartFilterBar.getUiState();
199
+ if (JSON.stringify(oState) === JSON.stringify(fnGetState()) && !oUiState.getDefaultValues()){
193
200
  return;
194
201
  }
195
202
 
@@ -197,8 +204,7 @@ sap.ui.define([
197
204
 
198
205
  // SFB expects a UIState object - not serializable, but a managed object, actually containing also information not belonging to SFBs state
199
206
  // => get current UIState object from SFB, replace only relevant information, and set it again
200
- var oUiState = oSmartFilterBar.getUiState(),
201
- oSmartVariant = oSmartFilterBar.getSmartVariant(),
207
+ var oSmartVariant = oSmartFilterBar.getSmartVariant(),
202
208
  bIsCurrentVariantModifiedBeforeSetState = oSmartVariant.currentVariantGetModified();
203
209
 
204
210
  oUiState.getSelectionVariant().SelectOptions = oState && oState.selectOptions;
@@ -924,26 +924,30 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
924
924
  oDataField = oCollection[i];
925
925
  oResult = null;
926
926
  // if type is DataFieldForAnnotation, then loop over target annotations
927
- if (oDataField.RecordType === "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" &&
928
- oDataField.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.FieldGroup") >= 0) {
929
- // oDataField = oAnnotationHelper.getDataFieldFromDataFieldForAnnotation(oInterface, oDataField);
930
- var oTargetLineItem = oMetaModel.getContext(oInterface.getPath() + "/" + i + "/Target");
931
- var sResolvedPath = AnnotationHelperModel.resolvePath(oTargetLineItem);
932
- var oDataFieldTarget = oMetaModel.getObject(sResolvedPath);
933
-
934
- if (oDataFieldTarget.Data && oDataFieldTarget.Data.length > 0) {
935
- for (var j = 0; j < oDataFieldTarget.Data.length; j++) {
936
- oResult = oAnnotationHelper.generateAnnotatedActionCustomData(oDataFieldTarget.Data[j], oFacet, oTabItem, oChartItem);
937
- if (oResult) {
938
- aButtonsData.push(oResult);
927
+ try {
928
+ if (oDataField.RecordType === "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" &&
929
+ oDataField.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.FieldGroup") >= 0) {
930
+ // oDataField = oAnnotationHelper.getDataFieldFromDataFieldForAnnotation(oInterface, oDataField);
931
+ var oTargetLineItem = oMetaModel.getContext(oInterface.getPath() + "/" + i + "/Target");
932
+ var sResolvedPath = AnnotationHelperModel.resolvePath(oTargetLineItem);
933
+ var oDataFieldTarget = oMetaModel.getObject(sResolvedPath);
934
+
935
+ if (oDataFieldTarget.Data && oDataFieldTarget.Data.length > 0) {
936
+ for (var j = 0; j < oDataFieldTarget.Data.length; j++) {
937
+ oResult = oAnnotationHelper.generateAnnotatedActionCustomData(oDataFieldTarget.Data[j], oFacet, oTabItem, oChartItem);
938
+ if (oResult) {
939
+ aButtonsData.push(oResult);
940
+ }
939
941
  }
940
942
  }
943
+ } else {
944
+ oResult = oAnnotationHelper.generateAnnotatedActionCustomData(oDataField, oFacet, oTabItem, oChartItem);
945
+ if (oResult) {
946
+ aButtonsData.push(oResult);
947
+ }
941
948
  }
942
- } else {
943
- oResult = oAnnotationHelper.generateAnnotatedActionCustomData(oDataField, oFacet, oTabItem, oChartItem);
944
- if (oResult) {
945
- aButtonsData.push(oResult);
946
- }
949
+ } catch (oError) {
950
+ oLogger.error("configure - " + JSON.stringify(oDataField));
947
951
  }
948
952
  }
949
953
  }
@@ -290,7 +290,17 @@ sap.ui.define([
290
290
  // - FCL: only used in case the App runs in FCL. In this case the FlexibleColumnLayoutHandler instantiates and maintains this subsection
291
291
  // - messagePage: is used to control the MessagePage. It is set on demand by the NavigationController.
292
292
  // Moreover, this function attaches the ui5 message model as named model to the AppComponent with name _templPrivMessage
293
- function setGlobalTemplateModels(){
293
+ function setGlobalTemplateModels() {
294
+ var oGenericApp = oAppComponent.getManifestEntry("sap.ui.generic.app");
295
+ var oGlobalSettings = oGenericApp && oGenericApp.settings;
296
+ var bGlobalHideSummarizationButton = false;
297
+ if (oGlobalSettings && oGlobalSettings.hideSummarizationButton !== undefined) {
298
+ if (typeof oGlobalSettings.hideSummarizationButton !== "boolean") {
299
+ oLogger.warning("Manifest setting 'hideSummarizationButton' must be a boolean. Falling back to default: false.");
300
+ } else {
301
+ bGlobalHideSummarizationButton = oGlobalSettings.hideSummarizationButton;
302
+ }
303
+ }
294
304
  oTemplateContract.oTemplatePrivateGlobalModel.setProperty("/generic", {
295
305
  // Since draft saving is done globally, there is a global state which applies to all DraftIndicators
296
306
  draftIndicatorState: DraftIndicatorState.Clear,
@@ -303,7 +313,8 @@ sap.ui.define([
303
313
  isSummarizationEnabled : false,
304
314
  isEasyFilterEnabled : false,
305
315
  isErrorExplanationEnabled : false,
306
- isEasyFillEnabled: false
316
+ isEasyFillEnabled: false,
317
+ hideSummarizationButtonGlobal: bGlobalHideSummarizationButton
307
318
  }
308
319
  });
309
320
  oAppComponent.setModel(oTemplateContract.oTemplatePrivateGlobalModel, "_templPrivGlobal");
@@ -961,7 +972,7 @@ sap.ui.define([
961
972
  * @public
962
973
  * @extends sap.ui.core.UIComponent
963
974
  * @author SAP SE
964
- * @version 1.151.1
975
+ * @version 1.153.0
965
976
  * @name sap.suite.ui.generic.template.lib.AppComponent
966
977
  */
967
978
  var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -1073,6 +1084,11 @@ sap.ui.define([
1073
1084
  noDataRepresentation: {
1074
1085
  type: "string",
1075
1086
  defaultValue: "illustration" // Possible values: 'illustration', 'illustrationWithFallback' and 'textOnly'
1087
+ },
1088
+ // Hide Smart Summarization button globally in the application object page
1089
+ hideSummarizationButton: {
1090
+ type: "boolean",
1091
+ defaultValue: false
1076
1092
  }
1077
1093
  },
1078
1094
  events: {
@@ -13,7 +13,7 @@ sap.ui.define(["sap/base/util/ObjectPath", "sap/ushell/ui/footerbar/AddBookmarkB
13
13
  // Here we have introduced probing as for test scenarios as sap.ushell is not present all the iframe cases
14
14
  var UShellContainer = sap.ui.require("sap/ushell/Container");
15
15
  return UShellContainer ? new Promise(function(fnResolve){
16
- UShellContainer.getFLPUrlAsync(true).done(function (sFLPUrl){
16
+ UShellContainer.getFLPUrlAsync(true).then(function (sFLPUrl){
17
17
  fnResolve(sFLPUrl);
18
18
  });
19
19
  }) : Promise.resolve(document.URL);
@@ -73,6 +73,21 @@ sap.ui.define([
73
73
  fnGetLabel
74
74
  );
75
75
 
76
+ // Seed current field values so the LLM can compute relative changes
77
+ // (e.g. "increase Delivery Date by 10 days", "increase Price by 20%").
78
+ if (oObjectPageContext) {
79
+ Object.keys(mFieldMapping).forEach(function(sPropertyName) {
80
+ var oEntry = mFieldMapping[sPropertyName];
81
+ if (!oEntry || oEntry.isCollection === true) {
82
+ return;
83
+ }
84
+ var vCurrentValue = oObjectPageContext.getProperty(sPropertyName);
85
+ if (vCurrentValue !== undefined && vCurrentValue !== null) {
86
+ oEntry.currentValue = vCurrentValue;
87
+ }
88
+ });
89
+ }
90
+
76
91
  return mFieldMapping;
77
92
  },
78
93
 
@@ -188,14 +203,9 @@ sap.ui.define([
188
203
  oSplitResult.collectionsWithRejectedNewRows[sFieldName] = sRejectionType;
189
204
  }
190
205
 
206
+ // All proposed new rows are accepted when creation is allowed
191
207
  var aNewRows = bAllowsCreation ? aRawNewRows : [];
192
208
 
193
- // Cap new rows to one per table; flag if the AI proposed more
194
- if (aNewRows.length > 1) {
195
- oSplitResult.attemptedMultipleNewRows = true;
196
- aNewRows = [aNewRows[0]];
197
- }
198
-
199
209
  var aRowUpdates = aExistingRowUpdates.concat(aNewRows);
200
210
 
201
211
  var oValidation = oFieldCollector.isValidSmartTable(oFieldMeta.entitySet, oObjectPage);
@@ -1,7 +1,8 @@
1
1
  sap.ui.define([
2
2
  "sap/suite/ui/generic/template/genericUtilities/FeLogger",
3
- "sap/suite/ui/generic/template/genericUtilities/FeError"
4
- ], function(FeLogger, FeError) {
3
+ "sap/suite/ui/generic/template/genericUtilities/FeError",
4
+ "sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFieldCollector"
5
+ ], function(FeLogger, FeError, EasyFillFieldCollector) {
5
6
  "use strict";
6
7
 
7
8
  var sClassName = "lib.ai.EasyFill.EasyFillApplyHandler";
@@ -45,7 +46,8 @@ sap.ui.define([
45
46
 
46
47
  // Copy each AI-suggested property value from the transient context to the live OP context
47
48
  for (var sProp in oTransientObject) {
48
- if (sProp !== "__metadata" && mUpdatableLookupMap[sProp]) {
49
+ if (!Object.prototype.hasOwnProperty.call(oTransientObject, sProp)) { continue; }
50
+ if (sProp !== "__metadata" && Object.prototype.hasOwnProperty.call(mUpdatableLookupMap, sProp)) {
49
51
  oObjectPageContext.setProperty(sProp, oTransientObject[sProp]);
50
52
  iApplied++;
51
53
  }
@@ -84,7 +86,7 @@ sap.ui.define([
84
86
  *
85
87
  * @param {object} oTableStagingState - table staging state { mPendingNewRowContexts }
86
88
  * @param {object} mCollectionState - collection tracking state (mCollectionProperties)
87
- * @returns {object} map of { navProperty: plainValuesObject }
89
+ * @returns {object} map of { navProperty: plainValuesObject[] }
88
90
  */
89
91
  extractPendingNewRowValues: function(oTableStagingState, mCollectionState) {
90
92
  var mNewRowValues = Object.create(null);
@@ -96,18 +98,23 @@ sap.ui.define([
96
98
  var mCollectionPropertyMap = (mCollectionState && mCollectionState.mCollectionProperties &&
97
99
  mCollectionState.mCollectionProperties[sCollectionName]) || Object.create(null);
98
100
 
99
- // Extract scalar values set by the user during the preview (first new row only — cap is 1)
100
- var oNewContext = aNewContexts[0];
101
- var oValues = Object.create(null);
102
- Object.keys(mCollectionPropertyMap).forEach(function(sPropName) {
103
- var vValue = oNewContext.getProperty && oNewContext.getProperty(sPropName);
104
- if (vValue !== undefined && vValue !== null && typeof vValue !== "object") {
105
- oValues[sPropName] = vValue;
106
- }
101
+ // Extract scalar values for ALL non-excluded new row contexts
102
+ var oExcludedNew = oTableStagingState.mExcludedNewRows && oTableStagingState.mExcludedNewRows[sCollectionName];
103
+ var aRowValues = aNewContexts.filter(function(_, i) {
104
+ return !oExcludedNew || !oExcludedNew[i];
105
+ }).map(function(oNewContext) {
106
+ var oValues = Object.create(null);
107
+ Object.keys(mCollectionPropertyMap).forEach(function(sPropName) {
108
+ var vValue = oNewContext.getProperty && oNewContext.getProperty(sPropName);
109
+ if (vValue !== undefined && vValue !== null && typeof vValue !== "object") {
110
+ oValues[sPropName] = vValue;
111
+ }
112
+ });
113
+ return oValues;
107
114
  });
108
- mNewRowValues[sCollectionName] = oValues;
109
- oLogger.debug("extractPendingNewRowValues: extracted " + Object.keys(oValues).length +
110
- " value(s) for new row in '" + sCollectionName + "'");
115
+ mNewRowValues[sCollectionName] = aRowValues;
116
+ oLogger.debug("extractPendingNewRowValues: extracted " + aRowValues.length +
117
+ " new row(s) for '" + sCollectionName + "'");
111
118
  });
112
119
  return mNewRowValues;
113
120
  },
@@ -128,7 +135,9 @@ sap.ui.define([
128
135
  var aStagedRows = mStagedRowsByCollection[sCollectionName] || [];
129
136
  var mCollectionPropertyMap = mCollectionState.mCollectionProperties[sCollectionName] || Object.create(null);
130
137
 
131
- aStagedRows.forEach(function(oStagedRow) {
138
+ var oExcludedRows = oTableStagingState.mExcludedRows && oTableStagingState.mExcludedRows[sCollectionName];
139
+ aStagedRows.forEach(function(oStagedRow, iIndex) {
140
+ if (oExcludedRows && oExcludedRows[iIndex]) { return; }
132
141
  var oRealContext = oStagedRow.realContext;
133
142
  var oTransientContext = oStagedRow.transientContext;
134
143
  if (!oRealContext || !oTransientContext) {
@@ -188,9 +197,11 @@ sap.ui.define([
188
197
  if (bHasUpdates) {
189
198
  return true;
190
199
  }
191
- // Also return true if there are pending new row contexts
200
+ // Also return true if there are pending new row contexts that are not excluded
192
201
  return Object.keys((oTableStagingState && oTableStagingState.mPendingNewRowContexts) || {}).some(function(sCollectionName) {
193
- return ((oTableStagingState.mPendingNewRowContexts[sCollectionName]) || []).length > 0;
202
+ var aContexts = (oTableStagingState.mPendingNewRowContexts[sCollectionName]) || [];
203
+ var oExcludedNew = oTableStagingState.mExcludedNewRows && oTableStagingState.mExcludedNewRows[sCollectionName];
204
+ return aContexts.some(function(_, i) { return !oExcludedNew || !oExcludedNew[i]; });
194
205
  });
195
206
  },
196
207
 
@@ -208,7 +219,6 @@ sap.ui.define([
208
219
  * @param {function} fnResetTransientContext - EasyFillFormRenderer.resetTransientContext
209
220
  */
210
221
  resetEasyFill: function(bRemoveTextAreaValue, oDialogModel, oController, mCollectionUpdates, oEasyFillLayoutMode, fnRevertStagedUpdates, fnResetTransientContext) {
211
- // Remove dynamically-added table ObjectPageSections from the shared OPL
212
222
  var sTableSectionMarker = "easyfillTableSection";
213
223
  var oObjectPageLayout = oController.byId("EasyFillObjectPageLayout");
214
224
  if (oObjectPageLayout) {
@@ -222,13 +232,9 @@ sap.ui.define([
222
232
  });
223
233
  }
224
234
 
225
- // Revert any staged table row values back to original
226
235
  fnRevertStagedUpdates();
227
-
228
- // Reset the transient context (discard all staged scalar AI values)
229
236
  fnResetTransientContext();
230
237
 
231
- // Reset all dialog model properties to their initial state
232
238
  oDialogModel.setProperty("/isFormVisible", false);
233
239
  oDialogModel.setProperty("/isIllustrationVisible", true);
234
240
  oDialogModel.setProperty("/isSaveEnabled", false);
@@ -246,16 +252,13 @@ sap.ui.define([
246
252
  oDialogModel.setProperty("/nonUpdatableFields", {});
247
253
  oDialogModel.setProperty("/hasNonUpdatableFields", false);
248
254
 
249
- // Clear the mutable collection updates map in place
250
255
  Object.keys(mCollectionUpdates).forEach(function(sKey) {
251
256
  delete mCollectionUpdates[sKey];
252
257
  });
253
258
 
254
259
  if (bRemoveTextAreaValue) {
255
260
  var oTextArea = oController.byId("EasyFillInputTextArea");
256
- if (oTextArea) {
257
- oTextArea.setValue("");
258
- }
261
+ if (oTextArea) { oTextArea.setValue(""); }
259
262
  oDialogModel.setProperty("/isEasyFillButtonEnabled", false);
260
263
  }
261
264
 
@@ -289,30 +292,15 @@ sap.ui.define([
289
292
  },
290
293
 
291
294
  _isEditableProperty: function(oPropertyMeta, oRowObject) {
292
- if (!oPropertyMeta) {
293
- return false;
294
- }
295
- var sUpdatable = oPropertyMeta["sap:updatable"];
296
- if (sUpdatable) {
297
- return sUpdatable !== "false";
298
- }
299
- var oAnnotation = oPropertyMeta["com.sap.vocabularies.Common.v1.FieldControl"];
300
- if (oAnnotation && oAnnotation["EnumMember"]) {
301
- return oAnnotation["EnumMember"] !== "com.sap.vocabularies.Common.v1.FieldControlType/ReadOnly";
302
- }
303
- var sFieldControl = oPropertyMeta["sap:field-control"];
304
- if (sFieldControl) {
305
- var iFieldControlValue = oRowObject && oRowObject[sFieldControl];
306
- return iFieldControlValue !== 1;
307
- }
308
- return true;
295
+ return EasyFillFieldCollector.isEditableByContextObject(oPropertyMeta, oRowObject, undefined);
309
296
  },
310
297
 
311
298
  _isSupportedStagedValue: function(vValue) {
312
- return vValue === null ||
313
- vValue === undefined ||
299
+ return vValue !== undefined && (
300
+ vValue === null ||
314
301
  typeof vValue !== "object" ||
315
- vValue instanceof Date;
302
+ vValue instanceof Date
303
+ );
316
304
  },
317
305
 
318
306
  _areValuesEqual: function(vLeft, vRight) {