UNPKG

@primno/core

Version:

Front-end framework for Model-Driven Apps of Power Apps and Dynamics 365.

57 lines (56 loc) 1.96 kB
import { ComponentOrComponentConstructor, Event } from "../../typing"; /** * Describe an event in a component. */ export interface EventMetadata extends Event { /** * Property name in the component. */ keyName: string; } /** * ComponentBrowser allows to navigate in the component tree. * It resolves the input, config et event value. * @internal */ export declare class ComponentBrowser { private _config; private _input; private _keyName; private _defaultEnabled; private _componentType; private _hasStaticConfig; private _hasInput; constructor(componentType: ComponentOrComponentConstructor, input?: any); private resolveConfig; private resolveEventTargetName; private resolveSubComponentInput; /** Input value of the component */ get input(): any | undefined; /** * Indicates if the component has an input. */ get hasInput(): boolean; /** Config value of the component */ get config(): any | undefined; /** Indicates if the config is static or resolved from the input */ get hasStaticConfig(): boolean; /** Name of the component type (Eg: AppComponent) */ get name(): any; /** Constructor of the component or an instance of the component */ get componentType(): ComponentOrComponentConstructor; /** Gets the property name of this sub-component. * Only available if this component is a sub-component in the component tree */ get keyName(): string | undefined; /** Gets the default state of this sub-component. * Only available if this component is a sub-component in the component tree */ get defaultEnabled(): boolean | undefined; /** Gets sub components of this component */ get subComponents(): ComponentBrowser[]; /** Gets events of this component */ get events(): EventMetadata[]; /** * Gets events of all sub components recursively. */ get allEvents(): Event[]; }