@sapui5/sap.ui.vk 1.139.0 → 1.140.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/package.json +1 -1
- package/src/sap/ui/vk/.library +1 -1
- package/src/sap/ui/vk/AnimationPlayback.js +1 -1
- package/src/sap/ui/vk/AnimationPlayer.js +1 -1
- package/src/sap/ui/vk/AnimationSequence.js +1 -1
- package/src/sap/ui/vk/AnimationTimeSlider.js +1 -1
- package/src/sap/ui/vk/AnimationTrack.js +1 -1
- package/src/sap/ui/vk/Annotation.js +3 -3
- package/src/sap/ui/vk/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/Camera.js +1 -1
- package/src/sap/ui/vk/ContentConnector.js +1 -1
- package/src/sap/ui/vk/ContentManager.js +1 -1
- package/src/sap/ui/vk/ContentResource.js +1 -1
- package/src/sap/ui/vk/Core.js +1 -1
- package/src/sap/ui/vk/DownloadManager.js +1 -1
- package/src/sap/ui/vk/DrawerToolbar.js +1 -1
- package/src/sap/ui/vk/DvlException.js +1 -1
- package/src/sap/ui/vk/FlexibleControl.js +1 -1
- package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -1
- package/src/sap/ui/vk/Highlight.js +1 -1
- package/src/sap/ui/vk/ImageContentManager.js +1 -1
- package/src/sap/ui/vk/JointUtils.js +1 -1
- package/src/sap/ui/vk/LayerProxy.js +1 -1
- package/src/sap/ui/vk/Loco.js +1 -1
- package/src/sap/ui/vk/Material.js +1 -1
- package/src/sap/ui/vk/NativeViewport.js +1 -1
- package/src/sap/ui/vk/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/NodeProxy.js +1 -1
- package/src/sap/ui/vk/NodeUtils.js +1 -1
- package/src/sap/ui/vk/Notifications.js +1 -1
- package/src/sap/ui/vk/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/PerspectiveCamera.js +1 -1
- package/src/sap/ui/vk/ProgressIndicator.js +1 -1
- package/src/sap/ui/vk/RedlineCollaboration.js +1 -1
- package/src/sap/ui/vk/RedlineConversation.js +1 -1
- package/src/sap/ui/vk/RedlineDesign.js +1 -1
- package/src/sap/ui/vk/RedlineElement.js +1 -1
- package/src/sap/ui/vk/RedlineElementComment.js +1 -1
- package/src/sap/ui/vk/RedlineElementEllipse.js +1 -1
- package/src/sap/ui/vk/RedlineElementFreehand.js +1 -1
- package/src/sap/ui/vk/RedlineElementLine.js +1 -1
- package/src/sap/ui/vk/RedlineElementRectangle.js +1 -1
- package/src/sap/ui/vk/RedlineElementText.js +1 -1
- package/src/sap/ui/vk/RedlineSurface.js +1 -1
- package/src/sap/ui/vk/SafeArea.js +1 -1
- package/src/sap/ui/vk/Scene.js +1 -1
- package/src/sap/ui/vk/SceneTree.js +1 -1
- package/src/sap/ui/vk/StepNavigation.js +1 -1
- package/src/sap/ui/vk/Texture.js +1 -1
- package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
- package/src/sap/ui/vk/ToggleMenuItem.js +1 -1
- package/src/sap/ui/vk/Toolbar.js +1 -1
- package/src/sap/ui/vk/View.js +1 -1
- package/src/sap/ui/vk/ViewGallery.js +1 -1
- package/src/sap/ui/vk/ViewGalleryThumbnail.js +1 -1
- package/src/sap/ui/vk/ViewGroup.js +1 -1
- package/src/sap/ui/vk/ViewManager.js +1 -1
- package/src/sap/ui/vk/ViewStateManager.js +1 -1
- package/src/sap/ui/vk/ViewStateManagerBase.js +1 -1
- package/src/sap/ui/vk/Viewer.js +12 -2
- package/src/sap/ui/vk/Viewport.js +1 -1
- package/src/sap/ui/vk/ViewportBase.js +1 -1
- package/src/sap/ui/vk/dvl/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/dvl/ContentManager.js +1 -1
- package/src/sap/ui/vk/dvl/GraphicsCore.js +1 -1
- package/src/sap/ui/vk/dvl/LayerProxy.js +1 -1
- package/src/sap/ui/vk/dvl/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/dvl/NodeProxy.js +1 -1
- package/src/sap/ui/vk/dvl/Scene.js +1 -1
- package/src/sap/ui/vk/dvl/ViewStateManager.js +1 -1
- package/src/sap/ui/vk/dvl/Viewport.js +1 -1
- package/src/sap/ui/vk/ecad/ElementsPanel.js +406 -356
- package/src/sap/ui/vk/ecad/LayersPanel.js +88 -75
- package/src/sap/ui/vk/i18n/messagebundle.properties +0 -4
- package/src/sap/ui/vk/i18n/messagebundle_ar.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_bg.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_ca.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_cs.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_cy.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_da.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_de.properties +4 -3
- package/src/sap/ui/vk/i18n/messagebundle_el.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_en.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +1 -3
- package/src/sap/ui/vk/i18n/messagebundle_es.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_et.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_fi.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_fr.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_hi.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_hr.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_hu.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_id.properties +3 -2
- package/src/sap/ui/vk/i18n/messagebundle_it.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_iw.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_ja.properties +4 -3
- package/src/sap/ui/vk/i18n/messagebundle_kk.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_ko.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_lt.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_lv.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_mk.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_ms.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_nl.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_no.properties +3 -2
- package/src/sap/ui/vk/i18n/messagebundle_pl.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_pt.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_ro.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_ru.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_sh.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_sk.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_sl.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_sr.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_sv.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_th.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_tr.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_uk.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_vi.properties +3 -2
- package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +2 -1
- package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +2 -1
- package/src/sap/ui/vk/library.js +2 -2
- package/src/sap/ui/vk/measurements/Angle.js +1 -1
- package/src/sap/ui/vk/measurements/Area.js +1 -1
- package/src/sap/ui/vk/measurements/Distance.js +1 -1
- package/src/sap/ui/vk/measurements/Edge.js +1 -1
- package/src/sap/ui/vk/measurements/Face.js +1 -1
- package/src/sap/ui/vk/measurements/Feature.js +1 -1
- package/src/sap/ui/vk/measurements/Vertex.js +1 -1
- package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
- package/src/sap/ui/vk/pdf/Viewport.js +1 -1
- package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/svg/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/svg/ContentManager.js +1 -1
- package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
- package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/svg/Scene.js +1 -1
- package/src/sap/ui/vk/svg/SceneBuilder.js +1 -1
- package/src/sap/ui/vk/svg/ViewStateManager.js +1 -1
- package/src/sap/ui/vk/svg/Viewport.js +1 -1
- package/src/sap/ui/vk/thirdparty/BufferGeometryUtils.js +86 -27
- package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
- package/src/sap/ui/vk/thirdparty/three.js +48127 -25854
- package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
- package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/threejs/Billboard.js +1 -1
- package/src/sap/ui/vk/threejs/Callout.js +1 -1
- package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/threejs/ContentManager.js +1 -1
- package/src/sap/ui/vk/threejs/DetailView.js +1 -1
- package/src/sap/ui/vk/threejs/HighlightPlayer.js +1 -1
- package/src/sap/ui/vk/threejs/Material.js +1 -1
- package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/threejs/NodeProxy.js +1 -1
- package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
- package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
- package/src/sap/ui/vk/threejs/Scene.js +1 -1
- package/src/sap/ui/vk/threejs/SceneBuilder.js +1 -1
- package/src/sap/ui/vk/threejs/Texture.js +1 -1
- package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
- package/src/sap/ui/vk/threejs/ViewStateManager.js +5 -6
- package/src/sap/ui/vk/threejs/Viewport.js +7 -5
- package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
- package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
- package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
- package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
- package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/Gizmo.js +4 -3
- package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
- package/src/sap/ui/vk/tools/MoveTool.js +1 -1
- package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +1 -1
- package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
- package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
- package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
- package/src/sap/ui/vk/tools/RotateTool.js +1 -1
- package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
- package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
- package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
- package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/Tool.js +1 -1
- package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
- package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
- package/src/sap/ui/vk/totara/SceneContext.js +3 -1
- package/src/sap/ui/vk/ve/dvl.wasm +0 -0
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
// Provides control sap.ui.vk.ecad.ElementsPanel
|
|
9
9
|
sap.ui.define([
|
|
10
|
+
"sap/m/VBox",
|
|
10
11
|
"sap/m/Button",
|
|
11
12
|
"sap/m/OverflowToolbar",
|
|
12
13
|
"sap/m/ToolbarSpacer",
|
|
@@ -18,19 +19,17 @@ sap.ui.define([
|
|
|
18
19
|
"sap/m/ColumnListItem",
|
|
19
20
|
"sap/m/plugins/ColumnResizer",
|
|
20
21
|
"sap/m/MultiComboBox",
|
|
22
|
+
"sap/m/IllustratedMessage",
|
|
23
|
+
"sap/m/IllustratedMessageType",
|
|
21
24
|
"sap/m/p13n/Engine",
|
|
22
25
|
"sap/m/p13n/SelectionController",
|
|
23
26
|
"sap/m/p13n/GroupController",
|
|
24
27
|
"sap/m/p13n/SortController",
|
|
25
28
|
"sap/m/p13n/MetadataHelper",
|
|
26
|
-
"sap/f/DynamicPage",
|
|
27
|
-
"sap/f/DynamicPageTitle",
|
|
28
|
-
"sap/f/DynamicPageHeader",
|
|
29
|
-
"sap/ui/comp/filterbar/FilterBar",
|
|
30
|
-
"sap/ui/comp/filterbar/FilterGroupItem",
|
|
31
29
|
"sap/ui/core/Control",
|
|
32
30
|
"sap/ui/core/Element",
|
|
33
31
|
"sap/ui/core/Icon",
|
|
32
|
+
"sap/ui/core/Lib",
|
|
34
33
|
"sap/ui/core/library",
|
|
35
34
|
"sap/ui/model/json/JSONModel",
|
|
36
35
|
"sap/ui/model/Filter",
|
|
@@ -38,10 +37,9 @@ sap.ui.define([
|
|
|
38
37
|
"../Core",
|
|
39
38
|
"./VisibilityType",
|
|
40
39
|
"../getResourceBundle",
|
|
41
|
-
"sap/m/library"
|
|
42
|
-
"sap/f/library",
|
|
43
|
-
"sap/ui/comp/library"
|
|
40
|
+
"sap/m/library"
|
|
44
41
|
], function(
|
|
42
|
+
VBox,
|
|
45
43
|
Button,
|
|
46
44
|
OverflowToolbar,
|
|
47
45
|
ToolbarSpacer,
|
|
@@ -53,33 +51,52 @@ sap.ui.define([
|
|
|
53
51
|
ColumnListItem,
|
|
54
52
|
ColumnResizer,
|
|
55
53
|
MultiComboBox,
|
|
54
|
+
IllustratedMessage,
|
|
55
|
+
IllustratedMessageType,
|
|
56
56
|
Engine,
|
|
57
57
|
SelectionController,
|
|
58
58
|
GroupController,
|
|
59
59
|
SortController,
|
|
60
60
|
MetadataHelper,
|
|
61
|
-
DynamicPage,
|
|
62
|
-
DynamicPageTitle,
|
|
63
|
-
DynamicPageHeader,
|
|
64
|
-
FilterBar,
|
|
65
|
-
FilterGroupItem,
|
|
66
61
|
Control,
|
|
67
62
|
Element,
|
|
68
63
|
Icon,
|
|
69
|
-
|
|
64
|
+
Lib,
|
|
65
|
+
CoreLibrary,
|
|
70
66
|
JSONModel,
|
|
71
67
|
Filter,
|
|
72
68
|
FilterOperator,
|
|
73
69
|
vkCore,
|
|
74
70
|
VisibilityType,
|
|
75
71
|
getResourceBundle,
|
|
76
|
-
SapMLibrary
|
|
77
|
-
SapFLibrary,
|
|
78
|
-
SapUiComp
|
|
72
|
+
SapMLibrary
|
|
79
73
|
) {
|
|
80
74
|
"use strict";
|
|
81
75
|
|
|
82
76
|
const Sticky = SapMLibrary.Sticky;
|
|
77
|
+
const FlexRendertype = SapMLibrary.FlexRendertype;
|
|
78
|
+
|
|
79
|
+
const IconType = {
|
|
80
|
+
Hidden: "sap-icon://hide",
|
|
81
|
+
Partial: "sap-icon://vk-icons/partially-visible-element",
|
|
82
|
+
Visible: "sap-icon://show"
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const ColumnName = {
|
|
86
|
+
RefDes: "refdes",
|
|
87
|
+
Type: "type",
|
|
88
|
+
Device: "deviceref"
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const ElementType = {
|
|
92
|
+
Component: "2",
|
|
93
|
+
Net: "4"
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const ModelName = {
|
|
97
|
+
FilterSummary: "FilterSummary",
|
|
98
|
+
ElementType: "ElementType"
|
|
99
|
+
};
|
|
83
100
|
|
|
84
101
|
function isAncestorOf(ancestor, descendant) {
|
|
85
102
|
for (let current = descendant.getParent(); current != null; current = current.getParent()) {
|
|
@@ -90,20 +107,51 @@ sap.ui.define([
|
|
|
90
107
|
return false;
|
|
91
108
|
}
|
|
92
109
|
|
|
110
|
+
function getVisibility(element) {
|
|
111
|
+
if (element.hiddenParts.size === 0) {
|
|
112
|
+
return VisibilityType.Visible;
|
|
113
|
+
} else if (element.hiddenParts.size < element.parts.size) {
|
|
114
|
+
return VisibilityType.Partial;
|
|
115
|
+
}
|
|
116
|
+
return VisibilityType.Hidden;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function extractMetadata(nodeRef) {
|
|
120
|
+
const metadata = nodeRef?.userData?.metadata ?? {};
|
|
121
|
+
if (metadata.length != undefined) {
|
|
122
|
+
const map = new Map();
|
|
123
|
+
metadata.forEach(function(entry) {
|
|
124
|
+
if (entry.category === "ecad") {
|
|
125
|
+
map.set(entry.tag, entry.value);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
return map;
|
|
129
|
+
}
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
|
|
93
133
|
/**
|
|
94
134
|
* Constructor for a new ElementsPanel.
|
|
95
135
|
*
|
|
96
136
|
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
97
137
|
* @param {object} [mSettings] initial settings for the new control
|
|
98
138
|
*
|
|
99
|
-
* @class Provides a
|
|
100
|
-
* @extends sap.ui.core.Control
|
|
139
|
+
* @class Provides a list of all ECAD elements in a given scene in table format.
|
|
101
140
|
*
|
|
141
|
+
* <b>NOTE:</b> To use this control the application developer should add dependencies to the
|
|
142
|
+
* following libraries on application level to ensure that the libraries are loaded before the
|
|
143
|
+
* module dependencies will be required:
|
|
144
|
+
* <ul>
|
|
145
|
+
* <li>sap.f</li>
|
|
146
|
+
* <li>sap.ui.comp</li>
|
|
147
|
+
* </ul>
|
|
148
|
+
*
|
|
149
|
+
* @extends sap.ui.core.Control
|
|
102
150
|
* @author SAP SE
|
|
103
|
-
* @version 1.
|
|
151
|
+
* @version 1.140.0
|
|
104
152
|
*
|
|
105
153
|
* @constructor
|
|
106
|
-
* @
|
|
154
|
+
* @public
|
|
107
155
|
* @alias sap.ui.vk.ecad.ElementsPanel
|
|
108
156
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
109
157
|
* @since 1.136.0
|
|
@@ -123,8 +171,9 @@ sap.ui.define([
|
|
|
123
171
|
},
|
|
124
172
|
aggregations: {
|
|
125
173
|
content: {
|
|
126
|
-
type: "sap.
|
|
127
|
-
multiple: false
|
|
174
|
+
type: "sap.ui.core.Control",
|
|
175
|
+
multiple: false,
|
|
176
|
+
visibility: "hidden"
|
|
128
177
|
}
|
|
129
178
|
},
|
|
130
179
|
associations: {
|
|
@@ -177,284 +226,32 @@ sap.ui.define([
|
|
|
177
226
|
}
|
|
178
227
|
});
|
|
179
228
|
|
|
180
|
-
const IconType = {
|
|
181
|
-
Hidden: "sap-icon://hide",
|
|
182
|
-
Partial: "sap-icon://vk-icons/partially-visible-element",
|
|
183
|
-
Visible: "sap-icon://show"
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
const ColumnName = {
|
|
187
|
-
RefDes: "refdes",
|
|
188
|
-
Type: "type",
|
|
189
|
-
Device: "deviceref"
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
const ElementType = {
|
|
193
|
-
Component: "2",
|
|
194
|
-
Net: "4"
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
const ModelName = {
|
|
198
|
-
FilterSummary: "FilterSummary",
|
|
199
|
-
ElementType: "ElementType"
|
|
200
|
-
};
|
|
201
|
-
|
|
202
229
|
ElementsPanel.prototype.onSetViewStateManager = function(manager) {
|
|
203
230
|
this._manager = manager;
|
|
204
231
|
manager.attachSelectionChanged(this._onViewportSelectionChanged, this);
|
|
205
232
|
manager.attachVisibilityChanged(this._onVisibilityChanged, this);
|
|
206
|
-
this.
|
|
233
|
+
this._refresh();
|
|
207
234
|
};
|
|
208
235
|
|
|
209
236
|
ElementsPanel.prototype.onUnsetViewStateManager = function(manager) {
|
|
210
237
|
this._manager = null;
|
|
211
238
|
manager.detachSelectionChanged(this._onViewportSelectionChanged, this);
|
|
212
239
|
manager.detachVisibilityChanged(this._onVisibilityChanged, this);
|
|
213
|
-
this.
|
|
240
|
+
this._refresh();
|
|
214
241
|
};
|
|
215
242
|
|
|
216
243
|
ElementsPanel.prototype.onSetContentConnector = function(connector) {
|
|
217
244
|
connector.attachContentReplaced(this._onContentReplaced, this);
|
|
218
|
-
connector.attachContentChangesFinished(this._onContentChangesFinished, this);
|
|
219
245
|
this._setContent(connector.getContent());
|
|
220
246
|
};
|
|
221
247
|
|
|
222
248
|
ElementsPanel.prototype.onUnsetContentConnector = function(connector) {
|
|
223
249
|
this._setContent(null);
|
|
224
250
|
connector.detachContentReplaced(this._onContentReplaced, this);
|
|
225
|
-
connector.detachContentChangesFinished(this._onContentChangesFinished, this);
|
|
226
251
|
};
|
|
227
252
|
|
|
228
253
|
ElementsPanel.prototype.init = function() {
|
|
229
|
-
|
|
230
|
-
Control.prototype.init.apply(this);
|
|
231
|
-
}
|
|
232
|
-
const that = this;
|
|
233
|
-
|
|
234
|
-
this._showButton = new Button({
|
|
235
|
-
enabled: false,
|
|
236
|
-
icon: IconType.Visible,
|
|
237
|
-
text: getResourceBundle().getText("ELEMENTS_PANEL_SHOW_BUTTON"),
|
|
238
|
-
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_SHOW_BUTTON_TOOLTIP"),
|
|
239
|
-
press: this._onShowElements.bind(this)
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
this._hideButton = new Button({
|
|
243
|
-
enabled: false,
|
|
244
|
-
icon: IconType.Hidden,
|
|
245
|
-
text: getResourceBundle().getText("ELEMENTS_PANEL_HIDE_BUTTON"),
|
|
246
|
-
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_HIDE_BUTTON_TOOLTIP"),
|
|
247
|
-
press: this._onHideElements.bind(this)
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
this._settingsButton = new Button({
|
|
251
|
-
icon: "sap-icon://action-settings",
|
|
252
|
-
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_SETTINGS_BUTTON_TOOLTIP"),
|
|
253
|
-
press: this._onSettings.bind(this)
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
this._table = new Table({
|
|
257
|
-
mode: "MultiSelect",
|
|
258
|
-
fixedLayout: "Strict",
|
|
259
|
-
autoPopinMode: true,
|
|
260
|
-
popinLayout: "GridSmall",
|
|
261
|
-
includeItemInSelection: true,
|
|
262
|
-
noDataText: getResourceBundle().getText("ELEMENTS_PANEL_NO_DATA"),
|
|
263
|
-
sticky: [Sticky.HeaderToolbar, Sticky.ColumnHeaders],
|
|
264
|
-
selectionChange: this._onTableSelectionChanged.bind(this),
|
|
265
|
-
headerToolbar: new OverflowToolbar({
|
|
266
|
-
content: [
|
|
267
|
-
new ToolbarSpacer(),
|
|
268
|
-
this._showButton,
|
|
269
|
-
this._hideButton,
|
|
270
|
-
this._settingsButton
|
|
271
|
-
]
|
|
272
|
-
}),
|
|
273
|
-
dependents: [
|
|
274
|
-
new ColumnResizer({
|
|
275
|
-
columnResize: that._onColumnResize.bind(this)
|
|
276
|
-
})
|
|
277
|
-
],
|
|
278
|
-
columns: [
|
|
279
|
-
new Column({
|
|
280
|
-
hAlign: Library.TextAlign.Begin,
|
|
281
|
-
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_NAME_COLUMN") })
|
|
282
|
-
|
|
283
|
-
}),
|
|
284
|
-
new Column({
|
|
285
|
-
hAlign: Library.TextAlign.Begin,
|
|
286
|
-
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COLUMN") })
|
|
287
|
-
}),
|
|
288
|
-
new Column({
|
|
289
|
-
hAlign: Library.TextAlign.Begin,
|
|
290
|
-
header: new Label({
|
|
291
|
-
text: getResourceBundle().getText("ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN")
|
|
292
|
-
})
|
|
293
|
-
}),
|
|
294
|
-
new Column({
|
|
295
|
-
hAlign: Library.TextAlign.Center,
|
|
296
|
-
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN") })
|
|
297
|
-
})
|
|
298
|
-
],
|
|
299
|
-
items: {
|
|
300
|
-
path: "/",
|
|
301
|
-
template: new ColumnListItem({
|
|
302
|
-
vAlign: "Middle",
|
|
303
|
-
cells: [
|
|
304
|
-
new Label({
|
|
305
|
-
text: "{refdes}"
|
|
306
|
-
}),
|
|
307
|
-
new Label({
|
|
308
|
-
text: {
|
|
309
|
-
path: "",
|
|
310
|
-
formatter: function(element) {
|
|
311
|
-
switch (element.type) {
|
|
312
|
-
case ElementType.Component:
|
|
313
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COMPONENT");
|
|
314
|
-
case ElementType.Net:
|
|
315
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_NET");
|
|
316
|
-
default:
|
|
317
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_UNKNOWN");
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}),
|
|
322
|
-
new Label({
|
|
323
|
-
text: "{deviceref}"
|
|
324
|
-
}),
|
|
325
|
-
new Icon({
|
|
326
|
-
src: {
|
|
327
|
-
path: "",
|
|
328
|
-
formatter: function(element) {
|
|
329
|
-
switch (that._getVisibility(element)) {
|
|
330
|
-
case VisibilityType.Hidden:
|
|
331
|
-
return IconType.Hidden;
|
|
332
|
-
case VisibilityType.Partial:
|
|
333
|
-
return IconType.Partial;
|
|
334
|
-
default:
|
|
335
|
-
return IconType.Visible;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
tooltip: {
|
|
340
|
-
path: "",
|
|
341
|
-
formatter: function(element) {
|
|
342
|
-
switch (that._getVisibility(element)) {
|
|
343
|
-
case VisibilityType.Hidden:
|
|
344
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP");
|
|
345
|
-
case VisibilityType.Partial:
|
|
346
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP");
|
|
347
|
-
default:
|
|
348
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP");
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
})
|
|
353
|
-
]
|
|
354
|
-
})
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
this._filterBar = new FilterBar({
|
|
359
|
-
useToolbar: false,
|
|
360
|
-
persistencyKey: "Filters",
|
|
361
|
-
search: this._onSearch.bind(this),
|
|
362
|
-
filterChange: this._onFilterChange.bind(this),
|
|
363
|
-
assignedFiltersChanged: this._onAssignedFiltersChanged.bind(this),
|
|
364
|
-
filterGroupItems: [
|
|
365
|
-
new FilterGroupItem({
|
|
366
|
-
name: ColumnName.RefDes,
|
|
367
|
-
label: getResourceBundle().getText("REFDES_FILTER_LABEL"),
|
|
368
|
-
groupName: "basic",
|
|
369
|
-
visible: true,
|
|
370
|
-
visibleInFilterBar: true,
|
|
371
|
-
control: new Input({
|
|
372
|
-
change: this._onFilterChange.bind(this)
|
|
373
|
-
})
|
|
374
|
-
}),
|
|
375
|
-
new FilterGroupItem({
|
|
376
|
-
name: ColumnName.Type,
|
|
377
|
-
label: getResourceBundle().getText("TYPE_FILTER_LABEL"),
|
|
378
|
-
groupName: "basic",
|
|
379
|
-
visible: true,
|
|
380
|
-
visibleInFilterBar: true,
|
|
381
|
-
control: new MultiComboBox({
|
|
382
|
-
selectionChange: this._onFilterChange.bind(this),
|
|
383
|
-
items: {
|
|
384
|
-
path: ModelName.ElementType + ">/",
|
|
385
|
-
templateShareable: false,
|
|
386
|
-
template: new sap.ui.core.Item({
|
|
387
|
-
key: "{" + ModelName.ElementType + ">}",
|
|
388
|
-
text: {
|
|
389
|
-
path: ModelName.ElementType + ">",
|
|
390
|
-
formatter: function(type) {
|
|
391
|
-
switch (type) {
|
|
392
|
-
case ElementType.Component:
|
|
393
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COMPONENT");
|
|
394
|
-
case ElementType.Net:
|
|
395
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_NET");
|
|
396
|
-
default:
|
|
397
|
-
return getResourceBundle().getText("ELEMENTS_TYPE_FILTER_ALL");
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
})
|
|
402
|
-
}
|
|
403
|
-
})
|
|
404
|
-
}),
|
|
405
|
-
new FilterGroupItem({
|
|
406
|
-
name: ColumnName.Device,
|
|
407
|
-
label: getResourceBundle().getText("DEVICE_REF_FILTER_LABEL"),
|
|
408
|
-
groupName: "basic",
|
|
409
|
-
visible: true,
|
|
410
|
-
visibleInFilterBar: true,
|
|
411
|
-
control: new Input({
|
|
412
|
-
change: this._onFilterChange.bind(this)
|
|
413
|
-
})
|
|
414
|
-
})
|
|
415
|
-
]
|
|
416
|
-
});
|
|
417
|
-
|
|
418
|
-
this._page = new DynamicPage({
|
|
419
|
-
showFooter: false,
|
|
420
|
-
headerExpanded: false,
|
|
421
|
-
title: new DynamicPageTitle({
|
|
422
|
-
heading: this._filterTitle,
|
|
423
|
-
expandedContent: new Label({
|
|
424
|
-
text: "{" + ModelName.FilterSummary + ">/expandedFilterSummary}"
|
|
425
|
-
}),
|
|
426
|
-
snappedContent: new Label({
|
|
427
|
-
text: "{" + ModelName.FilterSummary + ">/snappedFilterSummary}"
|
|
428
|
-
})
|
|
429
|
-
}),
|
|
430
|
-
header: new DynamicPageHeader({
|
|
431
|
-
content: this._filterBar
|
|
432
|
-
}),
|
|
433
|
-
content: this._table
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
this.setAggregation("content", this._page);
|
|
437
|
-
|
|
438
|
-
this._p13nEngine = Engine.getInstance();
|
|
439
|
-
|
|
440
|
-
this._metadataHelper = new MetadataHelper([
|
|
441
|
-
{
|
|
442
|
-
key: ColumnName.RefDes,
|
|
443
|
-
path: ColumnName.RefDes,
|
|
444
|
-
label: getResourceBundle().getText("ELEMENTS_PANEL_NAME_COLUMN"),
|
|
445
|
-
groupable: false
|
|
446
|
-
},
|
|
447
|
-
{
|
|
448
|
-
key: ColumnName.Type,
|
|
449
|
-
path: ColumnName.Type,
|
|
450
|
-
label: getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COLUMN")
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
key: ColumnName.Device,
|
|
454
|
-
path: ColumnName.Device,
|
|
455
|
-
label: getResourceBundle().getText("ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN")
|
|
456
|
-
}
|
|
457
|
-
]);
|
|
254
|
+
Control.prototype.init?.apply(this);
|
|
458
255
|
|
|
459
256
|
const filterSummaryData = {
|
|
460
257
|
expandedFilterSummary: "",
|
|
@@ -465,7 +262,6 @@ sap.ui.define([
|
|
|
465
262
|
|
|
466
263
|
this._scene = null;
|
|
467
264
|
this._model = new JSONModel();
|
|
468
|
-
this._table.setModel(this._model);
|
|
469
265
|
this._skipEvent = false;
|
|
470
266
|
this._filterSummaryModel = new JSONModel(filterSummaryData);
|
|
471
267
|
this._elementTypeModel = new JSONModel(elementTypeData);
|
|
@@ -473,59 +269,339 @@ sap.ui.define([
|
|
|
473
269
|
this.setModel(this._filterSummaryModel, ModelName.FilterSummary);
|
|
474
270
|
this.setModel(this._elementTypeModel, ModelName.ElementType);
|
|
475
271
|
|
|
476
|
-
//
|
|
477
|
-
this.
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
272
|
+
// show no data message before libraries loaded
|
|
273
|
+
this.setAggregation("content", new IllustratedMessage({
|
|
274
|
+
illustrationType: IllustratedMessageType.NoData,
|
|
275
|
+
enableVerticalResponsiveness: true
|
|
276
|
+
}));
|
|
277
|
+
|
|
278
|
+
this._promise = Promise.all([
|
|
279
|
+
Lib.load("sap.f"),
|
|
280
|
+
Lib.load("sap.ui.comp")
|
|
281
|
+
]).then(() => new Promise((resolve) => {
|
|
282
|
+
sap.ui.require([
|
|
283
|
+
"sap/f/DynamicPage",
|
|
284
|
+
"sap/f/DynamicPageTitle",
|
|
285
|
+
"sap/f/DynamicPageHeader",
|
|
286
|
+
"sap/ui/comp/filterbar/FilterBar",
|
|
287
|
+
"sap/ui/comp/filterbar/FilterGroupItem"
|
|
288
|
+
], (
|
|
289
|
+
DynamicPage,
|
|
290
|
+
DynamicPageTitle,
|
|
291
|
+
DynamicPageHeader,
|
|
292
|
+
FilterBar,
|
|
293
|
+
FilterGroupItem
|
|
294
|
+
) => {
|
|
295
|
+
this._showButton = new Button({
|
|
296
|
+
enabled: false,
|
|
297
|
+
icon: IconType.Visible,
|
|
298
|
+
text: getResourceBundle().getText("ELEMENTS_PANEL_SHOW_BUTTON"),
|
|
299
|
+
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_SHOW_BUTTON_TOOLTIP"),
|
|
300
|
+
press: this._onShowElements.bind(this)
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
this._hideButton = new Button({
|
|
304
|
+
enabled: false,
|
|
305
|
+
icon: IconType.Hidden,
|
|
306
|
+
text: getResourceBundle().getText("ELEMENTS_PANEL_HIDE_BUTTON"),
|
|
307
|
+
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_HIDE_BUTTON_TOOLTIP"),
|
|
308
|
+
press: this._onHideElements.bind(this)
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
this._settingsButton = new Button({
|
|
312
|
+
icon: "sap-icon://action-settings",
|
|
313
|
+
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_SETTINGS_BUTTON_TOOLTIP"),
|
|
314
|
+
press: this._onSettings.bind(this)
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
this._table = new Table({
|
|
318
|
+
mode: "MultiSelect",
|
|
319
|
+
fixedLayout: "Strict",
|
|
320
|
+
autoPopinMode: true,
|
|
321
|
+
popinLayout: "GridSmall",
|
|
322
|
+
includeItemInSelection: true,
|
|
323
|
+
sticky: [Sticky.HeaderToolbar, Sticky.ColumnHeaders],
|
|
324
|
+
selectionChange: this._onTableSelectionChanged.bind(this),
|
|
325
|
+
headerToolbar: new OverflowToolbar({
|
|
326
|
+
content: [
|
|
327
|
+
new ToolbarSpacer(),
|
|
328
|
+
this._showButton,
|
|
329
|
+
this._hideButton,
|
|
330
|
+
this._settingsButton
|
|
331
|
+
]
|
|
332
|
+
}),
|
|
333
|
+
dependents: [
|
|
334
|
+
new ColumnResizer({
|
|
335
|
+
columnResize: this._onColumnResize.bind(this)
|
|
336
|
+
})
|
|
337
|
+
],
|
|
338
|
+
columns: [
|
|
339
|
+
new Column({
|
|
340
|
+
hAlign: CoreLibrary.TextAlign.Begin,
|
|
341
|
+
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_NAME_COLUMN") })
|
|
342
|
+
|
|
343
|
+
}),
|
|
344
|
+
new Column({
|
|
345
|
+
hAlign: CoreLibrary.TextAlign.Begin,
|
|
346
|
+
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COLUMN") })
|
|
347
|
+
}),
|
|
348
|
+
new Column({
|
|
349
|
+
hAlign: CoreLibrary.TextAlign.Begin,
|
|
350
|
+
header: new Label({
|
|
351
|
+
text: getResourceBundle().getText("ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN")
|
|
352
|
+
})
|
|
353
|
+
}),
|
|
354
|
+
new Column({
|
|
355
|
+
hAlign: CoreLibrary.TextAlign.Center,
|
|
356
|
+
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN") })
|
|
357
|
+
})
|
|
358
|
+
],
|
|
359
|
+
items: {
|
|
360
|
+
path: "/",
|
|
361
|
+
template: new ColumnListItem({
|
|
362
|
+
vAlign: "Middle",
|
|
363
|
+
cells: [
|
|
364
|
+
new Label({
|
|
365
|
+
text: "{refdes}"
|
|
366
|
+
}),
|
|
367
|
+
new Label({
|
|
368
|
+
text: {
|
|
369
|
+
path: "",
|
|
370
|
+
formatter: function(element) {
|
|
371
|
+
switch (element.type) {
|
|
372
|
+
case ElementType.Component:
|
|
373
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COMPONENT");
|
|
374
|
+
case ElementType.Net:
|
|
375
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_NET");
|
|
376
|
+
default:
|
|
377
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_UNKNOWN");
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}),
|
|
382
|
+
new Label({
|
|
383
|
+
text: "{deviceref}"
|
|
384
|
+
}),
|
|
385
|
+
new Icon({
|
|
386
|
+
src: {
|
|
387
|
+
path: "",
|
|
388
|
+
formatter: function(element) {
|
|
389
|
+
switch (getVisibility(element)) {
|
|
390
|
+
case VisibilityType.Hidden:
|
|
391
|
+
return IconType.Hidden;
|
|
392
|
+
case VisibilityType.Partial:
|
|
393
|
+
return IconType.Partial;
|
|
394
|
+
default:
|
|
395
|
+
return IconType.Visible;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
tooltip: {
|
|
400
|
+
path: "",
|
|
401
|
+
formatter: function(element) {
|
|
402
|
+
switch (getVisibility(element)) {
|
|
403
|
+
case VisibilityType.Hidden:
|
|
404
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP");
|
|
405
|
+
case VisibilityType.Partial:
|
|
406
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP");
|
|
407
|
+
default:
|
|
408
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP");
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
})
|
|
413
|
+
]
|
|
414
|
+
})
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
this._table.setModel(this._model);
|
|
418
|
+
|
|
419
|
+
this._filterBar = new FilterBar({
|
|
420
|
+
useToolbar: false,
|
|
421
|
+
persistencyKey: "Filters",
|
|
422
|
+
search: this._onSearch.bind(this),
|
|
423
|
+
filterChange: this._onFilterChange.bind(this),
|
|
424
|
+
assignedFiltersChanged: this._onAssignedFiltersChanged.bind(this),
|
|
425
|
+
filterGroupItems: [
|
|
426
|
+
new FilterGroupItem({
|
|
427
|
+
name: ColumnName.RefDes,
|
|
428
|
+
label: getResourceBundle().getText("REFDES_FILTER_LABEL"),
|
|
429
|
+
groupName: "basic",
|
|
430
|
+
visible: true,
|
|
431
|
+
visibleInFilterBar: true,
|
|
432
|
+
control: new Input({
|
|
433
|
+
change: this._onFilterChange.bind(this)
|
|
434
|
+
})
|
|
435
|
+
}),
|
|
436
|
+
new FilterGroupItem({
|
|
437
|
+
name: ColumnName.Type,
|
|
438
|
+
label: getResourceBundle().getText("TYPE_FILTER_LABEL"),
|
|
439
|
+
groupName: "basic",
|
|
440
|
+
visible: true,
|
|
441
|
+
visibleInFilterBar: true,
|
|
442
|
+
control: new MultiComboBox({
|
|
443
|
+
selectionChange: this._onFilterChange.bind(this),
|
|
444
|
+
items: {
|
|
445
|
+
path: ModelName.ElementType + ">/",
|
|
446
|
+
templateShareable: false,
|
|
447
|
+
template: new sap.ui.core.Item({
|
|
448
|
+
key: "{" + ModelName.ElementType + ">}",
|
|
449
|
+
text: {
|
|
450
|
+
path: ModelName.ElementType + ">",
|
|
451
|
+
formatter: function(type) {
|
|
452
|
+
switch (type) {
|
|
453
|
+
case ElementType.Component:
|
|
454
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COMPONENT");
|
|
455
|
+
case ElementType.Net:
|
|
456
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_NET");
|
|
457
|
+
default:
|
|
458
|
+
return getResourceBundle().getText("ELEMENTS_TYPE_FILTER_ALL");
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
})
|
|
463
|
+
}
|
|
464
|
+
})
|
|
465
|
+
}),
|
|
466
|
+
new FilterGroupItem({
|
|
467
|
+
name: ColumnName.Device,
|
|
468
|
+
label: getResourceBundle().getText("DEVICE_REF_FILTER_LABEL"),
|
|
469
|
+
groupName: "basic",
|
|
470
|
+
visible: true,
|
|
471
|
+
visibleInFilterBar: true,
|
|
472
|
+
control: new Input({
|
|
473
|
+
change: this._onFilterChange.bind(this)
|
|
474
|
+
})
|
|
475
|
+
})
|
|
476
|
+
]
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
this._page = new DynamicPage({
|
|
480
|
+
visible: false,
|
|
481
|
+
fitContent: true,
|
|
482
|
+
showFooter: false,
|
|
483
|
+
headerExpanded: false,
|
|
484
|
+
title: new DynamicPageTitle({
|
|
485
|
+
heading: this._filterTitle,
|
|
486
|
+
expandedContent: new Label({
|
|
487
|
+
text: "{" + ModelName.FilterSummary + ">/expandedFilterSummary}"
|
|
488
|
+
}),
|
|
489
|
+
snappedContent: new Label({
|
|
490
|
+
text: "{" + ModelName.FilterSummary + ">/snappedFilterSummary}"
|
|
491
|
+
})
|
|
492
|
+
}),
|
|
493
|
+
header: new DynamicPageHeader({
|
|
494
|
+
content: this._filterBar
|
|
495
|
+
}),
|
|
496
|
+
content: this._table
|
|
497
|
+
});
|
|
498
|
+
|
|
499
|
+
this._message = new IllustratedMessage({
|
|
500
|
+
illustrationType: IllustratedMessageType.NoData,
|
|
501
|
+
enableVerticalResponsiveness: true
|
|
502
|
+
});
|
|
503
|
+
|
|
504
|
+
const content = new VBox({
|
|
505
|
+
height: "100%",
|
|
506
|
+
renderType: FlexRendertype.Bare,
|
|
507
|
+
items: [
|
|
508
|
+
this._page,
|
|
509
|
+
this._message
|
|
510
|
+
]
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
this.destroyAggregation("content");
|
|
514
|
+
this.setAggregation("content", content);
|
|
515
|
+
|
|
516
|
+
this._p13nEngine = Engine.getInstance();
|
|
517
|
+
|
|
518
|
+
this._metadataHelper = new MetadataHelper([
|
|
519
|
+
{
|
|
520
|
+
key: ColumnName.RefDes,
|
|
521
|
+
path: ColumnName.RefDes,
|
|
522
|
+
label: getResourceBundle().getText("ELEMENTS_PANEL_NAME_COLUMN"),
|
|
523
|
+
groupable: false
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
key: ColumnName.Type,
|
|
527
|
+
path: ColumnName.Type,
|
|
528
|
+
label: getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COLUMN")
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
key: ColumnName.Device,
|
|
532
|
+
path: ColumnName.Device,
|
|
533
|
+
label: getResourceBundle().getText("ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN")
|
|
534
|
+
}
|
|
535
|
+
]);
|
|
536
|
+
|
|
537
|
+
// Register the elements table for personalization
|
|
538
|
+
this._registerTableForP13n();
|
|
539
|
+
|
|
540
|
+
// Set up filter bar data handlers
|
|
541
|
+
this._filterBar.addEventDelegate({
|
|
542
|
+
// When the user hits the `Enter` key in any of the filter bar controls, we trigger the
|
|
543
|
+
// search. This handler covers all the filter group items. The basic search field is handled separately.
|
|
544
|
+
onsapenter: (event) => {
|
|
545
|
+
const control = event.srcControl;
|
|
546
|
+
// If `control` itself or its ancestor is a part of the `filterGroupItems` aggregation of
|
|
547
|
+
// the `FilterBar` control, then we can trigger the search.
|
|
548
|
+
if (this._filterBar.getFilterGroupItems().some((item) => {
|
|
549
|
+
const itemControl = item.getControl();
|
|
550
|
+
return itemControl === control || isAncestorOf(itemControl, control);
|
|
551
|
+
})) {
|
|
552
|
+
this._onAssignedFiltersChanged();
|
|
553
|
+
this._updateFilterBarToolbarText();
|
|
554
|
+
this._onSearch();
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
|
|
559
|
+
this._filterBar.registerGetFiltersWithValues(this._getFiltersWithValues.bind(this));
|
|
497
560
|
|
|
498
|
-
|
|
561
|
+
this._onAssignedFiltersChanged();
|
|
562
|
+
this._updateFilterBarToolbarText();
|
|
499
563
|
|
|
500
|
-
|
|
501
|
-
|
|
564
|
+
resolve();
|
|
565
|
+
});
|
|
566
|
+
}));
|
|
502
567
|
};
|
|
503
568
|
|
|
504
569
|
ElementsPanel.prototype.exit = function() {
|
|
505
|
-
this.
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
570
|
+
this._promise = this._promise.then(() => {
|
|
571
|
+
this._p13nEngine.detachStateChange(this._onTableStateChange);
|
|
572
|
+
this._p13nEngine.deregister(this._table);
|
|
573
|
+
this._p13nEngine = null;
|
|
574
|
+
this._metadataHelper.destroy();
|
|
575
|
+
this._metadataHelper = null;
|
|
576
|
+
|
|
577
|
+
this._model.destroy();
|
|
578
|
+
this._model = null;
|
|
579
|
+
this._elementTypeModel.destroy();
|
|
580
|
+
this._elementTypeModel = null;
|
|
581
|
+
this._filterSummaryModel.destroy();
|
|
582
|
+
this._filterSummaryModel = null;
|
|
583
|
+
|
|
584
|
+
Control.prototype.exit?.apply(this);
|
|
585
|
+
});
|
|
586
|
+
};
|
|
510
587
|
|
|
511
|
-
|
|
512
|
-
this.
|
|
513
|
-
this.
|
|
514
|
-
this._elementTypeModel = null;
|
|
515
|
-
this._filterSummaryModel.destroy();
|
|
516
|
-
this._filterSummaryModel = null;
|
|
588
|
+
ElementsPanel.prototype._updateMessage = function(filtering) {
|
|
589
|
+
const hasData = this._table.getItems().length > 0;
|
|
590
|
+
const control = filtering === true ? this._table : this._page;
|
|
517
591
|
|
|
518
|
-
|
|
519
|
-
};
|
|
592
|
+
control.setVisible(hasData);
|
|
520
593
|
|
|
521
|
-
|
|
522
|
-
|
|
594
|
+
this._message.setVisible(!hasData);
|
|
595
|
+
this._message.setIllustrationType(filtering === true ? IllustratedMessageType.NoFilterResults : sap.m.IllustratedMessageType.NoData);
|
|
523
596
|
};
|
|
524
597
|
|
|
525
|
-
ElementsPanel.prototype.
|
|
598
|
+
ElementsPanel.prototype._refresh = async function() {
|
|
599
|
+
await this._promise;
|
|
600
|
+
|
|
526
601
|
if (!this._scene || !this._manager) {
|
|
527
602
|
// This method may be called indirectly from the exit method after _model is destroyed
|
|
528
603
|
this._model?.setData([]);
|
|
604
|
+
this._updateMessage(false);
|
|
529
605
|
return;
|
|
530
606
|
}
|
|
531
607
|
// scan the tree and collect elements info
|
|
@@ -536,6 +612,7 @@ sap.ui.define([
|
|
|
536
612
|
this._model.setData(data);
|
|
537
613
|
this._table.setModel(this._model);
|
|
538
614
|
|
|
615
|
+
this._updateMessage(false);
|
|
539
616
|
this.fireContentChanged();
|
|
540
617
|
};
|
|
541
618
|
|
|
@@ -578,30 +655,7 @@ sap.ui.define([
|
|
|
578
655
|
|
|
579
656
|
ElementsPanel.prototype._setScene = function(scene) {
|
|
580
657
|
this._scene = scene?.isECADScene() ? scene : null;
|
|
581
|
-
this.
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
ElementsPanel.prototype._getVisibility = function(element) {
|
|
585
|
-
if (element.hiddenParts.size === 0) {
|
|
586
|
-
return VisibilityType.Visible;
|
|
587
|
-
} else if (element.hiddenParts.size < element.parts.size) {
|
|
588
|
-
return VisibilityType.Partial;
|
|
589
|
-
}
|
|
590
|
-
return VisibilityType.Hidden;
|
|
591
|
-
};
|
|
592
|
-
|
|
593
|
-
ElementsPanel.prototype._extractMetadata = function(nodeRef) {
|
|
594
|
-
const metadata = nodeRef?.userData?.metadata ?? {};
|
|
595
|
-
if (metadata.length != undefined) {
|
|
596
|
-
const map = new Map();
|
|
597
|
-
metadata.forEach(function(entry) {
|
|
598
|
-
if (entry.category === "ecad") {
|
|
599
|
-
map.set(entry.tag, entry.value);
|
|
600
|
-
}
|
|
601
|
-
});
|
|
602
|
-
return map;
|
|
603
|
-
}
|
|
604
|
-
return null;
|
|
658
|
+
this._refresh();
|
|
605
659
|
};
|
|
606
660
|
|
|
607
661
|
ElementsPanel.prototype._addElement = function(elements, nodeRef, metadata) {
|
|
@@ -642,7 +696,7 @@ sap.ui.define([
|
|
|
642
696
|
};
|
|
643
697
|
|
|
644
698
|
ElementsPanel.prototype._scanTree = function(elements, nodeRef) {
|
|
645
|
-
const metadata =
|
|
699
|
+
const metadata = extractMetadata(nodeRef);
|
|
646
700
|
if (metadata) {
|
|
647
701
|
const name = metadata.get("refdes");
|
|
648
702
|
if (name) {
|
|
@@ -685,7 +739,7 @@ sap.ui.define([
|
|
|
685
739
|
const element = item.getBindingContext().getObject();
|
|
686
740
|
|
|
687
741
|
list.forEach(function(nodeRef) {
|
|
688
|
-
const metadata =
|
|
742
|
+
const metadata = extractMetadata(nodeRef);
|
|
689
743
|
const refdes = metadata?.get("refdes");
|
|
690
744
|
|
|
691
745
|
if (refdes === element.refdes) {
|
|
@@ -725,11 +779,6 @@ sap.ui.define([
|
|
|
725
779
|
this._setContent(event.getParameter("newContent"));
|
|
726
780
|
};
|
|
727
781
|
|
|
728
|
-
ElementsPanel.prototype._onContentChangesFinished = function(event) {
|
|
729
|
-
// causes second rebuild of everything ?
|
|
730
|
-
// this.refresh();
|
|
731
|
-
};
|
|
732
|
-
|
|
733
782
|
ElementsPanel.prototype._updateButtons = function() {
|
|
734
783
|
let canHide = false;
|
|
735
784
|
let canShow = false;
|
|
@@ -737,7 +786,7 @@ sap.ui.define([
|
|
|
737
786
|
|
|
738
787
|
selected.forEach(function(item) {
|
|
739
788
|
const element = item.getBindingContext().getObject();
|
|
740
|
-
const visibility =
|
|
789
|
+
const visibility = getVisibility(element);
|
|
741
790
|
|
|
742
791
|
if (visibility === VisibilityType.Visible) {
|
|
743
792
|
canHide = true;
|
|
@@ -803,7 +852,7 @@ sap.ui.define([
|
|
|
803
852
|
this._updateButtons();
|
|
804
853
|
};
|
|
805
854
|
|
|
806
|
-
ElementsPanel.prototype._onVisibilityChanged = function(event) {
|
|
855
|
+
ElementsPanel.prototype._onVisibilityChanged = async function(event) {
|
|
807
856
|
if (this._skipEvent) {
|
|
808
857
|
this._skipEvent = false;
|
|
809
858
|
return;
|
|
@@ -811,9 +860,11 @@ sap.ui.define([
|
|
|
811
860
|
const hidden = event.getParameter("hidden");
|
|
812
861
|
const visible = event.getParameter("visible");
|
|
813
862
|
|
|
863
|
+
await this._promise;
|
|
864
|
+
|
|
814
865
|
const process = (list, element, show) => {
|
|
815
866
|
list.forEach(function(ref) {
|
|
816
|
-
const metadata =
|
|
867
|
+
const metadata = extractMetadata(ref);
|
|
817
868
|
const refdes = metadata?.get("refdes");
|
|
818
869
|
|
|
819
870
|
if (refdes === element.refdes) {
|
|
@@ -907,6 +958,8 @@ sap.ui.define([
|
|
|
907
958
|
|
|
908
959
|
this._table.getBinding("items").filter(filters);
|
|
909
960
|
this._table.setShowOverlay(false);
|
|
961
|
+
|
|
962
|
+
this._updateMessage(true);
|
|
910
963
|
};
|
|
911
964
|
|
|
912
965
|
ElementsPanel.prototype._onFilterChange = function() {
|
|
@@ -918,9 +971,6 @@ sap.ui.define([
|
|
|
918
971
|
this._filterSummaryModel.setProperty("/expandedFilterSummary", this._filterBar.retrieveFiltersWithValuesAsTextExpanded());
|
|
919
972
|
};
|
|
920
973
|
|
|
921
|
-
ElementsPanel.prototype._onBasicSearch = function() {
|
|
922
|
-
};
|
|
923
|
-
|
|
924
974
|
ElementsPanel.prototype._onTableStateChange = function(event) {
|
|
925
975
|
if (event.getParameter("control") !== this._table) {
|
|
926
976
|
return;
|