@sapui5/sap.ui.vk 1.138.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 +9 -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 +149 -95
- package/src/sap/ui/vk/ContentManager.js +1 -1
- package/src/sap/ui/vk/ContentResource.js +26 -7
- package/src/sap/ui/vk/ContentType.js +41 -0
- 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 +46 -19
- 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 +5 -1
- package/src/sap/ui/vk/SceneTree.js +20 -3
- 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 +3 -10
- package/src/sap/ui/vk/ViewStateManagerBase.js +2 -2
- package/src/sap/ui/vk/Viewer.js +13 -3
- package/src/sap/ui/vk/Viewport.js +1 -1
- package/src/sap/ui/vk/ViewportBase.js +24 -70
- 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 +408 -385
- package/src/sap/ui/vk/ecad/LayersPanel.js +95 -99
- package/src/sap/ui/vk/i18n/messagebundle.properties +44 -46
- package/src/sap/ui/vk/i18n/messagebundle_ar.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_bg.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_ca.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_cs.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_cy.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_da.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_de.properties +28 -14
- package/src/sap/ui/vk/i18n/messagebundle_el.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_en.properties +27 -327
- package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +24 -12
- package/src/sap/ui/vk/i18n/messagebundle_es.properties +29 -15
- package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_et.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_fi.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_fr.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_hi.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_hr.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_hu.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_id.properties +29 -15
- package/src/sap/ui/vk/i18n/messagebundle_it.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_iw.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_ja.properties +29 -15
- package/src/sap/ui/vk/i18n/messagebundle_kk.properties +39 -25
- package/src/sap/ui/vk/i18n/messagebundle_ko.properties +24 -10
- package/src/sap/ui/vk/i18n/messagebundle_lt.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_lv.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_mk.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_ms.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_nl.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_no.properties +28 -14
- package/src/sap/ui/vk/i18n/messagebundle_pl.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_pt.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_ro.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_ru.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_sh.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_sk.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_sl.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_sr.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_sv.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_th.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_tr.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_uk.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_vi.properties +28 -14
- package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +27 -13
- package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +27 -13
- package/src/sap/ui/vk/library.js +5 -5
- 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/Page.js +9 -10
- package/src/sap/ui/vk/pdf/Utils.js +4 -2
- 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 +4 -5
- 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 +11 -18
- 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 +54501 -32246
- 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 +23 -11
- 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 +2 -2
- package/src/sap/ui/vk/threejs/DetailView.js +1 -1
- package/src/sap/ui/vk/threejs/HighlightPlayer.js +14 -22
- 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 +9 -11
- package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/threejs/OutlineRenderer.js +4 -10
- 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 -15
- package/src/sap/ui/vk/threejs/SceneBuilder.js +1 -4
- package/src/sap/ui/vk/threejs/Texture.js +1 -1
- package/src/sap/ui/vk/threejs/ThreeExtensions.js +10 -174
- package/src/sap/ui/vk/threejs/ThreeUtils.js +7 -18
- package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
- package/src/sap/ui/vk/threejs/ViewStateManager.js +755 -451
- package/src/sap/ui/vk/threejs/Viewport.js +47 -35
- 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/TooltipToolHandler.js +5 -0
- 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/totara/TotaraLoader.js +2 -2
- package/src/sap/ui/vk/totara/TotaraLoaderWorker.js +18 -21
- package/src/sap/ui/vk/ve/dvl.wasm +0 -0
- package/ui5.yaml +5 -3
- package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +0 -1445
|
@@ -7,90 +7,66 @@
|
|
|
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
|
-
"sap/m/SearchField",
|
|
12
12
|
"sap/m/OverflowToolbar",
|
|
13
|
-
"sap/m/ToolbarLayoutData",
|
|
14
13
|
"sap/m/ToolbarSpacer",
|
|
15
14
|
"sap/m/Label",
|
|
16
15
|
"sap/m/Input",
|
|
17
16
|
"sap/m/Table",
|
|
18
17
|
"sap/m/table/ColumnWidthController",
|
|
19
|
-
"sap/m/table/columnmenu/Menu",
|
|
20
|
-
"sap/m/table/columnmenu/QuickGroup",
|
|
21
|
-
"sap/m/table/columnmenu/QuickGroupItem",
|
|
22
|
-
"sap/m/table/columnmenu/QuickSort",
|
|
23
|
-
"sap/m/table/columnmenu/QuickSortItem",
|
|
24
18
|
"sap/m/Column",
|
|
25
|
-
"sap/m/ScrollContainer",
|
|
26
19
|
"sap/m/ColumnListItem",
|
|
27
20
|
"sap/m/plugins/ColumnResizer",
|
|
28
21
|
"sap/m/MultiComboBox",
|
|
22
|
+
"sap/m/IllustratedMessage",
|
|
23
|
+
"sap/m/IllustratedMessageType",
|
|
29
24
|
"sap/m/p13n/Engine",
|
|
30
25
|
"sap/m/p13n/SelectionController",
|
|
31
26
|
"sap/m/p13n/GroupController",
|
|
32
27
|
"sap/m/p13n/SortController",
|
|
33
28
|
"sap/m/p13n/MetadataHelper",
|
|
34
|
-
"sap/f/DynamicPage",
|
|
35
|
-
"sap/f/DynamicPageTitle",
|
|
36
|
-
"sap/f/DynamicPageHeader",
|
|
37
|
-
"sap/ui/comp/filterbar/FilterBar",
|
|
38
|
-
"sap/ui/comp/filterbar/FilterGroupItem",
|
|
39
|
-
"sap/ui/core/Core",
|
|
40
29
|
"sap/ui/core/Control",
|
|
41
30
|
"sap/ui/core/Element",
|
|
42
31
|
"sap/ui/core/Icon",
|
|
32
|
+
"sap/ui/core/Lib",
|
|
43
33
|
"sap/ui/core/library",
|
|
44
34
|
"sap/ui/model/json/JSONModel",
|
|
45
35
|
"sap/ui/model/Filter",
|
|
46
36
|
"sap/ui/model/FilterOperator",
|
|
47
37
|
"../Core",
|
|
48
|
-
"../library",
|
|
49
|
-
"../ViewStateManager",
|
|
50
38
|
"./VisibilityType",
|
|
51
39
|
"../getResourceBundle",
|
|
52
40
|
"sap/m/library"
|
|
53
41
|
], function(
|
|
42
|
+
VBox,
|
|
54
43
|
Button,
|
|
55
|
-
SearchField,
|
|
56
44
|
OverflowToolbar,
|
|
57
|
-
ToolbarLayoutData,
|
|
58
45
|
ToolbarSpacer,
|
|
59
46
|
Label,
|
|
60
47
|
Input,
|
|
61
48
|
Table,
|
|
62
49
|
ColumnWidthController,
|
|
63
|
-
Menu,
|
|
64
|
-
QuickGroup,
|
|
65
|
-
QuickGroupItem,
|
|
66
|
-
QuickSort,
|
|
67
|
-
QuickSortItem,
|
|
68
50
|
Column,
|
|
69
|
-
ScrollContainer,
|
|
70
51
|
ColumnListItem,
|
|
71
52
|
ColumnResizer,
|
|
72
53
|
MultiComboBox,
|
|
54
|
+
IllustratedMessage,
|
|
55
|
+
IllustratedMessageType,
|
|
73
56
|
Engine,
|
|
74
57
|
SelectionController,
|
|
75
58
|
GroupController,
|
|
76
59
|
SortController,
|
|
77
60
|
MetadataHelper,
|
|
78
|
-
DynamicPage,
|
|
79
|
-
DynamicPageTitle,
|
|
80
|
-
DynamicPageHeader,
|
|
81
|
-
FilterBar,
|
|
82
|
-
FilterGroupItem,
|
|
83
|
-
Core,
|
|
84
61
|
Control,
|
|
85
62
|
Element,
|
|
86
63
|
Icon,
|
|
87
|
-
|
|
64
|
+
Lib,
|
|
65
|
+
CoreLibrary,
|
|
88
66
|
JSONModel,
|
|
89
67
|
Filter,
|
|
90
68
|
FilterOperator,
|
|
91
69
|
vkCore,
|
|
92
|
-
vkLibrary,
|
|
93
|
-
ViewStateManager,
|
|
94
70
|
VisibilityType,
|
|
95
71
|
getResourceBundle,
|
|
96
72
|
SapMLibrary
|
|
@@ -98,6 +74,29 @@ sap.ui.define([
|
|
|
98
74
|
"use strict";
|
|
99
75
|
|
|
100
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
|
+
};
|
|
101
100
|
|
|
102
101
|
function isAncestorOf(ancestor, descendant) {
|
|
103
102
|
for (let current = descendant.getParent(); current != null; current = current.getParent()) {
|
|
@@ -108,20 +107,51 @@ sap.ui.define([
|
|
|
108
107
|
return false;
|
|
109
108
|
}
|
|
110
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
|
+
|
|
111
133
|
/**
|
|
112
134
|
* Constructor for a new ElementsPanel.
|
|
113
135
|
*
|
|
114
136
|
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
115
137
|
* @param {object} [mSettings] initial settings for the new control
|
|
116
138
|
*
|
|
117
|
-
* @class Provides a
|
|
118
|
-
*
|
|
139
|
+
* @class Provides a list of all ECAD elements in a given scene in table format.
|
|
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>
|
|
119
148
|
*
|
|
149
|
+
* @extends sap.ui.core.Control
|
|
120
150
|
* @author SAP SE
|
|
121
|
-
* @version 1.
|
|
151
|
+
* @version 1.140.0
|
|
122
152
|
*
|
|
123
153
|
* @constructor
|
|
124
|
-
* @
|
|
154
|
+
* @public
|
|
125
155
|
* @alias sap.ui.vk.ecad.ElementsPanel
|
|
126
156
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
127
157
|
* @since 1.136.0
|
|
@@ -141,8 +171,9 @@ sap.ui.define([
|
|
|
141
171
|
},
|
|
142
172
|
aggregations: {
|
|
143
173
|
content: {
|
|
144
|
-
type: "sap.
|
|
145
|
-
multiple: false
|
|
174
|
+
type: "sap.ui.core.Control",
|
|
175
|
+
multiple: false,
|
|
176
|
+
visibility: "hidden"
|
|
146
177
|
}
|
|
147
178
|
},
|
|
148
179
|
associations: {
|
|
@@ -195,355 +226,382 @@ sap.ui.define([
|
|
|
195
226
|
}
|
|
196
227
|
});
|
|
197
228
|
|
|
198
|
-
const IconType = {
|
|
199
|
-
Hidden: "sap-icon://hide",
|
|
200
|
-
Partial: "sap-icon://vk-icons/partially-visible-element",
|
|
201
|
-
Visible: "sap-icon://show"
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
const ColumnName = {
|
|
205
|
-
RefDes: "refdes",
|
|
206
|
-
Type: "type",
|
|
207
|
-
Device: "deviceref"
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
const ElementType = {
|
|
211
|
-
Component: "2",
|
|
212
|
-
Net: "4"
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
const ModelName = {
|
|
216
|
-
FilterSummary: "FilterSummary",
|
|
217
|
-
ElementType: "ElementType"
|
|
218
|
-
};
|
|
219
|
-
|
|
220
229
|
ElementsPanel.prototype.onSetViewStateManager = function(manager) {
|
|
221
230
|
this._manager = manager;
|
|
222
231
|
manager.attachSelectionChanged(this._onViewportSelectionChanged, this);
|
|
223
232
|
manager.attachVisibilityChanged(this._onVisibilityChanged, this);
|
|
224
|
-
this.
|
|
233
|
+
this._refresh();
|
|
225
234
|
};
|
|
226
235
|
|
|
227
236
|
ElementsPanel.prototype.onUnsetViewStateManager = function(manager) {
|
|
228
237
|
this._manager = null;
|
|
229
238
|
manager.detachSelectionChanged(this._onViewportSelectionChanged, this);
|
|
230
239
|
manager.detachVisibilityChanged(this._onVisibilityChanged, this);
|
|
231
|
-
this.
|
|
240
|
+
this._refresh();
|
|
232
241
|
};
|
|
233
242
|
|
|
234
243
|
ElementsPanel.prototype.onSetContentConnector = function(connector) {
|
|
235
244
|
connector.attachContentReplaced(this._onContentReplaced, this);
|
|
236
|
-
connector.attachContentChangesFinished(this._onContentChangesFinished, this);
|
|
237
245
|
this._setContent(connector.getContent());
|
|
238
246
|
};
|
|
239
247
|
|
|
240
248
|
ElementsPanel.prototype.onUnsetContentConnector = function(connector) {
|
|
241
249
|
this._setContent(null);
|
|
242
250
|
connector.detachContentReplaced(this._onContentReplaced, this);
|
|
243
|
-
connector.detachContentChangesFinished(this._onContentChangesFinished, this);
|
|
244
251
|
};
|
|
245
252
|
|
|
246
253
|
ElementsPanel.prototype.init = function() {
|
|
247
|
-
|
|
248
|
-
Control.prototype.init.apply(this);
|
|
249
|
-
}
|
|
250
|
-
const that = this;
|
|
251
|
-
|
|
252
|
-
this._showButton = new Button({
|
|
253
|
-
enabled: false,
|
|
254
|
-
icon: IconType.Visible,
|
|
255
|
-
text: getResourceBundle().getText("ELEMENTS_PANEL_SHOW_BUTTON"),
|
|
256
|
-
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_SHOW_BUTTON_TOOLTIP"),
|
|
257
|
-
press: this._onShowElements.bind(this)
|
|
258
|
-
});
|
|
254
|
+
Control.prototype.init?.apply(this);
|
|
259
255
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_HIDE_BUTTON_TOOLTIP"),
|
|
265
|
-
press: this._onHideElements.bind(this)
|
|
266
|
-
});
|
|
256
|
+
const filterSummaryData = {
|
|
257
|
+
expandedFilterSummary: "",
|
|
258
|
+
snappedFilterSummary: ""
|
|
259
|
+
};
|
|
267
260
|
|
|
268
|
-
|
|
269
|
-
icon: "sap-icon://action-settings",
|
|
270
|
-
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_SETTINGS_BUTTON_TOOLTIP"),
|
|
271
|
-
press: this._onSettings.bind(this)
|
|
272
|
-
});
|
|
261
|
+
const elementTypeData = [ElementType.Component, ElementType.Net];
|
|
273
262
|
|
|
274
|
-
this.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
263
|
+
this._scene = null;
|
|
264
|
+
this._model = new JSONModel();
|
|
265
|
+
this._skipEvent = false;
|
|
266
|
+
this._filterSummaryModel = new JSONModel(filterSummaryData);
|
|
267
|
+
this._elementTypeModel = new JSONModel(elementTypeData);
|
|
268
|
+
|
|
269
|
+
this.setModel(this._filterSummaryModel, ModelName.FilterSummary);
|
|
270
|
+
this.setModel(this._elementTypeModel, ModelName.ElementType);
|
|
271
|
+
|
|
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") })
|
|
300
342
|
|
|
301
|
-
}),
|
|
302
|
-
new Column({
|
|
303
|
-
hAlign: Library.TextAlign.Begin,
|
|
304
|
-
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COLUMN") })
|
|
305
|
-
}),
|
|
306
|
-
new Column({
|
|
307
|
-
hAlign: Library.TextAlign.Begin,
|
|
308
|
-
header: new Label({
|
|
309
|
-
text: getResourceBundle().getText("ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN")
|
|
310
|
-
})
|
|
311
|
-
}),
|
|
312
|
-
new Column({
|
|
313
|
-
hAlign: Library.TextAlign.Center,
|
|
314
|
-
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN") })
|
|
315
|
-
})
|
|
316
|
-
],
|
|
317
|
-
items: {
|
|
318
|
-
path: "/",
|
|
319
|
-
template: new ColumnListItem({
|
|
320
|
-
vAlign: "Middle",
|
|
321
|
-
cells: [
|
|
322
|
-
new Label({
|
|
323
|
-
text: "{refdes}"
|
|
324
343
|
}),
|
|
325
|
-
new
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
formatter: function(element) {
|
|
329
|
-
switch (element.type) {
|
|
330
|
-
case ElementType.Component:
|
|
331
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COMPONENT");
|
|
332
|
-
case ElementType.Net:
|
|
333
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_NET");
|
|
334
|
-
default:
|
|
335
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_UNKNOWN");
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}
|
|
344
|
+
new Column({
|
|
345
|
+
hAlign: CoreLibrary.TextAlign.Begin,
|
|
346
|
+
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COLUMN") })
|
|
339
347
|
}),
|
|
340
|
-
new
|
|
341
|
-
|
|
348
|
+
new Column({
|
|
349
|
+
hAlign: CoreLibrary.TextAlign.Begin,
|
|
350
|
+
header: new Label({
|
|
351
|
+
text: getResourceBundle().getText("ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN")
|
|
352
|
+
})
|
|
342
353
|
}),
|
|
343
|
-
new
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
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
|
+
}
|
|
354
380
|
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
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
|
+
}
|
|
367
411
|
}
|
|
368
|
-
}
|
|
369
|
-
|
|
412
|
+
})
|
|
413
|
+
]
|
|
370
414
|
})
|
|
371
|
-
|
|
372
|
-
})
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
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
|
+
}
|
|
416
461
|
}
|
|
417
|
-
}
|
|
462
|
+
})
|
|
418
463
|
}
|
|
419
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();
|
|
420
555
|
}
|
|
421
|
-
}
|
|
422
|
-
})
|
|
423
|
-
new FilterGroupItem({
|
|
424
|
-
name: ColumnName.Device,
|
|
425
|
-
label: getResourceBundle().getText("DEVICE_REF_FILTER_LABEL"),
|
|
426
|
-
groupName: "basic",
|
|
427
|
-
visible: true,
|
|
428
|
-
visibleInFilterBar: true,
|
|
429
|
-
control: new Input({
|
|
430
|
-
change: this._onFilterChange.bind(this)
|
|
431
|
-
})
|
|
432
|
-
})
|
|
433
|
-
]
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
this._page = new DynamicPage({
|
|
437
|
-
showFooter: false,
|
|
438
|
-
headerExpanded: false,
|
|
439
|
-
title: new DynamicPageTitle({
|
|
440
|
-
heading: this._filterTitle,
|
|
441
|
-
expandedContent: new Label({
|
|
442
|
-
text: "{" + ModelName.FilterSummary + ">/expandedFilterSummary}"
|
|
443
|
-
}),
|
|
444
|
-
snappedContent: new Label({
|
|
445
|
-
text: "{" + ModelName.FilterSummary + ">/snappedFilterSummary}"
|
|
446
|
-
})
|
|
447
|
-
}),
|
|
448
|
-
header: new DynamicPageHeader({
|
|
449
|
-
content: this._filterBar
|
|
450
|
-
}),
|
|
451
|
-
content: this._table
|
|
452
|
-
});
|
|
453
|
-
|
|
454
|
-
this.setAggregation("content", this._page);
|
|
556
|
+
}
|
|
557
|
+
});
|
|
455
558
|
|
|
456
|
-
|
|
559
|
+
this._filterBar.registerGetFiltersWithValues(this._getFiltersWithValues.bind(this));
|
|
457
560
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
key: ColumnName.RefDes,
|
|
461
|
-
path: ColumnName.RefDes,
|
|
462
|
-
label: getResourceBundle().getText("ELEMENTS_PANEL_NAME_COLUMN"),
|
|
463
|
-
groupable: false
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
key: ColumnName.Type,
|
|
467
|
-
path: ColumnName.Type,
|
|
468
|
-
label: getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COLUMN")
|
|
469
|
-
},
|
|
470
|
-
{
|
|
471
|
-
key: ColumnName.Device,
|
|
472
|
-
path: ColumnName.Device,
|
|
473
|
-
label: getResourceBundle().getText("ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN")
|
|
474
|
-
}
|
|
475
|
-
]);
|
|
561
|
+
this._onAssignedFiltersChanged();
|
|
562
|
+
this._updateFilterBarToolbarText();
|
|
476
563
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
const elementTypeData = [ElementType.Component, ElementType.Net];
|
|
564
|
+
resolve();
|
|
565
|
+
});
|
|
566
|
+
}));
|
|
567
|
+
};
|
|
483
568
|
|
|
484
|
-
|
|
485
|
-
this.
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
569
|
+
ElementsPanel.prototype.exit = function() {
|
|
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;
|
|
490
576
|
|
|
491
|
-
|
|
492
|
-
|
|
577
|
+
this._model.destroy();
|
|
578
|
+
this._model = null;
|
|
579
|
+
this._elementTypeModel.destroy();
|
|
580
|
+
this._elementTypeModel = null;
|
|
581
|
+
this._filterSummaryModel.destroy();
|
|
582
|
+
this._filterSummaryModel = null;
|
|
493
583
|
|
|
494
|
-
|
|
495
|
-
this._registerTableForP13n();
|
|
496
|
-
|
|
497
|
-
// Set up filter bar data handlers
|
|
498
|
-
this._filterBar.addEventDelegate({
|
|
499
|
-
// When the user hits the `Enter` key in any of the filter bar controls, we trigger the
|
|
500
|
-
// search. This handler covers all the filter group items. The basic search field is handled separately.
|
|
501
|
-
onsapenter: function(event) {
|
|
502
|
-
const control = event.srcControl;
|
|
503
|
-
// If `control` itself or its ancestor is a part of the `filterGroupItems` aggregation of
|
|
504
|
-
// the `FilterBar` control, then we can trigger the search.
|
|
505
|
-
if (that._filterBar.getFilterGroupItems().some((item) => {
|
|
506
|
-
const itemControl = item.getControl();
|
|
507
|
-
return itemControl === control || isAncestorOf(itemControl, control);
|
|
508
|
-
})) {
|
|
509
|
-
that._onAssignedFiltersChanged();
|
|
510
|
-
that._updateFilterBarToolbarText();
|
|
511
|
-
that._onSearch();
|
|
512
|
-
}
|
|
513
|
-
}
|
|
584
|
+
Control.prototype.exit?.apply(this);
|
|
514
585
|
});
|
|
515
|
-
|
|
516
|
-
this._filterBar.registerGetFiltersWithValues(this._getFiltersWithValues.bind(this));
|
|
517
|
-
|
|
518
|
-
this._onAssignedFiltersChanged();
|
|
519
|
-
this._updateFilterBarToolbarText();
|
|
520
586
|
};
|
|
521
587
|
|
|
522
|
-
ElementsPanel.prototype.
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
}
|
|
526
|
-
this._p13nEngine.detachStateChange(this._onTableStateChange);
|
|
527
|
-
this._p13nEngine.deregister(this._table);
|
|
528
|
-
this._p13nEngine = null;
|
|
529
|
-
this._metadataHelper.destroy();
|
|
530
|
-
this._metadataHelper = null;
|
|
588
|
+
ElementsPanel.prototype._updateMessage = function(filtering) {
|
|
589
|
+
const hasData = this._table.getItems().length > 0;
|
|
590
|
+
const control = filtering === true ? this._table : this._page;
|
|
531
591
|
|
|
532
|
-
|
|
533
|
-
this._model = null;
|
|
534
|
-
this._elementTypeModel.destroy();
|
|
535
|
-
this._elementTypeModel = null;
|
|
536
|
-
this._filterSummaryModel.destroy();
|
|
537
|
-
this._filterSummaryModel = null;
|
|
538
|
-
};
|
|
592
|
+
control.setVisible(hasData);
|
|
539
593
|
|
|
540
|
-
|
|
541
|
-
|
|
594
|
+
this._message.setVisible(!hasData);
|
|
595
|
+
this._message.setIllustrationType(filtering === true ? IllustratedMessageType.NoFilterResults : sap.m.IllustratedMessageType.NoData);
|
|
542
596
|
};
|
|
543
597
|
|
|
544
|
-
ElementsPanel.prototype.
|
|
598
|
+
ElementsPanel.prototype._refresh = async function() {
|
|
599
|
+
await this._promise;
|
|
600
|
+
|
|
545
601
|
if (!this._scene || !this._manager) {
|
|
546
|
-
|
|
602
|
+
// This method may be called indirectly from the exit method after _model is destroyed
|
|
603
|
+
this._model?.setData([]);
|
|
604
|
+
this._updateMessage(false);
|
|
547
605
|
return;
|
|
548
606
|
}
|
|
549
607
|
// scan the tree and collect elements info
|
|
@@ -554,6 +612,7 @@ sap.ui.define([
|
|
|
554
612
|
this._model.setData(data);
|
|
555
613
|
this._table.setModel(this._model);
|
|
556
614
|
|
|
615
|
+
this._updateMessage(false);
|
|
557
616
|
this.fireContentChanged();
|
|
558
617
|
};
|
|
559
618
|
|
|
@@ -595,40 +654,8 @@ sap.ui.define([
|
|
|
595
654
|
};
|
|
596
655
|
|
|
597
656
|
ElementsPanel.prototype._setScene = function(scene) {
|
|
598
|
-
this._scene = (
|
|
599
|
-
this.
|
|
600
|
-
};
|
|
601
|
-
|
|
602
|
-
ElementsPanel.prototype._isECAD = function(scene) {
|
|
603
|
-
if (!scene) {
|
|
604
|
-
return false;
|
|
605
|
-
}
|
|
606
|
-
const metadata = scene.getSceneMetadata();
|
|
607
|
-
const data = metadata?.find((el) => el.category === "ecad" && el.tag === "version" && el.value === "8");
|
|
608
|
-
return !!data;
|
|
609
|
-
};
|
|
610
|
-
|
|
611
|
-
ElementsPanel.prototype._getVisibility = function(element) {
|
|
612
|
-
if (element.hiddenParts.size === 0) {
|
|
613
|
-
return VisibilityType.Visible;
|
|
614
|
-
} else if (element.hiddenParts.size < element.parts.size) {
|
|
615
|
-
return VisibilityType.Partial;
|
|
616
|
-
}
|
|
617
|
-
return VisibilityType.Hidden;
|
|
618
|
-
};
|
|
619
|
-
|
|
620
|
-
ElementsPanel.prototype._extractMetadata = function(nodeRef) {
|
|
621
|
-
const metadata = nodeRef?.userData?.metadata ?? {};
|
|
622
|
-
if (metadata.length != undefined) {
|
|
623
|
-
const map = new Map();
|
|
624
|
-
metadata.forEach(function(entry) {
|
|
625
|
-
if (entry.category === "ecad") {
|
|
626
|
-
map.set(entry.tag, entry.value);
|
|
627
|
-
}
|
|
628
|
-
});
|
|
629
|
-
return map;
|
|
630
|
-
}
|
|
631
|
-
return null;
|
|
657
|
+
this._scene = scene?.isECADScene() ? scene : null;
|
|
658
|
+
this._refresh();
|
|
632
659
|
};
|
|
633
660
|
|
|
634
661
|
ElementsPanel.prototype._addElement = function(elements, nodeRef, metadata) {
|
|
@@ -669,7 +696,7 @@ sap.ui.define([
|
|
|
669
696
|
};
|
|
670
697
|
|
|
671
698
|
ElementsPanel.prototype._scanTree = function(elements, nodeRef) {
|
|
672
|
-
const metadata =
|
|
699
|
+
const metadata = extractMetadata(nodeRef);
|
|
673
700
|
if (metadata) {
|
|
674
701
|
const name = metadata.get("refdes");
|
|
675
702
|
if (name) {
|
|
@@ -712,7 +739,7 @@ sap.ui.define([
|
|
|
712
739
|
const element = item.getBindingContext().getObject();
|
|
713
740
|
|
|
714
741
|
list.forEach(function(nodeRef) {
|
|
715
|
-
const metadata =
|
|
742
|
+
const metadata = extractMetadata(nodeRef);
|
|
716
743
|
const refdes = metadata?.get("refdes");
|
|
717
744
|
|
|
718
745
|
if (refdes === element.refdes) {
|
|
@@ -752,11 +779,6 @@ sap.ui.define([
|
|
|
752
779
|
this._setContent(event.getParameter("newContent"));
|
|
753
780
|
};
|
|
754
781
|
|
|
755
|
-
ElementsPanel.prototype._onContentChangesFinished = function(event) {
|
|
756
|
-
// causes second rebuild of everything ?
|
|
757
|
-
// this.refresh();
|
|
758
|
-
};
|
|
759
|
-
|
|
760
782
|
ElementsPanel.prototype._updateButtons = function() {
|
|
761
783
|
let canHide = false;
|
|
762
784
|
let canShow = false;
|
|
@@ -764,7 +786,7 @@ sap.ui.define([
|
|
|
764
786
|
|
|
765
787
|
selected.forEach(function(item) {
|
|
766
788
|
const element = item.getBindingContext().getObject();
|
|
767
|
-
const visibility =
|
|
789
|
+
const visibility = getVisibility(element);
|
|
768
790
|
|
|
769
791
|
if (visibility === VisibilityType.Visible) {
|
|
770
792
|
canHide = true;
|
|
@@ -830,7 +852,7 @@ sap.ui.define([
|
|
|
830
852
|
this._updateButtons();
|
|
831
853
|
};
|
|
832
854
|
|
|
833
|
-
ElementsPanel.prototype._onVisibilityChanged = function(event) {
|
|
855
|
+
ElementsPanel.prototype._onVisibilityChanged = async function(event) {
|
|
834
856
|
if (this._skipEvent) {
|
|
835
857
|
this._skipEvent = false;
|
|
836
858
|
return;
|
|
@@ -838,9 +860,11 @@ sap.ui.define([
|
|
|
838
860
|
const hidden = event.getParameter("hidden");
|
|
839
861
|
const visible = event.getParameter("visible");
|
|
840
862
|
|
|
863
|
+
await this._promise;
|
|
864
|
+
|
|
841
865
|
const process = (list, element, show) => {
|
|
842
866
|
list.forEach(function(ref) {
|
|
843
|
-
const metadata =
|
|
867
|
+
const metadata = extractMetadata(ref);
|
|
844
868
|
const refdes = metadata?.get("refdes");
|
|
845
869
|
|
|
846
870
|
if (refdes === element.refdes) {
|
|
@@ -934,6 +958,8 @@ sap.ui.define([
|
|
|
934
958
|
|
|
935
959
|
this._table.getBinding("items").filter(filters);
|
|
936
960
|
this._table.setShowOverlay(false);
|
|
961
|
+
|
|
962
|
+
this._updateMessage(true);
|
|
937
963
|
};
|
|
938
964
|
|
|
939
965
|
ElementsPanel.prototype._onFilterChange = function() {
|
|
@@ -945,9 +971,6 @@ sap.ui.define([
|
|
|
945
971
|
this._filterSummaryModel.setProperty("/expandedFilterSummary", this._filterBar.retrieveFiltersWithValuesAsTextExpanded());
|
|
946
972
|
};
|
|
947
973
|
|
|
948
|
-
ElementsPanel.prototype._onBasicSearch = function() {
|
|
949
|
-
};
|
|
950
|
-
|
|
951
974
|
ElementsPanel.prototype._onTableStateChange = function(event) {
|
|
952
975
|
if (event.getParameter("control") !== this._table) {
|
|
953
976
|
return;
|
|
@@ -981,7 +1004,7 @@ sap.ui.define([
|
|
|
981
1004
|
};
|
|
982
1005
|
|
|
983
1006
|
// Currently there is no way to programmatically update
|
|
984
|
-
// text next to Go button, it's a
|
|
1007
|
+
// text next to Go button, it's a FilterBar bug,
|
|
985
1008
|
// so check for private function and call it
|
|
986
1009
|
ElementsPanel.prototype._updateFilterBarToolbarText = function() {
|
|
987
1010
|
this._filterBar._updateToolbarText?.();
|