@sapui5/sap.ui.vk 1.138.0 → 1.139.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 (217) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/vk/.library +9 -1
  3. package/src/sap/ui/vk/AnimationPlayback.js +1 -1
  4. package/src/sap/ui/vk/AnimationPlayer.js +1 -1
  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 +1 -1
  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 +149 -95
  12. package/src/sap/ui/vk/ContentManager.js +1 -1
  13. package/src/sap/ui/vk/ContentResource.js +26 -7
  14. package/src/sap/ui/vk/ContentType.js +41 -0
  15. package/src/sap/ui/vk/Core.js +1 -1
  16. package/src/sap/ui/vk/DownloadManager.js +1 -1
  17. package/src/sap/ui/vk/DrawerToolbar.js +46 -19
  18. package/src/sap/ui/vk/DvlException.js +1 -1
  19. package/src/sap/ui/vk/FlexibleControl.js +1 -1
  20. package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -1
  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/Loco.js +1 -1
  26. package/src/sap/ui/vk/Material.js +1 -1
  27. package/src/sap/ui/vk/NativeViewport.js +1 -1
  28. package/src/sap/ui/vk/NodeHierarchy.js +1 -1
  29. package/src/sap/ui/vk/NodeProxy.js +1 -1
  30. package/src/sap/ui/vk/NodeUtils.js +1 -1
  31. package/src/sap/ui/vk/Notifications.js +1 -1
  32. package/src/sap/ui/vk/OrthographicCamera.js +1 -1
  33. package/src/sap/ui/vk/PerspectiveCamera.js +1 -1
  34. package/src/sap/ui/vk/ProgressIndicator.js +1 -1
  35. package/src/sap/ui/vk/RedlineCollaboration.js +1 -1
  36. package/src/sap/ui/vk/RedlineConversation.js +1 -1
  37. package/src/sap/ui/vk/RedlineDesign.js +1 -1
  38. package/src/sap/ui/vk/RedlineElement.js +1 -1
  39. package/src/sap/ui/vk/RedlineElementComment.js +1 -1
  40. package/src/sap/ui/vk/RedlineElementEllipse.js +1 -1
  41. package/src/sap/ui/vk/RedlineElementFreehand.js +1 -1
  42. package/src/sap/ui/vk/RedlineElementLine.js +1 -1
  43. package/src/sap/ui/vk/RedlineElementRectangle.js +1 -1
  44. package/src/sap/ui/vk/RedlineElementText.js +1 -1
  45. package/src/sap/ui/vk/RedlineSurface.js +1 -1
  46. package/src/sap/ui/vk/SafeArea.js +1 -1
  47. package/src/sap/ui/vk/Scene.js +5 -1
  48. package/src/sap/ui/vk/SceneTree.js +20 -3
  49. package/src/sap/ui/vk/StepNavigation.js +1 -1
  50. package/src/sap/ui/vk/Texture.js +1 -1
  51. package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
  52. package/src/sap/ui/vk/ToggleMenuItem.js +1 -1
  53. package/src/sap/ui/vk/Toolbar.js +1 -1
  54. package/src/sap/ui/vk/View.js +1 -1
  55. package/src/sap/ui/vk/ViewGallery.js +1 -1
  56. package/src/sap/ui/vk/ViewGalleryThumbnail.js +1 -1
  57. package/src/sap/ui/vk/ViewGroup.js +1 -1
  58. package/src/sap/ui/vk/ViewManager.js +1 -1
  59. package/src/sap/ui/vk/ViewStateManager.js +3 -10
  60. package/src/sap/ui/vk/ViewStateManagerBase.js +2 -2
  61. package/src/sap/ui/vk/Viewer.js +2 -2
  62. package/src/sap/ui/vk/Viewport.js +1 -1
  63. package/src/sap/ui/vk/ViewportBase.js +24 -70
  64. package/src/sap/ui/vk/dvl/BaseNodeProxy.js +1 -1
  65. package/src/sap/ui/vk/dvl/ContentManager.js +1 -1
  66. package/src/sap/ui/vk/dvl/GraphicsCore.js +1 -1
  67. package/src/sap/ui/vk/dvl/LayerProxy.js +1 -1
  68. package/src/sap/ui/vk/dvl/NodeHierarchy.js +1 -1
  69. package/src/sap/ui/vk/dvl/NodeProxy.js +1 -1
  70. package/src/sap/ui/vk/dvl/Scene.js +1 -1
  71. package/src/sap/ui/vk/dvl/ViewStateManager.js +1 -1
  72. package/src/sap/ui/vk/dvl/Viewport.js +1 -1
  73. package/src/sap/ui/vk/ecad/ElementsPanel.js +14 -41
  74. package/src/sap/ui/vk/ecad/LayersPanel.js +8 -25
  75. package/src/sap/ui/vk/i18n/messagebundle.properties +46 -44
  76. package/src/sap/ui/vk/i18n/messagebundle_ar.properties +25 -12
  77. package/src/sap/ui/vk/i18n/messagebundle_bg.properties +25 -12
  78. package/src/sap/ui/vk/i18n/messagebundle_ca.properties +25 -12
  79. package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +25 -12
  80. package/src/sap/ui/vk/i18n/messagebundle_cs.properties +25 -12
  81. package/src/sap/ui/vk/i18n/messagebundle_cy.properties +25 -12
  82. package/src/sap/ui/vk/i18n/messagebundle_da.properties +25 -12
  83. package/src/sap/ui/vk/i18n/messagebundle_de.properties +26 -13
  84. package/src/sap/ui/vk/i18n/messagebundle_el.properties +25 -12
  85. package/src/sap/ui/vk/i18n/messagebundle_en.properties +25 -326
  86. package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +25 -12
  87. package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +26 -12
  88. package/src/sap/ui/vk/i18n/messagebundle_es.properties +27 -14
  89. package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +25 -12
  90. package/src/sap/ui/vk/i18n/messagebundle_et.properties +25 -12
  91. package/src/sap/ui/vk/i18n/messagebundle_fi.properties +25 -12
  92. package/src/sap/ui/vk/i18n/messagebundle_fr.properties +25 -12
  93. package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +25 -12
  94. package/src/sap/ui/vk/i18n/messagebundle_hi.properties +25 -12
  95. package/src/sap/ui/vk/i18n/messagebundle_hr.properties +25 -12
  96. package/src/sap/ui/vk/i18n/messagebundle_hu.properties +25 -12
  97. package/src/sap/ui/vk/i18n/messagebundle_id.properties +26 -13
  98. package/src/sap/ui/vk/i18n/messagebundle_it.properties +25 -12
  99. package/src/sap/ui/vk/i18n/messagebundle_iw.properties +25 -12
  100. package/src/sap/ui/vk/i18n/messagebundle_ja.properties +25 -12
  101. package/src/sap/ui/vk/i18n/messagebundle_kk.properties +37 -24
  102. package/src/sap/ui/vk/i18n/messagebundle_ko.properties +22 -9
  103. package/src/sap/ui/vk/i18n/messagebundle_lt.properties +25 -12
  104. package/src/sap/ui/vk/i18n/messagebundle_lv.properties +25 -12
  105. package/src/sap/ui/vk/i18n/messagebundle_mk.properties +25 -12
  106. package/src/sap/ui/vk/i18n/messagebundle_ms.properties +25 -12
  107. package/src/sap/ui/vk/i18n/messagebundle_nl.properties +25 -12
  108. package/src/sap/ui/vk/i18n/messagebundle_no.properties +25 -12
  109. package/src/sap/ui/vk/i18n/messagebundle_pl.properties +25 -12
  110. package/src/sap/ui/vk/i18n/messagebundle_pt.properties +25 -12
  111. package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +25 -12
  112. package/src/sap/ui/vk/i18n/messagebundle_ro.properties +25 -12
  113. package/src/sap/ui/vk/i18n/messagebundle_ru.properties +25 -12
  114. package/src/sap/ui/vk/i18n/messagebundle_sh.properties +25 -12
  115. package/src/sap/ui/vk/i18n/messagebundle_sk.properties +25 -12
  116. package/src/sap/ui/vk/i18n/messagebundle_sl.properties +25 -12
  117. package/src/sap/ui/vk/i18n/messagebundle_sr.properties +25 -12
  118. package/src/sap/ui/vk/i18n/messagebundle_sv.properties +25 -12
  119. package/src/sap/ui/vk/i18n/messagebundle_th.properties +25 -12
  120. package/src/sap/ui/vk/i18n/messagebundle_tr.properties +25 -12
  121. package/src/sap/ui/vk/i18n/messagebundle_uk.properties +25 -12
  122. package/src/sap/ui/vk/i18n/messagebundle_vi.properties +25 -12
  123. package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +25 -12
  124. package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +25 -12
  125. package/src/sap/ui/vk/library.js +5 -5
  126. package/src/sap/ui/vk/measurements/Angle.js +1 -1
  127. package/src/sap/ui/vk/measurements/Area.js +1 -1
  128. package/src/sap/ui/vk/measurements/Distance.js +1 -1
  129. package/src/sap/ui/vk/measurements/Edge.js +1 -1
  130. package/src/sap/ui/vk/measurements/Face.js +1 -1
  131. package/src/sap/ui/vk/measurements/Feature.js +1 -1
  132. package/src/sap/ui/vk/measurements/Vertex.js +1 -1
  133. package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
  134. package/src/sap/ui/vk/pdf/Page.js +9 -10
  135. package/src/sap/ui/vk/pdf/Utils.js +4 -2
  136. package/src/sap/ui/vk/pdf/Viewport.js +1 -1
  137. package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
  138. package/src/sap/ui/vk/svg/ContentDeliveryService.js +1 -1
  139. package/src/sap/ui/vk/svg/ContentManager.js +4 -5
  140. package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
  141. package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
  142. package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
  143. package/src/sap/ui/vk/svg/Scene.js +1 -1
  144. package/src/sap/ui/vk/svg/SceneBuilder.js +1 -1
  145. package/src/sap/ui/vk/svg/ViewStateManager.js +1 -1
  146. package/src/sap/ui/vk/svg/Viewport.js +11 -18
  147. package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
  148. package/src/sap/ui/vk/thirdparty/three.js +31455 -31473
  149. package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
  150. package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
  151. package/src/sap/ui/vk/threejs/Billboard.js +23 -11
  152. package/src/sap/ui/vk/threejs/Callout.js +1 -1
  153. package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
  154. package/src/sap/ui/vk/threejs/ContentManager.js +2 -2
  155. package/src/sap/ui/vk/threejs/DetailView.js +1 -1
  156. package/src/sap/ui/vk/threejs/HighlightPlayer.js +14 -22
  157. package/src/sap/ui/vk/threejs/Material.js +1 -1
  158. package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
  159. package/src/sap/ui/vk/threejs/NodeProxy.js +9 -11
  160. package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
  161. package/src/sap/ui/vk/threejs/OutlineRenderer.js +4 -10
  162. package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
  163. package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
  164. package/src/sap/ui/vk/threejs/Scene.js +1 -15
  165. package/src/sap/ui/vk/threejs/SceneBuilder.js +1 -4
  166. package/src/sap/ui/vk/threejs/Texture.js +1 -1
  167. package/src/sap/ui/vk/threejs/ThreeExtensions.js +10 -174
  168. package/src/sap/ui/vk/threejs/ThreeUtils.js +7 -18
  169. package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
  170. package/src/sap/ui/vk/threejs/ViewStateManager.js +751 -446
  171. package/src/sap/ui/vk/threejs/Viewport.js +41 -31
  172. package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
  173. package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
  174. package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
  175. package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
  176. package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
  177. package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
  178. package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
  179. package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
  180. package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
  181. package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
  182. package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
  183. package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
  184. package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
  185. package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
  186. package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
  187. package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
  188. package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
  189. package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
  190. package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
  191. package/src/sap/ui/vk/tools/Gizmo.js +1 -1
  192. package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
  193. package/src/sap/ui/vk/tools/MoveTool.js +1 -1
  194. package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
  195. package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +1 -1
  196. package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
  197. package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
  198. package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
  199. package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
  200. package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
  201. package/src/sap/ui/vk/tools/RotateTool.js +1 -1
  202. package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
  203. package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
  204. package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
  205. package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
  206. package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
  207. package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
  208. package/src/sap/ui/vk/tools/Tool.js +1 -1
  209. package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
  210. package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
  211. package/src/sap/ui/vk/tools/TooltipToolHandler.js +5 -0
  212. package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
  213. package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
  214. package/src/sap/ui/vk/totara/TotaraLoader.js +2 -2
  215. package/src/sap/ui/vk/totara/TotaraLoaderWorker.js +18 -21
  216. package/ui5.yaml +5 -3
  217. package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +0 -1445
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ui.vk",
3
- "version": "1.138.0",
3
+ "version": "1.139.0",
4
4
  "description": "SAPUI5 Library sap.ui.vk",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -7,7 +7,7 @@
7
7
 
8
8
  (c) Copyright 2009-2015 SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.138.0</version>
10
+ <version>1.139.0</version>
11
11
 
12
12
  <documentation>SAPUI5 Visualization Toolkit.</documentation>
13
13
 
@@ -35,6 +35,14 @@
35
35
  <libraryName>sap.ui.richtexteditor</libraryName>
36
36
  <lazy>true</lazy>
37
37
  </dependency>
38
+ <dependency>
39
+ <libraryName>sap.ui.comp</libraryName>
40
+ <lazy>true</lazy>
41
+ </dependency>
42
+ <dependency>
43
+ <libraryName>sap.f</libraryName>
44
+ <lazy>true</lazy>
45
+ </dependency>
38
46
  </dependencies>
39
47
 
40
48
  <appData>
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  *
28
28
  * @private
29
29
  * @author SAP SE
30
- * @version 1.138.0
30
+ * @version 1.139.0
31
31
  * @extends sap.ui.base.EventProvider
32
32
  * @alias sap.ui.vk.AnimationPlayback
33
33
  */
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  *
32
32
  * @public
33
33
  * @author SAP SE
34
- * @version 1.138.0
34
+ * @version 1.139.0
35
35
  * @extends sap.ui.core.Element
36
36
  * @alias sap.ui.vk.AnimationPlayer
37
37
  * @since 1.67.0
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  *
34
34
  * @private
35
35
  * @author SAP SE
36
- * @version 1.138.0
36
+ * @version 1.139.0
37
37
  * @extends sap.ui.base.Object
38
38
  * @alias sap.ui.vk.AnimationSequence
39
39
  * @implements sap.ui.vk.IJointCollection
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.m.Slider
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.138.0
29
+ * @version 1.139.0
30
30
  *
31
31
  * @constructor
32
32
  * @private
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @param {boolean} parameters.infinite infinite flag
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.138.0
35
+ * @version 1.139.0
36
36
  * @extends sap.ui.base.Object
37
37
  * @alias sap.ui.vk.AnimationTrack
38
38
  *
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  *
41
41
  * @public
42
42
  * @author SAP SE
43
- * @version 1.138.0
43
+ * @version 1.139.0
44
44
  * @extends sap.ui.core.Control
45
45
  * @alias sap.ui.vk.Annotation
46
46
  * @since 1.76.0
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @public
37
37
  * @abstract
38
38
  * @author SAP SE
39
- * @version 1.138.0
39
+ * @version 1.139.0
40
40
  * @extends sap.ui.base.Object
41
41
  * @implements sap.ui.base.Poolable, sap.ui.vk.BaseNodeProxy
42
42
  * @alias sap.ui.vk.BaseNodeProxy
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @public
24
24
  * @abstract
25
25
  * @author SAP SE
26
- * @version 1.138.0
26
+ * @version 1.139.0
27
27
  * @extends sap.ui.base.ManagedObject
28
28
  * @alias sap.ui.vk.Camera
29
29
  * @since 1.52.0
@@ -7,23 +7,23 @@
7
7
 
8
8
  // Provides object sap.ui.vk.ContentConnector.
9
9
  sap.ui.define([
10
- "sap/ui/base/Object",
10
+ "sap/base/Log",
11
11
  "sap/ui/base/ManagedObjectObserver",
12
12
  "sap/ui/core/Element",
13
- "./Messages",
14
- "./getResourceBundle",
15
13
  "./ContentResource",
14
+ "./ContentType",
16
15
  "./Core",
17
- "sap/base/Log"
16
+ "./getResourceBundle",
17
+ "./Messages"
18
18
  ], function(
19
- BaseObject,
19
+ Log,
20
20
  ManagedObjectObserver,
21
21
  Element,
22
- Messages,
23
- getResourceBundle,
24
22
  ContentResource,
23
+ ContentType,
25
24
  vkCore,
26
- Log
25
+ getResourceBundle,
26
+ Messages
27
27
  ) {
28
28
  "use strict";
29
29
 
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @param {object} [mSettings] Initial settings for the new ContentConnector object.
41
41
  * @public
42
42
  * @author SAP SE
43
- * @version 1.138.0
43
+ * @version 1.139.0
44
44
  * @extends sap.ui.core.Element
45
45
  * @alias sap.ui.vk.ContentConnector
46
46
  */
@@ -719,7 +719,79 @@ sap.ui.define([
719
719
  return result;
720
720
  };
721
721
 
722
- var resolvers = [
722
+ // This function handles the cases when the content resource source type is "auto". In this case
723
+ // it is expected that the content resource has a source URL that points to a remote server that
724
+ // provides information about the content resource. The function sends a request to the server
725
+ // to get the content type and returns the content manager class name and dimension based on the
726
+ // content type.
727
+ //
728
+ // If the request fails or the content type is not recognized, the function returns `null`
729
+ // indicating that the next resolver should be tried.
730
+ async function autoResolver(contentResource) {
731
+ const sourceType = contentResource.getSourceType()?.toLowerCase();
732
+ const source = contentResource.getSource();
733
+ const veId = contentResource.getVeid() ?? "";
734
+
735
+ if (sourceType !== "auto" || typeof source !== "string" || veId === "") {
736
+ return null;
737
+ }
738
+
739
+ const url = `${source}${source.endsWith("/") ? "" : "/"}scenes/${veId}/info`;
740
+
741
+ try {
742
+ const response = await fetch(url);
743
+
744
+ if (!response.ok) {
745
+ return null;
746
+ }
747
+
748
+ const { contentType } = await response.json();
749
+
750
+ switch (contentType) {
751
+ case ContentType.IMAGE2D:
752
+ case ContentType.IMAGE360:
753
+ case ContentType.MATERIAL:
754
+ case ContentType.MODEL3D:
755
+ case ContentType.NAVIGATION:
756
+ case ContentType.SYMBOL:
757
+ contentResource.setEffectiveSourceType("stream");
758
+
759
+ return {
760
+ dimension: 3,
761
+ contentManagerClassName: "sap.ui.vk.threejs.ContentManager"
762
+ };
763
+
764
+ case ContentType.DRAWING2D:
765
+ case ContentType.ECAD:
766
+ contentResource.setEffectiveSourceType(contentType === ContentType.ECAD
767
+ ? "ecad"
768
+ : "stream2d"
769
+ );
770
+
771
+ return {
772
+ dimension: 2,
773
+ contentManagerClassName: "sap.ui.vk.svg.ContentManager"
774
+ };
775
+
776
+ case ContentType.PDF:
777
+ contentResource.setEffectiveSourceType("stream");
778
+
779
+ return {
780
+ dimension: 2,
781
+ contentManagerClassName: "sap.ui.vk.pdf.ContentManager"
782
+ };
783
+
784
+ default:
785
+ return null;
786
+ }
787
+ } catch (e) {
788
+ Log.error("Failed to resolve content resource type automatically.", e, "sap.ui.vk.ContentConnector");
789
+ }
790
+
791
+ return null;
792
+ }
793
+
794
+ const resolvers = [
723
795
  {
724
796
  pattern: /(^threejs[:.])|(^(threejs|stream|vds4)$)/,
725
797
  dimension: 3,
@@ -744,7 +816,8 @@ sap.ui.define([
744
816
  pattern: /^(pdf)$/,
745
817
  dimension: 2,
746
818
  contentManagerClassName: "sap.ui.vk.pdf.ContentManager"
747
- }
819
+ },
820
+ autoResolver
748
821
  ];
749
822
 
750
823
  /**
@@ -768,53 +841,42 @@ sap.ui.define([
768
841
  * </pre>
769
842
  * @private
770
843
  */
771
- var resolveContentManager = function(contentResource) {
772
- return new Promise(function(resolve, reject) {
773
- var entries = resolvers.slice();
774
- var test = function(index) {
775
- if (index >= entries.length) {
776
- reject();
777
- return;
844
+ async function resolveContentManager(contentResource) {
845
+ const sourceType = contentResource.getSourceType()?.toLowerCase();
846
+
847
+ let resolver = null;
848
+
849
+ for (const entry of resolvers.slice()) {
850
+ if (typeof entry === "function") {
851
+ try {
852
+ resolver = await entry(contentResource);
853
+ break;
854
+ } catch {
855
+ continue;
778
856
  }
779
- var resolver = entries[index];
780
- (function() {
781
-
782
- var sourceType = contentResource.getSourceType();
783
- if (sourceType) {
784
- sourceType = sourceType.toLowerCase();
785
- }
786
-
787
- if (typeof resolver === "function") {
788
- return resolver(contentResource);
789
- } else if (typeof resolver.pattern === "string") {
790
- var patternLowerCase = resolver.pattern.toLowerCase();
791
- if (patternLowerCase === sourceType) {
792
- return Promise.resolve(resolver);
793
- }
794
- } else if (resolver.pattern instanceof RegExp) {
857
+ } else if (typeof entry.pattern === "string") {
858
+ if (entry.pattern.toLowerCase() === sourceType) {
859
+ resolver = entry;
860
+ break;
861
+ }
862
+ } else if (entry.pattern instanceof RegExp) {
863
+ if (entry.pattern.test(sourceType)) {
864
+ resolver = entry;
865
+ break;
866
+ }
867
+ }
868
+ }
795
869
 
796
- if (resolver.pattern.test(sourceType)) {
797
- return Promise.resolve(resolver);
798
- }
799
- }
800
- // Skip to the next resolver.
801
- return Promise.reject();
802
- })().then(
803
- function(value) { // onFulfilled
804
- resolve({
805
- dimension: value.dimension,
806
- contentManagerClassName: value.contentManagerClassName,
807
- settings: value.settings
808
- });
809
- },
810
- function() { // onRejected
811
- test(index + 1);
812
- }
813
- );
870
+ if (resolver == null) {
871
+ return null;
872
+ } else {
873
+ return {
874
+ dimension: resolver.dimension,
875
+ contentManagerClassName: resolver.contentManagerClassName,
876
+ settings: resolver.settings
814
877
  };
815
- test(0);
816
- });
817
- };
878
+ }
879
+ }
818
880
 
819
881
  /**
820
882
  * Adds a new content manager resolver.
@@ -1045,8 +1107,8 @@ sap.ui.define([
1045
1107
  /**
1046
1108
  * Collects information about content resource types.
1047
1109
  *
1048
- * Content resources can be 2D and 3D models. Depending of content type different rendering technologies
1049
- * should be used, e.g. DVL, ThreeJS or native browser capabilities, e.g. for raster 2D files.
1110
+ * Content resources can be 2D and 3D models, PDFs, raster images. Depending on content type different rendering
1111
+ * technologies should be used, e.g. DVL, ThreeJS or native browser capabilities, e.g. for raster 2D files.
1050
1112
  *
1051
1113
  * This method has a side effect - it assigns content manager resolvers to the content resources.
1052
1114
  *
@@ -1063,7 +1125,7 @@ sap.ui.define([
1063
1125
  * @private
1064
1126
  * @since 1.50.0
1065
1127
  */
1066
- ContentConnector.prototype._collectContentResourceSourceTypeInformation = function(contentResources) {
1128
+ ContentConnector.prototype._collectContentResourceSourceTypeInformation = async function(contentResources) {
1067
1129
  var noSourceTypes = false;
1068
1130
  var unknownSourceTypes = false;
1069
1131
  var dimensions = {};
@@ -1075,44 +1137,36 @@ sap.ui.define([
1075
1137
  contentResource.getContentResources().forEach(flatten);
1076
1138
  });
1077
1139
 
1078
- return Promise
1079
- .all(
1080
- flatList.map(
1081
- function(contentResource) {
1082
- return resolveContentManager(contentResource)
1083
- .then(
1084
- function(resolver) { // onFulfilled
1085
- dimensions[resolver.dimension] = true;
1086
- contentManagerClassNames[resolver.contentManagerClassName] = true;
1087
- return resolver;
1088
- },
1089
- function() { // onRejected
1090
- if (contentResource.getSourceType()) {
1091
- unknownSourceTypes = true;
1092
- } else {
1093
- noSourceTypes = true;
1094
- }
1095
- return false;
1096
- }
1097
- );
1098
- }
1099
- )
1100
- )
1101
- .then(function(results) {
1102
- for (var i = 0, count = flatList.length; i < count; ++i) {
1103
- if (results[i]) {
1104
- // Assign the resolver to the content resource.
1105
- // It might be used by those content managers that support additional settings.
1106
- flatList[i]._contentManagerResolver = results[i];
1107
- }
1140
+ const resolvers = await Promise.all(flatList.map(async function(contentResource) {
1141
+ const resolver = await resolveContentManager(contentResource);
1142
+
1143
+ if (resolver == null) {
1144
+ if (contentResource.getSourceType()) {
1145
+ unknownSourceTypes = true;
1146
+ } else {
1147
+ noSourceTypes = true;
1108
1148
  }
1109
- return {
1110
- noSourceTypes: noSourceTypes,
1111
- unknownSourceTypes: unknownSourceTypes,
1112
- dimensions: Object.getOwnPropertyNames(dimensions).sort(),
1113
- contentManagerClassNames: Object.getOwnPropertyNames(contentManagerClassNames)
1114
- };
1115
- });
1149
+ } else {
1150
+ dimensions[resolver.dimension] = true;
1151
+ contentManagerClassNames[resolver.contentManagerClassName] = true;
1152
+ }
1153
+ return resolver;
1154
+ }));
1155
+
1156
+ for (const [i, resolver] of resolvers.entries()) {
1157
+ if (resolver != null) {
1158
+ // Assign the resolver to the content resource.
1159
+ // It might be used by those content managers that support additional settings.
1160
+ flatList[i]._contentManagerResolver = resolver;
1161
+ }
1162
+ }
1163
+
1164
+ return {
1165
+ noSourceTypes: noSourceTypes,
1166
+ unknownSourceTypes: unknownSourceTypes,
1167
+ dimensions: Object.getOwnPropertyNames(dimensions).toSorted().map(Number),
1168
+ contentManagerClassNames: Object.getOwnPropertyNames(contentManagerClassNames)
1169
+ };
1116
1170
  };
1117
1171
 
1118
1172
  /**
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @protected
27
27
  * @abstract
28
28
  * @author SAP SE
29
- * @version 1.138.0
29
+ * @version 1.139.0
30
30
  * @extends sap.ui.base.ManagedObject
31
31
  * @alias sap.ui.vk.ContentManager
32
32
  * @since 1.50.0
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @param {object} [oScope] scope An object for resolving string-based type and formatter references in bindings.
28
28
  * @public
29
29
  * @author SAP SE
30
- * @version 1.138.0
30
+ * @version 1.139.0
31
31
  * @extends sap.ui.base.ManagedObject
32
32
  * @alias sap.ui.vk.ContentResource
33
33
  */
@@ -44,6 +44,7 @@ sap.ui.define([
44
44
 
45
45
  /**
46
46
  * The source type of the content resource. Valid types:
47
+ *
47
48
  * <ul>
48
49
  * <li>vds</li>
49
50
  * <li>vds4</li>
@@ -54,18 +55,26 @@ sap.ui.define([
54
55
  * <li>jpeg</li>
55
56
  * <li>gif</li>
56
57
  * <li>bmp</li>
57
- * <li>tif*</li>
58
- * <li>tiff*</li>
58
+ * <li>tif</li>
59
+ * <li>tiff</li>
59
60
  * <li>stream</li>
60
61
  * <li>stream2d</li>
61
62
  * <li>ecad</li>
62
63
  * <li>pdf</li>
64
+ * <li>auto</li>
63
65
  * </ul>
66
+ *
64
67
  * The source type may be omitted if this is a grouping content node.
65
- * </br>NOTE: The tif and tiff image formats are not supported on all browsers.
66
- * Source type "vds" initializes deprecated DVL namespace and uses legacy library to load and display VDS file content.
67
- * If source type of "vds4" is used then new namespace based on Threejs rendering model will be used to load and display VDS file content.
68
- * Since DVL namespace is deprecated in one of future releases it will be removed and source type "vds" will also use Threejs model.
68
+ * <p>
69
+ * If the <code>source</code> property points to an IPD Visualization service the
70
+ * <code>sourceType</code> property can be assigned value <code>auto</code>. The
71
+ * actual <code>sourceType</code> property will be detected by making a request to
72
+ * the backend.
73
+ * <p>
74
+ * NOTE: The tif and tiff image formats are not supported on all browsers.
75
+ * Source type "vds" initializes deprecated DVL namespace and uses legacy library to load and display VDS file content.
76
+ * If source type of "vds4" is used then new namespace based on Threejs rendering model will be used to load and display VDS file content.
77
+ * Since DVL namespace is deprecated in one of future releases it will be removed and source type "vds" will also use Threejs model.
69
78
  */
70
79
  sourceType: "string",
71
80
 
@@ -220,6 +229,8 @@ sap.ui.define([
220
229
 
221
230
  constructor: function(sId, mSettings, oScope) {
222
231
  ManagedObject.apply(this, arguments);
232
+
233
+ this._effectiveSourceType = undefined;
223
234
  }
224
235
  });
225
236
 
@@ -307,5 +318,13 @@ sap.ui.define([
307
318
  return categories;
308
319
  };
309
320
 
321
+ ContentResource.prototype.getEffectiveSourceType = function() {
322
+ return this._effectiveSourceType ?? this.getSourceType();
323
+ };
324
+
325
+ ContentResource.prototype.setEffectiveSourceType = function(effectiveSourceType) {
326
+ this._effectiveSourceType = effectiveSourceType;
327
+ };
328
+
310
329
  return ContentResource;
311
330
  });
@@ -0,0 +1,41 @@
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
+ * Defines the type of content in a scene.
17
+ *
18
+ * See VisualContentType in IPD Visualization API.
19
+ *
20
+ * @enum {string}
21
+ * @alias sap.ui.vk.ContentType
22
+ * @private
23
+ * @since 1.139.0
24
+ */
25
+ const ContentType = {
26
+ MODEL3D: "3DModel",
27
+ IMAGE2D: "2DImage",
28
+ IMAGE360: "360Image",
29
+ DRAWING2D: "2DDrawing",
30
+ NAVIGATION: "Navigation",
31
+ FOLDER: "Folder",
32
+ SYMBOL: "Symbol",
33
+ MATERIAL: "Material",
34
+ PDF: "PDF",
35
+ ECAD: "ECAD"
36
+ };
37
+
38
+ DataType.registerEnum("sap.ui.vk.ContentType", ContentType);
39
+
40
+ return ContentType;
41
+ });
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @final
40
40
  * @private
41
41
  * @author SAP SE
42
- * @version 1.138.0
42
+ * @version 1.139.0
43
43
  * @extends sap.ui.base.ManagedObject
44
44
  * @alias sap.ui.vk.Core
45
45
  * @since 1.50.0
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * If left undefined, the number of retry attempts will default to 1. Passing in 0 disables any retry attempts.
38
38
  * @private
39
39
  * @author SAP SE
40
- * @version 1.138.0
40
+ * @version 1.139.0
41
41
  * @extends sap.ui.base.EventProvider
42
42
  * @alias sap.ui.vk.DownloadManager
43
43
  * @since 1.32.0
@@ -117,7 +117,7 @@ sap.ui.define([
117
117
  * @extends sap.ui.core.Control
118
118
  *
119
119
  * @author SAP
120
- * @version 1.138.0
120
+ * @version 1.139.0
121
121
  *
122
122
  * @public
123
123
  * @alias sap.ui.vk.DrawerToolbar
@@ -1116,8 +1116,6 @@ sap.ui.define([
1116
1116
  var ecadSeparator = new ToolbarSeparator();
1117
1117
  ecadSeparator.vitId = DrawerToolbarButton.EcadSeparator;
1118
1118
 
1119
- this._ecadItems = [rotateCCW, rotateCW, flip, ecadSeparator];
1120
-
1121
1119
  var crossSectionSeparator = new ToolbarSeparator();
1122
1120
  crossSectionSeparator.vitId = DrawerToolbarButton.CrossSectionSeparator;
1123
1121
 
@@ -1183,7 +1181,46 @@ sap.ui.define([
1183
1181
  this._pageNavigation
1184
1182
  ];
1185
1183
 
1186
- this._notPdfItems = [zoom, items[9], items[13], this._togglePmiButton, this._togglePmiButtonSeparator, this._measurementsSeparator, this._measurementsToggleButton, this._fitToView, fullscreen];
1184
+ this._notPdfItems = [
1185
+ zoom,
1186
+ this._gestureButtonsSeparator,
1187
+ this._fitToViewSeparator,
1188
+ this._togglePmiButton,
1189
+ this._togglePmiButtonSeparator,
1190
+ this._measurementsSeparator,
1191
+ this._measurementsToggleButton,
1192
+ this._fitToView,
1193
+ this._fitToViewSeparator,
1194
+ this._rectSelectionButton,
1195
+ this._rectSelectSeparator,
1196
+ fullscreen
1197
+ ];
1198
+
1199
+ this._ecadItems = [
1200
+ rotateCCW,
1201
+ rotateCW,
1202
+ flip,
1203
+ ecadSeparator
1204
+ ];
1205
+
1206
+ this._notEcadItems = [
1207
+ this._togglePmiButton,
1208
+ this._togglePmiButtonSeparator,
1209
+ this._gestureButtons[0], // turntable
1210
+ this._gestureButtons[1], // orbit
1211
+ this._measurementsToggleButton,
1212
+ this._measurementsSeparator,
1213
+ crossSectionToggleButton,
1214
+ crossSectionSeparator,
1215
+ predefinedViews,
1216
+ predefinedViewsSeparator,
1217
+ this._zoomInButton,
1218
+ this._zoomOutButton,
1219
+ this._zoomToFitPageButton,
1220
+ this._zoomToFitPageWidthButton,
1221
+ pageNavigationSeparator,
1222
+ this._pageNavigation
1223
+ ];
1187
1224
 
1188
1225
  items.forEach(function(item) {
1189
1226
  this._itemsVisibility.set(item, true);
@@ -1409,7 +1446,7 @@ sap.ui.define([
1409
1446
  }.bind(this));
1410
1447
 
1411
1448
  this._itemTurntable.setVisible(is3D && this._itemsVisibility.get(this._itemTurntable));
1412
- this._itemPan.setVisible(!isPanoramic && !isPdf && !isEcad && this._itemsVisibility.get(this._itemPan));
1449
+ this._itemPan.setVisible(!isPanoramic && !isPdf && this._itemsVisibility.get(this._itemPan));
1413
1450
 
1414
1451
  this._items3D.forEach(function(item) {
1415
1452
  item.setVisible(is3D && !isPanoramic && this._itemsVisibility.get(item));
@@ -1423,22 +1460,12 @@ sap.ui.define([
1423
1460
  i.setVisible(!isPdf && this._itemsVisibility.get(i));
1424
1461
  });
1425
1462
 
1463
+ // show ECAD controls for ECAD scenes and hide for other scene types
1464
+ this._ecadItems.forEach((item) => item.setVisible(isEcad && this._itemsVisibility.get(item)));
1465
+ // for ECAD scenes -> hide non ECAD controls and don't touch them otherwise
1426
1466
  if (isEcad) {
1427
- this._itemZoom.setVisible(false);
1428
- this._fitToView.setVisible(false);
1429
- this._fitToViewSeparator.setVisible(false);
1430
- this._togglePmiButton.setVisible(false);
1431
- this._togglePmiButtonSeparator.setVisible(false);
1432
- this._gestureButtonsSeparator.setVisible(false);
1433
- this._measurementsToggleButton.setVisible(false);
1434
- this._measurementsSeparator.setVisible(false);
1435
- this._rectSelectionButton.setVisible(false);
1436
- this._rectSelectSeparator.setVisible(false);
1467
+ this._notEcadItems.forEach((item) => item.setVisible(false));
1437
1468
  }
1438
- this._ecadItems.forEach(function(item) {
1439
- item.setVisible(isEcad);
1440
- });
1441
-
1442
1469
 
1443
1470
  this._ignoreVisibilityChange = false;
1444
1471
 
@@ -18,7 +18,7 @@ sap.ui.define(["sap/ui/base/Exception"], function(Exception) {
18
18
  * @param {string} message The error message.
19
19
  * @private
20
20
  * @author SAP SE
21
- * @version 1.138.0
21
+ * @version 1.139.0
22
22
  * @extends sap.ui.base.Exception
23
23
  * @alias sap.ui.vk.DvlException
24
24
  */