import { StructuredSelector } from "../data/StructuredSelector"; import { Component, CreateConfig } from "../util/Component"; import { CSS } from "./CSS"; import { RenderingContext } from "./RenderingContext"; import type { Controller, ControllerConfig, ControllerFactory } from "./Controller"; import { BooleanProp, ClassProp, ModProp, StyleProp } from "./Prop"; import { Instance } from "./Instance"; import { View } from "../data/View"; export declare const VDOM: import("cx-react").CxVDOM; export type ControllerProp = CreateConfig | (ControllerConfig & { type?: never; $type?: never; }) | ControllerFactory; export interface WidgetConfig { /** Visibility of the widget. Defaults to `true`. */ visible?: BooleanProp; /** Visibility of the widget. Defaults to `true`. */ if?: BooleanProp; /** Outer (wrapper) layout used to display the widget in. */ outerLayout?: unknown; /** Inner layout used to display children inside the widget. */ layout?: unknown; /** Name of the ContentPlaceholder that should be used to display the widget. */ contentFor?: string; /** Name of the ContentPlaceholder that should be used to display the widget. */ putInto?: string; /** Key that will be used as the key when rendering the React component. */ vdomKey?: string; /** Controller. */ controller?: ControllerProp; onInit?(context: RenderingContext): void; onExplore?(context: RenderingContext, instance: Instance): void; onPrepare?(context: RenderingContext, instance: Instance): void; onCleanup?(context: RenderingContext, instance: Instance): void; onDestroy?(instance: Instance): void; } /** Style-related config properties for widgets that support styling. */ export interface WidgetStyleConfig { /** * Additional CSS classes to be applied to the element. * If an object is provided, all keys with a "truthy" value will be added to the CSS class list. */ class?: ClassProp; /** * Additional CSS classes to be applied to the element. * If an object is provided, all keys with a "truthy" value will be added to the CSS class list. */ className?: ClassProp; /** Style object applied to the element. */ style?: StyleProp; /** Style object applied to the element. */ styles?: StyleProp; /** Base CSS class to be applied to the element. For example, value 'button' will add a class 'cxb-button' to the element. */ baseClass?: string; /** Appearance modifier. For example, mod="big" will add the CSS class .cxm-big to the block element. */ mod?: ModProp; } export declare abstract class Widget extends Component { vdomKey?: string | number; jsxSpread?: Record[]; jsxAttributes?: string[]; styles?: any; style?: any; styled: boolean; if?: any; visible: boolean; outerLayout?: Widget; contentFor?: string; putInto?: string; isContent?: boolean; CSS: typeof CSS; baseClass?: string; memoize: boolean; controller?: Controller; isPureContainer?: boolean; useParentLayout?: boolean; widgetId?: number; initialized?: boolean; components?: Record; helpers?: Record; selector?: StructuredSelector; nameMap?: any; version?: number; onInit?: (context: RenderingContext, instance: Instance) => void; onExplore?: (context: RenderingContext, instance: Instance) => void; onPrepare?: (context: RenderingContext, instance: Instance) => void; onCleanup?: (context: RenderingContext, instance: Instance) => void; onDestroy?: (instance: Instance) => void; exploreCleanup?(context: RenderingContext, instance: InstanceType): void; prepareCleanup?(context: RenderingContext, instance: InstanceType): void; cleanup?(context: RenderingContext, instance: InstanceType): void; prepare?(context: RenderingContext, instance: InstanceType): void; static optimizePrepare?: boolean; constructor(config?: Config); init(): void; protected initComponents(...args: Record[]): void; protected initHelpers(...args: Record[]): void; protected declareData(...args: Record[]): void; protected prepareCSS(_context: RenderingContext, { data }: any): void; prepareData(context: RenderingContext, instance: InstanceType): void; createInstance(key: string, parent: Instance, parentStore?: View): Instance; initInstance(_context: RenderingContext, _instance: InstanceType): void; initState(_context: RenderingContext, _instance: InstanceType): void; checkVisible(_context: RenderingContext, _instance: InstanceType, data: any): boolean; explore(context: RenderingContext, instance: InstanceType, data?: any): void; render(context: RenderingContext, instance: InstanceType, key: string): any; update(): void; applyParentStore(instance: any): void; static resetCounter(): void; } export declare function contentAppend(result: any[], w: any, prependSpace?: boolean): boolean; export declare function getContentArray(x: any): any[]; export declare function getContent(x: any): any; //# sourceMappingURL=Widget.d.ts.map