Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 33118ed

Browse files
authored
Merge pull request #483 from mako-npm/Add_restyle_prop
Modified Graph.react.js to include restyle event
2 parents 63be1c2 + 688a66f commit 33118ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+617
-204
lines changed

DESCRIPTION

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Title: Core component suite for Dash
33
Version: 0.44.0
44
Authors @R: as.person(c(Chris Parmer <[email protected]>))
55
Description: Core component suite for Dash
6-
Depends: R (>= 3.0.2)
7-
Imports: dashR
6+
Depends: R (>= 3.5.0)
87
Suggests: testthat, roxygen2
98
License: MIT + file LICENSE
109
URL: https://github.com/plotly/dash-core-components

R/coreLoading.R

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# AUTO GENERATED FILE - DO NOT EDIT
2+
3+
coreLoading <- function(children=NULL, id=NULL, type=NULL, fullscreen=NULL, debug=NULL, className=NULL, style=NULL, color=NULL, loading_state=NULL) {
4+
5+
component <- list(
6+
props = list(children=children, id=id, type=type, fullscreen=fullscreen, debug=debug, className=className, style=style, color=color, loading_state=loading_state),
7+
type = 'Loading',
8+
namespace = 'dash_core_components',
9+
propNames = c('children', 'id', 'type', 'fullscreen', 'debug', 'className', 'style', 'color', 'loading_state'),
10+
package = 'dashCoreComponents'
11+
)
12+
13+
component$props <- filter_null(component$props)
14+
15+
structure(component, class = c('dash_component', 'list'))
16+
}

R/dccGraph.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# AUTO GENERATED FILE - DO NOT EDIT
22

3-
dccGraph <- function(id=NULL, clickData=NULL, clickAnnotationData=NULL, hoverData=NULL, clear_on_unhover=NULL, selectedData=NULL, relayoutData=NULL, figure=NULL, style=NULL, className=NULL, animate=NULL, animation_options=NULL, config=NULL, loading_state=NULL) {
3+
dccGraph <- function(id=NULL, clickData=NULL, clickAnnotationData=NULL, hoverData=NULL, clear_on_unhover=NULL, selectedData=NULL, relayoutData=NULL, restyleData=NULL, figure=NULL, style=NULL, className=NULL, animate=NULL, animation_options=NULL, config=NULL, loading_state=NULL) {
44

55
component <- list(
6-
props = list(id=id, clickData=clickData, clickAnnotationData=clickAnnotationData, hoverData=hoverData, clear_on_unhover=clear_on_unhover, selectedData=selectedData, relayoutData=relayoutData, figure=figure, style=style, className=className, animate=animate, animation_options=animation_options, config=config, loading_state=loading_state),
6+
props = list(id=id, clickData=clickData, clickAnnotationData=clickAnnotationData, hoverData=hoverData, clear_on_unhover=clear_on_unhover, selectedData=selectedData, relayoutData=relayoutData, restyleData=restyleData, figure=figure, style=style, className=className, animate=animate, animation_options=animation_options, config=config, loading_state=loading_state),
77
type = 'Graph',
88
namespace = 'dash_core_components',
9-
propNames = c('id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state'),
9+
propNames = c('id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state'),
1010
package = 'dashCoreComponents'
1111
)
1212

R/internal.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
.dashCoreComponents_js_metadata <- function() {
22
deps_metadata <- list(`dash_core_components_0` = structure(list(name = "dash_core_components_0",
33
version = "0", src = list(href = NULL,
4-
file = "deps"), meta = NULL,
4+
file = "deps/"), meta = NULL,
55
script = "plotly-1.45.0.min.js",
66
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
77
all_files = FALSE), class = "html_dependency"),
88
`dash_core_components` = structure(list(name = "dash_core_components",
99
version = "0", src = list(href = NULL,
10-
file = "deps"), meta = NULL,
10+
file = "deps/"), meta = NULL,
1111
script = "dash_core_components.min.js",
1212
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
1313
all_files = FALSE), class = "html_dependency"),
1414
`dash_core_components` = structure(list(name = "dash_core_components",
1515
version = "0", src = list(href = NULL,
16-
file = "deps"), meta = NULL,
16+
file = "deps/"), meta = NULL,
1717
script = "dash_core_components.min.js.map",
1818
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
1919
all_files = FALSE), class = "html_dependency"))

dash_core_components/Graph.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class Graph(Component):
2121
- selectedData (dict; optional): Data from latest select event
2222
- relayoutData (dict; optional): Data from latest relayout event which occurs
2323
when the user zooms or pans on the plot
24+
- restyleData (dict; optional): Data from latest restyle event which occurs
25+
when the user toggles a legend item
2426
- figure (dict; optional): Plotly `figure` object. See schema:
2527
https://plot.ly/javascript/reference
2628
Only supports `data` array and `layout` object.
@@ -93,12 +95,12 @@ class Graph(Component):
9395
- prop_name (string; optional): Holds which property is loading
9496
- component_name (string; optional): Holds the name of the component that is loading"""
9597
@_explicitize_args
96-
def __init__(self, id=Component.UNDEFINED, clickData=Component.UNDEFINED, clickAnnotationData=Component.UNDEFINED, hoverData=Component.UNDEFINED, clear_on_unhover=Component.UNDEFINED, selectedData=Component.UNDEFINED, relayoutData=Component.UNDEFINED, figure=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, animate=Component.UNDEFINED, animation_options=Component.UNDEFINED, config=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
97-
self._prop_names = ['id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
98+
def __init__(self, id=Component.UNDEFINED, clickData=Component.UNDEFINED, clickAnnotationData=Component.UNDEFINED, hoverData=Component.UNDEFINED, clear_on_unhover=Component.UNDEFINED, selectedData=Component.UNDEFINED, relayoutData=Component.UNDEFINED, restyleData=Component.UNDEFINED, figure=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, animate=Component.UNDEFINED, animation_options=Component.UNDEFINED, config=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
99+
self._prop_names = ['id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
98100
self._type = 'Graph'
99101
self._namespace = 'dash_core_components'
100102
self._valid_wildcard_attributes = []
101-
self.available_properties = ['id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
103+
self.available_properties = ['id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
102104
self.available_wildcard_properties = []
103105

104106
_explicit_args = kwargs.pop('_explicit_args')

dash_core_components/dash_core_components.dev.js

Lines changed: 31 additions & 11 deletions
Large diffs are not rendered by default.

dash_core_components/dash_core_components.dev.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_core_components/dash_core_components.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_core_components/dash_core_components.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_core_components/metadata.json

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,13 @@
326326
"required": false,
327327
"description": "Dash-assigned callback that gets fired when the value changes."
328328
},
329+
"children": {
330+
"type": {
331+
"name": "any"
332+
},
333+
"required": false,
334+
"description": "The children to hijack clicks from and display the popup."
335+
},
329336
"loading_state": {
330337
"type": {
331338
"name": "shape",
@@ -1257,6 +1264,17 @@
12571264
"computed": false
12581265
}
12591266
},
1267+
"restyleData": {
1268+
"type": {
1269+
"name": "object"
1270+
},
1271+
"required": false,
1272+
"description": "Data from latest restyle event which occurs\nwhen the user toggles a legend item",
1273+
"defaultValue": {
1274+
"value": "null",
1275+
"computed": false
1276+
}
1277+
},
12601278
"figure": {
12611279
"type": {
12621280
"name": "object"
@@ -2103,6 +2121,13 @@
21032121
"required": false,
21042122
"description": ""
21052123
},
2124+
"children": {
2125+
"type": {
2126+
"name": "node"
2127+
},
2128+
"required": false,
2129+
"description": ""
2130+
},
21062131
"loading_state": {
21072132
"type": {
21082133
"name": "shape",
@@ -2141,6 +2166,24 @@
21412166
"required": false,
21422167
"description": ""
21432168
},
2169+
"children": {
2170+
"type": {
2171+
"name": "union",
2172+
"value": [
2173+
{
2174+
"name": "arrayOf",
2175+
"value": {
2176+
"name": "node"
2177+
}
2178+
},
2179+
{
2180+
"name": "node"
2181+
}
2182+
]
2183+
},
2184+
"required": false,
2185+
"description": "Array that holds components to render"
2186+
},
21442187
"type": {
21452188
"type": {
21462189
"name": "enum",
@@ -2437,6 +2480,24 @@
24372480
"computed": false
24382481
}
24392482
},
2483+
"children": {
2484+
"type": {
2485+
"name": "union",
2486+
"value": [
2487+
{
2488+
"name": "string"
2489+
},
2490+
{
2491+
"name": "arrayOf",
2492+
"value": {
2493+
"name": "string"
2494+
}
2495+
}
2496+
]
2497+
},
2498+
"required": false,
2499+
"description": "A markdown string (or array of strings) that adhreres to the CommonMark spec"
2500+
},
24402501
"loading_state": {
24412502
"type": {
24422503
"name": "shape",
@@ -3073,6 +3134,24 @@
30733134
"required": false,
30743135
"description": ""
30753136
},
3137+
"children": {
3138+
"type": {
3139+
"name": "union",
3140+
"value": [
3141+
{
3142+
"name": "string"
3143+
},
3144+
{
3145+
"name": "arrayOf",
3146+
"value": {
3147+
"name": "string"
3148+
}
3149+
}
3150+
]
3151+
},
3152+
"required": false,
3153+
"description": "The text to display and highlight"
3154+
},
30763155
"language": {
30773156
"type": {
30783157
"name": "string"
@@ -3205,6 +3284,13 @@
32053284
"required": false,
32063285
"description": "The tab's label"
32073286
},
3287+
"children": {
3288+
"type": {
3289+
"name": "node"
3290+
},
3291+
"required": false,
3292+
"description": "The content of the tab - will only be displayed if this tab is selected"
3293+
},
32083294
"value": {
32093295
"type": {
32103296
"name": "string"
@@ -3398,6 +3484,24 @@
33983484
"computed": false
33993485
}
34003486
},
3487+
"children": {
3488+
"type": {
3489+
"name": "union",
3490+
"value": [
3491+
{
3492+
"name": "arrayOf",
3493+
"value": {
3494+
"name": "node"
3495+
}
3496+
},
3497+
{
3498+
"name": "node"
3499+
}
3500+
]
3501+
},
3502+
"required": false,
3503+
"description": "Array that holds Tab components"
3504+
},
34013505
"colors": {
34023506
"type": {
34033507
"name": "shape",
@@ -3792,6 +3896,21 @@
37923896
"required": false,
37933897
"description": "The last modified date of the file that was uploaded in unix time\n(seconds since 1970)."
37943898
},
3899+
"children": {
3900+
"type": {
3901+
"name": "union",
3902+
"value": [
3903+
{
3904+
"name": "node"
3905+
},
3906+
{
3907+
"name": "string"
3908+
}
3909+
]
3910+
},
3911+
"required": false,
3912+
"description": "Contents of the upload component"
3913+
},
37953914
"accept": {
37963915
"type": {
37973916
"name": "string"

0 commit comments

Comments
 (0)