/** @packageDocumentation * @module ContentView */ import type * as React from "react"; import type { ScreenViewport } from "@itwin/core-frontend"; import type { ConfigurableUiControlConstructor } from "../configurableui/ConfigurableUiControl.js"; import type { ContentControl } from "./ContentControl.js"; import type { Frontstage } from "../frontstage/Frontstage.js"; import type { ContentLayoutProps } from "./ContentLayoutProps.js"; import type { ConditionalValue } from "../shared/ConditionalValue.js"; /** Properties for content displayed in a content view * @public */ export interface ContentProps { /** A unique id for the Content View within the group. */ id: string; /** The class name or [[ConfigurableUiControlConstructor]] of the content control. * @deprecated in 4.16.0. Use {@link ContentProps.content} instead and specify an empty string for this property. This will be made optional in 5.0.0. */ classId: string | ConfigurableUiControlConstructor; /** Optional application data passed down to the content view. * @deprecated in 4.16.0. Use {@link ContentProps.content} instead. */ applicationData?: any; /** Content to be displayed in the content view. */ content?: React.ReactNode; /** Describes if the content should display the active strip. * If `undefined` the strip will be displayed only if this content is active and multiple contents are available. * Floating content controls (deprecated API) and `ContentOverlay` components are considered as content nodes. */ renderActiveStrip?: boolean | ConditionalValue; } /** Properties for a [[ContentGroup]] * @public */ export interface ContentGroupProps { /** An id for the [[ContentGroup]]. This id is used to locate a ContentGroup and it also can be used by an ContentGroupProvider to save/restore content settings */ id: string; /** Content Layout Id or complete set of [[ContentLayoutProps]] */ layout: ContentLayoutProps; /** A collection of [[ContentProps]], one for each content view */ contents: ContentProps[]; } /** Abstract class that can be implemented and specified by frontstage to dynamically construct * content group just prior to activating the frontstage. * @public */ export declare abstract class ContentGroupProvider { /** Return the contentGroup based on the `Frontstage`. */ abstract contentGroup(frontstage: Frontstage): Promise; /** Allow provider to update any data stored in ContentGroupProps. Typically this may * be to remove applicationData entries. */ prepareToSaveProps(contentGroupProps: ContentGroupProps): ContentGroupProps; /** Allow provider to update any stored ContentGroupProps be it is to be used to create ContentGroup and layouts. * Typically this may be to add applicationData to content entries. */ applyUpdatesToSavedProps(contentGroupProps: ContentGroupProps): ContentGroupProps; /** Allow provider to save any content group data before the stage deactivated. */ onFrontstageDeactivated(): Promise; } /** Callback to process content properties during toJSON method * @public */ export type ContentCallback = (content: ContentProps) => void; /** ContentGroup class. Content Groups define content displayed in content views that are laid out using a [[ContentLayout]]. * @public */ export declare class ContentGroup { private static _sId; groupId: string; propsId: string; layout: ContentLayoutProps; contentPropsList: ContentProps[]; get id(): string; constructor(contentGroupProps: ContentGroupProps); /** Gets the React nodes representing the content views in this content group. * @deprecated in 4.16.0. Use {@link ContentGroup.contentPropsList} instead. */ getContentNodes(): React.ReactNode[]; /** Refreshes the React nodes representing the Content Views in this Content Group. */ refreshContentNodes(): void; /** Called when Frontstage is deactivated. */ onFrontstageDeactivated(): void; /** Called when Frontstage is ready. */ onFrontstageReady(): void; /** Clears the map of content controls. */ clearContentControls(): void; /** Creates [[ContentGroupProps]] for JSON purposes. * @public */ toJSON(contentCallback?: ContentCallback): ContentGroupProps; /** Gets Viewports from Viewport Content Controls. * @internal */ getViewports(): Array; private _contentControls; private _contentSetMap; /** Gets a [[ContentControl]] from the Content Group based on its [[ContentProps]]. * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}. */ getContentControl(contentProps: ContentProps, _index: number): ContentControl | undefined; /** Gets a [[ContentControl]] from the Content Group with a given ID. * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}. */ getContentControlById(id: string): ContentControl | undefined; /** Gets the [[ContentControl]] associated with a given React node representing a Content View. * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}. */ getControlFromElement(node: React.ReactNode): ContentControl | undefined; /** Gets an array of the content controls representing the Content Views. * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}. */ getContentControls(): ContentControl[]; } //# sourceMappingURL=ContentGroup.d.ts.map