streamlit-nightly 1.34.1.dev20240512__py2.py3-none-any.whl → 1.34.1.dev20240513__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/elements/arrow.py +250 -3
- streamlit/proto/Arrow_pb2.py +8 -6
- streamlit/proto/Arrow_pb2.pyi +33 -1
- streamlit/runtime/state/widgets.py +6 -5
- streamlit/static/asset-manifest.json +5 -5
- streamlit/static/index.html +1 -1
- streamlit/static/static/css/8148.49dfd2ce.chunk.css +1 -0
- streamlit/static/static/js/6950.70fe55c2.chunk.js +2 -0
- streamlit/static/static/js/8148.cc5b50d8.chunk.js +1 -0
- streamlit/static/static/js/{main.d6101304.js → main.45247b52.js} +2 -2
- streamlit/web/bootstrap.py +5 -9
- {streamlit_nightly-1.34.1.dev20240512.dist-info → streamlit_nightly-1.34.1.dev20240513.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.34.1.dev20240512.dist-info → streamlit_nightly-1.34.1.dev20240513.dist-info}/RECORD +19 -19
- streamlit/static/static/css/3092.95a45cfe.chunk.css +0 -1
- streamlit/static/static/js/1955.426e67ca.chunk.js +0 -2
- streamlit/static/static/js/3092.21bb8f7b.chunk.js +0 -1
- /streamlit/static/static/js/{1955.426e67ca.chunk.js.LICENSE.txt → 6950.70fe55c2.chunk.js.LICENSE.txt} +0 -0
- /streamlit/static/static/js/{main.d6101304.js.LICENSE.txt → main.45247b52.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.34.1.dev20240512.data → streamlit_nightly-1.34.1.dev20240513.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.34.1.dev20240512.dist-info → streamlit_nightly-1.34.1.dev20240513.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.34.1.dev20240512.dist-info → streamlit_nightly-1.34.1.dev20240513.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.34.1.dev20240512.dist-info → streamlit_nightly-1.34.1.dev20240513.dist-info}/top_level.txt +0 -0
streamlit/elements/arrow.py
CHANGED
@@ -14,7 +14,22 @@
|
|
14
14
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
|
-
|
17
|
+
import json
|
18
|
+
from dataclasses import dataclass
|
19
|
+
from typing import (
|
20
|
+
TYPE_CHECKING,
|
21
|
+
Any,
|
22
|
+
Dict,
|
23
|
+
Final,
|
24
|
+
Iterable,
|
25
|
+
List,
|
26
|
+
Literal,
|
27
|
+
Set,
|
28
|
+
TypedDict,
|
29
|
+
Union,
|
30
|
+
cast,
|
31
|
+
overload,
|
32
|
+
)
|
18
33
|
|
19
34
|
from typing_extensions import TypeAlias
|
20
35
|
|
@@ -27,9 +42,15 @@ from streamlit.elements.lib.column_config_utils import (
|
|
27
42
|
process_config_mapping,
|
28
43
|
update_column_config,
|
29
44
|
)
|
45
|
+
from streamlit.elements.lib.event_utils import AttributeDictionary
|
30
46
|
from streamlit.elements.lib.pandas_styler_utils import marshall_styler
|
47
|
+
from streamlit.errors import StreamlitAPIException
|
31
48
|
from streamlit.proto.Arrow_pb2 import Arrow as ArrowProto
|
32
49
|
from streamlit.runtime.metrics_util import gather_metrics
|
50
|
+
from streamlit.runtime.scriptrunner import get_script_run_ctx
|
51
|
+
from streamlit.runtime.state import WidgetCallback, register_widget
|
52
|
+
from streamlit.runtime.state.common import compute_widget_id
|
53
|
+
from streamlit.type_util import Key, to_key
|
33
54
|
|
34
55
|
if TYPE_CHECKING:
|
35
56
|
import pyarrow as pa
|
@@ -51,9 +72,112 @@ Data: TypeAlias = Union[
|
|
51
72
|
None,
|
52
73
|
]
|
53
74
|
|
75
|
+
SelectionMode: TypeAlias = Literal[
|
76
|
+
"single-row", "multi-row", "single-column", "multi-column"
|
77
|
+
]
|
78
|
+
_SELECTION_MODES: Final[set[SelectionMode]] = {
|
79
|
+
"single-row",
|
80
|
+
"multi-row",
|
81
|
+
"single-column",
|
82
|
+
"multi-column",
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
class DataframeSelectionState(TypedDict, total=False):
|
87
|
+
"""
|
88
|
+
A dictionary representing the current selection state of the dataframe.
|
89
|
+
|
90
|
+
Attributes
|
91
|
+
----------
|
92
|
+
rows
|
93
|
+
The selected rows (numerical indices).
|
94
|
+
columns
|
95
|
+
The selected columns (column names).
|
96
|
+
"""
|
97
|
+
|
98
|
+
rows: list[int]
|
99
|
+
columns: list[str]
|
100
|
+
|
101
|
+
|
102
|
+
class DataframeState(TypedDict, total=False):
|
103
|
+
"""
|
104
|
+
A dictionary representing the current state of the dataframe.
|
105
|
+
|
106
|
+
Attributes
|
107
|
+
----------
|
108
|
+
select : DataframeSelectionState
|
109
|
+
The state of the `on_select` event.
|
110
|
+
"""
|
111
|
+
|
112
|
+
select: DataframeSelectionState
|
113
|
+
|
114
|
+
|
115
|
+
@dataclass
|
116
|
+
class DataframeSelectionSerde:
|
117
|
+
"""DataframeSelectionSerde is used to serialize and deserialize the dataframe selection state."""
|
118
|
+
|
119
|
+
def deserialize(self, ui_value: str | None, widget_id: str = "") -> DataframeState:
|
120
|
+
empty_selection_state: DataframeState = {
|
121
|
+
"select": {
|
122
|
+
"rows": [],
|
123
|
+
"columns": [],
|
124
|
+
},
|
125
|
+
}
|
126
|
+
selection_state: DataframeState = (
|
127
|
+
empty_selection_state if ui_value is None else json.loads(ui_value)
|
128
|
+
)
|
129
|
+
|
130
|
+
if "select" not in selection_state:
|
131
|
+
selection_state = empty_selection_state
|
132
|
+
|
133
|
+
return cast(DataframeState, AttributeDictionary(selection_state))
|
134
|
+
|
135
|
+
def serialize(self, editing_state: DataframeState) -> str:
|
136
|
+
return json.dumps(editing_state, default=str)
|
137
|
+
|
138
|
+
|
139
|
+
def parse_selection_mode(
|
140
|
+
selection_mode: SelectionMode | Iterable[SelectionMode],
|
141
|
+
) -> Set[ArrowProto.SelectionMode.ValueType]:
|
142
|
+
"""Parse and check the user provided selection modes."""
|
143
|
+
if isinstance(selection_mode, str):
|
144
|
+
# Only a single selection mode was passed
|
145
|
+
selection_mode_set = {selection_mode}
|
146
|
+
else:
|
147
|
+
# Multiple selection modes were passed
|
148
|
+
selection_mode_set = set(selection_mode)
|
149
|
+
|
150
|
+
if not selection_mode_set.issubset(_SELECTION_MODES):
|
151
|
+
raise StreamlitAPIException(
|
152
|
+
f"Invalid selection mode: {selection_mode}. "
|
153
|
+
f"Valid options are: {_SELECTION_MODES}"
|
154
|
+
)
|
155
|
+
|
156
|
+
if selection_mode_set.issuperset({"single-row", "multi-row"}):
|
157
|
+
raise StreamlitAPIException(
|
158
|
+
"Only one of `single-row` or `multi-row` can be selected as selection mode."
|
159
|
+
)
|
160
|
+
|
161
|
+
if selection_mode_set.issuperset({"single-column", "multi-column"}):
|
162
|
+
raise StreamlitAPIException(
|
163
|
+
"Only one of `single-column` or `multi-column` can be selected as selection mode."
|
164
|
+
)
|
165
|
+
|
166
|
+
parsed_selection_modes = []
|
167
|
+
for selection_mode in selection_mode_set:
|
168
|
+
if selection_mode == "single-row":
|
169
|
+
parsed_selection_modes.append(ArrowProto.SelectionMode.SINGLE_ROW)
|
170
|
+
elif selection_mode == "multi-row":
|
171
|
+
parsed_selection_modes.append(ArrowProto.SelectionMode.MULTI_ROW)
|
172
|
+
elif selection_mode == "single-column":
|
173
|
+
parsed_selection_modes.append(ArrowProto.SelectionMode.SINGLE_COLUMN)
|
174
|
+
elif selection_mode == "multi-column":
|
175
|
+
parsed_selection_modes.append(ArrowProto.SelectionMode.MULTI_COLUMN)
|
176
|
+
return set(parsed_selection_modes)
|
177
|
+
|
54
178
|
|
55
179
|
class ArrowMixin:
|
56
|
-
@
|
180
|
+
@overload
|
57
181
|
def dataframe(
|
58
182
|
self,
|
59
183
|
data: Data = None,
|
@@ -64,7 +188,44 @@ class ArrowMixin:
|
|
64
188
|
hide_index: bool | None = None,
|
65
189
|
column_order: Iterable[str] | None = None,
|
66
190
|
column_config: ColumnConfigMappingInput | None = None,
|
191
|
+
key: Key | None = None,
|
192
|
+
on_select: Literal["ignore"], # No default value here to make it work with mypy
|
193
|
+
selection_mode: SelectionMode | Iterable[SelectionMode] = "multi-row",
|
67
194
|
) -> DeltaGenerator:
|
195
|
+
...
|
196
|
+
|
197
|
+
@overload
|
198
|
+
def dataframe(
|
199
|
+
self,
|
200
|
+
data: Data = None,
|
201
|
+
width: int | None = None,
|
202
|
+
height: int | None = None,
|
203
|
+
*,
|
204
|
+
use_container_width: bool = False,
|
205
|
+
hide_index: bool | None = None,
|
206
|
+
column_order: Iterable[str] | None = None,
|
207
|
+
column_config: ColumnConfigMappingInput | None = None,
|
208
|
+
key: Key | None = None,
|
209
|
+
on_select: Literal["rerun"] | WidgetCallback = "rerun",
|
210
|
+
selection_mode: SelectionMode | Iterable[SelectionMode] = "multi-row",
|
211
|
+
) -> DataframeState:
|
212
|
+
...
|
213
|
+
|
214
|
+
@gather_metrics("dataframe")
|
215
|
+
def dataframe(
|
216
|
+
self,
|
217
|
+
data: Data = None,
|
218
|
+
width: int | None = None,
|
219
|
+
height: int | None = None,
|
220
|
+
*,
|
221
|
+
use_container_width: bool = False,
|
222
|
+
hide_index: bool | None = None,
|
223
|
+
column_order: Iterable[str] | None = None,
|
224
|
+
column_config: ColumnConfigMappingInput | None = None,
|
225
|
+
key: Key | None = None,
|
226
|
+
on_select: Literal["ignore", "rerun"] | WidgetCallback = "ignore",
|
227
|
+
selection_mode: SelectionMode | Iterable[SelectionMode] = "multi-row",
|
228
|
+
) -> DeltaGenerator | DataframeState:
|
68
229
|
"""Display a dataframe as an interactive table.
|
69
230
|
|
70
231
|
This command works with dataframes from Pandas, PyArrow, Snowpark, and PySpark.
|
@@ -119,6 +280,30 @@ class ArrowMixin:
|
|
119
280
|
|
120
281
|
To configure the index column(s), use ``_index`` as the column name.
|
121
282
|
|
283
|
+
key : str
|
284
|
+
An optional string to use as the unique key for this element when used in combination
|
285
|
+
with ```on_select```. If this is omitted, a key will be generated for the widget based
|
286
|
+
on its content. Multiple widgets of the same type may not share the same key.
|
287
|
+
|
288
|
+
on_select : "ignore" or "rerun" or callable
|
289
|
+
Controls the behavior in response to selection events on the table. Can be one of:
|
290
|
+
|
291
|
+
- "ignore" (default): Streamlit will not react to any selection events in the chart.
|
292
|
+
- "rerun": Streamlit will rerun the app when the user selects rows or columns in the table.
|
293
|
+
In this case, ```st.dataframe``` will return the selection data as a dictionary.
|
294
|
+
- callable: If a callable is provided, Streamlit will rerun and execute the callable as a
|
295
|
+
callback function before the rest of the app. The selection data can be retrieved through
|
296
|
+
session state by setting the key parameter.
|
297
|
+
|
298
|
+
selection_mode : "single-row", "multi-row", single-column", "multi-column", or an iterable of these
|
299
|
+
The selection mode of the table. Can be one of:
|
300
|
+
|
301
|
+
- "multi-row" (default): Multiple rows can be selected at a time.
|
302
|
+
- "single-row": Only one row can be selected at a time.
|
303
|
+
- "multi-column": Multiple columns can be selected at a time.
|
304
|
+
- "single-column": Only one column can be selected at a time.
|
305
|
+
- An iterable of the above options: The table will allow selection based on the modes specified.
|
306
|
+
|
122
307
|
Examples
|
123
308
|
--------
|
124
309
|
>>> import streamlit as st
|
@@ -186,6 +371,29 @@ class ArrowMixin:
|
|
186
371
|
"""
|
187
372
|
import pyarrow as pa
|
188
373
|
|
374
|
+
if on_select not in ["ignore", "rerun"] and not callable(on_select):
|
375
|
+
raise StreamlitAPIException(
|
376
|
+
f"You have passed {on_select} to `on_select`. But only 'ignore', 'rerun', or a callable is supported."
|
377
|
+
)
|
378
|
+
|
379
|
+
key = to_key(key)
|
380
|
+
is_selection_activated = on_select != "ignore"
|
381
|
+
|
382
|
+
if is_selection_activated:
|
383
|
+
# Run some checks that are only relevant when selections are activated
|
384
|
+
|
385
|
+
# Import here to avoid circular imports
|
386
|
+
from streamlit.elements.utils import (
|
387
|
+
check_cache_replay_rules,
|
388
|
+
check_callback_rules,
|
389
|
+
check_session_state_rules,
|
390
|
+
)
|
391
|
+
|
392
|
+
check_cache_replay_rules()
|
393
|
+
if callable(on_select):
|
394
|
+
check_callback_rules(self.dg, on_select)
|
395
|
+
check_session_state_rules(default_value=None, key=key, writes_allowed=False)
|
396
|
+
|
189
397
|
# Convert the user provided column config into the frontend compatible format:
|
190
398
|
column_config_mapping = process_config_mapping(column_config)
|
191
399
|
|
@@ -236,7 +444,46 @@ class ArrowMixin:
|
|
236
444
|
)
|
237
445
|
marshall_column_config(proto, column_config_mapping)
|
238
446
|
|
239
|
-
|
447
|
+
if is_selection_activated:
|
448
|
+
# Import here to avoid circular imports
|
449
|
+
from streamlit.elements.form import current_form_id
|
450
|
+
|
451
|
+
# If selection events are activated, we need to register the dataframe
|
452
|
+
# element as a widget.
|
453
|
+
proto.selection_mode.extend(parse_selection_mode(selection_mode))
|
454
|
+
proto.form_id = current_form_id(self.dg)
|
455
|
+
|
456
|
+
ctx = get_script_run_ctx()
|
457
|
+
proto.id = compute_widget_id(
|
458
|
+
"dataframe",
|
459
|
+
user_key=key,
|
460
|
+
data=proto.data,
|
461
|
+
width=width,
|
462
|
+
height=height,
|
463
|
+
use_container_width=use_container_width,
|
464
|
+
column_order=proto.column_order,
|
465
|
+
column_config=proto.columns,
|
466
|
+
key=key,
|
467
|
+
selection_mode=selection_mode,
|
468
|
+
is_selection_activated=is_selection_activated,
|
469
|
+
form_id=proto.form_id,
|
470
|
+
page=ctx.page_script_hash if ctx else None,
|
471
|
+
)
|
472
|
+
|
473
|
+
serde = DataframeSelectionSerde()
|
474
|
+
widget_state = register_widget(
|
475
|
+
"dataframe",
|
476
|
+
proto,
|
477
|
+
user_key=key,
|
478
|
+
on_change_handler=on_select if callable(on_select) else None,
|
479
|
+
deserializer=serde.deserialize,
|
480
|
+
serializer=serde.serialize,
|
481
|
+
ctx=ctx,
|
482
|
+
)
|
483
|
+
self.dg._enqueue("arrow_data_frame", proto)
|
484
|
+
return cast(DataframeState, widget_state.value)
|
485
|
+
else:
|
486
|
+
return self.dg._enqueue("arrow_data_frame", proto)
|
240
487
|
|
241
488
|
@gather_metrics("table")
|
242
489
|
def table(self, data: Data = None) -> DeltaGenerator:
|
streamlit/proto/Arrow_pb2.py
CHANGED
@@ -13,7 +13,7 @@ _sym_db = _symbol_database.Default()
|
|
13
13
|
|
14
14
|
|
15
15
|
|
16
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Arrow.proto\"\
|
16
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Arrow.proto\"\xa3\x03\n\x05\x41rrow\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x17\n\x06styler\x18\x02 \x01(\x0b\x32\x07.Styler\x12\r\n\x05width\x18\x03 \x01(\r\x12\x0e\n\x06height\x18\x04 \x01(\r\x12\x1b\n\x13use_container_width\x18\x05 \x01(\x08\x12\n\n\x02id\x18\x06 \x01(\t\x12\x0f\n\x07\x63olumns\x18\x07 \x01(\t\x12(\n\x0c\x65\x64iting_mode\x18\x08 \x01(\x0e\x32\x12.Arrow.EditingMode\x12\x10\n\x08\x64isabled\x18\t \x01(\x08\x12\x0f\n\x07\x66orm_id\x18\n \x01(\t\x12\x14\n\x0c\x63olumn_order\x18\x0b \x03(\t\x12,\n\x0eselection_mode\x18\x0c \x03(\x0e\x32\x14.Arrow.SelectionMode\"4\n\x0b\x45\x64itingMode\x12\r\n\tREAD_ONLY\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x0b\n\x07\x44YNAMIC\x10\x02\"S\n\rSelectionMode\x12\x0e\n\nSINGLE_ROW\x10\x00\x12\r\n\tMULTI_ROW\x10\x01\x12\x11\n\rSINGLE_COLUMN\x10\x02\x12\x10\n\x0cMULTI_COLUMN\x10\x03\"O\n\x06Styler\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x0f\n\x07\x63\x61ption\x18\x02 \x01(\t\x12\x0e\n\x06styles\x18\x03 \x01(\t\x12\x16\n\x0e\x64isplay_values\x18\x04 \x01(\x0c\x42*\n\x1c\x63om.snowflake.apps.streamlitB\nArrowProtob\x06proto3')
|
17
17
|
|
18
18
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
19
19
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.Arrow_pb2', globals())
|
@@ -22,9 +22,11 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
22
22
|
DESCRIPTOR._options = None
|
23
23
|
DESCRIPTOR._serialized_options = b'\n\034com.snowflake.apps.streamlitB\nArrowProto'
|
24
24
|
_ARROW._serialized_start=32
|
25
|
-
_ARROW._serialized_end=
|
26
|
-
_ARROW_EDITINGMODE._serialized_start=
|
27
|
-
_ARROW_EDITINGMODE._serialized_end=
|
28
|
-
|
29
|
-
|
25
|
+
_ARROW._serialized_end=451
|
26
|
+
_ARROW_EDITINGMODE._serialized_start=314
|
27
|
+
_ARROW_EDITINGMODE._serialized_end=366
|
28
|
+
_ARROW_SELECTIONMODE._serialized_start=368
|
29
|
+
_ARROW_SELECTIONMODE._serialized_end=451
|
30
|
+
_STYLER._serialized_start=453
|
31
|
+
_STYLER._serialized_end=532
|
30
32
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/Arrow_pb2.pyi
CHANGED
@@ -58,6 +58,33 @@ class Arrow(google.protobuf.message.Message):
|
|
58
58
|
DYNAMIC: Arrow.EditingMode.ValueType # 2
|
59
59
|
"""Activates editing and allow adding & deleting rows."""
|
60
60
|
|
61
|
+
class _SelectionMode:
|
62
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
63
|
+
V: typing_extensions.TypeAlias = ValueType
|
64
|
+
|
65
|
+
class _SelectionModeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Arrow._SelectionMode.ValueType], builtins.type): # noqa: F821
|
66
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
67
|
+
SINGLE_ROW: Arrow._SelectionMode.ValueType # 0
|
68
|
+
"""Only one row can be selected at a time."""
|
69
|
+
MULTI_ROW: Arrow._SelectionMode.ValueType # 1
|
70
|
+
"""Multiple rows can be selected at a time."""
|
71
|
+
SINGLE_COLUMN: Arrow._SelectionMode.ValueType # 2
|
72
|
+
"""Only one column can be selected at a time."""
|
73
|
+
MULTI_COLUMN: Arrow._SelectionMode.ValueType # 3
|
74
|
+
"""Multiple columns can be selected at a time."""
|
75
|
+
|
76
|
+
class SelectionMode(_SelectionMode, metaclass=_SelectionModeEnumTypeWrapper):
|
77
|
+
"""Available editing modes:"""
|
78
|
+
|
79
|
+
SINGLE_ROW: Arrow.SelectionMode.ValueType # 0
|
80
|
+
"""Only one row can be selected at a time."""
|
81
|
+
MULTI_ROW: Arrow.SelectionMode.ValueType # 1
|
82
|
+
"""Multiple rows can be selected at a time."""
|
83
|
+
SINGLE_COLUMN: Arrow.SelectionMode.ValueType # 2
|
84
|
+
"""Only one column can be selected at a time."""
|
85
|
+
MULTI_COLUMN: Arrow.SelectionMode.ValueType # 3
|
86
|
+
"""Multiple columns can be selected at a time."""
|
87
|
+
|
61
88
|
DATA_FIELD_NUMBER: builtins.int
|
62
89
|
STYLER_FIELD_NUMBER: builtins.int
|
63
90
|
WIDTH_FIELD_NUMBER: builtins.int
|
@@ -69,6 +96,7 @@ class Arrow(google.protobuf.message.Message):
|
|
69
96
|
DISABLED_FIELD_NUMBER: builtins.int
|
70
97
|
FORM_ID_FIELD_NUMBER: builtins.int
|
71
98
|
COLUMN_ORDER_FIELD_NUMBER: builtins.int
|
99
|
+
SELECTION_MODE_FIELD_NUMBER: builtins.int
|
72
100
|
data: builtins.bytes
|
73
101
|
"""The serialized arrow dataframe"""
|
74
102
|
@property
|
@@ -93,6 +121,9 @@ class Arrow(google.protobuf.message.Message):
|
|
93
121
|
@property
|
94
122
|
def column_order(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
95
123
|
"""Defines the order in which columns are displayed"""
|
124
|
+
@property
|
125
|
+
def selection_mode(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___Arrow.SelectionMode.ValueType]:
|
126
|
+
"""Activated dataframe selections events"""
|
96
127
|
def __init__(
|
97
128
|
self,
|
98
129
|
*,
|
@@ -107,9 +138,10 @@ class Arrow(google.protobuf.message.Message):
|
|
107
138
|
disabled: builtins.bool = ...,
|
108
139
|
form_id: builtins.str = ...,
|
109
140
|
column_order: collections.abc.Iterable[builtins.str] | None = ...,
|
141
|
+
selection_mode: collections.abc.Iterable[global___Arrow.SelectionMode.ValueType] | None = ...,
|
110
142
|
) -> None: ...
|
111
143
|
def HasField(self, field_name: typing_extensions.Literal["styler", b"styler"]) -> builtins.bool: ...
|
112
|
-
def ClearField(self, field_name: typing_extensions.Literal["column_order", b"column_order", "columns", b"columns", "data", b"data", "disabled", b"disabled", "editing_mode", b"editing_mode", "form_id", b"form_id", "height", b"height", "id", b"id", "styler", b"styler", "use_container_width", b"use_container_width", "width", b"width"]) -> None: ...
|
144
|
+
def ClearField(self, field_name: typing_extensions.Literal["column_order", b"column_order", "columns", b"columns", "data", b"data", "disabled", b"disabled", "editing_mode", b"editing_mode", "form_id", b"form_id", "height", b"height", "id", b"id", "selection_mode", b"selection_mode", "styler", b"styler", "use_container_width", b"use_container_width", "width", b"width"]) -> None: ...
|
113
145
|
|
114
146
|
global___Arrow = Arrow
|
115
147
|
|
@@ -53,24 +53,25 @@ ELEMENT_TYPE_TO_VALUE_TYPE: Final[
|
|
53
53
|
] = MappingProxyType(
|
54
54
|
{
|
55
55
|
"button": "trigger_value",
|
56
|
-
"
|
56
|
+
"camera_input": "file_uploader_state_value",
|
57
57
|
"checkbox": "bool_value",
|
58
58
|
"chat_input": "string_trigger_value",
|
59
|
-
"camera_input": "file_uploader_state_value",
|
60
59
|
"color_picker": "string_value",
|
60
|
+
"component_instance": "json_value",
|
61
|
+
"data_editor": "string_value",
|
62
|
+
"dataframe": "string_value",
|
61
63
|
"date_input": "string_array_value",
|
64
|
+
"download_button": "trigger_value",
|
62
65
|
"file_uploader": "file_uploader_state_value",
|
63
66
|
"multiselect": "int_array_value",
|
64
67
|
"number_input": "double_value",
|
68
|
+
"plotly_chart": "string_value",
|
65
69
|
"radio": "int_value",
|
66
70
|
"selectbox": "int_value",
|
67
71
|
"slider": "double_array_value",
|
68
72
|
"text_area": "string_value",
|
69
73
|
"text_input": "string_value",
|
70
74
|
"time_input": "string_value",
|
71
|
-
"component_instance": "json_value",
|
72
|
-
"data_editor": "string_value",
|
73
|
-
"plotly_chart": "string_value",
|
74
75
|
}
|
75
76
|
)
|
76
77
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"files": {
|
3
3
|
"main.css": "./static/css/main.3aaaea00.css",
|
4
|
-
"main.js": "./static/js/main.
|
4
|
+
"main.js": "./static/js/main.45247b52.js",
|
5
5
|
"static/js/9336.2d95d840.chunk.js": "./static/js/9336.2d95d840.chunk.js",
|
6
6
|
"static/js/9330.2b4c99e0.chunk.js": "./static/js/9330.2b4c99e0.chunk.js",
|
7
7
|
"static/js/2736.4336e2b9.chunk.js": "./static/js/2736.4336e2b9.chunk.js",
|
8
8
|
"static/js/3301.1d1b10bb.chunk.js": "./static/js/3301.1d1b10bb.chunk.js",
|
9
|
-
"static/css/
|
10
|
-
"static/js/
|
9
|
+
"static/css/8148.49dfd2ce.chunk.css": "./static/css/8148.49dfd2ce.chunk.css",
|
10
|
+
"static/js/8148.cc5b50d8.chunk.js": "./static/js/8148.cc5b50d8.chunk.js",
|
11
11
|
"static/css/5441.e3b876c5.chunk.css": "./static/css/5441.e3b876c5.chunk.css",
|
12
12
|
"static/js/5441.5bacdeda.chunk.js": "./static/js/5441.5bacdeda.chunk.js",
|
13
13
|
"static/js/8427.bd0a7cf3.chunk.js": "./static/js/8427.bd0a7cf3.chunk.js",
|
@@ -55,7 +55,7 @@
|
|
55
55
|
"static/js/3466.05d62820.chunk.js": "./static/js/3466.05d62820.chunk.js",
|
56
56
|
"static/js/7483.64f23be7.chunk.js": "./static/js/7483.64f23be7.chunk.js",
|
57
57
|
"static/js/5249.f2f4070d.chunk.js": "./static/js/5249.f2f4070d.chunk.js",
|
58
|
-
"static/js/
|
58
|
+
"static/js/6950.70fe55c2.chunk.js": "./static/js/6950.70fe55c2.chunk.js",
|
59
59
|
"static/js/5791.9a42fb4b.chunk.js": "./static/js/5791.9a42fb4b.chunk.js",
|
60
60
|
"static/js/5117.04bfe5d3.chunk.js": "./static/js/5117.04bfe5d3.chunk.js",
|
61
61
|
"static/js/2187.9469f035.chunk.js": "./static/js/2187.9469f035.chunk.js",
|
@@ -153,6 +153,6 @@
|
|
153
153
|
},
|
154
154
|
"entrypoints": [
|
155
155
|
"static/css/main.3aaaea00.css",
|
156
|
-
"static/js/main.
|
156
|
+
"static/js/main.45247b52.js"
|
157
157
|
]
|
158
158
|
}
|
streamlit/static/index.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.45247b52.js"></script><link href="./static/css/main.3aaaea00.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
@@ -0,0 +1 @@
|
|
1
|
+
.gdg-r17m35ur{background-color:var(--gdg-bg-header-has-focus);border:none;border-radius:9px;box-shadow:0 0 0 1px var(--gdg-border-color);color:var(--gdg-text-group-header);flex-grow:1;font:var(--gdg-header-font-style) var(--gdg-font-family);min-height:var(--r17m35ur-0);outline:none;padding:0 8px}.gdg-c1tqibwd{align-items:center;background-color:var(--gdg-bg-header);display:flex;padding:0 8px}.gdg-d19meir1{--overlay-top:var(--d19meir1-0);box-sizing:border-box;display:flex;flex-direction:column;font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);left:var(--d19meir1-1);max-height:calc(100vh - var(--d19meir1-4));max-width:400px;min-height:var(--d19meir1-3);min-width:var(--d19meir1-2);overflow:hidden;position:absolute;text-align:start;top:var(--d19meir1-0);width:-webkit-max-content;width:max-content}@keyframes glide_fade_in-gdg-d19meir1{0%{opacity:0}to{opacity:100%}}.gdg-d19meir1.gdg-style{animation:glide_fade_in-gdg-d19meir1 60ms 1;background-color:var(--gdg-bg-cell);border-radius:2px;box-shadow:0 0 0 1px var(--gdg-accent-color),0 0 1px #3e415666,0 6px 12px #3e415626}.gdg-d19meir1.gdg-pad{padding:var(--d19meir1-5) 8.5px 3px}.gdg-d19meir1 .gdg-clip-region{border-radius:2px;display:flex;flex-direction:column;flex-grow:1;overflow-x:hidden;overflow-y:auto}.gdg-d19meir1 .gdg-clip-region .gdg-growing-entry{height:100%}.gdg-d19meir1 .gdg-clip-region input.gdg-input{border:0;outline:none;width:100%}.gdg-d19meir1 .gdg-clip-region textarea.gdg-input{border:0;outline:none}.gdg-u1rrojo{align-items:center;display:flex;flex-grow:1;min-height:21px}.gdg-u1rrojo .gdg-link-area{color:var(--gdg-link-color);cursor:pointer;flex-grow:1;flex-shrink:1;margin-right:8px;overflow:hidden;-webkit-text-decoration:underline!important;text-decoration:underline!important;text-overflow:ellipsis;white-space:nowrap}.gdg-u1rrojo .gdg-edit-icon{align-items:center;color:var(--gdg-accent-color);cursor:pointer;display:flex;flex-shrink:0;justify-content:center;width:32px}.gdg-u1rrojo .gdg-edit-icon>*{height:24px;width:24px}.gdg-u1rrojo textarea{height:0;left:0;opacity:0;position:absolute;top:0;width:0}.gdg-n15fjm3e{color:var(--gdg-text-dark);display:flex;margin:6px 0 3px}.gdg-n15fjm3e>input{background-color:var(--gdg-bg-cell);color:var(--gdg-text-dark);font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);padding:0}.gdg-d4zsq0x{display:flex;flex-wrap:wrap}.gdg-d4zsq0x .doe-bubble{align-items:center;background-color:var(--gdg-bg-cell);border-radius:6px;border-radius:var(--gdg-rounding-radius,6px);box-shadow:0 0 1px #3e415666,0 1px 3px #3e415666;color:var(--gdg-text-dark);display:flex;height:24px;justify-content:center;margin:2px;padding:0 8px}.gdg-d4zsq0x .doe-bubble img{height:16px;margin-right:4px;object-fit:contain}.gdg-d4zsq0x textarea{height:0;left:0;opacity:0;position:absolute;top:0;width:0}.gdg-b1ygi5by{display:flex;flex-wrap:wrap;margin-bottom:auto;margin-top:auto}.gdg-b1ygi5by .boe-bubble{align-items:center;background-color:var(--gdg-bg-bubble);border-radius:10px;border-radius:var(--gdg-rounding-radius,10px);color:var(--gdg-text-dark);display:flex;height:20px;justify-content:center;margin:2px;padding:0 8px}.gdg-b1ygi5by textarea{height:0;left:0;opacity:0;position:absolute;top:0;width:0}.gdg-m1pnx84e{align-items:flex-start;color:var(--gdg-text-dark);display:flex;justify-content:space-between;min-width:var(--m1pnx84e-0);position:relative;width:100%}.gdg-m1pnx84e .gdg-g1y0xocz{flex-shrink:1;min-width:0}.gdg-m1pnx84e .gdg-spacer{flex:1 1}.gdg-m1pnx84e .gdg-edit-icon{align-items:center;border-radius:6px;color:var(--gdg-accent-color);cursor:pointer;display:flex;flex-shrink:0;height:24px;justify-content:center;padding:0;position:relative;transition:all "0.125s ease";width:24px}.gdg-m1pnx84e .gdg-edit-icon>*{height:16px;width:16px}.gdg-m1pnx84e .gdg-edit-hover:hover{background-color:var(--gdg-accent-light);transition:background-color .15s}.gdg-m1pnx84e .gdg-checkmark-hover:hover{background-color:var(--gdg-accent-color);color:#fff}.gdg-m1pnx84e .gdg-md-edit-textarea{height:0;left:0;margin-top:25px;opacity:0;padding:0;position:relative;top:0;width:0}.gdg-m1pnx84e .gdg-ml-6{margin-left:6px}.gdg-i2iowwq{display:flex;height:100%}.gdg-i2iowwq .gdg-centering-container{align-items:center;display:flex;height:100%;justify-content:center}.gdg-i2iowwq .gdg-centering-container canvas,.gdg-i2iowwq .gdg-centering-container img{max-height:calc(100vh - var(--overlay-top) - 20px);object-fit:contain;-webkit-user-select:none;user-select:none}.gdg-i2iowwq .gdg-centering-container canvas{max-width:380px}.gdg-i2iowwq .gdg-edit-icon{align-items:center;color:var(--gdg-accent-color);cursor:pointer;display:flex;height:48px;justify-content:center;position:absolute;right:0;top:12px;width:48px}.gdg-i2iowwq .gdg-edit-icon>*{height:24px;width:24px}.gdg-i2iowwq textarea{height:0;left:0;opacity:0;position:absolute;top:0;width:0}.gdg-izpuzkl{-webkit-text-fill-color:var(--gdg-text-dark);background-color:initial;border:0;border-radius:0;bottom:0;color:var(--gdg-text-dark);font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);height:100%;left:0;line-height:16px;margin:0;min-width:100%;overflow:hidden;padding:0;position:absolute;resize:none;right:0;top:0;white-space:pre-wrap;width:100%}.gdg-izpuzkl::placeholder{color:var(--gdg-text-light)}.gdg-invalid .gdg-izpuzkl{-webkit-text-decoration:underline;text-decoration:underline;text-decoration-color:#d60606}.gdg-s69h75o{word-wrap:break-word;color:var(--gdg-text-dark);font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);line-height:16px;margin:0;max-width:100%;min-width:100%;padding:0 0 2px;visibility:hidden;white-space:pre-wrap;width:-webkit-max-content;width:max-content}.gdg-g1y0xocz{margin-top:6px;position:relative}.gdg-mnuv029{-webkit-touch-callout:default;padding-top:6px;word-break:break-word}.gdg-mnuv029>*{margin:0}.gdg-mnuv029 :last-child{margin-bottom:0}.gdg-mnuv029 p img{width:100%}.gdg-wmyidgi{direction:ltr;height:var(--wmyidgi-1);max-height:100%;max-width:100%;min-height:10px;min-width:10px;overflow:hidden;overflow:clip;position:relative;width:var(--wmyidgi-0)}.gdg-wmyidgi>:first-child{height:100%;left:0;position:absolute;top:0;width:100%}.gdg-s1dgczr6 .dvn-scroller{overflow:var(--s1dgczr6-0);transform:translateZ(0)}.gdg-s1dgczr6 .dvn-hidden{visibility:hidden}.gdg-s1dgczr6 .dvn-scroll-inner{display:flex;pointer-events:none}.gdg-s1dgczr6 .dvn-scroll-inner>*{flex-shrink:0}.gdg-s1dgczr6 .dvn-scroll-inner .dvn-spacer{flex-grow:1}.gdg-s1dgczr6 .dvn-scroll-inner .dvn-stack{display:flex;flex-direction:column}.gdg-s1dgczr6 .dvn-underlay>*{left:0;position:absolute;top:0}.gdg-s1dgczr6 canvas{outline:none}.gdg-s1dgczr6 canvas *{height:0}.gdg-seveqep{animation:gdg-search-fadein-gdg-seveqep .15s forwards;background-color:var(--gdg-bg-cell);border:1px solid var(--gdg-border-color);border-radius:6px;color:var(--gdg-text-dark);font-size:var(--gdg-editor-font-size);padding:8px;position:absolute;right:20px;top:4px}.gdg-seveqep.out{animation:gdg-search-fadeout-gdg-seveqep .15s forwards}.gdg-seveqep .gdg-search-bar-inner{display:flex}.gdg-seveqep .gdg-search-status{font-size:11px;padding-top:4px}.gdg-seveqep .gdg-search-progress{background-color:var(--gdg-text-light);bottom:0;height:4px;left:0;position:absolute}.gdg-seveqep input{background-color:var(--gdg-bg-cell);border:0;color:var(--gdg-textDark);outline:none;width:220px}.gdg-seveqep button{align-items:center;background:none;border:none;color:var(--gdg-text-medium);cursor:pointer;display:flex;height:24px;justify-content:center;outline:none;padding:0;width:24px}.gdg-seveqep button:hover{color:var(--gdg-text-dark)}.gdg-seveqep button .button-icon{height:16px;width:16px}.gdg-seveqep button:disabled{opacity:.4;pointer-events:none}@keyframes gdg-search-fadeout-gdg-seveqep{0%{transform:translateX(0)}to{transform:translateX(400px)}}@keyframes gdg-search-fadein-gdg-seveqep{0%{transform:translateX(400px)}to{transform:translateX(0)}}.gdg-w1i61rz{align-items:stretch;display:flex;flex-direction:column;margin-bottom:auto;margin-top:auto}.gdg-phbadu4,.gdg-w1i61rz .gdg-multi-select{font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size)}.gdg-phbadu4{color:var(--gdg-text-dark)}.gdg-phbadu4>div{border:1px solid var(--gdg-border-color);border-radius:4px}.gdg-wghi2zc{align-items:stretch;display:flex;flex-direction:column}.gdg-p13nj8j0,.gdg-wghi2zc .glide-select{font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size)}.gdg-p13nj8j0{color:var(--gdg-text-dark)}.gdg-p13nj8j0>div{border:1px solid var(--gdg-border-color);border-radius:4px}.gdg-r6sia3g{display:"flex";margin:auto 8.5px;padding-bottom:3px}.gdg-e1ywxz2x{align-items:center;color:var(--gdg-text-light);display:flex;padding:6px 0}.gdg-e1ywxz2x .gdg-active{color:var(--gdg-text-dark)}.gdg-e1ywxz2x>*{cursor:pointer;height:16px;margin-right:2px;position:relative;width:16px}.gdg-e1ywxz2x>* svg{height:100%;width:100%}.gdg-lw5nakc{display:flex;flex-direction:column;margin:4px 0}.gdg-lw5nakc>button{align-self:flex-end;background-color:initial;border:none;border-radius:4px;color:var(--gdg-accent-color);cursor:pointer;font-weight:600;outline:none;padding:6px 8px;transition:background-color .2s}.gdg-lw5nakc>button:focus-visible,.gdg-lw5nakc>button:hover{background-color:var(--gdg-accent-light)}.gdg-lw5nakc>button:disabled{opacity:.4;pointer-events:none}.gdg-lw5nakc .gdg-link-title-editor{display:flex;min-width:250px}.gdg-lw5nakc .gdg-link-title-editor>input{border:1px solid var(--gdg-border-color);border-radius:4px;box-shadow:none;flex-grow:1;min-width:0;outline:none;padding:6px 8px;transition:border .2s;width:0}.gdg-lw5nakc .gdg-link-title-editor>input:not(:last-child){margin-right:4px}.gdg-lw5nakc .gdg-link-title-editor>input:focus{border:1px solid var(--gdg-accent-color)}.gdg-lw5nakc .gdg-link-title-editor:not(:last-child){margin-bottom:4px}.gdg-lw5nakc .gdg-link-title-editor>button{background-color:initial;border:none;border-radius:4px;color:var(--gdg-text-medium);cursor:pointer;outline:none;transition:background-color .2s,color .2s}.gdg-lw5nakc .gdg-link-title-editor>button:focus-visible,.gdg-lw5nakc .gdg-link-title-editor>button:hover{background-color:var(--gdg-accent-light);color:var(--gdg-text-dark)}.gdg-w1hnqk7o .gdg-footer{display:flex;justify-content:flex-end;padding:20px}.gdg-w1hnqk7o .gdg-footer button{border:none;border-radius:9px;border-radius:var(--gdg-rounding-radius,9px);cursor:pointer;font-family:var(--gdg-font-family);font-size:14px;font-weight:500;padding:8px 16px}.gdg-w1hnqk7o .gdg-save-button{background-color:var(--gdg-accent-color);color:var(--gdg-accent-fg)}.gdg-w1hnqk7o .gdg-close-button{background-color:var(--gdg-bg-header);color:var(--gdg-text-medium);margin-right:8px}.gdg-e1wnlokz{align-items:stretch;color:var(--gdg-text-dark);display:flex;flex-direction:column;padding-top:6px}.gdg-e1wnlokz,.gdg-e1wnlokz *{box-sizing:border-box}.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz label{cursor:pointer;display:flex}.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz label input{cursor:pointer;width:auto}.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz label .gdg-pill{align-items:center;background-color:var(--gdg-bg-bubble);border-radius:var(--e1wnlokz-0);border-radius:var(--gdg-rounding-radius,var(--e1wnlokz-0));display:flex;font:12px var(--gdg-font-family);margin-bottom:6px;margin-left:8px;margin-right:6px;min-height:var(--e1wnlokz-1);padding:2px var(--e1wnlokz-2);transition:box-shadow .15s}.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz label .gdg-pill.gdg-unselected{opacity:.8}.gdg-e1wnlokz label:hover .gdg-pill{box-shadow:0 1px 4px #00000026}.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz.gdg-readonly label{cursor:default}.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz.gdg-e1wnlokz.gdg-readonly label .gdg-pill{box-shadow:none!important}.gdg-s1wtovjx{background-color:initial;border:none;color:var(--gdg-text-dark);font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);min-height:26px;outline:none}.gdg-s1wtovjx::-webkit-calendar-picker-indicator{background-color:#fff}
|