Skip to content

Commit 27364b5

Browse files
committed
Added Scrollspy component from mp-react-components.
1 parent 46fdcdb commit 27364b5

28 files changed

+3696
-3789
lines changed

.Rbuildignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ demo/.*\.js
2020
demo/.*\.html
2121
demo/.*\.css
2222

23-
# ignore python files/folders
23+
# ignore Python files/folders
2424
setup.py
2525
usage.py
2626
setup.py

DESCRIPTION

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dashMpComponents
22
Title: Dash components for the Materials Project
3-
Version: 0.0.23
3+
Version: 0.0.24
44
Description: Dash components for the Materials Project
55
Depends: R (>= 3.0.2)
66
Imports:
@@ -11,5 +11,3 @@ BugReports: https://github.com/materialsproject/dash-mp-components/issues
1111
Encoding: UTF-8
1212
LazyData: true
1313
KeepSource: true
14-
Author: Materials Project Team [aut]
15-
Maintainer: Materials Project Team <[email protected]>

NAMESPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export(CameraContext)
44
export(GraphComponent)
55
export(JsonView)
66
export(MatSidebar)
7+
export(Scrollspy)
78
export(Simple3DScene)
89
export(PeriodicContext)
910
export(PeriodicContextTable)
@@ -17,18 +18,17 @@ export(Search)
1718
export(SearchGrid)
1819
export(periodicContextTable)
1920
export(periodicFilter)
20-
export(searchFunnel)
21-
export(sidebar)
2221
export(periodicElement)
2322
export(matMaterialsTable)
24-
export(searchComponent)
2523
export(periodicTableInput)
2624
export(jsonView)
2725
export(graphComponent)
2826
export(simple3DScene)
27+
export(matScrollspy)
2928
export(matPrintViewContext)
3029
export(matSidebar)
3130
export(cameraContext)
31+
export(scrollspy)
3232
export(periodicContext)
3333
export(matSearchGrid)
3434
export(search)

assets/scrollspy.css

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.scrollspy {
2+
display: inline-block;
3+
}
4+
5+
.scrollspy .menu {
6+
position: fixed;
7+
width: 200px;
8+
}
9+
10+
.scrollspy .content {
11+
display: inline-block;
12+
margin-left: 200px;
13+
padding-left: 15px;
14+
}
15+
16+
.scrollspy .content p {
17+
height: 500px;
18+
}
19+
20+
.scrollspy a {
21+
text-decoration: none;
22+
color: #000;
23+
}
24+
25+
.scrollspy .is-active {
26+
color: forestgreen;
27+
font-weight: bold;
28+
}

dash_mp_components/CameraContext.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def __init__(self, children=None, id=Component.UNDEFINED, **kwargs):
1616
self._prop_names = ['children', 'id']
1717
self._type = 'CameraContext'
1818
self._namespace = 'dash_mp_components'
19-
self._valid_wildcard_attributes = []
19+
self._valid_wildcard_attributes = []
2020
self.available_properties = ['children', 'id']
21-
self.available_wildcard_properties = []
21+
self.available_wildcard_properties = []
2222

2323
_explicit_args = kwargs.pop('_explicit_args')
2424
_locals = locals()
@@ -27,6 +27,6 @@ def __init__(self, children=None, id=Component.UNDEFINED, **kwargs):
2727

2828
for k in []:
2929
if k not in args:
30-
raise TypeError('Required argument `' + k +
31-
'` was not specified.')
30+
raise TypeError(
31+
'Required argument `' + k + '` was not specified.')
3232
super(CameraContext, self).__init__(children=children, **args)

dash_mp_components/MatMaterialsTable.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@ class MatMaterialsTable(Component):
1111
- id (string; optional)
1212
- data (list; optional)"""
1313
@_explicitize_args
14-
def __init__(self,
15-
id=Component.UNDEFINED,
16-
data=Component.UNDEFINED,
17-
**kwargs):
14+
def __init__(self, id=Component.UNDEFINED, data=Component.UNDEFINED, **kwargs):
1815
self._prop_names = ['id', 'data']
1916
self._type = 'MatMaterialsTable'
2017
self._namespace = 'dash_mp_components'
21-
self._valid_wildcard_attributes = []
18+
self._valid_wildcard_attributes = []
2219
self.available_properties = ['id', 'data']
23-
self.available_wildcard_properties = []
20+
self.available_wildcard_properties = []
2421

2522
_explicit_args = kwargs.pop('_explicit_args')
2623
_locals = locals()
@@ -29,6 +26,6 @@ def __init__(self,
2926

3027
for k in []:
3128
if k not in args:
32-
raise TypeError('Required argument `' + k +
33-
'` was not specified.')
29+
raise TypeError(
30+
'Required argument `' + k + '` was not specified.')
3431
super(MatMaterialsTable, self).__init__(**args)

dash_mp_components/MatPrintViewContext.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ def __init__(self, children=None, id=Component.UNDEFINED, **kwargs):
1717
self._prop_names = ['children', 'id']
1818
self._type = 'MatPrintViewContext'
1919
self._namespace = 'dash_mp_components'
20-
self._valid_wildcard_attributes = []
20+
self._valid_wildcard_attributes = []
2121
self.available_properties = ['children', 'id']
22-
self.available_wildcard_properties = []
22+
self.available_wildcard_properties = []
2323

2424
_explicit_args = kwargs.pop('_explicit_args')
2525
_locals = locals()
@@ -28,6 +28,6 @@ def __init__(self, children=None, id=Component.UNDEFINED, **kwargs):
2828

2929
for k in []:
3030
if k not in args:
31-
raise TypeError('Required argument `' + k +
32-
'` was not specified.')
31+
raise TypeError(
32+
'Required argument `' + k + '` was not specified.')
3333
super(MatPrintViewContext, self).__init__(children=children, **args)

dash_mp_components/MatSearchGrid.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@ class MatSearchGrid(Component):
1111
- state (dict; optional): Latest configuration of the funnel
1212
- id (string; optional): The ID used to identify this component in Dash callbacks."""
1313
@_explicitize_args
14-
def __init__(self,
15-
state=Component.UNDEFINED,
16-
id=Component.UNDEFINED,
17-
**kwargs):
14+
def __init__(self, state=Component.UNDEFINED, id=Component.UNDEFINED, **kwargs):
1815
self._prop_names = ['state', 'id']
1916
self._type = 'MatSearchGrid'
2017
self._namespace = 'dash_mp_components'
21-
self._valid_wildcard_attributes = []
18+
self._valid_wildcard_attributes = []
2219
self.available_properties = ['state', 'id']
23-
self.available_wildcard_properties = []
20+
self.available_wildcard_properties = []
2421

2522
_explicit_args = kwargs.pop('_explicit_args')
2623
_locals = locals()
@@ -29,6 +26,6 @@ def __init__(self,
2926

3027
for k in []:
3128
if k not in args:
32-
raise TypeError('Required argument `' + k +
33-
'` was not specified.')
29+
raise TypeError(
30+
'Required argument `' + k + '` was not specified.')
3431
super(MatSearchGrid, self).__init__(**args)

dash_mp_components/MatSidebar.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,13 @@ class MatSidebar(Component):
1313
- appId (string; optional): This is a read-only prop that dash callback can subscribe to
1414
- layout (a value equal to: 'vertical', 'horizontal'; optional): The layout of the sidebar"""
1515
@_explicitize_args
16-
def __init__(self,
17-
id=Component.UNDEFINED,
18-
currentApp=Component.UNDEFINED,
19-
appId=Component.UNDEFINED,
20-
layout=Component.UNDEFINED,
21-
**kwargs):
16+
def __init__(self, id=Component.UNDEFINED, currentApp=Component.UNDEFINED, appId=Component.UNDEFINED, layout=Component.UNDEFINED, **kwargs):
2217
self._prop_names = ['id', 'currentApp', 'appId', 'layout']
2318
self._type = 'MatSidebar'
2419
self._namespace = 'dash_mp_components'
25-
self._valid_wildcard_attributes = []
20+
self._valid_wildcard_attributes = []
2621
self.available_properties = ['id', 'currentApp', 'appId', 'layout']
27-
self.available_wildcard_properties = []
22+
self.available_wildcard_properties = []
2823

2924
_explicit_args = kwargs.pop('_explicit_args')
3025
_locals = locals()
@@ -33,6 +28,6 @@ def __init__(self,
3328

3429
for k in []:
3530
if k not in args:
36-
raise TypeError('Required argument `' + k +
37-
'` was not specified.')
31+
raise TypeError(
32+
'Required argument `' + k + '` was not specified.')
3833
super(MatSidebar, self).__init__(**args)

dash_mp_components/PeriodicContext.py

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,13 @@ class PeriodicContext(Component):
1515
- hiddenElements (list; optional): A list of hidden symbols
1616
- forwardOuterChange (boolean; optional): Forward external changes"""
1717
@_explicitize_args
18-
def __init__(self,
19-
children=None,
20-
id=Component.UNDEFINED,
21-
disabledElements=Component.UNDEFINED,
22-
enabledElements=Component.UNDEFINED,
23-
hiddenElements=Component.UNDEFINED,
24-
forwardOuterChange=Component.UNDEFINED,
25-
**kwargs):
26-
self._prop_names = [
27-
'children', 'id', 'disabledElements', 'enabledElements',
28-
'hiddenElements', 'forwardOuterChange'
29-
]
18+
def __init__(self, children=None, id=Component.UNDEFINED, disabledElements=Component.UNDEFINED, enabledElements=Component.UNDEFINED, hiddenElements=Component.UNDEFINED, forwardOuterChange=Component.UNDEFINED, **kwargs):
19+
self._prop_names = ['children', 'id', 'disabledElements', 'enabledElements', 'hiddenElements', 'forwardOuterChange']
3020
self._type = 'PeriodicContext'
3121
self._namespace = 'dash_mp_components'
32-
self._valid_wildcard_attributes = []
33-
self.available_properties = [
34-
'children', 'id', 'disabledElements', 'enabledElements',
35-
'hiddenElements', 'forwardOuterChange'
36-
]
37-
self.available_wildcard_properties = []
22+
self._valid_wildcard_attributes = []
23+
self.available_properties = ['children', 'id', 'disabledElements', 'enabledElements', 'hiddenElements', 'forwardOuterChange']
24+
self.available_wildcard_properties = []
3825

3926
_explicit_args = kwargs.pop('_explicit_args')
4027
_locals = locals()
@@ -43,6 +30,6 @@ def __init__(self,
4330

4431
for k in []:
4532
if k not in args:
46-
raise TypeError('Required argument `' + k +
47-
'` was not specified.')
33+
raise TypeError(
34+
'Required argument `' + k + '` was not specified.')
4835
super(PeriodicContext, self).__init__(children=children, **args)

0 commit comments

Comments
 (0)