@itwin/core-frontend 5.9.0-dev.7 → 5.9.0-dev.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/BriefcaseTxns.d.ts +58 -1
- package/lib/cjs/BriefcaseTxns.d.ts.map +1 -1
- package/lib/cjs/BriefcaseTxns.js +65 -0
- package/lib/cjs/BriefcaseTxns.js.map +1 -1
- package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/cjs/tools/ToolAdmin.js +2 -2
- package/lib/cjs/tools/ToolAdmin.js.map +1 -1
- package/lib/esm/BriefcaseTxns.d.ts +58 -1
- package/lib/esm/BriefcaseTxns.d.ts.map +1 -1
- package/lib/esm/BriefcaseTxns.js +65 -0
- package/lib/esm/BriefcaseTxns.js.map +1 -1
- package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/esm/tools/ToolAdmin.js +3 -3
- package/lib/esm/tools/ToolAdmin.js.map +1 -1
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +20 -20
|
@@ -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,
|
|
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,EAAE,gBAAgB,EAAkB,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EACvI,QAAQ,EACT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAoB,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAU,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAiB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAErE;;;;GAIG;AACH,8BAAsB,4BAA6B,SAAQ,mBAAmB;IAChE,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,MAAM;IAChC,aAAoB,oBAAoB,IAAI,MAAM,CAAC;IACnD,IAAW,WAAW,WAA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YAAY;IAItD,gBAAgB;IACT,yBAAyB,CAAC,MAAM,EAAE,QAAQ;IAIjD,gBAAgB;IACT,yBAAyB,CAAC,IAAI,EAAE,iBAAiB,GAAG,SAAS;IAIpE,gBAAgB;IACT,uCAAuC,CAAC,GAAG,EAAE,kBAAkB,GAAG,SAAS;IAIlF,gBAAgB;IACT,oBAAoB,CAAC,SAAS,EAAE,oBAAoB;IAG3D,gBAAgB;IACT,kBAAkB,CAAC,SAAS,EAAE,oBAAoB;IAGzD,gBAAgB;IACT,+BAA+B,CAAC,OAAO,EAAE,cAAc,EAAE;IAGhE,gBAAgB;IACT,6BAA6B,CAAC,OAAO,EAAE,cAAc,EAAE;IAG9D,gBAAgB;IACT,8BAA8B;IAGrC,gBAAgB;IACT,4BAA4B,CAAC,IAAI,EAAE,QAAQ,EAAE;IAGpD,gBAAgB;IACT,6BAA6B;IAGpC,gBAAgB;IACT,2BAA2B;IAGlC,gBAAgB;IACT,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE;IAGzC,gBAAgB;IACT,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE;IAGvC,gBAAgB;IACT,oBAAoB,CAAC,GAAG,EAAE,QAAQ;IAGzC,gBAAgB;IACT,kBAAkB,CAAC,GAAG,EAAE,QAAQ;CAGxC"}
|
package/lib/esm/BriefcaseTxns.js
CHANGED
|
@@ -211,6 +211,23 @@ export class BriefcaseTxns extends BriefcaseNotificationHandler {
|
|
|
211
211
|
async reverseSingleTxn() {
|
|
212
212
|
return this.reverseTxns(1);
|
|
213
213
|
}
|
|
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;;G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,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IACD,gBAAgB;IACT,+BAA+B,CAAC,OAAyB;QAC9D,IAAI,CAAC,2BAA2B,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;IACD,gBAAgB;IACT,6BAA6B,CAAC,OAAyB;QAC5D,IAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;IACD,gBAAgB;IACT,8BAA8B;QACnC,IAAI,CAAC,0BAA0B,CAAC,UAAU,EAAE,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":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelConnection\n */\n\nimport { BeEvent, IModelStatus } from \"@itwin/core-bentley\";\nimport {\n ChangesetIdWithIndex,\n ChangesetIndexAndId, ChangesetProps, EcefLocation, EcefLocationProps, GeographicCRS, GeographicCRSProps, ipcAppChannels,\n ModelIdAndGeometryGuid, NotifyEntitiesChangedArgs, RemoveFunction, RootSubjectProps, TxnNotifications,\n TxnProps,\n} from \"@itwin/core-common\";\nimport { Point3d, Range3d, Range3dProps, XYZProps } from \"@itwin/core-geometry\";\nimport { BriefcaseConnection } from \"./BriefcaseConnection\";\nimport { IpcApp, NotificationHandler } from \"./IpcApp\";\nimport { EntityChanges, TxnEntityChanges } from \"./TxnEntityChanges\";\n\n/**\n * Base class for notification handlers for events from the backend that are specific to a [[BriefcaseConnection]].\n * @see [[BriefcaseTxns]].\n * @public\n */\nexport abstract class BriefcaseNotificationHandler extends NotificationHandler {\n constructor(private _key: string) { super(); }\n public abstract get briefcaseChannelName(): string;\n public get channelName() { return `${this.briefcaseChannelName}/${this._key}`; }\n}\n\n/** Manages local changes to a [[BriefcaseConnection]] via [Txns]($docs/learning/InteractiveEditing.md).\n * @see [[BriefcaseConnection.txns]].\n * @see [TxnManager]($backend) for the backend counterpart.\n * @public\n */\nexport class BriefcaseTxns extends BriefcaseNotificationHandler implements TxnNotifications {\n private readonly _iModel: BriefcaseConnection;\n private _cleanup?: RemoveFunction;\n\n /** @internal */\n public get briefcaseChannelName() {\n return ipcAppChannels.txns;\n }\n\n /** Event raised after Txn validation or changeset application to indicate the set of changed elements.\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.\n */\n public readonly onElementsChanged = new BeEvent<(changes: TxnEntityChanges) => void>();\n\n /** Event raised after Txn validation or changeset application to indicate the set of changed models.\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.\n */\n public readonly onModelsChanged = new BeEvent<(changes: TxnEntityChanges) => void>();\n\n /** Event raised after the geometry within one or more [[GeometricModelState]]s is modified by applying a changeset or validation of a transaction.\n * A model's geometry can change as a result of:\n * - Insertion or deletion of a geometric element within the model; or\n * - Modification of an existing element's geometric properties; or\n * - An explicit request to flag it as changed via [IModelDb.Models.updateModel]($backend).\n */\n public readonly onModelGeometryChanged = new BeEvent<(changes: ReadonlyArray<ModelIdAndGeometryGuid>) => void>();\n\n /** Event raised before a commit operation is performed. Initiated by a call to [[BriefcaseConnection.saveChanges]], unless there are no changes to save.\n * @see [[onCommitted]] for the event raised after the operation.\n */\n public readonly onCommit = new BeEvent<() => void>();\n\n /** Event raised after a commit operation is performed. Initiated by a call to [[BriefcaseConnection.saveChanges]], even if there were no changes to save.\n * The event supplies the following information:\n * - `hasPendingTxns`: true if the briefcase has local changes not yet pushed to the server.\n * - `time`: the time at which changes were saved on the backend (obtained via `Date.now()`).\n * @see [[onCommit]] for the event raised before the operation.\n */\n public readonly onCommitted = new BeEvent<(hasPendingTxns: boolean, time: number) => void>();\n\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.\n * @see [[onReplayedExternalTxns]] for the event raised after all such changes have been applied.\n */\n public readonly onReplayExternalTxns = new BeEvent<() => void>();\n\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.\n * @see [[onReplayExternalTxns]] for the event raised before the changes are applied.\n */\n public readonly onReplayedExternalTxns = new BeEvent<() => void>();\n\n /** Event raised after a changeset has been applied to the briefcase.\n * Changesets may be applied as a result of [[BriefcaseConnection.pullChanges]], or by undo/redo operations.\n */\n public readonly onChangesApplied = new BeEvent<() => void>();\n\n /** Event raised before an undo/redo operation is performed.\n * @see [[onAfterUndoRedo]] for the event raised after the operation.\n */\n public readonly onBeforeUndoRedo = new BeEvent<(isUndo: boolean) => void>();\n\n /** Event raised after an undo/redo operation is performed.\n * @see [[onBeforeUndoRedo]] for the event raised before to the operation.\n */\n public readonly onAfterUndoRedo = new BeEvent<(isUndo: boolean) => void>();\n\n /** Event raised after changes are pulled and merged into the briefcase.\n * @see [[BriefcaseConnection.pullAndMergeChanges]].\n */\n public readonly onChangesPulled = new BeEvent<(parentChangeset: ChangesetIndexAndId) => void>();\n\n /** Event raised after the briefcase's local changes are pushed.\n * @see [[BriefcaseConnection.pushChanges]].\n */\n public readonly onChangesPushed = new BeEvent<(parentChangeset: ChangesetIndexAndId) => void>();\n\n /** Event raised before pull merge process begins.\n * @alpha\n */\n public readonly onPullMergeBegin = new BeEvent<(changeset: ChangesetIdWithIndex) => void>();\n\n /** Event raised before a rebase operation begins.\n * @alpha\n */\n public readonly onRebaseBegin = new BeEvent<(txns: TxnProps[]) => void>();\n\n /** Event raised before a transaction is rebased.\n * @alpha\n */\n public readonly onRebaseTxnBegin = new BeEvent<(txnProps: TxnProps) => void>();\n\n /**\n * Event raised after a transaction is rebased.\n * @alpha\n */\n public readonly onRebaseTxnEnd = new BeEvent<(txnProps: TxnProps) => void>();\n\n /**\n * Event raised after a rebase operation ends.\n * @alpha\n */\n public readonly onRebaseEnd = new BeEvent<(txns: TxnProps[]) => void>();\n\n /**\n * Event raised after the pull merge process ends.\n * @alpha\n */\n public readonly onPullMergeEnd = new BeEvent<(changeset: ChangesetIdWithIndex) => void>();\n\n /** Event raised before incoming changes are applied.\n * @alpha\n */\n public readonly onApplyIncomingChangesBegin = new BeEvent<(changesets: ChangesetProps[]) => void>();\n\n /** Event raised after incoming changes are applied.\n * @alpha\n */\n public readonly onApplyIncomingChangesEnd = new BeEvent<(changes: ChangesetProps[]) => void>();\n\n /** Event raised before local changes are reversed.\n * @alpha\n */\n public readonly onReverseLocalChangesBegin = new BeEvent<() => void>();\n\n /** Event raised after local changes are reversed.\n * @alpha\n */\n public readonly onReverseLocalChangesEnd = new BeEvent<(txns: TxnProps[]) => void>();\n\n /** Event raised before downloading changesets begins.\n * @alpha\n */\n public readonly onDownloadChangesetsBegin = new BeEvent<() => void>();\n\n /** Event raised after downloading changesets ends.\n * @alpha\n */\n public readonly onDownloadChangesetsEnd = new BeEvent<() => void>();\n\n /** @internal */\n public constructor(iModel: BriefcaseConnection) {\n super(iModel.key);\n this._iModel = iModel;\n this._cleanup = this.registerImpl();\n }\n\n /** @internal */\n public [Symbol.dispose](): void {\n if (this._cleanup) {\n this._cleanup();\n this._cleanup = undefined;\n\n this.onAfterUndoRedo.clear();\n this.onApplyIncomingChangesBegin.clear();\n this.onApplyIncomingChangesEnd.clear();\n this.onBeforeUndoRedo.clear();\n this.onChangesApplied.clear();\n this.onChangesPulled.clear();\n this.onChangesPushed.clear();\n this.onCommit.clear();\n this.onCommitted.clear();\n this.onDownloadChangesetsBegin.clear();\n this.onDownloadChangesetsEnd.clear();\n this.onElementsChanged.clear();\n this.onModelGeometryChanged.clear();\n this.onModelsChanged.clear();\n this.onPullMergeBegin.clear();\n this.onPullMergeEnd.clear();\n this.onRebaseBegin.clear();\n this.onRebaseEnd.clear();\n this.onRebaseTxnBegin.clear();\n this.onRebaseTxnEnd.clear();\n this.onReverseLocalChangesBegin.clear();\n this.onReverseLocalChangesEnd.clear();\n }\n }\n\n /** Query if the briefcase has any pending Txns waiting to be pushed. */\n public async hasPendingTxns(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\n return IpcApp.appFunctionIpc.hasPendingTxns(this._iModel.key);\n }\n\n /** Determine if any reversible (undoable) changes exist.\n * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.\n */\n public async isUndoPossible(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\n return IpcApp.appFunctionIpc.isUndoPossible(this._iModel.key);\n }\n\n /** Determine if any reinstatable (redoable) changes exist.\n * @see [[reinstateTxn]] to redo changes.\n */\n public async isRedoPossible(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\n return IpcApp.appFunctionIpc.isRedoPossible(this._iModel.key);\n }\n\n /** Get the description of the operation that would be reversed by calling [[reverseTxns]]`(1)`.\n * This is useful for showing the operation that would be undone, for example in a menu.\n */\n public async getUndoString(): Promise<string> {\n return IpcApp.appFunctionIpc.getUndoString(this._iModel.key);\n }\n\n /** Get a description of the operation that would be reinstated by calling [[reinstateTxn]].\n * This is useful for showing the operation that would be redone, in a pull-down menu for example.\n */\n public async getRedoString(): Promise<string> {\n return IpcApp.appFunctionIpc.getRedoString(this._iModel.key);\n }\n\n /** Reverse (undo) the most recent operation.\n * @see [[reinstateTxn]] to redo operations.\n * @see [[reverseAll]] to undo all operations.\n * @see [[isUndoPossible]] to determine if any reversible operations exist.\n */\n public async reverseSingleTxn(): Promise<IModelStatus> {\n return this.reverseTxns(1);\n }\n\n /** Reverse (undo) the most recent operation(s) to the briefcase in the current session.\n * @param numOperations the number of operations to reverse. If this is greater than 1, the entire set of operations will\n * be reinstated together when/if [[reinstateTxn]] is called.\n * @note If there are any outstanding uncommitted changes, they are reversed.\n * @note The term \"operation\" is used rather than Txn, since multiple Txns can be grouped together via [TxnManager.beginMultiTxnOperation]($backend). So,\n * even if numOperations is 1, multiple Txns may be reversed if they were grouped together when they were made.\n * @note If numOperations is too large only the number of reversible operations are reversed.\n */\n public async reverseTxns(numOperations: number): Promise<IModelStatus> {\n return IpcApp.appFunctionIpc.reverseTxns(this._iModel.key, numOperations);\n }\n\n /** Reverse (undo) all changes back to the beginning of the session.\n * @see [[reinstateTxn]] to redo changes.\n * @see [[reverseSingleTxn]] to undo only the most recent operation.\n * @see [[isUndoPossible]] to determine if any reversible operations exist.\n */\n public async reverseAll(): Promise<IModelStatus> {\n return IpcApp.appFunctionIpc.reverseAllTxn(this._iModel.key);\n }\n\n /** Reinstate (redo) the most recently reversed transaction. Since at any time multiple transactions can be reversed, it\n * may take multiple calls to this method to reinstate all reversed operations.\n * @returns Success if a reversed transaction was reinstated, error status otherwise.\n * @note If there are any outstanding uncommitted changes, they are canceled before the Txn is reinstated.\n * @see [[isRedoPossible]] to determine if any reinstatable operations exist.\n * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.\n */\n public async reinstateTxn(): Promise<IModelStatus> {\n return IpcApp.appFunctionIpc.reinstateTxn(this._iModel.key);\n }\n\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\n * and reopened.)\n * @note This can be quite disconcerting to the user expecting to be able to undo previously made changes. It should only be used\n * under extreme circumstances where damage to the file or session could happen if the currently committed are reversed. Use sparingly and with care.\n * Probably a good idea to alert the user it happened.\n */\n public async restartTxnSession(): Promise<void> {\n await IpcApp.appFunctionIpc.restartTxnSession(this._iModel.key);\n }\n\n /** @internal */\n public notifyElementsChanged(changed: NotifyEntitiesChangedArgs): void {\n this.onElementsChanged.raiseEvent(new EntityChanges(changed));\n }\n\n /** @internal */\n public notifyModelsChanged(changed: NotifyEntitiesChangedArgs): void {\n this.onModelsChanged.raiseEvent(new EntityChanges(changed));\n }\n\n /** @internal */\n public notifyGeometryGuidsChanged(changes: ModelIdAndGeometryGuid[]): void {\n this.onModelGeometryChanged.raiseEvent(changes);\n }\n\n /** @internal */\n public notifyCommit() {\n this.onCommit.raiseEvent();\n }\n\n /** @internal */\n public notifyCommitted(hasPendingTxns: boolean, time: number) {\n this.onCommitted.raiseEvent(hasPendingTxns, time);\n }\n\n /** @internal */\n public notifyReplayExternalTxns() {\n this.onReplayExternalTxns.raiseEvent();\n }\n\n /** @internal */\n public notifyReplayedExternalTxns() {\n this.onReplayedExternalTxns.raiseEvent();\n }\n\n /** @internal */\n public notifyChangesApplied() {\n this.onChangesApplied.raiseEvent();\n }\n\n /** @internal */\n public notifyBeforeUndoRedo(isUndo: boolean) {\n this.onBeforeUndoRedo.raiseEvent(isUndo);\n }\n\n /** @internal */\n public notifyAfterUndoRedo(isUndo: boolean) {\n this.onAfterUndoRedo.raiseEvent(isUndo);\n }\n\n /** @internal */\n public notifyPulledChanges(parentChangeset: ChangesetIndexAndId) {\n this.onChangesPulled.raiseEvent(parentChangeset);\n }\n\n /** @internal */\n public notifyPushedChanges(parentChangeset: ChangesetIndexAndId) {\n this.onChangesPushed.raiseEvent(parentChangeset);\n }\n\n /** @internal */\n public notifyIModelNameChanged(name: string) {\n this._iModel.name = name;\n }\n\n /** @internal */\n public notifyRootSubjectChanged(subject: RootSubjectProps) {\n this._iModel.rootSubject = subject;\n }\n\n /** @internal */\n public notifyProjectExtentsChanged(range: Range3dProps) {\n this._iModel.projectExtents = Range3d.fromJSON(range);\n }\n\n /** @internal */\n public notifyGlobalOriginChanged(origin: XYZProps) {\n this._iModel.globalOrigin = Point3d.fromJSON(origin);\n }\n\n /** @internal */\n public notifyEcefLocationChanged(ecef: EcefLocationProps | undefined) {\n this._iModel.ecefLocation = ecef ? new EcefLocation(ecef) : undefined;\n }\n\n /** @internal */\n public notifyGeographicCoordinateSystemChanged(gcs: GeographicCRSProps | undefined) {\n this._iModel.geographicCoordinateSystem = gcs ? new GeographicCRS(gcs) : undefined;\n }\n\n /** @internal */\n public notifyPullMergeBegin(changeset: ChangesetIdWithIndex) {\n this.onPullMergeBegin.raiseEvent(changeset);\n }\n /** @internal */\n public notifyPullMergeEnd(changeset: ChangesetIdWithIndex) {\n this.onPullMergeEnd.raiseEvent(changeset);\n }\n /** @internal */\n public notifyApplyIncomingChangesBegin(changes: ChangesetProps[]) {\n this.onApplyIncomingChangesBegin.raiseEvent(changes);\n }\n /** @internal */\n public notifyApplyIncomingChangesEnd(changes: ChangesetProps[]) {\n this.onApplyIncomingChangesEnd.raiseEvent(changes);\n }\n /** @internal */\n public notifyReverseLocalChangesBegin() {\n this.onReverseLocalChangesBegin.raiseEvent();\n }\n /** @internal */\n public notifyReverseLocalChangesEnd(txns: TxnProps[]) {\n this.onReverseLocalChangesEnd.raiseEvent(txns);\n }\n /** @internal */\n public notifyDownloadChangesetsBegin() {\n this.onDownloadChangesetsBegin.raiseEvent();\n }\n /** @internal */\n public notifyDownloadChangesetsEnd() {\n this.onDownloadChangesetsEnd.raiseEvent();\n }\n /** @internal */\n public notifyRebaseBegin(txns: TxnProps[]) {\n this.onRebaseBegin.raiseEvent(txns);\n }\n /** @internal */\n public notifyRebaseEnd(txns: TxnProps[]) {\n this.onRebaseEnd.raiseEvent(txns);\n }\n /** @internal */\n public notifyRebaseTxnBegin(txn: TxnProps) {\n this.onRebaseTxnBegin.raiseEvent(txn);\n }\n /** @internal */\n public notifyRebaseTxnEnd(txn: TxnProps) {\n this.onRebaseTxnEnd.raiseEvent(txn);\n }\n}\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;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,mBAAmB;IACxD;IAApB,YAAoB,IAAY;QAAI,KAAK,EAAE,CAAC;QAAxB,SAAI,GAAJ,IAAI,CAAQ;IAAa,CAAC;IAE9C,IAAW,WAAW,KAAK,OAAO,GAAG,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;CACjF;AAED;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,4BAA4B;IAC5C,OAAO,CAAsB;IACtC,QAAQ,CAAkB;IAElC,gBAAgB;IAChB,IAAW,oBAAoB;QAC7B,OAAO,cAAc,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED;;OAEG;IACa,iBAAiB,GAAG,IAAI,OAAO,EAAuC,CAAC;IAEvF;;OAEG;IACa,eAAe,GAAG,IAAI,OAAO,EAAuC,CAAC;IA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AC;IACvD,CAAC;IACD,gBAAgB;IACT,6BAA6B,CAAC,OAAyB;QAC5D,IAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;IACD,gBAAgB;IACT,8BAA8B;QACnC,IAAI,CAAC,0BAA0B,CAAC,UAAU,EAAE,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":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelConnection\n */\n\nimport { BeEvent, IModelStatus } from \"@itwin/core-bentley\";\nimport {\n ChangesetIdWithIndex,\n ChangesetIndexAndId, ChangesetProps, EcefLocation, EcefLocationProps, GeographicCRS, GeographicCRSProps, ipcAppChannels,\n ModelIdAndGeometryGuid, NotifyEntitiesChangedArgs, ReinstateTxnArgs, RemoveFunction, ReverseTxnArgs, RootSubjectProps, TxnNotifications,\n TxnProps,\n} from \"@itwin/core-common\";\nimport { Point3d, Range3d, Range3dProps, XYZProps } from \"@itwin/core-geometry\";\nimport { BriefcaseConnection } from \"./BriefcaseConnection\";\nimport { IpcApp, NotificationHandler } from \"./IpcApp\";\nimport { EntityChanges, TxnEntityChanges } from \"./TxnEntityChanges\";\n\n/**\n * Base class for notification handlers for events from the backend that are specific to a [[BriefcaseConnection]].\n * @see [[BriefcaseTxns]].\n * @public\n */\nexport abstract class BriefcaseNotificationHandler extends NotificationHandler {\n constructor(private _key: string) { super(); }\n public abstract get briefcaseChannelName(): string;\n public get channelName() { return `${this.briefcaseChannelName}/${this._key}`; }\n}\n\n/** Manages local changes to a [[BriefcaseConnection]] via [Txns]($docs/learning/InteractiveEditing.md).\n * @see [[BriefcaseConnection.txns]].\n * @see [TxnManager]($backend) for the backend counterpart.\n * @public\n */\nexport class BriefcaseTxns extends BriefcaseNotificationHandler implements TxnNotifications {\n private readonly _iModel: BriefcaseConnection;\n private _cleanup?: RemoveFunction;\n\n /** @internal */\n public get briefcaseChannelName() {\n return ipcAppChannels.txns;\n }\n\n /** Event raised after Txn validation or changeset application to indicate the set of changed elements.\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.\n */\n public readonly onElementsChanged = new BeEvent<(changes: TxnEntityChanges) => void>();\n\n /** Event raised after Txn validation or changeset application to indicate the set of changed models.\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.\n */\n public readonly onModelsChanged = new BeEvent<(changes: TxnEntityChanges) => void>();\n\n /** Event raised after the geometry within one or more [[GeometricModelState]]s is modified by applying a changeset or validation of a transaction.\n * A model's geometry can change as a result of:\n * - Insertion or deletion of a geometric element within the model; or\n * - Modification of an existing element's geometric properties; or\n * - An explicit request to flag it as changed via [IModelDb.Models.updateModel]($backend).\n */\n public readonly onModelGeometryChanged = new BeEvent<(changes: ReadonlyArray<ModelIdAndGeometryGuid>) => void>();\n\n /** Event raised before a commit operation is performed. Initiated by a call to [[BriefcaseConnection.saveChanges]], unless there are no changes to save.\n * @see [[onCommitted]] for the event raised after the operation.\n */\n public readonly onCommit = new BeEvent<() => void>();\n\n /** Event raised after a commit operation is performed. Initiated by a call to [[BriefcaseConnection.saveChanges]], even if there were no changes to save.\n * The event supplies the following information:\n * - `hasPendingTxns`: true if the briefcase has local changes not yet pushed to the server.\n * - `time`: the time at which changes were saved on the backend (obtained via `Date.now()`).\n * @see [[onCommit]] for the event raised before the operation.\n */\n public readonly onCommitted = new BeEvent<(hasPendingTxns: boolean, time: number) => void>();\n\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.\n * @see [[onReplayedExternalTxns]] for the event raised after all such changes have been applied.\n */\n public readonly onReplayExternalTxns = new BeEvent<() => void>();\n\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.\n * @see [[onReplayExternalTxns]] for the event raised before the changes are applied.\n */\n public readonly onReplayedExternalTxns = new BeEvent<() => void>();\n\n /** Event raised after a changeset has been applied to the briefcase.\n * Changesets may be applied as a result of [[BriefcaseConnection.pullChanges]], or by undo/redo operations.\n */\n public readonly onChangesApplied = new BeEvent<() => void>();\n\n /** Event raised before an undo/redo operation is performed.\n * @see [[onAfterUndoRedo]] for the event raised after the operation.\n */\n public readonly onBeforeUndoRedo = new BeEvent<(isUndo: boolean) => void>();\n\n /** Event raised after an undo/redo operation is performed.\n * @see [[onBeforeUndoRedo]] for the event raised before to the operation.\n */\n public readonly onAfterUndoRedo = new BeEvent<(isUndo: boolean) => void>();\n\n /** Event raised after changes are pulled and merged into the briefcase.\n * @see [[BriefcaseConnection.pullAndMergeChanges]].\n */\n public readonly onChangesPulled = new BeEvent<(parentChangeset: ChangesetIndexAndId) => void>();\n\n /** Event raised after the briefcase's local changes are pushed.\n * @see [[BriefcaseConnection.pushChanges]].\n */\n public readonly onChangesPushed = new BeEvent<(parentChangeset: ChangesetIndexAndId) => void>();\n\n /** Event raised before pull merge process begins.\n * @alpha\n */\n public readonly onPullMergeBegin = new BeEvent<(changeset: ChangesetIdWithIndex) => void>();\n\n /** Event raised before a rebase operation begins.\n * @alpha\n */\n public readonly onRebaseBegin = new BeEvent<(txns: TxnProps[]) => void>();\n\n /** Event raised before a transaction is rebased.\n * @alpha\n */\n public readonly onRebaseTxnBegin = new BeEvent<(txnProps: TxnProps) => void>();\n\n /**\n * Event raised after a transaction is rebased.\n * @alpha\n */\n public readonly onRebaseTxnEnd = new BeEvent<(txnProps: TxnProps) => void>();\n\n /**\n * Event raised after a rebase operation ends.\n * @alpha\n */\n public readonly onRebaseEnd = new BeEvent<(txns: TxnProps[]) => void>();\n\n /**\n * Event raised after the pull merge process ends.\n * @alpha\n */\n public readonly onPullMergeEnd = new BeEvent<(changeset: ChangesetIdWithIndex) => void>();\n\n /** Event raised before incoming changes are applied.\n * @alpha\n */\n public readonly onApplyIncomingChangesBegin = new BeEvent<(changesets: ChangesetProps[]) => void>();\n\n /** Event raised after incoming changes are applied.\n * @alpha\n */\n public readonly onApplyIncomingChangesEnd = new BeEvent<(changes: ChangesetProps[]) => void>();\n\n /** Event raised before local changes are reversed.\n * @alpha\n */\n public readonly onReverseLocalChangesBegin = new BeEvent<() => void>();\n\n /** Event raised after local changes are reversed.\n * @alpha\n */\n public readonly onReverseLocalChangesEnd = new BeEvent<(txns: TxnProps[]) => void>();\n\n /** Event raised before downloading changesets begins.\n * @alpha\n */\n public readonly onDownloadChangesetsBegin = new BeEvent<() => void>();\n\n /** Event raised after downloading changesets ends.\n * @alpha\n */\n public readonly onDownloadChangesetsEnd = new BeEvent<() => void>();\n\n /** @internal */\n public constructor(iModel: BriefcaseConnection) {\n super(iModel.key);\n this._iModel = iModel;\n this._cleanup = this.registerImpl();\n }\n\n /** @internal */\n public [Symbol.dispose](): void {\n if (this._cleanup) {\n this._cleanup();\n this._cleanup = undefined;\n\n this.onAfterUndoRedo.clear();\n this.onApplyIncomingChangesBegin.clear();\n this.onApplyIncomingChangesEnd.clear();\n this.onBeforeUndoRedo.clear();\n this.onChangesApplied.clear();\n this.onChangesPulled.clear();\n this.onChangesPushed.clear();\n this.onCommit.clear();\n this.onCommitted.clear();\n this.onDownloadChangesetsBegin.clear();\n this.onDownloadChangesetsEnd.clear();\n this.onElementsChanged.clear();\n this.onModelGeometryChanged.clear();\n this.onModelsChanged.clear();\n this.onPullMergeBegin.clear();\n this.onPullMergeEnd.clear();\n this.onRebaseBegin.clear();\n this.onRebaseEnd.clear();\n this.onRebaseTxnBegin.clear();\n this.onRebaseTxnEnd.clear();\n this.onReverseLocalChangesBegin.clear();\n this.onReverseLocalChangesEnd.clear();\n }\n }\n\n /** Query if the briefcase has any pending Txns waiting to be pushed. */\n public async hasPendingTxns(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\n return IpcApp.appFunctionIpc.hasPendingTxns(this._iModel.key);\n }\n\n /** Determine if any reversible (undoable) changes exist.\n * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.\n */\n public async isUndoPossible(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\n return IpcApp.appFunctionIpc.isUndoPossible(this._iModel.key);\n }\n\n /** Determine if any reinstatable (redoable) changes exist.\n * @see [[reinstateTxn]] to redo changes.\n */\n public async isRedoPossible(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\n return IpcApp.appFunctionIpc.isRedoPossible(this._iModel.key);\n }\n\n /** Get the description of the operation that would be reversed by calling [[reverseTxns]]`(1)`.\n * This is useful for showing the operation that would be undone, for example in a menu.\n */\n public async getUndoString(): Promise<string> {\n return IpcApp.appFunctionIpc.getUndoString(this._iModel.key);\n }\n\n /** Get a description of the operation that would be reinstated by calling [[reinstateTxn]].\n * This is useful for showing the operation that would be redone, in a pull-down menu for example.\n */\n public async getRedoString(): Promise<string> {\n return IpcApp.appFunctionIpc.getRedoString(this._iModel.key);\n }\n\n /** Reverse (undo) the most recent operation.\n * @see [[reinstateTxn]] to redo operations.\n * @see [[reverseAll]] to undo all operations.\n * @see [[isUndoPossible]] to determine if any reversible operations exist.\n */\n public async reverseSingleTxn(): Promise<IModelStatus> {\n return this.reverseTxns(1);\n }\n\n /** Reverse (undo) the most recent operation to this briefcase in the current session. By default, this method also\n * abandons the locks that were acquired for that operation.\n * @beta\n * @note This method will also abandon locks associated with any later, reversed Txns, if they have not\n * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning\n * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated\n * with _both_ Txn 1 and Txn 2.\n * @note If there are any outstanding uncommitted changes, they are reversed.\n * @note The term \"operation\" is used rather than Txn, since multiple Txns can be grouped together via [TxnManager.beginMultiTxnOperation]($backend). So,\n * even though this method reverses only one operation, multiple Txns may be reversed if they were grouped together when they were made.\n * @note If there are no reversible operations, this method does nothing and returns Success.\n * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.\n * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.\n */\n public async reverseSingleTxnAsync(args?: ReverseTxnArgs): Promise<void> {\n await this.reverseTxnsAsync(1, args);\n }\n\n /** Reverse (undo) the most recent operation(s) to the briefcase in the current session.\n * @param numOperations the number of operations to reverse. If this is greater than 1, the entire set of operations will\n * be reinstated together when/if [[reinstateTxn]] is called.\n * @note If there are any outstanding uncommitted changes, they are reversed.\n * @note The term \"operation\" is used rather than Txn, since multiple Txns can be grouped together via [TxnManager.beginMultiTxnOperation]($backend). So,\n * even if numOperations is 1, multiple Txns may be reversed if they were grouped together when they were made.\n * @note If numOperations is too large only the number of reversible operations are reversed.\n */\n public async reverseTxns(numOperations: number): Promise<IModelStatus> {\n return IpcApp.appFunctionIpc.reverseTxns(this._iModel.key, numOperations);\n }\n\n /** Reverse (undo) the most recent operation(s) to the briefcase in the current session. By default, this method also\n * abandons the locks that were acquired for those operations.\n * @beta\n * @note This method will also abandon locks associated with any later, reversed Txns, if they have not\n * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning\n * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated\n * with _both_ Txn 1 and Txn 2.\n * @note If you do not want to abandon any locks, set [ReverseTxnArgs.retainLocks]($common) to true.\n * @note If there are any outstanding uncommitted changes, they are reversed.\n * @note The term \"operation\" is used rather than Txn, since multiple Txns can be grouped together via [[beginMultiTxnOperation]]. So,\n * even if numOperations is 1, multiple Txns may be reversed if they were grouped together when they were made.\n * @note If numOperations is too large only the operations are reversible are reversed.\n * @param numOperations the number of operations to reverse. If this is greater than 1, the entire set of operations will\n * be reinstated together when/if ReinstateTxn is called.\n * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.\n * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.\n */\n public async reverseTxnsAsync(numOperations: number, args?: ReverseTxnArgs): Promise<void> {\n return IpcApp.appFunctionIpc.reverseTxnsAsync(this._iModel.key, numOperations, args);\n }\n\n /** Reverse (undo) all changes back to the beginning of the session.\n * @see [[reinstateTxn]] to redo changes.\n * @see [[reverseSingleTxn]] to undo only the most recent operation.\n * @see [[isUndoPossible]] to determine if any reversible operations exist.\n */\n public async reverseAll(): Promise<IModelStatus> {\n return IpcApp.appFunctionIpc.reverseAllTxn(this._iModel.key);\n }\n\n /** Reverse (undo) all operations back to the beginning of the session. By default, this method also\n * abandons the locks that were acquired for those operations.\n * @beta\n * @note This method will also abandon locks associated with any later, reversed Txns, if they have not\n * already been abandoned. For example, if a call to [[reverseTxns]] reverses Txn 2 without abandoning\n * its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated\n * with _both_ Txn 1 and Txn 2.\n * @note If there are any outstanding uncommitted changes, they are reversed.\n * @note If there are no reversible operations, this method does nothing and returns Success.\n * @param args Optional arguments to control the behavior of the reverse operation, such as whether to retain locks.\n * @returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.\n */\n public async reverseAllTxnsAsync(args?: ReverseTxnArgs): Promise<void> {\n return IpcApp.appFunctionIpc.reverseAllTxnsAsync(this._iModel.key, args);\n }\n\n /** Reinstate (redo) the most recently reversed transaction. Since at any time multiple transactions can be reversed, it\n * may take multiple calls to this method to reinstate all reversed operations.\n * @returns Success if a reversed transaction was reinstated, error status otherwise.\n * @note If there are any outstanding uncommitted changes, they are canceled before the Txn is reinstated.\n * @see [[isRedoPossible]] to determine if any reinstatable operations exist.\n * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.\n */\n public async reinstateTxn(): Promise<IModelStatus> {\n return IpcApp.appFunctionIpc.reinstateTxn(this._iModel.key);\n }\n\n /** Reinstate (redo) the most recently reversed transaction. Since at any time multiple transactions can be reversed, it\n * may take multiple calls to this method to reinstate all reversed operations. This method also\n * re-acquires the locks that were abandoned when those operations were reversed.\n * @beta\n * @param args Optional arguments to control the behavior of the reinstate operation.\n * @returns Success if a reversed transaction was reinstated, error status otherwise.\n * @note If there are any outstanding uncommitted changes, they are canceled before the Txn is reinstated.\n * @see [[isRedoPossible]] to determine if any reinstatable operations exist.\n * @see [[reverseSingleTxn]] or [[reverseAll]] to undo changes.\n */\n public async reinstateTxnAsync(args?: ReinstateTxnArgs): Promise<void> {\n return IpcApp.appFunctionIpc.reinstateTxnAsync(this._iModel.key, args);\n }\n\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\n * and reopened.)\n * @note This can be quite disconcerting to the user expecting to be able to undo previously made changes. It should only be used\n * under extreme circumstances where damage to the file or session could happen if the currently committed are reversed. Use sparingly and with care.\n * Probably a good idea to alert the user it happened.\n */\n public async restartTxnSession(): Promise<void> {\n await IpcApp.appFunctionIpc.restartTxnSession(this._iModel.key);\n }\n\n /** @internal */\n public notifyElementsChanged(changed: NotifyEntitiesChangedArgs): void {\n this.onElementsChanged.raiseEvent(new EntityChanges(changed));\n }\n\n /** @internal */\n public notifyModelsChanged(changed: NotifyEntitiesChangedArgs): void {\n this.onModelsChanged.raiseEvent(new EntityChanges(changed));\n }\n\n /** @internal */\n public notifyGeometryGuidsChanged(changes: ModelIdAndGeometryGuid[]): void {\n this.onModelGeometryChanged.raiseEvent(changes);\n }\n\n /** @internal */\n public notifyCommit() {\n this.onCommit.raiseEvent();\n }\n\n /** @internal */\n public notifyCommitted(hasPendingTxns: boolean, time: number) {\n this.onCommitted.raiseEvent(hasPendingTxns, time);\n }\n\n /** @internal */\n public notifyReplayExternalTxns() {\n this.onReplayExternalTxns.raiseEvent();\n }\n\n /** @internal */\n public notifyReplayedExternalTxns() {\n this.onReplayedExternalTxns.raiseEvent();\n }\n\n /** @internal */\n public notifyChangesApplied() {\n this.onChangesApplied.raiseEvent();\n }\n\n /** @internal */\n public notifyBeforeUndoRedo(isUndo: boolean) {\n this.onBeforeUndoRedo.raiseEvent(isUndo);\n }\n\n /** @internal */\n public notifyAfterUndoRedo(isUndo: boolean) {\n this.onAfterUndoRedo.raiseEvent(isUndo);\n }\n\n /** @internal */\n public notifyPulledChanges(parentChangeset: ChangesetIndexAndId) {\n this.onChangesPulled.raiseEvent(parentChangeset);\n }\n\n /** @internal */\n public notifyPushedChanges(parentChangeset: ChangesetIndexAndId) {\n this.onChangesPushed.raiseEvent(parentChangeset);\n }\n\n /** @internal */\n public notifyIModelNameChanged(name: string) {\n this._iModel.name = name;\n }\n\n /** @internal */\n public notifyRootSubjectChanged(subject: RootSubjectProps) {\n this._iModel.rootSubject = subject;\n }\n\n /** @internal */\n public notifyProjectExtentsChanged(range: Range3dProps) {\n this._iModel.projectExtents = Range3d.fromJSON(range);\n }\n\n /** @internal */\n public notifyGlobalOriginChanged(origin: XYZProps) {\n this._iModel.globalOrigin = Point3d.fromJSON(origin);\n }\n\n /** @internal */\n public notifyEcefLocationChanged(ecef: EcefLocationProps | undefined) {\n this._iModel.ecefLocation = ecef ? new EcefLocation(ecef) : undefined;\n }\n\n /** @internal */\n public notifyGeographicCoordinateSystemChanged(gcs: GeographicCRSProps | undefined) {\n this._iModel.geographicCoordinateSystem = gcs ? new GeographicCRS(gcs) : undefined;\n }\n\n /** @internal */\n public notifyPullMergeBegin(changeset: ChangesetIdWithIndex) {\n this.onPullMergeBegin.raiseEvent(changeset);\n }\n /** @internal */\n public notifyPullMergeEnd(changeset: ChangesetIdWithIndex) {\n this.onPullMergeEnd.raiseEvent(changeset);\n }\n /** @internal */\n public notifyApplyIncomingChangesBegin(changes: ChangesetProps[]) {\n this.onApplyIncomingChangesBegin.raiseEvent(changes);\n }\n /** @internal */\n public notifyApplyIncomingChangesEnd(changes: ChangesetProps[]) {\n this.onApplyIncomingChangesEnd.raiseEvent(changes);\n }\n /** @internal */\n public notifyReverseLocalChangesBegin() {\n this.onReverseLocalChangesBegin.raiseEvent();\n }\n /** @internal */\n public notifyReverseLocalChangesEnd(txns: TxnProps[]) {\n this.onReverseLocalChangesEnd.raiseEvent(txns);\n }\n /** @internal */\n public notifyDownloadChangesetsBegin() {\n this.onDownloadChangesetsBegin.raiseEvent();\n }\n /** @internal */\n public notifyDownloadChangesetsEnd() {\n this.onDownloadChangesetsEnd.raiseEvent();\n }\n /** @internal */\n public notifyRebaseBegin(txns: TxnProps[]) {\n this.onRebaseBegin.raiseEvent(txns);\n }\n /** @internal */\n public notifyRebaseEnd(txns: TxnProps[]) {\n this.onRebaseEnd.raiseEvent(txns);\n }\n /** @internal */\n public notifyRebaseTxnBegin(txn: TxnProps) {\n this.onRebaseTxnBegin.raiseEvent(txn);\n }\n /** @internal */\n public notifyRebaseTxnEnd(txn: TxnProps) {\n this.onRebaseTxnEnd.raiseEvent(txn);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolAdmin.d.ts","sourceRoot":"","sources":["../../../src/tools/ToolAdmin.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAA0B,OAAO,EAAqC,M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AO,GAAG,OAAO,CAAC,YAAY,CAAC;IAO1F,gBAAgB;IACH,yBAAyB,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,EAAE,OAAO,EAAE,cAAc,GAAG,SAAS;IAgBzG,iBAAiB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAO1C,eAAe,CAAC,YAAY,EAAE,OAAO,GAAG,IAAI;IAOnD,6EAA6E;IAC7E,IAAW,uBAAuB,IAAI,uBAAuB,CAAwC;IACrG,IAAW,uBAAuB,CAAC,YAAY,EAAE,uBAAuB,EAAiD;IAEzH,gBAAgB;IACH,aAAa;CAM3B;AAED;;;GAGG;AACH,qBAAa,mBAAmB;WACV,OAAO,CAAC,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;mBAa1D,MAAM;CA4F5B"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Tools
|
|
7
7
|
*/
|
|
8
|
-
import { AbandonedError, assert, BeEvent, BeTimePoint,
|
|
8
|
+
import { AbandonedError, assert, BeEvent, BeTimePoint, Logger } from "@itwin/core-bentley";
|
|
9
9
|
import { Matrix3d, Point2d, Point3d, Transform } from "@itwin/core-geometry";
|
|
10
10
|
import { Easing, NpcCenter } from "@itwin/core-common";
|
|
11
11
|
import { TentativeOrAccuSnap } from "../AccuSnap";
|
|
@@ -1241,7 +1241,7 @@ export class ToolAdmin {
|
|
|
1241
1241
|
const imodel = IModelApp.viewManager.selectedView?.view.iModel;
|
|
1242
1242
|
if (undefined === imodel || imodel.isReadonly || !imodel.isBriefcaseConnection())
|
|
1243
1243
|
return false;
|
|
1244
|
-
return
|
|
1244
|
+
return imodel.txns.reverseSingleTxnAsync().then(() => true).catch(() => false);
|
|
1245
1245
|
}
|
|
1246
1246
|
/** Called to redo previous data button for primitive tools or undo last write operation. */
|
|
1247
1247
|
async doRedoOperation() {
|
|
@@ -1254,7 +1254,7 @@ export class ToolAdmin {
|
|
|
1254
1254
|
const imodel = IModelApp.viewManager.selectedView?.view.iModel;
|
|
1255
1255
|
if (undefined === imodel || imodel.isReadonly || !imodel.isBriefcaseConnection())
|
|
1256
1256
|
return false;
|
|
1257
|
-
return
|
|
1257
|
+
return imodel.txns.reinstateTxnAsync().then(() => true).catch(() => false);
|
|
1258
1258
|
}
|
|
1259
1259
|
onActiveToolChanged(tool, start) {
|
|
1260
1260
|
this.clearMotionPromises();
|