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

Add description options #548

Merged
merged 5 commits into from
May 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added

- `figure` prop in `dcc.Graph` now accepts a `frames` key
- Improved the `Dropdown` options description for dash-docs #547

### Removed

Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/Checklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class Checklist(Component):
Each checkbox is rendered as an input with a surrounding label.

Keyword arguments:
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- options (list; optional): An array of options
- values (list; optional): The currently selected value
- className (string; optional): The class of the container (div)
Expand Down
13 changes: 7 additions & 6 deletions dash_core_components/ConfirmDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@ class ConfirmDialog(Component):
is performing an action that should require an extra step of verification.

Keyword arguments:
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- message (string; optional): Message to show in the popup.
- submit_n_clicks (number; optional): Number of times the submit button was clicked
- submit_n_clicks_timestamp (number; optional): Last time the submit button was clicked.
- cancel_n_clicks (number; optional): Number of times the popup was canceled.
- cancel_n_clicks_timestamp (number; optional): Last time the cancel button was clicked.
- displayed (boolean; optional): Set to true to send the ConfirmDialog.
- key (string; optional)"""
- displayed (boolean; optional): Set to true to send the ConfirmDialog."""
@_explicitize_args
def __init__(self, id=Component.UNDEFINED, message=Component.UNDEFINED, submit_n_clicks=Component.UNDEFINED, submit_n_clicks_timestamp=Component.UNDEFINED, cancel_n_clicks=Component.UNDEFINED, cancel_n_clicks_timestamp=Component.UNDEFINED, displayed=Component.UNDEFINED, key=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed', 'key']
def __init__(self, id=Component.UNDEFINED, message=Component.UNDEFINED, submit_n_clicks=Component.UNDEFINED, submit_n_clicks_timestamp=Component.UNDEFINED, cancel_n_clicks=Component.UNDEFINED, cancel_n_clicks_timestamp=Component.UNDEFINED, displayed=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed']
self._type = 'ConfirmDialog'
self._namespace = 'dash_core_components'
self._valid_wildcard_attributes = []
self.available_properties = ['id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed', 'key']
self.available_properties = ['id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed']
self.available_wildcard_properties = []

_explicit_args = kwargs.pop('_explicit_args')
Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/ConfirmDialogProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class ConfirmDialogProvider(Component):

Keyword arguments:
- children (boolean | number | string | dict | list; optional): The children to hijack clicks from and display the popup.
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- message (string; optional): Message to show in the popup.
- submit_n_clicks (number; optional): Number of times the submit was clicked
- submit_n_clicks_timestamp (number; optional): Last time the submit button was clicked.
Expand Down
10 changes: 7 additions & 3 deletions dash_core_components/DatePickerRange.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ class DatePickerRange(Component):
which can be found here: https://github.com/airbnb/react-dates

Keyword arguments:
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- start_date (string; optional): Specifies the starting date for the component.
Accepts datetime.datetime objects or strings
in the format 'YYYY-MM-DD'
- start_date_id (string; optional)
- end_date_id (string; optional)
- start_date_id (string; optional): The HTML element ID of the start date input field.
Not used by Dash, only by CSS.
- end_date_id (string; optional): The HTML element ID of the end date input field.
Not used by Dash, only by CSS.
- end_date (string; optional): Specifies the ending date for the component.
Accepts datetime.datetime objects or strings
in the format 'YYYY-MM-DD'
Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/DatePickerSingle.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class DatePickerSingle(Component):
which can be found here: https://github.com/airbnb/react-dates

Keyword arguments:
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- date (string; optional): Specifies the starting date for the component, best practice is to pass
value via datetime object
- min_date_allowed (string; optional): Specifies the lowest selectable date for the component.
Expand Down
9 changes: 6 additions & 3 deletions dash_core_components/Dropdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ class Dropdown(Component):
which have the benefit of showing the users all of the items at once.

Keyword arguments:
- id (string; optional)
- options (list; optional): An array of options
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- options (list; optional): An array of options {label: [string|number], value: [string|number]},
an optional disabled field can be used for each option
- value (string | list | number | list; optional): The value of the input. If `multi` is false (the default)
then value is just a string that corresponds to the values
provided in the `options` property. If `multi` is true, then
Expand All @@ -31,7 +34,7 @@ class Dropdown(Component):
- multi (boolean; optional): If true, the user can select multiple values
- placeholder (string; optional): The grey, default text shown when no option is selected
- searchable (boolean; optional): Whether to enable the searching feature or not
- style (dict; optional)
- style (dict; optional): Defines CSS styles which will override styles previously set.
- loading_state (optional): Object that holds the loading state object coming from dash-renderer. loading_state has the following type: dict containing keys 'is_loading', 'prop_name', 'component_name'.
Those keys have the following types:
- is_loading (boolean; optional): Determines if the component is loading or not
Expand Down
9 changes: 6 additions & 3 deletions dash_core_components/Graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

class Graph(Component):
"""A Graph component.
Graph can be used to render any plotly.js-powered data visualization.

You can define callbacks based on user interaction with Graphs such as
hovering, clicking or selecting

Keyword arguments:
- id (string; optional): The ID of this component, used to identify dash components
Expand Down Expand Up @@ -40,12 +43,12 @@ class Graph(Component):
Read-only.
- figure (optional): Plotly `figure` object. See schema:
https://plot.ly/javascript/reference
Only supports `data` array and `layout` object.
`config` is set separately by the `config` property,
and `frames` is not supported.. figure has the following type: dict containing keys 'data', 'layout'.

`config` is set separately by the `config` property. figure has the following type: dict containing keys 'data', 'layout', 'frames'.
Those keys have the following types:
- data (list; optional)
- layout (dict; optional)
- frames (list; optional)
- style (dict; optional): Generic style overrides on the plot div
- className (string; optional): className of the parent div
- animate (boolean; optional): Beta: If true, animate between updates using
Expand Down
3 changes: 2 additions & 1 deletion dash_core_components/Input.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class Input(Component):
- disabled (a value equal to: 'disabled', 'DISABLED' | boolean; optional): If true, the input is disabled and can't be clicked on.
disabled is an HTML boolean attribute - it is enabled by a boolean or
'disabled'. Alternative capitalizations `DISABLED`
- inputMode (a value equal to: "verbatim", "latin", "latin-name", "latin-prose", "full-width-latin", "kana", "katakana", "numeric", "tel", "email", "url"; optional)
- inputMode (a value equal to: "verbatim", "latin", "latin-name", "latin-prose", "full-width-latin", "kana", "katakana", "numeric", "tel", "email", "url"; optional): Provides a hint to the browser as to the type of data that might be
entered by the user while editing the element or its contents.
- list (string; optional): Identifies a list of pre-defined options to suggest to the user.
The value must be the id of a <datalist> element in the same document.
The browser displays only options that are valid values for this
Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/Interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class Interval(Component):
The time delay is set with the property "interval" in milliseconds.

Keyword arguments:
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- interval (number; optional): This component will increment the counter `n_intervals` every
`interval` milliseconds
- disabled (boolean; optional): If True, the counter will no longer update
Expand Down
23 changes: 14 additions & 9 deletions dash_core_components/Link.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,32 @@

class Link(Component):
"""A Link component.
Link allows you to create a clickable link within a multi-page app.

For links with destinations outside the current app, `html.A` is a better
component to use.

Keyword arguments:
- children (a list of or a singular dash component, string or number; optional)
- href (string; optional)
- refresh (boolean; optional)
- className (string; optional)
- style (dict; optional)
- id (string; optional)
- children (a list of or a singular dash component, string or number; optional): The children of this component
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- href (string; optional): The URL of a linked resource.
- refresh (boolean; optional): Controls whether or not the page will refresh when the link is clicked
- className (string; optional): Often used with CSS to style elements with common properties.
- style (dict; optional): Defines CSS styles which will override styles previously set.
- loading_state (optional): Object that holds the loading state object coming from dash-renderer. loading_state has the following type: dict containing keys 'is_loading', 'prop_name', 'component_name'.
Those keys have the following types:
- is_loading (boolean; optional): Determines if the component is loading or not
- prop_name (string; optional): Holds which property is loading
- component_name (string; optional): Holds the name of the component that is loading"""
@_explicitize_args
def __init__(self, children=None, href=Component.UNDEFINED, refresh=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, id=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
self._prop_names = ['children', 'href', 'refresh', 'className', 'style', 'id', 'loading_state']
def __init__(self, children=None, id=Component.UNDEFINED, href=Component.UNDEFINED, refresh=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
self._prop_names = ['children', 'id', 'href', 'refresh', 'className', 'style', 'loading_state']
self._type = 'Link'
self._namespace = 'dash_core_components'
self._valid_wildcard_attributes = []
self.available_properties = ['children', 'href', 'refresh', 'className', 'style', 'id', 'loading_state']
self.available_properties = ['children', 'id', 'href', 'refresh', 'className', 'style', 'loading_state']
self.available_wildcard_properties = []

_explicit_args = kwargs.pop('_explicit_args')
Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/Loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ class Loading(Component):

Keyword arguments:
- children (list | a list of or a singular dash component, string or number; optional): Array that holds components to render
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- type (a value equal to: 'graph', 'cube', 'circle', 'dot', 'default'; optional): Property that determines which spinner to show - one of 'graph', 'cube', 'circle', 'dot', or 'default'.
- fullscreen (boolean; optional): Boolean that determines if the loading spinner will be displayed full-screen or not
- debug (boolean; optional): Boolean that determines if the loading spinner will display the status.prop_name and component_name
Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/Location.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ class Location(Component):
Use in conjunction with the `dash_core_components.Link` component to make apps with multiple pages.

Keyword arguments:
- id (string; required)
- id (string; required): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- pathname (string; optional): pathname in window.location - e.g., "/my/full/pathname"
- search (string; optional): search in window.location - e.g., "?myargument=1"
- hash (string; optional): hash in window.location - e.g., "#myhash"
Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/Markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class Markdown(Component):

Keyword arguments:
- children (string | list; optional): A markdown string (or array of strings) that adhreres to the CommonMark spec
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- className (string; optional): Class name of the container element
- containerProps (dict; optional): An object containing custom element props to put on the container
element such as id or style
Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/RadioItems.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class RadioItems(Component):
Each radio item is rendered as an input with a surrounding label.

Keyword arguments:
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- options (list; optional): An array of options
- value (string; optional): The currently selected value
- style (dict; optional): The style of the container (div)
Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/RangeSlider.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ class RangeSlider(Component):
Used for specifying a range of numerical values.

Keyword arguments:
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- marks (optional): Marks on the slider.
The key determines the position (a number),
and the value determines what will show.
Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/Slider.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ class Slider(Component):
A slider component with a single handle.

Keyword arguments:
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- marks (optional): Marks on the slider.
The key determines the position (a number),
and the value determines what will show.
Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/Store.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class Store(Component):
The data will be kept with the id as key.

Keyword arguments:
- id (string; required): The key of the storage.
- id (string; required): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- storage_type (a value equal to: 'local', 'session', 'memory'; optional): The type of the web storage.

memory: only kept in memory, reset on page refresh.
Expand Down
4 changes: 3 additions & 1 deletion dash_core_components/SyntaxHighlighter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ class SyntaxHighlighter(Component):

Keyword arguments:
- children (string | list; optional): The text to display and highlight
- id (string; optional)
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- language (string; optional): the language to highlight code in.
- theme (a value equal to: 'light', 'dark'; optional): theme: light or dark
- customStyle (dict; optional): prop that will be combined with the top level style on the pre tag, styles here will overwrite earlier styles.
Expand Down
3 changes: 2 additions & 1 deletion dash_core_components/Tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

class Tab(Component):
"""A Tab component.

Part of dcc.Tabs - this is the child Tab component used to render a tabbed page.
Its children will be set as the content of that tab, which if clicked will become visible.

Keyword arguments:
- children (a list of or a singular dash component, string or number; optional): The content of the tab - will only be displayed if this tab is selected
Expand Down
7 changes: 4 additions & 3 deletions dash_core_components/Upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

class Upload(Component):
"""A Upload component.

Upload components allow your app to accept user-uploaded files via drag'n'drop

Keyword arguments:
- children (a list of or a singular dash component, string or number | string; optional): Contents of the upload component
- id (string; optional): ID of the component. Used to identify component
in Dash callback functions.
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- contents (string | list; optional): The contents of the uploaded file as a binary string
- filename (string | list; optional): The name of the file(s) that was(were) uploaded.
Note that this does not include the path of the file
Expand Down
Loading