@openui5/sap.ui.integration 1.100.0 → 1.101.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/.eslintrc.json +18 -0
- package/THIRDPARTY.txt +5 -5
- package/package.json +3 -3
- package/src/sap/ui/integration/.library +1 -1
- package/src/sap/ui/integration/ActionDefinition.js +1 -1
- package/src/sap/ui/integration/Designtime.js +1 -1
- package/src/sap/ui/integration/Extension.js +1 -1
- package/src/sap/ui/integration/Host.js +1 -1
- package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticalContent.js +3 -2
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
- package/src/sap/ui/integration/cards/BaseContent.js +4 -3
- package/src/sap/ui/integration/cards/BaseListContent.js +1 -1
- package/src/sap/ui/integration/cards/CalendarContent.js +1 -1
- package/src/sap/ui/integration/cards/ComponentContent.js +1 -1
- package/src/sap/ui/integration/cards/Footer.js +1 -1
- package/src/sap/ui/integration/cards/Header.js +4 -2
- package/src/sap/ui/integration/cards/ListContent.js +1 -1
- package/src/sap/ui/integration/cards/NumericHeader.js +5 -2
- package/src/sap/ui/integration/cards/ObjectContent.js +68 -10
- package/src/sap/ui/integration/cards/TableContent.js +1 -1
- package/src/sap/ui/integration/cards/TimelineContent.js +1 -1
- package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
- package/src/sap/ui/integration/cards/actions/CardActions.js +1 -1
- package/src/sap/ui/integration/cards/actions/HideCardAction.js +12 -3
- package/src/sap/ui/integration/cards/actions/ShowCardAction.js +33 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputDate.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputNumber.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +1 -1
- package/src/sap/ui/integration/cards/filters/BaseFilter.js +1 -1
- package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +1 -1
- package/src/sap/ui/integration/cards/filters/FilterBar.js +1 -1
- package/src/sap/ui/integration/cards/filters/FilterBarFactory.js +1 -1
- package/src/sap/ui/integration/cards/filters/SearchFilter.js +1 -1
- package/src/sap/ui/integration/cards/filters/SelectFilter.js +1 -1
- package/src/sap/ui/integration/controls/ActionsStrip.js +57 -24
- package/src/sap/ui/integration/controls/ActionsToolbar.js +1 -1
- package/src/sap/ui/integration/controls/LinkWithIcon.js +77 -0
- package/src/sap/ui/integration/controls/LinkWithIconRenderer.js +38 -0
- package/src/sap/ui/integration/controls/ListContentItem.js +1 -1
- package/src/sap/ui/integration/controls/Microchart.js +1 -1
- package/src/sap/ui/integration/controls/MicrochartLegend.js +1 -1
- package/src/sap/ui/integration/controls/Paginator.js +218 -18
- package/src/sap/ui/integration/controls/PaginatorRenderer.js +2 -0
- package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/groupEditor/GroupEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IsInIconPool.validator.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/multiSelectEditor/MultiSelectEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/objectArrayEditor/ObjectArrayEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/separatorEditor/SeparatorEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/binding/ObjectBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/unset.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsBoolean.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsDate.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsInteger.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsNumber.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsSelectedKey.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsStringList.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueKey.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueList.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsValidBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/MaxLength.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/NotABinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/ValidatorRegistry.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/complexMapEditor/ComplexMapEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/destinationsEditor/DestinationsEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/filtersEditor/FiltersEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersEditor.js +1 -1
- package/src/sap/ui/integration/designtime/editor/CardEditor.js +87 -7
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +1 -1
- package/src/sap/ui/integration/editor/Editor.js +44 -34
- package/src/sap/ui/integration/editor/EditorResourceBundles.js +1 -1
- package/src/sap/ui/integration/editor/Extension.js +1 -1
- package/src/sap/ui/integration/editor/Manifest.js +1 -1
- package/src/sap/ui/integration/editor/Settings.js +1 -1
- package/src/sap/ui/integration/editor/fields/BaseField.js +8 -8
- package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateTimeField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -1
- package/src/sap/ui/integration/editor/fields/IntegerField.js +1 -1
- package/src/sap/ui/integration/editor/fields/NumberField.js +1 -1
- package/src/sap/ui/integration/editor/fields/ObjectField.js +49 -25
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +3 -3
- package/src/sap/ui/integration/editor/fields/StringField.js +4 -4
- package/src/sap/ui/integration/editor/fields/StringListField.js +38 -52
- package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +1 -1
- package/src/sap/ui/integration/library.js +12 -15
- package/src/sap/ui/integration/messagebundle.properties +9 -3
- package/src/sap/ui/integration/messagebundle_ar.properties +7 -3
- package/src/sap/ui/integration/messagebundle_bg.properties +7 -3
- package/src/sap/ui/integration/messagebundle_ca.properties +5 -1
- package/src/sap/ui/integration/messagebundle_cs.properties +6 -2
- package/src/sap/ui/integration/messagebundle_cy.properties +7 -3
- package/src/sap/ui/integration/messagebundle_da.properties +6 -2
- package/src/sap/ui/integration/messagebundle_de.properties +6 -2
- package/src/sap/ui/integration/messagebundle_el.properties +7 -3
- package/src/sap/ui/integration/messagebundle_en.properties +7 -3
- package/src/sap/ui/integration/messagebundle_en_GB.properties +6 -2
- package/src/sap/ui/integration/messagebundle_en_US_sappsd.properties +6 -2
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +6 -2
- package/src/sap/ui/integration/messagebundle_en_US_saptrc.properties +6 -2
- package/src/sap/ui/integration/messagebundle_es.properties +6 -2
- package/src/sap/ui/integration/messagebundle_es_MX.properties +6 -2
- package/src/sap/ui/integration/messagebundle_et.properties +7 -3
- package/src/sap/ui/integration/messagebundle_fi.properties +7 -3
- package/src/sap/ui/integration/messagebundle_fr.properties +5 -1
- package/src/sap/ui/integration/messagebundle_fr_CA.properties +5 -1
- package/src/sap/ui/integration/messagebundle_hi.properties +6 -2
- package/src/sap/ui/integration/messagebundle_hr.properties +6 -2
- package/src/sap/ui/integration/messagebundle_hu.properties +6 -2
- package/src/sap/ui/integration/messagebundle_id.properties +7 -3
- package/src/sap/ui/integration/messagebundle_it.properties +7 -3
- package/src/sap/ui/integration/messagebundle_iw.properties +6 -2
- package/src/sap/ui/integration/messagebundle_ja.properties +6 -2
- package/src/sap/ui/integration/messagebundle_kk.properties +6 -2
- package/src/sap/ui/integration/messagebundle_ko.properties +6 -2
- package/src/sap/ui/integration/messagebundle_lt.properties +6 -2
- package/src/sap/ui/integration/messagebundle_lv.properties +7 -3
- package/src/sap/ui/integration/messagebundle_ms.properties +7 -3
- package/src/sap/ui/integration/messagebundle_nl.properties +6 -2
- package/src/sap/ui/integration/messagebundle_no.properties +6 -2
- package/src/sap/ui/integration/messagebundle_pl.properties +6 -2
- package/src/sap/ui/integration/messagebundle_pt.properties +6 -2
- package/src/sap/ui/integration/messagebundle_pt_PT.properties +7 -3
- package/src/sap/ui/integration/messagebundle_ro.properties +6 -2
- package/src/sap/ui/integration/messagebundle_ru.properties +6 -2
- package/src/sap/ui/integration/messagebundle_sh.properties +7 -3
- package/src/sap/ui/integration/messagebundle_sk.properties +7 -3
- package/src/sap/ui/integration/messagebundle_sl.properties +7 -3
- package/src/sap/ui/integration/messagebundle_sv.properties +7 -3
- package/src/sap/ui/integration/messagebundle_th.properties +7 -3
- package/src/sap/ui/integration/messagebundle_tr.properties +6 -2
- package/src/sap/ui/integration/messagebundle_uk.properties +7 -3
- package/src/sap/ui/integration/messagebundle_vi.properties +6 -2
- package/src/sap/ui/integration/messagebundle_zh_CN.properties +7 -3
- package/src/sap/ui/integration/messagebundle_zh_TW.properties +6 -2
- package/src/sap/ui/integration/model/ContextModel.js +1 -1
- package/src/sap/ui/integration/model/ObservableModel.js +1 -1
- package/src/sap/ui/integration/model/PagingModelListBinding.js +1 -1
- package/src/sap/ui/integration/themes/base/CalendarContent.less +2 -2
- package/src/sap/ui/integration/themes/base/Card.less +24 -0
- package/src/sap/ui/integration/themes/base/LinkWithIcon.less +11 -0
- package/src/sap/ui/integration/themes/base/ListContentItem.less +11 -0
- package/src/sap/ui/integration/themes/base/Paginator.less +86 -0
- package/src/sap/ui/integration/themes/base/library.source.less +1 -0
- package/src/sap/ui/integration/util/BaseFactory.js +1 -1
- package/src/sap/ui/integration/util/BindingHelper.js +1 -1
- package/src/sap/ui/integration/util/BindingResolver.js +1 -1
- package/src/sap/ui/integration/util/CardObserver.js +1 -1
- package/src/sap/ui/integration/util/ContentFactory.js +1 -1
- package/src/sap/ui/integration/util/CsrfTokenHandler.js +1 -1
- package/src/sap/ui/integration/util/DataProvider.js +1 -1
- package/src/sap/ui/integration/util/DataProviderFactory.js +1 -1
- package/src/sap/ui/integration/util/Destinations.js +1 -1
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/HeaderFactory.js +35 -4
- package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +2 -2
- package/src/sap/ui/integration/util/Manifest.js +1 -1
- package/src/sap/ui/integration/util/RequestDataProvider.js +1 -1
- package/src/sap/ui/integration/util/ServiceDataProvider.js +1 -1
- package/src/sap/ui/integration/util/ServiceManager.js +1 -1
- package/src/sap/ui/integration/util/SkeletonCard.js +14 -2
- package/src/sap/ui/integration/util/Utils.js +1 -1
- package/src/sap/ui/integration/widgets/Card.js +29 -7
|
@@ -12,6 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/integration/cards/actions/CardActions",
|
|
13
13
|
"sap/ui/integration/util/BindingHelper",
|
|
14
14
|
"sap/m/Button",
|
|
15
|
+
"sap/ui/integration/controls/LinkWithIcon",
|
|
15
16
|
"sap/m/OverflowToolbarButton",
|
|
16
17
|
"sap/m/OverflowToolbar",
|
|
17
18
|
"sap/m/OverflowToolbarLayoutData",
|
|
@@ -24,6 +25,7 @@ sap.ui.define([
|
|
|
24
25
|
CardActions,
|
|
25
26
|
BindingHelper,
|
|
26
27
|
Button,
|
|
28
|
+
LinkWithIcon,
|
|
27
29
|
OverflowToolbarButton,
|
|
28
30
|
OverflowToolbar,
|
|
29
31
|
OverflowToolbarLayoutData,
|
|
@@ -46,7 +48,7 @@ sap.ui.define([
|
|
|
46
48
|
* @extends sap.ui.core.Control
|
|
47
49
|
*
|
|
48
50
|
* @author SAP SE
|
|
49
|
-
* @version 1.
|
|
51
|
+
* @version 1.101.0
|
|
50
52
|
*
|
|
51
53
|
* @constructor
|
|
52
54
|
* @private
|
|
@@ -131,44 +133,75 @@ sap.ui.define([
|
|
|
131
133
|
group: mConfig.overflowGroup,
|
|
132
134
|
priority: mConfig.overflowPriority
|
|
133
135
|
}),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
});
|
|
145
|
-
} else {
|
|
146
|
-
oButton = new Button({
|
|
147
|
-
text: mConfig.text,
|
|
148
|
-
tooltip: mConfig.tooltip,
|
|
149
|
-
type: mConfig.buttonType,
|
|
150
|
-
ariaHasPopup: mConfig.ariaHasPopup,
|
|
151
|
-
visible: mConfig.visible
|
|
152
|
-
});
|
|
136
|
+
oControl;
|
|
137
|
+
|
|
138
|
+
switch (mConfig.type) {
|
|
139
|
+
case "Link":
|
|
140
|
+
oControl = this._createLink(mConfig);
|
|
141
|
+
break;
|
|
142
|
+
case "Button":
|
|
143
|
+
default:
|
|
144
|
+
oControl = this._createButton(mConfig);
|
|
145
|
+
break;
|
|
153
146
|
}
|
|
154
147
|
|
|
155
|
-
|
|
148
|
+
oControl.setLayoutData(oOverflow);
|
|
156
149
|
|
|
157
150
|
oActions.attach({
|
|
158
151
|
area: ActionArea.ActionsStrip,
|
|
159
|
-
control:
|
|
152
|
+
control: oControl,
|
|
160
153
|
actions: aActions,
|
|
161
154
|
enabledPropertyName: "enabled"
|
|
162
155
|
});
|
|
163
156
|
|
|
164
|
-
oToolbar.addContent(
|
|
165
|
-
});
|
|
157
|
+
oToolbar.addContent(oControl);
|
|
158
|
+
}.bind(this));
|
|
166
159
|
|
|
167
160
|
if (!bHasSpacer) {
|
|
168
161
|
oToolbar.insertContent(new ToolbarSpacer(), 0);
|
|
169
162
|
}
|
|
170
163
|
};
|
|
171
164
|
|
|
165
|
+
ActionsStrip.prototype._createLink = function (mConfig) {
|
|
166
|
+
var oLink = new LinkWithIcon({
|
|
167
|
+
icon: mConfig.icon,
|
|
168
|
+
text: mConfig.text,
|
|
169
|
+
tooltip: mConfig.tooltip,
|
|
170
|
+
ariaHasPopup: mConfig.ariaHasPopup,
|
|
171
|
+
emphasized: mConfig.emphasized,
|
|
172
|
+
visible: mConfig.visible
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
return oLink;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
ActionsStrip.prototype._createButton = function (mConfig) {
|
|
179
|
+
var oButton;
|
|
180
|
+
|
|
181
|
+
if (mConfig.icon) {
|
|
182
|
+
oButton = new OverflowToolbarButton({
|
|
183
|
+
icon: mConfig.icon,
|
|
184
|
+
text: mConfig.text || mConfig.tooltip,
|
|
185
|
+
tooltip: mConfig.tooltip || mConfig.text,
|
|
186
|
+
type: mConfig.buttonType,
|
|
187
|
+
ariaHasPopup: mConfig.ariaHasPopup,
|
|
188
|
+
visible: mConfig.visible
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
return oButton;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
oButton = new Button({
|
|
195
|
+
text: mConfig.text,
|
|
196
|
+
tooltip: mConfig.tooltip,
|
|
197
|
+
type: mConfig.buttonType,
|
|
198
|
+
ariaHasPopup: mConfig.ariaHasPopup,
|
|
199
|
+
visible: mConfig.visible
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
return oButton;
|
|
203
|
+
};
|
|
204
|
+
|
|
172
205
|
ActionsStrip.create = function (oCard, aButtons) {
|
|
173
206
|
if (!aButtons) {
|
|
174
207
|
return null;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Provides control sap.ui.integration.controls.ActionsToolbar
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
"./LinkWithIconRenderer",
|
|
10
|
+
"sap/ui/integration/library",
|
|
11
|
+
"sap/m/Link",
|
|
12
|
+
"sap/ui/core/Icon"
|
|
13
|
+
], function (
|
|
14
|
+
LinkWithIconRenderer,
|
|
15
|
+
library,
|
|
16
|
+
Link,
|
|
17
|
+
Icon
|
|
18
|
+
) {
|
|
19
|
+
"use strict";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Constructor for a new LinkWithIcon.
|
|
23
|
+
*
|
|
24
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
25
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
26
|
+
*
|
|
27
|
+
* @class
|
|
28
|
+
*
|
|
29
|
+
* @extends sap.m.Link
|
|
30
|
+
*
|
|
31
|
+
* @author SAP SE
|
|
32
|
+
* @version 1.101.0
|
|
33
|
+
*
|
|
34
|
+
* @constructor
|
|
35
|
+
* @private
|
|
36
|
+
* @alias sap.ui.integration.controls.LinkWithIcon
|
|
37
|
+
*/
|
|
38
|
+
var LinkWithIcon = Link.extend("sap.ui.integration.controls.LinkWithIcon", {
|
|
39
|
+
metadata: {
|
|
40
|
+
library: "sap.ui.integration",
|
|
41
|
+
properties: {
|
|
42
|
+
/**
|
|
43
|
+
* Defines the icon to be displayed as graphical element within the <code>Link</code>.
|
|
44
|
+
*/
|
|
45
|
+
icon: {type : "sap.ui.core.URI", group : "Appearance", defaultValue: "" }
|
|
46
|
+
},
|
|
47
|
+
aggregations: {
|
|
48
|
+
_icon: { type: "sap.ui.core.Icon", multiple: false, visibility: "hidden" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Called before the control is rendered.
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
LinkWithIcon.prototype.onBeforeRendering = function () {
|
|
58
|
+
Link.prototype.onBeforeRendering.apply(this, arguments);
|
|
59
|
+
|
|
60
|
+
if (this.getIcon()) {
|
|
61
|
+
this._getIcon().setSrc(this.getIcon());
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
this.addStyleClass("sapUiIntCardLinkWithIcon");
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
LinkWithIcon.prototype._getIcon = function () {
|
|
68
|
+
var oIcon = this.getAggregation("_icon");
|
|
69
|
+
if (!oIcon) {
|
|
70
|
+
oIcon = new Icon();
|
|
71
|
+
this.setAggregation("_icon", oIcon);
|
|
72
|
+
}
|
|
73
|
+
return oIcon;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return LinkWithIcon;
|
|
77
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/integration/library",
|
|
9
|
+
"sap/ui/core/Renderer",
|
|
10
|
+
"sap/m/LinkRenderer"
|
|
11
|
+
], function(library,
|
|
12
|
+
Renderer,
|
|
13
|
+
LinkRenderer) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* LinkWithIconRenderer renderer.
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
var LinkWithIconRenderer = Renderer.extend(LinkRenderer);
|
|
21
|
+
LinkWithIconRenderer.apiVersion = 2;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @override
|
|
25
|
+
*/
|
|
26
|
+
LinkWithIconRenderer.renderText = function(oRm, oControl) {
|
|
27
|
+
var oIcon = oControl.getAggregation("_icon");
|
|
28
|
+
|
|
29
|
+
if (oIcon) {
|
|
30
|
+
oRm.renderControl(oIcon);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
LinkRenderer.renderText.apply(this, arguments);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return LinkWithIconRenderer;
|
|
37
|
+
|
|
38
|
+
}, /* bExport= */ true);
|
|
@@ -7,19 +7,27 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"../library",
|
|
9
9
|
"sap/m/library",
|
|
10
|
+
"sap/ui/base/EventProvider",
|
|
10
11
|
"sap/ui/core/Core",
|
|
11
12
|
"sap/ui/core/Control",
|
|
13
|
+
"sap/ui/core/Configuration",
|
|
12
14
|
'sap/ui/core/Icon',
|
|
13
15
|
'./PaginatorRenderer'
|
|
14
16
|
], function (
|
|
15
17
|
library,
|
|
16
18
|
mLibrary,
|
|
19
|
+
EventProvider,
|
|
17
20
|
Core,
|
|
18
21
|
Control,
|
|
22
|
+
Configuration,
|
|
19
23
|
Icon
|
|
20
24
|
) {
|
|
21
25
|
"use strict";
|
|
22
26
|
|
|
27
|
+
var sAnimationMode = Core.getConfiguration().getAnimationMode(),
|
|
28
|
+
bHasAnimations = sAnimationMode !== Configuration.AnimationMode.none && sAnimationMode !== Configuration.AnimationMode.minimal,
|
|
29
|
+
iServerSideAfterTransitionDelay = 200;
|
|
30
|
+
|
|
23
31
|
/**
|
|
24
32
|
* Constructor for a new Paginator.
|
|
25
33
|
*
|
|
@@ -31,7 +39,7 @@ sap.ui.define([
|
|
|
31
39
|
* @extends sap.ui.core.Control
|
|
32
40
|
*
|
|
33
41
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
42
|
+
* @version 1.101.0
|
|
35
43
|
*
|
|
36
44
|
* @constructor
|
|
37
45
|
* @private
|
|
@@ -70,6 +78,8 @@ sap.ui.define([
|
|
|
70
78
|
};
|
|
71
79
|
|
|
72
80
|
Paginator.prototype.init = function() {
|
|
81
|
+
this._listUpdateFinishedHandler = this._listUpdateFinished.bind(this);
|
|
82
|
+
|
|
73
83
|
this.setAggregation("_prevIcon", new Icon({
|
|
74
84
|
src: "sap-icon://slim-arrow-left",
|
|
75
85
|
useIconTooltip: false,
|
|
@@ -86,26 +96,67 @@ sap.ui.define([
|
|
|
86
96
|
};
|
|
87
97
|
|
|
88
98
|
Paginator.prototype.exit = function () {
|
|
89
|
-
var oCard = this.getCard()
|
|
99
|
+
var oCard = this.getCard(),
|
|
100
|
+
oContent,
|
|
101
|
+
oList;
|
|
102
|
+
|
|
103
|
+
if (oCard) {
|
|
104
|
+
if (this._dataChangedHandler) {
|
|
105
|
+
oCard.detachEvent("_contentDataChange", this._dataChangedHandler);
|
|
106
|
+
}
|
|
90
107
|
|
|
91
|
-
|
|
92
|
-
|
|
108
|
+
oContent = oCard.getCardContent();
|
|
109
|
+
|
|
110
|
+
if (oContent) {
|
|
111
|
+
oList = oContent.getAggregation("_content");
|
|
112
|
+
|
|
113
|
+
if (oList && EventProvider.hasListener(oList, "updateFinished", this._listUpdateFinishedHandler)) {
|
|
114
|
+
oList.detachEvent("updateFinished", this._listUpdateFinishedHandler);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
93
117
|
}
|
|
94
118
|
|
|
119
|
+
delete this._listUpdateFinishedHandler;
|
|
95
120
|
delete this._iPreviousStartIndex;
|
|
121
|
+
delete this._oClonedContent;
|
|
96
122
|
};
|
|
97
123
|
|
|
98
|
-
Paginator.prototype.
|
|
99
|
-
|
|
124
|
+
Paginator.prototype.isServerSide = function() {
|
|
125
|
+
return this.getTotalCount();
|
|
126
|
+
};
|
|
100
127
|
|
|
101
|
-
|
|
128
|
+
Paginator.prototype._dataChanged = function() {
|
|
129
|
+
var oCard = this.getCard(),
|
|
130
|
+
oContent = oCard.getCardContent(),
|
|
131
|
+
oList,
|
|
132
|
+
iTotalCount,
|
|
133
|
+
bInitialized;
|
|
134
|
+
|
|
135
|
+
if (!oContent || !oContent.isA("sap.ui.integration.cards.BaseContent")) {
|
|
102
136
|
this.setPageCount(0);
|
|
103
137
|
return;
|
|
104
138
|
}
|
|
105
139
|
|
|
106
|
-
this.setModel(
|
|
140
|
+
this.setModel(oContent.getModel());
|
|
141
|
+
|
|
142
|
+
oList = oContent.getAggregation("_content");
|
|
143
|
+
bInitialized = EventProvider.hasListener(oList, "updateFinished", this._listUpdateFinishedHandler);
|
|
144
|
+
|
|
145
|
+
if (this._hasAnimation() && !bInitialized) {
|
|
146
|
+
oList.attachEvent("updateFinished", this._listUpdateFinishedHandler);
|
|
147
|
+
|
|
148
|
+
if (this.isServerSide()) {
|
|
149
|
+
oContent.getAggregation("_loadingProvider")._oContentPlaceholder.addDelegate({
|
|
150
|
+
onAfterRendering: this.onPlaceholderAfterRendering.bind(this)
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (bInitialized) {
|
|
156
|
+
this._clearAnimation(this);
|
|
157
|
+
}
|
|
107
158
|
|
|
108
|
-
|
|
159
|
+
iTotalCount = this.getTotalCount() || oContent.getDataLength();
|
|
109
160
|
|
|
110
161
|
this.setPageCount(Math.ceil(iTotalCount / this.getPageSize()));
|
|
111
162
|
this.setPageNumber(Math.min(Math.max(0, this.getPageNumber()), this.getPageCount() - 1));
|
|
@@ -116,7 +167,7 @@ sap.ui.define([
|
|
|
116
167
|
Paginator.prototype.setCard = function(oCard) {
|
|
117
168
|
this.setProperty("card", oCard, true);
|
|
118
169
|
|
|
119
|
-
this._dataChangedHandler = this.
|
|
170
|
+
this._dataChangedHandler = this._dataChanged.bind(this);
|
|
120
171
|
|
|
121
172
|
if (oCard) {
|
|
122
173
|
oCard.attachEvent("_contentDataChange", this._dataChangedHandler);
|
|
@@ -126,48 +177,197 @@ sap.ui.define([
|
|
|
126
177
|
|
|
127
178
|
Paginator.prototype.sliceData = function() {
|
|
128
179
|
var oCard = this.getCard(),
|
|
129
|
-
|
|
130
|
-
iStartIndex
|
|
180
|
+
oContent,
|
|
181
|
+
iStartIndex,
|
|
182
|
+
bIsPageChanged;
|
|
131
183
|
|
|
132
184
|
if (!oCard) {
|
|
133
185
|
return;
|
|
134
186
|
}
|
|
135
187
|
|
|
136
|
-
|
|
188
|
+
oContent = oCard.getCardContent();
|
|
137
189
|
iStartIndex = this.getPageNumber() * this.getPageSize();
|
|
190
|
+
bIsPageChanged = this._iPreviousStartIndex !== undefined && this._iPreviousStartIndex !== iStartIndex;
|
|
138
191
|
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
|
|
192
|
+
if (bIsPageChanged) {
|
|
193
|
+
this._prepareAnimation(iStartIndex);
|
|
194
|
+
}
|
|
142
195
|
|
|
196
|
+
if (this.isServerSide()) {
|
|
197
|
+
if (bIsPageChanged) {
|
|
198
|
+
// changing the model is triggering data update
|
|
199
|
+
// so there is no need to call "refreshData" method
|
|
143
200
|
this.getModel("paginator").setData({
|
|
144
201
|
skip: iStartIndex,
|
|
145
202
|
size: this.getPageSize(),
|
|
146
203
|
pageIndex: this.getPageNumber()
|
|
147
204
|
});
|
|
148
205
|
|
|
149
|
-
|
|
206
|
+
if (this._hasAnimation()) {
|
|
207
|
+
oContent.getAggregation("_loadingProvider")._bAwaitPagination = true;
|
|
208
|
+
oCard.getAggregation("_loadingProvider")._bAwaitPagination = true;
|
|
209
|
+
}
|
|
150
210
|
}
|
|
151
211
|
} else {
|
|
152
|
-
|
|
212
|
+
oContent.sliceData(iStartIndex, iStartIndex + this.getPageSize());
|
|
153
213
|
}
|
|
154
214
|
|
|
155
215
|
this._iPreviousStartIndex = iStartIndex;
|
|
156
216
|
};
|
|
157
217
|
|
|
218
|
+
Paginator.prototype._prepareAnimation = function (iStartIndex) {
|
|
219
|
+
if (!this._hasAnimation()) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
var oContentDomRef = this.getCard().getCardContent().getDomRef(),
|
|
224
|
+
oContentDomRefCloned = oContentDomRef.cloneNode(true);
|
|
225
|
+
|
|
226
|
+
this._bActiveAnimation = true;
|
|
227
|
+
this._bReverseAnimation = this._iPreviousStartIndex > iStartIndex;
|
|
228
|
+
|
|
229
|
+
oContentDomRefCloned.removeAttribute("id");
|
|
230
|
+
|
|
231
|
+
oContentDomRefCloned.querySelectorAll("*[id]").forEach(function (oElement) {
|
|
232
|
+
oElement.removeAttribute("id");
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
oContentDomRefCloned.classList.add("sapFCardContentCloned");
|
|
236
|
+
if (this._bReverseAnimation) {
|
|
237
|
+
oContentDomRefCloned.classList.add("sapFCardContentReverseAnim");
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (this.isServerSide()) {
|
|
241
|
+
this._oClonedContent = oContentDomRefCloned;
|
|
242
|
+
} else {
|
|
243
|
+
oContentDomRef.classList.add("sapFCardContentOriginal");
|
|
244
|
+
|
|
245
|
+
if (this._bReverseAnimation) {
|
|
246
|
+
oContentDomRef.classList.add("sapFCardContentReverseAnim");
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
oContentDomRef.parentElement.insertBefore(oContentDomRefCloned, oContentDomRef);
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
Paginator.prototype._clearAnimation = function () {
|
|
254
|
+
if (!this._hasAnimation()) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
var oCard = this.getCard(),
|
|
259
|
+
oContent = oCard.getCardContent(),
|
|
260
|
+
oContentDomRef = oContent.getDomRef(),
|
|
261
|
+
oContentDomRefCloned = oContentDomRef.previousSibling,
|
|
262
|
+
oCardLoadingProvider,
|
|
263
|
+
oContentLoadingProvider;
|
|
264
|
+
|
|
265
|
+
oCardLoadingProvider = oCard.getAggregation("_loadingProvider");
|
|
266
|
+
oContentLoadingProvider = oContent.getAggregation("_loadingProvider");
|
|
267
|
+
|
|
268
|
+
if (oContentLoadingProvider._bAwaitPagination) {
|
|
269
|
+
oContentLoadingProvider._bAwaitPagination = false;
|
|
270
|
+
oCardLoadingProvider._bAwaitPagination = false;
|
|
271
|
+
} else {
|
|
272
|
+
oContentDomRefCloned.parentNode.removeChild(oContentDomRefCloned);
|
|
273
|
+
|
|
274
|
+
oContentDomRef.classList.remove("sapFCardContentOriginal");
|
|
275
|
+
oContentDomRef.classList.remove("sapFCardContentTransition");
|
|
276
|
+
oContentDomRef.classList.remove("sapFCardContentReverseAnim");
|
|
277
|
+
|
|
278
|
+
oContent.hideLoadingPlaceholders();
|
|
279
|
+
oCardLoadingProvider.setLoading(false);
|
|
280
|
+
this._bActiveAnimation = false;
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
Paginator.prototype._listUpdateFinished = function () {
|
|
285
|
+
if (!this._bActiveAnimation || this.isServerSide()) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
var oContent = this.getCard().getCardContent(),
|
|
290
|
+
oContentDomRef = oContent.getDomRef(),
|
|
291
|
+
oContentDomRefCloned = oContentDomRef.previousSibling;
|
|
292
|
+
|
|
293
|
+
oContentDomRefCloned.addEventListener("transitionend", function () {
|
|
294
|
+
oContentDomRefCloned.parentNode.removeChild(oContentDomRefCloned);
|
|
295
|
+
|
|
296
|
+
oContentDomRef.classList.remove("sapFCardContentOriginal");
|
|
297
|
+
oContentDomRef.classList.remove("sapFCardContentTransition");
|
|
298
|
+
oContentDomRef.classList.remove("sapFCardContentReverseAnim");
|
|
299
|
+
|
|
300
|
+
this._bActiveAnimation = false;
|
|
301
|
+
}.bind(this));
|
|
302
|
+
|
|
303
|
+
oContentDomRef.classList.add("sapFCardContentTransition");
|
|
304
|
+
oContentDomRefCloned.classList.add("sapFCardContentTransition");
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
Paginator.prototype.onPlaceholderAfterRendering = function () {
|
|
308
|
+
if (!this._oClonedContent) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
var oCard = this.getCard(),
|
|
313
|
+
oContent = oCard.getCardContent(),
|
|
314
|
+
oContentDomRef = oContent.getDomRef(),
|
|
315
|
+
oContentDomRefCloned = this._oClonedContent;
|
|
316
|
+
|
|
317
|
+
oContentDomRef.classList.add("sapFCardContentOriginal");
|
|
318
|
+
oContentDomRef.parentElement.insertBefore(oContentDomRefCloned, oContentDomRef);
|
|
319
|
+
|
|
320
|
+
if (this._bReverseAnimation) {
|
|
321
|
+
oContentDomRef.classList.add("sapFCardContentReverseAnim");
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
this._oClonedContent.addEventListener("transitionend", function () {
|
|
325
|
+
setTimeout(this._clearAnimation.bind(this), iServerSideAfterTransitionDelay);
|
|
326
|
+
}.bind(this));
|
|
327
|
+
|
|
328
|
+
this._oClonedContent = null;
|
|
329
|
+
|
|
330
|
+
setTimeout(function () {
|
|
331
|
+
oContentDomRefCloned.classList.add("sapFCardContentTransition");
|
|
332
|
+
oContentDomRef.classList.add("sapFCardContentTransition");
|
|
333
|
+
}, 30);
|
|
334
|
+
};
|
|
335
|
+
|
|
158
336
|
Paginator.prototype._getNavigationArrow = function (sDirection) {
|
|
159
337
|
return this.getAggregation("_" + sDirection + "Icon");
|
|
160
338
|
};
|
|
161
339
|
|
|
340
|
+
Paginator.prototype._hasAnimation = function () {
|
|
341
|
+
return bHasAnimations && this.getCard().getCardContent().isA("sap.ui.integration.cards.ListContent");
|
|
342
|
+
};
|
|
343
|
+
|
|
162
344
|
Paginator.prototype._previous = function () {
|
|
345
|
+
if (this._bActiveAnimation) {
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
|
|
163
349
|
this.setPageNumber(Math.max(0, this.getPageNumber() - 1));
|
|
164
350
|
this.sliceData();
|
|
165
351
|
};
|
|
166
352
|
|
|
167
353
|
Paginator.prototype._next = function () {
|
|
354
|
+
if (this._bActiveAnimation) {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
|
|
168
358
|
this.setPageNumber(Math.min(this.getPageCount() - 1, this.getPageNumber() + 1));
|
|
169
359
|
this.sliceData();
|
|
170
360
|
};
|
|
171
361
|
|
|
362
|
+
Paginator.prototype.onmousedown = function(oEvent) {
|
|
363
|
+
var oTarget = oEvent.target,
|
|
364
|
+
sDataSlide = oTarget.getAttribute("data-slide");
|
|
365
|
+
|
|
366
|
+
if (sDataSlide && !oTarget.classList.contains("sapMCrslActive")) {
|
|
367
|
+
this.setPageNumber(parseInt(sDataSlide) - 1);
|
|
368
|
+
this.sliceData();
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
|
|
172
372
|
return Paginator;
|
|
173
373
|
});
|