@sapui5/sap.suite.ui.generic.template 1.128.1 → 1.129.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 (42) 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/Component.js +0 -2
  4. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +1 -1
  5. package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
  6. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  7. package/src/sap/suite/ui/generic/template/ListReport/Component.js +0 -2
  8. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties +4 -4
  9. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  10. package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +5 -7
  11. package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageSortingHandler.js +7 -0
  12. package/src/sap/suite/ui/generic/template/ObjectPage/controller/PasteHandler.js +28 -0
  13. package/src/sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/InlineCreationRowsHelper.js +1 -1
  14. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  15. package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +0 -11
  16. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +6 -6
  17. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  18. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  19. package/src/sap/suite/ui/generic/template/designtime/ObjectPage.designtime.js +11 -2
  20. package/src/sap/suite/ui/generic/template/fragments/ContactDetails.fragment.xml +0 -1
  21. package/src/sap/suite/ui/generic/template/fragments/SmartControlContextMenu.fragment.xml +6 -0
  22. package/src/sap/suite/ui/generic/template/genericUtilities/utils.js +48 -39
  23. package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +19 -3
  24. package/src/sap/suite/ui/generic/template/js/AnnotationHelperHiddenTermSupport.js +6 -12
  25. package/src/sap/suite/ui/generic/template/js/preparationHelper.js +3 -0
  26. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +16 -26
  27. package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +1 -3
  28. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +78 -10
  29. package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +6 -1
  30. package/src/sap/suite/ui/generic/template/lib/ComponentUtils.js +6 -8
  31. package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +23 -67
  32. package/src/sap/suite/ui/generic/template/lib/FlexibleColumnLayoutHandler.js +2 -1
  33. package/src/sap/suite/ui/generic/template/lib/ShareUtils.js +24 -5
  34. package/src/sap/suite/ui/generic/template/lib/insights/InsightsCardHelper.js +4 -5
  35. package/src/sap/suite/ui/generic/template/lib/insights/InsightsFECardProvider.js +30 -0
  36. package/src/sap/suite/ui/generic/template/lib/insights/InsightsHandler.js +38 -33
  37. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +91 -13
  38. package/src/sap/suite/ui/generic/template/library.js +1 -1
  39. package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +3 -1
  40. package/src/sap/suite/ui/generic/template/manifestMerger/ChangePageConfiguration.js +50 -6
  41. package/src/sap/suite/ui/generic/template/manifestMerger/MergerUtil.js +4 -3
  42. package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.128.1",
3
+ "version": "1.129.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.128.1</version>
10
+ <version>1.129.0</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -298,7 +298,6 @@ sap.ui.define(["sap/ui/core/mvc/OverrideExecution",
298
298
  oVariants[sKey].tableSettings = preparationHelper.getNormalizedTableSettings(oMetaModel, oVariants[sKey], Device, sEntitySet, oExtensions && oExtensions.Actions, oLineItem);
299
299
  //default value of selectAll is different for LR/ALP from OP hence it is not calculated in preparationHelper but separately in respective components.
300
300
  oVariants[sKey].tableSettings.selectAll = (oVariants[sKey].tableSettings.selectAll === undefined ? false : oVariants[sKey].tableSettings.selectAll);
301
- oComponentUtils.adjustCopyButtonSettings(oVariants[sKey].tableSettings);
302
301
 
303
302
  if (oAlpSettings.isResponsiveTable === undefined){
304
303
  oAlpSettings.isResponsiveTable = oVariants[sKey].tableSettings.type === "ResponsiveTable";
@@ -323,7 +322,6 @@ sap.ui.define(["sap/ui/core/mvc/OverrideExecution",
323
322
  oAlpSettings.tableSettings = preparationHelper.getNormalizedTableSettings(oMetaModel, oSettings, Device, sLeadingEntitySet,oExtensions && oExtensions.Actions, oLineItem);
324
323
  //default value of selectAll is different for LR/ALP from OP hence it is not calculated in preparationHelper but separately in respective components.
325
324
  oAlpSettings.tableSettings.selectAll = (oAlpSettings.tableSettings.selectAll === undefined ? false : oAlpSettings.tableSettings.selectAll);
326
- oComponentUtils.adjustCopyButtonSettings(oAlpSettings.tableSettings);
327
325
  oAlpSettings.isResponsiveTable = oAlpSettings.tableSettings.type === "ResponsiveTable";
328
326
  if (oAlpSettings.tableSettings.enableMultiEditDialog && oAlpSettings.isResponsiveTable && !oComponentUtils.isDraftEnabled() && !oAlpSettings.isWorklist && !oComponent.getAppComponent().getFlexibleColumnLayout()) {
329
327
  oAlpSettings.multiEdit = true;
@@ -339,7 +339,7 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
339
339
  return {
340
340
  serviceUrl: sServiceUrl,
341
341
  icon: oUIManifest && oUIManifest.icons ? oUIManifest.icons.icon : "",
342
- title: oAppManifest ? oAppManifest.title : "",
342
+ shellTitle: oAppManifest ? oAppManifest.title : "",
343
343
  isShareInJamActive: !!fnGetUser && fnGetUser().isJamActive(),
344
344
  customUrl: ShareUtils.getCustomUrl(),
345
345
  currentUrl: sCurrentUrl
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.128.1"
11
+ "version": "1.129.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.128.1"
11
+ "version": "1.129.0"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -394,7 +394,6 @@ sap.ui.define(["sap/ui/core/mvc/OverrideExecution",
394
394
  } else if (oLrSettings.isResponsiveTable !== (oVariant.tableSettings.type === "ResponsiveTable")) {
395
395
  throw new FeError(sClassName, "Variant with key " + sKey + " resulted in invalid Table Type combination. Please check documentation and update manifest.json.");
396
396
  }
397
- oComponentUtils.adjustCopyButtonSettings(oVariant.tableSettings);
398
397
  fnAdjustSelectAll(oVariant.tableSettings);
399
398
  var oVariantEntityType = oMetaModel.getODataEntityType(oEntitySet.entityType);
400
399
  if (oVariantEntityType && oVariantEntityType.property && oVariant.tableSettings && oVariant.tableSettings.createWithParameterDialog) {
@@ -421,7 +420,6 @@ sap.ui.define(["sap/ui/core/mvc/OverrideExecution",
421
420
  //for single variant
422
421
  oLrSettings.tableSettings = preparationHelper.getNormalizedTableSettings(oMetaModel, oSettings, Device, sLeadingEntitySet, oExtensionActions, oLineItemDefault);
423
422
  oLrSettings.isResponsiveTable = oLrSettings.tableSettings.type === "ResponsiveTable";
424
- oComponentUtils.adjustCopyButtonSettings(oLrSettings.tableSettings);
425
423
  fnAdjustSelectAll(oLrSettings.tableSettings);
426
424
  if (oLrSettings.tableSettings.multiEdit) {
427
425
  oMultiEditSettings = getMultiEditSettings(undefined, oLrSettings, oLeadingEntitySet, oEntityType);
@@ -113,13 +113,13 @@ DISCARD=Discard
113
113
  # XFLD,20: used during deletion of a draft
114
114
  DELETE=Delete
115
115
 
116
- # XFLD,30: used in message toast after saving.
116
+ # XFLD,50: used in message toast after saving.
117
117
  OBJECT_SAVED=Your changes have been saved
118
118
 
119
- # XFLD,30: used in message toast after saving. if no changes have been made.
119
+ # XFLD,50: used in message toast after saving. if no changes have been made.
120
120
  OBJECT_NOT_MODIFIED=You haven\u2019t made any changes
121
121
 
122
- # XFLD,30: Not used, as of now
122
+ # XFLD,40: Not used, as of now
123
123
  OBJECT_CREATED=Object was created.
124
124
 
125
125
  # XTIT,30: title of popover displayed when a user tries to open a locked object (in DraftAdminDataPopover.fragment.xml)
@@ -187,7 +187,7 @@ CREATE_DIALOG_TITLE=New Object
187
187
  # YMSG,30: used in MessageBox after partial update.
188
188
  PARTIAL_UPDATE={0} of {1} objects updated.
189
189
 
190
- # YMSG,150: used to show the applied filters which are no longer visible.
190
+ # YMSG,200: used to show the applied filters which are no longer visible.
191
191
  MESSAGE_FILTER_NOT_AVAILABLE=Filters have been applied to the current view \"{0}\" that are no longer visible: {1}. Contact your administrator to make the filters visible again.
192
192
 
193
193
  #---End of final block: texts to be redefined by the application ----------------------------------------
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.128.1"
11
+ "version": "1.129.0"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -2256,6 +2256,10 @@ sap.ui.define([
2256
2256
  var oCardProviderInstance = oTemplateUtils.oServices.oInsightsFECardProvider && oTemplateUtils.oServices.oInsightsFECardProvider.getCardProviderInsightsInstance();
2257
2257
 
2258
2258
  oState.oDTCardHelper = new DTCardHelper(oController);
2259
+
2260
+ if (oCardProviderInstance) {
2261
+ oTemplateUtils.oServices.oInsightsFECardProvider.fnRegisterComponentForProvider(oState.oInsightsHandler, oController.getView().getId());
2262
+ }
2259
2263
 
2260
2264
  oTemplateUtils.oComponentUtils.attach(oController, "PageDataLoaded", function (oEvent) {
2261
2265
  var aStreamEnabledAssociatedEntities = oTemplateUtils.oComponentUtils.getParameterModelForTemplating().getObject("/templateSpecific/streamEnabledAssociatedEntites");
@@ -2268,13 +2272,7 @@ sap.ui.define([
2268
2272
  var oStreamDataSelf = oTemplateUtils.oCommonUtils.getStreamData(null, oEvent.context);
2269
2273
  oTemplateUtils.oCommonUtils.setStreamData(oStreamDataSelf);
2270
2274
  oTemplateUtils.oComponentUtils.hidePlaceholder();
2271
-
2272
- if (oCardProviderInstance) {
2273
- oTemplateUtils.oServices.oInsightsFECardProvider.fnRegisterComponentForProvider(oState.oInsightsHandler, oController.getView().getId());
2274
- oState.oInsightsHandler.getCardsToShare("DT_CARD").then(function (aShareCards) {
2275
- oCardProviderInstance.onViewUpdate(true, aShareCards);
2276
- });
2277
- }
2275
+
2278
2276
  });
2279
2277
  var oMenuButton = oController.byId(StableIdHelper.getStableId({
2280
2278
  type: "ObjectPageAction",
@@ -318,6 +318,13 @@ sap.ui.define([
318
318
  var sTitle = aGroupers[0].getTitle();
319
319
  var oTable = aGroupers[1];
320
320
  var sTableHeader = oTable.getHeader();
321
+ var oSubSection = aGroupers[0].getSubSections();
322
+ if (oSubSection.length === 1) {
323
+ if (oSubSection[0] && oSubSection[0].getBlocks().concat(oSubSection[0].getMoreBlocks()).length === 1) {
324
+ // Check if the subsection contains only one control
325
+ return sTableHeader;
326
+ }
327
+ }
321
328
  return oTemplateUtils.oCommonUtils.getText("MESSAGE_GROUP_TABLE", [sTitle, sTableHeader]);
322
329
  }
323
330
  }
@@ -154,6 +154,33 @@ sap.ui.define([
154
154
  });
155
155
  }
156
156
 
157
+ /**
158
+ * function will remove NonInsertableProperties propeties from record need to be added.
159
+ *
160
+ * @param {*} oSmartTable smart table object instance
161
+ * @param {*} aNewRecords List of new records to be added.
162
+ */
163
+ function removeNonInsertableProperties(oSmartTable, aNewRecords) {
164
+ var set = new Set();
165
+ var sEntitySet = oSmartTable.getEntitySet();
166
+ var oModel = oSmartTable.getModel();
167
+ var oMetaModel = oModel.getMetaModel();
168
+ var oEntitySet = oMetaModel.getODataEntitySet(sEntitySet);
169
+ var aNonInsertableProp = oEntitySet['Org.OData.Capabilities.V1.InsertRestrictions'] && oEntitySet['Org.OData.Capabilities.V1.InsertRestrictions'].NonInsertableProperties;
170
+ if (!aNonInsertableProp || !aNonInsertableProp.length) {
171
+ return;
172
+ }
173
+ for (var i = 0; i < aNonInsertableProp.length; i++) {
174
+ set.add(aNonInsertableProp[i].PropertyPath);
175
+ }
176
+ for (var i = 0; i < aNewRecords.length; i++) {
177
+ for (var property in aNewRecords[i].value) {
178
+ if (set.has(property)) {
179
+ delete aNewRecords[i].value[property];
180
+ }
181
+ }
182
+ }
183
+ }
157
184
 
158
185
  // Add new draft rows to the table.
159
186
  function addNewEntry(oEvent, aNewRecords, sSmartTableId) {
@@ -163,6 +190,7 @@ sap.ui.define([
163
190
  var oSmartTable = oEvent.getSource();
164
191
  var oAddEntry = getCreateButtonForTable(oSmartTable);
165
192
  var oEventSource = oAddEntry || oSmartTable;
193
+ removeNonInsertableProperties(oSmartTable, aNewRecords);
166
194
  if (aNewRecords.length) {
167
195
  var DraftSavedState = sap.m.DraftIndicatorState.Saved, iParsedDataLength = aNewRecords.length; //Indicator for the footer
168
196
 
@@ -356,7 +356,7 @@ sap.ui.define([
356
356
 
357
357
  var bIsCreationAllowedByPath = fnIsCreationAllowedByBoolAndPathRestrictions(oSmartTable);
358
358
  var bTableHasCreationRows = fnDoesTableHaveCreationRows(oItemsBinding);
359
- if (bIsLengthFinal && oItemsBinding.isResolved() && bIsCreationAllowedByPath && !bTableHasCreationRows) { // no inline creation rows have been added yet
359
+ if (bIsLengthFinal && oItemsBinding.isResolved() && bIsCreationAllowedByPath && !bTableHasCreationRows && !oItemsBinding.bIsBeingDestroyed) { // no inline creation rows have been added yet
360
360
  // for responsive table, the very first creation is at the start and the following at the end
361
361
  createInactiveLineItem(oItemsBinding, oDefaultValues, !bResponsiveTable);
362
362
  // Hide navigation and delete controls on inactive rows
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.128.1"
9
+ "version": "1.129.0"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -301,24 +301,13 @@ sap.ui.define([
301
301
  oResult.variantManagement = !(oSettings.tableSettings && oSettings.tableSettings.variantManagement) || oSettings.tableSettings.variantManagement;
302
302
  //default value of selectAll is different for OP from LR/ALP hence it is not calculated in preparationHelper but separately in respective components.
303
303
  oResult.selectAll = !oSettings.tableSettings || oSettings.tableSettings.selectAll !== false;
304
- var bCopySettingsDefinedInManifest = true;
305
- if (oResult.copy === undefined) { // means it's not defined in the manifest
306
- bCopySettingsDefinedInManifest = false;
307
- oResult.copy = oResult.type !== "ResponsiveTable" || (oResult.mode !== "None" && !oResult.inlineDelete);
308
- }
309
304
  // if selection is only needed for delete (button in toolbar), it should be only set when deletion is actually possible
310
305
  // in draft, deletion is possible only in edit case, in non-draft, only in display case
311
306
  if (oResult.onlyForDelete) {
312
307
  if (oComponentUtils.isDraftEnabled()) {
313
308
  oResult.mode = "{= ${ui>/editable} ? '" + oResult.mode + "' : 'None'}";
314
- if (!bCopySettingsDefinedInManifest) {
315
- oResult.copy = "{= ${ui>/editable} ? " + oResult.copy + " : false}";
316
- }
317
309
  } else {
318
310
  oResult.mode = "{= ${ui>/editable} ? 'None' : '" + oResult.mode + "'}";
319
- if (!bCopySettingsDefinedInManifest) {
320
- oResult.copy = "{= ${ui>/editable} ? false : " + oResult.copy + "}";
321
- }
322
311
  }
323
312
  }
324
313
  var oEntitySet = oMetaModel.getODataEntitySet(sEntitySet);
@@ -40,7 +40,7 @@
40
40
  hideText="false"
41
41
  press="{deleteAction>press}"
42
42
  importance="Medium"
43
- type="Default"
43
+ type="Ghost"
44
44
  fesr:press="fe:delete"
45
45
  ariaHasPopup="{deleteAction>ariaHasPopup}"
46
46
  visible="{= ${deleteAction>visible} || ${parts: [{path: 'entitySet>Org.OData.Capabilities.V1.DeleteRestrictions'}, {path: 'entitySet>'}, {path: 'appSettings>/'}, {path: 'parameter>/treeNode'}], formatter: 'AHActionButtons.getDeleteActionButtonVisibility'} }" />
@@ -62,7 +62,7 @@
62
62
  text="{= ${path: 'dataField>Label'} ? ${path: 'dataField>Label', formatter: 'AHModel.format'} : '{i18n>COPY}'}"
63
63
  hideText="false"
64
64
  press="{parts: [{path: 'dataField>'}, {path: 'actionId>value'}], formatter: 'AHActionButtons.getCallAction'}"
65
- type="Default"
65
+ type="Ghost"
66
66
  fesr:press="fe:copy"
67
67
  visible="{parts: [{path: 'action>sap:applicable-path'}, {path: 'entitySet>entityType'}, {path: 'dataField>'}, {path: 'parameter>/isDraftEnabled'}], formatter: 'AHActionButtons.getDatafieldForActionVisibility'}"
68
68
  enabled="{ui>/enabled}"
@@ -80,13 +80,13 @@
80
80
  <uxap:ObjectPageHeaderActionButton
81
81
  id="{:= ${parameter>/stableId}.getStableId({type: 'ObjectPageAction', subType: 'DisplayActiveVersion'})}" text="{i18n>DISPLAY_ACTIVE_VERSION}"
82
82
  visible="{= ${HasActiveEntity} &amp;&amp; !${IsActiveEntity} }"
83
- type="Default" hideText="false" importance="Medium" enabled="{ui>/enabled}"
83
+ type="Ghost" hideText="false" importance="Medium" enabled="{ui>/enabled}"
84
84
  press="._templateEventHandlers.onEditAndActiveToggle">
85
85
  </uxap:ObjectPageHeaderActionButton>
86
86
  <uxap:ObjectPageHeaderActionButton
87
87
  id="{:= ${parameter>/stableId}.getStableId({type: 'ObjectPageAction', subType: 'ContinueEditing'})}" text="{i18n>CONTINUE_EDITING}"
88
88
  visible="{= ${HasDraftEntity} &amp;&amp; ${IsActiveEntity} &amp;&amp; ${DraftAdministrativeData/DraftIsCreatedByMe} }"
89
- type="Default" hideText="false" importance="Medium" enabled="{ui>/enabled}"
89
+ type="Ghost" hideText="false" importance="Medium" enabled="{ui>/enabled}"
90
90
  press="._templateEventHandlers.onEditAndActiveToggle">
91
91
  </uxap:ObjectPageHeaderActionButton>
92
92
  </template:if>
@@ -115,7 +115,7 @@
115
115
  visible="{path: 'customAction>applicablePath', formatter: 'AHActionButtons.getActionControlBreakoutVisibility'}"
116
116
  hideText="false"
117
117
  importance="Medium"
118
- type="Default">
118
+ type="Ghost">
119
119
  </uxap:ObjectPageHeaderActionButton>
120
120
  </template:if>
121
121
  </template:repeat>
@@ -137,7 +137,7 @@
137
137
  text="{i18n>RELATED_APPS}"
138
138
  hideText="false"
139
139
  importance="Medium"
140
- type="Default"
140
+ type="Ghost"
141
141
  ariaHasPopup="Dialog"
142
142
  fesr:press="fe:relatedApps"
143
143
  press="._templateEventHandlers.onRelatedApps"
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.128.1"
9
+ "version": "1.129.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.128.1"
9
+ "version": "1.129.0"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -141,16 +141,25 @@ sap.ui.define(["sap/suite/ui/generic/template/designtime/utils/designtimeHelper"
141
141
  }
142
142
  }
143
143
  },
144
+ "sap.ui.layout.VerticalLayout": {
145
+ actions: ["remove"]
146
+ },
147
+ "sap.ui.layout.HorizontalLayout": {
148
+ actions: ["remove"]
149
+ },
144
150
  "sap.uxap.ObjectPageHeaderActionButton": {
145
151
  actions: ["remove", "reveal"]
146
152
  },
147
- "sap.uxap.AnchorBar": {
153
+ "sap.m.IconTabHeader": {
148
154
  aggregations: {
149
- content: {
155
+ items: {
150
156
  actions: ["move"] // needed to allow moving sections also from anchorBar
151
157
  }
152
158
  }
153
159
  },
160
+ "sap.m.IconTabFilter": {
161
+ actions: ["remove", "reveal", "rename", "getResponsibleElement", "actionsFromResponsibleElement"]
162
+ },
154
163
  "sap.m.Button": {
155
164
  actions: ["remove", "reveal", "rename", "getResponsibleElement", "actionsFromResponsibleElement"]
156
165
  /* rename needed to allow renaming of sections (but should not harm also for other buttons
@@ -6,7 +6,6 @@
6
6
  id="quickView-popover"
7
7
  class="sapUiContentPadding"
8
8
  placement="Auto"
9
- initialFocus="action"
10
9
  showHeader="false"
11
10
  contentWidth="20rem"
12
11
  afterClose="afterClose"
@@ -12,6 +12,12 @@
12
12
  press="._templateEventHandlers.onContextMenu($event, '{smartControlId>id}')"/>
13
13
  </items>
14
14
  </MenuItem>
15
+ <template:if test="{parts: [{path: 'listEntitySet>name'}, {path: 'parameter>/settings/subPages/'}, {path: 'facet>Target/AnnotationPath'}], formatter: 'AH.getDisplayNavigationIntent'}">
16
+ <customData>
17
+ <core:CustomData key="CrossNavigation"
18
+ value="{parts: [{path: 'listEntitySet>name'}, {path: 'parameter>/settings/subPages/'}, {path: 'facet>Target/AnnotationPath'}], formatter: 'AH.getDisplayNavigationIntent'}" />
19
+ </customData>
20
+ </template:if>
15
21
  </Menu>
16
22
  </template:with>
17
23
  </core:FragmentDefinition>
@@ -2,50 +2,59 @@
2
2
  sap.ui.define([], function() {
3
3
  "use strict";
4
4
 
5
- // If images are included in the UI app they need to specify the path relatively (e.g. images/image.jpg) to support
6
- // different platforms like ABAP and HCP. The relative path has to be used because the absolute paths differ from platform
7
- // to platform. The rule is if the image url doesn't start with a / or sap-icon:// or http(s):// then it's a relative url and the absolute
8
- // path has to be added by the framework. This path can be retrieved with sap.ui.require.toUrl and the component name.
9
- function fnAdjustImageUrlPath(sImageUrl, sAppComponentName, bSuppressIcons) {
10
- if (!sImageUrl) {
11
- return "";
12
- }
13
- var bIsIcon = sImageUrl.startsWith("sap-icon://");
14
- if (bSuppressIcons && bIsIcon) {
15
- return "";
16
- }
17
- if (bIsIcon || sImageUrl.startsWith("/") || sImageUrl.startsWith("http://") || sImageUrl.startsWith("https://")) {
18
- return sImageUrl; // Absolute URL, nothing has to be changed
19
- }
20
- // Relative URL, has to be adjusted
21
- return sap.ui.require.toUrl(sAppComponentName.replace(/\./g, "/")) + "/" + sImageUrl; //replacing dots by slashes before calling sap.ui.require.toUrl method. com.xyz.abc to com/xyz/abc
5
+ // If images are included in the UI app they need to specify the path relatively (e.g. images/image.jpg) to support
6
+ // different platforms like ABAP and HCP. The relative path has to be used because the absolute paths differ from platform
7
+ // to platform. The rule is if the image url doesn't start with a / or sap-icon:// or http(s):// then it's a relative url and the absolute
8
+ // path has to be added by the framework. This path can be retrieved with sap.ui.require.toUrl and the component name.
9
+ function fnAdjustImageUrlPath(sImageUrl, sAppComponentName, bSuppressIcons) {
10
+ if (!sImageUrl) {
11
+ return "";
22
12
  }
13
+ var bIsIcon = sImageUrl.startsWith("sap-icon://");
14
+ if (bSuppressIcons && bIsIcon) {
15
+ return "";
16
+ }
17
+ if (bIsIcon || sImageUrl.startsWith("/") || sImageUrl.startsWith("http://") || sImageUrl.startsWith("https://")) {
18
+ return sImageUrl; // Absolute URL, nothing has to be changed
19
+ }
20
+ // Relative URL, has to be adjusted
21
+ return sap.ui.require.toUrl(sAppComponentName.replace(/\./g, "/")) + "/" + sImageUrl; //replacing dots by slashes before calling sap.ui.require.toUrl method. com.xyz.abc to com/xyz/abc
22
+ }
23
23
 
24
- // Function check is B array values is a subset of A array values.
25
- // A = [], B = ["1", "2", "3"] -> true
26
- // A = ["4"], B = ["1", "2", "3"] -> false
27
- // A = ["1"], B = ["1", "2", "3"] -> true
28
- // A = ["1", "3"], B = ["1", "2", "3"] -> true
29
- // A = ["3", "2", "1"], B = ["1", "2", "3"] -> true
30
- // A = ["1", "4"], B = ["1", "2", "3"] -> false
31
- // A = ["1", "2", "3", "4"], B = ["1", "2", "3"] -> false
32
- function fnIsASubsetOfB(a, b) {
33
- if (a === b) {
34
- return true;
35
- }
36
- if (!a || !b) {
37
- return false;
38
- }
39
- if (a.length > b.length) {
40
- return false;
41
- }
42
- return a.every(function(entry) {
43
- return b.includes(entry);
44
- });
24
+ // Function check is B array values is a subset of A array values.
25
+ // A = [], B = ["1", "2", "3"] -> true
26
+ // A = ["4"], B = ["1", "2", "3"] -> false
27
+ // A = ["1"], B = ["1", "2", "3"] -> true
28
+ // A = ["1", "3"], B = ["1", "2", "3"] -> true
29
+ // A = ["3", "2", "1"], B = ["1", "2", "3"] -> true
30
+ // A = ["1", "4"], B = ["1", "2", "3"] -> false
31
+ // A = ["1", "2", "3", "4"], B = ["1", "2", "3"] -> false
32
+ function fnIsASubsetOfB(a, b) {
33
+ if (a === b) {
34
+ return true;
35
+ }
36
+ if (!a || !b) {
37
+ return false;
45
38
  }
39
+ if (a.length > b.length) {
40
+ return false;
41
+ }
42
+ return a.every(function(entry) {
43
+ return b.includes(entry);
44
+ });
45
+ }
46
+
47
+ // Function to check if a string contains only ASCII characters only. Regular expression
48
+ // used consider [SPACE] to ~ (ASCII 32 to 126) printable ASCII characters. Control characters
49
+ // (ASCII 0 to 31) and DEL character (ASCII 127) are not considered as they could not be part
50
+ // of the string. Method returns true if the string contains only ASCII characters else false.
51
+ function fnIsASCII(sString) {
52
+ return /^[\x20-\x7E]*$/.test(sString);
53
+ }
46
54
 
47
55
  return {
48
56
  adjustImageUrlPath: fnAdjustImageUrlPath,
49
- isASubsetOfB: fnIsASubsetOfB
57
+ isASubsetOfB: fnIsASubsetOfB,
58
+ isASCII: fnIsASCII
50
59
  };
51
60
  });
@@ -461,6 +461,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
461
461
  var oContextSet = oInterface.getInterface(0);
462
462
  var oModel = oInterface.getInterface(1).getModel();
463
463
  // p13nData for Semantically Connected Columns
464
+ var sLeadingPropertyForSCColumn = "";
464
465
  var aNavigationPropertiesForSCColumn = [];
465
466
  var aAdditionalPropertiesForSCColumn = [];
466
467
  var aAdditionalSortPropertiesForSCColumn = [];
@@ -511,9 +512,15 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
511
512
  oP13N = JSON.parse(sP13N.replace(/\\/g, ""));
512
513
  }
513
514
 
514
- oP13N.leadingProperty && (aAdditionalPropertiesForSCColumn.indexOf(oP13N.leadingProperty) === -1) ? aAdditionalPropertiesForSCColumn.push(oP13N.leadingProperty) : Function.prototype;
515
- oP13N.leadingProperty && (aAdditionalSortPropertiesForSCColumn.indexOf(oP13N.leadingProperty) === -1) ? aAdditionalSortPropertiesForSCColumn.push(oP13N.leadingProperty) : Function.prototype;
516
-
515
+ // Make the first data field's "leadingProperty" as column's "leadingProperty"
516
+ // Add the remaining leading properties into "additionalProperty" and "additionalSortingProperty"
517
+ if (!sLeadingPropertyForSCColumn && oP13N.leadingProperty) {
518
+ sLeadingPropertyForSCColumn = oP13N.leadingProperty;
519
+ } else {
520
+ oP13N.leadingProperty && (aAdditionalPropertiesForSCColumn.indexOf(oP13N.leadingProperty) === -1) ? aAdditionalPropertiesForSCColumn.push(oP13N.leadingProperty) : Function.prototype;
521
+ oP13N.leadingProperty && (aAdditionalSortPropertiesForSCColumn.indexOf(oP13N.leadingProperty) === -1) ? aAdditionalSortPropertiesForSCColumn.push(oP13N.leadingProperty) : Function.prototype;
522
+ }
523
+
517
524
  oP13N.navigationProperty && (aNavigationPropertiesForSCColumn.indexOf(oP13N.navigationProperty) === -1) ? aNavigationPropertiesForSCColumn.push(oP13N.navigationProperty) : Function.prototype;
518
525
  // Add "additionalProperty" of current data field to the "additionalProperty" of current column's p13n
519
526
  oP13N.additionalProperty && (aAdditionalPropertiesForSCColumn.indexOf(oP13N.additionalProperty) === -1) ? aAdditionalPropertiesForSCColumn.push(oP13N.additionalProperty) : Function.prototype;
@@ -533,6 +540,15 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
533
540
 
534
541
  sP13N += '", "filterProperty":"' + "";
535
542
 
543
+ // Add the leading property to "leadingProperty" and "sortProperty" of p13n
544
+ //
545
+ // IMPORTANT: Please don't remove the "leadingProperty" from p13nData.
546
+ // If it's removed, the column won't appear in exported excel.
547
+ if (sLeadingPropertyForSCColumn) {
548
+ sP13N += '", "leadingProperty":"' + sLeadingPropertyForSCColumn;
549
+ sP13N += '", "sortProperty":"' + sLeadingPropertyForSCColumn;
550
+ }
551
+
536
552
  if (aNavigationPropertiesForSCColumn.length > 0) {
537
553
  sP13N += '", "navigationProperty":"' + aNavigationPropertiesForSCColumn.join();
538
554
  }
@@ -4,11 +4,6 @@ sap.ui.define([
4
4
  ], function (isEmptyObject, AnnotationHelper) {
5
5
  "use strict";
6
6
 
7
- var oHiddenColumnInfo = {
8
- staticHiddenColumns: [],
9
- columnKeyToCellHiddenPath: undefined
10
- };
11
-
12
7
  /*
13
8
  * This method is called in the initialization and dataReceived phase of the specified SmartTable.
14
9
  * It handles everything which can be done regarding hiding columns at this point in time.
@@ -28,16 +23,15 @@ sap.ui.define([
28
23
  });
29
24
  var sLineItemSuffix = (oCustomDataForLineItemQualifier && oCustomDataForLineItemQualifier.getValue()) ? ("#" + oCustomDataForLineItemQualifier.getValue()) : "";
30
25
  var aDataFields = oEntityType["com.sap.vocabularies.UI.v1.LineItem" + sLineItemSuffix] || [];
31
-
26
+
32
27
  var aStaticHiddenColumns = []; // list of keys of columns that are always hidden
33
28
  var mColumnKeyToDynamicHiddenPath = Object.create(null); // map of column keys to pathes that determine whether the column is shown
34
-
29
+
35
30
  aDataFields.forEach(fnAnalyzeColumnHideInfoForDataField.bind(null, aStaticHiddenColumns, mColumnKeyToDynamicHiddenPath, oMetaModel, oEntityType));
36
- if (!isEmptyObject(mColumnKeyToDynamicHiddenPath) || aStaticHiddenColumns.length) { // if there is at least one column with hide info we store this analysis in the info object
37
- oHiddenColumnInfo.staticHiddenColumns = aStaticHiddenColumns;
38
- oHiddenColumnInfo.columnKeyToCellHiddenPath = mColumnKeyToDynamicHiddenPath;
39
- }
40
- return oHiddenColumnInfo;
31
+ return {
32
+ staticHiddenColumns: aStaticHiddenColumns,
33
+ columnKeyToCellHiddenPath: mColumnKeyToDynamicHiddenPath
34
+ };
41
35
  }
42
36
 
43
37
  /*
@@ -21,6 +21,9 @@ sap.ui.define([
21
21
  oSettings.tableSettings.inlineDelete = !!oSettings.tableSettings.inlineDelete;
22
22
  oSettings.tableSettings.multiSelect = !!oSettings.tableSettings.multiSelect;
23
23
  oSettings.tableSettings.selectionLimit = oSettings.tableSettings.selectionLimit || 200;
24
+ if (oSettings.tableSettings.copy === undefined) { // means it's not defined in the manifest
25
+ oSettings.tableSettings.copy = true;
26
+ }
24
27
 
25
28
  var oEntitySet = oMetaModel.getODataEntitySet(sEntitySet);
26
29
  var oEntityType = oMetaModel.getODataEntityType(oEntitySet.entityType);