@itwin/core-frontend 5.13.0-dev.18 → 5.13.0-dev.20

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 (38) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/lib/cjs/BriefcaseTxns.d.ts +9 -0
  3. package/lib/cjs/BriefcaseTxns.d.ts.map +1 -1
  4. package/lib/cjs/BriefcaseTxns.js +9 -0
  5. package/lib/cjs/BriefcaseTxns.js.map +1 -1
  6. package/lib/cjs/EmphasizeElements.d.ts +4 -1
  7. package/lib/cjs/EmphasizeElements.d.ts.map +1 -1
  8. package/lib/cjs/EmphasizeElements.js +16 -9
  9. package/lib/cjs/EmphasizeElements.js.map +1 -1
  10. package/lib/cjs/TxnEntityChanges.d.ts +4 -18
  11. package/lib/cjs/TxnEntityChanges.d.ts.map +1 -1
  12. package/lib/cjs/TxnEntityChanges.js.map +1 -1
  13. package/lib/cjs/core-frontend.d.ts +7 -1
  14. package/lib/cjs/core-frontend.d.ts.map +1 -1
  15. package/lib/cjs/core-frontend.js.map +1 -1
  16. package/lib/cjs/internal/tile/map/WmsCapabilities.d.ts +2 -0
  17. package/lib/cjs/internal/tile/map/WmsCapabilities.d.ts.map +1 -1
  18. package/lib/cjs/internal/tile/map/WmsCapabilities.js +28 -6
  19. package/lib/cjs/internal/tile/map/WmsCapabilities.js.map +1 -1
  20. package/lib/esm/BriefcaseTxns.d.ts +9 -0
  21. package/lib/esm/BriefcaseTxns.d.ts.map +1 -1
  22. package/lib/esm/BriefcaseTxns.js +9 -0
  23. package/lib/esm/BriefcaseTxns.js.map +1 -1
  24. package/lib/esm/EmphasizeElements.d.ts +4 -1
  25. package/lib/esm/EmphasizeElements.d.ts.map +1 -1
  26. package/lib/esm/EmphasizeElements.js +16 -9
  27. package/lib/esm/EmphasizeElements.js.map +1 -1
  28. package/lib/esm/TxnEntityChanges.d.ts +4 -18
  29. package/lib/esm/TxnEntityChanges.d.ts.map +1 -1
  30. package/lib/esm/TxnEntityChanges.js.map +1 -1
  31. package/lib/esm/core-frontend.d.ts +7 -1
  32. package/lib/esm/core-frontend.d.ts.map +1 -1
  33. package/lib/esm/core-frontend.js.map +1 -1
  34. package/lib/esm/internal/tile/map/WmsCapabilities.d.ts +2 -0
  35. package/lib/esm/internal/tile/map/WmsCapabilities.d.ts.map +1 -1
  36. package/lib/esm/internal/tile/map/WmsCapabilities.js +28 -6
  37. package/lib/esm/internal/tile/map/WmsCapabilities.js.map +1 -1
  38. package/package.json +21 -21
@@ -1 +1 @@
1
- {"version":3,"file":"TxnEntityChanges.d.ts","sourceRoot":"","sources":["../../src/TxnEntityChanges.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,iDAAiD;IACjD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,EAAE,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAErE;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,8CAA8C;IAC9C,IAAI,EAAE,mBAAmB,CAAC;IAC1B,qCAAqC;IACrC,EAAE,EAAE,UAAU,CAAC;IACf,gEAAgE;IAChE,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,QAAQ,EAAE,iBAAiB,KAAK,OAAO,CAAC;AAElF;;;GAGG;AACH,MAAM,WAAW,6BAA6B;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4B;IAChC,QAAQ,CAAa;IAErC,YAAmB,IAA+B;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC9B,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;gBAC3C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAW,QAAQ,KAAoC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnF,IAAW,OAAO,KAAoC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACjF,IAAW,OAAO,KAAoC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAE1E,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtB,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAEM,MAAM,CAAC,OAAsC;QAClD,OAAO;YACL,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC;SAC9D,CAAC;IACJ,CAAC;CACF;AA7BD,sCA6BC","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 { CompressedId64Set, Id64String } from \"@itwin/core-bentley\";\r\nimport { NotifyEntitiesChangedArgs } from \"@itwin/core-common\";\r\n\r\n/** Describes the BIS class of a [[TxnEntityChange]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TxnEntityMetadata {\r\n /** The class's name in \"Schema:Class\" format. */\r\n readonly classFullName: string;\r\n\r\n /** Returns true if this class is or is derived from the specified class.\r\n * @note Class names are compared case-sensitively.\r\n */\r\n is(baseClassFullName: string): boolean;\r\n}\r\n\r\n/** The type of operation that produced a [[TxnEntityChange]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type TxnEntityChangeType = \"inserted\" | \"deleted\" | \"updated\";\r\n\r\n/** Represents a single change to a single [Entity]($backend), as part of a collection of [[TxnEntityChanges]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TxnEntityChange {\r\n /** The operation that produced the change. */\r\n type: TxnEntityChangeType;\r\n /** The Id of the affected entity. */\r\n id: Id64String;\r\n /** A representation of the BIS class of the affected entity. */\r\n metadata: TxnEntityMetadata;\r\n}\r\n\r\n/** A collection of [[TxnEntityChange]]s.\r\n * @public\r\n * @extensions\r\n */\r\nexport type TxnEntityChangeIterable = Iterable<Readonly<TxnEntityChange>>;\r\n\r\n/** A function that returns `true` if a particular BIS [Entity]($backend) class should be included when iterating a [[TxnEntityChangeIterable]].\r\n * For example, you may wish to include only elements deriving from \"BisCore:GeometricElement\", which you can determine by using [[TxnEntityMetadata.is]].\r\n * @see [[TxnEntityChangesFilterOptions.includeMetadata]] to supply such a criterion to [[TxnEntityChanges.filter]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type TxnEntityMetadataCriterion = (metadata: TxnEntityMetadata) => boolean;\r\n\r\n/** Options defining criteria by which to filter the contents of a [[TxnEntityChanges]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TxnEntityChangesFilterOptions {\r\n /** Permits filtering based on metadata. For example, you may wish to include only elements deriving from \"BisCore:GeometricElement\",\r\n * which you can determine by using [[TxnEntityMetadata.is]].\r\n * Only entities with metadata for which this function returns `true` will be included in the iteration.\r\n */\r\n includeMetadata?: TxnEntityMetadataCriterion;\r\n\r\n /** Permits filtering based on the type of change. For example, you may only care about newly-inserted entities, in which case you would specify `[\"inserted\"]`.\r\n * Only changes of the specified type(s) will be included in the iteration.\r\n */\r\n includeTypes?: TxnEntityChangeType[];\r\n}\r\n\r\n/** Describes a set of elements or models that were modified as part of a transaction in a [[BriefcaseConnection]],\r\n * serving as the payload for the [[BriefcaseTxns.onElementsChanged]] and [[BriefcaseTxns.onModelsChanged]] events.\r\n * The [[inserted]], [[deleted]], and [[updated]] compressed Id sets can be awkward to work with.\r\n * It can be more convenient to iterate over the individual [[TxnEntityChange]]s, especially if you wish to [[filter]] out some\r\n * changes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TxnEntityChanges extends TxnEntityChangeIterable {\r\n /** The ids of entities that were inserted during the Txn. */\r\n readonly inserted?: CompressedId64Set;\r\n /** The ids of entities that were deleted during the Txn. */\r\n readonly deleted?: CompressedId64Set;\r\n /** The ids of entities that were modified during the Txn, including any [Element]($backend)s for which one of their [ElementAspect]($backend)s was changed. */\r\n readonly updated?: CompressedId64Set;\r\n\r\n /** Obtain an iterator over changes meeting the criteria specified by `options`. */\r\n filter(options: TxnEntityChangesFilterOptions): TxnEntityChangeIterable;\r\n}\r\n\r\nexport class Metadata implements TxnEntityMetadata {\r\n public readonly classFullName: string;\r\n public readonly baseClasses: Metadata[] = [];\r\n\r\n public constructor(name: string) {\r\n this.classFullName = name;\r\n }\r\n\r\n public is(baseName: string): boolean {\r\n return baseName === this.classFullName || this.baseClasses.some((base) => base.is(baseName));\r\n }\r\n}\r\n\r\nfunction * entityChangesIterator(changes: EntityChanges, options?: TxnEntityChangesFilterOptions): Iterator<TxnEntityChange> {\r\n let excludedMetaIndices: Set<number> | undefined;\r\n if (options?.includeMetadata) {\r\n for (let i = 0; i < changes.metadata.length; i++) {\r\n if (!options.includeMetadata(changes.metadata[i])) {\r\n excludedMetaIndices = excludedMetaIndices ?? new Set<number>();\r\n excludedMetaIndices.add(i);\r\n }\r\n }\r\n }\r\n\r\n function * process(type: TxnEntityChangeType) {\r\n if (options?.includeTypes && !options.includeTypes.includes(type)) {\r\n return;\r\n }\r\n\r\n const ids = changes[type];\r\n if (undefined === ids) {\r\n return;\r\n }\r\n\r\n const metaIndices = changes.args[`${type}Meta`];\r\n let index = 0;\r\n for (const id of CompressedId64Set.iterable(ids)) {\r\n const metaIndex = metaIndices[index++];\r\n if (excludedMetaIndices && excludedMetaIndices.has(metaIndex)) {\r\n continue;\r\n }\r\n\r\n const metadata = changes.metadata[metaIndex];\r\n yield { type, id, metadata };\r\n }\r\n }\r\n\r\n yield* process(\"inserted\");\r\n yield* process(\"deleted\");\r\n yield* process(\"updated\");\r\n}\r\n\r\nexport class EntityChanges implements TxnEntityChanges {\r\n public readonly args: NotifyEntitiesChangedArgs;\r\n public readonly metadata: Metadata[];\r\n\r\n public constructor(args: NotifyEntitiesChangedArgs) {\r\n this.args = args;\r\n\r\n this.metadata = args.meta.map((x) => new Metadata(x.name));\r\n for (let i = 0; i < this.metadata.length; i++) {\r\n const meta = this.metadata[i];\r\n for (const baseIndex of args.meta[i].bases) {\r\n meta.baseClasses.push(this.metadata[baseIndex]);\r\n }\r\n }\r\n }\r\n\r\n public get inserted(): CompressedId64Set | undefined { return this.args.inserted; }\r\n public get deleted(): CompressedId64Set | undefined { return this.args.deleted; }\r\n public get updated(): CompressedId64Set | undefined { return this.args.updated; }\r\n\r\n public [Symbol.iterator](): Iterator<TxnEntityChange> {\r\n return entityChangesIterator(this);\r\n }\r\n\r\n public filter(options: TxnEntityChangesFilterOptions): TxnEntityChangeIterable {\r\n return {\r\n [Symbol.iterator]: () => entityChangesIterator(this, options),\r\n };\r\n }\r\n}\r\n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C,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;gBAC3C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAW,QAAQ,KAAoC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnF,IAAW,OAAO,KAAoC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACjF,IAAW,OAAO,KAAoC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAE1E,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtB,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAEM,MAAM,CAAC,OAAsC;QAClD,OAAO;YACL,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC;SAC9D,CAAC;IACJ,CAAC;CACF;AA7BD,sCA6BC","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 { CompressedId64Set, Id64String } from \"@itwin/core-bentley\";\r\nimport { NotifyEntitiesChangedArgs, TxnEntityMetadata } from \"@itwin/core-common\";\r\n\r\n/** The type of operation that produced a [[TxnEntityChange]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type TxnEntityChangeType = \"inserted\" | \"deleted\" | \"updated\";\r\n\r\n/** Represents a single change to a single [Entity]($backend), as part of a collection of [[TxnEntityChanges]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TxnEntityChange {\r\n /** The operation that produced the change. */\r\n type: TxnEntityChangeType;\r\n /** The Id of the affected entity. */\r\n id: Id64String;\r\n /** A representation of the BIS class of the affected entity. */\r\n metadata: TxnEntityMetadata;\r\n}\r\n\r\n/** A collection of [[TxnEntityChange]]s.\r\n * @public\r\n * @extensions\r\n */\r\nexport type TxnEntityChangeIterable = Iterable<Readonly<TxnEntityChange>>;\r\n\r\n/** A function that returns `true` if a particular BIS [Entity]($backend) class should be included when iterating a [[TxnEntityChangeIterable]].\r\n * For example, you may wish to include only elements deriving from \"BisCore:GeometricElement\", which you can determine by using [[TxnEntityMetadata.is]].\r\n * @see [[TxnEntityChangesFilterOptions.includeMetadata]] to supply such a criterion to [[TxnEntityChanges.filter]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type TxnEntityMetadataCriterion = (metadata: TxnEntityMetadata) => boolean;\r\n\r\n/** Options defining criteria by which to filter the contents of a [[TxnEntityChanges]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TxnEntityChangesFilterOptions {\r\n /** Permits filtering based on metadata. For example, you may wish to include only elements deriving from \"BisCore:GeometricElement\",\r\n * which you can determine by using [[TxnEntityMetadata.is]].\r\n * Only entities with metadata for which this function returns `true` will be included in the iteration.\r\n */\r\n includeMetadata?: TxnEntityMetadataCriterion;\r\n\r\n /** Permits filtering based on the type of change. For example, you may only care about newly-inserted entities, in which case you would specify `[\"inserted\"]`.\r\n * Only changes of the specified type(s) will be included in the iteration.\r\n */\r\n includeTypes?: TxnEntityChangeType[];\r\n}\r\n\r\n/** The frontend transaction-change payload for [[BriefcaseTxns.onElementsChanged]] and [[BriefcaseTxns.onModelsChanged]].\r\n * Iterate [[TxnEntityChange]]s to inspect their `id`, `type`, and [[TxnEntityChange.metadata]], or use [[filter]] to select by change type or class hierarchy.\r\n * Both payloads include metadata. Frontend changes also expose a per-change `type`, while backend changes are grouped into `inserts`, `deletes`, and `updates`; the compressed `inserted`, `deleted`, and `updated` sets remain available for bulk operations.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TxnEntityChanges extends TxnEntityChangeIterable {\r\n /** The ids of entities that were inserted during the Txn. */\r\n readonly inserted?: CompressedId64Set;\r\n /** The ids of entities that were deleted during the Txn. */\r\n readonly deleted?: CompressedId64Set;\r\n /** The ids of entities that were modified during the Txn, including any [Element]($backend)s for which one of their [ElementAspect]($backend)s was changed. */\r\n readonly updated?: CompressedId64Set;\r\n\r\n /** Obtain an iterator over changes meeting the criteria specified by `options`. */\r\n filter(options: TxnEntityChangesFilterOptions): TxnEntityChangeIterable;\r\n}\r\n\r\nexport class Metadata implements TxnEntityMetadata {\r\n public readonly classFullName: string;\r\n public readonly baseClasses: Metadata[] = [];\r\n\r\n public constructor(name: string) {\r\n this.classFullName = name;\r\n }\r\n\r\n public is(baseName: string): boolean {\r\n return baseName === this.classFullName || this.baseClasses.some((base) => base.is(baseName));\r\n }\r\n}\r\n\r\nfunction * entityChangesIterator(changes: EntityChanges, options?: TxnEntityChangesFilterOptions): Iterator<TxnEntityChange> {\r\n let excludedMetaIndices: Set<number> | undefined;\r\n if (options?.includeMetadata) {\r\n for (let i = 0; i < changes.metadata.length; i++) {\r\n if (!options.includeMetadata(changes.metadata[i])) {\r\n excludedMetaIndices = excludedMetaIndices ?? new Set<number>();\r\n excludedMetaIndices.add(i);\r\n }\r\n }\r\n }\r\n\r\n function * process(type: TxnEntityChangeType) {\r\n if (options?.includeTypes && !options.includeTypes.includes(type)) {\r\n return;\r\n }\r\n\r\n const ids = changes[type];\r\n if (undefined === ids) {\r\n return;\r\n }\r\n\r\n const metaIndices = changes.args[`${type}Meta`];\r\n let index = 0;\r\n for (const id of CompressedId64Set.iterable(ids)) {\r\n const metaIndex = metaIndices[index++];\r\n if (excludedMetaIndices && excludedMetaIndices.has(metaIndex)) {\r\n continue;\r\n }\r\n\r\n const metadata = changes.metadata[metaIndex];\r\n yield { type, id, metadata };\r\n }\r\n }\r\n\r\n yield* process(\"inserted\");\r\n yield* process(\"deleted\");\r\n yield* process(\"updated\");\r\n}\r\n\r\nexport class EntityChanges implements TxnEntityChanges {\r\n public readonly args: NotifyEntitiesChangedArgs;\r\n public readonly metadata: Metadata[];\r\n\r\n public constructor(args: NotifyEntitiesChangedArgs) {\r\n this.args = args;\r\n\r\n this.metadata = args.meta.map((x) => new Metadata(x.name));\r\n for (let i = 0; i < this.metadata.length; i++) {\r\n const meta = this.metadata[i];\r\n for (const baseIndex of args.meta[i].bases) {\r\n meta.baseClasses.push(this.metadata[baseIndex]);\r\n }\r\n }\r\n }\r\n\r\n public get inserted(): CompressedId64Set | undefined { return this.args.inserted; }\r\n public get deleted(): CompressedId64Set | undefined { return this.args.deleted; }\r\n public get updated(): CompressedId64Set | undefined { return this.args.updated; }\r\n\r\n public [Symbol.iterator](): Iterator<TxnEntityChange> {\r\n return entityChangesIterator(this);\r\n }\r\n\r\n public filter(options: TxnEntityChangesFilterOptions): TxnEntityChangeIterable {\r\n return {\r\n [Symbol.iterator]: () => entityChangesIterator(this, options),\r\n };\r\n }\r\n}\r\n"]}
@@ -1,3 +1,4 @@
1
+ import type { TxnEntityMetadata as _TxnEntityMetadata } from "@itwin/core-common";
1
2
  export * from "./AccuDraw";
2
3
  export * from "./AccuSnap";
3
4
  export * from "./AuxCoordSys";
@@ -99,7 +100,12 @@ export * from "./render/Scene";
99
100
  export * from "./render/ScreenSpaceEffectBuilder";
100
101
  export * from "./render/VisibleFeature";
101
102
  export * from "./internal/render/webgl/IModelFrameLifecycle";
102
- export type { TxnEntityChange, TxnEntityChangeIterable, TxnEntityChangeType, TxnEntityChanges, TxnEntityChangesFilterOptions, TxnEntityMetadata, TxnEntityMetadataCriterion, } from "./TxnEntityChanges";
103
+ export type { TxnEntityChange, TxnEntityChangeIterable, TxnEntityChangeType, TxnEntityChanges, TxnEntityChangesFilterOptions, TxnEntityMetadataCriterion, } from "./TxnEntityChanges";
104
+ /** Deprecated frontend alias for the common TxnEntityMetadata interface.
105
+ * @public
106
+ * @deprecated in 5.13.0. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.
107
+ */
108
+ export type TxnEntityMetadata = _TxnEntityMetadata;
103
109
  export { type TileTreeDiscloser, DisclosedTileTreeSet, type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf, readElementGraphics, type BatchTableProperties, RealityTileTree, type RealityTileGeometry, RealityTile, type RenderGraphicTileTreeArgs, type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin, type TileContent, type TiledGraphicsProvider, type TileDrawArgParams, TileDrawArgs, type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference, type GeometryTileTreeReferenceOptions, type TileParams, TileRequestChannels, type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel, TileRequest, type TileTreeOwner, type TileTreeParams, TileGraphicType, TileTreeReference, type TileTreeSupplier, TileTreeLoadStatus, TileTree, Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes, TileUsageMarker, TileUser, BingElevationProvider, QuadId, type QuadIdProps, MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme, type MapLayerIndex, MapTileProjection, MapTile, MapLayerTileTreeReference, MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources, MapLayerImageryProviderStatus, MapLayerImageryProvider, ImageryMapLayerFormat, MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry, type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient, type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord, MapCartoRectangle, ImageryMapLayerTreeReference, EllipsoidTerrainProvider, getCesiumAssetUrl, MapTileTreeScaleRangeVisibility, MapTileTree, type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider, type TerrainProvider, TerrainProviderRegistry, } from "./tile/internal";
104
110
  export * from "./tools/AccuDrawTool";
105
111
  export * from "./tools/AccuDrawViewportUI";
@@ -1 +1 @@
1
- {"version":3,"file":"core-frontend.d.ts","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":"AAKA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AACh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ACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,0BAA0B,CAAC;AAGzC,OAAO,8BAA8B,CAAC;AAEtC;;GAEG;AAEH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE"}
1
+ {"version":3,"file":"core-frontend.d.ts","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,IAAI,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAElF,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,e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;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE"}
@@ -1 +1 @@
1
- {"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;;AAE/F,6CAA2B;AAC3B,6CAA2B;AAC3B,gDAA8B;AAC9B,iDAA+B;AAC/B,wDAAsC;AACtC,iDAA+B;AAC/B,kDAAgC;AAChC,sDAAoC;AACpC,0DAAwC;AACxC,uDAAqC;AACrC,gDAA8B;AAC9B,yDAAuC;AACvC,2CAAyB;AACzB,6DAA2C;AAC3C,gDAA8B;AAC9B,qDAAmC;AACnC,6CAA2B;AAC3B,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC;AACvC,sDAAoC;AACpC,gDAA8B;AAC9B,2DAAyC;AACzC,4DAA0C;AAC1C,kDAAgC;AAChC,sDAAoC;AACpC,8CAA4B;AAC5B,oDAAkC;AAClC,gDAA8B;AAC9B,gDAA8B;AAC9B,kDAAgC;AAChC,0DAAwC;AACxC,8CAA4B;AAC5B,8CAA4B;AAC5B,qDAAmC;AACnC,yDAAuC;AACvC,2CAAyB;AACzB,uDAAqC;AACrC,kDAAgC;AAChC,2CAAyB;AACzB,uDAAqC;AACrC,+CAA6B;AAC7B,8CAA4B;AAC5B,oDAAkC;AAClC,gDAA8B;AAC9B,wDAAsC;AACtC,+DAA6C;AAC7C,wDAAsC;AACtC,iDAA+B;AAC/B,mDAAiC;AACjC,4DAA0C;AAC1C,qDAAmC;AACnC,4CAA0B;AAC1B,iDAA+B;AAC/B,uDAAqC;AACrC,mDAAiC;AACjC,0CAAwB;AACxB,oDAAkC;AAClC,kDAAgC;AAChC,gDAA8B;AAC9B,uDAAqC;AACrC,iDAA+B;AAC/B,gDAA8B;AAC9B,6C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GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./GeoProviders\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CatalogConnection\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./CesiumAccessClient\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./common\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialClassifiersState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewportSync\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./extension/Extension\";\r\nexport * from \"./extension/providers/LocalExtensionProvider\";\r\nexport * from \"./extension/providers/RemoteExtensionProvider\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./quantity-formatting/QuantityTypesEditorSpecs\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/CreateRenderMaterialArgs\";\r\nexport * from \"./render/CreateTextureArgs\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicTemplate\";\r\nexport * from \"./render/MeshArgs\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/PolylineArgs\";\r\nexport * from \"./render/RealityMeshParams\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./internal/render/webgl/IModelFrameLifecycle\";\r\nexport type {\r\n TxnEntityChange,\r\n TxnEntityChangeIterable,\r\n TxnEntityChangeType,\r\n TxnEntityChanges,\r\n TxnEntityChangesFilterOptions,\r\n TxnEntityMetadata,\r\n TxnEntityMetadataCriterion,\r\n} from \"./TxnEntityChanges\";\r\nexport {\r\n type TileTreeDiscloser, DisclosedTileTreeSet,\r\n type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf,\r\n readElementGraphics,\r\n type BatchTableProperties, RealityTileTree,\r\n type RealityTileGeometry, RealityTile,\r\n type RenderGraphicTileTreeArgs,\r\n type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin,\r\n type TileContent,\r\n type TiledGraphicsProvider,\r\n type TileDrawArgParams, TileDrawArgs,\r\n type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference,\r\n type GeometryTileTreeReferenceOptions,\r\n type TileParams,\r\n TileRequestChannels,\r\n type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel,\r\n TileRequest,\r\n type TileTreeOwner,\r\n type TileTreeParams,\r\n TileGraphicType, TileTreeReference,\r\n type TileTreeSupplier,\r\n TileTreeLoadStatus, TileTree,\r\n Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes,\r\n TileUsageMarker,\r\n TileUser,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n BingElevationProvider,\r\n QuadId, type QuadIdProps,\r\n MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme,\r\n type MapLayerIndex,\r\n MapTileProjection, MapTile,\r\n MapLayerTileTreeReference,\r\n MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources,\r\n MapLayerImageryProviderStatus, MapLayerImageryProvider,\r\n ImageryMapLayerFormat,\r\n MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry,\r\n type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient,\r\n type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord,\r\n MapCartoRectangle,\r\n ImageryMapLayerTreeReference,\r\n EllipsoidTerrainProvider,\r\n getCesiumAssetUrl,\r\n MapTileTreeScaleRangeVisibility, MapTileTree,\r\n type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider,\r\n type TerrainProvider, TerrainProviderRegistry,\r\n} from \"./tile/internal\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tools/AccuDrawViewportUI\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/SetupCameraTools\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./workers/RegisterWorker\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./request/utils\";\r\nexport * from \"./RealityDataSource\";\r\n\r\nexport * from \"./internal/cross-package\";\r\n\r\n// TODO/FIX: \"./extension/ExtensionRuntime\" import has to be last to avoid circular dependency errors.\r\nimport \"./extension/ExtensionRuntime\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing Extensions.\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n*/"]}
1
+ {"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;;AAI/F,6CAA2B;AAC3B,6CAA2B;AAC3B,gDAA8B;AAC9B,iDAA+B;AAC/B,wDAAsC;AACt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HAAA,6BAA6B,OAAA;AAAE,mHAAA,uBAAuB,OAAA;AACtD,iHAAA,qBAAqB,OAAA;AACrB,0GAAA,cAAc,OAAA;AAAyG,kHAAA,sBAAsB,OAAA;AAEjH,gHAAA,oBAAoB,OAAA;AAAiK,iHAAA,qBAAqB,OAAA;AACtO,6GAAA,iBAAiB,OAAA;AACjB,wHAAA,4BAA4B,OAAA;AAC5B,oHAAA,wBAAwB,OAAA;AACxB,6GAAA,iBAAiB,OAAA;AACjB,2HAAA,+BAA+B,OAAA;AAAE,uGAAA,WAAW,OAAA;AACkC,+GAAA,mBAAmB,OAAA;AAC3E,mHAAA,uBAAuB,OAAA;AAE/C,uDAAqC;AACrC,6DAA2C;AAC3C,uDAAqC;AACrC,0DAAwC;AACxC,yDAAuC;AACvC,0DAAwC;AACxC,mDAAiC;AACjC,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC;AACnC,2DAAyC;AACzC,+CAA6B;AAC7B,uDAAqC;AACrC,oDAAkC;AAClC,yDAAuC;AACvC,mDAAiC;AACjC,2DAAyC;AACzC,0DAAwC;AACxC,kDAAgC;AAChC,kDAAgC;AAChC,oDAAkC;AAClC,kDAAgC;AAChC,sDAAoC;AAEpC,2DAAyC;AAEzC,sGAAsG;AACtG,wCAAsC;AAEtC;;GAEG;AAEH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport type { TxnEntityMetadata as _TxnEntityMetadata } from \"@itwin/core-common\";\r\n\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./GeoProviders\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CatalogConnection\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./CesiumAccessClient\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./common\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialClassifiersState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewportSync\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./extension/Extension\";\r\nexport * from \"./extension/providers/LocalExtensionProvider\";\r\nexport * from \"./extension/providers/RemoteExtensionProvider\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./quantity-formatting/QuantityTypesEditorSpecs\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/CreateRenderMaterialArgs\";\r\nexport * from \"./render/CreateTextureArgs\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicTemplate\";\r\nexport * from \"./render/MeshArgs\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/PolylineArgs\";\r\nexport * from \"./render/RealityMeshParams\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./internal/render/webgl/IModelFrameLifecycle\";\r\nexport type {\r\n TxnEntityChange,\r\n TxnEntityChangeIterable,\r\n TxnEntityChangeType,\r\n TxnEntityChanges,\r\n TxnEntityChangesFilterOptions,\r\n TxnEntityMetadataCriterion,\r\n} from \"./TxnEntityChanges\";\r\n/** Deprecated frontend alias for the common TxnEntityMetadata interface.\r\n * @public\r\n * @deprecated in 5.13.0. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.\r\n */\r\nexport type TxnEntityMetadata = _TxnEntityMetadata;\r\nexport {\r\n type TileTreeDiscloser, DisclosedTileTreeSet,\r\n type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf,\r\n readElementGraphics,\r\n type BatchTableProperties, RealityTileTree,\r\n type RealityTileGeometry, RealityTile,\r\n type RenderGraphicTileTreeArgs,\r\n type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin,\r\n type TileContent,\r\n type TiledGraphicsProvider,\r\n type TileDrawArgParams, TileDrawArgs,\r\n type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference,\r\n type GeometryTileTreeReferenceOptions,\r\n type TileParams,\r\n TileRequestChannels,\r\n type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel,\r\n TileRequest,\r\n type TileTreeOwner,\r\n type TileTreeParams,\r\n TileGraphicType, TileTreeReference,\r\n type TileTreeSupplier,\r\n TileTreeLoadStatus, TileTree,\r\n Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes,\r\n TileUsageMarker,\r\n TileUser,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n BingElevationProvider,\r\n QuadId, type QuadIdProps,\r\n MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme,\r\n type MapLayerIndex,\r\n MapTileProjection, MapTile,\r\n MapLayerTileTreeReference,\r\n MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources,\r\n MapLayerImageryProviderStatus, MapLayerImageryProvider,\r\n ImageryMapLayerFormat,\r\n MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry,\r\n type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient,\r\n type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord,\r\n MapCartoRectangle,\r\n ImageryMapLayerTreeReference,\r\n EllipsoidTerrainProvider,\r\n getCesiumAssetUrl,\r\n MapTileTreeScaleRangeVisibility, MapTileTree,\r\n type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider,\r\n type TerrainProvider, TerrainProviderRegistry,\r\n} from \"./tile/internal\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tools/AccuDrawViewportUI\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/SetupCameraTools\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./workers/RegisterWorker\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./request/utils\";\r\nexport * from \"./RealityDataSource\";\r\n\r\nexport * from \"./internal/cross-package\";\r\n\r\n// TODO/FIX: \"./extension/ExtensionRuntime\" import has to be last to avoid circular dependency errors.\r\nimport \"./extension/ExtensionRuntime\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing Extensions.\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n*/"]}
@@ -52,6 +52,8 @@ export declare class WmsCapabilities {
52
52
  get featureInfoSupported(): boolean;
53
53
  get featureInfoFormats(): string[] | undefined;
54
54
  constructor(_json: any);
55
+ /** Parse a GetCapabilities XML response, returning undefined if it is not a valid WMS capabilities document. */
56
+ private static tryParse;
55
57
  static create(url: string, credentials?: RequestBasicCredentials, ignoreCache?: boolean, queryParams?: {
56
58
  [key: string]: string;
57
59
  }): Promise<WmsCapabilities | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"WmsCapabilities.d.ts","sourceRoot":"","sources":["../../../../../src/internal/tile/map/WmsC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154,7 @@ var WmsCapability;
154
154
  this.title = _json.Title;
155
155
  this.queryable = _json.queryable ? true : false;
156
156
  this.cartoRange = rangeFromJSON(_json);
157
- this.ownCrs = capabilities.isVersion13 ? _json.CRS : _json.SRS;
157
+ this.ownCrs = initArray(capabilities.isVersion13 ? _json.CRS : _json.SRS) ?? [];
158
158
  const crs = new Set(this.ownCrs);
159
159
  if (parent) {
160
160
  getParentCrs(parent, crs);
@@ -184,12 +184,32 @@ class WmsCapabilities {
184
184
  get featureInfoFormats() { return Array.isArray(this._json.Capability?.Request?.GetFeatureInfo?.Format) ? this._json.Capability?.Request?.GetFeatureInfo?.Format : undefined; }
185
185
  constructor(_json) {
186
186
  this._json = _json;
187
- this.version = _json.version;
188
- this.isVersion13 = _json.version !== undefined && 0 === _json.version.indexOf("1.3");
189
- this.service = new WmsCapability.Service(_json.Service);
190
- if (_json.Capability)
187
+ if (!_json || typeof _json !== "object" || (_json.Service === undefined && _json.Capability === undefined))
188
+ throw new Error("Invalid WMS GetCapabilities response");
189
+ this.version = typeof _json.version === "string" ? _json.version : undefined;
190
+ this.isVersion13 = this.version !== undefined && this.version.startsWith("1.3");
191
+ this.service = new WmsCapability.Service(_json.Service ?? {});
192
+ if (_json.Capability?.Layer)
191
193
  this.layer = new WmsCapability.Layer(_json.Capability.Layer, this);
192
194
  }
195
+ /** Parse a GetCapabilities XML response, returning undefined if it is not a valid WMS capabilities document. */
196
+ static tryParse(xmlCapabilities) {
197
+ // Validate the document is actually rooted at a WMS capabilities element before parsing:
198
+ // wms-capabilities happily parses any root and recognizes direct Service/Capability children.
199
+ // WMS 1.3.0 uses WMS_Capabilities; WMS 1.0.0-1.1.1 uses WMT_MS_Capabilities.
200
+ const doc = new DOMParser().parseFromString(xmlCapabilities, "text/xml");
201
+ const rootName = doc.documentElement?.localName;
202
+ if (rootName !== "WMS_Capabilities" && rootName !== "WMT_MS_Capabilities")
203
+ return undefined; // Not a WMS GetCapabilities document
204
+ if (doc.getElementsByTagName("parsererror").length > 0)
205
+ return undefined; // XML parse error (browsers embed a parsererror element)
206
+ try {
207
+ return new WmsCapabilities(new wms_capabilities_1.default(undefined, DOMParser).parse(xmlCapabilities));
208
+ }
209
+ catch {
210
+ return undefined; // Degenerate capabilities document
211
+ }
212
+ }
193
213
  static async create(url, credentials, ignoreCache, queryParams) {
194
214
  if (!ignoreCache) {
195
215
  const cached = WmsCapabilities._capabilitiesCache.get(url);
@@ -208,7 +228,9 @@ class WmsCapabilities {
208
228
  const xmlCapabilities = await internal_1.WmsUtilities.fetchXml(tmpUrl.toString(), credentials);
209
229
  if (!xmlCapabilities)
210
230
  return undefined;
211
- const capabilities = new WmsCapabilities(new wms_capabilities_1.default().parse(xmlCapabilities));
231
+ const capabilities = WmsCapabilities.tryParse(xmlCapabilities);
232
+ if (capabilities === undefined)
233
+ return undefined;
212
234
  if (!credentials) {
213
235
  // Avoid caching protected data
214
236
  WmsCapabilities._capabilitiesCache.set(url, capabilities);
@@ -1 +1 @@
1
- {"version":3,"file":"WmsCapabilities.js","sourceRoot":"","sources":["../../../../../src/internal/tile/map/WmsCapabilities.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;AAIH,wEAAmC;AACnC,qDAAyE;AAEzE,SAAS,kBAAkB,CAAC,IAAS;IACnC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,4BAAiB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACpI,CAAC;AAED,SAAS,aAAa,CAAC,IAAS;IAC9B,IAAI,SAAS,KAAK,IAAI,CAAC,iBAAiB;QACtC,OAAO,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,C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,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,CAAC;IAEM,eAAe,CAAC,aAAuB;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5E,CAAC;;AAtDH,0CAuDC","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 Views\r\n */\r\n\r\nimport { MapSubLayerProps } from \"@itwin/core-common\";\r\nimport { RequestBasicCredentials } from \"../../../request/Request\";\r\nimport WMS from \"wms-capabilities\";\r\nimport { MapCartoRectangle, WmsUtilities } from \"../../../tile/internal\";\r\n\r\nfunction rangeFromJSONArray(json: any): MapCartoRectangle | undefined {\r\n return (Array.isArray(json) && json.length === 4) ? MapCartoRectangle.fromDegrees(json[0], json[1], json[2], json[3]) : undefined;\r\n}\r\n\r\nfunction rangeFromJSON(json: any): MapCartoRectangle | undefined {\r\n if (undefined !== json.LatLonBoundingBox)\r\n return rangeFromJSONArray(json.LatLonBoundingBox);\r\n else if (Array.isArray(json.EX_GeographicBoundingBox)) {\r\n return rangeFromJSONArray(json.EX_GeographicBoundingBox);\r\n } else {\r\n if (Array.isArray(json.BoundingBox))\r\n for (const boundingBox of json.BoundingBox) {\r\n if (boundingBox.crs === \"CRS:84\" || boundingBox.crs === \"EPSG:4326\") {\r\n return rangeFromJSONArray(boundingBox.extent);\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\n\r\nfunction initArray<T>(input: any): undefined | T[] {\r\n return Array.isArray(input) ? input.slice() : undefined;\r\n}\r\n\r\n/** Encapsulation of the capabilities for an WMS server\r\n */\r\nexport namespace WmsCapability {\r\n\r\n export class Service {\r\n public readonly name: string;\r\n public readonly title?: string;\r\n public readonly abstract?: string;\r\n public readonly onlineResource?: string;\r\n public readonly contactInformation?: string;\r\n public readonly accessConstraints?: string;\r\n\r\n constructor(json: any) {\r\n this.name = json.Name ? json.Name : \"\";\r\n this.title = json.Title;\r\n this.abstract = json.Abstract;\r\n this.onlineResource = json.OnlineResource;\r\n this.contactInformation = json.ContactInformation;\r\n this.accessConstraints = json.AccessConstraints;\r\n }\r\n }\r\n\r\n export class Layer {\r\n public readonly queryable: boolean;\r\n public readonly title?: string;\r\n public readonly srs?: string[];\r\n public readonly cartoRange?: MapCartoRectangle;\r\n public readonly subLayers = new Array<SubLayer>();\r\n private static readonly PREFIX_SEPARATOR = \":\";\r\n\r\n constructor(json: any, capabilities: WmsCapabilities) {\r\n this.queryable = json.queryable;\r\n this.title = json.title;\r\n this.srs = initArray<string>(capabilities.isVersion13 ? json.CRS : json.SRS);\r\n this.cartoRange = rangeFromJSON(json);\r\n this.subLayers.push(new SubLayer(json, capabilities));\r\n }\r\n public getSubLayers(visible = true): MapSubLayerProps[] {\r\n const subLayers = new Array<MapSubLayerProps>();\r\n let index = 1;\r\n let childrenFound = false;\r\n const pushSubLayer = ((subLayer: SubLayer, parent?: number) => {\r\n let children;\r\n const id = index++;\r\n if (subLayer.children) {\r\n childrenFound = false;\r\n children = new Array<number>();\r\n subLayer.children.forEach((child) => {\r\n children.push(index);\r\n pushSubLayer(child, id);\r\n });\r\n }\r\n subLayers.push({ name: subLayer.name, title: subLayer.title, visible, parent, children, id });\r\n });\r\n this.subLayers.forEach((subLayer) => pushSubLayer(subLayer));\r\n\r\n if (!childrenFound) {\r\n const prefixed = new Map<string, MapSubLayerProps[]>();\r\n subLayers.forEach((subLayer) => {\r\n if (subLayer.name && subLayer.name.indexOf(Layer.PREFIX_SEPARATOR) > 0) {\r\n const prefix = subLayer.name.slice(0, subLayer.name.indexOf(Layer.PREFIX_SEPARATOR));\r\n const found = prefixed.get(prefix);\r\n if (found)\r\n found.push(subLayer);\r\n else\r\n prefixed.set(prefix, [subLayer]);\r\n }\r\n });\r\n if (prefixed.size > 1) {\r\n // Preserve the root node if any.\r\n const rootNode = (this.subLayers.length === 1 && this.subLayers[0].children && this.subLayers[0].children.length > 1) ? subLayers.find((curSubLayer) => this.subLayers[0].name === curSubLayer.name)?.id : undefined;\r\n prefixed.forEach((children, parent) => {\r\n children.forEach((child) => {\r\n child.parent = index;\r\n // Remove the prefix from the title if present.\r\n if (child.title && child.title.indexOf(parent + Layer.PREFIX_SEPARATOR) === 0)\r\n child.title = child.title.slice(parent.length + Layer.PREFIX_SEPARATOR.length);\r\n });\r\n subLayers.push({ name: \"\", title: parent, parent: rootNode, id: index++, children: children.map((child) => child.id as number), visible });\r\n });\r\n }\r\n }\r\n\r\n return subLayers;\r\n }\r\n\r\n public getSubLayersCrs(layerNameFilter: string[]): Map<string, string[]> {\r\n const subLayerCrs = new Map<string, string[]>();\r\n\r\n const processSubLayer = ((subLayer: SubLayer) => {\r\n if (layerNameFilter.includes(subLayer.name)) {\r\n subLayerCrs.set(subLayer.name, subLayer.crs);\r\n }\r\n if (subLayer.children) {\r\n subLayer.children.forEach((child) => {\r\n processSubLayer(child);\r\n });\r\n }\r\n });\r\n\r\n this.subLayers.forEach((subLayer) => processSubLayer(subLayer));\r\n return subLayerCrs;\r\n }\r\n }\r\n\r\n export class SubLayer {\r\n public readonly name: string;\r\n public readonly title: string;\r\n public readonly crs: string[];\r\n public readonly ownCrs: string[]; // CRS specific to this layer (ie. not including inherited CRS)\r\n public readonly cartoRange?: MapCartoRectangle;\r\n public readonly children?: SubLayer[];\r\n public readonly queryable: boolean;\r\n public constructor(_json: any, capabilities: WmsCapabilities, public readonly parent?: SubLayer) {\r\n\r\n const getParentCrs = (parentLayer: SubLayer, crsSet: Set<string>) => {\r\n parentLayer.crs.forEach((parentCrs) => crsSet.add(parentCrs));\r\n if (parentLayer.parent) {\r\n getParentCrs(parentLayer.parent, crsSet);\r\n }\r\n };\r\n\r\n this.name = _json.Name ? _json.Name : \"\";\r\n this.title = _json.Title;\r\n this.queryable = _json.queryable ? true : false;\r\n this.cartoRange = rangeFromJSON(_json);\r\n this.ownCrs = capabilities.isVersion13 ? _json.CRS : _json.SRS;\r\n const crs = new Set<string>(this.ownCrs);\r\n if (parent) {\r\n getParentCrs(parent, crs);\r\n }\r\n this.crs = [...crs];\r\n\r\n if (Array.isArray(_json.Layer)) {\r\n this.children = new Array<SubLayer>();\r\n for (const childLayer of _json.Layer) {\r\n this.children.push(new SubLayer(childLayer, capabilities, this));\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport class WmsCapabilities {\r\n private static _capabilitiesCache = new Map<string, WmsCapabilities | undefined>();\r\n public readonly service: WmsCapability.Service;\r\n public readonly version?: string;\r\n public readonly isVersion13: boolean;\r\n public readonly layer?: WmsCapability.Layer;\r\n public get json() { return this._json; }\r\n public get maxLevel(): number { return this.layer ? this.layer.subLayers.length : - 1; }\r\n public get cartoRange(): MapCartoRectangle | undefined { return this.layer?.cartoRange; }\r\n public get featureInfoSupported() { return undefined !== this._json.Capability?.Request?.GetFeatureInfo; }\r\n public get featureInfoFormats(): string[] | undefined { return Array.isArray(this._json.Capability?.Request?.GetFeatureInfo?.Format) ? this._json.Capability?.Request?.GetFeatureInfo?.Format : undefined; }\r\n constructor(private _json: any) {\r\n this.version = _json.version;\r\n this.isVersion13 = _json.version !== undefined && 0 === _json.version.indexOf(\"1.3\");\r\n this.service = new WmsCapability.Service(_json.Service);\r\n if (_json.Capability)\r\n this.layer = new WmsCapability.Layer(_json.Capability.Layer, this);\r\n }\r\n\r\n public static async create(url: string, credentials?: RequestBasicCredentials, ignoreCache?: boolean, queryParams?: {[key: string]: string}): Promise<WmsCapabilities | undefined> {\r\n if (!ignoreCache) {\r\n const cached = WmsCapabilities._capabilitiesCache.get(url);\r\n if (cached !== undefined)\r\n return cached;\r\n }\r\n\r\n const tmpUrl = new URL(WmsUtilities.getBaseUrl(url));\r\n tmpUrl.searchParams.append(\"request\", \"GetCapabilities\");\r\n tmpUrl.searchParams.append(\"service\", \"WMS\");\r\n if (queryParams) {\r\n Object.keys(queryParams).forEach((paramKey) => {\r\n if (!tmpUrl.searchParams.has(paramKey))\r\n tmpUrl.searchParams.append(paramKey, queryParams[paramKey]);\r\n });\r\n }\r\n const xmlCapabilities = await WmsUtilities.fetchXml(tmpUrl.toString(), credentials);\r\n\r\n if (!xmlCapabilities)\r\n return undefined;\r\n\r\n const capabilities = new WmsCapabilities(new WMS().parse(xmlCapabilities));\r\n if (!credentials) {\r\n // Avoid caching protected data\r\n WmsCapabilities._capabilitiesCache.set(url, capabilities);\r\n }\r\n\r\n return capabilities;\r\n }\r\n public getSubLayers(visible = true): undefined | MapSubLayerProps[] {\r\n return this.layer ? this.layer.getSubLayers(visible) : undefined;\r\n }\r\n\r\n public getSubLayersCrs(subLayerNames: string[]): Map<string, string[]> | undefined {\r\n return this.layer ? this.layer.getSubLayersCrs(subLayerNames) : undefined;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"WmsCapabilities.js","sourceRoot":"","sources":["../../../../../src/internal/tile/map/WmsCapabilities.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;AAIH,wEAAmC;AACnC,qDAAyE;AAEzE,SAAS,kBAAkB,CAAC,IAAS;IACnC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,4BAAiB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACpI,CAAC;AAED,SAAS,aAAa,CAAC,IAAS;IAC9B,IAAI,SAAS,KAAK,IAAI,CAAC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AuB;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5E,CAAC;;AA/EH,0CAgFC","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 Views\r\n */\r\n\r\nimport { MapSubLayerProps } from \"@itwin/core-common\";\r\nimport { RequestBasicCredentials } from \"../../../request/Request\";\r\nimport WMS from \"wms-capabilities\";\r\nimport { MapCartoRectangle, WmsUtilities } from \"../../../tile/internal\";\r\n\r\nfunction rangeFromJSONArray(json: any): MapCartoRectangle | undefined {\r\n return (Array.isArray(json) && json.length === 4) ? MapCartoRectangle.fromDegrees(json[0], json[1], json[2], json[3]) : undefined;\r\n}\r\n\r\nfunction rangeFromJSON(json: any): MapCartoRectangle | undefined {\r\n if (undefined !== json.LatLonBoundingBox)\r\n return rangeFromJSONArray(json.LatLonBoundingBox);\r\n else if (Array.isArray(json.EX_GeographicBoundingBox)) {\r\n return rangeFromJSONArray(json.EX_GeographicBoundingBox);\r\n } else {\r\n if (Array.isArray(json.BoundingBox))\r\n for (const boundingBox of json.BoundingBox) {\r\n if (boundingBox.crs === \"CRS:84\" || boundingBox.crs === \"EPSG:4326\") {\r\n return rangeFromJSONArray(boundingBox.extent);\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\n\r\nfunction initArray<T>(input: any): undefined | T[] {\r\n return Array.isArray(input) ? input.slice() : undefined;\r\n}\r\n\r\n/** Encapsulation of the capabilities for an WMS server\r\n */\r\nexport namespace WmsCapability {\r\n\r\n export class Service {\r\n public readonly name: string;\r\n public readonly title?: string;\r\n public readonly abstract?: string;\r\n public readonly onlineResource?: string;\r\n public readonly contactInformation?: string;\r\n public readonly accessConstraints?: string;\r\n\r\n constructor(json: any) {\r\n this.name = json.Name ? json.Name : \"\";\r\n this.title = json.Title;\r\n this.abstract = json.Abstract;\r\n this.onlineResource = json.OnlineResource;\r\n this.contactInformation = json.ContactInformation;\r\n this.accessConstraints = json.AccessConstraints;\r\n }\r\n }\r\n\r\n export class Layer {\r\n public readonly queryable: boolean;\r\n public readonly title?: string;\r\n public readonly srs?: string[];\r\n public readonly cartoRange?: MapCartoRectangle;\r\n public readonly subLayers = new Array<SubLayer>();\r\n private static readonly PREFIX_SEPARATOR = \":\";\r\n\r\n constructor(json: any, capabilities: WmsCapabilities) {\r\n this.queryable = json.queryable;\r\n this.title = json.title;\r\n this.srs = initArray<string>(capabilities.isVersion13 ? json.CRS : json.SRS);\r\n this.cartoRange = rangeFromJSON(json);\r\n this.subLayers.push(new SubLayer(json, capabilities));\r\n }\r\n public getSubLayers(visible = true): MapSubLayerProps[] {\r\n const subLayers = new Array<MapSubLayerProps>();\r\n let index = 1;\r\n let childrenFound = false;\r\n const pushSubLayer = ((subLayer: SubLayer, parent?: number) => {\r\n let children;\r\n const id = index++;\r\n if (subLayer.children) {\r\n childrenFound = false;\r\n children = new Array<number>();\r\n subLayer.children.forEach((child) => {\r\n children.push(index);\r\n pushSubLayer(child, id);\r\n });\r\n }\r\n subLayers.push({ name: subLayer.name, title: subLayer.title, visible, parent, children, id });\r\n });\r\n this.subLayers.forEach((subLayer) => pushSubLayer(subLayer));\r\n\r\n if (!childrenFound) {\r\n const prefixed = new Map<string, MapSubLayerProps[]>();\r\n subLayers.forEach((subLayer) => {\r\n if (subLayer.name && subLayer.name.indexOf(Layer.PREFIX_SEPARATOR) > 0) {\r\n const prefix = subLayer.name.slice(0, subLayer.name.indexOf(Layer.PREFIX_SEPARATOR));\r\n const found = prefixed.get(prefix);\r\n if (found)\r\n found.push(subLayer);\r\n else\r\n prefixed.set(prefix, [subLayer]);\r\n }\r\n });\r\n if (prefixed.size > 1) {\r\n // Preserve the root node if any.\r\n const rootNode = (this.subLayers.length === 1 && this.subLayers[0].children && this.subLayers[0].children.length > 1) ? subLayers.find((curSubLayer) => this.subLayers[0].name === curSubLayer.name)?.id : undefined;\r\n prefixed.forEach((children, parent) => {\r\n children.forEach((child) => {\r\n child.parent = index;\r\n // Remove the prefix from the title if present.\r\n if (child.title && child.title.indexOf(parent + Layer.PREFIX_SEPARATOR) === 0)\r\n child.title = child.title.slice(parent.length + Layer.PREFIX_SEPARATOR.length);\r\n });\r\n subLayers.push({ name: \"\", title: parent, parent: rootNode, id: index++, children: children.map((child) => child.id as number), visible });\r\n });\r\n }\r\n }\r\n\r\n return subLayers;\r\n }\r\n\r\n public getSubLayersCrs(layerNameFilter: string[]): Map<string, string[]> {\r\n const subLayerCrs = new Map<string, string[]>();\r\n\r\n const processSubLayer = ((subLayer: SubLayer) => {\r\n if (layerNameFilter.includes(subLayer.name)) {\r\n subLayerCrs.set(subLayer.name, subLayer.crs);\r\n }\r\n if (subLayer.children) {\r\n subLayer.children.forEach((child) => {\r\n processSubLayer(child);\r\n });\r\n }\r\n });\r\n\r\n this.subLayers.forEach((subLayer) => processSubLayer(subLayer));\r\n return subLayerCrs;\r\n }\r\n }\r\n\r\n export class SubLayer {\r\n public readonly name: string;\r\n public readonly title: string;\r\n public readonly crs: string[];\r\n public readonly ownCrs: string[]; // CRS specific to this layer (ie. not including inherited CRS)\r\n public readonly cartoRange?: MapCartoRectangle;\r\n public readonly children?: SubLayer[];\r\n public readonly queryable: boolean;\r\n public constructor(_json: any, capabilities: WmsCapabilities, public readonly parent?: SubLayer) {\r\n\r\n const getParentCrs = (parentLayer: SubLayer, crsSet: Set<string>) => {\r\n parentLayer.crs.forEach((parentCrs) => crsSet.add(parentCrs));\r\n if (parentLayer.parent) {\r\n getParentCrs(parentLayer.parent, crsSet);\r\n }\r\n };\r\n\r\n this.name = _json.Name ? _json.Name : \"\";\r\n this.title = _json.Title;\r\n this.queryable = _json.queryable ? true : false;\r\n this.cartoRange = rangeFromJSON(_json);\r\n this.ownCrs = initArray<string>(capabilities.isVersion13 ? _json.CRS : _json.SRS) ?? [];\r\n const crs = new Set<string>(this.ownCrs);\r\n if (parent) {\r\n getParentCrs(parent, crs);\r\n }\r\n this.crs = [...crs];\r\n\r\n if (Array.isArray(_json.Layer)) {\r\n this.children = new Array<SubLayer>();\r\n for (const childLayer of _json.Layer) {\r\n this.children.push(new SubLayer(childLayer, capabilities, this));\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport class WmsCapabilities {\r\n private static _capabilitiesCache = new Map<string, WmsCapabilities | undefined>();\r\n public readonly service: WmsCapability.Service;\r\n public readonly version?: string;\r\n public readonly isVersion13: boolean;\r\n public readonly layer?: WmsCapability.Layer;\r\n public get json() { return this._json; }\r\n public get maxLevel(): number { return this.layer ? this.layer.subLayers.length : - 1; }\r\n public get cartoRange(): MapCartoRectangle | undefined { return this.layer?.cartoRange; }\r\n public get featureInfoSupported() { return undefined !== this._json.Capability?.Request?.GetFeatureInfo; }\r\n public get featureInfoFormats(): string[] | undefined { return Array.isArray(this._json.Capability?.Request?.GetFeatureInfo?.Format) ? this._json.Capability?.Request?.GetFeatureInfo?.Format : undefined; }\r\n constructor(private _json: any) {\r\n if (!_json || typeof _json !== \"object\" || (_json.Service === undefined && _json.Capability === undefined))\r\n throw new Error(\"Invalid WMS GetCapabilities response\");\r\n\r\n this.version = typeof _json.version === \"string\" ? _json.version : undefined;\r\n this.isVersion13 = this.version !== undefined && this.version.startsWith(\"1.3\");\r\n this.service = new WmsCapability.Service(_json.Service ?? {});\r\n if (_json.Capability?.Layer)\r\n this.layer = new WmsCapability.Layer(_json.Capability.Layer, this);\r\n }\r\n\r\n /** Parse a GetCapabilities XML response, returning undefined if it is not a valid WMS capabilities document. */\r\n private static tryParse(xmlCapabilities: string): WmsCapabilities | undefined {\r\n // Validate the document is actually rooted at a WMS capabilities element before parsing:\r\n // wms-capabilities happily parses any root and recognizes direct Service/Capability children.\r\n // WMS 1.3.0 uses WMS_Capabilities; WMS 1.0.0-1.1.1 uses WMT_MS_Capabilities.\r\n const doc = new DOMParser().parseFromString(xmlCapabilities, \"text/xml\");\r\n const rootName = doc.documentElement?.localName;\r\n if (rootName !== \"WMS_Capabilities\" && rootName !== \"WMT_MS_Capabilities\")\r\n return undefined; // Not a WMS GetCapabilities document\r\n if (doc.getElementsByTagName(\"parsererror\").length > 0)\r\n return undefined; // XML parse error (browsers embed a parsererror element)\r\n\r\n try {\r\n return new WmsCapabilities(new WMS(undefined, DOMParser).parse(xmlCapabilities));\r\n } catch {\r\n return undefined; // Degenerate capabilities document\r\n }\r\n }\r\n\r\n public static async create(url: string, credentials?: RequestBasicCredentials, ignoreCache?: boolean, queryParams?: {[key: string]: string}): Promise<WmsCapabilities | undefined> {\r\n if (!ignoreCache) {\r\n const cached = WmsCapabilities._capabilitiesCache.get(url);\r\n if (cached !== undefined)\r\n return cached;\r\n }\r\n\r\n const tmpUrl = new URL(WmsUtilities.getBaseUrl(url));\r\n tmpUrl.searchParams.append(\"request\", \"GetCapabilities\");\r\n tmpUrl.searchParams.append(\"service\", \"WMS\");\r\n if (queryParams) {\r\n Object.keys(queryParams).forEach((paramKey) => {\r\n if (!tmpUrl.searchParams.has(paramKey))\r\n tmpUrl.searchParams.append(paramKey, queryParams[paramKey]);\r\n });\r\n }\r\n const xmlCapabilities = await WmsUtilities.fetchXml(tmpUrl.toString(), credentials);\r\n\r\n if (!xmlCapabilities)\r\n return undefined;\r\n\r\n const capabilities = WmsCapabilities.tryParse(xmlCapabilities);\r\n if (capabilities === undefined)\r\n return undefined;\r\n\r\n if (!credentials) {\r\n // Avoid caching protected data\r\n WmsCapabilities._capabilitiesCache.set(url, capabilities);\r\n }\r\n\r\n return capabilities;\r\n }\r\n public getSubLayers(visible = true): undefined | MapSubLayerProps[] {\r\n return this.layer ? this.layer.getSubLayers(visible) : undefined;\r\n }\r\n\r\n public getSubLayersCrs(subLayerNames: string[]): Map<string, string[]> | undefined {\r\n return this.layer ? this.layer.getSubLayersCrs(subLayerNames) : undefined;\r\n }\r\n}\r\n"]}
@@ -29,10 +29,19 @@ export declare class BriefcaseTxns extends BriefcaseNotificationHandler implemen
29
29
  /** @internal */
30
30
  get briefcaseChannelName(): "itwinjs-core/txns";
31
31
  /** Event raised after Txn validation or changeset application to indicate the set of changed elements.
32
+ * Each [[TxnEntityChange]] exposes its class through `metadata.classFullName`. Use [[TxnEntityChanges.filter]] with `metadata.is` to match a class or one of its subclasses.
33
+ * @example
34
+ * ```ts
35
+ * iModel.txns.onElementsChanged.addListener((changes) => {
36
+ * for (const change of changes.filter({ includeMetadata: (metadata) => metadata.is("BisCore:GeometricElement") }))
37
+ * updateElement(change.id);
38
+ * });
39
+ * ```
32
40
  * @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.
33
41
  */
34
42
  readonly onElementsChanged: BeEvent<(changes: TxnEntityChanges) => void>;
35
43
  /** Event raised after Txn validation or changeset application to indicate the set of changed models.
44
+ * Each [[TxnEntityChange]] exposes its class through `metadata.classFullName`. Use [[TxnEntityChanges.filter]] with `metadata.is` to match a class or one of its subclasses.
36
45
  * @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.
37
46
  */
38
47
  readonly onModelsChanged: BeEvent<(changes: TxnEntityChanges) => void>;
@@ -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,EAAE,gBAAgB,EAAkB,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EACvI,QAAQ,EACT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAoB,YAAY,EAAE,QAAQ,EAAE,MA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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"}
@@ -36,10 +36,19 @@ export class BriefcaseTxns extends BriefcaseNotificationHandler {
36
36
  return ipcAppChannels.txns;
37
37
  }
38
38
  /** Event raised after Txn validation or changeset application to indicate the set of changed elements.
39
+ * Each [[TxnEntityChange]] exposes its class through `metadata.classFullName`. Use [[TxnEntityChanges.filter]] with `metadata.is` to match a class or one of its subclasses.
40
+ * @example
41
+ * ```ts
42
+ * iModel.txns.onElementsChanged.addListener((changes) => {
43
+ * for (const change of changes.filter({ includeMetadata: (metadata) => metadata.is("BisCore:GeometricElement") }))
44
+ * updateElement(change.id);
45
+ * });
46
+ * ```
39
47
  * @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.
40
48
  */
41
49
  onElementsChanged = new BeEvent();
42
50
  /** Event raised after Txn validation or changeset application to indicate the set of changed models.
51
+ * Each [[TxnEntityChange]] exposes its class through `metadata.classFullName`. Use [[TxnEntityChanges.filter]] with `metadata.is` to match a class or one of its subclasses.
43
52
  * @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.
44
53
  */
45
54
  onModelsChanged = new BeEvent();