@sapui5/sap.ui.vk 1.135.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.
Files changed (244) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/vk/.library +1 -1
  3. package/src/sap/ui/vk/AnimationPlayback.js +1 -1
  4. package/src/sap/ui/vk/AnimationPlayer.js +2 -2
  5. package/src/sap/ui/vk/AnimationSequence.js +1 -1
  6. package/src/sap/ui/vk/AnimationTimeSlider.js +1 -1
  7. package/src/sap/ui/vk/AnimationTrack.js +1 -1
  8. package/src/sap/ui/vk/Annotation.js +2 -2
  9. package/src/sap/ui/vk/BaseNodeProxy.js +1 -1
  10. package/src/sap/ui/vk/Camera.js +1 -1
  11. package/src/sap/ui/vk/ContentConnector.js +2 -2
  12. package/src/sap/ui/vk/ContentManager.js +1 -1
  13. package/src/sap/ui/vk/ContentResource.js +13 -1
  14. package/src/sap/ui/vk/Core.js +1 -3
  15. package/src/sap/ui/vk/DownloadManager.js +1 -1
  16. package/src/sap/ui/vk/DrawerToolbar.js +142 -76
  17. package/src/sap/ui/vk/DrawerToolbarButton.js +12 -1
  18. package/src/sap/ui/vk/DvlException.js +1 -1
  19. package/src/sap/ui/vk/FlexibleControl.js +1 -2
  20. package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -2
  21. package/src/sap/ui/vk/Highlight.js +1 -1
  22. package/src/sap/ui/vk/ImageContentManager.js +1 -1
  23. package/src/sap/ui/vk/JointUtils.js +1 -1
  24. package/src/sap/ui/vk/LayerProxy.js +1 -1
  25. package/src/sap/ui/vk/LegendItem.js +1 -1
  26. package/src/sap/ui/vk/ListPanel.js +1 -1
  27. package/src/sap/ui/vk/ListPanelStack.js +1 -1
  28. package/src/sap/ui/vk/Loco.js +1 -1
  29. package/src/sap/ui/vk/Material.js +1 -1
  30. package/src/sap/ui/vk/NativeViewport.js +1 -1
  31. package/src/sap/ui/vk/NodeHierarchy.js +1 -1
  32. package/src/sap/ui/vk/NodeProxy.js +1 -1
  33. package/src/sap/ui/vk/NodeUtils.js +1 -1
  34. package/src/sap/ui/vk/Notifications.js +1 -1
  35. package/src/sap/ui/vk/OrthographicCamera.js +1 -1
  36. package/src/sap/ui/vk/OutputSettings.js +0 -1
  37. package/src/sap/ui/vk/Overlay.js +1 -1
  38. package/src/sap/ui/vk/PerspectiveCamera.js +1 -1
  39. package/src/sap/ui/vk/ProgressIndicator.js +1 -1
  40. package/src/sap/ui/vk/RedlineCollaboration.js +1 -1
  41. package/src/sap/ui/vk/RedlineConversation.js +1 -1
  42. package/src/sap/ui/vk/RedlineDesign.js +1 -1
  43. package/src/sap/ui/vk/RedlineElement.js +1 -1
  44. package/src/sap/ui/vk/RedlineElementComment.js +1 -1
  45. package/src/sap/ui/vk/RedlineElementEllipse.js +1 -1
  46. package/src/sap/ui/vk/RedlineElementFreehand.js +1 -1
  47. package/src/sap/ui/vk/RedlineElementLine.js +1 -1
  48. package/src/sap/ui/vk/RedlineElementRectangle.js +1 -1
  49. package/src/sap/ui/vk/RedlineElementText.js +1 -1
  50. package/src/sap/ui/vk/RedlineSurface.js +2 -2
  51. package/src/sap/ui/vk/SafeArea.js +1 -1
  52. package/src/sap/ui/vk/Scene.js +12 -1
  53. package/src/sap/ui/vk/SceneTree.js +4 -7
  54. package/src/sap/ui/vk/StepNavigation.js +1 -2
  55. package/src/sap/ui/vk/Texture.js +2 -2
  56. package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
  57. package/src/sap/ui/vk/ToggleMenuItem.js +7 -4
  58. package/src/sap/ui/vk/ToggleMenuItemRenderer.js +224 -0
  59. package/src/sap/ui/vk/Toolbar.js +69 -115
  60. package/src/sap/ui/vk/View.js +7 -13
  61. package/src/sap/ui/vk/ViewGallery.js +2 -2
  62. package/src/sap/ui/vk/ViewGalleryThumbnail.js +1 -1
  63. package/src/sap/ui/vk/ViewGroup.js +1 -1
  64. package/src/sap/ui/vk/ViewManager.js +1 -1
  65. package/src/sap/ui/vk/ViewStateManager.js +2 -2
  66. package/src/sap/ui/vk/ViewStateManagerBase.js +3 -3
  67. package/src/sap/ui/vk/Viewer.js +467 -304
  68. package/src/sap/ui/vk/Viewport.js +2 -2
  69. package/src/sap/ui/vk/ViewportBase.js +46 -3
  70. package/src/sap/ui/vk/VisibilityMode.js +2 -1
  71. package/src/sap/ui/vk/dvl/BaseNodeProxy.js +1 -1
  72. package/src/sap/ui/vk/dvl/ContentManager.js +1 -1
  73. package/src/sap/ui/vk/dvl/GraphicsCore.js +1 -1
  74. package/src/sap/ui/vk/dvl/LayerProxy.js +1 -1
  75. package/src/sap/ui/vk/dvl/NodeHierarchy.js +1 -1
  76. package/src/sap/ui/vk/dvl/NodeProxy.js +1 -1
  77. package/src/sap/ui/vk/dvl/Scene.js +1 -1
  78. package/src/sap/ui/vk/dvl/ViewStateManager.js +1 -1
  79. package/src/sap/ui/vk/dvl/Viewport.js +1 -1
  80. package/src/sap/ui/vk/ecad/ElementsPanel.js +991 -0
  81. package/src/sap/ui/vk/ecad/LayersPanel.js +573 -0
  82. package/src/sap/ui/vk/ecad/VisibilityType.js +31 -0
  83. package/src/sap/ui/vk/i18n/messagebundle.properties +85 -0
  84. package/src/sap/ui/vk/i18n/messagebundle_ar.properties +34 -0
  85. package/src/sap/ui/vk/i18n/messagebundle_bg.properties +34 -0
  86. package/src/sap/ui/vk/i18n/messagebundle_ca.properties +35 -1
  87. package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +34 -0
  88. package/src/sap/ui/vk/i18n/messagebundle_cs.properties +34 -0
  89. package/src/sap/ui/vk/i18n/messagebundle_cy.properties +34 -0
  90. package/src/sap/ui/vk/i18n/messagebundle_da.properties +34 -0
  91. package/src/sap/ui/vk/i18n/messagebundle_de.properties +34 -0
  92. package/src/sap/ui/vk/i18n/messagebundle_el.properties +34 -0
  93. package/src/sap/ui/vk/i18n/messagebundle_en.properties +348 -0
  94. package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +34 -0
  95. package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +34 -0
  96. package/src/sap/ui/vk/i18n/messagebundle_es.properties +36 -2
  97. package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +34 -0
  98. package/src/sap/ui/vk/i18n/messagebundle_et.properties +34 -0
  99. package/src/sap/ui/vk/i18n/messagebundle_fi.properties +34 -0
  100. package/src/sap/ui/vk/i18n/messagebundle_fr.properties +34 -0
  101. package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +34 -0
  102. package/src/sap/ui/vk/i18n/messagebundle_hi.properties +34 -0
  103. package/src/sap/ui/vk/i18n/messagebundle_hr.properties +34 -0
  104. package/src/sap/ui/vk/i18n/messagebundle_hu.properties +34 -0
  105. package/src/sap/ui/vk/i18n/messagebundle_id.properties +35 -1
  106. package/src/sap/ui/vk/i18n/messagebundle_it.properties +36 -2
  107. package/src/sap/ui/vk/i18n/messagebundle_iw.properties +34 -0
  108. package/src/sap/ui/vk/i18n/messagebundle_ja.properties +34 -0
  109. package/src/sap/ui/vk/i18n/messagebundle_kk.properties +34 -0
  110. package/src/sap/ui/vk/i18n/messagebundle_ko.properties +34 -0
  111. package/src/sap/ui/vk/i18n/messagebundle_lt.properties +34 -0
  112. package/src/sap/ui/vk/i18n/messagebundle_lv.properties +36 -2
  113. package/src/sap/ui/vk/i18n/messagebundle_mk.properties +36 -2
  114. package/src/sap/ui/vk/i18n/messagebundle_ms.properties +39 -5
  115. package/src/sap/ui/vk/i18n/messagebundle_nl.properties +34 -0
  116. package/src/sap/ui/vk/i18n/messagebundle_no.properties +34 -0
  117. package/src/sap/ui/vk/i18n/messagebundle_pl.properties +34 -0
  118. package/src/sap/ui/vk/i18n/messagebundle_pt.properties +34 -0
  119. package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +34 -0
  120. package/src/sap/ui/vk/i18n/messagebundle_ro.properties +34 -0
  121. package/src/sap/ui/vk/i18n/messagebundle_ru.properties +34 -0
  122. package/src/sap/ui/vk/i18n/messagebundle_sh.properties +34 -0
  123. package/src/sap/ui/vk/i18n/messagebundle_sk.properties +34 -0
  124. package/src/sap/ui/vk/i18n/messagebundle_sl.properties +37 -3
  125. package/src/sap/ui/vk/i18n/messagebundle_sr.properties +34 -0
  126. package/src/sap/ui/vk/i18n/messagebundle_sv.properties +34 -0
  127. package/src/sap/ui/vk/i18n/messagebundle_th.properties +34 -0
  128. package/src/sap/ui/vk/i18n/messagebundle_tr.properties +34 -0
  129. package/src/sap/ui/vk/i18n/messagebundle_uk.properties +35 -1
  130. package/src/sap/ui/vk/i18n/messagebundle_vi.properties +34 -0
  131. package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +34 -0
  132. package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +34 -0
  133. package/src/sap/ui/vk/library.js +7 -3
  134. package/src/sap/ui/vk/measurements/Angle.js +1 -1
  135. package/src/sap/ui/vk/measurements/Area.js +1 -1
  136. package/src/sap/ui/vk/measurements/Distance.js +1 -1
  137. package/src/sap/ui/vk/measurements/Edge.js +1 -1
  138. package/src/sap/ui/vk/measurements/Face.js +1 -1
  139. package/src/sap/ui/vk/measurements/Feature.js +1 -1
  140. package/src/sap/ui/vk/measurements/Vertex.js +1 -1
  141. package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
  142. package/src/sap/ui/vk/pdf/PageGallery.js +3 -5
  143. package/src/sap/ui/vk/pdf/Viewport.js +5 -8
  144. package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
  145. package/src/sap/ui/vk/svg/ContentDeliveryService.js +2 -1
  146. package/src/sap/ui/vk/svg/ContentManager.js +4 -1
  147. package/src/sap/ui/vk/svg/HotspotHelper.js +2 -2
  148. package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
  149. package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
  150. package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
  151. package/src/sap/ui/vk/svg/Scene.js +1 -1
  152. package/src/sap/ui/vk/svg/SceneBuilder.js +12 -4
  153. package/src/sap/ui/vk/svg/ViewStateManager.js +2 -2
  154. package/src/sap/ui/vk/svg/Viewport.js +199 -2
  155. package/src/sap/ui/vk/themes/base/DrawerToolbar.less +8 -0
  156. package/src/sap/ui/vk/themes/base/Viewer.less +9 -12
  157. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.8.woff2 +0 -0
  158. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.8.woff2 +0 -0
  159. package/src/sap/ui/vk/themes/base/library.source.less +1 -1
  160. package/src/sap/ui/vk/themes/sap_belize_base/Viewer.less +1 -12
  161. package/src/sap/ui/vk/themes/sap_belize_base/library.source.less +1 -1
  162. package/src/sap/ui/vk/themes/sap_bluecrystal_base/Viewer.less +1 -12
  163. package/src/sap/ui/vk/themes/sap_bluecrystal_base/library.source.less +1 -1
  164. package/src/sap/ui/vk/themes/sap_hcb/base_Viewer.less +1 -12
  165. package/src/sap/ui/vk/themes/sap_hcb/library.source.less +1 -1
  166. package/src/sap/ui/vk/themes/sap_horizon/library.source.less +0 -5
  167. package/src/sap/ui/vk/themes/sap_horizon_dark/library.source.less +0 -5
  168. package/src/sap/ui/vk/themes/sap_horizon_hcb/library.source.less +0 -5
  169. package/src/sap/ui/vk/themes/sap_horizon_hcw/library.source.less +0 -5
  170. package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
  171. package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
  172. package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
  173. package/src/sap/ui/vk/threejs/Billboard.js +1 -1
  174. package/src/sap/ui/vk/threejs/Callout.js +11 -1
  175. package/src/sap/ui/vk/threejs/ContentDeliveryService.js +2 -1
  176. package/src/sap/ui/vk/threejs/ContentManager.js +2 -1
  177. package/src/sap/ui/vk/threejs/DetailView.js +1 -1
  178. package/src/sap/ui/vk/threejs/HighlightPlayer.js +1 -1
  179. package/src/sap/ui/vk/threejs/Material.js +2 -2
  180. package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
  181. package/src/sap/ui/vk/threejs/NodeProxy.js +1 -1
  182. package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
  183. package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
  184. package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
  185. package/src/sap/ui/vk/threejs/Scene.js +1 -1
  186. package/src/sap/ui/vk/threejs/SceneBuilder.js +18 -2
  187. package/src/sap/ui/vk/threejs/Texture.js +2 -2
  188. package/src/sap/ui/vk/threejs/ThreeExtensions.js +9 -1
  189. package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
  190. package/src/sap/ui/vk/threejs/ViewStateManager.js +2 -2
  191. package/src/sap/ui/vk/threejs/Viewport.js +9 -3
  192. package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +1 -1
  193. package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
  194. package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
  195. package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
  196. package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
  197. package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
  198. package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
  199. package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
  200. package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
  201. package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
  202. package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
  203. package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
  204. package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
  205. package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
  206. package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
  207. package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
  208. package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
  209. package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
  210. package/src/sap/ui/vk/tools/ExplodeItemGroup.js +1 -1
  211. package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
  212. package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
  213. package/src/sap/ui/vk/tools/Gizmo.js +1 -1
  214. package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
  215. package/src/sap/ui/vk/tools/MoveTool.js +1 -1
  216. package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
  217. package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +2 -2
  218. package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
  219. package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
  220. package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
  221. package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
  222. package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
  223. package/src/sap/ui/vk/tools/RotateTool.js +1 -1
  224. package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
  225. package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
  226. package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
  227. package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
  228. package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
  229. package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
  230. package/src/sap/ui/vk/tools/Tool.js +1 -1
  231. package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
  232. package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
  233. package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
  234. package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
  235. package/src/sap/ui/vk/totara/TotaraLoader.js +4 -0
  236. package/src/sap/ui/vk/totara/TotaraUtils.js +5 -0
  237. package/src/sap/ui/vk/ve/dvl.js +1 -1
  238. package/src/sap/ui/vk/ve/dvl.wasm +0 -0
  239. package/src/sap/ui/vk/ve/matai.js +1 -1
  240. package/src/sap/ui/vk/ve/matai.wasm +0 -0
  241. package/src/sap/ui/vk/ToolbarRenderer.js +0 -41
  242. package/src/sap/ui/vk/ViewerRenderer.js +0 -48
  243. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.4.woff2 +0 -0
  244. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.4.woff2 +0 -0
@@ -0,0 +1,573 @@
1
+ /*!
2
+ * ${c\pyright}
3
+ */
4
+
5
+ // Provides control sap.ui.vk.ecad.LayerPanel
6
+ sap.ui.define([
7
+ "sap/m/Button",
8
+ "sap/m/SearchField",
9
+ "sap/m/OverflowToolbar",
10
+ "sap/m/ToolbarLayoutData",
11
+ "sap/m/ToolbarSpacer",
12
+ "sap/m/Label",
13
+ "sap/m/Table",
14
+ "sap/m/Column",
15
+ "sap/m/ScrollContainer",
16
+ "sap/m/ColumnListItem",
17
+ "sap/m/plugins/ColumnResizer",
18
+ "sap/ui/core/Core",
19
+ "sap/ui/core/Control",
20
+ "sap/ui/core/Element",
21
+ "sap/ui/core/Icon",
22
+ "sap/ui/core/library",
23
+ "sap/ui/model/json/JSONModel",
24
+ "../Core",
25
+ "../library",
26
+ "../ViewStateManager",
27
+ "./VisibilityType",
28
+ "../getResourceBundle",
29
+ "sap/m/library"
30
+ ], function(
31
+ Button,
32
+ SearchField,
33
+ OverflowToolbar,
34
+ ToolbarLayoutData,
35
+ ToolbarSpacer,
36
+ Label,
37
+ Table,
38
+ Column,
39
+ ScrollContainer,
40
+ ColumnListItem,
41
+ ColumnResizer,
42
+ Core,
43
+ Control,
44
+ Element,
45
+ Icon,
46
+ Library,
47
+ JSONModel,
48
+ vkCore,
49
+ vkLibrary,
50
+ ViewStateManager,
51
+ VisibilityType,
52
+ getResourceBundle,
53
+ SapMLibrary
54
+ ) {
55
+ "use strict";
56
+
57
+ const Sticky = SapMLibrary.Sticky;
58
+
59
+ /**
60
+ * Constructor for a new LayersPanel.
61
+ *
62
+ * @param {string} [sId] id for the new control, generated automatically if no id is given
63
+ * @param {object} [mSettings] initial settings for the new control
64
+ *
65
+ * @class Provides a flat list view of all the ECAD layers in a given scene in table format.
66
+ * @extends sap.ui.core.Control
67
+ *
68
+ * @author SAP SE
69
+ * @version 1.138.0
70
+ *
71
+ * @constructor
72
+ * @public
73
+ * @alias sap.ui.vk.ecad.LayersPanel
74
+ * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
75
+ * @since 1.136.0
76
+ */
77
+ var LayersPanel = Control.extend("sap.ui.vk.ecad.LayersPanel", /** @lends sap.ui.vk.ecad.LayersPanel.prototype */ {
78
+ metadata: {
79
+ library: "sap.ui.vk",
80
+ properties: {
81
+ width: {
82
+ type: "sap.ui.core.CSSSize",
83
+ defaultValue: "auto"
84
+ },
85
+ height: {
86
+ type: "sap.ui.core.CSSSize",
87
+ defaultValue: "100%"
88
+ }
89
+ },
90
+ aggregations: {
91
+ content: {
92
+ type: "sap.m.Table",
93
+ multiple: false
94
+ }
95
+ },
96
+ associations: {
97
+ /**
98
+ * An association to the <code>ContentConnector</code> instance that manages content resources.
99
+ */
100
+ contentConnector: {
101
+ type: "sap.ui.vk.ContentConnector",
102
+ multiple: false
103
+ },
104
+
105
+ /**
106
+ * An association to the <code>ViewStateManager</code> instance.
107
+ */
108
+ viewStateManager: {
109
+ type: "sap.ui.vk.ViewStateManagerBase",
110
+ multiple: false
111
+ }
112
+ },
113
+ events: {
114
+ /**
115
+ * This event will be fired when content is replaced.
116
+ */
117
+ contentChanged: {
118
+ enableEventBubbling: true
119
+ }
120
+ }
121
+ },
122
+ renderer: {
123
+ apiVersion: 2,
124
+ render: function(oRm, oControl) {
125
+ oRm.openStart("div", oControl);
126
+ oRm.class("sapUiSizeCompact");
127
+ const width = oControl.getWidth();
128
+ if (width != null) {
129
+ oRm.style("width", width);
130
+ }
131
+ const height = oControl.getHeight();
132
+ if (height != null) {
133
+ oRm.style("height", height);
134
+ }
135
+ oRm.openEnd();
136
+ oRm.renderControl(oControl.getAggregation("content"));
137
+ oRm.close("div");
138
+ }
139
+ },
140
+ constructor: function(sId, mSettings) {
141
+ Control.apply(this, arguments);
142
+ vkCore.observeAssociations(this);
143
+ }
144
+ });
145
+
146
+ const IconType = {
147
+ Hidden: "sap-icon://status-inactive",
148
+ Partial: "sap-icon://vk-icons/partially-visible-layer",
149
+ Visible: "sap-icon://rhombus-milestone-2"
150
+ };
151
+
152
+ const ElementType = {
153
+ Component: "2",
154
+ Net: "4"
155
+ };
156
+ LayersPanel.prototype.onSetViewStateManager = function(manager) {
157
+ this._manager = manager;
158
+ manager.attachVisibilityChanged(this._onVisibilityChanged, this);
159
+ this.refresh();
160
+ };
161
+
162
+ LayersPanel.prototype.onUnsetViewStateManager = function(manager) {
163
+ this._manager = null;
164
+ manager.detachVisibilityChanged(this._onVisibilityChanged, this);
165
+ this.refresh();
166
+ };
167
+
168
+ LayersPanel.prototype.onSetContentConnector = function(connector) {
169
+ connector.attachContentReplaced(this._onContentReplaced, this);
170
+ connector.attachContentChangesFinished(this._onContentChangesFinished, this);
171
+ this._setContent(connector.getContent());
172
+ };
173
+
174
+ LayersPanel.prototype.onUnsetContentConnector = function(connector) {
175
+ this._setContent(null);
176
+ connector.detachContentReplaced(this._onContentReplaced, this);
177
+ connector.detachContentChangesFinished(this._onContentChangesFinished, this);
178
+ };
179
+
180
+ LayersPanel.prototype.init = function() {
181
+ if (Control.prototype.init) {
182
+ Control.prototype.init.apply(this);
183
+ }
184
+ const that = this;
185
+
186
+ this._searchField = new SearchField({
187
+ layoutData: new ToolbarLayoutData({
188
+ shrinkable: true,
189
+ maxWidth: "400px"
190
+ }),
191
+ search: function(event) {
192
+ that._onSearch.call(that, event.getParameter("query"));
193
+ }
194
+ });
195
+
196
+ this._showButton = new Button({
197
+ enabled: false,
198
+ icon: IconType.Visible,
199
+ text: getResourceBundle().getText("LAYERS_PANEL_SHOW_BUTTON"),
200
+ tooltip: getResourceBundle().getText("LAYERS_PANEL_SHOW_BUTTON_TOOLTIP"),
201
+ press: this._onShowLayers.bind(this)
202
+ });
203
+
204
+ this._hideButton = new Button({
205
+ enabled: false,
206
+ icon: IconType.Hidden,
207
+ text: getResourceBundle().getText("LAYERS_PANEL_HIDE_BUTTON"),
208
+ tooltip: getResourceBundle().getText("LAYERS_PANEL_HIDE_BUTTON_TOOLTIP"),
209
+ press: this._onHideLayers.bind(this)
210
+ });
211
+
212
+ this._table = new Table({
213
+ mode: "MultiSelect",
214
+ includeItemInSelection: true,
215
+ noDataText: getResourceBundle().getText("LAYERS_PANEL_NO_DATA"),
216
+ sticky: [Sticky.HeaderToolbar, Sticky.ColumnHeaders],
217
+ selectionChange: this._onSelectionChanged.bind(this),
218
+ headerToolbar: new OverflowToolbar({
219
+ content: [
220
+ this._searchField,
221
+ new ToolbarSpacer(),
222
+ this._showButton,
223
+ this._hideButton
224
+ ]
225
+ }),
226
+ dependents: [
227
+ new ColumnResizer({
228
+ columnResize: that._onColumnResize.bind(this)
229
+ })
230
+ ],
231
+ columns: [
232
+ new Column({
233
+ minScreenWidth: "10rem",
234
+ hAlign: Library.TextAlign.Begin,
235
+ header: new Label({ text: getResourceBundle().getText("LAYERS_PANEL__NAME_COLUMN") })
236
+
237
+ }),
238
+ new Column({
239
+ minScreenWidth: "6rem",
240
+ hAlign: Library.TextAlign.Center,
241
+ header: new Label({ text: getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN") })
242
+ })
243
+ ],
244
+ items: {
245
+ path: "/",
246
+ template: new ColumnListItem({
247
+ vAlign: "Middle",
248
+ cells: [
249
+ new Label({
250
+ text: "{name}"
251
+ }),
252
+ new Icon({
253
+ src: {
254
+ path: "",
255
+ formatter: function(layer) {
256
+ switch (that._getVisibility(layer)) {
257
+ case VisibilityType.Hidden:
258
+ return IconType.Hidden;
259
+ case VisibilityType.Partial:
260
+ return IconType.Partial;
261
+ default:
262
+ return IconType.Visible;
263
+ }
264
+ }
265
+ },
266
+ tooltip: {
267
+ path: "",
268
+ formatter: function(layer) {
269
+ switch (that._getVisibility(layer)) {
270
+ case VisibilityType.Hidden:
271
+ return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP");
272
+ case VisibilityType.Partial:
273
+ return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP");
274
+ default:
275
+ return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP");
276
+ }
277
+ }
278
+ }
279
+ })
280
+ ]
281
+ })
282
+ }
283
+ });
284
+
285
+ this.setAggregation("content", this._table);
286
+
287
+ this._scene = null;
288
+ this._model = new JSONModel();
289
+ this._table.setModel(this._model);
290
+ this._skipEvent = false;
291
+ };
292
+
293
+ LayersPanel.prototype.destroy = function() {
294
+ if (Control.prototype.destroy) {
295
+ Control.prototype.destroy.apply(this);
296
+ }
297
+ this._model.destroy();
298
+ this._model = null;
299
+ };
300
+
301
+ LayersPanel.prototype.getControl = function() {
302
+ return this._table;
303
+ };
304
+
305
+ LayersPanel.prototype.refresh = function() {
306
+ if (!this._scene || !this._manager) {
307
+ this._model.setData([]);
308
+ return;
309
+ }
310
+ // scan the tree and collect layers info
311
+ this._initialLayerIndex = 1;
312
+ const layers = new Map();
313
+ this._scanTree(layers, this._scene.getRootElement());
314
+
315
+ // get layer index info from scene metadata
316
+ const indices = this._extractLayersIndex();
317
+
318
+ indices.forEach(function(index, name) {
319
+ const layer = layers.get(name);
320
+ if (layer) {
321
+ layer.index = +index;
322
+ }
323
+ }, this);
324
+
325
+ const data = layers.values().toArray();
326
+ data.sort((a, b) => a.index - b.index);
327
+ this._model.setSizeLimit(data.length);
328
+ this._model.setData(data);
329
+ this._table.setModel(this._model);
330
+
331
+ this.fireContentChanged();
332
+ };
333
+
334
+ LayersPanel.prototype._setScene = function(scene) {
335
+ this._scene = (this._isECAD(scene) ? scene : null);
336
+ this.refresh();
337
+ };
338
+
339
+ LayersPanel.prototype._isECAD = function(scene) {
340
+ if (!scene) {
341
+ return false;
342
+ }
343
+ const metadata = scene.getSceneMetadata();
344
+ const data = metadata?.find((el) => el.category === "ecad" && el.tag === "version" && el.value === "8");
345
+ return !!data;
346
+ };
347
+
348
+ LayersPanel.prototype._extractLayersIndex = function() {
349
+ const index = new Map();
350
+ const metadata = this._scene.getSceneMetadata();
351
+ const layers = metadata.find((el) => el.category === "ecad" && el.tag === "Layers");
352
+
353
+ if (layers) {
354
+ const list = layers.value.split("|");
355
+ list.forEach(function(name) {
356
+ const idx = metadata.find((el) => el.category === name && el.tag === "Index");
357
+ if (idx) {
358
+ index.set(name, idx.value);
359
+ }
360
+ }, this);
361
+ }
362
+ return index;
363
+ };
364
+
365
+ LayersPanel.prototype._getVisibility = function(layer) {
366
+ if (layer.hiddenElements.size === 0) {
367
+ return VisibilityType.Visible;
368
+ } else if (layer.hiddenElements.size < layer.elements.size) {
369
+ return VisibilityType.Partial;
370
+ }
371
+ return VisibilityType.Hidden;
372
+ };
373
+
374
+ LayersPanel.prototype._extractMetadata = function(nodeRef) {
375
+ const metadata = nodeRef?.userData?.metadata ?? {};
376
+ if (metadata.length) {
377
+ const map = new Map();
378
+ metadata.forEach(function(entry) {
379
+ if (entry.category === "ecad") {
380
+ map.set(entry.tag, entry.value);
381
+ }
382
+ });
383
+ return map;
384
+ }
385
+ return null;
386
+ };
387
+
388
+ LayersPanel.prototype._addToLayer = function(layers, layerName, nodeRef) {
389
+ let layer = layers.get(layerName);
390
+ if (!layer) {
391
+ layer = {
392
+ name: layerName,
393
+ index: this._initialLayerIndex++,
394
+ elements: new Map(),
395
+ hiddenElements: new Set()
396
+ };
397
+ layers.set(layerName, layer);
398
+ }
399
+ if (this._manager.getVisibilityState(nodeRef) === false) {
400
+ layer.hiddenElements.add(nodeRef.uid);
401
+ }
402
+ layer.elements.set(nodeRef.uid, nodeRef);
403
+ };
404
+
405
+ LayersPanel.prototype._scanTree = function(layers, nodeRef) {
406
+ const metadata = this._extractMetadata(nodeRef);
407
+ if (metadata) {
408
+ const layer = metadata.get("layer");
409
+ if (layer) {
410
+ this._addToLayer(layers, layer, nodeRef);
411
+ return; // don't go further down the hierarchy
412
+ }
413
+ }
414
+ nodeRef.children.forEach((child) => this._scanTree(layers, child));
415
+ };
416
+
417
+ LayersPanel.prototype._handleResize = function(event) {
418
+ // this._updateSelection();
419
+ };
420
+
421
+ LayersPanel.prototype._setContent = function(content) {
422
+ // If there is no explicitly assigned view state manager then use the content connector's default one.
423
+ if (content && !this.getViewStateManager()) {
424
+ const connector = Element.getElementById(this.getContentConnector());
425
+ if (connector) {
426
+ const defaultManager = connector.getDefaultViewStateManager();
427
+ if (defaultManager) {
428
+ this.setViewStateManager(defaultManager);
429
+ }
430
+ }
431
+ }
432
+ this._setScene(content);
433
+ return this;
434
+ };
435
+
436
+ LayersPanel.prototype._onContentReplaced = function(event) {
437
+ this._setContent(event.getParameter("newContent"));
438
+ };
439
+
440
+ LayersPanel.prototype._onContentChangesFinished = function(event) {
441
+ // causes second rebuild of everything
442
+ // this.refresh();
443
+ };
444
+
445
+ LayersPanel.prototype._updateButtons = function() {
446
+ let canHide = false;
447
+ let canShow = false;
448
+ const selected = this._table.getSelectedItems();
449
+
450
+ selected.forEach(function(item) {
451
+ const layer = item.getBindingContext().getObject();
452
+ const visibility = this._getVisibility(layer);
453
+
454
+ if (visibility === VisibilityType.Visible) {
455
+ canHide = true;
456
+ } else if (visibility === VisibilityType.Hidden) {
457
+ canShow = true;
458
+ } else {
459
+ canHide = canShow = true;
460
+ }
461
+
462
+ }, this);
463
+
464
+ this._showButton.setEnabled(canShow);
465
+ this._hideButton.setEnabled(canHide);
466
+ };
467
+
468
+ LayersPanel.prototype._onShowLayers = function() {
469
+ const toShow = [];
470
+ const selected = this._table.getSelectedItems();
471
+
472
+ selected.forEach(function(item) {
473
+ const layer = item.getBindingContext().getObject();
474
+ if (layer.hiddenElements.size > 0) {
475
+ layer.hiddenElements.clear();
476
+ layer.elements.forEach(function(nodeRef) {
477
+ toShow.push(nodeRef);
478
+ }, this);
479
+ }
480
+ }, this);
481
+
482
+ this._skipEvent = true;
483
+ this._manager.setVisibilityState(toShow, true, true, true);
484
+ this._model.updateBindings(true);
485
+ this._updateButtons();
486
+ };
487
+
488
+ LayersPanel.prototype._onHideLayers = function() {
489
+ const toHide = [];
490
+ const selected = this._table.getSelectedItems();
491
+
492
+ selected.forEach(function(item) {
493
+ const layer = item.getBindingContext().getObject();
494
+ if (layer.hiddenElements.size !== layer.elements.size) {
495
+ layer.hiddenElements.clear();
496
+ layer.elements.forEach(function(nodeRef) {
497
+ layer.hiddenElements.add(nodeRef.uid);
498
+ toHide.push(nodeRef);
499
+ }, this);
500
+ }
501
+ }, this);
502
+ this._skipEvent = true;
503
+ this._manager.setVisibilityState(toHide, false, true, true);
504
+ this._model.updateBindings(true);
505
+ this._updateButtons();
506
+ };
507
+
508
+ LayersPanel.prototype._onSearch = function(query) {
509
+ if (query !== "") {
510
+ const selected = [];
511
+ this._table.getItems().forEach(function(item) {
512
+ if (item.getBindingContext().getObject().name.lastIndexOf(query) !== -1) {
513
+ selected.push(item);
514
+ }
515
+ }, this);
516
+ if (selected.length > 0) {
517
+ this._table.removeSelections(true, false);
518
+ selected.forEach(function(item) {
519
+ this._table.setSelectedItem(item);
520
+ }, this);
521
+ this._table.fireSelectionChange({ listItems: selected });
522
+ }
523
+ }
524
+ };
525
+
526
+ LayersPanel.prototype._onSelectionChanged = function(event) {
527
+ this._updateButtons();
528
+ };
529
+
530
+ LayersPanel.prototype._onVisibilityChanged = function(event) {
531
+ if (this._skipEvent) {
532
+ this._skipEvent = false;
533
+ return;
534
+ }
535
+ const layers = this._model.getData();
536
+ const hidden = event.getParameter("hidden");
537
+ const visible = event.getParameter("visible");
538
+
539
+ const process = (list, show) => {
540
+ list.forEach(function(item) {
541
+ const metadata = this._extractMetadata(item);
542
+ const layer = metadata?.get("layer");
543
+ if (layer) {
544
+ const type = metadata?.get("type");
545
+ const input = type === ElementType.Component ? [item] : [item].concat(item.children);
546
+ input.forEach(function(ref) {
547
+ for (let i = 0; i < layers.length; ++i) {
548
+ if (layers[i].elements.has(ref.uid)) {
549
+ if (show) {
550
+ layers[i].hiddenElements.delete(ref.uid);
551
+ } else {
552
+ layers[i].hiddenElements.add(ref.uid);
553
+ }
554
+ break;
555
+ }
556
+ }
557
+ });
558
+ }
559
+ }, this);
560
+ };
561
+
562
+ process(hidden, false);
563
+ process(visible, true);
564
+
565
+ this._model.updateBindings(true);
566
+ this._updateButtons();
567
+ };
568
+
569
+ LayersPanel.prototype._onColumnResize = function(event) {
570
+ };
571
+
572
+ return LayersPanel;
573
+ });
@@ -0,0 +1,31 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
7
+
8
+ sap.ui.define([
9
+ "sap/ui/base/DataType"
10
+ ], function(
11
+ DataType
12
+ ) {
13
+ "use strict";
14
+
15
+ /**
16
+ * ECAD visibility type.
17
+ * @enum {number}
18
+ * @readonly
19
+ * @alias sap.ui.vk.ecad.VisibilityType
20
+ * @private
21
+ */
22
+ var VisibilityType = {
23
+ Hidden: 0,
24
+ Partial: 1,
25
+ Visible: 2
26
+ };
27
+
28
+ DataType.registerEnum("sap.ui.vk.ecad.VisibilityType", VisibilityType);
29
+
30
+ return VisibilityType;
31
+ });
@@ -655,3 +655,88 @@ SLIDER_TOOLTIP=Preview zoom level
655
655
 
656
656
  #XTOL: Mini-map toogle toolbar button tooltip
657
657
  MINIMAP_BUTTONTOOLTIP=Mini-Map
658
+
659
+ #XTOL: Page gallery toogle toolbar button tooltip
660
+ PAGE_GALLERY_BUTTONTOOLTIP=Page Gallery
661
+
662
+ #XTOL: Layers panel toogle toolbar button tooltip
663
+ LAYERS_BUTTONTOOLTIP=Layers
664
+
665
+ #XTOL: Elements panel toogle toolbar button tooltip
666
+ ELEMENTS_BUTTONTOOLTIP=Elements
667
+
668
+ #XTOL: Show/hide all hotspots toogle toolbar button tooltip
669
+ TOGGLE_HOTSPOTS_BUTTONTOOLTIP = Toggle Hotspots
670
+
671
+ #XTOL: Text for Show Layers button in LayersPanel
672
+ LAYERS_PANEL_NO_DATA=No layers
673
+ #XTOL: Text for Show Layers button in LayersPanel
674
+ LAYERS_PANEL_SHOW_BUTTON=Show
675
+ #XTOL: Tooltip for for Show Layers button in LayersPanel
676
+ LAYERS_PANEL_SHOW_BUTTON_TOOLTIP=Show Layer(s)
677
+ #XTOL: Text for Hide Layers button in LayersPanel
678
+ LAYERS_PANEL_HIDE_BUTTON=Hide
679
+ #XTOL: Tooltip for for Hide Layers button in LayersPanel
680
+ LAYERS_PANEL_HIDE_BUTTON_TOOLTIP=Hide Layer(s)
681
+ #XTOL: Text for Name column in LayersPanel table
682
+ LAYERS_PANEL__NAME_COLUMN=Name
683
+ #XTOL: Text for Visible column in LayersPanel table
684
+ LAYERS_PANEL_VISIBLE_COLUMN=Visible
685
+ #XTOL: Tooltip for for Visible column icon in visible state
686
+ LAYERS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP=Visible layer
687
+ #XTOL: Tooltip for for Visible column icon in partially visible state
688
+ LAYERS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP=Partially visible layer
689
+ #XTOL: Tooltip for for Visible column icon in partially visible state
690
+ LAYERS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP=Hidden layer
691
+
692
+ #XTOL: Text for Show Layers button in LayersPanel
693
+ ELEMENTS_PANEL_NO_DATA=No elements
694
+ #XTOL: Text for Show Element button in ElementsPanel
695
+ ELEMENTS_PANEL_SHOW_BUTTON=Show
696
+ #XTOL: Tooltip for for Show Elements button in ElementsPanel
697
+ ELEMENTS_PANEL_SHOW_BUTTON_TOOLTIP=Show Element(s)
698
+ #XTOL: Text for Hide Elements button in ElementsPanel
699
+ ELEMENTS_PANEL_HIDE_BUTTON=Hide
700
+ #XTOL: Tooltip for for Hide Elements button in ElementsPanel
701
+ ELEMENTS_PANEL_HIDE_BUTTON_TOOLTIP=Hide Element(s)
702
+ #XTOL: Tooltip for for Settings button in ElementsPanel
703
+ ELEMENTS_PANEL_SETTINGS_BUTTON_TOOLTIP=Elements panel settings
704
+ #XTOL: Text for Installation Point column in ElementsPanel table. Key is misnamed, will rename in a later release.
705
+ ELEMENTS_PANEL_NAME_COLUMN=Installation Point
706
+ #XTOL: Text for Type column in ElementsPanel table
707
+ ELEMENTS_PANEL_TYPE_COLUMN=Type
708
+ #XTOL: Text for Device Reference column in ElementsPanel table
709
+ ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN=Device Reference
710
+ #XTOL: Text for Visible column in ElementsPanel table
711
+ ELEMENTS_PANEL_VISIBLE_COLUMN=Visible
712
+ #XTOL: Tooltip for for Visible column icon in visible state
713
+ ELEMENTS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP=Visible element
714
+ #XTOL: Tooltip for for Visible column icon in partially visible state
715
+ ELEMENTS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP=Partially visible element
716
+ #XTOL: Tooltip for for Visible column icon in partially visible state
717
+ ELEMENTS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP=Hidden element
718
+ #XTOL: Text for Component type in ElementsPanel
719
+ ELEMENTS_PANEL_TYPE_COMPONENT=Component
720
+ #XTOL: Text for Net type in ElementsPanel
721
+ ELEMENTS_PANEL_TYPE_NET=Net
722
+ #XTOL: Text for Unknown type in ElementsPanel
723
+ ELEMENTS_PANEL_TYPE_UNKNOWN=Unknown
724
+ #XTOL: Text for Type filter label
725
+ TYPE_FILTER_LABEL=Type
726
+ #XTOL: Text for Device Reference filter label
727
+ DEVICE_REF_FILTER_LABEL=Device Reference
728
+ #XTOL: Text for Installation Point filter label. Key is misnamed, will rename in a later release.
729
+ REFDES_FILTER_LABEL=Installation Point
730
+
731
+ #XTOL: Text for Rotate board CW button in DrawerToolbar
732
+ ROTATE_BOARD_CW=Rotate board clockwise
733
+ #XTOL: Text for Rotate board CCW button in DrawerToolbar
734
+ ROTATE_BOARD_CCW=Rotate board counter clockwise
735
+ #XTOL: Text for Flip Board button in DrawerToolbar
736
+ FLIP_BOARD=Flip board horizontally
737
+
738
+
739
+ #XTOL: Button tooltip for entering fullscreen
740
+ ENTER_FULLSCREEN=Enter Full Screen
741
+ #XTOL: Button tooltip for exiting fullscreen
742
+ EXIT_FULLSCREEN=Exit Full Screen