171 lines
3.9 KiB
Plaintext
171 lines
3.9 KiB
Plaintext
{
|
|
"custom": {
|
|
"filter_list": [
|
|
{
|
|
"color": "#8B008B",
|
|
"filter_id": 5,
|
|
"instancePosition": {},
|
|
"instanceStyle": {
|
|
"classes": ""
|
|
},
|
|
"text": "CP30"
|
|
},
|
|
{
|
|
"color": "#8B008B",
|
|
"filter_id": 3,
|
|
"instancePosition": {},
|
|
"instanceStyle": {
|
|
"classes": ""
|
|
},
|
|
"text": "CP71"
|
|
},
|
|
{
|
|
"color": "#8B008B",
|
|
"filter_id": 4,
|
|
"instancePosition": {},
|
|
"instanceStyle": {
|
|
"classes": ""
|
|
},
|
|
"text": "CP72"
|
|
}
|
|
]
|
|
},
|
|
"params": {
|
|
"filters": [
|
|
{
|
|
"color": "#8B008B",
|
|
"column": "controller",
|
|
"group": 0,
|
|
"id": 3,
|
|
"text": "CP71"
|
|
},
|
|
{
|
|
"color": "#8B008B",
|
|
"column": "controller",
|
|
"group": 0,
|
|
"id": 4,
|
|
"text": "CP72"
|
|
},
|
|
{
|
|
"color": "#8B008B",
|
|
"column": "controller",
|
|
"group": 0,
|
|
"id": 5,
|
|
"text": "CP30"
|
|
}
|
|
],
|
|
"group_name": "value"
|
|
},
|
|
"propConfig": {
|
|
"custom.filter_list": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.filters"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\tinstances \u003d []\n\tfor filter in value:\n\t\tinstance \u003d {\"instanceStyle\": {\n\t\t \t\t\t\"classes\": \"\"},\n\t\t \t\t\t \"instancePosition\": {}}\n\t \tinstance[\u0027text\u0027] \u003d filter.text\n\t \tinstance[\u0027color\u0027] \u003d filter.color\n\t \tinstance[\u0027filter_id\u0027] \u003d filter.id\n\t \tinstances.append(instance)\n\t\n\treturn sorted(instances, key\u003dlambda d: d[\u0027text\u0027])",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"params.filters": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.group_name": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 178,
|
|
"width": 214
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Title"
|
|
},
|
|
"position": {
|
|
"basis": "32px"
|
|
},
|
|
"propConfig": {
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "UPPER({view.params.group_name})"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"borderBottomStyle": "solid",
|
|
"borderBottomWidth": 1,
|
|
"classes": "Title/Text",
|
|
"fontSize": 13,
|
|
"marginLeft": "10%",
|
|
"marginRight": "10%",
|
|
"textAlign": "center"
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Filters"
|
|
},
|
|
"position": {
|
|
"basis": "138px",
|
|
"shrink": 0
|
|
},
|
|
"propConfig": {
|
|
"props.instances": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.filters"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn sorted(value, key\u003dlambda d: d[\u0027text\u0027])",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"alignContent": "flex-start",
|
|
"direction": "column",
|
|
"path": "Objects/PowerTable/FilterMenuItem",
|
|
"style": {
|
|
"marginBottom": 5,
|
|
"marginLeft": "12%",
|
|
"marginRight": "12%"
|
|
},
|
|
"useDefaultViewWidth": false
|
|
},
|
|
"type": "ia.display.flex-repeater"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "root"
|
|
},
|
|
"props": {
|
|
"direction": "column",
|
|
"style": {
|
|
"overflow": "visible"
|
|
}
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
} |