@sapui5/sap.suite.ui.generic.template 1.120.15 → 1.120.17

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.120.15",
3
+ "version": "1.120.17",
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.120.15</version>
10
+ <version>1.120.17</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.120.15"
11
+ "version": "1.120.17"
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.120.15"
11
+ "version": "1.120.17"
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.120.15"
11
+ "version": "1.120.17"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -388,16 +388,23 @@ sap.ui.define([
388
388
  var oBindingParams = oEvent.getParameter("bindingParams");
389
389
  if (oBindingParams.filters && oBindingParams.filters.length) {
390
390
  /*
391
- * Add a new filter condition to always show all items that are just created. In case we are in a draft,
392
- * that just means to add "or HasActiveEntity = false". For active documents however, that condition
393
- * would always be true. Thus, we have to add
394
- * "or (HasActiveEntity = false and IsActiveEntity = false)".
395
- * However, this condition is not evaluated correctly by gateway, so we have to transform it to
396
- * (IsActiveEntity = true and x) or (Is ActiveEntity = false and (x or HasActiveEntity = false)),
397
- * where x is the condition provided by the user
391
+ *Handling of the filter condition during edit or display:
392
+ * Add a new filter condition to always show all items that are just created. In case we are in a draft,
393
+ * that just means to add "or HasActiveEntity = false". For active documents however, that condition
394
+ * would always be true. Thus, we have to add
395
+ * "or (HasActiveEntity = false and IsActiveEntity = false)".
396
+ * However, this condition is not evaluated correctly by gateway, so we have to transform it to
397
+ * (IsActiveEntity = true and x) or (Is ActiveEntity = false and (x or HasActiveEntity = false)),
398
+ * where x is the condition provided by the user
399
+
400
+ * Handling of the filter condition during create:
401
+ * checking the value of dispaly Mode , iDisplayMode = 4 for create
402
+ * if it is a create the filter condition evaluates to the user filter x
398
403
  */
399
404
  var oUserFilter = FilterProcessor.groupFilters(oBindingParams.filters);
400
- if (!oEvent.getParameter("messageFilterActive")) {
405
+ var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
406
+ var iDisplayMode = oTemplatePrivateModel.getProperty("/objectPage/displayMode");
407
+ if (!oEvent.getParameter("messageFilterActive") && !(iDisplayMode === 4) ){
401
408
  oBindingParams.filters = new Filter({
402
409
  filters: [
403
410
  new Filter({
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.120.15"
9
+ "version": "1.120.17"
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.120.15"
9
+ "version": "1.120.17"
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.120.15"
9
+ "version": "1.120.17"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -5,13 +5,13 @@ sap.ui.define([
5
5
  /**
6
6
  * Constructor for SmartTableChartCommon
7
7
  * ...
8
- * @param {object} mParams
8
+ * @param {object} mParams
9
9
  * @param mParams.oCustomFiltersWrapper - wrapper for custom filters (from SFB point of view)
10
- * (currently containing: generic (currently only editState), app extension, and adaptation extension - but this is knowledge of LR, i.e. of iAppStateHandler, not of SFB)
11
- * @returns
10
+ * (currently containing: generic (currently only editState), app extension, and adaptation extension - but this is knowledge of LR, i.e. of iAppStateHandler, not of SFB)
11
+ * @returns {object}
12
12
  */
13
13
 
14
- // deals with state of SFB itself, without SVM (see SmartVariantManagementWrapper) and go-button
14
+ // deals with state of SFB itself, without SVM (see SmartVariantManagementWrapper) and go-button
15
15
  // (does not contain a state from SFB point of view - however, we remember whether it was pressed once
16
16
  // to restore data - this information is not considered being part of SFB)
17
17
  function SmartTableChartCommon(vTarget, oController, oFactory, sInitializationEvent) {
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  function fnSetState(oState) {
45
45
  if (oState) {
46
46
  if (!oState.oUiState) {
47
- // Legacy handling for state without additional level oUiState (created with 1.99.0 - 1.99.3). Could be relevant on LR and OP, and independent of VM
47
+ // Legacy handling for state without additional level oUiState (created with 1.99.0 - 1.99.3). Could be relevant on LR and OP, and independent of VM
48
48
  oState = {
49
49
  oUiState: oState
50
50
  };
@@ -90,32 +90,38 @@ sap.ui.define([
90
90
  function fnGetState() {
91
91
  if (bSmartControlInitialized) {
92
92
  if (oVariantManagementStateWrapper) {
93
- // oVariantManagementStateWrapper would be undefined only in cases SmartControl is not yet initialized
94
- // or VariantManagement is not enabled.
93
+ // oVariantManagementStateWrapper would be undefined only in cases SmartControl is not yet initialized
94
+ // or VariantManagement is not enabled.
95
95
  return oVariantManagementStateWrapper.getState();
96
96
  }
97
-
97
+
98
98
  if (oSmartControlStateWrapper && !bVariantManagementActive) {
99
- // VariantManagement is not turned on & SmartControlStateWrapper instance
99
+ // VariantManagement is not turned on & SmartControlStateWrapper instance
100
100
  return oSmartControlStateWrapper.getState();
101
101
  }
102
102
  }
103
-
104
- // Control is not available and StateWrapper is not initialized
103
+
104
+ // Control is not available and StateWrapper is not initialized
105
105
  return oPreliminaryState;
106
106
  }
107
107
 
108
108
  function fnSetState(oState) {
109
109
  oPreliminaryState = oState;
110
110
  oControlAssignedPromise.then(function () {
111
- // map legacy states - before separating VM state from state of managed control, inner state information
112
- // (presentation variant and selection variant) were put as oUiState on the same level as VM state
111
+ // map legacy states - before separating VM state from state of managed control, inner state information
112
+ // (presentation variant and selection variant) were put as oUiState on the same level as VM state
113
113
  // information (variant id and dirty indicator), now they are contained in map managedControlStates
114
- if (oState && oState.oUiState && !oState.managedControlStates){
115
- oState.managedControlStates = Object.create(null);
116
- oState.managedControlStates[oSmartControlStateWrapper.getLocalId()] = {oUiState: oState.oUiState};
117
- oState.modified = oState.bVariantModified;
118
- oState.variantId = oState.sVariantId;
114
+ if (oState){
115
+ if (oState.oUiState && !oState.managedControlStates) {
116
+ oState.managedControlStates = Object.create(null);
117
+ oState.managedControlStates[oSmartControlStateWrapper.getLocalId()] = {oUiState: oState.oUiState};
118
+ }
119
+ if (oState.bVariantModified !== undefined) {
120
+ oState.modified = oState.bVariantModified;
121
+ }
122
+ if (oState.sVariantId !== undefined) {
123
+ oState.variantId = oState.sVariantId;
124
+ }
119
125
  }
120
126
 
121
127
  if (bVariantManagementActive) {
@@ -124,7 +130,7 @@ sap.ui.define([
124
130
  return;
125
131
  }
126
132
 
127
- // SmartTable/Chart shall be used
133
+ // SmartTable/Chart shall be used
128
134
  oSmartControlStateWrapper.setState(oPreliminaryState);
129
135
  });
130
136
  }
@@ -155,7 +161,7 @@ sap.ui.define([
155
161
  // in each case) -thus, we better create and return a vm wrapper here, passing the inner wrapper (the same, we would create in the other cases).
156
162
  // Additionally, this simplifies the adaptation to the change of format (formerly, variant data and control data were mixed on same level)
157
163
 
158
- // to identify the situation, check properties smartVariant and useVariantManagement. (In LR/ALP, we could directly check component settings controlling these properties, but not
164
+ // to identify the situation, check properties smartVariant and useVariantManagement. (In LR/ALP, we could directly check component settings controlling these properties, but not
159
165
  // in OP, as they could be different per section. Checking control's properties would also incorporate UI changes, however, these properties are anyway not allowed to be changed.)
160
166
  // values: smartVariant useVariantManagement
161
167
  // a) null false on LR currently: truthy (id of VM) and true - but PageVM is not created, and thus being ignored => adapt how properties are set in xml
@@ -922,7 +922,7 @@ sap.ui.define([
922
922
  * @extends sap.ui.core.UIComponent
923
923
  * @abstract
924
924
  * @author SAP SE
925
- * @version 1.120.15
925
+ * @version 1.120.17
926
926
  * @name sap.suite.ui.generic.template.lib.AppComponent
927
927
  */
928
928
  return UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -4,7 +4,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
4
4
 
5
5
  var oRejectedPromise = Promise.reject();
6
6
  oRejectedPromise.catch(Function.prototype);
7
-
7
+
8
8
  function createNonDraft(oParentContext, sBindingPath, oModel, vPredefinedValues, bMakeRequestsCanonical) {
9
9
  var oCreateContext = oModel.createEntry(sBindingPath, {
10
10
  properties: vPredefinedValues,
@@ -184,7 +184,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
184
184
  MessageUtils.handleTransientMessages(oTemplateContract);
185
185
  });
186
186
  };
187
-
187
+
188
188
  var fnPropertyChanged = function(oEvent){
189
189
  oTemplateContract.oTemplatePrivateGlobalModel.setProperty("/generic/draftIndicatorState", sap.m.DraftIndicatorState.Clear);
190
190
 
@@ -242,7 +242,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
242
242
  var oEditEntityPromise = oTransactionController.editEntity(oContext, false, sRootExpand);
243
243
  resolve(oEditEntityPromise);
244
244
  // The active context is invalidated as the DraftAdministrativeData of the context(the active context) has changed after draft creation.
245
- // This is done to keep the DraftAdministrativeData of the record updated.
245
+ // This is done to keep the DraftAdministrativeData of the record updated.
246
246
  oEditEntityPromise.then(function(){
247
247
  oModel.invalidateEntry(oContext);
248
248
  });
@@ -331,8 +331,8 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
331
331
  oTemplateContract.oBusyHelper.setBusy(oRet, true);
332
332
  return oRet;
333
333
  }
334
-
335
- /*
334
+
335
+ /*
336
336
  Allows direct edit on the entires on the list, unlike the method 'edit'above, this method first edit the entry with preserveChanges as true
337
337
  If the response indicates an unsaved change or locked record, a corresponding dialog is shown to proceed or cancel with the edit.
338
338
  */
@@ -346,7 +346,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
346
346
  oViewDependencyHelper.setRootPageToDirty();
347
347
  resolve({
348
348
  context: oResponse.context
349
- });
349
+ });
350
350
  }, function(oResponse) {
351
351
  if (oResponse && oResponse.response && oResponse.response.statusCode === "409") {
352
352
  //remove transient message associated with rc 409 in order to prevent message pop-up
@@ -364,7 +364,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
364
364
  oViewDependencyHelper.setRootPageToDirty();
365
365
  resolve({
366
366
  context: oResponse.context
367
- });
367
+ });
368
368
  });
369
369
  oApplication.getBusyHelper().setBusy(oUnsavedChangesEditPromise, true);
370
370
  };
@@ -393,7 +393,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
393
393
  });
394
394
  return oPromise;
395
395
  }
396
-
396
+
397
397
  function deleteEntity(oDraftController, fnExecuteDelete, oApplicationProxy, oContext, bIsActiveEntity, sActionType){
398
398
  var bHasActiveEntity = oDraftController.hasActiveEntity(oContext);
399
399
  var oSiblingPromise = bHasActiveEntity && !bIsActiveEntity ? oApplicationProxy.getDraftSiblingPromise(oContext) : Promise.resolve();
@@ -404,10 +404,10 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
404
404
  return { context: oActive };
405
405
  };
406
406
  var oCancellationPromise = oDeletePromise.then(fnTransformActiveContext);
407
- oApplicationProxy.cancellationStarted(oContext, oCancellationPromise, sActionType, oActive);
407
+ oApplicationProxy.cancellationStarted(oContext, oCancellationPromise, sActionType, oActive);
408
408
  }
409
409
  return oDeletePromise;
410
- });
410
+ });
411
411
  }
412
412
 
413
413
  function discardDraft(oDraftController, oTransactionController, oApplicationProxy, oContext){
@@ -416,7 +416,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
416
416
  };
417
417
  return deleteEntity(oDraftController, fnExecuteDelete, oApplicationProxy, oContext, false, "discardAction");
418
418
  }
419
-
419
+
420
420
  function fnGetMessagesFromContextFilter(oContextFilter, oMessageManager, bExcludeETagMessages) {
421
421
  var oMessageModel = oMessageManager.getMessageModel();
422
422
  var oMessageBinding = oMessageModel.bindList("/", null, null, [oContextFilter]); // Note: It is necessary to create this binding each time, since UI5 does not update it (because there is no change handler)
@@ -425,7 +425,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
425
425
  });
426
426
  if (bExcludeETagMessages){
427
427
  aRet = aRet.filter(function(oMessage){
428
- return !MessageUtils.isMessageETagMessage(oMessage);
428
+ return !MessageUtils.isMessageETagMessage(oMessage);
429
429
  });
430
430
  }
431
431
  return aRet;
@@ -479,7 +479,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
479
479
  // In case 2 and 3 it is expected that at least one of those messages is an error message.
480
480
  // Note that in case 2 and possibly also in case 1 we need to suppress the generic error message (like "An exception has occurred") which is coming as a transient message to
481
481
  // indicate that the activation request has failed.
482
- // Note that case 3 has 2 subcases
482
+ // Note that case 3 has 2 subcases
483
483
  // 3a) Some severe technical error has happened which even prevented the Preparation call to be executed successfully
484
484
  // 3b) The Preparation call was successful and did not find any reason which prevents activation. However, the call of activation failed.
485
485
  // Note that this failure may still be because of business reasons (excluding reasons named in case 1) or technical reasons.
@@ -526,12 +526,12 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
526
526
  var bHasStateError = aCurrentStateMessages.some(function(oMessage) {
527
527
  return oMessage.type === "Error";
528
528
  });
529
- var bIsWarning = bIs412 && !bHasStateError;
529
+ var bHasStateWarning = aCurrentStateMessages.some(function(oMessage) {
530
+ return oMessage.type === "Warning";
531
+ });
532
+ var bIsWarning = bIs412 && !bHasStateError && (!!aTransientWarnings.length || bHasStateWarning);
530
533
  if (bIsWarning) {
531
534
  // Only show transient warnings in the confirmation popup if no state warning is available (note that backend sometimes sends warnings redundantly as transient and state message)
532
- var bHasStateWarning = aCurrentStateMessages.some(function(oMessage) {
533
- return oMessage.type === "Warning";
534
- });
535
535
  var aMessagesForUserDecision = bHasStateWarning ? aCurrentStateMessages : aTransientWarnings;
536
536
  var oCustomMessageProvider = aCurrentStateMessages.length === 0 && { // if confirmation popup is to show transient messages these messages should be excluded from the
537
537
  isCustomMessage: function (oMessage) { // normal handling of transient messages (until the confirmation popup is closed)
@@ -541,7 +541,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
541
541
  if (oCustomMessageProvider){
542
542
  oServices.oApplication.registerCustomMessageProvider(oCustomMessageProvider);
543
543
  }
544
- oServices.oApplication.removeTransientMessages();
544
+ oServices.oApplication.removeTransientMessages();
545
545
  var fnOnConfirmationPopupClose = function(bConfirmed){
546
546
  if (oCustomMessageProvider){ // if transient messages have been shown in the confirmation popup they can be removed from the message model when the confirmation popup is closed
547
547
  oServices.oApplication.deregisterCustomMessageProvider(oCustomMessageProvider);
@@ -581,7 +581,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
581
581
  oBusyHelper.setBusy(oGetSiblingPromise);
582
582
  oGetSiblingPromise.then(fnActivate.bind(null, false));
583
583
  });
584
-
584
+
585
585
  oBusyHelper.setBusy(oActivationStartedPromise);
586
586
  });
587
587
  return oRet;
@@ -3051,7 +3051,7 @@ sap.ui.define(["sap/ui/base/Object",
3051
3051
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
3052
3052
  * @public
3053
3053
  * @extends sap.ui.base.Object
3054
- * @version 1.120.15
3054
+ * @version 1.120.17
3055
3055
  * @since 1.30.0
3056
3056
  * @alias sap.suite.ui.generic.template.lib.NavigationController
3057
3057
  */
@@ -60,7 +60,7 @@ sap.ui.define([
60
60
  interfaces: [],
61
61
  controls: [],
62
62
  elements: [],
63
- version: "1.120.15",
63
+ version: "1.120.17",
64
64
  extensions: {
65
65
  //Configuration used for rule loading of Support Assistant
66
66
  "sap.ui.support": {