
* [REF-2265] ComponentState: scaffold for copying State per Component instance Define a base ComponentState which can be used to easily create copies of the given State definition (Vars and EventHandlers) that are tied to a particular instance of a Component (returned by get_component) * Define `State` field on `Component` for typing compatibility. This is an Optional field of Type[State] and is populated by ComponentState. * Add integration/test_component_state.py Create two independent counters and increment them separately * Add unit test for ComponentState
153 lines
7.4 KiB
Python
153 lines
7.4 KiB
Python
from reflex import admin as admin
|
|
from reflex.admin import AdminDash as AdminDash
|
|
from reflex import app as app
|
|
from reflex.app import App as App
|
|
from reflex.app import UploadFile as UploadFile
|
|
from reflex import base as base
|
|
from reflex.base import Base as Base
|
|
from reflex import compiler as compiler
|
|
from reflex.compiler.utils import get_asset_path as get_asset_path
|
|
from reflex.components import color as color
|
|
from reflex.components import cond as cond
|
|
from reflex.components import foreach as foreach
|
|
from reflex.components import html as html
|
|
from reflex.components import match as match
|
|
from reflex.components import color_mode_cond as color_mode_cond
|
|
from reflex.components import connection_banner as connection_banner
|
|
from reflex.components import connection_modal as connection_modal
|
|
from reflex.components import debounce_input as debounce_input
|
|
from reflex.components import fragment as fragment
|
|
from reflex.components import Fragment as Fragment
|
|
from reflex.components import image as image
|
|
from reflex.components import script as script
|
|
from reflex.components import desktop_only as desktop_only
|
|
from reflex.components import mobile_and_tablet as mobile_and_tablet
|
|
from reflex.components import mobile_only as mobile_only
|
|
from reflex.components import tablet_and_desktop as tablet_and_desktop
|
|
from reflex.components import tablet_only as tablet_only
|
|
from reflex.components import cancel_upload as cancel_upload
|
|
from reflex.components import clear_selected_files as clear_selected_files
|
|
from reflex.components import get_upload_dir as get_upload_dir
|
|
from reflex.components import get_upload_url as get_upload_url
|
|
from reflex.components import selected_files as selected_files
|
|
from reflex.components import upload as upload
|
|
from reflex.components import accordion as accordion
|
|
from reflex.components import alert_dialog as alert_dialog
|
|
from reflex.components import aspect_ratio as aspect_ratio
|
|
from reflex.components import avatar as avatar
|
|
from reflex.components import badge as badge
|
|
from reflex.components import blockquote as blockquote
|
|
from reflex.components import box as box
|
|
from reflex.components import button as button
|
|
from reflex.components import callout as callout
|
|
from reflex.components import card as card
|
|
from reflex.components import center as center
|
|
from reflex.components import checkbox as checkbox
|
|
from reflex.components import code as code
|
|
from reflex.components import container as container
|
|
from reflex.components import context_menu as context_menu
|
|
from reflex.components import dialog as dialog
|
|
from reflex.components import divider as divider
|
|
from reflex.components import drawer as drawer
|
|
from reflex.components import flex as flex
|
|
from reflex.components import form as form
|
|
from reflex.components import grid as grid
|
|
from reflex.components import heading as heading
|
|
from reflex.components import hover_card as hover_card
|
|
from reflex.components import hstack as hstack
|
|
from reflex.components import icon_button as icon_button
|
|
from reflex.components import inset as inset
|
|
from reflex.components import input as input
|
|
from reflex.components import link as link
|
|
from reflex.components import menu as menu
|
|
from reflex.components import popover as popover
|
|
from reflex.components import progress as progress
|
|
from reflex.components import radio as radio
|
|
from reflex.components import scroll_area as scroll_area
|
|
from reflex.components import section as section
|
|
from reflex.components import select as select
|
|
from reflex.components import slider as slider
|
|
from reflex.components import spacer as spacer
|
|
from reflex.components import stack as stack
|
|
from reflex.components import switch as switch
|
|
from reflex.components import table as table
|
|
from reflex.components import tabs as tabs
|
|
from reflex.components import text as text
|
|
from reflex.components import text_area as text_area
|
|
from reflex.components import theme as theme
|
|
from reflex.components import theme_panel as theme_panel
|
|
from reflex.components import tooltip as tooltip
|
|
from reflex.components import vstack as vstack
|
|
from reflex.components import code_block as code_block
|
|
from reflex.components import data_editor as data_editor
|
|
from reflex.components import data_editor_theme as data_editor_theme
|
|
from reflex.components import data_table as data_table
|
|
from reflex.components import plotly as plotly
|
|
from reflex.components import audio as audio
|
|
from reflex.components import video as video
|
|
from reflex.components import editor as editor
|
|
from reflex.components import EditorButtonList as EditorButtonList
|
|
from reflex.components import EditorOptions as EditorOptions
|
|
from reflex.components import icon as icon
|
|
from reflex.components import markdown as markdown
|
|
from reflex.components import list as list
|
|
from reflex.components import list_item as list_item
|
|
from reflex.components import unordered_list as unordered_list
|
|
from reflex.components import ordered_list as ordered_list
|
|
from reflex.components import moment as moment
|
|
from reflex.components.component import Component as Component
|
|
from reflex.components.component import NoSSRComponent as NoSSRComponent
|
|
from reflex.components.component import memo as memo
|
|
from reflex.components import chakra as chakra
|
|
from reflex.components import el as el
|
|
from reflex.components import lucide as lucide
|
|
from reflex.components import next as next
|
|
from reflex.components import radix as radix
|
|
from reflex.components.radix import color_mode as color_mode
|
|
from reflex.components import recharts as recharts
|
|
from reflex.components.moment.moment import MomentDelta as MomentDelta
|
|
from reflex import config as config
|
|
from reflex.config import Config as Config
|
|
from reflex.config import DBConfig as DBConfig
|
|
from reflex import constants as constants
|
|
from reflex.constants import Env as Env
|
|
from reflex import event as event
|
|
from reflex.event import EventChain as EventChain
|
|
from reflex.event import EventHandler as EventHandler
|
|
from reflex.event import background as background
|
|
from reflex.event import call_script as call_script
|
|
from reflex.event import clear_local_storage as clear_local_storage
|
|
from reflex.event import console_log as console_log
|
|
from reflex.event import download as download
|
|
from reflex.event import prevent_default as prevent_default
|
|
from reflex.event import redirect as redirect
|
|
from reflex.event import remove_cookie as remove_cookie
|
|
from reflex.event import remove_local_storage as remove_local_storage
|
|
from reflex.event import set_clipboard as set_clipboard
|
|
from reflex.event import set_focus as set_focus
|
|
from reflex.event import scroll_to as scroll_to
|
|
from reflex.event import set_value as set_value
|
|
from reflex.event import stop_propagation as stop_propagation
|
|
from reflex.event import upload_files as upload_files
|
|
from reflex.event import window_alert as window_alert
|
|
from reflex import middleware as middleware
|
|
from reflex.middleware import Middleware as Middleware
|
|
from reflex import model as model
|
|
from reflex.model import session as session
|
|
from reflex.model import Model as Model
|
|
from reflex.page import page as page
|
|
from reflex import route as route
|
|
from reflex import state as state
|
|
from reflex.state import var as var
|
|
from reflex.state import Cookie as Cookie
|
|
from reflex.state import LocalStorage as LocalStorage
|
|
from reflex.state import ComponentState as ComponentState
|
|
from reflex.state import State as State
|
|
from reflex import style as style
|
|
from reflex.style import toggle_color_mode as toggle_color_mode
|
|
from reflex import testing as testing
|
|
from reflex import utils as utils
|
|
from reflex import vars as vars
|
|
from reflex.vars import cached_var as cached_var
|
|
from reflex.vars import Var as Var
|