Transformer
Type: transformer
Execute JS in a sandbox, broadcast result to a param.
Supports children: No
Non-visual component that runs JavaScript in a sandboxed iframe and broadcasts the return value to a canvas param. Use $param_name to inject canvas param values and {{udf_name}} to inject UDF result rows. UDF data is substituted as a JSON object of column arrays. The method string must be a no-argument arrow function that explicitly returns a value.
Example
{
"type": "transformer",
"props": {
"param": "price_tier",
"method": "() => { const p = Number($max_price); if (p <= 100) return 'Budget'; if (p <= 300) return 'Mid-range'; return 'Luxury'; }"
}
}
Every widget is defined as { "type": "transformer", "props": { ... } }. The properties below describe the props object.
Props
Loading ....
Raw schema
Download the full schema file: /widget-schema/transformer.json