@sapui5/sap.ui.vk 1.136.0 → 1.136.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/ui/vk/.library +1 -1
- package/src/sap/ui/vk/AnimationPlayback.js +1 -1
- package/src/sap/ui/vk/AnimationPlayer.js +1 -1
- package/src/sap/ui/vk/AnimationSequence.js +1 -1
- package/src/sap/ui/vk/AnimationTimeSlider.js +1 -1
- package/src/sap/ui/vk/AnimationTrack.js +1 -1
- package/src/sap/ui/vk/Annotation.js +1 -1
- package/src/sap/ui/vk/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/Camera.js +1 -1
- package/src/sap/ui/vk/ContentConnector.js +137 -87
- package/src/sap/ui/vk/ContentManager.js +1 -1
- package/src/sap/ui/vk/ContentResource.js +30 -8
- package/src/sap/ui/vk/ContentType.js +41 -0
- package/src/sap/ui/vk/Core.js +1 -1
- package/src/sap/ui/vk/DownloadManager.js +1 -1
- package/src/sap/ui/vk/DrawerToolbar.js +17 -57
- package/src/sap/ui/vk/DvlException.js +1 -1
- package/src/sap/ui/vk/FlexibleControl.js +1 -1
- package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -1
- package/src/sap/ui/vk/Highlight.js +1 -1
- package/src/sap/ui/vk/ImageContentManager.js +1 -1
- package/src/sap/ui/vk/JointUtils.js +1 -1
- package/src/sap/ui/vk/LayerProxy.js +1 -1
- package/src/sap/ui/vk/Loco.js +1 -1
- package/src/sap/ui/vk/Material.js +1 -1
- package/src/sap/ui/vk/NativeViewport.js +1 -1
- package/src/sap/ui/vk/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/NodeProxy.js +1 -1
- package/src/sap/ui/vk/NodeUtils.js +1 -1
- package/src/sap/ui/vk/Notifications.js +1 -1
- package/src/sap/ui/vk/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/PerspectiveCamera.js +1 -1
- package/src/sap/ui/vk/ProgressIndicator.js +1 -1
- package/src/sap/ui/vk/RedlineCollaboration.js +1 -1
- package/src/sap/ui/vk/RedlineConversation.js +1 -1
- package/src/sap/ui/vk/RedlineDesign.js +1 -1
- package/src/sap/ui/vk/RedlineElement.js +1 -1
- package/src/sap/ui/vk/RedlineElementComment.js +1 -1
- package/src/sap/ui/vk/RedlineElementEllipse.js +1 -1
- package/src/sap/ui/vk/RedlineElementFreehand.js +1 -1
- package/src/sap/ui/vk/RedlineElementLine.js +1 -1
- package/src/sap/ui/vk/RedlineElementRectangle.js +1 -1
- package/src/sap/ui/vk/RedlineElementText.js +1 -1
- package/src/sap/ui/vk/RedlineSurface.js +1 -1
- package/src/sap/ui/vk/SafeArea.js +1 -1
- package/src/sap/ui/vk/Scene.js +1 -1
- package/src/sap/ui/vk/SceneTree.js +1 -1
- package/src/sap/ui/vk/StepNavigation.js +1 -1
- package/src/sap/ui/vk/Texture.js +1 -1
- package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
- package/src/sap/ui/vk/ToggleMenuItem.js +1 -1
- package/src/sap/ui/vk/Toolbar.js +10 -18
- package/src/sap/ui/vk/View.js +1 -1
- package/src/sap/ui/vk/ViewGallery.js +1 -1
- package/src/sap/ui/vk/ViewGalleryThumbnail.js +1 -1
- package/src/sap/ui/vk/ViewGroup.js +1 -1
- package/src/sap/ui/vk/ViewManager.js +1 -1
- package/src/sap/ui/vk/ViewStateManager.js +1 -1
- package/src/sap/ui/vk/ViewStateManagerBase.js +1 -1
- package/src/sap/ui/vk/Viewer.js +65 -76
- package/src/sap/ui/vk/Viewport.js +1 -1
- package/src/sap/ui/vk/ViewportBase.js +46 -3
- package/src/sap/ui/vk/dvl/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/dvl/ContentManager.js +1 -1
- package/src/sap/ui/vk/dvl/GraphicsCore.js +1 -1
- package/src/sap/ui/vk/dvl/LayerProxy.js +1 -1
- package/src/sap/ui/vk/dvl/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/dvl/NodeProxy.js +1 -1
- package/src/sap/ui/vk/dvl/Scene.js +1 -1
- package/src/sap/ui/vk/dvl/ViewStateManager.js +1 -1
- package/src/sap/ui/vk/dvl/Viewport.js +1 -1
- package/src/sap/ui/vk/ecad/ElementsPanel.js +1 -1
- package/src/sap/ui/vk/ecad/LayersPanel.js +1 -1
- package/src/sap/ui/vk/i18n/messagebundle.properties +5 -0
- package/src/sap/ui/vk/i18n/messagebundle_ar.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_bg.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_ca.properties +30 -1
- package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_cs.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_cy.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_da.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_de.properties +30 -1
- package/src/sap/ui/vk/i18n/messagebundle_el.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_en.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_es.properties +33 -4
- package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_et.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_fi.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_fr.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_hi.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_hr.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_hu.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_id.properties +31 -2
- package/src/sap/ui/vk/i18n/messagebundle_it.properties +31 -2
- package/src/sap/ui/vk/i18n/messagebundle_iw.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_ja.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_kk.properties +41 -12
- package/src/sap/ui/vk/i18n/messagebundle_ko.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_lt.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_lv.properties +31 -2
- package/src/sap/ui/vk/i18n/messagebundle_mk.properties +31 -2
- package/src/sap/ui/vk/i18n/messagebundle_ms.properties +34 -5
- package/src/sap/ui/vk/i18n/messagebundle_nl.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_no.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_pl.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_pt.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_ro.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_ru.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_sh.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_sk.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_sl.properties +32 -3
- package/src/sap/ui/vk/i18n/messagebundle_sr.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_sv.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_th.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_tr.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_uk.properties +30 -1
- package/src/sap/ui/vk/i18n/messagebundle_vi.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +29 -0
- package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +29 -0
- package/src/sap/ui/vk/library.js +2 -2
- package/src/sap/ui/vk/measurements/Angle.js +1 -1
- package/src/sap/ui/vk/measurements/Area.js +1 -1
- package/src/sap/ui/vk/measurements/Distance.js +1 -1
- package/src/sap/ui/vk/measurements/Edge.js +1 -1
- package/src/sap/ui/vk/measurements/Face.js +1 -1
- package/src/sap/ui/vk/measurements/Feature.js +1 -1
- package/src/sap/ui/vk/measurements/Vertex.js +1 -1
- package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
- package/src/sap/ui/vk/pdf/Viewport.js +1 -1
- package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/svg/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/svg/ContentManager.js +4 -4
- package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
- package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/svg/Scene.js +1 -1
- package/src/sap/ui/vk/svg/SceneBuilder.js +1 -1
- package/src/sap/ui/vk/svg/ViewStateManager.js +1 -1
- package/src/sap/ui/vk/svg/Viewport.js +1 -1
- package/src/sap/ui/vk/themes/base/DrawerToolbar.less +8 -0
- package/src/sap/ui/vk/themes/base/Viewer.less +9 -12
- package/src/sap/ui/vk/themes/sap_belize_base/Viewer.less +1 -12
- package/src/sap/ui/vk/themes/sap_bluecrystal_base/Viewer.less +1 -12
- package/src/sap/ui/vk/themes/sap_hcb/base_Viewer.less +1 -12
- package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
- package/src/sap/ui/vk/thirdparty/three.js +31455 -31473
- package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
- package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/threejs/Billboard.js +2 -2
- package/src/sap/ui/vk/threejs/Callout.js +1 -1
- package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/threejs/ContentManager.js +2 -2
- package/src/sap/ui/vk/threejs/DetailView.js +1 -1
- package/src/sap/ui/vk/threejs/HighlightPlayer.js +1 -1
- package/src/sap/ui/vk/threejs/Material.js +1 -1
- package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/threejs/NodeProxy.js +1 -1
- package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
- package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
- package/src/sap/ui/vk/threejs/Scene.js +1 -1
- package/src/sap/ui/vk/threejs/SceneBuilder.js +1 -1
- package/src/sap/ui/vk/threejs/Texture.js +1 -1
- package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
- package/src/sap/ui/vk/threejs/ViewStateManager.js +1 -1
- package/src/sap/ui/vk/threejs/Viewport.js +7 -1
- package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +1 -1
- package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
- package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
- package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
- package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
- package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/Gizmo.js +1 -1
- package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
- package/src/sap/ui/vk/tools/MoveTool.js +1 -1
- package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +1 -1
- package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
- package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
- package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
- package/src/sap/ui/vk/tools/RotateTool.js +1 -1
- package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
- package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
- package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
- package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/Tool.js +1 -1
- package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
- package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
- package/src/sap/ui/vk/totara/TotaraLoader.js +2 -2
- package/src/sap/ui/vk/totara/TotaraLoaderWorker.js +18 -21
- package/src/sap/ui/vk/ve/dvl.js +1 -1
- package/src/sap/ui/vk/ve/dvl.wasm +0 -0
- package/src/sap/ui/vk/ve/matai.js +1 -1
- package/src/sap/ui/vk/ve/matai.wasm +0 -0
package/package.json
CHANGED
package/src/sap/ui/vk/.library
CHANGED
|
@@ -31,7 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
*
|
|
32
32
|
* @public
|
|
33
33
|
* @author SAP SE
|
|
34
|
-
* @version 1.136.
|
|
34
|
+
* @version 1.136.1
|
|
35
35
|
* @extends sap.ui.core.Element
|
|
36
36
|
* @alias sap.ui.vk.AnimationPlayer
|
|
37
37
|
* @experimental Since 1.67.0 This class is experimental and might be modified or removed in future versions.
|
|
@@ -40,7 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
*
|
|
41
41
|
* @public
|
|
42
42
|
* @author SAP SE
|
|
43
|
-
* @version 1.136.
|
|
43
|
+
* @version 1.136.1
|
|
44
44
|
* @extends sap.ui.core.Control
|
|
45
45
|
* @alias sap.ui.vk.Annotation
|
|
46
46
|
* @experimental Since 1.76.0 This class is experimental and might be modified or removed in future versions.
|
package/src/sap/ui/vk/Camera.js
CHANGED
|
@@ -13,6 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
"./Messages",
|
|
14
14
|
"./getResourceBundle",
|
|
15
15
|
"./ContentResource",
|
|
16
|
+
"./ContentType",
|
|
16
17
|
"./Core",
|
|
17
18
|
"sap/base/Log"
|
|
18
19
|
], function(
|
|
@@ -22,6 +23,7 @@ sap.ui.define([
|
|
|
22
23
|
Messages,
|
|
23
24
|
getResourceBundle,
|
|
24
25
|
ContentResource,
|
|
26
|
+
ContentType,
|
|
25
27
|
vkCore,
|
|
26
28
|
Log
|
|
27
29
|
) {
|
|
@@ -40,7 +42,7 @@ sap.ui.define([
|
|
|
40
42
|
* @param {object} [mSettings] Initial settings for the new ContentConnector object.
|
|
41
43
|
* @public
|
|
42
44
|
* @author SAP SE
|
|
43
|
-
* @version 1.136.
|
|
45
|
+
* @version 1.136.1
|
|
44
46
|
* @extends sap.ui.core.Element
|
|
45
47
|
* @alias sap.ui.vk.ContentConnector
|
|
46
48
|
*/
|
|
@@ -719,7 +721,73 @@ sap.ui.define([
|
|
|
719
721
|
return result;
|
|
720
722
|
};
|
|
721
723
|
|
|
722
|
-
|
|
724
|
+
// This function handles the cases when the content resource source type is "auto". In this case
|
|
725
|
+
// it is expected that the content resource has a source URL that points to a remote server that
|
|
726
|
+
// provides information about the content resource. The function sends a request to the server
|
|
727
|
+
// to get the content type and returns the content manager class name and dimension based on the
|
|
728
|
+
// content type.
|
|
729
|
+
//
|
|
730
|
+
// If the request fails or the content type is not recognized, the function returns `null`
|
|
731
|
+
// indicating that the next resolver should be tried.
|
|
732
|
+
async function autoResolver(contentResource) {
|
|
733
|
+
const sourceType = contentResource.getSourceType()?.toLowerCase();
|
|
734
|
+
const source = contentResource.getSource();
|
|
735
|
+
const veId = contentResource.getVeid() ?? "";
|
|
736
|
+
|
|
737
|
+
if (sourceType !== "auto" || typeof source !== "string" || veId === "") {
|
|
738
|
+
return null;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
const url = `${source}${source.endsWith("/") ? "" : "/"}scenes/${veId}/info`;
|
|
742
|
+
|
|
743
|
+
try {
|
|
744
|
+
const response = await fetch(url);
|
|
745
|
+
|
|
746
|
+
if (!response.ok) {
|
|
747
|
+
return null;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
const { contentType } = await response.json();
|
|
751
|
+
|
|
752
|
+
switch (contentType) {
|
|
753
|
+
case ContentType.IMAGE2D:
|
|
754
|
+
case ContentType.IMAGE360:
|
|
755
|
+
case ContentType.MATERIAL:
|
|
756
|
+
case ContentType.MODEL3D:
|
|
757
|
+
case ContentType.NAVIGATION:
|
|
758
|
+
case ContentType.SYMBOL:
|
|
759
|
+
contentResource.setEffectiveSourceType("stream");
|
|
760
|
+
|
|
761
|
+
return {
|
|
762
|
+
dimension: 3,
|
|
763
|
+
contentManagerClassName: "sap.ui.vk.threejs.ContentManager"
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
case ContentType.DRAWING2D:
|
|
767
|
+
contentResource.setEffectiveSourceType("stream2d");
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
return {
|
|
771
|
+
dimension: 2,
|
|
772
|
+
contentManagerClassName: "sap.ui.vk.svg.ContentManager"
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
case ContentType.ECAD:
|
|
776
|
+
case ContentType.PDF:
|
|
777
|
+
Log.error(`Content type ${contentType} is not supported`, "sap.ui.vk.ContentConnector");
|
|
778
|
+
return null;
|
|
779
|
+
|
|
780
|
+
default:
|
|
781
|
+
return null;
|
|
782
|
+
}
|
|
783
|
+
} catch (e) {
|
|
784
|
+
Log.error("Failed to resolve content resource type automatically.", e, "sap.ui.vk.ContentConnector");
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
return null;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
const resolvers = [
|
|
723
791
|
{
|
|
724
792
|
pattern: /(^threejs[:.])|(^(threejs|stream|vds4)$)/,
|
|
725
793
|
dimension: 3,
|
|
@@ -744,7 +812,8 @@ sap.ui.define([
|
|
|
744
812
|
pattern: /^(pdf)$/,
|
|
745
813
|
dimension: 2,
|
|
746
814
|
contentManagerClassName: "sap.ui.vk.pdf.ContentManager"
|
|
747
|
-
}
|
|
815
|
+
},
|
|
816
|
+
autoResolver
|
|
748
817
|
];
|
|
749
818
|
|
|
750
819
|
/**
|
|
@@ -768,53 +837,42 @@ sap.ui.define([
|
|
|
768
837
|
* </pre>
|
|
769
838
|
* @private
|
|
770
839
|
*/
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
840
|
+
async function resolveContentManager(contentResource) {
|
|
841
|
+
const sourceType = contentResource.getSourceType()?.toLowerCase();
|
|
842
|
+
|
|
843
|
+
let resolver = null;
|
|
844
|
+
|
|
845
|
+
for (const entry of resolvers.slice()) {
|
|
846
|
+
if (typeof entry === "function") {
|
|
847
|
+
try {
|
|
848
|
+
resolver = await entry(contentResource);
|
|
849
|
+
break;
|
|
850
|
+
} catch {
|
|
851
|
+
continue;
|
|
778
852
|
}
|
|
779
|
-
|
|
780
|
-
(
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
if (patternLowerCase === sourceType) {
|
|
792
|
-
return Promise.resolve(resolver);
|
|
793
|
-
}
|
|
794
|
-
} else if (resolver.pattern instanceof RegExp) {
|
|
853
|
+
} else if (typeof entry.pattern === "string") {
|
|
854
|
+
if (entry.pattern.toLowerCase() === sourceType) {
|
|
855
|
+
resolver = entry;
|
|
856
|
+
break;
|
|
857
|
+
}
|
|
858
|
+
} else if (entry.pattern instanceof RegExp) {
|
|
859
|
+
if (entry.pattern.test(sourceType)) {
|
|
860
|
+
resolver = entry;
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
795
865
|
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
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
|
-
);
|
|
866
|
+
if (resolver == null) {
|
|
867
|
+
return null;
|
|
868
|
+
} else {
|
|
869
|
+
return {
|
|
870
|
+
dimension: resolver.dimension,
|
|
871
|
+
contentManagerClassName: resolver.contentManagerClassName,
|
|
872
|
+
settings: resolver.settings
|
|
814
873
|
};
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
};
|
|
874
|
+
}
|
|
875
|
+
}
|
|
818
876
|
|
|
819
877
|
/**
|
|
820
878
|
* Adds a new content manager resolver.
|
|
@@ -1045,8 +1103,8 @@ sap.ui.define([
|
|
|
1045
1103
|
/**
|
|
1046
1104
|
* Collects information about content resource types.
|
|
1047
1105
|
*
|
|
1048
|
-
* Content resources can be 2D and 3D models. Depending
|
|
1049
|
-
* should be used, e.g. DVL, ThreeJS or native browser capabilities, e.g. for raster 2D files.
|
|
1106
|
+
* Content resources can be 2D and 3D models, PDFs, raster images. Depending on content type different rendering
|
|
1107
|
+
* technologies should be used, e.g. DVL, ThreeJS or native browser capabilities, e.g. for raster 2D files.
|
|
1050
1108
|
*
|
|
1051
1109
|
* This method has a side effect - it assigns content manager resolvers to the content resources.
|
|
1052
1110
|
*
|
|
@@ -1063,7 +1121,7 @@ sap.ui.define([
|
|
|
1063
1121
|
* @private
|
|
1064
1122
|
* @since 1.50.0
|
|
1065
1123
|
*/
|
|
1066
|
-
ContentConnector.prototype._collectContentResourceSourceTypeInformation = function(contentResources) {
|
|
1124
|
+
ContentConnector.prototype._collectContentResourceSourceTypeInformation = async function(contentResources) {
|
|
1067
1125
|
var noSourceTypes = false;
|
|
1068
1126
|
var unknownSourceTypes = false;
|
|
1069
1127
|
var dimensions = {};
|
|
@@ -1075,44 +1133,36 @@ sap.ui.define([
|
|
|
1075
1133
|
contentResource.getContentResources().forEach(flatten);
|
|
1076
1134
|
});
|
|
1077
1135
|
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
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
|
-
}
|
|
1136
|
+
const resolvers = await Promise.all(flatList.map(async function(contentResource) {
|
|
1137
|
+
const resolver = await resolveContentManager(contentResource);
|
|
1138
|
+
|
|
1139
|
+
if (resolver == null) {
|
|
1140
|
+
if (contentResource.getSourceType()) {
|
|
1141
|
+
unknownSourceTypes = true;
|
|
1142
|
+
} else {
|
|
1143
|
+
noSourceTypes = true;
|
|
1108
1144
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1145
|
+
} else {
|
|
1146
|
+
dimensions[resolver.dimension] = true;
|
|
1147
|
+
contentManagerClassNames[resolver.contentManagerClassName] = true;
|
|
1148
|
+
}
|
|
1149
|
+
return resolver;
|
|
1150
|
+
}));
|
|
1151
|
+
|
|
1152
|
+
for (const [i, resolver] of resolvers.entries()) {
|
|
1153
|
+
if (resolver != null) {
|
|
1154
|
+
// Assign the resolver to the content resource.
|
|
1155
|
+
// It might be used by those content managers that support additional settings.
|
|
1156
|
+
flatList[i]._contentManagerResolver = resolver;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
return {
|
|
1161
|
+
noSourceTypes: noSourceTypes,
|
|
1162
|
+
unknownSourceTypes: unknownSourceTypes,
|
|
1163
|
+
dimensions: Object.getOwnPropertyNames(dimensions).toSorted().map(Number),
|
|
1164
|
+
contentManagerClassNames: Object.getOwnPropertyNames(contentManagerClassNames)
|
|
1165
|
+
};
|
|
1116
1166
|
};
|
|
1117
1167
|
|
|
1118
1168
|
/**
|
|
@@ -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.136.
|
|
30
|
+
* @version 1.136.1
|
|
31
31
|
* @extends sap.ui.base.ManagedObject
|
|
32
32
|
* @alias sap.ui.vk.ContentResource
|
|
33
33
|
*/
|
|
@@ -43,25 +43,37 @@ sap.ui.define([
|
|
|
43
43
|
source: "any",
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
|
|
46
|
+
*
|
|
47
47
|
* <ul>
|
|
48
48
|
* <li>vds</li>
|
|
49
49
|
* <li>vds4</li>
|
|
50
|
+
* <li>vds4-2d</li>
|
|
50
51
|
* <li>svg</li>
|
|
51
52
|
* <li>png</li>
|
|
52
53
|
* <li>jpg</li>
|
|
53
54
|
* <li>jpeg</li>
|
|
54
55
|
* <li>gif</li>
|
|
55
56
|
* <li>bmp</li>
|
|
56
|
-
* <li>tif
|
|
57
|
-
* <li>tiff
|
|
57
|
+
* <li>tif</li>
|
|
58
|
+
* <li>tiff</li>
|
|
58
59
|
* <li>stream</li>
|
|
60
|
+
* <li>stream2d</li>
|
|
61
|
+
* <li>ecad</li>
|
|
62
|
+
* <li>pdf</li>
|
|
63
|
+
* <li>auto</li>
|
|
59
64
|
* </ul>
|
|
65
|
+
*
|
|
60
66
|
* The source type may be omitted if this is a grouping content node.
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
67
|
+
* <p>
|
|
68
|
+
* If the <code>source</code> property points to an IPD Visualization service the
|
|
69
|
+
* <code>sourceType</code> property can be assigned value <code>auto</code>. The
|
|
70
|
+
* actual <code>sourceType</code> property will be detected by making a request to
|
|
71
|
+
* the backend.
|
|
72
|
+
* <p>
|
|
73
|
+
* NOTE: The tif and tiff image formats are not supported on all browsers.
|
|
74
|
+
* Source type "vds" initializes deprecated DVL namespace and uses legacy library to load and display VDS file content.
|
|
75
|
+
* 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.
|
|
76
|
+
* Since DVL namespace is deprecated in one of future releases it will be removed and source type "vds" will also use Threejs model.
|
|
65
77
|
*/
|
|
66
78
|
sourceType: "string",
|
|
67
79
|
|
|
@@ -216,6 +228,8 @@ sap.ui.define([
|
|
|
216
228
|
|
|
217
229
|
constructor: function(sId, mSettings, oScope) {
|
|
218
230
|
ManagedObject.apply(this, arguments);
|
|
231
|
+
|
|
232
|
+
this._effectiveSourceType = undefined;
|
|
219
233
|
}
|
|
220
234
|
});
|
|
221
235
|
|
|
@@ -303,5 +317,13 @@ sap.ui.define([
|
|
|
303
317
|
return categories;
|
|
304
318
|
};
|
|
305
319
|
|
|
320
|
+
ContentResource.prototype.getEffectiveSourceType = function() {
|
|
321
|
+
return this._effectiveSourceType ?? this.getSourceType();
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
ContentResource.prototype.setEffectiveSourceType = function(effectiveSourceType) {
|
|
325
|
+
this._effectiveSourceType = effectiveSourceType;
|
|
326
|
+
};
|
|
327
|
+
|
|
306
328
|
return ContentResource;
|
|
307
329
|
});
|
|
@@ -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.136.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
|
+
});
|
package/src/sap/ui/vk/Core.js
CHANGED
|
@@ -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.136.
|
|
40
|
+
* @version 1.136.1
|
|
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.136.
|
|
120
|
+
* @version 1.136.1
|
|
121
121
|
*
|
|
122
122
|
* @public
|
|
123
123
|
* @alias sap.ui.vk.DrawerToolbar
|
|
@@ -763,68 +763,28 @@ sap.ui.define([
|
|
|
763
763
|
});
|
|
764
764
|
predefinedViews.vitId = DrawerToolbarButton.PredefinedViews;
|
|
765
765
|
|
|
766
|
-
var fullscreen = new
|
|
766
|
+
var fullscreen = new OverflowToolbarButton({
|
|
767
767
|
icon: "sap-icon://full-screen",
|
|
768
768
|
type: ButtonType.Transparent,
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
return !!(document.fullScreen || document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement);
|
|
775
|
-
};
|
|
776
|
-
if (this.getPressed()) {
|
|
777
|
-
if (!isInFullScreen(document)) {
|
|
778
|
-
if (!that._fullScreenHandler) {
|
|
779
|
-
that._fullScreenHandler = function(event) {
|
|
780
|
-
var isFullScreen = isInFullScreen(document);
|
|
781
|
-
if (!isFullScreen) {
|
|
782
|
-
document.removeEventListener("fullscreenchange", that._fullScreenHandler);
|
|
783
|
-
document.removeEventListener("mozfullscreenchange", that._fullScreenHandler);
|
|
784
|
-
document.removeEventListener("webkitfullscreenchange", that._fullScreenHandler);
|
|
785
|
-
document.removeEventListener("MSFullscreenChange", that._fullScreenHandler);
|
|
786
|
-
|
|
787
|
-
this.setPressed(false);
|
|
788
|
-
viewport.removeStyleClass("sapVizKitViewerFullScreen");
|
|
789
|
-
}
|
|
790
|
-
}.bind(this);
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
var bodyElement = document.getElementsByTagName("body")[0];
|
|
794
|
-
if (bodyElement.requestFullscreen) {
|
|
795
|
-
document.addEventListener("fullscreenchange", that._fullScreenHandler);
|
|
796
|
-
bodyElement.requestFullscreen();
|
|
797
|
-
} else if (bodyElement.webkitRequestFullScreen) {
|
|
798
|
-
document.addEventListener("webkitfullscreenchange", that._fullScreenHandler);
|
|
799
|
-
bodyElement.webkitRequestFullscreen();
|
|
800
|
-
} else if (bodyElement.mozRequestFullScreen) {
|
|
801
|
-
document.addEventListener("mozfullscreenchange", that._fullScreenHandler);
|
|
802
|
-
bodyElement.mozRequestFullScreen();
|
|
803
|
-
} else if (bodyElement.msRequestFullscreen) {
|
|
804
|
-
document.addEventListener("MSFullscreenChange", that._fullScreenHandler);
|
|
805
|
-
bodyElement.msRequestFullscreen();
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
viewport.addStyleClass("sapVizKitViewerFullScreen");
|
|
769
|
+
press: () => {
|
|
770
|
+
const viewport = this._getViewport();
|
|
771
|
+
const viewportDomRef = viewport.getDomRef();
|
|
772
|
+
if (document.fullscreenElement === viewportDomRef) {
|
|
773
|
+
document.exitFullscreen();
|
|
810
774
|
} else {
|
|
811
|
-
|
|
812
|
-
if (document.cancelFullScreen) {
|
|
813
|
-
document.cancelFullScreen();
|
|
814
|
-
} else if (document.msExitFullscreen) {
|
|
815
|
-
document.msExitFullscreen();
|
|
816
|
-
} else if (document.mozCancelFullScreen) {
|
|
817
|
-
document.mozCancelFullScreen();
|
|
818
|
-
} else if (document.webkitCancelFullScreen) {
|
|
819
|
-
document.webkitCancelFullScreen();
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
viewport.removeStyleClass("sapVizKitViewerFullScreen");
|
|
775
|
+
viewportDomRef.requestFullscreen();
|
|
824
776
|
}
|
|
825
777
|
}
|
|
826
|
-
});
|
|
778
|
+
}).addStyleClass("sapUiVkFullScreenDrawerToolbarButton");
|
|
827
779
|
fullscreen.vitId = DrawerToolbarButton.FullScreen;
|
|
780
|
+
fullscreen.getTooltip = () => {
|
|
781
|
+
const viewportDomRef = this._getViewport().getDomRef();
|
|
782
|
+
if (document.fullscreenElement === viewportDomRef) {
|
|
783
|
+
return resourceBundle.getText("EXIT_FULLSCREEN");
|
|
784
|
+
} else {
|
|
785
|
+
return resourceBundle.getText("ENTER_FULLSCREEN");
|
|
786
|
+
}
|
|
787
|
+
};
|
|
828
788
|
|
|
829
789
|
this._distanceMeasurementItem = new ToggleMenuItem({
|
|
830
790
|
icon: visIconPath + "distance-measurement",
|
|
@@ -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.136.
|
|
21
|
+
* @version 1.136.1
|
|
22
22
|
* @extends sap.ui.base.Exception
|
|
23
23
|
* @alias sap.ui.vk.DvlException
|
|
24
24
|
*/
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* (The CSS value "auto" is used internally to recalculate the size of the content
|
|
28
28
|
* dynamically and is not directly set as style property.)
|
|
29
29
|
* @extends sap.ui.core.LayoutData
|
|
30
|
-
* @version 1.136.
|
|
30
|
+
* @version 1.136.1
|
|
31
31
|
*
|
|
32
32
|
* @constructor
|
|
33
33
|
* @public
|