@sapui5/sap.suite.ui.generic.template 1.114.1 → 1.114.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.114.1",
3
+ "version": "1.114.3",
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.114.1</version>
10
+ <version>1.114.3</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.114.1"
11
+ "version": "1.114.3"
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.114.1"
11
+ "version": "1.114.3"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.114.1"
11
+ "version": "1.114.3"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -226,19 +226,22 @@ sap.ui.define([
226
226
  oTemplateUtils.oCommonEventHandlers.submitChangesForSmartMultiInput();
227
227
  var oSaveEntityPromise = oTemplateUtils.oServices.oCRUDManager.saveEntity(); // This Promise may include a dialog step (warning scenario) -> do not use it for busy handling
228
228
  var bSuccess = false; // will be set before the busy session ends
229
- oSaveEntityPromise.then(function (oContext) {
230
- if (!bStayInEdit) {
231
- var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
232
- // switch to display mode
233
- oTemplatePrivateModel.setProperty("/objectPage/displayMode", 1);
234
- fnReturnToDisplayNonDraft();
235
- oViewProxy.setEditable(false);
236
- }
237
- performAfterSaveOperations(oContext, oView, bIsComponentDirty, mPendingChangesToContextInfo, bStayInEdit, bEditNextObject);
238
- bSuccess = true;
239
- }, function(){
240
- oTemplateUtils.oInfoObjectHandler.executeForAllInformationObjects("smartTable", function(oInfoObject){
241
- oInfoObject.onSaveWithError();
229
+ var oSideEffectsExecutedPromise = new Promise(function(fnSideEffectsExecuted, fnSideEffectsRejected){
230
+ oSaveEntityPromise.then(function (oContext) {
231
+ if (!bStayInEdit) {
232
+ var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
233
+ // switch to display mode
234
+ oTemplatePrivateModel.setProperty("/objectPage/displayMode", 1);
235
+ fnReturnToDisplayNonDraft();
236
+ oViewProxy.setEditable(false);
237
+ }
238
+ performAfterSaveOperations(oContext, oView, bIsComponentDirty, mPendingChangesToContextInfo, bStayInEdit, bEditNextObject, fnSideEffectsExecuted, fnSideEffectsRejected);
239
+ bSuccess = true;
240
+ }, function(){
241
+ oTemplateUtils.oInfoObjectHandler.executeForAllInformationObjects("smartTable", function(oInfoObject){
242
+ oInfoObject.onSaveWithError();
243
+ });
244
+ fnSideEffectsRejected();
242
245
  });
243
246
  });
244
247
  // Define a function that is called after the end of the busy session to set the focus. It can rely on bSuccess
@@ -249,13 +252,14 @@ sap.ui.define([
249
252
  };
250
253
  oTemplateUtils.oServices.oApplication.setNextFocus(fnSetFocusAfterwards);
251
254
  var oEvent = {
252
- saveEntityPromise: oSaveEntityPromise
255
+ saveEntityPromise: oSaveEntityPromise,
256
+ sideEffectsExecutedPromise: oSideEffectsExecutedPromise
253
257
  };
254
258
  oTemplateUtils.oComponentUtils.fire(oController, "AfterSave", oEvent);
255
259
  }
256
260
 
257
261
  //common flow for Save and Save-continue Edit (Non draft)
258
- function performAfterSaveOperations(oContext, oView, bSomethingWasChanged, mPendingChangesToContextInfo, bStayInEdit, bEditNextObject) {
262
+ function performAfterSaveOperations(oContext, oView, bSomethingWasChanged, mPendingChangesToContextInfo, bStayInEdit, bEditNextObject, fnSideEffectsExecuted, fnSideEffectsRejected) {
259
263
  var oUIModel = oObjectPage.getModel("ui");
260
264
  var bCreateMode = oUIModel.getProperty("/createMode");
261
265
  var oComponent = oController.getOwnerComponent();
@@ -285,7 +289,7 @@ sap.ui.define([
285
289
  sSuccessMessageKey = bSomethingWasChanged ? "OBJECT_SAVED" : "OBJECT_NOT_MODIFIED";
286
290
  }
287
291
  MessageUtils.showSuccessMessageIfRequired(oTemplateUtils.oCommonUtils.getText(sSuccessMessageKey), oTemplateUtils.oServices);
288
-
292
+ var aSideEffectPromises = [];
289
293
  for (var sProperty in mPendingChangesToContextInfo) {
290
294
  var oInfo = mPendingChangesToContextInfo[sProperty];
291
295
  var oCurrentContext = oInfo.context;
@@ -300,8 +304,12 @@ sap.ui.define([
300
304
  if (iMetaDataIndex > -1) {
301
305
  aSourceProperties.splice(iMetaDataIndex, 1);
302
306
  }
303
- oTemplateUtils.oServices.oApplicationController.executeSideEffects(oCurrentContext, aSourceProperties);
307
+ var oSideEffectForPropertyPromise = oTemplateUtils.oServices.oApplicationController.executeSideEffects(oCurrentContext, aSourceProperties);
308
+ aSideEffectPromises.push(oSideEffectForPropertyPromise);
304
309
  }
310
+ Promise.allSettled(aSideEffectPromises).then(function(){
311
+ fnSideEffectsExecuted(); // do not expose the arguments passed to the members of aSideEffectPromises to the outside
312
+ });
305
313
  }
306
314
 
307
315
  function onSaveAndContinueEdit(oEvent) {
@@ -2339,31 +2347,27 @@ sap.ui.define([
2339
2347
  oTemplateUtils.oCommonEventHandlers.submitChangesForSmartMultiInput(oEvent);
2340
2348
  }
2341
2349
  },
2342
-
2343
- contextEditableChanged: function (oEvent) {
2350
+ onModeToggled: function (oEvent) {
2344
2351
  /* Set the FieldGroupIds of the SmartField(s) which are 1:1 associated with the object page entity set so that side effect annotation targeting
2345
2352
  the object entity set would work. Assigning FieldGroupIds to other SmartFields is already taken care by the SmartFields */
2346
- if (oEvent.getParameter("editable")) {
2347
- var oSmartField = oEvent.getSource();
2348
- oSmartField._getComputedMetadata().then(function (oComputedMetaData) {
2349
- if (oComputedMetaData && oComputedMetaData.navigationPath && !!oSmartField.getBindingContext()) {
2350
- var oClonedMetaData = deepExtend({}, oComputedMetaData);
2351
- var oMetaModel = oController.getOwnerComponent().getModel().getMetaModel();
2352
-
2353
- /* EntitySet and EntityType of the cloned metamodel of smartfield needs to be changed to the parent entity so that when
2354
- _calculateFieldGroupIDs looks through the passed metamodel, it should be able to find the corresponding side effect annotation */
2355
- oClonedMetaData.entitySet = oMetaModel.getODataEntitySet(oController.getOwnerComponent().getEntitySet());
2356
- oClonedMetaData.entityType = oMetaModel.getODataEntityType(oClonedMetaData.entitySet.entityType);
2357
-
2358
- var aIDs = oSmartField._calculateFieldGroupIDs(oClonedMetaData);
2359
- if (aIDs) {
2360
- oSmartField._setInternalFieldGroupIds(aIDs);
2361
- }
2353
+ var oSmartField = oEvent.getSource();
2354
+ oSmartField._getComputedMetadata().then(function (oComputedMetaData) {
2355
+ if (oComputedMetaData && oComputedMetaData.navigationPath && !!oSmartField.getBindingContext()) {
2356
+ var oClonedMetaData = deepExtend({}, oComputedMetaData);
2357
+ var oMetaModel = oController.getOwnerComponent().getModel().getMetaModel();
2358
+
2359
+ /* EntitySet and EntityType of the cloned metamodel of smartfield needs to be changed to the parent entity so that when
2360
+ _calculateFieldGroupIDs looks through the passed metamodel, it should be able to find the corresponding side effect annotation */
2361
+ oClonedMetaData.entitySet = oMetaModel.getODataEntitySet(oController.getOwnerComponent().getEntitySet());
2362
+ oClonedMetaData.entityType = oMetaModel.getODataEntityType(oClonedMetaData.entitySet.entityType);
2363
+
2364
+ var aIDs = oSmartField._calculateFieldGroupIDs(oClonedMetaData);
2365
+ if (aIDs) {
2366
+ oSmartField._setInternalFieldGroupIds(aIDs);
2362
2367
  }
2363
- });
2364
- }
2368
+ }
2369
+ });
2365
2370
  },
2366
-
2367
2371
  deleteEntry: function (oEvent) {
2368
2372
  var oListItem = oEvent.getParameter("listItem");
2369
2373
  var oListItemContext = oListItem.getBindingContext();
@@ -15,6 +15,12 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend"], function(BaseObjec
15
15
  * Attach a handler to the save event
16
16
  *
17
17
  * @param {function} fnFunction the handler function
18
+ * This function will receive an object which contains two properties: <code>saveEntityPromise</code> and <code>sideEffectsExecutedPromise</code> which both point to Promises.
19
+ * Both Promises will be rejected in case the save operation fails in the backend.
20
+ * Otherwise both Promises will be resolved, but at different point in time.
21
+ * The <code>saveEntityPromise</code> will be resolved immediately when the save operation has finished successfully.
22
+ * The <code>sideEffectsExecutedPromise</code> will be resolved as soon as the processing of all side-effects connected to this action has finished as well.
23
+ * Note that even a side-effect execution which results in an error would be considered as finished processing here.
18
24
  * @public
19
25
  */
20
26
  attachAfterSave: function(fnFunction) {
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.114.1"
9
+ "version": "1.114.3"
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.114.1"
9
+ "version": "1.114.3"
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.114.1"
9
+ "version": "1.114.3"
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"]
@@ -60,7 +60,7 @@
60
60
  <template:repeat list="{connectedFields>Data}" var="connectedFieldElement">
61
61
  <sfi:SmartField clientSideMandatoryCheck="false"
62
62
  fetchValueListReadOnly="{parts:[{path: 'parameter>/entityType'},{path: 'connectedFieldElement>'}], formatter: 'AH.getValueListReadOnly'}"
63
- contextEditableChanged="._templateEventHandlers.contextEditableChanged"
63
+ modeToggled="._templateEventHandlers.onModeToggled"
64
64
  value="{path: 'connectedFieldElement>Value', formatter: 'AHModel.simplePath'}"
65
65
  changeModelValue="._templateEventHandlers.onSmartFieldModelValueChanged">
66
66
  <sfi:customData>
@@ -166,7 +166,7 @@
166
166
  clientSideMandatoryCheck="false"
167
167
  textLabel="{path: 'dataField>', formatter: 'AH.getDataFieldLabel'}"
168
168
  fetchValueListReadOnly="{parts:[{path: 'parameter>/entityType'},{path: 'dataField>'}], formatter: 'AH.getValueListReadOnly'}"
169
- contextEditableChanged="._templateEventHandlers.contextEditableChanged"
169
+ modeToggled="._templateEventHandlers.onModeToggled"
170
170
  changeModelValue="._templateEventHandlers.onSmartFieldModelValueChanged">
171
171
  <sfi:customData>
172
172
  <core:CustomData key="defaultTextInEditModeSource" value="{path: 'dataFieldValue>', formatter: 'AH.setValidationForValueList'}" />
@@ -199,7 +199,7 @@
199
199
  clientSideMandatoryCheck="false"
200
200
  tokenUpdate="._templateEventHandlers.submitChangesForSmartMultiInput"
201
201
  selectionFinish="._templateEventHandlers.submitChangesForSmartMultiInput"
202
- contextEditableChanged="._templateEventHandlers.contextEditableChanged"
202
+ modeToggled="._templateEventHandlers.onModeToggled"
203
203
  value="{path: 'dataField>Value', formatter: 'AHModel.simplePath'}"
204
204
  textLabel="{path: 'dataField>', formatter: 'AH.getDataFieldLabel'}"
205
205
  fetchValueListReadOnly="false"/>
@@ -852,7 +852,7 @@ sap.ui.define([
852
852
  * @extends sap.ui.core.UIComponent
853
853
  * @abstract
854
854
  * @author SAP SE
855
- * @version 1.114.1
855
+ * @version 1.114.3
856
856
  * @name sap.suite.ui.generic.template.lib.AppComponent
857
857
  */
858
858
  return UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -2996,7 +2996,7 @@ sap.ui.define(["sap/ui/base/Object",
2996
2996
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
2997
2997
  * @public
2998
2998
  * @extends sap.ui.base.Object
2999
- * @version 1.114.1
2999
+ * @version 1.114.3
3000
3000
  * @since 1.30.0
3001
3001
  * @alias sap.suite.ui.generic.template.lib.NavigationController
3002
3002
  */
@@ -67,8 +67,8 @@ sap.ui.define([
67
67
  }
68
68
  return aRet;
69
69
  }
70
- // possibly a bug in the UI5 framework itself .. getCurrentContexts() for UITable only returns the contexts of selected rows in the table
71
- return bIsUiTable ? oListBinding.getContexts() : oListBinding.getCurrentContexts();
70
+
71
+ return oListBinding.getAllCurrentContexts();
72
72
  }
73
73
 
74
74
  function fnGetModel() {
@@ -38,7 +38,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/core/library','sap/fe/placeholder/lib
38
38
  interfaces: [],
39
39
  controls: [],
40
40
  elements: [],
41
- version: "1.114.1",
41
+ version: "1.114.3",
42
42
  extensions: {
43
43
  //Configuration used for rule loading of Support Assistant
44
44
  "sap.ui.support": {