@itwin/core-frontend 5.0.0-dev.32 → 5.0.0-dev.34
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/lib/cjs/AccuDraw.js +1 -1
- package/lib/cjs/AccuDraw.js.map +1 -1
- package/lib/cjs/ApproximateTerrainHeights.js +1 -1
- package/lib/cjs/ApproximateTerrainHeights.js.map +1 -1
- package/lib/cjs/BackgroundMapGeometry.js +5 -5
- package/lib/cjs/BackgroundMapGeometry.js.map +1 -1
- package/lib/cjs/DrawingViewState.js +9 -9
- package/lib/cjs/DrawingViewState.js.map +1 -1
- package/lib/cjs/GraphicalEditingScope.js +4 -4
- package/lib/cjs/GraphicalEditingScope.js.map +1 -1
- package/lib/cjs/IModelApp.js +61 -63
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModelConnection.js +10 -10
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/IModelRoutingContext.js +1 -1
- package/lib/cjs/IModelRoutingContext.js.map +1 -1
- package/lib/cjs/IpcApp.js +2 -2
- package/lib/cjs/IpcApp.js.map +1 -1
- package/lib/cjs/LocalhostIpcApp.js +1 -1
- package/lib/cjs/LocalhostIpcApp.js.map +1 -1
- package/lib/cjs/NativeApp.js +15 -17
- package/lib/cjs/NativeApp.js.map +1 -1
- package/lib/cjs/NativeAppLogger.js +1 -1
- package/lib/cjs/NativeAppLogger.js.map +1 -1
- package/lib/cjs/NoRenderApp.js +1 -1
- package/lib/cjs/NoRenderApp.js.map +1 -1
- package/lib/cjs/SelectionSet.js +148 -156
- package/lib/cjs/SelectionSet.js.map +1 -1
- package/lib/cjs/Sprites.js +1 -1
- package/lib/cjs/Sprites.js.map +1 -1
- package/lib/cjs/ViewCreator2d.js +3 -3
- package/lib/cjs/ViewCreator2d.js.map +1 -1
- package/lib/cjs/ViewGlobalLocation.js +5 -5
- package/lib/cjs/ViewGlobalLocation.js.map +1 -1
- package/lib/cjs/ViewState.js +2 -2
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/ViewingSpace.js +9 -9
- package/lib/cjs/ViewingSpace.js.map +1 -1
- package/lib/cjs/Viewport.js +41 -41
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/common/internal/render/DisplayParams.js +1 -1
- package/lib/cjs/common/internal/render/DisplayParams.js.map +1 -1
- package/lib/cjs/common/internal/render/GraphicDescriptionBuilderImpl.js +1 -1
- package/lib/cjs/common/internal/render/GraphicDescriptionBuilderImpl.js.map +1 -1
- package/lib/cjs/common/internal/render/GraphicDescriptionContextImpl.js +1 -1
- package/lib/cjs/common/internal/render/GraphicDescriptionContextImpl.js.map +1 -1
- package/lib/cjs/internal/render/PrimitiveBuilder.js +1 -1
- package/lib/cjs/internal/render/PrimitiveBuilder.js.map +1 -1
- package/lib/cjs/internal/render/RenderInstancesParamsImpl.js +1 -1
- package/lib/cjs/internal/render/RenderInstancesParamsImpl.js.map +1 -1
- package/lib/cjs/render/MockRender.js +3 -3
- package/lib/cjs/render/MockRender.js.map +1 -1
- package/lib/cjs/render/webgl/BackgroundMapDrape.js +1 -1
- package/lib/cjs/render/webgl/BackgroundMapDrape.js.map +1 -1
- package/lib/cjs/render/webgl/BatchState.js +1 -1
- package/lib/cjs/render/webgl/BatchState.js.map +1 -1
- package/lib/cjs/render/webgl/ColorInfo.js +2 -2
- package/lib/cjs/render/webgl/ColorInfo.js.map +1 -1
- package/lib/cjs/render/webgl/Diagnostics.js +4 -4
- package/lib/cjs/render/webgl/Diagnostics.js.map +1 -1
- package/lib/cjs/render/webgl/DrawCommand.js +4 -4
- package/lib/cjs/render/webgl/DrawCommand.js.map +1 -1
- package/lib/cjs/render/webgl/IModelFrameLifecycle.js +4 -4
- package/lib/cjs/render/webgl/IModelFrameLifecycle.js.map +1 -1
- package/lib/cjs/render/webgl/InstancedGeometry.js +3 -3
- package/lib/cjs/render/webgl/InstancedGeometry.js.map +1 -1
- package/lib/cjs/render/webgl/Material.js +4 -4
- package/lib/cjs/render/webgl/Material.js.map +1 -1
- package/lib/cjs/render/webgl/PlanarClassifier.js +1 -1
- package/lib/cjs/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/cjs/render/webgl/PlanarTextureProjection.js +1 -1
- package/lib/cjs/render/webgl/PlanarTextureProjection.js.map +1 -1
- package/lib/cjs/render/webgl/RenderState.js +1 -1
- package/lib/cjs/render/webgl/RenderState.js.map +1 -1
- package/lib/cjs/render/webgl/Target.js +1 -1
- package/lib/cjs/render/webgl/Target.js.map +1 -1
- package/lib/cjs/render/webgl/Technique.js +39 -39
- package/lib/cjs/render/webgl/Technique.js.map +1 -1
- package/lib/cjs/render/webgl/TechniqueFlags.js +1 -1
- package/lib/cjs/render/webgl/TechniqueFlags.js.map +1 -1
- package/lib/cjs/render/webgl/Texture.js +3 -3
- package/lib/cjs/render/webgl/Texture.js.map +1 -1
- package/lib/cjs/tile/CesiumAssetProvider.js +1 -1
- package/lib/cjs/tile/CesiumAssetProvider.js.map +1 -1
- package/lib/cjs/tile/map/ArcGISTileMap.js +1 -1
- package/lib/cjs/tile/map/ArcGISTileMap.js.map +1 -1
- package/lib/cjs/tile/map/ArcGisUtilities.js +1 -1
- package/lib/cjs/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js +6 -6
- package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.js +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.js +7 -7
- package/lib/cjs/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/cjs/tile/map/MapTile.js +8 -8
- package/lib/cjs/tile/map/MapTile.js.map +1 -1
- package/lib/cjs/tile/map/MapTileAvailability.js +1 -1
- package/lib/cjs/tile/map/MapTileAvailability.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +9 -9
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapTilingScheme.js +1 -1
- package/lib/cjs/tile/map/MapTilingScheme.js.map +1 -1
- package/lib/cjs/tile/map/WmsCapabilities.js +2 -2
- package/lib/cjs/tile/map/WmsCapabilities.js.map +1 -1
- package/lib/cjs/tile/map/WmtsCapabilities.js +1 -1
- package/lib/cjs/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/cjs/tools/AccuDrawTool.js +21 -21
- package/lib/cjs/tools/AccuDrawTool.js.map +1 -1
- package/lib/cjs/tools/ClipViewTool.js +32 -32
- package/lib/cjs/tools/ClipViewTool.js.map +1 -1
- package/lib/cjs/tools/EditManipulator.js +2 -2
- package/lib/cjs/tools/EditManipulator.js.map +1 -1
- package/lib/cjs/tools/IdleTool.js +2 -2
- package/lib/cjs/tools/IdleTool.js.map +1 -1
- package/lib/cjs/tools/MeasureTool.js +34 -34
- package/lib/cjs/tools/MeasureTool.js.map +1 -1
- package/lib/cjs/tools/SelectTool.js +5 -5
- package/lib/cjs/tools/SelectTool.js.map +1 -1
- package/lib/cjs/tools/Tool.js +10 -10
- package/lib/cjs/tools/Tool.js.map +1 -1
- package/lib/cjs/tools/ToolAdmin.js +19 -19
- package/lib/cjs/tools/ToolAdmin.js.map +1 -1
- package/lib/cjs/tools/ToolAssistance.js +19 -19
- package/lib/cjs/tools/ToolAssistance.js.map +1 -1
- package/lib/cjs/tools/ToolSettings.js +63 -63
- package/lib/cjs/tools/ToolSettings.js.map +1 -1
- package/lib/cjs/tools/ViewTool.js +37 -37
- package/lib/cjs/tools/ViewTool.js.map +1 -1
- package/lib/esm/AccuDraw.js +1 -1
- package/lib/esm/AccuDraw.js.map +1 -1
- package/lib/esm/ApproximateTerrainHeights.js +1 -1
- package/lib/esm/ApproximateTerrainHeights.js.map +1 -1
- package/lib/esm/BackgroundMapGeometry.js +5 -5
- package/lib/esm/BackgroundMapGeometry.js.map +1 -1
- package/lib/esm/DrawingViewState.js +9 -9
- package/lib/esm/DrawingViewState.js.map +1 -1
- package/lib/esm/GraphicalEditingScope.js +4 -4
- package/lib/esm/GraphicalEditingScope.js.map +1 -1
- package/lib/esm/IModelApp.js +61 -63
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModelConnection.js +10 -10
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/IModelRoutingContext.js +1 -1
- package/lib/esm/IModelRoutingContext.js.map +1 -1
- package/lib/esm/IpcApp.js +2 -2
- package/lib/esm/IpcApp.js.map +1 -1
- package/lib/esm/LocalhostIpcApp.js +1 -1
- package/lib/esm/LocalhostIpcApp.js.map +1 -1
- package/lib/esm/NativeApp.js +15 -17
- package/lib/esm/NativeApp.js.map +1 -1
- package/lib/esm/NativeAppLogger.js +1 -1
- package/lib/esm/NativeAppLogger.js.map +1 -1
- package/lib/esm/NoRenderApp.js +1 -1
- package/lib/esm/NoRenderApp.js.map +1 -1
- package/lib/esm/SelectionSet.js +148 -156
- package/lib/esm/SelectionSet.js.map +1 -1
- package/lib/esm/Sprites.js +1 -1
- package/lib/esm/Sprites.js.map +1 -1
- package/lib/esm/ViewCreator2d.js +3 -3
- package/lib/esm/ViewCreator2d.js.map +1 -1
- package/lib/esm/ViewGlobalLocation.js +5 -5
- package/lib/esm/ViewGlobalLocation.js.map +1 -1
- package/lib/esm/ViewState.js +2 -2
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/ViewingSpace.js +9 -9
- package/lib/esm/ViewingSpace.js.map +1 -1
- package/lib/esm/Viewport.js +41 -41
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/common/internal/render/DisplayParams.js +1 -1
- package/lib/esm/common/internal/render/DisplayParams.js.map +1 -1
- package/lib/esm/common/internal/render/GraphicDescriptionBuilderImpl.js +1 -1
- package/lib/esm/common/internal/render/GraphicDescriptionBuilderImpl.js.map +1 -1
- package/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js +1 -1
- package/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js.map +1 -1
- package/lib/esm/internal/render/PrimitiveBuilder.js +1 -1
- package/lib/esm/internal/render/PrimitiveBuilder.js.map +1 -1
- package/lib/esm/internal/render/RenderInstancesParamsImpl.js +1 -1
- package/lib/esm/internal/render/RenderInstancesParamsImpl.js.map +1 -1
- package/lib/esm/render/MockRender.js +3 -3
- package/lib/esm/render/MockRender.js.map +1 -1
- package/lib/esm/render/webgl/BackgroundMapDrape.js +1 -1
- package/lib/esm/render/webgl/BackgroundMapDrape.js.map +1 -1
- package/lib/esm/render/webgl/BatchState.js +1 -1
- package/lib/esm/render/webgl/BatchState.js.map +1 -1
- package/lib/esm/render/webgl/ColorInfo.js +2 -2
- package/lib/esm/render/webgl/ColorInfo.js.map +1 -1
- package/lib/esm/render/webgl/Diagnostics.js +4 -4
- package/lib/esm/render/webgl/Diagnostics.js.map +1 -1
- package/lib/esm/render/webgl/DrawCommand.js +4 -4
- package/lib/esm/render/webgl/DrawCommand.js.map +1 -1
- package/lib/esm/render/webgl/IModelFrameLifecycle.js +4 -4
- package/lib/esm/render/webgl/IModelFrameLifecycle.js.map +1 -1
- package/lib/esm/render/webgl/InstancedGeometry.js +3 -3
- package/lib/esm/render/webgl/InstancedGeometry.js.map +1 -1
- package/lib/esm/render/webgl/Material.js +4 -4
- package/lib/esm/render/webgl/Material.js.map +1 -1
- package/lib/esm/render/webgl/PlanarClassifier.js +1 -1
- package/lib/esm/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/esm/render/webgl/PlanarTextureProjection.js +1 -1
- package/lib/esm/render/webgl/PlanarTextureProjection.js.map +1 -1
- package/lib/esm/render/webgl/RenderState.js +1 -1
- package/lib/esm/render/webgl/RenderState.js.map +1 -1
- package/lib/esm/render/webgl/Target.js +1 -1
- package/lib/esm/render/webgl/Target.js.map +1 -1
- package/lib/esm/render/webgl/Technique.js +39 -39
- package/lib/esm/render/webgl/Technique.js.map +1 -1
- package/lib/esm/render/webgl/TechniqueFlags.js +1 -1
- package/lib/esm/render/webgl/TechniqueFlags.js.map +1 -1
- package/lib/esm/render/webgl/Texture.js +3 -3
- package/lib/esm/render/webgl/Texture.js.map +1 -1
- package/lib/esm/tile/CesiumAssetProvider.js +1 -1
- package/lib/esm/tile/CesiumAssetProvider.js.map +1 -1
- package/lib/esm/tile/map/ArcGISTileMap.js +1 -1
- package/lib/esm/tile/map/ArcGISTileMap.js.map +1 -1
- package/lib/esm/tile/map/ArcGisUtilities.js +1 -1
- package/lib/esm/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js +6 -6
- package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.js +2 -2
- package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.js +7 -7
- package/lib/esm/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/esm/tile/map/MapTile.js +8 -8
- package/lib/esm/tile/map/MapTile.js.map +1 -1
- package/lib/esm/tile/map/MapTileAvailability.js +1 -1
- package/lib/esm/tile/map/MapTileAvailability.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.js +9 -9
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapTilingScheme.js +1 -1
- package/lib/esm/tile/map/MapTilingScheme.js.map +1 -1
- package/lib/esm/tile/map/WmsCapabilities.js +2 -2
- package/lib/esm/tile/map/WmsCapabilities.js.map +1 -1
- package/lib/esm/tile/map/WmtsCapabilities.js +1 -1
- package/lib/esm/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/esm/tools/AccuDrawTool.js +21 -21
- package/lib/esm/tools/AccuDrawTool.js.map +1 -1
- package/lib/esm/tools/ClipViewTool.js +32 -32
- package/lib/esm/tools/ClipViewTool.js.map +1 -1
- package/lib/esm/tools/EditManipulator.js +2 -2
- package/lib/esm/tools/EditManipulator.js.map +1 -1
- package/lib/esm/tools/IdleTool.js +2 -2
- package/lib/esm/tools/IdleTool.js.map +1 -1
- package/lib/esm/tools/MeasureTool.js +34 -34
- package/lib/esm/tools/MeasureTool.js.map +1 -1
- package/lib/esm/tools/SelectTool.js +5 -5
- package/lib/esm/tools/SelectTool.js.map +1 -1
- package/lib/esm/tools/Tool.js +10 -10
- package/lib/esm/tools/Tool.js.map +1 -1
- package/lib/esm/tools/ToolAdmin.js +19 -19
- package/lib/esm/tools/ToolAdmin.js.map +1 -1
- package/lib/esm/tools/ToolAssistance.js +19 -19
- package/lib/esm/tools/ToolAssistance.js.map +1 -1
- package/lib/esm/tools/ToolSettings.js +63 -63
- package/lib/esm/tools/ToolSettings.js.map +1 -1
- package/lib/esm/tools/ViewTool.js +37 -37
- package/lib/esm/tools/ViewTool.js.map +1 -1
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +18 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphicalEditingScope.js","sourceRoot":"","sources":["../../src/GraphicalEditingScope.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,EAAmC,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE/I,OAAO,EAC6C,cAAc,EAAE,oBAAoB,GACvF,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,YAAa,SAAQ,WAAkC;IAI3D,YAAmB,YAAwB,EAAE,KAAc;QACzD,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;QAC7E,IAAI,CAAC,YAAY,GAAG,YAAY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AC;oBAC9C,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvC,CAAC;gBAED,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAC3B,IAAI,QAAQ,CAAC,MAAM,KAAK,aAAa,CAAC,IAAI,EAAE,CAAC;oBAC3C,IAAI,SAAS,KAAK,UAAU;wBAC1B,UAAU,GAAG,IAAI,GAAG,EAAc,CAAC;oBACrC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;gBACnC,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,UAAU,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;QACvD,CAAC;QAED,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;;AAhJD;;GAEG;AACoB,6BAAO,GAAG,IAAI,OAAO,EAA0C,AAAxD,CAAyD","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelConnection\n */\n\nimport { assert, BeEvent, compareStrings, DbOpcode, DuplicatePolicy, GuidString, Id64Set, Id64String, SortedArray } from \"@itwin/core-bentley\";\nimport { Range3d } from \"@itwin/core-geometry\";\nimport {\n EditingScopeNotifications, ElementGeometryChange, ipcAppChannels, ModelGeometryChanges, ModelGeometryChangesProps, RemoveFunction,\n} from \"@itwin/core-common\";\nimport { BriefcaseNotificationHandler } from \"./BriefcaseTxns\";\nimport { BriefcaseConnection } from \"./BriefcaseConnection\";\nimport { IpcApp } from \"./IpcApp\";\n\nclass ModelChanges extends SortedArray<ElementGeometryChange> {\n public geometryGuid: GuidString;\n public readonly range: Range3d;\n\n public constructor(geometryGuid: GuidString, range: Range3d) {\n super((lhs, rhs) => compareStrings(lhs.id, rhs.id), DuplicatePolicy.Replace);\n this.geometryGuid = geometryGuid;\n this.range = range;\n }\n}\n\n/** Represents a period of time within an [interactive editing]($docs/learning/InteractiveEditing.md) session during which the\n * geometry of elements being displayed in one or more [[Viewport]]s is being modified. Outside of such a scope, whenever the\n * geometry within a [GeometricModel]($backend) changes new [[Tile]]s must be generated to reflect those changes in a viewport.\n * Regenerating entire tiles each time individual elements change can be time-consuming, which may introduce an unacceptable delay\n * between making a modification and seeing its result on the screen.\n *\n * Within the context of a graphical editing scope, no new tiles are generated. Instead, the geometry for any deleted or modified elements\n * is hidden in the tile graphics, and additional temporary graphics are displayed for any newly-inserted or modified elements. Only when the\n * scope exits are new tiles produced.\n *\n * The application decides when to enter and exit a graphical editing scope. A single interactive editing session may involve any number of\n * editing scopes. Typically, applications will enter a new editing scope (after first exiting a previous scope, if one exists):\n * - When switching from a non-graphical workflow to one that involves editing geometry; or\n * - When changing which geometric model is being edited; or\n * - After performing an operation that creates or modifies a \"large\" number (perhaps hundreds?) of elements.\n *\n * An application should typically exit any graphical editing scope before:\n * - Pulling changesets; or\n * - Switching from a graphical editing workflow to some non-graphical workflow.\n *\n * Graphical editing scopes are only supported for [[BriefcaseConnection]]s opened in read-write mode that contain version 1.0.11 or newer of the BisCore schema.\n * @see [[BriefcaseConnection.enterEditingScope]] to create a scope for a briefcase.\n * @see [[BriefcaseConnection.editingScope]] to obtain a briefcase's current scope.\n * @see [[exit]] to terminate a scope.\n * @public\n */\nexport class GraphicalEditingScope extends BriefcaseNotificationHandler implements EditingScopeNotifications {\n public get briefcaseChannelName() { return ipcAppChannels.editingScope; }\n\n /** Maps model Id to accumulated changes to geometric elements within the associated model. */\n private readonly _geometryChanges = new Map<Id64String, ModelChanges>();\n private _disposed = false;\n private _cleanup?: RemoveFunction;\n\n /** The connection to the iModel being edited. */\n public readonly iModel: BriefcaseConnection;\n\n /** Event raised when a new scope is created for any [[BriefcaseConnection]].\n * @see [[onExiting]] and [[onExited]] for complementary events.\n */\n public static readonly onEnter = new BeEvent<(scope: GraphicalEditingScope) => void>();\n\n /** Event raised when this scope is about to exit.\n * @see [[onEnter]] for the complementary event.\n * @see [[onExited]] for an event raised after the scope exits.\n */\n public readonly onExiting = new BeEvent<(scope: GraphicalEditingScope) => void>();\n\n /** Event raised when this scope has exited.\n * @see [[onEnter]] for the complementary event.\n * @see [[onExiting]] for an event raised just before the scope is exited.\n */\n public readonly onExited = new BeEvent<(scope: GraphicalEditingScope) => void>();\n\n /** Event raised after geometric changes are written to the iModel. */\n public readonly onGeometryChanges = new BeEvent<(changes: Iterable<ModelGeometryChanges>, scope: GraphicalEditingScope) => void>();\n\n /** Don't call this directly - use BriefcaseConnection.enterEditingScope.\n * @internal\n */\n public static async enter(imodel: BriefcaseConnection): Promise<GraphicalEditingScope> {\n if (imodel.editingScope)\n throw new Error(\"Cannot create an editing scope for an iModel that already has one\");\n\n // Register the scope synchronously, in case enter() is called again for same iModel while awaiting asynchronous initialization.\n const scope = new GraphicalEditingScope(imodel);\n try {\n const scopeStarted = await IpcApp.appFunctionIpc.toggleGraphicalEditingScope(imodel.key, true);\n assert(scopeStarted); // If it didn't, the backend threw an error.\n } catch (e) {\n scope.dispose();\n throw e;\n }\n\n this.onEnter.raiseEvent(scope);\n\n return scope;\n }\n\n /** Exits this editing scope. The associated [[BriefcaseConnection]]'s `editingScope` will be reset to `undefined`.\n * @throws Error if the scope could not be exited, e.g., if it has already been exited.\n * @see [[BriefcaseConnection.enterEditingScope]] to enter an editing scope.\n */\n public async exit(): Promise<void> {\n if (this._disposed || this.iModel.editingScope !== this)\n throw new Error(\"Cannot exit editing scope after it is disconnected from the iModel\");\n\n this._disposed = true;\n try {\n this.onExiting.raiseEvent(this);\n } finally {\n const scopeExited = await IpcApp.appFunctionIpc.toggleGraphicalEditingScope(this.iModel.key, false);\n assert(!scopeExited);\n try {\n this.onExited.raiseEvent(this);\n } finally {\n this.dispose();\n }\n }\n }\n\n /** Obtain all geometric changes to elements within the specified model accumulated within this scope. */\n public getGeometryChangesForModel(modelId: Id64String): Iterable<ElementGeometryChange> | undefined {\n return this._geometryChanges.get(modelId);\n }\n\n /** Obtain all geometric changes to models accumulated within this scope. */\n public getGeometryChanges(): Iterable<ModelGeometryChanges> {\n return { [Symbol.iterator]: () => this.geometryChangeIterator() };\n }\n\n /** @internal */\n public get isDisposed() {\n return this._disposed;\n }\n\n private * geometryChangeIterator(): Iterator<ModelGeometryChanges> {\n for (const [key, value] of this._geometryChanges) {\n yield {\n id: key,\n geometryGuid: value.geometryGuid,\n range: value.range,\n elements: value,\n };\n }\n }\n\n private constructor(iModel: BriefcaseConnection) {\n super(iModel.key);\n this.iModel = iModel;\n this._cleanup = this.registerImpl();\n }\n\n private dispose(): void {\n this._disposed = true;\n\n this.onExiting.clear();\n this.onGeometryChanges.clear();\n this.onExited.clear();\n\n this._geometryChanges.clear();\n\n if (this._cleanup) {\n this._cleanup();\n this._cleanup = undefined;\n }\n }\n\n /** @internal */\n public notifyGeometryChanged(props: ModelGeometryChangesProps[]) {\n const changes = ModelGeometryChanges.iterable(props);\n const modelIds: Id64String[] = [];\n let deletedIds: Id64Set | undefined;\n\n for (const modelChanges of changes) {\n // ###TODO do we care about the model range?\n let list = this._geometryChanges.get(modelChanges.id);\n modelIds.push(modelChanges.id);\n for (const elementChange of modelChanges.elements) {\n if (!list) {\n this._geometryChanges.set(modelChanges.id, list = new ModelChanges(modelChanges.geometryGuid, modelChanges.range));\n } else {\n list.geometryGuid = modelChanges.geometryGuid;\n modelChanges.range.clone(list.range);\n }\n\n list.insert(elementChange);\n if (DbOpcode.Delete === elementChange.type) {\n if (undefined === deletedIds)\n deletedIds = new Set<Id64String>();\n deletedIds.add(elementChange.id);\n }\n }\n }\n\n if (deletedIds) {\n this.iModel.selectionSet.remove(deletedIds);\n this.iModel.hilited.remove({ elements: deletedIds });\n }\n\n this.onGeometryChanges.raiseEvent(changes, this);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GraphicalEditingScope.js","sourceRoot":"","sources":["../../src/GraphicalEditingScope.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,EAAmC,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE/I,OAAO,EAC6C,cAAc,EAAE,oBAAoB,GACvF,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,YAAa,SAAQ,WAAkC;IAI3D,YAAmB,YAAwB,EAAE,KAAc;QACzD,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;QAC7E,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,qBAAsB,SAAQ,4BAA4B;IACrE,IAAW,oBAAoB,KAAK,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC;IAUzE;;OAEG;aACoB,YAAO,GAAG,IAAI,OAAO,EAA0C,AAAxD,CAAyD;IAiBvF;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,MAA2B;QACnD,IAAI,MAAM,CAAC,YAAY;YACrB,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;QAEvF,gIAAgI;QAChI,MAAM,KAAK,GAAG,IAAI,qBA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;YACf,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;QACvD,CAAC;QAED,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelConnection\n */\n\nimport { assert, BeEvent, compareStrings, DbOpcode, DuplicatePolicy, GuidString, Id64Set, Id64String, SortedArray } from \"@itwin/core-bentley\";\nimport { Range3d } from \"@itwin/core-geometry\";\nimport {\n EditingScopeNotifications, ElementGeometryChange, ipcAppChannels, ModelGeometryChanges, ModelGeometryChangesProps, RemoveFunction,\n} from \"@itwin/core-common\";\nimport { BriefcaseNotificationHandler } from \"./BriefcaseTxns\";\nimport { BriefcaseConnection } from \"./BriefcaseConnection\";\nimport { IpcApp } from \"./IpcApp\";\n\nclass ModelChanges extends SortedArray<ElementGeometryChange> {\n public geometryGuid: GuidString;\n public readonly range: Range3d;\n\n public constructor(geometryGuid: GuidString, range: Range3d) {\n super((lhs, rhs) => compareStrings(lhs.id, rhs.id), DuplicatePolicy.Replace);\n this.geometryGuid = geometryGuid;\n this.range = range;\n }\n}\n\n/** Represents a period of time within an [interactive editing]($docs/learning/InteractiveEditing.md) session during which the\n * geometry of elements being displayed in one or more [[Viewport]]s is being modified. Outside of such a scope, whenever the\n * geometry within a [GeometricModel]($backend) changes new [[Tile]]s must be generated to reflect those changes in a viewport.\n * Regenerating entire tiles each time individual elements change can be time-consuming, which may introduce an unacceptable delay\n * between making a modification and seeing its result on the screen.\n *\n * Within the context of a graphical editing scope, no new tiles are generated. Instead, the geometry for any deleted or modified elements\n * is hidden in the tile graphics, and additional temporary graphics are displayed for any newly-inserted or modified elements. Only when the\n * scope exits are new tiles produced.\n *\n * The application decides when to enter and exit a graphical editing scope. A single interactive editing session may involve any number of\n * editing scopes. Typically, applications will enter a new editing scope (after first exiting a previous scope, if one exists):\n * - When switching from a non-graphical workflow to one that involves editing geometry; or\n * - When changing which geometric model is being edited; or\n * - After performing an operation that creates or modifies a \"large\" number (perhaps hundreds?) of elements.\n *\n * An application should typically exit any graphical editing scope before:\n * - Pulling changesets; or\n * - Switching from a graphical editing workflow to some non-graphical workflow.\n *\n * Graphical editing scopes are only supported for [[BriefcaseConnection]]s opened in read-write mode that contain version 1.0.11 or newer of the BisCore schema.\n * @see [[BriefcaseConnection.enterEditingScope]] to create a scope for a briefcase.\n * @see [[BriefcaseConnection.editingScope]] to obtain a briefcase's current scope.\n * @see [[exit]] to terminate a scope.\n * @public\n */\nexport class GraphicalEditingScope extends BriefcaseNotificationHandler implements EditingScopeNotifications {\n public get briefcaseChannelName() { return ipcAppChannels.editingScope; }\n\n /** Maps model Id to accumulated changes to geometric elements within the associated model. */\n private readonly _geometryChanges = new Map<Id64String, ModelChanges>();\n private _disposed = false;\n private _cleanup?: RemoveFunction;\n\n /** The connection to the iModel being edited. */\n public readonly iModel: BriefcaseConnection;\n\n /** Event raised when a new scope is created for any [[BriefcaseConnection]].\n * @see [[onExiting]] and [[onExited]] for complementary events.\n */\n public static readonly onEnter = new BeEvent<(scope: GraphicalEditingScope) => void>();\n\n /** Event raised when this scope is about to exit.\n * @see [[onEnter]] for the complementary event.\n * @see [[onExited]] for an event raised after the scope exits.\n */\n public readonly onExiting = new BeEvent<(scope: GraphicalEditingScope) => void>();\n\n /** Event raised when this scope has exited.\n * @see [[onEnter]] for the complementary event.\n * @see [[onExiting]] for an event raised just before the scope is exited.\n */\n public readonly onExited = new BeEvent<(scope: GraphicalEditingScope) => void>();\n\n /** Event raised after geometric changes are written to the iModel. */\n public readonly onGeometryChanges = new BeEvent<(changes: Iterable<ModelGeometryChanges>, scope: GraphicalEditingScope) => void>();\n\n /** Don't call this directly - use BriefcaseConnection.enterEditingScope.\n * @internal\n */\n public static async enter(imodel: BriefcaseConnection): Promise<GraphicalEditingScope> {\n if (imodel.editingScope)\n throw new Error(\"Cannot create an editing scope for an iModel that already has one\");\n\n // Register the scope synchronously, in case enter() is called again for same iModel while awaiting asynchronous initialization.\n const scope = new GraphicalEditingScope(imodel);\n try {\n const scopeStarted = await IpcApp.appFunctionIpc.toggleGraphicalEditingScope(imodel.key, true);\n assert(scopeStarted); // If it didn't, the backend threw an error.\n } catch (e) {\n scope.dispose();\n throw e;\n }\n\n this.onEnter.raiseEvent(scope);\n\n return scope;\n }\n\n /** Exits this editing scope. The associated [[BriefcaseConnection]]'s `editingScope` will be reset to `undefined`.\n * @throws Error if the scope could not be exited, e.g., if it has already been exited.\n * @see [[BriefcaseConnection.enterEditingScope]] to enter an editing scope.\n */\n public async exit(): Promise<void> {\n if (this._disposed || this.iModel.editingScope !== this)\n throw new Error(\"Cannot exit editing scope after it is disconnected from the iModel\");\n\n this._disposed = true;\n try {\n this.onExiting.raiseEvent(this);\n } finally {\n const scopeExited = await IpcApp.appFunctionIpc.toggleGraphicalEditingScope(this.iModel.key, false);\n assert(!scopeExited);\n try {\n this.onExited.raiseEvent(this);\n } finally {\n this.dispose();\n }\n }\n }\n\n /** Obtain all geometric changes to elements within the specified model accumulated within this scope. */\n public getGeometryChangesForModel(modelId: Id64String): Iterable<ElementGeometryChange> | undefined {\n return this._geometryChanges.get(modelId);\n }\n\n /** Obtain all geometric changes to models accumulated within this scope. */\n public getGeometryChanges(): Iterable<ModelGeometryChanges> {\n return { [Symbol.iterator]: () => this.geometryChangeIterator() };\n }\n\n /** @internal */\n public get isDisposed() {\n return this._disposed;\n }\n\n private * geometryChangeIterator(): Iterator<ModelGeometryChanges> {\n for (const [key, value] of this._geometryChanges) {\n yield {\n id: key,\n geometryGuid: value.geometryGuid,\n range: value.range,\n elements: value,\n };\n }\n }\n\n private constructor(iModel: BriefcaseConnection) {\n super(iModel.key);\n this.iModel = iModel;\n this._cleanup = this.registerImpl();\n }\n\n private dispose(): void {\n this._disposed = true;\n\n this.onExiting.clear();\n this.onGeometryChanges.clear();\n this.onExited.clear();\n\n this._geometryChanges.clear();\n\n if (this._cleanup) {\n this._cleanup();\n this._cleanup = undefined;\n }\n }\n\n /** @internal */\n public notifyGeometryChanged(props: ModelGeometryChangesProps[]) {\n const changes = ModelGeometryChanges.iterable(props);\n const modelIds: Id64String[] = [];\n let deletedIds: Id64Set | undefined;\n\n for (const modelChanges of changes) {\n // ###TODO do we care about the model range?\n let list = this._geometryChanges.get(modelChanges.id);\n modelIds.push(modelChanges.id);\n for (const elementChange of modelChanges.elements) {\n if (!list) {\n this._geometryChanges.set(modelChanges.id, list = new ModelChanges(modelChanges.geometryGuid, modelChanges.range));\n } else {\n list.geometryGuid = modelChanges.geometryGuid;\n modelChanges.range.clone(list.range);\n }\n\n list.insert(elementChange);\n if (DbOpcode.Delete === elementChange.type) {\n if (undefined === deletedIds)\n deletedIds = new Set<Id64String>();\n deletedIds.add(elementChange.id);\n }\n }\n }\n\n if (deletedIds) {\n this.iModel.selectionSet.remove(deletedIds);\n this.iModel.hilited.remove({ elements: deletedIds });\n }\n\n this.onGeometryChanges.raiseEvent(changes, this);\n }\n}\n"]}
|
package/lib/esm/IModelApp.js
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module IModelApp
|
|
7
7
|
*/
|
|
8
|
-
var _a;
|
|
9
8
|
// @ts-expect-error package.json will resolve from the lib/{cjs,esm} dir without copying it into the build output we deliver
|
|
10
9
|
// eslint-disable-next-line @itwin/import-within-package
|
|
11
10
|
import packageJson from "../../package.json";
|
|
@@ -60,8 +59,18 @@ import "./IModeljs-css";
|
|
|
60
59
|
* @public
|
|
61
60
|
*/
|
|
62
61
|
export class IModelApp {
|
|
62
|
+
static { this._initialized = false; }
|
|
63
|
+
static { this._wantEventLoop = false; }
|
|
64
|
+
static { this._animationRequested = false; }
|
|
65
|
+
static { this._animationInterval = BeDuration.fromSeconds(1); }
|
|
63
66
|
// No instances of IModelApp may be created. All members are static and must be on the singleton object IModelApp.
|
|
64
67
|
constructor() { }
|
|
68
|
+
/** Event raised just before the frontend IModelApp is to be [[shutdown]]. */
|
|
69
|
+
static { this.onBeforeShutdown = new BeEvent(); }
|
|
70
|
+
/** Event raised after IModelApp [[startup]] completes. */
|
|
71
|
+
static { this.onAfterStartup = new BeEvent(); }
|
|
72
|
+
/** The [[ToolRegistry]] for this session. */
|
|
73
|
+
static { this.tools = new ToolRegistry(); }
|
|
65
74
|
/** The [[MapLayerFormatRegistry]] for this session. */
|
|
66
75
|
static get mapLayerFormatRegistry() { return this._mapLayerFormatRegistry; }
|
|
67
76
|
/** The [[TerrainProviderRegistry]] for this session. */
|
|
@@ -124,6 +133,14 @@ export class IModelApp {
|
|
|
124
133
|
* The path should always end with a trailing `/`.
|
|
125
134
|
*/
|
|
126
135
|
static get publicPath() { return this._publicPath; }
|
|
136
|
+
/** The [[TelemetryManager]] for this session
|
|
137
|
+
* @internal
|
|
138
|
+
*/
|
|
139
|
+
static { this.telemetry = new TelemetryManager(); }
|
|
140
|
+
/** @alpha */
|
|
141
|
+
static { this.extensionAdmin = this._createExtensionAdmin(); }
|
|
142
|
+
/** Map of classFullName to EntityState class */
|
|
143
|
+
static { this._entityClasses = new Map(); }
|
|
127
144
|
/** Register all of the subclasses of EntityState from a module.
|
|
128
145
|
* @internal
|
|
129
146
|
*/
|
|
@@ -248,7 +265,7 @@ export class IModelApp {
|
|
|
248
265
|
window.iModelAppForDebugger = undefined;
|
|
249
266
|
}
|
|
250
267
|
this._wantEventLoop = false;
|
|
251
|
-
window.removeEventListener("resize", () =>
|
|
268
|
+
window.removeEventListener("resize", () => IModelApp.requestNextAnimation());
|
|
252
269
|
this.clearIntervalAnimation();
|
|
253
270
|
[this.toolAdmin, this.viewManager, this.tileAdmin].forEach((sys) => sys.onShutDown());
|
|
254
271
|
this.tools.shutdown();
|
|
@@ -266,14 +283,14 @@ export class IModelApp {
|
|
|
266
283
|
* @param interval The interval at which to poll for changes. If undefined (or negative), the application will never poll. If zero, the application will poll as frequently as possible.
|
|
267
284
|
* @beta
|
|
268
285
|
*/
|
|
269
|
-
static get animationInterval() { return
|
|
286
|
+
static get animationInterval() { return IModelApp._animationInterval; }
|
|
270
287
|
static set animationInterval(interval) {
|
|
271
288
|
if (undefined !== interval && interval.isTowardsPast)
|
|
272
289
|
interval = undefined;
|
|
273
|
-
if (interval !==
|
|
274
|
-
|
|
275
|
-
if (
|
|
276
|
-
|
|
290
|
+
if (interval !== IModelApp._animationInterval) {
|
|
291
|
+
IModelApp._animationInterval = interval;
|
|
292
|
+
if (IModelApp._wantEventLoop)
|
|
293
|
+
IModelApp.requestIntervalAnimation();
|
|
277
294
|
}
|
|
278
295
|
}
|
|
279
296
|
/** Request that the event loop execute on the next [animation frame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).
|
|
@@ -281,35 +298,35 @@ export class IModelApp {
|
|
|
281
298
|
*/
|
|
282
299
|
static requestNextAnimation() {
|
|
283
300
|
// Only want to call requestAnimationFrame if it is defined. Need to check whether current iModelApp is a NoRenderApp.
|
|
284
|
-
if (
|
|
301
|
+
if (IModelApp._noRender)
|
|
285
302
|
return;
|
|
286
|
-
if (!
|
|
287
|
-
|
|
288
|
-
requestAnimationFrame(() =>
|
|
303
|
+
if (!IModelApp._animationRequested) {
|
|
304
|
+
IModelApp._animationRequested = true;
|
|
305
|
+
requestAnimationFrame(() => IModelApp.eventLoop());
|
|
289
306
|
}
|
|
290
307
|
}
|
|
291
308
|
/** @internal */
|
|
292
309
|
static clearIntervalAnimation() {
|
|
293
|
-
if (undefined !==
|
|
294
|
-
window.clearInterval(
|
|
295
|
-
|
|
310
|
+
if (undefined !== IModelApp._animationIntervalId) {
|
|
311
|
+
window.clearInterval(IModelApp._animationIntervalId);
|
|
312
|
+
IModelApp._animationIntervalId = undefined;
|
|
296
313
|
}
|
|
297
314
|
}
|
|
298
315
|
/** @internal */
|
|
299
316
|
static requestIntervalAnimation() {
|
|
300
|
-
|
|
301
|
-
if (undefined !==
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
},
|
|
317
|
+
IModelApp.clearIntervalAnimation();
|
|
318
|
+
if (undefined !== IModelApp.animationInterval)
|
|
319
|
+
IModelApp._animationIntervalId = window.setInterval(() => {
|
|
320
|
+
IModelApp.requestNextAnimation();
|
|
321
|
+
}, IModelApp.animationInterval.milliseconds);
|
|
305
322
|
}
|
|
306
323
|
/** @internal */
|
|
307
324
|
static startEventLoop() {
|
|
308
|
-
if (!
|
|
309
|
-
|
|
310
|
-
window.addEventListener("resize", () =>
|
|
311
|
-
|
|
312
|
-
|
|
325
|
+
if (!IModelApp._wantEventLoop) {
|
|
326
|
+
IModelApp._wantEventLoop = true;
|
|
327
|
+
window.addEventListener("resize", () => IModelApp.requestNextAnimation());
|
|
328
|
+
IModelApp.requestIntervalAnimation();
|
|
329
|
+
IModelApp.requestNextAnimation();
|
|
313
330
|
}
|
|
314
331
|
}
|
|
315
332
|
/** Strictly for tests. @internal */
|
|
@@ -318,19 +335,19 @@ export class IModelApp {
|
|
|
318
335
|
}
|
|
319
336
|
/** The main event processing loop for Tools and rendering. */
|
|
320
337
|
static eventLoop() {
|
|
321
|
-
|
|
322
|
-
if (!
|
|
338
|
+
IModelApp._animationRequested = false;
|
|
339
|
+
if (!IModelApp._wantEventLoop) // flag turned on at startup
|
|
323
340
|
return;
|
|
324
341
|
try {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
342
|
+
IModelApp.toolAdmin.processEvent(); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
343
|
+
IModelApp.viewManager.renderLoop();
|
|
344
|
+
IModelApp.tileAdmin.process();
|
|
328
345
|
}
|
|
329
346
|
catch (exception) {
|
|
330
347
|
ToolAdmin.exceptionHandler(exception); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
window.removeEventListener("resize", () =>
|
|
348
|
+
IModelApp._wantEventLoop = false;
|
|
349
|
+
IModelApp._animationRequested = true; // unrecoverable after exception, don't request any further frames.
|
|
350
|
+
window.removeEventListener("resize", () => IModelApp.requestNextAnimation());
|
|
334
351
|
}
|
|
335
352
|
}
|
|
336
353
|
/** Get the user's access token for this IModelApp, or a blank string if none is available.
|
|
@@ -360,7 +377,7 @@ export class IModelApp {
|
|
|
360
377
|
sessionId: this.sessionId,
|
|
361
378
|
authorization: ProcessDetector.isMobileAppFrontend ? "" : await this.getAccessToken(),
|
|
362
379
|
};
|
|
363
|
-
const csrf =
|
|
380
|
+
const csrf = IModelApp.securityOptions.csrfProtection;
|
|
364
381
|
if (csrf && csrf.enabled) {
|
|
365
382
|
const cookieName = csrf.cookieName || "XSRF-TOKEN";
|
|
366
383
|
const cookieValue = document.cookie.split("; ").find((r) => r.startsWith(`${cookieName}=`));
|
|
@@ -397,7 +414,7 @@ export class IModelApp {
|
|
|
397
414
|
static makeModalDiv(options) {
|
|
398
415
|
const root = options.rootDiv ? options.rootDiv : document.body;
|
|
399
416
|
// create the overlay div to "black out" the application to indicate everything is inactive until the modal has been dismissed.
|
|
400
|
-
const overlay =
|
|
417
|
+
const overlay = IModelApp.makeHTMLElement("div", { parent: root, className: "imodeljs-modal-overlay" });
|
|
401
418
|
overlay.tabIndex = -1; // so we can catch keystroke events
|
|
402
419
|
// function to remove modal dialog
|
|
403
420
|
const stop = (ev) => {
|
|
@@ -417,14 +434,14 @@ export class IModelApp {
|
|
|
417
434
|
};
|
|
418
435
|
overlay.focus();
|
|
419
436
|
}
|
|
420
|
-
const modal =
|
|
437
|
+
const modal = IModelApp.makeHTMLElement("div", { parent: overlay, className: "imodeljs-modal" });
|
|
421
438
|
if (undefined !== options.width) {
|
|
422
439
|
modal.style.width = `${options.width}px`;
|
|
423
440
|
// allow the dialog to be smaller than the width
|
|
424
441
|
modal.style.maxWidth = `min(100% - (2 * var(--width-border)), ${options.width}px)`;
|
|
425
442
|
}
|
|
426
443
|
if (options.closeBox) {
|
|
427
|
-
const close =
|
|
444
|
+
const close = IModelApp.makeHTMLElement("p", { parent: modal, className: "imodeljs-modal-close" });
|
|
428
445
|
close.innerText = "\u00d7"; // unicode "times" symbol
|
|
429
446
|
close.onclick = stop;
|
|
430
447
|
}
|
|
@@ -435,27 +452,27 @@ export class IModelApp {
|
|
|
435
452
|
* @beta
|
|
436
453
|
*/
|
|
437
454
|
static makeLogoCard(opts) {
|
|
438
|
-
const card =
|
|
439
|
-
const iconCell =
|
|
455
|
+
const card = IModelApp.makeHTMLElement("tr");
|
|
456
|
+
const iconCell = IModelApp.makeHTMLElement("td", { parent: card, className: "logo-card-logo" });
|
|
440
457
|
if (undefined !== opts.iconSrc) {
|
|
441
458
|
if (typeof opts.iconSrc === "string") {
|
|
442
|
-
const logo =
|
|
459
|
+
const logo = IModelApp.makeHTMLElement("img");
|
|
443
460
|
logo.src = opts.iconSrc;
|
|
444
461
|
logo.width = opts.iconWidth ? opts.iconWidth : 64;
|
|
445
462
|
opts.iconSrc = logo;
|
|
446
463
|
}
|
|
447
464
|
iconCell.appendChild(opts.iconSrc);
|
|
448
465
|
}
|
|
449
|
-
const noticeCell =
|
|
466
|
+
const noticeCell = IModelApp.makeHTMLElement("td", { parent: card, className: "logo-card-message" });
|
|
450
467
|
if (undefined !== opts.heading) {
|
|
451
468
|
if (typeof opts.heading === "string")
|
|
452
|
-
|
|
469
|
+
IModelApp.makeHTMLElement("h2", { parent: noticeCell, innerHTML: opts.heading, className: "logo-card-header" });
|
|
453
470
|
else
|
|
454
471
|
noticeCell.appendChild(opts.heading);
|
|
455
472
|
}
|
|
456
473
|
if (undefined !== opts.notice) {
|
|
457
474
|
if (typeof opts.notice === "string")
|
|
458
|
-
|
|
475
|
+
IModelApp.makeHTMLElement("p", { parent: noticeCell, innerHTML: opts.notice, className: "logo-cards" });
|
|
459
476
|
else
|
|
460
477
|
noticeCell.appendChild(opts.notice);
|
|
461
478
|
}
|
|
@@ -476,7 +493,7 @@ export class IModelApp {
|
|
|
476
493
|
*/
|
|
477
494
|
static formatElementToolTip(msg) {
|
|
478
495
|
let out = "";
|
|
479
|
-
msg.forEach((line) => out += `${
|
|
496
|
+
msg.forEach((line) => out += `${IModelApp.localization?.getLocalizedKeys(line)}<br>`);
|
|
480
497
|
const div = document.createElement("div");
|
|
481
498
|
div.innerHTML = out;
|
|
482
499
|
return div;
|
|
@@ -509,27 +526,8 @@ export class IModelApp {
|
|
|
509
526
|
*/
|
|
510
527
|
static _createExtensionAdmin() {
|
|
511
528
|
const extensionAdmin = new ExtensionAdmin();
|
|
512
|
-
|
|
529
|
+
IModelApp.onAfterStartup.addListener(extensionAdmin.onStartup);
|
|
513
530
|
return extensionAdmin;
|
|
514
531
|
}
|
|
515
532
|
}
|
|
516
|
-
_a = IModelApp;
|
|
517
|
-
IModelApp._initialized = false;
|
|
518
|
-
IModelApp._wantEventLoop = false;
|
|
519
|
-
IModelApp._animationRequested = false;
|
|
520
|
-
IModelApp._animationInterval = BeDuration.fromSeconds(1);
|
|
521
|
-
/** Event raised just before the frontend IModelApp is to be [[shutdown]]. */
|
|
522
|
-
IModelApp.onBeforeShutdown = new BeEvent();
|
|
523
|
-
/** Event raised after IModelApp [[startup]] completes. */
|
|
524
|
-
IModelApp.onAfterStartup = new BeEvent();
|
|
525
|
-
/** The [[ToolRegistry]] for this session. */
|
|
526
|
-
IModelApp.tools = new ToolRegistry();
|
|
527
|
-
/** The [[TelemetryManager]] for this session
|
|
528
|
-
* @internal
|
|
529
|
-
*/
|
|
530
|
-
IModelApp.telemetry = new TelemetryManager();
|
|
531
|
-
/** @alpha */
|
|
532
|
-
IModelApp.extensionAdmin = _a._createExtensionAdmin();
|
|
533
|
-
/** Map of classFullName to EntityState class */
|
|
534
|
-
IModelApp._entityClasses = new Map();
|
|
535
533
|
//# sourceMappingURL=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,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;QAC5C,EAAS,CAAC,cAAc,CAAC,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAC/D,OAAO,cAAc,CAAC;IACxB,CAAC;;;AAtkBc,sBAAY,GAAG,KAAK,AAAR,CAAS;AAiBrB,wBAAc,GAAG,KAAK,AAAR,CAAS;AACvB,6BAAmB,GAAG,KAAK,AAAR,CAAS;AAC5B,4BAAkB,GAA2B,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,AAApD,CAAqD;AAatF,6EAA6E;AACtD,0BAAgB,GAAG,IAAI,OAAO,EAAc,AAA5B,CAA6B;AAEpE,0DAA0D;AACnC,wBAAc,GAAG,IAAI,OAAO,EAAc,AAA5B,CAA6B;AAIlE,6CAA6C;AACtB,eAAK,GAAG,IAAI,YAAY,EAAE,AAArB,CAAsB;AAuElD;;GAEG;AACoB,mBAAS,GAAqB,IAAI,gBAAgB,EAAE,AAA3C,CAA4C;AAE5E,aAAa;AACU,wBAAc,GAAG,EAAI,CAAC,qBAAqB,EAAE,AAA/B,CAAgC;AAErE,gDAAgD;AACjC,wBAAc,GAAG,IAAI,GAAG,EAA8B,AAAxC,CAAyC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelApp\n */\n\n// @ts-expect-error package.json will resolve from the lib/{cjs,esm} dir without copying it into the build output we deliver\n// eslint-disable-next-line @itwin/import-within-package\nimport packageJson from \"../../package.json\";\n/** @public */\nexport const ITWINJS_CORE_VERSION = packageJson.version as string;\nconst COPYRIGHT_NOTICE = 'Copyright © 2017-2024 <a href=\"https://www.bentley.com\" target=\"_blank\" rel=\"noopener noreferrer\">Bentley Systems, Inc.</a>';\n\nimport { UiAdmin } from \"@itwin/appui-abstract\";\nimport { AccessToken, BeDuration, BeEvent, BentleyStatus, DbResult, dispose, Guid, GuidString, Logger, ProcessDetector } from \"@itwin/core-bentley\";\nimport {\n AuthorizationClient, IModelStatus, Localization, RealityDataAccess, RpcConfiguration, RpcInterfaceDefinition, RpcRequest, SerializedRpcActivity,\n} from \"@itwin/core-common\";\nimport { ITwinLocalization } from \"@itwin/core-i18n\";\nimport { TelemetryManager } from \"@itwin/core-telemetry\";\nimport { queryRenderCompatibility, WebGLRenderCompatibilityInfo } from \"@itwin/webgl-compatibility\";\nimport { AccuDraw } from \"./AccuDraw\";\nimport { AccuSnap } from \"./AccuSnap\";\nimport * as auxCoordState from \"./AuxCoordSys\";\nimport * as categorySelectorState from \"./CategorySelectorState\";\nimport { ExtensionAdmin } from \"./extension/ExtensionAdmin\";\nimport * as displayStyleState from \"./DisplayStyleState\";\nimport * as drawingViewState from \"./DrawingViewState\";\nimport { ElementLocateManager } from \"./ElementLocateManager\";\nimport { EntityState } from \"./EntityState\";\nimport { FrontendHubAccess } from \"./FrontendHubAccess\";\nimport { FrontendLoggerCategory } from \"./common/FrontendLoggerCategory\";\nimport * as modelselector from \"./ModelSelectorState\";\nimport * as modelState from \"./ModelState\";\nimport { NotificationManager } from \"./NotificationManager\";\nimport { QuantityFormatter } from \"./quantity-formatting/QuantityFormatter\";\nimport { RenderSystem } from \"./render/RenderSystem\";\nimport { System } from \"./render/webgl/System\";\nimport * as sheetState from \"./SheetViewState\";\nimport * as spatialViewState from \"./SpatialViewState\";\nimport { TentativePoint } from \"./TentativePoint\";\nimport { RealityDataSourceProviderRegistry } from \"./RealityDataSource\";\nimport { MapLayerFormatRegistry, MapLayerOptions, TerrainProviderRegistry, TileAdmin } from \"./tile/internal\";\nimport * as accudrawTool from \"./tools/AccuDrawTool\";\nimport * as clipViewTool from \"./tools/ClipViewTool\";\nimport * as idleTool from \"./tools/IdleTool\";\nimport * as measureTool from \"./tools/MeasureTool\";\nimport * as selectTool from \"./tools/SelectTool\";\nimport { ToolRegistry } from \"./tools/Tool\";\nimport { ToolAdmin } from \"./tools/ToolAdmin\";\nimport * as viewTool from \"./tools/ViewTool\";\nimport { UserPreferencesAccess } from \"./UserPreferences\";\nimport { ViewManager } from \"./ViewManager\";\nimport * as viewState from \"./ViewState\";\nimport \"./IModeljs-css\";\n\n// cSpell:ignore noopener noreferrer gprid forin nbsp csrf xsrf\n\n/** Options that can be supplied with [[IModelAppOptions]] to customize frontend security.\n * @public\n * @extensions\n */\nexport interface FrontendSecurityOptions {\n /** Configures protection from Cross Site Request Forgery attacks. */\n readonly csrfProtection?: {\n /** If enabled, IModelApp will extract the CSRF token for the current session from the document's cookies and send it with each request as a header value. */\n readonly enabled: boolean;\n /** Defaults to XSRF-TOKEN. */\n readonly cookieName?: string;\n /** Defaults to X-XSRF-TOKEN. */\n readonly headerName?: string;\n };\n}\n\n/** Options that can be supplied to [[IModelApp.startup]] to customize frontend behavior.\n * @public\n */\nexport interface IModelAppOptions {\n /** If present, supplies the [[FrontendHubAccess]] for this session. */\n hubAccess?: FrontendHubAccess;\n /** If present, supplies the Id of this application. Applications must set this to the Bentley Global Product Registry Id (GPRID) for usage logging. */\n applicationId?: string;\n /** If present, supplies the version of this application. Must be set for usage logging. */\n applicationVersion?: string;\n /** If present, supplies the [[UserPreferencesAccess]] for this session.\n * @beta\n */\n userPreferences?: UserPreferencesAccess;\n /** If present, supplies the [[ViewManager]] for this session. */\n viewManager?: ViewManager;\n /** If present, supplies Map Layer Options for this session such as Azure Access Keys\n * @beta\n */\n mapLayerOptions?: MapLayerOptions;\n /** If present, supplies the properties with which to initialize the [[TileAdmin]] for this session. */\n tileAdmin?: TileAdmin.Props;\n /** If present, supplies the [[NotificationManager]] for this session. */\n notifications?: NotificationManager;\n /** If present, supplies the [[ToolAdmin]] for this session. */\n toolAdmin?: ToolAdmin;\n /** If present, supplies the [[AccuDraw]] for this session. */\n accuDraw?: AccuDraw;\n /** If present, supplies the [[AccuSnap]] for this session. */\n accuSnap?: AccuSnap;\n /** If present, supplies the [[Localization]] for this session. Defaults to [ITwinLocalization]($i18n). */\n localization?: Localization;\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n authorizationClient?: AuthorizationClient;\n /** If present, supplies security options for the frontend. */\n security?: FrontendSecurityOptions;\n /** @internal */\n sessionId?: GuidString;\n /** @internal */\n locateManager?: ElementLocateManager;\n /** If present, supplies the [[TentativePoint]] for this session. */\n tentativePoint?: TentativePoint;\n /** @internal */\n quantityFormatter?: QuantityFormatter;\n /** If present, supplies an implementation of the render system, or options for initializing the default render system. */\n renderSys?: RenderSystem | RenderSystem.Options;\n /** If present, supplies the [[UiAdmin]] for this session. */\n uiAdmin?: UiAdmin;\n /** If present, determines whether iModelApp is a NoRenderApp\n * @internal\n */\n noRender?: boolean;\n /**\n * @deprecated in 3.7. Specify desired RPC interfaces in the platform-specific RPC manager call instead.\n * See [[MobileRpcManager.initializeClient]], [[ElectronRpcManager.initializeFrontend]], [[BentleyCloudRpcManager.initializeClient]].\n */\n rpcInterfaces?: RpcInterfaceDefinition[];\n /** @beta */\n realityDataAccess?: RealityDataAccess;\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\n * The path should always end with a trailing `/`.\n */\n publicPath?: string;\n}\n\n/** Options for [[IModelApp.makeModalDiv]]\n * @public\n */\nexport interface ModalOptions {\n /** Width for the Modal dialog box. */\n width?: number;\n /** The dialog should be dismissed if the user clicks anywhere or hits Enter or Escape on the keyboard. */\n autoClose?: boolean;\n /** Show an 'x' in the upper right corner to close the dialog */\n closeBox?: boolean;\n /** The parent for the semi transparent *darkening* div. If not present, use `document.body` */\n rootDiv?: HTMLElement;\n}\n\n/** Return type for [[IModelApp.makeModalDiv]]\n * @public\n */\nexport interface ModalReturn {\n /** The modal HTMLDivElement created. */\n modal: HTMLDivElement;\n /** A function that can be set as an event handler to stop the modal dialog. This can be used if [[ModalOptions.autoClose]] or [[IModalOptions.closeBox]]\n * were not enabled for the dialog.\n */\n stop: (_ev: Event) => void;\n}\n\n/** We hang the IModelApp object off the global `window` object in IModelApp.startup for debugging purposes.\n * It's removed in IModelApp.shutdown.\n */\ninterface IModelAppForDebugger {\n iModelAppForDebugger?: typeof IModelApp;\n}\n\n/**\n * Global singleton that connects the user interface with the iTwin.js services. There can be only one IModelApp active in a session. All\n * members of IModelApp are static, and it serves as a singleton object for gaining access to session information.\n *\n * Before any interactive operations may be performed by the `@itwin/core-frontend package`, [[IModelApp.startup]] must be called and awaited.\n * Applications may customize the frontend behavior of iTwin.js by supplying options to [[IModelApp.startup]].\n *\n * @public\n */\nexport class IModelApp {\n private static _initialized = false;\n private static _accuDraw: AccuDraw;\n private static _accuSnap: AccuSnap;\n private static _applicationId: string;\n private static _applicationVersion: string;\n private static _localization: Localization;\n private static _locateManager: ElementLocateManager;\n private static _notifications: NotificationManager;\n private static _quantityFormatter: QuantityFormatter;\n private static _renderSystem?: RenderSystem;\n private static _userPreferences?: UserPreferencesAccess;\n private static _tentativePoint: TentativePoint;\n private static _tileAdmin: TileAdmin;\n private static _toolAdmin: ToolAdmin;\n private static _viewManager: ViewManager;\n private static _uiAdmin: UiAdmin;\n private static _noRender: boolean;\n private static _wantEventLoop = false;\n private static _animationRequested = false;\n private static _animationInterval: BeDuration | undefined = BeDuration.fromSeconds(1);\n private static _animationIntervalId?: number;\n private static _securityOptions: FrontendSecurityOptions;\n private static _mapLayerFormatRegistry: MapLayerFormatRegistry;\n private static _terrainProviderRegistry: TerrainProviderRegistry;\n private static _realityDataSourceProviders: RealityDataSourceProviderRegistry;\n private static _hubAccess?: FrontendHubAccess;\n private static _realityDataAccess?: RealityDataAccess;\n private static _publicPath: string;\n\n // No instances of IModelApp may be created. All members are static and must be on the singleton object IModelApp.\n protected constructor() { }\n\n /** Event raised just before the frontend IModelApp is to be [[shutdown]]. */\n public static readonly onBeforeShutdown = new BeEvent<() => void>();\n\n /** Event raised after IModelApp [[startup]] completes. */\n public static readonly onAfterStartup = new BeEvent<() => void>();\n\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n public static authorizationClient?: AuthorizationClient;\n /** The [[ToolRegistry]] for this session. */\n public static readonly tools = new ToolRegistry();\n /** A uniqueId for this session */\n public static sessionId: GuidString;\n /** The [[MapLayerFormatRegistry]] for this session. */\n public static get mapLayerFormatRegistry(): MapLayerFormatRegistry { return this._mapLayerFormatRegistry; }\n /** The [[TerrainProviderRegistry]] for this session. */\n public static get terrainProviderRegistry(): TerrainProviderRegistry { return this._terrainProviderRegistry; }\n /** The [[RealityDataSourceProviderRegistry]] for this session.\n * @alpha\n */\n public static get realityDataSourceProviders(): RealityDataSourceProviderRegistry { return this._realityDataSourceProviders; }\n /** The [[RenderSystem]] for this session. */\n public static get renderSystem(): RenderSystem { return this._renderSystem!; }\n /** The [[ViewManager]] for this session. */\n public static get viewManager(): ViewManager { return this._viewManager; }\n /** The [[NotificationManager]] for this session. */\n public static get notifications(): NotificationManager { return this._notifications; }\n /** The [[TileAdmin]] for this session. */\n public static get tileAdmin(): TileAdmin { return this._tileAdmin; }\n /** The [[QuantityFormatter]] for this session. */\n public static get quantityFormatter(): QuantityFormatter { return this._quantityFormatter; }\n /** The [[ToolAdmin]] for this session. */\n public static get toolAdmin(): ToolAdmin { return this._toolAdmin; }\n /** The [[AccuDraw]] for this session. */\n public static get accuDraw(): AccuDraw { return this._accuDraw; }\n /** The [[AccuSnap]] for this session. */\n public static get accuSnap(): AccuSnap { return this._accuSnap; }\n public static get locateManager(): ElementLocateManager { return this._locateManager; }\n /** The [[TentativePoint]] for this session]]. */\n public static get tentativePoint(): TentativePoint { return this._tentativePoint; }\n /** The [[Localization]] for this session. */\n public static get localization(): Localization { return this._localization; }\n /** The [[UserPreferencesAccess]] for this session.\n * @beta\n */\n public static get userPreferences(): UserPreferencesAccess | undefined { return this._userPreferences; }\n /** The Id of this application. Applications must set this to the Global Product Registry ID (GPRID) for usage logging. */\n public static get applicationId(): string { return this._applicationId; }\n /** The version of this application. Must be set for usage logging. */\n public static get applicationVersion(): string { return this._applicationVersion; }\n /** True after [[startup]] has been called, until [[shutdown]] is called. */\n public static get initialized() { return this._initialized; }\n\n /** Provides access to IModelHub services. */\n public static get hubAccess(): FrontendHubAccess | undefined { return this._hubAccess; }\n\n /** Provides access to the RealityData service implementation for this IModelApp\n * @beta\n */\n public static get realityDataAccess(): RealityDataAccess | undefined { return this._realityDataAccess; }\n\n /** Whether the [renderSystem[]] has been successfully initialized.\n * This will always be `false` before calling [[startup]] and after calling [[shutdown]].\n * In rare circumstances (e.g., while executing in a headless test environment) it may remain `false` due to a failure to\n * obtain a [WebGL rendering context](https://www.google.com/search?channel=fs&client=ubuntu-sn&q=mdn+webglrenderingcontext).\n * As long as you have called [[startup]], you can generally assume it to be `true`.\n */\n public static get hasRenderSystem() {\n return this._renderSystem !== undefined && this._renderSystem.isValid;\n }\n\n /** The [[UiAdmin]] for this session. */\n public static get uiAdmin() { return this._uiAdmin; }\n /** The requested security options for the frontend. */\n public static get securityOptions() { return this._securityOptions; }\n\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\n * The path should always end with a trailing `/`.\n */\n public static get publicPath() { return this._publicPath; }\n\n /** The [[TelemetryManager]] for this session\n * @internal\n */\n public static readonly telemetry: TelemetryManager = new TelemetryManager();\n\n /** @alpha */\n public static readonly extensionAdmin = this._createExtensionAdmin();\n\n /** Map of classFullName to EntityState class */\n private static _entityClasses = new Map<string, typeof EntityState>();\n\n /** Register all of the subclasses of EntityState from a module.\n * @internal\n */\n public static registerModuleEntities(moduleObj: any) {\n for (const thisMember in moduleObj) { // eslint-disable-line guard-for-in\n const thisEntityState = moduleObj[thisMember];\n if (thisEntityState.prototype instanceof EntityState) {\n this.registerEntityState(thisEntityState.classFullName, thisEntityState);\n }\n }\n }\n\n /** Register an EntityState class by its classFullName\n * @internal\n */\n public static registerEntityState(classFullName: string, classType: typeof EntityState) {\n const lowerName = classFullName.toLowerCase();\n if (this._entityClasses.has(lowerName)) {\n const errMsg = `Class ${classFullName} is already registered. Make sure static schemaName and className members are correct on class ${classType.name}`;\n Logger.logError(FrontendLoggerCategory.IModelConnection, errMsg);\n throw new Error(errMsg);\n }\n\n this._entityClasses.set(lowerName, classType);\n }\n\n /** @internal */\n public static lookupEntityClass(classFullName: string) { return this._entityClasses.get(classFullName.toLowerCase()); }\n\n /**\n * Obtain WebGL rendering compatibility information for the client system. This information describes whether the client meets the\n * minimum rendering capabilities. It also describes whether the system lacks any optional capabilities that could improve quality\n * and/or performance.\n * @note As of 4.x, iTwin.js requires WebGL 2. If the client does not support WebGL 2, the `status` field of the returned compatibility info will be [WebGLRenderCompatibilityStatus.CannotCreateContext]($webgl-compatibility).\n */\n public static queryRenderCompatibility(): WebGLRenderCompatibilityInfo {\n return queryRenderCompatibility(true, (canvas, useWebGL2, inputContextAttributes) => System.createContext(canvas, useWebGL2, inputContextAttributes));\n }\n\n /**\n * This method must be called before any other `@itwin/core-frontend` methods are used.\n * Somewhere in your startup code, call [[IModelApp.startup]]. E.g.:\n * ``` ts\n * await IModelApp.startup( {applicationId: myAppId} );\n * ```\n * @param opts The options for configuring IModelApp\n */\n public static async startup(opts?: IModelAppOptions): Promise<void> {\n if (this._initialized)\n return; // we're already initialized, do nothing.\n this._initialized = true;\n\n opts = opts ?? {};\n this._securityOptions = opts.security ?? {};\n\n if (process.env.NODE_ENV === \"development\") {\n // Make IModelApp globally accessible for debugging purposes. We'll remove it on shutdown.\n (window as IModelAppForDebugger).iModelAppForDebugger = this;\n }\n\n this.sessionId = opts.sessionId ?? Guid.createValue();\n this._applicationId = opts.applicationId ?? \"2686\"; // Default to product id of iTwin.js\n this._applicationVersion = opts.applicationVersion ?? \"1.0.0\";\n this.authorizationClient = opts.authorizationClient;\n this._hubAccess = opts.hubAccess;\n this._noRender = opts.noRender ?? false;\n\n this._setupRpcRequestContext();\n\n this._localization = opts.localization ?? new ITwinLocalization();\n const toolsNs = \"CoreTools\";\n await this.localization.initialize([\"iModelJs\", toolsNs]);\n [\n selectTool,\n idleTool,\n viewTool,\n clipViewTool,\n measureTool,\n accudrawTool,\n ].forEach((tool) => this.tools.registerModule(tool, toolsNs));\n\n this.registerEntityState(EntityState.classFullName, EntityState);\n [\n modelState,\n sheetState,\n viewState,\n drawingViewState,\n spatialViewState,\n displayStyleState,\n modelselector,\n categorySelectorState,\n auxCoordState,\n ].forEach((module) => this.registerModuleEntities(module));\n\n this._renderSystem = (opts.renderSys instanceof RenderSystem) ? opts.renderSys : this.createRenderSys(opts.renderSys);\n if (opts.userPreferences)\n this._userPreferences = opts.userPreferences;\n this._viewManager = opts.viewManager ?? new ViewManager();\n this._tileAdmin = await TileAdmin.create(opts.tileAdmin);\n this._notifications = opts.notifications ?? new NotificationManager();\n this._toolAdmin = opts.toolAdmin ?? new ToolAdmin();\n this._accuDraw = opts.accuDraw ?? new AccuDraw();\n this._accuSnap = opts.accuSnap ?? new AccuSnap();\n this._locateManager = opts.locateManager ?? new ElementLocateManager();\n this._tentativePoint = opts.tentativePoint ?? new TentativePoint();\n this._quantityFormatter = opts.quantityFormatter ?? new QuantityFormatter();\n this._uiAdmin = opts.uiAdmin ?? new UiAdmin();\n this._mapLayerFormatRegistry = new MapLayerFormatRegistry(opts.mapLayerOptions);\n this._terrainProviderRegistry = new TerrainProviderRegistry();\n this._realityDataSourceProviders = new RealityDataSourceProviderRegistry();\n this._realityDataAccess = opts.realityDataAccess;\n this._publicPath = opts.publicPath ?? \"\";\n\n [\n this.renderSystem,\n this.viewManager,\n this.toolAdmin,\n this.accuDraw,\n this.accuSnap,\n this.locateManager,\n this.tentativePoint,\n this.uiAdmin,\n ].forEach((sys) => sys.onInitialized());\n\n await this.quantityFormatter.onInitialized();\n this.onAfterStartup.raiseEvent();\n }\n\n /** Must be called before the application exits to release any held resources. */\n public static async shutdown() {\n if (!this._initialized)\n return;\n\n // notify listeners that this IModelApp is about to be shut down.\n this.onBeforeShutdown.raiseEvent();\n this.onBeforeShutdown.clear();\n\n if (process.env.NODE_ENV === \"development\") {\n (window as IModelAppForDebugger).iModelAppForDebugger = undefined;\n }\n\n this._wantEventLoop = false;\n window.removeEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n this.clearIntervalAnimation();\n [this.toolAdmin, this.viewManager, this.tileAdmin].forEach((sys) => sys.onShutDown());\n this.tools.shutdown();\n this._renderSystem = dispose(this._renderSystem);\n this._entityClasses.clear();\n this.authorizationClient = undefined;\n this._initialized = false;\n this.onAfterStartup.clear();\n }\n\n /** Controls how frequently the application polls for changes that may require a new animation frame to be requested.\n * Such changes include resizing a Viewport or changing the device pixel ratio by zooming in or out in the browser.\n * The default interval is 1 second. It may be desirable to override the default for specific apps and/or devices.\n * - Increasing the interval can conserve battery life on battery-powered devices at the expense of slower response to resize events.\n * - An application that only displays a single Viewport whose dimensions only change when the dimensions of the application window change, and which does not support changing application zoom level, could disable the interval altogether.\n * @param interval The interval at which to poll for changes. If undefined (or negative), the application will never poll. If zero, the application will poll as frequently as possible.\n * @beta\n */\n public static get animationInterval(): BeDuration | undefined { return IModelApp._animationInterval; }\n public static set animationInterval(interval: BeDuration | undefined) {\n if (undefined !== interval && interval.isTowardsPast)\n interval = undefined;\n\n if (interval !== IModelApp._animationInterval) {\n IModelApp._animationInterval = interval;\n if (IModelApp._wantEventLoop)\n IModelApp.requestIntervalAnimation();\n }\n }\n\n /** Request that the event loop execute on the next [animation frame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).\n * There is generally no reason for applications to invoke this method directly.\n */\n public static requestNextAnimation() {\n // Only want to call requestAnimationFrame if it is defined. Need to check whether current iModelApp is a NoRenderApp.\n if (IModelApp._noRender)\n return;\n\n if (!IModelApp._animationRequested) {\n IModelApp._animationRequested = true;\n requestAnimationFrame(() => IModelApp.eventLoop());\n }\n }\n\n /** @internal */\n private static clearIntervalAnimation(): void {\n if (undefined !== IModelApp._animationIntervalId) {\n window.clearInterval(IModelApp._animationIntervalId);\n IModelApp._animationIntervalId = undefined;\n }\n }\n\n /** @internal */\n private static requestIntervalAnimation(): void {\n IModelApp.clearIntervalAnimation();\n\n if (undefined !== IModelApp.animationInterval)\n IModelApp._animationIntervalId = window.setInterval(() => {\n IModelApp.requestNextAnimation();\n }, IModelApp.animationInterval.milliseconds);\n }\n\n /** @internal */\n public static startEventLoop() {\n if (!IModelApp._wantEventLoop) {\n IModelApp._wantEventLoop = true;\n window.addEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n IModelApp.requestIntervalAnimation();\n IModelApp.requestNextAnimation();\n }\n }\n\n /** Strictly for tests. @internal */\n public static stopEventLoop() {\n this._wantEventLoop = false;\n }\n\n /** The main event processing loop for Tools and rendering. */\n private static eventLoop() {\n IModelApp._animationRequested = false;\n if (!IModelApp._wantEventLoop) // flag turned on at startup\n return;\n\n try {\n IModelApp.toolAdmin.processEvent(); // eslint-disable-line @typescript-eslint/no-floating-promises\n IModelApp.viewManager.renderLoop();\n IModelApp.tileAdmin.process();\n } catch (exception) {\n ToolAdmin.exceptionHandler(exception); // eslint-disable-line @typescript-eslint/no-floating-promises\n\n IModelApp._wantEventLoop = false;\n IModelApp._animationRequested = true; // unrecoverable after exception, don't request any further frames.\n window.removeEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n }\n }\n\n /** Get the user's access token for this IModelApp, or a blank string if none is available.\n * @note Access tokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value\n * returned by this method may change over time throughout the course of a session.\n */\n public static async getAccessToken(): Promise<AccessToken> {\n try {\n return (await this.authorizationClient?.getAccessToken()) ?? \"\";\n } catch {\n return \"\";\n }\n }\n\n /** @internal */\n public static createRenderSys(opts?: RenderSystem.Options): RenderSystem { return System.create(opts); }\n\n private static _setupRpcRequestContext() {\n RpcConfiguration.requestContext.getId = (_request: RpcRequest): string => {\n return Guid.createValue();\n };\n\n RpcConfiguration.requestContext.serialize = async (_request: RpcRequest): Promise<SerializedRpcActivity> => {\n const id = _request.id;\n const serialized: SerializedRpcActivity = {\n id,\n applicationId: this.applicationId,\n applicationVersion: this.applicationVersion,\n sessionId: this.sessionId,\n authorization: ProcessDetector.isMobileAppFrontend ? \"\" : await this.getAccessToken(),\n };\n\n const csrf = IModelApp.securityOptions.csrfProtection;\n if (csrf && csrf.enabled) {\n const cookieName = csrf.cookieName || \"XSRF-TOKEN\";\n const cookieValue = document.cookie.split(\"; \").find((r) => r.startsWith(`${cookieName}=`));\n\n if (cookieValue) {\n const headerName = csrf.headerName || \"X-XSRF-TOKEN\";\n const headerValue = cookieValue.split(\"=\")[1];\n serialized.csrfToken = { headerName, headerValue };\n }\n }\n\n return serialized;\n };\n }\n\n /** Shortcut for creating an HTMLElement with optional parent, className, id, innerHTML, innerText. */\n public static makeHTMLElement<K extends keyof HTMLElementTagNameMap>(type: K, opt?: {\n /** The parent for the new HTMLElement */\n parent?: HTMLElement;\n /** The className for the new HTMLElement */\n className?: string;\n /** The Id for the new HTMLElement */\n id?: string;\n /** innerHTML for the new HTMLElement */\n innerHTML?: string;\n /** innerText for the new HTMLElement */\n innerText?: string;\n }) {\n const el = document.createElement(type);\n if (undefined !== opt) {\n if (undefined !== opt.className)\n el.className = opt.className;\n if (undefined !== opt.id)\n el.id = opt.id;\n if (undefined !== opt.innerHTML)\n el.innerHTML = opt.innerHTML;\n if (undefined !== opt.innerText)\n el.innerText = opt.innerText;\n if (undefined !== opt.parent)\n opt.parent.appendChild(el);\n }\n return el;\n }\n\n /** Shortcut for making a modal dialog on top of the root of the application. The returned HTMLDivElement will be placed topmost, all other application\n * windows will be covered with a semi-transparent background that intercepts all key/mouse/touch events until the modal is dismissed.\n * @param options The options that describe how the modal should work.\n */\n public static makeModalDiv(options: ModalOptions): ModalReturn {\n const root = options.rootDiv ? options.rootDiv : document.body;\n // create the overlay div to \"black out\" the application to indicate everything is inactive until the modal has been dismissed.\n const overlay = IModelApp.makeHTMLElement(\"div\", { parent: root, className: \"imodeljs-modal-overlay\" });\n overlay.tabIndex = -1; // so we can catch keystroke events\n\n // function to remove modal dialog\n const stop = (ev: Event) => {\n root.removeChild(overlay);\n ev.stopPropagation();\n };\n\n if (options.autoClose) {\n overlay.onclick = overlay.oncontextmenu = stop;\n overlay.onkeydown = overlay.onkeyup = (ev: KeyboardEvent) => { // ignore all keystrokes other than enter and escape\n switch (ev.key) {\n case \"Enter\":\n case \"Escape\":\n stop(ev);\n return;\n }\n ev.stopPropagation();\n };\n overlay.focus();\n }\n\n const modal = IModelApp.makeHTMLElement(\"div\", { parent: overlay, className: \"imodeljs-modal\" });\n if (undefined !== options.width) {\n modal.style.width = `${options.width}px`;\n // allow the dialog to be smaller than the width\n modal.style.maxWidth = `min(100% - (2 * var(--width-border)), ${options.width}px)`;\n }\n if (options.closeBox) {\n const close = IModelApp.makeHTMLElement(\"p\", { parent: modal, className: \"imodeljs-modal-close\" });\n close.innerText = \"\\u00d7\"; // unicode \"times\" symbol\n close.onclick = stop;\n }\n\n return { modal, stop };\n }\n\n /** Applications may implement this method to supply a Logo Card.\n * @beta\n */\n public static applicationLogoCard?: () => HTMLTableRowElement;\n\n /** Make a new Logo Card. Call this method from your implementation of [[IModelApp.applicationLogoCard]]\n * @param opts Options for Logo Card\n * @beta\n */\n public static makeLogoCard(\n opts: {\n /** The heading to be put at the top of this logo card inside an <h2>. May include HTML. */\n heading: string | HTMLElement;\n /** The URL or HTMLImageElement for the icon on this logo card. */\n iconSrc?: string | HTMLImageElement;\n /** The width of the icon, if `iconSrc` is a string. Default is 64. */\n iconWidth?: number;\n /** A *notice* string to be shown on the logo card. May include HTML. */\n notice?: string | HTMLElement;\n }): HTMLTableRowElement {\n const card = IModelApp.makeHTMLElement(\"tr\");\n const iconCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-logo\" });\n if (undefined !== opts.iconSrc) {\n if (typeof opts.iconSrc === \"string\") {\n const logo = IModelApp.makeHTMLElement(\"img\");\n logo.src = opts.iconSrc;\n logo.width = opts.iconWidth ? opts.iconWidth : 64;\n opts.iconSrc = logo;\n }\n iconCell.appendChild(opts.iconSrc);\n }\n const noticeCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-message\" });\n if (undefined !== opts.heading) {\n if (typeof opts.heading === \"string\")\n IModelApp.makeHTMLElement(\"h2\", { parent: noticeCell, innerHTML: opts.heading, className: \"logo-card-header\" });\n else\n noticeCell.appendChild(opts.heading);\n }\n if (undefined !== opts.notice) {\n if (typeof opts.notice === \"string\")\n IModelApp.makeHTMLElement(\"p\", { parent: noticeCell, innerHTML: opts.notice, className: \"logo-cards\" });\n else\n noticeCell.appendChild(opts.notice);\n }\n return card;\n }\n\n /** Make the logo card for the library itself. This card gets placed at the top of the stack.\n * @internal\n */\n public static makeIModelJsLogoCard() {\n return this.makeLogoCard({\n iconSrc: `${this.publicPath}images/about-imodeljs.svg`,\n heading: `<span style=\"font-weight:normal\">${this.localization.getLocalizedString(\"iModelJs:Notices.PoweredBy\")}</span> iTwin.js`,\n notice: `${ITWINJS_CORE_VERSION}<br>${COPYRIGHT_NOTICE}`,\n });\n }\n\n /** Format the tooltip strings returned by [[IModelConnection.getToolTipMessage]].\n * @alpha\n */\n public static formatElementToolTip(msg: string[]): HTMLElement {\n let out = \"\";\n msg.forEach((line) => out += `${IModelApp.localization?.getLocalizedKeys(line)}<br>`);\n const div = document.createElement(\"div\");\n div.innerHTML = out;\n return div;\n }\n\n /** Localize an error status\n * @param status one of the status values from [BentleyStatus]($core-bentley), [IModelStatus]($core-bentley) or [DbResult]($core-bentley)\n * @returns a localized error message\n * @beta\n */\n public static translateStatus(status: number) {\n let key: { scope: string, val: string, status?: string };\n if (typeof status !== \"number\") {\n key = { scope: \"Errors\", val: \"IllegalValue\" };\n } else {\n key = { scope: \"BentleyStatus\", val: BentleyStatus[status] };\n if (!key.val)\n key = { scope: \"IModelStatus\", val: IModelStatus[status] };\n if (!key.val)\n key = { scope: \"DbResult\", val: DbResult[status] };\n if (!key.val)\n key = { scope: \"Errors\", val: \"Status\", status: status.toString() };\n }\n\n return this.localization.getLocalizedString(`iModelJs:${key.scope}.${key.val}`, key);\n }\n\n /**\n * Creates an instance of the ExtensionAdmin\n * and registers an event to execute after startup is complete\n * @returns an instance of ExtensionAdmin\n */\n private static _createExtensionAdmin(): ExtensionAdmin {\n const extensionAdmin = new ExtensionAdmin();\n IModelApp.onAfterStartup.addListener(extensionAdmin.onStartup);\n return extensionAdmin;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IModelApp.js","sourceRoot":"","sources":["../../src/IModelApp.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4HAA4H;AAC5H,wDAAwD;AACxD,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,cAAc;AACd,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC,OAAiB,CAAC;AAClE,MAAM,gBAAgB,GAAG,6HAA6H,CAAC;AAEvJ,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAe,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAc,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACpJ,OAAO,EACgB,YAAY,EAAmC,gBAAgB,GACrF,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAgC,MAAM,4BAA4B,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,qBAAqB,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAA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,IAAI,CAAC,GAAG,CAAC,GAAG;gBACV,GAAG,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,GAAG,CAAC,GAAG;gBACV,GAAG,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACrD,IAAI,CAAC,GAAG,CAAC,GAAG;gBACV,GAAG,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;QACxE,CAAC;QAED,OAAO,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,YAAY,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC,CAAC;IACvF,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,qBAAqB;QAClC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;QAC5C,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAC/D,OAAO,cAAc,CAAC;IACxB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelApp\n */\n\n// @ts-expect-error package.json will resolve from the lib/{cjs,esm} dir without copying it into the build output we deliver\n// eslint-disable-next-line @itwin/import-within-package\nimport packageJson from \"../../package.json\";\n/** @public */\nexport const ITWINJS_CORE_VERSION = packageJson.version as string;\nconst COPYRIGHT_NOTICE = 'Copyright © 2017-2024 <a href=\"https://www.bentley.com\" target=\"_blank\" rel=\"noopener noreferrer\">Bentley Systems, Inc.</a>';\n\nimport { UiAdmin } from \"@itwin/appui-abstract\";\nimport { AccessToken, BeDuration, BeEvent, BentleyStatus, DbResult, dispose, Guid, GuidString, Logger, ProcessDetector } from \"@itwin/core-bentley\";\nimport {\n AuthorizationClient, IModelStatus, Localization, RealityDataAccess, RpcConfiguration, RpcInterfaceDefinition, RpcRequest, SerializedRpcActivity,\n} from \"@itwin/core-common\";\nimport { ITwinLocalization } from \"@itwin/core-i18n\";\nimport { TelemetryManager } from \"@itwin/core-telemetry\";\nimport { queryRenderCompatibility, WebGLRenderCompatibilityInfo } from \"@itwin/webgl-compatibility\";\nimport { AccuDraw } from \"./AccuDraw\";\nimport { AccuSnap } from \"./AccuSnap\";\nimport * as auxCoordState from \"./AuxCoordSys\";\nimport * as categorySelectorState from \"./CategorySelectorState\";\nimport { ExtensionAdmin } from \"./extension/ExtensionAdmin\";\nimport * as displayStyleState from \"./DisplayStyleState\";\nimport * as drawingViewState from \"./DrawingViewState\";\nimport { ElementLocateManager } from \"./ElementLocateManager\";\nimport { EntityState } from \"./EntityState\";\nimport { FrontendHubAccess } from \"./FrontendHubAccess\";\nimport { FrontendLoggerCategory } from \"./common/FrontendLoggerCategory\";\nimport * as modelselector from \"./ModelSelectorState\";\nimport * as modelState from \"./ModelState\";\nimport { NotificationManager } from \"./NotificationManager\";\nimport { QuantityFormatter } from \"./quantity-formatting/QuantityFormatter\";\nimport { RenderSystem } from \"./render/RenderSystem\";\nimport { System } from \"./render/webgl/System\";\nimport * as sheetState from \"./SheetViewState\";\nimport * as spatialViewState from \"./SpatialViewState\";\nimport { TentativePoint } from \"./TentativePoint\";\nimport { RealityDataSourceProviderRegistry } from \"./RealityDataSource\";\nimport { MapLayerFormatRegistry, MapLayerOptions, TerrainProviderRegistry, TileAdmin } from \"./tile/internal\";\nimport * as accudrawTool from \"./tools/AccuDrawTool\";\nimport * as clipViewTool from \"./tools/ClipViewTool\";\nimport * as idleTool from \"./tools/IdleTool\";\nimport * as measureTool from \"./tools/MeasureTool\";\nimport * as selectTool from \"./tools/SelectTool\";\nimport { ToolRegistry } from \"./tools/Tool\";\nimport { ToolAdmin } from \"./tools/ToolAdmin\";\nimport * as viewTool from \"./tools/ViewTool\";\nimport { UserPreferencesAccess } from \"./UserPreferences\";\nimport { ViewManager } from \"./ViewManager\";\nimport * as viewState from \"./ViewState\";\nimport \"./IModeljs-css\";\n\n// cSpell:ignore noopener noreferrer gprid forin nbsp csrf xsrf\n\n/** Options that can be supplied with [[IModelAppOptions]] to customize frontend security.\n * @public\n * @extensions\n */\nexport interface FrontendSecurityOptions {\n /** Configures protection from Cross Site Request Forgery attacks. */\n readonly csrfProtection?: {\n /** If enabled, IModelApp will extract the CSRF token for the current session from the document's cookies and send it with each request as a header value. */\n readonly enabled: boolean;\n /** Defaults to XSRF-TOKEN. */\n readonly cookieName?: string;\n /** Defaults to X-XSRF-TOKEN. */\n readonly headerName?: string;\n };\n}\n\n/** Options that can be supplied to [[IModelApp.startup]] to customize frontend behavior.\n * @public\n */\nexport interface IModelAppOptions {\n /** If present, supplies the [[FrontendHubAccess]] for this session. */\n hubAccess?: FrontendHubAccess;\n /** If present, supplies the Id of this application. Applications must set this to the Bentley Global Product Registry Id (GPRID) for usage logging. */\n applicationId?: string;\n /** If present, supplies the version of this application. Must be set for usage logging. */\n applicationVersion?: string;\n /** If present, supplies the [[UserPreferencesAccess]] for this session.\n * @beta\n */\n userPreferences?: UserPreferencesAccess;\n /** If present, supplies the [[ViewManager]] for this session. */\n viewManager?: ViewManager;\n /** If present, supplies Map Layer Options for this session such as Azure Access Keys\n * @beta\n */\n mapLayerOptions?: MapLayerOptions;\n /** If present, supplies the properties with which to initialize the [[TileAdmin]] for this session. */\n tileAdmin?: TileAdmin.Props;\n /** If present, supplies the [[NotificationManager]] for this session. */\n notifications?: NotificationManager;\n /** If present, supplies the [[ToolAdmin]] for this session. */\n toolAdmin?: ToolAdmin;\n /** If present, supplies the [[AccuDraw]] for this session. */\n accuDraw?: AccuDraw;\n /** If present, supplies the [[AccuSnap]] for this session. */\n accuSnap?: AccuSnap;\n /** If present, supplies the [[Localization]] for this session. Defaults to [ITwinLocalization]($i18n). */\n localization?: Localization;\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n authorizationClient?: AuthorizationClient;\n /** If present, supplies security options for the frontend. */\n security?: FrontendSecurityOptions;\n /** @internal */\n sessionId?: GuidString;\n /** @internal */\n locateManager?: ElementLocateManager;\n /** If present, supplies the [[TentativePoint]] for this session. */\n tentativePoint?: TentativePoint;\n /** @internal */\n quantityFormatter?: QuantityFormatter;\n /** If present, supplies an implementation of the render system, or options for initializing the default render system. */\n renderSys?: RenderSystem | RenderSystem.Options;\n /** If present, supplies the [[UiAdmin]] for this session. */\n uiAdmin?: UiAdmin;\n /** If present, determines whether iModelApp is a NoRenderApp\n * @internal\n */\n noRender?: boolean;\n /**\n * @deprecated in 3.7. Specify desired RPC interfaces in the platform-specific RPC manager call instead.\n * See [[MobileRpcManager.initializeClient]], [[ElectronRpcManager.initializeFrontend]], [[BentleyCloudRpcManager.initializeClient]].\n */\n rpcInterfaces?: RpcInterfaceDefinition[];\n /** @beta */\n realityDataAccess?: RealityDataAccess;\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\n * The path should always end with a trailing `/`.\n */\n publicPath?: string;\n}\n\n/** Options for [[IModelApp.makeModalDiv]]\n * @public\n */\nexport interface ModalOptions {\n /** Width for the Modal dialog box. */\n width?: number;\n /** The dialog should be dismissed if the user clicks anywhere or hits Enter or Escape on the keyboard. */\n autoClose?: boolean;\n /** Show an 'x' in the upper right corner to close the dialog */\n closeBox?: boolean;\n /** The parent for the semi transparent *darkening* div. If not present, use `document.body` */\n rootDiv?: HTMLElement;\n}\n\n/** Return type for [[IModelApp.makeModalDiv]]\n * @public\n */\nexport interface ModalReturn {\n /** The modal HTMLDivElement created. */\n modal: HTMLDivElement;\n /** A function that can be set as an event handler to stop the modal dialog. This can be used if [[ModalOptions.autoClose]] or [[IModalOptions.closeBox]]\n * were not enabled for the dialog.\n */\n stop: (_ev: Event) => void;\n}\n\n/** We hang the IModelApp object off the global `window` object in IModelApp.startup for debugging purposes.\n * It's removed in IModelApp.shutdown.\n */\ninterface IModelAppForDebugger {\n iModelAppForDebugger?: typeof IModelApp;\n}\n\n/**\n * Global singleton that connects the user interface with the iTwin.js services. There can be only one IModelApp active in a session. All\n * members of IModelApp are static, and it serves as a singleton object for gaining access to session information.\n *\n * Before any interactive operations may be performed by the `@itwin/core-frontend package`, [[IModelApp.startup]] must be called and awaited.\n * Applications may customize the frontend behavior of iTwin.js by supplying options to [[IModelApp.startup]].\n *\n * @public\n */\nexport class IModelApp {\n private static _initialized = false;\n private static _accuDraw: AccuDraw;\n private static _accuSnap: AccuSnap;\n private static _applicationId: string;\n private static _applicationVersion: string;\n private static _localization: Localization;\n private static _locateManager: ElementLocateManager;\n private static _notifications: NotificationManager;\n private static _quantityFormatter: QuantityFormatter;\n private static _renderSystem?: RenderSystem;\n private static _userPreferences?: UserPreferencesAccess;\n private static _tentativePoint: TentativePoint;\n private static _tileAdmin: TileAdmin;\n private static _toolAdmin: ToolAdmin;\n private static _viewManager: ViewManager;\n private static _uiAdmin: UiAdmin;\n private static _noRender: boolean;\n private static _wantEventLoop = false;\n private static _animationRequested = false;\n private static _animationInterval: BeDuration | undefined = BeDuration.fromSeconds(1);\n private static _animationIntervalId?: number;\n private static _securityOptions: FrontendSecurityOptions;\n private static _mapLayerFormatRegistry: MapLayerFormatRegistry;\n private static _terrainProviderRegistry: TerrainProviderRegistry;\n private static _realityDataSourceProviders: RealityDataSourceProviderRegistry;\n private static _hubAccess?: FrontendHubAccess;\n private static _realityDataAccess?: RealityDataAccess;\n private static _publicPath: string;\n\n // No instances of IModelApp may be created. All members are static and must be on the singleton object IModelApp.\n protected constructor() { }\n\n /** Event raised just before the frontend IModelApp is to be [[shutdown]]. */\n public static readonly onBeforeShutdown = new BeEvent<() => void>();\n\n /** Event raised after IModelApp [[startup]] completes. */\n public static readonly onAfterStartup = new BeEvent<() => void>();\n\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n public static authorizationClient?: AuthorizationClient;\n /** The [[ToolRegistry]] for this session. */\n public static readonly tools = new ToolRegistry();\n /** A uniqueId for this session */\n public static sessionId: GuidString;\n /** The [[MapLayerFormatRegistry]] for this session. */\n public static get mapLayerFormatRegistry(): MapLayerFormatRegistry { return this._mapLayerFormatRegistry; }\n /** The [[TerrainProviderRegistry]] for this session. */\n public static get terrainProviderRegistry(): TerrainProviderRegistry { return this._terrainProviderRegistry; }\n /** The [[RealityDataSourceProviderRegistry]] for this session.\n * @alpha\n */\n public static get realityDataSourceProviders(): RealityDataSourceProviderRegistry { return this._realityDataSourceProviders; }\n /** The [[RenderSystem]] for this session. */\n public static get renderSystem(): RenderSystem { return this._renderSystem!; }\n /** The [[ViewManager]] for this session. */\n public static get viewManager(): ViewManager { return this._viewManager; }\n /** The [[NotificationManager]] for this session. */\n public static get notifications(): NotificationManager { return this._notifications; }\n /** The [[TileAdmin]] for this session. */\n public static get tileAdmin(): TileAdmin { return this._tileAdmin; }\n /** The [[QuantityFormatter]] for this session. */\n public static get quantityFormatter(): QuantityFormatter { return this._quantityFormatter; }\n /** The [[ToolAdmin]] for this session. */\n public static get toolAdmin(): ToolAdmin { return this._toolAdmin; }\n /** The [[AccuDraw]] for this session. */\n public static get accuDraw(): AccuDraw { return this._accuDraw; }\n /** The [[AccuSnap]] for this session. */\n public static get accuSnap(): AccuSnap { return this._accuSnap; }\n public static get locateManager(): ElementLocateManager { return this._locateManager; }\n /** The [[TentativePoint]] for this session]]. */\n public static get tentativePoint(): TentativePoint { return this._tentativePoint; }\n /** The [[Localization]] for this session. */\n public static get localization(): Localization { return this._localization; }\n /** The [[UserPreferencesAccess]] for this session.\n * @beta\n */\n public static get userPreferences(): UserPreferencesAccess | undefined { return this._userPreferences; }\n /** The Id of this application. Applications must set this to the Global Product Registry ID (GPRID) for usage logging. */\n public static get applicationId(): string { return this._applicationId; }\n /** The version of this application. Must be set for usage logging. */\n public static get applicationVersion(): string { return this._applicationVersion; }\n /** True after [[startup]] has been called, until [[shutdown]] is called. */\n public static get initialized() { return this._initialized; }\n\n /** Provides access to IModelHub services. */\n public static get hubAccess(): FrontendHubAccess | undefined { return this._hubAccess; }\n\n /** Provides access to the RealityData service implementation for this IModelApp\n * @beta\n */\n public static get realityDataAccess(): RealityDataAccess | undefined { return this._realityDataAccess; }\n\n /** Whether the [renderSystem[]] has been successfully initialized.\n * This will always be `false` before calling [[startup]] and after calling [[shutdown]].\n * In rare circumstances (e.g., while executing in a headless test environment) it may remain `false` due to a failure to\n * obtain a [WebGL rendering context](https://www.google.com/search?channel=fs&client=ubuntu-sn&q=mdn+webglrenderingcontext).\n * As long as you have called [[startup]], you can generally assume it to be `true`.\n */\n public static get hasRenderSystem() {\n return this._renderSystem !== undefined && this._renderSystem.isValid;\n }\n\n /** The [[UiAdmin]] for this session. */\n public static get uiAdmin() { return this._uiAdmin; }\n /** The requested security options for the frontend. */\n public static get securityOptions() { return this._securityOptions; }\n\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\n * The path should always end with a trailing `/`.\n */\n public static get publicPath() { return this._publicPath; }\n\n /** The [[TelemetryManager]] for this session\n * @internal\n */\n public static readonly telemetry: TelemetryManager = new TelemetryManager();\n\n /** @alpha */\n public static readonly extensionAdmin = this._createExtensionAdmin();\n\n /** Map of classFullName to EntityState class */\n private static _entityClasses = new Map<string, typeof EntityState>();\n\n /** Register all of the subclasses of EntityState from a module.\n * @internal\n */\n public static registerModuleEntities(moduleObj: any) {\n for (const thisMember in moduleObj) { // eslint-disable-line guard-for-in\n const thisEntityState = moduleObj[thisMember];\n if (thisEntityState.prototype instanceof EntityState) {\n this.registerEntityState(thisEntityState.classFullName, thisEntityState);\n }\n }\n }\n\n /** Register an EntityState class by its classFullName\n * @internal\n */\n public static registerEntityState(classFullName: string, classType: typeof EntityState) {\n const lowerName = classFullName.toLowerCase();\n if (this._entityClasses.has(lowerName)) {\n const errMsg = `Class ${classFullName} is already registered. Make sure static schemaName and className members are correct on class ${classType.name}`;\n Logger.logError(FrontendLoggerCategory.IModelConnection, errMsg);\n throw new Error(errMsg);\n }\n\n this._entityClasses.set(lowerName, classType);\n }\n\n /** @internal */\n public static lookupEntityClass(classFullName: string) { return this._entityClasses.get(classFullName.toLowerCase()); }\n\n /**\n * Obtain WebGL rendering compatibility information for the client system. This information describes whether the client meets the\n * minimum rendering capabilities. It also describes whether the system lacks any optional capabilities that could improve quality\n * and/or performance.\n * @note As of 4.x, iTwin.js requires WebGL 2. If the client does not support WebGL 2, the `status` field of the returned compatibility info will be [WebGLRenderCompatibilityStatus.CannotCreateContext]($webgl-compatibility).\n */\n public static queryRenderCompatibility(): WebGLRenderCompatibilityInfo {\n return queryRenderCompatibility(true, (canvas, useWebGL2, inputContextAttributes) => System.createContext(canvas, useWebGL2, inputContextAttributes));\n }\n\n /**\n * This method must be called before any other `@itwin/core-frontend` methods are used.\n * Somewhere in your startup code, call [[IModelApp.startup]]. E.g.:\n * ``` ts\n * await IModelApp.startup( {applicationId: myAppId} );\n * ```\n * @param opts The options for configuring IModelApp\n */\n public static async startup(opts?: IModelAppOptions): Promise<void> {\n if (this._initialized)\n return; // we're already initialized, do nothing.\n this._initialized = true;\n\n opts = opts ?? {};\n this._securityOptions = opts.security ?? {};\n\n if (process.env.NODE_ENV === \"development\") {\n // Make IModelApp globally accessible for debugging purposes. We'll remove it on shutdown.\n (window as IModelAppForDebugger).iModelAppForDebugger = this;\n }\n\n this.sessionId = opts.sessionId ?? Guid.createValue();\n this._applicationId = opts.applicationId ?? \"2686\"; // Default to product id of iTwin.js\n this._applicationVersion = opts.applicationVersion ?? \"1.0.0\";\n this.authorizationClient = opts.authorizationClient;\n this._hubAccess = opts.hubAccess;\n this._noRender = opts.noRender ?? false;\n\n this._setupRpcRequestContext();\n\n this._localization = opts.localization ?? new ITwinLocalization();\n const toolsNs = \"CoreTools\";\n await this.localization.initialize([\"iModelJs\", toolsNs]);\n [\n selectTool,\n idleTool,\n viewTool,\n clipViewTool,\n measureTool,\n accudrawTool,\n ].forEach((tool) => this.tools.registerModule(tool, toolsNs));\n\n this.registerEntityState(EntityState.classFullName, EntityState);\n [\n modelState,\n sheetState,\n viewState,\n drawingViewState,\n spatialViewState,\n displayStyleState,\n modelselector,\n categorySelectorState,\n auxCoordState,\n ].forEach((module) => this.registerModuleEntities(module));\n\n this._renderSystem = (opts.renderSys instanceof RenderSystem) ? opts.renderSys : this.createRenderSys(opts.renderSys);\n if (opts.userPreferences)\n this._userPreferences = opts.userPreferences;\n this._viewManager = opts.viewManager ?? new ViewManager();\n this._tileAdmin = await TileAdmin.create(opts.tileAdmin);\n this._notifications = opts.notifications ?? new NotificationManager();\n this._toolAdmin = opts.toolAdmin ?? new ToolAdmin();\n this._accuDraw = opts.accuDraw ?? new AccuDraw();\n this._accuSnap = opts.accuSnap ?? new AccuSnap();\n this._locateManager = opts.locateManager ?? new ElementLocateManager();\n this._tentativePoint = opts.tentativePoint ?? new TentativePoint();\n this._quantityFormatter = opts.quantityFormatter ?? new QuantityFormatter();\n this._uiAdmin = opts.uiAdmin ?? new UiAdmin();\n this._mapLayerFormatRegistry = new MapLayerFormatRegistry(opts.mapLayerOptions);\n this._terrainProviderRegistry = new TerrainProviderRegistry();\n this._realityDataSourceProviders = new RealityDataSourceProviderRegistry();\n this._realityDataAccess = opts.realityDataAccess;\n this._publicPath = opts.publicPath ?? \"\";\n\n [\n this.renderSystem,\n this.viewManager,\n this.toolAdmin,\n this.accuDraw,\n this.accuSnap,\n this.locateManager,\n this.tentativePoint,\n this.uiAdmin,\n ].forEach((sys) => sys.onInitialized());\n\n await this.quantityFormatter.onInitialized();\n this.onAfterStartup.raiseEvent();\n }\n\n /** Must be called before the application exits to release any held resources. */\n public static async shutdown() {\n if (!this._initialized)\n return;\n\n // notify listeners that this IModelApp is about to be shut down.\n this.onBeforeShutdown.raiseEvent();\n this.onBeforeShutdown.clear();\n\n if (process.env.NODE_ENV === \"development\") {\n (window as IModelAppForDebugger).iModelAppForDebugger = undefined;\n }\n\n this._wantEventLoop = false;\n window.removeEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n this.clearIntervalAnimation();\n [this.toolAdmin, this.viewManager, this.tileAdmin].forEach((sys) => sys.onShutDown());\n this.tools.shutdown();\n this._renderSystem = dispose(this._renderSystem);\n this._entityClasses.clear();\n this.authorizationClient = undefined;\n this._initialized = false;\n this.onAfterStartup.clear();\n }\n\n /** Controls how frequently the application polls for changes that may require a new animation frame to be requested.\n * Such changes include resizing a Viewport or changing the device pixel ratio by zooming in or out in the browser.\n * The default interval is 1 second. It may be desirable to override the default for specific apps and/or devices.\n * - Increasing the interval can conserve battery life on battery-powered devices at the expense of slower response to resize events.\n * - An application that only displays a single Viewport whose dimensions only change when the dimensions of the application window change, and which does not support changing application zoom level, could disable the interval altogether.\n * @param interval The interval at which to poll for changes. If undefined (or negative), the application will never poll. If zero, the application will poll as frequently as possible.\n * @beta\n */\n public static get animationInterval(): BeDuration | undefined { return IModelApp._animationInterval; }\n public static set animationInterval(interval: BeDuration | undefined) {\n if (undefined !== interval && interval.isTowardsPast)\n interval = undefined;\n\n if (interval !== IModelApp._animationInterval) {\n IModelApp._animationInterval = interval;\n if (IModelApp._wantEventLoop)\n IModelApp.requestIntervalAnimation();\n }\n }\n\n /** Request that the event loop execute on the next [animation frame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).\n * There is generally no reason for applications to invoke this method directly.\n */\n public static requestNextAnimation() {\n // Only want to call requestAnimationFrame if it is defined. Need to check whether current iModelApp is a NoRenderApp.\n if (IModelApp._noRender)\n return;\n\n if (!IModelApp._animationRequested) {\n IModelApp._animationRequested = true;\n requestAnimationFrame(() => IModelApp.eventLoop());\n }\n }\n\n /** @internal */\n private static clearIntervalAnimation(): void {\n if (undefined !== IModelApp._animationIntervalId) {\n window.clearInterval(IModelApp._animationIntervalId);\n IModelApp._animationIntervalId = undefined;\n }\n }\n\n /** @internal */\n private static requestIntervalAnimation(): void {\n IModelApp.clearIntervalAnimation();\n\n if (undefined !== IModelApp.animationInterval)\n IModelApp._animationIntervalId = window.setInterval(() => {\n IModelApp.requestNextAnimation();\n }, IModelApp.animationInterval.milliseconds);\n }\n\n /** @internal */\n public static startEventLoop() {\n if (!IModelApp._wantEventLoop) {\n IModelApp._wantEventLoop = true;\n window.addEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n IModelApp.requestIntervalAnimation();\n IModelApp.requestNextAnimation();\n }\n }\n\n /** Strictly for tests. @internal */\n public static stopEventLoop() {\n this._wantEventLoop = false;\n }\n\n /** The main event processing loop for Tools and rendering. */\n private static eventLoop() {\n IModelApp._animationRequested = false;\n if (!IModelApp._wantEventLoop) // flag turned on at startup\n return;\n\n try {\n IModelApp.toolAdmin.processEvent(); // eslint-disable-line @typescript-eslint/no-floating-promises\n IModelApp.viewManager.renderLoop();\n IModelApp.tileAdmin.process();\n } catch (exception) {\n ToolAdmin.exceptionHandler(exception); // eslint-disable-line @typescript-eslint/no-floating-promises\n\n IModelApp._wantEventLoop = false;\n IModelApp._animationRequested = true; // unrecoverable after exception, don't request any further frames.\n window.removeEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n }\n }\n\n /** Get the user's access token for this IModelApp, or a blank string if none is available.\n * @note Access tokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value\n * returned by this method may change over time throughout the course of a session.\n */\n public static async getAccessToken(): Promise<AccessToken> {\n try {\n return (await this.authorizationClient?.getAccessToken()) ?? \"\";\n } catch {\n return \"\";\n }\n }\n\n /** @internal */\n public static createRenderSys(opts?: RenderSystem.Options): RenderSystem { return System.create(opts); }\n\n private static _setupRpcRequestContext() {\n RpcConfiguration.requestContext.getId = (_request: RpcRequest): string => {\n return Guid.createValue();\n };\n\n RpcConfiguration.requestContext.serialize = async (_request: RpcRequest): Promise<SerializedRpcActivity> => {\n const id = _request.id;\n const serialized: SerializedRpcActivity = {\n id,\n applicationId: this.applicationId,\n applicationVersion: this.applicationVersion,\n sessionId: this.sessionId,\n authorization: ProcessDetector.isMobileAppFrontend ? \"\" : await this.getAccessToken(),\n };\n\n const csrf = IModelApp.securityOptions.csrfProtection;\n if (csrf && csrf.enabled) {\n const cookieName = csrf.cookieName || \"XSRF-TOKEN\";\n const cookieValue = document.cookie.split(\"; \").find((r) => r.startsWith(`${cookieName}=`));\n\n if (cookieValue) {\n const headerName = csrf.headerName || \"X-XSRF-TOKEN\";\n const headerValue = cookieValue.split(\"=\")[1];\n serialized.csrfToken = { headerName, headerValue };\n }\n }\n\n return serialized;\n };\n }\n\n /** Shortcut for creating an HTMLElement with optional parent, className, id, innerHTML, innerText. */\n public static makeHTMLElement<K extends keyof HTMLElementTagNameMap>(type: K, opt?: {\n /** The parent for the new HTMLElement */\n parent?: HTMLElement;\n /** The className for the new HTMLElement */\n className?: string;\n /** The Id for the new HTMLElement */\n id?: string;\n /** innerHTML for the new HTMLElement */\n innerHTML?: string;\n /** innerText for the new HTMLElement */\n innerText?: string;\n }) {\n const el = document.createElement(type);\n if (undefined !== opt) {\n if (undefined !== opt.className)\n el.className = opt.className;\n if (undefined !== opt.id)\n el.id = opt.id;\n if (undefined !== opt.innerHTML)\n el.innerHTML = opt.innerHTML;\n if (undefined !== opt.innerText)\n el.innerText = opt.innerText;\n if (undefined !== opt.parent)\n opt.parent.appendChild(el);\n }\n return el;\n }\n\n /** Shortcut for making a modal dialog on top of the root of the application. The returned HTMLDivElement will be placed topmost, all other application\n * windows will be covered with a semi-transparent background that intercepts all key/mouse/touch events until the modal is dismissed.\n * @param options The options that describe how the modal should work.\n */\n public static makeModalDiv(options: ModalOptions): ModalReturn {\n const root = options.rootDiv ? options.rootDiv : document.body;\n // create the overlay div to \"black out\" the application to indicate everything is inactive until the modal has been dismissed.\n const overlay = IModelApp.makeHTMLElement(\"div\", { parent: root, className: \"imodeljs-modal-overlay\" });\n overlay.tabIndex = -1; // so we can catch keystroke events\n\n // function to remove modal dialog\n const stop = (ev: Event) => {\n root.removeChild(overlay);\n ev.stopPropagation();\n };\n\n if (options.autoClose) {\n overlay.onclick = overlay.oncontextmenu = stop;\n overlay.onkeydown = overlay.onkeyup = (ev: KeyboardEvent) => { // ignore all keystrokes other than enter and escape\n switch (ev.key) {\n case \"Enter\":\n case \"Escape\":\n stop(ev);\n return;\n }\n ev.stopPropagation();\n };\n overlay.focus();\n }\n\n const modal = IModelApp.makeHTMLElement(\"div\", { parent: overlay, className: \"imodeljs-modal\" });\n if (undefined !== options.width) {\n modal.style.width = `${options.width}px`;\n // allow the dialog to be smaller than the width\n modal.style.maxWidth = `min(100% - (2 * var(--width-border)), ${options.width}px)`;\n }\n if (options.closeBox) {\n const close = IModelApp.makeHTMLElement(\"p\", { parent: modal, className: \"imodeljs-modal-close\" });\n close.innerText = \"\\u00d7\"; // unicode \"times\" symbol\n close.onclick = stop;\n }\n\n return { modal, stop };\n }\n\n /** Applications may implement this method to supply a Logo Card.\n * @beta\n */\n public static applicationLogoCard?: () => HTMLTableRowElement;\n\n /** Make a new Logo Card. Call this method from your implementation of [[IModelApp.applicationLogoCard]]\n * @param opts Options for Logo Card\n * @beta\n */\n public static makeLogoCard(\n opts: {\n /** The heading to be put at the top of this logo card inside an <h2>. May include HTML. */\n heading: string | HTMLElement;\n /** The URL or HTMLImageElement for the icon on this logo card. */\n iconSrc?: string | HTMLImageElement;\n /** The width of the icon, if `iconSrc` is a string. Default is 64. */\n iconWidth?: number;\n /** A *notice* string to be shown on the logo card. May include HTML. */\n notice?: string | HTMLElement;\n }): HTMLTableRowElement {\n const card = IModelApp.makeHTMLElement(\"tr\");\n const iconCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-logo\" });\n if (undefined !== opts.iconSrc) {\n if (typeof opts.iconSrc === \"string\") {\n const logo = IModelApp.makeHTMLElement(\"img\");\n logo.src = opts.iconSrc;\n logo.width = opts.iconWidth ? opts.iconWidth : 64;\n opts.iconSrc = logo;\n }\n iconCell.appendChild(opts.iconSrc);\n }\n const noticeCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-message\" });\n if (undefined !== opts.heading) {\n if (typeof opts.heading === \"string\")\n IModelApp.makeHTMLElement(\"h2\", { parent: noticeCell, innerHTML: opts.heading, className: \"logo-card-header\" });\n else\n noticeCell.appendChild(opts.heading);\n }\n if (undefined !== opts.notice) {\n if (typeof opts.notice === \"string\")\n IModelApp.makeHTMLElement(\"p\", { parent: noticeCell, innerHTML: opts.notice, className: \"logo-cards\" });\n else\n noticeCell.appendChild(opts.notice);\n }\n return card;\n }\n\n /** Make the logo card for the library itself. This card gets placed at the top of the stack.\n * @internal\n */\n public static makeIModelJsLogoCard() {\n return this.makeLogoCard({\n iconSrc: `${this.publicPath}images/about-imodeljs.svg`,\n heading: `<span style=\"font-weight:normal\">${this.localization.getLocalizedString(\"iModelJs:Notices.PoweredBy\")}</span> iTwin.js`,\n notice: `${ITWINJS_CORE_VERSION}<br>${COPYRIGHT_NOTICE}`,\n });\n }\n\n /** Format the tooltip strings returned by [[IModelConnection.getToolTipMessage]].\n * @alpha\n */\n public static formatElementToolTip(msg: string[]): HTMLElement {\n let out = \"\";\n msg.forEach((line) => out += `${IModelApp.localization?.getLocalizedKeys(line)}<br>`);\n const div = document.createElement(\"div\");\n div.innerHTML = out;\n return div;\n }\n\n /** Localize an error status\n * @param status one of the status values from [BentleyStatus]($core-bentley), [IModelStatus]($core-bentley) or [DbResult]($core-bentley)\n * @returns a localized error message\n * @beta\n */\n public static translateStatus(status: number) {\n let key: { scope: string, val: string, status?: string };\n if (typeof status !== \"number\") {\n key = { scope: \"Errors\", val: \"IllegalValue\" };\n } else {\n key = { scope: \"BentleyStatus\", val: BentleyStatus[status] };\n if (!key.val)\n key = { scope: \"IModelStatus\", val: IModelStatus[status] };\n if (!key.val)\n key = { scope: \"DbResult\", val: DbResult[status] };\n if (!key.val)\n key = { scope: \"Errors\", val: \"Status\", status: status.toString() };\n }\n\n return this.localization.getLocalizedString(`iModelJs:${key.scope}.${key.val}`, key);\n }\n\n /**\n * Creates an instance of the ExtensionAdmin\n * and registers an event to execute after startup is complete\n * @returns an instance of ExtensionAdmin\n */\n private static _createExtensionAdmin(): ExtensionAdmin {\n const extensionAdmin = new ExtensionAdmin();\n IModelApp.onAfterStartup.addListener(extensionAdmin.onStartup);\n return extensionAdmin;\n }\n}\n"]}
|
|
@@ -34,6 +34,8 @@ export class IModelConnection extends IModel {
|
|
|
34
34
|
get noGcsDefined() { return this._gcsDisabled || undefined === this.geographicCoordinateSystem; }
|
|
35
35
|
/** @internal */
|
|
36
36
|
disableGCS(disable) { this._gcsDisabled = disable; }
|
|
37
|
+
/** The maximum time (in milliseconds) to wait before timing out the request to open a connection to a new iModel */
|
|
38
|
+
static { this.connectionTimeout = 10 * 60 * 1000; }
|
|
37
39
|
/** Type guard for instanceof [[BriefcaseConnection]] */
|
|
38
40
|
isBriefcaseConnection() { return false; }
|
|
39
41
|
/** Type guard for instanceof [[CheckpointConnection]]
|
|
@@ -59,6 +61,14 @@ export class IModelConnection extends IModel {
|
|
|
59
61
|
* @note no RPC operations are valid on this IModelConnection if this method returns false.
|
|
60
62
|
*/
|
|
61
63
|
get isOpen() { return !this.isClosed; }
|
|
64
|
+
/** Event raised immediately before *any* IModelConnection is [[close]]d.
|
|
65
|
+
* @note This static event is raised when *any* IModelConnection is closed, and the specific IModelConnection is passed as its argument. To
|
|
66
|
+
* monitor closing a specific IModelConnection, listen for the `onClose` instance event instead.
|
|
67
|
+
* @note Be careful not to perform any asynchronous operations on the IModelConnection because it will close before they are processed.
|
|
68
|
+
*/
|
|
69
|
+
static { this.onClose = new BeEvent(); }
|
|
70
|
+
/** Event called immediately after *any* IModelConnection is opened. */
|
|
71
|
+
static { this.onOpen = new BeEvent(); }
|
|
62
72
|
/** Load the FontMap for this IModelConnection.
|
|
63
73
|
* @returns Returns a Promise<FontMap> that is fulfilled when the FontMap member of this IModelConnection is valid.
|
|
64
74
|
* @deprecated in 5.0.0. If you need font Ids on the front-end for some reason, write an Ipc method that queries [IModelDb.fonts]($backend).
|
|
@@ -541,16 +551,6 @@ export class IModelConnection extends IModel {
|
|
|
541
551
|
return ("number" === typeof this._projectCenterAltitude) ? this._projectCenterAltitude : undefined;
|
|
542
552
|
}
|
|
543
553
|
}
|
|
544
|
-
/** The maximum time (in milliseconds) to wait before timing out the request to open a connection to a new iModel */
|
|
545
|
-
IModelConnection.connectionTimeout = 10 * 60 * 1000;
|
|
546
|
-
/** Event raised immediately before *any* IModelConnection is [[close]]d.
|
|
547
|
-
* @note This static event is raised when *any* IModelConnection is closed, and the specific IModelConnection is passed as its argument. To
|
|
548
|
-
* monitor closing a specific IModelConnection, listen for the `onClose` instance event instead.
|
|
549
|
-
* @note Be careful not to perform any asynchronous operations on the IModelConnection because it will close before they are processed.
|
|
550
|
-
*/
|
|
551
|
-
IModelConnection.onClose = new BeEvent();
|
|
552
|
-
/** Event called immediately after *any* IModelConnection is opened. */
|
|
553
|
-
IModelConnection.onOpen = new BeEvent();
|
|
554
554
|
/** A connection that exists without an iModel. Useful for connecting to Reality Data services.
|
|
555
555
|
* @note This class exists because our display system requires an IModelConnection type even if only reality data is drawn.
|
|
556
556
|
* @public
|