UNPKG

@itwin/presentation-frontend

Version:

Frontend of iModel.js Presentation library

75 lines 3.05 kB
/** @packageDocumentation * @module Core */ import { Localization } from "@itwin/core-common"; import { FavoritePropertiesManager, FavoritePropertiesManagerProps } from "./favorite-properties/FavoritePropertiesManager.js"; import { PresentationManager, PresentationManagerProps } from "./PresentationManager.js"; import { SelectionManager, SelectionManagerProps } from "./selection/SelectionManager.js"; /** * Props for initializing [[Presentation]]. * @public */ export interface PresentationProps { /** Props for [[PresentationManager]]. */ presentation?: PresentationManagerProps; /** * Props for [[SelectionManager]]. * * @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 * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package. */ selection?: Partial<SelectionManagerProps>; /** Props for [[FavoritePropertiesManager]]. */ favorites?: FavoritePropertiesManagerProps; } /** * Static class used to statically set up Presentation library for the frontend. * Basically what it does is: * - Create a singleton [[PresentationManager]] instance * - Create a singleton [[SelectionManager]] instance * - Create a singleton [[FavoritePropertiesManager]]] instance * * @public */ export declare class Presentation { private constructor(); /** * Initializes Presentation library for the frontend. * * Example: * ``` ts * [[include:Presentation.Frontend.Initialization]] * ``` * * The method should be called after a call to [IModelApp.startup]($core-frontend). */ static initialize(props?: PresentationProps): Promise<void>; /** * Terminates Presentation library frontend. This method should be called * before a call to [IModelApp.shutdown]($core-frontend) */ static terminate(): void; /** * Registers an additional handler which will be invoked during Presentation library frontend * initialization. */ static registerInitializationHandler(handler: () => Promise<() => void>): void; /** The singleton [[PresentationManager]] */ static get presentation(): PresentationManager; /** * The singleton [[SelectionManager]]. * * @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 * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package. */ static get selection(): SelectionManager; /** * The singleton [[FavoritePropertiesManager]] */ static get favoriteProperties(): FavoritePropertiesManager; /** * The localization manager used by Presentation frontend. Returns the result of `IModelApp.i18n`. */ static get localization(): Localization; } //# sourceMappingURL=Presentation.d.ts.map