@openui5/sap.ui.dt 1.136.2 → 1.138.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/REUSE.toml +0 -28
- package/THIRDPARTY.txt +0 -24
- package/package.json +2 -2
- package/src/sap/ui/dt/.library +1 -1
- package/src/sap/ui/dt/AggregationDesignTimeMetadata.js +1 -1
- package/src/sap/ui/dt/AggregationOverlay.js +1 -3
- package/src/sap/ui/dt/ControlObserver.js +1 -1
- package/src/sap/ui/dt/DOMUtil.js +33 -77
- package/src/sap/ui/dt/DesignTime.js +6 -9
- package/src/sap/ui/dt/DesignTimeMetadata.js +6 -8
- package/src/sap/ui/dt/ElementDesignTimeMetadata.js +1 -1
- package/src/sap/ui/dt/ElementOverlay.js +12 -17
- package/src/sap/ui/dt/ElementUtil.js +26 -32
- package/src/sap/ui/dt/ManagedObjectObserver.js +1 -1
- package/src/sap/ui/dt/MetadataPropagationUtil.js +1 -1
- package/src/sap/ui/dt/MutationObserver.js +13 -16
- package/src/sap/ui/dt/Overlay.js +42 -35
- package/src/sap/ui/dt/OverlayRegistry.js +1 -1
- package/src/sap/ui/dt/OverlayUtil.js +8 -116
- package/src/sap/ui/dt/Plugin.js +3 -4
- package/src/sap/ui/dt/ScrollbarSynchronizer.js +7 -10
- package/src/sap/ui/dt/SelectionManager.js +1 -1
- package/src/sap/ui/dt/SelectionMode.js +1 -1
- package/src/sap/ui/dt/TaskManager.js +1 -1
- package/src/sap/ui/dt/TaskRunner.js +1 -1
- package/src/sap/ui/dt/Util.js +1 -1
- package/src/sap/ui/dt/enablement/ElementEnablementTest.js +1 -1
- package/src/sap/ui/dt/enablement/Test.js +1 -1
- package/src/sap/ui/dt/enablement/Util.js +1 -1
- package/src/sap/ui/dt/enablement/report/LibraryReport.js +1 -1
- package/src/sap/ui/dt/enablement/report/QUnitReport.js +1 -1
- package/src/sap/ui/dt/library.js +3 -3
- package/src/sap/ui/dt/plugin/ContextMenu.js +6 -4
- package/src/sap/ui/dt/plugin/ControlDragDrop.js +1 -1
- package/src/sap/ui/dt/plugin/CutPaste.js +1 -1
- package/src/sap/ui/dt/plugin/DragDrop.js +10 -12
- package/src/sap/ui/dt/plugin/ElementMover.js +1 -1
- package/src/sap/ui/dt/plugin/MouseSelection.js +1 -1
- package/src/sap/ui/dt/plugin/ToolHooks.js +1 -1
- package/src/sap/ui/dt/themes/base/ContextMenu.less +25 -22
- package/src/sap/ui/dt/themes/sap_hcb/ContextMenu.less +4 -19
- package/src/sap/ui/dt/util/ZIndexManager.js +1 -1
- package/src/sap/ui/dt/enablement/report/Statistic.js +0 -116
- package/src/sap/ui/dt/enablement/report/StatisticRenderer.js +0 -37
- package/src/sap/ui/dt/enablement/report/Table.js +0 -257
- package/src/sap/ui/dt/enablement/report/TableRenderer.js +0 -37
|
@@ -6,13 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/base/ManagedObject",
|
|
9
|
-
"sap/ui/dt/DOMUtil"
|
|
10
|
-
"sap/ui/thirdparty/jquery"
|
|
9
|
+
"sap/ui/dt/DOMUtil"
|
|
11
10
|
],
|
|
12
11
|
function(
|
|
13
12
|
ManagedObject,
|
|
14
|
-
DOMUtil
|
|
15
|
-
jQuery
|
|
13
|
+
DOMUtil
|
|
16
14
|
) {
|
|
17
15
|
"use strict";
|
|
18
16
|
|
|
@@ -24,7 +22,7 @@ function(
|
|
|
24
22
|
* @extends sap.ui.base.ManagedObject
|
|
25
23
|
*
|
|
26
24
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
25
|
+
* @version 1.138.0
|
|
28
26
|
*
|
|
29
27
|
* @constructor
|
|
30
28
|
* @private
|
|
@@ -131,11 +129,11 @@ function(
|
|
|
131
129
|
};
|
|
132
130
|
|
|
133
131
|
ScrollbarSynchronizer.prototype._attachScrollEvent = function(oDomNode) {
|
|
134
|
-
|
|
132
|
+
oDomNode.addEventListener("scroll", this._scrollEventHandler);
|
|
135
133
|
};
|
|
136
134
|
|
|
137
135
|
ScrollbarSynchronizer.prototype._detachScrollEvent = function(oDomNode) {
|
|
138
|
-
|
|
136
|
+
oDomNode.removeEventListener("scroll", this._scrollEventHandler);
|
|
139
137
|
};
|
|
140
138
|
|
|
141
139
|
ScrollbarSynchronizer.prototype._scrollEventHandler = function(oEvent) {
|
|
@@ -151,11 +149,10 @@ function(
|
|
|
151
149
|
if (
|
|
152
150
|
bForce
|
|
153
151
|
|| this.getScrollTop() !== oSourceDomNode.scrollTop
|
|
154
|
-
|| this.getScrollLeft() !==
|
|
152
|
+
|| this.getScrollLeft() !== oSourceDomNode.scrollLeft
|
|
155
153
|
) {
|
|
156
154
|
this.setScrollTop(oSourceDomNode.scrollTop);
|
|
157
|
-
this.setScrollLeft(
|
|
158
|
-
|
|
155
|
+
this.setScrollLeft(oSourceDomNode.scrollLeft);
|
|
159
156
|
if (this._bSyncing) {
|
|
160
157
|
this._abortSync();
|
|
161
158
|
}
|
package/src/sap/ui/dt/Util.js
CHANGED
package/src/sap/ui/dt/library.js
CHANGED
|
@@ -88,7 +88,7 @@ sap.ui.define([
|
|
|
88
88
|
* @property {string|function} [domRef] - Defines the DOM reference of the control
|
|
89
89
|
* @property {function} isVisible - Needed for Elements that are not derived from sap.ui.core.Control.
|
|
90
90
|
* The function should return the visibility of the Element as a boolean (true = visible).
|
|
91
|
-
* This function can be called before the DOM is ready
|
|
91
|
+
* This function can be called before the DOM is ready.
|
|
92
92
|
* @property {object|function} palette - Palette settings for the control.
|
|
93
93
|
* @property {string|function} palette.group - Possible values: "ACTION", "DISPLAY", "LAYOUT", "LIST", "INPUT", "CONTAINER", "CHART", "TILE"
|
|
94
94
|
* @property {string|function} palette.icon - Preferable as SVG as this icon scales
|
|
@@ -123,7 +123,7 @@ sap.ui.define([
|
|
|
123
123
|
* @namespace
|
|
124
124
|
* @alias sap.ui.dt
|
|
125
125
|
* @author SAP SE
|
|
126
|
-
* @version 1.
|
|
126
|
+
* @version 1.138.0
|
|
127
127
|
* @since 1.30
|
|
128
128
|
* @private
|
|
129
129
|
* @ui5-restricted
|
|
@@ -131,7 +131,7 @@ sap.ui.define([
|
|
|
131
131
|
var thisLib = Lib.init({
|
|
132
132
|
name: "sap.ui.dt",
|
|
133
133
|
apiVersion: 2,
|
|
134
|
-
version: "1.
|
|
134
|
+
version: "1.138.0",
|
|
135
135
|
dependencies: ["sap.ui.core"],
|
|
136
136
|
types: [],
|
|
137
137
|
interfaces: [],
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
* @class The ContextMenu registers event handler to open the context menu. Menu entries can dynamically be added
|
|
44
44
|
* @extends sap.ui.dt.Plugin
|
|
45
45
|
* @author SAP SE
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.138.0
|
|
47
47
|
* @constructor
|
|
48
48
|
* @private
|
|
49
49
|
* @since 1.53
|
|
@@ -143,7 +143,7 @@ sap.ui.define([
|
|
|
143
143
|
function createAdditionalInfo(oMenuItem) {
|
|
144
144
|
const oAdditionalInfoButton = new Button({
|
|
145
145
|
id: `${this.sId}-${oMenuItem.id}-additionalInfo-button`,
|
|
146
|
-
icon: "sap-icon://
|
|
146
|
+
icon: "sap-icon://message-information",
|
|
147
147
|
visible: !oMenuItem.submenu,
|
|
148
148
|
type: "Transparent",
|
|
149
149
|
ariaLabelledBy: this.getId()
|
|
@@ -323,7 +323,9 @@ sap.ui.define([
|
|
|
323
323
|
const aPropagatedMenuItems = this._sortMenuItems(aAllMenuItems.filter((mMenuItem) => mMenuItem.propagatingControl));
|
|
324
324
|
addMenuItems.call(this, this.oContextMenuControl, aMenuItems);
|
|
325
325
|
addMenuItems.call(this, this.oContextMenuControl, aPropagatedMenuItems, true);
|
|
326
|
-
|
|
326
|
+
// we have to distinguish between the mouse and the keyboard event
|
|
327
|
+
const oOpenerRef = (oEvent.type === "keyup") ? oOverlay : undefined;
|
|
328
|
+
this.oContextMenuControl.openAsContextMenu(oEvent, oOpenerRef);
|
|
327
329
|
}
|
|
328
330
|
|
|
329
331
|
this.fireOpenedContextMenu();
|
|
@@ -573,4 +575,4 @@ sap.ui.define([
|
|
|
573
575
|
};
|
|
574
576
|
|
|
575
577
|
return ContextMenu;
|
|
576
|
-
});
|
|
578
|
+
});
|
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @class The ControlDragDrop enables D&D functionality for the overlays based on aggregation types
|
|
27
27
|
* @extends sap.ui.dt.plugin.DragDrop
|
|
28
28
|
* @author SAP SE
|
|
29
|
-
* @version 1.
|
|
29
|
+
* @version 1.138.0
|
|
30
30
|
* @constructor
|
|
31
31
|
* @private
|
|
32
32
|
* @since 1.30
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @class The CutPaste enables Cut & Paste functionality for the overlays based on aggregation types
|
|
34
34
|
* @extends sap.ui.dt.Plugin
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.138.0
|
|
37
37
|
* @constructor
|
|
38
38
|
* @private
|
|
39
39
|
* @since 1.34
|
|
@@ -11,7 +11,6 @@ sap.ui.define([
|
|
|
11
11
|
"sap/ui/dt/DOMUtil",
|
|
12
12
|
"sap/ui/dt/OverlayUtil",
|
|
13
13
|
"sap/ui/dt/OverlayRegistry",
|
|
14
|
-
"sap/ui/thirdparty/jquery",
|
|
15
14
|
"sap/ui/Device"
|
|
16
15
|
], function(
|
|
17
16
|
BaseObject,
|
|
@@ -20,7 +19,6 @@ sap.ui.define([
|
|
|
20
19
|
DOMUtil,
|
|
21
20
|
OverlayUtil,
|
|
22
21
|
OverlayRegistry,
|
|
23
|
-
jQuery,
|
|
24
22
|
Device
|
|
25
23
|
) {
|
|
26
24
|
"use strict";
|
|
@@ -38,7 +36,7 @@ sap.ui.define([
|
|
|
38
36
|
* @extends sap.ui.dt.Plugin
|
|
39
37
|
*
|
|
40
38
|
* @author SAP SE
|
|
41
|
-
* @version 1.
|
|
39
|
+
* @version 1.138.0
|
|
42
40
|
*
|
|
43
41
|
* @constructor
|
|
44
42
|
* @private
|
|
@@ -461,18 +459,18 @@ sap.ui.define([
|
|
|
461
459
|
|
|
462
460
|
/**
|
|
463
461
|
* @param {sap.ui.dt.Overlay} oOverlay - Overlay instance
|
|
464
|
-
* @returns {
|
|
462
|
+
* @returns {HTMLElement} ghost object
|
|
465
463
|
* @protected
|
|
466
464
|
*/
|
|
467
465
|
DragDrop.prototype.createGhost = function(oOverlay) {
|
|
468
|
-
var
|
|
466
|
+
var oGhostDom = oOverlay.getAssociatedDomRef();
|
|
469
467
|
var oGhost;
|
|
470
|
-
if (
|
|
471
|
-
|
|
472
|
-
oGhost =
|
|
468
|
+
if (!oGhostDom) {
|
|
469
|
+
oGhostDom = this._getAssociatedDomCopy(oOverlay);
|
|
470
|
+
oGhost = oGhostDom;
|
|
473
471
|
} else {
|
|
474
472
|
oGhost = document.createElement("div");
|
|
475
|
-
[].slice.call(
|
|
473
|
+
[].slice.call(oGhostDom).forEach(function(oNode) {
|
|
476
474
|
DOMUtil.cloneDOMAndStyles(oNode, oGhost);
|
|
477
475
|
});
|
|
478
476
|
}
|
|
@@ -496,17 +494,17 @@ sap.ui.define([
|
|
|
496
494
|
if (oChildDom) {
|
|
497
495
|
DOMUtil.cloneDOMAndStyles(oChildDom, oDomCopy);
|
|
498
496
|
} else {
|
|
499
|
-
DOMUtil.cloneDOMAndStyles(this._getAssociatedDomCopy(oChildOverlay)
|
|
497
|
+
DOMUtil.cloneDOMAndStyles(this._getAssociatedDomCopy(oChildOverlay), oDomCopy);
|
|
500
498
|
}
|
|
501
499
|
}, this);
|
|
502
500
|
}, this);
|
|
503
501
|
|
|
504
|
-
return
|
|
502
|
+
return oDomCopy;
|
|
505
503
|
};
|
|
506
504
|
|
|
507
505
|
/**
|
|
508
506
|
* @protected
|
|
509
|
-
* @return {
|
|
507
|
+
* @return {HTMLElement} ghost object
|
|
510
508
|
*/
|
|
511
509
|
DragDrop.prototype.getGhost = function() {
|
|
512
510
|
return this._oGhost;
|
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @class The ElementMover enables movement of UI5 elements based on aggregation types, which can be used by drag and
|
|
31
31
|
* drop or cut and paste behavior.
|
|
32
32
|
* @author SAP SE
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.138.0
|
|
34
34
|
* @constructor
|
|
35
35
|
* @private
|
|
36
36
|
* @since 1.34
|
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
/******************************************************************
|
|
2
2
|
Style of the DT Contextmenu - base Theme
|
|
3
3
|
*******************************************************************/
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
@_sap_ui_dt_ContextMenu_MnuItemTextColor: @sapUiBaseText;
|
|
5
|
+
|
|
6
|
+
.sapUiDtContextMenu.sapMMenu {
|
|
7
|
+
.sapMMenuList {
|
|
6
8
|
padding: 0.1875rem;
|
|
7
9
|
|
|
8
|
-
.
|
|
9
|
-
.
|
|
10
|
+
.sapMMenuItem {
|
|
11
|
+
.sapMMenuItemIcon {
|
|
10
12
|
padding: 0 0.375rem;
|
|
11
13
|
|
|
12
14
|
.sapUiIcon {
|
|
13
15
|
min-width: 2.0rem;
|
|
16
|
+
line-height: 2.0rem;
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
|
|
17
|
-
.
|
|
20
|
+
.sapMMenuEndContent{
|
|
18
21
|
.sapMBtn {
|
|
19
|
-
|
|
22
|
+
.sapMBtnInner{
|
|
20
23
|
background-color: transparent;
|
|
21
24
|
border-color: transparent;
|
|
22
|
-
|
|
25
|
+
}
|
|
23
26
|
&:focus-visible > .sapMFocusable,
|
|
24
27
|
&:focus > .sapMFocusable{
|
|
25
28
|
&::before{
|
|
26
29
|
content: none;
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
}
|
|
31
|
+
}
|
|
29
32
|
.sapUiIcon {
|
|
30
|
-
|
|
33
|
+
color: @_sap_ui_dt_ContextMenu_MnuItemTextColor !important;
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
|
-
|
|
35
|
-
&.
|
|
37
|
+
|
|
38
|
+
&.sapMMenuItemDisabled {
|
|
36
39
|
opacity: 0.5;
|
|
37
40
|
}
|
|
38
41
|
}
|
|
@@ -40,10 +43,10 @@
|
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
.sapUiSizeCozy{
|
|
43
|
-
.sapUiDtContextMenu{
|
|
44
|
-
.
|
|
45
|
-
.
|
|
46
|
-
.
|
|
46
|
+
.sapUiDtContextMenu.sapMMenu {
|
|
47
|
+
.sapMMenuList {
|
|
48
|
+
.sapMMenuItem {
|
|
49
|
+
.sapMMenuItemIcon {
|
|
47
50
|
min-width: 1.125rem;
|
|
48
51
|
padding: 0;
|
|
49
52
|
> .sapUiIcon {
|
|
@@ -55,19 +58,19 @@
|
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
|
|
58
|
-
.sapUiSizeCompact .sapMMenu.
|
|
59
|
-
.
|
|
61
|
+
.sapUiSizeCompact .sapMMenu.sapUiDtContextMenu {
|
|
62
|
+
.sapMMenuItem {
|
|
60
63
|
height: 2.25rem;
|
|
61
64
|
padding: 0 0.25rem;
|
|
62
65
|
|
|
63
|
-
.
|
|
66
|
+
.sapMMenuItemIcon {
|
|
64
67
|
padding: 0;
|
|
65
68
|
max-width: none;
|
|
66
|
-
+ .
|
|
69
|
+
+ .sapMMenuItemText {
|
|
67
70
|
margin-left: 0.5rem;
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
|
-
.
|
|
73
|
+
.sapMMenuItemSubMenu {
|
|
71
74
|
line-height: 2.25rem;
|
|
72
75
|
}
|
|
73
76
|
}
|
|
@@ -75,7 +78,7 @@
|
|
|
75
78
|
|
|
76
79
|
html.sap-desktop, html.sap-tablet {
|
|
77
80
|
|
|
78
|
-
& .sapUiSizeCozy .sapUiDtContextMenu .
|
|
81
|
+
& .sapUiSizeCozy .sapUiDtContextMenu.sapMMenu .sapMMenuList > .sapMMenuItem > .sapMMenuItemIcon + .sapMMenuItemText {
|
|
79
82
|
margin-left: 1.75rem;
|
|
80
83
|
}
|
|
81
84
|
}
|
|
@@ -4,28 +4,13 @@
|
|
|
4
4
|
@_sap_ui_dt_ContextMenu_OpenSubMenuBG: @sapUiSelected; //#0f5d94
|
|
5
5
|
@_sap_ui_dt_ContextMenu_OpenSubMenuBorder: @sapUiNeutralBG; //000
|
|
6
6
|
|
|
7
|
-
.sapUiDtContextMenu {
|
|
8
|
-
.
|
|
9
|
-
.
|
|
7
|
+
.sapUiDtContextMenu.sapMMenu {
|
|
8
|
+
.sapMMenuList {
|
|
9
|
+
.sapMMenuItem {
|
|
10
10
|
border-top: 0.0625rem solid transparent; //1px
|
|
11
|
-
&.
|
|
11
|
+
&.sapMMenuItemDisabled {
|
|
12
12
|
opacity: 1;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.sapUiDtContextMiniMenu {
|
|
20
|
-
.sapUiMnuItm {
|
|
21
|
-
border: none;
|
|
22
|
-
|
|
23
|
-
&.sapUiMnuItmSubMnuOpen {
|
|
24
|
-
background-color: @_sap_ui_dt_ContextMenu_OpenSubMenuBorder;
|
|
25
|
-
|
|
26
|
-
.sapUiIcon {
|
|
27
|
-
background-color: @_sap_ui_dt_ContextMenu_OpenSubMenuBG;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
16
|
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2025 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.dt.test.report.Statistic.
|
|
8
|
-
sap.ui.define([
|
|
9
|
-
"sap/ui/core/Control",
|
|
10
|
-
"sap/ui/model/json/JSONModel",
|
|
11
|
-
"sap/ui/layout/form/SimpleForm",
|
|
12
|
-
"sap/m/Label",
|
|
13
|
-
"sap/m/Text",
|
|
14
|
-
"./StatisticRenderer"
|
|
15
|
-
], function(
|
|
16
|
-
Control,
|
|
17
|
-
JSONModel,
|
|
18
|
-
SimpleForm,
|
|
19
|
-
Label,
|
|
20
|
-
Text,
|
|
21
|
-
StatisticRenderer
|
|
22
|
-
) {
|
|
23
|
-
"use strict";
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Constructor for a new Statistic report.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
29
|
-
* @param {object} [mSettings] initial settings for the new control
|
|
30
|
-
*
|
|
31
|
-
* @class
|
|
32
|
-
* The Statistic report can be used to visualize the design time tests.
|
|
33
|
-
* @extends sap.ui.core.Control
|
|
34
|
-
*
|
|
35
|
-
* @author SAP SE
|
|
36
|
-
* @version 1.136.2
|
|
37
|
-
*
|
|
38
|
-
* @constructor
|
|
39
|
-
* @private
|
|
40
|
-
* @since 1.38
|
|
41
|
-
* @alias sap.ui.dt.enablement.report.Statistic
|
|
42
|
-
*/
|
|
43
|
-
var oStatistic = Control.extend("sap.ui.dt.enablement.report.Statistic", /** @lends sap.ui.dt.enablement.report.Statistic.prototype */ {
|
|
44
|
-
metadata: {
|
|
45
|
-
library: "sap.ui.dt",
|
|
46
|
-
properties: {
|
|
47
|
-
data: {
|
|
48
|
-
type: "object"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
aggregations: {
|
|
52
|
-
_form: {
|
|
53
|
-
type: "sap.ui.layout.form.SimpleForm",
|
|
54
|
-
hidden: true,
|
|
55
|
-
multiple: false
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
init() {
|
|
61
|
-
this._oModel = null;
|
|
62
|
-
this.setAggregation("_form", this._createForm());
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Called when the Statistic is destroyed
|
|
67
|
-
* @protected
|
|
68
|
-
*/
|
|
69
|
-
exit() {
|
|
70
|
-
this.setData(null);
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
setData(oData) {
|
|
74
|
-
if (this._oModel) {
|
|
75
|
-
this._oModel.destroy();
|
|
76
|
-
delete this._oModel;
|
|
77
|
-
}
|
|
78
|
-
if (oData) {
|
|
79
|
-
this._oModel = new JSONModel(oData);
|
|
80
|
-
this._getForm().setModel(this._oModel);
|
|
81
|
-
} else {
|
|
82
|
-
this._getForm().setModel(null);
|
|
83
|
-
}
|
|
84
|
-
this.setProperty("data", oData);
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
_createForm() {
|
|
88
|
-
var oForm = new SimpleForm(`${this.getId()}--form`, {
|
|
89
|
-
editable: false,
|
|
90
|
-
layout: "ResponsiveGridLayout",
|
|
91
|
-
title: "Statistics",
|
|
92
|
-
content: [
|
|
93
|
-
new Label(`${this.getId()}--form-supported-label`, {text: "Supported"}),
|
|
94
|
-
new Text(`${this.getId()}--form-supported-value`, {text: "{/statistic/SUPPORTED}"}),
|
|
95
|
-
new Label(`${this.getId()}--form-partial-supported-label`, {text: "Partial Supported"}),
|
|
96
|
-
new Text(`${this.getId()}--form-partial-supported-value`, {text: "{/statistic/PARTIAL_SUPPORTED}"}),
|
|
97
|
-
new Label(`${this.getId()}--form-not-supported-label`, {text: "Not Supported"}),
|
|
98
|
-
new Text(`${this.getId()}--form-not-supported-value`, {text: "{/statistic/NOT_SUPPORTED}"}),
|
|
99
|
-
new Label(`${this.getId()}--form-unknown-label`, {text: "Unknown"}),
|
|
100
|
-
new Text(`${this.getId()}--form-unknown-value`, {text: "{/statistic/UNKNOWN}"}),
|
|
101
|
-
new Label(`${this.getId()}--form-error-label`, {text: "Error"}),
|
|
102
|
-
new Text(`${this.getId()}--form-error-value`, {text: "{/statistic/ERROR}"})
|
|
103
|
-
]
|
|
104
|
-
});
|
|
105
|
-
return oForm;
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
_getForm() {
|
|
109
|
-
return this.getAggregation("_form");
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
renderer: StatisticRenderer
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
return oStatistic;
|
|
116
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Provides default renderer for control sap.ui.dt.enablement.report.Statistic
|
|
8
|
-
sap.ui.define(function() {
|
|
9
|
-
"use strict";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @author SAP SE
|
|
13
|
-
* @version 1.136.2
|
|
14
|
-
* @namespace
|
|
15
|
-
*/
|
|
16
|
-
var StatisticRenderer = {
|
|
17
|
-
apiVersion: 2
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
|
|
22
|
-
*
|
|
23
|
-
* @param {sap.ui.core.RenderManager} rm The RenderManager that can be used for writing to the render output buffer.
|
|
24
|
-
* @param {sap.ui.dt.enablement.report.Statistic} oStatistic An object representation of the control that should be rendered.
|
|
25
|
-
*/
|
|
26
|
-
StatisticRenderer.render = function(rm, oStatistic) {
|
|
27
|
-
rm.openStart("div", oStatistic);
|
|
28
|
-
rm.class("sapUiDtStatisticReport");
|
|
29
|
-
rm.openEnd();
|
|
30
|
-
|
|
31
|
-
rm.renderControl(oStatistic._getForm());
|
|
32
|
-
|
|
33
|
-
rm.close("div");
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
return StatisticRenderer;
|
|
37
|
-
});
|