@itwin/core-frontend 4.0.0-dev.99 → 4.1.0-dev.11

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 (155) hide show
  1. package/lib/cjs/AccuSnap.d.ts.map +1 -1
  2. package/lib/cjs/AccuSnap.js +8 -0
  3. package/lib/cjs/AccuSnap.js.map +1 -1
  4. package/lib/cjs/BriefcaseTxns.d.ts +2 -2
  5. package/lib/cjs/BriefcaseTxns.d.ts.map +1 -1
  6. package/lib/cjs/BriefcaseTxns.js +3 -3
  7. package/lib/cjs/BriefcaseTxns.js.map +1 -1
  8. package/lib/cjs/GraphicalEditingScope.d.ts +2 -2
  9. package/lib/cjs/GraphicalEditingScope.d.ts.map +1 -1
  10. package/lib/cjs/GraphicalEditingScope.js +1 -1
  11. package/lib/cjs/GraphicalEditingScope.js.map +1 -1
  12. package/lib/cjs/IModelApp.d.ts +1 -3
  13. package/lib/cjs/IModelApp.d.ts.map +1 -1
  14. package/lib/cjs/IModelApp.js +1 -3
  15. package/lib/cjs/IModelApp.js.map +1 -1
  16. package/lib/cjs/IpcApp.d.ts.map +1 -1
  17. package/lib/cjs/IpcApp.js +3 -3
  18. package/lib/cjs/IpcApp.js.map +1 -1
  19. package/lib/cjs/LocalhostIpcApp.js +1 -1
  20. package/lib/cjs/LocalhostIpcApp.js.map +1 -1
  21. package/lib/cjs/NativeApp.d.ts.map +1 -1
  22. package/lib/cjs/NativeApp.js +3 -3
  23. package/lib/cjs/NativeApp.js.map +1 -1
  24. package/lib/cjs/core-frontend.d.ts +3 -0
  25. package/lib/cjs/core-frontend.d.ts.map +1 -1
  26. package/lib/cjs/core-frontend.js +3 -0
  27. package/lib/cjs/core-frontend.js.map +1 -1
  28. package/lib/cjs/extension/ExtensionRuntime.js +1 -3
  29. package/lib/cjs/extension/ExtensionRuntime.js.map +1 -1
  30. package/lib/cjs/imdl/ImdlGraphicsCreator.d.ts +19 -0
  31. package/lib/cjs/imdl/ImdlGraphicsCreator.d.ts.map +1 -0
  32. package/lib/cjs/imdl/ImdlGraphicsCreator.js +328 -0
  33. package/lib/cjs/imdl/ImdlGraphicsCreator.js.map +1 -0
  34. package/lib/cjs/imdl/ImdlModel.d.ts +181 -0
  35. package/lib/cjs/imdl/ImdlModel.d.ts.map +1 -0
  36. package/lib/cjs/imdl/ImdlModel.js +10 -0
  37. package/lib/cjs/imdl/ImdlModel.js.map +1 -0
  38. package/lib/cjs/imdl/ImdlParser.d.ts +40 -0
  39. package/lib/cjs/imdl/ImdlParser.d.ts.map +1 -0
  40. package/lib/cjs/imdl/ImdlParser.js +996 -0
  41. package/lib/cjs/imdl/ImdlParser.js.map +1 -0
  42. package/lib/cjs/imdl/ImdlSchema.d.ts +380 -0
  43. package/lib/cjs/imdl/ImdlSchema.d.ts.map +1 -0
  44. package/lib/cjs/imdl/ImdlSchema.js +10 -0
  45. package/lib/cjs/imdl/ImdlSchema.js.map +1 -0
  46. package/lib/cjs/render/primitives/AuxChannelTable.d.ts +4 -0
  47. package/lib/cjs/render/primitives/AuxChannelTable.d.ts.map +1 -1
  48. package/lib/cjs/render/primitives/AuxChannelTable.js +33 -0
  49. package/lib/cjs/render/primitives/AuxChannelTable.js.map +1 -1
  50. package/lib/cjs/render/primitives/VertexTable.d.ts +3 -3
  51. package/lib/cjs/render/primitives/VertexTable.d.ts.map +1 -1
  52. package/lib/cjs/render/primitives/VertexTable.js.map +1 -1
  53. package/lib/cjs/render/primitives/VertexTableSplitter.d.ts +5 -1
  54. package/lib/cjs/render/primitives/VertexTableSplitter.d.ts.map +1 -1
  55. package/lib/cjs/render/primitives/VertexTableSplitter.js +13 -12
  56. package/lib/cjs/render/primitives/VertexTableSplitter.js.map +1 -1
  57. package/lib/cjs/tile/IModelTile.d.ts.map +1 -1
  58. package/lib/cjs/tile/IModelTile.js +14 -15
  59. package/lib/cjs/tile/IModelTile.js.map +1 -1
  60. package/lib/cjs/tile/ImdlReader.d.ts +11 -420
  61. package/lib/cjs/tile/ImdlReader.d.ts.map +1 -1
  62. package/lib/cjs/tile/ImdlReader.js +64 -902
  63. package/lib/cjs/tile/ImdlReader.js.map +1 -1
  64. package/lib/cjs/tile/TileAdmin.d.ts.map +1 -1
  65. package/lib/cjs/tile/TileAdmin.js +2 -1
  66. package/lib/cjs/tile/TileAdmin.js.map +1 -1
  67. package/lib/cjs/tile/map/MapTile.d.ts +6 -1
  68. package/lib/cjs/tile/map/MapTile.d.ts.map +1 -1
  69. package/lib/cjs/tile/map/MapTile.js +10 -8
  70. package/lib/cjs/tile/map/MapTile.js.map +1 -1
  71. package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
  72. package/lib/cjs/tile/map/MapTileTree.js +8 -2
  73. package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
  74. package/lib/esm/AccuSnap.d.ts.map +1 -1
  75. package/lib/esm/AccuSnap.js +8 -0
  76. package/lib/esm/AccuSnap.js.map +1 -1
  77. package/lib/esm/BriefcaseTxns.d.ts +2 -2
  78. package/lib/esm/BriefcaseTxns.d.ts.map +1 -1
  79. package/lib/esm/BriefcaseTxns.js +3 -3
  80. package/lib/esm/BriefcaseTxns.js.map +1 -1
  81. package/lib/esm/GraphicalEditingScope.d.ts +2 -2
  82. package/lib/esm/GraphicalEditingScope.d.ts.map +1 -1
  83. package/lib/esm/GraphicalEditingScope.js +2 -2
  84. package/lib/esm/GraphicalEditingScope.js.map +1 -1
  85. package/lib/esm/IModelApp.d.ts +1 -3
  86. package/lib/esm/IModelApp.d.ts.map +1 -1
  87. package/lib/esm/IModelApp.js +1 -3
  88. package/lib/esm/IModelApp.js.map +1 -1
  89. package/lib/esm/IpcApp.d.ts.map +1 -1
  90. package/lib/esm/IpcApp.js +4 -4
  91. package/lib/esm/IpcApp.js.map +1 -1
  92. package/lib/esm/LocalhostIpcApp.js +2 -2
  93. package/lib/esm/LocalhostIpcApp.js.map +1 -1
  94. package/lib/esm/NativeApp.d.ts.map +1 -1
  95. package/lib/esm/NativeApp.js +4 -4
  96. package/lib/esm/NativeApp.js.map +1 -1
  97. package/lib/esm/core-frontend.d.ts +3 -0
  98. package/lib/esm/core-frontend.d.ts.map +1 -1
  99. package/lib/esm/core-frontend.js +3 -0
  100. package/lib/esm/core-frontend.js.map +1 -1
  101. package/lib/esm/extension/ExtensionRuntime.js +1 -3
  102. package/lib/esm/extension/ExtensionRuntime.js.map +1 -1
  103. package/lib/esm/imdl/ImdlGraphicsCreator.d.ts +19 -0
  104. package/lib/esm/imdl/ImdlGraphicsCreator.d.ts.map +1 -0
  105. package/lib/esm/imdl/ImdlGraphicsCreator.js +324 -0
  106. package/lib/esm/imdl/ImdlGraphicsCreator.js.map +1 -0
  107. package/lib/esm/imdl/ImdlModel.d.ts +181 -0
  108. package/lib/esm/imdl/ImdlModel.d.ts.map +1 -0
  109. package/lib/esm/imdl/ImdlModel.js +9 -0
  110. package/lib/esm/imdl/ImdlModel.js.map +1 -0
  111. package/lib/esm/imdl/ImdlParser.d.ts +40 -0
  112. package/lib/esm/imdl/ImdlParser.d.ts.map +1 -0
  113. package/lib/esm/imdl/ImdlParser.js +988 -0
  114. package/lib/esm/imdl/ImdlParser.js.map +1 -0
  115. package/lib/esm/imdl/ImdlSchema.d.ts +380 -0
  116. package/lib/esm/imdl/ImdlSchema.d.ts.map +1 -0
  117. package/lib/esm/imdl/ImdlSchema.js +9 -0
  118. package/lib/esm/imdl/ImdlSchema.js.map +1 -0
  119. package/lib/esm/render/primitives/AuxChannelTable.d.ts +4 -0
  120. package/lib/esm/render/primitives/AuxChannelTable.d.ts.map +1 -1
  121. package/lib/esm/render/primitives/AuxChannelTable.js +33 -0
  122. package/lib/esm/render/primitives/AuxChannelTable.js.map +1 -1
  123. package/lib/esm/render/primitives/VertexTable.d.ts +3 -3
  124. package/lib/esm/render/primitives/VertexTable.d.ts.map +1 -1
  125. package/lib/esm/render/primitives/VertexTable.js.map +1 -1
  126. package/lib/esm/render/primitives/VertexTableSplitter.d.ts +5 -1
  127. package/lib/esm/render/primitives/VertexTableSplitter.d.ts.map +1 -1
  128. package/lib/esm/render/primitives/VertexTableSplitter.js +13 -12
  129. package/lib/esm/render/primitives/VertexTableSplitter.js.map +1 -1
  130. package/lib/esm/tile/IModelTile.d.ts.map +1 -1
  131. package/lib/esm/tile/IModelTile.js +14 -15
  132. package/lib/esm/tile/IModelTile.js.map +1 -1
  133. package/lib/esm/tile/ImdlReader.d.ts +11 -420
  134. package/lib/esm/tile/ImdlReader.d.ts.map +1 -1
  135. package/lib/esm/tile/ImdlReader.js +67 -903
  136. package/lib/esm/tile/ImdlReader.js.map +1 -1
  137. package/lib/esm/tile/TileAdmin.d.ts.map +1 -1
  138. package/lib/esm/tile/TileAdmin.js +2 -1
  139. package/lib/esm/tile/TileAdmin.js.map +1 -1
  140. package/lib/esm/tile/map/MapTile.d.ts +6 -1
  141. package/lib/esm/tile/map/MapTile.d.ts.map +1 -1
  142. package/lib/esm/tile/map/MapTile.js +10 -8
  143. package/lib/esm/tile/map/MapTile.js.map +1 -1
  144. package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
  145. package/lib/esm/tile/map/MapTileTree.js +8 -2
  146. package/lib/esm/tile/map/MapTileTree.js.map +1 -1
  147. package/package.json +18 -18
  148. package/lib/cjs/extension/ExtensionImpl.d.ts +0 -21
  149. package/lib/cjs/extension/ExtensionImpl.d.ts.map +0 -1
  150. package/lib/cjs/extension/ExtensionImpl.js +0 -47
  151. package/lib/cjs/extension/ExtensionImpl.js.map +0 -1
  152. package/lib/esm/extension/ExtensionImpl.d.ts +0 -21
  153. package/lib/esm/extension/ExtensionImpl.d.ts.map +0 -1
  154. package/lib/esm/extension/ExtensionImpl.js +0 -42
  155. package/lib/esm/extension/ExtensionImpl.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BriefcaseTxns.js","sourceRoot":"","sources":["../../src/BriefcaseTxns.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8C;AAC9C,w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C,IAAmC;QAClE,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,0BAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxE,CAAC;IAED,gBAAgB;IACT,uCAAuC,CAAC,GAAmC;QAChF,IAAI,CAAC,OAAO,CAAC,0BAA0B,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,2BAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACrF,CAAC;CACF;AA9PD,sCA8PC","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 IModelConnection\r\n */\r\n\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport { Point3d, Range3d, Range3dProps, XYZProps } from \"@itwin/core-geometry\";\r\nimport {\r\n ChangedEntities, ChangesetIndexAndId, EcefLocation, EcefLocationProps, GeographicCRS, GeographicCRSProps, IModelStatus, IpcAppChannel, ModelIdAndGeometryGuid,\r\n RemoveFunction, RootSubjectProps, TxnNotifications,\r\n} from \"@itwin/core-common\";\r\nimport { BriefcaseConnection } from \"./BriefcaseConnection\";\r\nimport { IpcApp, NotificationHandler } from \"./IpcApp\";\r\n\r\n/**\r\n * Base class for notification handlers for events from the backend that are specific to a [[BriefcaseConnection]].\r\n * @see [[BriefcaseTxns]].\r\n * @public\r\n */\r\nexport abstract class BriefcaseNotificationHandler extends NotificationHandler {\r\n constructor(private _key: string) { super(); }\r\n public abstract get briefcaseChannelName(): string;\r\n public get channelName() { return `${this.briefcaseChannelName}:${this._key}`; }\r\n}\r\n\r\n/** Manages local changes to a [[BriefcaseConnection]] via [Txns]($docs/learning/InteractiveEditing.md).\r\n * @see [[BriefcaseConnection.txns]].\r\n * @see [TxnManager]($backend) for the backend counterpart.\r\n * @public\r\n */\r\nexport class BriefcaseTxns extends BriefcaseNotificationHandler implements TxnNotifications {\r\n private readonly _iModel: BriefcaseConnection;\r\n private _cleanup?: RemoveFunction;\r\n\r\n /** @internal */\r\n public get briefcaseChannelName() {\r\n return IpcAppChannel.Txns;\r\n }\r\n\r\n /** Event raised after Txn validation or changeset application to indicate the set of changed elements.\r\n * @note If there are many changed elements in a single Txn, the notifications are sent in batches so this event *may be called multiple times* per Txn.\r\n */\r\n public readonly onElementsChanged = new BeEvent<(changes: Readonly<ChangedEntities>) => void>();\r\n\r\n /** Event raised after Txn validation or changeset application to indicate the set of changed models.\r\n * @note If there are many changed models in a single Txn, the notifications are sent in batches so this event *may be called multiple times* per Txn.\r\n */\r\n public readonly onModelsChanged = new BeEvent<(changes: Readonly<ChangedEntities>) => void>();\r\n\r\n /** Event raised after the geometry within one or more [[GeometricModelState]]s is modified by applying a changeset or validation of a transaction.\r\n * A model's geometry can change as a result of:\r\n * - Insertion or deletion of a geometric element within the model; or\r\n * - Modification of an existing element's geometric properties; or\r\n * - An explicit request to flag it as changed via [IModelDb.Models.updateModel]($backend).\r\n */\r\n public readonly onModelGeometryChanged = new BeEvent<(changes: ReadonlyArray<ModelIdAndGeometryGuid>) => void>();\r\n\r\n /** Event raised before a commit operation is performed. Initiated by a call to [[BriefcaseConnection.saveChanges]], unless there are no changes to save.\r\n * @see [[onCommitted]] for the event raised after the operation.\r\n */\r\n public readonly onCommit = new BeEvent<() => void>();\r\n\r\n /** Event raised after a commit operation is performed. Initiated by a call to [[BriefcaseConnection.saveChanges]], even if there were no changes to save.\r\n * The event supplies the following information:\r\n * - `hasPendingTxns`: true if the briefcase has local changes not yet pushed to the server.\r\n * - `time`: the time at which changes were saved on the backend (obtained via `Date.now()`).\r\n * @see [[onCommit]] for the event raised before the operation.\r\n */\r\n public readonly onCommitted = new BeEvent<(hasPendingTxns: boolean, time: number) => void>();\r\n\r\n /** Event raised after a changeset has been applied to the briefcase.\r\n * Changesets may be applied as a result of [[BriefcaseConnection.pullChanges]], or by undo/redo operations.\r\n */\r\n public readonly onChangesApplied = new BeEvent<() => void>();\r\n\r\n /** Event raised before an undo/redo operation is performed.\r\n * @see [[onAfterUndoRedo]] for the event raised after the operation.\r\n */\r\n public readonly onBeforeUndoRedo = new BeEvent<(isUndo: boolean) => void>();\r\n\r\n /** Event raised after an undo/redo operation is performed.\r\n * @see [[onBeforeUndoRedo]] for the event raised before to the operation.\r\n */\r\n public readonly onAfterUndoRedo = new BeEvent<(isUndo: boolean) => void>();\r\n\r\n /** Event raised after changes are pulled and merged into the briefcase.\r\n * @see [[BriefcaseConnection.pullAndMergeChanges]].\r\n */\r\n public readonly onChangesPulled = new BeEvent<(parentChangeset: ChangesetIndexAndId) => void>();\r\n\r\n /** Event raised after the briefcase's local changes are pushed.\r\n * @see [[BriefcaseConnection.pushChanges]].\r\n */\r\n public readonly onChangesPushed = new BeEvent<(parentChangeset: ChangesetIndexAndId) => void>();\r\n\r\n /** @internal */\r\n public constructor(iModel: BriefcaseConnection) {\r\n super(iModel.key);\r\n this._iModel = iModel;\r\n this._cleanup = this.registerImpl();\r\n }\r\n\r\n /** @internal */\r\n public dispose(): void {\r\n if (this._cleanup) {\r\n this._cleanup();\r\n this._cleanup = undefined;\r\n\r\n this.onElementsChanged.clear();\r\n this.onModelsChanged.clear();\r\n this.onModelGeometryChanged.clear();\r\n this.onCommit.clear();\r\n this.onCommitted.clear();\r\n this.onChangesApplied.clear();\r\n this.onBeforeUndoRedo.clear();\r\n this.onAfterUndoRedo.clear();\r\n this.onChangesPulled.clear();\r\n this.onChangesPushed.clear();\r\n }\r\n }\r\n\r\n /** Query if the briefcase has any pending Txns waiting to be pushed. */\r\n public async hasPendingTxns(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\r\n return IpcApp.appFunctionIpc.hasPendingTxns(this._iModel.key);\r\n }\r\n\r\n /** Determine if any reversible (undoable) changes exist.\r\n * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.\r\n */\r\n public async isUndoPossible(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\r\n return IpcApp.appFunctionIpc.isUndoPossible(this._iModel.key);\r\n }\r\n\r\n /** Determine if any reinstatable (redoable) changes exist.\r\n * @see [[reinstateTxn]] to redo changes.\r\n */\r\n public async isRedoPossible(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\r\n return IpcApp.appFunctionIpc.isRedoPossible(this._iModel.key);\r\n }\r\n\r\n /** Get the description of the operation that would be reversed by calling [[reverseTxns]]`(1)`.\r\n * This is useful for showing the operation that would be undone, for example in a menu.\r\n */\r\n public async getUndoString(): Promise<string> {\r\n return IpcApp.appFunctionIpc.getUndoString(this._iModel.key);\r\n }\r\n\r\n /** Get a description of the operation that would be reinstated by calling [[reinstateTxn]].\r\n * This is useful for showing the operation that would be redone, in a pull-down menu for example.\r\n */\r\n public async getRedoString(): Promise<string> {\r\n return IpcApp.appFunctionIpc.getRedoString(this._iModel.key);\r\n }\r\n\r\n /** Reverse (undo) the most recent operation.\r\n * @see [[reinstateTxn]] to redo operations.\r\n * @see [[reverseAll]] to undo all operations.\r\n * @see [[isUndoPossible]] to determine if any reversible operations exist.\r\n */\r\n public async reverseSingleTxn(): Promise<IModelStatus> {\r\n return this.reverseTxns(1);\r\n }\r\n\r\n /** Reverse (undo) the most recent operation(s) to the briefcase in the current session.\r\n * @param numOperations the number of operations to reverse. If this is greater than 1, the entire set of operations will\r\n * be reinstated together when/if [[reinstateTxn]] is called.\r\n * @note If there are any outstanding uncommitted changes, they are reversed.\r\n * @note The term \"operation\" is used rather than Txn, since multiple Txns can be grouped together via [TxnManager.beginMultiTxnOperation]($backend). So,\r\n * even if numOperations is 1, multiple Txns may be reversed if they were grouped together when they were made.\r\n * @note If numOperations is too large only the number of reversible operations are reversed.\r\n */\r\n public async reverseTxns(numOperations: number): Promise<IModelStatus> {\r\n return IpcApp.appFunctionIpc.reverseTxns(this._iModel.key, numOperations);\r\n }\r\n\r\n /** Reverse (undo) all changes back to the beginning of the session.\r\n * @see [[reinstateTxn]] to redo changes.\r\n * @see [[reverseSingleTxn]] to undo only the most recent operation.\r\n * @see [[isUndoPossible]] to determine if any reversible operations exist.\r\n */\r\n public async reverseAll(): Promise<IModelStatus> {\r\n return IpcApp.appFunctionIpc.reverseAllTxn(this._iModel.key);\r\n }\r\n\r\n /** Reinstate (redo) the most recently reversed transaction. Since at any time multiple transactions can be reversed, it\r\n * may take multiple calls to this method to reinstate all reversed operations.\r\n * @returns Success if a reversed transaction was reinstated, error status otherwise.\r\n * @note If there are any outstanding uncommitted changes, they are canceled before the Txn is reinstated.\r\n * @see [[isRedoPossible]] to determine if any reinstatable operations exist.\r\n * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.\r\n */\r\n public async reinstateTxn(): Promise<IModelStatus> {\r\n return IpcApp.appFunctionIpc.reinstateTxn(this._iModel.key);\r\n }\r\n\r\n /** Restart the current TxnManager session. This causes all Txns in the current session to no longer be undoable (as if the file was closed\r\n * and reopened.)\r\n * @note This can be quite disconcerting to the user expecting to be able to undo previously made changes. It should only be used\r\n * under extreme circumstances where damage to the file or session could happen if the currently committed are reversed. Use sparingly and with care.\r\n * Probably a good idea to alert the user it happened.\r\n */\r\n public async restartTxnSession(): Promise<void> {\r\n await IpcApp.appFunctionIpc.restartTxnSession(this._iModel.key);\r\n }\r\n\r\n /** @internal */\r\n public notifyElementsChanged(changed: ChangedEntities): void {\r\n this.onElementsChanged.raiseEvent(changed);\r\n }\r\n\r\n /** @internal */\r\n public notifyModelsChanged(changed: ChangedEntities): void {\r\n this.onModelsChanged.raiseEvent(changed);\r\n }\r\n\r\n /** @internal */\r\n public notifyGeometryGuidsChanged(changes: ModelIdAndGeometryGuid[]): void {\r\n this.onModelGeometryChanged.raiseEvent(changes);\r\n }\r\n\r\n /** @internal */\r\n public notifyCommit() {\r\n this.onCommit.raiseEvent();\r\n }\r\n\r\n /** @internal */\r\n public notifyCommitted(hasPendingTxns: boolean, time: number) {\r\n this.onCommitted.raiseEvent(hasPendingTxns, time);\r\n }\r\n\r\n /** @internal */\r\n public notifyChangesApplied() {\r\n this.onChangesApplied.raiseEvent();\r\n }\r\n\r\n /** @internal */\r\n public notifyBeforeUndoRedo(isUndo: boolean) {\r\n this.onBeforeUndoRedo.raiseEvent(isUndo);\r\n }\r\n\r\n /** @internal */\r\n public notifyAfterUndoRedo(isUndo: boolean) {\r\n this.onAfterUndoRedo.raiseEvent(isUndo);\r\n }\r\n\r\n /** @internal */\r\n public notifyPulledChanges(parentChangeset: ChangesetIndexAndId) {\r\n this.onChangesPulled.raiseEvent(parentChangeset);\r\n }\r\n\r\n /** @internal */\r\n public notifyPushedChanges(parentChangeset: ChangesetIndexAndId) {\r\n this.onChangesPushed.raiseEvent(parentChangeset);\r\n }\r\n\r\n /** @internal */\r\n public notifyIModelNameChanged(name: string) {\r\n this._iModel.name = name;\r\n }\r\n\r\n /** @internal */\r\n public notifyRootSubjectChanged(subject: RootSubjectProps) {\r\n this._iModel.rootSubject = subject;\r\n }\r\n\r\n /** @internal */\r\n public notifyProjectExtentsChanged(range: Range3dProps) {\r\n this._iModel.projectExtents = Range3d.fromJSON(range);\r\n }\r\n\r\n /** @internal */\r\n public notifyGlobalOriginChanged(origin: XYZProps) {\r\n this._iModel.globalOrigin = Point3d.fromJSON(origin);\r\n }\r\n\r\n /** @internal */\r\n public notifyEcefLocationChanged(ecef: EcefLocationProps | undefined) {\r\n this._iModel.ecefLocation = ecef ? new EcefLocation(ecef) : undefined;\r\n }\r\n\r\n /** @internal */\r\n public notifyGeographicCoordinateSystemChanged(gcs: GeographicCRSProps | undefined) {\r\n this._iModel.geographicCoordinateSystem = gcs ? new GeographicCRS(gcs) : undefined;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"BriefcaseTxns.js","sourceRoot":"","sources":["../../src/BriefcaseTxns.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8C;AAC9C,oDAG4B;AAC5B,wDAAgF;A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AAC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,0BAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxE,CAAC;IAED,gBAAgB;IACT,uCAAuC,CAAC,GAAmC;QAChF,IAAI,CAAC,OAAO,CAAC,0BAA0B,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,2BAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACrF,CAAC;CACF;AA9PD,sCA8PC","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 IModelConnection\r\n */\r\n\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport {\r\n ChangedEntities, ChangesetIndexAndId, EcefLocation, EcefLocationProps, GeographicCRS, GeographicCRSProps, IModelStatus, ipcAppChannels,\r\n ModelIdAndGeometryGuid, RemoveFunction, RootSubjectProps, TxnNotifications,\r\n} from \"@itwin/core-common\";\r\nimport { Point3d, Range3d, Range3dProps, XYZProps } from \"@itwin/core-geometry\";\r\nimport { BriefcaseConnection } from \"./BriefcaseConnection\";\r\nimport { IpcApp, NotificationHandler } from \"./IpcApp\";\r\n\r\n/**\r\n * Base class for notification handlers for events from the backend that are specific to a [[BriefcaseConnection]].\r\n * @see [[BriefcaseTxns]].\r\n * @public\r\n */\r\nexport abstract class BriefcaseNotificationHandler extends NotificationHandler {\r\n constructor(private _key: string) { super(); }\r\n public abstract get briefcaseChannelName(): string;\r\n public get channelName() { return `${this.briefcaseChannelName}/${this._key}`; }\r\n}\r\n\r\n/** Manages local changes to a [[BriefcaseConnection]] via [Txns]($docs/learning/InteractiveEditing.md).\r\n * @see [[BriefcaseConnection.txns]].\r\n * @see [TxnManager]($backend) for the backend counterpart.\r\n * @public\r\n */\r\nexport class BriefcaseTxns extends BriefcaseNotificationHandler implements TxnNotifications {\r\n private readonly _iModel: BriefcaseConnection;\r\n private _cleanup?: RemoveFunction;\r\n\r\n /** @internal */\r\n public get briefcaseChannelName() {\r\n return ipcAppChannels.txns;\r\n }\r\n\r\n /** Event raised after Txn validation or changeset application to indicate the set of changed elements.\r\n * @note If there are many changed elements in a single Txn, the notifications are sent in batches so this event *may be called multiple times* per Txn.\r\n */\r\n public readonly onElementsChanged = new BeEvent<(changes: Readonly<ChangedEntities>) => void>();\r\n\r\n /** Event raised after Txn validation or changeset application to indicate the set of changed models.\r\n * @note If there are many changed models in a single Txn, the notifications are sent in batches so this event *may be called multiple times* per Txn.\r\n */\r\n public readonly onModelsChanged = new BeEvent<(changes: Readonly<ChangedEntities>) => void>();\r\n\r\n /** Event raised after the geometry within one or more [[GeometricModelState]]s is modified by applying a changeset or validation of a transaction.\r\n * A model's geometry can change as a result of:\r\n * - Insertion or deletion of a geometric element within the model; or\r\n * - Modification of an existing element's geometric properties; or\r\n * - An explicit request to flag it as changed via [IModelDb.Models.updateModel]($backend).\r\n */\r\n public readonly onModelGeometryChanged = new BeEvent<(changes: ReadonlyArray<ModelIdAndGeometryGuid>) => void>();\r\n\r\n /** Event raised before a commit operation is performed. Initiated by a call to [[BriefcaseConnection.saveChanges]], unless there are no changes to save.\r\n * @see [[onCommitted]] for the event raised after the operation.\r\n */\r\n public readonly onCommit = new BeEvent<() => void>();\r\n\r\n /** Event raised after a commit operation is performed. Initiated by a call to [[BriefcaseConnection.saveChanges]], even if there were no changes to save.\r\n * The event supplies the following information:\r\n * - `hasPendingTxns`: true if the briefcase has local changes not yet pushed to the server.\r\n * - `time`: the time at which changes were saved on the backend (obtained via `Date.now()`).\r\n * @see [[onCommit]] for the event raised before the operation.\r\n */\r\n public readonly onCommitted = new BeEvent<(hasPendingTxns: boolean, time: number) => void>();\r\n\r\n /** Event raised after a changeset has been applied to the briefcase.\r\n * Changesets may be applied as a result of [[BriefcaseConnection.pullChanges]], or by undo/redo operations.\r\n */\r\n public readonly onChangesApplied = new BeEvent<() => void>();\r\n\r\n /** Event raised before an undo/redo operation is performed.\r\n * @see [[onAfterUndoRedo]] for the event raised after the operation.\r\n */\r\n public readonly onBeforeUndoRedo = new BeEvent<(isUndo: boolean) => void>();\r\n\r\n /** Event raised after an undo/redo operation is performed.\r\n * @see [[onBeforeUndoRedo]] for the event raised before to the operation.\r\n */\r\n public readonly onAfterUndoRedo = new BeEvent<(isUndo: boolean) => void>();\r\n\r\n /** Event raised after changes are pulled and merged into the briefcase.\r\n * @see [[BriefcaseConnection.pullAndMergeChanges]].\r\n */\r\n public readonly onChangesPulled = new BeEvent<(parentChangeset: ChangesetIndexAndId) => void>();\r\n\r\n /** Event raised after the briefcase's local changes are pushed.\r\n * @see [[BriefcaseConnection.pushChanges]].\r\n */\r\n public readonly onChangesPushed = new BeEvent<(parentChangeset: ChangesetIndexAndId) => void>();\r\n\r\n /** @internal */\r\n public constructor(iModel: BriefcaseConnection) {\r\n super(iModel.key);\r\n this._iModel = iModel;\r\n this._cleanup = this.registerImpl();\r\n }\r\n\r\n /** @internal */\r\n public dispose(): void {\r\n if (this._cleanup) {\r\n this._cleanup();\r\n this._cleanup = undefined;\r\n\r\n this.onElementsChanged.clear();\r\n this.onModelsChanged.clear();\r\n this.onModelGeometryChanged.clear();\r\n this.onCommit.clear();\r\n this.onCommitted.clear();\r\n this.onChangesApplied.clear();\r\n this.onBeforeUndoRedo.clear();\r\n this.onAfterUndoRedo.clear();\r\n this.onChangesPulled.clear();\r\n this.onChangesPushed.clear();\r\n }\r\n }\r\n\r\n /** Query if the briefcase has any pending Txns waiting to be pushed. */\r\n public async hasPendingTxns(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\r\n return IpcApp.appFunctionIpc.hasPendingTxns(this._iModel.key);\r\n }\r\n\r\n /** Determine if any reversible (undoable) changes exist.\r\n * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.\r\n */\r\n public async isUndoPossible(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\r\n return IpcApp.appFunctionIpc.isUndoPossible(this._iModel.key);\r\n }\r\n\r\n /** Determine if any reinstatable (redoable) changes exist.\r\n * @see [[reinstateTxn]] to redo changes.\r\n */\r\n public async isRedoPossible(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\r\n return IpcApp.appFunctionIpc.isRedoPossible(this._iModel.key);\r\n }\r\n\r\n /** Get the description of the operation that would be reversed by calling [[reverseTxns]]`(1)`.\r\n * This is useful for showing the operation that would be undone, for example in a menu.\r\n */\r\n public async getUndoString(): Promise<string> {\r\n return IpcApp.appFunctionIpc.getUndoString(this._iModel.key);\r\n }\r\n\r\n /** Get a description of the operation that would be reinstated by calling [[reinstateTxn]].\r\n * This is useful for showing the operation that would be redone, in a pull-down menu for example.\r\n */\r\n public async getRedoString(): Promise<string> {\r\n return IpcApp.appFunctionIpc.getRedoString(this._iModel.key);\r\n }\r\n\r\n /** Reverse (undo) the most recent operation.\r\n * @see [[reinstateTxn]] to redo operations.\r\n * @see [[reverseAll]] to undo all operations.\r\n * @see [[isUndoPossible]] to determine if any reversible operations exist.\r\n */\r\n public async reverseSingleTxn(): Promise<IModelStatus> {\r\n return this.reverseTxns(1);\r\n }\r\n\r\n /** Reverse (undo) the most recent operation(s) to the briefcase in the current session.\r\n * @param numOperations the number of operations to reverse. If this is greater than 1, the entire set of operations will\r\n * be reinstated together when/if [[reinstateTxn]] is called.\r\n * @note If there are any outstanding uncommitted changes, they are reversed.\r\n * @note The term \"operation\" is used rather than Txn, since multiple Txns can be grouped together via [TxnManager.beginMultiTxnOperation]($backend). So,\r\n * even if numOperations is 1, multiple Txns may be reversed if they were grouped together when they were made.\r\n * @note If numOperations is too large only the number of reversible operations are reversed.\r\n */\r\n public async reverseTxns(numOperations: number): Promise<IModelStatus> {\r\n return IpcApp.appFunctionIpc.reverseTxns(this._iModel.key, numOperations);\r\n }\r\n\r\n /** Reverse (undo) all changes back to the beginning of the session.\r\n * @see [[reinstateTxn]] to redo changes.\r\n * @see [[reverseSingleTxn]] to undo only the most recent operation.\r\n * @see [[isUndoPossible]] to determine if any reversible operations exist.\r\n */\r\n public async reverseAll(): Promise<IModelStatus> {\r\n return IpcApp.appFunctionIpc.reverseAllTxn(this._iModel.key);\r\n }\r\n\r\n /** Reinstate (redo) the most recently reversed transaction. Since at any time multiple transactions can be reversed, it\r\n * may take multiple calls to this method to reinstate all reversed operations.\r\n * @returns Success if a reversed transaction was reinstated, error status otherwise.\r\n * @note If there are any outstanding uncommitted changes, they are canceled before the Txn is reinstated.\r\n * @see [[isRedoPossible]] to determine if any reinstatable operations exist.\r\n * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.\r\n */\r\n public async reinstateTxn(): Promise<IModelStatus> {\r\n return IpcApp.appFunctionIpc.reinstateTxn(this._iModel.key);\r\n }\r\n\r\n /** Restart the current TxnManager session. This causes all Txns in the current session to no longer be undoable (as if the file was closed\r\n * and reopened.)\r\n * @note This can be quite disconcerting to the user expecting to be able to undo previously made changes. It should only be used\r\n * under extreme circumstances where damage to the file or session could happen if the currently committed are reversed. Use sparingly and with care.\r\n * Probably a good idea to alert the user it happened.\r\n */\r\n public async restartTxnSession(): Promise<void> {\r\n await IpcApp.appFunctionIpc.restartTxnSession(this._iModel.key);\r\n }\r\n\r\n /** @internal */\r\n public notifyElementsChanged(changed: ChangedEntities): void {\r\n this.onElementsChanged.raiseEvent(changed);\r\n }\r\n\r\n /** @internal */\r\n public notifyModelsChanged(changed: ChangedEntities): void {\r\n this.onModelsChanged.raiseEvent(changed);\r\n }\r\n\r\n /** @internal */\r\n public notifyGeometryGuidsChanged(changes: ModelIdAndGeometryGuid[]): void {\r\n this.onModelGeometryChanged.raiseEvent(changes);\r\n }\r\n\r\n /** @internal */\r\n public notifyCommit() {\r\n this.onCommit.raiseEvent();\r\n }\r\n\r\n /** @internal */\r\n public notifyCommitted(hasPendingTxns: boolean, time: number) {\r\n this.onCommitted.raiseEvent(hasPendingTxns, time);\r\n }\r\n\r\n /** @internal */\r\n public notifyChangesApplied() {\r\n this.onChangesApplied.raiseEvent();\r\n }\r\n\r\n /** @internal */\r\n public notifyBeforeUndoRedo(isUndo: boolean) {\r\n this.onBeforeUndoRedo.raiseEvent(isUndo);\r\n }\r\n\r\n /** @internal */\r\n public notifyAfterUndoRedo(isUndo: boolean) {\r\n this.onAfterUndoRedo.raiseEvent(isUndo);\r\n }\r\n\r\n /** @internal */\r\n public notifyPulledChanges(parentChangeset: ChangesetIndexAndId) {\r\n this.onChangesPulled.raiseEvent(parentChangeset);\r\n }\r\n\r\n /** @internal */\r\n public notifyPushedChanges(parentChangeset: ChangesetIndexAndId) {\r\n this.onChangesPushed.raiseEvent(parentChangeset);\r\n }\r\n\r\n /** @internal */\r\n public notifyIModelNameChanged(name: string) {\r\n this._iModel.name = name;\r\n }\r\n\r\n /** @internal */\r\n public notifyRootSubjectChanged(subject: RootSubjectProps) {\r\n this._iModel.rootSubject = subject;\r\n }\r\n\r\n /** @internal */\r\n public notifyProjectExtentsChanged(range: Range3dProps) {\r\n this._iModel.projectExtents = Range3d.fromJSON(range);\r\n }\r\n\r\n /** @internal */\r\n public notifyGlobalOriginChanged(origin: XYZProps) {\r\n this._iModel.globalOrigin = Point3d.fromJSON(origin);\r\n }\r\n\r\n /** @internal */\r\n public notifyEcefLocationChanged(ecef: EcefLocationProps | undefined) {\r\n this._iModel.ecefLocation = ecef ? new EcefLocation(ecef) : undefined;\r\n }\r\n\r\n /** @internal */\r\n public notifyGeographicCoordinateSystemChanged(gcs: GeographicCRSProps | undefined) {\r\n this._iModel.geographicCoordinateSystem = gcs ? new GeographicCRS(gcs) : undefined;\r\n }\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module IModelConnection
3
3
  */
4
4
  import { BeEvent, Id64String } from "@itwin/core-bentley";
5
- import { EditingScopeNotifications, ElementGeometryChange, IpcAppChannel, ModelGeometryChanges, ModelGeometryChangesProps } from "@itwin/core-common";
5
+ import { EditingScopeNotifications, ElementGeometryChange, ModelGeometryChanges, ModelGeometryChangesProps } from "@itwin/core-common";
6
6
  import { BriefcaseNotificationHandler } from "./BriefcaseTxns";
7
7
  import { BriefcaseConnection } from "./BriefcaseConnection";
8
8
  /** Represents a period of time within an [interactive editing]($docs/learning/InteractiveEditing.md) session during which the
@@ -32,7 +32,7 @@ import { BriefcaseConnection } from "./BriefcaseConnection";
32
32
  * @public
33
33
  */
34
34
  export declare class GraphicalEditingScope extends BriefcaseNotificationHandler implements EditingScopeNotifications {
35
- get briefcaseChannelName(): IpcAppChannel;
35
+ get briefcaseChannelName(): "itwinjs-core/editing-scope";
36
36
  /** Maps model Id to accumulated changes to geometric elements within the associated model. */
37
37
  private readonly _geometryChanges;
38
38
  private _disposed;
@@ -1 +1 @@
1
- {"version":3,"file":"GraphicalEditingScope.d.ts","sourceRoot":"","sources":["../../src/GraphicalEditingScope.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,OAAO,EAAkE,UAAU,EAAe,MAAM,qBAAqB,CAAC;AAE/I,OAAO,EACL,yBAAyB,EAAE,qBAAqB,EAAE,aAAa,EAAE,oBAAoB,EAAE,yBAAyB,EACjH,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAc5D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,qBAAsB,SAAQ,4BAA6B,YAAW,yBAAyB;IAC1G,IAAW,oBAAoB,kBAAyC;IAExE,8FAA8F;IAC9F,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuC;IACxE,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAiB;IAElC,iDAAiD;IACjD,SAAgB,MAAM,EAAE,mBAAmB,CAAC;IAE5C;;OAEG;IACH,gBAAuB,OAAO,kBAAuB,qBAAqB,KAAK,IAA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;IAC9F,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuC;IACxE,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAiB;IAElC,iDAAiD;IACjD,SAAgB,MAAM,EAAE,mBAAmB,CAAC;IAE5C;;OAEG;IACH,gBAAuB,OAAO,kBAAuB,qBAAqB,KAAK,IAAI,EAAI;IAEvF;;;OAGG;IACH,SAAgB,SAAS,kBAAuB,qBAAqB,KAAK,IAAI,EAAI;IAElF;;;OAGG;IACH,SAAgB,QAAQ,kBAAuB,qBAAqB,KAAK,IAAI,EAAI;IAEjF,sEAAsE;IACtE,SAAgB,iBAAiB,oBAAyB,SAAS,oBAAoB,CAAC,SAAS,qBAAqB,KAAK,IAAI,EAAI;IAEnI;;OAEG;WACiB,KAAK,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAmBtF;;;OAGG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAkBlC,yGAAyG;IAClG,0BAA0B,CAAC,OAAO,EAAE,UAAU,GAAG,QAAQ,CAAC,qBAAqB,CAAC,GAAG,SAAS;IAInG,4EAA4E;IACrE,kBAAkB,IAAI,QAAQ,CAAC,oBAAoB,CAAC;IAI3D,gBAAgB;IAChB,IAAW,UAAU,YAEpB;IAED,OAAO,CAAG,sBAAsB;IAWhC,OAAO;IAMP,OAAO,CAAC,OAAO;IAef,gBAAgB;IACT,qBAAqB,CAAC,KAAK,EAAE,yBAAyB,EAAE;CAiChE"}
@@ -46,7 +46,7 @@ class ModelChanges extends core_bentley_1.SortedArray {
46
46
  * @public
47
47
  */
48
48
  class GraphicalEditingScope extends BriefcaseTxns_1.BriefcaseNotificationHandler {
49
- get briefcaseChannelName() { return core_common_1.IpcAppChannel.EditingScope; }
49
+ get briefcaseChannelName() { return core_common_1.ipcAppChannels.editingScope; }
50
50
  /** Don't call this directly - use BriefcaseConnection.enterEditingScope.
51
51
  * @internal
52
52
  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,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;YAC/B,KAAK,MAAM,aAAa,IAAI,YAAY,CAAC,QAAQ,EAAE;gBACjD,IAAI,CAAC,IAAI,EAAE;oBACT,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,GAAG,IAAI,YAAY,CAAC,YAAY,CAAC,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;iBACpH;qBAAM;oBACL,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC,YAAY,CAAC;oBAC9C,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACtC;gBAED,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAC3B,IAAI,uBAAQ,CAAC,MAAM,KAAK,aAAa,CAAC,IAAI,EAAE;oBAC1C,IAAI,SAAS,KAAK,UAAU;wBAC1B,UAAU,GAAG,IAAI,GAAG,EAAc,CAAC;oBACrC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;iBAClC;aACF;SACF;QAED,IAAI,UAAU,EAAE;YACd,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;SAClD;QAED,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;;AAhJD;;GAEG;AACoB,6BAAO,GAAG,IAAI,sBAAO,EAA0C,AAAxD,CAAyD;AAd5E,sDAAqB","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 IModelConnection\r\n */\r\n\r\nimport { assert, BeEvent, compareStrings, DbOpcode, DuplicatePolicy, GuidString, Id64Set, Id64String, SortedArray } from \"@itwin/core-bentley\";\r\nimport { Range3d } from \"@itwin/core-geometry\";\r\nimport {\r\n EditingScopeNotifications, ElementGeometryChange, IpcAppChannel, ModelGeometryChanges, ModelGeometryChangesProps, RemoveFunction,\r\n} from \"@itwin/core-common\";\r\nimport { BriefcaseNotificationHandler } from \"./BriefcaseTxns\";\r\nimport { BriefcaseConnection } from \"./BriefcaseConnection\";\r\nimport { IpcApp } from \"./IpcApp\";\r\n\r\nclass ModelChanges extends SortedArray<ElementGeometryChange> {\r\n public geometryGuid: GuidString;\r\n public readonly range: Range3d;\r\n\r\n public constructor(geometryGuid: GuidString, range: Range3d) {\r\n super((lhs, rhs) => compareStrings(lhs.id, rhs.id), DuplicatePolicy.Replace);\r\n this.geometryGuid = geometryGuid;\r\n this.range = range;\r\n }\r\n}\r\n\r\n/** Represents a period of time within an [interactive editing]($docs/learning/InteractiveEditing.md) session during which the\r\n * geometry of elements being displayed in one or more [[Viewport]]s is being modified. Outside of such a scope, whenever the\r\n * geometry within a [GeometricModel]($backend) changes new [[Tile]]s must be generated to reflect those changes in a viewport.\r\n * Regenerating entire tiles each time individual elements change can be time-consuming, which may introduce an unacceptable delay\r\n * between making a modification and seeing its result on the screen.\r\n *\r\n * Within the context of a graphical editing scope, no new tiles are generated. Instead, the geometry for any deleted or modified elements\r\n * is hidden in the tile graphics, and additional temporary graphics are displayed for any newly-inserted or modified elements. Only when the\r\n * scope exits are new tiles produced.\r\n *\r\n * The application decides when to enter and exit a graphical editing scope. A single interactive editing session may involve any number of\r\n * editing scopes. Typically, applications will enter a new editing scope (after first exiting a previous scope, if one exists):\r\n * - When switching from a non-graphical workflow to one that involves editing geometry; or\r\n * - When changing which geometric model is being edited; or\r\n * - After performing an operation that creates or modifies a \"large\" number (perhaps hundreds?) of elements.\r\n *\r\n * An application should typically exit any graphical editing scope before:\r\n * - Pulling changesets; or\r\n * - Switching from a graphical editing workflow to some non-graphical workflow.\r\n *\r\n * Graphical editing scopes are only supported for [[BriefcaseConnection]]s opened in read-write mode that contain version 1.0.11 or newer of the BisCore schema.\r\n * @see [[BriefcaseConnection.enterEditingScope]] to create a scope for a briefcase.\r\n * @see [[BriefcaseConnection.editingScope]] to obtain a briefcase's current scope.\r\n * @see [[exit]] to terminate a scope.\r\n * @public\r\n */\r\nexport class GraphicalEditingScope extends BriefcaseNotificationHandler implements EditingScopeNotifications {\r\n public get briefcaseChannelName() { return IpcAppChannel.EditingScope; }\r\n\r\n /** Maps model Id to accumulated changes to geometric elements within the associated model. */\r\n private readonly _geometryChanges = new Map<Id64String, ModelChanges>();\r\n private _disposed = false;\r\n private _cleanup?: RemoveFunction;\r\n\r\n /** The connection to the iModel being edited. */\r\n public readonly iModel: BriefcaseConnection;\r\n\r\n /** Event raised when a new scope is created for any [[BriefcaseConnection]].\r\n * @see [[onExiting]] and [[onExited]] for complementary events.\r\n */\r\n public static readonly onEnter = new BeEvent<(scope: GraphicalEditingScope) => void>();\r\n\r\n /** Event raised when this scope is about to exit.\r\n * @see [[onEnter]] for the complementary event.\r\n * @see [[onExited]] for an event raised after the scope exits.\r\n */\r\n public readonly onExiting = new BeEvent<(scope: GraphicalEditingScope) => void>();\r\n\r\n /** Event raised when this scope has exited.\r\n * @see [[onEnter]] for the complementary event.\r\n * @see [[onExiting]] for an event raised just before the scope is exited.\r\n */\r\n public readonly onExited = new BeEvent<(scope: GraphicalEditingScope) => void>();\r\n\r\n /** Event raised after geometric changes are written to the iModel. */\r\n public readonly onGeometryChanges = new BeEvent<(changes: Iterable<ModelGeometryChanges>, scope: GraphicalEditingScope) => void>();\r\n\r\n /** Don't call this directly - use BriefcaseConnection.enterEditingScope.\r\n * @internal\r\n */\r\n public static async enter(imodel: BriefcaseConnection): Promise<GraphicalEditingScope> {\r\n if (imodel.editingScope)\r\n throw new Error(\"Cannot create an editing scope for an iModel that already has one\");\r\n\r\n // Register the scope synchronously, in case enter() is called again for same iModel while awaiting asynchronous initialization.\r\n const scope = new GraphicalEditingScope(imodel);\r\n try {\r\n const scopeStarted = await IpcApp.appFunctionIpc.toggleGraphicalEditingScope(imodel.key, true);\r\n assert(scopeStarted); // If it didn't, the backend threw an error.\r\n } catch (e) {\r\n scope.dispose();\r\n throw e;\r\n }\r\n\r\n this.onEnter.raiseEvent(scope);\r\n\r\n return scope;\r\n }\r\n\r\n /** Exits this editing scope. The associated [[BriefcaseConnection]]'s `editingScope` will be reset to `undefined`.\r\n * @throws Error if the scope could not be exited, e.g., if it has already been exited.\r\n * @see [[BriefcaseConnection.enterEditingScope]] to enter an editing scope.\r\n */\r\n public async exit(): Promise<void> {\r\n if (this._disposed || this.iModel.editingScope !== this)\r\n throw new Error(\"Cannot exit editing scope after it is disconnected from the iModel\");\r\n\r\n this._disposed = true;\r\n try {\r\n this.onExiting.raiseEvent(this);\r\n } finally {\r\n const scopeExited = await IpcApp.appFunctionIpc.toggleGraphicalEditingScope(this.iModel.key, false);\r\n assert(!scopeExited);\r\n try {\r\n this.onExited.raiseEvent(this);\r\n } finally {\r\n this.dispose();\r\n }\r\n }\r\n }\r\n\r\n /** Obtain all geometric changes to elements within the specified model accumulated within this scope. */\r\n public getGeometryChangesForModel(modelId: Id64String): Iterable<ElementGeometryChange> | undefined {\r\n return this._geometryChanges.get(modelId);\r\n }\r\n\r\n /** Obtain all geometric changes to models accumulated within this scope. */\r\n public getGeometryChanges(): Iterable<ModelGeometryChanges> {\r\n return { [Symbol.iterator]: () => this.geometryChangeIterator() };\r\n }\r\n\r\n /** @internal */\r\n public get isDisposed() {\r\n return this._disposed;\r\n }\r\n\r\n private * geometryChangeIterator(): Iterator<ModelGeometryChanges> {\r\n for (const [key, value] of this._geometryChanges) {\r\n yield {\r\n id: key,\r\n geometryGuid: value.geometryGuid,\r\n range: value.range,\r\n elements: value,\r\n };\r\n }\r\n }\r\n\r\n private constructor(iModel: BriefcaseConnection) {\r\n super(iModel.key);\r\n this.iModel = iModel;\r\n this._cleanup = this.registerImpl();\r\n }\r\n\r\n private dispose(): void {\r\n this._disposed = true;\r\n\r\n this.onExiting.clear();\r\n this.onGeometryChanges.clear();\r\n this.onExited.clear();\r\n\r\n this._geometryChanges.clear();\r\n\r\n if (this._cleanup) {\r\n this._cleanup();\r\n this._cleanup = undefined;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public notifyGeometryChanged(props: ModelGeometryChangesProps[]) {\r\n const changes = ModelGeometryChanges.iterable(props);\r\n const modelIds: Id64String[] = [];\r\n let deletedIds: Id64Set | undefined;\r\n\r\n for (const modelChanges of changes) {\r\n // ###TODO do we care about the model range?\r\n let list = this._geometryChanges.get(modelChanges.id);\r\n modelIds.push(modelChanges.id);\r\n for (const elementChange of modelChanges.elements) {\r\n if (!list) {\r\n this._geometryChanges.set(modelChanges.id, list = new ModelChanges(modelChanges.geometryGuid, modelChanges.range));\r\n } else {\r\n list.geometryGuid = modelChanges.geometryGuid;\r\n modelChanges.range.clone(list.range);\r\n }\r\n\r\n list.insert(elementChange);\r\n if (DbOpcode.Delete === elementChange.type) {\r\n if (undefined === deletedIds)\r\n deletedIds = new Set<Id64String>();\r\n deletedIds.add(elementChange.id);\r\n }\r\n }\r\n }\r\n\r\n if (deletedIds) {\r\n this.iModel.selectionSet.remove(deletedIds);\r\n this.iModel.hilited.setHilite(deletedIds, false);\r\n }\r\n\r\n this.onGeometryChanges.raiseEvent(changes, this);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"GraphicalEditingScope.js","sourceRoot":"","sources":["../../src/GraphicalEditingScope.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA+I;AAE/I,oDAE4B;AAC5B,mDAA+D;AAE/D,qCAAkC;AAElC,MAAM,YAAa,SAAQ,0BAAkC;IAI3D,YAAmB,YAAwB,EAAE,KAAc;QACzD,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,IAAA,6BAAc,E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AC,YAAY,CAAC;oBAC9C,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACtC;gBAED,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAC3B,IAAI,uBAAQ,CAAC,MAAM,KAAK,aAAa,CAAC,IAAI,EAAE;oBAC1C,IAAI,SAAS,KAAK,UAAU;wBAC1B,UAAU,GAAG,IAAI,GAAG,EAAc,CAAC;oBACrC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;iBAClC;aACF;SACF;QAED,IAAI,UAAU,EAAE;YACd,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;SAClD;QAED,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;;AAhJD;;GAEG;AACoB,6BAAO,GAAG,IAAI,sBAAO,EAA0C,AAAxD,CAAyD;AAd5E,sDAAqB","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 IModelConnection\r\n */\r\n\r\nimport { assert, BeEvent, compareStrings, DbOpcode, DuplicatePolicy, GuidString, Id64Set, Id64String, SortedArray } from \"@itwin/core-bentley\";\r\nimport { Range3d } from \"@itwin/core-geometry\";\r\nimport {\r\n EditingScopeNotifications, ElementGeometryChange, ipcAppChannels, ModelGeometryChanges, ModelGeometryChangesProps, RemoveFunction,\r\n} from \"@itwin/core-common\";\r\nimport { BriefcaseNotificationHandler } from \"./BriefcaseTxns\";\r\nimport { BriefcaseConnection } from \"./BriefcaseConnection\";\r\nimport { IpcApp } from \"./IpcApp\";\r\n\r\nclass ModelChanges extends SortedArray<ElementGeometryChange> {\r\n public geometryGuid: GuidString;\r\n public readonly range: Range3d;\r\n\r\n public constructor(geometryGuid: GuidString, range: Range3d) {\r\n super((lhs, rhs) => compareStrings(lhs.id, rhs.id), DuplicatePolicy.Replace);\r\n this.geometryGuid = geometryGuid;\r\n this.range = range;\r\n }\r\n}\r\n\r\n/** Represents a period of time within an [interactive editing]($docs/learning/InteractiveEditing.md) session during which the\r\n * geometry of elements being displayed in one or more [[Viewport]]s is being modified. Outside of such a scope, whenever the\r\n * geometry within a [GeometricModel]($backend) changes new [[Tile]]s must be generated to reflect those changes in a viewport.\r\n * Regenerating entire tiles each time individual elements change can be time-consuming, which may introduce an unacceptable delay\r\n * between making a modification and seeing its result on the screen.\r\n *\r\n * Within the context of a graphical editing scope, no new tiles are generated. Instead, the geometry for any deleted or modified elements\r\n * is hidden in the tile graphics, and additional temporary graphics are displayed for any newly-inserted or modified elements. Only when the\r\n * scope exits are new tiles produced.\r\n *\r\n * The application decides when to enter and exit a graphical editing scope. A single interactive editing session may involve any number of\r\n * editing scopes. Typically, applications will enter a new editing scope (after first exiting a previous scope, if one exists):\r\n * - When switching from a non-graphical workflow to one that involves editing geometry; or\r\n * - When changing which geometric model is being edited; or\r\n * - After performing an operation that creates or modifies a \"large\" number (perhaps hundreds?) of elements.\r\n *\r\n * An application should typically exit any graphical editing scope before:\r\n * - Pulling changesets; or\r\n * - Switching from a graphical editing workflow to some non-graphical workflow.\r\n *\r\n * Graphical editing scopes are only supported for [[BriefcaseConnection]]s opened in read-write mode that contain version 1.0.11 or newer of the BisCore schema.\r\n * @see [[BriefcaseConnection.enterEditingScope]] to create a scope for a briefcase.\r\n * @see [[BriefcaseConnection.editingScope]] to obtain a briefcase's current scope.\r\n * @see [[exit]] to terminate a scope.\r\n * @public\r\n */\r\nexport class GraphicalEditingScope extends BriefcaseNotificationHandler implements EditingScopeNotifications {\r\n public get briefcaseChannelName() { return ipcAppChannels.editingScope; }\r\n\r\n /** Maps model Id to accumulated changes to geometric elements within the associated model. */\r\n private readonly _geometryChanges = new Map<Id64String, ModelChanges>();\r\n private _disposed = false;\r\n private _cleanup?: RemoveFunction;\r\n\r\n /** The connection to the iModel being edited. */\r\n public readonly iModel: BriefcaseConnection;\r\n\r\n /** Event raised when a new scope is created for any [[BriefcaseConnection]].\r\n * @see [[onExiting]] and [[onExited]] for complementary events.\r\n */\r\n public static readonly onEnter = new BeEvent<(scope: GraphicalEditingScope) => void>();\r\n\r\n /** Event raised when this scope is about to exit.\r\n * @see [[onEnter]] for the complementary event.\r\n * @see [[onExited]] for an event raised after the scope exits.\r\n */\r\n public readonly onExiting = new BeEvent<(scope: GraphicalEditingScope) => void>();\r\n\r\n /** Event raised when this scope has exited.\r\n * @see [[onEnter]] for the complementary event.\r\n * @see [[onExiting]] for an event raised just before the scope is exited.\r\n */\r\n public readonly onExited = new BeEvent<(scope: GraphicalEditingScope) => void>();\r\n\r\n /** Event raised after geometric changes are written to the iModel. */\r\n public readonly onGeometryChanges = new BeEvent<(changes: Iterable<ModelGeometryChanges>, scope: GraphicalEditingScope) => void>();\r\n\r\n /** Don't call this directly - use BriefcaseConnection.enterEditingScope.\r\n * @internal\r\n */\r\n public static async enter(imodel: BriefcaseConnection): Promise<GraphicalEditingScope> {\r\n if (imodel.editingScope)\r\n throw new Error(\"Cannot create an editing scope for an iModel that already has one\");\r\n\r\n // Register the scope synchronously, in case enter() is called again for same iModel while awaiting asynchronous initialization.\r\n const scope = new GraphicalEditingScope(imodel);\r\n try {\r\n const scopeStarted = await IpcApp.appFunctionIpc.toggleGraphicalEditingScope(imodel.key, true);\r\n assert(scopeStarted); // If it didn't, the backend threw an error.\r\n } catch (e) {\r\n scope.dispose();\r\n throw e;\r\n }\r\n\r\n this.onEnter.raiseEvent(scope);\r\n\r\n return scope;\r\n }\r\n\r\n /** Exits this editing scope. The associated [[BriefcaseConnection]]'s `editingScope` will be reset to `undefined`.\r\n * @throws Error if the scope could not be exited, e.g., if it has already been exited.\r\n * @see [[BriefcaseConnection.enterEditingScope]] to enter an editing scope.\r\n */\r\n public async exit(): Promise<void> {\r\n if (this._disposed || this.iModel.editingScope !== this)\r\n throw new Error(\"Cannot exit editing scope after it is disconnected from the iModel\");\r\n\r\n this._disposed = true;\r\n try {\r\n this.onExiting.raiseEvent(this);\r\n } finally {\r\n const scopeExited = await IpcApp.appFunctionIpc.toggleGraphicalEditingScope(this.iModel.key, false);\r\n assert(!scopeExited);\r\n try {\r\n this.onExited.raiseEvent(this);\r\n } finally {\r\n this.dispose();\r\n }\r\n }\r\n }\r\n\r\n /** Obtain all geometric changes to elements within the specified model accumulated within this scope. */\r\n public getGeometryChangesForModel(modelId: Id64String): Iterable<ElementGeometryChange> | undefined {\r\n return this._geometryChanges.get(modelId);\r\n }\r\n\r\n /** Obtain all geometric changes to models accumulated within this scope. */\r\n public getGeometryChanges(): Iterable<ModelGeometryChanges> {\r\n return { [Symbol.iterator]: () => this.geometryChangeIterator() };\r\n }\r\n\r\n /** @internal */\r\n public get isDisposed() {\r\n return this._disposed;\r\n }\r\n\r\n private * geometryChangeIterator(): Iterator<ModelGeometryChanges> {\r\n for (const [key, value] of this._geometryChanges) {\r\n yield {\r\n id: key,\r\n geometryGuid: value.geometryGuid,\r\n range: value.range,\r\n elements: value,\r\n };\r\n }\r\n }\r\n\r\n private constructor(iModel: BriefcaseConnection) {\r\n super(iModel.key);\r\n this.iModel = iModel;\r\n this._cleanup = this.registerImpl();\r\n }\r\n\r\n private dispose(): void {\r\n this._disposed = true;\r\n\r\n this.onExiting.clear();\r\n this.onGeometryChanges.clear();\r\n this.onExited.clear();\r\n\r\n this._geometryChanges.clear();\r\n\r\n if (this._cleanup) {\r\n this._cleanup();\r\n this._cleanup = undefined;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public notifyGeometryChanged(props: ModelGeometryChangesProps[]) {\r\n const changes = ModelGeometryChanges.iterable(props);\r\n const modelIds: Id64String[] = [];\r\n let deletedIds: Id64Set | undefined;\r\n\r\n for (const modelChanges of changes) {\r\n // ###TODO do we care about the model range?\r\n let list = this._geometryChanges.get(modelChanges.id);\r\n modelIds.push(modelChanges.id);\r\n for (const elementChange of modelChanges.elements) {\r\n if (!list) {\r\n this._geometryChanges.set(modelChanges.id, list = new ModelChanges(modelChanges.geometryGuid, modelChanges.range));\r\n } else {\r\n list.geometryGuid = modelChanges.geometryGuid;\r\n modelChanges.range.clone(list.range);\r\n }\r\n\r\n list.insert(elementChange);\r\n if (DbOpcode.Delete === elementChange.type) {\r\n if (undefined === deletedIds)\r\n deletedIds = new Set<Id64String>();\r\n deletedIds.add(elementChange.id);\r\n }\r\n }\r\n }\r\n\r\n if (deletedIds) {\r\n this.iModel.selectionSet.remove(deletedIds);\r\n this.iModel.hilited.setHilite(deletedIds, false);\r\n }\r\n\r\n this.onGeometryChanges.raiseEvent(changes, this);\r\n }\r\n}\r\n"]}
@@ -216,9 +216,7 @@ export declare class IModelApp {
216
216
  static get applicationVersion(): string;
217
217
  /** True after [[startup]] has been called, until [[shutdown]] is called. */
218
218
  static get initialized(): boolean;
219
- /** Provides access to the IModelHub implementation for this IModelApp.
220
- * @internal
221
- */
219
+ /** Provides access to IModelHub services. */
222
220
  static get hubAccess(): FrontendHubAccess | undefined;
223
221
  /** Provides access to the RealityData service implementation for this IModelApp
224
222
  * @beta
@@ -1 +1 @@
1
- {"version":3,"file":"IModelApp.d.ts","sourceRoot":"","sources":["../../src/IModelApp.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,cAAc;AAEd,eAAO,MAAM,oBAAoB,QAAkD,CAAC;AAGpF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAA0C,UAAU,EAA2B,MAAM,qBAAqB,CAAC;AACpJ,OAAO,EACL,mBAAmB,EAAgB,YAAY,EAAE,iBAAiB,EAAoB,sBAAsB,EAC7G,MAAM,oBAAoB,CAA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S,CAAC,EAAE,MAAM,CAAC;QACnB,yEAAyE;QACzE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;KAC/B,GAAG,mBAAmB;IA4BzB;;OAEG;WACW,oBAAoB;IAQlC;;OAEG;WACW,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,WAAW;IAQ9D;;;;OAIG;WACW,eAAe,CAAC,MAAM,EAAE,MAAM;IAiB5C;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,qBAAqB;CAKrC"}
@@ -126,9 +126,7 @@ class IModelApp {
126
126
  static get applicationVersion() { return this._applicationVersion; }
127
127
  /** True after [[startup]] has been called, until [[shutdown]] is called. */
128
128
  static get initialized() { return this._initialized; }
129
- /** Provides access to the IModelHub implementation for this IModelApp.
130
- * @internal
131
- */
129
+ /** Provides access to IModelHub services. */
132
130
  static get hubAccess() { return this._hubAccess; }
133
131
  /** Provides access to the RealityData service implementation for this IModelApp
134
132
  * @beta
@@ -1 +1 @@
1
- {"version":3,"file":"IModelApp.js","sourceRoot":"","sources":["../../src/IModelApp.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,cAAc;AACd,8DAA8D;AACjD,QAAA,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAiB,CAAC,CAAC,8CAA8C;AACnI,MAAM,gBAAgB,GAAG,6HAA6H,CAAC;AAEvJ,0DAAgD;AAChD,sDAAoJ;AACpJ,oDAE4B;AAC5B,gDAAqD;AACrD,0DAAyD;AACzD,oEAAoG;AACpG,yCAAsC;AACtC,yCAAsC;AACtC,6DAA+C;AAC/C,+EAAiE;AACjE,+DAA4D;AAC5D,uEAAyD;AACzD,qEAAuD;AACvD,iEAA8D;AAC9D,+CAA4C;AAE5C,qEAAkE;AAClE,oEAAsD;AACtD,yDAA2C;AAC3C,+DAA4D;AAC5D,+EAA4E;AAC5E,wDAAqD;AACrD,kDA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c,CAAC,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAC/D,OAAO,cAAc,CAAC;IACxB,CAAC;;;AAhkBc,sBAAY,GAAG,KAAK,AAAR,CAAS;AAiBrB,wBAAc,GAAG,KAAK,AAAR,CAAS;AACvB,6BAAmB,GAAG,KAAK,AAAR,CAAS;AAC5B,4BAAkB,GAA2B,yBAAU,CAAC,WAAW,CAAC,CAAC,CAAC,AAApD,CAAqD;AAatF,yEAAyE;AAClD,0BAAgB,GAAG,IAAI,sBAAO,EAAc,AAA5B,CAA6B;AAEpE;;GAEG;AACoB,wBAAc,GAAG,IAAI,sBAAO,EAAc,AAA5B,CAA6B;AAIlE,6CAA6C;AACtB,eAAK,GAAG,IAAI,mBAAY,EAAE,AAArB,CAAsB;AA8DlD;;GAEG;AACoB,mBAAS,GAAqB,IAAI,iCAAgB,EAAE,AAA3C,CAA4C;AAE5E,aAAa;AACU,wBAAc,GAAG,EAAI,CAAC,qBAAqB,EAAE,AAA/B,CAAgC;AAErE,gDAAgD;AACjC,wBAAc,GAAG,IAAI,GAAG,EAA8B,AAAxC,CAAyC;AAnH3D,8BAAS","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 IModelApp\r\n */\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-var-requires\r\nexport const ITWINJS_CORE_VERSION = require(\"../../package.json\").version as string; // require resolves from the lib/{cjs,esm} dir\r\nconst COPYRIGHT_NOTICE = 'Copyright © 2017-2023 <a href=\"https://www.bentley.com\" target=\"_blank\" rel=\"noopener noreferrer\">Bentley Systems, Inc.</a>';\r\n\r\nimport { UiAdmin } from \"@itwin/appui-abstract\";\r\nimport { AccessToken, BeDuration, BeEvent, BentleyStatus, DbResult, dispose, Guid, GuidString, Logger, ProcessDetector } from \"@itwin/core-bentley\";\r\nimport {\r\n AuthorizationClient, IModelStatus, Localization, RealityDataAccess, RpcConfiguration, RpcInterfaceDefinition, RpcRequest, SerializedRpcActivity,\r\n} from \"@itwin/core-common\";\r\nimport { ITwinLocalization } from \"@itwin/core-i18n\";\r\nimport { TelemetryManager } from \"@itwin/core-telemetry\";\r\nimport { queryRenderCompatibility, WebGLRenderCompatibilityInfo } from \"@itwin/webgl-compatibility\";\r\nimport { AccuDraw } from \"./AccuDraw\";\r\nimport { AccuSnap } from \"./AccuSnap\";\r\nimport * as auxCoordState from \"./AuxCoordSys\";\r\nimport * as categorySelectorState from \"./CategorySelectorState\";\r\nimport { ExtensionAdmin } from \"./extension/ExtensionAdmin\";\r\nimport * as displayStyleState from \"./DisplayStyleState\";\r\nimport * as drawingViewState from \"./DrawingViewState\";\r\nimport { ElementLocateManager } from \"./ElementLocateManager\";\r\nimport { EntityState } from \"./EntityState\";\r\nimport { FrontendHubAccess } from \"./FrontendHubAccess\";\r\nimport { FrontendLoggerCategory } from \"./FrontendLoggerCategory\";\r\nimport * as modelselector from \"./ModelSelectorState\";\r\nimport * as modelState from \"./ModelState\";\r\nimport { NotificationManager } from \"./NotificationManager\";\r\nimport { QuantityFormatter } from \"./quantity-formatting/QuantityFormatter\";\r\nimport { RenderSystem } from \"./render/RenderSystem\";\r\nimport { System } from \"./render/webgl/System\";\r\nimport * as sheetState from \"./SheetViewState\";\r\nimport * as spatialViewState from \"./SpatialViewState\";\r\nimport { TentativePoint } from \"./TentativePoint\";\r\nimport { RealityDataSourceProviderRegistry } from \"./RealityDataSource\";\r\nimport { MapLayerFormatRegistry, MapLayerOptions, TerrainProviderRegistry, TileAdmin } from \"./tile/internal\";\r\nimport * as accudrawTool from \"./tools/AccuDrawTool\";\r\nimport * as clipViewTool from \"./tools/ClipViewTool\";\r\nimport * as idleTool from \"./tools/IdleTool\";\r\nimport * as measureTool from \"./tools/MeasureTool\";\r\nimport * as selectTool from \"./tools/SelectTool\";\r\nimport { ToolRegistry } from \"./tools/Tool\";\r\nimport { ToolAdmin } from \"./tools/ToolAdmin\";\r\nimport * as viewTool from \"./tools/ViewTool\";\r\nimport { UserPreferencesAccess } from \"./UserPreferences\";\r\nimport { ViewManager } from \"./ViewManager\";\r\nimport * as viewState from \"./ViewState\";\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-var-requires\r\nrequire(\"./IModeljs-css\");\r\n\r\n// cSpell:ignore noopener noreferrer gprid forin nbsp csrf xsrf\r\n\r\n/** Options that can be supplied with [[IModelAppOptions]] to customize frontend security.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FrontendSecurityOptions {\r\n /** Configures protection from Cross Site Request Forgery attacks. */\r\n readonly csrfProtection?: {\r\n /** If enabled, IModelApp will extract the CSRF token for the current session from the document's cookies and send it with each request as a header value. */\r\n readonly enabled: boolean;\r\n /** Defaults to XSRF-TOKEN. */\r\n readonly cookieName?: string;\r\n /** Defaults to X-XSRF-TOKEN. */\r\n readonly headerName?: string;\r\n };\r\n}\r\n\r\n/** Options that can be supplied to [[IModelApp.startup]] to customize frontend behavior.\r\n * @public\r\n */\r\nexport interface IModelAppOptions {\r\n /** If present, supplies the [[FrontendHubAccess]] for this session. */\r\n hubAccess?: FrontendHubAccess;\r\n /** If present, supplies the Id of this application. Applications must set this to the Bentley Global Product Registry Id (GPRID) for usage logging. */\r\n applicationId?: string;\r\n /** If present, supplies the version of this application. Must be set for usage logging. */\r\n applicationVersion?: string;\r\n /** If present, supplies the [[UserPreferencesAccess]] for this session.\r\n * @beta\r\n */\r\n userPreferences?: UserPreferencesAccess;\r\n /** If present, supplies the [[ViewManager]] for this session. */\r\n viewManager?: ViewManager;\r\n /** If present, supplies Map Layer Options for this session such as Azure Access Keys\r\n * @beta\r\n */\r\n mapLayerOptions?: MapLayerOptions;\r\n /** If present, supplies the properties with which to initialize the [[TileAdmin]] for this session. */\r\n tileAdmin?: TileAdmin.Props;\r\n /** If present, supplies the [[NotificationManager]] for this session. */\r\n notifications?: NotificationManager;\r\n /** If present, supplies the [[ToolAdmin]] for this session. */\r\n toolAdmin?: ToolAdmin;\r\n /** If present, supplies the [[AccuDraw]] for this session. */\r\n accuDraw?: AccuDraw;\r\n /** If present, supplies the [[AccuSnap]] for this session. */\r\n accuSnap?: AccuSnap;\r\n /** If present, supplies the [[Localization]] for this session. Defaults to [ITwinLocalization]($i18n). */\r\n localization?: Localization;\r\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\r\n authorizationClient?: AuthorizationClient;\r\n /** If present, supplies security options for the frontend. */\r\n security?: FrontendSecurityOptions;\r\n /** @internal */\r\n sessionId?: GuidString;\r\n /** @internal */\r\n locateManager?: ElementLocateManager;\r\n /** If present, supplies the [[TentativePoint]] for this session. */\r\n tentativePoint?: TentativePoint;\r\n /** @internal */\r\n quantityFormatter?: QuantityFormatter;\r\n /** If present, supplies an implementation of the render system, or options for initializing the default render system. */\r\n renderSys?: RenderSystem | RenderSystem.Options;\r\n /** If present, supplies the [[UiAdmin]] for this session. */\r\n uiAdmin?: UiAdmin;\r\n /** If present, determines whether iModelApp is a NoRenderApp\r\n * @internal\r\n */\r\n noRender?: boolean;\r\n /**\r\n * @deprecated in 3.7. Specify desired RPC interfaces in the platform-specific RPC manager call instead.\r\n * See [[MobileRpcManager.initializeClient]], [[ElectronRpcManager.initializeFrontend]], [[BentleyCloudRpcManager.initializeClient]].\r\n */\r\n rpcInterfaces?: RpcInterfaceDefinition[];\r\n /** @beta */\r\n realityDataAccess?: RealityDataAccess;\r\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\r\n * The path should always end with a trailing `/`.\r\n * @beta\r\n */\r\n publicPath?: string;\r\n}\r\n\r\n/** Options for [[IModelApp.makeModalDiv]]\r\n * @internal\r\n */\r\nexport interface ModalOptions {\r\n /** Width for the Modal dialog box. */\r\n width?: number;\r\n /** The dialog should be dismissed if the user clicks anywhere or hits Enter or Escape on the keyboard. */\r\n autoClose?: boolean;\r\n /** Show an 'x' in the upper right corner to close the dialog */\r\n closeBox?: boolean;\r\n /** The parent for the semi transparent *darkening* div. If not present, use `document.body` */\r\n rootDiv?: HTMLElement;\r\n}\r\n\r\n/** Return type for [[IModelApp.makeModalDiv]]\r\n * @internal\r\n */\r\nexport interface ModalReturn {\r\n /** The modal HTMLDivElement created. */\r\n modal: HTMLDivElement;\r\n /** A function that can be set as an event handler to stop the modal dialog. This can be used if `autoClose` or `closeBox` are not enabled. */\r\n stop: (_ev: Event) => void;\r\n}\r\n\r\n/** We hang the IModelApp object off the global `window` object in IModelApp.startup for debugging purposes.\r\n * It's removed in IModelApp.shutdown.\r\n */\r\ninterface IModelAppForDebugger {\r\n iModelAppForDebugger?: typeof IModelApp;\r\n}\r\n\r\n/**\r\n * Global singleton that connects the user interface with the iTwin.js services. There can be only one IModelApp active in a session. All\r\n * members of IModelApp are static, and it serves as a singleton object for gaining access to session information.\r\n *\r\n * Before any interactive operations may be performed by the `@itwin/core-frontend package`, [[IModelApp.startup]] must be called and awaited.\r\n * Applications may customize the frontend behavior of iTwin.js by supplying options to [[IModelApp.startup]].\r\n *\r\n * @public\r\n */\r\nexport class IModelApp {\r\n private static _initialized = false;\r\n private static _accuDraw: AccuDraw;\r\n private static _accuSnap: AccuSnap;\r\n private static _applicationId: string;\r\n private static _applicationVersion: string;\r\n private static _localization: Localization;\r\n private static _locateManager: ElementLocateManager;\r\n private static _notifications: NotificationManager;\r\n private static _quantityFormatter: QuantityFormatter;\r\n private static _renderSystem?: RenderSystem;\r\n private static _userPreferences?: UserPreferencesAccess;\r\n private static _tentativePoint: TentativePoint;\r\n private static _tileAdmin: TileAdmin;\r\n private static _toolAdmin: ToolAdmin;\r\n private static _viewManager: ViewManager;\r\n private static _uiAdmin: UiAdmin;\r\n private static _noRender: boolean;\r\n private static _wantEventLoop = false;\r\n private static _animationRequested = false;\r\n private static _animationInterval: BeDuration | undefined = BeDuration.fromSeconds(1);\r\n private static _animationIntervalId?: number;\r\n private static _securityOptions: FrontendSecurityOptions;\r\n private static _mapLayerFormatRegistry: MapLayerFormatRegistry;\r\n private static _terrainProviderRegistry: TerrainProviderRegistry;\r\n private static _realityDataSourceProviders: RealityDataSourceProviderRegistry;\r\n private static _hubAccess?: FrontendHubAccess;\r\n private static _realityDataAccess?: RealityDataAccess;\r\n private static _publicPath: string;\r\n\r\n // No instances of IModelApp may be created. All members are static and must be on the singleton object IModelApp.\r\n protected constructor() { }\r\n\r\n /** Event raised just before the frontend IModelApp is to be shut down */\r\n public static readonly onBeforeShutdown = new BeEvent<() => void>();\r\n\r\n /** Event raised after IModelApp is finished starting up.\r\n * @internal\r\n */\r\n public static readonly onAfterStartup = new BeEvent<() => void>();\r\n\r\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\r\n public static authorizationClient?: AuthorizationClient;\r\n /** The [[ToolRegistry]] for this session. */\r\n public static readonly tools = new ToolRegistry();\r\n /** A uniqueId for this session */\r\n public static sessionId: GuidString;\r\n /** The [[MapLayerFormatRegistry]] for this session. */\r\n public static get mapLayerFormatRegistry(): MapLayerFormatRegistry { return this._mapLayerFormatRegistry; }\r\n /** The [[TerrainProviderRegistry]] for this session. */\r\n public static get terrainProviderRegistry(): TerrainProviderRegistry { return this._terrainProviderRegistry; }\r\n /** The [[RealityDataSourceProviderRegistry]] for this session.\r\n * @alpha\r\n */\r\n public static get realityDataSourceProviders(): RealityDataSourceProviderRegistry { return this._realityDataSourceProviders; }\r\n /** The [[RenderSystem]] for this session. */\r\n public static get renderSystem(): RenderSystem { return this._renderSystem!; }\r\n /** The [[ViewManager]] for this session. */\r\n public static get viewManager(): ViewManager { return this._viewManager; }\r\n /** The [[NotificationManager]] for this session. */\r\n public static get notifications(): NotificationManager { return this._notifications; }\r\n /** The [[TileAdmin]] for this session. */\r\n public static get tileAdmin(): TileAdmin { return this._tileAdmin; }\r\n /** The [[QuantityFormatter]] for this session. */\r\n public static get quantityFormatter(): QuantityFormatter { return this._quantityFormatter; }\r\n /** The [[ToolAdmin]] for this session. */\r\n public static get toolAdmin(): ToolAdmin { return this._toolAdmin; }\r\n /** The [[AccuDraw]] for this session. */\r\n public static get accuDraw(): AccuDraw { return this._accuDraw; }\r\n /** The [[AccuSnap]] for this session. */\r\n public static get accuSnap(): AccuSnap { return this._accuSnap; }\r\n public static get locateManager(): ElementLocateManager { return this._locateManager; }\r\n /** The [[TentativePoint]] for this session]]. */\r\n public static get tentativePoint(): TentativePoint { return this._tentativePoint; }\r\n /** The [[Localization]] for this session. */\r\n public static get localization(): Localization { return this._localization; }\r\n /** The [[UserPreferencesAccess]] for this session.\r\n * @beta\r\n */\r\n public static get userPreferences(): UserPreferencesAccess | undefined { return this._userPreferences; }\r\n /** The Id of this application. Applications must set this to the Global Product Registry ID (GPRID) for usage logging. */\r\n public static get applicationId(): string { return this._applicationId; }\r\n /** The version of this application. Must be set for usage logging. */\r\n public static get applicationVersion(): string { return this._applicationVersion; }\r\n /** True after [[startup]] has been called, until [[shutdown]] is called. */\r\n public static get initialized() { return this._initialized; }\r\n\r\n /** Provides access to the IModelHub implementation for this IModelApp.\r\n * @internal\r\n */\r\n public static get hubAccess(): FrontendHubAccess | undefined { return this._hubAccess; }\r\n /** Provides access to the RealityData service implementation for this IModelApp\r\n * @beta\r\n */\r\n public static get realityDataAccess(): RealityDataAccess | undefined { return this._realityDataAccess; }\r\n\r\n /** @internal */\r\n public static get hasRenderSystem() { return this._renderSystem !== undefined && this._renderSystem.isValid; }\r\n /** The [[UiAdmin]] for this session. */\r\n public static get uiAdmin() { return this._uiAdmin; }\r\n /** The requested security options for the frontend. */\r\n public static get securityOptions() { return this._securityOptions; }\r\n /** The root URL for the assets 'public' folder.\r\n * @beta\r\n */\r\n public static get publicPath() { return this._publicPath; }\r\n /** The [[TelemetryManager]] for this session\r\n * @internal\r\n */\r\n public static readonly telemetry: TelemetryManager = new TelemetryManager();\r\n\r\n /** @alpha */\r\n public static readonly extensionAdmin = this._createExtensionAdmin();\r\n\r\n /** Map of classFullName to EntityState class */\r\n private static _entityClasses = new Map<string, typeof EntityState>();\r\n\r\n /** Register all of the subclasses of EntityState from a module.\r\n * @internal\r\n */\r\n public static registerModuleEntities(moduleObj: any) {\r\n for (const thisMember in moduleObj) { // eslint-disable-line guard-for-in\r\n const thisEntityState = moduleObj[thisMember];\r\n if (thisEntityState.prototype instanceof EntityState) {\r\n this.registerEntityState(thisEntityState.classFullName, thisEntityState);\r\n }\r\n }\r\n }\r\n\r\n /** Register an EntityState class by its classFullName\r\n * @internal\r\n */\r\n public static registerEntityState(classFullName: string, classType: typeof EntityState) {\r\n const lowerName = classFullName.toLowerCase();\r\n if (this._entityClasses.has(lowerName)) {\r\n const errMsg = `Class ${classFullName} is already registered. Make sure static schemaName and className members are correct on class ${classType.name}`;\r\n Logger.logError(FrontendLoggerCategory.IModelConnection, errMsg);\r\n throw new Error(errMsg);\r\n }\r\n\r\n this._entityClasses.set(lowerName, classType);\r\n }\r\n\r\n /** @internal */\r\n public static lookupEntityClass(classFullName: string) { return this._entityClasses.get(classFullName.toLowerCase()); }\r\n\r\n /**\r\n * Obtain WebGL rendering compatibility information for the client system. This information describes whether the client meets the\r\n * minimum rendering capabilities. It also describes whether the system lacks any optional capabilities that could improve quality\r\n * and/or performance.\r\n * @note As of 4.x, iTwin.js requires WebGL 2. If the client does not support WebGL 2, the `status` field of the returned compatibility info will be [WebGLRenderCompatibilityStatus.CannotCreateContext]($webgl-compatibility).\r\n */\r\n public static queryRenderCompatibility(): WebGLRenderCompatibilityInfo {\r\n return queryRenderCompatibility(true, System.createContext);\r\n }\r\n\r\n /**\r\n * This method must be called before any other `@itwin/core-frontend` methods are used.\r\n * Somewhere in your startup code, call [[IModelApp.startup]]. E.g.:\r\n * ``` ts\r\n * await IModelApp.startup( {applicationId: myAppId} );\r\n * ```\r\n * @param opts The options for configuring IModelApp\r\n */\r\n public static async startup(opts?: IModelAppOptions): Promise<void> {\r\n if (this._initialized)\r\n return; // we're already initialized, do nothing.\r\n this._initialized = true;\r\n\r\n opts = opts ?? {};\r\n this._securityOptions = opts.security ?? {};\r\n\r\n if (process.env.NODE_ENV === \"development\") {\r\n // Make IModelApp globally accessible for debugging purposes. We'll remove it on shutdown.\r\n (window as IModelAppForDebugger).iModelAppForDebugger = this;\r\n }\r\n\r\n this.sessionId = opts.sessionId ?? Guid.createValue();\r\n this._applicationId = opts.applicationId ?? \"2686\"; // Default to product id of iTwin.js\r\n this._applicationVersion = opts.applicationVersion ?? \"1.0.0\";\r\n this.authorizationClient = opts.authorizationClient;\r\n this._hubAccess = opts.hubAccess;\r\n this._noRender = opts.noRender ?? false;\r\n\r\n this._setupRpcRequestContext();\r\n\r\n this._localization = opts.localization ?? new ITwinLocalization();\r\n const toolsNs = \"CoreTools\";\r\n await this.localization.initialize([\"iModelJs\", toolsNs]);\r\n [\r\n selectTool,\r\n idleTool,\r\n viewTool,\r\n clipViewTool,\r\n measureTool,\r\n accudrawTool,\r\n ].forEach((tool) => this.tools.registerModule(tool, toolsNs));\r\n\r\n this.registerEntityState(EntityState.classFullName, EntityState);\r\n [\r\n modelState,\r\n sheetState,\r\n viewState,\r\n drawingViewState,\r\n spatialViewState,\r\n displayStyleState,\r\n modelselector,\r\n categorySelectorState,\r\n auxCoordState,\r\n ].forEach((module) => this.registerModuleEntities(module));\r\n\r\n this._renderSystem = (opts.renderSys instanceof RenderSystem) ? opts.renderSys : this.createRenderSys(opts.renderSys);\r\n if (opts.userPreferences)\r\n this._userPreferences = opts.userPreferences;\r\n this._viewManager = opts.viewManager ?? new ViewManager();\r\n this._tileAdmin = await TileAdmin.create(opts.tileAdmin);\r\n this._notifications = opts.notifications ?? new NotificationManager();\r\n this._toolAdmin = opts.toolAdmin ?? new ToolAdmin();\r\n this._accuDraw = opts.accuDraw ?? new AccuDraw();\r\n this._accuSnap = opts.accuSnap ?? new AccuSnap();\r\n this._locateManager = opts.locateManager ?? new ElementLocateManager();\r\n this._tentativePoint = opts.tentativePoint ?? new TentativePoint();\r\n this._quantityFormatter = opts.quantityFormatter ?? new QuantityFormatter();\r\n this._uiAdmin = opts.uiAdmin ?? new UiAdmin();\r\n this._mapLayerFormatRegistry = new MapLayerFormatRegistry(opts.mapLayerOptions);\r\n this._terrainProviderRegistry = new TerrainProviderRegistry();\r\n this._realityDataSourceProviders = new RealityDataSourceProviderRegistry();\r\n this._realityDataAccess = opts.realityDataAccess;\r\n this._publicPath = opts.publicPath ?? \"\";\r\n\r\n [\r\n this.renderSystem,\r\n this.viewManager,\r\n this.toolAdmin,\r\n this.accuDraw,\r\n this.accuSnap,\r\n this.locateManager,\r\n this.tentativePoint,\r\n this.uiAdmin,\r\n ].forEach((sys) => sys.onInitialized());\r\n\r\n await this.quantityFormatter.onInitialized();\r\n this.onAfterStartup.raiseEvent();\r\n }\r\n\r\n /** Must be called before the application exits to release any held resources. */\r\n public static async shutdown() {\r\n if (!this._initialized)\r\n return;\r\n\r\n // notify listeners that this IModelApp is about to be shut down.\r\n this.onBeforeShutdown.raiseEvent();\r\n this.onBeforeShutdown.clear();\r\n\r\n if (process.env.NODE_ENV === \"development\") {\r\n (window as IModelAppForDebugger).iModelAppForDebugger = undefined;\r\n }\r\n\r\n this._wantEventLoop = false;\r\n window.removeEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n this.clearIntervalAnimation();\r\n [this.toolAdmin, this.viewManager, this.tileAdmin].forEach((sys) => sys.onShutDown());\r\n this.tools.shutdown();\r\n this._renderSystem = dispose(this._renderSystem);\r\n this._entityClasses.clear();\r\n this.authorizationClient = undefined;\r\n this._initialized = false;\r\n this.onAfterStartup.clear();\r\n }\r\n\r\n /** Controls how frequently the application polls for changes that may require a new animation frame to be requested.\r\n * Such changes include resizing a Viewport or changing the device pixel ratio by zooming in or out in the browser.\r\n * The default interval is 1 second. It may be desirable to override the default for specific apps and/or devices.\r\n * - Increasing the interval can conserve battery life on battery-powered devices at the expense of slower response to resize events.\r\n * - An application that only displays a single Viewport whose dimensions only change when the dimensions of the application window change, and which does not support changing application zoom level, could disable the interval altogether.\r\n * @param interval The interval at which to poll for changes. If undefined (or negative), the application will never poll. If zero, the application will poll as frequently as possible.\r\n * @beta\r\n */\r\n public static get animationInterval(): BeDuration | undefined { return IModelApp._animationInterval; }\r\n public static set animationInterval(interval: BeDuration | undefined) {\r\n if (undefined !== interval && interval.isTowardsPast)\r\n interval = undefined;\r\n\r\n if (interval !== IModelApp._animationInterval) {\r\n IModelApp._animationInterval = interval;\r\n if (IModelApp._wantEventLoop)\r\n IModelApp.requestIntervalAnimation();\r\n }\r\n }\r\n\r\n /** @internal */\r\n public static requestNextAnimation() {\r\n // Only want to call requestAnimationFrame if it is defined. Need to check whether current iModelApp is a NoRenderApp.\r\n if (IModelApp._noRender)\r\n return;\r\n\r\n if (!IModelApp._animationRequested) {\r\n IModelApp._animationRequested = true;\r\n requestAnimationFrame(IModelApp.eventLoop);\r\n }\r\n }\r\n\r\n /** @internal */\r\n private static clearIntervalAnimation(): void {\r\n if (undefined !== IModelApp._animationIntervalId) {\r\n window.clearInterval(IModelApp._animationIntervalId);\r\n IModelApp._animationIntervalId = undefined;\r\n }\r\n }\r\n\r\n /** @internal */\r\n private static requestIntervalAnimation(): void {\r\n IModelApp.clearIntervalAnimation();\r\n\r\n if (undefined !== IModelApp.animationInterval)\r\n IModelApp._animationIntervalId = window.setInterval(() => {\r\n IModelApp.requestNextAnimation();\r\n }, IModelApp.animationInterval.milliseconds);\r\n }\r\n\r\n /** @internal */\r\n public static startEventLoop() {\r\n if (!IModelApp._wantEventLoop) {\r\n IModelApp._wantEventLoop = true;\r\n window.addEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n IModelApp.requestIntervalAnimation();\r\n IModelApp.requestNextAnimation();\r\n }\r\n }\r\n\r\n /** Strictly for tests. @internal */\r\n public static stopEventLoop() {\r\n this._wantEventLoop = false;\r\n }\r\n\r\n /** The main event processing loop for Tools and rendering. */\r\n private static eventLoop() {\r\n IModelApp._animationRequested = false;\r\n if (!IModelApp._wantEventLoop) // flag turned on at startup\r\n return;\r\n\r\n try {\r\n IModelApp.toolAdmin.processEvent(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n IModelApp.viewManager.renderLoop();\r\n IModelApp.tileAdmin.process();\r\n } catch (exception) {\r\n ToolAdmin.exceptionHandler(exception); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n IModelApp._wantEventLoop = false;\r\n IModelApp._animationRequested = true; // unrecoverable after exception, don't request any further frames.\r\n window.removeEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n }\r\n }\r\n\r\n /** Get the user's access token for this IModelApp, or a blank string if none is available.\r\n * @note Access tokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value\r\n * returned by this method may change over time throughout the course of a session.\r\n */\r\n public static async getAccessToken(): Promise<AccessToken> {\r\n try {\r\n return (await this.authorizationClient?.getAccessToken()) ?? \"\";\r\n } catch (e) {\r\n return \"\";\r\n }\r\n }\r\n\r\n /** @internal */\r\n public static createRenderSys(opts?: RenderSystem.Options): RenderSystem { return System.create(opts); }\r\n\r\n private static _setupRpcRequestContext() {\r\n RpcConfiguration.requestContext.getId = (_request: RpcRequest): string => {\r\n return Guid.createValue();\r\n };\r\n\r\n RpcConfiguration.requestContext.serialize = async (_request: RpcRequest): Promise<SerializedRpcActivity> => { // eslint-disable-line deprecation/deprecation\r\n const id = _request.id;\r\n const serialized: SerializedRpcActivity = { // eslint-disable-line deprecation/deprecation\r\n id,\r\n applicationId: this.applicationId,\r\n applicationVersion: this.applicationVersion,\r\n sessionId: this.sessionId,\r\n authorization: ProcessDetector.isMobileAppFrontend ? \"\" : await this.getAccessToken(),\r\n };\r\n\r\n const csrf = IModelApp.securityOptions.csrfProtection;\r\n if (csrf && csrf.enabled) {\r\n const cookieName = csrf.cookieName || \"XSRF-TOKEN\";\r\n const cookieValue = document.cookie.split(\"; \").find((r) => r.startsWith(`${cookieName}=`));\r\n\r\n if (cookieValue) {\r\n const headerName = csrf.headerName || \"X-XSRF-TOKEN\";\r\n const headerValue = cookieValue.split(\"=\")[1];\r\n serialized.csrfToken = { headerName, headerValue };\r\n }\r\n }\r\n\r\n return serialized;\r\n };\r\n }\r\n\r\n /** Shortcut for creating an HTMLElement with optional parent, className, id, innerHTML, innerText\r\n * @internal\r\n */\r\n public static makeHTMLElement<K extends keyof HTMLElementTagNameMap>(type: K, opt?: {\r\n /** The parent for the new HTMLElement */\r\n parent?: HTMLElement;\r\n /** The className for the new HTMLElement */\r\n className?: string;\r\n /** The Id for the new HTMLElement */\r\n id?: string;\r\n /** innerHTML for the new HTMLElement */\r\n innerHTML?: string;\r\n /** innerText for the new HTMLElement */\r\n innerText?: string;\r\n }) {\r\n const el = document.createElement(type);\r\n if (undefined !== opt) {\r\n if (undefined !== opt.className)\r\n el.className = opt.className;\r\n if (undefined !== opt.id)\r\n el.id = opt.id;\r\n if (undefined !== opt.innerHTML)\r\n el.innerHTML = opt.innerHTML;\r\n if (undefined !== opt.innerText)\r\n el.innerText = opt.innerText;\r\n if (undefined !== opt.parent)\r\n opt.parent.appendChild(el);\r\n }\r\n return el;\r\n }\r\n\r\n /** Make a modal dialog on top of the root of the application. The returned HTMLDivElement will be placed topmost, all other application\r\n * windows will be covered with a semi-transparent background that intercepts all key/mouse/touch events until the modal is dismissed.\r\n * @param options The options that describe how the modal should work.\r\n * @internal\r\n */\r\n public static makeModalDiv(options: ModalOptions): ModalReturn {\r\n const root = options.rootDiv ? options.rootDiv : document.body;\r\n // create the overlay div to \"black out\" the application to indicate everything is inactive until the modal has been dismissed.\r\n const overlay = IModelApp.makeHTMLElement(\"div\", { parent: root, className: \"imodeljs-modal-overlay\" });\r\n overlay.tabIndex = -1; // so we can catch keystroke events\r\n\r\n // function to remove modal dialog\r\n const stop = (ev: Event) => {\r\n root.removeChild(overlay);\r\n ev.stopPropagation();\r\n };\r\n\r\n if (options.autoClose) {\r\n overlay.onclick = overlay.oncontextmenu = stop;\r\n overlay.onkeydown = overlay.onkeyup = (ev: KeyboardEvent) => { // ignore all keystrokes other than enter and escape\r\n switch (ev.key) {\r\n case \"Enter\":\r\n case \"Escape\":\r\n stop(ev);\r\n return;\r\n }\r\n ev.stopPropagation();\r\n };\r\n overlay.focus();\r\n }\r\n\r\n const modal = IModelApp.makeHTMLElement(\"div\", { parent: overlay, className: \"imodeljs-modal\" });\r\n if (undefined !== options.width) {\r\n modal.style.width = `${options.width}px`;\r\n // allow the dialog to be smaller than the width\r\n modal.style.maxWidth = `min(100% - (2 * var(--width-border)), ${options.width}px)`;\r\n }\r\n if (options.closeBox) {\r\n const close = IModelApp.makeHTMLElement(\"p\", { parent: modal, className: \"imodeljs-modal-close\" });\r\n close.innerText = \"\\u00d7\"; // unicode \"times\" symbol\r\n close.onclick = stop;\r\n }\r\n\r\n return { modal, stop };\r\n }\r\n\r\n /** Applications may implement this method to supply a Logo Card.\r\n * @beta\r\n */\r\n public static applicationLogoCard?: () => HTMLTableRowElement;\r\n\r\n /** Make a new Logo Card. Call this method from your implementation of [[IModelApp.applicationLogoCard]]\r\n * @param opts Options for Logo Card\r\n * @beta\r\n */\r\n public static makeLogoCard(\r\n opts: {\r\n /** The heading to be put at the top of this logo card inside an <h2>. May include HTML. */\r\n heading: string | HTMLElement;\r\n /** The URL or HTMLImageElement for the icon on this logo card. */\r\n iconSrc?: string | HTMLImageElement;\r\n /** The width of the icon, if `iconSrc` is a string. Default is 64. */\r\n iconWidth?: number;\r\n /** A *notice* string to be shown on the logo card. May include HTML. */\r\n notice?: string | HTMLElement;\r\n }): HTMLTableRowElement {\r\n const card = IModelApp.makeHTMLElement(\"tr\");\r\n const iconCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-logo\" });\r\n if (undefined !== opts.iconSrc) {\r\n if (typeof opts.iconSrc === \"string\") {\r\n const logo = IModelApp.makeHTMLElement(\"img\");\r\n logo.src = opts.iconSrc;\r\n logo.width = opts.iconWidth ? opts.iconWidth : 64;\r\n opts.iconSrc = logo;\r\n }\r\n iconCell.appendChild(opts.iconSrc);\r\n }\r\n const noticeCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-message\" });\r\n if (undefined !== opts.heading) {\r\n if (typeof opts.heading === \"string\")\r\n IModelApp.makeHTMLElement(\"h2\", { parent: noticeCell, innerHTML: opts.heading, className: \"logo-card-header\" });\r\n else\r\n noticeCell.appendChild(opts.heading);\r\n }\r\n if (undefined !== opts.notice) {\r\n if (typeof opts.notice === \"string\")\r\n IModelApp.makeHTMLElement(\"p\", { parent: noticeCell, innerHTML: opts.notice, className: \"logo-cards\" });\r\n else\r\n noticeCell.appendChild(opts.notice);\r\n }\r\n return card;\r\n }\r\n\r\n /** Make the logo card for the library itself. This card gets placed at the top of the stack.\r\n * @internal\r\n */\r\n public static makeIModelJsLogoCard() {\r\n return this.makeLogoCard({\r\n iconSrc: `${this.publicPath}images/about-imodeljs.svg`,\r\n heading: `<span style=\"font-weight:normal\">${this.localization.getLocalizedString(\"iModelJs:Notices.PoweredBy\")}</span>&nbsp;iTwin.js`,\r\n notice: `${ITWINJS_CORE_VERSION}<br>${COPYRIGHT_NOTICE}`,\r\n });\r\n }\r\n\r\n /** Format the tooltip strings returned by [[IModelConnection.getToolTipMessage]].\r\n * @alpha\r\n */\r\n public static formatElementToolTip(msg: string[]): HTMLElement {\r\n let out = \"\";\r\n msg.forEach((line) => out += `${IModelApp.localization?.getLocalizedKeys(line)}<br>`);\r\n const div = document.createElement(\"div\");\r\n div.innerHTML = out;\r\n return div;\r\n }\r\n\r\n /** Localize an error status\r\n * @param status one of the status values from [BentleyStatus]($core-bentley), [IModelStatus]($core-bentley) or [DbResult]($core-bentley)\r\n * @returns a localized error message\r\n * @beta\r\n */\r\n public static translateStatus(status: number) {\r\n let key: { scope: string, val: string, status?: string };\r\n if (typeof status !== \"number\") {\r\n key = { scope: \"Errors\", val: \"IllegalValue\" };\r\n } else {\r\n key = { scope: \"BentleyStatus\", val: BentleyStatus[status] };\r\n if (!key.val)\r\n key = { scope: \"IModelStatus\", val: IModelStatus[status] };\r\n if (!key.val)\r\n key = { scope: \"DbResult\", val: DbResult[status] };\r\n if (!key.val)\r\n key = { scope: \"Errors\", val: \"Status\", status: status.toString() };\r\n }\r\n\r\n return this.localization.getLocalizedString(`iModelJs:${key.scope}.${key.val}`, key);\r\n }\r\n\r\n /**\r\n * Creates an instance of the ExtensionAdmin\r\n * and registers an event to execute after startup is complete\r\n * @returns an instance of ExtensionAdmin\r\n */\r\n private static _createExtensionAdmin(): ExtensionAdmin {\r\n const extensionAdmin = new ExtensionAdmin();\r\n IModelApp.onAfterStartup.addListener(extensionAdmin.onStartup);\r\n return extensionAdmin;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IModelApp.js","sourceRoot":"","sources":["../../src/IModelApp.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,cAAc;AACd,8DAA8D;AACjD,QAAA,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAiB,CAAC,CAAC,8CAA8C;AACnI,MAAM,gBAAgB,GAAG,6HAA6H,CAAC;AAEvJ,0DAAgD;AAChD,sDAAoJ;AACpJ,oDAE4B;AAC5B,gDAAqD;AACrD,0DAAyD;AACzD,oEAAoG;AACpG,yCAAsC;AACtC,yCAAsC;AACtC,6DAA+C;AAC/C,+EAAiE;AACjE,+DAA4D;AAC5D,uEAAyD;AACzD,qEAAuD;AACvD,iEAA8D;AAC9D,+CAA4C;AAE5C,qEAAkE;AAClE,oEAAsD;AACtD,yDAA2C;AAC3C,+DAA4D;AAC5D,+EAA4E;AAC5E,wDAAqD;AACrD,kDAA+C;AAC/C,6DAA+C;AAC/C,qEAAuD;AACvD,qDAAkD;AAClD,2DAAwE;AACxE,8CAA8G;AAC9G,mEAAqD;AACrD,mEAAqD;AACrD,2DAA6C;AAC7C,iEAAmD;AACnD,+DAAiD;AACjD,uCAA4C;AAC5C,iDAA8C;AAC9C,2DAA6C;AAE7C,+CAA4C;AAC5C,uDAAyC;AAEzC,8DAA8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C,WAAW,CAAC,CAAC,CAAC,AAApD,CAAqD;AAatF,yEAAyE;AAClD,0BAAgB,GAAG,IAAI,sBAAO,EAAc,AAA5B,CAA6B;AAEpE;;GAEG;AACoB,wBAAc,GAAG,IAAI,sBAAO,EAAc,AAA5B,CAA6B;AAIlE,6CAA6C;AACtB,eAAK,GAAG,IAAI,mBAAY,EAAE,AAArB,CAAsB;AA6DlD;;GAEG;AACoB,mBAAS,GAAqB,IAAI,iCAAgB,EAAE,AAA3C,CAA4C;AAE5E,aAAa;AACU,wBAAc,GAAG,EAAI,CAAC,qBAAqB,EAAE,AAA/B,CAAgC;AAErE,gDAAgD;AACjC,wBAAc,GAAG,IAAI,GAAG,EAA8B,AAAxC,CAAyC;AAlH3D,8BAAS","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 IModelApp\r\n */\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-var-requires\r\nexport const ITWINJS_CORE_VERSION = require(\"../../package.json\").version as string; // require resolves from the lib/{cjs,esm} dir\r\nconst COPYRIGHT_NOTICE = 'Copyright © 2017-2023 <a href=\"https://www.bentley.com\" target=\"_blank\" rel=\"noopener noreferrer\">Bentley Systems, Inc.</a>';\r\n\r\nimport { UiAdmin } from \"@itwin/appui-abstract\";\r\nimport { AccessToken, BeDuration, BeEvent, BentleyStatus, DbResult, dispose, Guid, GuidString, Logger, ProcessDetector } from \"@itwin/core-bentley\";\r\nimport {\r\n AuthorizationClient, IModelStatus, Localization, RealityDataAccess, RpcConfiguration, RpcInterfaceDefinition, RpcRequest, SerializedRpcActivity,\r\n} from \"@itwin/core-common\";\r\nimport { ITwinLocalization } from \"@itwin/core-i18n\";\r\nimport { TelemetryManager } from \"@itwin/core-telemetry\";\r\nimport { queryRenderCompatibility, WebGLRenderCompatibilityInfo } from \"@itwin/webgl-compatibility\";\r\nimport { AccuDraw } from \"./AccuDraw\";\r\nimport { AccuSnap } from \"./AccuSnap\";\r\nimport * as auxCoordState from \"./AuxCoordSys\";\r\nimport * as categorySelectorState from \"./CategorySelectorState\";\r\nimport { ExtensionAdmin } from \"./extension/ExtensionAdmin\";\r\nimport * as displayStyleState from \"./DisplayStyleState\";\r\nimport * as drawingViewState from \"./DrawingViewState\";\r\nimport { ElementLocateManager } from \"./ElementLocateManager\";\r\nimport { EntityState } from \"./EntityState\";\r\nimport { FrontendHubAccess } from \"./FrontendHubAccess\";\r\nimport { FrontendLoggerCategory } from \"./FrontendLoggerCategory\";\r\nimport * as modelselector from \"./ModelSelectorState\";\r\nimport * as modelState from \"./ModelState\";\r\nimport { NotificationManager } from \"./NotificationManager\";\r\nimport { QuantityFormatter } from \"./quantity-formatting/QuantityFormatter\";\r\nimport { RenderSystem } from \"./render/RenderSystem\";\r\nimport { System } from \"./render/webgl/System\";\r\nimport * as sheetState from \"./SheetViewState\";\r\nimport * as spatialViewState from \"./SpatialViewState\";\r\nimport { TentativePoint } from \"./TentativePoint\";\r\nimport { RealityDataSourceProviderRegistry } from \"./RealityDataSource\";\r\nimport { MapLayerFormatRegistry, MapLayerOptions, TerrainProviderRegistry, TileAdmin } from \"./tile/internal\";\r\nimport * as accudrawTool from \"./tools/AccuDrawTool\";\r\nimport * as clipViewTool from \"./tools/ClipViewTool\";\r\nimport * as idleTool from \"./tools/IdleTool\";\r\nimport * as measureTool from \"./tools/MeasureTool\";\r\nimport * as selectTool from \"./tools/SelectTool\";\r\nimport { ToolRegistry } from \"./tools/Tool\";\r\nimport { ToolAdmin } from \"./tools/ToolAdmin\";\r\nimport * as viewTool from \"./tools/ViewTool\";\r\nimport { UserPreferencesAccess } from \"./UserPreferences\";\r\nimport { ViewManager } from \"./ViewManager\";\r\nimport * as viewState from \"./ViewState\";\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-var-requires\r\nrequire(\"./IModeljs-css\");\r\n\r\n// cSpell:ignore noopener noreferrer gprid forin nbsp csrf xsrf\r\n\r\n/** Options that can be supplied with [[IModelAppOptions]] to customize frontend security.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FrontendSecurityOptions {\r\n /** Configures protection from Cross Site Request Forgery attacks. */\r\n readonly csrfProtection?: {\r\n /** If enabled, IModelApp will extract the CSRF token for the current session from the document's cookies and send it with each request as a header value. */\r\n readonly enabled: boolean;\r\n /** Defaults to XSRF-TOKEN. */\r\n readonly cookieName?: string;\r\n /** Defaults to X-XSRF-TOKEN. */\r\n readonly headerName?: string;\r\n };\r\n}\r\n\r\n/** Options that can be supplied to [[IModelApp.startup]] to customize frontend behavior.\r\n * @public\r\n */\r\nexport interface IModelAppOptions {\r\n /** If present, supplies the [[FrontendHubAccess]] for this session. */\r\n hubAccess?: FrontendHubAccess;\r\n /** If present, supplies the Id of this application. Applications must set this to the Bentley Global Product Registry Id (GPRID) for usage logging. */\r\n applicationId?: string;\r\n /** If present, supplies the version of this application. Must be set for usage logging. */\r\n applicationVersion?: string;\r\n /** If present, supplies the [[UserPreferencesAccess]] for this session.\r\n * @beta\r\n */\r\n userPreferences?: UserPreferencesAccess;\r\n /** If present, supplies the [[ViewManager]] for this session. */\r\n viewManager?: ViewManager;\r\n /** If present, supplies Map Layer Options for this session such as Azure Access Keys\r\n * @beta\r\n */\r\n mapLayerOptions?: MapLayerOptions;\r\n /** If present, supplies the properties with which to initialize the [[TileAdmin]] for this session. */\r\n tileAdmin?: TileAdmin.Props;\r\n /** If present, supplies the [[NotificationManager]] for this session. */\r\n notifications?: NotificationManager;\r\n /** If present, supplies the [[ToolAdmin]] for this session. */\r\n toolAdmin?: ToolAdmin;\r\n /** If present, supplies the [[AccuDraw]] for this session. */\r\n accuDraw?: AccuDraw;\r\n /** If present, supplies the [[AccuSnap]] for this session. */\r\n accuSnap?: AccuSnap;\r\n /** If present, supplies the [[Localization]] for this session. Defaults to [ITwinLocalization]($i18n). */\r\n localization?: Localization;\r\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\r\n authorizationClient?: AuthorizationClient;\r\n /** If present, supplies security options for the frontend. */\r\n security?: FrontendSecurityOptions;\r\n /** @internal */\r\n sessionId?: GuidString;\r\n /** @internal */\r\n locateManager?: ElementLocateManager;\r\n /** If present, supplies the [[TentativePoint]] for this session. */\r\n tentativePoint?: TentativePoint;\r\n /** @internal */\r\n quantityFormatter?: QuantityFormatter;\r\n /** If present, supplies an implementation of the render system, or options for initializing the default render system. */\r\n renderSys?: RenderSystem | RenderSystem.Options;\r\n /** If present, supplies the [[UiAdmin]] for this session. */\r\n uiAdmin?: UiAdmin;\r\n /** If present, determines whether iModelApp is a NoRenderApp\r\n * @internal\r\n */\r\n noRender?: boolean;\r\n /**\r\n * @deprecated in 3.7. Specify desired RPC interfaces in the platform-specific RPC manager call instead.\r\n * See [[MobileRpcManager.initializeClient]], [[ElectronRpcManager.initializeFrontend]], [[BentleyCloudRpcManager.initializeClient]].\r\n */\r\n rpcInterfaces?: RpcInterfaceDefinition[];\r\n /** @beta */\r\n realityDataAccess?: RealityDataAccess;\r\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\r\n * The path should always end with a trailing `/`.\r\n * @beta\r\n */\r\n publicPath?: string;\r\n}\r\n\r\n/** Options for [[IModelApp.makeModalDiv]]\r\n * @internal\r\n */\r\nexport interface ModalOptions {\r\n /** Width for the Modal dialog box. */\r\n width?: number;\r\n /** The dialog should be dismissed if the user clicks anywhere or hits Enter or Escape on the keyboard. */\r\n autoClose?: boolean;\r\n /** Show an 'x' in the upper right corner to close the dialog */\r\n closeBox?: boolean;\r\n /** The parent for the semi transparent *darkening* div. If not present, use `document.body` */\r\n rootDiv?: HTMLElement;\r\n}\r\n\r\n/** Return type for [[IModelApp.makeModalDiv]]\r\n * @internal\r\n */\r\nexport interface ModalReturn {\r\n /** The modal HTMLDivElement created. */\r\n modal: HTMLDivElement;\r\n /** A function that can be set as an event handler to stop the modal dialog. This can be used if `autoClose` or `closeBox` are not enabled. */\r\n stop: (_ev: Event) => void;\r\n}\r\n\r\n/** We hang the IModelApp object off the global `window` object in IModelApp.startup for debugging purposes.\r\n * It's removed in IModelApp.shutdown.\r\n */\r\ninterface IModelAppForDebugger {\r\n iModelAppForDebugger?: typeof IModelApp;\r\n}\r\n\r\n/**\r\n * Global singleton that connects the user interface with the iTwin.js services. There can be only one IModelApp active in a session. All\r\n * members of IModelApp are static, and it serves as a singleton object for gaining access to session information.\r\n *\r\n * Before any interactive operations may be performed by the `@itwin/core-frontend package`, [[IModelApp.startup]] must be called and awaited.\r\n * Applications may customize the frontend behavior of iTwin.js by supplying options to [[IModelApp.startup]].\r\n *\r\n * @public\r\n */\r\nexport class IModelApp {\r\n private static _initialized = false;\r\n private static _accuDraw: AccuDraw;\r\n private static _accuSnap: AccuSnap;\r\n private static _applicationId: string;\r\n private static _applicationVersion: string;\r\n private static _localization: Localization;\r\n private static _locateManager: ElementLocateManager;\r\n private static _notifications: NotificationManager;\r\n private static _quantityFormatter: QuantityFormatter;\r\n private static _renderSystem?: RenderSystem;\r\n private static _userPreferences?: UserPreferencesAccess;\r\n private static _tentativePoint: TentativePoint;\r\n private static _tileAdmin: TileAdmin;\r\n private static _toolAdmin: ToolAdmin;\r\n private static _viewManager: ViewManager;\r\n private static _uiAdmin: UiAdmin;\r\n private static _noRender: boolean;\r\n private static _wantEventLoop = false;\r\n private static _animationRequested = false;\r\n private static _animationInterval: BeDuration | undefined = BeDuration.fromSeconds(1);\r\n private static _animationIntervalId?: number;\r\n private static _securityOptions: FrontendSecurityOptions;\r\n private static _mapLayerFormatRegistry: MapLayerFormatRegistry;\r\n private static _terrainProviderRegistry: TerrainProviderRegistry;\r\n private static _realityDataSourceProviders: RealityDataSourceProviderRegistry;\r\n private static _hubAccess?: FrontendHubAccess;\r\n private static _realityDataAccess?: RealityDataAccess;\r\n private static _publicPath: string;\r\n\r\n // No instances of IModelApp may be created. All members are static and must be on the singleton object IModelApp.\r\n protected constructor() { }\r\n\r\n /** Event raised just before the frontend IModelApp is to be shut down */\r\n public static readonly onBeforeShutdown = new BeEvent<() => void>();\r\n\r\n /** Event raised after IModelApp is finished starting up.\r\n * @internal\r\n */\r\n public static readonly onAfterStartup = new BeEvent<() => void>();\r\n\r\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\r\n public static authorizationClient?: AuthorizationClient;\r\n /** The [[ToolRegistry]] for this session. */\r\n public static readonly tools = new ToolRegistry();\r\n /** A uniqueId for this session */\r\n public static sessionId: GuidString;\r\n /** The [[MapLayerFormatRegistry]] for this session. */\r\n public static get mapLayerFormatRegistry(): MapLayerFormatRegistry { return this._mapLayerFormatRegistry; }\r\n /** The [[TerrainProviderRegistry]] for this session. */\r\n public static get terrainProviderRegistry(): TerrainProviderRegistry { return this._terrainProviderRegistry; }\r\n /** The [[RealityDataSourceProviderRegistry]] for this session.\r\n * @alpha\r\n */\r\n public static get realityDataSourceProviders(): RealityDataSourceProviderRegistry { return this._realityDataSourceProviders; }\r\n /** The [[RenderSystem]] for this session. */\r\n public static get renderSystem(): RenderSystem { return this._renderSystem!; }\r\n /** The [[ViewManager]] for this session. */\r\n public static get viewManager(): ViewManager { return this._viewManager; }\r\n /** The [[NotificationManager]] for this session. */\r\n public static get notifications(): NotificationManager { return this._notifications; }\r\n /** The [[TileAdmin]] for this session. */\r\n public static get tileAdmin(): TileAdmin { return this._tileAdmin; }\r\n /** The [[QuantityFormatter]] for this session. */\r\n public static get quantityFormatter(): QuantityFormatter { return this._quantityFormatter; }\r\n /** The [[ToolAdmin]] for this session. */\r\n public static get toolAdmin(): ToolAdmin { return this._toolAdmin; }\r\n /** The [[AccuDraw]] for this session. */\r\n public static get accuDraw(): AccuDraw { return this._accuDraw; }\r\n /** The [[AccuSnap]] for this session. */\r\n public static get accuSnap(): AccuSnap { return this._accuSnap; }\r\n public static get locateManager(): ElementLocateManager { return this._locateManager; }\r\n /** The [[TentativePoint]] for this session]]. */\r\n public static get tentativePoint(): TentativePoint { return this._tentativePoint; }\r\n /** The [[Localization]] for this session. */\r\n public static get localization(): Localization { return this._localization; }\r\n /** The [[UserPreferencesAccess]] for this session.\r\n * @beta\r\n */\r\n public static get userPreferences(): UserPreferencesAccess | undefined { return this._userPreferences; }\r\n /** The Id of this application. Applications must set this to the Global Product Registry ID (GPRID) for usage logging. */\r\n public static get applicationId(): string { return this._applicationId; }\r\n /** The version of this application. Must be set for usage logging. */\r\n public static get applicationVersion(): string { return this._applicationVersion; }\r\n /** True after [[startup]] has been called, until [[shutdown]] is called. */\r\n public static get initialized() { return this._initialized; }\r\n\r\n /** Provides access to IModelHub services. */\r\n public static get hubAccess(): FrontendHubAccess | undefined { return this._hubAccess; }\r\n\r\n /** Provides access to the RealityData service implementation for this IModelApp\r\n * @beta\r\n */\r\n public static get realityDataAccess(): RealityDataAccess | undefined { return this._realityDataAccess; }\r\n\r\n /** @internal */\r\n public static get hasRenderSystem() { return this._renderSystem !== undefined && this._renderSystem.isValid; }\r\n /** The [[UiAdmin]] for this session. */\r\n public static get uiAdmin() { return this._uiAdmin; }\r\n /** The requested security options for the frontend. */\r\n public static get securityOptions() { return this._securityOptions; }\r\n /** The root URL for the assets 'public' folder.\r\n * @beta\r\n */\r\n public static get publicPath() { return this._publicPath; }\r\n /** The [[TelemetryManager]] for this session\r\n * @internal\r\n */\r\n public static readonly telemetry: TelemetryManager = new TelemetryManager();\r\n\r\n /** @alpha */\r\n public static readonly extensionAdmin = this._createExtensionAdmin();\r\n\r\n /** Map of classFullName to EntityState class */\r\n private static _entityClasses = new Map<string, typeof EntityState>();\r\n\r\n /** Register all of the subclasses of EntityState from a module.\r\n * @internal\r\n */\r\n public static registerModuleEntities(moduleObj: any) {\r\n for (const thisMember in moduleObj) { // eslint-disable-line guard-for-in\r\n const thisEntityState = moduleObj[thisMember];\r\n if (thisEntityState.prototype instanceof EntityState) {\r\n this.registerEntityState(thisEntityState.classFullName, thisEntityState);\r\n }\r\n }\r\n }\r\n\r\n /** Register an EntityState class by its classFullName\r\n * @internal\r\n */\r\n public static registerEntityState(classFullName: string, classType: typeof EntityState) {\r\n const lowerName = classFullName.toLowerCase();\r\n if (this._entityClasses.has(lowerName)) {\r\n const errMsg = `Class ${classFullName} is already registered. Make sure static schemaName and className members are correct on class ${classType.name}`;\r\n Logger.logError(FrontendLoggerCategory.IModelConnection, errMsg);\r\n throw new Error(errMsg);\r\n }\r\n\r\n this._entityClasses.set(lowerName, classType);\r\n }\r\n\r\n /** @internal */\r\n public static lookupEntityClass(classFullName: string) { return this._entityClasses.get(classFullName.toLowerCase()); }\r\n\r\n /**\r\n * Obtain WebGL rendering compatibility information for the client system. This information describes whether the client meets the\r\n * minimum rendering capabilities. It also describes whether the system lacks any optional capabilities that could improve quality\r\n * and/or performance.\r\n * @note As of 4.x, iTwin.js requires WebGL 2. If the client does not support WebGL 2, the `status` field of the returned compatibility info will be [WebGLRenderCompatibilityStatus.CannotCreateContext]($webgl-compatibility).\r\n */\r\n public static queryRenderCompatibility(): WebGLRenderCompatibilityInfo {\r\n return queryRenderCompatibility(true, System.createContext);\r\n }\r\n\r\n /**\r\n * This method must be called before any other `@itwin/core-frontend` methods are used.\r\n * Somewhere in your startup code, call [[IModelApp.startup]]. E.g.:\r\n * ``` ts\r\n * await IModelApp.startup( {applicationId: myAppId} );\r\n * ```\r\n * @param opts The options for configuring IModelApp\r\n */\r\n public static async startup(opts?: IModelAppOptions): Promise<void> {\r\n if (this._initialized)\r\n return; // we're already initialized, do nothing.\r\n this._initialized = true;\r\n\r\n opts = opts ?? {};\r\n this._securityOptions = opts.security ?? {};\r\n\r\n if (process.env.NODE_ENV === \"development\") {\r\n // Make IModelApp globally accessible for debugging purposes. We'll remove it on shutdown.\r\n (window as IModelAppForDebugger).iModelAppForDebugger = this;\r\n }\r\n\r\n this.sessionId = opts.sessionId ?? Guid.createValue();\r\n this._applicationId = opts.applicationId ?? \"2686\"; // Default to product id of iTwin.js\r\n this._applicationVersion = opts.applicationVersion ?? \"1.0.0\";\r\n this.authorizationClient = opts.authorizationClient;\r\n this._hubAccess = opts.hubAccess;\r\n this._noRender = opts.noRender ?? false;\r\n\r\n this._setupRpcRequestContext();\r\n\r\n this._localization = opts.localization ?? new ITwinLocalization();\r\n const toolsNs = \"CoreTools\";\r\n await this.localization.initialize([\"iModelJs\", toolsNs]);\r\n [\r\n selectTool,\r\n idleTool,\r\n viewTool,\r\n clipViewTool,\r\n measureTool,\r\n accudrawTool,\r\n ].forEach((tool) => this.tools.registerModule(tool, toolsNs));\r\n\r\n this.registerEntityState(EntityState.classFullName, EntityState);\r\n [\r\n modelState,\r\n sheetState,\r\n viewState,\r\n drawingViewState,\r\n spatialViewState,\r\n displayStyleState,\r\n modelselector,\r\n categorySelectorState,\r\n auxCoordState,\r\n ].forEach((module) => this.registerModuleEntities(module));\r\n\r\n this._renderSystem = (opts.renderSys instanceof RenderSystem) ? opts.renderSys : this.createRenderSys(opts.renderSys);\r\n if (opts.userPreferences)\r\n this._userPreferences = opts.userPreferences;\r\n this._viewManager = opts.viewManager ?? new ViewManager();\r\n this._tileAdmin = await TileAdmin.create(opts.tileAdmin);\r\n this._notifications = opts.notifications ?? new NotificationManager();\r\n this._toolAdmin = opts.toolAdmin ?? new ToolAdmin();\r\n this._accuDraw = opts.accuDraw ?? new AccuDraw();\r\n this._accuSnap = opts.accuSnap ?? new AccuSnap();\r\n this._locateManager = opts.locateManager ?? new ElementLocateManager();\r\n this._tentativePoint = opts.tentativePoint ?? new TentativePoint();\r\n this._quantityFormatter = opts.quantityFormatter ?? new QuantityFormatter();\r\n this._uiAdmin = opts.uiAdmin ?? new UiAdmin();\r\n this._mapLayerFormatRegistry = new MapLayerFormatRegistry(opts.mapLayerOptions);\r\n this._terrainProviderRegistry = new TerrainProviderRegistry();\r\n this._realityDataSourceProviders = new RealityDataSourceProviderRegistry();\r\n this._realityDataAccess = opts.realityDataAccess;\r\n this._publicPath = opts.publicPath ?? \"\";\r\n\r\n [\r\n this.renderSystem,\r\n this.viewManager,\r\n this.toolAdmin,\r\n this.accuDraw,\r\n this.accuSnap,\r\n this.locateManager,\r\n this.tentativePoint,\r\n this.uiAdmin,\r\n ].forEach((sys) => sys.onInitialized());\r\n\r\n await this.quantityFormatter.onInitialized();\r\n this.onAfterStartup.raiseEvent();\r\n }\r\n\r\n /** Must be called before the application exits to release any held resources. */\r\n public static async shutdown() {\r\n if (!this._initialized)\r\n return;\r\n\r\n // notify listeners that this IModelApp is about to be shut down.\r\n this.onBeforeShutdown.raiseEvent();\r\n this.onBeforeShutdown.clear();\r\n\r\n if (process.env.NODE_ENV === \"development\") {\r\n (window as IModelAppForDebugger).iModelAppForDebugger = undefined;\r\n }\r\n\r\n this._wantEventLoop = false;\r\n window.removeEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n this.clearIntervalAnimation();\r\n [this.toolAdmin, this.viewManager, this.tileAdmin].forEach((sys) => sys.onShutDown());\r\n this.tools.shutdown();\r\n this._renderSystem = dispose(this._renderSystem);\r\n this._entityClasses.clear();\r\n this.authorizationClient = undefined;\r\n this._initialized = false;\r\n this.onAfterStartup.clear();\r\n }\r\n\r\n /** Controls how frequently the application polls for changes that may require a new animation frame to be requested.\r\n * Such changes include resizing a Viewport or changing the device pixel ratio by zooming in or out in the browser.\r\n * The default interval is 1 second. It may be desirable to override the default for specific apps and/or devices.\r\n * - Increasing the interval can conserve battery life on battery-powered devices at the expense of slower response to resize events.\r\n * - An application that only displays a single Viewport whose dimensions only change when the dimensions of the application window change, and which does not support changing application zoom level, could disable the interval altogether.\r\n * @param interval The interval at which to poll for changes. If undefined (or negative), the application will never poll. If zero, the application will poll as frequently as possible.\r\n * @beta\r\n */\r\n public static get animationInterval(): BeDuration | undefined { return IModelApp._animationInterval; }\r\n public static set animationInterval(interval: BeDuration | undefined) {\r\n if (undefined !== interval && interval.isTowardsPast)\r\n interval = undefined;\r\n\r\n if (interval !== IModelApp._animationInterval) {\r\n IModelApp._animationInterval = interval;\r\n if (IModelApp._wantEventLoop)\r\n IModelApp.requestIntervalAnimation();\r\n }\r\n }\r\n\r\n /** @internal */\r\n public static requestNextAnimation() {\r\n // Only want to call requestAnimationFrame if it is defined. Need to check whether current iModelApp is a NoRenderApp.\r\n if (IModelApp._noRender)\r\n return;\r\n\r\n if (!IModelApp._animationRequested) {\r\n IModelApp._animationRequested = true;\r\n requestAnimationFrame(IModelApp.eventLoop);\r\n }\r\n }\r\n\r\n /** @internal */\r\n private static clearIntervalAnimation(): void {\r\n if (undefined !== IModelApp._animationIntervalId) {\r\n window.clearInterval(IModelApp._animationIntervalId);\r\n IModelApp._animationIntervalId = undefined;\r\n }\r\n }\r\n\r\n /** @internal */\r\n private static requestIntervalAnimation(): void {\r\n IModelApp.clearIntervalAnimation();\r\n\r\n if (undefined !== IModelApp.animationInterval)\r\n IModelApp._animationIntervalId = window.setInterval(() => {\r\n IModelApp.requestNextAnimation();\r\n }, IModelApp.animationInterval.milliseconds);\r\n }\r\n\r\n /** @internal */\r\n public static startEventLoop() {\r\n if (!IModelApp._wantEventLoop) {\r\n IModelApp._wantEventLoop = true;\r\n window.addEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n IModelApp.requestIntervalAnimation();\r\n IModelApp.requestNextAnimation();\r\n }\r\n }\r\n\r\n /** Strictly for tests. @internal */\r\n public static stopEventLoop() {\r\n this._wantEventLoop = false;\r\n }\r\n\r\n /** The main event processing loop for Tools and rendering. */\r\n private static eventLoop() {\r\n IModelApp._animationRequested = false;\r\n if (!IModelApp._wantEventLoop) // flag turned on at startup\r\n return;\r\n\r\n try {\r\n IModelApp.toolAdmin.processEvent(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n IModelApp.viewManager.renderLoop();\r\n IModelApp.tileAdmin.process();\r\n } catch (exception) {\r\n ToolAdmin.exceptionHandler(exception); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n IModelApp._wantEventLoop = false;\r\n IModelApp._animationRequested = true; // unrecoverable after exception, don't request any further frames.\r\n window.removeEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n }\r\n }\r\n\r\n /** Get the user's access token for this IModelApp, or a blank string if none is available.\r\n * @note Access tokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value\r\n * returned by this method may change over time throughout the course of a session.\r\n */\r\n public static async getAccessToken(): Promise<AccessToken> {\r\n try {\r\n return (await this.authorizationClient?.getAccessToken()) ?? \"\";\r\n } catch (e) {\r\n return \"\";\r\n }\r\n }\r\n\r\n /** @internal */\r\n public static createRenderSys(opts?: RenderSystem.Options): RenderSystem { return System.create(opts); }\r\n\r\n private static _setupRpcRequestContext() {\r\n RpcConfiguration.requestContext.getId = (_request: RpcRequest): string => {\r\n return Guid.createValue();\r\n };\r\n\r\n RpcConfiguration.requestContext.serialize = async (_request: RpcRequest): Promise<SerializedRpcActivity> => { // eslint-disable-line deprecation/deprecation\r\n const id = _request.id;\r\n const serialized: SerializedRpcActivity = { // eslint-disable-line deprecation/deprecation\r\n id,\r\n applicationId: this.applicationId,\r\n applicationVersion: this.applicationVersion,\r\n sessionId: this.sessionId,\r\n authorization: ProcessDetector.isMobileAppFrontend ? \"\" : await this.getAccessToken(),\r\n };\r\n\r\n const csrf = IModelApp.securityOptions.csrfProtection;\r\n if (csrf && csrf.enabled) {\r\n const cookieName = csrf.cookieName || \"XSRF-TOKEN\";\r\n const cookieValue = document.cookie.split(\"; \").find((r) => r.startsWith(`${cookieName}=`));\r\n\r\n if (cookieValue) {\r\n const headerName = csrf.headerName || \"X-XSRF-TOKEN\";\r\n const headerValue = cookieValue.split(\"=\")[1];\r\n serialized.csrfToken = { headerName, headerValue };\r\n }\r\n }\r\n\r\n return serialized;\r\n };\r\n }\r\n\r\n /** Shortcut for creating an HTMLElement with optional parent, className, id, innerHTML, innerText\r\n * @internal\r\n */\r\n public static makeHTMLElement<K extends keyof HTMLElementTagNameMap>(type: K, opt?: {\r\n /** The parent for the new HTMLElement */\r\n parent?: HTMLElement;\r\n /** The className for the new HTMLElement */\r\n className?: string;\r\n /** The Id for the new HTMLElement */\r\n id?: string;\r\n /** innerHTML for the new HTMLElement */\r\n innerHTML?: string;\r\n /** innerText for the new HTMLElement */\r\n innerText?: string;\r\n }) {\r\n const el = document.createElement(type);\r\n if (undefined !== opt) {\r\n if (undefined !== opt.className)\r\n el.className = opt.className;\r\n if (undefined !== opt.id)\r\n el.id = opt.id;\r\n if (undefined !== opt.innerHTML)\r\n el.innerHTML = opt.innerHTML;\r\n if (undefined !== opt.innerText)\r\n el.innerText = opt.innerText;\r\n if (undefined !== opt.parent)\r\n opt.parent.appendChild(el);\r\n }\r\n return el;\r\n }\r\n\r\n /** Make a modal dialog on top of the root of the application. The returned HTMLDivElement will be placed topmost, all other application\r\n * windows will be covered with a semi-transparent background that intercepts all key/mouse/touch events until the modal is dismissed.\r\n * @param options The options that describe how the modal should work.\r\n * @internal\r\n */\r\n public static makeModalDiv(options: ModalOptions): ModalReturn {\r\n const root = options.rootDiv ? options.rootDiv : document.body;\r\n // create the overlay div to \"black out\" the application to indicate everything is inactive until the modal has been dismissed.\r\n const overlay = IModelApp.makeHTMLElement(\"div\", { parent: root, className: \"imodeljs-modal-overlay\" });\r\n overlay.tabIndex = -1; // so we can catch keystroke events\r\n\r\n // function to remove modal dialog\r\n const stop = (ev: Event) => {\r\n root.removeChild(overlay);\r\n ev.stopPropagation();\r\n };\r\n\r\n if (options.autoClose) {\r\n overlay.onclick = overlay.oncontextmenu = stop;\r\n overlay.onkeydown = overlay.onkeyup = (ev: KeyboardEvent) => { // ignore all keystrokes other than enter and escape\r\n switch (ev.key) {\r\n case \"Enter\":\r\n case \"Escape\":\r\n stop(ev);\r\n return;\r\n }\r\n ev.stopPropagation();\r\n };\r\n overlay.focus();\r\n }\r\n\r\n const modal = IModelApp.makeHTMLElement(\"div\", { parent: overlay, className: \"imodeljs-modal\" });\r\n if (undefined !== options.width) {\r\n modal.style.width = `${options.width}px`;\r\n // allow the dialog to be smaller than the width\r\n modal.style.maxWidth = `min(100% - (2 * var(--width-border)), ${options.width}px)`;\r\n }\r\n if (options.closeBox) {\r\n const close = IModelApp.makeHTMLElement(\"p\", { parent: modal, className: \"imodeljs-modal-close\" });\r\n close.innerText = \"\\u00d7\"; // unicode \"times\" symbol\r\n close.onclick = stop;\r\n }\r\n\r\n return { modal, stop };\r\n }\r\n\r\n /** Applications may implement this method to supply a Logo Card.\r\n * @beta\r\n */\r\n public static applicationLogoCard?: () => HTMLTableRowElement;\r\n\r\n /** Make a new Logo Card. Call this method from your implementation of [[IModelApp.applicationLogoCard]]\r\n * @param opts Options for Logo Card\r\n * @beta\r\n */\r\n public static makeLogoCard(\r\n opts: {\r\n /** The heading to be put at the top of this logo card inside an <h2>. May include HTML. */\r\n heading: string | HTMLElement;\r\n /** The URL or HTMLImageElement for the icon on this logo card. */\r\n iconSrc?: string | HTMLImageElement;\r\n /** The width of the icon, if `iconSrc` is a string. Default is 64. */\r\n iconWidth?: number;\r\n /** A *notice* string to be shown on the logo card. May include HTML. */\r\n notice?: string | HTMLElement;\r\n }): HTMLTableRowElement {\r\n const card = IModelApp.makeHTMLElement(\"tr\");\r\n const iconCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-logo\" });\r\n if (undefined !== opts.iconSrc) {\r\n if (typeof opts.iconSrc === \"string\") {\r\n const logo = IModelApp.makeHTMLElement(\"img\");\r\n logo.src = opts.iconSrc;\r\n logo.width = opts.iconWidth ? opts.iconWidth : 64;\r\n opts.iconSrc = logo;\r\n }\r\n iconCell.appendChild(opts.iconSrc);\r\n }\r\n const noticeCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-message\" });\r\n if (undefined !== opts.heading) {\r\n if (typeof opts.heading === \"string\")\r\n IModelApp.makeHTMLElement(\"h2\", { parent: noticeCell, innerHTML: opts.heading, className: \"logo-card-header\" });\r\n else\r\n noticeCell.appendChild(opts.heading);\r\n }\r\n if (undefined !== opts.notice) {\r\n if (typeof opts.notice === \"string\")\r\n IModelApp.makeHTMLElement(\"p\", { parent: noticeCell, innerHTML: opts.notice, className: \"logo-cards\" });\r\n else\r\n noticeCell.appendChild(opts.notice);\r\n }\r\n return card;\r\n }\r\n\r\n /** Make the logo card for the library itself. This card gets placed at the top of the stack.\r\n * @internal\r\n */\r\n public static makeIModelJsLogoCard() {\r\n return this.makeLogoCard({\r\n iconSrc: `${this.publicPath}images/about-imodeljs.svg`,\r\n heading: `<span style=\"font-weight:normal\">${this.localization.getLocalizedString(\"iModelJs:Notices.PoweredBy\")}</span>&nbsp;iTwin.js`,\r\n notice: `${ITWINJS_CORE_VERSION}<br>${COPYRIGHT_NOTICE}`,\r\n });\r\n }\r\n\r\n /** Format the tooltip strings returned by [[IModelConnection.getToolTipMessage]].\r\n * @alpha\r\n */\r\n public static formatElementToolTip(msg: string[]): HTMLElement {\r\n let out = \"\";\r\n msg.forEach((line) => out += `${IModelApp.localization?.getLocalizedKeys(line)}<br>`);\r\n const div = document.createElement(\"div\");\r\n div.innerHTML = out;\r\n return div;\r\n }\r\n\r\n /** Localize an error status\r\n * @param status one of the status values from [BentleyStatus]($core-bentley), [IModelStatus]($core-bentley) or [DbResult]($core-bentley)\r\n * @returns a localized error message\r\n * @beta\r\n */\r\n public static translateStatus(status: number) {\r\n let key: { scope: string, val: string, status?: string };\r\n if (typeof status !== \"number\") {\r\n key = { scope: \"Errors\", val: \"IllegalValue\" };\r\n } else {\r\n key = { scope: \"BentleyStatus\", val: BentleyStatus[status] };\r\n if (!key.val)\r\n key = { scope: \"IModelStatus\", val: IModelStatus[status] };\r\n if (!key.val)\r\n key = { scope: \"DbResult\", val: DbResult[status] };\r\n if (!key.val)\r\n key = { scope: \"Errors\", val: \"Status\", status: status.toString() };\r\n }\r\n\r\n return this.localization.getLocalizedString(`iModelJs:${key.scope}.${key.val}`, key);\r\n }\r\n\r\n /**\r\n * Creates an instance of the ExtensionAdmin\r\n * and registers an event to execute after startup is complete\r\n * @returns an instance of ExtensionAdmin\r\n */\r\n private static _createExtensionAdmin(): ExtensionAdmin {\r\n const extensionAdmin = new ExtensionAdmin();\r\n IModelApp.onAfterStartup.addListener(extensionAdmin.onStartup);\r\n return extensionAdmin;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IpcApp.d.ts","sourceRoot":"","sources":["../../src/IpcApp.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,EACmD,eAAe,EAAwC,WAAW,EAAE,iBAAiB,EAC/H,cAAc,EAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAa,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;AAED;;;GAGG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAgC;IACnD,qEAAqE;IAErE,OAAO,CAAC,MAAM,KAAK,GAAG,GAA4C;IAElE,iIAAiI;IACjI,WAAkB,OAAO,IAAI,OAAO,CAAoC;IAExE;;;;;;;OAOG;WACW,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,cAAc;IAIhF;;;;OAIG;WACW,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW;IAInE;;;;;;;;;OASG;WACiB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IAIzE;;;;;;OAMG;WACW,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAIlD;;;;;;;;;;OAUG;WACiB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,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CAAC;IAEnC,YAAY,IAAI,cAAc;IAUrC;;;;;OAKG;WACW,QAAQ,IAAI,cAAc;CAGzC"}
package/lib/cjs/IpcApp.js CHANGED
@@ -105,7 +105,7 @@ class IpcApp {
105
105
  }
106
106
  /** @deprecated in 3.x. use [[appFunctionIpc]] */
107
107
  static async callIpcHost(methodName, ...args) {
108
- return this.callIpcChannel(core_common_1.IpcAppChannel.Functions, methodName, ...args);
108
+ return this.callIpcChannel(core_common_1.ipcAppChannels.functions, methodName, ...args);
109
109
  }
110
110
  /** start an IpcApp.
111
111
  * @note this should not be called directly. It is called by NativeApp.startup */
@@ -121,7 +121,7 @@ class IpcApp {
121
121
  }
122
122
  }
123
123
  /** A Proxy to call one of the [IpcAppFunctions]($common) functions via IPC. */
124
- IpcApp.appFunctionIpc = IpcApp.makeIpcProxy(core_common_1.IpcAppChannel.Functions);
124
+ IpcApp.appFunctionIpc = IpcApp.makeIpcProxy(core_common_1.ipcAppChannels.functions);
125
125
  exports.IpcApp = IpcApp;
126
126
  /**
127
127
  * Base class for all implementations of an Ipc notification response interface. This class is implemented on your frontend to supply
@@ -159,7 +159,7 @@ class NotificationHandler {
159
159
  exports.NotificationHandler = NotificationHandler;
160
160
  /** IpcApp notifications from backend */
161
161
  class IpcAppNotifyHandler extends NotificationHandler {
162
- get channelName() { return core_common_1.IpcAppChannel.AppNotify; }
162
+ get channelName() { return core_common_1.ipcAppChannels.appNotify; }
163
163
  notifyApp() { }
164
164
  }
165
165
  //# sourceMappingURL=IpcApp.js.map