@sapui5/sap.fe.templates 1.93.3 → 1.96.2

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 (90) hide show
  1. package/package.json +2 -2
  2. package/src/sap/fe/templates/.library +1 -1
  3. package/src/sap/fe/templates/AnalyticalListPage/manifest.json +6 -0
  4. package/src/sap/fe/templates/ListReport/ExtensionAPI.js +31 -3
  5. package/src/sap/fe/templates/ListReport/ListReport.view.xml +7 -5
  6. package/src/sap/fe/templates/ListReport/ListReportController.controller.js +181 -197
  7. package/src/sap/fe/templates/ListReport/manifest.json +11 -1
  8. package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +1 -1
  9. package/src/sap/fe/templates/ListReport/overrides/ViewState.js +123 -26
  10. package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.xml +3 -3
  11. package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +35 -99
  12. package/src/sap/fe/templates/ObjectPage/Component.js +0 -6
  13. package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +18 -3
  14. package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +169 -165
  15. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +220 -157
  16. package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +1 -1
  17. package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +13 -0
  18. package/src/sap/fe/templates/ObjectPage/overrides/Share.js +2 -2
  19. package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +22 -1
  20. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +16 -14
  21. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +20 -8
  22. package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +14 -19
  23. package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +3 -3
  24. package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +1 -1
  25. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderContent.fragment.xml +34 -38
  26. package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +8 -2
  27. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +8 -4
  28. package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +60 -112
  29. package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +62 -70
  30. package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +9 -1
  31. package/src/sap/fe/templates/TableScroller.js +61 -0
  32. package/src/sap/fe/templates/controls/Chart.fragment.xml +11 -14
  33. package/src/sap/fe/templates/controls/OverflowToolbarButtonHover.js +1 -1
  34. package/src/sap/fe/templates/controls/Table.fragment.xml +1 -0
  35. package/src/sap/fe/templates/library.js +1 -1
  36. package/src/sap/fe/templates/messagebundle.properties +1 -1
  37. package/src/sap/fe/templates/messagebundle_ar.properties +9 -5
  38. package/src/sap/fe/templates/messagebundle_bg.properties +8 -4
  39. package/src/sap/fe/templates/messagebundle_ca.properties +8 -4
  40. package/src/sap/fe/templates/messagebundle_cs.properties +7 -3
  41. package/src/sap/fe/templates/messagebundle_cy.properties +8 -4
  42. package/src/sap/fe/templates/messagebundle_da.properties +9 -5
  43. package/src/sap/fe/templates/messagebundle_de.properties +8 -4
  44. package/src/sap/fe/templates/messagebundle_el.properties +8 -4
  45. package/src/sap/fe/templates/messagebundle_en.properties +7 -3
  46. package/src/sap/fe/templates/messagebundle_en_GB.properties +7 -3
  47. package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +7 -3
  48. package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +7 -3
  49. package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +7 -3
  50. package/src/sap/fe/templates/messagebundle_es.properties +8 -4
  51. package/src/sap/fe/templates/messagebundle_es_MX.properties +8 -4
  52. package/src/sap/fe/templates/messagebundle_et.properties +7 -3
  53. package/src/sap/fe/templates/messagebundle_fi.properties +8 -4
  54. package/src/sap/fe/templates/messagebundle_fr.properties +9 -5
  55. package/src/sap/fe/templates/messagebundle_fr_CA.properties +8 -4
  56. package/src/sap/fe/templates/messagebundle_hi.properties +8 -4
  57. package/src/sap/fe/templates/messagebundle_hr.properties +8 -4
  58. package/src/sap/fe/templates/messagebundle_hu.properties +9 -5
  59. package/src/sap/fe/templates/messagebundle_id.properties +10 -6
  60. package/src/sap/fe/templates/messagebundle_it.properties +8 -4
  61. package/src/sap/fe/templates/messagebundle_iw.properties +8 -4
  62. package/src/sap/fe/templates/messagebundle_ja.properties +8 -4
  63. package/src/sap/fe/templates/messagebundle_kk.properties +8 -4
  64. package/src/sap/fe/templates/messagebundle_ko.properties +8 -4
  65. package/src/sap/fe/templates/messagebundle_lt.properties +8 -4
  66. package/src/sap/fe/templates/messagebundle_lv.properties +8 -4
  67. package/src/sap/fe/templates/messagebundle_ms.properties +8 -4
  68. package/src/sap/fe/templates/messagebundle_nl.properties +8 -4
  69. package/src/sap/fe/templates/messagebundle_no.properties +9 -5
  70. package/src/sap/fe/templates/messagebundle_pl.properties +8 -4
  71. package/src/sap/fe/templates/messagebundle_pt.properties +8 -4
  72. package/src/sap/fe/templates/messagebundle_pt_PT.properties +8 -4
  73. package/src/sap/fe/templates/messagebundle_ro.properties +8 -4
  74. package/src/sap/fe/templates/messagebundle_ru.properties +9 -5
  75. package/src/sap/fe/templates/messagebundle_sh.properties +8 -4
  76. package/src/sap/fe/templates/messagebundle_sk.properties +8 -4
  77. package/src/sap/fe/templates/messagebundle_sl.properties +8 -4
  78. package/src/sap/fe/templates/messagebundle_sv.properties +8 -4
  79. package/src/sap/fe/templates/messagebundle_th.properties +9 -5
  80. package/src/sap/fe/templates/messagebundle_tr.properties +7 -3
  81. package/src/sap/fe/templates/messagebundle_uk.properties +7 -3
  82. package/src/sap/fe/templates/messagebundle_vi.properties +8 -4
  83. package/src/sap/fe/templates/messagebundle_zh_CN.properties +9 -5
  84. package/src/sap/fe/templates/messagebundle_zh_TW.properties +8 -4
  85. package/src/sap/fe/templates/ObjectPage/overrides/Routing.js +0 -20
  86. package/src/sap/fe/templates/ObjectPage/view/fragments/TitleAndSubtitle.fragment.xml +0 -24
  87. package/src/sap/fe/templates/RootContainer/view/PlaceholderLR.view.xml +0 -617
  88. package/src/sap/fe/templates/RootContainer/view/PlaceholderOP.view.xml +0 -588
  89. package/src/sap/fe/templates/controls/Paginator.control.xml +0 -22
  90. package/src/sap/fe/templates/controls/Paginator.js +0 -173
@@ -1,173 +0,0 @@
1
- /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
4
- */
5
-
6
- sap.ui.define(
7
- ["sap/ui/core/XMLComposite", "sap/ui/model/json/JSONModel", "sap/ui/base/ManagedObjectObserver", "sap/ui/model/resource/ResourceModel"],
8
- function(XMLComposite, JSONModel, ManagedObjectObserver, ResourceModel) {
9
- "use strict";
10
- var Paginator = XMLComposite.extend("sap.fe.templates.controls.Paginator", {
11
- metadata: {
12
- properties: {
13
- listBinding: {
14
- type: "sap.ui.model.odata.v4.ODataListBinding"
15
- }
16
- },
17
- events: {
18
- navigate: {}
19
- },
20
- aggregations: {},
21
- publicMethods: []
22
- },
23
- alias: "this",
24
- fragment: "sap.fe.templates.controls.Paginator"
25
- });
26
-
27
- Paginator.prototype.init = function() {
28
- XMLComposite.prototype.init.apply(this, arguments);
29
- var that = this;
30
-
31
- // Initial setting of the button enablement and visibility
32
- that.setModel(
33
- new JSONModel({
34
- navUpEnabled: false,
35
- navDownEnabled: false
36
- }),
37
- "buttonEnablement"
38
- );
39
- that.setVisible(false);
40
-
41
- // To observe change in the property : listbinding
42
- that._oObserver = new ManagedObjectObserver(that._observeChanges.bind(that));
43
- that._oObserver.observe(that, {
44
- properties: ["listBinding"]
45
- });
46
-
47
- // To update the buttons on change of binding context
48
- that.attachModelContextChange(function(oEvent) {
49
- var oModel = that.getModel();
50
- if (!oModel) {
51
- return;
52
- }
53
- that.updateCurrentIndexAndButtonEnablement();
54
- });
55
- };
56
-
57
- Paginator.prototype.onBeforeRendering = function() {
58
- // i18n for tooltip
59
- if (!this.getModel("sap.fe.i18n")) {
60
- this.setModel(
61
- new ResourceModel({
62
- bundleName: "sap/fe/templates/messagebundle",
63
- async: true
64
- }),
65
- "sap.fe.i18n"
66
- );
67
- }
68
- };
69
-
70
- Paginator.prototype._observeChanges = function(oChanges) {
71
- var that = this;
72
-
73
- if (oChanges.name === "listBinding") {
74
- if (that.getListBinding()) {
75
- // Update the control
76
- that.updateCurrentIndexAndButtonEnablement();
77
- that.setVisible(true);
78
- } else {
79
- that._currentIndex = null;
80
- that.setVisible(false);
81
- }
82
- }
83
- };
84
-
85
- Paginator.prototype.updateCurrentIndexAndButtonEnablement = function() {
86
- // Three cases to find the currentIndex
87
- // 1. First time the paginator buttons are rendered, currentIndex needs to be found.
88
- // 2. If bindingContext of the paginator buttons is changed externally. Eg: On going back to LR from OP and navigating to a different OP, the currentIndex needs to be updated.
89
- // 3. New ListBinding.
90
- var that = this;
91
- var oListBinding = that.getListBinding();
92
- if (that.getBindingContext() && oListBinding) {
93
- var oCurrentIndexContext = oListBinding.getCurrentContexts()[that._currentIndex];
94
- if (
95
- (!that._currentIndex && that._currentIndex !== 0) ||
96
- !oCurrentIndexContext ||
97
- that.getBindingContext().getPath() !== oCurrentIndexContext.getPath()
98
- ) {
99
- that.updateCurrentIndex();
100
- }
101
- that.handleButtonEnablement();
102
- }
103
- };
104
-
105
- Paginator.prototype.updateCurrentIndex = function() {
106
- var that = this;
107
- var sPath = that.getBindingContext().getPath();
108
- // Storing the currentIndex
109
- that._currentIndex = that
110
- .getListBinding()
111
- .getCurrentContexts()
112
- .findIndex(function(oContext) {
113
- return oContext && oContext.getPath() === sPath;
114
- });
115
- };
116
-
117
- Paginator.prototype.handleButtonEnablement = function() {
118
- //Enabling and Disabling the Buttons on change of the control context
119
- var that = this;
120
- var oListBinding = that.getListBinding();
121
- var mButtonEnablementModel = that.getModel("buttonEnablement");
122
- if (oListBinding && oListBinding.getCurrentContexts().length > 1 && that._currentIndex > -1) {
123
- if (that._currentIndex === oListBinding.getCurrentContexts().length - 1) {
124
- mButtonEnablementModel.setProperty("/navDownEnabled", false);
125
- } else {
126
- mButtonEnablementModel.setProperty("/navDownEnabled", true);
127
- }
128
- if (that._currentIndex === 0) {
129
- mButtonEnablementModel.setProperty("/navUpEnabled", false);
130
- } else {
131
- mButtonEnablementModel.setProperty("/navUpEnabled", true);
132
- }
133
- that.setVisible(true);
134
- } else {
135
- // Don't show the paginator buttons
136
- // 1. When no listbinding is available
137
- // 2. Only '1' or '0' context exists in the listBinding
138
- // 3. The current index is -ve, i.e the currentIndex is invalid.
139
- that.setVisible(false);
140
- }
141
- };
142
-
143
- Paginator.prototype.handleShowOtherObject = function(index, oEvent) {
144
- var that = this;
145
- var oListBinding = that.getListBinding();
146
-
147
- if (!oListBinding) {
148
- return;
149
- }
150
-
151
- var aCurrentContexts = oListBinding.getCurrentContexts();
152
- var iNewIndex = that._currentIndex + index;
153
- if (aCurrentContexts[iNewIndex]) {
154
- that.fireNavigate({
155
- oEvent: oEvent,
156
- context: aCurrentContexts[iNewIndex]
157
- });
158
- that._currentIndex = iNewIndex;
159
- }
160
- };
161
-
162
- Paginator.prototype.handleShowPrevObject = function(oEvent) {
163
- this.handleShowOtherObject(-1, oEvent);
164
- };
165
-
166
- Paginator.prototype.handleShowNextObject = function(oEvent) {
167
- this.handleShowOtherObject(1, oEvent);
168
- };
169
-
170
- return Paginator;
171
- },
172
- /* bExport= */ true
173
- );