/** @packageDocumentation * @module Utilities */ import { Store } from "redux"; import { GuidString } from "@bentley/bentleyjs-core"; import { IModelConnection, SnapMode, ViewState } from "@bentley/imodeljs-frontend"; import { I18N } from "@bentley/imodeljs-i18n"; import { UserInfo } from "@bentley/itwin-client"; import { SettingsManager, UiEvent, UiSettingsStorage } from "@bentley/ui-core"; import { BackstageManager } from "./backstage/BackstageManager"; import { IModelServices } from "./clientservices/IModelServices"; import { ProjectServices } from "./clientservices/ProjectServices"; import { FrameworkState } from "./redux/FrameworkState"; import { CursorMenuData, PresentationSelectionScope } from "./redux/SessionState"; import { HideIsolateEmphasizeActionHandler } from "./selection/HideIsolateEmphasizeManager"; import { WidgetManager } from "./widgets/WidgetManager"; import { ChildWindowManager } from "./childwindow/ChildWindowManager"; /** Interface to be implemented but any classes that wants to load their user settings when the UiSetting storage class is set. * @beta */ export interface UserSettingsProvider { /** Unique provider Id */ providerId: string; /** Function to load settings from settings storage */ loadUserSettings(storage: UiSettingsStorage): Promise; } /** UiVisibility Event Args interface. * @public */ export interface UiVisibilityEventArgs { visible: boolean; } /** UiVisibility Event class. * @public */ export declare class UiVisibilityChangedEvent extends UiEvent { } /** FrameworkVersion Changed Event Args interface. * @internal */ export interface FrameworkVersionChangedEventArgs { oldVersion: string; version: string; } /** FrameworkVersion Changed Event class. * @internal */ export declare class FrameworkVersionChangedEvent extends UiEvent { } /** TrackingTime time argument used by our feature tracking manager as an option argument to the TelemetryClient * @internal */ export interface TrackingTime { startTime: Date; endTime: Date; } /** * Manages the Redux store, I18N service and iModel, Project and Login services for the ui-framework package. * @public */ export declare class UiFramework { private static _initialized; private static _projectServices?; private static _iModelServices?; private static _i18n?; private static _store?; private static _complaint; private static _frameworkStateKeyInStore; private static _backstageManager?; private static _widgetManager?; private static _uiVersion; private static _hideIsolateEmphasizeActionHandler?; private static _uiSettingsStorage; private static _settingsManager?; private static _uiSettingsProviderRegistry; private static _PopupWindowManager; static useDefaultPopoutUrl: boolean; /** @beta */ static get childWindowManager(): ChildWindowManager; /** Registers class that will be informed when the UserSettingsStorage location has been set or changed. This allows * classes to load any previously saved settings from the new storage location. Common storage locations are the browser's * local storage, or the iTwin Product Settings cloud storage available via the SettingsAdmin see `IModelApp.settingsAdmin`. * @alpha */ static registerUserSettingsProvider(entry: UserSettingsProvider): boolean; /** Get Show Ui event. * @public */ static readonly onUiVisibilityChanged: UiVisibilityChangedEvent; /** Get FrameworkVersion Changed event. * @internal */ static readonly onFrameworkVersionChangedEvent: FrameworkVersionChangedEvent; /** * Called by the application to initialize the UiFramework. Also initializes UiComponents, UiCore and UiAbstract. * @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store. * @param i18n The internationalization service created by the application. Defaults to IModelApp.i18n. * @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined "frameworkState" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use "frameworkState". */ static initialize(store: Store | undefined, i18n?: I18N, frameworkStateKey?: string): Promise; /** * Called by the application to initialize the UiFramework. Also initializes UiComponents, UiCore and UiAbstract. * @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store. * @param i18n The internationalization service created by the application. Defaults to IModelApp.i18n. * @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined "frameworkState" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use "frameworkState". * @param projectServices Optional app defined projectServices. If not specified DefaultProjectServices will be used. * @param iModelServices Optional app defined iModelServices. If not specified DefaultIModelServices will be used. * * @internal */ static initializeEx(store: Store | undefined, i18n?: I18N, frameworkStateKey?: string, projectServices?: ProjectServices, iModelServices?: IModelServices): Promise; /** Un-registers the UiFramework internationalization service namespace */ static terminate(): void; /** Determines if UiFramework has been initialized */ static get initialized(): boolean; /** Property that returns the SettingManager used by AppUI-based applications. * @beta */ static get settingsManager(): SettingsManager; /** @beta */ static get frameworkStateKey(): string; /** The UiFramework state maintained by Redux * @beta */ static get frameworkState(): FrameworkState | undefined; /** The Redux store */ static get store(): Store; /** The internationalization service created by the app. */ static get i18n(): I18N; /** The internationalization service namespace. */ static get i18nNamespace(): string; /** @beta */ static get backstageManager(): BackstageManager; /** @alpha */ static get hideIsolateEmphasizeActionHandler(): HideIsolateEmphasizeActionHandler; /** @alpha */ static setHideIsolateEmphasizeActionHandler(handler: HideIsolateEmphasizeActionHandler | undefined): void; /** @alpha */ static get widgetManager(): WidgetManager; /** Calls i18n.translateWithNamespace with the "UiFramework" namespace. Do NOT include the namespace in the key. * @internal */ static translate(key: string | string[]): string; /** @internal */ static get packageName(): string; /** @internal */ static loggerCategory(obj: any): string; /** @internal */ static get projectServices(): ProjectServices; /** @internal */ static get iModelServices(): IModelServices; static dispatchActionToStore(type: string, payload: any, immediateSync?: boolean): void; static setAccudrawSnapMode(snapMode: SnapMode): void; static getAccudrawSnapMode(): SnapMode; static getActiveSelectionScope(): string; static setActiveSelectionScope(selectionScopeId: string): void; /** @beta */ static openCursorMenu(menuData: CursorMenuData | undefined): void; /** @beta */ static closeCursorMenu(): void; /** @beta */ static getCursorMenuData(): CursorMenuData | undefined; static getActiveIModelId(): string; static setActiveIModelId(iModelId: string): void; static setIModelConnection(iModelConnection: IModelConnection | undefined, immediateSync?: boolean): void; static getIModelConnection(): IModelConnection | undefined; /** @beta */ static setUiSettingsStorage(storage: UiSettingsStorage, immediateSync?: boolean): Promise; /** @beta */ static getUiSettingsStorage(): UiSettingsStorage; /** @beta */ static setUserInfo(userInfo: UserInfo | undefined, immediateSync?: boolean): void; /** @beta */ static getUserInfo(): UserInfo | undefined; static setDefaultIModelViewportControlId(iModelViewportControlId: string, immediateSync?: boolean): void; static getDefaultIModelViewportControlId(): string | undefined; static setDefaultViewId(viewId: string, immediateSync?: boolean): void; static getDefaultViewId(): string | undefined; static setDefaultViewState(viewState: ViewState, immediateSync?: boolean): void; static getDefaultViewState(): ViewState | undefined; /** @beta */ static getAvailableSelectionScopes(): PresentationSelectionScope[]; static getIsUiVisible(): boolean; static setIsUiVisible(visible: boolean): void; static setColorTheme(theme: string): void; static getColorTheme(): string; static setWidgetOpacity(opacity: number): void; static getWidgetOpacity(): number; static isMobile(): boolean; /** Returns the Ui Version. * @beta */ static get uiVersion(): string; static setUiVersion(version: string): void; static get useDragInteraction(): boolean; static setUseDragInteraction(useDragInteraction: boolean): void; /** Send logging message to the telemetry system * @internal */ static postTelemetry(eventName: string, eventId?: GuidString, contextId?: GuidString, iModeId?: GuidString, changeSetId?: string, time?: TrackingTime, additionalProperties?: { [key: string]: any; }): Promise; private static _handleFrameworkVersionChangedEvent; private static _handleUserStateChanged; /** Determines whether a ContextMenu is open * @alpha * */ static get isContextMenuOpen(): boolean; } //# sourceMappingURL=UiFramework.d.ts.map