@sapui5/sap.suite.ui.generic.template 1.116.0 → 1.117.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 (44) 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/manifest.json +1 -1
  4. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  5. package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +9 -2
  6. package/src/sap/suite/ui/generic/template/ListReport/controller/IappStateHandler.js +7 -24
  7. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  8. package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +21 -25
  9. package/src/sap/suite/ui/generic/template/ObjectPage/controller/InlineCreationRowsHelper.js +62 -18
  10. package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageSortingHandler.js +26 -23
  11. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  12. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  13. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  14. package/src/sap/suite/ui/generic/template/designtime/ListReport.designtime.js +1 -1
  15. package/src/sap/suite/ui/generic/template/fragments/AddressFacet.fragment.xml +0 -5
  16. package/src/sap/suite/ui/generic/template/fragments/Contacts.fragment.xml +2 -2
  17. package/src/sap/suite/ui/generic/template/fragments/SmartFormDataField.fragment.xml +3 -3
  18. package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +1 -1
  19. package/src/sap/suite/ui/generic/template/genericUtilities/oDataModelHelper.js +24 -1
  20. package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +90 -291
  21. package/src/sap/suite/ui/generic/template/js/RuntimeFormatters.js +111 -2
  22. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +12 -7
  23. package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +16 -23
  24. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +20 -151
  25. package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +44 -65
  26. package/src/sap/suite/ui/generic/template/lib/ComponentUtils.js +4 -0
  27. package/src/sap/suite/ui/generic/template/lib/ContactCardDetailHelper.js +166 -0
  28. package/src/sap/suite/ui/generic/template/lib/ContextBookkeeping.js +7 -1
  29. package/src/sap/suite/ui/generic/template/lib/MessageUtils.js +7 -3
  30. package/src/sap/suite/ui/generic/template/lib/StatePreserver.js +4 -2
  31. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +8 -8
  32. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +1 -1
  33. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saptrc.properties +4 -4
  34. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +8 -8
  35. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +4 -4
  36. package/src/sap/suite/ui/generic/template/lib/multipleViews/MultipleTablesModeHelper.js +4 -9
  37. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +39 -28
  38. package/src/sap/suite/ui/generic/template/lib/navigation/routingHelper.js +6 -6
  39. package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +2 -2
  40. package/src/sap/suite/ui/generic/template/library.js +1 -1
  41. package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +9 -3
  42. package/src/sap/suite/ui/generic/template/themes/base/ListReport.less +0 -1
  43. package/src/sap/suite/ui/generic/template/ListReport/view/fragments/Placeholder.fragment.xml +0 -361
  44. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Placeholder.fragment.xml +0 -472
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.116.0",
3
+ "version": "1.117.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.116.0</version>
10
+ <version>1.117.0</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.116.0"
11
+ "version": "1.117.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.116.0"
11
+ "version": "1.117.0"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -20,9 +20,10 @@ sap.ui.define([
20
20
  "sap/suite/ui/generic/template/listTemplates/filterSettingsPreparationHelper",
21
21
  "sap/ui/model/json/JSONModel",
22
22
  "sap/m/MessageBox",
23
- "sap/suite/ui/generic/template/listTemplates/semanticDateRangeTypeHelper"
23
+ "sap/suite/ui/generic/template/listTemplates/semanticDateRangeTypeHelper",
24
+ "sap/m/table/Util"
24
25
  ], function (Filter, ExtensionAPI, listUtils, MessageStripHelper, IappStateHandler, MultipleViewsHandler,
25
- WorklistHandler, ShareUtils, controlHelper, FeLogger, ObjectPath, StableIdHelper, deepExtend, CreateWithDialogHandler, MultiEditHandler, SelectionVariant, AddCardsHelper, filterSettingsPreparationHelper, JSONModel, MessageBox, semanticDateRangeTypeHelper) {
26
+ WorklistHandler, ShareUtils, controlHelper, FeLogger, ObjectPath, StableIdHelper, deepExtend, CreateWithDialogHandler, MultiEditHandler, SelectionVariant, AddCardsHelper, filterSettingsPreparationHelper, JSONModel, MessageBox, semanticDateRangeTypeHelper,TableUtil) {
26
27
  "use strict";
27
28
 
28
29
  var oLogger = new FeLogger("ListReport.controller.ControllerImplementation").getLogger();
@@ -436,6 +437,12 @@ sap.ui.define([
436
437
  return;
437
438
  }
438
439
 
440
+ // Updating the speech output, after loading data in the table
441
+ if (controlHelper.isTable(oControl)) {
442
+ var iRowCount = oTemplateUtils.oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oControl).getBinding().getCount();
443
+ TableUtil.announceTableUpdate(oControl.getHeader(), iRowCount);
444
+ }
445
+
439
446
  oFclProxy.handleDataReceived(oControl, fnNavigateToListItemProgrammatically);
440
447
  var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
441
448
  oTemplatePrivateModel.setProperty("/listReport/firstSelection", true);
@@ -378,7 +378,7 @@ sap.ui.define([
378
378
  // - Collapse of filter bar once user press Go (only for phone device)
379
379
  function onSearchPressed() {
380
380
  // if SFB does not allow search, no need to adapt anything
381
- if (!isSearchAllowed()){
381
+ if (!oState.oSmartFilterbar.checkSearchAllowed()){
382
382
  return;
383
383
  }
384
384
  oState.refreshModel();
@@ -430,24 +430,6 @@ sap.ui.define([
430
430
  }
431
431
  }
432
432
  }
433
-
434
- // Checks, whether search is allowed from SFB point of view, i.e. if calling the search on SFB will actually trigger a request
435
- function isSearchAllowed() {
436
- // Unfortunately, SFB's method verifySearchAllowed does not only check, but also marks filters as erroneous. This is not wanted here - we need to know beforehand, whether
437
- // triggering a search would be possible or not.
438
-
439
- // Workaround: Checking ourselves, whether all mandatory filters are filled
440
- // Drawback:
441
- // - duplicate implementation
442
- // - missing to check any other (existing or future) possible reason for prohibiting the search
443
- // TODO: should be replaced, as soon as functionality is provided from SFB (either via checkOnly-parameter in verifySearchAllowed, or as a new method isSearchAllowed)
444
- var aMandatoryFilterItems = oState.oSmartFilterbar.determineMandatoryFilterItems();
445
- var aFiltersWithValues = oState.oSmartFilterbar.getFiltersWithValues();
446
-
447
- return aMandatoryFilterItems.every(function(sItem) {
448
- return aFiltersWithValues.includes(sItem);
449
- });
450
- }
451
433
 
452
434
  /*
453
435
  This method is called when an LR app is the target of an external navigation and the XAppState data contains a presentationVariant.
@@ -478,7 +460,7 @@ sap.ui.define([
478
460
  // 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
479
461
  // trigger a request (but instead only mark that filter) - thus hiding placeholder now to avoid it to stay forever
480
462
  // TODO: refactor: Still in that case our internal data shows data are loaded - ideally, that should not be the case
481
- if (!isSearchAllowed()){
463
+ if (!oState.oSmartFilterbar.checkSearchAllowed()){
482
464
  oTemplateUtils.oComponentUtils.hidePlaceholder();
483
465
  }
484
466
 
@@ -995,13 +977,14 @@ sap.ui.define([
995
977
  // - worklist
996
978
  // - livemode
997
979
  // - master detail (i.e. bLoadListAndFirstEntryOnStartup is set)
998
- var bShouldDataBeLoaded = oState.oWorklistData.bWorkListEnabled || oState.oSmartFilterbar.getLiveMode() || oState.bLoadListAndFirstEntryOnStartup ;
980
+ var oSmartFilterbar = oState.oSmartFilterbar;
981
+ var bShouldDataBeLoaded = oState.oWorklistData.bWorkListEnabled || oSmartFilterbar.getLiveMode() || oState.bLoadListAndFirstEntryOnStartup ;
999
982
 
1000
983
  var sLoadBehaviour = getDataLoadSettings().loadDataOnAppLaunch;
1001
984
  if (!oSmartVariantManagement || oController.getOwnerComponent().getVariantManagementHidden()){
1002
985
  // No VM ->
1003
986
  bShouldDataBeLoaded = bShouldDataBeLoaded || sLoadBehaviour === "always";
1004
- bShouldDataBeLoaded = bShouldDataBeLoaded || (sLoadBehaviour === "ifAnyFilterExist" && oState.oSmartFilterbar.getFiltersWithValues().length > 0);
987
+ bShouldDataBeLoaded = bShouldDataBeLoaded || (sLoadBehaviour === "ifAnyFilterExist" && oSmartFilterbar.getFiltersWithValues().length > 0);
1005
988
  // behavior of last patch set would translate to the following - seems not to be correct (in case of setting ifAnyFilterExist but no filters provided)
1006
989
  // bShouldDataBeLoaded = bShouldDataBeLoaded || sLoadBehaviour !== "never";
1007
990
  } else {
@@ -1013,7 +996,7 @@ sap.ui.define([
1013
996
  // contains the condition, but if reselecting the standard variant, it will also select without filters!
1014
997
  // TODO: check, how to solve that inconsistency)
1015
998
  // - but in both cases not, if a mandatory filter is missing
1016
- var bDefaultExecuteOnStandard = (bShouldDataBeLoaded || sLoadBehaviour !== "never") && isSearchAllowed();
999
+ var bDefaultExecuteOnStandard = (bShouldDataBeLoaded || sLoadBehaviour !== "never") && oSmartFilterbar.checkSearchAllowed();
1017
1000
  oSmartVariantManagement && oSmartVariantManagement.setExecuteOnStandard(bDefaultExecuteOnStandard);
1018
1001
 
1019
1002
  // determine final setting according to user's variant settings
@@ -1040,7 +1023,7 @@ sap.ui.define([
1040
1023
  // If bShouldDataBeLoaded is true up to here, that means, according to the circumstances we would actually like to load data. However, if mandatory filters exist, and not
1041
1024
  // all of them are provided with data, that means, we cannot load data: SFB.search would just mark the missing filters (which is not wanted here) and not even trigger a
1042
1025
  // request. Thus, this question overrules everything else.
1043
- bShouldDataBeLoaded = bShouldDataBeLoaded && isSearchAllowed();
1026
+ bShouldDataBeLoaded = bShouldDataBeLoaded && oSmartFilterbar.checkSearchAllowed();
1044
1027
 
1045
1028
  oDataLoadedWrapper.setState(!!bShouldDataBeLoaded);
1046
1029
  }
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.116.0"
11
+ "version": "1.117.0"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -1450,7 +1450,6 @@ sap.ui.define([
1450
1450
  return false;
1451
1451
  }
1452
1452
  oSelectedSection = oControl;
1453
- oObjectPage.setSelectedSection(oSelectedSection);
1454
1453
  return null;
1455
1454
  }
1456
1455
  if (controlHelper.isObjectPageSubSection(oControl)){
@@ -1461,8 +1460,9 @@ sap.ui.define([
1461
1460
  return false;
1462
1461
  }
1463
1462
  // Scroll to the given subsection and make sure that controls and bindings for this subsection are initialized (necessary because of lazy loading)
1464
- oSelectedSection.setSelectedSubSection(oControl);
1465
1463
  fnSubSectionEntered(oControl);
1464
+ oObjectPage.setSelectedSection(oSelectedSection);
1465
+ oSelectedSection.setSelectedSubSection(oControl);
1466
1466
  return null;
1467
1467
  }
1468
1468
  if (controlHelper.isSmartField(oControl)){ // check whether the SmartField is the correct target for focussing
@@ -2355,31 +2355,27 @@ sap.ui.define([
2355
2355
  oTemplateUtils.oCommonEventHandlers.submitChangesForSmartMultiInput(oEvent);
2356
2356
  }
2357
2357
  },
2358
-
2359
- contextEditableChanged: function (oEvent) {
2358
+ onModeToggled: function (oEvent) {
2360
2359
  /* Set the FieldGroupIds of the SmartField(s) which are 1:1 associated with the object page entity set so that side effect annotation targeting
2361
2360
  the object entity set would work. Assigning FieldGroupIds to other SmartFields is already taken care by the SmartFields */
2362
- if (oEvent.getParameter("editable")) {
2363
- var oSmartField = oEvent.getSource();
2364
- oSmartField._getComputedMetadata().then(function (oComputedMetaData) {
2365
- if (oComputedMetaData && oComputedMetaData.navigationPath && !!oSmartField.getBindingContext()) {
2366
- var oClonedMetaData = deepExtend({}, oComputedMetaData);
2367
- var oMetaModel = oController.getOwnerComponent().getModel().getMetaModel();
2368
-
2369
- /* EntitySet and EntityType of the cloned metamodel of smartfield needs to be changed to the parent entity so that when
2370
- _calculateFieldGroupIDs looks through the passed metamodel, it should be able to find the corresponding side effect annotation */
2371
- oClonedMetaData.entitySet = oMetaModel.getODataEntitySet(oController.getOwnerComponent().getEntitySet());
2372
- oClonedMetaData.entityType = oMetaModel.getODataEntityType(oClonedMetaData.entitySet.entityType);
2373
-
2374
- var aIDs = oSmartField._calculateFieldGroupIDs(oClonedMetaData);
2375
- if (aIDs) {
2376
- oSmartField._setInternalFieldGroupIds(aIDs);
2377
- }
2361
+ var oSmartField = oEvent.getSource();
2362
+ oSmartField._getComputedMetadata().then(function (oComputedMetaData) {
2363
+ if (oComputedMetaData && oComputedMetaData.navigationPath && !!oSmartField.getBindingContext()) {
2364
+ var oClonedMetaData = deepExtend({}, oComputedMetaData);
2365
+ var oMetaModel = oController.getOwnerComponent().getModel().getMetaModel();
2366
+
2367
+ /* EntitySet and EntityType of the cloned metamodel of smartfield needs to be changed to the parent entity so that when
2368
+ _calculateFieldGroupIDs looks through the passed metamodel, it should be able to find the corresponding side effect annotation */
2369
+ oClonedMetaData.entitySet = oMetaModel.getODataEntitySet(oController.getOwnerComponent().getEntitySet());
2370
+ oClonedMetaData.entityType = oMetaModel.getODataEntityType(oClonedMetaData.entitySet.entityType);
2371
+
2372
+ var aIDs = oSmartField._calculateFieldGroupIDs(oClonedMetaData);
2373
+ if (aIDs) {
2374
+ oSmartField._setInternalFieldGroupIds(aIDs);
2378
2375
  }
2379
- });
2380
- }
2376
+ }
2377
+ });
2381
2378
  },
2382
-
2383
2379
  deleteEntry: function (oEvent) {
2384
2380
  var oListItem = oEvent.getParameter("listItem");
2385
2381
  var oListItemContext = oListItem.getBindingContext();
@@ -2433,8 +2429,8 @@ sap.ui.define([
2433
2429
  }, Function.prototype); // to avoid console errors add an event handler for the reject case
2434
2430
  },
2435
2431
 
2436
- onContactDetails: function (oEvent) {
2437
- oTemplateUtils.oCommonEventHandlers.onContactDetails(oEvent);
2432
+ onContactDetails: function (oEvent, sNavigationPropertyPath) {
2433
+ oTemplateUtils.oCommonEventHandlers.onContactDetails(oEvent, sNavigationPropertyPath);
2438
2434
  },
2439
2435
  onSmartFieldInitialise: function (oEvent) {
2440
2436
  var sViewId = this.getView().getId();
@@ -81,7 +81,7 @@ sap.ui.define([
81
81
  mDefaultRowTypeByTableId = new Map(),
82
82
  oUIModelPropsWithChangeEventAttached = new Set(),
83
83
  mContextWithCreatablePathByTableId = new Map(),
84
- oEmptyRowCreated = new Set();
84
+ oEditedRowContexts = new Set();
85
85
 
86
86
  function fnOnBeforeRebindObjectPage(){
87
87
  //Clear the cache
@@ -99,7 +99,7 @@ sap.ui.define([
99
99
 
100
100
  function fnDoesTableHaveCreationRows (oItemsBinding) {
101
101
  return oItemsBinding.getAllCurrentContexts().some(function (oContext){
102
- return oContext.isInactive();
102
+ return oContext.isInactive() && !oEditedRowContexts.has(oContext.getPath());
103
103
  });
104
104
  }
105
105
 
@@ -138,15 +138,27 @@ sap.ui.define([
138
138
 
139
139
  var oBindingParams = oEvent.getParameters().bindingParams;
140
140
  var fnOldDataReceived = oBindingParams.events.dataReceived || Function.prototype;
141
- oBindingParams.events.dataReceived = function (onDataReceivedEvent) {
142
- fnOldDataReceived.call(this, onDataReceivedEvent);
143
- // When the smart table already has inline creation rows and the user adds a new column to the table, it causes table rebind.
144
- // In this case, just hide the inline controls in the inline creation rows and stop processing further.
141
+ oBindingParams.events.dataReceived = function (oDataReceivedEvent) {
142
+ fnOldDataReceived.call(this, oDataReceivedEvent);
145
143
  var oSmartTableHandler = fnGetSmartTableHandler(oSmartTable),
146
- oItemsBinding = oSmartTableHandler.getBinding();
144
+ oItemsBinding = oSmartTableHandler.getBinding();
145
+
147
146
  if (fnDoesTableHaveCreationRows(oItemsBinding)) {
148
- fnUpdateTableRows(oSmartTable.getTable());
149
- return;
147
+ /**
148
+ * If the table already has inline creation rows
149
+ * 1. If the dataReceived event triggered by side-effect
150
+ * a. Delete the existing inline creation rows and
151
+ * b. Continue with the process of creating new inline creation rows
152
+ * 2. Otherwise, the dataReceived event would be triggered by adding a column in personalization.
153
+ * In that case, just hide the inline controls and stop processing further.
154
+ */
155
+ var bIsTriggeredBySideEffect = oDataReceivedEvent.getParameter("reason") === "SIDE_EFFECT_TARGET";
156
+ if (bIsTriggeredBySideEffect) {
157
+ fnDeleteCreationRows(oSmartTable);
158
+ } else {
159
+ fnUpdateTableRows(oSmartTable.getTable());
160
+ return;
161
+ }
150
162
  }
151
163
  // Check the UI model and proceed with creation of inline creation rows
152
164
  fnCheckUIModelProp(oSmartTable);
@@ -159,9 +171,9 @@ sap.ui.define([
159
171
 
160
172
  var fnHandleFirstUserInputOnEmptyRow = function(oBindingContext) {
161
173
  var sPath = oBindingContext.getPath && oBindingContext.getPath();
162
- if (sPath && !oEmptyRowCreated.has(sPath)) {
174
+ if (sPath && !oEditedRowContexts.has(sPath)) {
163
175
  fnAddCreationRows(oSmartTable, true);
164
- oEmptyRowCreated.add(sPath);// Maintain the context in a Set so that an Empty row is created only once
176
+ oEditedRowContexts.add(sPath);// Maintain the context in a Set so that an Empty row is created only once
165
177
  }
166
178
  };
167
179
  var fnCheckIfBindingIsTransient = function(oSourceControl) {
@@ -186,9 +198,14 @@ sap.ui.define([
186
198
  function fnCheckUIModelProp (oSmartTable) {
187
199
  var oUIModel = oObjectPage.getModel("ui"),
188
200
  sSmartTableCreationMode = fnGetSmartTableCreationMode(oSmartTable),
189
- sUIModelProp = oUIModelPropForCreationMode[sSmartTableCreationMode];
201
+ sUIModelProp = oUIModelPropForCreationMode[sSmartTableCreationMode],
202
+ sSmartTableId = oSmartTable.getId();
203
+ // Ignore it when the table is already in process
204
+ if (oTablesToBeProcessed[sSmartTableCreationMode].has(sSmartTableId)) {
205
+ return;
206
+ }
190
207
  //Add the smart table id to the list of tables to be processed
191
- oTablesToBeProcessed[sSmartTableCreationMode].add(oSmartTable.getId());
208
+ oTablesToBeProcessed[sSmartTableCreationMode].add(sSmartTableId);
192
209
  //If the property is true, proceed with the creating inline creation rows
193
210
  if (oUIModel.getProperty(sUIModelProp)) {
194
211
  fnAddCreationRows(oSmartTable);
@@ -335,9 +352,9 @@ sap.ui.define([
335
352
  var oRowContext = oEvent.getParameter("context"),
336
353
  aAllRequiredProps = oSmartTable.data("inlineCreationRowsConfig").requiredProps;
337
354
 
338
- if (oRowContext && !oEmptyRowCreated.has(oRowContext.getPath && oRowContext.getPath())) {
355
+ if (oRowContext && !oEditedRowContexts.has(oRowContext.getPath && oRowContext.getPath())) {
339
356
  fnAddCreationRows(oSmartTable, true);
340
- oEmptyRowCreated.add(oRowContext.getPath());
357
+ oEditedRowContexts.add(oRowContext.getPath());
341
358
  }
342
359
  // If the table contains required props, validate them and show error messages
343
360
  if (aAllRequiredProps.length > 0) {
@@ -484,7 +501,10 @@ sap.ui.define([
484
501
 
485
502
  if (aTransientRows.length === 0) {
486
503
  return;
487
- }
504
+ }
505
+
506
+ fnUpdateResponsiveTableRowsBasedOnNonInsertableProperties(oTable, aTransientRows);
507
+
488
508
  // Preserving the default row type into "mDefaultRowTypeByTableId".
489
509
  // sDefaultRowType is used by "fnHideInlineControlsOnTransientRow" to restore the row type when the row is peristed
490
510
  if (mDefaultRowTypeByTableId.get(sTableId)) {
@@ -500,6 +520,29 @@ sap.ui.define([
500
520
  });
501
521
  }
502
522
 
523
+ function fnUpdateResponsiveTableRowsBasedOnNonInsertableProperties(oTable, aTransientRows) {
524
+ // Support NonInsertableProperties to disable the field while creation
525
+ var oSmartTable = oTable.getParent();
526
+ var aColumns = oTable.getColumns();
527
+ var aNonInsertableProperties = oSmartTable.data("inlineCreationRowsConfig").nonInsertableProperties;
528
+ var aIndexOfNonInsertableProperties = [];
529
+ if (aNonInsertableProperties && aNonInsertableProperties.length > 0) {
530
+ for (var i = 0; i < aTransientRows[0].getCells().length; i++) {
531
+ for (var j = 0; j < aNonInsertableProperties.length; j++) {
532
+ if (aNonInsertableProperties[j].PropertyPath === aColumns[i].data("p13nData").leadingProperty) {
533
+ aIndexOfNonInsertableProperties.push(i);
534
+ }
535
+ }
536
+ }
537
+ for (var i = 0; i < aTransientRows.length; i++) {
538
+ var aTransientRowsCell = aTransientRows[i].getCells();
539
+ for (var j = 0; j < aIndexOfNonInsertableProperties.length; j++) {
540
+ aTransientRowsCell[aIndexOfNonInsertableProperties[j]].setEditable && aTransientRowsCell[aIndexOfNonInsertableProperties[j]].setEditable(false);
541
+ }
542
+ }
543
+ }
544
+ }
545
+
503
546
  /**
504
547
  * This method binds the row type and the visibility of delete control with row's binding context
505
548
  * 1. When the binding context is transient ($context.isTransient = true)
@@ -538,7 +581,8 @@ sap.ui.define([
538
581
 
539
582
  /**
540
583
  *
541
- * This method iterates through the contexts in the table and removes the inactive contexts (inline creation rows).
584
+ * This method iterates through the contexts in the table
585
+ * and removes the inactive contexts (inline creation rows) which are not yet edited.
542
586
  * @param {*} oSmartTable
543
587
  */
544
588
  function fnDeleteCreationRows (oSmartTable) {
@@ -547,7 +591,7 @@ sap.ui.define([
547
591
 
548
592
  if (oItemsBinding.isResolved() && oItemsBinding.isLengthFinal()) {
549
593
  oItemsBinding.getAllCurrentContexts().forEach(function (oContext){
550
- if (oContext.isInactive()) {
594
+ if (oContext.isInactive() && !oEditedRowContexts.has(oContext.getPath())) {
551
595
  oContext.delete();
552
596
  }
553
597
  });
@@ -143,17 +143,17 @@ sap.ui.define([
143
143
  // - table -> the corresponding SmartTable
144
144
  // - presentationControlHandler -> the corresponding instance of sap.suite.ui.generic.template.lib.presentationControl.SmartTableHandler
145
145
  // - messageToMsgInTableInfo -> a map that maps the ids of messages belonging to rows in this table to detailed information about this relationship
146
- // More preceisely, the detailed information is an object containing the following attributes:
147
- // ~ index -> The index of the entry in the table realting to this message, resp. 9999999 if no such entry could be found
146
+ // More precisely, the detailed information is an object containing the following attributes:
147
+ // ~ index -> The index of the entry in the table relating to this message, resp. 9999999 if no such entry could be found
148
148
  // ~ rowCurrentlyShown -> Information whether the row this message relates to is currently shown
149
149
  // ~ rowIdentifier -> The human readable identification of the row the message relates to
150
150
  // ~ columnInfo -> Information about the column the message relates to (resp. a faulty value, if no such column could be identified)
151
151
  // More precisely, this is an object containing properties 'label' (string identifying the column) and 'hidden' (boolean informing whether the column is hidden)
152
- // This information is set (maybe asynchronosly) by addContextInfoToMessageToMsgInTableInfo resp. getDetailsRetrievedPromise.
152
+ // This information is set (maybe asynchronously) by addContextInfoToMessageToMsgInTableInfo resp. getDetailsRetrievedPromise.
153
153
  // - tableLoaded -> a Promise which is resolved when the table has finished loading its data and the data which have been loaded have
154
154
  // been used to update the content of the messageToMsgInTableInfo property
155
155
  // - destroy -> a destroy function for this instance
156
- // - columnInfo -> a map (created on demand) mapping pathes that represent columns to the columnInfo as described above
156
+ // - columnInfo -> a map (created on demand) mapping paths that represent columns to the columnInfo as described above
157
157
  // Note that mTableIdToTableInfo is used as a cash.
158
158
  // Moreover, note that this function returns a faulty value if the table does not possess a binding. However, this information is not cached.
159
159
  function getTableInfo(oTable){
@@ -221,7 +221,7 @@ sap.ui.define([
221
221
  if (sColumnPath.startsWith("/")){
222
222
  sColumnPath = sColumnPath.substring(1);
223
223
  }
224
- // if sColumnPath is empty the whole table should be considered as target. If sColumnPath contains a "(" the target points to a subentity of the current item
224
+ // if sColumnPath is empty the whole table should be considered as target. If sColumnPath contains a "(" the target points to a sub entity of the current item
225
225
  // In both cases no column can be identified
226
226
  if (!sColumnPath || sColumnPath.indexOf("(") > 0){
227
227
  return;
@@ -273,9 +273,11 @@ sap.ui.define([
273
273
  var mPreviousMessageToMsgInTableInfo = oRet.messageToMsgInTableInfo; // the old content might be useful (see below)
274
274
  oRet.messageToMsgInTableInfo = Object.create(null); // However, we create the content from scratch now
275
275
  // Analyze all rows currently existing in the table for messages belonging to them
276
- var fnHandleContext = addContextInfoToMessageToMsgInTableInfo.bind(null, oRet);
277
- var aContexts = oPresentationControlHandler.getCurrentContexts() || [];
278
- aContexts.forEach(fnHandleContext);
276
+ if (!controlHelper.isTreeTable(oTable.getTable())) { // temporarily disabled for tree tables until oContext.getMessages() is fixed by the model component
277
+ var fnHandleContext = addContextInfoToMessageToMsgInTableInfo.bind(null, oRet);
278
+ var aContexts = oPresentationControlHandler.getCurrentContexts() || [];
279
+ aContexts.forEach(fnHandleContext);
280
+ }
279
281
  // mPreviousMessageToMsgInTableInfo might contain information for messages belonging to rows
280
282
  // meanwhile filtered out. Do not loose this information.
281
283
  for (var sMsgId in mPreviousMessageToMsgInTableInfo){
@@ -366,7 +368,7 @@ sap.ui.define([
366
368
  // If both messages belong to the same section but to different tables within this section they should be sorted according to the position of the tables within the section
367
369
  // If both messages belong to the same table, but to different selected rows within the table they should be sorted according to the position of that table
368
370
  // If both messages belong to the same table, but only one of them to a selected row, this one should be shown first
369
- // If both messages belong the same table, but to different non-selected rows an artifical stable sorting of thoswe rows is assumed (based on the item binding path)
371
+ // If both messages belong the same table, but to different non-selected rows an artificial stable sorting of those rows is assumed (based on the item binding path)
370
372
  // If both messages belong to the same table and to the same row (which may be none) or to the same section and both to no table then they are sorted by
371
373
  // - reverse severity (if the severity is different)
372
374
  // - position of the most specific control which has been found for them (if the severity is equal)
@@ -417,7 +419,7 @@ sap.ui.define([
417
419
  }
418
420
 
419
421
  // Read the entry for the specified binding path without updating the state messages, and call the specified function on the context obtained from this read (resp. null, if the read did not succeed)
420
- // Note: Supressing the state messages is done to prevent that the content of the itemBinding this class relies on is modified while this instance is in use.
422
+ // Note: Suppressing the state messages is done to prevent that the content of the itemBinding this class relies on is modified while this instance is in use.
421
423
  function performFunctionOnContext(oModel, sBindingPath, fnFunction){
422
424
  // The commented code is not supported by the OData model yet
423
425
  /* oModel.createBindingContext(sBindingPath, null, {
@@ -470,16 +472,16 @@ sap.ui.define([
470
472
  };
471
473
  });
472
474
  }
473
- fnResolve();
475
+ fnResolve();
474
476
  });
475
- });
477
+ });
476
478
  }
477
479
 
478
480
  // This function is used to identify a table that can be assigned for the message oMessage. This is only used in case that the standard mechanism provided by UI5 that assigns controls
479
481
  // to messages has not provided any result (yet).
480
482
  // In this case we loop over all SmartTable known to us until we find a suitable candidate.
481
483
  // For this purpose we check whether the binding path of the table "fits" to a full target of the message.
482
- // Thereby the binding path of the table is determined by concatentaing sBindingPathPrefix with the navigation property of the table.
484
+ // Thereby the binding path of the table is determined by concatenating sBindingPathPrefix with the navigation property of the table.
483
485
  // If the table is found the corresponding information will be added to mTableInfosReadyPromise by either adding a new entry for the table or extending the existing one.
484
486
  function fnFindTableForMessage(oMessage, mTableInfosReadyPromise, sBindingPathPrefix){
485
487
  var bFound = false;
@@ -525,11 +527,11 @@ sap.ui.define([
525
527
  // This should ensure that for all considered messages the connection to their controls has already been established.
526
528
  // However, this connection is created by ui5 in an asynchronous way, and currently they do not provide a mechanism which
527
529
  // lets us wait until this process has been finished.
528
- // Therfore, as a second chance we try to establish the connection between messages and tables ourselves, based on metadata.
530
+ // Therefore, as a second chance we try to establish the connection between messages and tables ourselves, based on metadata.
529
531
  // This does not help for messages that belong to forms. For these messages the map messageToUpdateFunction is used (see below).
530
532
  // Note that for messages which cannot be assigned to tables (i.e. messages that belong to forms) it might be necessary to do a resorting later.
531
533
  // - oItemBinding is the binding of the message popover which displays the messages.
532
- // - aMessages is the array of messages displayed (actually this is redundant, as it could also be retireved from oItemBinding)
534
+ // - aMessages is the array of messages displayed (actually this is redundant, as it could also be retrieved from oItemBinding)
533
535
  // - oHelperModel is a JSONModel which is used to communicate with the MessageButtonHelper and the message popover
534
536
  // - sBindingPath is the path the object page is currently bound to
535
537
  // The purpose of this function is:
@@ -610,7 +612,7 @@ sap.ui.define([
610
612
  var aTableInfoPromises = [];
611
613
  // We are collecting the tableLoaded-Promises of all relevant tables in order to wait for them.
612
614
  // Note that this is actually superfluous for those tables which have been found relevant with the second try (see above), since this function will only be called
613
- // when the corresponding promise in mTableInfosReadyPromise (see above) has been resolved. That promise can only be resolved when tzhe corresponding tableLoaded promise has been resolved.
615
+ // when the corresponding promise in mTableInfosReadyPromise (see above) has been resolved. That promise can only be resolved when the corresponding tableLoaded promise has been resolved.
614
616
  for (var sTableId in mTableIdToTableInfo){
615
617
  var oTableInfo = mTableIdToTableInfo[sTableId];
616
618
  if (oTableInfo){
@@ -654,22 +656,23 @@ sap.ui.define([
654
656
  // order to add them to messageToMsgInTableInfo of the corresponding table info.
655
657
  // This may still not have provided the required information for all table related messages due to three possible reasons
656
658
  // - The message does not belong to a specific cell within the table but to the table as a whole
657
- // - The messsage is a validation message
659
+ // - The message is a validation message
658
660
  // - The message belongs to a row which has not been loaded
659
661
  // For the first case we do not have to take any additional action.
660
662
  // For the second case we immediately add the missing information using fnAddValidationInfoToTableInfo.
661
663
  // For the third case we trigger an additional backend request which will fetch the data for the missing table row.
662
664
  // The method returns to a Promise which is resolved as soon as all additional backend requests created for the third case have been executed and their results
663
- // have also been added to the correspo0nding messageToMsgInTableInfo.
665
+ // have also been added to the corresponding messageToMsgInTableInfo.
664
666
  // Thus, all in all the returned Promise is resolved as soon as all relevant table data have been fetched and processed.
665
667
  function getMessageSorterForPlacementInfos(){
666
668
  var aMessageDetailsRetrievedPromises = [];
667
- var mBindingPathesToMessageList = Object.create(null);
669
+ var mBindingPathsToMessageList = Object.create(null);
668
670
  var fnHandleMessage = function(sMsgId){
669
671
  var oPlacementInfo = getMessagePlacementInfo(sMsgId);
670
672
  var oTable = oPlacementInfo.groupers[1];
671
- var oTableInfo = oTable && getTableInfo(oTable);
672
- if (oTableInfo){
673
+ // Special handling for messages belonging to tables but is temporarily disabled for tree tables until oContext.getMessages() is fixed by the model component
674
+ var oTableInfo = oTable && !controlHelper.isTreeTable(oTable.getTable()) && getTableInfo(oTable);
675
+ if (oTableInfo) {
673
676
  var oMessage = oPlacementInfo.message;
674
677
  var oMessageInTableInfo = oTableInfo.messageToMsgInTableInfo[sMsgId];
675
678
  if (!(oMessageInTableInfo && oMessageInTableInfo.rowCurrentlyShown)){
@@ -678,12 +681,12 @@ sap.ui.define([
678
681
  } else {
679
682
  var sBindingPath = oPlacementInfo.getItemBindingPath();
680
683
  if (sBindingPath){ // third case
681
- var aBindingPathMessages = mBindingPathesToMessageList[sBindingPath];
684
+ var aBindingPathMessages = mBindingPathsToMessageList[sBindingPath];
682
685
  if (aBindingPathMessages){
683
686
  aBindingPathMessages.push(sMsgId);
684
687
  } else {
685
688
  aBindingPathMessages = [sMsgId];
686
- mBindingPathesToMessageList[sBindingPath] = aBindingPathMessages;
689
+ mBindingPathsToMessageList[sBindingPath] = aBindingPathMessages;
687
690
  var oDetailsRetrievedPromise = getDetailsRetrievedPromise(sBindingPath, oTableInfo, aBindingPathMessages);
688
691
  aMessageDetailsRetrievedPromises.push(oDetailsRetrievedPromise);
689
692
  }
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.116.0"
9
+ "version": "1.117.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.116.0"
9
+ "version": "1.117.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.116.0"
9
+ "version": "1.117.0"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -134,7 +134,7 @@ sap.ui.define(["sap/suite/ui/generic/template/designtime/utils/designtimeHelper"
134
134
  actions: ["rename", "remove", "reveal"]
135
135
  },
136
136
  "sap.m.MenuButton": { // used for create and create with filters and possibly created by combining of buttons
137
- actions: ["split", "rename"]
137
+ actions: ["split", "rename", "remove"]
138
138
  },
139
139
  "sap.m.Button": {
140
140
  actions: ["remove", "reveal", "rename"]
@@ -9,10 +9,5 @@
9
9
  text="{path: 'facet>Label', formatter: 'AHModel.format'}:"
10
10
  labelFor="{:= ${parameter>/stableId}.getStableId({ type:'ObjectPageSection', subType:'AddressValue', sFacet: ${facetId>id}}) }"/>
11
11
  </template:if>
12
- <template:if test="address>label}">
13
- <!-- same coding for SmartField is used in SmartFormDataField.fragment.xml -->
14
- <sfi:SmartField id="{:= ${parameter>/stableId}.getStableId({ type:'ObjectPageSection', subType:'AddressValue', sFacet: ${facetId>id}}) }"
15
- value="{path: 'address>label', formatter: 'AHModel.simplePath'}"/>
16
- </template:if>
17
12
  </VBox>
18
13
  </core:FragmentDefinition>
@@ -12,7 +12,7 @@
12
12
  </layoutData>
13
13
  <items>
14
14
  <List id="{path: 'facet>', formatter: 'AH.getStableIdPartFromFacet'}::ContactsList"
15
- items="{path: 'target>', formatter: 'AHModel.getNavigationPath'}"
15
+ items="{parts:[{path: 'target>'}, {path: 'contact>'}], formatter: 'AH.getItemsForContacts'}"
16
16
  growing="true" growingThreshold="{= ${appSettings>/objectPageColumns/screenSizeXL} === 4 ? '12' : '18'}" class="sapSmartTemplatesObjectPageContactsList"
17
17
  noDataText="{i18n>NOITEMS}">
18
18
  <CustomListItem class="sapSmartTemplatesObjectPageContactsListItem">
@@ -36,7 +36,7 @@
36
36
  </template:if>
37
37
  <VBox class="sapUiSmallMarginBegin sapUiSmallMarginTopBottom">
38
38
  <fe:Link text="{path: 'contact>fn', formatter: 'AHModel.format'}"
39
- press="._templateEventHandlers.onContactDetails" class="sapSmartTemplatesObjectPageContactsListContactTitle"
39
+ press="._templateEventHandlers.onContactDetails($event, '{path: 'target>', formatter: 'AH.getNavigationPropertyPath'}')" class="sapSmartTemplatesObjectPageContactsListContactTitle"
40
40
  wrapping="true">
41
41
  <fe:customData>
42
42
  <core:CustomData key="contactDetails" value="{= ${path: 'contact>', formatter: 'AH.getCustomDataForContactPopup'}}"/>