@sapui5/sap.fe.templates 1.93.3 → 1.97.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.
- package/package.json +7 -4
- package/src/sap/fe/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/manifest.json +6 -0
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +31 -3
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +9 -7
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +244 -229
- package/src/sap/fe/templates/ListReport/manifest.json +11 -1
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +2 -6
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +151 -28
- package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +35 -99
- package/src/sap/fe/templates/ObjectPage/Component.js +15 -4
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +18 -3
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +169 -165
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +262 -170
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +8 -0
- package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +13 -0
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +2 -2
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +42 -1
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +16 -14
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +20 -8
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +14 -19
- package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderContent.fragment.xml +34 -38
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderDataPointTitle.fragment.xml +26 -16
- package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderForm.fragment.xml +5 -5
- package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +8 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +8 -4
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +117 -115
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +113 -99
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +32 -21
- package/src/sap/fe/templates/RootContainer/view/Fcl.view.xml +2 -1
- package/src/sap/fe/templates/RootContainer/view/NavContainer.view.xml +1 -1
- package/src/sap/fe/templates/TableScroller.js +61 -0
- package/src/sap/fe/templates/controls/Chart.fragment.xml +11 -14
- package/src/sap/fe/templates/controls/Table.fragment.xml +3 -0
- package/src/sap/fe/templates/library.js +1 -1
- package/src/sap/fe/templates/messagebundle.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ar.properties +9 -5
- package/src/sap/fe/templates/messagebundle_bg.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ca.properties +8 -4
- package/src/sap/fe/templates/messagebundle_cs.properties +7 -3
- package/src/sap/fe/templates/messagebundle_cy.properties +8 -4
- package/src/sap/fe/templates/messagebundle_da.properties +9 -5
- package/src/sap/fe/templates/messagebundle_de.properties +8 -4
- package/src/sap/fe/templates/messagebundle_el.properties +8 -4
- package/src/sap/fe/templates/messagebundle_en.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_GB.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +7 -3
- package/src/sap/fe/templates/messagebundle_es.properties +8 -4
- package/src/sap/fe/templates/messagebundle_es_MX.properties +8 -4
- package/src/sap/fe/templates/messagebundle_et.properties +7 -3
- package/src/sap/fe/templates/messagebundle_fi.properties +8 -4
- package/src/sap/fe/templates/messagebundle_fr.properties +9 -5
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +8 -4
- package/src/sap/fe/templates/messagebundle_hi.properties +8 -4
- package/src/sap/fe/templates/messagebundle_hr.properties +8 -4
- package/src/sap/fe/templates/messagebundle_hu.properties +9 -5
- package/src/sap/fe/templates/messagebundle_id.properties +10 -6
- package/src/sap/fe/templates/messagebundle_it.properties +8 -4
- package/src/sap/fe/templates/messagebundle_iw.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ja.properties +8 -4
- package/src/sap/fe/templates/messagebundle_kk.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ko.properties +8 -4
- package/src/sap/fe/templates/messagebundle_lt.properties +8 -4
- package/src/sap/fe/templates/messagebundle_lv.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ms.properties +8 -4
- package/src/sap/fe/templates/messagebundle_nl.properties +8 -4
- package/src/sap/fe/templates/messagebundle_no.properties +9 -5
- package/src/sap/fe/templates/messagebundle_pl.properties +8 -4
- package/src/sap/fe/templates/messagebundle_pt.properties +8 -4
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ro.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ru.properties +9 -5
- package/src/sap/fe/templates/messagebundle_sh.properties +8 -4
- package/src/sap/fe/templates/messagebundle_sk.properties +8 -4
- package/src/sap/fe/templates/messagebundle_sl.properties +8 -4
- package/src/sap/fe/templates/messagebundle_sv.properties +8 -4
- package/src/sap/fe/templates/messagebundle_th.properties +9 -5
- package/src/sap/fe/templates/messagebundle_tr.properties +7 -3
- package/src/sap/fe/templates/messagebundle_uk.properties +7 -3
- package/src/sap/fe/templates/messagebundle_vi.properties +8 -4
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +9 -5
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +8 -4
- package/src/sap/fe/templates/ObjectPage/overrides/Routing.js +0 -20
- package/src/sap/fe/templates/ObjectPage/view/fragments/TitleAndSubtitle.fragment.xml +0 -24
- package/src/sap/fe/templates/RootContainer/view/PlaceholderLR.view.xml +0 -617
- package/src/sap/fe/templates/RootContainer/view/PlaceholderOP.view.xml +0 -588
- package/src/sap/fe/templates/controls/OverflowToolbarButtonHover.js +0 -25
- package/src/sap/fe/templates/controls/Paginator.control.xml +0 -22
- 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
|
-
);
|