SAT9/.resources/b3be37eced60cb1d987d08c4c0829b7d5b282d8f0ef7c81b1916bf0bd82afaf4

129 lines
3.1 KiB
Plaintext

{
"custom": {},
"events": {
"system": {
"onStartup": {
"config": {
"script": "\tself.params.request_focus \u003d True\n\t"
},
"scope": "G",
"type": "script"
}
}
},
"params": {
"enabled": true,
"placeholder": "enter text...",
"request_focus": false,
"text": ""
},
"propConfig": {
"params.enabled": {
"paramDirection": "input",
"persistent": true
},
"params.placeholder": {
"paramDirection": "input",
"persistent": true
},
"params.request_focus": {
"onChange": {
"enabled": null,
"script": "\t# if focus request set externally, set focus via message and clear request\n\tif currentValue.value:\n\t\tsystem.perspective.sendMessage(\u0027request_focus\u0027, scope\u003d\u0027view\u0027)\n\t\tself.params.request_focus \u003d False\n\t"
},
"paramDirection": "inout",
"persistent": true
},
"params.text": {
"paramDirection": "inout",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 50,
"width": 200
}
},
"root": {
"children": [
{
"meta": {
"name": "TextField"
},
"position": {
"grow": 1
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.enabled"
},
"type": "property"
}
},
"props.placeholder": {
"binding": {
"config": {
"path": "view.params.placeholder"
},
"type": "property"
}
},
"props.style.classes": {
"binding": {
"config": {
"expression": "if({this.props.enabled},\u0027Input/Text/text_field_enabled\u0027,\u0027Input/Text/text_field_disabled\u0027)"
},
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"bidirectional": true,
"path": "view.params.text"
},
"overlayOptOut": true,
"type": "property"
}
}
},
"props": {
"style": {
"margin": "1%",
"padding": "1%"
}
},
"scripts": {
"customMethods": [
{
"name": "set_focus",
"params": [],
"script": "\tfrom time import sleep\n\tsleep(0.25)\n\tself.focus()\n\t"
}
],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "request_focus",
"pageScope": false,
"script": "\tsystem.util.invokeAsynchronous(self.set_focus())\n\t",
"sessionScope": false,
"viewScope": true
}
]
},
"type": "ia.input.text-field"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
}