@itwin/core-frontend 5.3.0-dev.8 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -1
- package/lib/cjs/ElementLocateManager.d.ts.map +1 -1
- package/lib/cjs/ElementLocateManager.js +2 -5
- package/lib/cjs/ElementLocateManager.js.map +1 -1
- package/lib/cjs/HitDetail.d.ts +1 -24
- package/lib/cjs/HitDetail.d.ts.map +1 -1
- package/lib/cjs/HitDetail.js +0 -5
- package/lib/cjs/HitDetail.js.map +1 -1
- package/lib/cjs/IModelApp.d.ts +4 -0
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +5 -1
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModeljs-css.d.ts.map +1 -1
- package/lib/cjs/IModeljs-css.js +4 -0
- package/lib/cjs/IModeljs-css.js.map +1 -1
- package/lib/cjs/SubCategoriesCache.d.ts +1 -1
- package/lib/cjs/SubCategoriesCache.d.ts.map +1 -1
- package/lib/cjs/SubCategoriesCache.js +3 -3
- package/lib/cjs/SubCategoriesCache.js.map +1 -1
- package/lib/cjs/ViewManager.d.ts +4 -2
- package/lib/cjs/ViewManager.d.ts.map +1 -1
- package/lib/cjs/ViewManager.js +3 -1
- package/lib/cjs/ViewManager.js.map +1 -1
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +9 -3
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/common/imdl/ParseImdlDocument.d.ts.map +1 -1
- package/lib/cjs/common/imdl/ParseImdlDocument.js +1 -43
- package/lib/cjs/common/imdl/ParseImdlDocument.js.map +1 -1
- package/lib/cjs/common/internal/Symbols.d.ts +1 -0
- package/lib/cjs/common/internal/Symbols.d.ts.map +1 -1
- package/lib/cjs/common/internal/Symbols.js +1 -0
- package/lib/cjs/common/internal/Symbols.js.map +1 -1
- package/lib/cjs/internal/cross-package.d.ts +4 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +3 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/internal/render/RenderAreaPattern.d.ts +1 -0
- package/lib/cjs/internal/render/RenderAreaPattern.d.ts.map +1 -1
- package/lib/cjs/internal/render/RenderAreaPattern.js.map +1 -1
- package/lib/cjs/internal/render/RenderGeometry.d.ts +3 -1
- package/lib/cjs/internal/render/RenderGeometry.d.ts.map +1 -1
- package/lib/cjs/internal/render/RenderGeometry.js.map +1 -1
- package/lib/cjs/internal/render/RenderPlan.d.ts +3 -1
- package/lib/cjs/internal/render/RenderPlan.d.ts.map +1 -1
- package/lib/cjs/internal/render/RenderPlan.js.map +1 -1
- package/lib/cjs/internal/render/webgl/FrustumUniforms.d.ts +0 -2
- package/lib/cjs/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/FrustumUniforms.js +0 -7
- package/lib/cjs/internal/render/webgl/FrustumUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.d.ts +0 -9
- package/lib/cjs/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.js +4 -67
- package/lib/cjs/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderBuilder.d.ts +3 -4
- package/lib/cjs/internal/render/webgl/ShaderBuilder.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderBuilder.js +3 -3
- package/lib/cjs/internal/render/webgl/ShaderBuilder.js.map +1 -1
- package/lib/cjs/internal/render/webgl/System.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/System.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/System.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Atmosphere.js +1 -1
- package/lib/cjs/internal/render/webgl/glsl/ClearPickAndColor.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/ClearPickAndColor.js +1 -2
- package/lib/cjs/internal/render/webgl/glsl/ClearPickAndColor.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Contours.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Contours.js +1 -30
- package/lib/cjs/internal/render/webgl/glsl/Contours.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Fragment.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Fragment.js +2 -7
- package/lib/cjs/internal/render/webgl/glsl/Fragment.js.map +1 -1
- package/lib/cjs/internal/render/webgl/glsl/RealityMesh.js +1 -1
- package/lib/cjs/internal/render/webgl/glsl/Surface.js +1 -1
- package/lib/cjs/internal/tile/DynamicIModelTile.d.ts +2 -0
- package/lib/cjs/internal/tile/DynamicIModelTile.d.ts.map +1 -1
- package/lib/cjs/internal/tile/DynamicIModelTile.js +3 -0
- package/lib/cjs/internal/tile/DynamicIModelTile.js.map +1 -1
- package/lib/cjs/internal/tile/IModelTileTree.d.ts +2 -0
- package/lib/cjs/internal/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/IModelTileTree.js +5 -0
- package/lib/cjs/internal/tile/IModelTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js +1 -0
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
- package/lib/cjs/render/Pixel.d.ts +2 -13
- package/lib/cjs/render/Pixel.d.ts.map +1 -1
- package/lib/cjs/render/Pixel.js +1 -9
- package/lib/cjs/render/Pixel.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerAuthentication.d.ts +4 -0
- package/lib/cjs/tile/map/MapLayerAuthentication.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerAuthentication.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +17 -2
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +29 -2
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tools/AccuDrawViewportUI.d.ts +82 -26
- package/lib/cjs/tools/AccuDrawViewportUI.d.ts.map +1 -1
- package/lib/cjs/tools/AccuDrawViewportUI.js +171 -87
- package/lib/cjs/tools/AccuDrawViewportUI.js.map +1 -1
- package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/cjs/tools/ToolAdmin.js +3 -0
- package/lib/cjs/tools/ToolAdmin.js.map +1 -1
- package/lib/esm/ElementLocateManager.d.ts.map +1 -1
- package/lib/esm/ElementLocateManager.js +2 -5
- package/lib/esm/ElementLocateManager.js.map +1 -1
- package/lib/esm/HitDetail.d.ts +1 -24
- package/lib/esm/HitDetail.d.ts.map +1 -1
- package/lib/esm/HitDetail.js +0 -5
- package/lib/esm/HitDetail.js.map +1 -1
- package/lib/esm/IModelApp.d.ts +4 -0
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +5 -1
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModeljs-css.d.ts.map +1 -1
- package/lib/esm/IModeljs-css.js +4 -0
- package/lib/esm/IModeljs-css.js.map +1 -1
- package/lib/esm/SubCategoriesCache.d.ts +1 -1
- package/lib/esm/SubCategoriesCache.d.ts.map +1 -1
- package/lib/esm/SubCategoriesCache.js +3 -3
- package/lib/esm/SubCategoriesCache.js.map +1 -1
- package/lib/esm/ViewManager.d.ts +4 -2
- package/lib/esm/ViewManager.d.ts.map +1 -1
- package/lib/esm/ViewManager.js +3 -1
- package/lib/esm/ViewManager.js.map +1 -1
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +9 -3
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/common/imdl/ParseImdlDocument.d.ts.map +1 -1
- package/lib/esm/common/imdl/ParseImdlDocument.js +1 -43
- package/lib/esm/common/imdl/ParseImdlDocument.js.map +1 -1
- package/lib/esm/common/internal/Symbols.d.ts +1 -0
- package/lib/esm/common/internal/Symbols.d.ts.map +1 -1
- package/lib/esm/common/internal/Symbols.js +1 -0
- package/lib/esm/common/internal/Symbols.js.map +1 -1
- package/lib/esm/internal/cross-package.d.ts +4 -0
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +1 -0
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/internal/render/RenderAreaPattern.d.ts +1 -0
- package/lib/esm/internal/render/RenderAreaPattern.d.ts.map +1 -1
- package/lib/esm/internal/render/RenderAreaPattern.js.map +1 -1
- package/lib/esm/internal/render/RenderGeometry.d.ts +3 -1
- package/lib/esm/internal/render/RenderGeometry.d.ts.map +1 -1
- package/lib/esm/internal/render/RenderGeometry.js.map +1 -1
- package/lib/esm/internal/render/RenderPlan.d.ts +3 -1
- package/lib/esm/internal/render/RenderPlan.d.ts.map +1 -1
- package/lib/esm/internal/render/RenderPlan.js.map +1 -1
- package/lib/esm/internal/render/webgl/FrustumUniforms.d.ts +0 -2
- package/lib/esm/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/FrustumUniforms.js +1 -8
- package/lib/esm/internal/render/webgl/FrustumUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.d.ts +0 -9
- package/lib/esm/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.js +4 -67
- package/lib/esm/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderBuilder.d.ts +3 -4
- package/lib/esm/internal/render/webgl/ShaderBuilder.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderBuilder.js +3 -3
- package/lib/esm/internal/render/webgl/ShaderBuilder.js.map +1 -1
- package/lib/esm/internal/render/webgl/System.d.ts +1 -1
- package/lib/esm/internal/render/webgl/System.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/System.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Atmosphere.js +1 -1
- package/lib/esm/internal/render/webgl/glsl/ClearPickAndColor.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/ClearPickAndColor.js +1 -2
- package/lib/esm/internal/render/webgl/glsl/ClearPickAndColor.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Contours.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Contours.js +1 -30
- package/lib/esm/internal/render/webgl/glsl/Contours.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Fragment.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/Fragment.js +2 -7
- package/lib/esm/internal/render/webgl/glsl/Fragment.js.map +1 -1
- package/lib/esm/internal/render/webgl/glsl/RealityMesh.js +1 -1
- package/lib/esm/internal/render/webgl/glsl/Surface.js +1 -1
- package/lib/esm/internal/tile/DynamicIModelTile.d.ts +2 -0
- package/lib/esm/internal/tile/DynamicIModelTile.d.ts.map +1 -1
- package/lib/esm/internal/tile/DynamicIModelTile.js +3 -0
- package/lib/esm/internal/tile/DynamicIModelTile.js.map +1 -1
- package/lib/esm/internal/tile/IModelTileTree.d.ts +2 -0
- package/lib/esm/internal/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/IModelTileTree.js +5 -0
- package/lib/esm/internal/tile/IModelTileTree.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js +1 -0
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
- package/lib/esm/render/Pixel.d.ts +2 -13
- package/lib/esm/render/Pixel.d.ts.map +1 -1
- package/lib/esm/render/Pixel.js +1 -9
- package/lib/esm/render/Pixel.js.map +1 -1
- package/lib/esm/tile/map/MapLayerAuthentication.d.ts +4 -0
- package/lib/esm/tile/map/MapLayerAuthentication.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerAuthentication.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +17 -2
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +29 -2
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tools/AccuDrawViewportUI.d.ts +82 -26
- package/lib/esm/tools/AccuDrawViewportUI.d.ts.map +1 -1
- package/lib/esm/tools/AccuDrawViewportUI.js +171 -87
- package/lib/esm/tools/AccuDrawViewportUI.js.map +1 -1
- package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/esm/tools/ToolAdmin.js +3 -0
- package/lib/esm/tools/ToolAdmin.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 +22 -23
package/lib/cjs/IModelApp.js
CHANGED
|
@@ -388,6 +388,10 @@ class IModelApp {
|
|
|
388
388
|
IModelApp.requestNextAnimation();
|
|
389
389
|
}, IModelApp.animationInterval.milliseconds);
|
|
390
390
|
}
|
|
391
|
+
/** Return true if the main event processing loop has been started.
|
|
392
|
+
* @internal
|
|
393
|
+
*/
|
|
394
|
+
static get isEventLoopStarted() { return IModelApp._wantEventLoop; }
|
|
391
395
|
/** @internal */
|
|
392
396
|
static startEventLoop() {
|
|
393
397
|
if (!IModelApp._wantEventLoop) {
|
|
@@ -556,7 +560,7 @@ class IModelApp {
|
|
|
556
560
|
static makeIModelJsLogoCard() {
|
|
557
561
|
return this.makeLogoCard({
|
|
558
562
|
iconSrc: `${this.publicPath}images/about-imodeljs.svg`,
|
|
559
|
-
heading: `<span
|
|
563
|
+
heading: `<span class="itwinjs-header-lead">${this.localization.getLocalizedString("iModelJs:Notices.PoweredBy")}</span> iTwin.js`,
|
|
560
564
|
notice: `${exports.ITWINJS_CORE_VERSION}<br>${COPYRIGHT_NOTICE}`,
|
|
561
565
|
});
|
|
562
566
|
}
|
package/lib/cjs/IModelApp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelApp.js","sourceRoot":"","sources":["../../src/IModelApp.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4HAA4H;AAC5H,wDAAwD;AACxD,sEAA6C;AAC7C,cAAc;AACD,QAAA,oBAAoB,GAAG,sBAAW,CAAC,OAAiB,CAAC;AAClE,MAAM,gBAAgB,GAAG,oBAAoB,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,wGAAwG,CAAC;AAE9K,0DAAgD;AAChD,sDAAiL;AACjL,oDAAuK;AACvK,gDAAqD;AAErD,oEAAoG;AACpG,yCAAsC;AACtC,yCAAsC;AACtC,6DAA+C;AAC/C,+EAAiE;AACjE,+DAA4D;AAC5D,uEAAyD;AACzD,qEAAuD;AACvD,iEAA8D;AAC9D,+CAA0D;AAE1D,4EAAyE;AACzE,oEAAsD;AACtD,yDAA2C;AAC3C,+DAA4D;AAC5D,+EAAiI;AACjI,wDAAqD;AACrD,2DAAwD;AACxD,6DAA+C;AAC/C,qEAAuD;AACvD,qDAAkD;AAClD,2DAAwE;AACxE,8CAA8G;AAC9G,mEAAqD;AACrD,mEAAqD;AACrD,2DAA6C;AAC7C,iEAAmD;AACnD,+DAAiD;AACjD,uCAA4C;AAC5C,iDAA8C;AAC9C,2DAA6C;AAE7C,+CAA4C;AAC5C,uDAAyC;AACzC,0BAAwB;AA0HxB;;;;;;;;GAQG;AACH,MAAa,SAAS;IACZ,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC;IAC5B,MAAM,CAAC,SAAS,CAAW;IAC3B,MAAM,CAAC,SAAS,CAAW;IAC3B,MAAM,CAAC,cAAc,C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cesContent":["/*---------------------------------------------------------------------------------------------\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-${new Date().getFullYear()} <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, expectDefined, Guid, GuidString, IModelStatus, Logger, ProcessDetector } from \"@itwin/core-bentley\";\nimport { AuthorizationClient, Localization, RealityDataAccess, RpcConfiguration, RpcInterfaceDefinition, RpcRequest, SerializedRpcActivity } from \"@itwin/core-common\";\nimport { ITwinLocalization } from \"@itwin/core-i18n\";\nimport { FormatsProvider } from \"@itwin/core-quantity\";\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 { ElementState, 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 { FormatsProviderManager, QuantityFormatter, QuantityTypeFormatsProvider } from \"./quantity-formatting/QuantityFormatter\";\nimport { RenderSystem } from \"./render/RenderSystem\";\nimport { System } from \"./internal/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, supplies the [[FormatsProvider]] for this session. */\n formatsProvider?: FormatsProvider;\n /** If present, determines whether iModelApp is a NoRenderApp\n * @internal\n */\n noRender?: boolean;\n\n /**\n * @deprecated in 3.7 - might be removed in next major version. 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\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 private static _formatsProviderManager: FormatsProviderManager;\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 * @beta\n */\n public static get realityDataSourceProviders(): RealityDataSourceProviderRegistry { return this._realityDataSourceProviders; }\n /** The [[RenderSystem]] for this session. */\n public static get renderSystem(): RenderSystem { return expectDefined(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 [[FormatsProvider]] for this session.\n * @param provider The provider to use for formatting quantities.\n * @beta\n */\n public static get formatsProvider(): FormatsProvider { return this._formatsProviderManager; }\n public static set formatsProvider(provider: FormatsProvider) {\n this._formatsProviderManager.formatsProvider = provider;\n }\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 this.registerEntityState(ElementState.classFullName, ElementState);\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._formatsProviderManager = new FormatsProviderManager(opts.formatsProvider ?? new QuantityTypeFormatsProvider());\n\n this._publicPath = opts.publicPath ?? \"\";\n if (this._publicPath !== \"\" && !this._publicPath.endsWith(\"/\")) {\n this._publicPath += \"/\";\n }\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.quantityFormatter[Symbol.dispose]();\n this.resetFormatsProvider();\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 * Resets the formatsProvider back to the default [[QuantityTypeFormatsProvider]].\n * @beta\n */\n public static resetFormatsProvider() {\n this.formatsProvider = new QuantityTypeFormatsProvider();\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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AAQ,EAAE,CAAC;YAC/B,GAAG,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC;QACjD,CAAC;aAAM,CAAC;YACN,GAAG,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,4BAAa,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,GAAG,CAAC,GAAG;gBACV,GAAG,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,2BAAY,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,GAAG,CAAC,GAAG;gBACV,GAAG,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,uBAAQ,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;;;OAGG;IACI,MAAM,CAAC,oBAAoB;QAChC,IAAI,CAAC,eAAe,GAAG,IAAI,+CAA2B,EAAE,CAAC;IAC3D,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,qBAAqB;QAClC,MAAM,cAAc,GAAG,IAAI,+BAAc,EAAE,CAAC;QAC5C,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAC/D,OAAO,cAAc,CAAC;IACxB,CAAC;;AAjmBH,8BAkmBC","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-${new Date().getFullYear()} <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, expectDefined, Guid, GuidString, IModelStatus, Logger, ProcessDetector } from \"@itwin/core-bentley\";\nimport { AuthorizationClient, Localization, RealityDataAccess, RpcConfiguration, RpcInterfaceDefinition, RpcRequest, SerializedRpcActivity } from \"@itwin/core-common\";\nimport { ITwinLocalization } from \"@itwin/core-i18n\";\nimport { FormatsProvider } from \"@itwin/core-quantity\";\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 { ElementState, 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 { FormatsProviderManager, QuantityFormatter, QuantityTypeFormatsProvider } from \"./quantity-formatting/QuantityFormatter\";\nimport { RenderSystem } from \"./render/RenderSystem\";\nimport { System } from \"./internal/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, supplies the [[FormatsProvider]] for this session. */\n formatsProvider?: FormatsProvider;\n /** If present, determines whether iModelApp is a NoRenderApp\n * @internal\n */\n noRender?: boolean;\n\n /**\n * @deprecated in 3.7 - might be removed in next major version. 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\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 private static _formatsProviderManager: FormatsProviderManager;\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 * @beta\n */\n public static get realityDataSourceProviders(): RealityDataSourceProviderRegistry { return this._realityDataSourceProviders; }\n /** The [[RenderSystem]] for this session. */\n public static get renderSystem(): RenderSystem { return expectDefined(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 [[FormatsProvider]] for this session.\n * @param provider The provider to use for formatting quantities.\n * @beta\n */\n public static get formatsProvider(): FormatsProvider { return this._formatsProviderManager; }\n public static set formatsProvider(provider: FormatsProvider) {\n this._formatsProviderManager.formatsProvider = provider;\n }\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 this.registerEntityState(ElementState.classFullName, ElementState);\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._formatsProviderManager = new FormatsProviderManager(opts.formatsProvider ?? new QuantityTypeFormatsProvider());\n\n this._publicPath = opts.publicPath ?? \"\";\n if (this._publicPath !== \"\" && !this._publicPath.endsWith(\"/\")) {\n this._publicPath += \"/\";\n }\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.quantityFormatter[Symbol.dispose]();\n this.resetFormatsProvider();\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 /** Return true if the main event processing loop has been started.\n * @internal\n */\n public static get isEventLoopStarted() { return IModelApp._wantEventLoop; }\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 class=\"itwinjs-header-lead\">${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 * Resets the formatsProvider back to the default [[QuantityTypeFormatsProvider]].\n * @beta\n */\n public static resetFormatsProvider() {\n this.formatsProvider = new QuantityTypeFormatsProvider();\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModeljs-css.d.ts","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,QAAA,IAAI,WAAW,EAAE,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"IModeljs-css.d.ts","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,QAAA,IAAI,WAAW,EAAE,MAAM,GAAG,SAyIzB,CAAC"}
|
package/lib/cjs/IModeljs-css.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModeljs-css.js","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,sBAAsB;AAEtB;;GAEG;AACH,IAAI,WAAW,GAAuB
|
|
1
|
+
{"version":3,"file":"IModeljs-css.js","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,sBAAsB;AAEtB;;GAEG;AACH,IAAI,WAAW,GAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIrC,CAAC;AAEF,mEAAmE;AACnE,CAAC,GAAG,EAAE;IACJ,8DAA8D;IAC9D,IAAI,WAAW,KAAK,OAAO,QAAQ;QACjC,OAAO;IACT,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,sCAAsC;IACrH,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,GAAG,GAAG,YAAY,CAAC;IAC5B,QAAQ,CAAC,IAAI,GAAG,gEAAgE,CAAC;IACjF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,wFAAwF;IACtH,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,WAAW,GAAG,SAAS,CAAC,CAAC,0BAA0B;AACrD,CAAC,CAAC,EAAE,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// cSpell:ignore segoe\n\n/**\n * @internal\n */\nlet iModelJsCss: string | undefined = `\n:root {\n --background-1:#ffffff;\n --background-2:#f8f9fb;\n --background-3:#eef0f3;\n --background-4:#dce0e3;\n --background-5:#c7ccd1;\n --foreground-body:#000000;\n --foreground-primary:#008be1;\n --foreground-success:#56a91c;\n --foreground-alert:#d30a0a;\n --foreground-warning:#f18b12;\n --safe-area-top: constant(safe-area-inset-top);\n --safe-area-top: env(safe-area-inset-top);\n --safe-area-left: constant(safe-area-inset-left);\n --safe-area-left: env(safe-area-inset-left);\n --safe-area-bottom: constant(safe-area-inset-bottom);\n --safe-area-bottom: env(safe-area-inset-bottom);\n --safe-area-right: constant(safe-area-inset-right);\n --safe-area-right: env(safe-area-inset-right);\n --logo-foreground-body:#000000;\n --logo-background-1:#ffffff;\n}\n\n.logo-card-logo {\n width:144px;\n overflow:hidden;\n vertical-align:text-top;\n text-align:center\n}\n\n.logo-card-logo img {\n margin-top:4px;\n border: solid 3px var(--logo-background-1)\n}\n\n.logo-card-message {\n font-size:13px;\n line-height:1.25;\n margin-block-start:.5em;\n margin-block-end:3em;\n width:90%;\n opacity:.7\n}\n\n.itwinjs-header-lead {\n font-weight:normal;\n}\n\n.logo-card-header {\n margin:auto;\n font-size:18px;\n font-weight:bold;\n opacity:.85\n}\n\n.logo-cards {\n position:relative;\n width:100%\n}\n\n.imodeljs-modal-overlay {\n top:0;\n left:0;\n width:100%;\n height:100%;\n position:absolute;\n display:flex;\n justify-content:center;\n align-items:center;\n background-color:rgba(0,0,0,.5);\n z-index:10000;\n}\n\n.imodeljs-modal {\n border-radius:3px;\n box-shadow: 0px 1px 3px 0 rgba(0,0,0,0.1);\n color:var(--logo-foreground-body);\n background-color:var(--logo-background-1);\n font-family:\"Segoe UI\",\"Open Sans\",sans-serif;\n font-weight:normal;\n font-stretch:normal;\n font-style:normal;\n letter-spacing:normal;\n text-align:left;\n --width-border: max(var(--safe-area-left), var(--safe-area-right), 16px);\n --height-border: max(var(--safe-area-top), var(--safe-area-bottom), 16px);\n max-height: calc(100% - (2 * var(--height-border)));\n overflow: auto;\n}\n\n@media (max-width:450px) {\n .imodeljs-about .logo-card-logo {\n width: 90px;\n }\n}\n\n@media (max-height:450px) {\n .imodeljs-about {\n max-width: calc(100% - (2 * var(--width-border))) !important;\n width: unset !important;\n }\n .imodeljs-about .logo-card-message p {\n margin-block-end: 1em;\n }\n .imodeljs-about .logo-cards {\n margin-bottom: 2em;\n }\n}\n\n.imodeljs-modal-close {\n font-size:32px;\n text-align:right;\n position:relative;\n cursor:pointer;\n right:10px;\n top:-4px;\n margin:0;\n margin-bottom:-10px\n}\n\n.imodeljs-icon {\n z-index:11;\n left:8px;\n bottom:8px;\n position:absolute;\n width:32px;\n cursor:pointer;\n opacity:.4;\n filter:drop-shadow(1px 1px 1px black)\n}\n\n@media (hover: hover) {\n .imodeljs-icon:hover {\n opacity:1.0;\n }\n}\n`;\n\n// add the iTwin.js frontend .css styles into DOM head when we load\n(() => {\n // Skip adding the css to document if document does not exist.\n if (\"undefined\" === typeof document)\n return;\n const style = document.createElement(\"style\");\n style.appendChild(document.createTextNode(iModelJsCss.replace(/\\s+/gm, \" \"))); // strips multiple spaces and space+\\r\n const openSans = document.createElement(\"link\");\n openSans.rel = \"stylesheet\";\n openSans.href = \"https://fonts.googleapis.com/css?family=Open+Sans&display=swap\";\n document.head.prepend(style); // put our styles at the beginning so any application-supplied styles will override them\n document.head.prepend(openSans);\n iModelJsCss = undefined; // can only be called once\n})();\n"]}
|
|
@@ -66,7 +66,7 @@ export declare namespace SubCategoriesCache {
|
|
|
66
66
|
cancel(): void;
|
|
67
67
|
dispatch(): Promise<Result | undefined>;
|
|
68
68
|
}
|
|
69
|
-
type QueueFunc = () => void;
|
|
69
|
+
type QueueFunc = (anySubCategoriesLoaded: boolean) => void;
|
|
70
70
|
class QueueEntry {
|
|
71
71
|
readonly categoryIds: Id64Set;
|
|
72
72
|
readonly funcs: QueueFunc[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubCategoriesCache.d.ts","sourceRoot":"","sources":["../../src/SubCategoriesCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAuB,MAAM,qBAAqB,CAAC;AACzH,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,2BAA2B;IAC3B,MAAM,IAAI,IAAI,CAAC;CAChB;AAID;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA8B;IAC5D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4C;IACzE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,uBAAuB,CAAsB;gBAElC,MAAM,EAAE,gBAAgB;IAE3C,wIAAwI;IACjI,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAEh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AAW,EAAE,OAAO,CAAC;QACrC,SAAgB,KAAK,EAAE,SAAS,EAAE,CAAC;oBAEhB,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;KAIzD;IAED;;;;;OAKG;IACH,MAAa,KAAK;QAEhB,SAAS,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;QAChC,SAAS,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;QAC7B,SAAS,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAC;QAC1C,SAAS,CAAC,SAAS,UAAS;QAE5B;;WAEG;QACI,IAAI,CAAC,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI;QASnF,+CAA+C;QACxC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI;QAW/B,IAAW,OAAO,IAAI,OAAO,CAE5B;QAED,OAAO,CAAC,WAAW;QAgBnB,OAAO,CAAC,cAAc;QAoCtB,OAAO,CAAC,QAAQ;KAgBjB;CACF"}
|
|
@@ -235,7 +235,7 @@ exports.SubCategoriesCache = SubCategoriesCache;
|
|
|
235
235
|
this._request = cache.load(categoryIds);
|
|
236
236
|
if (undefined === this._request) {
|
|
237
237
|
// All requested categories are already loaded.
|
|
238
|
-
func();
|
|
238
|
+
func(false);
|
|
239
239
|
return;
|
|
240
240
|
}
|
|
241
241
|
else {
|
|
@@ -255,7 +255,7 @@ exports.SubCategoriesCache = SubCategoriesCache;
|
|
|
255
255
|
(0, core_bentley_1.assert)(undefined !== this._current);
|
|
256
256
|
if (completed)
|
|
257
257
|
for (const func of this._current.funcs)
|
|
258
|
-
func();
|
|
258
|
+
func(true);
|
|
259
259
|
this._request = undefined;
|
|
260
260
|
this._current = undefined;
|
|
261
261
|
// If we have more requests, process them.
|
|
@@ -266,7 +266,7 @@ exports.SubCategoriesCache = SubCategoriesCache;
|
|
|
266
266
|
if (undefined === this._request) {
|
|
267
267
|
// All categories loaded.
|
|
268
268
|
for (const func of next.funcs)
|
|
269
|
-
func();
|
|
269
|
+
func(true);
|
|
270
270
|
}
|
|
271
271
|
else {
|
|
272
272
|
// We need to load the requested categories before invoking the pending functions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubCategoriesCache.js","sourceRoot":"","sources":["../../src/SubCategoriesCache.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,sDAAyH;AACzH,oDAAiF;AAkBjF,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAU,CAAC;AAEjD;;GAEG;AACH,MAAa,kBAAkB;IACZ,aAAa,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC3C,YAAY,GAAG,IAAI,GAAG,EAAiC,CAAC;IACxD,OAAO,CAAmB;IACnC,uBAAuB,CAAsB;IAErD,YAAmB,MAAwB,IAAI,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;IAEvE,wIAAwI;IACjI,gBAAgB,CAAC,UAAkB,IAAyB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAE/G,wHAAwH;IACjH,wBAAwB,CAAC,aAAyB,IAAuC,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;IAEzJ;;;;OAIG;IACI,IAAI,CAAC,WAAoB;QAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC7C,IAAI,SAAS,KAAK,OAAO;YACvB,OAAO,SAAS,CAAC;QAEnB,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,MAAkC,EAAE,EAAE;YAC7E,IAAI,SAAS,KAAK,MAAM;gBACtB,IAAI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CAAC,CAAC;oBAC7C,IAAI,SAAS,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;wBAChC,yBAAyB;wBACzB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK;4BAC3B,IAAI,EAAE,CAAC;oBACX,CAAC;yBAAM,CAAC;wBACN,kFAAkF;wBAClF,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;oBACnC,CAAC;gBACH,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAEO,QAAQ,CAAC,WAAoB,EAAE,IAAe;YACpD,IAAA,qBAAM,EAAC,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAA,qBAAM,EAAC,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC;YAEpC,IAAI,SAAS,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC7B,2DAA2D;gBAC3D,sJAAsJ;gBACtJ,iIAAiI;gBACjI,IAAI,CAAC,KAAK,GAAG,IAAI,UAAU,CAAC,mBAAI,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;YACrE,CAAC;iBAAM,CAAC;gBACN,mGAAmG;gBACnG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC5B,KAAK,MAAM,UAAU,IAAI,mBAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;oBACjD,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;KACF;IAvGY,wBAAK,QAuGjB,CAAA;AACH,CAAC,EAjLgB,kBAAkB,kCAAlB,kBAAkB,QAiLlC","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\nimport { assert, CompressedId64Set, Id64, Id64Arg, Id64Set, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { SubCategoryAppearance, SubCategoryResultRow } from \"@itwin/core-common\";\nimport { IModelConnection } from \"./IModelConnection\";\n\n/** A cancelable paginated request for subcategory information.\n * @see SubCategoriesCache\n * @internal\n */\nexport interface SubCategoriesRequest {\n /** The Ids of any categories which were requested but were not yet loaded. */\n readonly missingCategoryIds: Id64Set;\n /** A promise which resolves to true when all of the requested categories have been loaded, or to false if not all categories were loaded.\n * Categories may fail to load if the request is explicitly canceled or if the IModelConnection is closed before all categories are loaded.\n */\n readonly promise: Promise<boolean>;\n /** Cancels the request. */\n cancel(): void;\n}\n\nconst invalidCategoryIdEntry = new Set<string>();\n\n/** A cache of information about the subcategories contained within an [[IModelConnection]]. It is populated on demand.\n * @internal\n */\nexport class SubCategoriesCache {\n private readonly _byCategoryId = new Map<string, Id64Set>();\n private readonly _appearances = new Map<string, SubCategoryAppearance>();\n private readonly _imodel: IModelConnection;\n private _missingAtTimeOfPreload: Id64Set | undefined;\n\n public constructor(imodel: IModelConnection) { this._imodel = imodel; }\n\n /** Get the Ids of all subcategories belonging to the category with the specified Id, or undefined if no such information is present. */\n public getSubCategories(categoryId: string): Id64Set | undefined { return this._byCategoryId.get(categoryId); }\n\n /** Get the base appearance of the subcategory with the specified Id, or undefined if no such information is present. */\n public getSubCategoryAppearance(subCategoryId: Id64String): SubCategoryAppearance | undefined { return this._appearances.get(subCategoryId.toString()); }\n\n /** Request that the subcategory information for all of the specified categories is loaded.\n * If all such information has already been loaded, returns undefined.\n * Otherwise, dispatches an asynchronous request to load those categories which are not already loaded and returns a cancellable request object\n * containing the corresponding promise and the set of categories still to be loaded.\n */\n public load(categoryIds: Id64Arg): SubCategoriesRequest | undefined {\n const missing = this.getMissing(categoryIds);\n if (undefined === missing)\n return undefined;\n\n const request = new SubCategoriesCache.Request(missing, this._imodel);\n const promise = request.dispatch().then((result?: SubCategoriesCache.Result) => {\n if (undefined !== result)\n this.processResults(result, missing);\n\n return !request.wasCanceled;\n });\n return {\n missingCategoryIds: missing,\n promise,\n cancel: () => request.cancel(),\n };\n }\n\n /** Load all subcategories that come from used spatial categories of the iModel into the cache. */\n public async loadAllUsedSpatialSubCategories(): Promise<void> {\n try {\n const results = await this._imodel.queryAllUsedSpatialSubCategories();\n if (undefined !== results) {\n this.processResults(results, new Set<string>(), false);\n }\n } catch {\n // In case of a truncated response, gracefully handle the error and exit.\n }\n\n }\n /** Given categoryIds, return which of these are not cached. */\n private getMissing(categoryIds: Id64Arg): Id64Set | undefined {\n let missing: Id64Set | undefined;\n for (const catId of Id64.iterable(categoryIds)) {\n if (undefined === this._byCategoryId.get(catId)) {\n if (undefined === missing)\n missing = new Set<string>();\n\n missing.add(catId);\n }\n }\n\n return missing;\n }\n\n public clear(): void {\n this._byCategoryId.clear();\n this._appearances.clear();\n }\n\n public onIModelConnectionClose(): void {\n this.clear();\n }\n\n private static createSubCategoryAppearance(json?: any) {\n let props: SubCategoryAppearance.Props | undefined;\n if (\"string\" === typeof json && 0 < json.length)\n props = JSON.parse(json);\n\n return new SubCategoryAppearance(props);\n }\n\n private processResults(result: SubCategoriesCache.Result, missing: Id64Set, override: boolean = true): void {\n for (const row of result) {\n this.add(row.parentId, row.id, SubCategoriesCache.createSubCategoryAppearance(row.appearance), override);\n }\n\n // Ensure that any category Ids which returned no results (e.g., non-existent category, invalid Id, etc) are still recorded so they are not repeatedly re-requested\n for (const id of missing)\n if (undefined === this._byCategoryId.get(id))\n this._byCategoryId.set(id, invalidCategoryIdEntry);\n }\n\n /** Exposed strictly for tests.\n * @internal\n */\n public add(categoryId: string, subCategoryId: string, appearance: SubCategoryAppearance, override: boolean) {\n let set = this._byCategoryId.get(categoryId);\n if (undefined === set)\n this._byCategoryId.set(categoryId, set = new Set<string>());\n\n set.add(subCategoryId);\n if (override || !this._appearances.has(subCategoryId))\n this._appearances.set(subCategoryId, appearance);\n }\n\n public async getCategoryInfo(inputCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.CategoryInfo>> {\n // Eliminate duplicates...\n const categoryIds = new Set<string>(typeof inputCategoryIds === \"string\" ? [inputCategoryIds] : inputCategoryIds);\n const req = this.load(categoryIds);\n if (req)\n await req.promise;\n\n const map = new Map<Id64String, IModelConnection.Categories.CategoryInfo>();\n for (const categoryId of categoryIds) {\n const subCategoryIds = this._byCategoryId.get(categoryId);\n if (!subCategoryIds)\n continue;\n\n const subCategories = this.mapSubCategoryInfos(categoryId, subCategoryIds);\n map.set(categoryId, { id: categoryId, subCategories });\n }\n\n return map;\n }\n\n public async getSubCategoryInfo(categoryId: Id64String, inputSubCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.SubCategoryInfo>> {\n // Eliminate duplicates...\n const subCategoryIds = new Set<string>(typeof inputSubCategoryIds === \"string\" ? [inputSubCategoryIds] : inputSubCategoryIds);\n const req = this.load(categoryId);\n if (req)\n await req.promise;\n\n return this.mapSubCategoryInfos(categoryId, subCategoryIds);\n }\n\n private mapSubCategoryInfos(categoryId: Id64String, subCategoryIds: Set<Id64String>): Map<Id64String, IModelConnection.Categories.SubCategoryInfo> {\n const map = new Map<Id64String, IModelConnection.Categories.SubCategoryInfo>();\n for (const id of subCategoryIds) {\n const appearance = this._appearances.get(id);\n if (appearance)\n map.set(id, { id, categoryId, appearance });\n }\n\n return map;\n }\n}\n\n/** This namespace and the types within it are exported strictly for use in tests.\n * @internal\n */\nexport namespace SubCategoriesCache {\n export type Result = SubCategoryResultRow[];\n\n export class Request {\n private readonly _imodel: IModelConnection;\n private readonly _categoryIds: CompressedId64Set[] = [];\n private readonly _result: Result = [];\n private _canceled = false;\n private _curCategoryIdsIndex = 0;\n\n public get wasCanceled() { return this._canceled || this._imodel.isClosed; }\n\n public constructor(categoryIds: Set<string>, imodel: IModelConnection, maxCategoriesPerQuery = 2500) {\n this._imodel = imodel;\n\n const catIds = [...categoryIds];\n OrderedId64Iterable.sortArray(catIds); // sort categories, so that given the same set of categoryIds we will always create the same batches.\n while (catIds.length !== 0) {\n const end = (catIds.length > maxCategoriesPerQuery) ? maxCategoriesPerQuery : catIds.length;\n const compressedIds = CompressedId64Set.compressArray(catIds.splice(0, end));\n this._categoryIds.push(compressedIds);\n }\n }\n\n public cancel() { this._canceled = true; }\n\n public async dispatch(): Promise<Result | undefined> {\n if (this.wasCanceled || this._curCategoryIdsIndex >= this._categoryIds.length) // handle case of empty category Id set...\n return undefined;\n\n try {\n const catIds = this._categoryIds[this._curCategoryIdsIndex];\n const result = await this._imodel.querySubCategories(catIds);\n this._result.push(...result);\n if (this.wasCanceled)\n return undefined;\n } catch {\n // ###TODO: detect cases in which retry is warranted\n // Note that currently, if we succeed in obtaining some pages of results and fail to retrieve another page, we will end up processing the\n // incomplete results. Since we're not retrying, that's the best we can do.\n }\n\n // Finished with current batch of categoryIds. Dispatch the next batch if one exists.\n if (++this._curCategoryIdsIndex < this._categoryIds.length) {\n if (this.wasCanceled)\n return undefined;\n else\n return this.dispatch();\n }\n\n // Even if we were canceled, we've retrieved all the rows. Might as well process them to prevent another request for some of the same rows from being enqueued.\n return this._result;\n }\n }\n\n export type QueueFunc = () => void;\n\n export class QueueEntry {\n public readonly categoryIds: Id64Set;\n public readonly funcs: QueueFunc[];\n\n public constructor(categoryIds: Id64Set, func: QueueFunc) {\n this.categoryIds = categoryIds;\n this.funcs = [func];\n }\n }\n\n /** A \"queue\" of SubCategoriesRequests, which consists of between 0 and 2 entries. Each entry specifies the set of category IDs to be loaded and a list of functions to be executed\n * when loading is completed. This is used to enforce ordering of operations upon subcategories despite the need to asynchronously load them. It incidentally also provides an\n * opportunity to reduce the number of backend requests by batching consecutive requests.\n * Chiefly used by [[Viewport]].\n * @internal\n */\n export class Queue {\n /* NB: Members marked protected for use in tests only. */\n protected _current?: QueueEntry;\n protected _next?: QueueEntry;\n protected _request?: SubCategoriesRequest;\n protected _disposed = false;\n\n /** Push a request onto the queue. The requested categories will be loaded if necessary, and then\n * the supplied function will be invoked. Any previously-pushed requests are guaranteed to be processed before this one.\n */\n public push(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\n if (this._disposed)\n return;\n else if (undefined === this._current)\n this.pushCurrent(cache, categoryIds, func);\n else\n this.pushNext(categoryIds, func);\n }\n\n /** Cancel all requests and empty the queue. */\n public [Symbol.dispose](): void {\n if (undefined !== this._request) {\n assert(undefined !== this._current);\n this._request.cancel();\n this._request = undefined;\n }\n\n this._current = this._next = undefined;\n this._disposed = true;\n }\n\n public get isEmpty(): boolean {\n return undefined === this._current && undefined === this._next;\n }\n\n private pushCurrent(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\n assert(undefined === this._next);\n assert(undefined === this._current);\n assert(undefined === this._request);\n\n this._request = cache.load(categoryIds);\n if (undefined === this._request) {\n // All requested categories are already loaded.\n func();\n return;\n } else {\n // We need to load the requested categories before invoking the function.\n this.processCurrent(cache, new QueueEntry(Id64.toIdSet(categoryIds, true), func));\n }\n }\n\n private processCurrent(cache: SubCategoriesCache, entry: QueueEntry): void {\n assert(undefined !== this._request);\n assert(undefined === this._current);\n assert(undefined === this._next);\n\n this._current = entry;\n this._request.promise.then((completed: boolean) => { // eslint-disable-line @typescript-eslint/no-floating-promises\n if (this._disposed)\n return;\n\n // Invoke all the functions which were awaiting this set of IModelConnection.Categories.\n assert(undefined !== this._current);\n if (completed)\n for (const func of this._current.funcs)\n func();\n\n this._request = undefined;\n this._current = undefined;\n\n // If we have more requests, process them.\n const next = this._next;\n this._next = undefined;\n if (undefined !== next) {\n this._request = cache.load(next.categoryIds);\n if (undefined === this._request) {\n // All categories loaded.\n for (const func of next.funcs)\n func();\n } else {\n // We need to load the requested categories before invoking the pending functions.\n this.processCurrent(cache, next);\n }\n }\n });\n }\n\n private pushNext(categoryIds: Id64Arg, func: QueueFunc): void {\n assert(undefined !== this._current);\n assert(undefined !== this._request);\n\n if (undefined === this._next) {\n // We have a request currently in process and none pending.\n // We could potentially determine that this request doesn't require any categories that are not already loaded or being loaded by the current request.\n // But we will find that out (synchronously) when current request completes, unless more requests come in. Probably not worth it.\n this._next = new QueueEntry(Id64.toIdSet(categoryIds, true), func);\n } else {\n // We have a request currently in process, and one or more pending. Append this one to the pending.\n this._next.funcs.push(func);\n for (const categoryId of Id64.iterable(categoryIds))\n this._next.categoryIds.add(categoryId);\n }\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SubCategoriesCache.js","sourceRoot":"","sources":["../../src/SubCategoriesCache.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,sDAAyH;AACzH,oDAAiF;AAkBjF,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAU,CAAC;AAEjD;;GAEG;AACH,MAAa,kBAAkB;IACZ,aAAa,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC3C,YAAY,GAAG,IAAI,GAAG,EAAiC,CAAC;IACxD,OAAO,CAAmB;IACnC,uBAAuB,CAAsB;IAErD,YAAmB,MAAwB,IAAI,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;IAEvE,wIAAwI;IACjI,gBAAgB,CAAC,UAAkB,IAAyB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAE/G,wHAAwH;IACjH,wBAAwB,CAAC,aAAyB,IAAuC,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;IAEzJ;;;;OAIG;IACI,IAAI,CAAC,WAAoB;QAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC7C,IAAI,SAAS,KAAK,OAAO;YACvB,OAAO,SAAS,CAAC;QAEnB,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,M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kB,kCAAlB,kBAAkB,QAiLlC","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\nimport { assert, CompressedId64Set, Id64, Id64Arg, Id64Set, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { SubCategoryAppearance, SubCategoryResultRow } from \"@itwin/core-common\";\nimport { IModelConnection } from \"./IModelConnection\";\n\n/** A cancelable paginated request for subcategory information.\n * @see SubCategoriesCache\n * @internal\n */\nexport interface SubCategoriesRequest {\n /** The Ids of any categories which were requested but were not yet loaded. */\n readonly missingCategoryIds: Id64Set;\n /** A promise which resolves to true when all of the requested categories have been loaded, or to false if not all categories were loaded.\n * Categories may fail to load if the request is explicitly canceled or if the IModelConnection is closed before all categories are loaded.\n */\n readonly promise: Promise<boolean>;\n /** Cancels the request. */\n cancel(): void;\n}\n\nconst invalidCategoryIdEntry = new Set<string>();\n\n/** A cache of information about the subcategories contained within an [[IModelConnection]]. It is populated on demand.\n * @internal\n */\nexport class SubCategoriesCache {\n private readonly _byCategoryId = new Map<string, Id64Set>();\n private readonly _appearances = new Map<string, SubCategoryAppearance>();\n private readonly _imodel: IModelConnection;\n private _missingAtTimeOfPreload: Id64Set | undefined;\n\n public constructor(imodel: IModelConnection) { this._imodel = imodel; }\n\n /** Get the Ids of all subcategories belonging to the category with the specified Id, or undefined if no such information is present. */\n public getSubCategories(categoryId: string): Id64Set | undefined { return this._byCategoryId.get(categoryId); }\n\n /** Get the base appearance of the subcategory with the specified Id, or undefined if no such information is present. */\n public getSubCategoryAppearance(subCategoryId: Id64String): SubCategoryAppearance | undefined { return this._appearances.get(subCategoryId.toString()); }\n\n /** Request that the subcategory information for all of the specified categories is loaded.\n * If all such information has already been loaded, returns undefined.\n * Otherwise, dispatches an asynchronous request to load those categories which are not already loaded and returns a cancellable request object\n * containing the corresponding promise and the set of categories still to be loaded.\n */\n public load(categoryIds: Id64Arg): SubCategoriesRequest | undefined {\n const missing = this.getMissing(categoryIds);\n if (undefined === missing)\n return undefined;\n\n const request = new SubCategoriesCache.Request(missing, this._imodel);\n const promise = request.dispatch().then((result?: SubCategoriesCache.Result) => {\n if (undefined !== result)\n this.processResults(result, missing);\n\n return !request.wasCanceled;\n });\n return {\n missingCategoryIds: missing,\n promise,\n cancel: () => request.cancel(),\n };\n }\n\n /** Load all subcategories that come from used spatial categories of the iModel into the cache. */\n public async loadAllUsedSpatialSubCategories(): Promise<void> {\n try {\n const results = await this._imodel.queryAllUsedSpatialSubCategories();\n if (undefined !== results) {\n this.processResults(results, new Set<string>(), false);\n }\n } catch {\n // In case of a truncated response, gracefully handle the error and exit.\n }\n\n }\n /** Given categoryIds, return which of these are not cached. */\n private getMissing(categoryIds: Id64Arg): Id64Set | undefined {\n let missing: Id64Set | undefined;\n for (const catId of Id64.iterable(categoryIds)) {\n if (undefined === this._byCategoryId.get(catId)) {\n if (undefined === missing)\n missing = new Set<string>();\n\n missing.add(catId);\n }\n }\n\n return missing;\n }\n\n public clear(): void {\n this._byCategoryId.clear();\n this._appearances.clear();\n }\n\n public onIModelConnectionClose(): void {\n this.clear();\n }\n\n private static createSubCategoryAppearance(json?: any) {\n let props: SubCategoryAppearance.Props | undefined;\n if (\"string\" === typeof json && 0 < json.length)\n props = JSON.parse(json);\n\n return new SubCategoryAppearance(props);\n }\n\n private processResults(result: SubCategoriesCache.Result, missing: Id64Set, override: boolean = true): void {\n for (const row of result) {\n this.add(row.parentId, row.id, SubCategoriesCache.createSubCategoryAppearance(row.appearance), override);\n }\n\n // Ensure that any category Ids which returned no results (e.g., non-existent category, invalid Id, etc) are still recorded so they are not repeatedly re-requested\n for (const id of missing)\n if (undefined === this._byCategoryId.get(id))\n this._byCategoryId.set(id, invalidCategoryIdEntry);\n }\n\n /** Exposed strictly for tests.\n * @internal\n */\n public add(categoryId: string, subCategoryId: string, appearance: SubCategoryAppearance, override: boolean) {\n let set = this._byCategoryId.get(categoryId);\n if (undefined === set)\n this._byCategoryId.set(categoryId, set = new Set<string>());\n\n set.add(subCategoryId);\n if (override || !this._appearances.has(subCategoryId))\n this._appearances.set(subCategoryId, appearance);\n }\n\n public async getCategoryInfo(inputCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.CategoryInfo>> {\n // Eliminate duplicates...\n const categoryIds = new Set<string>(typeof inputCategoryIds === \"string\" ? [inputCategoryIds] : inputCategoryIds);\n const req = this.load(categoryIds);\n if (req)\n await req.promise;\n\n const map = new Map<Id64String, IModelConnection.Categories.CategoryInfo>();\n for (const categoryId of categoryIds) {\n const subCategoryIds = this._byCategoryId.get(categoryId);\n if (!subCategoryIds)\n continue;\n\n const subCategories = this.mapSubCategoryInfos(categoryId, subCategoryIds);\n map.set(categoryId, { id: categoryId, subCategories });\n }\n\n return map;\n }\n\n public async getSubCategoryInfo(categoryId: Id64String, inputSubCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.SubCategoryInfo>> {\n // Eliminate duplicates...\n const subCategoryIds = new Set<string>(typeof inputSubCategoryIds === \"string\" ? [inputSubCategoryIds] : inputSubCategoryIds);\n const req = this.load(categoryId);\n if (req)\n await req.promise;\n\n return this.mapSubCategoryInfos(categoryId, subCategoryIds);\n }\n\n private mapSubCategoryInfos(categoryId: Id64String, subCategoryIds: Set<Id64String>): Map<Id64String, IModelConnection.Categories.SubCategoryInfo> {\n const map = new Map<Id64String, IModelConnection.Categories.SubCategoryInfo>();\n for (const id of subCategoryIds) {\n const appearance = this._appearances.get(id);\n if (appearance)\n map.set(id, { id, categoryId, appearance });\n }\n\n return map;\n }\n}\n\n/** This namespace and the types within it are exported strictly for use in tests.\n * @internal\n */\nexport namespace SubCategoriesCache {\n export type Result = SubCategoryResultRow[];\n\n export class Request {\n private readonly _imodel: IModelConnection;\n private readonly _categoryIds: CompressedId64Set[] = [];\n private readonly _result: Result = [];\n private _canceled = false;\n private _curCategoryIdsIndex = 0;\n\n public get wasCanceled() { return this._canceled || this._imodel.isClosed; }\n\n public constructor(categoryIds: Set<string>, imodel: IModelConnection, maxCategoriesPerQuery = 2500) {\n this._imodel = imodel;\n\n const catIds = [...categoryIds];\n OrderedId64Iterable.sortArray(catIds); // sort categories, so that given the same set of categoryIds we will always create the same batches.\n while (catIds.length !== 0) {\n const end = (catIds.length > maxCategoriesPerQuery) ? maxCategoriesPerQuery : catIds.length;\n const compressedIds = CompressedId64Set.compressArray(catIds.splice(0, end));\n this._categoryIds.push(compressedIds);\n }\n }\n\n public cancel() { this._canceled = true; }\n\n public async dispatch(): Promise<Result | undefined> {\n if (this.wasCanceled || this._curCategoryIdsIndex >= this._categoryIds.length) // handle case of empty category Id set...\n return undefined;\n\n try {\n const catIds = this._categoryIds[this._curCategoryIdsIndex];\n const result = await this._imodel.querySubCategories(catIds);\n this._result.push(...result);\n if (this.wasCanceled)\n return undefined;\n } catch {\n // ###TODO: detect cases in which retry is warranted\n // Note that currently, if we succeed in obtaining some pages of results and fail to retrieve another page, we will end up processing the\n // incomplete results. Since we're not retrying, that's the best we can do.\n }\n\n // Finished with current batch of categoryIds. Dispatch the next batch if one exists.\n if (++this._curCategoryIdsIndex < this._categoryIds.length) {\n if (this.wasCanceled)\n return undefined;\n else\n return this.dispatch();\n }\n\n // Even if we were canceled, we've retrieved all the rows. Might as well process them to prevent another request for some of the same rows from being enqueued.\n return this._result;\n }\n }\n\n export type QueueFunc = (anySubCategoriesLoaded: boolean) => void;\n\n export class QueueEntry {\n public readonly categoryIds: Id64Set;\n public readonly funcs: QueueFunc[];\n\n public constructor(categoryIds: Id64Set, func: QueueFunc) {\n this.categoryIds = categoryIds;\n this.funcs = [func];\n }\n }\n\n /** A \"queue\" of SubCategoriesRequests, which consists of between 0 and 2 entries. Each entry specifies the set of category IDs to be loaded and a list of functions to be executed\n * when loading is completed. This is used to enforce ordering of operations upon subcategories despite the need to asynchronously load them. It incidentally also provides an\n * opportunity to reduce the number of backend requests by batching consecutive requests.\n * Chiefly used by [[Viewport]].\n * @internal\n */\n export class Queue {\n /* NB: Members marked protected for use in tests only. */\n protected _current?: QueueEntry;\n protected _next?: QueueEntry;\n protected _request?: SubCategoriesRequest;\n protected _disposed = false;\n\n /** Push a request onto the queue. The requested categories will be loaded if necessary, and then\n * the supplied function will be invoked. Any previously-pushed requests are guaranteed to be processed before this one.\n */\n public push(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\n if (this._disposed)\n return;\n else if (undefined === this._current)\n this.pushCurrent(cache, categoryIds, func);\n else\n this.pushNext(categoryIds, func);\n }\n\n /** Cancel all requests and empty the queue. */\n public [Symbol.dispose](): void {\n if (undefined !== this._request) {\n assert(undefined !== this._current);\n this._request.cancel();\n this._request = undefined;\n }\n\n this._current = this._next = undefined;\n this._disposed = true;\n }\n\n public get isEmpty(): boolean {\n return undefined === this._current && undefined === this._next;\n }\n\n private pushCurrent(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\n assert(undefined === this._next);\n assert(undefined === this._current);\n assert(undefined === this._request);\n\n this._request = cache.load(categoryIds);\n if (undefined === this._request) {\n // All requested categories are already loaded.\n func(false);\n return;\n } else {\n // We need to load the requested categories before invoking the function.\n this.processCurrent(cache, new QueueEntry(Id64.toIdSet(categoryIds, true), func));\n }\n }\n\n private processCurrent(cache: SubCategoriesCache, entry: QueueEntry): void {\n assert(undefined !== this._request);\n assert(undefined === this._current);\n assert(undefined === this._next);\n\n this._current = entry;\n this._request.promise.then((completed: boolean) => { // eslint-disable-line @typescript-eslint/no-floating-promises\n if (this._disposed)\n return;\n\n // Invoke all the functions which were awaiting this set of IModelConnection.Categories.\n assert(undefined !== this._current);\n if (completed)\n for (const func of this._current.funcs)\n func(true);\n\n this._request = undefined;\n this._current = undefined;\n\n // If we have more requests, process them.\n const next = this._next;\n this._next = undefined;\n if (undefined !== next) {\n this._request = cache.load(next.categoryIds);\n if (undefined === this._request) {\n // All categories loaded.\n for (const func of next.funcs)\n func(true);\n } else {\n // We need to load the requested categories before invoking the pending functions.\n this.processCurrent(cache, next);\n }\n }\n });\n }\n\n private pushNext(categoryIds: Id64Arg, func: QueueFunc): void {\n assert(undefined !== this._current);\n assert(undefined !== this._request);\n\n if (undefined === this._next) {\n // We have a request currently in process and none pending.\n // We could potentially determine that this request doesn't require any categories that are not already loaded or being loaded by the current request.\n // But we will find that out (synchronously) when current request completes, unless more requests come in. Probably not worth it.\n this._next = new QueueEntry(Id64.toIdSet(categoryIds, true), func);\n } else {\n // We have a request currently in process, and one or more pending. Append this one to the pending.\n this._next.funcs.push(func);\n for (const categoryId of Id64.iterable(categoryIds))\n this._next.categoryIds.add(categoryId);\n }\n }\n }\n}\n"]}
|
package/lib/cjs/ViewManager.d.ts
CHANGED
|
@@ -140,8 +140,10 @@ export declare class ViewManager implements Iterable<ScreenViewport> {
|
|
|
140
140
|
get selectedView(): ScreenViewport | undefined;
|
|
141
141
|
/** Get the first opened view. */
|
|
142
142
|
getFirstOpenView(): ScreenViewport | undefined;
|
|
143
|
-
/** Check if only a single viewport is being used. If so, render directly on-screen using its WebGL canvas. Otherwise, render each view offscreen.
|
|
144
|
-
|
|
143
|
+
/** Check if only a single viewport is being used. If so, render directly on-screen using its WebGL canvas. Otherwise, render each view offscreen.
|
|
144
|
+
* @internal
|
|
145
|
+
*/
|
|
146
|
+
protected updateRenderToScreen(): void;
|
|
145
147
|
/** Add a new Viewport to the list of opened views and create an EventController for it.
|
|
146
148
|
* @param newVp the Viewport to add
|
|
147
149
|
* @returns SUCCESS if vp was successfully added, ERROR if it was already present.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewManager.d.ts","sourceRoot":"","sources":["../../src/ViewManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,mB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
@@ -161,7 +161,9 @@ class ViewManager {
|
|
|
161
161
|
get selectedView() { return this._selectedView; }
|
|
162
162
|
/** Get the first opened view. */
|
|
163
163
|
getFirstOpenView() { return this._viewports.length > 0 ? this._viewports[0] : undefined; }
|
|
164
|
-
/** Check if only a single viewport is being used. If so, render directly on-screen using its WebGL canvas. Otherwise, render each view offscreen.
|
|
164
|
+
/** Check if only a single viewport is being used. If so, render directly on-screen using its WebGL canvas. Otherwise, render each view offscreen.
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
165
167
|
updateRenderToScreen() {
|
|
166
168
|
const renderToScreen = 1 === this._viewports.length;
|
|
167
169
|
for (const vp of this)
|