@itwin/core-backend 4.0.0-dev.94 → 4.0.0-dev.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/lib/cjs/BlobContainerService.d.ts +120 -0
  2. package/lib/cjs/BlobContainerService.d.ts.map +1 -0
  3. package/lib/cjs/BlobContainerService.js +18 -0
  4. package/lib/cjs/BlobContainerService.js.map +1 -0
  5. package/lib/cjs/Category.d.ts +1 -1
  6. package/lib/cjs/Category.js +1 -1
  7. package/lib/cjs/Category.js.map +1 -1
  8. package/lib/cjs/ClassRegistry.js +3 -3
  9. package/lib/cjs/ClassRegistry.js.map +1 -1
  10. package/lib/cjs/CloudSqlite.d.ts +116 -14
  11. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  12. package/lib/cjs/CloudSqlite.js +189 -4
  13. package/lib/cjs/CloudSqlite.js.map +1 -1
  14. package/lib/cjs/CodeService.d.ts +110 -148
  15. package/lib/cjs/CodeService.d.ts.map +1 -1
  16. package/lib/cjs/CodeService.js.map +1 -1
  17. package/lib/cjs/CodeSpecs.js +1 -1
  18. package/lib/cjs/CodeSpecs.js.map +1 -1
  19. package/lib/cjs/DisplayStyle.d.ts +2 -4
  20. package/lib/cjs/DisplayStyle.d.ts.map +1 -1
  21. package/lib/cjs/DisplayStyle.js +4 -6
  22. package/lib/cjs/DisplayStyle.js.map +1 -1
  23. package/lib/cjs/Element.d.ts +9 -17
  24. package/lib/cjs/Element.d.ts.map +1 -1
  25. package/lib/cjs/Element.js +16 -24
  26. package/lib/cjs/Element.js.map +1 -1
  27. package/lib/cjs/ElementAspect.d.ts +1 -2
  28. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  29. package/lib/cjs/ElementAspect.js +2 -3
  30. package/lib/cjs/ElementAspect.js.map +1 -1
  31. package/lib/cjs/Entity.d.ts +12 -16
  32. package/lib/cjs/Entity.d.ts.map +1 -1
  33. package/lib/cjs/Entity.js +18 -35
  34. package/lib/cjs/Entity.js.map +1 -1
  35. package/lib/cjs/ExternalSource.d.ts +1 -2
  36. package/lib/cjs/ExternalSource.d.ts.map +1 -1
  37. package/lib/cjs/ExternalSource.js +2 -3
  38. package/lib/cjs/ExternalSource.js.map +1 -1
  39. package/lib/cjs/IModelHost.d.ts +2 -0
  40. package/lib/cjs/IModelHost.d.ts.map +1 -1
  41. package/lib/cjs/IModelHost.js +2 -0
  42. package/lib/cjs/IModelHost.js.map +1 -1
  43. package/lib/cjs/Model.d.ts +1 -2
  44. package/lib/cjs/Model.d.ts.map +1 -1
  45. package/lib/cjs/Model.js +2 -4
  46. package/lib/cjs/Model.js.map +1 -1
  47. package/lib/cjs/PropertyStore.d.ts +52 -61
  48. package/lib/cjs/PropertyStore.d.ts.map +1 -1
  49. package/lib/cjs/PropertyStore.js +169 -1
  50. package/lib/cjs/PropertyStore.js.map +1 -1
  51. package/lib/cjs/Relationship.d.ts +4 -7
  52. package/lib/cjs/Relationship.d.ts.map +1 -1
  53. package/lib/cjs/Relationship.js +7 -10
  54. package/lib/cjs/Relationship.js.map +1 -1
  55. package/lib/cjs/SQLiteDb.d.ts +106 -8
  56. package/lib/cjs/SQLiteDb.d.ts.map +1 -1
  57. package/lib/cjs/SQLiteDb.js +116 -10
  58. package/lib/cjs/SQLiteDb.js.map +1 -1
  59. package/lib/cjs/ViewDefinition.d.ts +6 -12
  60. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  61. package/lib/cjs/ViewDefinition.js +12 -18
  62. package/lib/cjs/ViewDefinition.js.map +1 -1
  63. package/lib/cjs/core-backend.d.ts +4 -6
  64. package/lib/cjs/core-backend.d.ts.map +1 -1
  65. package/lib/cjs/core-backend.js +4 -6
  66. package/lib/cjs/core-backend.js.map +1 -1
  67. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -1
  68. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +5 -2
  69. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  70. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  71. package/lib/cjs/workspace/Settings.js +2 -1
  72. package/lib/cjs/workspace/Settings.js.map +1 -1
  73. package/package.json +10 -10
@@ -32,9 +32,8 @@ class ModelSelector extends Element_1.DefinitionElement {
32
32
  val.models = this.models;
33
33
  return val;
34
34
  }
35
- /** @internal */
36
- collectReferenceConcreteIds(referenceIds) {
37
- super.collectReferenceConcreteIds(referenceIds);
35
+ collectReferenceIds(referenceIds) {
36
+ super.collectReferenceIds(referenceIds);
38
37
  this.models.forEach((modelId) => referenceIds.addModel(modelId));
39
38
  }
40
39
  /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.
@@ -99,9 +98,8 @@ class CategorySelector extends Element_1.DefinitionElement {
99
98
  val.categories = this.categories;
100
99
  return val;
101
100
  }
102
- /** @internal */
103
- collectReferenceConcreteIds(referenceIds) {
104
- super.collectReferenceConcreteIds(referenceIds);
101
+ collectReferenceIds(referenceIds) {
102
+ super.collectReferenceIds(referenceIds);
105
103
  this.categories.forEach((categoryId) => referenceIds.addElement(categoryId));
106
104
  }
107
105
  /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.
@@ -181,9 +179,8 @@ class ViewDefinition extends (_b = Element_1.DefinitionElement) {
181
179
  json.displayStyleId = this.displayStyleId;
182
180
  return json;
183
181
  }
184
- /** @internal */
185
- collectReferenceConcreteIds(referenceIds) {
186
- super.collectReferenceConcreteIds(referenceIds);
182
+ collectReferenceIds(referenceIds) {
183
+ super.collectReferenceIds(referenceIds);
187
184
  referenceIds.addElement(this.categorySelectorId);
188
185
  referenceIds.addElement(this.displayStyleId);
189
186
  const acsId = this.getAuxiliaryCoordinateSystemId();
@@ -307,9 +304,8 @@ class SpatialViewDefinition extends (_d = ViewDefinition3d) {
307
304
  json.modelSelectorId = this.modelSelectorId;
308
305
  return json;
309
306
  }
310
- /** @internal */
311
- collectReferenceConcreteIds(referenceIds) {
312
- super.collectReferenceConcreteIds(referenceIds);
307
+ collectReferenceIds(referenceIds) {
308
+ super.collectReferenceIds(referenceIds);
313
309
  referenceIds.addElement(this.modelSelectorId);
314
310
  }
315
311
  /** Load this view's ModelSelector from the IModelDb. */
@@ -464,9 +460,8 @@ class ViewDefinition2d extends ViewDefinition {
464
460
  val.angle = this.angle;
465
461
  return val;
466
462
  }
467
- /** @internal */
468
- collectReferenceConcreteIds(referenceIds) {
469
- super.collectReferenceConcreteIds(referenceIds);
463
+ collectReferenceIds(referenceIds) {
464
+ super.collectReferenceIds(referenceIds);
470
465
  referenceIds.addElement(this.baseModelId);
471
466
  }
472
467
  /** Provides access to optional detail settings for this view. */
@@ -627,9 +622,8 @@ class ViewAttachment extends Element_1.GraphicalElement2d {
627
622
  this.view = new core_common_1.RelatedElement(props.view);
628
623
  // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.
629
624
  }
630
- /** @internal */
631
- collectReferenceConcreteIds(referenceIds) {
632
- super.collectReferenceConcreteIds(referenceIds);
625
+ collectReferenceIds(referenceIds) {
626
+ super.collectReferenceIds(referenceIds);
633
627
  referenceIds.addElement(this.view.id);
634
628
  }
635
629
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,sDAA2F;AAC3F,wDAE8B;AAC9B,oDAK4B;AAC5B,uCAA0F;AAK1F;;;;GAIG;AACH,MAAa,aAAc,SAAQ,2BAAiB;IAClD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAI1E,gBAAgB;IAChB,YAAY,KAAyB,EAAE,MAAgB;QACrD,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,gBAAgB;IACA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AAY,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAZD,sDAYC;AAED;;GAEG;AACH,MAAa,cAAe,SAAQ,4BAAkB;IACpD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC;IAE3E,YAAmB,KAA0B,EAAE,MAAgB;QAC7D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,4BAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3C,0GAA0G;IAC5G,CAAC;IACD,gBAAgB;IACG,2BAA2B,CAAC,YAAgC;QAC7E,KAAK,CAAC,2BAA2B,CAAC,YAAY,CAAC,CAAC;QAChD,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;CACF;AAdD,wCAcC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,gCAAsB;IACvD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAG1E,gBAAgB;IAChB,YAAY,KAAyB,EAAE,MAAgB,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CACnF;AAPD,sCAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ViewDefinitions\r\n */\r\n\r\nimport { Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\r\nimport {\r\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\r\n} from \"@itwin/core-geometry\";\r\nimport {\r\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\r\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\r\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\r\n ViewDetails3d,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\n\r\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\r\n * @see [ModelSelectorState]($frontend)\r\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\r\n * @public\r\n */\r\nexport class ModelSelector extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"ModelSelector\"; }\r\n\r\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\r\n public models: Id64String[];\r\n /** @internal */\r\n constructor(props: ModelSelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.models = props.models;\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ModelSelectorProps {\r\n const val = super.toJSON() as ModelSelectorProps;\r\n val.models = this.models;\r\n return val;\r\n }\r\n\r\n /** @internal */\r\n protected override collectReferenceConcreteIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceConcreteIds(referenceIds);\r\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\r\n }\r\n\r\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\r\n * @param codeValue The ModelSelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The newly constructed ModelSelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\r\n const modelSelectorProps: ModelSelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n models,\r\n isPrivate: false,\r\n };\r\n return new ModelSelector(modelSelectorProps, iModelDb);\r\n }\r\n /**\r\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The Id of the newly inserted ModelSelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\r\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\r\n return iModelDb.elements.insertElement(modelSelector.toJSON());\r\n }\r\n}\r\n\r\n/** Holds a list of Ids of Categories to be displayed in a view.\r\n * @see [CategorySelectorState]($frontend)\r\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\r\n * @public\r\n */\r\nexport class CategorySelector extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"CategorySelector\"; }\r\n /** The array of element Ids of the Categories selected by this CategorySelector */\r\n public categories: Id64String[];\r\n /** @internal */\r\n constructor(props: CategorySelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.categories = props.categories;\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): CategorySelectorProps {\r\n const val = super.toJSON() as CategorySelectorProps;\r\n val.categories = this.categories;\r\n return val;\r\n }\r\n\r\n /** @internal */\r\n protected override collectReferenceConcreteIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceConcreteIds(referenceIds);\r\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\r\n }\r\n\r\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\r\n * @param codeValue The CategorySelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The newly constructed CategorySelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\r\n const categorySelectorProps: CategorySelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n categories,\r\n isPrivate: false,\r\n };\r\n return new CategorySelector(categorySelectorProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The Id of the newly inserted CategorySelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\r\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\r\n return iModelDb.elements.insertElement(categorySelector.toJSON());\r\n }\r\n}\r\n\r\n/**\r\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\r\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\r\n *\r\n * Subclasses of ViewDefinition determine which model(s) are viewed.\r\n *\r\n * **Example: Obtaining the background color for a view**\r\n * ``` ts\r\n * [[include:ViewDefinition.getBackgroundColor]]\r\n * ```\r\n *\r\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\r\n * @public\r\n */\r\nexport abstract class ViewDefinition extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition\"; }\r\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\r\n public categorySelectorId: Id64String;\r\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\r\n public displayStyleId: Id64String;\r\n\r\n /** @internal */\r\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n\r\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\r\n if (!Id64.isValid(this.categorySelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\r\n\r\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\r\n if (!Id64.isValid(this.displayStyleId))\r\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ViewDefinitionProps {\r\n const json = super.toJSON() as ViewDefinitionProps;\r\n json.categorySelectorId = this.categorySelectorId;\r\n json.displayStyleId = this.displayStyleId;\r\n return json;\r\n }\r\n\r\n /** @internal */\r\n protected override collectReferenceConcreteIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceConcreteIds(referenceIds);\r\n referenceIds.addElement(this.categorySelectorId);\r\n referenceIds.addElement(this.displayStyleId);\r\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\r\n if (Id64.isValidId64(acsId)) {\r\n referenceIds.addElement(acsId);\r\n }\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n categorySelectorId: ConcreteEntityTypes.Element,\r\n displayStyleId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** @internal */\r\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\r\n super.onCloned(context, sourceElementProps, targetElementProps);\r\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\r\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\r\n if (Id64.isValidId64(acsId)) {\r\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\r\n }\r\n }\r\n }\r\n\r\n /** Type guard for `instanceof ViewDefinition3d` */\r\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\r\n /** Type guard for 'instanceof ViewDefinition2d` */\r\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\r\n /** Type guard for `instanceof SpatialViewDefinition` */\r\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\r\n /** Type guard for 'instanceof DrawingViewDefinition' */\r\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\r\n\r\n /** Load this view's DisplayStyle from the IModelDb. */\r\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\r\n\r\n /** Load this view's CategorySelector from the IModelDb. */\r\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public abstract get details(): ViewDetails;\r\n\r\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\r\n public getAuxiliaryCoordinateSystemId(): Id64String {\r\n return this.details.auxiliaryCoordinateSystemId;\r\n }\r\n\r\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\r\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\r\n */\r\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\r\n this.details.auxiliaryCoordinateSystemId = acsId;\r\n }\r\n\r\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\r\n * @param codeValue The ViewDefinition name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Defines a view of one or more 3d models.\r\n * @public\r\n */\r\nexport abstract class ViewDefinition3d extends ViewDefinition {\r\n private readonly _details: ViewDetails3d;\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition3d\"; }\r\n /** If true, camera is used. Otherwise, use an orthographic projection. */\r\n public cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n public origin: Point3d;\r\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\r\n public extents: Vector3d;\r\n /** Rotation from world coordinates to view coordinates. */\r\n public angles: YawPitchRollAngles;\r\n /** The camera used for this view, if `cameraOn` is true. */\r\n public camera: Camera;\r\n\r\n /** @internal */\r\n public constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\r\n this.origin = Point3d.fromJSON(props.origin);\r\n this.extents = Vector3d.fromJSON(props.extents);\r\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\r\n this.camera = new Camera(props.camera);\r\n this._details = new ViewDetails3d(this.jsonProperties);\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ViewDefinition3dProps {\r\n const val = super.toJSON() as ViewDefinition3dProps;\r\n val.cameraOn = this.cameraOn;\r\n val.origin = this.origin;\r\n val.extents = this.extents;\r\n val.angles = this.angles;\r\n val.camera = this.camera;\r\n return val;\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails3d { return this._details; }\r\n\r\n /** Load this view's DisplayStyle3d from the IModelDb. */\r\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of one or more SpatialModels.\r\n * The list of viewed models is stored by the ModelSelector.\r\n *\r\n * This is how a SpatialViewDefinition selects the elements to display:\r\n *\r\n * SpatialViewDefinition\r\n * * ModelSelector\r\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\r\n * * CategorySelector\r\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\r\n * @public\r\n */\r\nexport class SpatialViewDefinition extends ViewDefinition3d {\r\n /** @internal */\r\n public static override get className(): string { return \"SpatialViewDefinition\"; }\r\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\r\n public modelSelectorId: Id64String;\r\n\r\n /** @internal */\r\n public constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\r\n if (!Id64.isValid(this.modelSelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\r\n }\r\n\r\n /** Construct a SpatialViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\r\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n /** Convert this view to its JSON representation. */\r\n public override toJSON(): SpatialViewDefinitionProps {\r\n const json = super.toJSON() as SpatialViewDefinitionProps;\r\n json.modelSelectorId = this.modelSelectorId;\r\n return json;\r\n }\r\n\r\n /** @internal */\r\n protected override collectReferenceConcreteIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceConcreteIds(referenceIds);\r\n referenceIds.addElement(this.modelSelectorId);\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\r\n\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n modelSelectorId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** Load this view's ModelSelector from the IModelDb. */\r\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\r\n /**\r\n * Create a SpatialViewDefinition with the camera turned on.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @param cameraAngle Camera angle in radians.\r\n * @returns The newly constructed SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\r\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\r\n cameraLocation.z += cameraDistance; // Back up by camera distance.\r\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\r\n\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: true,\r\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\r\n };\r\n\r\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n /**\r\n * Insert an SpatialViewDefinition with the camera turned on.\r\n * @see [[createWithCamera]] for details.\r\n * @returns The Id of the newly inserted SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\r\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\r\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\r\n * @public\r\n */\r\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\r\n /** @internal */\r\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\r\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\r\n /**\r\n * Create an OrthographicViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The newly constructed OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: false,\r\n camera: new Camera(), // not used when cameraOn === false\r\n };\r\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert an OrthographicViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The Id of the newly inserted OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n\r\n /** Set a new viewed range without changing the rotation or any other properties. */\r\n public setRange(range: Range3d): void {\r\n const rotation = this.angles.toMatrix3d();\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\r\n this.extents = rotatedRange.diagonal();\r\n }\r\n}\r\n\r\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\r\n * @public\r\n */\r\nexport class ViewDefinition2d extends ViewDefinition {\r\n private readonly _details: ViewDetails;\r\n\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition2d\"; }\r\n /** The Id of the Model displayed by this view. */\r\n public baseModelId: Id64String;\r\n /** The lower-left corner of this view in Model coordinates. */\r\n public origin: Point2d;\r\n /** The delta (size) of this view, in meters, aligned with view x,y. */\r\n public delta: Point2d;\r\n /** The rotation of this view. */\r\n public angle: Angle;\r\n\r\n /** @internal */\r\n public constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.baseModelId = Id64.fromJSON(props.baseModelId);\r\n this.origin = Point2d.fromJSON(props.origin);\r\n this.delta = Point2d.fromJSON(props.delta);\r\n this.angle = Angle.fromJSON(props.angle);\r\n this._details = new ViewDetails(this.jsonProperties);\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ViewDefinition2dProps {\r\n const val = super.toJSON() as ViewDefinition2dProps;\r\n val.baseModelId = this.baseModelId;\r\n val.origin = this.origin;\r\n val.delta = this.delta;\r\n val.angle = this.angle;\r\n return val;\r\n }\r\n\r\n /** @internal */\r\n protected override collectReferenceConcreteIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceConcreteIds(referenceIds);\r\n referenceIds.addElement(this.baseModelId);\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails { return this._details; }\r\n\r\n /** Load this view's DisplayStyle2d from the IModelDb. */\r\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of a [[DrawingModel]].\r\n * @public\r\n */\r\nexport class DrawingViewDefinition extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"DrawingViewDefinition\"; }\r\n /** @internal */\r\n public constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n /** Create a DrawingViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is a problem creating the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\r\n const viewDefinitionProps: ViewDefinition2dProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n baseModelId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: { x: range.low.x, y: range.low.y },\r\n delta: range.diagonal(),\r\n angle: 0,\r\n };\r\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /** Construct a DrawingViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\r\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n /** Insert a DrawingViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a view of a [[SheetModel]].\r\n * @public\r\n */\r\nexport class SheetViewDefinition extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"SheetViewDefinition\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 2d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 3d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\r\n /** @internal */\r\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\r\n}\r\n\r\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\r\n * coordinate information in different units and/or orientations.\r\n * @public\r\n */\r\nexport abstract class AuxCoordSystem extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem\"; }\r\n public type!: number;\r\n public description?: string;\r\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** A 2d auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystem2d extends AuxCoordSystem {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\r\n public origin?: Point2d;\r\n public angle!: number;\r\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem2d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A 3d auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystem3d extends AuxCoordSystem {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\r\n public origin?: Point3d;\r\n public yaw!: number;\r\n public pitch!: number;\r\n public roll!: number;\r\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem3d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A spatial auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\r\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystemSpatial name\r\n */\r\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\r\n * @public\r\n */\r\nexport class ViewAttachment extends GraphicalElement2d {\r\n /** @internal */\r\n public static override get className(): string { return \"ViewAttachment\"; }\r\n public view: RelatedElement;\r\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.view = new RelatedElement(props.view);\r\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\r\n }\r\n /** @internal */\r\n protected override collectReferenceConcreteIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceConcreteIds(referenceIds);\r\n referenceIds.addElement(this.view.id);\r\n }\r\n}\r\n\r\n/** The position in space of a Light.\r\n * @internal\r\n */\r\nexport class LightLocation extends SpatialLocationElement {\r\n /** @internal */\r\n public static override get className(): string { return \"LightLocation\"; }\r\n /** Whether this light is currently turned on. */\r\n public enabled!: boolean;\r\n /** @internal */\r\n constructor(props: LightLocationProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n"]}
1
+ {"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,sDAA2F;AAC3F,wDAE8B;AAC9B,oDAK4B;AAC5B,uCAA0F;AAK1F;;;;GAIG;AACH,MAAa,aAAc,SAAQ,2BAAiB;IAClD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAI1E,gBAAgB;IAChB,YAAY,KAAyB,EAAE,MAAgB;QACrD,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAwB,CAAC;QACjD,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,OAAO,GAAG,CAAC;IACb,CAAC;IAEkB,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAmB,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/E,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,MAAgB,EAAE,YAA4B,EAAE,SAAiB;QACxF,MAAM,QAAQ,GAAa,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AAC,CAAC;IACxC,CAAC;CACF;AAbD,wCAaC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,gCAAsB;IACvD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAG1E,gBAAgB;IAChB,YAAY,KAAyB,EAAE,MAAgB,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CACnF;AAPD,sCAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ViewDefinitions\r\n */\r\n\r\nimport { Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\r\nimport {\r\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\r\n} from \"@itwin/core-geometry\";\r\nimport {\r\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\r\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\r\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\r\n ViewDetails3d,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\n\r\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\r\n * @see [ModelSelectorState]($frontend)\r\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\r\n * @public\r\n */\r\nexport class ModelSelector extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"ModelSelector\"; }\r\n\r\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\r\n public models: Id64String[];\r\n /** @internal */\r\n constructor(props: ModelSelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.models = props.models;\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ModelSelectorProps {\r\n const val = super.toJSON() as ModelSelectorProps;\r\n val.models = this.models;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\r\n }\r\n\r\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\r\n * @param codeValue The ModelSelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The newly constructed ModelSelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\r\n const modelSelectorProps: ModelSelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n models,\r\n isPrivate: false,\r\n };\r\n return new ModelSelector(modelSelectorProps, iModelDb);\r\n }\r\n /**\r\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The Id of the newly inserted ModelSelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\r\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\r\n return iModelDb.elements.insertElement(modelSelector.toJSON());\r\n }\r\n}\r\n\r\n/** Holds a list of Ids of Categories to be displayed in a view.\r\n * @see [CategorySelectorState]($frontend)\r\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\r\n * @public\r\n */\r\nexport class CategorySelector extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"CategorySelector\"; }\r\n /** The array of element Ids of the Categories selected by this CategorySelector */\r\n public categories: Id64String[];\r\n /** @internal */\r\n constructor(props: CategorySelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.categories = props.categories;\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): CategorySelectorProps {\r\n const val = super.toJSON() as CategorySelectorProps;\r\n val.categories = this.categories;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\r\n }\r\n\r\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\r\n * @param codeValue The CategorySelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The newly constructed CategorySelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\r\n const categorySelectorProps: CategorySelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n categories,\r\n isPrivate: false,\r\n };\r\n return new CategorySelector(categorySelectorProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The Id of the newly inserted CategorySelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\r\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\r\n return iModelDb.elements.insertElement(categorySelector.toJSON());\r\n }\r\n}\r\n\r\n/**\r\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\r\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\r\n *\r\n * Subclasses of ViewDefinition determine which model(s) are viewed.\r\n *\r\n * **Example: Obtaining the background color for a view**\r\n * ``` ts\r\n * [[include:ViewDefinition.getBackgroundColor]]\r\n * ```\r\n *\r\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\r\n * @public\r\n */\r\nexport abstract class ViewDefinition extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition\"; }\r\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\r\n public categorySelectorId: Id64String;\r\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\r\n public displayStyleId: Id64String;\r\n\r\n /** @internal */\r\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n\r\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\r\n if (!Id64.isValid(this.categorySelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\r\n\r\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\r\n if (!Id64.isValid(this.displayStyleId))\r\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ViewDefinitionProps {\r\n const json = super.toJSON() as ViewDefinitionProps;\r\n json.categorySelectorId = this.categorySelectorId;\r\n json.displayStyleId = this.displayStyleId;\r\n return json;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.categorySelectorId);\r\n referenceIds.addElement(this.displayStyleId);\r\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\r\n if (Id64.isValidId64(acsId)) {\r\n referenceIds.addElement(acsId);\r\n }\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n categorySelectorId: ConcreteEntityTypes.Element,\r\n displayStyleId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** @internal */\r\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\r\n super.onCloned(context, sourceElementProps, targetElementProps);\r\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\r\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\r\n if (Id64.isValidId64(acsId)) {\r\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\r\n }\r\n }\r\n }\r\n\r\n /** Type guard for `instanceof ViewDefinition3d` */\r\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\r\n /** Type guard for 'instanceof ViewDefinition2d` */\r\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\r\n /** Type guard for `instanceof SpatialViewDefinition` */\r\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\r\n /** Type guard for 'instanceof DrawingViewDefinition' */\r\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\r\n\r\n /** Load this view's DisplayStyle from the IModelDb. */\r\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\r\n\r\n /** Load this view's CategorySelector from the IModelDb. */\r\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public abstract get details(): ViewDetails;\r\n\r\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\r\n public getAuxiliaryCoordinateSystemId(): Id64String {\r\n return this.details.auxiliaryCoordinateSystemId;\r\n }\r\n\r\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\r\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\r\n */\r\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\r\n this.details.auxiliaryCoordinateSystemId = acsId;\r\n }\r\n\r\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\r\n * @param codeValue The ViewDefinition name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Defines a view of one or more 3d models.\r\n * @public\r\n */\r\nexport abstract class ViewDefinition3d extends ViewDefinition {\r\n private readonly _details: ViewDetails3d;\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition3d\"; }\r\n /** If true, camera is used. Otherwise, use an orthographic projection. */\r\n public cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n public origin: Point3d;\r\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\r\n public extents: Vector3d;\r\n /** Rotation from world coordinates to view coordinates. */\r\n public angles: YawPitchRollAngles;\r\n /** The camera used for this view, if `cameraOn` is true. */\r\n public camera: Camera;\r\n\r\n /** @internal */\r\n public constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\r\n this.origin = Point3d.fromJSON(props.origin);\r\n this.extents = Vector3d.fromJSON(props.extents);\r\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\r\n this.camera = new Camera(props.camera);\r\n this._details = new ViewDetails3d(this.jsonProperties);\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ViewDefinition3dProps {\r\n const val = super.toJSON() as ViewDefinition3dProps;\r\n val.cameraOn = this.cameraOn;\r\n val.origin = this.origin;\r\n val.extents = this.extents;\r\n val.angles = this.angles;\r\n val.camera = this.camera;\r\n return val;\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails3d { return this._details; }\r\n\r\n /** Load this view's DisplayStyle3d from the IModelDb. */\r\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of one or more SpatialModels.\r\n * The list of viewed models is stored by the ModelSelector.\r\n *\r\n * This is how a SpatialViewDefinition selects the elements to display:\r\n *\r\n * SpatialViewDefinition\r\n * * ModelSelector\r\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\r\n * * CategorySelector\r\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\r\n * @public\r\n */\r\nexport class SpatialViewDefinition extends ViewDefinition3d {\r\n /** @internal */\r\n public static override get className(): string { return \"SpatialViewDefinition\"; }\r\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\r\n public modelSelectorId: Id64String;\r\n\r\n /** @internal */\r\n public constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\r\n if (!Id64.isValid(this.modelSelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\r\n }\r\n\r\n /** Construct a SpatialViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\r\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n /** Convert this view to its JSON representation. */\r\n public override toJSON(): SpatialViewDefinitionProps {\r\n const json = super.toJSON() as SpatialViewDefinitionProps;\r\n json.modelSelectorId = this.modelSelectorId;\r\n return json;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.modelSelectorId);\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\r\n\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n modelSelectorId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** Load this view's ModelSelector from the IModelDb. */\r\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\r\n /**\r\n * Create a SpatialViewDefinition with the camera turned on.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @param cameraAngle Camera angle in radians.\r\n * @returns The newly constructed SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\r\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\r\n cameraLocation.z += cameraDistance; // Back up by camera distance.\r\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\r\n\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: true,\r\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\r\n };\r\n\r\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n /**\r\n * Insert an SpatialViewDefinition with the camera turned on.\r\n * @see [[createWithCamera]] for details.\r\n * @returns The Id of the newly inserted SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\r\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\r\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\r\n * @public\r\n */\r\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\r\n /** @internal */\r\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\r\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\r\n /**\r\n * Create an OrthographicViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The newly constructed OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: false,\r\n camera: new Camera(), // not used when cameraOn === false\r\n };\r\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert an OrthographicViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The Id of the newly inserted OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n\r\n /** Set a new viewed range without changing the rotation or any other properties. */\r\n public setRange(range: Range3d): void {\r\n const rotation = this.angles.toMatrix3d();\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\r\n this.extents = rotatedRange.diagonal();\r\n }\r\n}\r\n\r\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\r\n * @public\r\n */\r\nexport class ViewDefinition2d extends ViewDefinition {\r\n private readonly _details: ViewDetails;\r\n\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition2d\"; }\r\n /** The Id of the Model displayed by this view. */\r\n public baseModelId: Id64String;\r\n /** The lower-left corner of this view in Model coordinates. */\r\n public origin: Point2d;\r\n /** The delta (size) of this view, in meters, aligned with view x,y. */\r\n public delta: Point2d;\r\n /** The rotation of this view. */\r\n public angle: Angle;\r\n\r\n /** @internal */\r\n public constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.baseModelId = Id64.fromJSON(props.baseModelId);\r\n this.origin = Point2d.fromJSON(props.origin);\r\n this.delta = Point2d.fromJSON(props.delta);\r\n this.angle = Angle.fromJSON(props.angle);\r\n this._details = new ViewDetails(this.jsonProperties);\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ViewDefinition2dProps {\r\n const val = super.toJSON() as ViewDefinition2dProps;\r\n val.baseModelId = this.baseModelId;\r\n val.origin = this.origin;\r\n val.delta = this.delta;\r\n val.angle = this.angle;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.baseModelId);\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails { return this._details; }\r\n\r\n /** Load this view's DisplayStyle2d from the IModelDb. */\r\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of a [[DrawingModel]].\r\n * @public\r\n */\r\nexport class DrawingViewDefinition extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"DrawingViewDefinition\"; }\r\n /** @internal */\r\n public constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n /** Create a DrawingViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is a problem creating the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\r\n const viewDefinitionProps: ViewDefinition2dProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n baseModelId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: { x: range.low.x, y: range.low.y },\r\n delta: range.diagonal(),\r\n angle: 0,\r\n };\r\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /** Construct a DrawingViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\r\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n /** Insert a DrawingViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a view of a [[SheetModel]].\r\n * @public\r\n */\r\nexport class SheetViewDefinition extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"SheetViewDefinition\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 2d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 3d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\r\n /** @internal */\r\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\r\n}\r\n\r\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\r\n * coordinate information in different units and/or orientations.\r\n * @public\r\n */\r\nexport abstract class AuxCoordSystem extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem\"; }\r\n public type!: number;\r\n public description?: string;\r\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** A 2d auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystem2d extends AuxCoordSystem {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\r\n public origin?: Point2d;\r\n public angle!: number;\r\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem2d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A 3d auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystem3d extends AuxCoordSystem {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\r\n public origin?: Point3d;\r\n public yaw!: number;\r\n public pitch!: number;\r\n public roll!: number;\r\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem3d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A spatial auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\r\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystemSpatial name\r\n */\r\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\r\n * @public\r\n */\r\nexport class ViewAttachment extends GraphicalElement2d {\r\n /** @internal */\r\n public static override get className(): string { return \"ViewAttachment\"; }\r\n public view: RelatedElement;\r\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.view = new RelatedElement(props.view);\r\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\r\n }\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.view.id);\r\n }\r\n}\r\n\r\n/** The position in space of a Light.\r\n * @internal\r\n */\r\nexport class LightLocation extends SpatialLocationElement {\r\n /** @internal */\r\n public static override get className(): string { return \"LightLocation\"; }\r\n /** Whether this light is currently turned on. */\r\n public enabled!: boolean;\r\n /** @internal */\r\n constructor(props: LightLocationProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n"]}
@@ -2,6 +2,7 @@ export { IModelJsNative, NativeCloudSqlite, NativeLoggerCategory } from "@bentle
2
2
  export * from "./BackendHubAccess";
3
3
  export * from "./BackendLoggerCategory";
4
4
  export * from "./BisCoreSchema";
5
+ export * from "./BlobContainerService";
5
6
  export * from "./BriefcaseManager";
6
7
  export * from "./Category";
7
8
  export * from "./ChangedElementsDb";
@@ -10,6 +11,7 @@ export * from "./ChannelControl";
10
11
  export * from "./CheckpointManager";
11
12
  export * from "./ClassRegistry";
12
13
  export * from "./CloudSqlite";
14
+ export * from "./CodeService";
13
15
  export * from "./CodeSpecs";
14
16
  export * from "./DevTools";
15
17
  export * from "./DisplayStyle";
@@ -150,12 +152,8 @@ export * from "./workspace/Workspace";
150
152
  * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).
151
153
  */
152
154
  /**
153
- * @docs-group-description CloudStorageBackend
154
- * Classes for working with cloud storage.
155
- */
156
- /**
157
- * @docs-group-description AliCloudStorageService
158
- * Classes for working with cloud storage using AliCloud.
155
+ * @docs-group-description BlobContainers
156
+ * Classes for working with cloud-based blob containers.
159
157
  */
160
158
  /**
161
159
  * @docs-group-description TileStorage
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEnG,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,C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AAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AAEtC;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "NativeLoggerCategory", { enumerable: true, get:
26
26
  __exportStar(require("./BackendHubAccess"), exports);
27
27
  __exportStar(require("./BackendLoggerCategory"), exports);
28
28
  __exportStar(require("./BisCoreSchema"), exports);
29
+ __exportStar(require("./BlobContainerService"), exports);
29
30
  __exportStar(require("./BriefcaseManager"), exports);
30
31
  __exportStar(require("./Category"), exports);
31
32
  __exportStar(require("./ChangedElementsDb"), exports);
@@ -34,6 +35,7 @@ __exportStar(require("./ChannelControl"), exports);
34
35
  __exportStar(require("./CheckpointManager"), exports);
35
36
  __exportStar(require("./ClassRegistry"), exports);
36
37
  __exportStar(require("./CloudSqlite"), exports);
38
+ __exportStar(require("./CodeService"), exports);
37
39
  __exportStar(require("./CodeSpecs"), exports);
38
40
  __exportStar(require("./DevTools"), exports);
39
41
  __exportStar(require("./DisplayStyle"), exports);
@@ -174,12 +176,8 @@ __exportStar(require("./workspace/Workspace"), exports);
174
176
  * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).
175
177
  */
176
178
  /**
177
- * @docs-group-description CloudStorageBackend
178
- * Classes for working with cloud storage.
179
- */
180
- /**
181
- * @docs-group-description AliCloudStorageService
182
- * Classes for working with cloud storage using AliCloud.
179
+ * @docs-group-description BlobContainers
180
+ * Classes for working with cloud-based blob containers.
183
181
  */
184
182
  /**
185
183
  * @docs-group-description TileStorage
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F,4DAAmG;AAA1F,iHAAA,cAAc,OAAA;AAAE,oHAAA,iBAAiB,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAEhE,qDAAmC;AACnC,0DAAwC;AACxC,kDAAgC;AAChC,qDAAmC;AACnC,6CAA2B;AAC3B,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,6CAA2B;AAC3B,iDAA+B;AAC/B,+DAA6C;AAC7C,6DAA2C;AAC3C,4DAA0C;AAC1C,0DAAwC;AACxC,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC;AACpC,2CAAyB;AACzB,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,4CAA0B;AAC1B,uDAAqC;AACrC,6CAA2B;AAC3B,8DAA4C;AAC5C,+CAA6B;AAC7B,+CAA6B;AAC7B,4CAA0B;AAC1B,8CAA4B;AAC5B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,0CAAwB;AACxB,qDAAmC;AACnC,+CAA6B;AAC7B,2DAAyC;AACzC,kDAAgC;AAChC,iDAA+B;AAC/B,gDAA8B;AAC9B,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,4CAA0B;AAC1B,gDAA8B;AAC9B,+CAA6B;AAC7B,mDAAiC;AACjC,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AAEtC;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport { IModelJsNative, NativeCloudSqlite, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\n\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./ChannelControl\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CloudSqlite\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./ElementTreeWalker\";\r\nexport * from \"./Entity\";\r\nexport * from \"./EntityReferences\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./GeoCoordConfig\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelDb\";\r\nexport * from \"./IModelElementCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./PropertyStore\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./rpc/tracing\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TileStorage\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description CloudStorageBackend\r\n * Classes for working with cloud storage.\r\n */\r\n/**\r\n * @docs-group-description AliCloudStorageService\r\n * Classes for working with cloud storage using AliCloud.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
1
+ {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F,4DAAmG;AAA1F,iHAAA,cAAc,OAAA;AAAE,oHAAA,iBAAiB,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAEhE,qDAAmC;AACnC,0DAAwC;AACxC,kDAAgC;AAChC,yDAAuC;AACvC,qDAAmC;AACnC,6CAA2B;AAC3B,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,gDAA8B;AAC9B,8CAA4B;AAC5B,6CAA2B;AAC3B,iDAA+B;AAC/B,+DAA6C;AAC7C,6DAA2C;AAC3C,4DAA0C;AAC1C,0DAAwC;AACxC,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC;AACpC,2CAAyB;AACzB,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,4CAA0B;AAC1B,uDAAqC;AACrC,6CAA2B;AAC3B,8DAA4C;AAC5C,+CAA6B;AAC7B,+CAA6B;AAC7B,4CAA0B;AAC1B,8CAA4B;AAC5B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,0CAAwB;AACxB,qDAAmC;AACnC,+CAA6B;AAC7B,2DAAyC;AACzC,kDAAgC;AAChC,iDAA+B;AAC/B,gDAA8B;AAC9B,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,4CAA0B;AAC1B,gDAA8B;AAC9B,+CAA6B;AAC7B,mDAAiC;AACjC,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AAEtC;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport { IModelJsNative, NativeCloudSqlite, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\n\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./BlobContainerService\";\r\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./ChannelControl\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CloudSqlite\";\r\nexport * from \"./CodeService\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./ElementTreeWalker\";\r\nexport * from \"./Entity\";\r\nexport * from \"./EntityReferences\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./GeoCoordConfig\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelDb\";\r\nexport * from \"./IModelElementCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./PropertyStore\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./rpc/tracing\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TileStorage\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description BlobContainers\r\n * Classes for working with cloud-based blob containers.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IModelTileRpcImpl.d.ts","sourceRoot":"","sources":["../../../src/rpc-impl/IModelTileRpcImpl.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAmC,SAAS,EAAU,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,2BAA2B,EAAE,cAAc,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,YAAY,EAAkC,qBAAqB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC3P,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAgLjE,gBAAgB;AAChB,qBAAa,iBAAkB,SAAQ,YAAa,YAAW,sBAAsB;WACrE,QAAQ;IAET,oBAAoB,CAAC,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAI9F,cAAc,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAa1F,mBAAmB,CAAC,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIxI,mBAAmB,CAAC,UAAU,EAAE,cAAc,EAAE,GAAG,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC;IAKhG,kBAAkB,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAOnF,gBAAgB,IAAI,OAAO,CAAC,eAAe,CAAC;IAIzD,gBAAgB;IACH,sBAAsB,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,2BAA2B,GAAG,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B;IACH,sBAAsB,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;CAIrI;AAED,gBAAgB;AAChB,wBAAsB,yBAAyB,CAAC,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAa3H"}
@@ -96,11 +96,14 @@ async function getTileContent(props) {
96
96
  const tile = await db.tiles.requestTileContent(props.treeId, props.contentId);
97
97
  // ###TODO: Verify the guid supplied by the front-end matches the guid stored in the model?
98
98
  if (IModelHost_1.IModelHost.usingExternalTileCache) {
99
- await IModelHost_1.IModelHost.tileStorage?.uploadTile(db.iModelId, db.changeset.id, props.treeId, props.contentId, tile.content, props.guid, {
99
+ const tileMetadata = {
100
100
  backendName: IModelHost_1.IModelHost.applicationId,
101
101
  tileGenerationTime: tile.elapsedSeconds.toString(),
102
102
  tileSize: tile.content.byteLength.toString(),
103
- });
103
+ };
104
+ await IModelHost_1.IModelHost.tileStorage?.uploadTile(db.iModelId, db.changeset.id, props.treeId, props.contentId, tile.content, props.guid, tileMetadata);
105
+ const { accessToken: _, ...safeProps } = props;
106
+ core_bentley_1.Logger.logInfo(BackendLoggerCategory_1.BackendLoggerCategory.IModelTileRequestRpc, "Generated and uploaded tile", { tileMetadata, ...safeProps });
104
107
  return core_common_1.TileContentSource.ExternalCache;
105
108
  }
106
109
  return core_common_1.TileContentSource.Backend;
@@ -1 +1 @@
1
- {"version":3,"file":"IModelTileRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/IModelTileRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyF;AACzF,oDAA2P;AAE3P,oEAAiE;AACjE,0CAAuC;AACvC,8CAA2C;AAC3C,wDAAuE;AACvE,4CAA0C;AAC1C,+DAA4D;AAQ5D,SAAS,sBAAsB,CAAC,KAAuB;IACrD,MAAM,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,SAAS,EAAE,EAAE,EAAE,CAAC;IAEjF,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE;QAC9B,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,UAAU,EAAE;YACxC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;YAC5B,0BAA0B,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;SAC3D;QAED,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;KAC3E;AACH,CAAC;AAbD,8DAaC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { AccessToken, assert, BeDuration, Id64Array, Logger } from \"@itwin/core-bentley\";\r\nimport { ElementGraphicsRequestProps, IModelRpcProps, IModelTileRpcInterface, IModelTileTreeProps, RpcInterface, RpcManager, RpcPendingResponse, TileContentIdentifier, TileContentSource, TileTreeContentIds, TileVersionInfo } from \"@itwin/core-common\";\r\nimport type { TransferConfig } from \"@itwin/object-storage-core\";\r\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\r\nimport { IModelDb } from \"../IModelDb\";\r\nimport { IModelHost } from \"../IModelHost\";\r\nimport { PromiseMemoizer, QueryablePromise } from \"../PromiseMemoizer\";\r\nimport { RpcTrace } from \"../rpc/tracing\";\r\nimport { RpcBriefcaseUtility } from \"./RpcBriefcaseUtility\";\r\n\r\ninterface TileRequestProps {\r\n accessToken?: AccessToken;\r\n tokenProps: IModelRpcProps;\r\n treeId: string;\r\n}\r\n\r\nfunction generateTileRequestKey(props: TileRequestProps): string {\r\n const token = props.tokenProps;\r\n return `${JSON.stringify({\r\n key: token.key,\r\n iTwinId: token.iTwinId,\r\n iModelId: token.iModelId,\r\n changesetId: token.changeset?.id,\r\n })}:${props.treeId}`;\r\n}\r\n\r\nabstract class TileRequestMemoizer<Result, Props extends TileRequestProps> extends PromiseMemoizer<Result> {\r\n private readonly _loggerCategory = BackendLoggerCategory.IModelTileRequestRpc;\r\n protected abstract get _operationName(): string;\r\n protected abstract addMetadata(metadata: any, props: Props): void;\r\n protected abstract stringify(props: Props): string;\r\n protected abstract get _timeoutMilliseconds(): number;\r\n\r\n private makeMetadata(props: Props): any {\r\n const meta = { ...props.tokenProps };\r\n this.addMetadata(meta, props);\r\n return meta;\r\n }\r\n\r\n protected constructor(memoizeFn: (props: Props) => Promise<Result>, generateKeyFn: (props: Props) => string) {\r\n super(memoizeFn, generateKeyFn);\r\n }\r\n\r\n public override memoize(props: Props): QueryablePromise<Result> {\r\n return super.memoize(props);\r\n }\r\n\r\n public override deleteMemoized(props: Props) {\r\n super.deleteMemoized(props);\r\n }\r\n\r\n private log(status: string, props: Props): void {\r\n const descr = `${this._operationName}(${this.stringify(props)})`;\r\n Logger.logTrace(this._loggerCategory, `Backend ${status} ${descr}`, () => this.makeMetadata(props));\r\n }\r\n\r\n protected async perform(props: Props): Promise<Result> {\r\n this.log(\"received\", props);\r\n\r\n const tileQP = this.memoize(props);\r\n\r\n await BeDuration.race(this._timeoutMilliseconds, tileQP.promise).catch(() => { });\r\n // Note: Rejections must be caught so that the memoization entry can be deleted\r\n\r\n if (tileQP.isPending) {\r\n this.log(\"issuing pending status for\", props);\r\n throw new RpcPendingResponse(); // eslint-disable-line deprecation/deprecation\r\n }\r\n\r\n this.deleteMemoized(props);\r\n\r\n if (tileQP.isFulfilled) {\r\n this.log(\"completed\", props);\r\n assert(undefined !== tileQP.result);\r\n return tileQP.result;\r\n }\r\n\r\n assert(tileQP.isRejected);\r\n this.log(\"rejected\", props);\r\n throw tileQP.error; // eslint-disable-line no-throw-literal\r\n }\r\n}\r\n\r\nasync function getTileTreeProps(props: TileRequestProps): Promise<IModelTileTreeProps> {\r\n assert(undefined !== props.accessToken);\r\n const db = await RpcBriefcaseUtility.findOpenIModel(props.accessToken, props.tokenProps);\r\n return db.tiles.requestTileTreeProps(props.treeId);\r\n}\r\n\r\nclass RequestTileTreePropsMemoizer extends TileRequestMemoizer<IModelTileTreeProps, TileRequestProps> {\r\n protected get _timeoutMilliseconds() { return IModelHost.tileTreeRequestTimeout; }\r\n protected get _operationName() { return \"requestTileTreeProps\"; }\r\n protected stringify(props: TileRequestProps): string { return props.treeId; }\r\n protected addMetadata(meta: any, props: TileRequestProps): void {\r\n meta.treeId = props.treeId;\r\n }\r\n\r\n private static _instance?: RequestTileTreePropsMemoizer;\r\n\r\n private constructor() {\r\n super(getTileTreeProps, generateTileRequestKey);\r\n IModelHost.onBeforeShutdown.addOnce(() => {\r\n this.dispose();\r\n RequestTileTreePropsMemoizer._instance = undefined;\r\n });\r\n }\r\n\r\n public static async perform(props: TileRequestProps): Promise<IModelTileTreeProps> {\r\n if (undefined === this._instance)\r\n this._instance = new RequestTileTreePropsMemoizer();\r\n\r\n return this._instance.perform(props);\r\n }\r\n}\r\n\r\ninterface TileContentRequestProps extends TileRequestProps {\r\n contentId: string;\r\n guid?: string;\r\n}\r\n\r\nasync function getTileContent(props: TileContentRequestProps): Promise<TileContentSource> {\r\n assert(undefined !== props.accessToken);\r\n const db = await RpcBriefcaseUtility.findOpenIModel(props.accessToken, props.tokenProps);\r\n const tile = await db.tiles.requestTileContent(props.treeId, props.contentId);\r\n\r\n // ###TODO: Verify the guid supplied by the front-end matches the guid stored in the model?\r\n if (IModelHost.usingExternalTileCache) {\r\n await IModelHost.tileStorage?.uploadTile(db.iModelId, db.changeset.id, props.treeId, props.contentId, tile.content, props.guid, {\r\n backendName: IModelHost.applicationId,\r\n tileGenerationTime: tile.elapsedSeconds.toString(),\r\n tileSize: tile.content.byteLength.toString(),\r\n });\r\n\r\n return TileContentSource.ExternalCache;\r\n }\r\n\r\n return TileContentSource.Backend;\r\n}\r\n\r\nfunction generateTileContentKey(props: TileContentRequestProps): string {\r\n return `${generateTileRequestKey(props)}:${props.contentId}`;\r\n}\r\n\r\nclass RequestTileContentMemoizer extends TileRequestMemoizer<TileContentSource, TileContentRequestProps> {\r\n protected get _timeoutMilliseconds() { return IModelHost.tileContentRequestTimeout; }\r\n protected get _operationName() { return \"requestTileContent\"; }\r\n protected stringify(props: TileContentRequestProps): string { return `${props.treeId}:${props.contentId}`; }\r\n protected addMetadata(meta: any, props: TileContentRequestProps): void {\r\n meta.treeId = props.treeId;\r\n meta.contentId = props.contentId;\r\n }\r\n\r\n private static _instance?: RequestTileContentMemoizer;\r\n\r\n private constructor() {\r\n super(getTileContent, generateTileContentKey);\r\n IModelHost.onBeforeShutdown.addOnce(() => {\r\n this.dispose();\r\n RequestTileContentMemoizer._instance = undefined;\r\n });\r\n }\r\n\r\n public static get instance() {\r\n if (undefined === this._instance)\r\n this._instance = new RequestTileContentMemoizer();\r\n\r\n return this._instance;\r\n }\r\n\r\n public static async perform(props: TileContentRequestProps): Promise<TileContentSource> {\r\n return this.instance.perform(props);\r\n }\r\n}\r\n\r\nfunction currentActivity() {\r\n return RpcTrace.expectCurrentActivity; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** @internal */\r\nexport class IModelTileRpcImpl extends RpcInterface implements IModelTileRpcInterface { // eslint-disable-line deprecation/deprecation\r\n public static register() { RpcManager.registerImpl(IModelTileRpcInterface, IModelTileRpcImpl); }\r\n\r\n public async requestTileTreeProps(tokenProps: IModelRpcProps, treeId: string): Promise<IModelTileTreeProps> {\r\n return RequestTileTreePropsMemoizer.perform({ accessToken: currentActivity().accessToken, tokenProps, treeId });\r\n }\r\n\r\n public async purgeTileTrees(tokenProps: IModelRpcProps, modelIds: Id64Array | undefined): Promise<void> {\r\n // `undefined` gets forwarded as `null`...\r\n if (null === modelIds)\r\n modelIds = undefined;\r\n\r\n const db = await RpcBriefcaseUtility.findOpenIModel(currentActivity().accessToken, tokenProps);\r\n if (!db.isOpen) {\r\n return;\r\n }\r\n\r\n return db.nativeDb.purgeTileTrees(modelIds);\r\n }\r\n\r\n public async generateTileContent(tokenProps: IModelRpcProps, treeId: string, contentId: string, guid: string | undefined): Promise<TileContentSource> {\r\n return RequestTileContentMemoizer.perform({ accessToken: currentActivity().accessToken, tokenProps, treeId, contentId, guid });\r\n }\r\n\r\n public async retrieveTileContent(tokenProps: IModelRpcProps, key: TileContentIdentifier): Promise<Uint8Array> {\r\n const db = await RpcBriefcaseUtility.findOpenIModel(currentActivity().accessToken, tokenProps);\r\n return db.tiles.getTileContent(key.treeId, key.contentId);\r\n }\r\n\r\n public async getTileCacheConfig(tokenProps: IModelRpcProps): Promise<TransferConfig | undefined> {\r\n if (IModelHost.tileStorage === undefined)\r\n return undefined;\r\n const iModelId = tokenProps.iModelId ?? (await RpcBriefcaseUtility.findOpenIModel(currentActivity().accessToken, tokenProps)).iModelId;\r\n return IModelHost.tileStorage.getDownloadConfig(iModelId);\r\n }\r\n\r\n public async queryVersionInfo(): Promise<TileVersionInfo> {\r\n return IModelHost.platform.getTileVersionInfo();\r\n }\r\n\r\n /** @internal */\r\n public async requestElementGraphics(rpcProps: IModelRpcProps, request: ElementGraphicsRequestProps): Promise<Uint8Array | undefined> {\r\n const iModel = await RpcBriefcaseUtility.findOpenIModel(currentActivity().accessToken, rpcProps);\r\n return iModel.generateElementGraphics(request);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport async function cancelTileContentRequests(tokenProps: IModelRpcProps, contentIds: TileTreeContentIds[]): Promise<void> {\r\n const iModel = IModelDb.findByKey(tokenProps.key);\r\n const props: TileContentRequestProps = { tokenProps, treeId: \"\", contentId: \"\" };\r\n\r\n for (const entry of contentIds) {\r\n props.treeId = entry.treeId;\r\n for (const contentId of entry.contentIds) {\r\n props.contentId = contentId;\r\n RequestTileContentMemoizer.instance.deleteMemoized(props);\r\n }\r\n\r\n iModel.nativeDb.cancelTileContentRequests(entry.treeId,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M,KAAK,CAAC,gBAAgB;QAC3B,OAAO,uBAAU,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC;IAClD,CAAC;IAED,gBAAgB;IACT,KAAK,CAAC,sBAAsB,CAAC,QAAwB,EAAE,OAAoC;QAChG,MAAM,MAAM,GAAG,MAAM,yCAAmB,CAAC,cAAc,CAAC,eAAe,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QACjG,OAAO,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;CACF;AA7CD,8CA6CC;AAED,gBAAgB;AACT,KAAK,UAAU,yBAAyB,CAAC,UAA0B,EAAE,UAAgC;IAC1G,MAAM,MAAM,GAAG,mBAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,KAAK,GAA4B,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAEjF,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE;QAC9B,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,UAAU,EAAE;YACxC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;YAC5B,0BAA0B,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;SAC3D;QAED,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;KAC3E;AACH,CAAC;AAbD,8DAaC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { AccessToken, assert, BeDuration, Id64Array, Logger } from \"@itwin/core-bentley\";\r\nimport { ElementGraphicsRequestProps, IModelRpcProps, IModelTileRpcInterface, IModelTileTreeProps, RpcInterface, RpcManager, RpcPendingResponse, TileContentIdentifier, TileContentSource, TileTreeContentIds, TileVersionInfo } from \"@itwin/core-common\";\r\nimport type { Metadata, TransferConfig } from \"@itwin/object-storage-core\";\r\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\r\nimport { IModelDb } from \"../IModelDb\";\r\nimport { IModelHost } from \"../IModelHost\";\r\nimport { PromiseMemoizer, QueryablePromise } from \"../PromiseMemoizer\";\r\nimport { RpcTrace } from \"../rpc/tracing\";\r\nimport { RpcBriefcaseUtility } from \"./RpcBriefcaseUtility\";\r\n\r\ninterface TileRequestProps {\r\n accessToken?: AccessToken;\r\n tokenProps: IModelRpcProps;\r\n treeId: string;\r\n}\r\n\r\nfunction generateTileRequestKey(props: TileRequestProps): string {\r\n const token = props.tokenProps;\r\n return `${JSON.stringify({\r\n key: token.key,\r\n iTwinId: token.iTwinId,\r\n iModelId: token.iModelId,\r\n changesetId: token.changeset?.id,\r\n })}:${props.treeId}`;\r\n}\r\n\r\nabstract class TileRequestMemoizer<Result, Props extends TileRequestProps> extends PromiseMemoizer<Result> {\r\n private readonly _loggerCategory = BackendLoggerCategory.IModelTileRequestRpc;\r\n protected abstract get _operationName(): string;\r\n protected abstract addMetadata(metadata: any, props: Props): void;\r\n protected abstract stringify(props: Props): string;\r\n protected abstract get _timeoutMilliseconds(): number;\r\n\r\n private makeMetadata(props: Props): any {\r\n const meta = { ...props.tokenProps };\r\n this.addMetadata(meta, props);\r\n return meta;\r\n }\r\n\r\n protected constructor(memoizeFn: (props: Props) => Promise<Result>, generateKeyFn: (props: Props) => string) {\r\n super(memoizeFn, generateKeyFn);\r\n }\r\n\r\n public override memoize(props: Props): QueryablePromise<Result> {\r\n return super.memoize(props);\r\n }\r\n\r\n public override deleteMemoized(props: Props) {\r\n super.deleteMemoized(props);\r\n }\r\n\r\n private log(status: string, props: Props): void {\r\n const descr = `${this._operationName}(${this.stringify(props)})`;\r\n Logger.logTrace(this._loggerCategory, `Backend ${status} ${descr}`, () => this.makeMetadata(props));\r\n }\r\n\r\n protected async perform(props: Props): Promise<Result> {\r\n this.log(\"received\", props);\r\n\r\n const tileQP = this.memoize(props);\r\n\r\n await BeDuration.race(this._timeoutMilliseconds, tileQP.promise).catch(() => { });\r\n // Note: Rejections must be caught so that the memoization entry can be deleted\r\n\r\n if (tileQP.isPending) {\r\n this.log(\"issuing pending status for\", props);\r\n throw new RpcPendingResponse(); // eslint-disable-line deprecation/deprecation\r\n }\r\n\r\n this.deleteMemoized(props);\r\n\r\n if (tileQP.isFulfilled) {\r\n this.log(\"completed\", props);\r\n assert(undefined !== tileQP.result);\r\n return tileQP.result;\r\n }\r\n\r\n assert(tileQP.isRejected);\r\n this.log(\"rejected\", props);\r\n throw tileQP.error; // eslint-disable-line no-throw-literal\r\n }\r\n}\r\n\r\nasync function getTileTreeProps(props: TileRequestProps): Promise<IModelTileTreeProps> {\r\n assert(undefined !== props.accessToken);\r\n const db = await RpcBriefcaseUtility.findOpenIModel(props.accessToken, props.tokenProps);\r\n return db.tiles.requestTileTreeProps(props.treeId);\r\n}\r\n\r\nclass RequestTileTreePropsMemoizer extends TileRequestMemoizer<IModelTileTreeProps, TileRequestProps> {\r\n protected get _timeoutMilliseconds() { return IModelHost.tileTreeRequestTimeout; }\r\n protected get _operationName() { return \"requestTileTreeProps\"; }\r\n protected stringify(props: TileRequestProps): string { return props.treeId; }\r\n protected addMetadata(meta: any, props: TileRequestProps): void {\r\n meta.treeId = props.treeId;\r\n }\r\n\r\n private static _instance?: RequestTileTreePropsMemoizer;\r\n\r\n private constructor() {\r\n super(getTileTreeProps, generateTileRequestKey);\r\n IModelHost.onBeforeShutdown.addOnce(() => {\r\n this.dispose();\r\n RequestTileTreePropsMemoizer._instance = undefined;\r\n });\r\n }\r\n\r\n public static async perform(props: TileRequestProps): Promise<IModelTileTreeProps> {\r\n if (undefined === this._instance)\r\n this._instance = new RequestTileTreePropsMemoizer();\r\n\r\n return this._instance.perform(props);\r\n }\r\n}\r\n\r\ninterface TileContentRequestProps extends TileRequestProps {\r\n contentId: string;\r\n guid?: string;\r\n}\r\n\r\nasync function getTileContent(props: TileContentRequestProps): Promise<TileContentSource> {\r\n assert(undefined !== props.accessToken);\r\n const db = await RpcBriefcaseUtility.findOpenIModel(props.accessToken, props.tokenProps);\r\n const tile = await db.tiles.requestTileContent(props.treeId, props.contentId);\r\n\r\n // ###TODO: Verify the guid supplied by the front-end matches the guid stored in the model?\r\n if (IModelHost.usingExternalTileCache) {\r\n const tileMetadata: Metadata = {\r\n backendName: IModelHost.applicationId,\r\n tileGenerationTime: tile.elapsedSeconds.toString(),\r\n tileSize: tile.content.byteLength.toString(),\r\n };\r\n await IModelHost.tileStorage?.uploadTile(db.iModelId, db.changeset.id, props.treeId, props.contentId, tile.content, props.guid, tileMetadata);\r\n const { accessToken: _, ...safeProps } = props;\r\n Logger.logInfo(BackendLoggerCategory.IModelTileRequestRpc, \"Generated and uploaded tile\", { tileMetadata, ...safeProps });\r\n\r\n return TileContentSource.ExternalCache;\r\n }\r\n\r\n return TileContentSource.Backend;\r\n}\r\n\r\nfunction generateTileContentKey(props: TileContentRequestProps): string {\r\n return `${generateTileRequestKey(props)}:${props.contentId}`;\r\n}\r\n\r\nclass RequestTileContentMemoizer extends TileRequestMemoizer<TileContentSource, TileContentRequestProps> {\r\n protected get _timeoutMilliseconds() { return IModelHost.tileContentRequestTimeout; }\r\n protected get _operationName() { return \"requestTileContent\"; }\r\n protected stringify(props: TileContentRequestProps): string { return `${props.treeId}:${props.contentId}`; }\r\n protected addMetadata(meta: any, props: TileContentRequestProps): void {\r\n meta.treeId = props.treeId;\r\n meta.contentId = props.contentId;\r\n }\r\n\r\n private static _instance?: RequestTileContentMemoizer;\r\n\r\n private constructor() {\r\n super(getTileContent, generateTileContentKey);\r\n IModelHost.onBeforeShutdown.addOnce(() => {\r\n this.dispose();\r\n RequestTileContentMemoizer._instance = undefined;\r\n });\r\n }\r\n\r\n public static get instance() {\r\n if (undefined === this._instance)\r\n this._instance = new RequestTileContentMemoizer();\r\n\r\n return this._instance;\r\n }\r\n\r\n public static async perform(props: TileContentRequestProps): Promise<TileContentSource> {\r\n return this.instance.perform(props);\r\n }\r\n}\r\n\r\nfunction currentActivity() {\r\n return RpcTrace.expectCurrentActivity; // eslint-disable-line deprecation/deprecation\r\n}\r\n\r\n/** @internal */\r\nexport class IModelTileRpcImpl extends RpcInterface implements IModelTileRpcInterface { // eslint-disable-line deprecation/deprecation\r\n public static register() { RpcManager.registerImpl(IModelTileRpcInterface, IModelTileRpcImpl); }\r\n\r\n public async requestTileTreeProps(tokenProps: IModelRpcProps, treeId: string): Promise<IModelTileTreeProps> {\r\n return RequestTileTreePropsMemoizer.perform({ accessToken: currentActivity().accessToken, tokenProps, treeId });\r\n }\r\n\r\n public async purgeTileTrees(tokenProps: IModelRpcProps, modelIds: Id64Array | undefined): Promise<void> {\r\n // `undefined` gets forwarded as `null`...\r\n if (null === modelIds)\r\n modelIds = undefined;\r\n\r\n const db = await RpcBriefcaseUtility.findOpenIModel(currentActivity().accessToken, tokenProps);\r\n if (!db.isOpen) {\r\n return;\r\n }\r\n\r\n return db.nativeDb.purgeTileTrees(modelIds);\r\n }\r\n\r\n public async generateTileContent(tokenProps: IModelRpcProps, treeId: string, contentId: string, guid: string | undefined): Promise<TileContentSource> {\r\n return RequestTileContentMemoizer.perform({ accessToken: currentActivity().accessToken, tokenProps, treeId, contentId, guid });\r\n }\r\n\r\n public async retrieveTileContent(tokenProps: IModelRpcProps, key: TileContentIdentifier): Promise<Uint8Array> {\r\n const db = await RpcBriefcaseUtility.findOpenIModel(currentActivity().accessToken, tokenProps);\r\n return db.tiles.getTileContent(key.treeId, key.contentId);\r\n }\r\n\r\n public async getTileCacheConfig(tokenProps: IModelRpcProps): Promise<TransferConfig | undefined> {\r\n if (IModelHost.tileStorage === undefined)\r\n return undefined;\r\n const iModelId = tokenProps.iModelId ?? (await RpcBriefcaseUtility.findOpenIModel(currentActivity().accessToken, tokenProps)).iModelId;\r\n return IModelHost.tileStorage.getDownloadConfig(iModelId);\r\n }\r\n\r\n public async queryVersionInfo(): Promise<TileVersionInfo> {\r\n return IModelHost.platform.getTileVersionInfo();\r\n }\r\n\r\n /** @internal */\r\n public async requestElementGraphics(rpcProps: IModelRpcProps, request: ElementGraphicsRequestProps): Promise<Uint8Array | undefined> {\r\n const iModel = await RpcBriefcaseUtility.findOpenIModel(currentActivity().accessToken, rpcProps);\r\n return iModel.generateElementGraphics(request);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport async function cancelTileContentRequests(tokenProps: IModelRpcProps, contentIds: TileTreeContentIds[]): Promise<void> {\r\n const iModel = IModelDb.findByKey(tokenProps.key);\r\n const props: TileContentRequestProps = { tokenProps, treeId: \"\", contentId: \"\" };\r\n\r\n for (const entry of contentIds) {\r\n props.treeId = entry.treeId;\r\n for (const contentId of entry.contentIds) {\r\n props.contentId = contentId;\r\n RequestTileContentMemoizer.instance.deleteMemoized(props);\r\n }\r\n\r\n iModel.nativeDb.cancelTileContentRequests(entry.treeId, entry.contentIds);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../../src/workspace/Settings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGjE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC;AAEzC;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,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AAC,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAWvH,UAAU,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAI5F;;OAEG;IACI,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,gBAAgB,CAAC,CAAC,CAAC,EAAE;IAU/E,SAAS,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAC1D,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS;IAKhD,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO;IAC7D,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,GAAG,SAAS;IAKlD,SAAS,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAC1D,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS;IAKhD,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC;IAClE,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,CAAC,GAAG,SAAS;IAK7D,QAAQ,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IACpF,QAAQ,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS;CAKhF"}
@@ -111,8 +111,9 @@ class BaseSettings {
111
111
  for (const dict of this._dictionaries) {
112
112
  const val = dict.getSetting(name);
113
113
  const resolved = val && resolver(val, dict.name, dict.priority);
114
- if (undefined !== resolved)
114
+ if (undefined !== resolved) {
115
115
  return resolved;
116
+ }
116
117
  }
117
118
  return defaultValue;
118
119
  }