@itwin/presentation-frontend 5.1.0-dev.9 → 5.2.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -1
- package/lib/cjs/presentation-frontend/Presentation.d.ts +2 -2
- package/lib/cjs/presentation-frontend/Presentation.js +1 -1
- package/lib/cjs/presentation-frontend/Presentation.js.map +1 -1
- package/lib/cjs/presentation-frontend/PresentationManager.d.ts +16 -11
- package/lib/cjs/presentation-frontend/PresentationManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/PresentationManager.js +24 -15
- package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +4 -4
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +4 -4
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts +3 -3
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js +1 -1
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.d.ts +1 -1
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts +4 -4
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js +2 -2
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts +3 -3
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.js +2 -2
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.js +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts +3 -3
- package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionManager.js +2 -2
- package/lib/cjs/presentation-frontend/selection/SelectionManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts +3 -3
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js +2 -2
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend.js +20 -0
- package/lib/cjs/presentation-frontend.js.map +1 -1
- package/lib/esm/presentation-frontend/Presentation.d.ts +2 -2
- package/lib/esm/presentation-frontend/Presentation.js +1 -1
- package/lib/esm/presentation-frontend/Presentation.js.map +1 -1
- package/lib/esm/presentation-frontend/PresentationManager.d.ts +16 -11
- package/lib/esm/presentation-frontend/PresentationManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/PresentationManager.js +24 -15
- package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +4 -4
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +4 -4
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts +3 -3
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js +1 -1
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.d.ts +1 -1
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts +4 -4
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js +2 -2
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts +3 -3
- package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHandler.js +2 -2
- package/lib/esm/presentation-frontend/selection/SelectionHandler.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHelper.js +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHelper.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts +3 -3
- package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionManager.js +2 -2
- package/lib/esm/presentation-frontend/selection/SelectionManager.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts +3 -3
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js +2 -2
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
- package/lib/esm/presentation-frontend.js +20 -0
- package/lib/esm/presentation-frontend.js.map +1 -1
- package/package.json +20 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,70 @@
|
|
|
1
1
|
# Change Log - @itwin/presentation-frontend
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed,
|
|
3
|
+
This log was last generated on Wed, 16 Jul 2025 15:01:35 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.0.4
|
|
6
|
+
Wed, 16 Jul 2025 14:59:59 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 5.0.3
|
|
11
|
+
Fri, 11 Jul 2025 00:56:56 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
14
|
+
|
|
15
|
+
## 5.0.2
|
|
16
|
+
Thu, 26 Jun 2025 22:16:01 GMT
|
|
17
|
+
|
|
18
|
+
_Version update only_
|
|
19
|
+
|
|
20
|
+
## 5.0.1
|
|
21
|
+
Tue, 17 Jun 2025 18:33:52 GMT
|
|
22
|
+
|
|
23
|
+
_Version update only_
|
|
24
|
+
|
|
25
|
+
## 5.0.0
|
|
26
|
+
Fri, 13 Jun 2025 20:25:38 GMT
|
|
27
|
+
|
|
28
|
+
### Updates
|
|
29
|
+
|
|
30
|
+
- Add Symbols to prevent duplicate instances of package
|
|
31
|
+
- Bumped `@itwin/unified-selection` version.
|
|
32
|
+
- Handle Models' and SubCategories' selection when syncing `SelectionSet` to unified selection.
|
|
33
|
+
- Upgrade compile target to ES2023 and module to ES2022
|
|
34
|
+
- Add `type: "module"` to `package.json` to tell Node.js to load this package as ESM by default.
|
|
35
|
+
- Deprecate unified selection related APIs.
|
|
36
|
+
- Bump `@itwin/unified-selection` dependency version to `^1.2.0`.
|
|
37
|
+
- Fix selection changes not being handled in certain scenarios: when using blank connections or when using multiple connections to the same iModel.
|
|
38
|
+
- Expose `SelectionManager.selectionStorage` as a readonly member. This gives consumers a chance to start using selection storage directly instead of through soon-to-be-deprecated `SelectionManager`.
|
|
39
|
+
- Remove `@internal` APIs from public barrel exports file.
|
|
40
|
+
- Clean up APIs deprecated in 3.x
|
|
41
|
+
- Clean up APIs deprecated in 3.x
|
|
42
|
+
- Change core peer dependencies to strict version.
|
|
43
|
+
|
|
44
|
+
## 4.11.6
|
|
45
|
+
Mon, 16 Jun 2025 15:00:15 GMT
|
|
46
|
+
|
|
47
|
+
_Version update only_
|
|
48
|
+
|
|
49
|
+
## 4.11.5
|
|
50
|
+
Fri, 06 Jun 2025 13:41:18 GMT
|
|
51
|
+
|
|
52
|
+
_Version update only_
|
|
53
|
+
|
|
54
|
+
## 4.11.4
|
|
55
|
+
Tue, 03 Jun 2025 16:15:19 GMT
|
|
56
|
+
|
|
57
|
+
_Version update only_
|
|
58
|
+
|
|
59
|
+
## 4.11.3
|
|
60
|
+
Wed, 28 May 2025 13:56:23 GMT
|
|
61
|
+
|
|
62
|
+
_Version update only_
|
|
63
|
+
|
|
64
|
+
## 4.11.2
|
|
65
|
+
Tue, 20 May 2025 20:14:46 GMT
|
|
66
|
+
|
|
67
|
+
_Version update only_
|
|
4
68
|
|
|
5
69
|
## 4.11.1
|
|
6
70
|
Wed, 30 Apr 2025 13:13:21 GMT
|
|
@@ -15,7 +15,7 @@ export interface PresentationProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* Props for [[SelectionManager]].
|
|
17
17
|
*
|
|
18
|
-
* @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new
|
|
18
|
+
* @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
|
|
19
19
|
* [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.
|
|
20
20
|
*/
|
|
21
21
|
selection?: Partial<SelectionManagerProps>;
|
|
@@ -59,7 +59,7 @@ export declare class Presentation {
|
|
|
59
59
|
/**
|
|
60
60
|
* The singleton [[SelectionManager]].
|
|
61
61
|
*
|
|
62
|
-
* @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new
|
|
62
|
+
* @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
|
|
63
63
|
* [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.
|
|
64
64
|
*/
|
|
65
65
|
static get selection(): SelectionManager;
|
|
@@ -128,7 +128,7 @@ class Presentation {
|
|
|
128
128
|
/**
|
|
129
129
|
* The singleton [[SelectionManager]].
|
|
130
130
|
*
|
|
131
|
-
* @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new
|
|
131
|
+
* @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
|
|
132
132
|
* [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.
|
|
133
133
|
*/
|
|
134
134
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Presentation.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Presentation.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,wDAAiD;AAEjD,oEAAmF;AACnF,qGAA+H;AAC/H,qGAA4I;AAC5I,mEAAqE;AACrE,qEAAyF;AACzF,yEAA0F;AAC1F,qFAA+E;AAC/E,2FAAmF;AACnF,6DAAgF;AAEhF,IAAI,YAAsC,CAAC;AAC3C,IAAI,mBAAoD,CAAC;AACzD,IAAI,gBAA8C,CAAC,CAAC,uDAAuD;AAC3G,IAAI,yBAAgE,CAAC;AACrE,MAAM,sBAAsB,GAA8C,EAAE,CAAC;AAC7E,MAAM,mBAAmB,GAAsB,EAAE,CAAC;AAuBlD;;;;;;;;GAQG;AACH,MAAa,YAAY;IACvB,oBAAoB;IACpB,gBAAuB,CAAC;IAExB;;;;;;;;;OASG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,KAAyB;QACtD,IAAI,CAAC,yBAAS,CAAC,WAAW,EAAE,CAAC;YAC3B,MAAM,IAAI,uCAAiB,CAAC,wCAAkB,CAAC,cAAc,EAAE,yEAAyE,CAAC,CAAC;QAC5I,CAAC;QACD,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,YAAY,GAAG,yBAAS,CAAC,YAAY,CAAC;QACxC,CAAC;QACD,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,MAAM,YAAY,GAAG,KAAK,EAAE,YAAY,IAAI,EAAE,CAAC;YAC/C,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;gBAC/B,MAAM,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC;gBAC9D,YAAY,CA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BAAyB,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;AAzID,oCAyIC","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. 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. 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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,CAAC;QAC/F,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AAzID,oCAyIC","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"]}
|
|
@@ -7,10 +7,10 @@ import { UnitSystemKey } from "@itwin/core-quantity";
|
|
|
7
7
|
import { SchemaContext } from "@itwin/ecschema-metadata";
|
|
8
8
|
import { ClientDiagnosticsAttribute, Content, ContentDescriptorRequestOptions, ContentInstanceKeysRequestOptions, ContentRequestOptions, ContentSourcesRequestOptions, ContentUpdateInfo, Descriptor, DescriptorOverrides, DisplayLabelRequestOptions, DisplayLabelsRequestOptions, DisplayValueGroup, DistinctValuesRequestOptions, ElementProperties, FilterByInstancePathsHierarchyRequestOptions, FilterByTextHierarchyRequestOptions, FormatsMap, HierarchyLevelDescriptorRequestOptions, HierarchyRequestOptions, HierarchyUpdateInfo, InstanceKey, Item, KeySet, LabelDefinition, Node, NodeKey, NodePathElement, Paged, PagedResponse, RulesetVariable, SelectClassInfo, SingleElementPropertiesRequestOptions } from "@itwin/presentation-common";
|
|
9
9
|
import { RpcRequestsHandler } from "@itwin/presentation-common/internal";
|
|
10
|
+
import { _presentation_manager_ipcRequestsHandler, _presentation_manager_rpcRequestsHandler } from "./InternalSymbols.js";
|
|
10
11
|
import { IpcRequestsHandler } from "./IpcRequestsHandler.js";
|
|
11
12
|
import { RulesetManager } from "./RulesetManager.js";
|
|
12
13
|
import { RulesetVariablesManager } from "./RulesetVariablesManager.js";
|
|
13
|
-
import { _presentation_manager_ipcRequestsHandler, _presentation_manager_rpcRequestsHandler } from "./InternalSymbols.js";
|
|
14
14
|
/**
|
|
15
15
|
* Data structure that describes IModel hierarchy change event arguments.
|
|
16
16
|
* @public
|
|
@@ -83,7 +83,7 @@ export interface PresentationManagerProps {
|
|
|
83
83
|
* overriden for each request through request parameters. If not set, `IModelApp.quantityFormatter.activeUnitSystem`
|
|
84
84
|
* is used by default.
|
|
85
85
|
*
|
|
86
|
-
* @deprecated in 4.0. Use [IModelApp.quantityFormatter]($core-frontend) to set the active unit system.
|
|
86
|
+
* @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [IModelApp.quantityFormatter]($core-frontend) to set the active unit system.
|
|
87
87
|
*/
|
|
88
88
|
activeUnitSystem?: UnitSystemKey;
|
|
89
89
|
/**
|
|
@@ -104,6 +104,8 @@ export interface PresentationManagerProps {
|
|
|
104
104
|
/**
|
|
105
105
|
* Callback that provides [SchemaContext]($ecschema-metadata) for supplied [IModelConnection]($core-frontend).
|
|
106
106
|
* [SchemaContext]($ecschema-metadata) is used for getting metadata required for values formatting.
|
|
107
|
+
*
|
|
108
|
+
* @deprecated in 5.1. By default [IModelConnection.schemaContext]($core-frontend) is now used instead.
|
|
107
109
|
*/
|
|
108
110
|
schemaContextProvider?: (imodel: IModelConnection) => SchemaContext;
|
|
109
111
|
/**
|
|
@@ -111,6 +113,9 @@ export interface PresentationManagerProps {
|
|
|
111
113
|
* in requested unit system.
|
|
112
114
|
*
|
|
113
115
|
* @note Only has effect when frontend value formatting is enabled by supplying the `schemaContextProvider` prop.
|
|
116
|
+
*
|
|
117
|
+
* @deprecated in 5.1. All formats' logic is now handled by [IModelApp.formatsProvider]($core-frontend). Until the prop is removed, when
|
|
118
|
+
* supplied, this map will be used as a fallback if IModelApp's formats provider doesn't return anything for requested format.
|
|
114
119
|
*/
|
|
115
120
|
defaultFormats?: FormatsMap;
|
|
116
121
|
}
|
|
@@ -127,7 +132,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
127
132
|
private _explicitActiveUnitSystem;
|
|
128
133
|
private _rulesetVars;
|
|
129
134
|
private _clearEventListener?;
|
|
130
|
-
private _schemaContextProvider
|
|
135
|
+
private _schemaContextProvider;
|
|
131
136
|
private _defaultFormats?;
|
|
132
137
|
private _ipcRequestsHandler?;
|
|
133
138
|
/**
|
|
@@ -141,7 +146,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
141
146
|
/**
|
|
142
147
|
* Get / set active unit system used to format property values with units.
|
|
143
148
|
*
|
|
144
|
-
* @deprecated in 4.0. `IModelApp.quantityFormatter` should be used to get/set the active unit system. At the moment
|
|
149
|
+
* @deprecated in 4.0 - will not be removed until after 2026-06-13. `IModelApp.quantityFormatter` should be used to get/set the active unit system. At the moment
|
|
145
150
|
* [[PresentationManager]] allows overriding it, but returns `IModelApp.quantityFormatter.activeUnitSystem` if override
|
|
146
151
|
* is not set.
|
|
147
152
|
*/
|
|
@@ -152,7 +157,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
152
157
|
get activeLocale(): string | undefined;
|
|
153
158
|
set activeLocale(locale: string | undefined);
|
|
154
159
|
[Symbol.dispose](): void;
|
|
155
|
-
/** @deprecated in 5.0 Use [Symbol.dispose] instead. */
|
|
160
|
+
/** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */
|
|
156
161
|
dispose(): void;
|
|
157
162
|
private onUpdate;
|
|
158
163
|
/** @note This is only called in native apps after changes in iModels */
|
|
@@ -184,14 +189,14 @@ export declare class PresentationManager implements Disposable {
|
|
|
184
189
|
}>;
|
|
185
190
|
/**
|
|
186
191
|
* Retrieves nodes
|
|
187
|
-
* @deprecated in 4.5. Use [[getNodesIterator]] instead.
|
|
192
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
|
|
188
193
|
*/
|
|
189
194
|
getNodes(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<Node[]>;
|
|
190
195
|
/** Retrieves nodes count. */
|
|
191
196
|
getNodesCount(requestOptions: GetNodesRequestOptions): Promise<number>;
|
|
192
197
|
/**
|
|
193
198
|
* Retrieves total nodes count and a single page of nodes.
|
|
194
|
-
* @deprecated in 4.5. Use [[getNodesIterator]] instead.
|
|
199
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
|
|
195
200
|
*/
|
|
196
201
|
getNodesAndCount(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<{
|
|
197
202
|
count: number;
|
|
@@ -225,12 +230,12 @@ export declare class PresentationManager implements Disposable {
|
|
|
225
230
|
} | undefined>;
|
|
226
231
|
/**
|
|
227
232
|
* Retrieves content which consists of a content descriptor and a page of records.
|
|
228
|
-
* @deprecated in 4.5. Use [[getContentIterator]] instead.
|
|
233
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.
|
|
229
234
|
*/
|
|
230
235
|
getContent(requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions): Promise<Content | undefined>;
|
|
231
236
|
/**
|
|
232
237
|
* Retrieves content set size and content which consists of a content descriptor and a page of records.
|
|
233
|
-
* @deprecated in 4.5. Use [[getContentIterator]] instead.
|
|
238
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.
|
|
234
239
|
*/
|
|
235
240
|
getContentAndSize(requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions): Promise<{
|
|
236
241
|
content: Content;
|
|
@@ -243,7 +248,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
243
248
|
}>;
|
|
244
249
|
/**
|
|
245
250
|
* Retrieves distinct values of specific field from the content.
|
|
246
|
-
* @deprecated in 4.5. Use [[getDistinctValuesIterator]] instead.
|
|
251
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDistinctValuesIterator]] instead.
|
|
247
252
|
*/
|
|
248
253
|
getPagedDistinctValues(requestOptions: GetDistinctValuesRequestOptions & MultipleValuesRequestOptions): Promise<PagedResponse<DisplayValueGroup>>;
|
|
249
254
|
/**
|
|
@@ -268,7 +273,7 @@ export declare class PresentationManager implements Disposable {
|
|
|
268
273
|
}>;
|
|
269
274
|
/**
|
|
270
275
|
* Retrieves display label definition of specific items.
|
|
271
|
-
* @deprecated in 4.5. Use [[getDisplayLabelDefinitionsIterator]] instead.
|
|
276
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDisplayLabelDefinitionsIterator]] instead.
|
|
272
277
|
*/
|
|
273
278
|
getDisplayLabelDefinitions(requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions): Promise<LabelDefinition[]>;
|
|
274
279
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAA0C,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAa,gBAAgB,EAAU,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EACL,0BAA0B,EAC1B,OAAO,EACP,+BAA+B,EAE/B,iCAAiC,EACjC,qBAAqB,EACrB,4BAA4B,EAC5B,iBAAiB,EAEjB,UAAU,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,4BAA4B,EAC5B,iBAAiB,EACjB,4CAA4C,EAC5C,mCAAmC,EACnC,UAAU,EACV,sCAAsC,EACtC,uBAAuB,EACvB,mBAAmB,EACnB,WAAW,EACX,IAAI,EAGJ,MAAM,EAEN,eAAe,EACf,IAAI,EACJ,OAAO,EACP,eAAe,EACf,KAAK,EACL,aAAa,EAGb,eAAe,EACf,eAAe,EACf,qCAAqC,EAGtC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAKL,kBAAkB,EACnB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAA0C,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAa,gBAAgB,EAAU,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EACL,0BAA0B,EAC1B,OAAO,EACP,+BAA+B,EAE/B,iCAAiC,EACjC,qBAAqB,EACrB,4BAA4B,EAC5B,iBAAi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;IACU,0BAA0B,CACrC,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC,eAAe,EAAE,CAAC;CAI9B"}
|
|
@@ -13,13 +13,13 @@ const core_frontend_1 = require("@itwin/core-frontend");
|
|
|
13
13
|
const presentation_common_1 = require("@itwin/presentation-common");
|
|
14
14
|
const internal_1 = require("@itwin/presentation-common/internal");
|
|
15
15
|
const unified_selection_1 = require("@itwin/unified-selection");
|
|
16
|
+
const IModelConnectionInitialization_js_1 = require("./IModelConnectionInitialization.js");
|
|
17
|
+
const InternalSymbols_js_1 = require("./InternalSymbols.js");
|
|
16
18
|
const IpcRequestsHandler_js_1 = require("./IpcRequestsHandler.js");
|
|
17
19
|
const LocalizationHelper_js_1 = require("./LocalizationHelper.js");
|
|
18
20
|
const RulesetManager_js_1 = require("./RulesetManager.js");
|
|
19
21
|
const RulesetVariablesManager_js_1 = require("./RulesetVariablesManager.js");
|
|
20
22
|
const StreamedResponseGenerator_js_1 = require("./StreamedResponseGenerator.js");
|
|
21
|
-
const IModelConnectionInitialization_js_1 = require("./IModelConnectionInitialization.js");
|
|
22
|
-
const InternalSymbols_js_1 = require("./InternalSymbols.js");
|
|
23
23
|
/**
|
|
24
24
|
* Frontend Presentation manager which basically just forwards all calls to
|
|
25
25
|
* the backend implementation.
|
|
@@ -34,6 +34,7 @@ class PresentationManager {
|
|
|
34
34
|
_rulesetVars;
|
|
35
35
|
_clearEventListener;
|
|
36
36
|
_schemaContextProvider;
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
37
38
|
_defaultFormats;
|
|
38
39
|
_ipcRequestsHandler;
|
|
39
40
|
/**
|
|
@@ -47,7 +48,7 @@ class PresentationManager {
|
|
|
47
48
|
/**
|
|
48
49
|
* Get / set active unit system used to format property values with units.
|
|
49
50
|
*
|
|
50
|
-
* @deprecated in 4.0. `IModelApp.quantityFormatter` should be used to get/set the active unit system. At the moment
|
|
51
|
+
* @deprecated in 4.0 - will not be removed until after 2026-06-13. `IModelApp.quantityFormatter` should be used to get/set the active unit system. At the moment
|
|
51
52
|
* [[PresentationManager]] allows overriding it, but returns `IModelApp.quantityFormatter.activeUnitSystem` if override
|
|
52
53
|
* is not set.
|
|
53
54
|
*/
|
|
@@ -68,7 +69,9 @@ class PresentationManager {
|
|
|
68
69
|
this._rulesetVars = new Map();
|
|
69
70
|
this._rulesets = RulesetManager_js_1.RulesetManagerImpl.create();
|
|
70
71
|
this._localizationHelper = new LocalizationHelper_js_1.FrontendLocalizationHelper(props?.activeLocale);
|
|
71
|
-
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
73
|
+
this._schemaContextProvider = props?.schemaContextProvider ?? ((imodel) => imodel.schemaContext);
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
72
75
|
this._defaultFormats = props?.defaultFormats;
|
|
73
76
|
if (core_frontend_1.IpcApp.isValid) {
|
|
74
77
|
// Ipc only works in ipc apps, so the `onUpdate` callback will only be called there.
|
|
@@ -89,7 +92,7 @@ class PresentationManager {
|
|
|
89
92
|
this._clearEventListener = undefined;
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
|
-
/** @deprecated in 5.0 Use [Symbol.dispose] instead. */
|
|
95
|
+
/** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */
|
|
93
96
|
/* c8 ignore next 3 */
|
|
94
97
|
dispose() {
|
|
95
98
|
this[Symbol.dispose]();
|
|
@@ -216,7 +219,7 @@ class PresentationManager {
|
|
|
216
219
|
}
|
|
217
220
|
/**
|
|
218
221
|
* Retrieves nodes
|
|
219
|
-
* @deprecated in 4.5. Use [[getNodesIterator]] instead.
|
|
222
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
|
|
220
223
|
*/
|
|
221
224
|
async getNodes(requestOptions) {
|
|
222
225
|
const result = await this.getNodesIterator(requestOptions);
|
|
@@ -231,7 +234,7 @@ class PresentationManager {
|
|
|
231
234
|
}
|
|
232
235
|
/**
|
|
233
236
|
* Retrieves total nodes count and a single page of nodes.
|
|
234
|
-
* @deprecated in 4.5. Use [[getNodesIterator]] instead.
|
|
237
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
|
|
235
238
|
*/
|
|
236
239
|
async getNodesAndCount(requestOptions) {
|
|
237
240
|
const result = await this.getNodesIterator(requestOptions);
|
|
@@ -318,13 +321,19 @@ class PresentationManager {
|
|
|
318
321
|
...options,
|
|
319
322
|
descriptor: getDescriptorOverrides(requestOptions.descriptor),
|
|
320
323
|
keys: stripTransientElementKeys(requestOptions.keys).toJSON(),
|
|
324
|
+
omitFormattedValues: true,
|
|
321
325
|
...(firstPageSize ? { paging: { ...requestOptions.paging, size: firstPageSize } } : undefined),
|
|
322
|
-
...(!requestOptions.omitFormattedValues && this._schemaContextProvider !== undefined ? { omitFormattedValues: true } : undefined),
|
|
323
326
|
});
|
|
324
327
|
let contentFormatter;
|
|
325
|
-
if (!requestOptions.omitFormattedValues
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
+
if (!requestOptions.omitFormattedValues) {
|
|
329
|
+
const schemaContext = this._schemaContextProvider(requestOptions.imodel);
|
|
330
|
+
const unitSystem = requestOptions.unitSystem ?? this._explicitActiveUnitSystem ?? core_frontend_1.IModelApp.quantityFormatter.activeUnitSystem;
|
|
331
|
+
const koqPropertyFormatter = new presentation_common_1.KoqPropertyValueFormatter({
|
|
332
|
+
schemaContext,
|
|
333
|
+
formatsProvider: core_frontend_1.IModelApp.formatsProvider,
|
|
334
|
+
});
|
|
335
|
+
koqPropertyFormatter.defaultFormats = this._defaultFormats;
|
|
336
|
+
contentFormatter = new internal_1.ContentFormatter(new internal_1.ContentPropertyValueFormatter(koqPropertyFormatter), unitSystem);
|
|
328
337
|
}
|
|
329
338
|
let descriptor = requestOptions.descriptor instanceof presentation_common_1.Descriptor ? requestOptions.descriptor : undefined;
|
|
330
339
|
let firstPage;
|
|
@@ -375,7 +384,7 @@ class PresentationManager {
|
|
|
375
384
|
}
|
|
376
385
|
/**
|
|
377
386
|
* Retrieves content which consists of a content descriptor and a page of records.
|
|
378
|
-
* @deprecated in 4.5. Use [[getContentIterator]] instead.
|
|
387
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.
|
|
379
388
|
*/
|
|
380
389
|
async getContent(requestOptions) {
|
|
381
390
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
@@ -383,7 +392,7 @@ class PresentationManager {
|
|
|
383
392
|
}
|
|
384
393
|
/**
|
|
385
394
|
* Retrieves content set size and content which consists of a content descriptor and a page of records.
|
|
386
|
-
* @deprecated in 4.5. Use [[getContentIterator]] instead.
|
|
395
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.
|
|
387
396
|
*/
|
|
388
397
|
async getContentAndSize(requestOptions) {
|
|
389
398
|
const response = await this.getContentIterator(requestOptions);
|
|
@@ -420,7 +429,7 @@ class PresentationManager {
|
|
|
420
429
|
}
|
|
421
430
|
/**
|
|
422
431
|
* Retrieves distinct values of specific field from the content.
|
|
423
|
-
* @deprecated in 4.5. Use [[getDistinctValuesIterator]] instead.
|
|
432
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDistinctValuesIterator]] instead.
|
|
424
433
|
*/
|
|
425
434
|
async getPagedDistinctValues(requestOptions) {
|
|
426
435
|
const result = await this.getDistinctValuesIterator(requestOptions);
|
|
@@ -509,7 +518,7 @@ class PresentationManager {
|
|
|
509
518
|
}
|
|
510
519
|
/**
|
|
511
520
|
* Retrieves display label definition of specific items.
|
|
512
|
-
* @deprecated in 4.5. Use [[getDisplayLabelDefinitionsIterator]] instead.
|
|
521
|
+
* @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDisplayLabelDefinitionsIterator]] instead.
|
|
513
522
|
*/
|
|
514
523
|
async getDisplayLabelDefinitions(requestOptions) {
|
|
515
524
|
const { items } = await this.getDisplayLabelDefinitionsIterator(requestOptions);
|