@itwin/presentation-frontend 5.3.0-dev.2 → 5.3.0-dev.21
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 +23 -1
- package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/Diagnostics.js.map +1 -1
- package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
- package/lib/cjs/presentation-frontend/IModelConnectionInitialization.js.map +1 -1
- package/lib/cjs/presentation-frontend/InternalSymbols.js.map +1 -1
- package/lib/cjs/presentation-frontend/IpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-frontend/LocalizationHelper.js.map +1 -1
- package/lib/cjs/presentation-frontend/Presentation.js.map +1 -1
- package/lib/cjs/presentation-frontend/PresentationManager.d.ts +8 -8
- package/lib/cjs/presentation-frontend/PresentationManager.js +6 -6
- package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/RulesetManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/RulesetVariablesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/StreamedResponseGenerator.js.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +7 -7
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend.js.map +1 -1
- package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/Diagnostics.js.map +1 -1
- package/lib/esm/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
- package/lib/esm/presentation-frontend/IModelConnectionInitialization.js.map +1 -1
- package/lib/esm/presentation-frontend/InternalSymbols.js.map +1 -1
- package/lib/esm/presentation-frontend/IpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-frontend/LocalizationHelper.js.map +1 -1
- package/lib/esm/presentation-frontend/Presentation.js.map +1 -1
- package/lib/esm/presentation-frontend/PresentationManager.d.ts +8 -8
- package/lib/esm/presentation-frontend/PresentationManager.js +6 -6
- package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/esm/presentation-frontend/RulesetManager.js.map +1 -1
- package/lib/esm/presentation-frontend/RulesetVariablesManager.js.map +1 -1
- package/lib/esm/presentation-frontend/StreamedResponseGenerator.js.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +7 -7
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHandler.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHelper.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionManager.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
- package/lib/esm/presentation-frontend.js.map +1 -1
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionScopesManager.js","sourceRo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CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAjED,wDAiEC;AAED;;;;;;GAMG;AACH,SAAgB,yBAAyB,CAAC,KAAgE;IACxG,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC;IAC3B,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;IACvB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/* eslint-disable @typescript-eslint/no-deprecated */\n/** @packageDocumentation\n * @module UnifiedSelection\n */\n\nimport { Id64Arg } from \"@itwin/core-bentley\";\nimport { IModelRpcProps } from \"@itwin/core-common\";\nimport { IModelConnection } from \"@itwin/core-frontend\";\nimport {\n ClientDiagnosticsAttribute,\n ComputeSelectionRequestOptions,\n DEFAULT_KEYS_BATCH_SIZE,\n KeySet,\n KeySetJSON,\n SelectionScope,\n SelectionScopeProps,\n SelectionScopeRequestOptions,\n} from \"@itwin/presentation-common\";\nimport { RpcRequestsHandler } from \"@itwin/presentation-common/internal\";\n\n/**\n * Properties for creating [[SelectionScopesManager]].\n * @public\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport interface SelectionScopesManagerProps {\n /** RPC handler to use for requesting selection scopes */\n rpcRequestsHandler: {\n /** Requests available selection scopes */\n getSelectionScopes: (args: SelectionScopeRequestOptions<IModelRpcProps> & ClientDiagnosticsAttribute) => Promise<SelectionScope[]>;\n /** Requests keys to be added to logical selection based on provided element IDs and selection scope */\n computeSelection: (args: ComputeSelectionRequestOptions<IModelRpcProps> & ClientDiagnosticsAttribute) => Promise<KeySetJSON>;\n };\n\n /** Provider of active locale to use for localizing scopes */\n localeProvider?: () => string | undefined;\n}\n\n/**\n * A manager that knows available [selection scopes]($docs/presentation/unified-selection/index#selection-scopes)\n * and can compute logical selection based on element IDs and selection scope.\n *\n * @public\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport class SelectionScopesManager {\n private _rpcRequestsHandler: Pick<RpcRequestsHandler, \"getSelectionScopes\" | \"computeSelection\">;\n private _getLocale: () => string | undefined;\n private _activeScope: SelectionScopeProps | SelectionScope | string | undefined;\n\n public constructor(props: SelectionScopesManagerProps) {\n this._rpcRequestsHandler = props.rpcRequestsHandler;\n this._getLocale = props.localeProvider ? props.localeProvider : () => undefined;\n }\n\n /** Get active locale */\n public get activeLocale() {\n return this._getLocale();\n }\n\n /** The active selection scope or its id */\n public get activeScope() {\n return this._activeScope;\n }\n public set activeScope(scope: SelectionScopeProps | SelectionScope | string | undefined) {\n this._activeScope = scope;\n }\n\n /**\n * Get available selection scopes.\n * @param imodel The iModel to get selection scopes for\n * @param locale Optional locale to use when localizing scopes' label and description\n */\n public async getSelectionScopes(imodel: IModelConnection, locale?: string): Promise<SelectionScope[]> {\n if (!locale) {\n locale = this._getLocale();\n }\n return this._rpcRequestsHandler.getSelectionScopes({ imodel: imodel.getRpcProps(), locale });\n }\n\n /**\n * Computes keys that need to be added to logical selection based on provided selection scope.\n * @param ids Element IDs to compute selection for\n * @param scope Selection scope to apply\n */\n public async computeSelection(imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string): Promise<KeySet> {\n const scopeProps = createSelectionScopeProps(scope);\n\n // convert ids input to array\n if (typeof ids === \"string\") {\n ids = [ids];\n } else if (ids instanceof Set) {\n ids = [...ids];\n }\n\n // compute selection in batches to avoid HTTP 413\n const keys = new KeySet();\n const batchSize = DEFAULT_KEYS_BATCH_SIZE;\n const batchesCount = Math.ceil(ids.length / batchSize);\n const batchKeyPromises = [];\n for (let batchIndex = 0; batchIndex < batchesCount; ++batchIndex) {\n const batchStart = batchSize * batchIndex;\n const batchEnd = batchStart + batchSize > ids.length ? ids.length : batchStart + batchSize;\n const batchIds = 0 === batchIndex && ids.length <= batchEnd ? ids : ids.slice(batchStart, batchEnd);\n batchKeyPromises.push(this._rpcRequestsHandler.computeSelection({ imodel: imodel.getRpcProps(), elementIds: batchIds, scope: scopeProps }));\n }\n const batchKeys = (await Promise.all(batchKeyPromises)).map((json) => KeySet.fromJSON(json));\n batchKeys.forEach((bk) => keys.add(bk));\n return keys;\n }\n}\n\n/**\n * Normalizes given scope options and returns [[SelectionScopeProps]] that can be used for\n * calculating selection with scope.\n *\n * @public\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport function createSelectionScopeProps(scope: SelectionScopeProps | SelectionScope | string | undefined): SelectionScopeProps {\n if (!scope) {\n return { id: \"element\" };\n }\n if (typeof scope === \"string\") {\n return { id: scope };\n }\n return scope;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SelectionScopesManager.js","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionScopesManager.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;GAEG;;;AAoHH,8DAQC;AAvHD,oEASoC;AAqBpC;;;;;;GAMG;AACH,MAAa,sBAAsB;IACzB,mBAAmB,CAAsE;IACzF,UAAU,CAA2B;IACrC,YAAY,CAA4D;IAEhF,YAAmB,KAAkC;QACnD,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,kBAAkB,C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O,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;IACvB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","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/* eslint-disable @typescript-eslint/no-deprecated */\r\n/** @packageDocumentation\r\n * @module UnifiedSelection\r\n */\r\n\r\nimport { Id64Arg } from \"@itwin/core-bentley\";\r\nimport { IModelRpcProps } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"@itwin/core-frontend\";\r\nimport {\r\n ClientDiagnosticsAttribute,\r\n ComputeSelectionRequestOptions,\r\n DEFAULT_KEYS_BATCH_SIZE,\r\n KeySet,\r\n KeySetJSON,\r\n SelectionScope,\r\n SelectionScopeProps,\r\n SelectionScopeRequestOptions,\r\n} from \"@itwin/presentation-common\";\r\nimport { RpcRequestsHandler } from \"@itwin/presentation-common/internal\";\r\n\r\n/**\r\n * Properties for creating [[SelectionScopesManager]].\r\n * @public\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\r\n */\r\nexport interface SelectionScopesManagerProps {\r\n /** RPC handler to use for requesting selection scopes */\r\n rpcRequestsHandler: {\r\n /** Requests available selection scopes */\r\n getSelectionScopes: (args: SelectionScopeRequestOptions<IModelRpcProps> & ClientDiagnosticsAttribute) => Promise<SelectionScope[]>;\r\n /** Requests keys to be added to logical selection based on provided element IDs and selection scope */\r\n computeSelection: (args: ComputeSelectionRequestOptions<IModelRpcProps> & ClientDiagnosticsAttribute) => Promise<KeySetJSON>;\r\n };\r\n\r\n /** Provider of active locale to use for localizing scopes */\r\n localeProvider?: () => string | undefined;\r\n}\r\n\r\n/**\r\n * A manager that knows available [selection scopes]($docs/presentation/unified-selection/index#selection-scopes)\r\n * and can compute logical selection based on element IDs and selection scope.\r\n *\r\n * @public\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\r\n */\r\nexport class SelectionScopesManager {\r\n private _rpcRequestsHandler: Pick<RpcRequestsHandler, \"getSelectionScopes\" | \"computeSelection\">;\r\n private _getLocale: () => string | undefined;\r\n private _activeScope: SelectionScopeProps | SelectionScope | string | undefined;\r\n\r\n public constructor(props: SelectionScopesManagerProps) {\r\n this._rpcRequestsHandler = props.rpcRequestsHandler;\r\n this._getLocale = props.localeProvider ? props.localeProvider : () => undefined;\r\n }\r\n\r\n /** Get active locale */\r\n public get activeLocale() {\r\n return this._getLocale();\r\n }\r\n\r\n /** The active selection scope or its id */\r\n public get activeScope() {\r\n return this._activeScope;\r\n }\r\n public set activeScope(scope: SelectionScopeProps | SelectionScope | string | undefined) {\r\n this._activeScope = scope;\r\n }\r\n\r\n /**\r\n * Get available selection scopes.\r\n * @param imodel The iModel to get selection scopes for\r\n * @param locale Optional locale to use when localizing scopes' label and description\r\n */\r\n public async getSelectionScopes(imodel: IModelConnection, locale?: string): Promise<SelectionScope[]> {\r\n if (!locale) {\r\n locale = this._getLocale();\r\n }\r\n return this._rpcRequestsHandler.getSelectionScopes({ imodel: imodel.getRpcProps(), locale });\r\n }\r\n\r\n /**\r\n * Computes keys that need to be added to logical selection based on provided selection scope.\r\n * @param ids Element IDs to compute selection for\r\n * @param scope Selection scope to apply\r\n */\r\n public async computeSelection(imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string): Promise<KeySet> {\r\n const scopeProps = createSelectionScopeProps(scope);\r\n\r\n // convert ids input to array\r\n if (typeof ids === \"string\") {\r\n ids = [ids];\r\n } else if (ids instanceof Set) {\r\n ids = [...ids];\r\n }\r\n\r\n // compute selection in batches to avoid HTTP 413\r\n const keys = new KeySet();\r\n const batchSize = DEFAULT_KEYS_BATCH_SIZE;\r\n const batchesCount = Math.ceil(ids.length / batchSize);\r\n const batchKeyPromises = [];\r\n for (let batchIndex = 0; batchIndex < batchesCount; ++batchIndex) {\r\n const batchStart = batchSize * batchIndex;\r\n const batchEnd = batchStart + batchSize > ids.length ? ids.length : batchStart + batchSize;\r\n const batchIds = 0 === batchIndex && ids.length <= batchEnd ? ids : ids.slice(batchStart, batchEnd);\r\n batchKeyPromises.push(this._rpcRequestsHandler.computeSelection({ imodel: imodel.getRpcProps(), elementIds: batchIds, scope: scopeProps }));\r\n }\r\n const batchKeys = (await Promise.all(batchKeyPromises)).map((json) => KeySet.fromJSON(json));\r\n batchKeys.forEach((bk) => keys.add(bk));\r\n return keys;\r\n }\r\n}\r\n\r\n/**\r\n * Normalizes given scope options and returns [[SelectionScopeProps]] that can be used for\r\n * calculating selection with scope.\r\n *\r\n * @public\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\r\n */\r\nexport function createSelectionScopeProps(scope: SelectionScopeProps | SelectionScope | string | undefined): SelectionScopeProps {\r\n if (!scope) {\r\n return { id: \"element\" };\r\n }\r\n if (typeof scope === \"string\") {\r\n return { id: scope };\r\n }\r\n return scope;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-frontend.js","sourceRoot":"","sources":["../../src/presentation-frontend.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;;;;GAKG;AACH,2EAA0F;AAA9D,+GAAA,YAAY,OAAA;AACxC,yFASwD;AADtD,6HAAA,mBAAmB,OAAA;AAIrB,yHAMkF;AALhF,uIAAA,uBAAuB,OAAA;AAIvB,yIAAA,yBAAyB,OAAA;AAE3B,yHAIkF;AAFhF,qJAAA,qCAAqC,OAAA;AACrC,+IAAA,+BAA+B,OAAA;AAEjC,yEAAqH;AAA5G,2HAAA,yBAAyB,OAAA;AAAE,kIAAA,gCAAgC,OAAA;AAEpE;;;;;GAKG;AACH,+FAAuG;AAA9F,+IAAA,kCAAkC,OAAA;AAE3C;;;;;GAKG;AACH,qGAKmE;AAHjE,+HAAA,oBAAoB,OAAA;AACpB,8HAAA,mBAAmB,OAAA;AAIrB,6FAAgH;AAAhF,uHAAA,gBAAgB,OAAA;AAChD,yGAA6J;AAAvH,mIAAA,sBAAsB,OAAA;AAAE,sIAAA,yBAAyB,OAAA;AACvF,6FAAgH;AAAhF,uHAAA,gBAAgB,OAAA;AAChD,+FAA8H;AAAlF,yHAAA,iBAAiB,OAAA;AAC7D,2FAAuF;AAA9E,qHAAA,eAAe,OAAA;AAExB,MAAM,gCAAgC,GAAG,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;AAC3F,IAAK,UAAkB,CAAC,gCAAgC,CAAC,EAAE,CAAC;IAC1D,4DAA4D;IAC5D,MAAM,cAAc,GAAI,UAAkB,CAAC,gCAAgC,CAAC,CAAC,KAAK,CAAC;IAEnF,MAAM,KAAK,GAAG,IAAI,KAAK,CACrB,+EAA+E;QAC7E,yDAAyD;QACzD,8CAA8C;QAC9C,wDAAwD,CAC3D,CAAC;IAEF,+BAA+B;IAC/B,OAAO,CAAC,KAAK,CAAC,gDAAgD,EAAE,KAAK,CAAC,CAAC;IACvE,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,cAAc,CAAC,CAAC;IAC3D,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1D,8BAA8B;IAE9B,MAAM,KAAK,CAAC;AACd,CAAC;KAAM,CAAC;IACL,UAAkB,CAAC,gCAAgC,CAAC,GAAG;QACtD,KAAK,EAAE,IAAI,KAAK,EAAE,CAAC,KAAK;KACzB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/**\n * @module Core\n *\n * @docs-group-description Core\n * Common types used for retrieving presentation data from iModels.\n */\nexport { PresentationProps, Presentation } from \"./presentation-frontend/Presentation.js\";\nexport {\n IModelHierarchyChangeEventArgs,\n IModelContentChangeEventArgs,\n MultipleValuesRequestOptions,\n GetNodesRequestOptions,\n GetContentRequestOptions,\n GetDistinctValuesRequestOptions,\n PresentationManagerProps,\n PresentationManager,\n} from \"./presentation-frontend/PresentationManager.js\";\nexport { RulesetManager } from \"./presentation-frontend/RulesetManager.js\";\nexport { RulesetVariablesManager } from \"./presentation-frontend/RulesetVariablesManager.js\";\nexport {\n FavoritePropertiesScope,\n PropertyFullName,\n FavoritePropertiesOrderInfo,\n FavoritePropertiesManagerProps,\n FavoritePropertiesManager,\n} from \"./presentation-frontend/favorite-properties/FavoritePropertiesManager.js\";\nexport {\n IFavoritePropertiesStorage,\n DefaultFavoritePropertiesStorageTypes,\n createFavoritePropertiesStorage,\n} from \"./presentation-frontend/favorite-properties/FavoritePropertiesStorage.js\";\nexport { consoleDiagnosticsHandler, createCombinedDiagnosticsHandler } from \"./presentation-frontend/Diagnostics.js\";\n\n/**\n * @module Logging\n *\n * @docs-group-description Logging\n * Types related to logging in this package.\n */\nexport { PresentationFrontendLoggerCategory } from \"./presentation-frontend/FrontendLoggerCategory.js\";\n\n/**\n * @module UnifiedSelection\n *\n * @docs-group-description UnifiedSelection\n * Types related to [unified selection]($docs/presentation/unified-selection/index.md).\n */\nexport {\n SelectionChangesListener,\n SelectionChangeEvent,\n SelectionChangeType,\n SelectionChangeEventArgs,\n} from \"./presentation-frontend/selection/SelectionChangeEvent.js\";\nexport { ISelectionProvider } from \"./presentation-frontend/selection/ISelectionProvider.js\";\nexport { SelectionManagerProps, SelectionManager } from \"./presentation-frontend/selection/SelectionManager.js\";\nexport { SelectionScopesManagerProps, SelectionScopesManager, createSelectionScopeProps } from \"./presentation-frontend/selection/SelectionScopesManager.js\";\nexport { SelectionHandlerProps, SelectionHandler } from \"./presentation-frontend/selection/SelectionHandler.js\";\nexport { HiliteSet, HiliteSetProviderProps, HiliteSetProvider } from \"./presentation-frontend/selection/HiliteSetProvider.js\";\nexport { SelectionHelper } from \"./presentation-frontend/selection/SelectionHelper.js\";\n\nconst globalSymbolPresentationFrontend = Symbol.for(\"itwin.presentation.frontend.globals\");\nif ((globalThis as any)[globalSymbolPresentationFrontend]) {\n // Get the stack trace from when the module was first loaded\n const firstLoadStack = (globalThis as any)[globalSymbolPresentationFrontend].stack;\n\n const error = new Error(\n \"Multiple @itwin/presentation-frontend imports detected! This may happen if:\\n\" +\n \"- You have multiple versions of the package installed\\n\" +\n \"- Your bundling configuration is incorrect\\n\" +\n \"- You're importing from both ESM and CommonJS versions\",\n );\n\n /* eslint-disable no-console */\n console.error(\"Duplicate @itwin/presentation-frontend import:\", error);\n console.error(\"First import occurred at:\", firstLoadStack);\n console.error(\"Current import occurred at:\", error.stack);\n /* eslint-enable no-console */\n\n throw error;\n} else {\n (globalThis as any)[globalSymbolPresentationFrontend] = {\n stack: new Error().stack,\n };\n}"]}
|
|
1
|
+
{"version":3,"file":"presentation-frontend.js","sourceRoot":"","sources":["../../src/presentation-frontend.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;;;;GAKG;AACH,2EAA0F;AAA9D,+GAAA,YAAY,OAAA;AACxC,yFASwD;AADtD,6HAAA,mBAAmB,OAAA;AAIrB,yHAMkF;AALhF,uIAAA,uBAAuB,OAAA;AAIvB,yIAAA,yBAAyB,OAAA;AAE3B,yHAIkF;AAFhF,qJAAA,qCAAqC,OAAA;AACrC,+IAAA,+BAA+B,OAAA;AAEjC,yEAAqH;AAA5G,2HAAA,yBAAyB,OAAA;AAAE,kIAAA,gCAAgC,OAAA;AAEpE;;;;;GAKG;AACH,+FAAuG;AAA9F,+IAAA,kCAAkC,OAAA;AAE3C;;;;;GAKG;AACH,qGAKmE;AAHjE,+HAAA,oBAAoB,OAAA;AACpB,8HAAA,mBAAmB,OAAA;AAIrB,6FAAgH;AAAhF,uHAAA,gBAAgB,OAAA;AAChD,yGAA6J;AAAvH,mIAAA,sBAAsB,OAAA;AAAE,sIAAA,yBAAyB,OAAA;AACvF,6FAAgH;AAAhF,uHAAA,gBAAgB,OAAA;AAChD,+FAA8H;AAAlF,yHAAA,iBAAiB,OAAA;AAC7D,2FAAuF;AAA9E,qHAAA,eAAe,OAAA;AAExB,MAAM,gCAAgC,GAAG,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;AAC3F,IAAK,UAAkB,CAAC,gCAAgC,CAAC,EAAE,CAAC;IAC1D,4DAA4D;IAC5D,MAAM,cAAc,GAAI,UAAkB,CAAC,gCAAgC,CAAC,CAAC,KAAK,CAAC;IAEnF,MAAM,KAAK,GAAG,IAAI,KAAK,CACrB,+EAA+E;QAC7E,yDAAyD;QACzD,8CAA8C;QAC9C,wDAAwD,CAC3D,CAAC;IAEF,+BAA+B;IAC/B,OAAO,CAAC,KAAK,CAAC,gDAAgD,EAAE,KAAK,CAAC,CAAC;IACvE,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,cAAc,CAAC,CAAC;IAC3D,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1D,8BAA8B;IAE9B,MAAM,KAAK,CAAC;AACd,CAAC;KAAM,CAAC;IACL,UAAkB,CAAC,gCAAgC,CAAC,GAAG;QACtD,KAAK,EAAE,IAAI,KAAK,EAAE,CAAC,KAAK;KACzB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * @module Core\r\n *\r\n * @docs-group-description Core\r\n * Common types used for retrieving presentation data from iModels.\r\n */\r\nexport { PresentationProps, Presentation } from \"./presentation-frontend/Presentation.js\";\r\nexport {\r\n IModelHierarchyChangeEventArgs,\r\n IModelContentChangeEventArgs,\r\n MultipleValuesRequestOptions,\r\n GetNodesRequestOptions,\r\n GetContentRequestOptions,\r\n GetDistinctValuesRequestOptions,\r\n PresentationManagerProps,\r\n PresentationManager,\r\n} from \"./presentation-frontend/PresentationManager.js\";\r\nexport { RulesetManager } from \"./presentation-frontend/RulesetManager.js\";\r\nexport { RulesetVariablesManager } from \"./presentation-frontend/RulesetVariablesManager.js\";\r\nexport {\r\n FavoritePropertiesScope,\r\n PropertyFullName,\r\n FavoritePropertiesOrderInfo,\r\n FavoritePropertiesManagerProps,\r\n FavoritePropertiesManager,\r\n} from \"./presentation-frontend/favorite-properties/FavoritePropertiesManager.js\";\r\nexport {\r\n IFavoritePropertiesStorage,\r\n DefaultFavoritePropertiesStorageTypes,\r\n createFavoritePropertiesStorage,\r\n} from \"./presentation-frontend/favorite-properties/FavoritePropertiesStorage.js\";\r\nexport { consoleDiagnosticsHandler, createCombinedDiagnosticsHandler } from \"./presentation-frontend/Diagnostics.js\";\r\n\r\n/**\r\n * @module Logging\r\n *\r\n * @docs-group-description Logging\r\n * Types related to logging in this package.\r\n */\r\nexport { PresentationFrontendLoggerCategory } from \"./presentation-frontend/FrontendLoggerCategory.js\";\r\n\r\n/**\r\n * @module UnifiedSelection\r\n *\r\n * @docs-group-description UnifiedSelection\r\n * Types related to [unified selection]($docs/presentation/unified-selection/index.md).\r\n */\r\nexport {\r\n SelectionChangesListener,\r\n SelectionChangeEvent,\r\n SelectionChangeType,\r\n SelectionChangeEventArgs,\r\n} from \"./presentation-frontend/selection/SelectionChangeEvent.js\";\r\nexport { ISelectionProvider } from \"./presentation-frontend/selection/ISelectionProvider.js\";\r\nexport { SelectionManagerProps, SelectionManager } from \"./presentation-frontend/selection/SelectionManager.js\";\r\nexport { SelectionScopesManagerProps, SelectionScopesManager, createSelectionScopeProps } from \"./presentation-frontend/selection/SelectionScopesManager.js\";\r\nexport { SelectionHandlerProps, SelectionHandler } from \"./presentation-frontend/selection/SelectionHandler.js\";\r\nexport { HiliteSet, HiliteSetProviderProps, HiliteSetProvider } from \"./presentation-frontend/selection/HiliteSetProvider.js\";\r\nexport { SelectionHelper } from \"./presentation-frontend/selection/SelectionHelper.js\";\r\n\r\nconst globalSymbolPresentationFrontend = Symbol.for(\"itwin.presentation.frontend.globals\");\r\nif ((globalThis as any)[globalSymbolPresentationFrontend]) {\r\n // Get the stack trace from when the module was first loaded\r\n const firstLoadStack = (globalThis as any)[globalSymbolPresentationFrontend].stack;\r\n\r\n const error = new Error(\r\n \"Multiple @itwin/presentation-frontend imports detected! This may happen if:\\n\" +\r\n \"- You have multiple versions of the package installed\\n\" +\r\n \"- Your bundling configuration is incorrect\\n\" +\r\n \"- You're importing from both ESM and CommonJS versions\",\r\n );\r\n\r\n /* eslint-disable no-console */\r\n console.error(\"Duplicate @itwin/presentation-frontend import:\", error);\r\n console.error(\"First import occurred at:\", firstLoadStack);\r\n console.error(\"Current import occurred at:\", error.stack);\r\n /* eslint-enable no-console */\r\n\r\n throw error;\r\n} else {\r\n (globalThis as any)[globalSymbolPresentationFrontend] = {\r\n stack: new Error().stack,\r\n };\r\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectivityInformationProvider.js","sourceRoot":"","sources":["../../../src/presentation-frontend/ConnectivityInformationProvider.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAQjD;;;;;GAKG;AACH,MAAM,OAAO,+BAA+B;IAClC,cAAc,CAA8B;IAC5C,gDAAgD,CAAc;IACtD,6BAA6B,GAAG,IAAI,OAAO,EAA0D,CAAC;IAEtH;QACE,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,gDAAgD,GAAG,SAAS,CAAC,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;YACzJ,mEAAmE;YACnE,SAAS,CAAC,yBAAyB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAkC,EAAE,EAAE;gBAChF,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;oBACtC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;gBAC/B,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,cAAc,GAAG,0BAA0B,CAAC,MAAM,CAAC;QAC1D,CAAC;IACH,CAAC;IAEM,CAAC,MAAM,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,gDAAgD,IAAI,IAAI,CAAC,gDAAgD,EAAE,CAAC;IACnH,CAAC;IAEO,sCAAsC,GAAG,CAAC,MAAkC,EAAE,EAAE;QACtF,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,cAAc,IAAI,0BAA0B,CAAC,OAAO,CAAC;IACnE,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { InternetConnectivityStatus } from \"@itwin/core-common\";\nimport { NativeApp } from \"@itwin/core-frontend\";\n\n/** @internal */\nexport interface IConnectivityInformationProvider {\n readonly status: InternetConnectivityStatus;\n readonly onInternetConnectivityChanged: BeEvent<(args: { status: InternetConnectivityStatus }) => void>;\n}\n\n/**\n * A helper that wraps connectivity-related APIs in NativeApp\n * to give a unified information for interested parties in presentation.\n *\n * @internal\n */\nexport class ConnectivityInformationProvider implements IConnectivityInformationProvider, Disposable {\n private _currentStatus?: InternetConnectivityStatus;\n private _unsubscribeFromInternetConnectivityChangedEvent?: () => void;\n public readonly onInternetConnectivityChanged = new BeEvent<(args: { status: InternetConnectivityStatus }) => void>();\n\n public constructor() {\n if (NativeApp.isValid) {\n this._unsubscribeFromInternetConnectivityChangedEvent = NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n NativeApp.checkInternetConnectivity().then((status: InternetConnectivityStatus) => {\n if (undefined === this._currentStatus) {\n this._currentStatus = status;\n }\n });\n } else {\n this._currentStatus = InternetConnectivityStatus.Online;\n }\n }\n\n public [Symbol.dispose]() {\n this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();\n }\n\n private onNativeAppInternetConnectivityChanged = (status: InternetConnectivityStatus) => {\n if (this._currentStatus === status) {\n return;\n }\n\n this._currentStatus = status;\n this.onInternetConnectivityChanged.raiseEvent({ status });\n };\n\n public get status(): InternetConnectivityStatus {\n return this._currentStatus ?? InternetConnectivityStatus.Offline;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ConnectivityInformationProvider.js","sourceRoot":"","sources":["../../../src/presentation-frontend/ConnectivityInformationProvider.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAQjD;;;;;GAKG;AACH,MAAM,OAAO,+BAA+B;IAClC,cAAc,CAA8B;IAC5C,gDAAgD,CAAc;IACtD,6BAA6B,GAAG,IAAI,OAAO,EAA0D,CAAC;IAEtH;QACE,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,gDAAgD,GAAG,SAAS,CAAC,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;YACzJ,mEAAmE;YACnE,SAAS,CAAC,yBAAyB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAkC,EAAE,EAAE;gBAChF,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;oBACtC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;gBAC/B,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,cAAc,GAAG,0BAA0B,CAAC,MAAM,CAAC;QAC1D,CAAC;IACH,CAAC;IAEM,CAAC,MAAM,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,gDAAgD,IAAI,IAAI,CAAC,gDAAgD,EAAE,CAAC;IACnH,CAAC;IAEO,sCAAsC,GAAG,CAAC,MAAkC,EAAE,EAAE;QACtF,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,cAAc,IAAI,0BAA0B,CAAC,OAAO,CAAC;IACnE,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 Core\r\n */\r\n\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport { InternetConnectivityStatus } from \"@itwin/core-common\";\r\nimport { NativeApp } from \"@itwin/core-frontend\";\r\n\r\n/** @internal */\r\nexport interface IConnectivityInformationProvider {\r\n readonly status: InternetConnectivityStatus;\r\n readonly onInternetConnectivityChanged: BeEvent<(args: { status: InternetConnectivityStatus }) => void>;\r\n}\r\n\r\n/**\r\n * A helper that wraps connectivity-related APIs in NativeApp\r\n * to give a unified information for interested parties in presentation.\r\n *\r\n * @internal\r\n */\r\nexport class ConnectivityInformationProvider implements IConnectivityInformationProvider, Disposable {\r\n private _currentStatus?: InternetConnectivityStatus;\r\n private _unsubscribeFromInternetConnectivityChangedEvent?: () => void;\r\n public readonly onInternetConnectivityChanged = new BeEvent<(args: { status: InternetConnectivityStatus }) => void>();\r\n\r\n public constructor() {\r\n if (NativeApp.isValid) {\r\n this._unsubscribeFromInternetConnectivityChangedEvent = NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n NativeApp.checkInternetConnectivity().then((status: InternetConnectivityStatus) => {\r\n if (undefined === this._currentStatus) {\r\n this._currentStatus = status;\r\n }\r\n });\r\n } else {\r\n this._currentStatus = InternetConnectivityStatus.Online;\r\n }\r\n }\r\n\r\n public [Symbol.dispose]() {\r\n this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();\r\n }\r\n\r\n private onNativeAppInternetConnectivityChanged = (status: InternetConnectivityStatus) => {\r\n if (this._currentStatus === status) {\r\n return;\r\n }\r\n\r\n this._currentStatus = status;\r\n this.onInternetConnectivityChanged.raiseEvent({ status });\r\n };\r\n\r\n public get status(): InternetConnectivityStatus {\r\n return this._currentStatus ?? InternetConnectivityStatus.Offline;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diagnostics.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Diagn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AK,CAAC,CAAC;QAC7B,CAAC;aAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACpB,oBAAoB,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;QAClE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,qBAAqB,CAAC,GAA0B,EAAE,MAA8B;IACvF,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAmC;IAC5D,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,iCAAiC;QACzD,KAAK,SAAS;YACZ,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,iCAAiC;QACxD,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,iCAAiC;IACzD,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport {\n ClientDiagnostics,\n ClientDiagnosticsHandler,\n DiagnosticsLogEntry,\n DiagnosticsLoggerSeverity,\n DiagnosticsLogMessage,\n DiagnosticsScopeLogs,\n} from \"@itwin/presentation-common\";\n\n/**\n * A function which logs messages to the console.\n * @public\n */\nexport function consoleDiagnosticsHandler(diagnostics: ClientDiagnostics) {\n // eslint-disable-next-line no-console\n diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);\n diagnostics.logs &&\n handleDiagnosticLogs(diagnostics.logs, (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => {\n /* note: we're duplicating the message if it's logged at both editor and dev severity levels */\n const str = buildLogMessageString(msg, stack);\n if (msg.severity.editor) {\n getConsoleLogFunc(msg.severity.editor)(str);\n }\n if (msg.severity.dev) {\n getConsoleLogFunc(msg.severity.dev)(str);\n }\n });\n}\n\n/**\n * A function which calls all diagnostics handlers passed to it.\n * @public\n */\nexport function createCombinedDiagnosticsHandler(handlers: ClientDiagnosticsHandler[]) {\n return (diagnostics: ClientDiagnostics) => {\n handlers.forEach((handler) => handler(diagnostics));\n };\n}\n\ntype DiagnosticsLogMessageHandler = (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => void;\n\nfunction handleDiagnosticLogs(logs: DiagnosticsLogEntry[], messageHandler: DiagnosticsLogMessageHandler, stack: DiagnosticsScopeLogs[] = []) {\n logs.forEach((log) => {\n if (DiagnosticsLogEntry.isMessage(log)) {\n messageHandler(log, stack);\n } else if (log.logs) {\n handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);\n }\n });\n}\n\nfunction buildLogMessageString(msg: DiagnosticsLogMessage, _stack: DiagnosticsScopeLogs[]) {\n return msg.message;\n}\n\nfunction getConsoleLogFunc(severity: DiagnosticsLoggerSeverity) {\n switch (severity) {\n case \"error\":\n return console.error; // eslint-disable-line no-console\n case \"warning\":\n return console.warn; // eslint-disable-line no-console\n case \"info\":\n case \"debug\":\n case \"trace\":\n return console.log; // eslint-disable-line no-console\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Diagnostics.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Diagnostics.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAGL,mBAAmB,GAIpB,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,WAA8B;IACtE,sCAAsC;IACtC,WAAW,CAAC,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IAC5F,WAAW,CAAC,IAAI;QACd,oBAAoB,CAAC,WAA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AAS,iBAAiB,CAAC,QAAmC;IAC5D,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,iCAAiC;QACzD,KAAK,SAAS;YACZ,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,iCAAiC;QACxD,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,iCAAiC;IACzD,CAAC;AACH,CAAC","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 Core\r\n */\r\n\r\nimport {\r\n ClientDiagnostics,\r\n ClientDiagnosticsHandler,\r\n DiagnosticsLogEntry,\r\n DiagnosticsLoggerSeverity,\r\n DiagnosticsLogMessage,\r\n DiagnosticsScopeLogs,\r\n} from \"@itwin/presentation-common\";\r\n\r\n/**\r\n * A function which logs messages to the console.\r\n * @public\r\n */\r\nexport function consoleDiagnosticsHandler(diagnostics: ClientDiagnostics) {\r\n // eslint-disable-next-line no-console\r\n diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);\r\n diagnostics.logs &&\r\n handleDiagnosticLogs(diagnostics.logs, (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => {\r\n /* note: we're duplicating the message if it's logged at both editor and dev severity levels */\r\n const str = buildLogMessageString(msg, stack);\r\n if (msg.severity.editor) {\r\n getConsoleLogFunc(msg.severity.editor)(str);\r\n }\r\n if (msg.severity.dev) {\r\n getConsoleLogFunc(msg.severity.dev)(str);\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * A function which calls all diagnostics handlers passed to it.\r\n * @public\r\n */\r\nexport function createCombinedDiagnosticsHandler(handlers: ClientDiagnosticsHandler[]) {\r\n return (diagnostics: ClientDiagnostics) => {\r\n handlers.forEach((handler) => handler(diagnostics));\r\n };\r\n}\r\n\r\ntype DiagnosticsLogMessageHandler = (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => void;\r\n\r\nfunction handleDiagnosticLogs(logs: DiagnosticsLogEntry[], messageHandler: DiagnosticsLogMessageHandler, stack: DiagnosticsScopeLogs[] = []) {\r\n logs.forEach((log) => {\r\n if (DiagnosticsLogEntry.isMessage(log)) {\r\n messageHandler(log, stack);\r\n } else if (log.logs) {\r\n handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);\r\n }\r\n });\r\n}\r\n\r\nfunction buildLogMessageString(msg: DiagnosticsLogMessage, _stack: DiagnosticsScopeLogs[]) {\r\n return msg.message;\r\n}\r\n\r\nfunction getConsoleLogFunc(severity: DiagnosticsLoggerSeverity) {\r\n switch (severity) {\r\n case \"error\":\r\n return console.error; // eslint-disable-line no-console\r\n case \"warning\":\r\n return console.warn; // eslint-disable-line no-console\r\n case \"info\":\r\n case \"debug\":\r\n case \"trace\":\r\n return console.log; // eslint-disable-line no-console\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontendLoggerCategory.js","sourceRoot":"","sources":["../../../src/presentation-frontend/FrontendLoggerCategory.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uEAAiC,CAAA;AACnC,CAAC,EAFW,kCAAkC,KAAlC,kCAAkC,QAE7C","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Logging\n */\n\n/**\n * Logger categories used by this package\n * @note All logger categories in this package start with the `presentation-frontend` prefix.\n * @see [Logger]($bentley)\n * @public\n */\nexport enum PresentationFrontendLoggerCategory {\n Package = \"presentation-frontend\",\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FrontendLoggerCategory.js","sourceRoot":"","sources":["../../../src/presentation-frontend/FrontendLoggerCategory.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uEAAiC,CAAA;AACnC,CAAC,EAFW,kCAAkC,KAAlC,kCAAkC,QAE7C","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 Logging\r\n */\r\n\r\n/**\r\n * Logger categories used by this package\r\n * @note All logger categories in this package start with the `presentation-frontend` prefix.\r\n * @see [Logger]($bentley)\r\n * @public\r\n */\r\nexport enum PresentationFrontendLoggerCategory {\r\n Package = \"presentation-frontend\",\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelConnectionInitialization.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IModelConnectionInitialization.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAUhG,gBAAgB;AAChB,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,GAAG,EAAyC,CAAC;AAE7F,gBAAgB;AAChB,MAAM,UAAU,yBAAyB,CAAC,MAAwB;IAChE,KAAK,MAAM,EAAE,mBAAmB,EAAE,IAAI,4BAA4B,EAAE,CAAC;QACnE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,MAAwB;IACpE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,4BAA4B,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACvH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IModelConnection } from \"@itwin/core-frontend\";\n\n/** @internal */\nexport interface IModelConnectionInitializationHandler {\n startInitialization: (imodel: IModelConnection) => void;\n ensureInitialized: (imodel: IModelConnection) => Promise<void>;\n}\n\n/** @internal */\nexport const imodelInitializationHandlers = new Set<IModelConnectionInitializationHandler>();\n\n/** @internal */\nexport function startIModelInitialization(imodel: IModelConnection) {\n for (const { startInitialization } of imodelInitializationHandlers) {\n startInitialization(imodel);\n }\n}\n\n/** @internal */\nexport async function ensureIModelInitialized(imodel: IModelConnection) {\n await Promise.all([...imodelInitializationHandlers].map(async ({ ensureInitialized }) => ensureInitialized(imodel)));\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IModelConnectionInitialization.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IModelConnectionInitialization.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAUhG,gBAAgB;AAChB,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,GAAG,EAAyC,CAAC;AAE7F,gBAAgB;AAChB,MAAM,UAAU,yBAAyB,CAAC,MAAwB;IAChE,KAAK,MAAM,EAAE,mBAAmB,EAAE,IAAI,4BAA4B,EAAE,CAAC;QACnE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,MAAwB;IACpE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,4BAA4B,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACvH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { IModelConnection } from \"@itwin/core-frontend\";\r\n\r\n/** @internal */\r\nexport interface IModelConnectionInitializationHandler {\r\n startInitialization: (imodel: IModelConnection) => void;\r\n ensureInitialized: (imodel: IModelConnection) => Promise<void>;\r\n}\r\n\r\n/** @internal */\r\nexport const imodelInitializationHandlers = new Set<IModelConnectionInitializationHandler>();\r\n\r\n/** @internal */\r\nexport function startIModelInitialization(imodel: IModelConnection) {\r\n for (const { startInitialization } of imodelInitializationHandlers) {\r\n startInitialization(imodel);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport async function ensureIModelInitialized(imodel: IModelConnection) {\r\n await Promise.all([...imodelInitializationHandlers].map(async ({ ensureInitialized }) => ensureInitialized(imodel)));\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalSymbols.js","sourceRoot":"","sources":["../../../src/presentation-frontend/InternalSymbols.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,yDAAyD;AACzD;;GAEG;AAEH,SAAS,GAAG,CAAC,IAAY;IACvB,OAAO,GAAG,IAAI,iDAAiD,CAAC;AAClE,CAAC;AAED,MAAM,CAAC,MAAM,wCAAwC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC,CAAC;AACnH,MAAM,CAAC,MAAM,wCAAwC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/* eslint-disable @typescript-eslint/naming-convention */\n/** @packageDocumentation\n * @module Core\n */\n\nfunction sym(name: string): string {\n return `${name}_presentation-frontend_INTERNAL_ONLY_DO_NOT_USE`;\n}\n\nexport const _presentation_manager_rpcRequestsHandler = Symbol.for(sym(\"presentation_manager_rpcRequestsHandler\"));\nexport const _presentation_manager_ipcRequestsHandler = Symbol.for(sym(\"presentation_manager_ipcRequestsHandler\"));\n"]}
|
|
1
|
+
{"version":3,"file":"InternalSymbols.js","sourceRoot":"","sources":["../../../src/presentation-frontend/InternalSymbols.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,yDAAyD;AACzD;;GAEG;AAEH,SAAS,GAAG,CAAC,IAAY;IACvB,OAAO,GAAG,IAAI,iDAAiD,CAAC;AAClE,CAAC;AAED,MAAM,CAAC,MAAM,wCAAwC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC,CAAC;AACnH,MAAM,CAAC,MAAM,wCAAwC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC,CAAC","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/* eslint-disable @typescript-eslint/naming-convention */\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nfunction sym(name: string): string {\r\n return `${name}_presentation-frontend_INTERNAL_ONLY_DO_NOT_USE`;\r\n}\r\n\r\nexport const _presentation_manager_rpcRequestsHandler = Symbol.for(sym(\"presentation_manager_rpcRequestsHandler\"));\r\nexport const _presentation_manager_ipcRequestsHandler = Symbol.for(sym(\"presentation_manager_ipcRequestsHandler\"));\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcRequestsHandler.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IpcRequestsHandler.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,6BAA6B,EAA4B,MAAM,qCAAqC,CAAC;AAY9G,gBAAgB;AAChB,MAAM,OAAO,kBAAkB;IACrB,SAAS,GAAG,MAAM,CAAC,YAAY,CAA2B,6BAA6B,CAAC,CAAC;IACjF,QAAQ,CAAS;IAEjC,YAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,MAAgC;QAC9D,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;YACvC,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;SAClD,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAAkC;QAClE,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;YACzC,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IpcApp } from \"@itwin/core-frontend\";\nimport { RulesetVariable } from \"@itwin/presentation-common\";\nimport { PRESENTATION_IPC_CHANNEL_NAME, PresentationIpcInterface } from \"@itwin/presentation-common/internal\";\n\ninterface SetRulesetVariableParams {\n rulesetId: string;\n variable: RulesetVariable;\n}\n\ninterface UnsetRulesetVariableParams {\n rulesetId: string;\n variableId: string;\n}\n\n/** @internal */\nexport class IpcRequestsHandler {\n private _ipcProxy = IpcApp.makeIpcProxy<PresentationIpcInterface>(PRESENTATION_IPC_CHANNEL_NAME);\n public readonly clientId: string;\n\n constructor(clientId: string) {\n this.clientId = clientId;\n }\n\n public async setRulesetVariable(params: SetRulesetVariableParams) {\n return this._ipcProxy.setRulesetVariable({\n ...params,\n clientId: this.clientId,\n variable: RulesetVariable.toJSON(params.variable),\n });\n }\n\n public async unsetRulesetVariable(params: UnsetRulesetVariableParams) {\n return this._ipcProxy.unsetRulesetVariable({\n ...params,\n clientId: this.clientId,\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IpcRequestsHandler.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IpcRequestsHandler.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,6BAA6B,EAA4B,MAAM,qCAAqC,CAAC;AAY9G,gBAAgB;AAChB,MAAM,OAAO,kBAAkB;IACrB,SAAS,GAAG,MAAM,CAAC,YAAY,CAA2B,6BAA6B,CAAC,CAAC;IACjF,QAAQ,CAAS;IAEjC,YAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,MAAgC;QAC9D,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;YACvC,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;SAClD,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAAkC;QAClE,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;YACzC,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;IACL,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\r\nimport { IpcApp } from \"@itwin/core-frontend\";\r\nimport { RulesetVariable } from \"@itwin/presentation-common\";\r\nimport { PRESENTATION_IPC_CHANNEL_NAME, PresentationIpcInterface } from \"@itwin/presentation-common/internal\";\r\n\r\ninterface SetRulesetVariableParams {\r\n rulesetId: string;\r\n variable: RulesetVariable;\r\n}\r\n\r\ninterface UnsetRulesetVariableParams {\r\n rulesetId: string;\r\n variableId: string;\r\n}\r\n\r\n/** @internal */\r\nexport class IpcRequestsHandler {\r\n private _ipcProxy = IpcApp.makeIpcProxy<PresentationIpcInterface>(PRESENTATION_IPC_CHANNEL_NAME);\r\n public readonly clientId: string;\r\n\r\n constructor(clientId: string) {\r\n this.clientId = clientId;\r\n }\r\n\r\n public async setRulesetVariable(params: SetRulesetVariableParams) {\r\n return this._ipcProxy.setRulesetVariable({\r\n ...params,\r\n clientId: this.clientId,\r\n variable: RulesetVariable.toJSON(params.variable),\r\n });\r\n }\r\n\r\n public async unsetRulesetVariable(params: UnsetRulesetVariableParams) {\r\n return this._ipcProxy.unsetRulesetVariable({\r\n ...params,\r\n clientId: this.clientId,\r\n });\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizationHelper.js","sourceRoot":"","sources":["../../../src/presentation-frontend/LocalizationHelper.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;AAEpC,gBAAgB;AAChB,MAAM,OAAO,0BAA2B,SAAQ,kBAAkB;IACxD,KAAK,CAAqB;IAClC,YAAY,IAAa;QACvB,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,kBAAkB,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAClI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IACD,IAAW,MAAM,CAAC,MAA0B;QAC1C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;IACtB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,kBAAkB;QACpC,MAAM,oBAAoB,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;QACzH,MAAM,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAC1C,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAChC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1F,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { LocalizationHelper } from \"@itwin/presentation-common/internal\";\nimport { Presentation } from \"./Presentation.js\";\n\nconst NAMESPACES = [\"Presentation\"];\n\n/** @internal */\nexport class FrontendLocalizationHelper extends LocalizationHelper {\n private _lang: string | undefined;\n constructor(lang?: string) {\n super({ getLocalizedString: (key) => Presentation.localization.getLocalizedString(key, { defaultValue: key, lng: this._lang }) });\n this._lang = lang;\n }\n\n public get locale() {\n return this._lang;\n }\n public set locale(locale: string | undefined) {\n this._lang = locale;\n }\n\n public static async registerNamespaces() {\n const localizationPromises = NAMESPACES.map(async (namespace) => Presentation.localization.registerNamespace(namespace));\n await Promise.all(localizationPromises);\n }\n\n public static unregisterNamespaces() {\n NAMESPACES.map((namespace) => Presentation.localization.unregisterNamespace(namespace));\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"LocalizationHelper.js","sourceRoot":"","sources":["../../../src/presentation-frontend/LocalizationHelper.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;AAEpC,gBAAgB;AAChB,MAAM,OAAO,0BAA2B,SAAQ,kBAAkB;IACxD,KAAK,CAAqB;IAClC,YAAY,IAAa;QACvB,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,kBAAkB,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAClI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IACD,IAAW,MAAM,CAAC,MAA0B;QAC1C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;IACtB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,kBAAkB;QACpC,MAAM,oBAAoB,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;QACzH,MAAM,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAC1C,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAChC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1F,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\nimport { LocalizationHelper } from \"@itwin/presentation-common/internal\";\r\nimport { Presentation } from \"./Presentation.js\";\r\n\r\nconst NAMESPACES = [\"Presentation\"];\r\n\r\n/** @internal */\r\nexport class FrontendLocalizationHelper extends LocalizationHelper {\r\n private _lang: string | undefined;\r\n constructor(lang?: string) {\r\n super({ getLocalizedString: (key) => Presentation.localization.getLocalizedString(key, { defaultValue: key, lng: this._lang }) });\r\n this._lang = lang;\r\n }\r\n\r\n public get locale() {\r\n return this._lang;\r\n }\r\n public set locale(locale: string | undefined) {\r\n this._lang = locale;\r\n }\r\n\r\n public static async registerNamespaces() {\r\n const localizationPromises = NAMESPACES.map(async (namespace) => Presentation.localization.registerNamespace(namespace));\r\n await Promise.all(localizationPromises);\r\n }\r\n\r\n public static unregisterNamespaces() {\r\n NAMESPACES.map((namespace) => Presentation.localization.unregisterNamespace(namespace));\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Presentation.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Presentation.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAkC,MAAM,oDAAoD,CAAC;AAC/H,OAAO,EAAE,+BAA+B,EAAE,qCAAqC,EA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AAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { Localization } from \"@itwin/core-common\";\nimport { PresentationError, PresentationStatus } from \"@itwin/presentation-common\";\nimport { FavoritePropertiesManager, FavoritePropertiesManagerProps } from \"./favorite-properties/FavoritePropertiesManager.js\";\nimport { createFavoritePropertiesStorage, DefaultFavoritePropertiesStorageTypes } from \"./favorite-properties/FavoritePropertiesStorage.js\";\nimport { FrontendLocalizationHelper } from \"./LocalizationHelper.js\";\nimport { PresentationManager, PresentationManagerProps } from \"./PresentationManager.js\";\nimport { SelectionManager, SelectionManagerProps } from \"./selection/SelectionManager.js\";\nimport { SelectionScopesManager } from \"./selection/SelectionScopesManager.js\";\nimport { imodelInitializationHandlers } from \"./IModelConnectionInitialization.js\";\nimport { _presentation_manager_rpcRequestsHandler } from \"./InternalSymbols.js\";\n\nlet localization: Localization | undefined;\nlet presentationManager: PresentationManager | undefined;\nlet selectionManager: SelectionManager | undefined; // eslint-disable-line @typescript-eslint/no-deprecated\nlet favoritePropertiesManager: FavoritePropertiesManager | undefined;\nconst initializationHandlers: Array<() => Promise<(() => void) | void>> = [];\nconst terminationHandlers: Array<() => void> = [];\n\n/**\n * Props for initializing [[Presentation]].\n * @public\n */\nexport interface PresentationProps {\n /** Props for [[PresentationManager]]. */\n presentation?: PresentationManagerProps;\n\n /**\n * Props for [[SelectionManager]].\n *\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. The whole unified selection system in this package is deprecated in favor of the new\n * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n selection?: Partial<SelectionManagerProps>;\n\n /** Props for [[FavoritePropertiesManager]]. */\n favorites?: FavoritePropertiesManagerProps;\n}\n\n/**\n * Static class used to statically set up Presentation library for the frontend.\n * Basically what it does is:\n * - Create a singleton [[PresentationManager]] instance\n * - Create a singleton [[SelectionManager]] instance\n * - Create a singleton [[FavoritePropertiesManager]]] instance\n *\n * @public\n */\nexport class Presentation {\n /* c8 ignore next */\n private constructor() {}\n\n /**\n * Initializes Presentation library for the frontend.\n *\n * Example:\n * ``` ts\n * [[include:Presentation.Frontend.Initialization]]\n * ```\n *\n * The method should be called after a call to [IModelApp.startup]($core-frontend).\n */\n public static async initialize(props?: PresentationProps): Promise<void> {\n if (!IModelApp.initialized) {\n throw new PresentationError(PresentationStatus.NotInitialized, \"IModelApp.startup must be called before calling Presentation.initialize\");\n }\n if (!localization) {\n localization = IModelApp.localization;\n }\n if (!presentationManager) {\n const managerProps = props?.presentation ?? {};\n if (!managerProps.activeLocale) {\n const languages = Presentation.localization.getLanguageList();\n managerProps.activeLocale = languages.length ? languages[0] : undefined;\n }\n presentationManager = PresentationManager.create(managerProps);\n }\n if (!selectionManager) {\n /* eslint-disable @typescript-eslint/no-deprecated */\n selectionManager = new SelectionManager({\n ...props?.selection,\n scopes:\n props?.selection?.scopes ??\n new SelectionScopesManager({\n rpcRequestsHandler: presentationManager[_presentation_manager_rpcRequestsHandler],\n localeProvider: () => this.presentation.activeLocale,\n }),\n });\n /* eslint-enable @typescript-eslint/no-deprecated */\n }\n if (!favoritePropertiesManager) {\n favoritePropertiesManager = new FavoritePropertiesManager({\n storage: props?.favorites ? props.favorites.storage : createFavoritePropertiesStorage(DefaultFavoritePropertiesStorageTypes.Noop),\n });\n }\n\n await FrontendLocalizationHelper.registerNamespaces();\n for (const handler of initializationHandlers) {\n const cleanup = await handler();\n if (cleanup) {\n terminationHandlers.push(cleanup);\n }\n }\n }\n\n /**\n * Terminates Presentation library frontend. This method should be called\n * before a call to [IModelApp.shutdown]($core-frontend)\n */\n public static terminate(): void {\n terminationHandlers.forEach((handler) => handler());\n terminationHandlers.length = 0;\n\n imodelInitializationHandlers.clear();\n\n if (localization) {\n FrontendLocalizationHelper.unregisterNamespaces();\n }\n\n if (presentationManager) {\n presentationManager[Symbol.dispose]();\n }\n presentationManager = undefined;\n\n if (favoritePropertiesManager) {\n favoritePropertiesManager[Symbol.dispose]();\n }\n favoritePropertiesManager = undefined;\n\n if (selectionManager) {\n selectionManager[Symbol.dispose]();\n }\n selectionManager = undefined;\n localization = undefined;\n }\n\n /**\n * Registers an additional handler which will be invoked during Presentation library frontend\n * initialization.\n */\n public static registerInitializationHandler(handler: () => Promise<() => void>): void {\n initializationHandlers.push(handler);\n }\n\n /** The singleton [[PresentationManager]] */\n public static get presentation(): PresentationManager {\n if (!presentationManager) {\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\n }\n return presentationManager;\n }\n\n /**\n * The singleton [[SelectionManager]].\n *\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. The whole unified selection system in this package is deprecated in favor of the new\n * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public static get selection(): SelectionManager {\n if (!selectionManager) {\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\n }\n return selectionManager;\n }\n\n /**\n * The singleton [[FavoritePropertiesManager]]\n */\n public static get favoriteProperties(): FavoritePropertiesManager {\n if (!favoritePropertiesManager) {\n throw new Error(\"Favorite Properties must be first initialized by calling Presentation.initialize\");\n }\n return favoritePropertiesManager;\n }\n\n /**\n * The localization manager used by Presentation frontend. Returns the result of `IModelApp.i18n`.\n */\n public static get localization(): Localization {\n if (!localization) {\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\n }\n return localization;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Presentation.js","sourceRoot":"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2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,MAAM,KAAK,kBAAkB;QAClC,IAAI,CAAC,yBAAyB,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;QACtG,CAAC;QACD,OAAO,yBAAyB,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,MAAM,KAAK,YAAY;QAC5B,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,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 Core\r\n */\r\n\r\nimport { IModelApp } from \"@itwin/core-frontend\";\r\nimport { Localization } from \"@itwin/core-common\";\r\nimport { PresentationError, PresentationStatus } from \"@itwin/presentation-common\";\r\nimport { FavoritePropertiesManager, FavoritePropertiesManagerProps } from \"./favorite-properties/FavoritePropertiesManager.js\";\r\nimport { createFavoritePropertiesStorage, DefaultFavoritePropertiesStorageTypes } from \"./favorite-properties/FavoritePropertiesStorage.js\";\r\nimport { FrontendLocalizationHelper } from \"./LocalizationHelper.js\";\r\nimport { PresentationManager, PresentationManagerProps } from \"./PresentationManager.js\";\r\nimport { SelectionManager, SelectionManagerProps } from \"./selection/SelectionManager.js\";\r\nimport { SelectionScopesManager } from \"./selection/SelectionScopesManager.js\";\r\nimport { imodelInitializationHandlers } from \"./IModelConnectionInitialization.js\";\r\nimport { _presentation_manager_rpcRequestsHandler } from \"./InternalSymbols.js\";\r\n\r\nlet localization: Localization | undefined;\r\nlet presentationManager: PresentationManager | undefined;\r\nlet selectionManager: SelectionManager | undefined; // eslint-disable-line @typescript-eslint/no-deprecated\r\nlet favoritePropertiesManager: FavoritePropertiesManager | undefined;\r\nconst initializationHandlers: Array<() => Promise<(() => void) | void>> = [];\r\nconst terminationHandlers: Array<() => void> = [];\r\n\r\n/**\r\n * Props for initializing [[Presentation]].\r\n * @public\r\n */\r\nexport interface PresentationProps {\r\n /** Props for [[PresentationManager]]. */\r\n presentation?: PresentationManagerProps;\r\n\r\n /**\r\n * Props for [[SelectionManager]].\r\n *\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. The whole unified selection system in this package is deprecated in favor of the new\r\n * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n selection?: Partial<SelectionManagerProps>;\r\n\r\n /** Props for [[FavoritePropertiesManager]]. */\r\n favorites?: FavoritePropertiesManagerProps;\r\n}\r\n\r\n/**\r\n * Static class used to statically set up Presentation library for the frontend.\r\n * Basically what it does is:\r\n * - Create a singleton [[PresentationManager]] instance\r\n * - Create a singleton [[SelectionManager]] instance\r\n * - Create a singleton [[FavoritePropertiesManager]]] instance\r\n *\r\n * @public\r\n */\r\nexport class Presentation {\r\n /* c8 ignore next */\r\n private constructor() {}\r\n\r\n /**\r\n * Initializes Presentation library for the frontend.\r\n *\r\n * Example:\r\n * ``` ts\r\n * [[include:Presentation.Frontend.Initialization]]\r\n * ```\r\n *\r\n * The method should be called after a call to [IModelApp.startup]($core-frontend).\r\n */\r\n public static async initialize(props?: PresentationProps): Promise<void> {\r\n if (!IModelApp.initialized) {\r\n throw new PresentationError(PresentationStatus.NotInitialized, \"IModelApp.startup must be called before calling Presentation.initialize\");\r\n }\r\n if (!localization) {\r\n localization = IModelApp.localization;\r\n }\r\n if (!presentationManager) {\r\n const managerProps = props?.presentation ?? {};\r\n if (!managerProps.activeLocale) {\r\n const languages = Presentation.localization.getLanguageList();\r\n managerProps.activeLocale = languages.length ? languages[0] : undefined;\r\n }\r\n presentationManager = PresentationManager.create(managerProps);\r\n }\r\n if (!selectionManager) {\r\n /* eslint-disable @typescript-eslint/no-deprecated */\r\n selectionManager = new SelectionManager({\r\n ...props?.selection,\r\n scopes:\r\n props?.selection?.scopes ??\r\n new SelectionScopesManager({\r\n rpcRequestsHandler: presentationManager[_presentation_manager_rpcRequestsHandler],\r\n localeProvider: () => this.presentation.activeLocale,\r\n }),\r\n });\r\n /* eslint-enable @typescript-eslint/no-deprecated */\r\n }\r\n if (!favoritePropertiesManager) {\r\n favoritePropertiesManager = new FavoritePropertiesManager({\r\n storage: props?.favorites ? props.favorites.storage : createFavoritePropertiesStorage(DefaultFavoritePropertiesStorageTypes.Noop),\r\n });\r\n }\r\n\r\n await FrontendLocalizationHelper.registerNamespaces();\r\n for (const handler of initializationHandlers) {\r\n const cleanup = await handler();\r\n if (cleanup) {\r\n terminationHandlers.push(cleanup);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Terminates Presentation library frontend. This method should be called\r\n * before a call to [IModelApp.shutdown]($core-frontend)\r\n */\r\n public static terminate(): void {\r\n terminationHandlers.forEach((handler) => handler());\r\n terminationHandlers.length = 0;\r\n\r\n imodelInitializationHandlers.clear();\r\n\r\n if (localization) {\r\n FrontendLocalizationHelper.unregisterNamespaces();\r\n }\r\n\r\n if (presentationManager) {\r\n presentationManager[Symbol.dispose]();\r\n }\r\n presentationManager = undefined;\r\n\r\n if (favoritePropertiesManager) {\r\n favoritePropertiesManager[Symbol.dispose]();\r\n }\r\n favoritePropertiesManager = undefined;\r\n\r\n if (selectionManager) {\r\n selectionManager[Symbol.dispose]();\r\n }\r\n selectionManager = undefined;\r\n localization = undefined;\r\n }\r\n\r\n /**\r\n * Registers an additional handler which will be invoked during Presentation library frontend\r\n * initialization.\r\n */\r\n public static registerInitializationHandler(handler: () => Promise<() => void>): void {\r\n initializationHandlers.push(handler);\r\n }\r\n\r\n /** The singleton [[PresentationManager]] */\r\n public static get presentation(): PresentationManager {\r\n if (!presentationManager) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return presentationManager;\r\n }\r\n\r\n /**\r\n * The singleton [[SelectionManager]].\r\n *\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. The whole unified selection system in this package is deprecated in favor of the new\r\n * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public static get selection(): SelectionManager {\r\n if (!selectionManager) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return selectionManager;\r\n }\r\n\r\n /**\r\n * The singleton [[FavoritePropertiesManager]]\r\n */\r\n public static get favoriteProperties(): FavoritePropertiesManager {\r\n if (!favoritePropertiesManager) {\r\n throw new Error(\"Favorite Properties must be first initialized by calling Presentation.initialize\");\r\n }\r\n return favoritePropertiesManager;\r\n }\r\n\r\n /**\r\n * The localization manager used by Presentation frontend. Returns the result of `IModelApp.i18n`.\r\n */\r\n public static get localization(): Localization {\r\n if (!localization) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return localization;\r\n }\r\n}\r\n"]}
|
|
@@ -14,7 +14,7 @@ import { RulesetVariablesManager } from "./RulesetVariablesManager.js";
|
|
|
14
14
|
/**
|
|
15
15
|
* Data structure that describes IModel hierarchy change event arguments.
|
|
16
16
|
* @public
|
|
17
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
17
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
18
18
|
* package for creating hierarchies.
|
|
19
19
|
*/
|
|
20
20
|
export interface IModelHierarchyChangeEventArgs {
|
|
@@ -57,7 +57,7 @@ export type MultipleValuesRequestOptions = Paged<{
|
|
|
57
57
|
/**
|
|
58
58
|
* Options for requests that retrieve nodes.
|
|
59
59
|
* @public
|
|
60
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
60
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
61
61
|
* package for creating hierarchies.
|
|
62
62
|
*/
|
|
63
63
|
export type GetNodesRequestOptions = HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute;
|
|
@@ -142,7 +142,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
142
142
|
/**
|
|
143
143
|
* An event raised when hierarchies created using specific ruleset change.
|
|
144
144
|
*
|
|
145
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
145
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
146
146
|
* package for creating hierarchies.
|
|
147
147
|
*/
|
|
148
148
|
onIModelHierarchyChanged: BeEvent<(args: IModelHierarchyChangeEventArgs) => void>;
|
|
@@ -191,7 +191,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
191
191
|
private addRulesetAndVariablesToOptions;
|
|
192
192
|
/**
|
|
193
193
|
* Returns an iterator that polls nodes asynchronously.
|
|
194
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
194
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
195
195
|
* package for creating hierarchies.
|
|
196
196
|
*/
|
|
197
197
|
getNodesIterator(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<{
|
|
@@ -205,7 +205,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
205
205
|
getNodes(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<Node[]>;
|
|
206
206
|
/**
|
|
207
207
|
* Retrieves nodes count.
|
|
208
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
208
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
209
209
|
* package for creating hierarchies.
|
|
210
210
|
*/
|
|
211
211
|
getNodesCount(requestOptions: GetNodesRequestOptions): Promise<number>;
|
|
@@ -220,19 +220,19 @@ export declare class PresentationManager implements Disposable {
|
|
|
220
220
|
/**
|
|
221
221
|
* Retrieves hierarchy level descriptor.
|
|
222
222
|
* @public
|
|
223
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
223
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
224
224
|
* package for creating hierarchies.
|
|
225
225
|
*/
|
|
226
226
|
getNodesDescriptor(requestOptions: HierarchyLevelDescriptorRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute): Promise<Descriptor | undefined>;
|
|
227
227
|
/**
|
|
228
228
|
* Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged.
|
|
229
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
229
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
230
230
|
* package for creating hierarchies.
|
|
231
231
|
*/
|
|
232
232
|
getNodePaths(requestOptions: FilterByInstancePathsHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute): Promise<NodePathElement[]>;
|
|
233
233
|
/**
|
|
234
234
|
* Retrieves paths from root nodes to nodes containing filter text in their label.
|
|
235
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
235
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
236
236
|
* package for creating hierarchies.
|
|
237
237
|
*/
|
|
238
238
|
getFilteredNodePaths(requestOptions: FilterByTextHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute): Promise<NodePathElement[]>;
|
|
@@ -37,7 +37,7 @@ export class PresentationManager {
|
|
|
37
37
|
/**
|
|
38
38
|
* An event raised when hierarchies created using specific ruleset change.
|
|
39
39
|
*
|
|
40
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
40
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
41
41
|
* package for creating hierarchies.
|
|
42
42
|
*/
|
|
43
43
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
@@ -206,7 +206,7 @@ export class PresentationManager {
|
|
|
206
206
|
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
207
207
|
/**
|
|
208
208
|
* Returns an iterator that polls nodes asynchronously.
|
|
209
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
209
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
210
210
|
* package for creating hierarchies.
|
|
211
211
|
*/
|
|
212
212
|
async getNodesIterator(requestOptions) {
|
|
@@ -235,7 +235,7 @@ export class PresentationManager {
|
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
237
237
|
* Retrieves nodes count.
|
|
238
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
238
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
239
239
|
* package for creating hierarchies.
|
|
240
240
|
*/
|
|
241
241
|
async getNodesCount(requestOptions) {
|
|
@@ -258,7 +258,7 @@ export class PresentationManager {
|
|
|
258
258
|
/**
|
|
259
259
|
* Retrieves hierarchy level descriptor.
|
|
260
260
|
* @public
|
|
261
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
261
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
262
262
|
* package for creating hierarchies.
|
|
263
263
|
*/
|
|
264
264
|
async getNodesDescriptor(requestOptions) {
|
|
@@ -276,7 +276,7 @@ export class PresentationManager {
|
|
|
276
276
|
}
|
|
277
277
|
/**
|
|
278
278
|
* Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged.
|
|
279
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
279
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
280
280
|
* package for creating hierarchies.
|
|
281
281
|
*/
|
|
282
282
|
async getNodePaths(requestOptions) {
|
|
@@ -288,7 +288,7 @@ export class PresentationManager {
|
|
|
288
288
|
}
|
|
289
289
|
/**
|
|
290
290
|
* Retrieves paths from root nodes to nodes containing filter text in their label.
|
|
291
|
-
* @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
291
|
+
* @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
|
|
292
292
|
* package for creating hierarchies.
|
|
293
293
|
*/
|
|
294
294
|
async getFilteredNodePaths(requestOptions) {
|