Component Details
appmixer.utils.controls.Condition
1.0.0
Public
{ "name": "appmixer.utils.controls.Condition", "author": "Appmixer <info@appmixer.com>", "description": "Evaluates expression(s) and sends data to true or false port.", "version": "1.0.0", "inPorts": [ { "name": "in", "inspector": { "inputs": { "expression": { "type": "expression", "label": "Condition", "index": 1, "levels": [ "AND", "OR" ], "fields": { "input": { "type": "text", "label": "Input", "index": 1 }, "operator": { "type": "select", "variables": false, "label": "Operator", "index": 2, "options": [ { "label": "=", "value": "=" }, { "label": "!=", "value": "!=" }, { "label": ">", "value": ">" }, { "label": ">=", "value": ">=" }, { "label": "<", "value": "<" }, { "label": "<=", "value": "<=" }, { "label": "%", "value": "%" }, { "label": "Empty", "value": "empty" }, { "label": "Not empty", "value": "notEmpty" }, { "label": "Contains", "value": "contains" }, { "label": "Range", "value": "range" }, { "label": "Regex", "value": "regex" } ] }, "value": { "type": "text", "label": "Value", "when": { "or": [ { "eq": { "./operator": "=" } }, { "eq": { "./operator": "!=" } }, { "eq": { "./operator": ">" } }, { "eq": { "./operator": ">=" } }, { "eq": { "./operator": "<" } }, { "eq": { "./operator": "<=" } }, { "eq": { "./operator": "%" } }, { "eq": { "./operator": "contains" } } ] }, "index": 3 }, "divisor": { "type": "number", "label": "Divisor", "index": 3, "tooltip": "Any number. If the <i>Divisor</i> divides the data under <i>Data</i> with reminder of 0, the filter passes through <code>true</code>. Otherwise, it passes through <code>false</code>.", "when": { "eq": { "./operator": "%" } } }, "rangeMin": { "type": "text", "label": "Minimum value", "index": 3, "tooltip": "Any number or date (e.g. 2017-04-23 22:45). If the value under <i>Data</i> falls into the interval specified, the filter passes the message through. Otherwise, it ignores the message.", "when": { "eq": { "./operator": "range" } } }, "rangeMax": { "type": "text", "label": "Maximum value", "index": 4, "tooltip": "Any number or date (e.g. 2017-04-23 22:45). If the value under <i>Data</i> falls into the interval specified, the filter passes the message through. Otherwise, it ignores the message.", "when": { "eq": { "./operator": "range" } } }, "exclusiveMin": { "type": "toggle", "label": "Exclusive minimum", "index": 3, "tooltip": "Turn exclusivity on if you want to exclude test on equality for the minimum value.", "when": { "eq": { "./operator": "range" } } }, "exclusiveMax": { "type": "toggle", "label": "Exclusive maximum", "index": 5, "tooltip": "Turn exclusivity on if you want to exclude test on equality for the maximum value.", "when": { "eq": { "./operator": "range" } } }, "regex": { "type": "text", "label": "Expected value", "tooltip": "Enter regular expression.", "when": { "eq": { "./operator": "regex" } }, "index": 3 } } } } } } ], "outPorts": [ "true", "false" ], "icon": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPgo8c3ZnIHdpZHRoPSI4MDBweCIgaGVpZ2h0PSI4MDBweCIgdmlld0JveD0iMCAwIDI0IDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiPg0KICA8cGF0aCBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMyAxMmg0LjU5N2E1IDUgMCAwIDEgMy45MDQgMS44NzdsLjk5OCAxLjI0NkE1IDUgMCAwIDAgMTYuNDAzIDE3SDIxbTAgMC0zLTNtMyAzLTMgM20zLTEzaC01LjA3OEE0IDQgMCAwIDAgMTIuOCA4LjUwMUwxMS4yMDEgMTAuNUE0IDQgMCAwIDEgOC4wNzggMTJINm0xNS01LTMtM20zIDMtMyAzIi8+DQo8L3N2Zz4=" }