@sapui5/sap.suite.ui.generic.template 1.136.6 → 1.136.8

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 (26) 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/i18n/i18n_kk.properties +1 -1
  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/controller/IappStateHandler.js +34 -33
  7. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pt.properties +1 -1
  8. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  9. package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +1 -1
  10. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt.properties +1 -1
  11. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_vi.properties +2 -2
  12. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  13. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartForm.fragment.xml +1 -1
  14. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  15. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  16. package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +31 -2
  17. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
  18. package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +44 -199
  19. package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterDataFetcherHelper.js +334 -0
  20. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +1 -1
  21. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +3 -3
  22. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +1 -1
  23. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +1 -1
  24. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
  25. package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +1 -1
  26. package/src/sap/suite/ui/generic/template/library.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.136.6",
3
+ "version": "1.136.8",
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.136.6</version>
10
+ <version>1.136.8</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -45,7 +45,7 @@ GO_FILTERS=\u04E8\u0442\u0443
45
45
 
46
46
  SHOW_ON_FILTER_BAR=\u0421\u04AF\u0437\u0433\u0456 \u0436\u043E\u043B\u0430\u0493\u044B\u043D\u0434\u0430 \u043A\u04E9\u0440\u0441\u0435\u0442\u0443
47
47
 
48
- VISUAL_FILTER_FILTERS=\u0421\u04AF\u0437\u0433\u0456\u043B\u0435\u0440\u0434\u0456 \u0441\u04D9\u0439\u043A\u0435\u0441\u0442\u0435\u043D\u0434\u0456\u0440\u0443
48
+ VISUAL_FILTER_FILTERS=\u0421\u04AF\u0437\u0433\u0456\u043B\u0435\u0440\u0434\u0456 \u0431\u0435\u0439\u0456\u043C\u0434\u0435\u0443
49
49
 
50
50
  VISUAL_FILTER_FILTERS_WITH_COUNT=\u0421\u04AF\u0437\u0433\u0456\u043B\u0435\u0440\u0434\u0456 \u0431\u0435\u0439\u0456\u043C\u0434\u0435\u0443 ({0})
51
51
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.136.6"
11
+ "version": "1.136.8"
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.136.6"
11
+ "version": "1.136.8"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -84,12 +84,12 @@ sap.ui.define([
84
84
  var aPageVariantControlStateWrappers = []; // controls handled from page variant management if used: smartTable, searchfield, partly multiple views
85
85
 
86
86
  // SmartTable state: Table Settings and (in case of control level variant management) selected variant and whether it's dirty
87
- // In case of multipleViews with multiple tables (mode "multi"), each tab has an own table or chart, which has an own state, so multipleViewsHandler has to take care of
87
+ // In case of multipleViews with multiple tables (mode "multi"), each tab has an own table or chart, which has an own state, so multipleViewsHandler has to take care of
88
88
  // storing/restoring their states (in its part of the appState stored in genericData.tableTabData)
89
- // In this case, mutliViewsHandler exchanges oState.oPresentationControlHandler (setting it always to the current visible one), so don't rely on that to get the wrapper.
89
+ // In this case, mutliViewsHandler exchanges oState.oPresentationControlHandler (setting it always to the current visible one), so don't rely on that to get the wrapper.
90
90
  // Using the id (without providing optional parameter sQuickVariantKey) returns the smartTable only in single table case.
91
91
  var oSmartTable = oController.byId(StableIdHelper.getStableId({type: "ListReportTable", subType: "SmartTable"}));
92
- if (oSmartTable){ // in multipleViews case (with multiple tables) currently multipleViews handler handles complete state information
92
+ if (oSmartTable){ // in multipleViews case (with multiple tables) currently multipleViews handler handles complete state information
93
93
  aControlStateWrappers.push(oTemplateUtils.oCommonUtils.getControlStateWrapper(oSmartTable));
94
94
  }
95
95
 
@@ -128,7 +128,7 @@ sap.ui.define([
128
128
 
129
129
  // List of handlers to react on (app or adaptation) extension state changes. Only one entry expected (handler in SFB wrapper). Currently, extensions are only possible in
130
130
  // SFB - if extensions at other places are needed, the similar handler might differ depending on whether page variant management is used.
131
- var aExtensionStateChangeHandlers = [];
131
+ var aExtensionStateChangeHandlers = [];
132
132
  function customAppStateChange() {
133
133
  aExtensionStateChangeHandlers.forEach(function(fnHandler) {
134
134
  fnHandler();
@@ -239,7 +239,7 @@ sap.ui.define([
239
239
 
240
240
 
241
241
  // Wrapper to control whether data is loaded
242
-
242
+
243
243
  function fnGetDataLoadedWrapper(){
244
244
  // Wrapper to control whether data is expected to be loaded - controls the state, but does not trigger loading data on restore!
245
245
  var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
@@ -247,15 +247,15 @@ sap.ui.define([
247
247
  // - startup with iAppState: anyway setState will be called
248
248
  // - other startup cases: applyInitialLoadBehavior calls setState explicitly
249
249
  // - navigation
250
-
250
+
251
251
  function fnSetState(bState){
252
252
  oTemplatePrivateModel.setProperty("/generic/bDataAreShownInTable", bState);
253
253
  }
254
-
254
+
255
255
  function fnGetState(){
256
256
  return oTemplatePrivateModel.getProperty("/generic/bDataAreShownInTable");
257
257
  }
258
-
258
+
259
259
  function fnSetDataShown(bDataShown, fnHandler){
260
260
  if (bDataShown === fnGetState()){
261
261
  return;
@@ -263,7 +263,7 @@ sap.ui.define([
263
263
  fnSetState(bDataShown);
264
264
  fnHandler();
265
265
  }
266
-
266
+
267
267
  return {
268
268
  getLocalId: function(){
269
269
  return "$dataLoaded";
@@ -271,7 +271,7 @@ sap.ui.define([
271
271
  setState: fnSetState,
272
272
  getState: fnGetState,
273
273
  attachStateChanged: function(fnHandler){
274
- // changing from data not loaded to data loaded:
274
+ // changing from data not loaded to data loaded:
275
275
  // - when SFB triggers search
276
276
  oState.oSmartFilterbar.attachSearch(fnSetDataShown.bind(null, true, fnHandler));
277
277
 
@@ -286,7 +286,7 @@ sap.ui.define([
286
286
  }
287
287
  };
288
288
  }
289
-
289
+
290
290
  var oDataLoadedWrapper = fnGetDataLoadedWrapper();
291
291
  aControlStateWrappers.push(oDataLoadedWrapper);
292
292
  // oDataLoadedWrapper.attachStateChanged(changeIappState);
@@ -396,7 +396,7 @@ sap.ui.define([
396
396
  if (Device.system.phone) {
397
397
  collapseHeader();
398
398
  }
399
- // Ideally, oDataLoadedWrapper should ensure to keep its state correct. However, currently we have no means to attach to the command - i.e. oDataLoadedWrapper only
399
+ // Ideally, oDataLoadedWrapper should ensure to keep its state correct. However, currently we have no means to attach to the command - i.e. oDataLoadedWrapper only
400
400
  // attaches to SFB's search event, which is only triggered when user presses the go button. When keyboard shortcut is used instead, this handler would be called (as it
401
401
  // is attached to the command), but SFB's search event would not be triggered. As workaround, we additionally set data loaded state to true here and inform explicitly
402
402
  // the the state has changed.
@@ -440,7 +440,7 @@ sap.ui.define([
440
440
  }
441
441
  }
442
442
  }
443
-
443
+
444
444
  /*
445
445
  This method is called when an LR app is the target of an external navigation and the XAppState data contains a presentationVariant.
446
446
  The sorting from this presentationVariant is then applied to the table.
@@ -460,13 +460,13 @@ sap.ui.define([
460
460
  fnAdaptOtherControlsToAppState(oAppData.controlStates);
461
461
  if (areDataShownInTable()){
462
462
  // fnAdaptOtherControlsToAppState only (synchronously) sets the state including the information whether data should be loaded - if this is the case, the actual loading
463
- // (which happens asynchronous of course) still needs to be triggered
463
+ // (which happens asynchronous of course) still needs to be triggered
464
464
  loadData();
465
465
  } else {
466
466
  // hide placeholder already here, if no data is to be loaded - in case data is loaded, it will be hidden in data received event
467
467
  oTemplateUtils.oComponentUtils.hidePlaceholder();
468
- }
469
-
468
+ }
469
+
470
470
  // special case: when restoring an old app state with data loaded, but in the meantime a filter not set in that state has been changed to mandatory, SFB.search would not
471
471
  // trigger a request (but instead only mark that filter) - thus hiding placeholder now to avoid it to stay forever
472
472
  // TODO: refactor: Still in that case our internal data shows data are loaded - ideally, that should not be the case
@@ -603,7 +603,7 @@ sap.ui.define([
603
603
 
604
604
  function fnAdaptToAppStateStartUpWithParameters(oAppData, oURLParameters, sPreferredQuickVariantSelectionKey){
605
605
  handleVariantIdPassedViaURLParams(oURLParameters);
606
-
606
+
607
607
  var oSFBUiState = oState.oSmartFilterbar.getUiState();
608
608
  var oSFBSemanticDates = oSFBUiState.getSemanticDates();
609
609
  //oStartupObject to be passed to the extension where urlParameters and selectedQuickVariantSelectionKey are optional
@@ -766,23 +766,24 @@ sap.ui.define([
766
766
  default:
767
767
  throw new FeError(sClassName, "Invalid navigation type: " + sNavType);
768
768
  }
769
-
769
+
770
770
  // common to all startup cases (except iAppState)
771
771
  if (areDataShownInTable()){
772
772
  // trigger search if needed
773
773
  oState.oSmartFilterbar.search();
774
- // For desktop devices, expand the header for Standard and Custom variants and for tablet and mobile devices,
774
+ // For desktop devices, expand the header for Standard and Custom variants and for tablet and mobile devices,
775
775
  // collapse the header only if search is triggered.
776
776
  if (Device.system.desktop) {
777
777
  oTemplateUtils.oCommonUtils.getControlStateWrapper(oController.byId(StableIdHelper.getStableId({type: "ListReportPage", subType: "DynamicPage"}))).setHeaderState(oController, true);
778
778
  } else {
779
779
  collapseHeader();
780
780
  }
781
- } else {
782
- // if no data are loaded, place holder has to be hidden now - otherwise it will be hidden when data is received
781
+ }
782
+ if (!areDataShownInTable() || Object.keys(oState.oSmartFilterbar.verifySearchAllowed()).length > 0) {
783
+ // if no data are loaded or search is not allowed, place holder has to be hidden now - otherwise it will be hidden when data is received
783
784
  oTemplateUtils.oComponentUtils.hidePlaceholder();
784
785
  }
785
-
786
+
786
787
  // ensure first iAppState is created
787
788
  changeIappState();
788
789
  }
@@ -999,14 +1000,14 @@ sap.ui.define([
999
1000
  }
1000
1001
 
1001
1002
  // provide data load settings including defaulting
1002
- // ideally, this should be implemented in a generic way in template assembler, so that generated getters also return default values for objects if not explicitely set in
1003
+ // ideally, this should be implemented in a generic way in template assembler, so that generated getters also return default values for objects if not explicitely set in
1003
1004
  // manifest (i.e. it should be sufficient to define the default in component - no need to individually implement defaulting!)
1004
1005
  function getDataLoadSettings(){
1005
1006
  // general default
1006
1007
  var oDefaultDataLoadSettings = {loadDataOnAppLaunch: "ifAnyFilterExist"};
1007
1008
 
1008
1009
  // intension is boolean, but unfortunately faulty values are (historically) not treated consistently
1009
- var bEnableAutoBindingMultiViews = oState.oMultipleViewsHandler.getOriginalEnableAutoBinding();
1010
+ var bEnableAutoBindingMultiViews = oState.oMultipleViewsHandler.getOriginalEnableAutoBinding();
1010
1011
 
1011
1012
  // if multiple views settings is not defined (also the case in single views case), general default is taken. Unlike other faulty values, null is treated like undefined
1012
1013
  if (bEnableAutoBindingMultiViews !== undefined && bEnableAutoBindingMultiViews !== null){
@@ -1016,13 +1017,13 @@ sap.ui.define([
1016
1017
 
1017
1018
  var oManifestDataLoadSettings = oController.getOwnerComponent().getDataLoadSettings();
1018
1019
  // (historically) explicit setting empty string (not an allowed value according to definition in component!) is treated like undefined (including adopting multiple views
1019
- // settings. Other not allowed values (any other sting) were ignored, i.e. returning undefined from getInitialLoadBehaviourSettings, thus setting undefined to
1020
- // oSmartVariantManagement.setExecuteOnStandard (which actually only sets the default) and finally using the value returned from
1020
+ // settings. Other not allowed values (any other sting) were ignored, i.e. returning undefined from getInitialLoadBehaviourSettings, thus setting undefined to
1021
+ // oSmartVariantManagement.setExecuteOnStandard (which actually only sets the default) and finally using the value returned from
1021
1022
  // oSmartVariantManagement.getExecuteOnStandard (only different from overall default (false), if user has explicitly set it)
1022
1023
  if (oManifestDataLoadSettings && oManifestDataLoadSettings.loadDataOnAppLaunch === ""){
1023
1024
  oManifestDataLoadSettings.loadDataOnAppLaunch = undefined;
1024
1025
  }
1025
-
1026
+
1026
1027
  // explicit setting has highest priority
1027
1028
  return extend(oDefaultDataLoadSettings, oManifestDataLoadSettings);
1028
1029
  }
@@ -1031,7 +1032,7 @@ sap.ui.define([
1031
1032
  // - sets default value for flag whether standard variant should be execute on select
1032
1033
  // - determines whether we actually should load data
1033
1034
  function applyInitialLoadBehavior(bDataLoadCausedByNavigation){
1034
- // cases definitely determining to load data initially
1035
+ // cases definitely determining to load data initially
1035
1036
  // - worklist
1036
1037
  // - livemode
1037
1038
  // - master detail (i.e. bLoadListAndFirstEntryOnStartup is set)
@@ -1040,17 +1041,17 @@ sap.ui.define([
1040
1041
 
1041
1042
  var sLoadBehaviour = getDataLoadSettings().loadDataOnAppLaunch;
1042
1043
  if (!oSmartVariantManagement || oController.getOwnerComponent().getVariantManagementHidden()){
1043
- // No VM ->
1044
+ // No VM ->
1044
1045
  bShouldDataBeLoaded = bShouldDataBeLoaded || sLoadBehaviour === "always";
1045
1046
  bShouldDataBeLoaded = bShouldDataBeLoaded || (sLoadBehaviour === "ifAnyFilterExist" && oSmartFilterbar.getFiltersWithValues().length > 0);
1046
1047
  // behavior of last patch set would translate to the following - seems not to be correct (in case of setting ifAnyFilterExist but no filters provided)
1047
1048
  // bShouldDataBeLoaded = bShouldDataBeLoaded || sLoadBehaviour !== "never";
1048
1049
  } else {
1049
- // in case of a (visible) SVM, we need to set the default value
1050
- // default value for standard variant
1050
+ // in case of a (visible) SVM, we need to set the default value
1051
+ // default value for standard variant
1051
1052
  // - true if one of the conditions above is fulfilled
1052
- // - or for any manifest setting but "never"
1053
- // (Remark: "ifAnyFilterExist" leads to mark the standard variant true, even if no filter is provided - this looks ok for startup, as the text shown to the user
1053
+ // - or for any manifest setting but "never"
1054
+ // (Remark: "ifAnyFilterExist" leads to mark the standard variant true, even if no filter is provided - this looks ok for startup, as the text shown to the user
1054
1055
  // contains the condition, but if reselecting the standard variant, it will also select without filters!
1055
1056
  // TODO: check, how to solve that inconsistency)
1056
1057
  // - but in both cases not, if a mandatory filter is missing
@@ -43,7 +43,7 @@ MESSAGE_SINGLE_VALUE_L_FORM=O filtro "{0}" n\u00E3o \u00E9 relevante para a fich
43
43
 
44
44
  MESSAGE_SINGLE_VALUE_S_FORM=N\u00E3o \u00E9 poss\u00EDvel filtrar por "{0}" na ficha "{1}".
45
45
 
46
- MULTI_EDIT=Processar
46
+ MULTI_EDIT=Editar
47
47
 
48
48
  MULTI_EDIT_DIALOG_TITLE=Editar ({0})
49
49
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.136.6"
11
+ "version": "1.136.8"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -190,7 +190,7 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/gener
190
190
  return accBlock;
191
191
  }, [])
192
192
  .forEach(function(entry) {
193
- if (!oSubSectionInfoObject) {
193
+ if (!oSubSectionInfoObject || (entry.getGroups().length === 1 && entry.getGroups()[0].getTitle && !entry.getGroups()[0].getTitle())) {
194
194
  // Case: header is editable. manifest.json, editableHeaderContent=true
195
195
  var sInvisibleTextID = `${entry.getId()}-ariaLabelBy-InvisibleText`,
196
196
  oInvisibleText = Element.getElementById(sInvisibleTextID);
@@ -189,7 +189,7 @@ CREATE_DIALOG_TITLE=Item novo
189
189
 
190
190
  DELETE_WITH_OBJECTINFO=Eliminar este objeto ({1} {2})?
191
191
 
192
- DELETE_WITH_OBJECTTITLE=Eliminar objeto {0}?
192
+ DELETE_WITH_OBJECTTITLE=Excluir objeto {0}?
193
193
 
194
194
  SHOW_SIDE_CONTENT=Exibir detalhes
195
195
 
@@ -229,8 +229,8 @@ ENTER_MANDATORY=Nh\u1EADp gi\u00E1 tr\u1ECB cho tr\u01B0\u1EDDng {0}.
229
229
 
230
230
  REQUIRED_PROP_ERROR=Nh\u1EADp gi\u00E1 tr\u1ECB.
231
231
 
232
- REQUIRED_PROP_COLUMN_HIDDEN_ERROR=Ba\u0309ng ch\u01B0\u0301a l\u00F4\u0303i. {0} la\u0300 gi\u00E1 tr\u1ECB b\u0103\u0301t bu\u00F4\u0323c nh\u01B0ng kh\u00F4ng \u0111\u01B0\u01A1\u0323c hi\u00EA\u0309n thi\u0323 trong ba\u0309ng. Vui lo\u0300ng th\u00EAm gi\u00E1 tr\u1ECB trong thi\u00EA\u0301t l\u00E2\u0323p ba\u0309ng.
233
- REQUIRED_PROP_COLUMN_HIDDEN_ERROR_PLURAL=Ba\u0309ng ch\u01B0\u0301a l\u00F4\u0303i. {0} la\u0300 gi\u00E1 tr\u1ECB b\u0103\u0301t bu\u00F4\u0323c nh\u01B0ng kh\u00F4ng \u0111\u01B0\u01A1\u0323c hi\u00EA\u0309n thi\u0323 trong ba\u0309ng. Vui lo\u0300ng th\u00EAm gi\u00E1 tr\u1ECB trong thi\u00EA\u0301t l\u00E2\u0323p ba\u0309ng.
232
+ REQUIRED_PROP_COLUMN_HIDDEN_ERROR=Ba\u0309ng ch\u01B0\u0301a l\u00F4\u0303i. {0} la\u0300 gi\u00E1 tr\u1ECB b\u0103\u0301t bu\u00F4\u0323c nh\u01B0ng kh\u00F4ng \u0111\u01B0\u01A1\u0323c hi\u00EA\u0309n thi\u0323 trong ba\u0309ng. Vui lo\u0300ng th\u00EAm gi\u00E1 tr\u1ECB trong thi\u00EA\u0301t l\u00E2\u0323p m\u00E0n h\u00ECnh.
233
+ REQUIRED_PROP_COLUMN_HIDDEN_ERROR_PLURAL=Ba\u0309ng ch\u01B0\u0301a l\u00F4\u0303i. {0} la\u0300 gi\u00E1 tr\u1ECB b\u0103\u0301t bu\u00F4\u0323c nh\u01B0ng kh\u00F4ng \u0111\u01B0\u01A1\u0323c hi\u00EA\u0309n thi\u0323 trong ba\u0309ng. Vui lo\u0300ng th\u00EAm gi\u00E1 tr\u1ECB trong thi\u00EA\u0301t l\u00E2\u0323p m\u00E0n h\u00ECnh.
234
234
 
235
235
  T_PAGINATOR_CONTROL_PAGINATOR_TOOLTIP_UP=Mu\u0323c tr\u01B0\u01A1\u0301c
236
236
 
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.136.6"
9
+ "version": "1.136.8"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -21,7 +21,7 @@
21
21
  <core:CustomData key="defaultDropDownDisplayBehaviour" value="descriptionOnly" />
22
22
  <core:CustomData key="defaultTextInEditModeSource" value="ValueListNoValidation" />
23
23
  <core:CustomData key="dateFormatSettings" value='\{"UTC":true,"style":"medium"\}' />
24
- <core:CustomData key="smartFormAriaLabel" value="{parts: [{path: 'facet>'}, {path: 'entitySet>name'}], formatter: 'AH.getSmartFormTitle'}" />
24
+ <core:CustomData key="smartFormAriaLabel" value="{parts: [{path: 'facet>'}, {path: 'entitySet>name'}, {path: 'block>'}, {path: 'subSectionData>'}], formatter: 'AH.getSmartFormTitle'}" />
25
25
  </sfo:customData>
26
26
  <sfo:layout>
27
27
  <template:if test="{= ${appSettings>/useColumnLayoutForSmartForm} !== false}">
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.136.6"
9
+ "version": "1.136.8"
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.136.6"
9
+ "version": "1.136.8"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -3017,7 +3017,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
3017
3017
  };
3018
3018
  }
3019
3019
  },
3020
- getTextArrangement: function (oEntityType, oField) {
3020
+ getTextArrangementFromAnnotations: function (oEntityType, oField) {
3021
3021
  var sTextArrangement;
3022
3022
  // 1. check TextArrangement definition for property directly - has prio 1
3023
3023
  if (oField["com.sap.vocabularies.UI.v1.TextArrangement"] && oField["com.sap.vocabularies.UI.v1.TextArrangement"].EnumMember) {
@@ -3036,11 +3036,19 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
3036
3036
  sTextArrangement = oAnnotationHelper._mapTextArrangement4smartControl(oEntityType["com.sap.vocabularies.UI.v1.TextArrangement"].EnumMember);
3037
3037
  }
3038
3038
  }
3039
+ return sTextArrangement;
3040
+ },
3041
+ getTextArrangement: function(oEntityType, oField) {
3042
+ var sTextArrangement = this.getTextArrangementFromAnnotations(oEntityType, oField);
3039
3043
  if (!sTextArrangement) { //coming from the title should get a readable description and underneath is the id - the default
3040
3044
  sTextArrangement = "descriptionAndId";
3041
3045
  }
3042
3046
  return sTextArrangement;
3043
3047
  },
3048
+ getTextArrangementForEasyFilter: function (oEntityType, oField) {
3049
+ var sTextArrangement = this.getTextArrangementFromAnnotations(oEntityType, oField) || "idAndDescription";
3050
+ return sTextArrangement;
3051
+ },
3044
3052
  getTextArrangementPath: function (oField) {
3045
3053
  return oField["com.sap.vocabularies.Common.v1.Text"] && oField["com.sap.vocabularies.Common.v1.Text"].Path;
3046
3054
  },
@@ -4524,10 +4532,31 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4524
4532
  };
4525
4533
  },
4526
4534
 
4527
- getSmartFormTitle: function(oInterface, oFacet, sEntitySetName) {
4535
+ getSmartFormTitle: function(oInterface, oFacet, sEntitySetName, oBlock, oSubSectionData) {
4528
4536
  if (!oFacet) {
4537
+ return oAnnotationHelper.getTitleForSectionsForms(oBlock, oSubSectionData);
4538
+ }
4539
+ return oAnnotationHelper.getTitleForHeaderForm(oInterface, oFacet, sEntitySetName);
4540
+ },
4541
+
4542
+ getTitleForSectionsForms: function(oBlock, oSubSectionData) {
4543
+ if (oSubSectionData?.annotations?.Facet?.annotation?.Facets?.length > 1
4544
+ || oSubSectionData?.annotations?.Facet?.annotation?.Label?.String !== oBlock?.aggregations?.groups[0]?.annotations?.Facet?.annotation?.Label?.String
4545
+ ) {
4546
+ // In case Section -> SubSection have more than one form, SmartForm will have it's titles visible
4547
+ // or
4548
+ // SubSectin title !== SmartForm title, SmartForm title will also be visible
4529
4549
  return;
4530
4550
  }
4551
+ if (oBlock?.aggregations?.groups[0]?.annotations?.Facet?.annotation?.Label?.String !== oBlock?.aggregations?.groups[0]?.targetAnnotation?.Label?.String) {
4552
+ // Compare SmartForm title !== FiledGroup title
4553
+ // if they differs -> use FiledGoup title
4554
+ return oBlock?.aggregations?.groups[0]?.targetAnnotation?.Label?.String;
4555
+ }
4556
+ return;
4557
+ },
4558
+
4559
+ getTitleForHeaderForm: function(oInterface, oFacet, sEntitySetName) {
4531
4560
  if (oFacet.Target && oFacet.Target.AnnotationPath && oFacet.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.DataPoint") > -1) {
4532
4561
  // Process DataPoint case
4533
4562
  var { sAnnotationPath, oEntityType } = oAnnotationHelper.getModelData(oInterface, oFacet.Target.AnnotationPath, sEntitySetName);
@@ -950,7 +950,7 @@ sap.ui.define([
950
950
  * @public
951
951
  * @extends sap.ui.core.UIComponent
952
952
  * @author SAP SE
953
- * @version 1.136.6
953
+ * @version 1.136.8
954
954
  * @name sap.suite.ui.generic.template.lib.AppComponent
955
955
  */
956
956
  var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -5,8 +5,9 @@ sap.ui.define([
5
5
  "sap/suite/ui/generic/template/genericUtilities/FeLogger",
6
6
  "sap/ui/model/FilterOperator",
7
7
  'sap/ui/model/Filter',
8
- 'sap/suite/ui/generic/template/js/AnnotationHelper'
9
- ], function(BaseObject, extend, filterHelper, FeLogger, FilterOperator,Filter,AnnotationHelper) {
8
+ 'sap/suite/ui/generic/template/js/AnnotationHelper',
9
+ "./EasyFilterDataFetcherHelper"
10
+ ], function(BaseObject, extend, filterHelper, FeLogger, FilterOperator,Filter,AnnotationHelper,EasyFilterDataFetcherHelper) {
10
11
  'use strict';
11
12
 
12
13
  /*
@@ -305,24 +306,28 @@ sap.ui.define([
305
306
  // keySpecificSelectedValues will have one selectedValues object for each operator
306
307
  // ex : [{operator: "EQ", selectedValues: ["HT-1010","HT-10001","1097"]}, {operator: "Contains", selectedValues: ["HT-100"]}]
307
308
  oFilterItem.keySpecificSelectedValues.forEach(function (oSelectedValues) {
308
- var oRange = {
309
- Sign: "I", // currently not considering "E"
310
- High: ""
311
- };
312
-
313
309
  if ((oSelectedValues.operator === "BT" || oSelectedValues.operator === "NB")) {
310
+ var oRange = {
311
+ Sign: oSelectedValues.operator === "NB" ? "E" : "I",
312
+ High: ""
313
+ };
314
314
  oRange.Low = oSelectedValues.selectedValues[0];
315
315
  oRange.High = oSelectedValues.selectedValues[1];
316
- oRange.Option = oSelectedValues.operator;
316
+ oRange.Option = "BT";
317
317
  oFilter.Ranges.push(oRange);
318
318
  } else {
319
- oSelectedValues.selectedValues.forEach(function (oValue) {
320
- if (oSelectedValues.operator === "Contains") { // need to check for other operators if special handling is required
319
+ oSelectedValues.selectedValues.forEach(function (sValue) {
320
+ var oRange = {
321
+ Sign: EasyFilterDataFetcherHelper.isNegationOperator(oSelectedValues.operator) ? "E" : "I",
322
+ High: ""
323
+ };
324
+
325
+ if (isCPOperator(oSelectedValues.operator)) {
321
326
  oRange.Option = "CP";
322
- oRange.Low = oValue;
327
+ oRange.Low = getValueForCPOperator(sValue,oSelectedValues.operator);
323
328
  } else {
324
- oRange.Option = oSelectedValues.operator;
325
- oRange.Low = oValue;
329
+ oRange.Option = EasyFilterDataFetcherHelper.isNegationOperator(oSelectedValues.operator) ? EasyFilterDataFetcherHelper.getReverseOperator(oSelectedValues.operator) : oSelectedValues.operator;
330
+ oRange.Low = sValue;
326
331
  }
327
332
  oFilter.Ranges.push(oRange);
328
333
  });
@@ -338,6 +343,29 @@ sap.ui.define([
338
343
  };
339
344
  }
340
345
 
346
+ function getValueForCPOperator(sValue,sOperator) {
347
+ sOperator = EasyFilterDataFetcherHelper.isNegationOperator(sOperator) ? EasyFilterDataFetcherHelper.getReverseOperator(sOperator) : sOperator;
348
+ switch (sOperator) {
349
+ case FilterOperator.Contains:
350
+ sValue = `*${sValue}*`;
351
+ break;
352
+ case FilterOperator.EndsWith:
353
+ sValue = `*${sValue}`;
354
+ break;
355
+ case FilterOperator.StartsWith:
356
+ sValue = `${sValue}*`;
357
+ break;
358
+ default:
359
+ break;
360
+ }
361
+ return sValue;
362
+ }
363
+
364
+ function isCPOperator(sOperator) {
365
+ return sOperator === FilterOperator.Contains || sOperator === FilterOperator.EndsWith || sOperator === FilterOperator.NotContains || sOperator === FilterOperator.NotEndsWith
366
+ || sOperator === FilterOperator.NotStartsWith || sOperator === FilterOperator.StartsWith;
367
+ }
368
+
341
369
  /**
342
370
  * This method is used to get the EasyFilter control from the floorplan
343
371
  * @returns EasyFilter control
@@ -403,7 +431,6 @@ sap.ui.define([
403
431
  if (oSmartFilterBarVariant.semanticDates) {
404
432
  var { Low: value1, High: value2 } = oVariantDataFromAI.aSelectOptions[0].Ranges[0];
405
433
  var dateData = oSmartFilterBarVariant.semanticDates.Dates[0].Data;
406
-
407
434
  dateData.operation = "DATERANGE";
408
435
  dateData.value1 = value1;
409
436
  dateData.value2 = value2 || value1;
@@ -513,191 +540,10 @@ sap.ui.define([
513
540
  }
514
541
  }
515
542
 
516
- function getFiltersForDataFetching(key,keySpecificSelectedResult) {
517
- const aFilters = [];
518
-
519
- for (var i = 0; i < keySpecificSelectedResult.length;++i) {
520
- const result = keySpecificSelectedResult[i];
521
- if (result.operator === FilterOperator.BT || result.operator === FilterOperator.NB) {
522
- aFilters.push(new Filter({
523
- path: key,
524
- operator: result.operator,
525
- value1: result.selectedValues[0],
526
- value2: result.selectedValues[1]
527
- }));
528
- } else {
529
- for (var i = 0;i < result.selectedValues.length;++i) {
530
- aFilters.push(new Filter({
531
- path: key,
532
- operator: result.operator,
533
- value1: result.selectedValues[i]
534
- }));
535
- }
536
- }
537
- }
538
- return aFilters;
539
- }
540
-
541
543
  function onDataFetcher(key,keySpecificSelectedResult,totalAIResponse) {
542
- return new Promise((resolve,reject)=>{
543
-
544
- var aFinalResponse = [];
545
- var oOwnerFilterControl = oState.oSmartFilterbar;
546
- var sKey = key;
547
- var sEntitySet = oController.getOwnerComponent().getEntitySet();
548
- var oEntityType = oTemplateUtils.oCommonUtils.getMetaModelEntityType(sEntitySet);
549
- var oSFBModel = oOwnerFilterControl.getModel();
550
- var oSFBMetaModel = oSFBModel.getMetaModel();
551
- var aFilters = getFiltersForDataFetching(key,keySpecificSelectedResult);
552
- var oProperty = oSFBMetaModel.getODataProperty(oEntityType, key);
553
- var sPropertyPath = oSFBMetaModel.getODataProperty(oEntityType, key,true);
554
- var isValueHelpTableAvailable = AnnotationHelper.isValueHelpTableAvailable(oProperty);
555
-
556
- if (isValueHelpTableAvailable) {
557
- var oPropertyContext = oSFBMetaModel.createBindingContext(sPropertyPath);
558
- var oVHPromise = oSFBMetaModel.getODataValueLists(oPropertyContext);
559
- var filtersLength = aFilters.length;
560
- // //Every Search on a value, create a seperate call to backend,but they are grouped into one batch
561
- // //We need to ensure that once all calls are completed inside the batch to resolve the promise, else the system would be waiting indefenitely
562
- var ctr = 0;
563
- let fnForDescription = (oResponse,aMatchedFilterResults,sTextArrangementPath,sTextArrangement) => {
564
- ++ctr;
565
- var aResults = oResponse.results;
566
-
567
- //Check the description is present and follow the textArrangement annotation as well
568
- //If the value is not present ,make the ID and Description same
569
- aMatchedFilterResults.forEach((oFilter)=>{
570
- var result = aResults.find((res)=>res[key] === oFilter.getValue1());
571
- if (result) {
572
- aFinalResponse.push({
573
- operator: FilterOperator.EQ,
574
- selectedValues: [{
575
- value: result[key],
576
- description: AnnotationHelper.getTextArrangementFinalString(result,key,sTextArrangementPath.split("/")[1],sTextArrangement)
577
- }]
578
- });
579
- } else {
580
- //Ideally description should be present, if in case its not present we will fallback to our default case where value and description would be same
581
- aFinalResponse.push(getkeySpecifiedResultFromFilters(oFilter));
582
- }
583
- });
584
-
585
- if (ctr === filtersLength) {
586
- resolve(aFinalResponse);
587
- }
588
- };
589
-
590
-
591
-
592
- let fnSuccessForValueList = (oResponse,oFilter,sValueListEntity) => {
593
- var oValueHelpEntity = oTemplateUtils.oCommonUtils.getMetaModelEntityType(sValueListEntity);
594
- var oValueHelpProperty = oSFBMetaModel.getODataProperty(oValueHelpEntity, key);
595
- var aResults = oResponse.results;
596
- var sTextArrangementPath = AnnotationHelper.getTextArrangementPath(oValueHelpProperty);
597
- var sTextArrangement = AnnotationHelper.getTextArrangement(oValueHelpEntity,oValueHelpProperty) || "idOnly";
598
- var navigationProperty = null;
599
- var sEntityForTextDescription = null;
600
-
601
- if (sTextArrangementPath && sTextArrangementPath.split("/").length > 1) {
602
- navigationProperty = sTextArrangementPath.split("/")[0];
603
- sEntityForTextDescription = oSFBMetaModel.getODataAssociationSetEnd(oValueHelpEntity,navigationProperty).entitySet;
604
- }
605
-
606
- //We are triggering the below call, only for fetching of the TextDescription.If its a different entity than ValueList only then trigger it
607
- if (aResults.length === 0) {
608
- ++ctr;
609
- aFinalResponse.push(getkeySpecifiedResultFromFilters(oFilter));
610
- } else if (aResults.length !== 0 && sEntityForTextDescription && sValueListEntity !== sEntityForTextDescription) {
611
- var aAllMatchedResults = aResults.map((result)=>{
612
- return result[key];
613
- });
614
- var aMatchedFilterResults = aAllMatchedResults.map((matchedResult)=>{
615
- return new Filter({
616
- path: key,
617
- operator: FilterOperator.EQ,
618
- value1:matchedResult
619
- });
620
- });
621
- // The below code only be executed when the textDescription and ValueList entities are different
622
- oSFBModel.read("/" + sEntityForTextDescription, {
623
- filters: aMatchedFilterResults,
624
- success : function(response) {
625
- fnForDescription(response,aMatchedFilterResults);
626
- }
627
- });
628
- } else {
629
- //The below condition is when valueList entity and navigation property entity are same
630
- ++ctr;
631
- aResults.forEach((result)=>{
632
- aFinalResponse.push({
633
- operator: FilterOperator.EQ,
634
- selectedValues: [{
635
- value: result[key],
636
- description: AnnotationHelper.getTextArrangementFinalString(result,key,
637
- sTextArrangementPath,sTextArrangement)
638
- }]
639
- });
640
- });
641
- }
642
-
643
- if (ctr === filtersLength) {
644
- resolve(aFinalResponse);
645
- }
646
- };
647
-
648
- oVHPromise.then((oValueList)=>{
649
- var oValueListDefaultBinding = oValueList[""];
650
- var sValueListEntity = oValueListDefaultBinding.CollectionPath.String;
651
- if (Array.isArray(oValueListDefaultBinding.Parameters)) {
652
- var oParameter = oValueListDefaultBinding.Parameters.find(oParam => (oParam.RecordType === "com.sap.vocabularies.Common.v1.ValueListParameterInOut" && oParam.LocalDataProperty.PropertyPath === sKey));
653
- if (oParameter) {
654
- key = oParameter.ValueListProperty.String;
655
- }
656
- }
657
- //Get All Records using $search
658
- aFilters.forEach((oFilter)=>{
659
- oSFBModel.read("/" + sValueListEntity, {
660
- urlParameters : {
661
- search: oFilter.getValue1()
662
- },
663
- success : function(response) {
664
- fnSuccessForValueList(response,oFilter,sValueListEntity);
665
- }
666
- });
667
- });
668
- });
669
-
670
- } else {
671
- //When there is no valueList associate, just return the original value in CodeList type
672
- aFilters.forEach((oFilter)=>aFinalResponse.push(getkeySpecifiedResultFromFilters(oFilter)));
673
- resolve(aFinalResponse);
674
- }
675
- });
676
- }
677
-
678
- function getkeySpecifiedResultFromFilters(oFilter) {
679
- var values = [];
680
- if (oFilter.getOperator() === FilterOperator.BT || oFilter.getOperator() === FilterOperator.NB) {
681
- var values = [{
682
- value: oFilter.getValue1(),
683
- description: oFilter.getValue1()
684
- },{
685
- value: oFilter.getValue2(),
686
- description: oFilter.getValue2()
687
- }];
688
- } else {
689
- values.push({
690
- value: oFilter.getValue1(),
691
- description: oFilter.getValue1()
692
- });
693
- }
694
- return {
695
- operator: oFilter.getOperator(),
696
- selectedValues: values
697
- };
544
+ return EasyFilterDataFetcherHelper.fetchDataForKey(key, keySpecificSelectedResult, oState, oController, oTemplateUtils);
698
545
  }
699
546
 
700
-
701
547
  return {
702
548
  getEasyFilterBar : fnGetEasyFilterBar,
703
549
  initialiseEasyFilterBar : fnInitialiseEasyFilterBar,
@@ -711,8 +557,7 @@ sap.ui.define([
711
557
  onShowValueHelp: fnShowValueHelp,
712
558
  onFilterChange : fnOnFilterChange,
713
559
  handleVariantLoad : fnHandleVariantLoad,
714
- onDataFetcher,
715
- getkeySpecifiedResultFromFilters
560
+ onDataFetcher
716
561
  };
717
562
  }
718
563
 
@@ -721,5 +566,5 @@ sap.ui.define([
721
566
  extend(this, getMethods(oState, oController, oTemplateUtils));
722
567
  }
723
568
  });
724
-
569
+
725
570
  });
@@ -0,0 +1,334 @@
1
+ sap.ui.define([
2
+ 'sap/ui/model/FilterOperator',
3
+ 'sap/ui/model/Filter',
4
+ 'sap/suite/ui/generic/template/js/AnnotationHelper'
5
+ ], function(FilterOperator, Filter, AnnotationHelper) {
6
+ 'use strict';
7
+
8
+ const mReverseOperator = {};
9
+ fillReverseOperator();
10
+
11
+ function fillReverseOperator() {
12
+ mReverseOperator[FilterOperator.EQ] = FilterOperator.NE;
13
+ mReverseOperator[FilterOperator.Contains] = FilterOperator.NotContains;
14
+ mReverseOperator[FilterOperator.EndsWith] = FilterOperator.NotEndsWith;
15
+ mReverseOperator[FilterOperator.StartsWith] = FilterOperator.NotStartsWith;
16
+ mReverseOperator[FilterOperator.BT] = FilterOperator.NB;
17
+
18
+ mReverseOperator[FilterOperator.NE] = FilterOperator.EQ;
19
+ mReverseOperator[FilterOperator.NotContains] = FilterOperator.Contains;
20
+ mReverseOperator[FilterOperator.NotEndsWith] = FilterOperator.EndsWith;
21
+ mReverseOperator[FilterOperator.NotStartsWith] = FilterOperator.StartsWith;
22
+ mReverseOperator[FilterOperator.NB] = FilterOperator.BT;
23
+ }
24
+
25
+ function getFiltersForDataFetching(sKey, keySpecificSelectedResult) {
26
+ const aFilters = [];
27
+
28
+ for (let i = 0; i < keySpecificSelectedResult.length; ++i) {
29
+ const result = keySpecificSelectedResult[i];
30
+ if (result.operator === FilterOperator.BT || result.operator === FilterOperator.NB) {
31
+ aFilters.push(new Filter({
32
+ path: sKey,
33
+ operator: result.operator,
34
+ value1: result.selectedValues[0],
35
+ value2: result.selectedValues[1]
36
+ }));
37
+ } else {
38
+ for (let j = 0; j < result.selectedValues.length; ++j) {
39
+ aFilters.push(new Filter({
40
+ path: sKey,
41
+ operator: result.operator,
42
+ value1: result.selectedValues[j]
43
+ }));
44
+ }
45
+ }
46
+ }
47
+ return aFilters;
48
+ }
49
+
50
+ function isComparitveOperator(sFilter) {
51
+ return sFilter === FilterOperator.BT || sFilter === FilterOperator.NB ||
52
+ sFilter === FilterOperator.GT || sFilter === FilterOperator.LT ||
53
+ sFilter === FilterOperator.GE || sFilter === FilterOperator.LE;
54
+ }
55
+
56
+ function isNegationOperator(sOperator) {
57
+ return sOperator === FilterOperator.NE || sOperator === FilterOperator.NotContains ||
58
+ sOperator === FilterOperator.NotEndsWith || sOperator === FilterOperator.NotStartsWith ||
59
+ sOperator === FilterOperator.NB;
60
+ }
61
+
62
+ function getkeySpecifiedResultFromFilters(oFilter) {
63
+ let values = [];
64
+ if (oFilter.getOperator() === FilterOperator.BT || oFilter.getOperator() === FilterOperator.NB) {
65
+ values = [{
66
+ value: oFilter.getValue1(),
67
+ description: oFilter.getValue1()
68
+ },{
69
+ value: oFilter.getValue2(),
70
+ description: oFilter.getValue2()
71
+ }];
72
+ } else {
73
+ values.push({
74
+ value: oFilter.getValue1(),
75
+ description: oFilter.getValue1()
76
+ });
77
+ }
78
+ return {
79
+ operator: oFilter.getOperator(),
80
+ selectedValues: values
81
+ };
82
+ }
83
+
84
+ async function fetchRecordsFromValueList(oValueList, oFilter, sKey, oSFBModel,oTemplateUtils) {
85
+ return new Promise((resolve, reject) => {
86
+ let oValueListDefaultBinding = oValueList[""];
87
+ let sValueListEntity = oValueListDefaultBinding.CollectionPath.String;
88
+
89
+ if (Array.isArray(oValueListDefaultBinding.Parameters)) {
90
+ let oParameter = oValueListDefaultBinding.Parameters.find(oParam => (oParam.RecordType === "com.sap.vocabularies.Common.v1.ValueListParameterInOut" && oParam.LocalDataProperty.PropertyPath === sKey));
91
+ if (oParameter) {
92
+ sKey = oParameter.ValueListProperty.String;
93
+ }
94
+ }
95
+
96
+ let bIsNotOperator = isNegationOperator(oFilter.getOperator());
97
+ if (bIsNotOperator) {
98
+ oFilter = new Filter({
99
+ path: sKey,
100
+ operator: mReverseOperator[oFilter.getOperator()],
101
+ value1: oFilter.getValue1()
102
+ });
103
+ } else {
104
+ oFilter = new Filter({
105
+ path: sKey,
106
+ operator: oFilter.getOperator(),
107
+ value1: oFilter.getValue1()
108
+ });
109
+ }
110
+
111
+ oSFBModel.read("/" + sValueListEntity, {
112
+ filters: [oFilter],
113
+ success: async function(oResponse) {
114
+ const aResults = oResponse.results;
115
+ let aResponse;
116
+ try {
117
+ if (aResults.length > 0) {
118
+ aResponse = await getDescriptionForResponse(oResponse.results, sValueListEntity, sKey, oSFBModel,oTemplateUtils,oFilter);
119
+ } else {
120
+ aResponse = await fetchRecordsFromValueListUsingFuzzySearch(sValueListEntity, oFilter, sKey, oSFBModel,oTemplateUtils);
121
+ }
122
+ resolve({
123
+ operator: (bIsNotOperator) ? mReverseOperator[oFilter.getOperator()] : oFilter.getOperator(),
124
+ selectedValues: aResponse
125
+ });
126
+ } catch (error) {
127
+ reject(error);
128
+ }
129
+ },
130
+ error: async function(oError) {
131
+ //If the error is because of some property validation, we can try to do a fuzzy search
132
+ try {
133
+ const aResponse = await fetchRecordsFromValueListUsingFuzzySearch(sValueListEntity, oFilter, sKey, oSFBModel,oTemplateUtils);
134
+ resolve({
135
+ operator: (bIsNotOperator) ? mReverseOperator[oFilter.getOperator()] : oFilter.getOperator(),
136
+ selectedValues: aResponse
137
+ });
138
+ } catch (error) {
139
+ reject(error);
140
+ }
141
+ }
142
+ });
143
+ });
144
+ }
145
+
146
+ async function fetchRecordsFromValueListUsingFuzzySearch(sValueListEntity, oFilter, sKey, oSFBModel,oTemplateUtils) {
147
+ return new Promise((resolve, reject) => {
148
+ oSFBModel.read("/" + sValueListEntity, {
149
+ urlParameters: {
150
+ search: oFilter.getValue1()
151
+ },
152
+ success: async function(oResponse) {
153
+ let aResults = oResponse.results;
154
+ if (aResults.length == 0) {
155
+ //If it dosent have any records, the return the original value
156
+ resolve([{
157
+ value: oFilter.getValue1(),
158
+ description: oFilter.getValue1()
159
+ }]);
160
+ } else {
161
+ try {
162
+ aResults = await getDescriptionForResponse(aResults, sValueListEntity, sKey, oSFBModel,oTemplateUtils,oFilter);
163
+ resolve(aResults);
164
+ } catch (oError) {
165
+ reject(oError);
166
+ }
167
+ }
168
+ },
169
+ error: function(oError) {
170
+ reject(oError);
171
+ }
172
+ });
173
+ });
174
+ }
175
+
176
+ function performClientSideSearch(aResults, oFilter,sKey,sDescriptionField) {
177
+ if (!sKey || !sDescriptionField) {
178
+ return aResults;
179
+ }
180
+ if (oFilter.getOperator() === FilterOperator.EQ || oFilter.getOperator() === FilterOperator.NE) {
181
+ const aFilteredResults = aResults.filter(result => result[sKey].toString().toLowerCase() === oFilter.getValue1().toString().toLowerCase() || result[sDescriptionField].toString().toLowerCase() === oFilter.getValue1().toString().toLowerCase());
182
+ return aFilteredResults.length > 0 ? aFilteredResults : aResults;
183
+ }
184
+ return aResults;
185
+ }
186
+
187
+ async function getDescriptionForResponse(aResults, sValueListEntity, sKey, oSFBModel, oTemplateUtils,oFilter) {
188
+ return new Promise((resolve, reject) => {
189
+ const aResultsWithTextArrangement = [];
190
+
191
+ let oSFBMetaModel = oSFBModel.getMetaModel();
192
+ let oValueHelpEntity = oTemplateUtils.oCommonUtils.getMetaModelEntityType(sValueListEntity);
193
+ let oValueHelpProperty = oSFBMetaModel.getODataProperty(oValueHelpEntity, sKey);
194
+ let sTextArrangementPath = AnnotationHelper.getTextArrangementPath(oValueHelpProperty);
195
+ let sTextArrangement = AnnotationHelper.getTextArrangementForEasyFilter(oValueHelpEntity, oValueHelpProperty);
196
+ let navigationProperty = null;
197
+ let sEntityForTextDescription = sValueListEntity;
198
+
199
+ if (sTextArrangementPath && sTextArrangementPath.split("/").length > 1) {
200
+ navigationProperty = sTextArrangementPath.split("/")[0];
201
+ sEntityForTextDescription = oSFBMetaModel.getODataAssociationSetEnd(oValueHelpEntity, navigationProperty).entitySet;
202
+ sTextArrangementPath = sTextArrangementPath.split("/")[1];
203
+ }
204
+
205
+ aResults = performClientSideSearch(aResults, oFilter,sKey,sTextArrangementPath);
206
+
207
+ if (sValueListEntity === sEntityForTextDescription) {
208
+ aResults.forEach((result) => {
209
+ aResultsWithTextArrangement.push({
210
+ value: result[sKey],
211
+ description: AnnotationHelper.getTextArrangementFinalString(result, sKey, sTextArrangementPath, sTextArrangement)
212
+ });
213
+ });
214
+ resolve(aResultsWithTextArrangement);
215
+ } else {
216
+ let aAllMatchedResults = aResults.map((result) => {
217
+ return result[sKey];
218
+ });
219
+ let aMatchedFilterResults = aAllMatchedResults.map((matchedResult) => {
220
+ return new Filter({
221
+ path: sKey,
222
+ operator: FilterOperator.EQ,
223
+ value1: matchedResult
224
+ });
225
+ });
226
+
227
+ // The below code only be executed when the textDescription and ValueList entities are different
228
+ oSFBModel.read("/" + sEntityForTextDescription, {
229
+ filters: aMatchedFilterResults,
230
+ success: function(oResponse) {
231
+ let aResults = oResponse.results;
232
+
233
+ aMatchedFilterResults.forEach((oFilter) => {
234
+ let result = aResults.find((res) => res[sKey] === oFilter.getValue1());
235
+ aResultsWithTextArrangement.push({
236
+ value: oFilter.getValue1(),
237
+ description: (result) ? AnnotationHelper.getTextArrangementFinalString(result, sKey, sTextArrangementPath, sTextArrangement) : oFilter.getValue1()
238
+ });
239
+ });
240
+ resolve(aResultsWithTextArrangement);
241
+ },
242
+ error: function(oError) {
243
+ reject(oError);
244
+ }
245
+ });
246
+ }
247
+ });
248
+ }
249
+
250
+ /**
251
+ * The primary responsibility of this function is to convert the given values into their corresponding
252
+ * IDs and Descriptions, respecting the defined TextArrangement.
253
+ *
254
+ * This process is carried out in two phases:
255
+ *
256
+ * Fetching the ID:
257
+ * 1) Make a $filter call using the provided value and operator.
258
+ * - If this returns results, we proceed to fetch the corresponding descriptions for these IDs.
259
+ * 2) If no results are returned, make a $search (fuzzy search) call instead.
260
+ *
261
+ * Fetching the Description:
262
+ * 1) The description is determined by the sap:text/com.sap.vocabularies.UI.v1.TextArrangement
263
+ * annotation of the ValueHelp entity, not from the main entity.
264
+ * 2) To fetch the description, we use a $filter call, since the IDs were already retrieved in the first step.
265
+ *
266
+ * Edge cases with negation operators:
267
+ * 1) For negation operators such as NB, NotStartsWith, etc., we make a batch call using the
268
+ * positive equivalent of these operators (e.g., BT, StartsWith).
269
+ * 2) After receiving the results, we return them with the original negation operator
270
+ * (e.g., NB, NotStartsWith).
271
+ */
272
+
273
+ function fetchDataForKey(sKey, keySpecificSelectedResult, oState, oController, oTemplateUtils) {
274
+ return new Promise(async(resolve, reject) => {
275
+ try {
276
+ const aFinalResponse = [];
277
+ const oOwnerFilterControl = oState.oSmartFilterbar;
278
+ const sEntitySet = oController.getOwnerComponent().getEntitySet();
279
+ const oEntityType = oTemplateUtils.oCommonUtils.getMetaModelEntityType(sEntitySet);
280
+ const oSFBModel = oOwnerFilterControl.getModel();
281
+ const oSFBMetaModel = oSFBModel.getMetaModel();
282
+ const aFilters = getFiltersForDataFetching(sKey, keySpecificSelectedResult);
283
+ const oProperty = oSFBMetaModel.getODataProperty(oEntityType, sKey);
284
+ const sPropertyPath = oSFBMetaModel.getODataProperty(oEntityType, sKey, true);
285
+ const isValueHelpTableAvailable = AnnotationHelper.isValueHelpTableAvailable(oProperty);
286
+
287
+ if (!isValueHelpTableAvailable) {
288
+ // When there is no valueList associate, just return the original value in CodeList type
289
+ aFilters.forEach(oFilter => aFinalResponse.push(getkeySpecifiedResultFromFilters(oFilter)));
290
+ resolve(aFinalResponse);
291
+ }
292
+
293
+ // Get value help lists from metadata
294
+ const oPropertyContext = oSFBMetaModel.createBindingContext(sPropertyPath);
295
+ const oValueList = await oSFBMetaModel.getODataValueLists(oPropertyContext);
296
+
297
+ // Process each filter in parallel
298
+ const pPromises = [];
299
+
300
+ for (const oFilter of aFilters) {
301
+ if (isComparitveOperator(oFilter.getOperator())) {
302
+ // For comparative operators, just add the original values
303
+ aFinalResponse.push(getkeySpecifiedResultFromFilters(oFilter));
304
+ } else {
305
+ // For other operators, fetch records from value list
306
+ pPromises.push(fetchRecordsFromValueList(oValueList, oFilter, sKey, oSFBModel, oTemplateUtils));
307
+ }
308
+ }
309
+
310
+ // Wait for all promises to resolve
311
+ if (pPromises.length > 0) {
312
+ const aResponses = await Promise.all(pPromises);
313
+ aResponses.forEach(aResponse => {
314
+ aFinalResponse.push(aResponse);
315
+ });
316
+ }
317
+
318
+ resolve(aFinalResponse);
319
+ } catch (error) {
320
+ reject(error); // Re-throw to allow caller to handle
321
+ }
322
+ });
323
+ }
324
+
325
+ return {
326
+ fetchDataForKey: fetchDataForKey,
327
+ getFiltersForDataFetching: getFiltersForDataFetching,
328
+ isComparitveOperator: isComparitveOperator,
329
+ isNegationOperator: isNegationOperator,
330
+ getReverseOperator: function(operator) {
331
+ return mReverseOperator[operator];
332
+ }
333
+ };
334
+ });
@@ -37,7 +37,7 @@ DATA_LOSS_DISCARD_CHANGES=Kass\u00E9r \u00E6ndringer
37
37
 
38
38
  ST_KEEP_DRAFT_BTN=Behold udkast
39
39
 
40
- ST_DISCARD_DRAFT_BTN=Kass\u00E9r udkast
40
+ ST_DISCARD_DRAFT_BTN=Kasser udkast
41
41
 
42
42
  ST_UNSAVED_CHANGES_TITLE=Ikkegemte \u00E6ndringer
43
43
 
@@ -271,7 +271,7 @@ NOITEMS_SMARTCHART=Tidak ditemukan data.
271
271
 
272
272
  NOITEMS_LR_SMARTCHART=Tidak ada data untuk tampilan bagan dan kriteria filter yang dipilih.
273
273
 
274
- NOITEMS_SMARTCHART_WITH_FILTER=Data tak ada. Ubah parameter filter.
274
+ NOITEMS_SMARTCHART_WITH_FILTER=Data tidak ditemukan. Coba sesuaikan parameter filter.
275
275
 
276
276
  SMARTCHART_INITIAL_NODATA=Untuk memulai, tetapkan filter yang relevan, pilih "Masuk".
277
277
 
@@ -424,9 +424,9 @@ RTA_DEFAULT_FILTER_MODE=Mode Filter Default
424
424
 
425
425
  RTA_DEFAULT_FILTER_MODE_DESC=Mode Filter Default
426
426
 
427
- RTA_SELECTION_MODE=Mode Pilihan
427
+ RTA_SELECTION_MODE=Mode Pemilihan
428
428
 
429
- RTA_SELECTION_MODE_DESC=Tentukan mode pilihan
429
+ RTA_SELECTION_MODE_DESC=Tentukan mode pemilihan
430
430
 
431
431
  RTA_OP_EDITABLE_HEADER_CONTENT=Konten Header yang Dapat Diedit
432
432
 
@@ -1,5 +1,5 @@
1
1
 
2
- ST_GENERIC_DRAFT_WITH_ACTIVE_DOCUMENT_DELETED=\uBCC0\uACBD \uC0AC\uD56D\uC774 \uBB34\uC2DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
2
+ ST_GENERIC_DRAFT_WITH_ACTIVE_DOCUMENT_DELETED=\uBCC0\uACBD\uC0AC\uD56D\uC774 \uBB34\uC2DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
3
3
 
4
4
  ST_GENERIC_DRAFT_WITHOUT_ACTIVE_DOCUMENT_DELETED=\uB4DC\uB798\uD504\uD2B8\uAC00 \uBB34\uC2DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
5
5
 
@@ -244,7 +244,7 @@ ST_GENERIC_DELETE_SELECTED=Eliminar este objeto?
244
244
 
245
245
  DELETE_WITH_OBJECTINFO=Eliminar este objeto ({1} {2})?
246
246
 
247
- DELETE_WITH_OBJECTTITLE=Eliminar objeto {0}?
247
+ DELETE_WITH_OBJECTTITLE=Excluir objeto {0}?
248
248
 
249
249
  ST_GENERIC_OBJECT_DELETED=O objeto foi exclu\u00EDdo.
250
250
 
@@ -3216,7 +3216,7 @@ sap.ui.define(["sap/ui/base/Object",
3216
3216
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
3217
3217
  * @public
3218
3218
  * @extends sap.ui.base.Object
3219
- * @version 1.136.6
3219
+ * @version 1.136.8
3220
3220
  * @since 1.30.0
3221
3221
  * @alias sap.suite.ui.generic.template.lib.NavigationController
3222
3222
  */
@@ -580,7 +580,7 @@ sap.ui.define([
580
580
  const getFieldProps = function (sField) {
581
581
  return {
582
582
  "sProperty": sField,
583
- "sLabel": mPropertyByFieldName[sField]["sap:label"],
583
+ "sLabel": (mPropertyByFieldName[sField]["com.sap.vocabularies.Common.v1.Label"] || "").String || mPropertyByFieldName[sField]["sap:label"] || "",
584
584
  "sValue": oItemContext.getProperty(sField),
585
585
  "bHidden": !aVisibleColumns.has(sField)
586
586
  };
@@ -66,7 +66,7 @@ sap.ui.define([
66
66
  interfaces: [],
67
67
  controls: [],
68
68
  elements: [],
69
- version: "1.136.6",
69
+ version: "1.136.8",
70
70
  extensions: {
71
71
  //Configuration used for rule loading of Support Assistant
72
72
  "sap.ui.support": {