streamlit-nightly 1.37.2.dev20240805__py2.py3-none-any.whl → 1.37.2.dev20240807__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/dataframe_util.py +328 -72
- streamlit/delta_generator.py +2 -1
- streamlit/elements/arrow.py +5 -8
- streamlit/elements/json.py +13 -13
- streamlit/elements/lib/column_config_utils.py +1 -35
- streamlit/elements/widgets/data_editor.py +28 -9
- streamlit/elements/write.py +21 -28
- streamlit/runtime/caching/cache_utils.py +12 -9
- streamlit/static/asset-manifest.json +16 -15
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{1451.e9542cc9.chunk.js → 1451.913b0f90.chunk.js} +1 -1
- streamlit/static/static/js/{1792.8bd6ce2a.chunk.js → 1792.eb8a836f.chunk.js} +1 -1
- streamlit/static/static/js/{2469.31e2695e.chunk.js → 2469.c4454803.chunk.js} +1 -1
- streamlit/static/static/js/3466.0cd981ca.chunk.js +2 -0
- streamlit/static/static/js/{3466.bb8e2e0c.chunk.js.LICENSE.txt → 3466.0cd981ca.chunk.js.LICENSE.txt} +10 -0
- streamlit/static/static/js/{3513.7dedbda2.chunk.js → 3513.577f3dc5.chunk.js} +1 -1
- streamlit/static/static/js/{4113.99983645.chunk.js → 4113.8b8c523d.chunk.js} +1 -1
- streamlit/static/static/js/{4335.fb48fd8e.chunk.js → 4335.2b77e051.chunk.js} +1 -1
- streamlit/static/static/js/{4477.b85593dd.chunk.js → 4477.edb1d80a.chunk.js} +1 -1
- streamlit/static/static/js/{5106.e53c485c.chunk.js → 5106.656a5db4.chunk.js} +1 -1
- streamlit/static/static/js/5267.b73f42da.chunk.js +2 -0
- streamlit/static/static/js/5267.b73f42da.chunk.js.LICENSE.txt +1 -0
- streamlit/static/static/js/{6853.93dd1c4c.chunk.js → 6853.e7b24972.chunk.js} +1 -1
- streamlit/static/static/js/8148.539ddabe.chunk.js +1 -0
- streamlit/static/static/js/{8427.e051b59f.chunk.js → 8427.4594845a.chunk.js} +1 -1
- streamlit/static/static/js/{8477.4d2a23c2.chunk.js → 8477.90b06bd9.chunk.js} +1 -1
- streamlit/static/static/js/main.80efcd23.js +2 -0
- streamlit/static/static/js/{main.95daee38.js.LICENSE.txt → main.80efcd23.js.LICENSE.txt} +23 -1
- streamlit/type_util.py +46 -14
- {streamlit_nightly-1.37.2.dev20240805.dist-info → streamlit_nightly-1.37.2.dev20240807.dist-info}/METADATA +2 -2
- {streamlit_nightly-1.37.2.dev20240805.dist-info → streamlit_nightly-1.37.2.dev20240807.dist-info}/RECORD +35 -33
- streamlit/static/static/js/3466.bb8e2e0c.chunk.js +0 -2
- streamlit/static/static/js/8148.c7db8490.chunk.js +0 -1
- streamlit/static/static/js/main.95daee38.js +0 -2
- {streamlit_nightly-1.37.2.dev20240805.data → streamlit_nightly-1.37.2.dev20240807.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.37.2.dev20240805.dist-info → streamlit_nightly-1.37.2.dev20240807.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.37.2.dev20240805.dist-info → streamlit_nightly-1.37.2.dev20240807.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.37.2.dev20240805.dist-info → streamlit_nightly-1.37.2.dev20240807.dist-info}/top_level.txt +0 -0
streamlit/delta_generator.py
CHANGED
@@ -708,7 +708,8 @@ def _prep_data_for_add_rows(
|
|
708
708
|
) -> tuple[Data, AddRowsMetadata | None]:
|
709
709
|
if not add_rows_metadata:
|
710
710
|
if dataframe_util.is_pandas_styler(data):
|
711
|
-
# When calling add_rows on st.table or st.dataframe we want styles to
|
711
|
+
# When calling add_rows on st.table or st.dataframe we want styles to
|
712
|
+
# pass through.
|
712
713
|
return data, None
|
713
714
|
return dataframe_util.convert_anything_to_pandas_df(data), None
|
714
715
|
|
streamlit/elements/arrow.py
CHANGED
@@ -513,12 +513,7 @@ class ArrowMixin:
|
|
513
513
|
data_df = dataframe_util.convert_anything_to_pandas_df(
|
514
514
|
data, ensure_copy=False
|
515
515
|
)
|
516
|
-
apply_data_specific_configs(
|
517
|
-
column_config_mapping,
|
518
|
-
data_df,
|
519
|
-
data_format,
|
520
|
-
check_arrow_compatibility=False,
|
521
|
-
)
|
516
|
+
apply_data_specific_configs(column_config_mapping, data_format)
|
522
517
|
# Serialize the data to bytes:
|
523
518
|
proto.data = dataframe_util.convert_pandas_df_to_arrow_bytes(data_df)
|
524
519
|
|
@@ -599,8 +594,10 @@ class ArrowMixin:
|
|
599
594
|
|
600
595
|
"""
|
601
596
|
|
602
|
-
# Check if data is uncollected, and collect it but with 100 rows max, instead of
|
603
|
-
#
|
597
|
+
# Check if data is uncollected, and collect it but with 100 rows max, instead of
|
598
|
+
# 10k rows, which is done in all other cases.
|
599
|
+
# We use 100 rows in st.table, because large tables render slowly,
|
600
|
+
# take too much screen space, and can crush the app.
|
604
601
|
if dataframe_util.is_unevaluated_data_object(data):
|
605
602
|
data = dataframe_util.convert_anything_to_pandas_df(
|
606
603
|
data, max_unevaluated_rows=100
|
streamlit/elements/json.py
CHANGED
@@ -15,13 +15,13 @@
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
17
|
import json
|
18
|
+
import types
|
19
|
+
from collections import ChainMap, UserDict
|
18
20
|
from typing import TYPE_CHECKING, Any, cast
|
19
21
|
|
20
22
|
from streamlit.proto.Json_pb2 import Json as JsonProto
|
21
|
-
from streamlit.runtime.context import StreamlitCookies, StreamlitHeaders
|
22
23
|
from streamlit.runtime.metrics_util import gather_metrics
|
23
|
-
from streamlit.
|
24
|
-
from streamlit.user_info import UserInfoProxy
|
24
|
+
from streamlit.type_util import is_custom_dict, is_namedtuple
|
25
25
|
|
26
26
|
if TYPE_CHECKING:
|
27
27
|
from streamlit.delta_generator import DeltaGenerator
|
@@ -79,18 +79,18 @@ class JsonMixin:
|
|
79
79
|
"""
|
80
80
|
import streamlit as st
|
81
81
|
|
82
|
-
if
|
83
|
-
body,
|
84
|
-
(
|
85
|
-
SessionStateProxy,
|
86
|
-
UserInfoProxy,
|
87
|
-
QueryParamsProxy,
|
88
|
-
StreamlitHeaders,
|
89
|
-
StreamlitCookies,
|
90
|
-
),
|
91
|
-
):
|
82
|
+
if is_custom_dict(body):
|
92
83
|
body = body.to_dict()
|
93
84
|
|
85
|
+
if is_namedtuple(body):
|
86
|
+
body = body._asdict()
|
87
|
+
|
88
|
+
if isinstance(body, (map, enumerate)):
|
89
|
+
body = list(body)
|
90
|
+
|
91
|
+
if isinstance(body, (ChainMap, types.MappingProxyType, UserDict)):
|
92
|
+
body = dict(body)
|
93
|
+
|
94
94
|
if not isinstance(body, str):
|
95
95
|
try:
|
96
96
|
# Serialize body to string and try to interpret sets as lists
|
@@ -21,7 +21,7 @@ from typing import TYPE_CHECKING, Dict, Final, Literal, Mapping, Union
|
|
21
21
|
|
22
22
|
from typing_extensions import TypeAlias
|
23
23
|
|
24
|
-
from streamlit.dataframe_util import DataFormat
|
24
|
+
from streamlit.dataframe_util import DataFormat
|
25
25
|
from streamlit.elements.lib.column_types import ColumnConfig, ColumnType
|
26
26
|
from streamlit.elements.lib.dicttools import remove_none_values
|
27
27
|
from streamlit.errors import StreamlitAPIException
|
@@ -466,9 +466,7 @@ def update_column_config(
|
|
466
466
|
|
467
467
|
def apply_data_specific_configs(
|
468
468
|
columns_config: ColumnConfigMapping,
|
469
|
-
data_df: DataFrame,
|
470
469
|
data_format: DataFormat,
|
471
|
-
check_arrow_compatibility: bool = False,
|
472
470
|
) -> None:
|
473
471
|
"""Apply data specific configurations to the provided dataframe.
|
474
472
|
|
@@ -480,24 +478,9 @@ def apply_data_specific_configs(
|
|
480
478
|
columns_config : ColumnConfigMapping
|
481
479
|
A mapping of column names/ids to column configurations.
|
482
480
|
|
483
|
-
data_df : pd.DataFrame
|
484
|
-
The dataframe to apply the configurations to.
|
485
|
-
|
486
481
|
data_format : DataFormat
|
487
482
|
The format of the data.
|
488
|
-
|
489
|
-
check_arrow_compatibility : bool
|
490
|
-
Whether to check if the data is compatible with arrow.
|
491
483
|
"""
|
492
|
-
import pandas as pd
|
493
|
-
|
494
|
-
# Deactivate editing for columns that are not compatible with arrow
|
495
|
-
if check_arrow_compatibility:
|
496
|
-
for column_name, column_data in data_df.items():
|
497
|
-
if is_colum_type_arrow_incompatible(column_data):
|
498
|
-
update_column_config(columns_config, column_name, {"disabled": True})
|
499
|
-
# Convert incompatible type to string
|
500
|
-
data_df[column_name] = column_data.astype("string")
|
501
484
|
|
502
485
|
# Pandas adds a range index as default to all datastructures
|
503
486
|
# but for most of the non-pandas data objects it is unnecessary
|
@@ -514,23 +497,6 @@ def apply_data_specific_configs(
|
|
514
497
|
]:
|
515
498
|
update_column_config(columns_config, INDEX_IDENTIFIER, {"hidden": True})
|
516
499
|
|
517
|
-
# Rename the first column to "value" for some of the data formats
|
518
|
-
if data_format in [
|
519
|
-
DataFormat.SET_OF_VALUES,
|
520
|
-
DataFormat.TUPLE_OF_VALUES,
|
521
|
-
DataFormat.LIST_OF_VALUES,
|
522
|
-
DataFormat.NUMPY_LIST,
|
523
|
-
DataFormat.KEY_VALUE_DICT,
|
524
|
-
]:
|
525
|
-
# Pandas automatically names the first column "0"
|
526
|
-
# We rename it to "value" in selected cases to make it more descriptive
|
527
|
-
data_df.rename(columns={0: "value"}, inplace=True)
|
528
|
-
|
529
|
-
if not isinstance(data_df.index, pd.RangeIndex):
|
530
|
-
# If the index is not a range index, we will configure it as required
|
531
|
-
# since the user is required to provide a (unique) value for editing.
|
532
|
-
update_column_config(columns_config, INDEX_IDENTIFIER, {"required": True})
|
533
|
-
|
534
500
|
|
535
501
|
def _convert_column_config_to_json(column_config_mapping: ColumnConfigMapping) -> str:
|
536
502
|
try:
|
@@ -415,8 +415,8 @@ def _is_supported_index(df_index: pd.Index) -> bool:
|
|
415
415
|
# Period type isn't editable currently:
|
416
416
|
# pd.PeriodIndex,
|
417
417
|
]
|
418
|
-
# We need to check these index types without importing, since they are
|
419
|
-
# and planned to be removed soon.
|
418
|
+
# We need to check these index types without importing, since they are
|
419
|
+
# deprecated and planned to be removed soon.
|
420
420
|
or is_type(df_index, "pandas.core.indexes.numeric.Int64Index")
|
421
421
|
or is_type(df_index, "pandas.core.indexes.numeric.Float64Index")
|
422
422
|
or is_type(df_index, "pandas.core.indexes.numeric.UInt64Index")
|
@@ -817,19 +817,38 @@ class DataEditorMixin:
|
|
817
817
|
|
818
818
|
# Convert the user provided column config into the frontend compatible format:
|
819
819
|
column_config_mapping = process_config_mapping(column_config)
|
820
|
-
|
821
|
-
|
822
|
-
)
|
820
|
+
|
821
|
+
# Deactivate editing for columns that are not compatible with arrow
|
822
|
+
for column_name, column_data in data_df.items():
|
823
|
+
if dataframe_util.is_colum_type_arrow_incompatible(column_data):
|
824
|
+
update_column_config(
|
825
|
+
column_config_mapping, column_name, {"disabled": True}
|
826
|
+
)
|
827
|
+
# Convert incompatible type to string
|
828
|
+
data_df[column_name] = column_data.astype("string")
|
829
|
+
|
830
|
+
apply_data_specific_configs(column_config_mapping, data_format)
|
823
831
|
|
824
832
|
# Fix the column headers to work correctly for data editing:
|
825
833
|
_fix_column_headers(data_df)
|
826
|
-
|
827
|
-
|
828
|
-
|
834
|
+
|
835
|
+
has_range_index = isinstance(data_df.index, pd.RangeIndex)
|
836
|
+
|
837
|
+
if not has_range_index:
|
838
|
+
# If the index is not a range index, we will configure it as required
|
839
|
+
# since the user is required to provide a (unique) value for editing.
|
829
840
|
update_column_config(
|
830
|
-
column_config_mapping, INDEX_IDENTIFIER, {"
|
841
|
+
column_config_mapping, INDEX_IDENTIFIER, {"required": True}
|
831
842
|
)
|
832
843
|
|
844
|
+
if hide_index is None and has_range_index and num_rows == "dynamic":
|
845
|
+
# Temporary workaround:
|
846
|
+
# We hide range indices if num_rows is dynamic.
|
847
|
+
# since the current way of handling this index during editing is a
|
848
|
+
# bit confusing. The user can still decide to show the index by
|
849
|
+
# setting hide_index explicitly to False.
|
850
|
+
hide_index = True
|
851
|
+
|
833
852
|
if hide_index is not None:
|
834
853
|
update_column_config(
|
835
854
|
column_config_mapping, INDEX_IDENTIFIER, {"hidden": hide_index}
|
streamlit/elements/write.py
CHANGED
@@ -16,23 +16,20 @@ from __future__ import annotations
|
|
16
16
|
|
17
17
|
import dataclasses
|
18
18
|
import inspect
|
19
|
-
import json
|
20
19
|
import types
|
20
|
+
from collections import ChainMap, UserDict
|
21
21
|
from io import StringIO
|
22
22
|
from typing import TYPE_CHECKING, Any, Callable, Final, Generator, Iterable, List, cast
|
23
23
|
|
24
24
|
from streamlit import dataframe_util, type_util
|
25
25
|
from streamlit.errors import StreamlitAPIException
|
26
26
|
from streamlit.logger import get_logger
|
27
|
-
from streamlit.runtime.context import StreamlitCookies, StreamlitHeaders
|
28
27
|
from streamlit.runtime.metrics_util import gather_metrics
|
29
|
-
from streamlit.runtime.state import QueryParamsProxy, SessionStateProxy
|
30
28
|
from streamlit.string_util import (
|
31
29
|
is_mem_address_str,
|
32
30
|
max_char_sequence,
|
33
31
|
probably_contains_html_tags,
|
34
32
|
)
|
35
|
-
from streamlit.user_info import UserInfoProxy
|
36
33
|
|
37
34
|
if TYPE_CHECKING:
|
38
35
|
from streamlit.delta_generator import DeltaGenerator
|
@@ -168,7 +165,7 @@ class WriteMixin:
|
|
168
165
|
if type_util.is_openai_chunk(chunk):
|
169
166
|
# Try to convert OpenAI chat completion chunk to a string:
|
170
167
|
try:
|
171
|
-
if len(chunk.choices) == 0:
|
168
|
+
if len(chunk.choices) == 0 or chunk.choices[0].delta is None:
|
172
169
|
# The choices list can be empty. E.g. when using the
|
173
170
|
# AzureOpenAI client, the first chunk will always be empty.
|
174
171
|
chunk = ""
|
@@ -252,7 +249,8 @@ class WriteMixin:
|
|
252
249
|
- write(string) : Prints the formatted Markdown string, with
|
253
250
|
support for LaTeX expression, emoji shortcodes, and colored text.
|
254
251
|
See docs for st.markdown for more.
|
255
|
-
- write(data_frame) : Displays
|
252
|
+
- write(data_frame) : Displays any dataframe-compatible value
|
253
|
+
as read-only table.
|
256
254
|
- write(error) : Prints an exception specially.
|
257
255
|
- write(func) : Displays information about a function.
|
258
256
|
- write(module) : Displays information about the module.
|
@@ -408,9 +406,7 @@ class WriteMixin:
|
|
408
406
|
elif isinstance(arg, Exception):
|
409
407
|
flush_buffer()
|
410
408
|
self.dg.exception(arg)
|
411
|
-
elif dataframe_util.is_dataframe_like(
|
412
|
-
arg
|
413
|
-
) or dataframe_util.is_snowpark_row_list(arg):
|
409
|
+
elif dataframe_util.is_dataframe_like(arg):
|
414
410
|
flush_buffer()
|
415
411
|
self.dg.dataframe(arg)
|
416
412
|
elif type_util.is_altair_chart(arg):
|
@@ -440,23 +436,24 @@ class WriteMixin:
|
|
440
436
|
flush_buffer()
|
441
437
|
dot = vis_utils.model_to_dot(arg)
|
442
438
|
self.dg.graphviz_chart(dot.to_string())
|
443
|
-
elif
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
439
|
+
elif (
|
440
|
+
isinstance(
|
441
|
+
arg,
|
442
|
+
(
|
443
|
+
dict,
|
444
|
+
list,
|
445
|
+
map,
|
446
|
+
enumerate,
|
447
|
+
types.MappingProxyType,
|
448
|
+
UserDict,
|
449
|
+
ChainMap,
|
450
|
+
),
|
451
|
+
)
|
452
|
+
or type_util.is_custom_dict(arg)
|
453
|
+
or type_util.is_namedtuple(arg)
|
454
454
|
):
|
455
455
|
flush_buffer()
|
456
456
|
self.dg.json(arg)
|
457
|
-
elif type_util.is_namedtuple(arg):
|
458
|
-
flush_buffer()
|
459
|
-
self.dg.json(json.dumps(arg._asdict()))
|
460
457
|
elif type_util.is_pydeck(arg):
|
461
458
|
flush_buffer()
|
462
459
|
self.dg.pydeck_chart(arg)
|
@@ -482,16 +479,12 @@ class WriteMixin:
|
|
482
479
|
# https://github.com/python/mypy/issues/12933
|
483
480
|
self.dg.help(cast(type, arg))
|
484
481
|
elif (
|
485
|
-
|
486
|
-
and callable(arg._repr_html_)
|
482
|
+
type_util.has_callable_attr(arg, "_repr_html_")
|
487
483
|
and (repr_html := arg._repr_html_())
|
488
484
|
and (unsafe_allow_html or not probably_contains_html_tags(repr_html))
|
489
485
|
):
|
490
486
|
# We either explicitly allow HTML or infer it's not HTML
|
491
487
|
self.dg.markdown(repr_html, unsafe_allow_html=unsafe_allow_html)
|
492
|
-
elif type_util.is_streamlit_secrets_class(arg):
|
493
|
-
flush_buffer()
|
494
|
-
self.dg.json(arg.to_dict())
|
495
488
|
else:
|
496
489
|
stringified_arg = str(arg)
|
497
490
|
|
@@ -299,20 +299,23 @@ class CachedFunc:
|
|
299
299
|
try:
|
300
300
|
cache.write_result(value_key, computed_value, messages)
|
301
301
|
return computed_value
|
302
|
-
except (CacheError, RuntimeError):
|
303
|
-
# An exception was thrown while we tried to write to the cache. Report
|
304
|
-
# (We catch `RuntimeError` here because it will be
|
305
|
-
# collect dataframe before
|
302
|
+
except (CacheError, RuntimeError) as ex:
|
303
|
+
# An exception was thrown while we tried to write to the cache. Report
|
304
|
+
# it to the user. (We catch `RuntimeError` here because it will be
|
305
|
+
# raised by Apache Spark if we do not collect dataframe before
|
306
|
+
# using `st.cache_data`.)
|
306
307
|
if is_unevaluated_data_object(computed_value):
|
307
308
|
# If the returned value is an unevaluated dataframe, raise an error.
|
308
309
|
# Unevaluated dataframes are not yet in the local memory, which also
|
309
310
|
# means they cannot be properly cached (serialized).
|
310
311
|
raise UnevaluatedDataFrameError(
|
311
|
-
f""
|
312
|
-
|
313
|
-
of type `{type_util.get_fqn_type(computed_value)}`.
|
314
|
-
|
315
|
-
|
312
|
+
f"The function {get_cached_func_name_md(self._info.func)} is "
|
313
|
+
"decorated with `st.cache_data` but it returns an unevaluated "
|
314
|
+
f"data object of type `{type_util.get_fqn_type(computed_value)}`. "
|
315
|
+
"Please convert the object to a serializable format "
|
316
|
+
"(e.g. Pandas DataFrame) before returning it, so "
|
317
|
+
"`st.cache_data` can serialize and cache it."
|
318
|
+
) from ex
|
316
319
|
raise UnserializableReturnValueError(
|
317
320
|
return_value=computed_value, func=self._info.func
|
318
321
|
)
|
@@ -1,40 +1,40 @@
|
|
1
1
|
{
|
2
2
|
"files": {
|
3
3
|
"main.css": "./static/css/main.554f96d9.css",
|
4
|
-
"main.js": "./static/js/main.
|
4
|
+
"main.js": "./static/js/main.80efcd23.js",
|
5
5
|
"static/js/9336.3e046ad7.chunk.js": "./static/js/9336.3e046ad7.chunk.js",
|
6
6
|
"static/js/9330.2b4c99e0.chunk.js": "./static/js/9330.2b4c99e0.chunk.js",
|
7
7
|
"static/js/2736.7d516fcc.chunk.js": "./static/js/2736.7d516fcc.chunk.js",
|
8
8
|
"static/js/3301.0cd98943.chunk.js": "./static/js/3301.0cd98943.chunk.js",
|
9
9
|
"static/css/8148.49dfd2ce.chunk.css": "./static/css/8148.49dfd2ce.chunk.css",
|
10
|
-
"static/js/8148.
|
10
|
+
"static/js/8148.539ddabe.chunk.js": "./static/js/8148.539ddabe.chunk.js",
|
11
11
|
"static/css/5441.e3b876c5.chunk.css": "./static/css/5441.e3b876c5.chunk.css",
|
12
12
|
"static/js/5441.a564862e.chunk.js": "./static/js/5441.a564862e.chunk.js",
|
13
|
-
"static/js/8427.
|
13
|
+
"static/js/8427.4594845a.chunk.js": "./static/js/8427.4594845a.chunk.js",
|
14
14
|
"static/js/7323.b74cc85b.chunk.js": "./static/js/7323.b74cc85b.chunk.js",
|
15
15
|
"static/js/8536.572570cc.chunk.js": "./static/js/8536.572570cc.chunk.js",
|
16
16
|
"static/js/7805.acc6316a.chunk.js": "./static/js/7805.acc6316a.chunk.js",
|
17
17
|
"static/js/4500.c007e274.chunk.js": "./static/js/4500.c007e274.chunk.js",
|
18
18
|
"static/js/1307.36b77087.chunk.js": "./static/js/1307.36b77087.chunk.js",
|
19
|
-
"static/js/2469.
|
20
|
-
"static/js/4113.
|
19
|
+
"static/js/2469.c4454803.chunk.js": "./static/js/2469.c4454803.chunk.js",
|
20
|
+
"static/js/4113.8b8c523d.chunk.js": "./static/js/4113.8b8c523d.chunk.js",
|
21
21
|
"static/js/1168.aa1401dd.chunk.js": "./static/js/1168.aa1401dd.chunk.js",
|
22
22
|
"static/js/178.7bea8c5d.chunk.js": "./static/js/178.7bea8c5d.chunk.js",
|
23
|
-
"static/js/1792.
|
23
|
+
"static/js/1792.eb8a836f.chunk.js": "./static/js/1792.eb8a836f.chunk.js",
|
24
24
|
"static/js/1116.d8656dab.chunk.js": "./static/js/1116.d8656dab.chunk.js",
|
25
|
-
"static/js/3513.
|
25
|
+
"static/js/3513.577f3dc5.chunk.js": "./static/js/3513.577f3dc5.chunk.js",
|
26
26
|
"static/js/7602.b5f7407a.chunk.js": "./static/js/7602.b5f7407a.chunk.js",
|
27
27
|
"static/js/6013.f6083314.chunk.js": "./static/js/6013.f6083314.chunk.js",
|
28
|
-
"static/js/4335.
|
28
|
+
"static/js/4335.2b77e051.chunk.js": "./static/js/4335.2b77e051.chunk.js",
|
29
29
|
"static/js/4177.e5631c43.chunk.js": "./static/js/4177.e5631c43.chunk.js",
|
30
|
-
"static/js/1451.
|
30
|
+
"static/js/1451.913b0f90.chunk.js": "./static/js/1451.913b0f90.chunk.js",
|
31
31
|
"static/js/2634.1249dc7a.chunk.js": "./static/js/2634.1249dc7a.chunk.js",
|
32
32
|
"static/js/1074.86034b28.chunk.js": "./static/js/1074.86034b28.chunk.js",
|
33
|
-
"static/js/8477.
|
34
|
-
"static/js/6853.
|
35
|
-
"static/js/4477.
|
33
|
+
"static/js/8477.90b06bd9.chunk.js": "./static/js/8477.90b06bd9.chunk.js",
|
34
|
+
"static/js/6853.e7b24972.chunk.js": "./static/js/6853.e7b24972.chunk.js",
|
35
|
+
"static/js/4477.edb1d80a.chunk.js": "./static/js/4477.edb1d80a.chunk.js",
|
36
36
|
"static/js/4319.00adb829.chunk.js": "./static/js/4319.00adb829.chunk.js",
|
37
|
-
"static/js/5106.
|
37
|
+
"static/js/5106.656a5db4.chunk.js": "./static/js/5106.656a5db4.chunk.js",
|
38
38
|
"static/js/4666.c8694d51.chunk.js": "./static/js/4666.c8694d51.chunk.js",
|
39
39
|
"static/js/3599.f1e3cc27.chunk.js": "./static/js/3599.f1e3cc27.chunk.js",
|
40
40
|
"static/js/8691.95ba8af9.chunk.js": "./static/js/8691.95ba8af9.chunk.js",
|
@@ -47,11 +47,12 @@
|
|
47
47
|
"static/js/3053.7e70ec3b.chunk.js": "./static/js/3053.7e70ec3b.chunk.js",
|
48
48
|
"static/js/8005.43974a35.chunk.js": "./static/js/8005.43974a35.chunk.js",
|
49
49
|
"static/js/9656.8c935274.chunk.js": "./static/js/9656.8c935274.chunk.js",
|
50
|
+
"static/js/5267.b73f42da.chunk.js": "./static/js/5267.b73f42da.chunk.js",
|
50
51
|
"static/js/8570.6de19120.chunk.js": "./static/js/8570.6de19120.chunk.js",
|
51
52
|
"static/js/7142.83028745.chunk.js": "./static/js/7142.83028745.chunk.js",
|
52
53
|
"static/js/2178.90362aae.chunk.js": "./static/js/2178.90362aae.chunk.js",
|
53
54
|
"static/css/3466.8b8f33d6.chunk.css": "./static/css/3466.8b8f33d6.chunk.css",
|
54
|
-
"static/js/3466.
|
55
|
+
"static/js/3466.0cd981ca.chunk.js": "./static/js/3466.0cd981ca.chunk.js",
|
55
56
|
"static/js/7483.64f23be7.chunk.js": "./static/js/7483.64f23be7.chunk.js",
|
56
57
|
"static/js/5249.f2f4070d.chunk.js": "./static/js/5249.f2f4070d.chunk.js",
|
57
58
|
"static/js/9945.47d54f35.chunk.js": "./static/js/9945.47d54f35.chunk.js",
|
@@ -152,6 +153,6 @@
|
|
152
153
|
},
|
153
154
|
"entrypoints": [
|
154
155
|
"static/css/main.554f96d9.css",
|
155
|
-
"static/js/main.
|
156
|
+
"static/js/main.80efcd23.js"
|
156
157
|
]
|
157
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.80efcd23.js"></script><link href="./static/css/main.554f96d9.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1451],{61451:(t,e,s)=>{s.r(e),s.d(e,{default:()=>C});var i=s(66845),r=s(
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1451],{61451:(t,e,s)=>{s.r(e),s.d(e,{default:()=>C});var i=s(66845),r=s(25267),a=s.n(r),o=s(25621),n=s(15791),l=s(28278),d=s(13553),m=s(87814),p=s(98478),h=s(86659),c=s(8879),u=s(68411),g=s(50641),f=s(40864);const b="YYYY/MM/DD";function v(t){return t.map((t=>new Date(t)))}class y extends i.PureComponent{constructor(){super(...arguments),this.formClearHelper=new m.K,this.state={values:this.initialValue,isRange:this.props.element.isRange,isEmpty:!1},this.commitWidgetValue=t=>{const{widgetMgr:e,element:s,fragmentId:i}=this.props;var r;e.setStringArrayValue(s,(r=this.state.values)?r.map((t=>a()(t).format(b))):[],t,i)},this.onFormCleared=()=>{const t=v(this.props.element.default);this.setState({values:t,isEmpty:!t},(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=t=>{let{date:e}=t;if(null===e||void 0===e)return void this.setState({values:[],isEmpty:!0});const s=[];Array.isArray(e)?e.forEach((t=>{t&&s.push(t)})):s.push(e),this.setState({values:s,isEmpty:!s},(()=>{this.state.isEmpty||this.commitWidgetValue({fromUi:!0})}))},this.handleClose=()=>{const{isEmpty:t}=this.state;t&&this.setState(((t,e)=>({values:v(e.element.default),isEmpty:!v(e.element.default)})),(()=>{this.commitWidgetValue({fromUi:!0})}))},this.getMaxDate=()=>{const{element:t}=this.props,e=t.max;return e&&e.length>0?a()(e,b).toDate():void 0}}get initialValue(){const t=this.props.widgetMgr.getStringArrayValue(this.props.element);return v(void 0!==t?t:this.props.element.default||[])}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:t}=this.props.element;t&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:t}=this.props.element;this.props.element.setValue=!1;const e=t.map((t=>new Date(t)));this.setState({values:e,isEmpty:!e},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var t;const{width:e,element:s,disabled:i,theme:r,widgetMgr:o}=this.props,{values:m,isRange:v}=this.state,{colors:y,fontSizes:C,lineHeights:W,spacing:D}=r,x={width:e},I=a()(s.min,b).toDate(),F=this.getMaxDate(),V=0===s.default.length&&!i,S=s.format.replaceAll(/[a-zA-Z]/g,"9"),k=s.format.replaceAll("Y","y").replaceAll("D","d");return this.formClearHelper.manageFormClearListener(o,s.formId,this.onFormCleared),(0,f.jsxs)("div",{className:"stDateInput","data-testid":"stDateInput",style:x,children:[(0,f.jsx)(p.O,{label:s.label,disabled:i,labelVisibility:(0,g.iF)(null===(t=s.labelVisibility)||void 0===t?void 0:t.value),children:s.help&&(0,f.jsx)(h.dT,{children:(0,f.jsx)(c.Z,{content:s.help,placement:u.u.TOP_RIGHT})})}),(0,f.jsx)(n.Z,{density:l.pw.high,formatString:k,mask:v?"".concat(S," \u2013 ").concat(S):S,placeholder:v?"".concat(s.format," \u2013 ").concat(s.format):s.format,disabled:i,onChange:this.handleChange,onClose:this.handleClose,overrides:{Popover:{props:{placement:d.r4.bottomLeft,overrides:{Body:{style:{border:"".concat(r.sizes.borderWidth," solid ").concat(y.fadedText10)}}}}},CalendarContainer:{style:{fontSize:C.sm,paddingRight:r.spacing.sm,paddingLeft:r.spacing.sm,paddingBottom:r.spacing.sm,paddingTop:r.spacing.sm}},Week:{style:{fontSize:C.sm}},Day:{style:t=>{let{$pseudoHighlighted:e,$pseudoSelected:s,$selected:i,$isHovered:r}=t;return{fontSize:C.sm,lineHeight:W.base,"::before":{backgroundColor:i||s||e||r?"".concat(y.secondaryBg," !important"):y.transparent},"::after":{borderColor:y.transparent}}}},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:y.transparent},":focus":{backgroundColor:y.transparent,outline:0}})},NextButton:{style:{display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:y.transparent},":focus":{backgroundColor:y.transparent,outline:0}}},Input:{props:{maskChar:null,overrides:{Root:{style:{borderLeftWidth:r.sizes.borderWidth,borderRightWidth:r.sizes.borderWidth,borderTopWidth:r.sizes.borderWidth,borderBottomWidth:r.sizes.borderWidth}},ClearIcon:{props:{overrides:{Svg:{style:{color:r.colors.darkGray,transform:"scale(1.41)",width:r.spacing.twoXL,marginRight:"-8px",":hover":{fill:r.colors.bodyText}}}}}},Input:{style:{paddingRight:D.sm,paddingLeft:D.sm,paddingBottom:D.sm,paddingTop:D.sm,lineHeight:W.inputWidget},props:{"data-testid":"stDateInput-Input"}}}}}},value:m,minDate:I,maxDate:F,range:v,clearable:V})]})}}const C=(0,o.b)(y)},87814:(t,e,s)=>{s.d(e,{K:()=>r});var i=s(50641);class r{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(t,e,s){(0,i.bb)(this.formClearListener)&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),(0,i.bM)(e)&&(this.formClearListener=t.addFormClearedListener(e,s),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;null===(t=this.formClearListener)||void 0===t||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1792],{61792:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});i(66845);var s=i(81354),l=i(27446),a=i(9003),d=i(
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1792],{61792:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});i(66845);var s=i(81354),l=i(27446),a=i(9003),d=i(12596),r=i(40864);const n=function(e){const{disabled:t,element:i,widgetMgr:n,width:h,fragmentId:u}=e,c={width:h},p="primary"===i.type?s.nW.PRIMARY:s.nW.SECONDARY,o=!i.help||h;return(0,r.jsx)("div",{className:"row-widget stButton","data-testid":"stButton",style:c,children:(0,r.jsx)(l.t,{help:i.help,children:(0,r.jsx)(a.ZP,{kind:p,size:s.V5.SMALL,disabled:t,fluidWidth:!!i.useContainerWidth&&o,onClick:()=>n.setTriggerValue(i,{fromUi:!0},u),children:(0,r.jsx)(d.ZP,{source:i.label,allowHTML:!1,isLabel:!0,largerLabel:!0,disableLinks:!0})})})})}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[2469],{62469:(o,e,r)=>{r.r(e),r.d(e,{default:()=>h});r(66845);var t=r(81354),a=r(27446),i=r(
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[2469],{62469:(o,e,r)=>{r.r(e),r.d(e,{default:()=>h});r(66845);var t=r(81354),a=r(27446),i=r(12596),c=r(1515),n=r(35704);function l(o,e){switch(o){case t.V5.XSMALL:return{padding:"".concat(e.spacing.twoXS," ").concat(e.spacing.sm),fontSize:e.fontSizes.sm};case t.V5.SMALL:return{padding:"".concat(e.spacing.twoXS," ").concat(e.spacing.md)};case t.V5.LARGE:return{padding:"".concat(e.spacing.md," ").concat(e.spacing.md)};default:return{padding:"".concat(e.spacing.xs," ").concat(e.spacing.md)}}}const s=(0,c.Z)("a",{target:"e16zdaao2"})((o=>{let{fluidWidth:e,size:r,theme:t}=o;const a="number"==typeof e?"".concat(e,"px"):"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:t.fontWeights.normal,padding:"".concat(t.spacing.xs," ").concat(t.spacing.md),borderRadius:t.radii.default,minHeight:t.sizes.minElementHeight,margin:0,lineHeight:t.lineHeights.base,color:t.colors.primary,textDecoration:"none",width:e?a:"auto",userSelect:"none","&:visited":{color:t.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:"0 0 0 0.2rem ".concat((0,n.DZ)(t.colors.primary,.5))},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...l(r,t)}}),""),d=(0,c.Z)(s,{target:"e16zdaao1"})((o=>{let{theme:e}=o;return{backgroundColor:e.colors.primary,color:e.colors.white,border:"".concat(e.sizes.borderWidth," solid ").concat(e.colors.primary),"&:hover":{backgroundColor:(0,n._j)(e.colors.primary,.05),color:e.colors.white},"&:active":{backgroundColor:"transparent",color:e.colors.primary},"&:visited:not(:active)":{color:e.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:e.colors.fadedText10,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed"}}}),""),u=(0,c.Z)(s,{target:"e16zdaao0"})((o=>{let{theme:e}=o;return{backgroundColor:e.colors.lightenedBg05,color:e.colors.bodyText,border:"".concat(e.sizes.borderWidth," solid ").concat(e.colors.fadedText10),"&:visited":{color:e.colors.bodyText},"&:hover":{borderColor:e.colors.primary,color:e.colors.primary},"&:active":{color:e.colors.white,borderColor:e.colors.primary,backgroundColor:e.colors.primary},"&:focus:not(:active)":{borderColor:e.colors.primary,color:e.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:e.colors.fadedText10,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed"}}}),"");var p=r(40864);const b=function(o){let{kind:e,size:r,disabled:a,fluidWidth:i,children:c,autoFocus:n,href:l,rel:s,target:b,onClick:h}=o,g=d;return e===t.nW.SECONDARY&&(g=u),(0,p.jsx)(g,{kind:e,size:r||t.V5.MEDIUM,fluidWidth:i||!1,disabled:a||!1,autoFocus:n||!1,"data-testid":"baseLinkButton-".concat(e),href:l,target:b,rel:s,onClick:h,tabIndex:a?-1:0,children:c})};const h=function(o){const{disabled:e,element:r,width:c}=o,n={width:c},l="primary"===r.type?t.nW.PRIMARY:t.nW.SECONDARY,s=!r.help||c;return(0,p.jsx)("div",{className:"row-widget stLinkButton","data-testid":"stLinkButton",style:n,children:(0,p.jsx)(a.t,{help:r.help,children:(0,p.jsx)(b,{kind:l,size:t.V5.SMALL,disabled:e,onClick:e=>{o.disabled&&e.preventDefault()},fluidWidth:!!r.useContainerWidth&&s,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":e,children:(0,p.jsx)(i.ZP,{source:r.label,allowHTML:!1,isLabel:!0,largerLabel:!0,disableLinks:!0})})})})}}}]);
|