@sapui5/sap.ui.vk 1.136.0 → 1.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/src/sap/ui/vk/ContentManager.js +1 -1
- package/src/sap/ui/vk/ContentResource.js +5 -1
- package/src/sap/ui/vk/Core.js +1 -3
- package/src/sap/ui/vk/DownloadManager.js +1 -1
- package/src/sap/ui/vk/DrawerToolbar.js +142 -76
- package/src/sap/ui/vk/DrawerToolbarButton.js +12 -1
- package/src/sap/ui/vk/DvlException.js +1 -1
- package/src/sap/ui/vk/FlexibleControl.js +1 -2
- package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -2
- 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/LegendItem.js +1 -1
- package/src/sap/ui/vk/ListPanel.js +1 -1
- package/src/sap/ui/vk/ListPanelStack.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/OutputSettings.js +0 -1
- package/src/sap/ui/vk/Overlay.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 +2 -2
- package/src/sap/ui/vk/SafeArea.js +1 -1
- package/src/sap/ui/vk/Scene.js +12 -1
- package/src/sap/ui/vk/SceneTree.js +4 -7
- package/src/sap/ui/vk/StepNavigation.js +1 -2
- package/src/sap/ui/vk/Texture.js +2 -2
- package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
- package/src/sap/ui/vk/ToggleMenuItem.js +7 -4
- package/src/sap/ui/vk/ToggleMenuItemRenderer.js +224 -0
- package/src/sap/ui/vk/Toolbar.js +69 -115
- package/src/sap/ui/vk/View.js +7 -13
- package/src/sap/ui/vk/ViewGallery.js +2 -2
- 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 +2 -2
- package/src/sap/ui/vk/ViewStateManagerBase.js +3 -3
- package/src/sap/ui/vk/Viewer.js +467 -304
- package/src/sap/ui/vk/Viewport.js +2 -2
- package/src/sap/ui/vk/ViewportBase.js +46 -3
- 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 +641 -119
- package/src/sap/ui/vk/ecad/LayersPanel.js +254 -121
- package/src/sap/ui/vk/i18n/messagebundle.properties +40 -5
- package/src/sap/ui/vk/i18n/messagebundle_ar.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_bg.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_ca.properties +35 -1
- package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_cs.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_cy.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_da.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_de.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_el.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_en.properties +348 -0
- package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_es.properties +36 -2
- package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_et.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_fi.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_fr.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_hi.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_hr.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_hu.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_id.properties +35 -1
- package/src/sap/ui/vk/i18n/messagebundle_it.properties +36 -2
- package/src/sap/ui/vk/i18n/messagebundle_iw.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_ja.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_kk.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_ko.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_lt.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_lv.properties +36 -2
- package/src/sap/ui/vk/i18n/messagebundle_mk.properties +36 -2
- package/src/sap/ui/vk/i18n/messagebundle_ms.properties +39 -5
- package/src/sap/ui/vk/i18n/messagebundle_nl.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_no.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_pl.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_pt.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_ro.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_ru.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_sh.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_sk.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_sl.properties +37 -3
- package/src/sap/ui/vk/i18n/messagebundle_sr.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_sv.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_th.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_tr.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_uk.properties +35 -1
- package/src/sap/ui/vk/i18n/messagebundle_vi.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +34 -0
- package/src/sap/ui/vk/library.js +6 -3
- 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 +5 -8
- 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 +3 -1
- package/src/sap/ui/vk/svg/HotspotHelper.js +2 -2
- 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 +12 -4
- package/src/sap/ui/vk/svg/ViewStateManager.js +2 -2
- package/src/sap/ui/vk/svg/Viewport.js +199 -2
- package/src/sap/ui/vk/themes/base/DrawerToolbar.less +8 -0
- package/src/sap/ui/vk/themes/base/Viewer.less +9 -12
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.8.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.8.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_belize_base/Viewer.less +1 -12
- package/src/sap/ui/vk/themes/sap_belize_base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_bluecrystal_base/Viewer.less +1 -12
- package/src/sap/ui/vk/themes/sap_bluecrystal_base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_hcb/base_Viewer.less +1 -12
- package/src/sap/ui/vk/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_horizon/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_dark/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_hcb/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_hcw/library.source.less +0 -5
- package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
- 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 +2 -2
- package/src/sap/ui/vk/threejs/Callout.js +11 -1
- package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/threejs/ContentManager.js +2 -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 +2 -2
- 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 +17 -1
- package/src/sap/ui/vk/threejs/Texture.js +2 -2
- package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
- package/src/sap/ui/vk/threejs/ViewStateManager.js +2 -2
- package/src/sap/ui/vk/threejs/Viewport.js +9 -3
- package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +1 -1
- 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/ExplodeItemGroup.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 +1 -1
- 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 +2 -2
- 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/TotaraLoader.js +4 -0
- package/src/sap/ui/vk/ve/dvl.js +1 -1
- package/src/sap/ui/vk/ve/dvl.wasm +0 -0
- package/src/sap/ui/vk/ve/matai.js +1 -1
- package/src/sap/ui/vk/ve/matai.wasm +0 -0
- package/src/sap/ui/vk/ToolbarRenderer.js +0 -41
- package/src/sap/ui/vk/ViewerRenderer.js +0 -48
- package/src/sap/ui/vk/ecad/ElementsPanelRenderer.js +0 -41
- package/src/sap/ui/vk/ecad/LayersPanelRenderer.js +0 -41
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.4.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.4.woff2 +0 -0
|
@@ -12,53 +12,102 @@ sap.ui.define([
|
|
|
12
12
|
"sap/m/OverflowToolbar",
|
|
13
13
|
"sap/m/ToolbarLayoutData",
|
|
14
14
|
"sap/m/ToolbarSpacer",
|
|
15
|
-
"sap/m/
|
|
15
|
+
"sap/m/Label",
|
|
16
|
+
"sap/m/Input",
|
|
16
17
|
"sap/m/Table",
|
|
18
|
+
"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",
|
|
17
24
|
"sap/m/Column",
|
|
18
|
-
"sap/m/Sticky",
|
|
19
25
|
"sap/m/ScrollContainer",
|
|
20
26
|
"sap/m/ColumnListItem",
|
|
27
|
+
"sap/m/plugins/ColumnResizer",
|
|
28
|
+
"sap/m/MultiComboBox",
|
|
29
|
+
"sap/m/p13n/Engine",
|
|
30
|
+
"sap/m/p13n/SelectionController",
|
|
31
|
+
"sap/m/p13n/GroupController",
|
|
32
|
+
"sap/m/p13n/SortController",
|
|
33
|
+
"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",
|
|
21
39
|
"sap/ui/core/Core",
|
|
22
40
|
"sap/ui/core/Control",
|
|
23
41
|
"sap/ui/core/Element",
|
|
24
42
|
"sap/ui/core/Icon",
|
|
25
43
|
"sap/ui/core/library",
|
|
26
|
-
"sap/ui/core/ResizeHandler",
|
|
27
44
|
"sap/ui/model/json/JSONModel",
|
|
45
|
+
"sap/ui/model/Filter",
|
|
46
|
+
"sap/ui/model/FilterOperator",
|
|
28
47
|
"../Core",
|
|
29
48
|
"../library",
|
|
30
49
|
"../ViewStateManager",
|
|
31
|
-
"./ElementsPanelRenderer",
|
|
32
50
|
"./VisibilityType",
|
|
33
|
-
"../getResourceBundle"
|
|
51
|
+
"../getResourceBundle",
|
|
52
|
+
"sap/m/library"
|
|
34
53
|
], function(
|
|
35
54
|
Button,
|
|
36
55
|
SearchField,
|
|
37
56
|
OverflowToolbar,
|
|
38
57
|
ToolbarLayoutData,
|
|
39
58
|
ToolbarSpacer,
|
|
40
|
-
|
|
59
|
+
Label,
|
|
60
|
+
Input,
|
|
41
61
|
Table,
|
|
62
|
+
ColumnWidthController,
|
|
63
|
+
Menu,
|
|
64
|
+
QuickGroup,
|
|
65
|
+
QuickGroupItem,
|
|
66
|
+
QuickSort,
|
|
67
|
+
QuickSortItem,
|
|
42
68
|
Column,
|
|
43
|
-
Sticky,
|
|
44
69
|
ScrollContainer,
|
|
45
70
|
ColumnListItem,
|
|
71
|
+
ColumnResizer,
|
|
72
|
+
MultiComboBox,
|
|
73
|
+
Engine,
|
|
74
|
+
SelectionController,
|
|
75
|
+
GroupController,
|
|
76
|
+
SortController,
|
|
77
|
+
MetadataHelper,
|
|
78
|
+
DynamicPage,
|
|
79
|
+
DynamicPageTitle,
|
|
80
|
+
DynamicPageHeader,
|
|
81
|
+
FilterBar,
|
|
82
|
+
FilterGroupItem,
|
|
46
83
|
Core,
|
|
47
84
|
Control,
|
|
48
85
|
Element,
|
|
49
86
|
Icon,
|
|
50
87
|
Library,
|
|
51
|
-
ResizeHandler,
|
|
52
88
|
JSONModel,
|
|
89
|
+
Filter,
|
|
90
|
+
FilterOperator,
|
|
53
91
|
vkCore,
|
|
54
92
|
vkLibrary,
|
|
55
93
|
ViewStateManager,
|
|
56
|
-
ElementsPanelRenderer,
|
|
57
94
|
VisibilityType,
|
|
58
|
-
getResourceBundle
|
|
95
|
+
getResourceBundle,
|
|
96
|
+
SapMLibrary
|
|
59
97
|
) {
|
|
60
98
|
"use strict";
|
|
61
99
|
|
|
100
|
+
const Sticky = SapMLibrary.Sticky;
|
|
101
|
+
|
|
102
|
+
function isAncestorOf(ancestor, descendant) {
|
|
103
|
+
for (let current = descendant.getParent(); current != null; current = current.getParent()) {
|
|
104
|
+
if (current === ancestor) {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
|
|
62
111
|
/**
|
|
63
112
|
* Constructor for a new ElementsPanel.
|
|
64
113
|
*
|
|
@@ -69,7 +118,7 @@ sap.ui.define([
|
|
|
69
118
|
* @extends sap.ui.core.Control
|
|
70
119
|
*
|
|
71
120
|
* @author SAP SE
|
|
72
|
-
* @version 1.
|
|
121
|
+
* @version 1.138.0
|
|
73
122
|
*
|
|
74
123
|
* @constructor
|
|
75
124
|
* @private
|
|
@@ -80,9 +129,19 @@ sap.ui.define([
|
|
|
80
129
|
var ElementsPanel = Control.extend("sap.ui.vk.ecad.ElementsPanel", /** @lends sap.ui.vk.ecad.ElementsPanel.prototype */ {
|
|
81
130
|
metadata: {
|
|
82
131
|
library: "sap.ui.vk",
|
|
132
|
+
properties: {
|
|
133
|
+
width: {
|
|
134
|
+
type: "sap.ui.core.CSSSize",
|
|
135
|
+
defaultValue: "auto"
|
|
136
|
+
},
|
|
137
|
+
height: {
|
|
138
|
+
type: "sap.ui.core.CSSSize",
|
|
139
|
+
defaultValue: "100%"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
83
142
|
aggregations: {
|
|
84
143
|
content: {
|
|
85
|
-
type: "sap.
|
|
144
|
+
type: "sap.f.DynamicPage",
|
|
86
145
|
multiple: false
|
|
87
146
|
}
|
|
88
147
|
},
|
|
@@ -112,27 +171,62 @@ sap.ui.define([
|
|
|
112
171
|
}
|
|
113
172
|
}
|
|
114
173
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
174
|
+
renderer: {
|
|
175
|
+
apiVersion: 2,
|
|
176
|
+
render: function(oRm, oControl) {
|
|
177
|
+
oRm.openStart("div", oControl);
|
|
178
|
+
oRm.class("sapUiSizeCompact");
|
|
179
|
+
const width = oControl.getWidth();
|
|
180
|
+
if (width != null) {
|
|
181
|
+
oRm.style("width", width);
|
|
182
|
+
}
|
|
183
|
+
const height = oControl.getHeight();
|
|
184
|
+
if (height != null) {
|
|
185
|
+
oRm.style("height", height);
|
|
186
|
+
}
|
|
187
|
+
oRm.openEnd();
|
|
188
|
+
oRm.renderControl(oControl.getAggregation("content"));
|
|
189
|
+
oRm.close("div");
|
|
190
|
+
}
|
|
191
|
+
},
|
|
118
192
|
constructor: function(sId, mSettings) {
|
|
119
193
|
Control.apply(this, arguments);
|
|
120
194
|
vkCore.observeAssociations(this);
|
|
121
195
|
}
|
|
122
196
|
});
|
|
123
197
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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
|
+
};
|
|
127
219
|
|
|
128
220
|
ElementsPanel.prototype.onSetViewStateManager = function(manager) {
|
|
129
221
|
this._manager = manager;
|
|
222
|
+
manager.attachSelectionChanged(this._onViewportSelectionChanged, this);
|
|
130
223
|
manager.attachVisibilityChanged(this._onVisibilityChanged, this);
|
|
131
224
|
this.refresh();
|
|
132
225
|
};
|
|
133
226
|
|
|
134
227
|
ElementsPanel.prototype.onUnsetViewStateManager = function(manager) {
|
|
135
228
|
this._manager = null;
|
|
229
|
+
manager.detachSelectionChanged(this._onViewportSelectionChanged, this);
|
|
136
230
|
manager.detachVisibilityChanged(this._onVisibilityChanged, this);
|
|
137
231
|
this.refresh();
|
|
138
232
|
};
|
|
@@ -153,12 +247,11 @@ sap.ui.define([
|
|
|
153
247
|
if (Control.prototype.init) {
|
|
154
248
|
Control.prototype.init.apply(this);
|
|
155
249
|
}
|
|
156
|
-
|
|
250
|
+
const that = this;
|
|
157
251
|
|
|
158
252
|
this._showButton = new Button({
|
|
159
253
|
enabled: false,
|
|
160
|
-
|
|
161
|
-
icon: iconVisible,
|
|
254
|
+
icon: IconType.Visible,
|
|
162
255
|
text: getResourceBundle().getText("ELEMENTS_PANEL_SHOW_BUTTON"),
|
|
163
256
|
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_SHOW_BUTTON_TOOLTIP"),
|
|
164
257
|
press: this._onShowElements.bind(this)
|
|
@@ -166,50 +259,59 @@ sap.ui.define([
|
|
|
166
259
|
|
|
167
260
|
this._hideButton = new Button({
|
|
168
261
|
enabled: false,
|
|
169
|
-
|
|
170
|
-
icon: iconHidden,
|
|
262
|
+
icon: IconType.Hidden,
|
|
171
263
|
text: getResourceBundle().getText("ELEMENTS_PANEL_HIDE_BUTTON"),
|
|
172
264
|
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_HIDE_BUTTON_TOOLTIP"),
|
|
173
265
|
press: this._onHideElements.bind(this)
|
|
174
266
|
});
|
|
175
267
|
|
|
176
268
|
this._settingsButton = new Button({
|
|
177
|
-
icon: "sap-icon://settings",
|
|
269
|
+
icon: "sap-icon://action-settings",
|
|
178
270
|
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_SETTINGS_BUTTON_TOOLTIP"),
|
|
179
271
|
press: this._onSettings.bind(this)
|
|
180
272
|
});
|
|
181
273
|
|
|
182
274
|
this._table = new Table({
|
|
183
275
|
mode: "MultiSelect",
|
|
276
|
+
fixedLayout: "Strict",
|
|
277
|
+
autoPopinMode: true,
|
|
278
|
+
popinLayout: "GridSmall",
|
|
279
|
+
includeItemInSelection: true,
|
|
280
|
+
noDataText: getResourceBundle().getText("ELEMENTS_PANEL_NO_DATA"),
|
|
184
281
|
sticky: [Sticky.HeaderToolbar, Sticky.ColumnHeaders],
|
|
185
|
-
selectionChange: this.
|
|
282
|
+
selectionChange: this._onTableSelectionChanged.bind(this),
|
|
186
283
|
headerToolbar: new OverflowToolbar({
|
|
187
284
|
content: [
|
|
285
|
+
new ToolbarSpacer(),
|
|
188
286
|
this._showButton,
|
|
189
287
|
this._hideButton,
|
|
190
|
-
new ToolbarSpacer(),
|
|
191
288
|
this._settingsButton
|
|
192
289
|
]
|
|
193
290
|
}),
|
|
291
|
+
dependents: [
|
|
292
|
+
new ColumnResizer({
|
|
293
|
+
columnResize: that._onColumnResize.bind(this)
|
|
294
|
+
})
|
|
295
|
+
],
|
|
194
296
|
columns: [
|
|
195
297
|
new Column({
|
|
196
298
|
hAlign: Library.TextAlign.Begin,
|
|
197
|
-
header: new
|
|
299
|
+
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_NAME_COLUMN") })
|
|
198
300
|
|
|
199
301
|
}),
|
|
200
302
|
new Column({
|
|
201
303
|
hAlign: Library.TextAlign.Begin,
|
|
202
|
-
header: new
|
|
304
|
+
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COLUMN") })
|
|
203
305
|
}),
|
|
204
306
|
new Column({
|
|
205
307
|
hAlign: Library.TextAlign.Begin,
|
|
206
|
-
header: new
|
|
308
|
+
header: new Label({
|
|
207
309
|
text: getResourceBundle().getText("ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN")
|
|
208
310
|
})
|
|
209
311
|
}),
|
|
210
312
|
new Column({
|
|
211
313
|
hAlign: Library.TextAlign.Center,
|
|
212
|
-
header: new
|
|
314
|
+
header: new Label({ text: getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN") })
|
|
213
315
|
})
|
|
214
316
|
],
|
|
215
317
|
items: {
|
|
@@ -217,49 +319,52 @@ sap.ui.define([
|
|
|
217
319
|
template: new ColumnListItem({
|
|
218
320
|
vAlign: "Middle",
|
|
219
321
|
cells: [
|
|
220
|
-
new
|
|
322
|
+
new Label({
|
|
221
323
|
text: "{refdes}"
|
|
222
324
|
}),
|
|
223
|
-
new
|
|
325
|
+
new Label({
|
|
224
326
|
text: {
|
|
225
327
|
path: "",
|
|
226
328
|
formatter: function(element) {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
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");
|
|
233
336
|
}
|
|
234
337
|
}
|
|
235
338
|
}
|
|
236
339
|
}),
|
|
237
|
-
new
|
|
340
|
+
new Label({
|
|
238
341
|
text: "{deviceref}"
|
|
239
342
|
}),
|
|
240
343
|
new Icon({
|
|
241
344
|
src: {
|
|
242
345
|
path: "",
|
|
243
346
|
formatter: function(element) {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
347
|
+
switch (that._getVisibility(element)) {
|
|
348
|
+
case VisibilityType.Hidden:
|
|
349
|
+
return IconType.Hidden;
|
|
350
|
+
case VisibilityType.Partial:
|
|
351
|
+
return IconType.Partial;
|
|
352
|
+
default:
|
|
353
|
+
return IconType.Visible;
|
|
249
354
|
}
|
|
250
|
-
return iconVisible;
|
|
251
355
|
}
|
|
252
356
|
},
|
|
253
357
|
tooltip: {
|
|
254
358
|
path: "",
|
|
255
359
|
formatter: function(element) {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
360
|
+
switch (that._getVisibility(element)) {
|
|
361
|
+
case VisibilityType.Hidden:
|
|
362
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP");
|
|
363
|
+
case VisibilityType.Partial:
|
|
364
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP");
|
|
365
|
+
default:
|
|
366
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP");
|
|
261
367
|
}
|
|
262
|
-
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP");
|
|
263
368
|
}
|
|
264
369
|
}
|
|
265
370
|
})
|
|
@@ -268,54 +373,254 @@ sap.ui.define([
|
|
|
268
373
|
}
|
|
269
374
|
});
|
|
270
375
|
|
|
271
|
-
this.
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
376
|
+
this._filterBar = new FilterBar({
|
|
377
|
+
useToolbar: false,
|
|
378
|
+
persistencyKey: "Filters",
|
|
379
|
+
search: this._onSearch.bind(this),
|
|
380
|
+
filterChange: this._onFilterChange.bind(this),
|
|
381
|
+
assignedFiltersChanged: this._onAssignedFiltersChanged.bind(this),
|
|
382
|
+
filterGroupItems: [
|
|
383
|
+
new FilterGroupItem({
|
|
384
|
+
name: ColumnName.RefDes,
|
|
385
|
+
label: getResourceBundle().getText("REFDES_FILTER_LABEL"),
|
|
386
|
+
groupName: "basic",
|
|
387
|
+
visible: true,
|
|
388
|
+
visibleInFilterBar: true,
|
|
389
|
+
control: new Input({
|
|
390
|
+
change: this._onFilterChange.bind(this)
|
|
391
|
+
})
|
|
392
|
+
}),
|
|
393
|
+
new FilterGroupItem({
|
|
394
|
+
name: ColumnName.Type,
|
|
395
|
+
label: getResourceBundle().getText("TYPE_FILTER_LABEL"),
|
|
396
|
+
groupName: "basic",
|
|
397
|
+
visible: true,
|
|
398
|
+
visibleInFilterBar: true,
|
|
399
|
+
control: new MultiComboBox({
|
|
400
|
+
selectionChange: this._onFilterChange.bind(this),
|
|
401
|
+
items: {
|
|
402
|
+
path: ModelName.ElementType + ">/",
|
|
403
|
+
templateShareable: false,
|
|
404
|
+
template: new sap.ui.core.Item({
|
|
405
|
+
key: "{" + ModelName.ElementType + ">}",
|
|
406
|
+
text: {
|
|
407
|
+
path: ModelName.ElementType + ">",
|
|
408
|
+
formatter: function(type) {
|
|
409
|
+
switch (type) {
|
|
410
|
+
case ElementType.Component:
|
|
411
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COMPONENT");
|
|
412
|
+
case ElementType.Net:
|
|
413
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_NET");
|
|
414
|
+
default:
|
|
415
|
+
return getResourceBundle().getText("ELEMENTS_TYPE_FILTER_ALL");
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
})
|
|
420
|
+
}
|
|
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
|
+
}),
|
|
275
451
|
content: this._table
|
|
276
452
|
});
|
|
277
453
|
|
|
278
|
-
this.setAggregation("content", this.
|
|
454
|
+
this.setAggregation("content", this._page);
|
|
455
|
+
|
|
456
|
+
this._p13nEngine = Engine.getInstance();
|
|
457
|
+
|
|
458
|
+
this._metadataHelper = new MetadataHelper([
|
|
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
|
+
]);
|
|
476
|
+
|
|
477
|
+
const filterSummaryData = {
|
|
478
|
+
expandedFilterSummary: "",
|
|
479
|
+
snappedFilterSummary: ""
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
const elementTypeData = [ElementType.Component, ElementType.Net];
|
|
279
483
|
|
|
280
484
|
this._scene = null;
|
|
281
485
|
this._model = new JSONModel();
|
|
282
|
-
this._model.setSizeLimit(100000);
|
|
283
486
|
this._table.setModel(this._model);
|
|
487
|
+
this._skipEvent = false;
|
|
488
|
+
this._filterSummaryModel = new JSONModel(filterSummaryData);
|
|
489
|
+
this._elementTypeModel = new JSONModel(elementTypeData);
|
|
490
|
+
|
|
491
|
+
this.setModel(this._filterSummaryModel, ModelName.FilterSummary);
|
|
492
|
+
this.setModel(this._elementTypeModel, ModelName.ElementType);
|
|
493
|
+
|
|
494
|
+
// Register the elements table for personalization
|
|
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
|
+
}
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
this._filterBar.registerGetFiltersWithValues(this._getFiltersWithValues.bind(this));
|
|
517
|
+
|
|
518
|
+
this._onAssignedFiltersChanged();
|
|
519
|
+
this._updateFilterBarToolbarText();
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
ElementsPanel.prototype.destroy = function() {
|
|
523
|
+
if (Control.prototype.destroy) {
|
|
524
|
+
Control.prototype.destroy.apply(this);
|
|
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;
|
|
531
|
+
|
|
532
|
+
this._model.destroy();
|
|
533
|
+
this._model = null;
|
|
534
|
+
this._elementTypeModel.destroy();
|
|
535
|
+
this._elementTypeModel = null;
|
|
536
|
+
this._filterSummaryModel.destroy();
|
|
537
|
+
this._filterSummaryModel = null;
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
ElementsPanel.prototype.getControl = function() {
|
|
541
|
+
return this._page;
|
|
284
542
|
};
|
|
285
543
|
|
|
286
544
|
ElementsPanel.prototype.refresh = function() {
|
|
287
|
-
if (!this._scene || !this._manager
|
|
545
|
+
if (!this._scene || !this._manager) {
|
|
288
546
|
this._model.setData([]);
|
|
289
547
|
return;
|
|
290
548
|
}
|
|
291
549
|
// scan the tree and collect elements info
|
|
292
|
-
|
|
293
|
-
this._scanTree(elements, this.
|
|
294
|
-
|
|
295
|
-
this._model.
|
|
550
|
+
const elements = new Map();
|
|
551
|
+
this._scanTree(elements, this._scene.getRootElement());
|
|
552
|
+
const data = elements.values().toArray();
|
|
553
|
+
this._model.setSizeLimit(data.length);
|
|
554
|
+
this._model.setData(data);
|
|
296
555
|
this._table.setModel(this._model);
|
|
556
|
+
|
|
297
557
|
this.fireContentChanged();
|
|
298
558
|
};
|
|
299
559
|
|
|
300
|
-
ElementsPanel.prototype.
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
this.
|
|
304
|
-
|
|
560
|
+
ElementsPanel.prototype._registerTableForP13n = function() {
|
|
561
|
+
|
|
562
|
+
this._p13nEngine.register(this._table, {
|
|
563
|
+
helper: this._metadataHelper,
|
|
564
|
+
controller: {
|
|
565
|
+
columnStates: new SelectionController({
|
|
566
|
+
control: this._table,
|
|
567
|
+
targetAggregation: "columns"
|
|
568
|
+
}),
|
|
569
|
+
columnWidthStates: new ColumnWidthController({
|
|
570
|
+
control: this._table
|
|
571
|
+
}),
|
|
572
|
+
sortStates: new SortController({
|
|
573
|
+
control: this._table
|
|
574
|
+
}),
|
|
575
|
+
groupStates: new GroupController({
|
|
576
|
+
control: this._table
|
|
577
|
+
})
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
|
|
581
|
+
this._p13nEngine.attachStateChange(this._onTableStateChange.bind(this));
|
|
582
|
+
|
|
583
|
+
// Set up default column visibility and sorting for the task table.
|
|
584
|
+
const state = {
|
|
585
|
+
columnStates: this._metadataHelper.getProperties().map(({ key }) => ({ key })),
|
|
586
|
+
sortStates: [{ key: ColumnName.RefDes, descending: true }]
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
this._p13nEngine.applyState(this._table, state);
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
// Open settings dialog for personalization
|
|
593
|
+
ElementsPanel.prototype._openSettingsDialog = function(panels) {
|
|
594
|
+
this._p13nEngine.show(this._table, panels, { source: this._table });
|
|
305
595
|
};
|
|
306
596
|
|
|
307
597
|
ElementsPanel.prototype._setScene = function(scene) {
|
|
308
|
-
this._scene = scene;
|
|
598
|
+
this._scene = (this._isECAD(scene) ? scene : null);
|
|
309
599
|
this.refresh();
|
|
310
600
|
};
|
|
311
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
|
+
|
|
312
611
|
ElementsPanel.prototype._getVisibility = function(element) {
|
|
313
|
-
|
|
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;
|
|
314
618
|
};
|
|
315
619
|
|
|
316
|
-
ElementsPanel.prototype._extractMetadata = function(
|
|
620
|
+
ElementsPanel.prototype._extractMetadata = function(nodeRef) {
|
|
621
|
+
const metadata = nodeRef?.userData?.metadata ?? {};
|
|
317
622
|
if (metadata.length != undefined) {
|
|
318
|
-
|
|
623
|
+
const map = new Map();
|
|
319
624
|
metadata.forEach(function(entry) {
|
|
320
625
|
if (entry.category === "ecad") {
|
|
321
626
|
map.set(entry.tag, entry.value);
|
|
@@ -326,10 +631,10 @@ sap.ui.define([
|
|
|
326
631
|
return null;
|
|
327
632
|
};
|
|
328
633
|
|
|
329
|
-
ElementsPanel.prototype._addElement = function(elements,
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
634
|
+
ElementsPanel.prototype._addElement = function(elements, nodeRef, metadata) {
|
|
635
|
+
const type = metadata.get("type");
|
|
636
|
+
const refdes = metadata.get("refdes");
|
|
637
|
+
const deviceref = metadata.get("deviceref");
|
|
333
638
|
|
|
334
639
|
var element = elements.get(refdes);
|
|
335
640
|
if (!element) {
|
|
@@ -337,43 +642,91 @@ sap.ui.define([
|
|
|
337
642
|
refdes: refdes,
|
|
338
643
|
type: type,
|
|
339
644
|
deviceref: deviceref,
|
|
340
|
-
|
|
341
|
-
|
|
645
|
+
parts: new Map(),
|
|
646
|
+
hiddenParts: new Set()
|
|
342
647
|
};
|
|
343
648
|
elements.set(refdes, element);
|
|
344
649
|
}
|
|
345
650
|
|
|
346
|
-
|
|
347
|
-
|
|
651
|
+
switch (type) {
|
|
652
|
+
case ElementType.Component:
|
|
653
|
+
element.parts.set(nodeRef.uid, nodeRef);
|
|
654
|
+
if (this._manager.getVisibilityState(nodeRef) === false) {
|
|
655
|
+
element.hiddenParts.add(nodeRef.uid);
|
|
656
|
+
}
|
|
657
|
+
break;
|
|
658
|
+
case ElementType.Net:
|
|
659
|
+
nodeRef.children.forEach(function(child) {
|
|
660
|
+
element.parts.set(child.uid, child);
|
|
661
|
+
if (this._manager.getVisibilityState(child) === false) {
|
|
662
|
+
element.hiddenParts.add(child.uid);
|
|
663
|
+
}
|
|
664
|
+
}, this);
|
|
665
|
+
break;
|
|
666
|
+
default:
|
|
667
|
+
break;
|
|
348
668
|
}
|
|
349
|
-
element.elements.set(nodeRef.uid, nodeRef);
|
|
350
669
|
};
|
|
351
670
|
|
|
352
671
|
ElementsPanel.prototype._scanTree = function(elements, nodeRef) {
|
|
353
|
-
|
|
354
|
-
var node = hierarchy.createNodeProxy(nodeRef);
|
|
355
|
-
var metadata = this._extractMetadata(node.getNodeMetadata());
|
|
356
|
-
hierarchy.destroyNodeProxy(node);
|
|
357
|
-
|
|
672
|
+
const metadata = this._extractMetadata(nodeRef);
|
|
358
673
|
if (metadata) {
|
|
359
|
-
|
|
674
|
+
const name = metadata.get("refdes");
|
|
360
675
|
if (name) {
|
|
361
|
-
this._addElement(elements,
|
|
676
|
+
this._addElement(elements, nodeRef, metadata);
|
|
362
677
|
return; // don't go further down the hierarchy
|
|
363
678
|
}
|
|
364
679
|
}
|
|
680
|
+
nodeRef.children.forEach((child) => this._scanTree(elements, child));
|
|
681
|
+
};
|
|
365
682
|
|
|
366
|
-
|
|
367
|
-
|
|
683
|
+
ElementsPanel.prototype._onTableSelectionChanged = function(event) {
|
|
684
|
+
const items = event.getParameter("listItems");
|
|
685
|
+
const selected = event.getParameter("selected");
|
|
686
|
+
const output = [];
|
|
687
|
+
|
|
688
|
+
items.forEach(function(item) {
|
|
689
|
+
const element = item.getBindingContext().getObject();
|
|
690
|
+
switch (element.type) {
|
|
691
|
+
case ElementType.Component:
|
|
692
|
+
output.push(element.parts.values().toArray()[0]);
|
|
693
|
+
break;
|
|
694
|
+
case ElementType.Net:
|
|
695
|
+
output.push(element.parts.values().toArray()[0].parent);
|
|
696
|
+
break;
|
|
697
|
+
default:
|
|
698
|
+
break;
|
|
699
|
+
}
|
|
368
700
|
}, this);
|
|
369
|
-
};
|
|
370
701
|
|
|
371
|
-
|
|
702
|
+
this._manager.setSelectionState(output, selected, true, true);
|
|
372
703
|
this._updateButtons();
|
|
373
704
|
};
|
|
374
705
|
|
|
375
|
-
ElementsPanel.prototype.
|
|
376
|
-
|
|
706
|
+
ElementsPanel.prototype._onViewportSelectionChanged = function(event) {
|
|
707
|
+
const items = this._table.getItems();
|
|
708
|
+
const selected = event.getParameter("selected");
|
|
709
|
+
const unselected = event.getParameter("unselected");
|
|
710
|
+
|
|
711
|
+
const process = (list, item, select) => {
|
|
712
|
+
const element = item.getBindingContext().getObject();
|
|
713
|
+
|
|
714
|
+
list.forEach(function(nodeRef) {
|
|
715
|
+
const metadata = this._extractMetadata(nodeRef);
|
|
716
|
+
const refdes = metadata?.get("refdes");
|
|
717
|
+
|
|
718
|
+
if (refdes === element.refdes) {
|
|
719
|
+
this._table.setSelectedItem(item, select, false);
|
|
720
|
+
}
|
|
721
|
+
}, this);
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
items.forEach(function(item) {
|
|
725
|
+
process(selected, item, true);
|
|
726
|
+
process(unselected, item, false);
|
|
727
|
+
}, this);
|
|
728
|
+
|
|
729
|
+
this._updateButtons();
|
|
377
730
|
};
|
|
378
731
|
|
|
379
732
|
ElementsPanel.prototype._handleResize = function(event) {
|
|
@@ -383,9 +736,9 @@ sap.ui.define([
|
|
|
383
736
|
ElementsPanel.prototype._setContent = function(content) {
|
|
384
737
|
// If there is no explicitly assigned view state manager then use the content connector's default one.
|
|
385
738
|
if (content && !this.getViewStateManager()) {
|
|
386
|
-
|
|
739
|
+
const connector = Element.getElementById(this.getContentConnector());
|
|
387
740
|
if (connector) {
|
|
388
|
-
|
|
741
|
+
const defaultManager = connector.getDefaultViewStateManager();
|
|
389
742
|
if (defaultManager) {
|
|
390
743
|
this.setViewStateManager(defaultManager);
|
|
391
744
|
}
|
|
@@ -400,16 +753,18 @@ sap.ui.define([
|
|
|
400
753
|
};
|
|
401
754
|
|
|
402
755
|
ElementsPanel.prototype._onContentChangesFinished = function(event) {
|
|
403
|
-
|
|
756
|
+
// causes second rebuild of everything ?
|
|
757
|
+
// this.refresh();
|
|
404
758
|
};
|
|
405
759
|
|
|
406
760
|
ElementsPanel.prototype._updateButtons = function() {
|
|
407
|
-
|
|
408
|
-
|
|
761
|
+
let canHide = false;
|
|
762
|
+
let canShow = false;
|
|
763
|
+
const selected = this._table.getSelectedItems();
|
|
409
764
|
|
|
410
765
|
selected.forEach(function(item) {
|
|
411
|
-
|
|
412
|
-
|
|
766
|
+
const element = item.getBindingContext().getObject();
|
|
767
|
+
const visibility = this._getVisibility(element);
|
|
413
768
|
|
|
414
769
|
if (visibility === VisibilityType.Visible) {
|
|
415
770
|
canHide = true;
|
|
@@ -426,43 +781,210 @@ sap.ui.define([
|
|
|
426
781
|
};
|
|
427
782
|
|
|
428
783
|
ElementsPanel.prototype._onShowElements = function() {
|
|
429
|
-
|
|
430
|
-
|
|
784
|
+
const toShow = [];
|
|
785
|
+
const selected = this._table.getSelectedItems();
|
|
431
786
|
|
|
432
787
|
selected.forEach(function(item) {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
788
|
+
const element = item.getBindingContext().getObject();
|
|
789
|
+
|
|
790
|
+
if (element.hiddenParts.size > 0) {
|
|
791
|
+
const ref = element.parts.values().toArray()[0];
|
|
792
|
+
element.hiddenParts.clear();
|
|
793
|
+
|
|
794
|
+
if (element.type === ElementType.Component) {
|
|
795
|
+
toShow.push(ref);
|
|
796
|
+
} else if (element.type === ElementType.Net) {
|
|
797
|
+
toShow.push(ref.parent);
|
|
798
|
+
}
|
|
439
799
|
}
|
|
440
|
-
});
|
|
800
|
+
}, this);
|
|
801
|
+
|
|
802
|
+
this._skipEvent = true;
|
|
441
803
|
this._manager.setVisibilityState(toShow, true, true, true);
|
|
442
804
|
this._model.updateBindings(true);
|
|
443
805
|
this._updateButtons();
|
|
444
806
|
};
|
|
445
807
|
|
|
446
808
|
ElementsPanel.prototype._onHideElements = function() {
|
|
447
|
-
|
|
448
|
-
|
|
809
|
+
const toHide = [];
|
|
810
|
+
const selected = this._table.getSelectedItems();
|
|
449
811
|
|
|
450
812
|
selected.forEach(function(item) {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
813
|
+
const element = item.getBindingContext().getObject();
|
|
814
|
+
|
|
815
|
+
if (element.hiddenParts.size < element.parts.size) {
|
|
816
|
+
const ref = element.parts.values().toArray()[0];
|
|
817
|
+
element.parts.forEach(part => element.hiddenParts.add(part.uid));
|
|
818
|
+
|
|
819
|
+
if (element.type === ElementType.Component) {
|
|
820
|
+
toHide.push(ref);
|
|
821
|
+
} else if (element.type === ElementType.Net) {
|
|
822
|
+
toHide.push(ref.parent);
|
|
823
|
+
}
|
|
457
824
|
}
|
|
458
|
-
});
|
|
825
|
+
}, this);
|
|
826
|
+
|
|
827
|
+
this._skipEvent = true;
|
|
459
828
|
this._manager.setVisibilityState(toHide, false, true, true);
|
|
460
829
|
this._model.updateBindings(true);
|
|
461
830
|
this._updateButtons();
|
|
462
831
|
};
|
|
463
832
|
|
|
833
|
+
ElementsPanel.prototype._onVisibilityChanged = function(event) {
|
|
834
|
+
if (this._skipEvent) {
|
|
835
|
+
this._skipEvent = false;
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
const hidden = event.getParameter("hidden");
|
|
839
|
+
const visible = event.getParameter("visible");
|
|
840
|
+
|
|
841
|
+
const process = (list, element, show) => {
|
|
842
|
+
list.forEach(function(ref) {
|
|
843
|
+
const metadata = this._extractMetadata(ref);
|
|
844
|
+
const refdes = metadata?.get("refdes");
|
|
845
|
+
|
|
846
|
+
if (refdes === element.refdes) {
|
|
847
|
+
switch (metadata.get("type")) {
|
|
848
|
+
case ElementType.Component:
|
|
849
|
+
if (show) {
|
|
850
|
+
element.hiddenParts.delete(ref.uid);
|
|
851
|
+
} else {
|
|
852
|
+
element.hiddenParts.add(ref.uid);
|
|
853
|
+
}
|
|
854
|
+
break;
|
|
855
|
+
case ElementType.Net:
|
|
856
|
+
if (show) {
|
|
857
|
+
// element.hiddenParts.delete(ref.uid);
|
|
858
|
+
ref.children.forEach((child) => element.hiddenParts.delete(child.uid));
|
|
859
|
+
} else {
|
|
860
|
+
// element.hiddenParts.add(ref.uid);
|
|
861
|
+
ref.children.forEach((child) => element.hiddenParts.add(child.uid));
|
|
862
|
+
}
|
|
863
|
+
break;
|
|
864
|
+
default:
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
867
|
+
} else {
|
|
868
|
+
const layer = metadata?.get("layer");
|
|
869
|
+
if (layer) {
|
|
870
|
+
if (element.parts.has(ref.uid)) {
|
|
871
|
+
if (show) {
|
|
872
|
+
element.hiddenParts.delete(ref.uid);
|
|
873
|
+
} else {
|
|
874
|
+
element.hiddenParts.add(ref.uid);
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
}, this);
|
|
880
|
+
};
|
|
881
|
+
|
|
882
|
+
this._model.getData().forEach(function(element) {
|
|
883
|
+
process(hidden, element, false);
|
|
884
|
+
process(visible, element, true);
|
|
885
|
+
}, this);
|
|
886
|
+
|
|
887
|
+
this._model.updateBindings(true);
|
|
888
|
+
this._updateButtons();
|
|
889
|
+
};
|
|
890
|
+
|
|
464
891
|
ElementsPanel.prototype._onSettings = function() {
|
|
465
|
-
|
|
892
|
+
this._openSettingsDialog(["columnStates", "sortStates", "groupStates"]);
|
|
893
|
+
};
|
|
894
|
+
|
|
895
|
+
// Go button on the filter bar
|
|
896
|
+
ElementsPanel.prototype._onSearch = function() {
|
|
897
|
+
this._table.setShowOverlay(true);
|
|
898
|
+
|
|
899
|
+
const filters = this._getFiltersWithValues().reduce((result, filterGroupItem) => {
|
|
900
|
+
var control = filterGroupItem.getControl();
|
|
901
|
+
const filterName = filterGroupItem.getName();
|
|
902
|
+
var filters = [];
|
|
903
|
+
|
|
904
|
+
switch (filterName) {
|
|
905
|
+
case ColumnName.RefDes:
|
|
906
|
+
case ColumnName.Device:
|
|
907
|
+
const value = control.getValue();
|
|
908
|
+
filters.push(new Filter({
|
|
909
|
+
path: filterGroupItem.getName(),
|
|
910
|
+
operator: FilterOperator.Contains,
|
|
911
|
+
value1: value
|
|
912
|
+
}));
|
|
913
|
+
break;
|
|
914
|
+
case ColumnName.Type:
|
|
915
|
+
const selected = control.getSelectedKeys();
|
|
916
|
+
selected.forEach(key => filters.push(new Filter({
|
|
917
|
+
path: filterGroupItem.getName(),
|
|
918
|
+
operator: FilterOperator.Contains,
|
|
919
|
+
value1: key
|
|
920
|
+
})));
|
|
921
|
+
break;
|
|
922
|
+
default:
|
|
923
|
+
break;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
if (filters.length > 0) {
|
|
927
|
+
result.push(new Filter({
|
|
928
|
+
filters: filters,
|
|
929
|
+
and: false
|
|
930
|
+
}));
|
|
931
|
+
}
|
|
932
|
+
return result;
|
|
933
|
+
}, []);
|
|
934
|
+
|
|
935
|
+
this._table.getBinding("items").filter(filters);
|
|
936
|
+
this._table.setShowOverlay(false);
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
ElementsPanel.prototype._onFilterChange = function() {
|
|
940
|
+
this._table.setShowOverlay(true);
|
|
941
|
+
};
|
|
942
|
+
|
|
943
|
+
ElementsPanel.prototype._onAssignedFiltersChanged = function() {
|
|
944
|
+
this._filterSummaryModel.setProperty("/snappedFilterSummary", this._filterBar.retrieveFiltersWithValuesAsText());
|
|
945
|
+
this._filterSummaryModel.setProperty("/expandedFilterSummary", this._filterBar.retrieveFiltersWithValuesAsTextExpanded());
|
|
946
|
+
};
|
|
947
|
+
|
|
948
|
+
ElementsPanel.prototype._onBasicSearch = function() {
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
ElementsPanel.prototype._onTableStateChange = function(event) {
|
|
952
|
+
if (event.getParameter("control") !== this._table) {
|
|
953
|
+
return;
|
|
954
|
+
}
|
|
955
|
+
const state = event.getParameter("state");
|
|
956
|
+
// NOTE: There is a bug in UI5 1.120 - this event should not be fired with `null` state.
|
|
957
|
+
// TODO(fix): Remove this check once the bug is fixed in later versions of UI5.
|
|
958
|
+
if (state == null) {
|
|
959
|
+
return;
|
|
960
|
+
}
|
|
961
|
+
};
|
|
962
|
+
|
|
963
|
+
ElementsPanel.prototype._onColumnResize = function(event) {
|
|
964
|
+
};
|
|
965
|
+
|
|
966
|
+
// Returns the filter items with non-empty values from the filter bar.
|
|
967
|
+
ElementsPanel.prototype._getFiltersWithValues = function() {
|
|
968
|
+
return this._filterBar
|
|
969
|
+
.getFilterGroupItems()
|
|
970
|
+
.filter((filterGroupItem) => {
|
|
971
|
+
const control = filterGroupItem.getControl();
|
|
972
|
+
|
|
973
|
+
if (control instanceof MultiComboBox) {
|
|
974
|
+
return control.getSelectedItems().length > 0;
|
|
975
|
+
} else if (control instanceof Input) {
|
|
976
|
+
return control.getValue().length > 0;
|
|
977
|
+
} else {
|
|
978
|
+
return false;
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
// Currently there is no way to programmatically update
|
|
984
|
+
// text next to Go button, it's a FitlerBar bug,
|
|
985
|
+
// so check for private function and call it
|
|
986
|
+
ElementsPanel.prototype._updateFilterBarToolbarText = function() {
|
|
987
|
+
this._filterBar._updateToolbarText?.();
|
|
466
988
|
};
|
|
467
989
|
|
|
468
990
|
return ElementsPanel;
|