@itwin/core-frontend 5.9.0-dev.8 → 5.10.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/lib/cjs/BriefcaseTxns.d.ts +58 -1
  3. package/lib/cjs/BriefcaseTxns.d.ts.map +1 -1
  4. package/lib/cjs/BriefcaseTxns.js +65 -0
  5. package/lib/cjs/BriefcaseTxns.js.map +1 -1
  6. package/lib/cjs/PerModelCategoryVisibility.d.ts.map +1 -1
  7. package/lib/cjs/PerModelCategoryVisibility.js +83 -81
  8. package/lib/cjs/PerModelCategoryVisibility.js.map +1 -1
  9. package/lib/cjs/SpatialViewState.d.ts.map +1 -1
  10. package/lib/cjs/SpatialViewState.js +3 -1
  11. package/lib/cjs/SpatialViewState.js.map +1 -1
  12. package/lib/cjs/ViewState.d.ts +32 -0
  13. package/lib/cjs/ViewState.d.ts.map +1 -1
  14. package/lib/cjs/ViewState.js +41 -4
  15. package/lib/cjs/ViewState.js.map +1 -1
  16. package/lib/cjs/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
  17. package/lib/cjs/internal/render/webgl/FrustumUniforms.js.map +1 -1
  18. package/lib/cjs/internal/render/webgl/RenderCommands.js.map +1 -1
  19. package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts +119 -22
  20. package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
  21. package/lib/cjs/quantity-formatting/QuantityFormatter.js +261 -59
  22. package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
  23. package/lib/cjs/tile/GltfReader.js.map +1 -1
  24. package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
  25. package/lib/cjs/tools/ToolAdmin.d.ts +20 -1
  26. package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
  27. package/lib/cjs/tools/ToolAdmin.js +75 -7
  28. package/lib/cjs/tools/ToolAdmin.js.map +1 -1
  29. package/lib/cjs/tools/ToolSettings.d.ts +4 -0
  30. package/lib/cjs/tools/ToolSettings.d.ts.map +1 -1
  31. package/lib/cjs/tools/ToolSettings.js +4 -0
  32. package/lib/cjs/tools/ToolSettings.js.map +1 -1
  33. package/lib/esm/BriefcaseTxns.d.ts +58 -1
  34. package/lib/esm/BriefcaseTxns.d.ts.map +1 -1
  35. package/lib/esm/BriefcaseTxns.js +65 -0
  36. package/lib/esm/BriefcaseTxns.js.map +1 -1
  37. package/lib/esm/PerModelCategoryVisibility.d.ts.map +1 -1
  38. package/lib/esm/PerModelCategoryVisibility.js +84 -82
  39. package/lib/esm/PerModelCategoryVisibility.js.map +1 -1
  40. package/lib/esm/SpatialViewState.d.ts.map +1 -1
  41. package/lib/esm/SpatialViewState.js +3 -1
  42. package/lib/esm/SpatialViewState.js.map +1 -1
  43. package/lib/esm/ViewState.d.ts +32 -0
  44. package/lib/esm/ViewState.d.ts.map +1 -1
  45. package/lib/esm/ViewState.js +42 -5
  46. package/lib/esm/ViewState.js.map +1 -1
  47. package/lib/esm/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
  48. package/lib/esm/internal/render/webgl/FrustumUniforms.js.map +1 -1
  49. package/lib/esm/internal/render/webgl/RenderCommands.js.map +1 -1
  50. package/lib/esm/quantity-formatting/QuantityFormatter.d.ts +119 -22
  51. package/lib/esm/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
  52. package/lib/esm/quantity-formatting/QuantityFormatter.js +263 -61
  53. package/lib/esm/quantity-formatting/QuantityFormatter.js.map +1 -1
  54. package/lib/esm/tile/GltfReader.js.map +1 -1
  55. package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
  56. package/lib/esm/tools/ToolAdmin.d.ts +20 -1
  57. package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
  58. package/lib/esm/tools/ToolAdmin.js +77 -9
  59. package/lib/esm/tools/ToolAdmin.js.map +1 -1
  60. package/lib/esm/tools/ToolSettings.d.ts +4 -0
  61. package/lib/esm/tools/ToolSettings.d.ts.map +1 -1
  62. package/lib/esm/tools/ToolSettings.js +4 -0
  63. package/lib/esm/tools/ToolSettings.js.map +1 -1
  64. package/lib/public/locales/en/iModelJs.json +1 -0
  65. package/lib/public/scripts/parse-imdl-worker.js +1 -1
  66. package/lib/workers/webpack/parse-imdl-worker.js +1 -1
  67. package/package.json +20 -20
@@ -76,5 +76,9 @@ export declare class ToolSettings {
76
76
  * @beta
77
77
  */
78
78
  static enableVolumeSelection: boolean;
79
+ /** If true, pressing Escape key sets focus to Home to allow shortcuts to be used.
80
+ * @beta
81
+ */
82
+ static escapeMovesFocusToHome: boolean;
79
83
  }
80
84
  //# sourceMappingURL=ToolSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToolSettings.d.ts","sourceRoot":"","sources":["../../../src/tools/ToolSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAY,MAAM,sBAAsB,CAAC;AAEvD;;;GAGG;AACH,qBAAa,YAAY;IACvB,6DAA6D;IAC7D,OAAc,gBAAgB,aAAoC;IAClE,kEAAkE;IAClE,OAAc,kBAAkB,aAAoC;IACpE,sGAAsG;IACtG,OAAc,0BAA0B,SAAQ;IAChD,4HAA4H;IAC5H,OAAc,4BAA4B,UAAS;IACnD,qFAAqF;IACrF,OAAc,eAAe,UAAQ;IACrC,wEAAwE;IACxE,OAAc,cAAc,aAAmC;IAC/D,gEAAgE;IAChE,OAAc,cAAc,aAAoC;IAChE,wFAAwF;IACxF,OAAc,uBAAuB,SAAO;IAC5C,qFAAqF;IACrF,OAAc,uBAAuB,SAAQ;IAC7C,sGAAsG;IACtG,OAAc,8BAA8B,SAAQ;IACpD,qFAAqF;IACrF,OAAc,wBAAwB,SAAQ;IAC9C,2CAA2C;IAC3C,OAAc,eAAe,QAA6B;IAC1D,oEAAoE;IACpE,OAAc,cAA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FAAwF;IACxF,OAAc,uBAAuB,SAAO;IAC5C,qFAAqF;IACrF,OAAc,uBAAuB,SAAQ;IAC7C,sGAAsG;IACtG,OAAc,8BAA8B,SAAQ;IACpD,qFAAqF;IACrF,OAAc,wBAAwB,SAAQ;IAC9C,2CAA2C;IAC3C,OAAc,eAAe,QAA6B;IAC1D,oEAAoE;IACpE,OAAc,cAAc,UAAS;IACrC,sDAAsD;IACtD,OAAc,YAAY,SAAO;IACjC,kHAAkH;IAClH,OAAc,kBAAkB,SAAK;IACrC,oFAAoF;IACpF,OAAc,sBAAsB,UAAQ;IAC5C,mFAAmF;IACnF,OAAc,cAAc,UAAS;IACrC,kHAAkH;IAClH,OAAc,eAAe,UAAS;IACtC,oGAAoG;IACpG,OAAc,cAAc,SAAO;IACnC,mFAAmF;IACnF,OAAc,aAAa,SAAO;IAClC,sEAAsE;IACtE,OAAc,eAAe,SAAM;IACnC,sEAAsE;IACtE,OAAc,eAAe,SAAO;IACpC,6HAA6H;IAC7H,OAAc,qBAAqB,SAA0B;IAC7D,4EAA4E;IAC5E,OAAc,WAAW,SAAO;IAChC,kDAAkD;IAClD,OAAc,SAAS,SAAM;IAC7B,iDAAiD;IACjD,OAAc,cAAc,SAAO;IACnC,mHAAmH;IACnH,OAAc,cAAc;QAC1B,8BAA8B;;QAE9B,yHAAyH;;QAEzH,qFAAqF;;MAErF;IACF,2FAA2F;IAC3F,OAAc,4BAA4B,SAAM;IAChD;;;OAGG;IACH,OAAc,qBAAqB,UAAS;IAC5C;;MAEE;IACF,OAAc,sBAAsB,UAAQ;CAC7C"}
@@ -83,6 +83,10 @@ class ToolSettings {
83
83
  * @beta
84
84
  */
85
85
  static enableVolumeSelection = false;
86
+ /** If true, pressing Escape key sets focus to Home to allow shortcuts to be used.
87
+ * @beta
88
+ */
89
+ static escapeMovesFocusToHome = true;
86
90
  }
87
91
  exports.ToolSettings = ToolSettings;
88
92
  //# sourceMappingURL=ToolSettings.js.map
@@ -1 +1 @@
1
- {"version":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IAC7E,MAAM,CAAC,sBAAsB,GAAG,IAAI,CAAC;IAC5C,mFAAmF;IAC5E,MAAM,CAAC,cAAc,GAAG,KAAK,CAAC;IACrC,kHAAkH;IAC3G,MAAM,CAAC,eAAe,GAAG,KAAK,CAAC;IACtC,oGAAoG;IAC7F,MAAM,CAAC,cAAc,GAAG,GAAG,CAAC;IACnC,mFAAmF;IAC5E,MAAM,CAAC,aAAa,GAAG,GAAG,CAAC;IAClC,sEAAsE;IAC/D,MAAM,CAAC,eAAe,GAAG,EAAE,CAAC;IACnC,sEAAsE;IAC/D,MAAM,CAAC,eAAe,GAAG,GAAG,CAAC;IACpC,6HAA6H;IACtH,MAAM,CAAC,qBAAqB,GAAG,wBAAQ,CAAC,aAAa,CAAC;IAC7D,4EAA4E;IACrE,MAAM,CAAC,WAAW,GAAG,GAAG,CAAC;IAChC,kDAAkD;IAC3C,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;IAC7B,iDAAiD;IAC1C,MAAM,CAAC,cAAc,GAAG,GAAG,CAAC;IACnC,mHAAmH;IAC5G,MAAM,CAAC,cAAc,GAAG;QAC7B,8BAA8B;QAC9B,OAAO,EAAE,IAAI;QACb,yHAAyH;QACzH,OAAO,EAAE,GAAG;QACZ,qFAAqF;QACrF,QAAQ,EAAE,yBAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC;KAC3C,CAAC;IACF,2FAA2F;IACpF,MAAM,CAAC,4BAA4B,GAAG,EAAE,CAAC;IAChD;;;OAGG;IACI,MAAM,CAAC,qBAAqB,GAAG,KAAK,CAAC;;AApE9C,oCAqEC","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 Tools\r\n */\r\n\r\nimport { BeDuration } from \"@itwin/core-bentley\";\r\nimport { Angle, Constant } from \"@itwin/core-geometry\";\r\n\r\n/** Settings that control the behavior of built-in tools. Applications may modify these values.\r\n * @public\r\n * @extensions\r\n */\r\nexport class ToolSettings {\r\n /** Two tap must be within this period to be a double tap. */\r\n public static doubleTapTimeout = BeDuration.fromMilliseconds(250);\r\n /** Two clicks must be within this period to be a double click. */\r\n public static doubleClickTimeout = BeDuration.fromMilliseconds(500);\r\n /** Number of screen inches of movement allowed between clicks to still qualify as a double-click. */\r\n public static doubleClickToleranceInches = 0.05;\r\n /** @beta Use virtual cursor to help with locating elements using touch input. By default it's only enabled for snapping. */\r\n public static enableVirtualCursorForLocate = false;\r\n /** If true, view rotation tool keeps the up vector (worldZ) aligned with screenY. */\r\n public static preserveWorldUp = true;\r\n /** Delay with a touch on the surface before a move operation begins. */\r\n public static touchMoveDelay = BeDuration.fromMilliseconds(50);\r\n /** Delay with the mouse down before a drag operation begins. */\r\n public static startDragDelay = BeDuration.fromMilliseconds(110);\r\n /** Distance in screen inches a touch point must move before being considered motion. */\r\n public static touchMoveDistanceInches = 0.1;\r\n /** Distance in screen inches the cursor must move before a drag operation begins. */\r\n public static startDragDistanceInches = 0.15;\r\n /** Distance in screen inches touch points must move apart to be considered a change in zoom scale. */\r\n public static touchZoomChangeThresholdInches = 0.20;\r\n /** Radius in screen inches to search for elements that anchor viewing operations. */\r\n public static viewToolPickRadiusInches = 0.20;\r\n /** Camera angle enforced for walk tool. */\r\n public static walkCameraAngle = Angle.createDegrees(75.6);\r\n /** Whether the walk tool enforces worldZ be aligned with screenY */\r\n public static walkEnforceZUp = false;\r\n /** Speed, in meters per second, for the walk tool. */\r\n public static walkVelocity = 3.5;\r\n /** @beta Integer increment used to compute a walkVelocity multiplier for the look and move tool, capped at 10x */\r\n public static walkVelocityChange = 0;\r\n /** Whether the walk tool requests pointer lock to hide the cursor for mouse look */\r\n public static walkRequestPointerLock = true;\r\n /** @beta Whether the look and move tool detects collisions while moving forward */\r\n public static walkCollisions = false;\r\n /** @beta Whether the look and move tool adjusts the camera height for stairs/ramps when collisions are enabled */\r\n public static walkDetectFloor = false;\r\n /** @beta Maximum step height in meters above floor/ground to use when floor detection is enabled */\r\n public static walkStepHeight = 0.3;\r\n /** @beta Camera height in meters above floor/ground to use for set up walk tool */\r\n public static walkEyeHeight = 1.6;\r\n /** Scale factor applied for wheel events with \"per-line\" modifier. */\r\n public static wheelLineFactor = 40;\r\n /** Scale factor applied for wheel events with \"per-page\" modifier. */\r\n public static wheelPageFactor = 120;\r\n /** When the zoom-with-wheel tool (with camera enabled) gets closer than this distance to an obstacle, it \"bumps\" through. */\r\n public static wheelZoomBumpDistance = Constant.oneCentimeter;\r\n /** the speed to scroll for the \"scroll view\" tool (distance per second). */\r\n public static scrollSpeed = .75;\r\n /** the speed to zoom for the \"zoom view\" tool. */\r\n public static zoomSpeed = 10;\r\n /** Scale factor for zooming with mouse wheel. */\r\n public static wheelZoomRatio = 1.5;\r\n /** Parameters for viewing operations with *inertia* (i.e. they continue briefly if used with a throwing action) */\r\n public static viewingInertia = {\r\n /** Flag to enable inertia. */\r\n enabled: true,\r\n /** How quickly the inertia decays. The smaller the damping value the faster the inertia decays. Must be less than 1.0 */\r\n damping: .96,\r\n /** Maximum duration of the inertia operation. Important when frame rates are low. */\r\n duration: BeDuration.fromMilliseconds(500),\r\n };\r\n /** Maximum number of times in a second the accuSnap tool's onMotion function is called. */\r\n public static maxOnMotionSnapCallPerSecond = 15;\r\n /** If true, drag box selection will accept spatial elements that are inside or overlap a clip volume instead of only what is visible in the view.\r\n * @note Enabling is not recommended for web applications.\r\n * @beta\r\n */\r\n public static enableVolumeSelection = false;\r\n}\r\n"]}
1
+ {"version":3,"file":"ToolSettings.js","sourceRoot":"","sources":["../../../src/tools/ToolSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAiD;AACjD,wDAAuD;AAEvD;;;GAGG;AACH,MAAa,YAAY;IACvB,6DAA6D;IACtD,MAAM,CAAC,gBAAgB,GAAG,yBAAU,CAAC,gBAAgB,CA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AC5E,MAAM,CAAC,aAAa,GAAG,GAAG,CAAC;IAClC,sEAAsE;IAC/D,MAAM,CAAC,eAAe,GAAG,EAAE,CAAC;IACnC,sEAAsE;IAC/D,MAAM,CAAC,eAAe,GAAG,GAAG,CAAC;IACpC,6HAA6H;IACtH,MAAM,CAAC,qBAAqB,GAAG,wBAAQ,CAAC,aAAa,CAAC;IAC7D,4EAA4E;IACrE,MAAM,CAAC,WAAW,GAAG,GAAG,CAAC;IAChC,kDAAkD;IAC3C,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;IAC7B,iDAAiD;IAC1C,MAAM,CAAC,cAAc,GAAG,GAAG,CAAC;IACnC,mHAAmH;IAC5G,MAAM,CAAC,cAAc,GAAG;QAC7B,8BAA8B;QAC9B,OAAO,EAAE,IAAI;QACb,yHAAyH;QACzH,OAAO,EAAE,GAAG;QACZ,qFAAqF;QACrF,QAAQ,EAAE,yBAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC;KAC3C,CAAC;IACF,2FAA2F;IACpF,MAAM,CAAC,4BAA4B,GAAG,EAAE,CAAC;IAChD;;;OAGG;IACI,MAAM,CAAC,qBAAqB,GAAG,KAAK,CAAC;IAC5C;;MAEE;IACK,MAAM,CAAC,sBAAsB,GAAG,IAAI,CAAC;;AAxE9C,oCAyEC","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 Tools\r\n */\r\n\r\nimport { BeDuration } from \"@itwin/core-bentley\";\r\nimport { Angle, Constant } from \"@itwin/core-geometry\";\r\n\r\n/** Settings that control the behavior of built-in tools. Applications may modify these values.\r\n * @public\r\n * @extensions\r\n */\r\nexport class ToolSettings {\r\n /** Two tap must be within this period to be a double tap. */\r\n public static doubleTapTimeout = BeDuration.fromMilliseconds(250);\r\n /** Two clicks must be within this period to be a double click. */\r\n public static doubleClickTimeout = BeDuration.fromMilliseconds(500);\r\n /** Number of screen inches of movement allowed between clicks to still qualify as a double-click. */\r\n public static doubleClickToleranceInches = 0.05;\r\n /** @beta Use virtual cursor to help with locating elements using touch input. By default it's only enabled for snapping. */\r\n public static enableVirtualCursorForLocate = false;\r\n /** If true, view rotation tool keeps the up vector (worldZ) aligned with screenY. */\r\n public static preserveWorldUp = true;\r\n /** Delay with a touch on the surface before a move operation begins. */\r\n public static touchMoveDelay = BeDuration.fromMilliseconds(50);\r\n /** Delay with the mouse down before a drag operation begins. */\r\n public static startDragDelay = BeDuration.fromMilliseconds(110);\r\n /** Distance in screen inches a touch point must move before being considered motion. */\r\n public static touchMoveDistanceInches = 0.1;\r\n /** Distance in screen inches the cursor must move before a drag operation begins. */\r\n public static startDragDistanceInches = 0.15;\r\n /** Distance in screen inches touch points must move apart to be considered a change in zoom scale. */\r\n public static touchZoomChangeThresholdInches = 0.20;\r\n /** Radius in screen inches to search for elements that anchor viewing operations. */\r\n public static viewToolPickRadiusInches = 0.20;\r\n /** Camera angle enforced for walk tool. */\r\n public static walkCameraAngle = Angle.createDegrees(75.6);\r\n /** Whether the walk tool enforces worldZ be aligned with screenY */\r\n public static walkEnforceZUp = false;\r\n /** Speed, in meters per second, for the walk tool. */\r\n public static walkVelocity = 3.5;\r\n /** @beta Integer increment used to compute a walkVelocity multiplier for the look and move tool, capped at 10x */\r\n public static walkVelocityChange = 0;\r\n /** Whether the walk tool requests pointer lock to hide the cursor for mouse look */\r\n public static walkRequestPointerLock = true;\r\n /** @beta Whether the look and move tool detects collisions while moving forward */\r\n public static walkCollisions = false;\r\n /** @beta Whether the look and move tool adjusts the camera height for stairs/ramps when collisions are enabled */\r\n public static walkDetectFloor = false;\r\n /** @beta Maximum step height in meters above floor/ground to use when floor detection is enabled */\r\n public static walkStepHeight = 0.3;\r\n /** @beta Camera height in meters above floor/ground to use for set up walk tool */\r\n public static walkEyeHeight = 1.6;\r\n /** Scale factor applied for wheel events with \"per-line\" modifier. */\r\n public static wheelLineFactor = 40;\r\n /** Scale factor applied for wheel events with \"per-page\" modifier. */\r\n public static wheelPageFactor = 120;\r\n /** When the zoom-with-wheel tool (with camera enabled) gets closer than this distance to an obstacle, it \"bumps\" through. */\r\n public static wheelZoomBumpDistance = Constant.oneCentimeter;\r\n /** the speed to scroll for the \"scroll view\" tool (distance per second). */\r\n public static scrollSpeed = .75;\r\n /** the speed to zoom for the \"zoom view\" tool. */\r\n public static zoomSpeed = 10;\r\n /** Scale factor for zooming with mouse wheel. */\r\n public static wheelZoomRatio = 1.5;\r\n /** Parameters for viewing operations with *inertia* (i.e. they continue briefly if used with a throwing action) */\r\n public static viewingInertia = {\r\n /** Flag to enable inertia. */\r\n enabled: true,\r\n /** How quickly the inertia decays. The smaller the damping value the faster the inertia decays. Must be less than 1.0 */\r\n damping: .96,\r\n /** Maximum duration of the inertia operation. Important when frame rates are low. */\r\n duration: BeDuration.fromMilliseconds(500),\r\n };\r\n /** Maximum number of times in a second the accuSnap tool's onMotion function is called. */\r\n public static maxOnMotionSnapCallPerSecond = 15;\r\n /** If true, drag box selection will accept spatial elements that are inside or overlap a clip volume instead of only what is visible in the view.\r\n * @note Enabling is not recommended for web applications.\r\n * @beta\r\n */\r\n public static enableVolumeSelection = false;\r\n /** If true, pressing Escape key sets focus to Home to allow shortcuts to be used.\r\n * @beta\r\n */\r\n public static escapeMovesFocusToHome = true;\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module IModelConnection
3
3
  */
4
4
  import { BeEvent, IModelStatus } from "@itwin/core-bentley";
5
- import { ChangesetIdWithIndex, ChangesetIndexAndId, ChangesetProps, EcefLocationProps, GeographicCRSProps, ModelIdAndGeometryGuid, NotifyEntitiesChangedArgs, RootSubjectProps, TxnNotifications, TxnProps } from "@itwin/core-common";
5
+ import { ChangesetIdWithIndex, ChangesetIndexAndId, ChangesetProps, EcefLocationProps, GeographicCRSProps, ModelIdAndGeometryGuid, NotifyEntitiesChangedArgs, ReinstateTxnArgs, ReverseTxnArgs, RootSubjectProps, TxnNotifications, TxnProps } from "@itwin/core-common";
6
6
  import { Range3dProps, XYZProps } from "@itwin/core-geometry";
7
7
  import { BriefcaseConnection } from "./BriefcaseConnection";
8
8
  import { NotificationHandler } from "./IpcApp";
@@ -161,6 +161,21 @@ export declare class BriefcaseTxns extends BriefcaseNotificationHandler implemen
161
161
  * @see [[isUndoPossible]] to determine if any reversible operations exist.
162
162
  */
163
163
  reverseSingleTxn(): Promise<IModelStatus>;
164
+ /** Reverse (undo) the most recent operation to this briefcase in the current session. By default, this method also
165
+ * abandons the locks that were acquired for that operation.
166
+ * @beta
167
+ * @note This method will also abandon locks associated with any later, reversed Txns, if they have not
168
+ * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning
169
+ * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated
170
+ * with _both_ Txn 1 and Txn 2.
171
+ * @note If there are any outstanding uncommitted changes, they are reversed.
172
+ * @note The term "operation" is used rather than Txn, since multiple Txns can be grouped together via [TxnManager.beginMultiTxnOperation]($backend). So,
173
+ * even though this method reverses only one operation, multiple Txns may be reversed if they were grouped together when they were made.
174
+ * @note If there are no reversible operations, this method does nothing and returns Success.
175
+ * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.
176
+ * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.
177
+ */
178
+ reverseSingleTxnAsync(args?: ReverseTxnArgs): Promise<void>;
164
179
  /** Reverse (undo) the most recent operation(s) to the briefcase in the current session.
165
180
  * @param numOperations the number of operations to reverse. If this is greater than 1, the entire set of operations will
166
181
  * be reinstated together when/if [[reinstateTxn]] is called.
@@ -170,12 +185,43 @@ export declare class BriefcaseTxns extends BriefcaseNotificationHandler implemen
170
185
  * @note If numOperations is too large only the number of reversible operations are reversed.
171
186
  */
172
187
  reverseTxns(numOperations: number): Promise<IModelStatus>;
188
+ /** Reverse (undo) the most recent operation(s) to the briefcase in the current session. By default, this method also
189
+ * abandons the locks that were acquired for those operations.
190
+ * @beta
191
+ * @note This method will also abandon locks associated with any later, reversed Txns, if they have not
192
+ * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning
193
+ * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated
194
+ * with _both_ Txn 1 and Txn 2.
195
+ * @note If you do not want to abandon any locks, set [ReverseTxnArgs.retainLocks]($common) to true.
196
+ * @note If there are any outstanding uncommitted changes, they are reversed.
197
+ * @note The term "operation" is used rather than Txn, since multiple Txns can be grouped together via [[beginMultiTxnOperation]]. So,
198
+ * even if numOperations is 1, multiple Txns may be reversed if they were grouped together when they were made.
199
+ * @note If numOperations is too large only the operations are reversible are reversed.
200
+ * @param numOperations the number of operations to reverse. If this is greater than 1, the entire set of operations will
201
+ * be reinstated together when/if ReinstateTxn is called.
202
+ * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.
203
+ * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.
204
+ */
205
+ reverseTxnsAsync(numOperations: number, args?: ReverseTxnArgs): Promise<void>;
173
206
  /** Reverse (undo) all changes back to the beginning of the session.
174
207
  * @see [[reinstateTxn]] to redo changes.
175
208
  * @see [[reverseSingleTxn]] to undo only the most recent operation.
176
209
  * @see [[isUndoPossible]] to determine if any reversible operations exist.
177
210
  */
178
211
  reverseAll(): Promise<IModelStatus>;
212
+ /** Reverse (undo) all operations back to the beginning of the session. By default, this method also
213
+ * abandons the locks that were acquired for those operations.
214
+ * @beta
215
+ * @note This method will also abandon locks associated with any later, reversed Txns, if they have not
216
+ * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning
217
+ * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated
218
+ * with _both_ Txn 1 and Txn 2.
219
+ * @note If there are any outstanding uncommitted changes, they are reversed.
220
+ * @note If there are no reversible operations, this method does nothing and returns Success.
221
+ * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.
222
+ * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.
223
+ */
224
+ reverseAllTxnsAsync(args?: ReverseTxnArgs): Promise<void>;
179
225
  /** Reinstate (redo) the most recently reversed transaction. Since at any time multiple transactions can be reversed, it
180
226
  * may take multiple calls to this method to reinstate all reversed operations.
181
227
  * @returns Success if a reversed transaction was reinstated, error status otherwise.
@@ -184,6 +230,17 @@ export declare class BriefcaseTxns extends BriefcaseNotificationHandler implemen
184
230
  * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.
185
231
  */
186
232
  reinstateTxn(): Promise<IModelStatus>;
233
+ /** Reinstate (redo) the most recently reversed transaction. Since at any time multiple transactions can be reversed, it
234
+ * may take multiple calls to this method to reinstate all reversed operations. This method also
235
+ * re-acquires the locks that were abandoned when those operations were reversed.
236
+ * @beta
237
+ * @param args Optional arguments to control the behavior of the reinstate operation.
238
+ * @returns Success if a reversed transaction was reinstated, error status otherwise.
239
+ * @note If there are any outstanding uncommitted changes, they are canceled before the Txn is reinstated.
240
+ * @see [[isRedoPossible]] to determine if any reinstatable operations exist.
241
+ * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.
242
+ */
243
+ reinstateTxnAsync(args?: ReinstateTxnArgs): Promise<void>;
187
244
  /** Restart the current TxnManager session. This causes all Txns in the current session to no longer be undoable (as if the file was closed
188
245
  * and reopened.)
189
246
  * @note This can be quite disconcerting to the user expecting to be able to undo previously made changes. It should only be used
@@ -1 +1 @@
1
- {"version":3,"file":"BriefcaseTxns.d.ts","sourceRoot":"","sources":["../../src/BriefcaseTxns.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EAAE,cAAc,EAAgB,iBAAiB,EAAiB,kBAAkB,EACvG,sBAAsB,EAAE,yBAAyB,EAAkB,gBAAgB,EAAE,gBAAgB,EACrG,QA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
  }
214
+ /** Reverse (undo) the most recent operation to this briefcase in the current session. By default, this method also
215
+ * abandons the locks that were acquired for that operation.
216
+ * @beta
217
+ * @note This method will also abandon locks associated with any later, reversed Txns, if they have not
218
+ * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning
219
+ * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated
220
+ * with _both_ Txn 1 and Txn 2.
221
+ * @note If there are any outstanding uncommitted changes, they are reversed.
222
+ * @note The term "operation" is used rather than Txn, since multiple Txns can be grouped together via [TxnManager.beginMultiTxnOperation]($backend). So,
223
+ * even though this method reverses only one operation, multiple Txns may be reversed if they were grouped together when they were made.
224
+ * @note If there are no reversible operations, this method does nothing and returns Success.
225
+ * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.
226
+ * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.
227
+ */
228
+ async reverseSingleTxnAsync(args) {
229
+ await this.reverseTxnsAsync(1, args);
230
+ }
214
231
  /** Reverse (undo) the most recent operation(s) to the briefcase in the current session.
215
232
  * @param numOperations the number of operations to reverse. If this is greater than 1, the entire set of operations will
216
233
  * be reinstated together when/if [[reinstateTxn]] is called.
@@ -222,6 +239,26 @@ export class BriefcaseTxns extends BriefcaseNotificationHandler {
222
239
  async reverseTxns(numOperations) {
223
240
  return IpcApp.appFunctionIpc.reverseTxns(this._iModel.key, numOperations);
224
241
  }
242
+ /** Reverse (undo) the most recent operation(s) to the briefcase in the current session. By default, this method also
243
+ * abandons the locks that were acquired for those operations.
244
+ * @beta
245
+ * @note This method will also abandon locks associated with any later, reversed Txns, if they have not
246
+ * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning
247
+ * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated
248
+ * with _both_ Txn 1 and Txn 2.
249
+ * @note If you do not want to abandon any locks, set [ReverseTxnArgs.retainLocks]($common) to true.
250
+ * @note If there are any outstanding uncommitted changes, they are reversed.
251
+ * @note The term "operation" is used rather than Txn, since multiple Txns can be grouped together via [[beginMultiTxnOperation]]. So,
252
+ * even if numOperations is 1, multiple Txns may be reversed if they were grouped together when they were made.
253
+ * @note If numOperations is too large only the operations are reversible are reversed.
254
+ * @param numOperations the number of operations to reverse. If this is greater than 1, the entire set of operations will
255
+ * be reinstated together when/if ReinstateTxn is called.
256
+ * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.
257
+ * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.
258
+ */
259
+ async reverseTxnsAsync(numOperations, args) {
260
+ return IpcApp.appFunctionIpc.reverseTxnsAsync(this._iModel.key, numOperations, args);
261
+ }
225
262
  /** Reverse (undo) all changes back to the beginning of the session.
226
263
  * @see [[reinstateTxn]] to redo changes.
227
264
  * @see [[reverseSingleTxn]] to undo only the most recent operation.
@@ -230,6 +267,21 @@ export class BriefcaseTxns extends BriefcaseNotificationHandler {
230
267
  async reverseAll() {
231
268
  return IpcApp.appFunctionIpc.reverseAllTxn(this._iModel.key);
232
269
  }
270
+ /** Reverse (undo) all operations back to the beginning of the session. By default, this method also
271
+ * abandons the locks that were acquired for those operations.
272
+ * @beta
273
+ * @note This method will also abandon locks associated with any later, reversed Txns, if they have not
274
+ * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning
275
+ * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated
276
+ * with _both_ Txn 1 and Txn 2.
277
+ * @note If there are any outstanding uncommitted changes, they are reversed.
278
+ * @note If there are no reversible operations, this method does nothing and returns Success.
279
+ * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.
280
+ * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.
281
+ */
282
+ async reverseAllTxnsAsync(args) {
283
+ return IpcApp.appFunctionIpc.reverseAllTxnsAsync(this._iModel.key, args);
284
+ }
233
285
  /** Reinstate (redo) the most recently reversed transaction. Since at any time multiple transactions can be reversed, it
234
286
  * may take multiple calls to this method to reinstate all reversed operations.
235
287
  * @returns Success if a reversed transaction was reinstated, error status otherwise.
@@ -240,6 +292,19 @@ export class BriefcaseTxns extends BriefcaseNotificationHandler {
240
292
  async reinstateTxn() {
241
293
  return IpcApp.appFunctionIpc.reinstateTxn(this._iModel.key);
242
294
  }
295
+ /** Reinstate (redo) the most recently reversed transaction. Since at any time multiple transactions can be reversed, it
296
+ * may take multiple calls to this method to reinstate all reversed operations. This method also
297
+ * re-acquires the locks that were abandoned when those operations were reversed.
298
+ * @beta
299
+ * @param args Optional arguments to control the behavior of the reinstate operation.
300
+ * @returns Success if a reversed transaction was reinstated, error status otherwise.
301
+ * @note If there are any outstanding uncommitted changes, they are canceled before the Txn is reinstated.
302
+ * @see [[isRedoPossible]] to determine if any reinstatable operations exist.
303
+ * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.
304
+ */
305
+ async reinstateTxnAsync(args) {
306
+ return IpcApp.appFunctionIpc.reinstateTxnAsync(this._iModel.key, args);
307
+ }
243
308
  /** Restart the current TxnManager session. This causes all Txns in the current session to no longer be undoable (as if the file was closed
244
309
  * and reopened.)
245
310
  * @note This can be quite disconcerting to the user expecting to be able to undo previously made changes. It should only be used
@@ -1 +1 @@
1
- {"version":3,"file":"BriefcaseTxns.js","sourceRoot":"","sources":["../../src/BriefcaseTxns.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAgB,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAEgC,YAAY,EAAqB,aAAa,EAAsB,cAAc,GAGxH,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,OAAO,EAA0B,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,aAAa,EAAoB,MAAM,oBAAoB,CAAC;AAErE;;;;GAIG;AACH,MAAM,OAAgB,4BAA6B,SAAQ,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AE,CAAC;IAC/C,CAAC;IACD,gBAAgB;IACT,4BAA4B,CAAC,IAAgB;QAClD,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACD,gBAAgB;IACT,6BAA6B;QAClC,IAAI,CAAC,yBAAyB,CAAC,UAAU,EAAE,CAAC;IAC9C,CAAC;IACD,gBAAgB;IACT,2BAA2B;QAChC,IAAI,CAAC,uBAAuB,CAAC,UAAU,EAAE,CAAC;IAC5C,CAAC;IACD,gBAAgB;IACT,iBAAiB,CAAC,IAAgB;QACvC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,gBAAgB;IACT,eAAe,CAAC,IAAgB;QACrC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IACD,gBAAgB;IACT,oBAAoB,CAAC,GAAa;QACvC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC;IACD,gBAAgB;IACT,kBAAkB,CAAC,GAAa;QACrC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;CACF","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, IModelStatus } from \"@itwin/core-bentley\";\r\nimport {\r\n ChangesetIdWithIndex,\r\n ChangesetIndexAndId, ChangesetProps, EcefLocation, EcefLocationProps, GeographicCRS, GeographicCRSProps, ipcAppChannels,\r\n ModelIdAndGeometryGuid, NotifyEntitiesChangedArgs, RemoveFunction, RootSubjectProps, TxnNotifications,\r\n TxnProps,\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\nimport { EntityChanges, TxnEntityChanges } from \"./TxnEntityChanges\";\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: TxnEntityChanges) => 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: TxnEntityChanges) => 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 for a read-only briefcase that was opened with the `watchForChanges` flag enabled when changes made by another connection are applied to the briefcase.\r\n * @see [[onReplayedExternalTxns]] for the event raised after all such changes have been applied.\r\n */\r\n public readonly onReplayExternalTxns = new BeEvent<() => void>();\r\n\r\n /** Event raised for a read-only briefcase that was opened with the `watchForChanges` flag enabled when changes made by another connection are applied to the briefcase.\r\n * @see [[onReplayExternalTxns]] for the event raised before the changes are applied.\r\n */\r\n public readonly onReplayedExternalTxns = new BeEvent<() => 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 /** Event raised before pull merge process begins.\r\n * @alpha\r\n */\r\n public readonly onPullMergeBegin = new BeEvent<(changeset: ChangesetIdWithIndex) => void>();\r\n\r\n /** Event raised before a rebase operation begins.\r\n * @alpha\r\n */\r\n public readonly onRebaseBegin = new BeEvent<(txns: TxnProps[]) => void>();\r\n\r\n /** Event raised before a transaction is rebased.\r\n * @alpha\r\n */\r\n public readonly onRebaseTxnBegin = new BeEvent<(txnProps: TxnProps) => void>();\r\n\r\n /**\r\n * Event raised after a transaction is rebased.\r\n * @alpha\r\n */\r\n public readonly onRebaseTxnEnd = new BeEvent<(txnProps: TxnProps) => void>();\r\n\r\n /**\r\n * Event raised after a rebase operation ends.\r\n * @alpha\r\n */\r\n public readonly onRebaseEnd = new BeEvent<(txns: TxnProps[]) => void>();\r\n\r\n /**\r\n * Event raised after the pull merge process ends.\r\n * @alpha\r\n */\r\n public readonly onPullMergeEnd = new BeEvent<(changeset: ChangesetIdWithIndex) => void>();\r\n\r\n /** Event raised before incoming changes are applied.\r\n * @alpha\r\n */\r\n public readonly onApplyIncomingChangesBegin = new BeEvent<(changesets: ChangesetProps[]) => void>();\r\n\r\n /** Event raised after incoming changes are applied.\r\n * @alpha\r\n */\r\n public readonly onApplyIncomingChangesEnd = new BeEvent<(changes: ChangesetProps[]) => void>();\r\n\r\n /** Event raised before local changes are reversed.\r\n * @alpha\r\n */\r\n public readonly onReverseLocalChangesBegin = new BeEvent<() => void>();\r\n\r\n /** Event raised after local changes are reversed.\r\n * @alpha\r\n */\r\n public readonly onReverseLocalChangesEnd = new BeEvent<(txns: TxnProps[]) => void>();\r\n\r\n /** Event raised before downloading changesets begins.\r\n * @alpha\r\n */\r\n public readonly onDownloadChangesetsBegin = new BeEvent<() => void>();\r\n\r\n /** Event raised after downloading changesets ends.\r\n * @alpha\r\n */\r\n public readonly onDownloadChangesetsEnd = new BeEvent<() => 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 [Symbol.dispose](): void {\r\n if (this._cleanup) {\r\n this._cleanup();\r\n this._cleanup = undefined;\r\n\r\n this.onAfterUndoRedo.clear();\r\n this.onApplyIncomingChangesBegin.clear();\r\n this.onApplyIncomingChangesEnd.clear();\r\n this.onBeforeUndoRedo.clear();\r\n this.onChangesApplied.clear();\r\n this.onChangesPulled.clear();\r\n this.onChangesPushed.clear();\r\n this.onCommit.clear();\r\n this.onCommitted.clear();\r\n this.onDownloadChangesetsBegin.clear();\r\n this.onDownloadChangesetsEnd.clear();\r\n this.onElementsChanged.clear();\r\n this.onModelGeometryChanged.clear();\r\n this.onModelsChanged.clear();\r\n this.onPullMergeBegin.clear();\r\n this.onPullMergeEnd.clear();\r\n this.onRebaseBegin.clear();\r\n this.onRebaseEnd.clear();\r\n this.onRebaseTxnBegin.clear();\r\n this.onRebaseTxnEnd.clear();\r\n this.onReverseLocalChangesBegin.clear();\r\n this.onReverseLocalChangesEnd.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: NotifyEntitiesChangedArgs): void {\r\n this.onElementsChanged.raiseEvent(new EntityChanges(changed));\r\n }\r\n\r\n /** @internal */\r\n public notifyModelsChanged(changed: NotifyEntitiesChangedArgs): void {\r\n this.onModelsChanged.raiseEvent(new EntityChanges(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 notifyReplayExternalTxns() {\r\n this.onReplayExternalTxns.raiseEvent();\r\n }\r\n\r\n /** @internal */\r\n public notifyReplayedExternalTxns() {\r\n this.onReplayedExternalTxns.raiseEvent();\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 /** @internal */\r\n public notifyPullMergeBegin(changeset: ChangesetIdWithIndex) {\r\n this.onPullMergeBegin.raiseEvent(changeset);\r\n }\r\n /** @internal */\r\n public notifyPullMergeEnd(changeset: ChangesetIdWithIndex) {\r\n this.onPullMergeEnd.raiseEvent(changeset);\r\n }\r\n /** @internal */\r\n public notifyApplyIncomingChangesBegin(changes: ChangesetProps[]) {\r\n this.onApplyIncomingChangesBegin.raiseEvent(changes);\r\n }\r\n /** @internal */\r\n public notifyApplyIncomingChangesEnd(changes: ChangesetProps[]) {\r\n this.onApplyIncomingChangesEnd.raiseEvent(changes);\r\n }\r\n /** @internal */\r\n public notifyReverseLocalChangesBegin() {\r\n this.onReverseLocalChangesBegin.raiseEvent();\r\n }\r\n /** @internal */\r\n public notifyReverseLocalChangesEnd(txns: TxnProps[]) {\r\n this.onReverseLocalChangesEnd.raiseEvent(txns);\r\n }\r\n /** @internal */\r\n public notifyDownloadChangesetsBegin() {\r\n this.onDownloadChangesetsBegin.raiseEvent();\r\n }\r\n /** @internal */\r\n public notifyDownloadChangesetsEnd() {\r\n this.onDownloadChangesetsEnd.raiseEvent();\r\n }\r\n /** @internal */\r\n public notifyRebaseBegin(txns: TxnProps[]) {\r\n this.onRebaseBegin.raiseEvent(txns);\r\n }\r\n /** @internal */\r\n public notifyRebaseEnd(txns: TxnProps[]) {\r\n this.onRebaseEnd.raiseEvent(txns);\r\n }\r\n /** @internal */\r\n public notifyRebaseTxnBegin(txn: TxnProps) {\r\n this.onRebaseTxnBegin.raiseEvent(txn);\r\n }\r\n /** @internal */\r\n public notifyRebaseTxnEnd(txn: TxnProps) {\r\n this.onRebaseTxnEnd.raiseEvent(txn);\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,OAAO,EAAE,OAAO,EAAgB,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAEgC,YAAY,EAAqB,aAAa,EAAsB,cAAc,GAGxH,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,OAAO,EAA0B,MAAM,sBAAsB,CAAC;AA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C,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,gBAAgB;IACT,eAAe,CAAC,IAAgB;QACrC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IACD,gBAAgB;IACT,oBAAoB,CAAC,GAAa;QACvC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC;IACD,gBAAgB;IACT,kBAAkB,CAAC,GAAa;QACrC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;CACF","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, IModelStatus } from \"@itwin/core-bentley\";\r\nimport {\r\n ChangesetIdWithIndex,\r\n ChangesetIndexAndId, ChangesetProps, EcefLocation, EcefLocationProps, GeographicCRS, GeographicCRSProps, ipcAppChannels,\r\n ModelIdAndGeometryGuid, NotifyEntitiesChangedArgs, ReinstateTxnArgs, RemoveFunction, ReverseTxnArgs, RootSubjectProps, TxnNotifications,\r\n TxnProps,\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\nimport { EntityChanges, TxnEntityChanges } from \"./TxnEntityChanges\";\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: TxnEntityChanges) => 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: TxnEntityChanges) => 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 for a read-only briefcase that was opened with the `watchForChanges` flag enabled when changes made by another connection are applied to the briefcase.\r\n * @see [[onReplayedExternalTxns]] for the event raised after all such changes have been applied.\r\n */\r\n public readonly onReplayExternalTxns = new BeEvent<() => void>();\r\n\r\n /** Event raised for a read-only briefcase that was opened with the `watchForChanges` flag enabled when changes made by another connection are applied to the briefcase.\r\n * @see [[onReplayExternalTxns]] for the event raised before the changes are applied.\r\n */\r\n public readonly onReplayedExternalTxns = new BeEvent<() => 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 /** Event raised before pull merge process begins.\r\n * @alpha\r\n */\r\n public readonly onPullMergeBegin = new BeEvent<(changeset: ChangesetIdWithIndex) => void>();\r\n\r\n /** Event raised before a rebase operation begins.\r\n * @alpha\r\n */\r\n public readonly onRebaseBegin = new BeEvent<(txns: TxnProps[]) => void>();\r\n\r\n /** Event raised before a transaction is rebased.\r\n * @alpha\r\n */\r\n public readonly onRebaseTxnBegin = new BeEvent<(txnProps: TxnProps) => void>();\r\n\r\n /**\r\n * Event raised after a transaction is rebased.\r\n * @alpha\r\n */\r\n public readonly onRebaseTxnEnd = new BeEvent<(txnProps: TxnProps) => void>();\r\n\r\n /**\r\n * Event raised after a rebase operation ends.\r\n * @alpha\r\n */\r\n public readonly onRebaseEnd = new BeEvent<(txns: TxnProps[]) => void>();\r\n\r\n /**\r\n * Event raised after the pull merge process ends.\r\n * @alpha\r\n */\r\n public readonly onPullMergeEnd = new BeEvent<(changeset: ChangesetIdWithIndex) => void>();\r\n\r\n /** Event raised before incoming changes are applied.\r\n * @alpha\r\n */\r\n public readonly onApplyIncomingChangesBegin = new BeEvent<(changesets: ChangesetProps[]) => void>();\r\n\r\n /** Event raised after incoming changes are applied.\r\n * @alpha\r\n */\r\n public readonly onApplyIncomingChangesEnd = new BeEvent<(changes: ChangesetProps[]) => void>();\r\n\r\n /** Event raised before local changes are reversed.\r\n * @alpha\r\n */\r\n public readonly onReverseLocalChangesBegin = new BeEvent<() => void>();\r\n\r\n /** Event raised after local changes are reversed.\r\n * @alpha\r\n */\r\n public readonly onReverseLocalChangesEnd = new BeEvent<(txns: TxnProps[]) => void>();\r\n\r\n /** Event raised before downloading changesets begins.\r\n * @alpha\r\n */\r\n public readonly onDownloadChangesetsBegin = new BeEvent<() => void>();\r\n\r\n /** Event raised after downloading changesets ends.\r\n * @alpha\r\n */\r\n public readonly onDownloadChangesetsEnd = new BeEvent<() => 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 [Symbol.dispose](): void {\r\n if (this._cleanup) {\r\n this._cleanup();\r\n this._cleanup = undefined;\r\n\r\n this.onAfterUndoRedo.clear();\r\n this.onApplyIncomingChangesBegin.clear();\r\n this.onApplyIncomingChangesEnd.clear();\r\n this.onBeforeUndoRedo.clear();\r\n this.onChangesApplied.clear();\r\n this.onChangesPulled.clear();\r\n this.onChangesPushed.clear();\r\n this.onCommit.clear();\r\n this.onCommitted.clear();\r\n this.onDownloadChangesetsBegin.clear();\r\n this.onDownloadChangesetsEnd.clear();\r\n this.onElementsChanged.clear();\r\n this.onModelGeometryChanged.clear();\r\n this.onModelsChanged.clear();\r\n this.onPullMergeBegin.clear();\r\n this.onPullMergeEnd.clear();\r\n this.onRebaseBegin.clear();\r\n this.onRebaseEnd.clear();\r\n this.onRebaseTxnBegin.clear();\r\n this.onRebaseTxnEnd.clear();\r\n this.onReverseLocalChangesBegin.clear();\r\n this.onReverseLocalChangesEnd.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 to this briefcase in the current session. By default, this method also\r\n * abandons the locks that were acquired for that operation.\r\n * @beta\r\n * @note This method will also abandon locks associated with any later, reversed Txns, if they have not\r\n * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning\r\n * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated\r\n * with _both_ Txn 1 and Txn 2.\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 though this method reverses only one operation, multiple Txns may be reversed if they were grouped together when they were made.\r\n * @note If there are no reversible operations, this method does nothing and returns Success.\r\n * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.\r\n * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.\r\n */\r\n public async reverseSingleTxnAsync(args?: ReverseTxnArgs): Promise<void> {\r\n await this.reverseTxnsAsync(1, args);\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) the most recent operation(s) to the briefcase in the current session. By default, this method also\r\n * abandons the locks that were acquired for those operations.\r\n * @beta\r\n * @note This method will also abandon locks associated with any later, reversed Txns, if they have not\r\n * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning\r\n * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated\r\n * with _both_ Txn 1 and Txn 2.\r\n * @note If you do not want to abandon any locks, set [ReverseTxnArgs.retainLocks]($common) to true.\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 [[beginMultiTxnOperation]]. 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 operations are reversible are reversed.\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 * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.\r\n * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.\r\n */\r\n public async reverseTxnsAsync(numOperations: number, args?: ReverseTxnArgs): Promise<void> {\r\n return IpcApp.appFunctionIpc.reverseTxnsAsync(this._iModel.key, numOperations, args);\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 /** Reverse (undo) all operations back to the beginning of the session. By default, this method also\r\n * abandons the locks that were acquired for those operations.\r\n * @beta\r\n * @note This method will also abandon locks associated with any later, reversed Txns, if they have not\r\n * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning\r\n * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated\r\n * with _both_ Txn 1 and Txn 2.\r\n * @note If there are any outstanding uncommitted changes, they are reversed.\r\n * @note If there are no reversible operations, this method does nothing and returns Success.\r\n * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.\r\n * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.\r\n */\r\n public async reverseAllTxnsAsync(args?: ReverseTxnArgs): Promise<void> {\r\n return IpcApp.appFunctionIpc.reverseAllTxnsAsync(this._iModel.key, args);\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 /** 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. This method also\r\n * re-acquires the locks that were abandoned when those operations were reversed.\r\n * @beta\r\n * @param args Optional arguments to control the behavior of the reinstate operation.\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 reinstateTxnAsync(args?: ReinstateTxnArgs): Promise<void> {\r\n return IpcApp.appFunctionIpc.reinstateTxnAsync(this._iModel.key, args);\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: NotifyEntitiesChangedArgs): void {\r\n this.onElementsChanged.raiseEvent(new EntityChanges(changed));\r\n }\r\n\r\n /** @internal */\r\n public notifyModelsChanged(changed: NotifyEntitiesChangedArgs): void {\r\n this.onModelsChanged.raiseEvent(new EntityChanges(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 notifyReplayExternalTxns() {\r\n this.onReplayExternalTxns.raiseEvent();\r\n }\r\n\r\n /** @internal */\r\n public notifyReplayedExternalTxns() {\r\n this.onReplayedExternalTxns.raiseEvent();\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 /** @internal */\r\n public notifyPullMergeBegin(changeset: ChangesetIdWithIndex) {\r\n this.onPullMergeBegin.raiseEvent(changeset);\r\n }\r\n /** @internal */\r\n public notifyPullMergeEnd(changeset: ChangesetIdWithIndex) {\r\n this.onPullMergeEnd.raiseEvent(changeset);\r\n }\r\n /** @internal */\r\n public notifyApplyIncomingChangesBegin(changes: ChangesetProps[]) {\r\n this.onApplyIncomingChangesBegin.raiseEvent(changes);\r\n }\r\n /** @internal */\r\n public notifyApplyIncomingChangesEnd(changes: ChangesetProps[]) {\r\n this.onApplyIncomingChangesEnd.raiseEvent(changes);\r\n }\r\n /** @internal */\r\n public notifyReverseLocalChangesBegin() {\r\n this.onReverseLocalChangesBegin.raiseEvent();\r\n }\r\n /** @internal */\r\n public notifyReverseLocalChangesEnd(txns: TxnProps[]) {\r\n this.onReverseLocalChangesEnd.raiseEvent(txns);\r\n }\r\n /** @internal */\r\n public notifyDownloadChangesetsBegin() {\r\n this.onDownloadChangesetsBegin.raiseEvent();\r\n }\r\n /** @internal */\r\n public notifyDownloadChangesetsEnd() {\r\n this.onDownloadChangesetsEnd.raiseEvent();\r\n }\r\n /** @internal */\r\n public notifyRebaseBegin(txns: TxnProps[]) {\r\n this.onRebaseBegin.raiseEvent(txns);\r\n }\r\n /** @internal */\r\n public notifyRebaseEnd(txns: TxnProps[]) {\r\n this.onRebaseEnd.raiseEvent(txns);\r\n }\r\n /** @internal */\r\n public notifyRebaseTxnBegin(txn: TxnProps) {\r\n this.onRebaseTxnBegin.raiseEvent(txn);\r\n }\r\n /** @internal */\r\n public notifyRebaseTxnEnd(txn: TxnProps) {\r\n this.onRebaseTxnEnd.raiseEvent(txn);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PerModelCategoryVisibility.d.ts","sourceRoot":"","sources":["../../src/PerModelCategoryVisibility.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAkB,IAAI,EAAE,OAAO,EAAE,UAAU,EAAe,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;GAQG;AACH,yBAAiB,0BAA0B,CAAC;IAC1C,uEAAuE;IACvE,KAAY,QAAQ;QAClB,wIAAwI;QACxI,IAAI,IAAA;QACJ,gDAAgD;QAChD,IAAI,IAAA;QACJ,kDAAkD;QAClD,IAAI,IAAA;KACL;IAED,uFAAuF;IACvF,UAAiB,aAAa;QAC5B,2EAA2E;QAC3E,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;QAC7B,gFAAgF;QAChF,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;QAChC,mEAAmE;QACnE,QAAQ,CAAC,OAAO,EAAE,OAA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