diff --git a/taipy/gui/_renderers/__init__.py b/taipy/gui/_renderers/__init__.py
index d0250b2968..b0e5c76d5b 100644
--- a/taipy/gui/_renderers/__init__.py
+++ b/taipy/gui/_renderers/__init__.py
@@ -99,11 +99,8 @@ def __parse_file_content(self, content):
self._filepath = content
def __sanitize_content(self, content: str) -> str:
- # replace all CRLF (\r\n) with LF (\n)
- text = re.sub(r'\r\n', '\n', content)
- # replace all remaining CR (\r) with LF (\n)
- text = re.sub(r'\r', '\n', content)
- return text
+ # Replace all CRLF (\r\n) and CR (\r) by LF (\n)
+ return re.sub(r"\r", "\n", re.sub(r"\r\n", "\n", content))
def set_content(self, content: str) -> None:
if not _is_in_notebook():
diff --git a/taipy/gui/viselements.json b/taipy/gui/viselements.json
index e226005715..e41509417b 100644
--- a/taipy/gui/viselements.json
+++ b/taipy/gui/viselements.json
@@ -184,13 +184,13 @@
"name": "continuous",
"type": "bool",
"default_value": "True",
- "doc": "If set to False, the control emits an on_change notification only when the mouse button is released, otherwise notifications are emitted during the cursor movements.
If lov is defined, the default value is False."
+ "doc": "If set to False, the control emits an on_change notification only when the mouse button is released, otherwise notifications are emitted during the cursor movements.
If lov is defined, the default value is False."
},
{
"name": "change_delay",
"type": "int",
"default_value": "App config",
- "doc": "Minimum time between triggering two on_change calls.
The default value is defined at the application configuration level by the change_delay configuration option. if None or 0, there's no delay."
+ "doc": "Minimum time between triggering two on_change callbacks.
The default value is defined at the application configuration level by the change_delay configuration option. if None or 0, there's no delay."
},
{
"name": "width",
@@ -235,6 +235,12 @@
"default_value": "False",
"doc": "If set, this allows de-selection and the value is set to unselected_value."
},
+ {
+ "name": "unselected_value",
+ "type": "any",
+ "default_value": "None",
+ "doc": "Value assigned to value when no item is selected."
+ },
{
"name": "mode",
"type": "str",
@@ -568,17 +574,17 @@
{
"name": "template",
"type": "dict",
- "doc": "The Plotly layout template."
+ "doc": "The Plotly layout template."
},
{
"name": "template[dark]",
"type": "dict",
- "doc": "The Plotly layout template applied over the base template when theme is dark."
+ "doc": "The Plotly layout template applied over the base template when theme is dark."
},
{
"name": "template[light]",
"type": "dict",
- "doc": "The Plotly layout template applied over the base template when theme is not dark."
+ "doc": "The Plotly layout template applied over the base template when theme is not dark."
},
{
"name": "decimator",
@@ -600,7 +606,7 @@
}
],
[
- "file_download",
+ "table",
{
"inherits": [
"active",
@@ -608,1969 +614,142 @@
],
"properties": [
{
- "name": "content",
+ "name": "data",
"default_property": true,
- "type": "dynamic(path|file|URL|ReadableBuffer|None)",
- "doc": "The content to transfer.
If this is a string, a URL, or a file, then the content is read from this source.
If a readable buffer is provided (such as an array of bytes...), and to prevent the bandwidth from being consumed too much, the way the data is transferred depends on the data_url_max_size parameter of the application configuration (which is set to 50kB by default):\n
\n- If the buffer size is smaller than this setting, then the raw content is generated as a data URL, encoded using base64 (i.e.
\"data:<mimetype>;base64,<data>\"
). \n- If the buffer size exceeds this setting, then it is transferred through a temporary file.
\n
If this property is set to None, that indicates that dynamic content is generated. Please take a look at the examples below for details on dynamic generation."
- },
- {
- "name": "label",
- "type": "dynamic(str)",
- "doc": "The label of the button."
+ "required": true,
+ "type": "dynamic(any)",
+ "doc": "The data to be represented in this table. This property can be indexed to define other data for comparison."
},
{
- "name": "on_action",
- "type": "Callback",
- "doc": "The name of a function that is triggered when the download is terminated (or on user action if content is None).
All the parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (optional[str]): the identifier of the button.
\n- payload (dict): the details on this callback's invocation.
\nThis dictionary has two keys:\n\n- action: the name of the action that triggered this callback.
\n- args: A list of two elements: args[0] reflects the name property and args[1] holds the file URL.
\n
\n \n
",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
+ "name": "page_size",
+ "type": "int",
+ "default_value": "100",
+ "doc": "For a paginated table, the number of visible rows."
},
{
- "name": "auto",
+ "name": "allow_all_rows",
"type": "bool",
"default_value": "False",
- "doc": "If True, the download starts as soon as the page is loaded."
+ "doc": "For a paginated table, adds an option to show all the rows."
},
{
- "name": "render",
- "type": "dynamic(bool)",
- "default_value": "True",
- "doc": "If True, the control is displayed.
If False, the control is not displayed."
+ "name": "show_all",
+ "type": "bool",
+ "default_value": "False",
+ "doc": "For a paginated table, show all the rows."
},
{
- "name": "bypass_preview",
+ "name": "auto_loading",
"type": "bool",
- "default_value": "True",
- "doc": "If False, allows the browser to try to show the content in a different tab.
The file download is always performed."
+ "default_value": "False",
+ "doc": "If True, the data will be loaded on demand."
},
{
- "name": "name",
+ "name": "width[column_name]",
"type": "str",
- "doc": "A name proposition for the file to save, that the user can change."
- }
- ]
- }
- ],
- [
- "file_selector",
- {
- "inherits": [
- "active",
- "shared"
- ],
- "properties": [
+ "doc": "The width, in CSS units, of the indicated column."
+ },
{
- "name": "content",
- "default_property": true,
- "type": "dynamic(str)",
- "doc": "The path or the list of paths of the uploaded files."
+ "name": "selected",
+ "type": "list[int]|str",
+ "doc": "The list of the indices of the rows to be displayed as selected."
},
{
- "name": "label",
+ "name": "page_size_options",
+ "type": "list[int]|str",
+ "default_value": "[50, 100, 500]",
+ "doc": "The list of available page sizes that users can choose from."
+ },
+ {
+ "name": "columns",
+ "type": "str|list[str]|dict[str, dict[str, str|int]]",
+ "default_value": "shows all columns when empty",
+ "doc": "The list of the column names to display.\n\n- str: Semicolon (';')-separated list of column names.
\n- list[str]: The list of column names.
\n- dict: A dictionary with entries matching: {\"col name\": {format: \"format\", index: 1}}.
\nif index is specified, it represents the display order of the columns.\nIf index is not specified, the list order defines the index.
\nIf format is specified, it is used for numbers or dates. \n
"
+ },
+ {
+ "name": "date_format",
"type": "str",
- "doc": "The label of the button."
+ "default_value": "\"MM/dd/yyyy\"",
+ "doc": "The date format used for all date columns when the format is not specifically defined."
},
{
- "name": "on_action",
- "type": "Callback",
- "doc": "The name of the function that will be triggered.
All the parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (optional[str]): the identifier of the button.
\n- payload (dict): a dictionary that contains the key \"action\" set to the name of the action that triggered this callback.
\n
",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
+ "name": "number_format",
+ "type": "str",
+ "doc": "The number format used for all number columns when the format is not specifically defined."
},
{
- "name": "multiple",
+ "name": "group_by[column_name]",
"type": "bool",
"default_value": "False",
- "doc": "If set to True, multiple files can be uploaded."
+ "doc": "Indicates, if True, that the given column can be aggregated.
See below for details."
},
{
- "name": "extensions",
+ "name": "apply[column_name]",
"type": "str",
- "default_value": "\".csv,.xlsx\"",
- "doc": "The list of file extensions that can be uploaded."
+ "default_value": "\"first\"",
+ "doc": "The name of the aggregation function to use.
This is used only if group_by[column_name] is set to True.
See below for details."
},
{
- "name": "drop_message",
+ "name": "style",
"type": "str",
- "default_value": "\"Drop here to Upload\"",
- "doc": "The message that is displayed when the user drags a file above the button."
+ "doc": "Allows the styling of table lines.
See below for details."
},
{
- "name": "notify",
- "type": "bool",
- "default_value": "True",
- "doc": "If set to False, the user won't be notified of upload finish."
- }
- ]
- }
- ],
- [
- "image",
- {
- "inherits": [
- "active",
- "shared"
- ],
- "properties": [
- {
- "name": "content",
- "default_property": true,
- "type": "dynamic(path|URL|file|ReadableBuffer)",
- "doc": "The image source.
If a buffer is provided (string, array of bytes...), and in order to prevent the bandwidth to be consumed too much, the way the image data is transferred depends on the data_url_max_size parameter of the application configuration (which is set to 50kB by default):\n\n- If the size of the buffer is smaller than this setting, then the raw content is generated as a\n data URL, encoded using base64 (i.e.
\"data:<mimetype>;base64,<data>\"
). \n- If the size of the buffer is greater than this setting, then it is transferred through a temporary\n file.
\n
"
+ "name": "style[column_name]",
+ "type": "str",
+ "doc": "Allows the styling of table cells.
See below for details."
},
{
- "name": "label",
- "type": "dynamic(str)",
- "doc": "The label for this image."
+ "name": "tooltip",
+ "type": "str",
+ "doc": "The name of the function that must return a tooltip text for a cell.
See below for details."
},
{
- "name": "on_action",
+ "name": "tooltip[column_name]",
"type": "str",
- "doc": "The name of a function that is triggered when the user clicks on the image.
All the parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (optional[str]): the identifier of the button.
\n- payload (dict): a dictionary that contains the key \"action\" set to the name of the action that triggered this callback.
\n
",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
+ "doc": "The name of the function that must return a tooltip text for a cell.
See below for details."
},
{
"name": "width",
- "type": "str|int|float",
- "default_value": "\"300px\"",
- "doc": "The width, in CSS units, of this element."
+ "type": "str",
+ "default_value": "\"100%\"",
+ "doc": "The width, in CSS units, of this table control."
},
{
"name": "height",
- "type": "str|int|float",
- "doc": "The height, in CSS units, of this element."
- }
- ]
- }
- ],
- [
- "indicator",
- {
- "inherits": [
- "shared"
- ],
- "properties": [
- {
- "name": "display",
- "default_property": true,
- "type": "dynamic(any)",
- "doc": "The label to be displayed.
This can be formatted if it is a numerical value."
- },
- {
- "name": "value",
- "type": "dynamic(int,float)",
- "default_value": "min",
- "doc": "The location of the label on the [min, max] range."
+ "type": "str",
+ "default_value": "\"80vh\"",
+ "doc": "The height, in CSS units, of this table control."
},
{
- "name": "min",
- "type": "int|float",
- "default_value": "0",
- "doc": "The minimum value of the range."
+ "name": "filter",
+ "type": "bool",
+ "default_value": "False",
+ "doc": "Indicates, if True, that all columns can be filtered."
},
{
- "name": "max",
- "type": "int|float",
- "default_value": "100",
- "doc": "The maximum value of the range."
+ "name": "filter[column_name]",
+ "type": "bool",
+ "default_value": "False",
+ "doc": "Indicates, if True, that the indicated column can be filtered."
},
{
- "name": "format",
+ "name": "nan_value",
"type": "str",
- "doc": "The format to use when displaying the value.
This uses the printf
syntax."
+ "default_value": "\"\"",
+ "doc": "The replacement text for NaN (not-a-number) values."
},
{
- "name": "orientation",
+ "name": "nan_value[column_name]",
"type": "str",
- "default_value": "\"horizontal\"",
- "doc": "The orientation of this slider."
+ "default_value": "\"\"",
+ "doc": "The replacement text for NaN (not-a-number) values for the indicated column."
},
{
- "name": "width",
- "type": "str",
- "default_value": "None",
- "doc": "The width, in CSS units, of the indicator (used when orientation is horizontal)."
- },
- {
- "name": "height",
- "type": "str",
- "default_value": "None",
- "doc": "The height, in CSS units, of the indicator (used when orientation is vertical)."
- },
- {
- "name": "hover_text",
- "doc": "TODO not implemented",
- "hide": true
- }
- ]
- }
- ],
- [
- "metric",
- {
- "inherits": [
- "shared"
- ],
- "properties": [
- {
- "name": "value",
- "default_property": true,
- "type": "dynamic(int|float)",
- "doc": "The value to display."
- },
- {
- "name": "type",
- "default_value": "circular",
- "type": "str",
- "doc": "The type of the gauge.
Possible values are:\n\n- \"none\"
\n- \"circular\"
\n- \"linear\"
"
- },
- {
- "name": "min",
- "type": "int|float",
- "default_value": "0",
- "doc": "The minimum value of the metric indicator"
- },
- {
- "name": "max",
- "type": "int|float",
- "default_value": "100",
- "doc": "The maximum value of the metric indicator"
- },
- {
- "name": "delta",
- "type": "dynamic(int|float)",
- "doc": "The delta value to display."
- },
- {
- "name": "threshold",
- "type": "dynamic(int|float)",
- "doc": "The threshold value to display."
- },
- {
- "name": "show_value",
- "type": "bool",
- "default_value": "True",
- "doc": "If set to False, the value is not displayed."
- },
- {
- "name": "format",
- "type": "str",
- "doc": "The format to use when displaying the value.
This uses the printf
syntax."
- },
- {
- "name": "delta_format",
- "type": "str",
- "doc": "The format to use when displaying the delta value.
This uses the printf
syntax."
- },
- {
- "name": "width",
- "type": "str|number",
- "default_value": "None",
- "doc": "The width, in CSS units, of the metric."
- },
- {
- "name": "height",
- "type": "str|number",
- "default_value": "None",
- "doc": "The height, in CSS units, of the metric."
- },
- {
- "name": "template",
- "type": "dict",
- "doc": "The Plotly layout template."
- },
- {
- "name": "template[dark]",
- "type": "dict",
- "doc": "The Plotly layout template applied over the base template when theme is dark."
- },
- {
- "name": "template[light]",
- "type": "dict",
- "doc": "The Plotly layout template applied over the base template when theme is not dark."
- }
- ]
- }
- ],
- [
- "login",
- {
- "inherits": [
- "shared"
- ],
- "properties": [
- {
- "name": "title",
- "default_property": true,
- "type": "str",
- "default_value": "\"Log in\"",
- "doc": "The title of the login dialog."
- },
- {
- "name": "on_action",
- "type": "Callback",
- "doc": "The name of the function that is triggered when the dialog button is pressed.
All the parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (str): the identifier of the button.
\n- payload (dict): the details on this callback's invocation.
\nThis dictionary has the following keys:\n\n- action: the name of the action that triggered this callback.
\n- args: a list with three elements:
- The first element is the username
- The second element is the password
- The third element is the current page name
\n
\n\n
When the button is pressed, and if this property is not set, Taipy will try to find a callback function called on_login() and invoke it with the parameters listed above.",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
- },
- {
- "name": "message",
- "type": "dynamic(str)",
- "doc": "The message shown in the dialog."
- }
- ]
- }
- ],
- [
- "menu",
- {
- "inherits": [
- "active"
- ],
- "properties": [
- {
- "name": "lov",
- "default_property": true,
- "type": "dynamic(str|list[str|Icon|any])",
- "doc": "The list of menu option values."
- },
- {
- "name": "adapter",
- "type": "Function",
- "default_value": "`\"lambda x: str(x)\"`",
- "doc": "The function that transforms an element of lov into a tuple(id:str, label:str|Icon)."
- },
- {
- "name": "type",
- "type": "str",
- "default_value": "Type of the first lov element",
- "doc": "Must be specified if lov contains a non specific type of data (ex: dict).
value must be of that type, lov must be an iterable on this type, and the adapter function will receive an object of this type."
- },
- {
- "name": "label",
- "type": "str",
- "doc": "The title of the menu."
- },
- {
- "name": "width",
- "type": "str",
- "default_value": "\"15vw\"",
- "doc": "The width, in CSS units, of the menu when unfolded.
Note that when running on a mobile device, the property width[active] is used instead."
- },
- {
- "name": "width[mobile]",
- "type": "str",
- "default_value": "\"85vw\"",
- "doc": "The width, in CSS units, of the menu when unfolded, on a mobile device."
- },
- {
- "name": "on_action",
- "type": "Callback",
- "doc": "The name of the function that is triggered when a menu option is selected.
All the parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (str): the identifier of the button.
\n- payload (dict): the details on this callback's invocation.
\nThis dictionary has the following keys:\n\n- action: the name of the action that triggered this callback.
\n- args: List where the first element contains the id of the selected option.
\n
\n \n
",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
- }
- ]
- }
- ],
- [
- "navbar",
- {
- "inherits": [
- "active",
- "shared"
- ],
- "properties": [
- {
- "name": "lov",
- "default_property": true,
- "type": "dict[str, any]",
- "doc": "The list of pages. The keys should be:\n\n- page id (start with \"/\")
\n- or full URL
\n
\nThe values are labels. See the section on List of Values for details."
- }
- ]
- }
- ],
- [
- "selector",
- {
- "inherits": [
- "lovComp",
- "propagate"
- ],
- "properties": [
- {
- "name": "label",
- "type": "str",
- "default_value": "None",
- "doc": "The label associated with the selector when in dropdown mode."
- },
- {
- "name": "mode",
- "type": "str",
- "doc": "Define the way the selector is displayed:- "radio": list of radio buttons
- "check": list of check buttons
- any other value: selector as usual."
- },
- {
- "name": "dropdown",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the list of items is shown in a dropdown menu.
You cannot use the filter in that situation."
- },
- {
- "name": "multiple",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the user can select multiple items."
- },
- {
- "name": "filter",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, this control is combined with a filter input area."
- },
- {
- "name": "width",
- "type": "str|int",
- "default_value": "\"360px\"",
- "doc": "The width, in CSS units, of this element."
- },
- {
- "name": "height",
- "type": "str|int",
- "doc": "The height, in CSS units, of this element."
- }
- ]
- }
- ],
- [
- "status",
- {
- "inherits": [
- "shared"
- ],
- "properties": [
- {
- "name": "value",
- "default_property": true,
- "type": "tuple|dict|list[dict]|list[tuple]",
- "doc": "The different status items to represent. See below."
- },
- {
- "name": "without_close",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the user cannot remove the status items from the list."
- }
- ]
- }
- ],
- [
- "table",
- {
- "inherits": [
- "active",
- "shared"
- ],
- "properties": [
- {
- "name": "data",
- "default_property": true,
- "required": true,
- "type": "dynamic(any)",
- "doc": "The data to be represented in this table. This property can be indexed to define other data for comparison."
- },
- {
- "name": "page_size",
- "type": "int",
- "default_value": "100",
- "doc": "For a paginated table, the number of visible rows."
- },
- {
- "name": "allow_all_rows",
- "type": "bool",
- "default_value": "False",
- "doc": "For a paginated table, adds an option to show all the rows."
- },
- {
- "name": "show_all",
- "type": "bool",
- "default_value": "False",
- "doc": "For a paginated table, show all the rows."
- },
- {
- "name": "auto_loading",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the data will be loaded on demand."
- },
- {
- "name": "width[column_name]",
- "type": "str",
- "doc": "The width, in CSS units, of the indicated column."
- },
- {
- "name": "selected",
- "type": "list[int]|str",
- "doc": "The list of the indices of the rows to be displayed as selected."
- },
- {
- "name": "page_size_options",
- "type": "list[int]|str",
- "default_value": "[50, 100, 500]",
- "doc": "The list of available page sizes that users can choose from."
- },
- {
- "name": "columns",
- "type": "str|list[str]|dict[str, dict[str, str|int]]",
- "default_value": "shows all columns when empty",
- "doc": "The list of the column names to display.\n\n- str: Semicolon (';')-separated list of column names.
\n- list[str]: The list of column names.
\n- dict: A dictionary with entries matching: {\"col name\": {format: \"format\", index: 1}}.
\nif index is specified, it represents the display order of the columns.\nIf index is not specified, the list order defines the index.
\nIf format is specified, it is used for numbers or dates. \n
"
- },
- {
- "name": "date_format",
- "type": "str",
- "default_value": "\"MM/dd/yyyy\"",
- "doc": "The date format used for all date columns when the format is not specifically defined."
- },
- {
- "name": "number_format",
- "type": "str",
- "doc": "The number format used for all number columns when the format is not specifically defined."
- },
- {
- "name": "group_by[column_name]",
- "type": "bool",
- "default_value": "False",
- "doc": "Indicates, if True, that the given column can be aggregated.
See below for details."
- },
- {
- "name": "apply[column_name]",
- "type": "str",
- "default_value": "\"first\"",
- "doc": "The name of the aggregation function to use.
This is used only if group_by[column_name] is set to True.
See below for details."
- },
- {
- "name": "style",
- "type": "str",
- "doc": "Allows the styling of table lines.
See below for details."
- },
- {
- "name": "style[column_name]",
- "type": "str",
- "doc": "Allows the styling of table cells.
See below for details."
- },
- {
- "name": "tooltip",
- "type": "str",
- "doc": "The name of the function that must return a tooltip text for a cell.
See below for details."
- },
- {
- "name": "tooltip[column_name]",
- "type": "str",
- "doc": "The name of the function that must return a tooltip text for a cell.
See below for details."
- },
- {
- "name": "width",
- "type": "str",
- "default_value": "\"100%\"",
- "doc": "The width, in CSS units, of this table control."
- },
- {
- "name": "height",
- "type": "str",
- "default_value": "\"80vh\"",
- "doc": "The height, in CSS units, of this table control."
- },
- {
- "name": "filter",
- "type": "bool",
- "default_value": "False",
- "doc": "Indicates, if True, that all columns can be filtered."
- },
- {
- "name": "filter[column_name]",
- "type": "bool",
- "default_value": "False",
- "doc": "Indicates, if True, that the indicated column can be filtered."
- },
- {
- "name": "nan_value",
- "type": "str",
- "default_value": "\"\"",
- "doc": "The replacement text for NaN (not-a-number) values."
- },
- {
- "name": "nan_value[column_name]",
- "type": "str",
- "default_value": "\"\"",
- "doc": "The replacement text for NaN (not-a-number) values for the indicated column."
- },
- {
- "name": "editable",
- "type": "dynamic(bool)",
- "default_value": "True",
- "doc": "Indicates, if True, that all columns can be edited."
- },
- {
- "name": "editable[column_name]",
- "type": "bool",
- "default_value": "editable",
- "doc": "Indicates, if False, that the indicated column cannot be edited when editable is True."
- },
- {
- "name": "on_edit",
- "type": "Callback",
- "doc": "The name of a function that is triggered when a cell edition is validated.
All parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- var_name (str): the name of the tabular data variable.
\n- payload (dict): the details on this callback's invocation.
\nThis dictionary has the following keys:\n\n- index (int): the row index.
\n- col (str): the column name.
\n- value (any): the new cell value cast to the type of the column.
\n- user_value (str): the new cell value, as it was provided by the user.
\n- tz (str): the timezone if the column type is date.
\n
\n \n
If this property is not set, the user cannot edit cells.",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "var_name",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
- },
- {
- "name": "on_delete",
- "type": "str",
- "doc": "The name of a function that is triggered when a row is deleted.
All parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- var_name (str): the name of the tabular data variable.
\n- payload (dict): the details on this callback's invocation.
\nThis dictionary has the following keys:\n\n- index (int): the row index.
\n
\n \n
If this property is not set, the user cannot delete rows.",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "var_name",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
- },
- {
- "name": "on_add",
- "type": "str",
- "doc": "The name of a function that is triggered when the user requests a row to be added.
All parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- var_name (str): the name of the tabular data variable.
\n- payload (dict): the details on this callback's invocation.
This dictionary has the following keys:\n\n- index (int): the row index.
\n
\n \n
If this property is not set, the user cannot add rows.",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "var_name",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
- },
- {
- "name": "on_action",
- "type": "str",
- "doc": "The name of a function that is triggered when the user selects a row.
All parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- var_name (str): the name of the tabular data variable.
\n- payload (dict): the details on this callback's invocation.
This dictionary has the following keys:\n\n- action: the name of the action that triggered this callback.
\n- index (int): the row index.
\n- col (str): the column name.
\n- reason (str): the origin of the action: \"click\", or \"button\" if the cell contains a Markdown link syntax.
\n- value (str): the *link value* indicated in the cell when using a Markdown link syntax (that is, reason is set to \"button\").
.",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "var_name",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
- },
- {
- "name": "size",
- "type": "str",
- "default_value": "\"small\"",
- "doc": "The size of the rows.
Valid values are \"small\" and \"medium\"."
- },
- {
- "name": "rebuild",
- "type": "dynamic(bool)",
- "default_value": "False",
- "doc": "If set to True, this allows to dynamically refresh the columns."
- },
- {
- "name": "lov[column_name]",
- "type": "list[str]|str",
- "doc": "The list of values of the indicated column."
- },
- {
- "name": "downloadable",
- "type": "boolean",
- "doc": "If True, a clickable icon is shown so the user can download the data as CSV."
- },
- {
- "name": "on_compare",
- "type": "str",
- "doc": "A data comparison function that would return a structure that identifies the differences between the different data passed as name. The default implementation compares the default data with the data[1] value.",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "main_data_name",
- "str"
- ],
- [
- "compare_data_names",
- "list[str]"
- ]
- ]
- }
- ]
- }
- ],
- [
- "dialog",
- {
- "inherits": [
- "partial",
- "active",
- "shared"
- ],
- "properties": [
- {
- "name": "open",
- "default_property": true,
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the dialog is visible. If False, it is hidden."
- },
- {
- "name": "on_action",
- "type": "Callback",
- "doc": "Name of a function triggered when a button is pressed.
The parameters of that function are all optional:\n\n- state (
State^
): the state instance. \n- id (str): the identifier of the dialog.
\n- payload (dict): the details on this callback's invocation.
This dictionary has the following keys:\n\n- action: the name of the action that triggered this callback.
\n- args: a list where the first element contains the index of the selected label.
\n
\n \n
",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
- },
- {
- "name": "close_label",
- "type": "str",
- "default_value": "\"Close\"",
- "doc": "The tooltip of the top-right close icon button. In the on_action function, args will hold -1."
- },
- {
- "name": "labels",
- "type": " str|list[str]",
- "doc": "A list of labels to show in a row of buttons at the bottom of the dialog. The index of the button in the list is reported as args in the on_action function (-1 for the close icon)."
- },
- {
- "name": "width",
- "type": "str|int|float",
- "doc": "The width, in CSS units, of this dialog.
(CSS property)"
- },
- {
- "name": "height",
- "type": "str|int|float",
- "doc": "The height, in CSS units, of this dialog.
(CSS property)"
- }
- ]
- }
- ],
- [
- "tree",
- {
- "inherits": [
- "selector"
- ],
- "properties": [
- {
- "name": "expanded",
- "type": "dynamic(bool|str[])",
- "default_value": "True",
- "doc": "If Boolean and False, only one node can be expanded at one given level. Otherwise this should be set to an array of the node identifiers that need to be expanded."
- },
- {
- "name": "multiple",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the user can select multiple items by holding the Ctrl
key while clicking on items."
- },
- {
- "name": "select_leafs_only",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the user can only select leaf nodes."
- },
- {
- "name": "row_height",
- "type": "str",
- "doc": "The height, in CSS units, of each row."
- }
- ]
- }
- ]
- ],
- "blocks": [
- [
- "part",
- {
- "inherits": [
- "partial",
- "shared"
- ],
- "properties": [
- {
- "name": "render",
- "type": "dynamic(bool)",
- "default_value": "True",
- "doc": "If True, this part is visible on the page.
If False, the part is hidden and its content is not displayed."
- },
- {
- "name": "class_name",
- "default_property": true,
- "type": "dynamic(str)",
- "doc": "A list of CSS class names, separated by white spaces, that will be associated with the generated HTML Element.
These class names are added to the default taipy-part
."
- },
- {
- "name": "page",
- "type": "dynamic(str)",
- "doc": "The page to show as the content of the block (page name if defined or a URL in an iframe).
This should not be defined if partial is set."
- },
- {
- "name": "height",
- "type": "dynamic(str)",
- "doc": "The height, in CSS units, of this block."
- },
- {
- "name": "content",
- "type": "dynamic(any)",
- "doc": "The content provided to the part. See the documentation section on content providers."
- }
- ]
- }
- ],
- [
- "expandable",
- {
- "inherits": [
- "partial",
- "shared",
- "on_change"
- ],
- "properties": [
- {
- "name": "title",
- "default_property": true,
- "type": "dynamic(str)",
- "doc": "Title of this block element."
- },
- {
- "name": "expanded",
- "type": "dynamic(bool)",
- "default_value": "True",
- "doc": "If True, the block is expanded, and the content is displayed.
If False, the block is collapsed and its content is hidden."
- }
- ]
- }
- ],
- [
- "layout",
- {
- "inherits": [
- "shared"
- ],
- "properties": [
- {
- "name": "columns",
- "default_property": true,
- "type": "str",
- "default_value": "\"1 1\"",
- "doc": "The list of weights for each column.
For example, `\"1 2\"` creates a 2 column grid:\n
The creation of multiple same size columns can be simplified by using the multiply sign eg. \"5*1\" is equivalent to \"1 1 1 1 1\"."
- },
- {
- "name": "columns[mobile]",
- "type": "str",
- "default_value": "\"1\"",
- "doc": "The list of weights for each column, when displayed on a mobile device.
The syntax is the same as for columns."
- },
- {
- "name": "gap",
- "type": "str",
- "default_value": "\"0.5rem\"",
- "doc": "The size of the gap between the columns."
- }
- ]
- }
- ],
- [
- "pane",
- {
- "inherits": [
- "partial",
- "on_change",
- "active",
- "shared"
- ],
- "properties": [
- {
- "name": "open",
- "default_property": true,
- "type": "dynamic(bool)",
- "default_value": "False",
- "doc": "If True, this pane is visible on the page.
If False, the pane is hidden."
- },
- {
- "name": "on_close",
- "type": "Callback",
- "doc": "The name of a function that is triggered when this pane is closed (if the user clicks outside of it or presses the Esc key).
All parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (optional[str]): the identifier of the button.
\n
If this property is not set, no function is called when this pane is closed.",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ]
- ]
- },
- {
- "name": "anchor",
- "type": "str",
- "default_value": "\"left\"",
- "doc": "Anchor side of the pane.
Valid values are \"left\", \"right\", \"top\", or \"bottom\"."
- },
- {
- "name": "width",
- "type": "str",
- "default_value": "\"30vw\"",
- "doc": "Width, in CSS units, of this pane.
This is used only if anchor is \"left\" or \"right\"."
- },
- {
- "name": "height",
- "type": "str",
- "default_value": "\"30vh\"",
- "doc": "Height, in CSS units, of this pane.
This is used only if anchor is \"top\" or \"bottom\"."
- },
- {
- "name": "persistent",
- "type": "bool",
- "default_value": "False",
- "doc": "If False, the pane covers the page where it appeared and disappears if the user clicks in the page.
If True, the pane appears next to the page. Note that the parent section of the pane must have the flex display mode set. See below for an example using the persistent
property."
- }
- ]
- }
- ]
- ],
- "undocumented": [
- [
- "active",
- {
- "properties": [
- {
- "name": "active",
- "type": "dynamic(bool)",
- "default_value": "True",
- "doc": "Indicates if this component is active.
An inactive component allows no user interaction."
- }
- ]
- }
- ],
- [
- "lovComp",
- {
- "inherits": [
- "on_change"
- ],
- "properties": [
- {
- "name": "value",
- "default_property": true,
- "type": "dynamic(any)",
- "doc": "Bound to the selection value."
- },
- {
- "name": "lov",
- "type": "dict[str, any]",
- "doc": "The list of values. See the section on List of Values for details."
- },
- {
- "name": "adapter",
- "type": "Function",
- "default_value": "`lambda x: str(x)`",
- "doc": "The function that transforms an element of lov into a tuple(id:str, label:str|Icon)."
- },
- {
- "name": "type",
- "type": "str",
- "default_value": "Type of first lov element",
- "doc": "Must be specified if lov contains a non-specific type of data (ex: dict).
value must be of that type, lov must be an iterable on this type, and the adapter function will receive an object of this type."
- },
- {
- "name": "value_by_id",
- "type": "bool",
- "default_value": "False",
- "doc": "If False, the selection value (in value) is the selected element in lov. If set to True, then value is set to the id of the selected element in lov."
- }
- ]
- }
- ],
- [
- "on_change",
- {
- "properties": [
- {
- "name": "on_change",
- "type": "Callback",
- "doc": "The name of a function that is triggered when the value is updated.
The parameters of that function are all optional:\n\n- state (
State^
): the state instance. \n- var_name (str): the variable name.
\n- value (any): the new value.
\n
",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "var_name",
- "str"
- ],
- [
- "value",
- ""
- ]
- ]
- }
- ]
- }
- ],
- [
- "partial",
- {
- "properties": [
- {
- "name": "partial",
- "type": "Partial",
- "doc": "A Partial object that holds the content of the block.
This should not be defined if page is set."
- },
- {
- "name": "page",
- "type": "str",
- "doc": "The page name to show as the content of the block.
This should not be defined if partial is set."
- }
- ]
- }
- ],
- [
- "propagate",
- {
- "inherits": [
- "active",
- "shared"
- ],
- "properties": [
- {
- "name": "propagate",
- "type": "bool",
- "default_value": "App config",
- "doc": "Allows the control's main value to be automatically propagated.
The default value is defined at the application configuration level.
If True, any change to the control's value is immediately reflected in the bound application variable."
- }
- ]
- }
- ],
- [
- "sharedInput",
- {
- "properties": [
- {
- "name": "change_delay",
- "type": "int",
- "default_value": "App config",
- "doc": "Minimum time between triggering two calls to the on_change callback.
The default value is defined at the application configuration level by the change_delay configuration option. if None, the delay is set to 300 ms.
If set to -1, the input change is triggered only when the user presses the Enter key."
- },
- {
- "name": "on_action",
- "type": "Callback",
- "doc": "Name of a function that is triggered when a specific key is pressed.
The parameters of that function are all optional:\n\n- state (
State^
): the state instance. \n- id (str): the identifier of the input.
\n- payload (dict): the details on this callback's invocation.
\nThis dictionary has the following keys:\n\n- action: the name of the action that triggered this callback.
\n- args (list):\n
- key name
- variable name
- current value
\n \n
\n \n
",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
- },
- {
- "name": "action_keys",
- "type": "str",
- "default_value": "\"Enter\"",
- "doc": "Semicolon (';')-separated list of supported key names.
Authorized values are Enter, Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12."
- }
- ]
- }
- ],
- [
- "shared",
- {
- "properties": [
- {
- "name": "id",
- "type": "str",
- "doc": "The identifier that will be assigned to the rendered HTML component."
- },
- {
- "name": "properties",
- "type": "dict[str, any]",
- "doc": "Bound to a dictionary that contains additional properties for this element."
- },
- {
- "name": "class_name",
- "type": "dynamic(str)",
- "doc": "The list of CSS class names that will be associated with the generated HTML Element.
These class names will be added to the default taipy-<element_type>
."
- },
- {
- "name": "hover_text",
- "type": "dynamic(str)",
- "doc": "The information that is displayed when the user hovers over this element."
- }
- ]
- }
- ]
- ],
- "controls": [
- [
- "text",
- {
- "inherits": [
- "shared"
- ],
- "properties": [
- {
- "name": "value",
- "default_property": true,
- "type": "dynamic(any)",
- "default_value": "\"\"",
- "doc": "The value displayed as text by this control."
- },
- {
- "name": "raw",
- "type": "bool",
- "default_value": "False",
- "doc": "If set to True, the component renders as an HTML <span> element without any default style."
- },
- {
- "name": "mode",
- "type": "str",
- "doc": "Define the way the text is processed:- "raw": synonym for setting the *raw* property to True
- "pre": keeps spaces and new lines
- "markdown" or "md": basic support for Markdown."
- },
- {
- "name": "format",
- "type": "str",
- "doc": "The format to apply to the value.
See below."
- }
- ]
- }
- ],
- [
- "button",
- {
- "inherits": [
- "active",
- "shared"
- ],
- "properties": [
- {
- "name": "label",
- "default_property": true,
- "type": "dynamic(str|Icon)",
- "default_value": "\"\"",
- "doc": "The label displayed in the button."
- },
- {
- "name": "on_action",
- "type": "Callback",
- "doc": "The name of a function that is triggered when the button is pressed.
The parameters of that function are all optional:\n\n- state (
State^
): the state instance. \n- id (optional[str]): the identifier of the button.
\n- payload (dict): a dictionary that contains the key \"action\" set to the name of the action that triggered this callback.
\n
",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
- }
- ]
- }
- ],
- [
- "input",
- {
- "inherits": [
- "sharedInput",
- "on_change",
- "propagate"
- ],
- "properties": [
- {
- "name": "value",
- "default_property": true,
- "type": "dynamic(any)",
- "default_value": "None",
- "doc": "The value represented by this control."
- },
- {
- "name": "password",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the text is obscured: all input characters are displayed as an asterisk ('*')."
- },
- {
- "name": "label",
- "type": "str",
- "default_value": "None",
- "doc": "The label associated with the input."
- },
- {
- "name": "multiline",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the text is presented as a multi line input."
- },
- {
- "name": "lines_shown",
- "type": "int",
- "default_value": "5",
- "doc": "The height of the displayed element if multiline is True."
- }
- ]
- }
- ],
- [
- "slider",
- {
- "inherits": [
- "lovComp",
- "propagate"
- ],
- "properties": [
- {
- "name": "value",
- "default_property": true,
- "type": "dynamic(int|float|int[]|float[]|str|str[])",
- "doc": "The value that is set for this slider.
If this slider is based on a lov then this property can be set to the lov element.
This value can also hold an array of numbers to indicate that the slider reflects a range (within the [min,max] domain) defined by several knobs that the user can set independently.
If this slider is based on a lov then this property can be set to an array of lov elements. The slider is then represented with several knobs, one for each lov value."
- },
- {
- "name": "min",
- "type": "int|float",
- "default_value": "0",
- "doc": "The minimum value.
This is ignored when lov is defined."
- },
- {
- "name": "max",
- "type": "int|float",
- "default_value": "100",
- "doc": "The maximum value.
This is ignored when lov is defined."
- },
- {
- "name": "step",
- "type": "int|float",
- "default_value": "1",
- "doc": "The step value: the gap between two consecutive values the slider set. It is a good practice to have (max-min) being divisible by step.
This property is ignored when lov is defined."
- },
- {
- "name": "text_anchor",
- "type": "str",
- "default_value": "\"bottom\"",
- "doc": "When the lov property is used, this property indicates the location of the label.
Possible values are:\n\n- \"bottom\"
\n- \"top\"
\n- \"left\"
\n- \"right\"
\n- \"none\" (no label is displayed)
\n
"
- },
- {
- "name": "labels",
- "type": "bool|dict",
- "doc": "The labels for specific points of the slider.
If set to True, this slider uses the labels of the lov if there are any.
If set to a dictionary, the slider uses the dictionary keys as a lov key or index, and the associated value as the label."
- },
- {
- "name": "continuous",
- "type": "bool",
- "default_value": "True",
- "doc": "If set to False, the control emits an on_change notification only when the mouse button is released, otherwise notifications are emitted during the cursor movements.
If lov is defined, the default value is False."
- },
- {
- "name": "change_delay",
- "type": "int",
- "default_value": "App config",
- "doc": "Minimum time between triggering two on_change calls.
The default value is defined at the application configuration level by the change_delay configuration option. if None or 0, there's no delay."
- },
- {
- "name": "width",
- "type": "str",
- "default_value": "\"300px\"",
- "doc": "The width, in CSS units, of this element."
- },
- {
- "name": "height",
- "type": "str",
- "doc": "The height, in CSS units, of this element.
It defaults to the width value when using the vertical orientation."
- },
- {
- "name": "orientation",
- "type": "str",
- "default_value": "\"horizontal\"",
- "doc": "The orientation of this slider.
Valid values are \"horizontal\" or \"vertical\"."
- }
- ]
- }
- ],
- [
- "number",
- {
- "inherits": [
- "sharedInput",
- "on_change",
- "propagate"
- ],
- "properties": [
- {
- "name": "value",
- "default_property": true,
- "type": "dynamic(any)",
- "doc": "The numerical value represented by this control."
- },
- {
- "name": "label",
- "type": "str",
- "default_value": "None",
- "doc": "The label associated with the input."
- }
- ]
- }
- ],
- [
- "toggle",
- {
- "inherits": [
- "lovComp",
- "propagate"
- ],
- "properties": [
- {
- "name": "value"
- },
- {
- "name": "theme",
- "type": "bool",
- "default_value": "False",
- "doc": "If set, this toggle control acts as a way to set the application Theme (dark or light)."
- },
- {
- "name": "allow_unselect",
- "type": "bool",
- "default_value": "False",
- "doc": "If set, this allows de-selection and the value is set to unselected_value."
- },
- {
- "name": "unselected_value",
- "type": "any",
- "default_value": "None",
- "doc": "Value assigned to value when no item is selected."
- },
- {
- "name": "mode",
- "type": "str",
- "doc": "Define the way the toggle is displayed:- "theme": synonym for setting the *theme* property to True
"
- }
- ]
- }
- ],
- [
- "date",
- {
- "inherits": [
- "on_change",
- "propagate"
- ],
- "properties": [
- {
- "name": "date",
- "default_property": true,
- "type": "dynamic(datetime)",
- "doc": "The date that this control represents and can modify.
It is typically bound to a datetime
object."
- },
- {
- "name": "with_time",
- "type": "bool",
- "default_value": "False",
- "doc": "Whether or not to show the time part of the date."
- },
- {
- "name": "format",
- "type": "str",
- "doc": "The format to apply to the value. See below."
- },
- {
- "name": "editable",
- "type": "dynamic(bool)",
- "default_value": "True",
- "doc": "Shows the date as a formatted string if not editable."
- },
- {
- "name": "label",
- "type": "str",
- "doc": "The label associated with the input."
- }
- ]
- }
- ],
- [
- "date_range",
- {
- "inherits": [
- "on_change",
- "propagate"
- ],
- "properties": [
- {
- "name": "dates",
- "default_property": true,
- "type": "dynamic(list(datetime))",
- "doc": "The dates that this control represents and can modify.
It is typically bound to a list of two datetime
object."
- },
- {
- "name": "with_time",
- "type": "bool",
- "default_value": "False",
- "doc": "Whether or not to show the time part of the date."
- },
- {
- "name": "format",
- "type": "str",
- "doc": "The format to apply to the value. See below."
- },
- {
- "name": "editable",
- "type": "dynamic(bool)",
- "default_value": "True",
- "doc": "Shows the date as a formatted string if not editable."
- },
- {
- "name": "label_start",
- "type": "str",
- "doc": "The label associated with the first input."
- },
- {
- "name": "label_end",
- "type": "str",
- "doc": "The label associated with the second input."
- }
- ]
- }
- ],
- [
- "chart",
- {
- "inherits": [
- "on_change",
- "propagate"
- ],
- "properties": [
- {
- "name": "data",
- "default_property": true,
- "required": true,
- "type": "dynamic(any)",
- "doc": "The data object bound to this chart control.
See the section on the data property below for details."
- },
- {
- "name": "type",
- "type": "indexed(str)",
- "default_value": "scatter",
- "doc": "Chart type.
See the Plotly chart type documentation for details."
- },
- {
- "name": "mode",
- "type": "indexed(str)",
- "default_value": "lines+markers",
- "doc": "Chart mode.
See the Plotly chart mode documentation for details."
- },
- {
- "name": "x",
- "type": "indexed(str)",
- "doc": "Column name for the x axis."
- },
- {
- "name": "y",
- "type": "indexed(str)",
- "doc": "Column name for the y axis."
- },
- {
- "name": "z",
- "type": "indexed(str)",
- "doc": "Column name for the z axis."
- },
- {
- "name": "lon",
- "type": "indexed(str)",
- "doc": "Column name for the longitude value, for 'scattergeo' charts. See Plotly Map traces."
- },
- {
- "name": "lat",
- "type": "indexed(str)",
- "doc": "Column name for the latitude value, for 'scattergeo' charts. See Plotly Map traces."
- },
- {
- "name": "r",
- "type": "indexed(str)",
- "doc": "Column name for the r value, for 'scatterpolar' charts. See Plotly Polar charts."
- },
- {
- "name": "theta",
- "type": "indexed(str)",
- "doc": "Column name for the theta value, for 'scatterpolar' charts. See Plotly Polar charts."
- },
- {
- "name": "high",
- "type": "indexed(str)",
- "doc": "Column name for the high value, for 'candlestick' charts. See Plotly Candlestick charts."
- },
- {
- "name": "low",
- "type": "indexed(str)",
- "doc": "Column name for the low value, for 'candlestick' charts. See Ploty Candlestick charts."
- },
- {
- "name": "open",
- "type": "indexed(str)",
- "doc": "Column name for the open value, for 'candlestick' charts. See Plotly Candlestick charts."
- },
- {
- "name": "close",
- "type": "indexed(str)",
- "doc": "Column name for the close value, for 'candlestick' charts. See Plotly Candlestick charts."
- },
- {
- "name": "measure",
- "type": "indexed(str)",
- "doc": "Column name for the measure value, for 'waterfall' charts. See Plotly Waterfall charts."
- },
- {
- "name": "locations",
- "type": "indexed(str)",
- "doc": "Column name for the locations value. See Plotly Choropleth maps."
- },
- {
- "name": "values",
- "type": "indexed(str)",
- "doc": "Column name for the values value. See Plotly Pie charts or Plotly Funnel Area charts."
- },
- {
- "name": "labels",
- "type": "indexed(str)",
- "doc": "Column name for the labels value. See Plotly Pie charts."
- },
- {
- "name": "parents",
- "type": "indexed(str)",
- "doc": "Column name for the parents value. See Plotly Treemap charts."
- },
- {
- "name": "text",
- "type": "indexed(str)",
- "doc": "Column name for the text associated to the point for the indicated trace.
This is meaningful only when mode has the text option."
- },
- {
- "name": "base",
- "type": "indexed(str)",
- "doc": "Column name for the base value. Used in bar charts only.
See the Plotly bar chart base documentation for details.\""
- },
- {
- "name": "title",
- "type": "str",
- "doc": "The title of this chart control."
- },
- {
- "name": "render",
- "type": "dynamic(bool)",
- "default_value": "True",
- "doc": "If True, this chart is visible on the page."
- },
- {
- "name": "on_range_change",
- "type": "Callback",
- "doc": "The callback function that is invoked when the visible part of the x axis changes.
The function receives three parameters:\n\n- state (
State^
): the state instance. \n- id (optional[str]): the identifier of the chart control.
\n- payload (dict[str, any]): the full details on this callback's invocation, as emitted by Plotly.
\n
",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
- },
- {
- "name": "columns",
- "type": "str|list[str]|dict[str, dict[str, str]]",
- "default_value": "All columns",
- "doc": "The list of column names\n\n- str: ;-separated list of column names
\n- list[str]: list of names
\n- dict: {\"column_name\": {format: \"format\", index: 1}} if index is specified, it represents the display order of the columns.\nIf not, the list order defines the index
\n
"
- },
- {
- "name": "label",
- "type": "indexed(str)",
- "doc": "The label for the indicated trace.
This is used when the mouse hovers over a trace."
- },
- {
- "name": "name",
- "type": "indexed(str)",
- "doc": "The name of the indicated trace."
- },
- {
- "name": "selected",
- "type": "indexed(dynamic(list[int]|str))",
- "doc": "The list of the selected point indices ."
- },
- {
- "name": "color",
- "type": "indexed(str)",
- "doc": "The color of the indicated trace (or a column name for scattered)."
- },
- {
- "name": "selected_color",
- "type": "indexed(str)",
- "doc": "The color of the selected points for the indicated trace."
- },
- {
- "name": "marker",
- "type": "indexed(dict[str, any])",
- "doc": "The type of markers used for the indicated trace.
See marker for details.
Color, opacity, size and symbol can be column name."
- },
- {
- "name": "line",
- "type": "indexed(str|dict[str, any])",
- "doc": "The configuration of the line used for the indicated trace.
See line for details.
If the value is a string, it must be a dash type or pattern (see dash style of lines for details)."
- },
- {
- "name": "selected_marker",
- "type": "indexed(dict[str, any])",
- "doc": "The type of markers used for selected points in the indicated trace.
See selected marker for details."
- },
- {
- "name": "layout",
- "type": "dynamic(dict[str, any])",
- "doc": "The plotly.js compatible layout object."
- },
- {
- "name": "plot_config",
- "type": "dict[str, any]",
- "doc": "The plotly.js compatible configuration options object."
- },
- {
- "name": "options",
- "type": "indexed(dict[str, any])",
- "doc": "The plotly.js compatible data object where dynamic data will be overridden.."
- },
- {
- "name": "orientation",
- "type": "indexed(str)",
- "doc": "The orientation of the indicated trace."
- },
- {
- "name": "text_anchor",
- "type": "indexed(str)",
- "doc": "Position of the text relative to the point.
Valid values are: top, bottom, left, and right."
- },
- {
- "name": "xaxis",
- "type": "indexed(str)",
- "doc": "The x axis identifier for the indicated trace."
- },
- {
- "name": "yaxis",
- "type": "indexed(str)",
- "doc": "The y axis identifier for the indicated trace."
- },
- {
- "name": "width",
- "type": "str|int|float",
- "default_value": "\"100%\"",
- "doc": "The width, in CSS units, of this element."
- },
- {
- "name": "height",
- "type": "str|int|float",
- "doc": "The height, in CSS units, of this element."
- },
- {
- "name": "template",
- "type": "dict",
- "doc": "The Plotly layout template."
- },
- {
- "name": "template[dark]",
- "type": "dict",
- "doc": "The Plotly layout template applied over the base template when theme is dark."
- },
- {
- "name": "template[light]",
- "type": "dict",
- "doc": "The Plotly layout template applied over the base template when theme is not dark."
- },
- {
- "name": "decimator",
- "type": "indexed(taipy.gui.data.Decimator)",
- "doc": "A decimator instance for the indicated trace that will reduce the size of the data being sent back and forth.
If defined as indexed, it will impact only the indicated trace; if not, it will apply only the first trace."
- },
- {
- "name": "rebuild",
- "type": "dynamic(bool)",
- "default_value": "False",
- "doc": "Allows dynamic config refresh if set to True."
- },
- {
- "name": "figure",
- "type": "dynamic(plotly.graph_objects.Figure)",
- "doc": "A figure as produced by plotly."
- }
- ]
- }
- ],
- [
- "table",
- {
- "inherits": [
- "active",
- "shared"
- ],
- "properties": [
- {
- "name": "data",
- "default_property": true,
- "required": true,
- "type": "dynamic(any)",
- "doc": "The data to be represented in this table. This property can be indexed to define other data for comparison."
- },
- {
- "name": "page_size",
- "type": "int",
- "default_value": "100",
- "doc": "For a paginated table, the number of visible rows."
- },
- {
- "name": "allow_all_rows",
- "type": "bool",
- "default_value": "False",
- "doc": "For a paginated table, adds an option to show all the rows."
- },
- {
- "name": "show_all",
- "type": "bool",
- "default_value": "False",
- "doc": "For a paginated table, show all the rows."
- },
- {
- "name": "auto_loading",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the data will be loaded on demand."
- },
- {
- "name": "width[column_name]",
- "type": "str",
- "doc": "The width, in CSS units, of the indicated column."
- },
- {
- "name": "selected",
- "type": "list[int]|str",
- "doc": "The list of the indices of the rows to be displayed as selected."
- },
- {
- "name": "page_size_options",
- "type": "list[int]|str",
- "default_value": "[50, 100, 500]",
- "doc": "The list of available page sizes that users can choose from."
- },
- {
- "name": "columns",
- "type": "str|list[str]|dict[str, dict[str, str|int]]",
- "default_value": "shows all columns when empty",
- "doc": "The list of the column names to display.\n\n- str: Semicolon (';')-separated list of column names.
\n- list[str]: The list of column names.
\n- dict: A dictionary with entries matching: {\"col name\": {format: \"format\", index: 1}}.
\nif index is specified, it represents the display order of the columns.\nIf index is not specified, the list order defines the index.
\nIf format is specified, it is used for numbers or dates. \n
"
- },
- {
- "name": "date_format",
- "type": "str",
- "default_value": "\"MM/dd/yyyy\"",
- "doc": "The date format used for all date columns when the format is not specifically defined."
- },
- {
- "name": "number_format",
- "type": "str",
- "doc": "The number format used for all number columns when the format is not specifically defined."
- },
- {
- "name": "group_by[column_name]",
- "type": "bool",
- "default_value": "False",
- "doc": "Indicates, if True, that the given column can be aggregated.
See below for details."
- },
- {
- "name": "apply[column_name]",
- "type": "str",
- "default_value": "\"first\"",
- "doc": "The name of the aggregation function to use.
This is used only if group_by[column_name] is set to True.
See below for details."
- },
- {
- "name": "style",
- "type": "str",
- "doc": "Allows the styling of table lines.
See below for details."
- },
- {
- "name": "style[column_name]",
- "type": "str",
- "doc": "Allows the styling of table cells.
See below for details."
- },
- {
- "name": "tooltip",
- "type": "str",
- "doc": "The name of the function that must return a tooltip text for a cell.
See below for details."
- },
- {
- "name": "tooltip[column_name]",
- "type": "str",
- "doc": "The name of the function that must return a tooltip text for a cell.
See below for details."
- },
- {
- "name": "width",
- "type": "str",
- "default_value": "\"100%\"",
- "doc": "The width, in CSS units, of this table control."
- },
- {
- "name": "height",
- "type": "str",
- "default_value": "\"80vh\"",
- "doc": "The height, in CSS units, of this table control."
- },
- {
- "name": "filter",
- "type": "bool",
- "default_value": "False",
- "doc": "Indicates, if True, that all columns can be filtered."
- },
- {
- "name": "filter[column_name]",
- "type": "bool",
- "default_value": "False",
- "doc": "Indicates, if True, that the indicated column can be filtered."
- },
- {
- "name": "nan_value",
- "type": "str",
- "default_value": "\"\"",
- "doc": "The replacement text for NaN (not-a-number) values."
- },
- {
- "name": "nan_value[column_name]",
- "type": "str",
- "default_value": "\"\"",
- "doc": "The replacement text for NaN (not-a-number) values for the indicated column."
- },
- {
- "name": "editable",
- "type": "dynamic(bool)",
- "default_value": "True",
- "doc": "Indicates, if True, that all columns can be edited."
+ "name": "editable",
+ "type": "dynamic(bool)",
+ "default_value": "True",
+ "doc": "Indicates, if True, that all columns can be edited."
},
{
"name": "editable[column_name]",
@@ -2599,7 +778,7 @@
},
{
"name": "on_delete",
- "type": "str",
+ "type": "Callback",
"doc": "The name of a function that is triggered when a row is deleted.
All parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- var_name (str): the name of the tabular data variable.
\n- payload (dict): the details on this callback's invocation.
\nThis dictionary has the following keys:\n\n- index (int): the row index.
\n
\n \n
If this property is not set, the user cannot delete rows.",
"signature": [
[
@@ -2618,7 +797,7 @@
},
{
"name": "on_add",
- "type": "str",
+ "type": "Callback",
"doc": "The name of a function that is triggered when the user requests a row to be added.
All parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- var_name (str): the name of the tabular data variable.
\n- payload (dict): the details on this callback's invocation.
This dictionary has the following keys:\n\n- index (int): the row index.
\n
\n \n
If this property is not set, the user cannot add rows.",
"signature": [
[
@@ -2678,7 +857,7 @@
},
{
"name": "on_compare",
- "type": "str",
+ "type": "Callback",
"doc": "A data comparison function that would return a structure that identifies the differences between the different data passed as name. The default implementation compares the default data with the data[1] value.",
"signature": [
[
@@ -2707,10 +886,21 @@
],
"properties": [
{
- "name": "filter",
+ "name": "label",
+ "type": "str",
+ "default_value": "None",
+ "doc": "The label associated with the selector when in dropdown mode."
+ },
+ {
+ "name": "mode",
+ "type": "str",
+ "doc": "Define the way the selector is displayed:- "radio": list of radio buttons
- "check": list of check buttons
- any other value: selector as usual."
+ },
+ {
+ "name": "dropdown",
"type": "bool",
"default_value": "False",
- "doc": "If True, this control is combined with a filter input area."
+ "doc": "If True, the list of items is shown in a dropdown menu.
You cannot use the filter in that situation."
},
{
"name": "multiple",
@@ -2718,6 +908,12 @@
"default_value": "False",
"doc": "If True, the user can select multiple items."
},
+ {
+ "name": "filter",
+ "type": "bool",
+ "default_value": "False",
+ "doc": "If True, this control is combined with a filter input area."
+ },
{
"name": "width",
"type": "str|int",
@@ -2728,29 +924,76 @@
"name": "height",
"type": "str|int",
"doc": "The height, in CSS units, of this element."
+ }
+ ]
+ }
+ ],
+ [
+ "file_download",
+ {
+ "inherits": [
+ "active",
+ "shared"
+ ],
+ "properties": [
+ {
+ "name": "content",
+ "default_property": true,
+ "type": "dynamic(path|file|URL|ReadableBuffer|None)",
+ "doc": "The content to transfer.
If this is a string, a URL, or a file, then the content is read from this source.
If a readable buffer is provided (such as an array of bytes...), and to prevent the bandwidth from being consumed too much, the way the data is transferred depends on the data_url_max_size parameter of the application configuration (which is set to 50kB by default):\n\n- If the buffer size is smaller than this setting, then the raw content is generated as a data URL, encoded using base64 (i.e.
\"data:<mimetype>;base64,<data>\"
). \n- If the buffer size exceeds this setting, then it is transferred through a temporary file.
\n
If this property is set to None, that indicates that dynamic content is generated. Please take a look at the examples below for details on dynamic generation."
},
{
- "name": "dropdown",
+ "name": "label",
+ "type": "dynamic(str)",
+ "doc": "The label of the button."
+ },
+ {
+ "name": "on_action",
+ "type": "Callback",
+ "doc": "The name of a function that is triggered when the download is terminated (or on user action if content is None).
All the parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (optional[str]): the identifier of the button.
\n- payload (dict): the details on this callback's invocation.
\nThis dictionary has two keys:\n\n- action: the name of the action that triggered this callback.
\n- args: A list of two elements: args[0] reflects the name property and args[1] holds the file URL.
\n
\n \n
",
+ "signature": [
+ [
+ "state",
+ "State"
+ ],
+ [
+ "id",
+ "str"
+ ],
+ [
+ "payload",
+ "dict"
+ ]
+ ]
+ },
+ {
+ "name": "auto",
"type": "bool",
"default_value": "False",
- "doc": "If True, the list of items is shown in a dropdown menu.
You cannot use the filter in that situation."
+ "doc": "If True, the download starts as soon as the page is loaded."
},
{
- "name": "label",
- "type": "str",
- "default_value": "None",
- "doc": "The label associated with the selector when in dropdown mode."
+ "name": "render",
+ "type": "dynamic(bool)",
+ "default_value": "True",
+ "doc": "If True, the control is displayed.
If False, the control is not displayed."
},
{
- "name": "mode",
+ "name": "bypass_preview",
+ "type": "bool",
+ "default_value": "True",
+ "doc": "If False, allows the browser to try to show the content in a different tab.
The file download is always performed."
+ },
+ {
+ "name": "name",
"type": "str",
- "doc": "Define the way the selector is displayed:- "radio": list of radio buttons
- "check": list of check buttons
- any other value: selector as usual."
+ "doc": "A name proposition for the file to save, that the user can change."
}
]
}
],
[
- "navbar",
+ "file_selector",
{
"inherits": [
"active",
@@ -2758,10 +1001,58 @@
],
"properties": [
{
- "name": "lov",
+ "name": "content",
"default_property": true,
- "type": "dict[str, any]",
- "doc": "The list of pages. The keys should be:\n
\n- page id (start with \"/\")
\n- or full URL
\n
\nThe values are labels. See the section on List of Values for details."
+ "type": "dynamic(str)",
+ "doc": "The path or the list of paths of the uploaded files."
+ },
+ {
+ "name": "label",
+ "type": "str",
+ "doc": "The label of the button."
+ },
+ {
+ "name": "on_action",
+ "type": "Callback",
+ "doc": "The name of the function that will be triggered.
All the parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (optional[str]): the identifier of the button.
\n- payload (dict): a dictionary that contains the key \"action\" set to the name of the action that triggered this callback.
\n
",
+ "signature": [
+ [
+ "state",
+ "State"
+ ],
+ [
+ "id",
+ "str"
+ ],
+ [
+ "payload",
+ "dict"
+ ]
+ ]
+ },
+ {
+ "name": "multiple",
+ "type": "bool",
+ "default_value": "False",
+ "doc": "If set to True, multiple files can be uploaded."
+ },
+ {
+ "name": "extensions",
+ "type": "str",
+ "default_value": "\".csv,.xlsx\"",
+ "doc": "The list of file extensions that can be uploaded."
+ },
+ {
+ "name": "drop_message",
+ "type": "str",
+ "default_value": "\"Drop here to Upload\"",
+ "doc": "The message that is displayed when the user drags a file above the button."
+ },
+ {
+ "name": "notify",
+ "type": "bool",
+ "default_value": "True",
+ "doc": "If set to False, the user won't be notified of upload finish."
}
]
}
@@ -2806,14 +1097,101 @@
},
{
"name": "width",
- "type": "str|int|float",
- "default_value": "\"300px\"",
- "doc": "The width, in CSS units, of this element."
+ "type": "str|int|float",
+ "default_value": "\"300px\"",
+ "doc": "The width, in CSS units, of this element."
+ },
+ {
+ "name": "height",
+ "type": "str|int|float",
+ "doc": "The height, in CSS units, of this element."
+ }
+ ]
+ }
+ ],
+ [
+ "metric",
+ {
+ "inherits": [
+ "shared"
+ ],
+ "properties": [
+ {
+ "name": "value",
+ "default_property": true,
+ "type": "dynamic(int|float)",
+ "doc": "The value to display."
+ },
+ {
+ "name": "type",
+ "default_value": "circular",
+ "type": "str",
+ "doc": "The type of the gauge.
Possible values are:\n\n- \"none\"
\n- \"circular\"
\n- \"linear\"
."
+ },
+ {
+ "name": "min",
+ "type": "int|float",
+ "default_value": "0",
+ "doc": "The minimum value of this metric control."
+ },
+ {
+ "name": "max",
+ "type": "int|float",
+ "default_value": "100",
+ "doc": "The maximum value of this metric control."
+ },
+ {
+ "name": "delta",
+ "type": "dynamic(int|float)",
+ "doc": "The delta value to display."
+ },
+ {
+ "name": "threshold",
+ "type": "dynamic(int|float)",
+ "doc": "The threshold value to display."
+ },
+ {
+ "name": "show_value",
+ "type": "bool",
+ "default_value": "True",
+ "doc": "If set to False, the value is not displayed."
+ },
+ {
+ "name": "format",
+ "type": "str",
+ "doc": "The format to use when displaying the value.
This uses the printf
syntax."
+ },
+ {
+ "name": "delta_format",
+ "type": "str",
+ "doc": "The format to use when displaying the delta value.
This uses the printf
syntax."
+ },
+ {
+ "name": "width",
+ "type": "str|number",
+ "default_value": "None",
+ "doc": "The width, in CSS units, of the metric."
},
{
"name": "height",
- "type": "str|int|float",
- "doc": "The height, in CSS units, of this element."
+ "type": "str|number",
+ "default_value": "None",
+ "doc": "The height, in CSS units, of the metric."
+ },
+ {
+ "name": "template",
+ "type": "dict",
+ "doc": "The Plotly layout template."
+ },
+ {
+ "name": "template[dark]",
+ "type": "dict",
+ "doc": "The Plotly layout template applied over the base template when theme is dark."
+ },
+ {
+ "name": "template[light]",
+ "type": "dict",
+ "doc": "The Plotly layout template applied over the base template when theme is not dark."
}
]
}
@@ -2871,55 +1249,65 @@
"type": "str",
"default_value": "None",
"doc": "The height, in CSS units, of the indicator (used when orientation is vertical)."
+ },
+ {
+ "name": "hover_text",
+ "hide": true
}
]
}
],
[
- "status",
+ "menu",
{
"inherits": [
- "shared"
+ "active"
],
"properties": [
{
- "name": "value",
+ "name": "lov",
"default_property": true,
- "type": "tuple|dict|list[dict]|list[tuple]",
- "doc": "The different status items to represent. See below."
+ "type": "dynamic(str|list[str|Icon|any])",
+ "doc": "The list of menu option values."
},
{
- "name": "without_close",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the user cannot remove the status items from the list."
- }
- ]
- }
- ],
- [
- "file_download",
- {
- "inherits": [
- "active",
- "shared"
- ],
- "properties": [
+ "name": "adapter",
+ "type": "Function",
+ "default_value": "`\"lambda x: str(x)\"`",
+ "doc": "The function that transforms an element of lov into a tuple(id:str, label:str|Icon)."
+ },
{
- "name": "content",
- "default_property": true,
- "type": "dynamic(path|file|URL|ReadableBuffer|None)",
- "doc": "The content to transfer.
If this is a string, a URL, or a file, then the content is read from this source.
If a readable buffer is provided (such as an array of bytes...), and to prevent the bandwidth from being consumed too much, the way the data is transferred depends on the data_url_max_size parameter of the application configuration (which is set to 50kB by default):\n\n- If the buffer size is smaller than this setting, then the raw content is generated as a data URL, encoded using base64 (i.e.
\"data:<mimetype>;base64,<data>\"
). \n- If the buffer size exceeds this setting, then it is transferred through a temporary file.
\n
If this property is set to None, that indicates that dynamic content is generated. Please take a look at the examples below for details on dynamic generation."
+ "name": "type",
+ "type": "str",
+ "default_value": "Type of the first lov element",
+ "doc": "Must be specified if lov contains a non specific type of data (ex: dict).
value must be of that type, lov must be an iterable on this type, and the adapter function will receive an object of this type."
},
{
"name": "label",
- "type": "dynamic(str)",
- "doc": "The label of the button."
+ "type": "str",
+ "doc": "The title of the menu."
+ },
+ {
+ "name": "inactive_ids",
+ "type": "dynamic(str|list[str])",
+ "doc": "Semicolon (';')-separated list or a list of menu items identifiers that are disabled."
+ },
+ {
+ "name": "width",
+ "type": "str",
+ "default_value": "\"15vw\"",
+ "doc": "The width, in CSS units, of the menu when unfolded.
Note that when running on a mobile device, the property width[active] is used instead."
+ },
+ {
+ "name": "width[mobile]",
+ "type": "str",
+ "default_value": "\"85vw\"",
+ "doc": "The width, in CSS units, of the menu when unfolded, on a mobile device."
},
{
"name": "on_action",
"type": "Callback",
- "doc": "The name of a function that is triggered when the download is terminated (or on user action if content is None).
All the parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (optional[str]): the identifier of the button.
\n- payload (dict): the details on this callback's invocation.
\nThis dictionary has two keys:\n\n- action: the name of the action that triggered this callback.
\n- args: A list of two elements: args[0] reflects the name property and args[1] holds the file URL.
\n
\n \n
",
+ "doc": "The name of the function that is triggered when a menu option is selected.
All the parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (str): the identifier of the button.
\n- payload (dict): the details on this callback's invocation.
\nThis dictionary has the following keys:\n\n- action: the name of the action that triggered this callback.
\n- args: List where the first element contains the id of the selected option.
\n
\n \n
",
"signature": [
[
"state",
@@ -2934,35 +1322,12 @@
"dict"
]
]
- },
- {
- "name": "auto",
- "type": "bool",
- "default_value": "False",
- "doc": "If True, the download starts as soon as the page is loaded."
- },
- {
- "name": "render",
- "type": "dynamic(bool)",
- "default_value": "True",
- "doc": "If True, the control is displayed.
If False, the control is not displayed."
- },
- {
- "name": "bypass_preview",
- "type": "bool",
- "default_value": "True",
- "doc": "If False, allows the browser to try to show the content in a different tab.
The file download is always performed."
- },
- {
- "name": "name",
- "type": "str",
- "doc": "A name proposition for the file to save, that the user can change."
}
]
}
],
[
- "file_selector",
+ "navbar",
{
"inherits": [
"active",
@@ -2970,58 +1335,32 @@
],
"properties": [
{
- "name": "content",
+ "name": "lov",
"default_property": true,
- "type": "dynamic(str)",
- "doc": "The path or the list of paths of the uploaded files."
- },
- {
- "name": "label",
- "type": "str",
- "doc": "The label of the button."
- },
+ "type": "dict[str, any]",
+ "doc": "The list of pages. The keys should be:\n\n- page id (start with \"/\")
\n- or full URL
\n
\nThe values are labels. See the section on List of Values for details."
+ }
+ ]
+ }
+ ],
+ [
+ "status",
+ {
+ "inherits": [
+ "shared"
+ ],
+ "properties": [
{
- "name": "on_action",
- "type": "Callback",
- "doc": "The name of the function that will be triggered.
All the parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (optional[str]): the identifier of the button.
\n- payload (dict): a dictionary that contains the key \"action\" set to the name of the action that triggered this callback.
\n
",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
+ "name": "value",
+ "default_property": true,
+ "type": "tuple|dict|list[dict]|list[tuple]",
+ "doc": "The different status items to represent. See below."
},
{
- "name": "multiple",
+ "name": "without_close",
"type": "bool",
"default_value": "False",
- "doc": "If set to True, multiple files can be uploaded."
- },
- {
- "name": "extensions",
- "type": "str",
- "default_value": "\".csv,.xlsx\"",
- "doc": "The list of file extensions that can be uploaded."
- },
- {
- "name": "drop_message",
- "type": "str",
- "default_value": "\"Drop here to Upload\"",
- "doc": "The message that is displayed when the user drags a file above the button."
- },
- {
- "name": "notify",
- "type": "bool",
- "default_value": "True",
- "doc": "If set to False, the user won't be notified of upload finish."
+ "doc": "If True, the user cannot remove the status items from the list."
}
]
}
@@ -3132,75 +1471,6 @@
]
}
],
- [
- "menu",
- {
- "inherits": [
- "active"
- ],
- "properties": [
- {
- "name": "lov",
- "default_property": true,
- "type": "dynamic(str|list[str|Icon|any])",
- "doc": "The list of menu option values."
- },
- {
- "name": "adapter",
- "type": "Function",
- "default_value": "`\"lambda x: str(x)\"`",
- "doc": "The function that transforms an element of lov into a tuple(id:str, label:str|Icon)."
- },
- {
- "name": "type",
- "type": "str",
- "default_value": "Type of the first lov element",
- "doc": "Must be specified if lov contains a non specific type of data (ex: dict).
value must be of that type, lov must be an iterable on this type, and the adapter function will receive an object of this type."
- },
- {
- "name": "label",
- "type": "str",
- "doc": "The title of the menu."
- },
- {
- "name": "inactive_ids",
- "type": "dynamic(str|list[str])",
- "doc": "Semicolon (';')-separated list or a list of menu items identifiers that are disabled."
- },
- {
- "name": "width",
- "type": "str",
- "default_value": "\"15vw\"",
- "doc": "The width, in CSS units, of the menu when unfolded.
Note that when running on a mobile device, the property width[active] is used instead."
- },
- {
- "name": "width[mobile]",
- "type": "str",
- "default_value": "\"85vw\"",
- "doc": "The width, in CSS units, of the menu when unfolded, on a mobile device."
- },
- {
- "name": "on_action",
- "type": "Callback",
- "doc": "The name of the function that is triggered when a menu option is selected.
All the parameters of that function are optional:\n\n- state (
State^
): the state instance. \n- id (str): the identifier of the button.
\n- payload (dict): the details on this callback's invocation.
\nThis dictionary has the following keys:\n\n- action: the name of the action that triggered this callback.
\n- args: List where the first element contains the id of the selected option.
\n
\n \n
",
- "signature": [
- [
- "state",
- "State"
- ],
- [
- "id",
- "str"
- ],
- [
- "payload",
- "dict"
- ]
- ]
- }
- ]
- }
- ],
[
"dialog",
{
@@ -3240,12 +1510,12 @@
"name": "close_label",
"type": "str",
"default_value": "\"Close\"",
- "doc": "The tooltip of the top-right close icon button. In the on_action function, args will hold -1."
+ "doc": "The tooltip of the top-right close icon button. In the on_action callback, args will hold -1."
},
{
"name": "labels",
"type": " str|list[str]",
- "doc": "A list of labels to show in a row of buttons at the bottom of the dialog. The index of the button in the list is reported as args in the on_action function (-1 for the close icon)."
+ "doc": "A list of labels to show in a row of buttons at the bottom of the dialog. The index of the button in the list is reported as args in the on_action callback (that index is -1 for the close icon)."
},
{
"name": "width",
@@ -3487,7 +1757,7 @@
{
"name": "type",
"type": "str",
- "default_value": "Type name of the lov elements",
+ "default_value": "Type name of the lov element",
"doc": "Must be specified if lov contains a non-specific type of data (ex: dict).
value must be of that type, lov must be an iterable on this type, and the adapter function will receive an object of this type."
},
{
@@ -3567,7 +1837,7 @@
"name": "change_delay",
"type": "int",
"default_value": "App config",
- "doc": "Minimum time between triggering two calls to the on_change callback.
The default value is defined at the application configuration level by the change_delay configuration option. if None, the delay is set to 300 ms.
If set to -1, the input change is triggered only when the user presses the Enter key."
+ "doc": "Minimum time between triggering two calls to the on_change callback.
The default value is defined at the application configuration level by the change_delay configuration option. if None, the delay is set to 300 ms.
If set to -1, the input change is triggered only when the user presses the Enter key."
},
{
"name": "on_action",