Member Junction
    Preparing search index...

    The component will create this object and it will include the members defined in this interface and return upon its main function being called.

    interface ComponentObject {
        component: Function;
        focus?: (target?: string | HTMLElement) => void;
        getCurrentDataState?: () => DataSnapshot;
        hasMethod?: (methodName: string) => boolean;
        invokeMethod?: (methodName: string, ...args: any[]) => any;
        isDirty?: () => boolean;
        print?: ComponentPrintFunction;
        refresh?: ComponentRefreshFunction;
        reset?: () => void;
        scrollTo?: (
            target: string | HTMLElement | { left?: number; top?: number },
        ) => void;
        setDataState?: (snapshot: DataSnapshot) => boolean;
        validate?: () => boolean | { errors?: string[]; valid: boolean };
    }
    Index

    Properties

    component: Function

    The React component function that receives props including data, userState, callbacks, utilities, and styles.

    focus?: (target?: string | HTMLElement) => void

    Sets focus to a specific element within the component.

    Type Declaration

      • (target?: string | HTMLElement): void
      • Parameters

        • Optionaltarget: string | HTMLElement

          Element selector or element reference

        Returns void

    getCurrentDataState?: () => DataSnapshot

    Gets the current data state of the component. Used by AI agents to understand what data is currently displayed. Returns undefined if the component has no data to report.

    hasMethod?: (methodName: string) => boolean

    Check if a method is registered on the component

    Type Declaration

      • (methodName: string): boolean
      • Parameters

        • methodName: string

          Name of the method to check

        Returns boolean

        true if the method exists

    invokeMethod?: (methodName: string, ...args: any[]) => any

    Generic method invoker for custom methods

    Type Declaration

      • (methodName: string, ...args: any[]): any
      • Parameters

        • methodName: string

          Name of the method to invoke

        • ...args: any[]

          Arguments to pass to the method

        Returns any

        The result of the method call, or undefined if method doesn't exist

    isDirty?: () => boolean

    Checks if the component has unsaved changes.

    The optional print function that is called when the user clicks on the print button in the parent of the component. This function will never be called by the parent before the init function so the print function can assume the component has been initialized;

    The optional refresh function that is called when the user clicks on the refresh button in the parent of the component. This function will never be called by the parent before the init function so the refresh function

    reset?: () => void

    Resets the component to its initial state.

    scrollTo?: (
        target: string | HTMLElement | { left?: number; top?: number },
    ) => void

    Scrolls to a specific element or position within the component.

    Type Declaration

      • (target: string | HTMLElement | { left?: number; top?: number }): void
      • Parameters

        • target: string | HTMLElement | { left?: number; top?: number }

          Element selector, element reference, or scroll options

        Returns void

    setDataState?: (snapshot: DataSnapshot) => boolean

    Restores or applies a data state snapshot to the component. Returns true if the snapshot was successfully applied, false otherwise.

    validate?: () => boolean | { errors?: string[]; valid: boolean }

    Validates the current state of the component. Returns true if valid, false or validation errors otherwise.