UNPKG

@velis/dynamicforms

Version:

Data entry boilerplate components and a RESTful API consumer

28 lines 1.18 kB
import FormPayload from '../form/definitions/form-payload'; import type { ActionsNS } from './namespace'; type ActionHandlerExtraData = ActionsNS.ActionHandlerExtraData; type ActionJSON = ActionsNS.ActionJSON; type BreakpointsJSON = ActionsNS.BreakpointsJSON; export declare function defaultActionHandler(action: Action, payload: FormPayload | undefined, extraData: ActionHandlerExtraData): boolean; export declare function getActionName(actionName: string | undefined): `action${string}`; declare class Action implements ActionJSON { name: string; uniqueId: number; position: string; fieldName: string | null; label?: string; labelAvailable: boolean; icon?: string; iconAvailable: boolean; displayStyle: BreakpointsJSON; payload: FormPayload | undefined; title?: string; extra_data: Record<string, any>; [key: `action${string}`]: ActionsNS.ActionHandler; constructor(data: Action | ActionJSON, payload?: FormPayload); static closeAction(data?: ActionJSON): Action; static yesAction(data?: ActionJSON): Action; static noAction(data?: ActionJSON): Action; } export default Action; //# sourceMappingURL=action.d.ts.map