@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.
- package/CHANGELOG.md +16 -1
- package/lib/cjs/BriefcaseTxns.d.ts +58 -1
- package/lib/cjs/BriefcaseTxns.d.ts.map +1 -1
- package/lib/cjs/BriefcaseTxns.js +65 -0
- package/lib/cjs/BriefcaseTxns.js.map +1 -1
- package/lib/cjs/PerModelCategoryVisibility.d.ts.map +1 -1
- package/lib/cjs/PerModelCategoryVisibility.js +83 -81
- package/lib/cjs/PerModelCategoryVisibility.js.map +1 -1
- package/lib/cjs/SpatialViewState.d.ts.map +1 -1
- package/lib/cjs/SpatialViewState.js +3 -1
- package/lib/cjs/SpatialViewState.js.map +1 -1
- package/lib/cjs/ViewState.d.ts +32 -0
- package/lib/cjs/ViewState.d.ts.map +1 -1
- package/lib/cjs/ViewState.js +41 -4
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/FrustumUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/RenderCommands.js.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts +119 -22
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.js +261 -59
- package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/cjs/tools/ToolAdmin.d.ts +20 -1
- package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/cjs/tools/ToolAdmin.js +75 -7
- package/lib/cjs/tools/ToolAdmin.js.map +1 -1
- package/lib/cjs/tools/ToolSettings.d.ts +4 -0
- package/lib/cjs/tools/ToolSettings.d.ts.map +1 -1
- package/lib/cjs/tools/ToolSettings.js +4 -0
- package/lib/cjs/tools/ToolSettings.js.map +1 -1
- package/lib/esm/BriefcaseTxns.d.ts +58 -1
- package/lib/esm/BriefcaseTxns.d.ts.map +1 -1
- package/lib/esm/BriefcaseTxns.js +65 -0
- package/lib/esm/BriefcaseTxns.js.map +1 -1
- package/lib/esm/PerModelCategoryVisibility.d.ts.map +1 -1
- package/lib/esm/PerModelCategoryVisibility.js +84 -82
- package/lib/esm/PerModelCategoryVisibility.js.map +1 -1
- package/lib/esm/SpatialViewState.d.ts.map +1 -1
- package/lib/esm/SpatialViewState.js +3 -1
- package/lib/esm/SpatialViewState.js.map +1 -1
- package/lib/esm/ViewState.d.ts +32 -0
- package/lib/esm/ViewState.d.ts.map +1 -1
- package/lib/esm/ViewState.js +42 -5
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/FrustumUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/RenderCommands.js.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts +119 -22
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.js +263 -61
- package/lib/esm/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/esm/tools/ToolAdmin.d.ts +20 -1
- package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/esm/tools/ToolAdmin.js +77 -9
- package/lib/esm/tools/ToolAdmin.js.map +1 -1
- package/lib/esm/tools/ToolSettings.d.ts +4 -0
- package/lib/esm/tools/ToolSettings.d.ts.map +1 -1
- package/lib/esm/tools/ToolSettings.js +4 -0
- package/lib/esm/tools/ToolSettings.js.map +1 -1
- package/lib/public/locales/en/iModelJs.json +1 -0
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +20 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerFormatRegistry.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerFormatRegistry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoE;AAEpE,+CAA4C;AAE5C,0CAAuO;AACvO,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAa,cAAc;IAClB,MAAM,CAAC,QAAQ,CAAS;IAE/B,qEAAqE;IAC9D,MAAM,CAAC,QAAQ,KAAK,qBAAS,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,+BAAoB,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,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5G,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,qBAAqB,CAAC,SAA2B,IAAyC,IAAA,qBAAM,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAExH;;;;;;;OAOG;IACI,MAAM,CAAC,kBAAkB,CAAC,cAAgC,EAAE,WAAmB,EAAE,OAAyB;QAC/G,IAAA,qBAAM,EAAC,KAAK,CAAC,CAAC;QACd,OAAO,SAAS,CAAC;IACnB,CAAC;CAEF;AA5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,QAAiB,EAAE,QAAiB,EAAE,WAAqB;QAC9I,IAAI,MAAyC,CAAC;QAC9C,IAAI,IAAoC,CAAC;QAEzC,IAAI,OAAO,cAAc,IAAI,QAAQ,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YAC3D,MAAM,QAAQ,GAAG,cAAc,CAAC;YAChC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC1C,MAAM,GAAG,KAAK,EAAE,IAAI,CAAC;YACrB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,MAAM,GAAI,yBAAc,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAC,CAAC,CAAC;gBACnE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;oBACzB,IAAI,GAAG,EAAC,MAAM,EAAE,WAAW,EAAC,CAAC;oBAC7B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;oBAC3B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBAC7B,CAAC;YAEH,CAAC;QACH,CAAC;aAAM,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE,CAAC;YAC9C,MAAM,KAAK,GAAG,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,+BAAoB,CAAC,aAAa,EAAE,CAAC;QAExD,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AAnGD,wDAmGC","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,sDAAoE;AAEpE,+CAA4C;AAE5C,0CAAuO;AACvO,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAa,cAAc;IAClB,MAAM,CAAC,QAAQ,CAAS;IAE/B,qEAAqE;IAC9D,MAAM,CAAC,QAAQ,KAAK,qBAAS,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,+BAAoB,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,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5G,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,qBAAqB,CAAC,SAA2B,IAAyC,IAAA,qBAAM,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAExH;;;;;;;OAOG;IACI,MAAM,CAAC,kBAAkB,CAAC,cAAgC,EAAE,WAAmB,EAAE,OAAyB;QAC/G,IAAA,qBAAM,EAAC,KAAK,CAAC,CAAC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yright (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
|
-
/**
|
|
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,EACnD,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;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3B;AAED;;;GAGG;AACH,qBAAa,mBAAmB;WACV,OAAO,CAAC,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;mBAa1D,MAAM;CA4F5B"}
|
|
@@ -413,12 +413,26 @@ class ToolAdmin {
|
|
|
413
413
|
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.
|
|
414
414
|
ToolAdmin.addEvent(ev);
|
|
415
415
|
};
|
|
416
|
+
/** Handler for modifier key transitions captured before focused UI elements can stop propagation. */
|
|
417
|
+
static _keyEventCaptureHandler = async (event) => {
|
|
418
|
+
const ev = event;
|
|
419
|
+
if (!ev.repeat) {
|
|
420
|
+
try {
|
|
421
|
+
await IModelApp_1.IModelApp.toolAdmin.onKeyTransitionCaptured(ev);
|
|
422
|
+
}
|
|
423
|
+
catch (err) {
|
|
424
|
+
await ToolAdmin.exceptionHandler(err);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
};
|
|
416
428
|
/** @internal */
|
|
417
429
|
onInitialized() {
|
|
418
430
|
if (typeof document === "undefined")
|
|
419
431
|
return; // if document isn't defined, we're probably running in a test environment. At any rate, we can't have interactive tools.
|
|
420
432
|
this._idleTool = IModelApp_1.IModelApp.tools.create("Idle");
|
|
421
433
|
["keydown", "keyup"].forEach((type) => {
|
|
434
|
+
document.addEventListener(type, ToolAdmin._keyEventCaptureHandler, true);
|
|
435
|
+
ToolAdmin._removals.push(() => document.removeEventListener(type, ToolAdmin._keyEventCaptureHandler, true));
|
|
422
436
|
document.addEventListener(type, ToolAdmin._keyEventHandler, false);
|
|
423
437
|
ToolAdmin._removals.push(() => document.removeEventListener(type, ToolAdmin._keyEventHandler, false));
|
|
424
438
|
});
|
|
@@ -1182,6 +1196,15 @@ class ToolAdmin {
|
|
|
1182
1196
|
this.updateDynamics(undefined, undefined, true); // Don't wait for motion to update dynamics...
|
|
1183
1197
|
}
|
|
1184
1198
|
}
|
|
1199
|
+
get _isFocusHome() {
|
|
1200
|
+
return (document.body === document.activeElement);
|
|
1201
|
+
}
|
|
1202
|
+
_setFocusHome() {
|
|
1203
|
+
const element = document.activeElement;
|
|
1204
|
+
if (element && element !== document.body)
|
|
1205
|
+
element.blur();
|
|
1206
|
+
document.body.focus();
|
|
1207
|
+
}
|
|
1185
1208
|
static getModifierKey(event) {
|
|
1186
1209
|
switch (event.key) {
|
|
1187
1210
|
case "Alt": return Tool_1.BeModifierKeys.Alt;
|
|
@@ -1212,17 +1235,41 @@ class ToolAdmin {
|
|
|
1212
1235
|
}
|
|
1213
1236
|
return { handled, result };
|
|
1214
1237
|
}
|
|
1215
|
-
/**
|
|
1238
|
+
/** Sub-classes should override to process shortcut key events.
|
|
1239
|
+
* @return true if handled and no further processing of event should occur.
|
|
1240
|
+
*/
|
|
1216
1241
|
async processShortcutKey(_keyEvent, _wentDown) {
|
|
1217
1242
|
return false;
|
|
1218
1243
|
}
|
|
1219
|
-
/** Event for every key down and up transition.
|
|
1220
|
-
|
|
1221
|
-
|
|
1244
|
+
/** Event for every key down and up transition.
|
|
1245
|
+
* @note Called before processShortcutKey.
|
|
1246
|
+
* @return true if handled and no further processing of event should occur.
|
|
1247
|
+
*/
|
|
1248
|
+
processKeyboardEvent(keyEvent, _wentDown) {
|
|
1249
|
+
if (this._isFocusHome || undefined !== IModelApp_1.IModelApp.accuDraw.getFocusItem())
|
|
1250
|
+
return false; // Focus is Home or AccuDraw, allow shortcuts...
|
|
1251
|
+
// NOTE: Provide a convenient way for the user to move focus to Home to use shortcuts.
|
|
1252
|
+
// Escape is the only practical choice with its default behavior that can cancel/close/blur.
|
|
1253
|
+
// Intentionally not checking wentDown as some ui elements stop propagation of down but not up (moving to capture is not a good option).
|
|
1254
|
+
// Apps that want to use Escape to start the default tool still can with Home focus in processShortcutKey.
|
|
1255
|
+
if (keyEvent.key === "Escape" && ToolSettings_1.ToolSettings.escapeMovesFocusToHome && !keyEvent.defaultPrevented && !keyEvent.isComposing)
|
|
1256
|
+
this._setFocusHome();
|
|
1257
|
+
return true;
|
|
1258
|
+
}
|
|
1259
|
+
/** Need to check for modifier changes on capture phase as a ui element that calls stopPropagation
|
|
1260
|
+
* prevents onKeyTransition from being called when bubbling.
|
|
1261
|
+
*/
|
|
1262
|
+
async onKeyTransitionCaptured(keyEvent) {
|
|
1222
1263
|
this.currentInputState.setKeyQualifiers(keyEvent);
|
|
1223
1264
|
const modifierKey = ToolAdmin.getModifierKey(keyEvent);
|
|
1224
1265
|
if (Tool_1.BeModifierKeys.None !== modifierKey)
|
|
1225
|
-
return this.onModifierKeyTransition(
|
|
1266
|
+
return this.onModifierKeyTransition("keydown" === keyEvent.type, modifierKey, keyEvent);
|
|
1267
|
+
}
|
|
1268
|
+
/** Event for every key down and up transition. */
|
|
1269
|
+
async onKeyTransition(event, wentDown) {
|
|
1270
|
+
const keyEvent = event.ev;
|
|
1271
|
+
if (this.processKeyboardEvent(keyEvent, wentDown))
|
|
1272
|
+
return Tool_1.EventHandled.Yes;
|
|
1226
1273
|
if (wentDown && keyEvent.ctrlKey) {
|
|
1227
1274
|
const { handled, result } = await this.onCtrlKeyPressed(keyEvent);
|
|
1228
1275
|
if (handled)
|
|
@@ -1237,6 +1284,23 @@ class ToolAdmin {
|
|
|
1237
1284
|
return Tool_1.EventHandled.Yes;
|
|
1238
1285
|
return Tool_1.EventHandled.No;
|
|
1239
1286
|
}
|
|
1287
|
+
/** Finish the active edit command before performing a transaction operation like undo/redo.
|
|
1288
|
+
* @internal
|
|
1289
|
+
*/
|
|
1290
|
+
async finishEditCommandForTxnOperation() {
|
|
1291
|
+
// NOTE: Because restartPrimitiveTool is called after an undo/redo the active tool won't be left in an invalid state...
|
|
1292
|
+
if (undefined === this._editCommandHandler)
|
|
1293
|
+
return true;
|
|
1294
|
+
try {
|
|
1295
|
+
await this._editCommandHandler.finishCommand();
|
|
1296
|
+
return true;
|
|
1297
|
+
}
|
|
1298
|
+
catch (err) {
|
|
1299
|
+
const message = err instanceof Error ? err.message : IModelApp_1.IModelApp.localization.getLocalizedString("iModelJs:Errors.UnableToFinishActiveEditCommand");
|
|
1300
|
+
IModelApp_1.IModelApp.notifications.outputMessage(new NotificationManager_1.NotifyMessageDetails(NotificationManager_1.OutputMessagePriority.Warning, message));
|
|
1301
|
+
return false;
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1240
1304
|
/** Called to undo previous data button for primitive tools or undo last write operation. */
|
|
1241
1305
|
async doUndoOperation() {
|
|
1242
1306
|
const activeTool = this.activeTool;
|
|
@@ -1248,7 +1312,9 @@ class ToolAdmin {
|
|
|
1248
1312
|
const imodel = IModelApp_1.IModelApp.viewManager.selectedView?.view.iModel;
|
|
1249
1313
|
if (undefined === imodel || imodel.isReadonly || !imodel.isBriefcaseConnection())
|
|
1250
1314
|
return false;
|
|
1251
|
-
|
|
1315
|
+
if (!await this.finishEditCommandForTxnOperation())
|
|
1316
|
+
return false;
|
|
1317
|
+
return imodel.txns.reverseSingleTxnAsync().then(() => true).catch(() => false);
|
|
1252
1318
|
}
|
|
1253
1319
|
/** Called to redo previous data button for primitive tools or undo last write operation. */
|
|
1254
1320
|
async doRedoOperation() {
|
|
@@ -1261,7 +1327,9 @@ class ToolAdmin {
|
|
|
1261
1327
|
const imodel = IModelApp_1.IModelApp.viewManager.selectedView?.view.iModel;
|
|
1262
1328
|
if (undefined === imodel || imodel.isReadonly || !imodel.isBriefcaseConnection())
|
|
1263
1329
|
return false;
|
|
1264
|
-
|
|
1330
|
+
if (!await this.finishEditCommandForTxnOperation())
|
|
1331
|
+
return false;
|
|
1332
|
+
return imodel.txns.reinstateTxnAsync().then(() => true).catch(() => false);
|
|
1265
1333
|
}
|
|
1266
1334
|
onActiveToolChanged(tool, start) {
|
|
1267
1335
|
this.clearMotionPromises();
|