@sapui5/sap.fe.templates 1.99.0 → 1.100.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 (67) hide show
  1. package/package.json +4 -2
  2. package/src/sap/fe/templates/.library +1 -1
  3. package/src/sap/fe/templates/ListReport/Component.js +7 -1
  4. package/src/sap/fe/templates/ListReport/ListReport.view.xml +22 -21
  5. package/src/sap/fe/templates/ListReport/ListReportController.controller.js +13 -18
  6. package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.xml +3 -3
  7. package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +50 -9
  8. package/src/sap/fe/templates/ObjectPage/Component.js +1 -12
  9. package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +5 -1
  10. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +50 -17
  11. package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +7 -1
  12. package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +3 -0
  13. package/src/sap/fe/templates/ObjectPage/view/fragments/CollaborationDraft.fragment.xml +36 -0
  14. package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +1 -1
  15. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderFacet.fragment.xml +1 -0
  16. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderFacetCustomContainer.fragment.xml +1 -0
  17. package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +3 -1
  18. package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +3 -1
  19. package/src/sap/fe/templates/library.js +1 -1
  20. package/src/sap/fe/templates/messagebundle_ar.properties +0 -15
  21. package/src/sap/fe/templates/messagebundle_bg.properties +0 -15
  22. package/src/sap/fe/templates/messagebundle_ca.properties +0 -15
  23. package/src/sap/fe/templates/messagebundle_cs.properties +0 -15
  24. package/src/sap/fe/templates/messagebundle_cy.properties +0 -15
  25. package/src/sap/fe/templates/messagebundle_da.properties +0 -15
  26. package/src/sap/fe/templates/messagebundle_de.properties +0 -15
  27. package/src/sap/fe/templates/messagebundle_el.properties +0 -15
  28. package/src/sap/fe/templates/messagebundle_en.properties +0 -15
  29. package/src/sap/fe/templates/messagebundle_en_GB.properties +0 -15
  30. package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +0 -15
  31. package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +0 -15
  32. package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +0 -15
  33. package/src/sap/fe/templates/messagebundle_es.properties +0 -15
  34. package/src/sap/fe/templates/messagebundle_es_MX.properties +0 -15
  35. package/src/sap/fe/templates/messagebundle_et.properties +0 -15
  36. package/src/sap/fe/templates/messagebundle_fi.properties +0 -15
  37. package/src/sap/fe/templates/messagebundle_fr.properties +0 -15
  38. package/src/sap/fe/templates/messagebundle_fr_CA.properties +0 -15
  39. package/src/sap/fe/templates/messagebundle_hi.properties +0 -15
  40. package/src/sap/fe/templates/messagebundle_hr.properties +0 -15
  41. package/src/sap/fe/templates/messagebundle_hu.properties +0 -15
  42. package/src/sap/fe/templates/messagebundle_id.properties +0 -15
  43. package/src/sap/fe/templates/messagebundle_it.properties +0 -15
  44. package/src/sap/fe/templates/messagebundle_iw.properties +0 -15
  45. package/src/sap/fe/templates/messagebundle_ja.properties +0 -15
  46. package/src/sap/fe/templates/messagebundle_kk.properties +0 -15
  47. package/src/sap/fe/templates/messagebundle_ko.properties +0 -15
  48. package/src/sap/fe/templates/messagebundle_lt.properties +0 -15
  49. package/src/sap/fe/templates/messagebundle_lv.properties +0 -15
  50. package/src/sap/fe/templates/messagebundle_ms.properties +0 -15
  51. package/src/sap/fe/templates/messagebundle_nl.properties +0 -15
  52. package/src/sap/fe/templates/messagebundle_no.properties +0 -15
  53. package/src/sap/fe/templates/messagebundle_pl.properties +0 -15
  54. package/src/sap/fe/templates/messagebundle_pt.properties +0 -15
  55. package/src/sap/fe/templates/messagebundle_pt_PT.properties +0 -15
  56. package/src/sap/fe/templates/messagebundle_ro.properties +0 -15
  57. package/src/sap/fe/templates/messagebundle_ru.properties +0 -15
  58. package/src/sap/fe/templates/messagebundle_sh.properties +0 -15
  59. package/src/sap/fe/templates/messagebundle_sk.properties +0 -15
  60. package/src/sap/fe/templates/messagebundle_sl.properties +0 -15
  61. package/src/sap/fe/templates/messagebundle_sv.properties +0 -15
  62. package/src/sap/fe/templates/messagebundle_th.properties +0 -15
  63. package/src/sap/fe/templates/messagebundle_tr.properties +0 -15
  64. package/src/sap/fe/templates/messagebundle_uk.properties +0 -15
  65. package/src/sap/fe/templates/messagebundle_vi.properties +0 -15
  66. package/src/sap/fe/templates/messagebundle_zh_CN.properties +0 -15
  67. package/src/sap/fe/templates/messagebundle_zh_TW.properties +0 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.fe.templates",
3
- "version": "1.99.0",
3
+ "version": "1.100.0",
4
4
  "description": "SAPUI5 Library sap.fe.templates",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -8,16 +8,18 @@
8
8
  "scripts": {
9
9
  "build": "tsc -v && tsc --project tsconfig-build.json",
10
10
  "prepare-npm-sources": "babel target/npm-sources/src --out-dir target/npm-sources/src --extensions \".ts\" --config-file ../../.babelrc",
11
+ "prepare-ts-class-doc": "ts-node ../../docbuilder/prepareTSClassDoc sap.fe.templates",
11
12
  "prepare-ui5-build-sources": "mkdirp target/ui5-build-tmp/src && babel src --out-dir target/ui5-build-tmp/src --extensions \".ts\" --config-file ../../.babelrc && babel test --out-dir target/ui5-build-tmp/test --extensions \".ts\" --config-file ../../.babelrc",
12
13
  "test": "jest --maxWorkers=4",
13
14
  "test-refs": "jest --runInBand --config jest.config-refs.js",
14
- "test-updateSnapshots": "jest --runInBand -u"
15
+ "test-updateSnapshots": "jest --maxWorkers=4 -u"
15
16
  },
16
17
  "keywords": [
17
18
  "sapui5",
18
19
  "ui5"
19
20
  ],
20
21
  "devDependencies": {
22
+ "@sap-ux/jest-mock-ui5": "2.0.5",
21
23
  "ts-node": "^9.1.1",
22
24
  "@babel/cli": "^7.14.8",
23
25
  "@ui5/cli": "^2.14.0",
@@ -6,7 +6,7 @@
6
6
  <copyright>SAP UI development toolkit for HTML5 (SAPUI5)
7
7
  (c) Copyright 2009-2021 SAP SE. All rights reserved
8
8
  </copyright>
9
- <version>1.99.0</version>
9
+ <version>1.100.0</version>
10
10
 
11
11
  <documentation>UI5 library: sap.fe.templates</documentation>
12
12
 
@@ -24,7 +24,13 @@ sap.ui.define(
24
24
  views: {
25
25
  type: "object"
26
26
  },
27
-
27
+ /**
28
+ * Flag to determine whether the iconTabBar is in sticky mode
29
+ */
30
+ stickyMultiTabHeader: {
31
+ type: "boolean",
32
+ defaultValue: true
33
+ },
28
34
  /**
29
35
  * KPIs to display
30
36
  */
@@ -24,6 +24,7 @@
24
24
  <f:DynamicPage
25
25
  id="fe::ListReport"
26
26
  unittest:id="listReportFooterTest"
27
+ stickySubheaderProvider="{converterContext>stickySubheaderProvider}"
27
28
  customData:singleTableId="{converterContext>singleTableId}"
28
29
  customData:singleChartId="{converterContext>singleChartId}"
29
30
  customData:filterBarId="{converterContext>filterBarId}"
@@ -157,26 +158,26 @@
157
158
  <f:DynamicPageHeader pinnable="{converterContext>showPinnableToggle}">
158
159
  <VBox>
159
160
  <macroInternal:FilterBar
160
- unittest:id="listReportFilterBarTest"
161
- id="{converterContext>filterBarId}"
162
- _applyIdToContent="true"
163
- contextPath="{entityType>}"
164
- variantBackreference="{= CORE.getVariantBackReference(${viewData>}, ${converterContext>} )}"
165
- selectionFields="{filterBarContext>selectionFields}"
166
- propertyInfo="{filterBarContext>propertyInfo}"
167
- filterChanged=".handlers.onFiltersChanged"
168
- filterConditions="{parts:[{path:'converterContext>filterConditions'}, {path:'entitySet>'}], formatter: 'FILTER.getFilterConditions'}"
169
- search=".handlers.onSearch"
170
- hideBasicSearch="{filterBarContext>hideBasicSearch}"
171
- liveMode="{viewData>/liveMode}"
172
- showAdaptFiltersButton="true"
173
- p13nMode="Item,Value"
174
- useSemanticDateRange="{converterContext>useSemanticDateRange}"
175
- suspendSelection="true"
176
- toggleControlId="{= ${converterContext>/filterLayout} === 'compactvisual' ? ID.generate([ ${converterContext>filterBarId}, 'LayoutToggle']) : undefined }"
177
- initialLayout="{= ${converterContext>/filterLayout} === 'compactvisual' ? ${converterContext>/filterInitialLayout} : undefined }"
178
- stateChanged=".handlers.onStateChanged"
179
- />
161
+ unittest:id="listReportFilterBarTest"
162
+ id="{converterContext>filterBarId}"
163
+ _applyIdToContent="true"
164
+ contextPath="{entityType>}"
165
+ variantBackreference="{= CORE.getVariantBackReference(${viewData>}, ${converterContext>} )}"
166
+ selectionFields="{filterBarContext>selectionFields}"
167
+ propertyInfo="{filterBarContext>propertyInfo}"
168
+ filterChanged=".handlers.onFiltersChanged"
169
+ filterConditions="{parts:[{path:'converterContext>filterConditions'}, {path:'entitySet>'}], formatter: 'FILTER.getFilterConditions'}"
170
+ search=".handlers.onSearch"
171
+ hideBasicSearch="{filterBarContext>hideBasicSearch}"
172
+ liveMode="{viewData>/liveMode}"
173
+ showAdaptFiltersButton="true"
174
+ p13nMode="Item,Value"
175
+ useSemanticDateRange="{converterContext>useSemanticDateRange}"
176
+ suspendSelection="true"
177
+ toggleControlId="{= ${converterContext>/filterLayout} === 'compactvisual' ? ID.generate([ ${converterContext>filterBarId}, 'LayoutToggle']) : undefined }"
178
+ initialLayout="{= ${converterContext>/filterLayout} === 'compactvisual' ? ${converterContext>/filterInitialLayout} : undefined }"
179
+ stateChanged=".handlers.onStateChanged"
180
+ />
180
181
  </VBox>
181
182
  </f:DynamicPageHeader>
182
183
  </template:with>
@@ -185,7 +186,7 @@
185
186
  </f:header>
186
187
  <f:content>
187
188
  <template:if test="{= ${converterContext>views}.length > 0}">
188
- <template:if test="{= ${converterContext>views}.length > 1 &amp;&amp; !${converterContext>hasMultiVisualizations} }">
189
+ <template:if test="{converterContext>displayMultiVisualizations}">
189
190
  <template:then>
190
191
  <core:Fragment fragmentName="sap.fe.templates.ListReport.view.fragments.MultipleMode" type="XML" />
191
192
  </template:then>
@@ -556,8 +556,10 @@ sap.ui.define(
556
556
  * @param {sap.ui.mdc.FilterBar} oFilterBar MDC filter bar
557
557
  */
558
558
  _updateMultiTabNotApplicableFields: function(oInternalModelContext, oFilterBar) {
559
+ var that = this;
559
560
  var mCache = {};
560
561
  var ignoredFields = {},
562
+ ignoredFieldsTitle = {},
561
563
  aTables = this._getControls("table"),
562
564
  aCharts = this._getControls("Chart");
563
565
  aTables.forEach(function(oTable) {
@@ -567,11 +569,16 @@ sap.ui.define(
567
569
  .getParent()
568
570
  .getParent()
569
571
  .getKey(),
572
+ sTabTitle = oTable
573
+ .getParent()
574
+ .getParent()
575
+ .getText(),
570
576
  sCacheKey = sTableEntitySet + (oTable.data("enableAnalytics") === "true" ? "Analytical" : "Regular");
571
577
  if (!mCache[sCacheKey]) {
572
578
  mCache[sCacheKey] = FilterUtils.getNotApplicableFilters(oFilterBar, oTable);
573
579
  }
574
580
  ignoredFields[sTabId] = mCache[sCacheKey];
581
+ ignoredFieldsTitle[sTabId] = that.formatters.setTabMessageStrip.call(that, mCache[sCacheKey], sTabTitle);
575
582
  });
576
583
  aCharts.forEach(function(oChart) {
577
584
  var sChartEntityPath = oChart.data("targetCollectionPath"),
@@ -580,13 +587,19 @@ sap.ui.define(
580
587
  .getParent()
581
588
  .getParent()
582
589
  .getKey(),
590
+ sTabTitle = oChart
591
+ .getParent()
592
+ .getParent()
593
+ .getText(),
583
594
  sCacheKey = sChartEntitySet + "Chart";
584
595
  if (!mCache[sCacheKey]) {
585
596
  mCache[sCacheKey] = FilterUtils.getNotApplicableFilters(oFilterBar, oChart);
586
597
  }
587
598
  ignoredFields[sTabId] = mCache[sCacheKey];
599
+ ignoredFieldsTitle[sTabId] = that.formatters.setTabMessageStrip.call(that, mCache[sCacheKey], sTabTitle);
588
600
  });
589
601
  oInternalModelContext.setProperty("tabs/ignoredFields", ignoredFields);
602
+ oInternalModelContext.setProperty("tabs/ignoredFieldsTitle", ignoredFieldsTitle);
590
603
  },
591
604
  /**
592
605
  * Method to update the local UI model of the page with the fields that are not applicable to the filter bar (this is specific to the ALP scenario).
@@ -992,24 +1005,6 @@ sap.ui.define(
992
1005
  }
993
1006
  },
994
1007
  formatters: {
995
- isDraftIndicatorVisible: function(
996
- sPropertyPath,
997
- sSemanticKeyHasDraftIndicator,
998
- HasDraftEntity,
999
- IsActiveEntity,
1000
- hideDraftInfo
1001
- ) {
1002
- if (
1003
- IsActiveEntity !== undefined &&
1004
- HasDraftEntity !== undefined &&
1005
- (!IsActiveEntity || HasDraftEntity) &&
1006
- !hideDraftInfo
1007
- ) {
1008
- return sPropertyPath === sSemanticKeyHasDraftIndicator;
1009
- } else {
1010
- return false;
1011
- }
1012
- },
1013
1008
  /**
1014
1009
  * Method to set the message text for the multiple entity sets when fields in the FilterBar need to be ignored.
1015
1010
  *
@@ -8,7 +8,7 @@
8
8
  <IconTabBar
9
9
  expandable="false"
10
10
  headerMode="Inline"
11
- id="fe::TabMultipleMode"
11
+ id="{converterContext>iconTabBarId}"
12
12
  select=".handlers.onTabMultiModeChange"
13
13
  stretchContentHeight="true"
14
14
  customData:showCounts="{converterContext>showTabCounts}"
@@ -29,12 +29,12 @@
29
29
  </template:then>
30
30
  <template:else>
31
31
  <MessageStrip
32
- text="{= '{parts: [{path: \'internal>tabs/ignoredFields/' + (${view>tableControlId} || ${view>chartControlId}) + '\'}, {path: \'\', value: \'' + ${view>title} + '\' }], formatter: \'.formatters.setTabMessageStrip\'}' }"
32
+ text="{= '{= (${internal>tabs/ignoredFieldsTitle/' + (${view>tableControlId} || ${view>chartControlId}) + '} ) }' }"
33
33
  type="Information"
34
34
  showIcon="true"
35
35
  showCloseButton="true"
36
36
  class="sapUiSmallMargin"
37
- visible="{= '{= (${internal>tabs/ignoredFields/' +(${view>tableControlId} || ${view>chartControlId}) + '} || []).length>0 }' }"
37
+ visible="{= '{= (${internal>tabs/ignoredFields/' + (${view>tableControlId} || ${view>chartControlId}) + '} || []).length>0 }' }"
38
38
  >
39
39
  </MessageStrip>
40
40
  <core:Fragment fragmentName="sap.fe.templates.ListReport.view.fragments.CollectionVisualization" type="XML" />
@@ -164,22 +164,22 @@ sap.ui.define(
164
164
  bReadOnly = bReadOnly || oFieldControl == "com.sap.vocabularies.Common.v1.FieldControlType/ReadOnly";
165
165
  }
166
166
  if (bReadOnly) {
167
- return false;
168
- } else {
169
167
  return true;
168
+ } else {
169
+ return false;
170
170
  }
171
171
  },
172
- isReadOnlyFromDynamicAnnotations: function(oFieldControl) {
172
+ readOnlyExpressionFromDynamicAnnotations: function(oFieldControl) {
173
173
  var sIsFieldControlPathReadOnly;
174
174
  if (oFieldControl) {
175
175
  if (ManagedObject.bindingParser(oFieldControl)) {
176
- sIsFieldControlPathReadOnly = "$" + oFieldControl + " === '1'";
176
+ sIsFieldControlPathReadOnly = "%" + oFieldControl + " === 1 ";
177
177
  }
178
178
  }
179
179
  if (sIsFieldControlPathReadOnly) {
180
180
  return "{= " + sIsFieldControlPathReadOnly + "? false : true }";
181
181
  } else {
182
- return true;
182
+ return;
183
183
  }
184
184
  },
185
185
  /*
@@ -312,16 +312,57 @@ sap.ui.define(
312
312
  /*
313
313
  * Get visiblity for editable header facet.
314
314
  *
315
+ * If either the title or description field from the header annotations are editable, then the
316
+ * editable header facet is visible.
317
+ *
315
318
  * @function
316
319
  * @param {object} [oAnnotations] Annotations object for given entity set
317
320
  * @param {object} [oFieldControl] field control
318
321
  * returns {*} binding expression or boolean value resolved form funcitons isReadOnlyFromStaticAnnotations and isReadOnlyFromDynamicAnnotations
319
322
  */
320
- getVisiblityOfHeaderFacet: function(oAnnotations, oFieldControl) {
321
- return (
322
- AnnotationHelper.isReadOnlyFromStaticAnnotations(oAnnotations, oFieldControl) &&
323
- AnnotationHelper.isReadOnlyFromDynamicAnnotations(oFieldControl)
323
+ getVisiblityOfHeaderFacet: function(
324
+ oTitleAnnotations,
325
+ oDescriptionAnnotations,
326
+ oFieldTitleFieldControl,
327
+ oFieldDescriptionFieldControl
328
+ ) {
329
+ // Check Annotations for Title Field
330
+ var bIsTitleReadOnly = AnnotationHelper.isReadOnlyFromStaticAnnotations(oTitleAnnotations, oFieldTitleFieldControl);
331
+ var titleExpression = AnnotationHelper.readOnlyExpressionFromDynamicAnnotations(oFieldTitleFieldControl);
332
+ // There is no expression and the title is not ready only, this is sufficient for an editable header
333
+ if (!bIsTitleReadOnly && !titleExpression) {
334
+ return true;
335
+ }
336
+
337
+ // Check Annotations for Description Field
338
+ var bIsDescriptionReadOnly = AnnotationHelper.isReadOnlyFromStaticAnnotations(
339
+ oDescriptionAnnotations,
340
+ oFieldDescriptionFieldControl
324
341
  );
342
+ var descriptionExpression = AnnotationHelper.readOnlyExpressionFromDynamicAnnotations(oFieldDescriptionFieldControl);
343
+ // There is no expression and the description is not ready only, this is sufficient for an editable header
344
+ if (!bIsDescriptionReadOnly && !descriptionExpression) {
345
+ return true;
346
+ }
347
+
348
+ // Both title and description are not editable and there are no dynamic annotations
349
+ if (bIsTitleReadOnly && bIsDescriptionReadOnly && !titleExpression && !descriptionExpression) {
350
+ return false;
351
+ }
352
+
353
+ // Now combine expressions
354
+ if (titleExpression && !descriptionExpression) {
355
+ return titleExpression;
356
+ } else if (!titleExpression && descriptionExpression) {
357
+ return descriptionExpression;
358
+ } else {
359
+ return AnnotationHelper.combineTitleAndDescriptionExpression(oFieldTitleFieldControl, oFieldDescriptionFieldControl);
360
+ }
361
+ },
362
+ combineTitleAndDescriptionExpression: function(oTitleFieldControl, oDescriptionFieldControl) {
363
+ // If both header and title field are based on dynmaic field control, the editable header
364
+ // is visible if at least one of these is not ready only
365
+ return "{= %" + oTitleFieldControl + " === 1 ? ( %" + oDescriptionFieldControl + " === 1 ? false : true ) : true }";
325
366
  },
326
367
  /*
327
368
  * Get Expression of press event of delete button.
@@ -64,13 +64,6 @@ sap.ui.define(
64
64
  type: "boolean",
65
65
  defaultValue: true
66
66
  },
67
- /**
68
- * Calls draftPrepare on draftEdit
69
- */
70
- prepareOnEdit: {
71
- type: "boolean",
72
- defaultValue: false
73
- },
74
67
  /**
75
68
  * Defines the properties which can be used for inbound Navigation
76
69
  */
@@ -129,11 +122,7 @@ sap.ui.define(
129
122
  .finally(function() {
130
123
  that.DeferredContextCreated = false;
131
124
  })
132
- .catch(function() {
133
- // the creation failed or was aborted by the user - showing the object page doesn't make any sense
134
- // now - for now just use window.history.back to navigate back
135
- window.history.back();
136
- });
125
+ .catch(function() {});
137
126
  }
138
127
  },
139
128
 
@@ -91,6 +91,7 @@
91
91
  wrapping="true"
92
92
  />
93
93
  </template:if>
94
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.CollaborationDraft" type="XML" />
94
95
  </FlexBox>
95
96
  </uxap:expandedContent>
96
97
  <uxap:snappedContent>
@@ -101,13 +102,16 @@
101
102
  wrapping="true"
102
103
  />
103
104
  </template:if>
105
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.CollaborationDraft" type="XML" />
104
106
  </FlexBox>
105
107
  </uxap:snappedContent>
106
108
  <uxap:content>
107
109
  <template:if test="{entitySet>@com.sap.vocabularies.Common.v1.DraftRoot}">
108
110
  <macro:DraftIndicator DraftIndicatorType="IconOnly" class="sapUiTinyMarginBegin sapMTB sapMTBNewFlex" entitySet="{entitySet>}" />
109
111
  </template:if>
110
- <internal:SituationsIndicator xmlns:internal="sap.fe.macros.internal" entitySet="{entitySet>}" />
112
+ <template:if test="{header>situations}">
113
+ <internal:SituationsIndicator xmlns:internal="sap.fe.macros.internal" entitySet="{entitySet>}" />
114
+ </template:if>
111
115
  </uxap:content>
112
116
  <uxap:navigationActions>
113
117
  <template:if test="{= ${viewData>/viewLevel} > 1}">
@@ -43,7 +43,9 @@ sap.ui.define(
43
43
  "./overrides/Paginator",
44
44
  "sap/fe/core/controllerextensions/Placeholder",
45
45
  "sap/base/util/UriParameters",
46
- "sap/fe/core/controllerextensions/MassEdit"
46
+ "sap/fe/core/controllerextensions/MassEdit",
47
+ "sap/fe/core/actions/collaboration/ActivitySync",
48
+ "sap/fe/core/actions/collaboration/Manage"
47
49
  ],
48
50
  function(
49
51
  PageController,
@@ -84,7 +86,9 @@ sap.ui.define(
84
86
  PaginatorOverride,
85
87
  Placeholder,
86
88
  UriParameters,
87
- MassEdit
89
+ MassEdit,
90
+ collaborationActivitySync,
91
+ collaborationManage
88
92
  ) {
89
93
  "use strict";
90
94
 
@@ -559,6 +563,23 @@ sap.ui.define(
559
563
  // Compute Edit Mode
560
564
  oFinalUIState = this._editFlow.computeEditMode(oBindingContext);
561
565
 
566
+ if (ModelHelper.isCollaborationDraftSupported(oModel.getMetaModel())) {
567
+ oFinalUIState
568
+ .then(function() {
569
+ if (
570
+ that
571
+ .getView()
572
+ .getModel("ui")
573
+ .getProperty("/isEditable")
574
+ ) {
575
+ collaborationActivitySync.connect(that.getView());
576
+ }
577
+ })
578
+ .catch(function(oError) {
579
+ Log.error("Error while waiting for the final UI State", oError);
580
+ });
581
+ }
582
+
562
583
  // update related apps once Data is received in case of binding cache is not available
563
584
  // TODO: this is only a temp solution since we need to call _updateRelatedApps method only after data for Object Page is received (if there is no binding)
564
585
  if (oBindingContext.getBinding().oCache) {
@@ -750,27 +771,31 @@ sap.ui.define(
750
771
  Log.error(err);
751
772
  }
752
773
  var that = this;
753
- var oMessageButton = that.getView().byId("fe::FooterBar::MessageButton"),
754
- oMessagePopover = oMessageButton.oMessagePopover,
755
- oItemBinding = oMessagePopover.getBinding("items");
756
-
757
- if (oItemBinding.getLength() > 0 && !oMessagePopover.isOpen()) {
758
- oMessageButton.setVisible(true);
759
- // workaround to ensure that oMessageButton is rendered when openBy is called
760
- setTimeout(function() {
761
- oMessagePopover.openBy(oMessageButton);
762
- }, 0);
774
+ if (
775
+ !this.getAppComponent()
776
+ .getRootContainer()
777
+ .getCurrentPage()
778
+ .isA("sap.m.MessagePage")
779
+ ) {
780
+ var oMessageButton = that.getView().byId("fe::FooterBar::MessageButton"),
781
+ oMessagePopover = oMessageButton.oMessagePopover,
782
+ oItemBinding = oMessagePopover.getBinding("items");
783
+
784
+ if (oItemBinding.getLength() > 0 && !oMessagePopover.isOpen()) {
785
+ oMessageButton.setVisible(true);
786
+ // workaround to ensure that oMessageButton is rendered when openBy is called
787
+ setTimeout(function() {
788
+ oMessagePopover.openBy(oMessageButton);
789
+ }, 0);
790
+ }
763
791
  }
764
792
  return oRet;
765
793
  },
766
794
 
767
795
  _editDocument: function(oContext) {
768
- var oModel = this.getView().getModel("ui"),
769
- mParameters = {
770
- prepareOnEdit: this.getView().getViewData().prepareOnEdit
771
- };
796
+ var oModel = this.getView().getModel("ui");
772
797
  BusyLocker.lock(oModel);
773
- return this.editFlow.editDocument.apply(this.editFlow, [oContext, mParameters]).finally(function() {
798
+ return this.editFlow.editDocument.apply(this.editFlow, [oContext]).finally(function() {
774
799
  BusyLocker.unlock(oModel);
775
800
  });
776
801
  },
@@ -820,6 +845,14 @@ sap.ui.define(
820
845
  });
821
846
  },
822
847
 
848
+ _manageCollaboration: function() {
849
+ collaborationManage.openManageDialog(this.getView());
850
+ },
851
+
852
+ _showCollaborationUserDetails: function(event) {
853
+ collaborationManage.showUserDetails(event, this.getView());
854
+ },
855
+
823
856
  _cancelDocument: function(oContext, mParameters) {
824
857
  mParameters.cancelButton = this.getView().byId(mParameters.cancelButton); //to get the reference of the cancel button from command execution
825
858
  return this.editFlow.cancelDocument(oContext, mParameters);
@@ -17,6 +17,12 @@ sap.ui.define(
17
17
  */
18
18
  title: {
19
19
  type: "string"
20
+ },
21
+ /*
22
+ * Fallback title to be displayed if no title is available (only needed for displaying stashed header facets in Flex dialog)
23
+ */
24
+ fallbackTitle: {
25
+ type: "string"
20
26
  }
21
27
  },
22
28
  designtime: "sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime"
@@ -45,7 +51,7 @@ sap.ui.define(
45
51
  * Return the title property.
46
52
  */
47
53
  StashableHBox.prototype.getTitle = function() {
48
- return this.title;
54
+ return this.title || this.getFallbackTitle();
49
55
  };
50
56
 
51
57
  /*
@@ -7,6 +7,9 @@
7
7
  sap.ui.define([], function() {
8
8
  "use strict";
9
9
  return {
10
+ actions: {
11
+ remove: null
12
+ },
10
13
  aggregations: {
11
14
  items: {
12
15
  domRef: ":sap-domref",
@@ -0,0 +1,36 @@
1
+ <core:FragmentDefinition
2
+ xmlns:f="sap.f"
3
+ xmlns="sap.m"
4
+ xmlns:core="sap.ui.core"
5
+ xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
6
+ template:require="{
7
+ FE_MODEL: 'sap/fe/core/helpers/ModelHelper'
8
+ }"
9
+ >
10
+ <template:if test="{entitySet>@@FE_MODEL.isCollaborationDraftSupported}">
11
+ <!-- issues with rendering therefore using HBox for now
12
+ <AvatarGroup avatarDisplaySize="XS" groupType="Individual" visible="{ui>/isEditable}" items="{ui>/collaboration/activeUsers}">
13
+ <AvatarGroupItem initials="{ui>initials}" />
14
+ </AvatarGroup>
15
+ -->
16
+ <HBox
17
+ class="sapUiTinyMarginBegin"
18
+ items="{internal>/collaboration/activeUsers}"
19
+ visible="{= ${ui>/isEditable} &amp;&amp; ${internal>/collaboration/connected} }"
20
+ >
21
+ <f:Avatar initials="{internal>initials}" backgroundColor="Accent{internal>color}" displaySize="XS" press="._showCollaborationUserDetails" />
22
+ </HBox>
23
+
24
+ <template:if test="{entitySet>@com.sap.vocabularies.Common.v1.DraftRoot/ShareAction}">
25
+ <!-- For now the invite action is only shown on the root. we might provide it on all levels later as well -->
26
+ <!-- Button class="sapUiTinyMarginBegin" visible="{ui>/isEditable}" text="Invite" press="._manageCollaboration" / -->
27
+ <Avatar
28
+ visible="{ui>/isEditable}"
29
+ backgroundColor="TileIcon"
30
+ src="sap-icon://add-employee"
31
+ displaySize="XS"
32
+ press="._manageCollaboration"
33
+ />
34
+ </template:if>
35
+ </template:if>
36
+ </core:FragmentDefinition>
@@ -38,7 +38,7 @@
38
38
  unittest:id="HeaderInfoFormContainerTest"
39
39
  id="fe::EditableHeaderForm::EditableHeaderInfo"
40
40
  title="{sap.fe.i18n>T_COMMON_OBJECT_PAGE_OBJECT_INFO}"
41
- visible="{= OP.getVisiblityOfHeaderFacet(${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Title/Value/$Path@},${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Title/Value/$Path@@FIELD.fieldControl}) }"
41
+ visible="{= OP.getVisiblityOfHeaderFacet(${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Title/Value/$Path@},${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Description/Value/$Path@},${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Title/Value/$Path@@FIELD.fieldControl},${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Description/Value/$Path@@FIELD.fieldControl}) }"
42
42
  >
43
43
  <f:dependents>
44
44
  <macro:ValueHelp
@@ -23,6 +23,7 @@
23
23
  unittest:id="headerFacetContent"
24
24
  class="sapUiMediumMarginEnd sapUiSmallMarginBottom"
25
25
  visible="{converterHeaderFacet>visible}"
26
+ fallbackTitle="{headerFacet>@@MODEL.label}"
26
27
  binding="{= OP.getStashableHBoxBinding(${viewData>/controlConfiguration}, { Facet: ${converterHeaderFacet>} })}"
27
28
  stashed="{converterHeaderFacet>stashed}"
28
29
  >
@@ -20,6 +20,7 @@
20
20
  unittest:id="headerFacetContent"
21
21
  class="sapUiMediumMarginEnd sapUiSmallMarginBottom"
22
22
  visible="{converterHeaderFacet>visible}"
23
+ fallbackTitle="{converterHeaderFacet>title}"
23
24
  binding="{converterHeaderFacet>binding}"
24
25
  stashed="{converterHeaderFacet>stashed}"
25
26
  >
@@ -92,12 +92,14 @@ sap.ui.define(
92
92
  onRestore: function() {
93
93
  var oView = this.getView(),
94
94
  oNavContainer = oView.byId("appContent");
95
+ var oFCLController = this.getView().getController();
95
96
  var oInternalModel = oNavContainer.getModel("internal");
96
97
  var oPages = oInternalModel.getProperty("/pages");
97
98
 
98
99
  for (var sComponentId in oPages) {
99
100
  oInternalModel.setProperty("/pages/" + sComponentId + "/restoreStatus", "pending");
100
101
  }
102
+ oFCLController.onContainerReady();
101
103
  },
102
104
  onSuspend: function() {
103
105
  var oFCLController = this.getView().getController();
@@ -763,7 +765,7 @@ sap.ui.define(
763
765
  }, aRestorePromises);
764
766
  return Promise.all(aRestorePromises);
765
767
  },
766
-
768
+
767
769
  getRightmostContext: function() {
768
770
  var oContext;
769
771
  switch (this.getFclControl().getLayout()) {
@@ -45,13 +45,15 @@ sap.ui.define(
45
45
  },
46
46
  onRestore: function() {
47
47
  var oView = this.getView(),
48
- oNavContainer = oView.byId("appContent");
48
+ oNavContainer = oView.byId("appContent"),
49
+ oController = oView.getController();
49
50
  var oInternalModel = oNavContainer.getModel("internal");
50
51
  var oPages = oInternalModel.getProperty("/pages");
51
52
 
52
53
  for (var sComponentId in oPages) {
53
54
  oInternalModel.setProperty("/pages/" + sComponentId + "/restoreStatus", "pending");
54
55
  }
56
+ oController.onContainerReady();
55
57
  },
56
58
  onSuspend: function() {
57
59
  var oView = this.getView(),
@@ -47,7 +47,7 @@ sap.ui.define(
47
47
  interfaces: [],
48
48
  controls: [],
49
49
  elements: [],
50
- version: "1.99.0",
50
+ version: "1.100.0",
51
51
  noLibraryCSS: true
52
52
  });
53
53
  if (!sap.fe.templates.ObjectPage) {
@@ -136,18 +136,3 @@ T_OP_TABLE_AND_CHART_NO_DATA_TEXT_WITH_FILTER=\u0644\u0645 \u064A\u062A\u0645 \u
136
136
  T_SEGMENTED_BUTTON_TOOLTIP_VISUAL=\u0639\u0648\u0627\u0645\u0644 \u062A\u0635\u0641\u064A\u0629 \u0645\u0631\u0626\u064A\u0629
137
137
 
138
138
  T_SEGMENTED_BUTTON_TOOLTIP_COMPACT=\u0639\u0648\u0627\u0645\u0644 \u062A\u0635\u0641\u064A\u0629 \u0645\u0635\u063A\u0651\u064E\u0631\u0629
139
-
140
-
141
- T_MASS_EDIT_CONFIRM_MESSAGE=\u0644\u0627 \u064A\u0645\u0643\u0646 \u062A\u062D\u0631\u064A\u0631 {0} \u0645\u0646 {1} \u0645\u0646 \u0627\u0644\u0645\u0646\u062A\u062C\u0627\u062A.\n \u0647\u0644 \u062A\u0631\u064A\u062F \u062A\u062D\u0631\u064A\u0631 {2} \u0645\u0646 \u0627\u0644\u0645\u0646\u062A\u062C\u0627\u062A \u0627\u0644\u0645\u062A\u0628\u0642\u064A\u0629\u061F
142
-
143
- T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_HEADER=\u0627\u0644\u0623\u0633\u0628\u0627\u0628 \u0627\u0644\u0645\u062D\u062A\u0645\u0644\u0629
144
-
145
- T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_REASON=\u064A\u062A\u0645 \u0627\u0633\u062A\u0628\u0639\u0627\u062F \u0627\u0644\u0645\u0646\u062A\u062C\u0627\u062A \u0627\u0644\u0645\u062D\u062F\u062F\u0629 \u0625\u0630\u0627\:
146
-
147
- T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_REASON_DRAFT=\u0634\u062E\u0635 \u0645\u0627 \u064A\u0639\u0645\u0644 \u0639\u0644\u0649 \u0627\u0644\u0645\u0646\u062A\u062C (\u062A\u0648\u062C\u062F \u0645\u0633\u0648\u062F\u0629 \u0623\u0648 \u0644\u0645 \u064A\u062A\u0645 \u062D\u0641\u0638 \u0627\u0644\u062A\u063A\u064A\u064A\u0631\u0627\u062A).
148
-
149
- T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_REASON_NON_EDITABLE=\u0627\u0644\u062A\u062D\u0631\u064A\u0631 \u063A\u064A\u0631 \u0645\u0633\u0645\u0648\u062D \u0628\u0647 \u0644\u0644\u0645\u0646\u062A\u062C.
150
-
151
- T_MASS_EDIT_CONFIRM_BUTTON_TEXT=\u062A\u062D\u0631\u064A\u0631
152
-
153
- T_MASS_EDIT_CANCEL_BUTTON_TEXT=\u0625\u0644\u063A\u0627\u0621