UNPKG

@itwin/presentation-frontend

Version:

Frontend of iModel.js Presentation library

74 lines 2.79 kB
/** @packageDocumentation * @module Core */ import { Localization } from "@itwin/core-common"; import { FavoritePropertiesManager, FavoritePropertiesManagerProps } from "./favorite-properties/FavoritePropertiesManager"; import { PresentationManager, PresentationManagerProps } from "./PresentationManager"; import { SelectionManager, SelectionManagerProps } from "./selection/SelectionManager"; /** * Props for initializing [[Presentation]]. * @public */ export interface PresentationProps { /** Props for [[PresentationManager]]. */ presentation?: PresentationManagerProps; /** Props for [[SelectionManager]]. */ 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; /** @internal */ static setPresentationManager(value: PresentationManager): void; /** The singleton [[SelectionManager]] */ static get selection(): SelectionManager; /** @internal */ static setSelectionManager(value: SelectionManager): void; /** * The singleton [[FavoritePropertiesManager]] * @public */ static get favoriteProperties(): FavoritePropertiesManager; /** @internal */ static setFavoritePropertiesManager(value: FavoritePropertiesManager): void; /** * The localization manager used by Presentation frontend. Returns the result of `IModelApp.i18n`. */ static get localization(): Localization; /** @internal */ static setLocalization(value: Localization): void; } //# sourceMappingURL=Presentation.d.ts.map