@sapui5/sap.fe.templates 1.94.0 → 1.96.3
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 +1 -1
- package/src/sap/fe/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/Component.js +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/manifest.json +6 -0
- package/src/sap/fe/templates/ListComponent.js +1 -1
- package/src/sap/fe/templates/ListReport/Component.js +1 -1
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +20 -5
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +3 -2
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +183 -170
- package/src/sap/fe/templates/ListReport/manifest.json +11 -1
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +7 -3
- package/src/sap/fe/templates/ListReport/overrides/Share.js +37 -22
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +124 -27
- package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +25 -5
- package/src/sap/fe/templates/ObjectPage/Component.js +1 -7
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +1 -1
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +69 -60
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +154 -231
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +1 -1
- package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +1 -1
- package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +2 -2
- package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +13 -0
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +87 -63
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +23 -2
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +14 -11
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +26 -12
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderContent.fragment.xml +34 -38
- package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +9 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +1 -4
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionFormContent.fragment.xml +1 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +1 -0
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +117 -116
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +63 -71
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +33 -22
- package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +1 -1
- 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 +6 -2
- package/src/sap/fe/templates/controls/Table.fragment.xml +1 -0
- package/src/sap/fe/templates/library.js +2 -2
- package/src/sap/fe/templates/messagebundle.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ar.properties +2 -2
- package/src/sap/fe/templates/messagebundle_bg.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ca.properties +1 -1
- package/src/sap/fe/templates/messagebundle_cs.properties +1 -1
- package/src/sap/fe/templates/messagebundle_cy.properties +1 -1
- package/src/sap/fe/templates/messagebundle_da.properties +2 -2
- package/src/sap/fe/templates/messagebundle_de.properties +1 -1
- package/src/sap/fe/templates/messagebundle_el.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_GB.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +1 -1
- package/src/sap/fe/templates/messagebundle_es.properties +1 -1
- package/src/sap/fe/templates/messagebundle_es_MX.properties +1 -1
- package/src/sap/fe/templates/messagebundle_et.properties +1 -1
- package/src/sap/fe/templates/messagebundle_fi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_fr.properties +2 -2
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +2 -2
- package/src/sap/fe/templates/messagebundle_hi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_hr.properties +2 -2
- package/src/sap/fe/templates/messagebundle_hu.properties +1 -1
- package/src/sap/fe/templates/messagebundle_id.properties +1 -1
- package/src/sap/fe/templates/messagebundle_it.properties +1 -1
- package/src/sap/fe/templates/messagebundle_iw.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ja.properties +1 -1
- package/src/sap/fe/templates/messagebundle_kk.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ko.properties +1 -1
- package/src/sap/fe/templates/messagebundle_lt.properties +1 -1
- package/src/sap/fe/templates/messagebundle_lv.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ms.properties +1 -1
- package/src/sap/fe/templates/messagebundle_nl.properties +1 -1
- package/src/sap/fe/templates/messagebundle_no.properties +2 -2
- package/src/sap/fe/templates/messagebundle_pl.properties +2 -2
- package/src/sap/fe/templates/messagebundle_pt.properties +1 -1
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ro.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ru.properties +1 -1
- package/src/sap/fe/templates/messagebundle_sh.properties +1 -1
- package/src/sap/fe/templates/messagebundle_sk.properties +2 -2
- package/src/sap/fe/templates/messagebundle_sl.properties +1 -1
- package/src/sap/fe/templates/messagebundle_sv.properties +1 -1
- package/src/sap/fe/templates/messagebundle_th.properties +2 -2
- package/src/sap/fe/templates/messagebundle_tr.properties +1 -1
- package/src/sap/fe/templates/messagebundle_uk.properties +1 -1
- package/src/sap/fe/templates/messagebundle_vi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +2 -2
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +1 -1
- 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 -24
- 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
|
-
);
|