@itwin/core-frontend 4.3.0-dev.0 → 4.3.0-dev.2

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 CHANGED
@@ -1,6 +1,11 @@
1
1
  # Change Log - @itwin/core-frontend
2
2
 
3
- This log was last generated on Fri, 29 Sep 2023 18:24:48 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 06 Oct 2023 04:02:58 GMT and should not be manually modified.
4
+
5
+ ## 4.1.8
6
+ Fri, 06 Oct 2023 04:00:18 GMT
7
+
8
+ _Version update only_
4
9
 
5
10
  ## 4.1.7
6
11
  Thu, 28 Sep 2023 21:41:33 GMT
@@ -100,7 +100,7 @@ class RealityDataSourceTilesetUrlImpl {
100
100
  return (0, Request_1.request)(tileUrl, "json");
101
101
  }
102
102
  getTileContentType(url) {
103
- return url.endsWith("json") ? "tileset" : "tile";
103
+ return new URL(url, "https://localhost/").pathname.toLowerCase().endsWith("json") ? "tileset" : "tile";
104
104
  }
105
105
  /**
106
106
  * Gets spatial location and extents of this reality data source
@@ -1 +1 @@
1
- {"version":3,"file":"RealityDataSourceTilesetUrlImpl.js","sourceRoot":"","sources":["../../src/RealityDataSourceTilesetUrlImpl.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAwE;AACxE,oDAAoJ;AAEpJ,+CAA4C;AAE5C,8CAA8D;AAE9D;;;;;;EAME;AACF,MAAa,+BAA+B;IAO1C;;OAEG;IACH,YAAsB,KAA6B;QANnD,sIAAsI;QAC9H,aAAQ,GAAW,EAAE,CAAC;QAM5B,IAAA,qBAAM,EAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,KAAK,iCAAmB,CAAC,UAAU,IAAI,KAAK,CAAC,SAAS,CAAC,QAAQ,KAAK,iCAAmB,CAAC,WAAW,CAAC,CAAC;QACpI,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;QAC3B,IAAI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CAAC,KAAK,EAAE,2BAA2B,CAAC,CAAC;QAE1E,+EAA+E;QAC/E,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACrB,OAAO,IAAA,iBAAO,EAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,cAAc,CAAC,IAAY;QACtC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErC,OAAO,IAAA,iBAAO,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,WAAW,CAAC,IAAY;QACnC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErC,OAAO,IAAA,iBAAO,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IAEM,kBAAkB,CAAC,GAAW;QACnC,OAAO,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,4BAA4B;QACvC,IAAI,eAAsD,CAAC;QAC3D,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,+BAAiB,CAAC,UAAU,EAAE;YACpD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;YAC3D,eAAe,GAAG,sCAA2B,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC;SAC1F;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACD;;;;;OAKG;IACI,KAAK,CAAC,uBAAuB;QAClC,IAAI,aAA+C,CAAC;QACpD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AA1HD,0EA0HC","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 Tiles\r\n */\r\nimport { assert, BentleyStatus, GuidString } from \"@itwin/core-bentley\";\r\nimport { IModelError, RealityData, RealityDataFormat, RealityDataProvider, RealityDataSourceKey, RealityDataSourceProps } from \"@itwin/core-common\";\r\n\r\nimport { request } from \"./request/Request\";\r\nimport { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from \"./RealityDataSource\";\r\nimport { ThreeDTileFormatInterpreter } from \"./tile/internal\";\r\n\r\n/** This class provides access to the reality data provider services.\r\n * It encapsulates access to a reality data weiter it be from local access, http or ProjectWise Context Share.\r\n * The key provided at the creation determines if this is ProjectWise Context Share reference.\r\n * If not then it is considered local (ex: C:\\temp\\TileRoot.json) or plain http access (http://someserver.com/data/TileRoot.json)\r\n * There is a one to one relationship between a reality data and the instances of present class.\r\n* @internal\r\n*/\r\nexport class RealityDataSourceTilesetUrlImpl implements RealityDataSource {\r\n public readonly key: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n private _tilesetUrl: string | undefined;\r\n /** For use by all Reality Data. For RD stored on PW Context Share, represents the portion from the root of the Azure Blob Container*/\r\n private _baseUrl: string = \"\";\r\n\r\n /** Construct a new reality data source.\r\n * @param props JSON representation of the reality data source\r\n */\r\n protected constructor(props: RealityDataSourceProps) {\r\n assert(props.sourceKey.provider === RealityDataProvider.TilesetUrl || props.sourceKey.provider === RealityDataProvider.OrbitGtBlob);\r\n this.key = props.sourceKey;\r\n this._tilesetUrl = this.key.id;\r\n }\r\n\r\n /**\r\n * Create an instance of this class from a source key and iTwin context/\r\n */\r\n public static async createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\r\n if (sourceKey.provider !== RealityDataProvider.TilesetUrl)\r\n return undefined;\r\n const rdSource = new RealityDataSourceTilesetUrlImpl({ sourceKey });\r\n return rdSource;\r\n }\r\n\r\n public get isContextShare(): boolean {\r\n return false;\r\n }\r\n /**\r\n * Returns Reality Data if available\r\n */\r\n public get realityData(): RealityData | undefined {\r\n return undefined;\r\n }\r\n public get realityDataId(): string | undefined {\r\n return undefined;\r\n }\r\n /**\r\n * Returns Reality Data type if available\r\n */\r\n public get realityDataType(): string | undefined {\r\n return undefined;\r\n }\r\n\r\n // This is to set the root url from the provided root document path.\r\n // If the root document is stored on PW Context Share then the root document property of the Reality Data is provided,\r\n // otherwise the full path to root document is given.\r\n // The base URL contains the base URL from which tile relative path are constructed.\r\n // The tile's path root will need to be reinserted for child tiles to return a 200\r\n private setBaseUrl(url: string): void {\r\n const urlParts = url.split(\"/\");\r\n urlParts.pop();\r\n if (urlParts.length === 0)\r\n this._baseUrl = \"\";\r\n else\r\n this._baseUrl = `${urlParts.join(\"/\")}/`;\r\n }\r\n\r\n /**\r\n * This method returns the URL to access the actual 3d tiles from the service provider.\r\n * @returns string containing the URL to reality data.\r\n */\r\n public async getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined> {\r\n return this._tilesetUrl;\r\n }\r\n\r\n public async getRootDocument(iTwinId: GuidString | undefined): Promise<any> {\r\n const url = await this.getServiceUrl(iTwinId);\r\n if (!url)\r\n throw new IModelError(BentleyStatus.ERROR, \"Unable to get service url\");\r\n\r\n // The following is only if the reality data is not stored on PW Context Share.\r\n this.setBaseUrl(url);\r\n return request(url, \"json\");\r\n }\r\n\r\n /**\r\n * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileContent(name: string): Promise<ArrayBuffer> {\r\n const tileUrl = this._baseUrl + name;\r\n\r\n return request(tileUrl, \"arraybuffer\");\r\n }\r\n\r\n /**\r\n * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileJson(name: string): Promise<any> {\r\n const tileUrl = this._baseUrl + name;\r\n\r\n return request(tileUrl, \"json\");\r\n }\r\n\r\n public getTileContentType(url: string): \"tile\" | \"tileset\" {\r\n return url.endsWith(\"json\") ? \"tileset\" : \"tile\";\r\n }\r\n\r\n /**\r\n * Gets spatial location and extents of this reality data source\r\n * @returns spatial location and extents\r\n * @internal\r\n */\r\n public async getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined> {\r\n let spatialLocation: SpatialLocationAndExtents | undefined;\r\n if (this.key.format === RealityDataFormat.ThreeDTile) {\r\n const rootDocument = await this.getRootDocument(undefined);\r\n spatialLocation = ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);\r\n }\r\n return spatialLocation;\r\n }\r\n /**\r\n * Gets information to identify the product and engine that create this reality data\r\n * Will return undefined if cannot be resolved\r\n * @returns information to identify the product and engine that create this reality data\r\n * @alpha\r\n */\r\n public async getPublisherProductInfo(): Promise<PublisherProductInfo | undefined> {\r\n let publisherInfo: PublisherProductInfo | undefined;\r\n return publisherInfo;\r\n }\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"RealityDataSourceTilesetUrlImpl.js","sourceRoot":"","sources":["../../src/RealityDataSourceTilesetUrlImpl.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAwE;AACxE,oDAAoJ;AAEpJ,+CAA4C;AAE5C,8CAA8D;AAE9D;;;;;;EAME;AACF,MAAa,+BAA+B;IAO1C;;OAEG;IACH,YAAsB,KAA6B;QANnD,sIAAsI;QAC9H,aAAQ,GAAW,EAAE,CAAC;QAM5B,IAAA,qBAAM,EAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,KAAK,iCAAmB,CAAC,UAAU,IAAI,KAAK,CAAC,SAAS,CAAC,QAAQ,KAAK,iCAAmB,CAAC,WAAW,CAAC,CAAC;QACpI,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,SAA+B,E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EAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,cAAc,CAAC,IAAY;QACtC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErC,OAAO,IAAA,iBAAO,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,WAAW,CAAC,IAAY;QACnC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErC,OAAO,IAAA,iBAAO,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IAEM,kBAAkB,CAAC,GAAW;QACnC,OAAO,IAAI,GAAG,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IACzG,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,4BAA4B;QACvC,IAAI,eAAsD,CAAC;QAC3D,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,+BAAiB,CAAC,UAAU,EAAE;YACpD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;YAC3D,eAAe,GAAG,sCAA2B,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC;SAC1F;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACD;;;;;OAKG;IACI,KAAK,CAAC,uBAAuB;QAClC,IAAI,aAA+C,CAAC;QACpD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AA1HD,0EA0HC","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 Tiles\r\n */\r\nimport { assert, BentleyStatus, GuidString } from \"@itwin/core-bentley\";\r\nimport { IModelError, RealityData, RealityDataFormat, RealityDataProvider, RealityDataSourceKey, RealityDataSourceProps } from \"@itwin/core-common\";\r\n\r\nimport { request } from \"./request/Request\";\r\nimport { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from \"./RealityDataSource\";\r\nimport { ThreeDTileFormatInterpreter } from \"./tile/internal\";\r\n\r\n/** This class provides access to the reality data provider services.\r\n * It encapsulates access to a reality data weiter it be from local access, http or ProjectWise Context Share.\r\n * The key provided at the creation determines if this is ProjectWise Context Share reference.\r\n * If not then it is considered local (ex: C:\\temp\\TileRoot.json) or plain http access (http://someserver.com/data/TileRoot.json)\r\n * There is a one to one relationship between a reality data and the instances of present class.\r\n* @internal\r\n*/\r\nexport class RealityDataSourceTilesetUrlImpl implements RealityDataSource {\r\n public readonly key: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n private _tilesetUrl: string | undefined;\r\n /** For use by all Reality Data. For RD stored on PW Context Share, represents the portion from the root of the Azure Blob Container*/\r\n private _baseUrl: string = \"\";\r\n\r\n /** Construct a new reality data source.\r\n * @param props JSON representation of the reality data source\r\n */\r\n protected constructor(props: RealityDataSourceProps) {\r\n assert(props.sourceKey.provider === RealityDataProvider.TilesetUrl || props.sourceKey.provider === RealityDataProvider.OrbitGtBlob);\r\n this.key = props.sourceKey;\r\n this._tilesetUrl = this.key.id;\r\n }\r\n\r\n /**\r\n * Create an instance of this class from a source key and iTwin context/\r\n */\r\n public static async createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\r\n if (sourceKey.provider !== RealityDataProvider.TilesetUrl)\r\n return undefined;\r\n const rdSource = new RealityDataSourceTilesetUrlImpl({ sourceKey });\r\n return rdSource;\r\n }\r\n\r\n public get isContextShare(): boolean {\r\n return false;\r\n }\r\n /**\r\n * Returns Reality Data if available\r\n */\r\n public get realityData(): RealityData | undefined {\r\n return undefined;\r\n }\r\n public get realityDataId(): string | undefined {\r\n return undefined;\r\n }\r\n /**\r\n * Returns Reality Data type if available\r\n */\r\n public get realityDataType(): string | undefined {\r\n return undefined;\r\n }\r\n\r\n // This is to set the root url from the provided root document path.\r\n // If the root document is stored on PW Context Share then the root document property of the Reality Data is provided,\r\n // otherwise the full path to root document is given.\r\n // The base URL contains the base URL from which tile relative path are constructed.\r\n // The tile's path root will need to be reinserted for child tiles to return a 200\r\n private setBaseUrl(url: string): void {\r\n const urlParts = url.split(\"/\");\r\n urlParts.pop();\r\n if (urlParts.length === 0)\r\n this._baseUrl = \"\";\r\n else\r\n this._baseUrl = `${urlParts.join(\"/\")}/`;\r\n }\r\n\r\n /**\r\n * This method returns the URL to access the actual 3d tiles from the service provider.\r\n * @returns string containing the URL to reality data.\r\n */\r\n public async getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined> {\r\n return this._tilesetUrl;\r\n }\r\n\r\n public async getRootDocument(iTwinId: GuidString | undefined): Promise<any> {\r\n const url = await this.getServiceUrl(iTwinId);\r\n if (!url)\r\n throw new IModelError(BentleyStatus.ERROR, \"Unable to get service url\");\r\n\r\n // The following is only if the reality data is not stored on PW Context Share.\r\n this.setBaseUrl(url);\r\n return request(url, \"json\");\r\n }\r\n\r\n /**\r\n * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileContent(name: string): Promise<ArrayBuffer> {\r\n const tileUrl = this._baseUrl + name;\r\n\r\n return request(tileUrl, \"arraybuffer\");\r\n }\r\n\r\n /**\r\n * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileJson(name: string): Promise<any> {\r\n const tileUrl = this._baseUrl + name;\r\n\r\n return request(tileUrl, \"json\");\r\n }\r\n\r\n public getTileContentType(url: string): \"tile\" | \"tileset\" {\r\n return new URL(url, \"https://localhost/\").pathname.toLowerCase().endsWith(\"json\") ? \"tileset\" : \"tile\";\r\n }\r\n\r\n /**\r\n * Gets spatial location and extents of this reality data source\r\n * @returns spatial location and extents\r\n * @internal\r\n */\r\n public async getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined> {\r\n let spatialLocation: SpatialLocationAndExtents | undefined;\r\n if (this.key.format === RealityDataFormat.ThreeDTile) {\r\n const rootDocument = await this.getRootDocument(undefined);\r\n spatialLocation = ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);\r\n }\r\n return spatialLocation;\r\n }\r\n /**\r\n * Gets information to identify the product and engine that create this reality data\r\n * Will return undefined if cannot be resolved\r\n * @returns information to identify the product and engine that create this reality data\r\n * @alpha\r\n */\r\n public async getPublisherProductInfo(): Promise<PublisherProductInfo | undefined> {\r\n let publisherInfo: PublisherProductInfo | undefined;\r\n return publisherInfo;\r\n }\r\n}\r\n\r\n"]}
@@ -97,7 +97,7 @@ export class RealityDataSourceTilesetUrlImpl {
97
97
  return request(tileUrl, "json");
98
98
  }
99
99
  getTileContentType(url) {
100
- return url.endsWith("json") ? "tileset" : "tile";
100
+ return new URL(url, "https://localhost/").pathname.toLowerCase().endsWith("json") ? "tileset" : "tile";
101
101
  }
102
102
  /**
103
103
  * Gets spatial location and extents of this reality data source
@@ -1 +1 @@
1
- {"version":3,"file":"RealityDataSourceTilesetUrlImpl.js","sourceRoot":"","sources":["../../src/RealityDataSourceTilesetUrlImpl.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAc,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAe,iBAAiB,EAAE,mBAAmB,EAAgD,MAAM,oBAAoB,CAAC;AAEpJ,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D;;;;;;EAME;AACF,MAAM,OAAO,+BAA+B;IAO1C;;OAEG;IACH,YAAsB,K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e,CAAC;IACzB,CAAC;IACD;;;;;OAKG;IACI,KAAK,CAAC,uBAAuB;QAClC,IAAI,aAA+C,CAAC;QACpD,OAAO,aAAa,CAAC;IACvB,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 Tiles\r\n */\r\nimport { assert, BentleyStatus, GuidString } from \"@itwin/core-bentley\";\r\nimport { IModelError, RealityData, RealityDataFormat, RealityDataProvider, RealityDataSourceKey, RealityDataSourceProps } from \"@itwin/core-common\";\r\n\r\nimport { request } from \"./request/Request\";\r\nimport { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from \"./RealityDataSource\";\r\nimport { ThreeDTileFormatInterpreter } from \"./tile/internal\";\r\n\r\n/** This class provides access to the reality data provider services.\r\n * It encapsulates access to a reality data weiter it be from local access, http or ProjectWise Context Share.\r\n * The key provided at the creation determines if this is ProjectWise Context Share reference.\r\n * If not then it is considered local (ex: C:\\temp\\TileRoot.json) or plain http access (http://someserver.com/data/TileRoot.json)\r\n * There is a one to one relationship between a reality data and the instances of present class.\r\n* @internal\r\n*/\r\nexport class RealityDataSourceTilesetUrlImpl implements RealityDataSource {\r\n public readonly key: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n private _tilesetUrl: string | undefined;\r\n /** For use by all Reality Data. For RD stored on PW Context Share, represents the portion from the root of the Azure Blob Container*/\r\n private _baseUrl: string = \"\";\r\n\r\n /** Construct a new reality data source.\r\n * @param props JSON representation of the reality data source\r\n */\r\n protected constructor(props: RealityDataSourceProps) {\r\n assert(props.sourceKey.provider === RealityDataProvider.TilesetUrl || props.sourceKey.provider === RealityDataProvider.OrbitGtBlob);\r\n this.key = props.sourceKey;\r\n this._tilesetUrl = this.key.id;\r\n }\r\n\r\n /**\r\n * Create an instance of this class from a source key and iTwin context/\r\n */\r\n public static async createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\r\n if (sourceKey.provider !== RealityDataProvider.TilesetUrl)\r\n return undefined;\r\n const rdSource = new RealityDataSourceTilesetUrlImpl({ sourceKey });\r\n return rdSource;\r\n }\r\n\r\n public get isContextShare(): boolean {\r\n return false;\r\n }\r\n /**\r\n * Returns Reality Data if available\r\n */\r\n public get realityData(): RealityData | undefined {\r\n return undefined;\r\n }\r\n public get realityDataId(): string | undefined {\r\n return undefined;\r\n }\r\n /**\r\n * Returns Reality Data type if available\r\n */\r\n public get realityDataType(): string | undefined {\r\n return undefined;\r\n }\r\n\r\n // This is to set the root url from the provided root document path.\r\n // If the root document is stored on PW Context Share then the root document property of the Reality Data is provided,\r\n // otherwise the full path to root document is given.\r\n // The base URL contains the base URL from which tile relative path are constructed.\r\n // The tile's path root will need to be reinserted for child tiles to return a 200\r\n private setBaseUrl(url: string): void {\r\n const urlParts = url.split(\"/\");\r\n urlParts.pop();\r\n if (urlParts.length === 0)\r\n this._baseUrl = \"\";\r\n else\r\n this._baseUrl = `${urlParts.join(\"/\")}/`;\r\n }\r\n\r\n /**\r\n * This method returns the URL to access the actual 3d tiles from the service provider.\r\n * @returns string containing the URL to reality data.\r\n */\r\n public async getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined> {\r\n return this._tilesetUrl;\r\n }\r\n\r\n public async getRootDocument(iTwinId: GuidString | undefined): Promise<any> {\r\n const url = await this.getServiceUrl(iTwinId);\r\n if (!url)\r\n throw new IModelError(BentleyStatus.ERROR, \"Unable to get service url\");\r\n\r\n // The following is only if the reality data is not stored on PW Context Share.\r\n this.setBaseUrl(url);\r\n return request(url, \"json\");\r\n }\r\n\r\n /**\r\n * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileContent(name: string): Promise<ArrayBuffer> {\r\n const tileUrl = this._baseUrl + name;\r\n\r\n return request(tileUrl, \"arraybuffer\");\r\n }\r\n\r\n /**\r\n * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileJson(name: string): Promise<any> {\r\n const tileUrl = this._baseUrl + name;\r\n\r\n return request(tileUrl, \"json\");\r\n }\r\n\r\n public getTileContentType(url: string): \"tile\" | \"tileset\" {\r\n return url.endsWith(\"json\") ? \"tileset\" : \"tile\";\r\n }\r\n\r\n /**\r\n * Gets spatial location and extents of this reality data source\r\n * @returns spatial location and extents\r\n * @internal\r\n */\r\n public async getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined> {\r\n let spatialLocation: SpatialLocationAndExtents | undefined;\r\n if (this.key.format === RealityDataFormat.ThreeDTile) {\r\n const rootDocument = await this.getRootDocument(undefined);\r\n spatialLocation = ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);\r\n }\r\n return spatialLocation;\r\n }\r\n /**\r\n * Gets information to identify the product and engine that create this reality data\r\n * Will return undefined if cannot be resolved\r\n * @returns information to identify the product and engine that create this reality data\r\n * @alpha\r\n */\r\n public async getPublisherProductInfo(): Promise<PublisherProductInfo | undefined> {\r\n let publisherInfo: PublisherProductInfo | undefined;\r\n return publisherInfo;\r\n }\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"RealityDataSourceTilesetUrlImpl.js","sourceRoot":"","sources":["../../src/RealityDataSourceTilesetUrlImpl.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAc,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAe,iBAAiB,EAAE,mBAAmB,EAAgD,MAAM,oBAAoB,CAAC;AAEpJ,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D;;;;;;EAME;AACF,MAAM,OAAO,+BAA+B;IAO1C;;OAE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C3D,eAAe,GAAG,2BAA2B,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC;SAC1F;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACD;;;;;OAKG;IACI,KAAK,CAAC,uBAAuB;QAClC,IAAI,aAA+C,CAAC;QACpD,OAAO,aAAa,CAAC;IACvB,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 Tiles\r\n */\r\nimport { assert, BentleyStatus, GuidString } from \"@itwin/core-bentley\";\r\nimport { IModelError, RealityData, RealityDataFormat, RealityDataProvider, RealityDataSourceKey, RealityDataSourceProps } from \"@itwin/core-common\";\r\n\r\nimport { request } from \"./request/Request\";\r\nimport { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from \"./RealityDataSource\";\r\nimport { ThreeDTileFormatInterpreter } from \"./tile/internal\";\r\n\r\n/** This class provides access to the reality data provider services.\r\n * It encapsulates access to a reality data weiter it be from local access, http or ProjectWise Context Share.\r\n * The key provided at the creation determines if this is ProjectWise Context Share reference.\r\n * If not then it is considered local (ex: C:\\temp\\TileRoot.json) or plain http access (http://someserver.com/data/TileRoot.json)\r\n * There is a one to one relationship between a reality data and the instances of present class.\r\n* @internal\r\n*/\r\nexport class RealityDataSourceTilesetUrlImpl implements RealityDataSource {\r\n public readonly key: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n private _tilesetUrl: string | undefined;\r\n /** For use by all Reality Data. For RD stored on PW Context Share, represents the portion from the root of the Azure Blob Container*/\r\n private _baseUrl: string = \"\";\r\n\r\n /** Construct a new reality data source.\r\n * @param props JSON representation of the reality data source\r\n */\r\n protected constructor(props: RealityDataSourceProps) {\r\n assert(props.sourceKey.provider === RealityDataProvider.TilesetUrl || props.sourceKey.provider === RealityDataProvider.OrbitGtBlob);\r\n this.key = props.sourceKey;\r\n this._tilesetUrl = this.key.id;\r\n }\r\n\r\n /**\r\n * Create an instance of this class from a source key and iTwin context/\r\n */\r\n public static async createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined> {\r\n if (sourceKey.provider !== RealityDataProvider.TilesetUrl)\r\n return undefined;\r\n const rdSource = new RealityDataSourceTilesetUrlImpl({ sourceKey });\r\n return rdSource;\r\n }\r\n\r\n public get isContextShare(): boolean {\r\n return false;\r\n }\r\n /**\r\n * Returns Reality Data if available\r\n */\r\n public get realityData(): RealityData | undefined {\r\n return undefined;\r\n }\r\n public get realityDataId(): string | undefined {\r\n return undefined;\r\n }\r\n /**\r\n * Returns Reality Data type if available\r\n */\r\n public get realityDataType(): string | undefined {\r\n return undefined;\r\n }\r\n\r\n // This is to set the root url from the provided root document path.\r\n // If the root document is stored on PW Context Share then the root document property of the Reality Data is provided,\r\n // otherwise the full path to root document is given.\r\n // The base URL contains the base URL from which tile relative path are constructed.\r\n // The tile's path root will need to be reinserted for child tiles to return a 200\r\n private setBaseUrl(url: string): void {\r\n const urlParts = url.split(\"/\");\r\n urlParts.pop();\r\n if (urlParts.length === 0)\r\n this._baseUrl = \"\";\r\n else\r\n this._baseUrl = `${urlParts.join(\"/\")}/`;\r\n }\r\n\r\n /**\r\n * This method returns the URL to access the actual 3d tiles from the service provider.\r\n * @returns string containing the URL to reality data.\r\n */\r\n public async getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined> {\r\n return this._tilesetUrl;\r\n }\r\n\r\n public async getRootDocument(iTwinId: GuidString | undefined): Promise<any> {\r\n const url = await this.getServiceUrl(iTwinId);\r\n if (!url)\r\n throw new IModelError(BentleyStatus.ERROR, \"Unable to get service url\");\r\n\r\n // The following is only if the reality data is not stored on PW Context Share.\r\n this.setBaseUrl(url);\r\n return request(url, \"json\");\r\n }\r\n\r\n /**\r\n * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileContent(name: string): Promise<ArrayBuffer> {\r\n const tileUrl = this._baseUrl + name;\r\n\r\n return request(tileUrl, \"arraybuffer\");\r\n }\r\n\r\n /**\r\n * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileJson(name: string): Promise<any> {\r\n const tileUrl = this._baseUrl + name;\r\n\r\n return request(tileUrl, \"json\");\r\n }\r\n\r\n public getTileContentType(url: string): \"tile\" | \"tileset\" {\r\n return new URL(url, \"https://localhost/\").pathname.toLowerCase().endsWith(\"json\") ? \"tileset\" : \"tile\";\r\n }\r\n\r\n /**\r\n * Gets spatial location and extents of this reality data source\r\n * @returns spatial location and extents\r\n * @internal\r\n */\r\n public async getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined> {\r\n let spatialLocation: SpatialLocationAndExtents | undefined;\r\n if (this.key.format === RealityDataFormat.ThreeDTile) {\r\n const rootDocument = await this.getRootDocument(undefined);\r\n spatialLocation = ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);\r\n }\r\n return spatialLocation;\r\n }\r\n /**\r\n * Gets information to identify the product and engine that create this reality data\r\n * Will return undefined if cannot be resolved\r\n * @returns information to identify the product and engine that create this reality data\r\n * @alpha\r\n */\r\n public async getPublisherProductInfo(): Promise<PublisherProductInfo | undefined> {\r\n let publisherInfo: PublisherProductInfo | undefined;\r\n return publisherInfo;\r\n }\r\n}\r\n\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/core-frontend",
3
- "version": "4.3.0-dev.0",
3
+ "version": "4.3.0-dev.2",
4
4
  "description": "iTwin.js frontend components",
5
5
  "main": "lib/cjs/core-frontend.js",
6
6
  "module": "lib/esm/core-frontend.js",
@@ -23,12 +23,12 @@
23
23
  "url": "http://www.bentley.com"
24
24
  },
25
25
  "peerDependencies": {
26
- "@itwin/appui-abstract": "^4.3.0-dev.0",
27
- "@itwin/core-bentley": "^4.3.0-dev.0",
28
- "@itwin/core-common": "^4.3.0-dev.0",
29
- "@itwin/core-geometry": "^4.3.0-dev.0",
30
- "@itwin/core-orbitgt": "^4.3.0-dev.0",
31
- "@itwin/core-quantity": "^4.3.0-dev.0"
26
+ "@itwin/appui-abstract": "^4.3.0-dev.2",
27
+ "@itwin/core-bentley": "^4.3.0-dev.2",
28
+ "@itwin/core-common": "^4.3.0-dev.2",
29
+ "@itwin/core-geometry": "^4.3.0-dev.2",
30
+ "@itwin/core-orbitgt": "^4.3.0-dev.2",
31
+ "@itwin/core-quantity": "^4.3.0-dev.2"
32
32
  },
33
33
  "//devDependencies": [
34
34
  "NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install",
@@ -55,14 +55,14 @@
55
55
  "source-map-loader": "^4.0.0",
56
56
  "typescript": "~5.0.2",
57
57
  "webpack": "^5.76.0",
58
- "@itwin/appui-abstract": "4.3.0-dev.0",
59
- "@itwin/core-bentley": "4.3.0-dev.0",
60
- "@itwin/build-tools": "4.3.0-dev.0",
61
- "@itwin/core-common": "4.3.0-dev.0",
62
- "@itwin/core-geometry": "4.3.0-dev.0",
63
- "@itwin/core-orbitgt": "4.3.0-dev.0",
64
- "@itwin/core-quantity": "4.3.0-dev.0",
65
- "@itwin/certa": "4.3.0-dev.0"
58
+ "@itwin/appui-abstract": "4.3.0-dev.2",
59
+ "@itwin/build-tools": "4.3.0-dev.2",
60
+ "@itwin/core-bentley": "4.3.0-dev.2",
61
+ "@itwin/core-common": "4.3.0-dev.2",
62
+ "@itwin/core-geometry": "4.3.0-dev.2",
63
+ "@itwin/core-orbitgt": "4.3.0-dev.2",
64
+ "@itwin/core-quantity": "4.3.0-dev.2",
65
+ "@itwin/certa": "4.3.0-dev.2"
66
66
  },
67
67
  "//dependencies": [
68
68
  "NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API",
@@ -75,9 +75,9 @@
75
75
  "@loaders.gl/draco": "^3.1.6",
76
76
  "fuse.js": "^3.3.0",
77
77
  "wms-capabilities": "0.4.0",
78
- "@itwin/core-i18n": "4.3.0-dev.0",
79
- "@itwin/webgl-compatibility": "4.3.0-dev.0",
80
- "@itwin/core-telemetry": "4.3.0-dev.0"
78
+ "@itwin/core-i18n": "4.3.0-dev.2",
79
+ "@itwin/core-telemetry": "4.3.0-dev.2",
80
+ "@itwin/webgl-compatibility": "4.3.0-dev.2"
81
81
  },
82
82
  "nyc": {
83
83
  "extends": "./node_modules/@itwin/build-tools/.nycrc"