UNPKG

@memberjunction/react-runtime

Version:

Platform-agnostic React component runtime for MemberJunction. Provides core compilation, registry, and execution capabilities for React components in any JavaScript environment.

18 lines 1.35 kB
import { ComponentStyles, ComponentCallbacks } from '@memberjunction/interactive-component-types'; import { ComponentProps } from '../types'; export interface PropBuilderOptions { validate?: boolean; merge?: boolean; transformData?: (data: any) => any; transformState?: (state: any) => any; debounceUpdateUserState?: number; } export declare function buildComponentProps(data?: any, userState?: any, utilities?: any, callbacks?: ComponentCallbacks, components?: Record<string, any>, styles?: ComponentStyles, options?: PropBuilderOptions, onStateChanged?: (stateUpdate: Record<string, any>) => void): ComponentProps; export declare function normalizeCallbacks(callbacks: any, debounceMs?: number): ComponentCallbacks; export declare function normalizeStyles(styles?: any): any; export declare function validateComponentProps(props: ComponentProps): void; export declare function mergeProps(...propsList: Partial<ComponentProps>[]): ComponentProps; export declare function createPropsTransformer(transformations: Record<string, (value: any) => any>): (props: ComponentProps) => ComponentProps; export declare function wrapCallbacksWithLogging(callbacks: ComponentCallbacks, componentName: string): ComponentCallbacks; export declare function extractPropPaths(componentCode: string): string[]; //# sourceMappingURL=prop-builder.d.ts.map