@openui5/sap.f 1.133.0 → 1.134.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 (150) hide show
  1. package/.reuse/dep5 +0 -7
  2. package/THIRDPARTY.txt +1 -22
  3. package/package.json +4 -4
  4. package/src/sap/f/.library +1 -1
  5. package/src/sap/f/Avatar.js +1 -1
  6. package/src/sap/f/AvatarGroup.js +1 -1
  7. package/src/sap/f/AvatarGroupItem.js +1 -1
  8. package/src/sap/f/CalendarAppointmentInCard.js +1 -1
  9. package/src/sap/f/CalendarInCard.js +1 -1
  10. package/src/sap/f/Card.js +1 -1
  11. package/src/sap/f/CardBase.js +65 -25
  12. package/src/sap/f/CardRenderer.js +9 -6
  13. package/src/sap/f/DynamicPage.js +12 -1
  14. package/src/sap/f/DynamicPageAccessibleLandmarkInfo.js +1 -1
  15. package/src/sap/f/DynamicPageHeader.js +1 -1
  16. package/src/sap/f/DynamicPageRenderer.js +1 -1
  17. package/src/sap/f/DynamicPageTitle.js +34 -1
  18. package/src/sap/f/FlexibleColumnLayout.js +1 -1
  19. package/src/sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo.js +1 -1
  20. package/src/sap/f/FlexibleColumnLayoutData.js +1 -1
  21. package/src/sap/f/FlexibleColumnLayoutDataForDesktop.js +1 -1
  22. package/src/sap/f/FlexibleColumnLayoutDataForTablet.js +1 -1
  23. package/src/sap/f/FlexibleColumnLayoutSemanticHelper.js +1 -1
  24. package/src/sap/f/GridContainer.js +60 -110
  25. package/src/sap/f/GridContainerItemLayoutData.js +1 -1
  26. package/src/sap/f/GridContainerRenderer.js +8 -3
  27. package/src/sap/f/GridContainerSettings.js +2 -2
  28. package/src/sap/f/GridContainerUtils.js +8 -0
  29. package/src/sap/f/GridList.js +1 -1
  30. package/src/sap/f/GridListItem.js +1 -1
  31. package/src/sap/f/IllustratedMessage.js +1 -1
  32. package/src/sap/f/Illustration.js +1 -1
  33. package/src/sap/f/PlanningCalendarInCardLegend.js +1 -1
  34. package/src/sap/f/ProductSwitch.js +1 -1
  35. package/src/sap/f/ProductSwitchItem.js +1 -1
  36. package/src/sap/f/SearchManager.js +1 -1
  37. package/src/sap/f/ShellBar.js +1 -1
  38. package/src/sap/f/ShellBarRenderer.js +1 -0
  39. package/src/sap/f/SidePanel.js +1 -1
  40. package/src/sap/f/SidePanelItem.js +1 -1
  41. package/src/sap/f/cards/BaseHeader.js +35 -20
  42. package/src/sap/f/cards/BaseHeaderRenderer.js +212 -3
  43. package/src/sap/f/cards/Header.js +2 -8
  44. package/src/sap/f/cards/HeaderRenderer.js +0 -161
  45. package/src/sap/f/cards/NumericHeader.js +3 -9
  46. package/src/sap/f/cards/NumericHeaderRenderer.js +54 -126
  47. package/src/sap/f/cards/NumericIndicators.js +1 -1
  48. package/src/sap/f/cards/NumericSideIndicator.js +1 -1
  49. package/src/sap/f/cards/loading/AnalyticalPlaceholder.js +1 -1
  50. package/src/sap/f/cards/loading/CalendarPlaceholder.js +1 -1
  51. package/src/sap/f/cards/loading/GenericPlaceholder.js +1 -1
  52. package/src/sap/f/cards/loading/ListPlaceholder.js +1 -1
  53. package/src/sap/f/cards/loading/ObjectPlaceholder.js +1 -1
  54. package/src/sap/f/cards/loading/PlaceholderBase.js +1 -1
  55. package/src/sap/f/cards/loading/TablePlaceholder.js +1 -1
  56. package/src/sap/f/cards/loading/TimelinePlaceholder.js +1 -1
  57. package/src/sap/f/changeHandler/MoveDynamicPageTitleActions.js +1 -1
  58. package/src/sap/f/delegate/GridContainerItemNavigation.js +24 -202
  59. package/src/sap/f/delegate/GridItemNavigation.js +23 -10
  60. package/src/sap/f/dnd/GridDragOver.js +1 -1
  61. package/src/sap/f/dnd/GridDropInfo.js +1 -1
  62. package/src/sap/f/library.js +36 -2
  63. package/src/sap/f/messagebundle.properties +0 -3
  64. package/src/sap/f/messagebundle_ar.properties +0 -2
  65. package/src/sap/f/messagebundle_bg.properties +0 -2
  66. package/src/sap/f/messagebundle_ca.properties +0 -2
  67. package/src/sap/f/messagebundle_cnr.properties +0 -2
  68. package/src/sap/f/messagebundle_cs.properties +0 -2
  69. package/src/sap/f/messagebundle_cy.properties +0 -2
  70. package/src/sap/f/messagebundle_da.properties +0 -2
  71. package/src/sap/f/messagebundle_de.properties +0 -2
  72. package/src/sap/f/messagebundle_el.properties +0 -2
  73. package/src/sap/f/messagebundle_en.properties +0 -2
  74. package/src/sap/f/messagebundle_en_GB.properties +0 -2
  75. package/src/sap/f/messagebundle_en_US_saprigi.properties +0 -2
  76. package/src/sap/f/messagebundle_es.properties +0 -2
  77. package/src/sap/f/messagebundle_es_MX.properties +0 -2
  78. package/src/sap/f/messagebundle_et.properties +0 -2
  79. package/src/sap/f/messagebundle_fi.properties +0 -2
  80. package/src/sap/f/messagebundle_fr.properties +0 -2
  81. package/src/sap/f/messagebundle_fr_CA.properties +0 -2
  82. package/src/sap/f/messagebundle_hi.properties +0 -2
  83. package/src/sap/f/messagebundle_hr.properties +0 -2
  84. package/src/sap/f/messagebundle_hu.properties +0 -2
  85. package/src/sap/f/messagebundle_id.properties +0 -2
  86. package/src/sap/f/messagebundle_it.properties +0 -2
  87. package/src/sap/f/messagebundle_iw.properties +0 -2
  88. package/src/sap/f/messagebundle_ja.properties +0 -2
  89. package/src/sap/f/messagebundle_kk.properties +0 -2
  90. package/src/sap/f/messagebundle_ko.properties +0 -2
  91. package/src/sap/f/messagebundle_lt.properties +0 -2
  92. package/src/sap/f/messagebundle_lv.properties +0 -2
  93. package/src/sap/f/messagebundle_mk.properties +0 -2
  94. package/src/sap/f/messagebundle_ms.properties +0 -2
  95. package/src/sap/f/messagebundle_nl.properties +0 -2
  96. package/src/sap/f/messagebundle_no.properties +0 -2
  97. package/src/sap/f/messagebundle_pl.properties +0 -2
  98. package/src/sap/f/messagebundle_pt.properties +0 -2
  99. package/src/sap/f/messagebundle_pt_PT.properties +0 -2
  100. package/src/sap/f/messagebundle_ro.properties +0 -2
  101. package/src/sap/f/messagebundle_ru.properties +0 -2
  102. package/src/sap/f/messagebundle_sh.properties +0 -2
  103. package/src/sap/f/messagebundle_sk.properties +0 -2
  104. package/src/sap/f/messagebundle_sl.properties +0 -2
  105. package/src/sap/f/messagebundle_sr.properties +0 -2
  106. package/src/sap/f/messagebundle_sv.properties +0 -2
  107. package/src/sap/f/messagebundle_th.properties +0 -2
  108. package/src/sap/f/messagebundle_tr.properties +0 -2
  109. package/src/sap/f/messagebundle_uk.properties +0 -2
  110. package/src/sap/f/messagebundle_vi.properties +0 -2
  111. package/src/sap/f/messagebundle_zh_CN.properties +0 -2
  112. package/src/sap/f/messagebundle_zh_TW.properties +0 -2
  113. package/src/sap/f/semantic/AddAction.js +1 -1
  114. package/src/sap/f/semantic/CloseAction.js +1 -1
  115. package/src/sap/f/semantic/CopyAction.js +1 -1
  116. package/src/sap/f/semantic/DeleteAction.js +1 -1
  117. package/src/sap/f/semantic/DiscussInJamAction.js +1 -1
  118. package/src/sap/f/semantic/EditAction.js +1 -1
  119. package/src/sap/f/semantic/ExitFullScreenAction.js +1 -1
  120. package/src/sap/f/semantic/FavoriteAction.js +1 -1
  121. package/src/sap/f/semantic/FlagAction.js +1 -1
  122. package/src/sap/f/semantic/FooterMainAction.js +1 -1
  123. package/src/sap/f/semantic/FullScreenAction.js +1 -1
  124. package/src/sap/f/semantic/MainAction.js +1 -1
  125. package/src/sap/f/semantic/MessagesIndicator.js +1 -1
  126. package/src/sap/f/semantic/NegativeAction.js +1 -1
  127. package/src/sap/f/semantic/PositiveAction.js +1 -1
  128. package/src/sap/f/semantic/PrintAction.js +1 -1
  129. package/src/sap/f/semantic/SemanticButton.js +1 -1
  130. package/src/sap/f/semantic/SemanticConfiguration.js +1 -1
  131. package/src/sap/f/semantic/SemanticControl.js +1 -1
  132. package/src/sap/f/semantic/SemanticPage.js +1 -1
  133. package/src/sap/f/semantic/SemanticToggleButton.js +1 -1
  134. package/src/sap/f/semantic/SendEmailAction.js +1 -1
  135. package/src/sap/f/semantic/SendMessageAction.js +1 -1
  136. package/src/sap/f/semantic/ShareInJamAction.js +1 -1
  137. package/src/sap/f/semantic/TitleMainAction.js +1 -1
  138. package/src/sap/f/shellBar/AdditionalContentSupport.js +1 -1
  139. package/src/sap/f/shellBar/CoPilot.js +1 -1
  140. package/src/sap/f/shellBar/ControlSpacer.js +1 -1
  141. package/src/sap/f/shellBar/Factory.js +7 -1
  142. package/src/sap/f/shellBar/Search.js +1 -1
  143. package/src/sap/f/themes/base/Card.less +77 -41
  144. package/src/sap/f/themes/base/CardHeaders.less +27 -37
  145. package/src/sap/f/themes/base/CardLoading.less +3 -3
  146. package/src/sap/f/themes/base/DynamicPage.less +5 -0
  147. package/src/sap/f/themes/base/GridContainer.less +10 -13
  148. package/src/sap/f/themes/sap_hcb/base_Card.less +3 -10
  149. package/src/sap/f/themes/sap_hcb/base_GridContainer.less +0 -13
  150. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +0 -5
@@ -10,159 +10,87 @@ sap.ui.define([
10
10
  ], function (BaseHeaderRenderer, Renderer) {
11
11
  "use strict";
12
12
 
13
- var NumericHeaderRenderer = Renderer.extend(BaseHeaderRenderer);
13
+ const NumericHeaderRenderer = Renderer.extend(BaseHeaderRenderer);
14
14
  NumericHeaderRenderer.apiVersion = 2;
15
15
 
16
16
  /**
17
- * Render a numeric header.
18
- *
19
- * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer
20
- * @param {sap.f.cards.NumericHeader} oNumericHeader An object representation of the control that should be rendered
17
+ * @override
21
18
  */
22
- NumericHeaderRenderer.render = function (oRm, oNumericHeader) {
23
- const bLoading = oNumericHeader.isLoading(),
24
- oError = oNumericHeader.getAggregation("_error"),
25
- bRenderAsLink = oNumericHeader.isLink(),
26
- oToolbar = oNumericHeader.getToolbar();
27
-
28
- oRm.openStart("div", oNumericHeader)
29
- .class("sapFCardHeader")
30
- .class("sapFCardNumericHeader");
31
-
32
- if (bLoading) {
33
- oRm.class("sapFCardHeaderLoading");
34
- }
19
+ NumericHeaderRenderer.renderHeaderAttributes = function (oRm, oHeader) {
20
+ oRm.class("sapFCardNumericHeader");
35
21
 
36
- if (oNumericHeader.isInteractive()) {
37
- oRm.class("sapFCardSectionClickable");
38
- }
39
-
40
- if (oNumericHeader.getIconSrc() && oNumericHeader.getIconVisible()) {
41
- oRm.class("sapFCardHeaderHasIcon");
42
- }
43
-
44
- if (oNumericHeader.getNumber() && oNumericHeader.getNumberVisible()) {
22
+ if (oHeader.getNumber() && oHeader.getNumberVisible()) {
45
23
  oRm.class("sapFCardHeaderHasNumber");
46
24
  }
25
+ };
47
26
 
48
- if (oToolbar?.getVisible()) {
49
- oRm.class("sapFCardHeaderHasToolbar");
50
- }
51
-
52
- oRm.openEnd();
27
+ /**
28
+ * @override
29
+ */
30
+ NumericHeaderRenderer.hasNumericPart = function (oHeader) {
31
+ const oBindingInfos = oHeader.mBindingInfos;
32
+ const bHasMainIndicator = oHeader.getNumber() || oHeader.isBound("number");
33
+ const bHasSideIndicators = oHeader.getSideIndicators().length > 0;
34
+ const bHasDetails = oHeader.getDetails() || oBindingInfos.details;
35
+ const bHasDataTimestamp = oHeader.getDataTimestamp() || oBindingInfos.dataTimestamp;
36
+
37
+ return bHasMainIndicator || bHasSideIndicators || bHasDetails || bHasDataTimestamp;
38
+ };
53
39
 
54
- if (bRenderAsLink) {
55
- oRm.openStart("a");
56
- BaseHeaderRenderer.linkAttributes(oRm, oNumericHeader);
57
- } else {
58
- oRm.openStart("div");
40
+ /**
41
+ * @override
42
+ */
43
+ NumericHeaderRenderer.renderNumericPart = function (oRm, oHeader) {
44
+ if (oHeader.getProperty("useTileLayout")) {
45
+ return;
59
46
  }
60
47
 
61
- oRm.attr("id", oNumericHeader.getId() + "-focusable")
62
- .class("sapFCardHeaderContent");
48
+ const oMicroChart = oHeader.getMicroChart();
63
49
 
64
- if (oNumericHeader.getProperty("focusable") && !oNumericHeader._isInsideGridContainer()) {
65
- oRm.attr("tabindex", "0");
66
- }
50
+ oRm.openStart("div")
51
+ .class("sapFCardNumericHeaderNumericPart")
52
+ .class("sapFCardHeaderLastPart")
53
+ .openEnd();
67
54
 
68
- if (!oNumericHeader._isInsideGridContainer()) {
69
- oRm.accessibilityState({
70
- labelledby: {value: oNumericHeader._getAriaLabelledBy(), append: true},
71
- role: oNumericHeader.getFocusableElementAriaRole(),
72
- roledescription: oNumericHeader.getAriaRoleDescription()
73
- });
74
- }
55
+ oRm.openStart("div")
56
+ .class("sapFCardHeaderNumericPartFirstLine")
57
+ .openEnd();
75
58
 
76
- oRm.openEnd();
59
+ this._renderIndicators(oRm, oHeader);
77
60
 
78
- if (oError) {
79
- oRm.renderControl(oError);
80
- } else {
81
- NumericHeaderRenderer.renderHeaderText(oRm, oNumericHeader);
82
- NumericHeaderRenderer.renderAvatarAndIndicatorsLine(oRm, oNumericHeader);
83
- NumericHeaderRenderer.renderDetails(oRm, oNumericHeader);
84
- BaseHeaderRenderer.renderBanner(oRm, oNumericHeader);
61
+ if (oMicroChart) {
62
+ oRm.renderControl(oMicroChart);
85
63
  }
86
64
 
87
- if (bRenderAsLink) {
88
- oRm.close("a");
89
- } else {
90
- oRm.close("div");
91
- }
65
+ oRm.close("div"); // sapFCardHeaderNumericPartFirstLine
92
66
 
93
- if (!oError) {
94
- NumericHeaderRenderer.renderToolbar(oRm, oNumericHeader);
95
- }
67
+ this._renderDetails(oRm, oHeader);
96
68
 
97
69
  oRm.close("div");
98
70
  };
99
71
 
100
72
  /**
101
- * Render toolbar.
102
- *
103
- * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer
104
- * @param {sap.f.cards.NumericHeader} oNumericHeader An object representation of the control that should be rendered
105
- */
106
- NumericHeaderRenderer.renderToolbar = function (oRm, oNumericHeader) {
107
- var oToolbar = oNumericHeader.getToolbar();
108
-
109
- if (oToolbar) {
110
- oRm.openStart("div")
111
- .class("sapFCardHeaderToolbarCont")
112
- .openEnd();
113
-
114
- oRm.renderControl(oToolbar);
115
-
116
- oRm.close("div");
117
- }
118
- };
119
-
120
- /**
121
- * Render title and subtitle texts.
122
- *
123
- * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer
124
- * @param {sap.f.cards.NumericHeader} oNumericHeader An object representation of the control that should be rendered
73
+ * @override
125
74
  */
126
- NumericHeaderRenderer.renderHeaderText = function(oRm, oNumericHeader) {
127
- var oTitle = oNumericHeader.getAggregation("_title"),
128
- sStatus = oNumericHeader.getStatusText(),
129
- oBindingInfos = oNumericHeader.mBindingInfos;
130
-
131
- // TODO reuse title and subtitle rendering from the default header if possible
75
+ NumericHeaderRenderer.renderMainContentInTileLayout = function (oRm, oHeader) {
132
76
  oRm.openStart("div")
133
77
  .class("sapFCardHeaderText")
134
78
  .openEnd();
135
79
 
136
- oRm.openStart("div")
137
- .class("sapFCardHeaderTextFirstLine")
138
- .openEnd();
139
-
140
- if (oTitle) {
141
- if (oBindingInfos.title) {
142
- oTitle.addStyleClass("sapFCardHeaderItemBinded");
143
- }
144
- oTitle.addStyleClass("sapFCardTitle");
145
- oRm.renderControl(oTitle);
146
- }
147
-
148
- if (sStatus && oNumericHeader.getStatusVisible()) {
149
- oRm.openStart("span", oNumericHeader.getId() + "-status")
150
- .class("sapFCardStatus");
151
-
152
- if (oBindingInfos.statusText) {
153
- oRm.class("sapFCardHeaderItemBinded");
154
- }
155
-
156
- oRm.openEnd()
157
- .text(sStatus)
158
- .close("span");
159
- }
80
+ BaseHeaderRenderer.renderMainPartFirstLine(oRm, oHeader);
81
+ this._renderSubtitle(oRm, oHeader);
160
82
 
161
83
  oRm.close("div");
162
84
 
163
- NumericHeaderRenderer.renderSubtitle(oRm, oNumericHeader);
85
+ this._renderAvatarAndIndicatorsLine(oRm, oHeader);
86
+ this._renderDetails(oRm, oHeader);
87
+ };
164
88
 
165
- oRm.close("div");
89
+ /**
90
+ * @override
91
+ */
92
+ NumericHeaderRenderer.renderMainPartSecondLine = function (oRm, oHeader) {
93
+ this._renderSubtitle(oRm, oHeader);
166
94
  };
167
95
 
168
96
  /**
@@ -171,7 +99,7 @@ sap.ui.define([
171
99
  * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer
172
100
  * @param {sap.f.cards.NumericHeader} oNumericHeader An object representation of the control that should be rendered
173
101
  */
174
- NumericHeaderRenderer.renderSubtitle = function(oRm, oNumericHeader) {
102
+ NumericHeaderRenderer._renderSubtitle = function(oRm, oNumericHeader) {
175
103
  var oBindingInfos = oNumericHeader.mBindingInfos,
176
104
  oSubtitle = oNumericHeader.getAggregation("_subtitle"),
177
105
  oUnitOfMeasurement = oNumericHeader.getAggregation("_unitOfMeasurement"),
@@ -210,13 +138,13 @@ sap.ui.define([
210
138
  * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer
211
139
  * @param {sap.f.cards.NumericHeader} oNH An object representation of the control that should be rendered
212
140
  */
213
- NumericHeaderRenderer.renderAvatarAndIndicatorsLine = function(oRm, oNH) {
141
+ NumericHeaderRenderer._renderAvatarAndIndicatorsLine = function(oRm, oNH) {
214
142
  oRm.openStart("div")
215
143
  .class("sapFCardAvatarAndIndicatorsLine")
216
144
  .openEnd();
217
145
 
218
146
  BaseHeaderRenderer.renderAvatar(oRm, oNH);
219
- NumericHeaderRenderer.renderIndicators(oRm, oNH);
147
+ this._renderIndicators(oRm, oNH);
220
148
 
221
149
  var oMicroChart = oNH.getMicroChart();
222
150
  if (oMicroChart) {
@@ -232,7 +160,7 @@ sap.ui.define([
232
160
  * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer
233
161
  * @param {sap.f.cards.NumericHeader} oNH An object representation of the control that should be rendered
234
162
  */
235
- NumericHeaderRenderer.renderIndicators = function(oRm, oNH) {
163
+ NumericHeaderRenderer._renderIndicators = function(oRm, oNH) {
236
164
  if (!oNH.getNumber() && !oNH.isBound("number") && oNH.getSideIndicators().length === 0) {
237
165
  return;
238
166
  }
@@ -255,7 +183,7 @@ sap.ui.define([
255
183
  * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer
256
184
  * @param {sap.f.cards.NumericHeader} oNumericHeader An object representation of the control that should be rendered
257
185
  */
258
- NumericHeaderRenderer.renderDetails = function(oRm, oNumericHeader) {
186
+ NumericHeaderRenderer._renderDetails = function(oRm, oNumericHeader) {
259
187
  var oBindingInfos = oNumericHeader.mBindingInfos,
260
188
  oDetails = oNumericHeader.getAggregation("_details"),
261
189
  bHasDetails = oNumericHeader.getDetails() || oBindingInfos.details,
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @extends sap.ui.core.Control
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.133.0
28
+ * @version 1.134.0
29
29
  *
30
30
  * @constructor
31
31
  * @private
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.core.Control
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.133.0
31
+ * @version 1.134.0
32
32
  *
33
33
  * @constructor
34
34
  * @public
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.f.cards.loading.PlaceholderBase
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.133.0
22
+ * @version 1.134.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.f.cards.loading.ListPlaceholder
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.133.0
22
+ * @version 1.134.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.f.cards.loading.PlaceholderBase
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.133.0
22
+ * @version 1.134.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.f.cards.loading.PlaceholderBase
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.133.0
22
+ * @version 1.134.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @extends sap.f.cards.loading.PlaceholderBase
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.133.0
32
+ * @version 1.134.0
33
33
  *
34
34
  * @constructor
35
35
  * @private
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @extends sap.ui.core.Control
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.133.0
25
+ * @version 1.134.0
26
26
  *
27
27
  * @constructor
28
28
  * @private
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.f.cards.loading.PlaceholderBase
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.133.0
22
+ * @version 1.134.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.f.cards.loading.PlaceholderBase
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.133.0
22
+ * @version 1.134.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  *
17
17
  * @alias sap.f.changeHandler.MoveDynamicPageTitleActions
18
18
  * @author SAP SE
19
- * @version 1.133.0
19
+ * @version 1.134.0
20
20
  */
21
21
  var MoveActions = { };
22
22
  var ACTION_AGGREGATION_NAME = "actions";
@@ -5,32 +5,16 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/ui/core/Element",
8
- "sap/ui/core/delegate/ItemNavigation",
9
8
  "./GridItemNavigation",
10
- "sap/ui/dom/containsOrEquals",
11
9
  "sap/ui/thirdparty/jquery",
12
10
  "sap/ui/dom/jquery/Selectors" // provides jQuery custom selector ":sapTabbable"
13
11
  ], function(
14
12
  Element,
15
- ItemNavigation,
16
13
  GridItemNavigation,
17
- containsOrEquals,
18
14
  jQuery
19
15
  ) {
20
16
  "use strict";
21
17
 
22
-
23
- /**
24
- * When the GridContainer list item is focused, the control inside received a virtual focus.
25
- * @private
26
- * @param {sap.ui.core.Control} oControl The control
27
- */
28
- function doVirtualFocusin(oControl) {
29
- if (oControl.onfocusin) {
30
- oControl.onfocusin();
31
- }
32
- }
33
-
34
18
  /**
35
19
  * Constructor for a new <code>sap.f.delegate.GridContainerItemNavigation</code>.
36
20
  *
@@ -41,7 +25,7 @@ sap.ui.define([
41
25
  *
42
26
  *
43
27
  * @author SAP SE
44
- * @version 1.133.0
28
+ * @version 1.134.0
45
29
  *
46
30
  * @extends sap.f.delegate.GridItemNavigation
47
31
  *
@@ -50,36 +34,19 @@ sap.ui.define([
50
34
  * @alias sap.f.delegate.GridContainerItemNavigation
51
35
  */
52
36
  var GridContainerItemNavigation = GridItemNavigation.extend("sap.f.delegate.GridContainerItemNavigation", /** @lends sap.f.delegate.GridContainerItemNavigation.prototype */ {
53
- constructor: function() {
54
- GridItemNavigation.apply(this, arguments);
55
-
56
- this.attachEvent(ItemNavigation.Events.FocusLeave, this._onFocusLeave, this);
57
- }
58
37
  });
59
38
 
60
- GridContainerItemNavigation.prototype._onFocusLeave = function(oEvent) {
61
- var currentFocused = this.getFocusedDomRef();
62
- this.getItemDomRefs().forEach(function(item, index) {
63
- if (currentFocused === item) {
64
- var nextFocusableIndex = index++;
65
- this.setFocusedIndex(nextFocusableIndex);
66
- }
67
- }.bind(this));
68
- };
69
-
70
39
  /**
71
40
  * Forward tab before or after GridContainer
72
41
  *
73
42
  * @protected
74
43
  */
75
44
  GridContainerItemNavigation.prototype.forwardTab = function(bForward) {
76
-
77
45
  var sId = this._getRootDomRefId() + "-" + (bForward ? "after" : "before");
78
-
79
46
  document.getElementById(sId).focus();
80
47
  };
81
48
 
82
- GridContainerItemNavigation.prototype._getRootDomRefId = function(bForward) {
49
+ GridContainerItemNavigation.prototype._getRootDomRefId = function() {
83
50
  return this.getRootDomRef().getAttribute("id");
84
51
  };
85
52
 
@@ -124,7 +91,8 @@ sap.ui.define([
124
91
  * @protected
125
92
  */
126
93
  GridContainerItemNavigation.prototype.onsaptabprevious = function(oEvent) {
127
- if (!oEvent.target.classList.contains("sapFGridContainerItemWrapper")) {
94
+ if (!oEvent.target.classList.contains("sapFGridContainerItemWrapper") &&
95
+ !oEvent.target.parentElement.classList.contains("sapFGridContainerItemWrapper")) {
128
96
  this._lastFocusedElement = oEvent.target;
129
97
  return;
130
98
  }
@@ -134,74 +102,11 @@ sap.ui.define([
134
102
  this.forwardTab(false);
135
103
  }
136
104
 
137
- // SHIFT + TAB out of the GridContainer should focused the last focused grid cell
105
+ // SHIFT + TAB out of the GridContainer should focus the last focused grid cell
138
106
  this._lastFocusedElement = null;
139
107
  this.forwardTab(false);
140
108
  };
141
109
 
142
- /**
143
- * Handles the onmousedown event
144
- * Sets the focus to the item if it occured on an item
145
- *
146
- * @param {jQuery.Event} oEvent the browser event
147
- * @private
148
- */
149
- GridContainerItemNavigation.prototype.onmousedown = function(oEvent) {
150
-
151
- this._bIsMouseDown = true;
152
- this._oMouseDownTarget = oEvent.target;
153
-
154
- document.addEventListener("mouseup", this._onMouseUp.bind(this), {once:true});
155
-
156
- ItemNavigation.prototype.onmousedown.call(this, oEvent);
157
- };
158
-
159
- GridContainerItemNavigation.prototype.onmouseup = function(oEvent) {
160
- this._onMouseUp();
161
- };
162
-
163
- GridContainerItemNavigation.prototype._onMouseUp = function () {
164
- var $listItem = jQuery(this._oMouseDownTarget).closest('.sapFGridContainerItemWrapperNoVisualFocus'),
165
- oControl;
166
-
167
- if (!this._bIsMouseDown) {
168
- return;
169
- }
170
-
171
- if ($listItem.length) {
172
- oControl = Element.closestTo($listItem.children()[0]);
173
-
174
- // if the list item visual focus is displayed by the currently focused control,
175
- // move the focus to the list item
176
- if (oControl && oControl.getFocusDomRef() === document.activeElement) {
177
- this._lastFocusedElement = null;
178
- $listItem.trigger("focus");
179
- doVirtualFocusin(oControl);
180
- }
181
- }
182
-
183
- this._bIsMouseDown = false;
184
- this._oMouseDownTarget = null;
185
- };
186
-
187
- /**
188
- * Handles 'dragend' event.
189
- * Used to release the mouse down flag. Needed because the browser will not fire 'mouseup' event after drag and drop.
190
- */
191
- GridContainerItemNavigation.prototype.ondragend = function() {
192
- this._bIsMouseDown = false;
193
- this._oMouseDownTarget = null;
194
- };
195
-
196
- /**
197
- * Handles 'drop' event.
198
- * Used to release the mouse down flag. Needed because the browser will not fire 'mouseup' event after drag and drop.
199
- */
200
- GridContainerItemNavigation.prototype.ondrop = function() {
201
- this._bIsMouseDown = false;
202
- this._oMouseDownTarget = null;
203
- };
204
-
205
110
  /**
206
111
  * Handles the <code>focusin</code> event.
207
112
  *
@@ -223,24 +128,22 @@ sap.ui.define([
223
128
  // focus is coming in the grid container from Shift + Tab
224
129
  if (oEvent.target === this._getGridInstance().getDomRef("after") && !this.getRootDomRef().contains(oEvent.relatedTarget)) {
225
130
  this._focusPrevious(oEvent);
226
- return;
227
131
  }
228
132
 
229
- var $listItem = jQuery(oEvent.target).closest('.sapFGridContainerItemWrapperNoVisualFocus'),
230
- oControl;
133
+ var oTarget = oEvent.target;
231
134
 
232
- if ($listItem.length) {
233
- oControl = Element.closestTo($listItem.children()[0]);
135
+ // update the focused index of item navigation when inner elements are focused
136
+ if (!oTarget.matches(".sapFGridContainerItemWrapper")) {
137
+ var oFocusableItem = oTarget.closest(".sapFGridContainerItemWrapper");
234
138
 
235
- if (oControl) {
236
- doVirtualFocusin(oControl);
139
+ if (oFocusableItem) {
140
+ if (!oFocusableItem.classList.contains(".sapFGCFocusable")) {
141
+ oFocusableItem = oFocusableItem.firstChild;
142
+ }
237
143
 
238
- // if the list item visual focus is displayed by the currently focused control,
239
- // move the focus to the list item
240
- if (!this._bIsMouseDown && oControl.getFocusDomRef() === oEvent.target) {
241
- this._lastFocusedElement = null;
242
- $listItem.trigger("focus");
243
- return;
144
+ var iFocusableIndex = this.getItemDomRefs().indexOf(oFocusableItem);
145
+ if (iFocusableIndex >= 0) {
146
+ this.setFocusedIndex(iFocusableIndex);
244
147
  }
245
148
  }
246
149
  }
@@ -272,101 +175,20 @@ sap.ui.define([
272
175
  $FocusCandidate.add($TabbableChildren).eq(-1).focus();
273
176
  };
274
177
 
275
- /**
276
- * Sets the focus to the item with the given index.
277
- *
278
- * @param {int} iIndex Index of the item to focus
279
- * @param {jQuery.Event} oEvent Event that leads to focus change
280
- * @override
281
- * @private
282
- */
283
- GridContainerItemNavigation.prototype.focusItem = function(iIndex, oEvent) {
284
- var oItemItemNavigation,
285
- oInnerControl,
286
- oInnerControlFocusDomRef;
287
-
288
- if (iIndex === this.iFocusedIndex && this.aItemDomRefs[this.iFocusedIndex] === document.activeElement) {
289
- this.fireEvent(ItemNavigation.Events.FocusAgain, {
290
- index: iIndex,
291
- event: oEvent
292
- });
293
- return; // item already focused -> nothing to do
178
+ GridContainerItemNavigation.prototype.getInnerFocusItem = function (oItem) {
179
+ if (!oItem.classList.contains("sapFGCFocusable")) {
180
+ oItem = oItem.firstChild;
294
181
  }
295
182
 
296
- this.fireEvent(ItemNavigation.Events.BeforeFocus, {
297
- index: iIndex,
298
- event: oEvent
299
- });
300
-
301
- this.setFocusedIndex(iIndex);
302
- this.bISetFocus = true;
303
-
304
- if (oEvent && jQuery(this.aItemDomRefs[this.iFocusedIndex]).data("sap.INRoot")) {
305
-
306
- // store event type for nested ItemNavigations
307
- oItemItemNavigation = jQuery(this.aItemDomRefs[this.iFocusedIndex]).data("sap.INRoot");
308
- oItemItemNavigation._sFocusEvent = oEvent.type;
309
- }
310
-
311
- // this is what the GridContainer changes
312
- ////////////////////////////////////////////
313
- if (!oEvent) {
314
- this.resetFocusPosition();
315
- }
316
- if (!this._bIsMouseDown && this.aItemDomRefs.length) {
317
- this.aItemDomRefs[this.iFocusedIndex].focus();
318
-
319
- // make the DOM element that has the outline focus to be visible in the view area
320
- oInnerControl = Element.closestTo(this.aItemDomRefs[this.iFocusedIndex].firstChild);
321
-
322
- if (oInnerControl) {
323
- oInnerControlFocusDomRef = oInnerControl.getFocusDomRef();
324
-
325
- if (oInnerControlFocusDomRef) {
326
- this.scrollIntoViewIfNeeded(oInnerControlFocusDomRef);
327
- }
328
- }
329
- }
330
- /////////////////////////////////////////////
331
-
332
- this.fireEvent(ItemNavigation.Events.AfterFocus, {
333
- index: iIndex,
334
- event: oEvent
335
- });
183
+ return oItem;
336
184
  };
337
185
 
338
- GridContainerItemNavigation.prototype.scrollIntoViewIfNeeded = function(oElementDomRef) {
339
- var oParentDomRef = oElementDomRef.parentElement,
340
- oContainerRect,
341
- oElementRect;
342
-
343
- // find the closest parent container with scroll
344
- while (oParentDomRef &&
345
- oParentDomRef.offsetWidth >= oParentDomRef.scrollWidth &&
346
- oParentDomRef.offsetHeight >= oParentDomRef.scrollHeight) {
347
- oParentDomRef = oParentDomRef.parentElement;
186
+ GridContainerItemNavigation.prototype.getWrapperItem = function (oItem) {
187
+ if (!oItem.classList.contains("sapFGridContainerItemWrapper")) {
188
+ oItem = oItem.closest(".sapFGridContainerItemWrapper");
348
189
  }
349
190
 
350
- if (!oParentDomRef) {
351
- return;
352
- }
353
-
354
- // we need to check according to its parent
355
- oParentDomRef = oParentDomRef.parentElement;
356
-
357
- if (!oParentDomRef) {
358
- return;
359
- }
360
-
361
- oContainerRect = oParentDomRef.getBoundingClientRect();
362
- oElementRect = oElementDomRef.getBoundingClientRect();
363
-
364
- if (oElementRect.top < oContainerRect.top ||
365
- oElementRect.bottom > oContainerRect.bottom ||
366
- oElementRect.right > oContainerRect.right ||
367
- oElementRect.left < oContainerRect.left) {
368
- oElementDomRef.scrollIntoView();
369
- }
191
+ return oItem;
370
192
  };
371
193
 
372
194
  return GridContainerItemNavigation;