@openui5/sap.f 1.114.0 → 1.115.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 (95) hide show
  1. package/.reuse/dep5 +0 -5
  2. package/THIRDPARTY.txt +0 -6
  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 +1 -1
  12. package/src/sap/f/CardRenderer.js +11 -4
  13. package/src/sap/f/DynamicPage.js +1 -1
  14. package/src/sap/f/DynamicPageAccessibleLandmarkInfo.js +1 -1
  15. package/src/sap/f/DynamicPageHeader.js +1 -1
  16. package/src/sap/f/DynamicPageTitle.js +1 -1
  17. package/src/sap/f/FlexibleColumnLayout.js +1 -1
  18. package/src/sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo.js +1 -1
  19. package/src/sap/f/FlexibleColumnLayoutSemanticHelper.js +1 -1
  20. package/src/sap/f/GridContainer.js +3 -3
  21. package/src/sap/f/GridContainerItemLayoutData.js +1 -1
  22. package/src/sap/f/GridContainerSettings.js +2 -2
  23. package/src/sap/f/GridList.js +1 -1
  24. package/src/sap/f/GridListItem.js +1 -1
  25. package/src/sap/f/IllustratedMessage.js +1 -1
  26. package/src/sap/f/Illustration.js +1 -1
  27. package/src/sap/f/PlanningCalendarInCardLegend.js +1 -1
  28. package/src/sap/f/ProductSwitch.js +1 -1
  29. package/src/sap/f/ProductSwitchItem.js +1 -1
  30. package/src/sap/f/SearchManager.js +1 -1
  31. package/src/sap/f/ShellBar.js +1 -1
  32. package/src/sap/f/SidePanel.js +1 -1
  33. package/src/sap/f/SidePanelItem.js +1 -1
  34. package/src/sap/f/cards/BaseHeader.js +4 -4
  35. package/src/sap/f/cards/Header.js +1 -1
  36. package/src/sap/f/cards/HeaderRenderer.js +2 -2
  37. package/src/sap/f/cards/NumericHeader.js +1 -1
  38. package/src/sap/f/cards/NumericHeaderRenderer.js +2 -2
  39. package/src/sap/f/cards/NumericIndicators.js +1 -1
  40. package/src/sap/f/cards/NumericSideIndicator.js +1 -1
  41. package/src/sap/f/cards/loading/AnalyticalPlaceholder.js +6 -77
  42. package/src/sap/f/cards/loading/AnalyticalPlaceholderRenderer.js +88 -0
  43. package/src/sap/f/cards/loading/CalendarPlaceholder.js +4 -140
  44. package/src/sap/f/cards/loading/CalendarPlaceholderRenderer.js +163 -0
  45. package/src/sap/f/cards/loading/GenericPlaceholder.js +6 -88
  46. package/src/sap/f/cards/loading/GenericPlaceholderRenderer.js +99 -0
  47. package/src/sap/f/cards/loading/ListPlaceholder.js +6 -119
  48. package/src/sap/f/cards/loading/ListPlaceholderRenderer.js +131 -0
  49. package/src/sap/f/cards/loading/ObjectPlaceholder.js +7 -56
  50. package/src/sap/f/cards/loading/ObjectPlaceholderRenderer.js +67 -0
  51. package/src/sap/f/cards/loading/PlaceholderBase.js +58 -0
  52. package/src/sap/f/cards/loading/PlaceholderBaseRenderer.js +79 -0
  53. package/src/sap/f/cards/loading/TablePlaceholder.js +6 -59
  54. package/src/sap/f/cards/loading/TablePlaceholderRenderer.js +65 -0
  55. package/src/sap/f/cards/loading/TimelinePlaceholder.js +6 -81
  56. package/src/sap/f/cards/loading/TimelinePlaceholderRenderer.js +91 -0
  57. package/src/sap/f/changeHandler/MoveDynamicPageTitleActions.js +7 -3
  58. package/src/sap/f/delegate/GridContainerItemNavigation.js +1 -1
  59. package/src/sap/f/delegate/GridItemNavigation.js +1 -1
  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 +2 -2
  63. package/src/sap/f/messagebundle_bg.properties +15 -15
  64. package/src/sap/f/messagebundle_fi.properties +1 -1
  65. package/src/sap/f/messagebundle_sl.properties +1 -1
  66. package/src/sap/f/semantic/AddAction.js +1 -1
  67. package/src/sap/f/semantic/CloseAction.js +1 -1
  68. package/src/sap/f/semantic/CopyAction.js +1 -1
  69. package/src/sap/f/semantic/DeleteAction.js +1 -1
  70. package/src/sap/f/semantic/DiscussInJamAction.js +1 -1
  71. package/src/sap/f/semantic/EditAction.js +1 -1
  72. package/src/sap/f/semantic/ExitFullScreenAction.js +1 -1
  73. package/src/sap/f/semantic/FavoriteAction.js +1 -1
  74. package/src/sap/f/semantic/FlagAction.js +1 -1
  75. package/src/sap/f/semantic/FooterMainAction.js +1 -1
  76. package/src/sap/f/semantic/FullScreenAction.js +1 -1
  77. package/src/sap/f/semantic/MainAction.js +1 -1
  78. package/src/sap/f/semantic/MessagesIndicator.js +1 -1
  79. package/src/sap/f/semantic/NegativeAction.js +1 -1
  80. package/src/sap/f/semantic/PositiveAction.js +1 -1
  81. package/src/sap/f/semantic/PrintAction.js +1 -1
  82. package/src/sap/f/semantic/SemanticButton.js +1 -1
  83. package/src/sap/f/semantic/SemanticConfiguration.js +1 -1
  84. package/src/sap/f/semantic/SemanticControl.js +1 -1
  85. package/src/sap/f/semantic/SemanticPage.js +1 -1
  86. package/src/sap/f/semantic/SemanticToggleButton.js +1 -1
  87. package/src/sap/f/semantic/SendEmailAction.js +1 -1
  88. package/src/sap/f/semantic/SendMessageAction.js +1 -1
  89. package/src/sap/f/semantic/ShareInJamAction.js +1 -1
  90. package/src/sap/f/semantic/TitleMainAction.js +1 -1
  91. package/src/sap/f/shellBar/AdditionalContentSupport.js +1 -1
  92. package/src/sap/f/shellBar/CoPilot.js +1 -1
  93. package/src/sap/f/shellBar/ControlSpacer.js +1 -1
  94. package/src/sap/f/shellBar/Search.js +1 -1
  95. package/src/sap/f/themes/base/Card.less +8 -8
@@ -4,9 +4,9 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "sap/ui/core/Control",
8
- "sap/ui/core/Core"
9
- ], function (Control, Core) {
7
+ "sap/f/cards/loading/PlaceholderBase",
8
+ "./ListPlaceholderRenderer"
9
+ ], function (PlaceholderBase, ListPlaceholderRenderer) {
10
10
  "use strict";
11
11
 
12
12
  /**
@@ -19,14 +19,14 @@ sap.ui.define([
19
19
  * @extends sap.ui.core.Control
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.114.0
22
+ * @version 1.115.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.76
27
27
  * @alias sap.f.cards.loading.ListPlaceholder
28
28
  */
29
- var ListPlaceholder = Control.extend("sap.f.cards.loading.ListPlaceholder", {
29
+ var ListPlaceholder = PlaceholderBase.extend("sap.f.cards.loading.ListPlaceholder", {
30
30
  metadata: {
31
31
  library: "sap.f",
32
32
  properties: {
@@ -51,120 +51,7 @@ sap.ui.define([
51
51
  }
52
52
  }
53
53
  },
54
- renderer: {
55
- apiVersion: 2,
56
- render: function (oRm, oControl) {
57
- var iMinItems = oControl.getMinItems(),
58
- oItem = oControl.getItem(),
59
- // set title for screen reader
60
- oResBundle = Core.getLibraryResourceBundle("sap.ui.core"),
61
- sTitle = oResBundle.getText("BUSY_TEXT");
62
-
63
- oRm.openStart("div", oControl)
64
- .class("sapFCardContentPlaceholder")
65
- .class("sapFCardContentListPlaceholder")
66
- .attr("tabindex", "0")
67
- .attr("title", sTitle);
68
-
69
- oRm.accessibilityState(oControl, {
70
- role: "progressbar",
71
- valuemin: "0",
72
- valuemax: "100"
73
- });
74
-
75
- oRm.openEnd();
76
-
77
- for (var i = 0; i < iMinItems; i++) {
78
- oRm.openStart("div")
79
- .class("sapFCardListPlaceholderItem")
80
- .style("height", oControl.getItemHeight())
81
- .openEnd();
82
-
83
- if (oItem && oItem.icon) {
84
- oRm.openStart("div")
85
- .class("sapFCardListPlaceholderImg")
86
- .class("sapFCardLoadingShimmer")
87
- .openEnd()
88
- .close("div");
89
- }
90
-
91
- oRm.openStart("div")
92
- .class("sapFCardListPlaceholderRows")
93
- .openEnd();
94
-
95
- if (oItem) {
96
- this.renderTitleAndDescription(oRm, oItem);
97
- this.renderAttributes(oRm, oItem);
98
-
99
- if (oItem.chart) {
100
- this.renderRow(oRm);
101
- }
102
-
103
- if (oItem.actionsStrip) {
104
- this.renderRow(oRm);
105
- }
106
- }
107
-
108
- oRm.close("div");
109
- oRm.close("div");
110
- }
111
- oRm.close("div");
112
- },
113
-
114
- renderTitleAndDescription: function (oRm, oItem) {
115
- if (oItem.attributes && oItem.title && oItem.description) {
116
- this.renderRow(oRm, true);
117
- return;
118
- }
119
-
120
- if (oItem.title) {
121
- this.renderRow(oRm);
122
- }
123
-
124
- if (oItem.description) {
125
- this.renderRow(oRm);
126
- }
127
- },
128
-
129
- renderRow: function (oRm, bCombined) {
130
- oRm.openStart("div")
131
- .class("sapFCardListPlaceholderRow")
132
- .class("sapFCardLoadingShimmer");
133
-
134
- if (bCombined) {
135
- oRm.class("sapFCardListPlaceholderRowCombined");
136
- }
137
-
138
- oRm.openEnd()
139
- .close("div");
140
- },
141
-
142
- renderAttributes: function (oRm, oItem) {
143
- if (!oItem.attributes) {
144
- return;
145
- }
146
-
147
- var iAttrRows = oItem.attributes.length / 2 + 1;
148
-
149
- for (var j = 0; j < iAttrRows; j++) {
150
- oRm.openStart("div")
151
- .class("sapFCardListPlaceholderRow")
152
- .openEnd();
153
-
154
- var iAttrPerRow = j === iAttrRows - 1 ? 1 : 2; // render single attribute on the last row
155
-
156
- for (var i = 0; i < iAttrPerRow; i++) {
157
- oRm.openStart("div")
158
- .class("sapFCardListPlaceholderAttr")
159
- .class("sapFCardLoadingShimmer")
160
- .openEnd()
161
- .close("div");
162
- }
163
- oRm.close("div");
164
- }
165
-
166
- }
167
- }
54
+ renderer: ListPlaceholderRenderer
168
55
  });
169
56
 
170
57
  return ListPlaceholder;
@@ -0,0 +1,131 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 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(["sap/ui/core/Renderer", "./PlaceholderBaseRenderer"], function(Renderer, PlaceholderBaseRenderer) {
8
+ "use strict";
9
+
10
+ /**
11
+ * ListPlaceholderRenderer renderer.
12
+ * @namespace
13
+ */
14
+ var ListPlaceholderRenderer = Renderer.extend(PlaceholderBaseRenderer);
15
+
16
+ ListPlaceholderRenderer.apiVersion = 2;
17
+
18
+ /**
19
+ * CSS class to be applied to the HTML root element of the placeholder.
20
+ *
21
+ * @type {string}
22
+ */
23
+ ListPlaceholderRenderer.CSS_CLASS_PLACEHOLDER = "sapFCardContentListPlaceholder";
24
+
25
+ ListPlaceholderRenderer.renderTitleAndDescription = function(oRm, oItem) {
26
+ if (oItem.attributes && oItem.title && oItem.description) {
27
+ this.renderRow(oRm, true);
28
+ return;
29
+ }
30
+
31
+ if (oItem.title) {
32
+ this.renderRow(oRm);
33
+ }
34
+
35
+ if (oItem.description) {
36
+ this.renderRow(oRm);
37
+ }
38
+ };
39
+
40
+ ListPlaceholderRenderer.renderRow = function (oRm, bCombined) {
41
+ oRm.openStart("div")
42
+ .class("sapFCardListPlaceholderRow")
43
+ .class("sapFCardLoadingShimmer");
44
+
45
+ if (bCombined) {
46
+ oRm.class("sapFCardListPlaceholderRowCombined");
47
+ }
48
+
49
+ oRm.openEnd()
50
+ .close("div");
51
+ };
52
+
53
+ ListPlaceholderRenderer.renderAttributes = function (oRm, oItem) {
54
+ if (!oItem.attributes) {
55
+ return;
56
+ }
57
+
58
+ var iAttrRows = oItem.attributes.length / 2 + 1;
59
+
60
+ for (var j = 0; j < iAttrRows; j++) {
61
+ oRm.openStart("div")
62
+ .class("sapFCardListPlaceholderRow")
63
+ .openEnd();
64
+
65
+ var iAttrPerRow = j === iAttrRows - 1 ? 1 : 2; // render single attribute on the last row
66
+
67
+ for (var i = 0; i < iAttrPerRow; i++) {
68
+ oRm.openStart("div")
69
+ .class("sapFCardListPlaceholderAttr")
70
+ .class("sapFCardLoadingShimmer")
71
+ .openEnd()
72
+ .close("div");
73
+ }
74
+ oRm.close("div");
75
+ }
76
+
77
+ };
78
+
79
+ ListPlaceholderRenderer.renderContent = function(oControl, oRm) {
80
+
81
+ var iMinItems = oControl.getMinItems(),
82
+ oItem = oControl.getItem();
83
+
84
+ for (var i = 0; i < iMinItems; i++) {
85
+ oRm.openStart("div")
86
+ .class("sapFCardListPlaceholderItem")
87
+ .style("height", oControl.getItemHeight())
88
+ .openEnd();
89
+
90
+ if (oItem && oItem.icon) {
91
+ oRm.openStart("div")
92
+ .class("sapFCardListPlaceholderImg")
93
+ .class("sapFCardLoadingShimmer")
94
+ .openEnd()
95
+ .close("div");
96
+ }
97
+
98
+ oRm.openStart("div")
99
+ .class("sapFCardListPlaceholderRows")
100
+ .openEnd();
101
+ //debugger
102
+ if (oItem) {
103
+ this.renderTitleAndDescription(oRm, oItem);
104
+ this.renderAttributes(oRm, oItem);
105
+
106
+ if (oItem.chart) {
107
+ this.renderRow(oRm);
108
+ }
109
+
110
+ if (oItem.actionsStrip) {
111
+ this.renderRow(oRm);
112
+ }
113
+ }
114
+
115
+ oRm.close("div");
116
+ oRm.close("div");
117
+ }
118
+
119
+ };
120
+
121
+ ListPlaceholderRenderer.addOuterAttributes = function(oControl, oRm) {
122
+
123
+ PlaceholderBaseRenderer.addOuterAttributes.apply(this, arguments);
124
+
125
+ oRm.class(ListPlaceholderRenderer.CSS_CLASS_PLACEHOLDER);
126
+
127
+ };
128
+
129
+ return ListPlaceholderRenderer;
130
+
131
+ }, /* bExport= */ true);
@@ -4,13 +4,13 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "sap/ui/core/Control",
8
- "sap/ui/core/Core",
7
+ "sap/f/cards/loading/PlaceholderBase",
8
+ "./ObjectPlaceholderRenderer",
9
9
  "sap/ui/core/ResizeHandler",
10
10
  "sap/ui/dom/units/Rem"
11
11
  ], function (
12
- Control,
13
- Core,
12
+ PlaceholderBase,
13
+ ObjectPlaceholderRenderer,
14
14
  ResizeHandler,
15
15
  Rem
16
16
  ) {
@@ -29,14 +29,14 @@ sap.ui.define([
29
29
  * @extends sap.ui.core.Control
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.114.0
32
+ * @version 1.115.0
33
33
  *
34
34
  * @constructor
35
35
  * @private
36
36
  * @since 1.104
37
37
  * @alias sap.f.cards.loading.ObjectPlaceholder
38
38
  */
39
- var ObjectPlaceholder = Control.extend("sap.f.cards.loading.ObjectPlaceholder", {
39
+ var ObjectPlaceholder = PlaceholderBase.extend("sap.f.cards.loading.ObjectPlaceholder", {
40
40
  metadata: {
41
41
  library: "sap.f",
42
42
  properties: {
@@ -54,56 +54,7 @@ sap.ui.define([
54
54
  }
55
55
  }
56
56
  },
57
- renderer: {
58
- apiVersion: 2,
59
- render: function (oRm, oObjectPlaceholder) {
60
- var oResBundle = Core.getLibraryResourceBundle("sap.ui.core"),
61
- sTitle = oResBundle.getText("BUSY_TEXT");
62
-
63
- oRm.openStart("div", oObjectPlaceholder)
64
- .class("sapFCardContentPlaceholder")
65
- .class("sapFCardContentObjectPlaceholder")
66
- .attr("tabindex", "0")
67
- .attr("title", sTitle);
68
-
69
- oRm.accessibilityState(oObjectPlaceholder, {
70
- role: "progressbar",
71
- valuemin: "0",
72
- valuemax: "100"
73
- });
74
- oRm.openEnd();
75
-
76
- for (var i = 0; i < oObjectPlaceholder._iColsCnt; i++) {
77
- this.renderColumn(oRm, oObjectPlaceholder._iRowsCnt);
78
- }
79
-
80
- oRm.close("div");
81
- },
82
- renderColumn: function (oRm, iRowsCnt) {
83
- oRm.openStart("div")
84
- .class("sapFCardObjectPlaceholderColumn")
85
- .openEnd();
86
-
87
- for (var i = 0; i < iRowsCnt; i++) {
88
- this.renderRow(oRm, "First", false);
89
- this.renderRow(oRm, "Second", i === iRowsCnt);
90
- }
91
-
92
- oRm.close("div");
93
- },
94
- renderRow: function (oRm, sRow, bLastInColumn) {
95
- oRm.openStart("div")
96
- .class("sapFCardLoadingShimmer")
97
- .class("sapFCardObjectPlaceholderGroup" + sRow + "Row");
98
-
99
- if (bLastInColumn) {
100
- oRm.class("sapFCardObjectPlaceholderGroupLastRow");
101
- }
102
-
103
- oRm.openEnd()
104
- .close("div");
105
- }
106
- }
57
+ renderer: ObjectPlaceholderRenderer
107
58
  });
108
59
 
109
60
  ObjectPlaceholder.prototype.init = function () {
@@ -0,0 +1,67 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 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(["sap/ui/core/Renderer", "./PlaceholderBaseRenderer"], function(Renderer, PlaceholderBaseRenderer) {
8
+ "use strict";
9
+
10
+ /**
11
+ * ObjectPlaceholderRenderer renderer.
12
+ * @namespace
13
+ */
14
+ var ObjectPlaceholderRenderer = Renderer.extend(PlaceholderBaseRenderer);
15
+
16
+ ObjectPlaceholderRenderer.apiVersion = 2;
17
+
18
+ /**
19
+ * CSS class to be applied to the HTML root element of the placeholder.
20
+ *
21
+ * @type {string}
22
+ */
23
+ ObjectPlaceholderRenderer.CSS_CLASS_PLACEHOLDER = "sapFCardContentObjectPlaceholder";
24
+
25
+ ObjectPlaceholderRenderer.renderColumn = function(oRm, iRowsCnt) {
26
+ oRm.openStart("div")
27
+ .class("sapFCardObjectPlaceholderColumn")
28
+ .openEnd();
29
+
30
+ for (var i = 0; i < iRowsCnt; i++) {
31
+ this.renderRow(oRm, "First", false);
32
+ this.renderRow(oRm, "Second", i === iRowsCnt);
33
+ }
34
+
35
+ oRm.close("div");
36
+ };
37
+
38
+ ObjectPlaceholderRenderer.renderRow = function(oRm, sRow, bLastInColumn) {
39
+ oRm.openStart("div")
40
+ .class("sapFCardLoadingShimmer")
41
+ .class("sapFCardObjectPlaceholderGroup" + sRow + "Row");
42
+
43
+ if (bLastInColumn) {
44
+ oRm.class("sapFCardObjectPlaceholderGroupLastRow");
45
+ }
46
+
47
+ oRm.openEnd()
48
+ .close("div");
49
+ };
50
+
51
+ ObjectPlaceholderRenderer.renderContent = function(oControl, oRm) {
52
+ for (var i = 0; i < oControl._iColsCnt; i++) {
53
+ this.renderColumn(oRm, oControl._iRowsCnt);
54
+ }
55
+ };
56
+
57
+ ObjectPlaceholderRenderer.addOuterAttributes = function(oControl, oRm) {
58
+
59
+ PlaceholderBaseRenderer.addOuterAttributes.apply(this, arguments);
60
+
61
+ oRm.class(ObjectPlaceholderRenderer.CSS_CLASS_PLACEHOLDER);
62
+
63
+ };
64
+
65
+ return ObjectPlaceholderRenderer;
66
+
67
+ }, /* bExport= */ true);
@@ -0,0 +1,58 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+ sap.ui.define([
7
+ "sap/ui/core/Control",
8
+ "sap/ui/core/Core",
9
+ "sap/f/cards/loading/PlaceholderBaseRenderer"
10
+ ], function (Control, Core, PlaceholderBaseRenderer) {
11
+ "use strict";
12
+
13
+
14
+ /**
15
+ * Constructor for a new <code>PlaceholderBase</code>.
16
+ *
17
+ * @param {string} [sId] ID for the new control, generated automatically if no ID is given
18
+ * @param {object} [mSettings] Initial settings for the new control
19
+ *
20
+ * @class
21
+ * The <code>PlaceholderBase</code> control provides a base for all placeholder types.
22
+ *
23
+ * @extends sap.ui.core.Control
24
+ *
25
+ * @author SAP SE
26
+ * @version 1.115.0
27
+ *
28
+ * @constructor
29
+ * @private
30
+ * @since 1.115.0
31
+ * @alias sap.f.cards.loading.PlaceholderBase
32
+ */
33
+ var PlaceholderBase = Control.extend("sap.f.cards.loading.PlaceholderBase", /** @lends sap.f.cards.loading.PlaceholderBase.prototype */ {
34
+ metadata: {
35
+
36
+ library: "sap.f",
37
+ properties: {
38
+
39
+ /**
40
+ * Indicates whether the tooltip will be rendered by subclasses
41
+ * @public
42
+ */
43
+ renderTooltip: { type: "boolean", defaultValue: true },
44
+
45
+ /**
46
+ * Indicates whether the card has any content
47
+ * @private
48
+ */
49
+ hasContent: { type: "boolean", defaultValue: true}
50
+ }
51
+ },
52
+
53
+ renderer: PlaceholderBaseRenderer
54
+ });
55
+
56
+ return PlaceholderBase;
57
+
58
+ });
@@ -0,0 +1,79 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 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(["sap/ui/core/Core"], function(Core) {
8
+ "use strict";
9
+
10
+ /**
11
+ * PlaceholderBase renderer.
12
+ *
13
+ * @namespace
14
+ * @alias sap.f.cards.loading.PlaceholderBaseRenderer
15
+ * @static
16
+ * @protected
17
+ */
18
+ var PlaceholderBaseRenderer = {
19
+ apiVersion: 2
20
+ };
21
+
22
+ /**
23
+ * Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
24
+ *
25
+ * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer.
26
+ * @param {sap.f.cards.loading.PlaceholderBase} oControl An object representation of the control that should be rendered.
27
+ */
28
+ PlaceholderBaseRenderer.render = function(oRm, oControl) {
29
+ var oResBundle = Core.getLibraryResourceBundle("sap.ui.core"),
30
+ sTitle = oResBundle.getText("BUSY_TEXT");
31
+
32
+ if (!oControl.getHasContent()) {
33
+ return;
34
+ }
35
+
36
+ oRm.openStart("div", oControl)
37
+ .class("sapFCardContentPlaceholder")
38
+ .attr("tabindex", "0");
39
+ this.addOuterAttributes(oControl, oRm);
40
+
41
+ if (oControl.getRenderTooltip()) {
42
+ oRm.attr("title", sTitle);
43
+ }
44
+
45
+ oRm.accessibilityState(oControl, {
46
+ role: "progressbar",
47
+ valuemin: "0",
48
+ valuemax: "100"
49
+ });
50
+ oRm.openEnd();
51
+
52
+ this.renderContent(oControl, oRm);
53
+
54
+ oRm.close("div");
55
+ };
56
+
57
+ /**
58
+ * This method is reserved for derived classes to add their respective attributes.
59
+ *
60
+ * @protected
61
+ * @param {sap.f.cards.loading.PlaceholderBase} oControl An object representation of the control that should be rendered.
62
+ * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer.
63
+ */
64
+ PlaceholderBaseRenderer.addOuterAttributes = function(oControl, oRm) {
65
+ };
66
+
67
+ /**
68
+ * This method is reserved for derived classes to render their respective content.
69
+ *
70
+ * @protected
71
+ * @param {sap.f.cards.loading.PlaceholderBase} oControl An object representation of the control that should be rendered.
72
+ * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer.
73
+ */
74
+ PlaceholderBaseRenderer.renderContent = function(oControl, oRm) {
75
+ };
76
+
77
+ return PlaceholderBaseRenderer;
78
+
79
+ }, /* bExport= */ true);
@@ -4,9 +4,9 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "sap/ui/core/Control",
8
- "sap/ui/core/Core"
9
- ], function (Control, Core) {
7
+ "sap/f/cards/loading/PlaceholderBase",
8
+ "./TablePlaceholderRenderer"
9
+ ], function (PlaceholderBase, TablePlaceholderRenderer) {
10
10
  "use strict";
11
11
 
12
12
  /**
@@ -19,14 +19,14 @@ sap.ui.define([
19
19
  * @extends sap.ui.core.Control
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.114.0
22
+ * @version 1.115.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.104
27
27
  * @alias sap.f.cards.loading.TablePlaceholder
28
28
  */
29
- var TablePlaceholder = Control.extend("sap.f.cards.loading.TablePlaceholder", {
29
+ var TablePlaceholder = PlaceholderBase.extend("sap.f.cards.loading.TablePlaceholder", {
30
30
  metadata: {
31
31
  library: "sap.f",
32
32
  properties: {
@@ -49,60 +49,7 @@ sap.ui.define([
49
49
  }
50
50
  }
51
51
  },
52
- renderer: {
53
- apiVersion: 2,
54
- render: function (oRm, oControl) {
55
- var iMinItems = oControl.getMinItems(),
56
- iColumns = oControl.getColumns(),
57
- bHasActualContent = oControl.getParent()._getTable().getColumns().length,
58
- // set title for screen reader
59
- oResBundle = Core.getLibraryResourceBundle("sap.ui.core"),
60
- sTitle = oResBundle.getText("BUSY_TEXT");
61
-
62
- if (!bHasActualContent) {
63
- return;
64
- }
65
-
66
- oRm.openStart("div", oControl)
67
- .class("sapFCardContentPlaceholder")
68
- .class("sapFCardContentTablePlaceholder")
69
- .attr("tabindex", "0")
70
- .attr("title", sTitle);
71
-
72
- oRm.accessibilityState(oControl, {
73
- role: "progressbar",
74
- valuemin: "0",
75
- valuemax: "100"
76
- });
77
-
78
- oRm.openEnd();
79
-
80
- for (var i = 0; i < iMinItems + 1; i++) { // number of rows + header
81
- oRm.openStart("div")
82
- .class("sapFCardTablePlaceholderItem")
83
- .style("height", oControl.getItemHeight())
84
- .openEnd();
85
-
86
- oRm.openStart("div")
87
- .class("sapFCardTablePlaceholderRows")
88
- .openEnd();
89
-
90
- if (iColumns > 1) {
91
- for (var j = 0; j < iColumns; j++) {
92
- oRm.openStart("div")
93
- .class("sapFCardTablePlaceholderColumns")
94
- .class("sapFCardLoadingShimmer")
95
- .openEnd();
96
- oRm.close("div");
97
- }
98
- }
99
-
100
- oRm.close("div");
101
- oRm.close("div");
102
- }
103
- oRm.close("div");
104
- }
105
- }
52
+ renderer: TablePlaceholderRenderer
106
53
  });
107
54
 
108
55
  return TablePlaceholder;