/
perspective.py
66 lines (45 loc) · 2.15 KB
/
perspective.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from bokeh.core.properties import (
Any, Bool, Dict, Either, Instance, List, Null, Nullable, String
)
from bokeh.models import ColumnDataSource, HTMLBox
class Perspective(HTMLBox):
aggregates = Either(Dict(String, Any), Null())
split_by = Either(List(String), Null())
columns = Either(List(Either(String, Null)), Null)
expressions = Either(List(String), Null())
editable = Nullable(Bool())
filters = Either(List(Any), Null())
plugin = String()
plugin_config = Either(Dict(String, Any), Null)
group_by = Either(List(String), Null())
selectable = Nullable(Bool())
schema = Dict(String, String)
sort = Either(List(List(String)), Null())
source = Instance(ColumnDataSource)
toggle_config = Bool(True)
theme = String()
# pylint: disable=line-too-long
__javascript__ = [
"https://unpkg.com/@finos/perspective@1.3.6/dist/umd/perspective.js",
"https://unpkg.com/@finos/perspective-viewer@1.3.6/dist/umd/perspective-viewer.js",
"https://unpkg.com/@finos/perspective-viewer-datagrid@1.3.6/dist/umd/perspective-viewer-datagrid.js",
"https://unpkg.com/@finos/perspective-viewer-d3fc@1.3.6/dist/umd/perspective-viewer-d3fc.js",
]
__js_skip__ = {
"perspective": __javascript__,
}
__js_require__ = {
"paths": {
"perspective": "https://unpkg.com/@finos/perspective@1.3.6/dist/umd/perspective",
"perspective-viewer": "https://unpkg.com/@finos/perspective-viewer@1.3.6/dist/umd/perspective-viewer",
"perspective-viewer-datagrid": "https://unpkg.com/@finos/perspective-viewer-datagrid@1.3.6/dist/umd/perspective-viewer-datagrid",
"perspective-viewer-d3fc": "https://unpkg.com/@finos/perspective-viewer-d3fc@1.3.6/dist/umd/perspective-viewer-d3fc",
},
"exports": {
"perspective": "perspective",
"perspective-viewer": "PerspectiveViewer",
"perspective-viewer-datagrid": "PerspectiveViewerDatagrid",
"perspective-viewer-d3fc": "PerspectiveViewerD3fc",
},
}
__css__ = ["https://unpkg.com/@finos/perspective-viewer@1.3.6/dist/css/themes.css"]