{ "custom": {}, "params": { "enabled": true, "isArray": false, "tagPath": "[Ignition_SATB1_IO2_default]Yard/SATB1_YARD_UT-P2-4/Vacuum Fault Interrupter2 Tripped/Config/Target" }, "propConfig": { "params.enabled": { "paramDirection": "input", "persistent": true }, "params.isArray": { "paramDirection": "input", "persistent": true }, "params.tagPath": { "paramDirection": "input", "persistent": true } }, "props": { "defaultSize": { "height": 40, "width": 200 } }, "root": { "children": [ { "events": { "dom": { "onClick": { "config": { "script": "\tif self.view.params.enabled is True:\n\t\tif self.view.params.isArray is True:\n\t\t\ttagPath \u003d self.view.params.tagPath.rsplit(\u0027[\u0027,1)[0]\n\t\t\tindex \u003d int(self.view.params.tagPath.rsplit(\u0027[\u0027,1)[1].split(\u0027]\u0027)[0])\n\t\t\treadArray \u003d system.tag.readBlocking(tagPath)[0].value\n\t\t\treadArray[index] \u003d not readArray[index]\n\t\t\tlastArray \u003d system.tag.writeBlocking([tagPath][0], [readArray])\n\t\telse:\n\t\t\tself.custom.value \u003d not self.custom.value\n\t\t" }, "scope": "G", "type": "script" } } }, "meta": { "name": "BooleanValue" }, "position": { "basis": "30px" }, "propConfig": { "custom.value": { "binding": { "config": { "bidirectional": true, "fallbackDelay": 2.5, "mode": "indirect", "references": { "tagPath": "{view.params.tagPath}" }, "tagPath": "{tagPath}" }, "type": "tag" } }, "props.color": { "binding": { "config": { "expression": "if({view.params.enabled},\r\n\"var(--tagvalue-color)\", \"var(--lightgray)\")" }, "type": "expr" } }, "props.path": { "binding": { "config": { "expression": "if(coalesce({this.custom.value},0) \u003d 1, \r\n\u0027material/check_box\u0027,\r\n\u0027material/check_box_outline_blank\u0027)" }, "type": "expr" } } }, "props": { "style": { "cursor": "pointer" } }, "type": "ia.display.icon" } ], "meta": { "name": "root" }, "props": { "alignItems": "center", "justify": "center" }, "type": "ia.container.flex" } }