147 lines
3.7 KiB
Plaintext
147 lines
3.7 KiB
Plaintext
{
|
|
"custom": {
|
|
"SelectAll": null
|
|
},
|
|
"params": {
|
|
"Columns": {
|
|
"ETag": false,
|
|
"Filename": true,
|
|
"Key": false,
|
|
"Last Updated": true,
|
|
"Size (bytes)": true,
|
|
"Storage Class": false
|
|
}
|
|
},
|
|
"propConfig": {
|
|
"custom.SelectAll": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.Columns"
|
|
},
|
|
"enabled": false,
|
|
"transforms": [
|
|
{
|
|
"code": "\tshow_all \u003d True\n\tif len(value) \u003e 0:\n\t\thidden_count \u003d 0\t\t\n\t\tfor column in value:\n\t\t\tif not column[\u0027Hidden\u0027]:\n\t\t\t\tshow_all \u003d False\n\t\t\t\thidden_count +\u003d 1\n\t\tif show_all and hidden_count !\u003d len(value):\n\t\t\tshow_all \u003d None\n\treturn show_all",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"params.Columns": {
|
|
"paramDirection": "inout",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 224,
|
|
"width": 450
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Title"
|
|
},
|
|
"position": {
|
|
"basis": "32px"
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"marginTop": 5,
|
|
"textAlign": "center",
|
|
"textDecoration": "underline"
|
|
},
|
|
"text": "Hide/Unhide Columns"
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "SelectAllCheck"
|
|
},
|
|
"position": {
|
|
"basis": "36px",
|
|
"display": false
|
|
},
|
|
"propConfig": {
|
|
"props.selected": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.SelectAll"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "IF(!isNull({view.custom.SelectAll}), IF({view.custom.SelectAll}, \u0027Hide All\u0027, \u0027Show All\u0027), \u0027Hide/Show All\u0027)"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"fontSize": 12
|
|
}
|
|
},
|
|
"type": "ia.input.checkbox"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "ColumnTiles"
|
|
},
|
|
"position": {
|
|
"basis": "320px"
|
|
},
|
|
"propConfig": {
|
|
"props.instances": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.Columns"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\tcolumns \u003d []\n\tif len(value.keys()) \u003e 0:\n\t\tfor column in value:\n\t\t\tnew_instance \u003d {\n\t\t\t\t\u0027Name\u0027: column,\n\t\t\t\t#If not hidden, show Add (+) sign\n\t\t\t\t\u0027Hidden\u0027: not value[column]\n\t\t\t}\n\t\t\tcolumns.append(new_instance)\n\treturn columns",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"alignContent": "flex-start",
|
|
"alignItems": "flex-start",
|
|
"justify": "center",
|
|
"path": "Objects/PowerTable/ColumnSelectionTile",
|
|
"style": {
|
|
"marginBottom": 5,
|
|
"marginLeft": 5,
|
|
"marginRight": 5,
|
|
"marginTop": 5
|
|
},
|
|
"wrap": "wrap"
|
|
},
|
|
"type": "ia.display.flex-repeater"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "root"
|
|
},
|
|
"props": {
|
|
"direction": "column",
|
|
"style": {
|
|
"borderBottomLeftRadius": 20,
|
|
"borderBottomRightRadius": 20,
|
|
"borderTopRightRadius": 20
|
|
}
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
} |