@apexcura/ui-builder
Version:
A low-code UI builder library for dynamic form generation and reusable components built with React, Redux, Tailwind, and Ant Design.
38 lines (37 loc) • 1.27 kB
TypeScript
import { SchemaField } from '../Types/components';
type LogicalOperator = 'AND' | 'OR';
interface BaseCondition {
key: string;
operator: 'notEquals' | 'truthy';
value?: any;
}
type ConditionNode = {
type: 'group';
operator: LogicalOperator;
conditions: ConditionNode[];
} | ({
type: 'condition';
} & BaseCondition);
declare function debounce<T extends (...args: any[]) => void>(fn: T, delay: number): (...args: Parameters<T>) => void;
export declare const Utils: {
debounce: typeof debounce;
evaluateConditionTree: ({ node, store, }: {
node: ConditionNode;
store: any;
}) => boolean;
formatCurrency: (amount: number) => string;
getParamFromPath: (pattern: string, key: string) => string | null;
getProcessedEndpoint: ({ params, endPoint, rootState }: any) => Promise<any>;
getProcessedLabel: (elementProps: SchemaField, context: any, rootState: string) => string | React.ReactNode;
initials: (text: string) => string | undefined;
setPrefix: ({ text, prefix }: {
text: string;
prefix: string;
}) => string;
setSuffix: ({ text, suffix }: {
text: string;
suffix: string;
}) => string;
stringToColour: (str?: string) => string;
};
export {};