@tachybase/module-workflow
Version:
A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.
94 lines (93 loc) • 2.75 kB
TypeScript
export type VariableOption = {
key?: string;
value?: string;
label?: string;
children?: VariableOption[] | null;
[key: string]: any;
};
export type VariableDataType = 'boolean' | 'number' | 'string' | 'date' | {
type: 'reference';
options: {
collection: string;
multiple?: boolean;
entity?: boolean;
};
} | ((field: any) => boolean);
export type UseVariableOptions = {
types?: VariableDataType[];
fieldNames?: {
label?: string;
value?: string;
children?: string;
};
appends?: string[] | null;
depth?: number;
};
export declare const defaultFieldNames: {
readonly label: "label";
readonly value: "value";
readonly children: "children";
};
export declare const currentFormOptions: {
label: string;
value: string;
useOptions(options: UseVariableOptions): VariableOption[];
};
export declare const nodesOptions: {
label: string;
value: string;
useOptions(options: UseVariableOptions): VariableOption[];
};
export declare const triggerOptions: {
label: string;
value: string;
useOptions(options: UseVariableOptions): VariableOption[];
};
export declare const scopeOptions: {
label: string;
value: string;
useOptions(options: UseVariableOptions & {
current: any;
}): VariableOption[];
};
export declare const systemOptions: {
label: string;
value: string;
useOptions({ types, fieldNames }: UseVariableOptions): {
[x: string]: string;
key: string;
}[];
};
export declare const BaseTypeSets: {
boolean: Set<string>;
number: Set<string>;
string: Set<string>;
date: Set<string>;
};
export declare function useWorkflowVariableOptions(options?: UseVariableOptions): any[];
export declare function useWorkflowVariableFormOptions(options?: UseVariableOptions): {
[x: number]: any;
key: any;
disabled: boolean;
}[];
export declare function getCollectionFieldOptions(options: any): VariableOption[];
export declare function WorkflowVariableInput({ variableOptions, ...props }: {
[x: string]: any;
variableOptions: any;
}): JSX.Element;
export declare function WorkflowVariableTextArea({ variableOptions, ...props }: {
[x: string]: any;
variableOptions: any;
}): JSX.Element;
export declare function WorkflowVariableRawTextArea({ variableOptions, ...props }: {
[x: string]: any;
variableOptions: any;
}): JSX.Element;
export declare function WorkflowVariableJSON({ variableOptions, ...props }: {
[x: string]: any;
variableOptions: any;
}): JSX.Element;
export declare function WorkflowVariableCodeMirror({ variableOptions, ...props }: {
[x: string]: any;
variableOptions: any;
}): JSX.Element;