@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.
Files changed (189) hide show
  1. package/.eslintrc.json +18 -0
  2. package/THIRDPARTY.txt +5 -5
  3. package/package.json +3 -3
  4. package/src/sap/ui/integration/.library +1 -1
  5. package/src/sap/ui/integration/ActionDefinition.js +1 -1
  6. package/src/sap/ui/integration/Designtime.js +1 -1
  7. package/src/sap/ui/integration/Extension.js +1 -1
  8. package/src/sap/ui/integration/Host.js +1 -1
  9. package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
  10. package/src/sap/ui/integration/cards/AnalyticalContent.js +3 -2
  11. package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
  12. package/src/sap/ui/integration/cards/BaseContent.js +4 -3
  13. package/src/sap/ui/integration/cards/BaseListContent.js +1 -1
  14. package/src/sap/ui/integration/cards/CalendarContent.js +1 -1
  15. package/src/sap/ui/integration/cards/ComponentContent.js +1 -1
  16. package/src/sap/ui/integration/cards/Footer.js +1 -1
  17. package/src/sap/ui/integration/cards/Header.js +4 -2
  18. package/src/sap/ui/integration/cards/ListContent.js +1 -1
  19. package/src/sap/ui/integration/cards/NumericHeader.js +5 -2
  20. package/src/sap/ui/integration/cards/ObjectContent.js +68 -10
  21. package/src/sap/ui/integration/cards/TableContent.js +1 -1
  22. package/src/sap/ui/integration/cards/TimelineContent.js +1 -1
  23. package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
  24. package/src/sap/ui/integration/cards/actions/CardActions.js +1 -1
  25. package/src/sap/ui/integration/cards/actions/HideCardAction.js +12 -3
  26. package/src/sap/ui/integration/cards/actions/ShowCardAction.js +33 -1
  27. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +1 -1
  28. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputDate.js +1 -1
  29. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputNumber.js +1 -1
  30. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +1 -1
  31. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +1 -1
  32. package/src/sap/ui/integration/cards/filters/BaseFilter.js +1 -1
  33. package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +1 -1
  34. package/src/sap/ui/integration/cards/filters/FilterBar.js +1 -1
  35. package/src/sap/ui/integration/cards/filters/FilterBarFactory.js +1 -1
  36. package/src/sap/ui/integration/cards/filters/SearchFilter.js +1 -1
  37. package/src/sap/ui/integration/cards/filters/SelectFilter.js +1 -1
  38. package/src/sap/ui/integration/controls/ActionsStrip.js +57 -24
  39. package/src/sap/ui/integration/controls/ActionsToolbar.js +1 -1
  40. package/src/sap/ui/integration/controls/LinkWithIcon.js +77 -0
  41. package/src/sap/ui/integration/controls/LinkWithIconRenderer.js +38 -0
  42. package/src/sap/ui/integration/controls/ListContentItem.js +1 -1
  43. package/src/sap/ui/integration/controls/Microchart.js +1 -1
  44. package/src/sap/ui/integration/controls/MicrochartLegend.js +1 -1
  45. package/src/sap/ui/integration/controls/Paginator.js +218 -18
  46. package/src/sap/ui/integration/controls/PaginatorRenderer.js +2 -0
  47. package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +1 -1
  48. package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +1 -1
  49. package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +1 -1
  50. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +1 -1
  51. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +1 -1
  52. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +1 -1
  53. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  54. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.js +1 -1
  55. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.js +1 -1
  56. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.js +1 -1
  57. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/groupEditor/GroupEditor.js +1 -1
  58. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
  59. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IsInIconPool.validator.js +1 -1
  60. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor.js +1 -1
  61. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.js +1 -1
  62. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +1 -1
  63. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +1 -1
  64. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/multiSelectEditor/MultiSelectEditor.js +1 -1
  65. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.js +1 -1
  66. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/objectArrayEditor/ObjectArrayEditor.js +1 -1
  67. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor.js +1 -1
  68. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/separatorEditor/SeparatorEditor.js +1 -1
  69. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor.js +1 -1
  70. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js +1 -1
  71. package/src/sap/ui/integration/designtime/baseEditor/util/binding/ObjectBinding.js +1 -1
  72. package/src/sap/ui/integration/designtime/baseEditor/util/unset.js +1 -1
  73. package/src/sap/ui/integration/designtime/baseEditor/validator/IsBoolean.js +1 -1
  74. package/src/sap/ui/integration/designtime/baseEditor/validator/IsDate.js +1 -1
  75. package/src/sap/ui/integration/designtime/baseEditor/validator/IsInteger.js +1 -1
  76. package/src/sap/ui/integration/designtime/baseEditor/validator/IsNumber.js +1 -1
  77. package/src/sap/ui/integration/designtime/baseEditor/validator/IsSelectedKey.js +1 -1
  78. package/src/sap/ui/integration/designtime/baseEditor/validator/IsStringList.js +1 -1
  79. package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueKey.js +1 -1
  80. package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueList.js +1 -1
  81. package/src/sap/ui/integration/designtime/baseEditor/validator/IsValidBinding.js +1 -1
  82. package/src/sap/ui/integration/designtime/baseEditor/validator/MaxLength.js +1 -1
  83. package/src/sap/ui/integration/designtime/baseEditor/validator/NotABinding.js +1 -1
  84. package/src/sap/ui/integration/designtime/baseEditor/validator/ValidatorRegistry.js +1 -1
  85. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/complexMapEditor/ComplexMapEditor.js +1 -1
  86. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/destinationsEditor/DestinationsEditor.js +1 -1
  87. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/filtersEditor/FiltersEditor.js +1 -1
  88. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
  89. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersEditor.js +1 -1
  90. package/src/sap/ui/integration/designtime/editor/CardEditor.js +87 -7
  91. package/src/sap/ui/integration/designtime/editor/CardPreview.js +1 -1
  92. package/src/sap/ui/integration/editor/Editor.js +44 -34
  93. package/src/sap/ui/integration/editor/EditorResourceBundles.js +1 -1
  94. package/src/sap/ui/integration/editor/Extension.js +1 -1
  95. package/src/sap/ui/integration/editor/Manifest.js +1 -1
  96. package/src/sap/ui/integration/editor/Settings.js +1 -1
  97. package/src/sap/ui/integration/editor/fields/BaseField.js +8 -8
  98. package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
  99. package/src/sap/ui/integration/editor/fields/DateField.js +1 -1
  100. package/src/sap/ui/integration/editor/fields/DateTimeField.js +1 -1
  101. package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -1
  102. package/src/sap/ui/integration/editor/fields/IntegerField.js +1 -1
  103. package/src/sap/ui/integration/editor/fields/NumberField.js +1 -1
  104. package/src/sap/ui/integration/editor/fields/ObjectField.js +49 -25
  105. package/src/sap/ui/integration/editor/fields/ObjectListField.js +3 -3
  106. package/src/sap/ui/integration/editor/fields/StringField.js +4 -4
  107. package/src/sap/ui/integration/editor/fields/StringListField.js +38 -52
  108. package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +1 -1
  109. package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +1 -1
  110. package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +1 -1
  111. package/src/sap/ui/integration/library.js +12 -15
  112. package/src/sap/ui/integration/messagebundle.properties +9 -3
  113. package/src/sap/ui/integration/messagebundle_ar.properties +7 -3
  114. package/src/sap/ui/integration/messagebundle_bg.properties +7 -3
  115. package/src/sap/ui/integration/messagebundle_ca.properties +5 -1
  116. package/src/sap/ui/integration/messagebundle_cs.properties +6 -2
  117. package/src/sap/ui/integration/messagebundle_cy.properties +7 -3
  118. package/src/sap/ui/integration/messagebundle_da.properties +6 -2
  119. package/src/sap/ui/integration/messagebundle_de.properties +6 -2
  120. package/src/sap/ui/integration/messagebundle_el.properties +7 -3
  121. package/src/sap/ui/integration/messagebundle_en.properties +7 -3
  122. package/src/sap/ui/integration/messagebundle_en_GB.properties +6 -2
  123. package/src/sap/ui/integration/messagebundle_en_US_sappsd.properties +6 -2
  124. package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +6 -2
  125. package/src/sap/ui/integration/messagebundle_en_US_saptrc.properties +6 -2
  126. package/src/sap/ui/integration/messagebundle_es.properties +6 -2
  127. package/src/sap/ui/integration/messagebundle_es_MX.properties +6 -2
  128. package/src/sap/ui/integration/messagebundle_et.properties +7 -3
  129. package/src/sap/ui/integration/messagebundle_fi.properties +7 -3
  130. package/src/sap/ui/integration/messagebundle_fr.properties +5 -1
  131. package/src/sap/ui/integration/messagebundle_fr_CA.properties +5 -1
  132. package/src/sap/ui/integration/messagebundle_hi.properties +6 -2
  133. package/src/sap/ui/integration/messagebundle_hr.properties +6 -2
  134. package/src/sap/ui/integration/messagebundle_hu.properties +6 -2
  135. package/src/sap/ui/integration/messagebundle_id.properties +7 -3
  136. package/src/sap/ui/integration/messagebundle_it.properties +7 -3
  137. package/src/sap/ui/integration/messagebundle_iw.properties +6 -2
  138. package/src/sap/ui/integration/messagebundle_ja.properties +6 -2
  139. package/src/sap/ui/integration/messagebundle_kk.properties +6 -2
  140. package/src/sap/ui/integration/messagebundle_ko.properties +6 -2
  141. package/src/sap/ui/integration/messagebundle_lt.properties +6 -2
  142. package/src/sap/ui/integration/messagebundle_lv.properties +7 -3
  143. package/src/sap/ui/integration/messagebundle_ms.properties +7 -3
  144. package/src/sap/ui/integration/messagebundle_nl.properties +6 -2
  145. package/src/sap/ui/integration/messagebundle_no.properties +6 -2
  146. package/src/sap/ui/integration/messagebundle_pl.properties +6 -2
  147. package/src/sap/ui/integration/messagebundle_pt.properties +6 -2
  148. package/src/sap/ui/integration/messagebundle_pt_PT.properties +7 -3
  149. package/src/sap/ui/integration/messagebundle_ro.properties +6 -2
  150. package/src/sap/ui/integration/messagebundle_ru.properties +6 -2
  151. package/src/sap/ui/integration/messagebundle_sh.properties +7 -3
  152. package/src/sap/ui/integration/messagebundle_sk.properties +7 -3
  153. package/src/sap/ui/integration/messagebundle_sl.properties +7 -3
  154. package/src/sap/ui/integration/messagebundle_sv.properties +7 -3
  155. package/src/sap/ui/integration/messagebundle_th.properties +7 -3
  156. package/src/sap/ui/integration/messagebundle_tr.properties +6 -2
  157. package/src/sap/ui/integration/messagebundle_uk.properties +7 -3
  158. package/src/sap/ui/integration/messagebundle_vi.properties +6 -2
  159. package/src/sap/ui/integration/messagebundle_zh_CN.properties +7 -3
  160. package/src/sap/ui/integration/messagebundle_zh_TW.properties +6 -2
  161. package/src/sap/ui/integration/model/ContextModel.js +1 -1
  162. package/src/sap/ui/integration/model/ObservableModel.js +1 -1
  163. package/src/sap/ui/integration/model/PagingModelListBinding.js +1 -1
  164. package/src/sap/ui/integration/themes/base/CalendarContent.less +2 -2
  165. package/src/sap/ui/integration/themes/base/Card.less +24 -0
  166. package/src/sap/ui/integration/themes/base/LinkWithIcon.less +11 -0
  167. package/src/sap/ui/integration/themes/base/ListContentItem.less +11 -0
  168. package/src/sap/ui/integration/themes/base/Paginator.less +86 -0
  169. package/src/sap/ui/integration/themes/base/library.source.less +1 -0
  170. package/src/sap/ui/integration/util/BaseFactory.js +1 -1
  171. package/src/sap/ui/integration/util/BindingHelper.js +1 -1
  172. package/src/sap/ui/integration/util/BindingResolver.js +1 -1
  173. package/src/sap/ui/integration/util/CardObserver.js +1 -1
  174. package/src/sap/ui/integration/util/ContentFactory.js +1 -1
  175. package/src/sap/ui/integration/util/CsrfTokenHandler.js +1 -1
  176. package/src/sap/ui/integration/util/DataProvider.js +1 -1
  177. package/src/sap/ui/integration/util/DataProviderFactory.js +1 -1
  178. package/src/sap/ui/integration/util/Destinations.js +1 -1
  179. package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
  180. package/src/sap/ui/integration/util/HeaderFactory.js +35 -4
  181. package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
  182. package/src/sap/ui/integration/util/LoadingProvider.js +2 -2
  183. package/src/sap/ui/integration/util/Manifest.js +1 -1
  184. package/src/sap/ui/integration/util/RequestDataProvider.js +1 -1
  185. package/src/sap/ui/integration/util/ServiceDataProvider.js +1 -1
  186. package/src/sap/ui/integration/util/ServiceManager.js +1 -1
  187. package/src/sap/ui/integration/util/SkeletonCard.js +14 -2
  188. package/src/sap/ui/integration/util/Utils.js +1 -1
  189. package/src/sap/ui/integration/widgets/Card.js +29 -7
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @extends sap.ui.base.Object
37
37
  *
38
38
  * @author SAP SE
39
- * @version 1.100.0
39
+ * @version 1.101.0
40
40
  *
41
41
  * @constructor
42
42
  * @private
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @extends sap.ui.integration.cards.filters.BaseFilter
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.100.0
26
+ * @version 1.101.0
27
27
  *
28
28
  * @constructor
29
29
  * @private
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @extends sap.ui.integration.cards.filters.BaseFilter
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.100.0
32
+ * @version 1.101.0
33
33
  *
34
34
  * @constructor
35
35
  * @private
@@ -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.100.0
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
- oButton;
135
-
136
- if (mConfig.icon) {
137
- oButton = new OverflowToolbarButton({
138
- icon: mConfig.icon,
139
- text: mConfig.text || mConfig.tooltip,
140
- tooltip: mConfig.tooltip || mConfig.text,
141
- type: mConfig.buttonType,
142
- ariaHasPopup: mConfig.ariaHasPopup,
143
- visible: mConfig.visible
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
- oButton.setLayoutData(oOverflow);
148
+ oControl.setLayoutData(oOverflow);
156
149
 
157
150
  oActions.attach({
158
151
  area: ActionArea.ActionsStrip,
159
- control: oButton,
152
+ control: oControl,
160
153
  actions: aActions,
161
154
  enabledPropertyName: "enabled"
162
155
  });
163
156
 
164
- oToolbar.addContent(oButton);
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;
@@ -76,7 +76,7 @@ sap.ui.define([
76
76
  * @extends sap.ui.core.Control
77
77
  *
78
78
  * @author SAP SE
79
- * @version 1.100.0
79
+ * @version 1.101.0
80
80
  *
81
81
  * @constructor
82
82
  * @private
@@ -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);
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * @extends sap.m.StandardListItem
35
35
  *
36
36
  * @author SAP SE
37
- * @version 1.100.0
37
+ * @version 1.101.0
38
38
  *
39
39
  * @constructor
40
40
  * @private
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.ui.core.Control
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.100.0
35
+ * @version 1.101.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.ui.core.Control
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.100.0
35
+ * @version 1.101.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -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.100.0
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
- if (oCard && this._dataChangedHandler) {
92
- oCard.detachEvent("_contentDataChange", this._dataChangedHandler);
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.dataChanged = function() {
99
- var oCardContent = this.getCard().getCardContent();
124
+ Paginator.prototype.isServerSide = function() {
125
+ return this.getTotalCount();
126
+ };
100
127
 
101
- if (!oCardContent || !oCardContent.isA("sap.ui.integration.cards.BaseContent")) {
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(oCardContent.getModel());
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
- var iTotalCount = this.getTotalCount() || oCardContent.getDataLength();
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.dataChanged.bind(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
- oCardContent,
130
- iStartIndex;
180
+ oContent,
181
+ iStartIndex,
182
+ bIsPageChanged;
131
183
 
132
184
  if (!oCard) {
133
185
  return;
134
186
  }
135
187
 
136
- oCardContent = oCard.getCardContent();
188
+ oContent = oCard.getCardContent();
137
189
  iStartIndex = this.getPageNumber() * this.getPageSize();
190
+ bIsPageChanged = this._iPreviousStartIndex !== undefined && this._iPreviousStartIndex !== iStartIndex;
138
191
 
139
- if (this.getTotalCount()) {
140
- if (this._iPreviousStartIndex !== undefined
141
- && this._iPreviousStartIndex !== iStartIndex) {
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
- oCardContent.refreshData();
206
+ if (this._hasAnimation()) {
207
+ oContent.getAggregation("_loadingProvider")._bAwaitPagination = true;
208
+ oCard.getAggregation("_loadingProvider")._bAwaitPagination = true;
209
+ }
150
210
  }
151
211
  } else {
152
- oCard.getCardContent().sliceData(iStartIndex, iStartIndex + this.getPageSize());
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
  });
@@ -64,6 +64,8 @@ sap.ui.define([
64
64
  label: oResourceBundle.getText("CAROUSEL_POSITION", [i + 1, iPageCount])
65
65
  });
66
66
 
67
+ oRm.attr("data-slide", i + 1);
68
+
67
69
  if (i === iPageNumber) {
68
70
  oRm.class("sapMCrslActive");
69
71
  }
@@ -132,7 +132,7 @@ sap.ui.define([
132
132
  * @alias sap.ui.integration.designtime.baseEditor.BaseEditor
133
133
  * @author SAP SE
134
134
  * @since 1.70.0
135
- * @version 1.100.0
135
+ * @version 1.101.0
136
136
  * @private
137
137
  * @experimental since 1.70.0
138
138
  * @ui5-restricted
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @alias sap.ui.integration.designtime.baseEditor.PropertyEditor
38
38
  * @author SAP SE
39
39
  * @since 1.73.0
40
- * @version 1.100.0
40
+ * @version 1.101.0
41
41
  * @private
42
42
  * @experimental since 1.73.0
43
43
  * @ui5-restricted
@@ -67,7 +67,7 @@ sap.ui.define([
67
67
  * @alias sap.ui.integration.designtime.baseEditor.PropertyEditors
68
68
  * @author SAP SE
69
69
  * @since 1.73.0
70
- * @version 1.100.0
70
+ * @version 1.101.0
71
71
  * @private
72
72
  * @experimental since 1.73.0
73
73
  * @ui5-restricted
@@ -52,7 +52,7 @@ sap.ui.define([
52
52
  * @alias sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor
53
53
  * @author SAP SE
54
54
  * @since 1.70
55
- * @version 1.100.0
55
+ * @version 1.101.0
56
56
  *
57
57
  * @private
58
58
  * @experimental 1.70