144 lines
3.7 KiB
Plaintext
144 lines
3.7 KiB
Plaintext
{
|
|
"custom": {
|
|
"numeric_val": 0
|
|
},
|
|
"params": {
|
|
"align": "left",
|
|
"enabled": true,
|
|
"number_format": "0,0.##",
|
|
"target_message_handler": null,
|
|
"use_right_margin": true,
|
|
"val": ""
|
|
},
|
|
"propConfig": {
|
|
"custom.numeric_val": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "toFloat({view.params.val}, 0)"
|
|
},
|
|
"overlayOptOut": true,
|
|
"type": "expr"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"params.align": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.enabled": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.number_format": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.target_message_handler": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.use_right_margin": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.val": {
|
|
"onChange": {
|
|
"enabled": false,
|
|
"script": "\tval \u003d currentValue.value\n\tif val:\n\t\tif self.params.target_message_handler:\n\t\t\tsystem.perspective.sendMessage(\n\t\t\t\tself.params.target_message_handler,\n\t\t\t\t{\u0027value\u0027: val},\n\t\t\t\tscope\u003d\u0027session\u0027\n\t\t\t)\n"
|
|
},
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 32,
|
|
"width": 200
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"events": {
|
|
"component": {
|
|
"onActionPerformed": {
|
|
"config": {
|
|
"script": "\t# transform user entry into a string and send to view param\n\tval \u003d self.props.value\n\tself.view.params.val \u003d val\n\tif val:\n\t\tif self.view.params.target_message_handler:\n\t\t\tsystem.perspective.sendMessage(\n\t\t\t\tself.view.params.target_message_handler,\n\t\t\t\t{\u0027value\u0027: val},\n\t\t\t\tscope\u003d\u0027session\u0027\n\t\t\t)"
|
|
},
|
|
"scope": "G",
|
|
"type": "script"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"name": "NumericEntryField"
|
|
},
|
|
"position": {
|
|
"basis": "172px",
|
|
"grow": 1
|
|
},
|
|
"propConfig": {
|
|
"props.align": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.align"
|
|
},
|
|
"overlayOptOut": true,
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.containerStyle.marginRight": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "if({view.params.use_right_margin},\u002726px\u0027,\u00272px\u0027)"
|
|
},
|
|
"overlayOptOut": true,
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.enabled": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.enabled"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.format": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.number_format"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.value": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.numeric_val"
|
|
},
|
|
"overlayOptOut": true,
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"containerStyle": {
|
|
"margin": "2px"
|
|
}
|
|
},
|
|
"type": "ia.input.numeric-entry-field"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "root"
|
|
},
|
|
"props": {
|
|
"justify": "center",
|
|
"style": {
|
|
"overflow": "hidden"
|
|
}
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
} |