From f9558d9aa1a1a90cf19aed2ad35deed3eb22edc9 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 6 Nov 2024 14:22:58 -0800 Subject: [PATCH] fix merge --- reflex/components/plotly/plotly.py | 32 +++++++++++------------ reflex/components/plotly/plotly.pyi | 40 ++++++++++++++--------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/reflex/components/plotly/plotly.py b/reflex/components/plotly/plotly.py index 8af186c046..aff6e62b02 100644 --- a/reflex/components/plotly/plotly.py +++ b/reflex/components/plotly/plotly.py @@ -8,7 +8,7 @@ from reflex.components.component import Component, NoSSRComponent from reflex.components.core.cond import color_mode_cond -from reflex.event import EventHandler, empty_event +from reflex.event import EventHandler, no_args_event_spec from reflex.utils import console from reflex.vars.base import LiteralVar, Var @@ -117,49 +117,49 @@ class Plotly(NoSSRComponent): use_resize_handler: Var[bool] = LiteralVar.create(True) # Fired after the plot is redrawn. - on_after_plot: EventHandler[empty_event] + on_after_plot: EventHandler[no_args_event_spec] # Fired after the plot was animated. - on_animated: EventHandler[empty_event] + on_animated: EventHandler[no_args_event_spec] # Fired while animating a single frame (does not currently pass data through). - on_animating_frame: EventHandler[empty_event] + on_animating_frame: EventHandler[no_args_event_spec] # Fired when an animation is interrupted (to start a new animation for example). - on_animation_interrupted: EventHandler[empty_event] + on_animation_interrupted: EventHandler[no_args_event_spec] # Fired when the plot is responsively sized. - on_autosize: EventHandler[empty_event] + on_autosize: EventHandler[no_args_event_spec] # Fired whenever mouse moves over a plot. - on_before_hover: EventHandler[empty_event] + on_before_hover: EventHandler[no_args_event_spec] # Fired when a plotly UI button is clicked. - on_button_clicked: EventHandler[empty_event] + on_button_clicked: EventHandler[no_args_event_spec] # Fired when the plot is clicked. on_click: EventHandler[_event_points_data_signature] # Fired when a selection is cleared (via double click). - on_deselect: EventHandler[empty_event] + on_deselect: EventHandler[no_args_event_spec] # Fired when the plot is double clicked. - on_double_click: EventHandler[empty_event] + on_double_click: EventHandler[no_args_event_spec] # Fired when a plot element is hovered over. on_hover: EventHandler[_event_points_data_signature] # Fired after the plot is layed out (zoom, pan, etc). - on_relayout: EventHandler[empty_event] + on_relayout: EventHandler[no_args_event_spec] # Fired while the plot is being layed out. - on_relayouting: EventHandler[empty_event] + on_relayouting: EventHandler[no_args_event_spec] # Fired after the plot style is changed. - on_restyle: EventHandler[empty_event] + on_restyle: EventHandler[no_args_event_spec] # Fired after the plot is redrawn. - on_redraw: EventHandler[empty_event] + on_redraw: EventHandler[no_args_event_spec] # Fired after selecting plot elements. on_selected: EventHandler[_event_points_data_signature] @@ -168,10 +168,10 @@ class Plotly(NoSSRComponent): on_selecting: EventHandler[_event_points_data_signature] # Fired while an animation is occuring. - on_transitioning: EventHandler[empty_event] + on_transitioning: EventHandler[no_args_event_spec] # Fired when a transition is stopped early. - on_transition_interrupted: EventHandler[empty_event] + on_transition_interrupted: EventHandler[no_args_event_spec] # Fired when a hovered element is no longer hovered. on_unhover: EventHandler[_event_points_data_signature] diff --git a/reflex/components/plotly/plotly.pyi b/reflex/components/plotly/plotly.pyi index 94bb7daac3..ba3f323f58 100644 --- a/reflex/components/plotly/plotly.pyi +++ b/reflex/components/plotly/plotly.pyi @@ -65,20 +65,20 @@ class Plotly(NoSSRComponent): class_name: Optional[Any] = None, autofocus: Optional[bool] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, - on_after_plot: Optional[EventType[..., BASE_STATE]] = None, - on_animated: Optional[EventType[..., BASE_STATE]] = None, - on_animating_frame: Optional[EventType[..., BASE_STATE]] = None, - on_animation_interrupted: Optional[EventType[..., BASE_STATE]] = None, - on_autosize: Optional[EventType[..., BASE_STATE]] = None, - on_before_hover: Optional[EventType[..., BASE_STATE]] = None, + on_after_plot: Optional[EventType[[], BASE_STATE]] = None, + on_animated: Optional[EventType[[], BASE_STATE]] = None, + on_animating_frame: Optional[EventType[[], BASE_STATE]] = None, + on_animation_interrupted: Optional[EventType[[], BASE_STATE]] = None, + on_autosize: Optional[EventType[[], BASE_STATE]] = None, + on_before_hover: Optional[EventType[[], BASE_STATE]] = None, on_blur: Optional[EventType[[], BASE_STATE]] = None, - on_button_clicked: Optional[EventType[..., BASE_STATE]] = None, - on_click: Optional[EventType[..., BASE_STATE]] = None, + on_button_clicked: Optional[EventType[[], BASE_STATE]] = None, + on_click: Optional[EventType[[List[Point]], BASE_STATE]] = None, on_context_menu: Optional[EventType[[], BASE_STATE]] = None, - on_deselect: Optional[EventType[..., BASE_STATE]] = None, - on_double_click: Optional[EventType[..., BASE_STATE]] = None, + on_deselect: Optional[EventType[[], BASE_STATE]] = None, + on_double_click: Optional[EventType[[], BASE_STATE]] = None, on_focus: Optional[EventType[[], BASE_STATE]] = None, - on_hover: Optional[EventType[..., BASE_STATE]] = None, + on_hover: Optional[EventType[[List[Point]], BASE_STATE]] = None, on_mount: Optional[EventType[[], BASE_STATE]] = None, on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, @@ -87,16 +87,16 @@ class Plotly(NoSSRComponent): on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, - on_redraw: Optional[EventType[..., BASE_STATE]] = None, - on_relayout: Optional[EventType[..., BASE_STATE]] = None, - on_relayouting: Optional[EventType[..., BASE_STATE]] = None, - on_restyle: Optional[EventType[..., BASE_STATE]] = None, + on_redraw: Optional[EventType[[], BASE_STATE]] = None, + on_relayout: Optional[EventType[[], BASE_STATE]] = None, + on_relayouting: Optional[EventType[[], BASE_STATE]] = None, + on_restyle: Optional[EventType[[], BASE_STATE]] = None, on_scroll: Optional[EventType[[], BASE_STATE]] = None, - on_selected: Optional[EventType[..., BASE_STATE]] = None, - on_selecting: Optional[EventType[..., BASE_STATE]] = None, - on_transition_interrupted: Optional[EventType[..., BASE_STATE]] = None, - on_transitioning: Optional[EventType[..., BASE_STATE]] = None, - on_unhover: Optional[EventType[..., BASE_STATE]] = None, + on_selected: Optional[EventType[[List[Point]], BASE_STATE]] = None, + on_selecting: Optional[EventType[[List[Point]], BASE_STATE]] = None, + on_transition_interrupted: Optional[EventType[[], BASE_STATE]] = None, + on_transitioning: Optional[EventType[[], BASE_STATE]] = None, + on_unhover: Optional[EventType[[List[Point]], BASE_STATE]] = None, on_unmount: Optional[EventType[[], BASE_STATE]] = None, **props, ) -> "Plotly":