UNPKG

@talend/react-containers

Version:

Provide connected components aka containers for @talend/react-cmf based on @talend/react-components.

84 lines (83 loc) 2.07 kB
declare namespace _default { export { validation as healthcheck }; export { updateSchema as schema }; export { updateProperties as update }; export { validation }; export { suggestions }; export { onError as error }; } export default _default; /** * Add or Remove the input error depending on the trigger result * @param schema The input schema * @param body The trigger response body * @param errors The form errors map * @returns {{errors: *}} The new errors map */ declare function validation({ schema, body, errors }: { schema: any; body: any; errors?: {} | undefined; }): { errors: any; }; /** * Insert new form data * @param schema The input schema * @param body The trigger response body * @param properties The form data * @param trigger The trigger configuration * @param errors The form errors map * @returns {{properties: *, errors: Object}} The properties and errors map */ declare function updateSchema({ schema, body, properties, trigger, errors }: { schema: any; body: any; properties: any; trigger: any; errors: any; }): { properties: any; errors: Object; }; /** * Update the content of the properties * @param body is the new value * @param trigger the trigger that call it * @example const trigger = { "action":"guessMe", "family":"test", "options":[ { "path":"root.updatable_config", "type":"object" // or "string" } ], "parameters":[ { "key":"arg0.name", "path":"root.updatable_config.name" } ], "type":"update" }; */ declare function updateProperties({ body, trigger, properties }: { body: any; trigger: any; properties: any; }): { properties: object; }; declare function suggestions({ body }: { body: any; }): { titleMap: any; }; /** * Update errors status * @param {Object} options with { errors, error, schema } * @return {Object} { errors } status */ declare function onError({ errors, error, schema }: Object): Object;