@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.
Files changed (241) 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 +5 -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/dvl/BaseNodeProxy.js +1 -1
  71. package/src/sap/ui/vk/dvl/ContentManager.js +1 -1
  72. package/src/sap/ui/vk/dvl/GraphicsCore.js +1 -1
  73. package/src/sap/ui/vk/dvl/LayerProxy.js +1 -1
  74. package/src/sap/ui/vk/dvl/NodeHierarchy.js +1 -1
  75. package/src/sap/ui/vk/dvl/NodeProxy.js +1 -1
  76. package/src/sap/ui/vk/dvl/Scene.js +1 -1
  77. package/src/sap/ui/vk/dvl/ViewStateManager.js +1 -1
  78. package/src/sap/ui/vk/dvl/Viewport.js +1 -1
  79. package/src/sap/ui/vk/ecad/ElementsPanel.js +641 -119
  80. package/src/sap/ui/vk/ecad/LayersPanel.js +254 -121
  81. package/src/sap/ui/vk/i18n/messagebundle.properties +40 -5
  82. package/src/sap/ui/vk/i18n/messagebundle_ar.properties +34 -0
  83. package/src/sap/ui/vk/i18n/messagebundle_bg.properties +34 -0
  84. package/src/sap/ui/vk/i18n/messagebundle_ca.properties +35 -1
  85. package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +34 -0
  86. package/src/sap/ui/vk/i18n/messagebundle_cs.properties +34 -0
  87. package/src/sap/ui/vk/i18n/messagebundle_cy.properties +34 -0
  88. package/src/sap/ui/vk/i18n/messagebundle_da.properties +34 -0
  89. package/src/sap/ui/vk/i18n/messagebundle_de.properties +34 -0
  90. package/src/sap/ui/vk/i18n/messagebundle_el.properties +34 -0
  91. package/src/sap/ui/vk/i18n/messagebundle_en.properties +348 -0
  92. package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +34 -0
  93. package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +34 -0
  94. package/src/sap/ui/vk/i18n/messagebundle_es.properties +36 -2
  95. package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +34 -0
  96. package/src/sap/ui/vk/i18n/messagebundle_et.properties +34 -0
  97. package/src/sap/ui/vk/i18n/messagebundle_fi.properties +34 -0
  98. package/src/sap/ui/vk/i18n/messagebundle_fr.properties +34 -0
  99. package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +34 -0
  100. package/src/sap/ui/vk/i18n/messagebundle_hi.properties +34 -0
  101. package/src/sap/ui/vk/i18n/messagebundle_hr.properties +34 -0
  102. package/src/sap/ui/vk/i18n/messagebundle_hu.properties +34 -0
  103. package/src/sap/ui/vk/i18n/messagebundle_id.properties +35 -1
  104. package/src/sap/ui/vk/i18n/messagebundle_it.properties +36 -2
  105. package/src/sap/ui/vk/i18n/messagebundle_iw.properties +34 -0
  106. package/src/sap/ui/vk/i18n/messagebundle_ja.properties +34 -0
  107. package/src/sap/ui/vk/i18n/messagebundle_kk.properties +34 -0
  108. package/src/sap/ui/vk/i18n/messagebundle_ko.properties +34 -0
  109. package/src/sap/ui/vk/i18n/messagebundle_lt.properties +34 -0
  110. package/src/sap/ui/vk/i18n/messagebundle_lv.properties +36 -2
  111. package/src/sap/ui/vk/i18n/messagebundle_mk.properties +36 -2
  112. package/src/sap/ui/vk/i18n/messagebundle_ms.properties +39 -5
  113. package/src/sap/ui/vk/i18n/messagebundle_nl.properties +34 -0
  114. package/src/sap/ui/vk/i18n/messagebundle_no.properties +34 -0
  115. package/src/sap/ui/vk/i18n/messagebundle_pl.properties +34 -0
  116. package/src/sap/ui/vk/i18n/messagebundle_pt.properties +34 -0
  117. package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +34 -0
  118. package/src/sap/ui/vk/i18n/messagebundle_ro.properties +34 -0
  119. package/src/sap/ui/vk/i18n/messagebundle_ru.properties +34 -0
  120. package/src/sap/ui/vk/i18n/messagebundle_sh.properties +34 -0
  121. package/src/sap/ui/vk/i18n/messagebundle_sk.properties +34 -0
  122. package/src/sap/ui/vk/i18n/messagebundle_sl.properties +37 -3
  123. package/src/sap/ui/vk/i18n/messagebundle_sr.properties +34 -0
  124. package/src/sap/ui/vk/i18n/messagebundle_sv.properties +34 -0
  125. package/src/sap/ui/vk/i18n/messagebundle_th.properties +34 -0
  126. package/src/sap/ui/vk/i18n/messagebundle_tr.properties +34 -0
  127. package/src/sap/ui/vk/i18n/messagebundle_uk.properties +35 -1
  128. package/src/sap/ui/vk/i18n/messagebundle_vi.properties +34 -0
  129. package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +34 -0
  130. package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +34 -0
  131. package/src/sap/ui/vk/library.js +6 -3
  132. package/src/sap/ui/vk/measurements/Angle.js +1 -1
  133. package/src/sap/ui/vk/measurements/Area.js +1 -1
  134. package/src/sap/ui/vk/measurements/Distance.js +1 -1
  135. package/src/sap/ui/vk/measurements/Edge.js +1 -1
  136. package/src/sap/ui/vk/measurements/Face.js +1 -1
  137. package/src/sap/ui/vk/measurements/Feature.js +1 -1
  138. package/src/sap/ui/vk/measurements/Vertex.js +1 -1
  139. package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
  140. package/src/sap/ui/vk/pdf/Viewport.js +5 -8
  141. package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
  142. package/src/sap/ui/vk/svg/ContentDeliveryService.js +1 -1
  143. package/src/sap/ui/vk/svg/ContentManager.js +3 -1
  144. package/src/sap/ui/vk/svg/HotspotHelper.js +2 -2
  145. package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
  146. package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
  147. package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
  148. package/src/sap/ui/vk/svg/Scene.js +1 -1
  149. package/src/sap/ui/vk/svg/SceneBuilder.js +12 -4
  150. package/src/sap/ui/vk/svg/ViewStateManager.js +2 -2
  151. package/src/sap/ui/vk/svg/Viewport.js +199 -2
  152. package/src/sap/ui/vk/themes/base/DrawerToolbar.less +8 -0
  153. package/src/sap/ui/vk/themes/base/Viewer.less +9 -12
  154. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.8.woff2 +0 -0
  155. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.8.woff2 +0 -0
  156. package/src/sap/ui/vk/themes/base/library.source.less +1 -1
  157. package/src/sap/ui/vk/themes/sap_belize_base/Viewer.less +1 -12
  158. package/src/sap/ui/vk/themes/sap_belize_base/library.source.less +1 -1
  159. package/src/sap/ui/vk/themes/sap_bluecrystal_base/Viewer.less +1 -12
  160. package/src/sap/ui/vk/themes/sap_bluecrystal_base/library.source.less +1 -1
  161. package/src/sap/ui/vk/themes/sap_hcb/base_Viewer.less +1 -12
  162. package/src/sap/ui/vk/themes/sap_hcb/library.source.less +1 -1
  163. package/src/sap/ui/vk/themes/sap_horizon/library.source.less +0 -5
  164. package/src/sap/ui/vk/themes/sap_horizon_dark/library.source.less +0 -5
  165. package/src/sap/ui/vk/themes/sap_horizon_hcb/library.source.less +0 -5
  166. package/src/sap/ui/vk/themes/sap_horizon_hcw/library.source.less +0 -5
  167. package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
  168. package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
  169. package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
  170. package/src/sap/ui/vk/threejs/Billboard.js +2 -2
  171. package/src/sap/ui/vk/threejs/Callout.js +11 -1
  172. package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
  173. package/src/sap/ui/vk/threejs/ContentManager.js +2 -1
  174. package/src/sap/ui/vk/threejs/DetailView.js +1 -1
  175. package/src/sap/ui/vk/threejs/HighlightPlayer.js +1 -1
  176. package/src/sap/ui/vk/threejs/Material.js +2 -2
  177. package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
  178. package/src/sap/ui/vk/threejs/NodeProxy.js +1 -1
  179. package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
  180. package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
  181. package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
  182. package/src/sap/ui/vk/threejs/Scene.js +1 -1
  183. package/src/sap/ui/vk/threejs/SceneBuilder.js +17 -1
  184. package/src/sap/ui/vk/threejs/Texture.js +2 -2
  185. package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
  186. package/src/sap/ui/vk/threejs/ViewStateManager.js +2 -2
  187. package/src/sap/ui/vk/threejs/Viewport.js +9 -3
  188. package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +1 -1
  189. package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
  190. package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
  191. package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
  192. package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
  193. package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
  194. package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
  195. package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
  196. package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
  197. package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
  198. package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
  199. package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
  200. package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
  201. package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
  202. package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
  203. package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
  204. package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
  205. package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
  206. package/src/sap/ui/vk/tools/ExplodeItemGroup.js +1 -1
  207. package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
  208. package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
  209. package/src/sap/ui/vk/tools/Gizmo.js +1 -1
  210. package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
  211. package/src/sap/ui/vk/tools/MoveTool.js +1 -1
  212. package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
  213. package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +2 -2
  214. package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
  215. package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
  216. package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
  217. package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
  218. package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
  219. package/src/sap/ui/vk/tools/RotateTool.js +1 -1
  220. package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
  221. package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
  222. package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
  223. package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
  224. package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
  225. package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
  226. package/src/sap/ui/vk/tools/Tool.js +1 -1
  227. package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
  228. package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
  229. package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
  230. package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
  231. package/src/sap/ui/vk/totara/TotaraLoader.js +4 -0
  232. package/src/sap/ui/vk/ve/dvl.js +1 -1
  233. package/src/sap/ui/vk/ve/dvl.wasm +0 -0
  234. package/src/sap/ui/vk/ve/matai.js +1 -1
  235. package/src/sap/ui/vk/ve/matai.wasm +0 -0
  236. package/src/sap/ui/vk/ToolbarRenderer.js +0 -41
  237. package/src/sap/ui/vk/ViewerRenderer.js +0 -48
  238. package/src/sap/ui/vk/ecad/ElementsPanelRenderer.js +0 -41
  239. package/src/sap/ui/vk/ecad/LayersPanelRenderer.js +0 -41
  240. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.4.woff2 +0 -0
  241. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.4.woff2 +0 -0
@@ -1,8 +1,5 @@
1
1
  /*!
2
- * SAP UI development toolkit for HTML5 (SAPUI5)
3
-
4
- (c) Copyright 2009-2015 SAP SE. All rights reserved
5
-
2
+ * ${c\pyright}
6
3
  */
7
4
 
8
5
  // Provides control sap.ui.vk.ecad.LayerPanel
@@ -12,53 +9,53 @@ sap.ui.define([
12
9
  "sap/m/OverflowToolbar",
13
10
  "sap/m/ToolbarLayoutData",
14
11
  "sap/m/ToolbarSpacer",
15
- "sap/m/Text",
12
+ "sap/m/Label",
16
13
  "sap/m/Table",
17
14
  "sap/m/Column",
18
- "sap/m/Sticky",
19
15
  "sap/m/ScrollContainer",
20
16
  "sap/m/ColumnListItem",
17
+ "sap/m/plugins/ColumnResizer",
21
18
  "sap/ui/core/Core",
22
19
  "sap/ui/core/Control",
23
20
  "sap/ui/core/Element",
24
21
  "sap/ui/core/Icon",
25
22
  "sap/ui/core/library",
26
- "sap/ui/core/ResizeHandler",
27
23
  "sap/ui/model/json/JSONModel",
28
24
  "../Core",
29
25
  "../library",
30
26
  "../ViewStateManager",
31
- "./LayersPanelRenderer",
32
27
  "./VisibilityType",
33
- "../getResourceBundle"
28
+ "../getResourceBundle",
29
+ "sap/m/library"
34
30
  ], function(
35
31
  Button,
36
32
  SearchField,
37
33
  OverflowToolbar,
38
34
  ToolbarLayoutData,
39
35
  ToolbarSpacer,
40
- Text,
36
+ Label,
41
37
  Table,
42
38
  Column,
43
- Sticky,
44
39
  ScrollContainer,
45
40
  ColumnListItem,
41
+ ColumnResizer,
46
42
  Core,
47
43
  Control,
48
44
  Element,
49
45
  Icon,
50
46
  Library,
51
- ResizeHandler,
52
47
  JSONModel,
53
48
  vkCore,
54
49
  vkLibrary,
55
50
  ViewStateManager,
56
- LayersPanelRenderer,
57
51
  VisibilityType,
58
- getResourceBundle
52
+ getResourceBundle,
53
+ SapMLibrary
59
54
  ) {
60
55
  "use strict";
61
56
 
57
+ const Sticky = SapMLibrary.Sticky;
58
+
62
59
  /**
63
60
  * Constructor for a new LayersPanel.
64
61
  *
@@ -69,7 +66,7 @@ sap.ui.define([
69
66
  * @extends sap.ui.core.Control
70
67
  *
71
68
  * @author SAP SE
72
- * @version 1.136.0
69
+ * @version 1.138.0
73
70
  *
74
71
  * @constructor
75
72
  * @public
@@ -80,9 +77,19 @@ sap.ui.define([
80
77
  var LayersPanel = Control.extend("sap.ui.vk.ecad.LayersPanel", /** @lends sap.ui.vk.ecad.LayersPanel.prototype */ {
81
78
  metadata: {
82
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
+ },
83
90
  aggregations: {
84
91
  content: {
85
- type: "sap.m.ScrollContainer",
92
+ type: "sap.m.Table",
86
93
  multiple: false
87
94
  }
88
95
  },
@@ -112,19 +119,40 @@ sap.ui.define([
112
119
  }
113
120
  }
114
121
  },
115
-
116
- renderer: LayersPanelRenderer,
117
-
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
+ },
118
140
  constructor: function(sId, mSettings) {
119
141
  Control.apply(this, arguments);
120
142
  vkCore.observeAssociations(this);
121
143
  }
122
144
  });
123
145
 
124
- var iconHidden = "sap-icon://status-inactive";
125
- var iconPartial = "sap-icon://rhombus-milestone";
126
- var iconVisible = "sap-icon://rhombus-milestone-2";
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
+ };
127
151
 
152
+ const ElementType = {
153
+ Component: "2",
154
+ Net: "4"
155
+ };
128
156
  LayersPanel.prototype.onSetViewStateManager = function(manager) {
129
157
  this._manager = manager;
130
158
  manager.attachVisibilityChanged(this._onVisibilityChanged, this);
@@ -153,12 +181,21 @@ sap.ui.define([
153
181
  if (Control.prototype.init) {
154
182
  Control.prototype.init.apply(this);
155
183
  }
156
- var that = this;
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
+ });
157
195
 
158
196
  this._showButton = new Button({
159
197
  enabled: false,
160
- iconFirst: true,
161
- icon: iconVisible,
198
+ icon: IconType.Visible,
162
199
  text: getResourceBundle().getText("LAYERS_PANEL_SHOW_BUTTON"),
163
200
  tooltip: getResourceBundle().getText("LAYERS_PANEL_SHOW_BUTTON_TOOLTIP"),
164
201
  press: this._onShowLayers.bind(this)
@@ -166,8 +203,7 @@ sap.ui.define([
166
203
 
167
204
  this._hideButton = new Button({
168
205
  enabled: false,
169
- iconFirst: true,
170
- icon: iconHidden,
206
+ icon: IconType.Hidden,
171
207
  text: getResourceBundle().getText("LAYERS_PANEL_HIDE_BUTTON"),
172
208
  tooltip: getResourceBundle().getText("LAYERS_PANEL_HIDE_BUTTON_TOOLTIP"),
173
209
  press: this._onHideLayers.bind(this)
@@ -175,35 +211,34 @@ sap.ui.define([
175
211
 
176
212
  this._table = new Table({
177
213
  mode: "MultiSelect",
214
+ includeItemInSelection: true,
215
+ noDataText: getResourceBundle().getText("LAYERS_PANEL_NO_DATA"),
178
216
  sticky: [Sticky.HeaderToolbar, Sticky.ColumnHeaders],
179
217
  selectionChange: this._onSelectionChanged.bind(this),
180
218
  headerToolbar: new OverflowToolbar({
181
219
  content: [
182
- new SearchField({
183
- layoutData: new ToolbarLayoutData({
184
- shrinkable: true,
185
- maxWidth: "400px"
186
- }),
187
- search: function(event) {
188
- this._onSearch(event.getParameter("query")).bind(this);
189
- }
190
- }),
220
+ this._searchField,
191
221
  new ToolbarSpacer(),
192
222
  this._showButton,
193
223
  this._hideButton
194
224
  ]
195
225
  }),
226
+ dependents: [
227
+ new ColumnResizer({
228
+ columnResize: that._onColumnResize.bind(this)
229
+ })
230
+ ],
196
231
  columns: [
197
232
  new Column({
198
233
  minScreenWidth: "10rem",
199
234
  hAlign: Library.TextAlign.Begin,
200
- header: new Text({ text: getResourceBundle().getText("LAYERS_PANEL__NAME_COLUMN") })
235
+ header: new Label({ text: getResourceBundle().getText("LAYERS_PANEL__NAME_COLUMN") })
201
236
 
202
237
  }),
203
238
  new Column({
204
239
  minScreenWidth: "6rem",
205
240
  hAlign: Library.TextAlign.Center,
206
- header: new Text({ text: getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN") })
241
+ header: new Label({ text: getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN") })
207
242
  })
208
243
  ],
209
244
  items: {
@@ -211,32 +246,34 @@ sap.ui.define([
211
246
  template: new ColumnListItem({
212
247
  vAlign: "Middle",
213
248
  cells: [
214
- new Text({
249
+ new Label({
215
250
  text: "{name}"
216
251
  }),
217
252
  new Icon({
218
253
  src: {
219
254
  path: "",
220
255
  formatter: function(layer) {
221
- var type = that._getVisibility(layer);
222
- if (type === VisibilityType.Hidden) {
223
- return iconHidden;
224
- } else if (type === VisibilityType.Partial) {
225
- return iconPartial;
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;
226
263
  }
227
- return iconVisible;
228
264
  }
229
265
  },
230
266
  tooltip: {
231
267
  path: "",
232
268
  formatter: function(layer) {
233
- var type = that._getVisibility(layer);
234
- if (type === VisibilityType.Hidden) {
235
- return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP");
236
- } else if (type === VisibilityType.Partial) {
237
- return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP");
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");
238
276
  }
239
- return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP");
240
277
  }
241
278
  }
242
279
  })
@@ -245,58 +282,99 @@ sap.ui.define([
245
282
  }
246
283
  });
247
284
 
248
- this._scrollContainer = new ScrollContainer({
249
- vertical: true,
250
- horizontal: false,
251
- height: "100%",
252
- content: this._table
253
- });
254
-
255
- this.setAggregation("content", this._scrollContainer);
285
+ this.setAggregation("content", this._table);
256
286
 
257
287
  this._scene = null;
258
288
  this._model = new JSONModel();
259
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;
260
303
  };
261
304
 
262
305
  LayersPanel.prototype.refresh = function() {
263
- if (!this._scene || !this._manager || !this._manager.getNodeHierarchy()) {
306
+ if (!this._scene || !this._manager) {
264
307
  this._model.setData([]);
265
308
  return;
266
309
  }
267
310
  // scan the tree and collect layers info
268
- var layers = new Map();
269
- this._scanTree(layers, this._manager.getNodeHierarchy().getSceneRef());
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);
270
324
 
271
- this._model.setData(layers.values().toArray());
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);
272
329
  this._table.setModel(this._model);
330
+
273
331
  this.fireContentChanged();
274
332
  };
275
333
 
276
- LayersPanel.prototype.onBeforeRendering = function() {
277
- this._table.setVisible(true);
278
- if (!this._resizeListenerId) {
279
- this._resizeListenerId = ResizeHandler.register(this, this._handleResize.bind(this));
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;
280
342
  }
343
+ const metadata = scene.getSceneMetadata();
344
+ const data = metadata?.find((el) => el.category === "ecad" && el.tag === "version" && el.value === "8");
345
+ return !!data;
281
346
  };
282
347
 
283
- LayersPanel.prototype._setScene = function(scene) {
284
- this._scene = scene;
285
- this.refresh();
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;
286
363
  };
287
364
 
288
365
  LayersPanel.prototype._getVisibility = function(layer) {
289
- if (layer.hiddenElements === 0) {
366
+ if (layer.hiddenElements.size === 0) {
290
367
  return VisibilityType.Visible;
291
- } else if (layer.hiddenElements < layer.elements.size) {
368
+ } else if (layer.hiddenElements.size < layer.elements.size) {
292
369
  return VisibilityType.Partial;
293
370
  }
294
371
  return VisibilityType.Hidden;
295
372
  };
296
373
 
297
- LayersPanel.prototype._extractMetadata = function(metadata) {
298
- if (metadata.length != undefined) {
299
- var map = new Map();
374
+ LayersPanel.prototype._extractMetadata = function(nodeRef) {
375
+ const metadata = nodeRef?.userData?.metadata ?? {};
376
+ if (metadata.length) {
377
+ const map = new Map();
300
378
  metadata.forEach(function(entry) {
301
379
  if (entry.category === "ecad") {
302
380
  map.set(entry.tag, entry.value);
@@ -307,48 +385,33 @@ sap.ui.define([
307
385
  return null;
308
386
  };
309
387
 
310
- LayersPanel.prototype._addElement = function(layers, layerName, nodeRef, nodeVisibility) {
311
- var layer = layers.get(layerName);
388
+ LayersPanel.prototype._addToLayer = function(layers, layerName, nodeRef) {
389
+ let layer = layers.get(layerName);
312
390
  if (!layer) {
313
391
  layer = {
314
392
  name: layerName,
315
- order: 0, // wait until CAD Translators support
393
+ index: this._initialLayerIndex++,
316
394
  elements: new Map(),
317
- hiddenElements: 0
395
+ hiddenElements: new Set()
318
396
  };
319
397
  layers.set(layerName, layer);
320
398
  }
321
- if (nodeVisibility == false) {
322
- layer.hiddenElements++;
399
+ if (this._manager.getVisibilityState(nodeRef) === false) {
400
+ layer.hiddenElements.add(nodeRef.uid);
323
401
  }
324
402
  layer.elements.set(nodeRef.uid, nodeRef);
325
403
  };
326
404
 
327
405
  LayersPanel.prototype._scanTree = function(layers, nodeRef) {
328
- var hierarchy = this._manager.getNodeHierarchy();
329
- var node = hierarchy.createNodeProxy(nodeRef);
330
- var metadata = this._extractMetadata(node.getNodeMetadata());
331
- hierarchy.destroyNodeProxy(node);
332
-
406
+ const metadata = this._extractMetadata(nodeRef);
333
407
  if (metadata) {
334
- var layer = metadata.get("layer");
408
+ const layer = metadata.get("layer");
335
409
  if (layer) {
336
- this._addElement(layers, layer, nodeRef, this._manager.getVisibilityState(nodeRef));
410
+ this._addToLayer(layers, layer, nodeRef);
337
411
  return; // don't go further down the hierarchy
338
412
  }
339
413
  }
340
-
341
- hierarchy.getChildren(nodeRef).forEach(function(ref) {
342
- this._scanTree(layers, ref);
343
- }, this);
344
- };
345
-
346
- LayersPanel.prototype._onSelectionChanged = function(event) {
347
- this._updateButtons();
348
- };
349
-
350
- LayersPanel.prototype._onVisibilityChanged = function(event) {
351
- //
414
+ nodeRef.children.forEach((child) => this._scanTree(layers, child));
352
415
  };
353
416
 
354
417
  LayersPanel.prototype._handleResize = function(event) {
@@ -358,9 +421,9 @@ sap.ui.define([
358
421
  LayersPanel.prototype._setContent = function(content) {
359
422
  // If there is no explicitly assigned view state manager then use the content connector's default one.
360
423
  if (content && !this.getViewStateManager()) {
361
- var connector = Element.getElementById(this.getContentConnector());
424
+ const connector = Element.getElementById(this.getContentConnector());
362
425
  if (connector) {
363
- var defaultManager = connector.getDefaultViewStateManager();
426
+ const defaultManager = connector.getDefaultViewStateManager();
364
427
  if (defaultManager) {
365
428
  this.setViewStateManager(defaultManager);
366
429
  }
@@ -375,16 +438,18 @@ sap.ui.define([
375
438
  };
376
439
 
377
440
  LayersPanel.prototype._onContentChangesFinished = function(event) {
378
- this.refresh();
441
+ // causes second rebuild of everything
442
+ // this.refresh();
379
443
  };
380
444
 
381
445
  LayersPanel.prototype._updateButtons = function() {
382
- var canShow = false, canHide = false;
383
- var selected = this._table.getSelectedItems();
446
+ let canHide = false;
447
+ let canShow = false;
448
+ const selected = this._table.getSelectedItems();
384
449
 
385
450
  selected.forEach(function(item) {
386
- var layer = item.getBindingContext().getObject();
387
- var visibility = this._getVisibility(layer);
451
+ const layer = item.getBindingContext().getObject();
452
+ const visibility = this._getVisibility(layer);
388
453
 
389
454
  if (visibility === VisibilityType.Visible) {
390
455
  canHide = true;
@@ -401,40 +466,108 @@ sap.ui.define([
401
466
  };
402
467
 
403
468
  LayersPanel.prototype._onShowLayers = function() {
404
- var toShow = [];
405
- var selected = this._table.getSelectedItems();
469
+ const toShow = [];
470
+ const selected = this._table.getSelectedItems();
406
471
 
407
472
  selected.forEach(function(item) {
408
- var layer = item.getBindingContext().getObject();
409
- if (layer.hiddenElements !== 0) {
410
- layer.hiddenElements = 0;
473
+ const layer = item.getBindingContext().getObject();
474
+ if (layer.hiddenElements.size > 0) {
475
+ layer.hiddenElements.clear();
411
476
  layer.elements.forEach(function(nodeRef) {
412
477
  toShow.push(nodeRef);
413
- });
478
+ }, this);
414
479
  }
415
- });
480
+ }, this);
481
+
482
+ this._skipEvent = true;
416
483
  this._manager.setVisibilityState(toShow, true, true, true);
417
484
  this._model.updateBindings(true);
418
485
  this._updateButtons();
419
486
  };
420
487
 
421
488
  LayersPanel.prototype._onHideLayers = function() {
422
- var toHide = [];
423
- var selected = this._table.getSelectedItems();
489
+ const toHide = [];
490
+ const selected = this._table.getSelectedItems();
424
491
 
425
492
  selected.forEach(function(item) {
426
- var layer = item.getBindingContext().getObject();
427
- if (layer.hiddenElements !== layer.elements.size) {
428
- layer.hiddenElements = layer.elements.size;
493
+ const layer = item.getBindingContext().getObject();
494
+ if (layer.hiddenElements.size !== layer.elements.size) {
495
+ layer.hiddenElements.clear();
429
496
  layer.elements.forEach(function(nodeRef) {
497
+ layer.hiddenElements.add(nodeRef.uid);
430
498
  toHide.push(nodeRef);
431
- });
499
+ }, this);
432
500
  }
433
- });
501
+ }, this);
502
+ this._skipEvent = true;
434
503
  this._manager.setVisibilityState(toHide, false, true, true);
435
504
  this._model.updateBindings(true);
436
505
  this._updateButtons();
437
506
  };
438
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
+
439
572
  return LayersPanel;
440
573
  });
@@ -656,6 +656,20 @@ SLIDER_TOOLTIP=Preview zoom level
656
656
  #XTOL: Mini-map toogle toolbar button tooltip
657
657
  MINIMAP_BUTTONTOOLTIP=Mini-Map
658
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
659
673
  #XTOL: Text for Show Layers button in LayersPanel
660
674
  LAYERS_PANEL_SHOW_BUTTON=Show
661
675
  #XTOL: Tooltip for for Show Layers button in LayersPanel
@@ -675,6 +689,8 @@ LAYERS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP=Partially visible layer
675
689
  #XTOL: Tooltip for for Visible column icon in partially visible state
676
690
  LAYERS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP=Hidden layer
677
691
 
692
+ #XTOL: Text for Show Layers button in LayersPanel
693
+ ELEMENTS_PANEL_NO_DATA=No elements
678
694
  #XTOL: Text for Show Element button in ElementsPanel
679
695
  ELEMENTS_PANEL_SHOW_BUTTON=Show
680
696
  #XTOL: Tooltip for for Show Elements button in ElementsPanel
@@ -685,12 +701,12 @@ ELEMENTS_PANEL_HIDE_BUTTON=Hide
685
701
  ELEMENTS_PANEL_HIDE_BUTTON_TOOLTIP=Hide Element(s)
686
702
  #XTOL: Tooltip for for Settings button in ElementsPanel
687
703
  ELEMENTS_PANEL_SETTINGS_BUTTON_TOOLTIP=Elements panel settings
688
- #XTOL: Text for Name column in ElementsPanel table
689
- ELEMENTS_PANEL_NAME_COLUMN=Reference Designator
690
- #XTOL: Text for Name column in ElementsPanel table
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
691
707
  ELEMENTS_PANEL_TYPE_COLUMN=Type
692
- #XTOL: Text for Name column in ElementsPanel table
693
- ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN=Device reference
708
+ #XTOL: Text for Device Reference column in ElementsPanel table
709
+ ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN=Device Reference
694
710
  #XTOL: Text for Visible column in ElementsPanel table
695
711
  ELEMENTS_PANEL_VISIBLE_COLUMN=Visible
696
712
  #XTOL: Tooltip for for Visible column icon in visible state
@@ -705,3 +721,22 @@ ELEMENTS_PANEL_TYPE_COMPONENT=Component
705
721
  ELEMENTS_PANEL_TYPE_NET=Net
706
722
  #XTOL: Text for Unknown type in ElementsPanel
707
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