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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/lib/cjs/BriefcaseTxns.d.ts +58 -1
  3. package/lib/cjs/BriefcaseTxns.d.ts.map +1 -1
  4. package/lib/cjs/BriefcaseTxns.js +65 -0
  5. package/lib/cjs/BriefcaseTxns.js.map +1 -1
  6. package/lib/cjs/PerModelCategoryVisibility.d.ts.map +1 -1
  7. package/lib/cjs/PerModelCategoryVisibility.js +83 -81
  8. package/lib/cjs/PerModelCategoryVisibility.js.map +1 -1
  9. package/lib/cjs/SpatialViewState.d.ts.map +1 -1
  10. package/lib/cjs/SpatialViewState.js +3 -1
  11. package/lib/cjs/SpatialViewState.js.map +1 -1
  12. package/lib/cjs/ViewState.d.ts +32 -0
  13. package/lib/cjs/ViewState.d.ts.map +1 -1
  14. package/lib/cjs/ViewState.js +41 -4
  15. package/lib/cjs/ViewState.js.map +1 -1
  16. package/lib/cjs/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
  17. package/lib/cjs/internal/render/webgl/FrustumUniforms.js.map +1 -1
  18. package/lib/cjs/internal/render/webgl/RenderCommands.js.map +1 -1
  19. package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts +119 -22
  20. package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
  21. package/lib/cjs/quantity-formatting/QuantityFormatter.js +261 -59
  22. package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
  23. package/lib/cjs/tile/GltfReader.js.map +1 -1
  24. package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
  25. package/lib/cjs/tools/ToolAdmin.d.ts +20 -1
  26. package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
  27. package/lib/cjs/tools/ToolAdmin.js +75 -7
  28. package/lib/cjs/tools/ToolAdmin.js.map +1 -1
  29. package/lib/cjs/tools/ToolSettings.d.ts +4 -0
  30. package/lib/cjs/tools/ToolSettings.d.ts.map +1 -1
  31. package/lib/cjs/tools/ToolSettings.js +4 -0
  32. package/lib/cjs/tools/ToolSettings.js.map +1 -1
  33. package/lib/esm/BriefcaseTxns.d.ts +58 -1
  34. package/lib/esm/BriefcaseTxns.d.ts.map +1 -1
  35. package/lib/esm/BriefcaseTxns.js +65 -0
  36. package/lib/esm/BriefcaseTxns.js.map +1 -1
  37. package/lib/esm/PerModelCategoryVisibility.d.ts.map +1 -1
  38. package/lib/esm/PerModelCategoryVisibility.js +84 -82
  39. package/lib/esm/PerModelCategoryVisibility.js.map +1 -1
  40. package/lib/esm/SpatialViewState.d.ts.map +1 -1
  41. package/lib/esm/SpatialViewState.js +3 -1
  42. package/lib/esm/SpatialViewState.js.map +1 -1
  43. package/lib/esm/ViewState.d.ts +32 -0
  44. package/lib/esm/ViewState.d.ts.map +1 -1
  45. package/lib/esm/ViewState.js +42 -5
  46. package/lib/esm/ViewState.js.map +1 -1
  47. package/lib/esm/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
  48. package/lib/esm/internal/render/webgl/FrustumUniforms.js.map +1 -1
  49. package/lib/esm/internal/render/webgl/RenderCommands.js.map +1 -1
  50. package/lib/esm/quantity-formatting/QuantityFormatter.d.ts +119 -22
  51. package/lib/esm/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
  52. package/lib/esm/quantity-formatting/QuantityFormatter.js +263 -61
  53. package/lib/esm/quantity-formatting/QuantityFormatter.js.map +1 -1
  54. package/lib/esm/tile/GltfReader.js.map +1 -1
  55. package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
  56. package/lib/esm/tools/ToolAdmin.d.ts +20 -1
  57. package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
  58. package/lib/esm/tools/ToolAdmin.js +77 -9
  59. package/lib/esm/tools/ToolAdmin.js.map +1 -1
  60. package/lib/esm/tools/ToolSettings.d.ts +4 -0
  61. package/lib/esm/tools/ToolSettings.d.ts.map +1 -1
  62. package/lib/esm/tools/ToolSettings.js +4 -0
  63. package/lib/esm/tools/ToolSettings.js.map +1 -1
  64. package/lib/public/locales/en/iModelJs.json +1 -0
  65. package/lib/public/scripts/parse-imdl-worker.js +1 -1
  66. package/lib/workers/webpack/parse-imdl-worker.js +1 -1
  67. package/package.json +20 -20
@@ -1 +1 @@
1
- {"version":3,"file":"MapLayerFormatRegistry.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerFormatRegistry.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAgC,8BAA8B,EAA6E,cAAc,EAAE,oBAAoB,EAA6B,MAAM,aAAa,CAAC;AACvO,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,OAAO,cAAc;IAClB,MAAM,CAAC,QAAQ,CAAS;IAE/B,qEAAqE;IAC9D,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,sBAAsB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAE7E;;;;;;;OAOG;IACI,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,IAAY,EAAE,SAAkB,EAAE,SAAkB,EAAE,YAAsB,EAAE,SAAuB,IAAuC,OAAO,EAAE,MAAM,EAAE,oBAAoB,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAE/N;;MAEE;IACK,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAwB;QACnD,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,I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AC;QACxB,CAAC;QAED,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM;YAClB,OAAO,EAAE,MAAM,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAAC;QAExD,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module MapLayers\r\n */\r\n\r\nimport { assert, expectDefined, Logger } from \"@itwin/core-bentley\";\r\nimport { ImageMapLayerSettings, MapLayerKey, MapLayerSettings, MapSubLayerProps } from \"@itwin/core-common\";\r\nimport { IModelApp } from \"../../IModelApp\";\r\nimport { IModelConnection } from \"../../IModelConnection\";\r\nimport { ImageryMapLayerTreeReference, internalMapLayerImageryFormats, MapLayerAccessClient, MapLayerAuthenticationInfo, MapLayerImageryProvider, MapLayerSource, MapLayerSourceStatus, MapLayerTileTreeReference } from \"../internal\";\r\nconst loggerCategory = \"ArcGISFeatureProvider\";\r\n\r\n/**\r\n * Class representing a map-layer format.\r\n * Each format has it's unique 'formatId' string, used to uniquely identify a format in the [[MapLayerFormatRegistry]].\r\n * When creating an [[ImageMapLayerSettings]] object, a format needs to be specified this 'formatId'.\r\n * The MapLayerFormat object can later be used to validate a source, or create a provider.\r\n *\r\n * Subclasses should override formatId, [[MapLayerFormat.createImageryProvider]], and [[MapLayerFormat.createMapLayerTree]].\r\n * @public\r\n */\r\nexport class MapLayerFormat {\r\n public static formatId: string;\r\n\r\n /** Register the current format in the [[MapLayerFormatRegistry]]. */\r\n public static register() { IModelApp.mapLayerFormatRegistry.register(this); }\r\n\r\n /**\r\n * Allow a source of a specific format to be validated before being attached as a map-layer.\r\n * @param _url The URL of the source.\r\n * @param _userName The username to access the source if needed.\r\n * @param _password The password to access the source if needed.\r\n * @param _ignoreCache Flag to skip cache lookup (i.e. force a new server request).\r\n * @returns Validation Status. If successful, a list of available sub-layers may also be returned.\r\n */\r\n public static async validateSource(_url: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _accesKey?: MapLayerKey): Promise<MapLayerSourceValidation> { return { status: MapLayerSourceStatus.Valid }; }\r\n\r\n /** Allow a source object to be validated before being attached as a map-layer.\r\n * @beta\r\n */\r\n public static async validate(args: ValidateSourceArgs): Promise<MapLayerSourceValidation> {\r\n return this.validateSource(args.source.url, args.source.userName, args.source.password, args.ignoreCache);\r\n }\r\n\r\n /**\r\n * Create a [[MapLayerImageryProvider]] that will be used to feed data in a map-layer tile tree.\r\n * @param _settings The map layer settings to be applied to the imagery provider.\r\n * @returns Returns the new imagery provider.\r\n * @beta\r\n */\r\n public static createImageryProvider(_settings: MapLayerSettings): MapLayerImageryProvider | undefined { assert(false); }\r\n\r\n /**\r\n * Creates a MapLayerTileTreeReference for this map layer format.\r\n * @param _layerSettings Map layer settings that are applied to the MapLayerTileTreeReference.\r\n * @param _layerIndex The index of the associated map layer.\r\n * @param _iModel The iModel containing the MapLayerTileTreeReference.\r\n * @returns Returns the new tile tree reference.\r\n * @beta\r\n */\r\n public static createMapLayerTree(_layerSettings: MapLayerSettings, _layerIndex: number, _iModel: IModelConnection): MapLayerTileTreeReference | undefined {\r\n assert(false);\r\n return undefined;\r\n }\r\n\r\n}\r\n\r\n/** Options for validating sources\r\n * @beta\r\n */\r\nexport interface ValidateSourceArgs {\r\n source: MapLayerSource;\r\n /** Disable cache lookup during validate process */\r\n ignoreCache?: boolean;\r\n}\r\n\r\n/**\r\n * The type of a map layer format.\r\n * @public\r\n */\r\nexport type MapLayerFormatType = typeof MapLayerFormat;\r\n\r\n/** @public */\r\nexport interface MapLayerSourceValidation {\r\n status: MapLayerSourceStatus;\r\n subLayers?: MapSubLayerProps[];\r\n\r\n /** @beta */\r\n authInfo?: MapLayerAuthenticationInfo;\r\n}\r\n\r\n/**\r\n * Options supplied at startup via [[IModelAppOptions.mapLayerOptions]] to specify access keys for various map layer formats.\r\n * 'BingMaps' must have it's key value set to 'key'\r\n * 'MapboxImagery' must have it's key value set to 'access_token'\r\n *\r\n * @public\r\n */\r\nexport interface MapLayerOptions {\r\n /** Access key for Azure Maps in the format `{ key: \"subscription-key\", value: \"your-azure-maps-key\" }`. */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n AzureMaps?: MapLayerKey;\r\n /** Access key for Mapbox in the format `{ key: \"access_token\", value: \"your-mapbox-key\" }`. */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n MapboxImagery?: MapLayerKey;\r\n /** Access key for Bing Maps in the format `{ key: \"key\", value: \"your-bing-maps-key\" }`. */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n BingMaps?: MapLayerKey;\r\n /** Access keys for additional map layer formats. */\r\n [format: string]: MapLayerKey | undefined;\r\n}\r\n\r\n/** @internal */\r\nexport interface MapLayerFormatEntry {\r\n type: MapLayerFormatType;\r\n accessClient?: MapLayerAccessClient;\r\n}\r\n\r\n/**\r\n * A registry of MapLayerFormats identified by their unique format IDs. The registry can be accessed via [[IModelApp.mapLayerFormatRegistry]].\r\n * @public\r\n */\r\nexport class MapLayerFormatRegistry {\r\n private _configOptions: MapLayerOptions;\r\n constructor(opts?: MapLayerOptions) {\r\n this._configOptions = opts ?? {};\r\n internalMapLayerImageryFormats.forEach((format) => this.register(format));\r\n }\r\n private _formats = new Map<string, MapLayerFormatEntry>();\r\n\r\n public isRegistered(formatId: string) { return this._formats.get(formatId) !== undefined; }\r\n\r\n public register(formatClass: MapLayerFormatType) {\r\n if (formatClass.formatId.length === 0)\r\n return; // must be an abstract class, ignore it\r\n\r\n this._formats.set(formatClass.formatId, { type: formatClass });\r\n }\r\n\r\n /** @beta */\r\n public setAccessClient(formatId: string, accessClient: MapLayerAccessClient): boolean {\r\n const entry = this._formats.get(formatId);\r\n if (entry !== undefined) {\r\n entry.accessClient = accessClient;\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /** @beta */\r\n public getAccessClient(formatId: string): MapLayerAccessClient | undefined {\r\n if (formatId.length === 0)\r\n return undefined;\r\n\r\n return this._formats.get(formatId)?.accessClient;\r\n }\r\n\r\n public get configOptions(): MapLayerOptions {\r\n return this._configOptions;\r\n }\r\n\r\n /** @internal */\r\n public createImageryMapLayerTree(layerSettings: ImageMapLayerSettings, layerIndex: number, iModel: IModelConnection): ImageryMapLayerTreeReference | undefined {\r\n const entry = this._formats.get(layerSettings.formatId);\r\n const format = entry?.type;\r\n if (format === undefined) {\r\n Logger.logError(loggerCategory, `Could not find format '${layerSettings.formatId}' in registry`);\r\n return undefined;\r\n }\r\n return format.createMapLayerTree(layerSettings, layerIndex, iModel) as ImageryMapLayerTreeReference;\r\n }\r\n\r\n /**\r\n * Returns a [[MapLayerImageryProvider]] based on the provided [[ImageMapLayerSettings]] object.\r\n * @internal\r\n */\r\n public createImageryProvider(layerSettings: ImageMapLayerSettings): MapLayerImageryProvider | undefined {\r\n const entry = this._formats.get(layerSettings.formatId);\r\n const format = entry?.type;\r\n if (this._configOptions[layerSettings.formatId] !== undefined) {\r\n const keyValuePair = expectDefined(this._configOptions[layerSettings.formatId]);\r\n const key: MapLayerKey = { key: keyValuePair.key, value: keyValuePair.value };\r\n layerSettings = layerSettings.clone({ accessKey: key });\r\n }\r\n return (format === undefined) ? undefined : format.createImageryProvider(layerSettings);\r\n }\r\n\r\n /** @beta*/\r\n public async validateSource(opts: ValidateSourceArgs): Promise<MapLayerSourceValidation>;\r\n\r\n public async validateSource(formatId: string, url: string, userName?: string, password?: string, ignoreCache?: boolean): Promise<MapLayerSourceValidation>;\r\n\r\n /** @internal*/\r\n public async validateSource(formatIdOrArgs: string|ValidateSourceArgs, url?: string, userName?: string, password?: string, ignoreCache?: boolean): Promise<MapLayerSourceValidation> {\r\n let format: typeof MapLayerFormat | undefined;\r\n let args: ValidateSourceArgs | undefined;\r\n\r\n if (typeof formatIdOrArgs == \"string\" && url !== undefined) {\r\n const formatId = formatIdOrArgs;\r\n const entry = this._formats.get(formatId);\r\n format = entry?.type;\r\n if (format !== undefined) {\r\n const source = MapLayerSource.fromJSON({name: \"\", formatId, url});\r\n if (source !== undefined) {\r\n args = {source, ignoreCache};\r\n source.userName = userName;\r\n source.password = password;\r\n }\r\n\r\n }\r\n } else if (typeof formatIdOrArgs !== \"string\") {\r\n const entry = this._formats.get(formatIdOrArgs.source.formatId);\r\n format = entry?.type;\r\n args = formatIdOrArgs;\r\n }\r\n\r\n if (!args || !format)\r\n return { status: MapLayerSourceStatus.InvalidFormat };\r\n\r\n return format.validate(args);\r\n }\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"MapLayerFormatRegistry.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerFormatRegistry.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAgC,8BAA8B,EAA6E,cAAc,EAAE,oBAAoB,EAA6B,MAAM,aAAa,CAAC;AACvO,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,OAAO,cAAc;IAClB,MAAM,CAAC,QAAQ,CAAS;IAE/B,qEAAqE;IAC9D,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,sBAAsB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAE7E;;;;;;;OAOG;IACI,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,IAAY,EAAE,SAAkB,EAAE,SAAkB,EAAE,YAAsB,EAAE,SAAuB,IAAuC,OAAO,EAAE,MAAM,EAAE,oBAAoB,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAE/N;;MAEE;IACK,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,I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AG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAChE,MAAM,GAAG,KAAK,EAAE,IAAI,CAAC;YACrB,IAAI,GAAG,cAAc,CAAC;QACxB,CAAC;QAED,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM;YAClB,OAAO,EAAE,MAAM,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAAC;QAExD,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module MapLayers\r\n */\r\n\r\nimport { assert, expectDefined, Logger } from \"@itwin/core-bentley\";\r\nimport { ImageMapLayerSettings, MapLayerKey, MapLayerSettings, MapSubLayerProps } from \"@itwin/core-common\";\r\nimport { IModelApp } from \"../../IModelApp\";\r\nimport { IModelConnection } from \"../../IModelConnection\";\r\nimport { ImageryMapLayerTreeReference, internalMapLayerImageryFormats, MapLayerAccessClient, MapLayerAuthenticationInfo, MapLayerImageryProvider, MapLayerSource, MapLayerSourceStatus, MapLayerTileTreeReference } from \"../internal\";\r\nconst loggerCategory = \"ArcGISFeatureProvider\";\r\n\r\n/**\r\n * Class representing a map-layer format.\r\n * Each format has it's unique 'formatId' string, used to uniquely identify a format in the [[MapLayerFormatRegistry]].\r\n * When creating an [[ImageMapLayerSettings]] object, a format needs to be specified this 'formatId'.\r\n * The MapLayerFormat object can later be used to validate a source, or create a provider.\r\n *\r\n * Subclasses should override formatId, [[MapLayerFormat.createImageryProvider]], and [[MapLayerFormat.createMapLayerTree]].\r\n * @public\r\n */\r\nexport class MapLayerFormat {\r\n public static formatId: string;\r\n\r\n /** Register the current format in the [[MapLayerFormatRegistry]]. */\r\n public static register() { IModelApp.mapLayerFormatRegistry.register(this); }\r\n\r\n /**\r\n * Allow a source of a specific format to be validated before being attached as a map-layer.\r\n * @param _url The URL of the source.\r\n * @param _userName The username to access the source if needed.\r\n * @param _password The password to access the source if needed.\r\n * @param _ignoreCache Flag to skip cache lookup (i.e. force a new server request).\r\n * @returns Validation Status. If successful, a list of available sub-layers may also be returned.\r\n */\r\n public static async validateSource(_url: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _accesKey?: MapLayerKey): Promise<MapLayerSourceValidation> { return { status: MapLayerSourceStatus.Valid }; }\r\n\r\n /** Allow a source object to be validated before being attached as a map-layer.\r\n * @beta\r\n */\r\n public static async validate(args: ValidateSourceArgs): Promise<MapLayerSourceValidation> {\r\n return this.validateSource(args.source.url, args.source.userName, args.source.password, args.ignoreCache);\r\n }\r\n\r\n /**\r\n * Create a [[MapLayerImageryProvider]] that will be used to feed data in a map-layer tile tree.\r\n * @param _settings The map layer settings to be applied to the imagery provider.\r\n * @returns Returns the new imagery provider.\r\n * @beta\r\n */\r\n public static createImageryProvider(_settings: MapLayerSettings): MapLayerImageryProvider | undefined { assert(false); }\r\n\r\n /**\r\n * Creates a MapLayerTileTreeReference for this map layer format.\r\n * @param _layerSettings Map layer settings that are applied to the MapLayerTileTreeReference.\r\n * @param _layerIndex The index of the associated map layer.\r\n * @param _iModel The iModel containing the MapLayerTileTreeReference.\r\n * @returns Returns the new tile tree reference.\r\n * @beta\r\n */\r\n public static createMapLayerTree(_layerSettings: MapLayerSettings, _layerIndex: number, _iModel: IModelConnection): MapLayerTileTreeReference | undefined {\r\n assert(false);\r\n return undefined;\r\n }\r\n\r\n}\r\n\r\n/** Options for validating sources\r\n * @beta\r\n */\r\nexport interface ValidateSourceArgs {\r\n source: MapLayerSource;\r\n /** Disable cache lookup during validate process */\r\n ignoreCache?: boolean;\r\n}\r\n\r\n/**\r\n * The type of a map layer format.\r\n * @public\r\n */\r\nexport type MapLayerFormatType = typeof MapLayerFormat;\r\n\r\n/** @public */\r\nexport interface MapLayerSourceValidation {\r\n status: MapLayerSourceStatus;\r\n subLayers?: MapSubLayerProps[];\r\n\r\n /** @beta */\r\n authInfo?: MapLayerAuthenticationInfo;\r\n}\r\n\r\n/**\r\n * Options supplied at startup via [[IModelAppOptions.mapLayerOptions]] to specify access keys for various map layer formats.\r\n * 'BingMaps' must have it's key value set to 'key'\r\n * 'MapboxImagery' must have it's key value set to 'access_token'\r\n *\r\n * @public\r\n */\r\nexport interface MapLayerOptions {\r\n /** Access key for Azure Maps in the format `{ key: \"subscription-key\", value: \"your-azure-maps-key\" }`. */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n AzureMaps?: MapLayerKey;\r\n /** Access key for Mapbox in the format `{ key: \"access_token\", value: \"your-mapbox-key\" }`. */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n MapboxImagery?: MapLayerKey;\r\n /** Access key for Bing Maps in the format `{ key: \"key\", value: \"your-bing-maps-key\" }`. */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n BingMaps?: MapLayerKey;\r\n /** Access keys for additional map layer formats. */\r\n [format: string]: MapLayerKey | undefined;\r\n}\r\n\r\n/** @internal */\r\nexport interface MapLayerFormatEntry {\r\n type: MapLayerFormatType;\r\n accessClient?: MapLayerAccessClient;\r\n}\r\n\r\n/**\r\n * A registry of MapLayerFormats identified by their unique format IDs. The registry can be accessed via [[IModelApp.mapLayerFormatRegistry]].\r\n * @public\r\n */\r\nexport class MapLayerFormatRegistry {\r\n private _configOptions: MapLayerOptions;\r\n constructor(opts?: MapLayerOptions) {\r\n this._configOptions = opts ?? {};\r\n internalMapLayerImageryFormats.forEach((format) => this.register(format));\r\n }\r\n private _formats = new Map<string, MapLayerFormatEntry>();\r\n\r\n public isRegistered(formatId: string) { return this._formats.get(formatId) !== undefined; }\r\n\r\n public register(formatClass: MapLayerFormatType) {\r\n if (formatClass.formatId.length === 0)\r\n return; // must be an abstract class, ignore it\r\n\r\n this._formats.set(formatClass.formatId, { type: formatClass });\r\n }\r\n\r\n /** @beta */\r\n public setAccessClient(formatId: string, accessClient: MapLayerAccessClient): boolean {\r\n const entry = this._formats.get(formatId);\r\n if (entry !== undefined) {\r\n entry.accessClient = accessClient;\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /** @beta */\r\n public getAccessClient(formatId: string): MapLayerAccessClient | undefined {\r\n if (formatId.length === 0)\r\n return undefined;\r\n\r\n return this._formats.get(formatId)?.accessClient;\r\n }\r\n\r\n public get configOptions(): MapLayerOptions {\r\n return this._configOptions;\r\n }\r\n\r\n /** @internal */\r\n public createImageryMapLayerTree(layerSettings: ImageMapLayerSettings, layerIndex: number, iModel: IModelConnection): ImageryMapLayerTreeReference | undefined {\r\n const entry = this._formats.get(layerSettings.formatId);\r\n const format = entry?.type;\r\n if (format === undefined) {\r\n Logger.logError(loggerCategory, `Could not find format '${layerSettings.formatId}' in registry`);\r\n return undefined;\r\n }\r\n return format.createMapLayerTree(layerSettings, layerIndex, iModel);\r\n }\r\n\r\n /**\r\n * Returns a [[MapLayerImageryProvider]] based on the provided [[ImageMapLayerSettings]] object.\r\n * @internal\r\n */\r\n public createImageryProvider(layerSettings: ImageMapLayerSettings): MapLayerImageryProvider | undefined {\r\n const entry = this._formats.get(layerSettings.formatId);\r\n const format = entry?.type;\r\n if (this._configOptions[layerSettings.formatId] !== undefined) {\r\n const keyValuePair = expectDefined(this._configOptions[layerSettings.formatId]);\r\n const key: MapLayerKey = { key: keyValuePair.key, value: keyValuePair.value };\r\n layerSettings = layerSettings.clone({ accessKey: key });\r\n }\r\n return (format === undefined) ? undefined : format.createImageryProvider(layerSettings);\r\n }\r\n\r\n /** @beta*/\r\n public async validateSource(opts: ValidateSourceArgs): Promise<MapLayerSourceValidation>;\r\n\r\n public async validateSource(formatId: string, url: string, userName?: string, password?: string, ignoreCache?: boolean): Promise<MapLayerSourceValidation>;\r\n\r\n /** @internal*/\r\n public async validateSource(formatIdOrArgs: string|ValidateSourceArgs, url?: string, userName?: string, password?: string, ignoreCache?: boolean): Promise<MapLayerSourceValidation> {\r\n let format: typeof MapLayerFormat | undefined;\r\n let args: ValidateSourceArgs | undefined;\r\n\r\n if (typeof formatIdOrArgs == \"string\" && url !== undefined) {\r\n const formatId = formatIdOrArgs;\r\n const entry = this._formats.get(formatId);\r\n format = entry?.type;\r\n if (format !== undefined) {\r\n const source = MapLayerSource.fromJSON({name: \"\", formatId, url});\r\n if (source !== undefined) {\r\n args = {source, ignoreCache};\r\n source.userName = userName;\r\n source.password = password;\r\n }\r\n\r\n }\r\n } else if (typeof formatIdOrArgs !== \"string\") {\r\n const entry = this._formats.get(formatIdOrArgs.source.formatId);\r\n format = entry?.type;\r\n args = formatIdOrArgs;\r\n }\r\n\r\n if (!args || !format)\r\n return { status: MapLayerSourceStatus.InvalidFormat };\r\n\r\n return format.validate(args);\r\n }\r\n}\r\n\r\n"]}
@@ -206,6 +206,8 @@ export declare class ToolAdmin {
206
206
  set toolSyncUiEventDispatcher(handler: ((syncEventId: string, useImmediateDispatch?: boolean) => void) | undefined);
207
207
  /** Handler for keyboard events. */
208
208
  private static _keyEventHandler;
209
+ /** Handler for modifier key transitions captured before focused UI elements can stop propagation. */
210
+ private static _keyEventCaptureHandler;
209
211
  /** @internal */
210
212
  onInitialized(): void;
211
213
  /** @internal */
@@ -306,16 +308,33 @@ export declare class ToolAdmin {
306
308
  private onButtonUp;
307
309
  /** Called when any *modifier* (Shift, Alt, or Control) key is pressed or released. */
308
310
  private onModifierKeyTransition;
311
+ private get _isFocusHome();
312
+ private _setFocusHome;
309
313
  private static getModifierKey;
310
314
  /** Process key down events while the Ctrl key is pressed */
311
315
  onCtrlKeyPressed(keyEvent: KeyboardEvent): Promise<{
312
316
  handled: boolean;
313
317
  result: boolean;
314
318
  }>;
315
- /** Process shortcut key events */
319
+ /** Sub-classes should override to process shortcut key events.
320
+ * @return true if handled and no further processing of event should occur.
321
+ */
316
322
  processShortcutKey(_keyEvent: KeyboardEvent, _wentDown: boolean): Promise<boolean>;
323
+ /** Event for every key down and up transition.
324
+ * @note Called before processShortcutKey.
325
+ * @return true if handled and no further processing of event should occur.
326
+ */
327
+ protected processKeyboardEvent(keyEvent: KeyboardEvent, _wentDown: boolean): boolean;
328
+ /** Need to check for modifier changes on capture phase as a ui element that calls stopPropagation
329
+ * prevents onKeyTransition from being called when bubbling.
330
+ */
331
+ private onKeyTransitionCaptured;
317
332
  /** Event for every key down and up transition. */
318
333
  private onKeyTransition;
334
+ /** Finish the active edit command before performing a transaction operation like undo/redo.
335
+ * @internal
336
+ */
337
+ finishEditCommandForTxnOperation(): Promise<boolean>;
319
338
  /** Called to undo previous data button for primitive tools or undo last write operation. */
320
339
  doUndoOperation(): Promise<boolean>;
321
340
  /** Called to redo previous data button for primitive tools or undo last write operation. */
@@ -1 +1 @@
1
- {"version":3,"file":"ToolAdmin.d.ts","sourceRoot":"","sources":["../../../src/tools/ToolAdmin.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAA0B,OAAO,EAAqC,MAAM,qBAAqB,CAAC;AACzG,OAAO,EAAY,OAAO,EAAE,OAAO,EAAuB,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAU,mBAAmB,EAAa,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAIpG,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOzC,OAAO,EAAE,eAAe,EAAmB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAe,YAAY,EACtI,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,E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W,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,14 +5,14 @@
5
5
  /** @packageDocumentation
6
6
  * @module Tools
7
7
  */
8
- import { AbandonedError, assert, BeEvent, BeTimePoint, IModelStatus, Logger } from "@itwin/core-bentley";
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";
12
12
  import { FrontendLoggerCategory } from "../common/FrontendLoggerCategory";
13
13
  import { IModelApp } from "../IModelApp";
14
14
  import { linePlaneIntersect } from "../LinePlaneIntersect";
15
- import { MessageBoxIconType, MessageBoxType } from "../NotificationManager";
15
+ import { MessageBoxIconType, MessageBoxType, NotifyMessageDetails, OutputMessagePriority } from "../NotificationManager";
16
16
  import { IconSprites } from "../Sprites";
17
17
  import { DynamicsContext } from "../ViewContext";
18
18
  import { ScreenViewport } from "../Viewport";
@@ -406,12 +406,26 @@ export class ToolAdmin {
406
406
  if (!ev.repeat) // we don't want repeated keyboard events. If we keep them they interfere with replacing mouse motion events, since they come as a stream.
407
407
  ToolAdmin.addEvent(ev);
408
408
  };
409
+ /** Handler for modifier key transitions captured before focused UI elements can stop propagation. */
410
+ static _keyEventCaptureHandler = async (event) => {
411
+ const ev = event;
412
+ if (!ev.repeat) {
413
+ try {
414
+ await IModelApp.toolAdmin.onKeyTransitionCaptured(ev);
415
+ }
416
+ catch (err) {
417
+ await ToolAdmin.exceptionHandler(err);
418
+ }
419
+ }
420
+ };
409
421
  /** @internal */
410
422
  onInitialized() {
411
423
  if (typeof document === "undefined")
412
424
  return; // if document isn't defined, we're probably running in a test environment. At any rate, we can't have interactive tools.
413
425
  this._idleTool = IModelApp.tools.create("Idle");
414
426
  ["keydown", "keyup"].forEach((type) => {
427
+ document.addEventListener(type, ToolAdmin._keyEventCaptureHandler, true);
428
+ ToolAdmin._removals.push(() => document.removeEventListener(type, ToolAdmin._keyEventCaptureHandler, true));
415
429
  document.addEventListener(type, ToolAdmin._keyEventHandler, false);
416
430
  ToolAdmin._removals.push(() => document.removeEventListener(type, ToolAdmin._keyEventHandler, false));
417
431
  });
@@ -1175,6 +1189,15 @@ export class ToolAdmin {
1175
1189
  this.updateDynamics(undefined, undefined, true); // Don't wait for motion to update dynamics...
1176
1190
  }
1177
1191
  }
1192
+ get _isFocusHome() {
1193
+ return (document.body === document.activeElement);
1194
+ }
1195
+ _setFocusHome() {
1196
+ const element = document.activeElement;
1197
+ if (element && element !== document.body)
1198
+ element.blur();
1199
+ document.body.focus();
1200
+ }
1178
1201
  static getModifierKey(event) {
1179
1202
  switch (event.key) {
1180
1203
  case "Alt": return BeModifierKeys.Alt;
@@ -1205,17 +1228,41 @@ export class ToolAdmin {
1205
1228
  }
1206
1229
  return { handled, result };
1207
1230
  }
1208
- /** Process shortcut key events */
1231
+ /** Sub-classes should override to process shortcut key events.
1232
+ * @return true if handled and no further processing of event should occur.
1233
+ */
1209
1234
  async processShortcutKey(_keyEvent, _wentDown) {
1210
1235
  return false;
1211
1236
  }
1212
- /** Event for every key down and up transition. */
1213
- async onKeyTransition(event, wentDown) {
1214
- const keyEvent = event.ev;
1237
+ /** Event for every key down and up transition.
1238
+ * @note Called before processShortcutKey.
1239
+ * @return true if handled and no further processing of event should occur.
1240
+ */
1241
+ processKeyboardEvent(keyEvent, _wentDown) {
1242
+ if (this._isFocusHome || undefined !== IModelApp.accuDraw.getFocusItem())
1243
+ return false; // Focus is Home or AccuDraw, allow shortcuts...
1244
+ // NOTE: Provide a convenient way for the user to move focus to Home to use shortcuts.
1245
+ // Escape is the only practical choice with its default behavior that can cancel/close/blur.
1246
+ // Intentionally not checking wentDown as some ui elements stop propagation of down but not up (moving to capture is not a good option).
1247
+ // Apps that want to use Escape to start the default tool still can with Home focus in processShortcutKey.
1248
+ if (keyEvent.key === "Escape" && ToolSettings.escapeMovesFocusToHome && !keyEvent.defaultPrevented && !keyEvent.isComposing)
1249
+ this._setFocusHome();
1250
+ return true;
1251
+ }
1252
+ /** Need to check for modifier changes on capture phase as a ui element that calls stopPropagation
1253
+ * prevents onKeyTransition from being called when bubbling.
1254
+ */
1255
+ async onKeyTransitionCaptured(keyEvent) {
1215
1256
  this.currentInputState.setKeyQualifiers(keyEvent);
1216
1257
  const modifierKey = ToolAdmin.getModifierKey(keyEvent);
1217
1258
  if (BeModifierKeys.None !== modifierKey)
1218
- return this.onModifierKeyTransition(wentDown, modifierKey, keyEvent);
1259
+ return this.onModifierKeyTransition("keydown" === keyEvent.type, modifierKey, keyEvent);
1260
+ }
1261
+ /** Event for every key down and up transition. */
1262
+ async onKeyTransition(event, wentDown) {
1263
+ const keyEvent = event.ev;
1264
+ if (this.processKeyboardEvent(keyEvent, wentDown))
1265
+ return EventHandled.Yes;
1219
1266
  if (wentDown && keyEvent.ctrlKey) {
1220
1267
  const { handled, result } = await this.onCtrlKeyPressed(keyEvent);
1221
1268
  if (handled)
@@ -1230,6 +1277,23 @@ export class ToolAdmin {
1230
1277
  return EventHandled.Yes;
1231
1278
  return EventHandled.No;
1232
1279
  }
1280
+ /** Finish the active edit command before performing a transaction operation like undo/redo.
1281
+ * @internal
1282
+ */
1283
+ async finishEditCommandForTxnOperation() {
1284
+ // NOTE: Because restartPrimitiveTool is called after an undo/redo the active tool won't be left in an invalid state...
1285
+ if (undefined === this._editCommandHandler)
1286
+ return true;
1287
+ try {
1288
+ await this._editCommandHandler.finishCommand();
1289
+ return true;
1290
+ }
1291
+ catch (err) {
1292
+ const message = err instanceof Error ? err.message : IModelApp.localization.getLocalizedString("iModelJs:Errors.UnableToFinishActiveEditCommand");
1293
+ IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Warning, message));
1294
+ return false;
1295
+ }
1296
+ }
1233
1297
  /** Called to undo previous data button for primitive tools or undo last write operation. */
1234
1298
  async doUndoOperation() {
1235
1299
  const activeTool = this.activeTool;
@@ -1241,7 +1305,9 @@ export class ToolAdmin {
1241
1305
  const imodel = IModelApp.viewManager.selectedView?.view.iModel;
1242
1306
  if (undefined === imodel || imodel.isReadonly || !imodel.isBriefcaseConnection())
1243
1307
  return false;
1244
- return (IModelStatus.Success === await imodel.txns.reverseSingleTxn() ? true : false);
1308
+ if (!await this.finishEditCommandForTxnOperation())
1309
+ return false;
1310
+ return imodel.txns.reverseSingleTxnAsync().then(() => true).catch(() => false);
1245
1311
  }
1246
1312
  /** Called to redo previous data button for primitive tools or undo last write operation. */
1247
1313
  async doRedoOperation() {
@@ -1254,7 +1320,9 @@ export class ToolAdmin {
1254
1320
  const imodel = IModelApp.viewManager.selectedView?.view.iModel;
1255
1321
  if (undefined === imodel || imodel.isReadonly || !imodel.isBriefcaseConnection())
1256
1322
  return false;
1257
- return (IModelStatus.Success === await imodel.txns.reinstateTxn() ? true : false);
1323
+ if (!await this.finishEditCommandForTxnOperation())
1324
+ return false;
1325
+ return imodel.txns.reinstateTxnAsync().then(() => true).catch(() => false);
1258
1326
  }
1259
1327
  onActiveToolChanged(tool, start) {
1260
1328
  this.clearMotionPromises();