streamlit-nightly 1.38.1.dev20240917__py2.py3-none-any.whl → 1.38.1.dev20240919__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/commands/navigation.py +9 -0
- streamlit/components/v1/custom_component.py +2 -6
- streamlit/elements/arrow.py +1 -3
- streamlit/elements/deck_gl_json_chart.py +26 -2
- streamlit/elements/form.py +10 -1
- streamlit/elements/layouts.py +6 -1
- streamlit/elements/lib/utils.py +52 -6
- streamlit/elements/map.py +27 -1
- streamlit/elements/media.py +16 -5
- streamlit/elements/plotly_chart.py +1 -3
- streamlit/elements/vega_charts.py +1 -3
- streamlit/elements/widgets/button.py +7 -5
- streamlit/elements/widgets/button_group.py +1 -3
- streamlit/elements/widgets/camera_input.py +1 -3
- streamlit/elements/widgets/chat.py +2 -2
- streamlit/elements/widgets/checkbox.py +1 -3
- streamlit/elements/widgets/color_picker.py +1 -3
- streamlit/elements/widgets/data_editor.py +1 -3
- streamlit/elements/widgets/file_uploader.py +1 -3
- streamlit/elements/widgets/multiselect.py +1 -3
- streamlit/elements/widgets/number_input.py +1 -3
- streamlit/elements/widgets/radio.py +1 -3
- streamlit/elements/widgets/select_slider.py +1 -3
- streamlit/elements/widgets/selectbox.py +1 -3
- streamlit/elements/widgets/slider.py +1 -3
- streamlit/elements/widgets/text_widgets.py +2 -6
- streamlit/elements/widgets/time_widgets.py +2 -6
- streamlit/navigation/page.py +10 -6
- streamlit/proto/Block_pb2.py +13 -13
- streamlit/proto/Block_pb2.pyi +4 -1
- streamlit/proto/DeckGlJsonChart_pb2.py +3 -3
- streamlit/proto/DeckGlJsonChart_pb2.pyi +9 -1
- streamlit/proto/Navigation_pb2.py +4 -4
- streamlit/proto/Navigation_pb2.pyi +4 -1
- streamlit/static/asset-manifest.json +12 -11
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{1086.b7ec1344.chunk.js → 1086.464de8f9.chunk.js} +1 -1
- streamlit/static/static/js/{1260.eaaa4e75.chunk.js → 1260.e6289cc2.chunk.js} +1 -1
- streamlit/static/static/js/2055.bca43613.chunk.js +1 -0
- streamlit/static/static/js/{5618.f7838309.chunk.js → 5618.0a42d599.chunk.js} +1 -1
- streamlit/static/static/js/{7077.e21833ae.chunk.js → 6789.f8dde736.chunk.js} +2 -2
- streamlit/static/static/js/8485.81bdf474.chunk.js +1 -0
- streamlit/static/static/js/{954.88cae675.chunk.js → 954.1da91b19.chunk.js} +2 -2
- streamlit/static/static/js/9943.d18fdff1.chunk.js +1 -0
- streamlit/static/static/js/{main.50e02474.js → main.61ca8755.js} +5 -5
- {streamlit_nightly-1.38.1.dev20240917.dist-info → streamlit_nightly-1.38.1.dev20240919.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.38.1.dev20240917.dist-info → streamlit_nightly-1.38.1.dev20240919.dist-info}/RECORD +55 -54
- streamlit/static/static/js/3156.002c6ee0.chunk.js +0 -1
- streamlit/static/static/js/7493.95e79b96.chunk.js +0 -1
- /streamlit/static/static/css/{7077.81b3d18f.chunk.css → 6789.81b3d18f.chunk.css} +0 -0
- /streamlit/static/static/css/{3156.93909c7e.chunk.css → 9943.93909c7e.chunk.css} +0 -0
- /streamlit/static/static/js/{7077.e21833ae.chunk.js.LICENSE.txt → 6789.f8dde736.chunk.js.LICENSE.txt} +0 -0
- /streamlit/static/static/js/{main.50e02474.js.LICENSE.txt → main.61ca8755.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.38.1.dev20240917.data → streamlit_nightly-1.38.1.dev20240919.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.38.1.dev20240917.dist-info → streamlit_nightly-1.38.1.dev20240919.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.38.1.dev20240917.dist-info → streamlit_nightly-1.38.1.dev20240919.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.38.1.dev20240917.dist-info → streamlit_nightly-1.38.1.dev20240919.dist-info}/top_level.txt +0 -0
@@ -359,17 +359,15 @@ class NumberInputMixin:
|
|
359
359
|
element_id = compute_and_register_element_id(
|
360
360
|
"number_input",
|
361
361
|
user_key=key,
|
362
|
+
form_id=current_form_id(self.dg),
|
362
363
|
label=label,
|
363
364
|
min_value=min_value,
|
364
365
|
max_value=max_value,
|
365
366
|
value=value,
|
366
367
|
step=step,
|
367
368
|
format=format,
|
368
|
-
key=key,
|
369
369
|
help=help,
|
370
370
|
placeholder=None if placeholder is None else str(placeholder),
|
371
|
-
form_id=current_form_id(self.dg),
|
372
|
-
page=ctx.active_script_hash if ctx else None,
|
373
371
|
)
|
374
372
|
|
375
373
|
# Ensure that all arguments are of the same type.
|
@@ -315,15 +315,13 @@ class RadioMixin:
|
|
315
315
|
element_id = compute_and_register_element_id(
|
316
316
|
"radio",
|
317
317
|
user_key=key,
|
318
|
+
form_id=current_form_id(self.dg),
|
318
319
|
label=label,
|
319
320
|
options=[str(format_func(option)) for option in opt],
|
320
321
|
index=index,
|
321
|
-
key=key,
|
322
322
|
help=help,
|
323
323
|
horizontal=horizontal,
|
324
324
|
captions=captions,
|
325
|
-
form_id=current_form_id(self.dg),
|
326
|
-
page=ctx.active_script_hash if ctx else None,
|
327
325
|
)
|
328
326
|
|
329
327
|
if not isinstance(index, int) and index is not None:
|
@@ -370,13 +370,11 @@ class SelectSliderMixin:
|
|
370
370
|
element_id = compute_and_register_element_id(
|
371
371
|
"select_slider",
|
372
372
|
user_key=key,
|
373
|
+
form_id=current_form_id(self.dg),
|
373
374
|
label=label,
|
374
375
|
options=[str(format_func(option)) for option in opt],
|
375
376
|
value=slider_value,
|
376
|
-
key=key,
|
377
377
|
help=help,
|
378
|
-
form_id=current_form_id(self.dg),
|
379
|
-
page=ctx.active_script_hash if ctx else None,
|
380
378
|
)
|
381
379
|
|
382
380
|
slider_proto = SliderProto()
|
@@ -287,14 +287,12 @@ class SelectboxMixin:
|
|
287
287
|
element_id = compute_and_register_element_id(
|
288
288
|
"selectbox",
|
289
289
|
user_key=key,
|
290
|
+
form_id=current_form_id(self.dg),
|
290
291
|
label=label,
|
291
292
|
options=[str(format_func(option)) for option in opt],
|
292
293
|
index=index,
|
293
|
-
key=key,
|
294
294
|
help=help,
|
295
295
|
placeholder=placeholder,
|
296
|
-
form_id=current_form_id(self.dg),
|
297
|
-
page=ctx.active_script_hash if ctx else None,
|
298
296
|
)
|
299
297
|
|
300
298
|
if not isinstance(index, int) and index is not None:
|
@@ -545,16 +545,14 @@ class SliderMixin:
|
|
545
545
|
element_id = compute_and_register_element_id(
|
546
546
|
"slider",
|
547
547
|
user_key=key,
|
548
|
+
form_id=current_form_id(self.dg),
|
548
549
|
label=label,
|
549
550
|
min_value=min_value,
|
550
551
|
max_value=max_value,
|
551
552
|
value=value,
|
552
553
|
step=step,
|
553
554
|
format=format,
|
554
|
-
key=key,
|
555
555
|
help=help,
|
556
|
-
form_id=current_form_id(self.dg),
|
557
|
-
page=ctx.active_script_hash if ctx else None,
|
558
556
|
)
|
559
557
|
|
560
558
|
SUPPORTED_TYPES = {
|
@@ -278,16 +278,14 @@ class TextWidgetsMixin:
|
|
278
278
|
element_id = compute_and_register_element_id(
|
279
279
|
"text_input",
|
280
280
|
user_key=key,
|
281
|
+
form_id=current_form_id(self.dg),
|
281
282
|
label=label,
|
282
283
|
value=value,
|
283
284
|
max_chars=max_chars,
|
284
|
-
key=key,
|
285
285
|
type=type,
|
286
286
|
help=help,
|
287
287
|
autocomplete=autocomplete,
|
288
288
|
placeholder=str(placeholder),
|
289
|
-
form_id=current_form_id(self.dg),
|
290
|
-
page=ctx.active_script_hash if ctx else None,
|
291
289
|
)
|
292
290
|
|
293
291
|
session_state = get_session_state().filtered_state
|
@@ -550,15 +548,13 @@ class TextWidgetsMixin:
|
|
550
548
|
element_id = compute_and_register_element_id(
|
551
549
|
"text_area",
|
552
550
|
user_key=key,
|
551
|
+
form_id=current_form_id(self.dg),
|
553
552
|
label=label,
|
554
553
|
value=value,
|
555
554
|
height=height,
|
556
555
|
max_chars=max_chars,
|
557
|
-
key=key,
|
558
556
|
help=help,
|
559
557
|
placeholder=str(placeholder),
|
560
|
-
form_id=current_form_id(self.dg),
|
561
|
-
page=ctx.active_script_hash if ctx else None,
|
562
558
|
)
|
563
559
|
|
564
560
|
session_state = get_session_state().filtered_state
|
@@ -457,13 +457,11 @@ class TimeWidgetsMixin:
|
|
457
457
|
element_id = compute_and_register_element_id(
|
458
458
|
"time_input",
|
459
459
|
user_key=key,
|
460
|
+
form_id=current_form_id(self.dg),
|
460
461
|
label=label,
|
461
462
|
value=parsed_time if isinstance(value, (datetime, time)) else value,
|
462
|
-
key=key,
|
463
463
|
help=help,
|
464
464
|
step=step,
|
465
|
-
form_id=current_form_id(self.dg),
|
466
|
-
page=ctx.active_script_hash if ctx else None,
|
467
465
|
)
|
468
466
|
del value
|
469
467
|
|
@@ -732,15 +730,13 @@ class TimeWidgetsMixin:
|
|
732
730
|
element_id = compute_and_register_element_id(
|
733
731
|
"date_input",
|
734
732
|
user_key=key,
|
733
|
+
form_id=current_form_id(self.dg),
|
735
734
|
label=label,
|
736
735
|
value=parsed,
|
737
736
|
min_value=parsed_min_date,
|
738
737
|
max_value=parsed_max_date,
|
739
|
-
key=key,
|
740
738
|
help=help,
|
741
739
|
format=format,
|
742
|
-
form_id=current_form_id(self.dg),
|
743
|
-
page=ctx.active_script_hash if ctx else None,
|
744
740
|
)
|
745
741
|
if not bool(ALLOWED_DATE_FORMATS.match(format)):
|
746
742
|
raise StreamlitAPIException(
|
streamlit/navigation/page.py
CHANGED
@@ -212,14 +212,18 @@ class StreamlitPage:
|
|
212
212
|
"The title of the page cannot be empty or consist of underscores/spaces only"
|
213
213
|
)
|
214
214
|
|
215
|
-
if url_path is not None and url_path.strip() == "" and not default:
|
216
|
-
raise StreamlitAPIException(
|
217
|
-
"The URL path cannot be an empty string unless the page is the default page."
|
218
|
-
)
|
219
|
-
|
220
215
|
self._url_path: str = inferred_name
|
221
216
|
if url_path is not None:
|
222
|
-
|
217
|
+
if url_path.strip() == "" and not default:
|
218
|
+
raise StreamlitAPIException(
|
219
|
+
"The URL path cannot be an empty string unless the page is the default page."
|
220
|
+
)
|
221
|
+
|
222
|
+
self._url_path = url_path.strip("/")
|
223
|
+
if "/" in self._url_path:
|
224
|
+
raise StreamlitAPIException(
|
225
|
+
"The URL path cannot contain a nested path (e.g. foo/bar)."
|
226
|
+
)
|
223
227
|
|
224
228
|
if self._icon:
|
225
229
|
validate_icon_or_emoji(self._icon)
|
streamlit/proto/Block_pb2.py
CHANGED
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
|
|
14
14
|
|
15
15
|
|
16
16
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Block.proto\"\
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Block.proto\"\xf1\t\n\x05\x42lock\x12#\n\x08vertical\x18\x01 \x01(\x0b\x32\x0f.Block.VerticalH\x00\x12\'\n\nhorizontal\x18\x02 \x01(\x0b\x32\x11.Block.HorizontalH\x00\x12\x1f\n\x06\x63olumn\x18\x03 \x01(\x0b\x32\r.Block.ColumnH\x00\x12\'\n\nexpandable\x18\x04 \x01(\x0b\x32\x11.Block.ExpandableH\x00\x12\x1b\n\x04\x66orm\x18\x05 \x01(\x0b\x32\x0b.Block.FormH\x00\x12,\n\rtab_container\x18\x06 \x01(\x0b\x32\x13.Block.TabContainerH\x00\x12\x19\n\x03tab\x18\x07 \x01(\x0b\x32\n.Block.TabH\x00\x12*\n\x0c\x63hat_message\x18\t \x01(\x0b\x32\x12.Block.ChatMessageH\x00\x12!\n\x07popover\x18\n \x01(\x0b\x32\x0e.Block.PopoverH\x00\x12\x1f\n\x06\x64ialog\x18\x0b \x01(\x0b\x32\r.Block.DialogH\x00\x12\x13\n\x0b\x61llow_empty\x18\x08 \x01(\x08\x12\x0f\n\x02id\x18\x0c \x01(\tH\x01\x88\x01\x01\x1a*\n\x08Vertical\x12\x0e\n\x06\x62order\x18\x01 \x01(\x08\x12\x0e\n\x06height\x18\x02 \x01(\r\x1a\x19\n\nHorizontal\x12\x0b\n\x03gap\x18\x01 \x01(\t\x1a\x98\x01\n\x06\x43olumn\x12\x0e\n\x06weight\x18\x01 \x01(\x01\x12\x0b\n\x03gap\x18\x02 \x01(\t\x12;\n\x12vertical_alignment\x18\x03 \x01(\x0e\x32\x1f.Block.Column.VerticalAlignment\"4\n\x11VerticalAlignment\x12\x07\n\x03TOP\x10\x00\x12\n\n\x06\x43\x45NTER\x10\x01\x12\n\n\x06\x42OTTOM\x10\x02\x1aM\n\nExpandable\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\x08\x65xpanded\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x0c\n\x04icon\x18\x03 \x01(\tB\x0b\n\t_expanded\x1a\x9d\x01\n\x06\x44ialog\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64ismissible\x18\x02 \x01(\x08\x12(\n\x05width\x18\x03 \x01(\x0e\x32\x19.Block.Dialog.DialogWidth\x12\x14\n\x07is_open\x18\x04 \x01(\x08H\x00\x88\x01\x01\"#\n\x0b\x44ialogWidth\x12\t\n\x05SMALL\x10\x00\x12\t\n\x05LARGE\x10\x01\x42\n\n\x08_is_open\x1aY\n\x04\x46orm\x12\x0f\n\x07\x66orm_id\x18\x01 \x01(\t\x12\x17\n\x0f\x63lear_on_submit\x18\x02 \x01(\x08\x12\x0e\n\x06\x62order\x18\x03 \x01(\x08\x12\x17\n\x0f\x65nter_to_submit\x18\x04 \x01(\x08\x1a\x0e\n\x0cTabContainer\x1a\x14\n\x03Tab\x12\r\n\x05label\x18\x01 \x01(\t\x1a\x63\n\x07Popover\x12\r\n\x05label\x18\x01 \x01(\t\x12\x1b\n\x13use_container_width\x18\x02 \x01(\x08\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x10\n\x08\x64isabled\x18\x04 \x01(\x08\x12\x0c\n\x04icon\x18\x05 \x01(\t\x1a\x8d\x01\n\x0b\x43hatMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x61vatar\x18\x02 \x01(\t\x12\x32\n\x0b\x61vatar_type\x18\x03 \x01(\x0e\x32\x1d.Block.ChatMessage.AvatarType\",\n\nAvatarType\x12\t\n\x05IMAGE\x10\x00\x12\t\n\x05\x45MOJI\x10\x01\x12\x08\n\x04ICON\x10\x02\x42\x06\n\x04typeB\x05\n\x03_idB*\n\x1c\x63om.snowflake.apps.streamlitB\nBlockProtob\x06proto3')
|
18
18
|
|
19
19
|
_globals = globals()
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -23,7 +23,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
23
23
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
24
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\nBlockProto'
|
25
25
|
_globals['_BLOCK']._serialized_start=32
|
26
|
-
_globals['_BLOCK']._serialized_end=
|
26
|
+
_globals['_BLOCK']._serialized_end=1297
|
27
27
|
_globals['_BLOCK_VERTICAL']._serialized_start=445
|
28
28
|
_globals['_BLOCK_VERTICAL']._serialized_end=487
|
29
29
|
_globals['_BLOCK_HORIZONTAL']._serialized_start=489
|
@@ -39,15 +39,15 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
39
39
|
_globals['_BLOCK_DIALOG_DIALOGWIDTH']._serialized_start=861
|
40
40
|
_globals['_BLOCK_DIALOG_DIALOGWIDTH']._serialized_end=896
|
41
41
|
_globals['_BLOCK_FORM']._serialized_start=910
|
42
|
-
_globals['_BLOCK_FORM']._serialized_end=
|
43
|
-
_globals['_BLOCK_TABCONTAINER']._serialized_start=
|
44
|
-
_globals['_BLOCK_TABCONTAINER']._serialized_end=
|
45
|
-
_globals['_BLOCK_TAB']._serialized_start=
|
46
|
-
_globals['_BLOCK_TAB']._serialized_end=
|
47
|
-
_globals['_BLOCK_POPOVER']._serialized_start=
|
48
|
-
_globals['_BLOCK_POPOVER']._serialized_end=
|
49
|
-
_globals['_BLOCK_CHATMESSAGE']._serialized_start=
|
50
|
-
_globals['_BLOCK_CHATMESSAGE']._serialized_end=
|
51
|
-
_globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_start=
|
52
|
-
_globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_end=
|
42
|
+
_globals['_BLOCK_FORM']._serialized_end=999
|
43
|
+
_globals['_BLOCK_TABCONTAINER']._serialized_start=1001
|
44
|
+
_globals['_BLOCK_TABCONTAINER']._serialized_end=1015
|
45
|
+
_globals['_BLOCK_TAB']._serialized_start=1017
|
46
|
+
_globals['_BLOCK_TAB']._serialized_end=1037
|
47
|
+
_globals['_BLOCK_POPOVER']._serialized_start=1039
|
48
|
+
_globals['_BLOCK_POPOVER']._serialized_end=1138
|
49
|
+
_globals['_BLOCK_CHATMESSAGE']._serialized_start=1141
|
50
|
+
_globals['_BLOCK_CHATMESSAGE']._serialized_end=1282
|
51
|
+
_globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_start=1238
|
52
|
+
_globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_end=1282
|
53
53
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/Block_pb2.pyi
CHANGED
@@ -164,17 +164,20 @@ class Block(google.protobuf.message.Message):
|
|
164
164
|
FORM_ID_FIELD_NUMBER: builtins.int
|
165
165
|
CLEAR_ON_SUBMIT_FIELD_NUMBER: builtins.int
|
166
166
|
BORDER_FIELD_NUMBER: builtins.int
|
167
|
+
ENTER_TO_SUBMIT_FIELD_NUMBER: builtins.int
|
167
168
|
form_id: builtins.str
|
168
169
|
clear_on_submit: builtins.bool
|
169
170
|
border: builtins.bool
|
171
|
+
enter_to_submit: builtins.bool
|
170
172
|
def __init__(
|
171
173
|
self,
|
172
174
|
*,
|
173
175
|
form_id: builtins.str = ...,
|
174
176
|
clear_on_submit: builtins.bool = ...,
|
175
177
|
border: builtins.bool = ...,
|
178
|
+
enter_to_submit: builtins.bool = ...,
|
176
179
|
) -> None: ...
|
177
|
-
def ClearField(self, field_name: typing.Literal["border", b"border", "clear_on_submit", b"clear_on_submit", "form_id", b"form_id"]) -> None: ...
|
180
|
+
def ClearField(self, field_name: typing.Literal["border", b"border", "clear_on_submit", b"clear_on_submit", "enter_to_submit", b"enter_to_submit", "form_id", b"form_id"]) -> None: ...
|
178
181
|
|
179
182
|
@typing.final
|
180
183
|
class TabContainer(google.protobuf.message.Message):
|
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
|
|
14
14
|
|
15
15
|
|
16
16
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%streamlit/proto/DeckGlJsonChart.proto\"
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%streamlit/proto/DeckGlJsonChart.proto\"\x8e\x01\n\x0f\x44\x65\x63kGlJsonChart\x12\x0c\n\x04json\x18\x01 \x01(\t\x12\x0f\n\x07tooltip\x18\x02 \x01(\t\x12\x1b\n\x13use_container_width\x18\x04 \x01(\x08\x12\n\n\x02id\x18\x05 \x01(\t\x12\x14\n\x0cmapbox_token\x18\x06 \x01(\t\x12\r\n\x05width\x18\x07 \x01(\r\x12\x0e\n\x06height\x18\x08 \x01(\rB4\n\x1c\x63om.snowflake.apps.streamlitB\x14\x44\x65\x63kGlJsonChartProtob\x06proto3')
|
18
18
|
|
19
19
|
_globals = globals()
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,6 +22,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.DeckGlJsonC
|
|
22
22
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
23
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
24
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\024DeckGlJsonChartProto'
|
25
|
-
_globals['_DECKGLJSONCHART']._serialized_start=
|
26
|
-
_globals['_DECKGLJSONCHART']._serialized_end=
|
25
|
+
_globals['_DECKGLJSONCHART']._serialized_start=42
|
26
|
+
_globals['_DECKGLJSONCHART']._serialized_end=184
|
27
27
|
# @@protoc_insertion_point(module_scope)
|
@@ -33,6 +33,8 @@ class DeckGlJsonChart(google.protobuf.message.Message):
|
|
33
33
|
USE_CONTAINER_WIDTH_FIELD_NUMBER: builtins.int
|
34
34
|
ID_FIELD_NUMBER: builtins.int
|
35
35
|
MAPBOX_TOKEN_FIELD_NUMBER: builtins.int
|
36
|
+
WIDTH_FIELD_NUMBER: builtins.int
|
37
|
+
HEIGHT_FIELD_NUMBER: builtins.int
|
36
38
|
json: builtins.str
|
37
39
|
"""The json of the pydeck object (https://deckgl.readthedocs.io/en/latest/deck.html)"""
|
38
40
|
tooltip: builtins.str
|
@@ -42,6 +44,10 @@ class DeckGlJsonChart(google.protobuf.message.Message):
|
|
42
44
|
"""ID"""
|
43
45
|
mapbox_token: builtins.str
|
44
46
|
"""The user-configured Mapbox token. If empty, the token id fetched from https://data.streamlit.io/tokens.json"""
|
47
|
+
width: builtins.int
|
48
|
+
"""Width in pixels"""
|
49
|
+
height: builtins.int
|
50
|
+
"""Height in pixels"""
|
45
51
|
def __init__(
|
46
52
|
self,
|
47
53
|
*,
|
@@ -50,7 +56,9 @@ class DeckGlJsonChart(google.protobuf.message.Message):
|
|
50
56
|
use_container_width: builtins.bool = ...,
|
51
57
|
id: builtins.str = ...,
|
52
58
|
mapbox_token: builtins.str = ...,
|
59
|
+
width: builtins.int = ...,
|
60
|
+
height: builtins.int = ...,
|
53
61
|
) -> None: ...
|
54
|
-
def ClearField(self, field_name: typing.Literal["id", b"id", "json", b"json", "mapbox_token", b"mapbox_token", "tooltip", b"tooltip", "use_container_width", b"use_container_width"]) -> None: ...
|
62
|
+
def ClearField(self, field_name: typing.Literal["height", b"height", "id", b"id", "json", b"json", "mapbox_token", b"mapbox_token", "tooltip", b"tooltip", "use_container_width", b"use_container_width", "width", b"width"]) -> None: ...
|
55
63
|
|
56
64
|
global___DeckGlJsonChart = DeckGlJsonChart
|
@@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
|
|
15
15
|
from streamlit.proto import AppPage_pb2 as streamlit_dot_proto_dot_AppPage__pb2
|
16
16
|
|
17
17
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/Navigation.proto\x1a\x1dstreamlit/proto/AppPage.proto\"\
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/Navigation.proto\x1a\x1dstreamlit/proto/AppPage.proto\"\xb4\x01\n\nNavigation\x12\x10\n\x08sections\x18\x01 \x03(\t\x12\x1b\n\tapp_pages\x18\x02 \x03(\x0b\x32\x08.AppPage\x12&\n\x08position\x18\x03 \x01(\x0e\x32\x14.Navigation.Position\x12\x18\n\x10page_script_hash\x18\x04 \x01(\t\x12\x10\n\x08\x65xpanded\x18\x05 \x01(\x08\"#\n\x08Position\x12\n\n\x06HIDDEN\x10\x00\x12\x0b\n\x07SIDEBAR\x10\x01\x42\x1e\n\x1c\x63om.snowflake.apps.streamlitb\x06proto3')
|
19
19
|
|
20
20
|
_globals = globals()
|
21
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -24,7 +24,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
24
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
25
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlit'
|
26
26
|
_globals['_NAVIGATION']._serialized_start=68
|
27
|
-
_globals['_NAVIGATION']._serialized_end=
|
28
|
-
_globals['_NAVIGATION_POSITION']._serialized_start=
|
29
|
-
_globals['_NAVIGATION_POSITION']._serialized_end=
|
27
|
+
_globals['_NAVIGATION']._serialized_end=248
|
28
|
+
_globals['_NAVIGATION_POSITION']._serialized_start=213
|
29
|
+
_globals['_NAVIGATION_POSITION']._serialized_end=248
|
30
30
|
# @@protoc_insertion_point(module_scope)
|
@@ -61,9 +61,11 @@ class Navigation(google.protobuf.message.Message):
|
|
61
61
|
APP_PAGES_FIELD_NUMBER: builtins.int
|
62
62
|
POSITION_FIELD_NUMBER: builtins.int
|
63
63
|
PAGE_SCRIPT_HASH_FIELD_NUMBER: builtins.int
|
64
|
+
EXPANDED_FIELD_NUMBER: builtins.int
|
64
65
|
position: global___Navigation.Position.ValueType
|
65
66
|
page_script_hash: builtins.str
|
66
67
|
"""The script hash for the page identified by st.navigation"""
|
68
|
+
expanded: builtins.bool
|
67
69
|
@property
|
68
70
|
def sections(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
|
69
71
|
@property
|
@@ -75,7 +77,8 @@ class Navigation(google.protobuf.message.Message):
|
|
75
77
|
app_pages: collections.abc.Iterable[streamlit.proto.AppPage_pb2.AppPage] | None = ...,
|
76
78
|
position: global___Navigation.Position.ValueType = ...,
|
77
79
|
page_script_hash: builtins.str = ...,
|
80
|
+
expanded: builtins.bool = ...,
|
78
81
|
) -> None: ...
|
79
|
-
def ClearField(self, field_name: typing.Literal["app_pages", b"app_pages", "page_script_hash", b"page_script_hash", "position", b"position", "sections", b"sections"]) -> None: ...
|
82
|
+
def ClearField(self, field_name: typing.Literal["app_pages", b"app_pages", "expanded", b"expanded", "page_script_hash", b"page_script_hash", "position", b"position", "sections", b"sections"]) -> None: ...
|
80
83
|
|
81
84
|
global___Navigation = Navigation
|
@@ -1,18 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"files": {
|
3
3
|
"main.css": "./static/css/main.5513bd04.css",
|
4
|
-
"main.js": "./static/js/main.
|
4
|
+
"main.js": "./static/js/main.61ca8755.js",
|
5
5
|
"static/js/6679.265ca09c.chunk.js": "./static/js/6679.265ca09c.chunk.js",
|
6
6
|
"static/js/9464.7e9a3c0a.chunk.js": "./static/js/9464.7e9a3c0a.chunk.js",
|
7
7
|
"static/js/9077.e0a8db2a.chunk.js": "./static/js/9077.e0a8db2a.chunk.js",
|
8
8
|
"static/js/3391.663b9d47.chunk.js": "./static/js/3391.663b9d47.chunk.js",
|
9
|
-
"static/css/
|
10
|
-
"static/js/
|
9
|
+
"static/css/9943.93909c7e.chunk.css": "./static/css/9943.93909c7e.chunk.css",
|
10
|
+
"static/js/9943.d18fdff1.chunk.js": "./static/js/9943.d18fdff1.chunk.js",
|
11
11
|
"static/css/5711.c24b25fa.chunk.css": "./static/css/5711.c24b25fa.chunk.css",
|
12
12
|
"static/js/5711.229cb7d0.chunk.js": "./static/js/5711.229cb7d0.chunk.js",
|
13
13
|
"static/js/3861.0dedcd19.chunk.js": "./static/js/3861.0dedcd19.chunk.js",
|
14
14
|
"static/js/8642.dfef7dcb.chunk.js": "./static/js/8642.dfef7dcb.chunk.js",
|
15
|
-
"static/js/
|
15
|
+
"static/js/8485.81bdf474.chunk.js": "./static/js/8485.81bdf474.chunk.js",
|
16
16
|
"static/js/8148.f51df66c.chunk.js": "./static/js/8148.f51df66c.chunk.js",
|
17
17
|
"static/js/84.414fa87b.chunk.js": "./static/js/84.414fa87b.chunk.js",
|
18
18
|
"static/js/9923.7061d124.chunk.js": "./static/js/9923.7061d124.chunk.js",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"static/js/5625.3a8dc81f.chunk.js": "./static/js/5625.3a8dc81f.chunk.js",
|
25
25
|
"static/js/6141.43a8fda3.chunk.js": "./static/js/6141.43a8fda3.chunk.js",
|
26
26
|
"static/js/4103.d863052a.chunk.js": "./static/js/4103.d863052a.chunk.js",
|
27
|
-
"static/js/1086.
|
27
|
+
"static/js/1086.464de8f9.chunk.js": "./static/js/1086.464de8f9.chunk.js",
|
28
28
|
"static/js/245.68a062da.chunk.js": "./static/js/245.68a062da.chunk.js",
|
29
29
|
"static/js/7193.2594a18c.chunk.js": "./static/js/7193.2594a18c.chunk.js",
|
30
30
|
"static/js/6360.6d7cfa35.chunk.js": "./static/js/6360.6d7cfa35.chunk.js",
|
@@ -36,10 +36,10 @@
|
|
36
36
|
"static/js/8166.11abccb8.chunk.js": "./static/js/8166.11abccb8.chunk.js",
|
37
37
|
"static/js/9114.1ee3d4dd.chunk.js": "./static/js/9114.1ee3d4dd.chunk.js",
|
38
38
|
"static/js/5180.e826dd46.chunk.js": "./static/js/5180.e826dd46.chunk.js",
|
39
|
-
"static/js/5618.
|
40
|
-
"static/js/1260.
|
39
|
+
"static/js/5618.0a42d599.chunk.js": "./static/js/5618.0a42d599.chunk.js",
|
40
|
+
"static/js/1260.e6289cc2.chunk.js": "./static/js/1260.e6289cc2.chunk.js",
|
41
41
|
"static/js/3560.ce031236.chunk.js": "./static/js/3560.ce031236.chunk.js",
|
42
|
-
"static/js/954.
|
42
|
+
"static/js/954.1da91b19.chunk.js": "./static/js/954.1da91b19.chunk.js",
|
43
43
|
"static/js/3966.e0686958.chunk.js": "./static/js/3966.e0686958.chunk.js",
|
44
44
|
"static/js/8161.9b75f98a.chunk.js": "./static/js/8161.9b75f98a.chunk.js",
|
45
45
|
"static/js/6817.6adfea98.chunk.js": "./static/js/6817.6adfea98.chunk.js",
|
@@ -51,8 +51,8 @@
|
|
51
51
|
"static/js/766.e3700e32.chunk.js": "./static/js/766.e3700e32.chunk.js",
|
52
52
|
"static/js/783.788bb3ab.chunk.js": "./static/js/783.788bb3ab.chunk.js",
|
53
53
|
"static/js/5544.2769497c.chunk.js": "./static/js/5544.2769497c.chunk.js",
|
54
|
-
"static/css/
|
55
|
-
"static/js/
|
54
|
+
"static/css/6789.81b3d18f.chunk.css": "./static/css/6789.81b3d18f.chunk.css",
|
55
|
+
"static/js/6789.f8dde736.chunk.js": "./static/js/6789.f8dde736.chunk.js",
|
56
56
|
"static/js/7612.39e7938b.chunk.js": "./static/js/7612.39e7938b.chunk.js",
|
57
57
|
"static/js/3389.71902a75.chunk.js": "./static/js/3389.71902a75.chunk.js",
|
58
58
|
"static/js/4297.3afbdd03.chunk.js": "./static/js/4297.3afbdd03.chunk.js",
|
@@ -63,6 +63,7 @@
|
|
63
63
|
"static/js/6198.956025ac.chunk.js": "./static/js/6198.956025ac.chunk.js",
|
64
64
|
"static/js/1674.86aea8e0.chunk.js": "./static/js/1674.86aea8e0.chunk.js",
|
65
65
|
"static/js/7591.b3928443.chunk.js": "./static/js/7591.b3928443.chunk.js",
|
66
|
+
"static/js/2055.bca43613.chunk.js": "./static/js/2055.bca43613.chunk.js",
|
66
67
|
"static/media/MaterialSymbols-Rounded.woff2": "./static/media/MaterialSymbols-Rounded.ec07649f7a20048d5730.woff2",
|
67
68
|
"static/media/fireworks.gif": "./static/media/fireworks.0906f02ea43f1018a6d2.gif",
|
68
69
|
"static/media/flake-2.png": "./static/media/flake-2.e3f07d06933dd0e84c24.png",
|
@@ -153,6 +154,6 @@
|
|
153
154
|
},
|
154
155
|
"entrypoints": [
|
155
156
|
"static/css/main.5513bd04.css",
|
156
|
-
"static/js/main.
|
157
|
+
"static/js/main.61ca8755.js"
|
157
158
|
]
|
158
159
|
}
|
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.61ca8755.js"></script><link href="./static/css/main.5513bd04.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
@@ -2,4 +2,4 @@
|
|
2
2
|
50% {
|
3
3
|
color: rgba(0, 0, 0, 0);
|
4
4
|
}
|
5
|
-
`,s=(0,i.A)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:n}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${a}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(90782);const c=e=>{let{dirty:t,value:r,inForm:i,maxLength:a,className:c,type:u="single",allowSubmitOnEnter:d=!0}=e;const p=[],f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p.push((0,l.jsx)(s,{includeDot:p.length>0,shouldBlink:t,children:e},p.length))};if(t&&d){const e=i?"submit form":"apply";if("multiline"===u){f(`Press ${(0,n.u_)()?"\u2318":"Ctrl"}+Enter to ${e}`)}else"single"===u&&f(`Press Enter to ${e}`)}return a&&("chat"!==u||t)&&f(`${r.length}/${a}`,t&&r.length>=a),(0,l.jsx)(o.tp,{"data-testid":"InputInstructions",className:c,children:p})}},1086:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var n=r(58878),o=r(8151),i=r(68102),a=r(68622),s=n.forwardRef((function(e,t){return n.createElement(a.I,(0,i.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))}));s.displayName="Send";var l=r(94928),c=r(64611),u=r(68035),d=r(58144),p=r(89653);const f=(0,p.A)("div",{target:"e1d2x3se4"})((e=>{var t;let{theme:r,width:n}=e;return{borderRadius:r.radii.default,display:"flex",backgroundColor:null!==(t=r.colors.widgetBackgroundColor)&&void 0!==t?t:r.colors.secondaryBg,width:`${n}px`}}),""),h=(0,p.A)("div",{target:"e1d2x3se3"})((e=>{let{theme:t}=e;return{backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.default,display:"flex",alignItems:"center"}}),""),y=(0,p.A)("button",{target:"e1d2x3se2"})((e=>{let{theme:t,disabled:r,extended:n}=e;const o=(0,d.iq)(t),[i,a]=o?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:n?t.radii.none:t.radii.default,borderTopLeftRadius:n?t.radii.default:t.radii.none,borderBottomRightRadius:t.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:r?i:a,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:o?t.colors.gray10:t.colors.gray90},"&:hover":{backgroundColor:t.colors.primary,color:t.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),""),g=(0,p.A)("div",{target:"e1d2x3se1"})((()=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:"0px",pointerEvents:"none"})),""),b=(0,p.A)("div",{target:"e1d2x3se0"})({name:"1lm6gnd",styles:"position:absolute;bottom:0px;right:3rem"});var m=r(90782);const v=function(e){let{width:t,element:r,widgetMgr:i,fragmentId:a}=e;const p=(0,o.u)(),[v,x]=(0,n.useState)(!1),[w,O]=(0,n.useState)(r.default),[j,C]=(0,n.useState)(0),S=(0,n.useRef)(null),A=(0,n.useRef)({minHeight:0,maxHeight:0}),k=()=>{S.current&&S.current.focus(),w&&(i.setStringTriggerValue(r,w,{fromUi:!0},a),x(!1),O(""),C(0))};(0,n.useEffect)((()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";O(e),x(""!==e)}}),[r]),(0,n.useEffect)((()=>{if(S.current){const{offsetHeight:e}=S.current;A.current.minHeight=e,A.current.maxHeight=6.5*e}}),[S]);const{disabled:P,placeholder:R,maxChars:E}=r,I=(0,d.iq)(p),{minHeight:$,maxHeight:T}=A.current,B=I?p.colors.gray70:p.colors.gray80,z=!!(j>0&&S.current)&&Math.abs(j-$)>1;return(0,m.jsx)(f,{className:"stChatInput","data-testid":"stChatInput",width:t,children:(0,m.jsxs)(h,{children:[(0,m.jsx)(l.A,{inputRef:S,value:w,placeholder:R,onChange:e=>{const{value:t}=e.target,{maxChars:n}=r;0!==n&&t.length>n||(x(""!==t),O(t),C((()=>{let e=0;const{current:t}=S;if(t){const r=t.placeholder;t.placeholder="",t.style.height="auto",e=t.scrollHeight,t.placeholder=r,t.style.height=""}return e})()))},onKeyDown:e=>{const{metaKey:t,ctrlKey:r,shiftKey:n}=e;(e=>{var t;const{keyCode:r,key:n}=e;return("Enter"===n||13===r||10===r)&&!(!0===(null===(t=e.nativeEvent)||void 0===t?void 0:t.isComposing))})(e)&&!n&&!r&&!t&&(e.preventDefault(),k())},"aria-label":R,disabled:P,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",backgroundColor:p.colors.transparent,borderLeftWidth:p.sizes.borderWidth,borderRightWidth:p.sizes.borderWidth,borderTopWidth:p.sizes.borderWidth,borderBottomWidth:p.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:p.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,backgroundColor:p.colors.transparent,"::placeholder":{color:B},height:z?`${j+1}px`:"auto",maxHeight:T?`${T}px`:"none",paddingRight:"3rem",paddingLeft:p.spacing.sm,paddingBottom:p.spacing.sm,paddingTop:p.spacing.sm}}}}),t>p.breakpoints.hideWidgetDetails&&(0,m.jsx)(b,{children:(0,m.jsx)(u.A,{dirty:v,value:w,maxLength:E,type:"chat",inForm:!1})}),(0,m.jsx)(g,{children:(0,m.jsx)(y,{onClick:k,disabled:!v||P,extended:z,"data-testid":"stChatInputSubmitButton",children:(0,m.jsx)(c.A,{content:s,size:"xl",color:"inherit"})})})]})})}},94928:(e,t,r)=>{r.d(t,{A:()=>A});var n=r(58878),o=r(35331),i=r(18648),a=r(92850),s=r(57224),l=r(81301);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=(0,s.I4)("div",(function(e){return u(u({},(0,l.vt)(u(u({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})}));p.displayName="StyledTextAreaRoot",p.displayName="StyledTextAreaRoot";var f=(0,s.I4)("div",(function(e){return(0,l.EO)(u({$positive:!1},e))}));f.displayName="StyledTextareaContainer",f.displayName="StyledTextareaContainer";var h=(0,s.I4)("textarea",(function(e){return u(u({},(0,l.n)(e)),{},{resize:e.$resize||"none"})}));function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function w(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=j(e);if(t){var o=j(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}(this,r)}}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}h.displayName="StyledTextarea",h.displayName="StyledTextarea";var S=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(c,e);var t,r,s,l=w(c);function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(O(e=l.call.apply(l,[this].concat(r))),"state",{isFocused:e.props.autoFocus||!1}),C(O(e),"onFocus",(function(t){e.setState({isFocused:!0}),e.props.onFocus(t)})),C(O(e),"onBlur",(function(t){e.setState({isFocused:!1}),e.props.onBlur(t)})),e}return t=c,(r=[{key:"render",value:function(){var e=this.props.overrides,t=void 0===e?{}:e,r=b((0,o._O)(t.Root,p),2),s=r[0],l=r[1],c=(0,o.Qp)({Input:{component:h},InputContainer:{component:f}},t);return n.createElement(s,g({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},l),n.createElement(i.A,g({},this.props,{type:a.GT.textarea,overrides:c,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}])&&v(t.prototype,r),s&&v(t,s),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);C(S,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:a.SK.default});const A=S}}]);
|
5
|
+
`,s=(0,i.A)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:n}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${a}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(90782);const c=e=>{let{dirty:t,value:r,inForm:i,maxLength:a,className:c,type:u="single",allowEnterToSubmit:d=!0}=e;const p=[],f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p.push((0,l.jsx)(s,{includeDot:p.length>0,shouldBlink:t,children:e},p.length))};if(t&&d){const e=i?"submit form":"apply";if("multiline"===u){f(`Press ${(0,n.u_)()?"\u2318":"Ctrl"}+Enter to ${e}`)}else"single"===u&&f(`Press Enter to ${e}`)}return a&&("chat"!==u||t)&&f(`${r.length}/${a}`,t&&r.length>=a),(0,l.jsx)(o.tp,{"data-testid":"InputInstructions",className:c,children:p})}},1086:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var n=r(58878),o=r(8151),i=r(68102),a=r(68622),s=n.forwardRef((function(e,t){return n.createElement(a.I,(0,i.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))}));s.displayName="Send";var l=r(94928),c=r(64611),u=r(68035),d=r(58144),p=r(89653);const f=(0,p.A)("div",{target:"e1d2x3se4"})((e=>{var t;let{theme:r,width:n}=e;return{borderRadius:r.radii.default,display:"flex",backgroundColor:null!==(t=r.colors.widgetBackgroundColor)&&void 0!==t?t:r.colors.secondaryBg,width:`${n}px`}}),""),h=(0,p.A)("div",{target:"e1d2x3se3"})((e=>{let{theme:t}=e;return{backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.default,display:"flex",alignItems:"center"}}),""),y=(0,p.A)("button",{target:"e1d2x3se2"})((e=>{let{theme:t,disabled:r,extended:n}=e;const o=(0,d.iq)(t),[i,a]=o?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:n?t.radii.none:t.radii.default,borderTopLeftRadius:n?t.radii.default:t.radii.none,borderBottomRightRadius:t.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:r?i:a,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:o?t.colors.gray10:t.colors.gray90},"&:hover":{backgroundColor:t.colors.primary,color:t.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),""),g=(0,p.A)("div",{target:"e1d2x3se1"})((()=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:"0px",pointerEvents:"none"})),""),b=(0,p.A)("div",{target:"e1d2x3se0"})({name:"1lm6gnd",styles:"position:absolute;bottom:0px;right:3rem"});var m=r(90782);const v=function(e){let{width:t,element:r,widgetMgr:i,fragmentId:a}=e;const p=(0,o.u)(),[v,x]=(0,n.useState)(!1),[w,O]=(0,n.useState)(r.default),[j,C]=(0,n.useState)(0),S=(0,n.useRef)(null),A=(0,n.useRef)({minHeight:0,maxHeight:0}),k=()=>{S.current&&S.current.focus(),w&&(i.setStringTriggerValue(r,w,{fromUi:!0},a),x(!1),O(""),C(0))};(0,n.useEffect)((()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";O(e),x(""!==e)}}),[r]),(0,n.useEffect)((()=>{if(S.current){const{offsetHeight:e}=S.current;A.current.minHeight=e,A.current.maxHeight=6.5*e}}),[S]);const{disabled:P,placeholder:R,maxChars:E}=r,I=(0,d.iq)(p),{minHeight:$,maxHeight:T}=A.current,B=I?p.colors.gray70:p.colors.gray80,z=!!(j>0&&S.current)&&Math.abs(j-$)>1;return(0,m.jsx)(f,{className:"stChatInput","data-testid":"stChatInput",width:t,children:(0,m.jsxs)(h,{children:[(0,m.jsx)(l.A,{inputRef:S,value:w,placeholder:R,onChange:e=>{const{value:t}=e.target,{maxChars:n}=r;0!==n&&t.length>n||(x(""!==t),O(t),C((()=>{let e=0;const{current:t}=S;if(t){const r=t.placeholder;t.placeholder="",t.style.height="auto",e=t.scrollHeight,t.placeholder=r,t.style.height=""}return e})()))},onKeyDown:e=>{const{metaKey:t,ctrlKey:r,shiftKey:n}=e;(e=>{var t;const{keyCode:r,key:n}=e;return("Enter"===n||13===r||10===r)&&!(!0===(null===(t=e.nativeEvent)||void 0===t?void 0:t.isComposing))})(e)&&!n&&!r&&!t&&(e.preventDefault(),k())},"aria-label":R,disabled:P,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",backgroundColor:p.colors.transparent,borderLeftWidth:p.sizes.borderWidth,borderRightWidth:p.sizes.borderWidth,borderTopWidth:p.sizes.borderWidth,borderBottomWidth:p.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:p.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,backgroundColor:p.colors.transparent,"::placeholder":{color:B},height:z?`${j+1}px`:"auto",maxHeight:T?`${T}px`:"none",paddingRight:"3rem",paddingLeft:p.spacing.sm,paddingBottom:p.spacing.sm,paddingTop:p.spacing.sm}}}}),t>p.breakpoints.hideWidgetDetails&&(0,m.jsx)(b,{children:(0,m.jsx)(u.A,{dirty:v,value:w,maxLength:E,type:"chat",inForm:!1})}),(0,m.jsx)(g,{children:(0,m.jsx)(y,{onClick:k,disabled:!v||P,extended:z,"data-testid":"stChatInputSubmitButton",children:(0,m.jsx)(c.A,{content:s,size:"xl",color:"inherit"})})})]})})}},94928:(e,t,r)=>{r.d(t,{A:()=>A});var n=r(58878),o=r(35331),i=r(18648),a=r(92850),s=r(57224),l=r(81301);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=(0,s.I4)("div",(function(e){return u(u({},(0,l.vt)(u(u({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})}));p.displayName="StyledTextAreaRoot",p.displayName="StyledTextAreaRoot";var f=(0,s.I4)("div",(function(e){return(0,l.EO)(u({$positive:!1},e))}));f.displayName="StyledTextareaContainer",f.displayName="StyledTextareaContainer";var h=(0,s.I4)("textarea",(function(e){return u(u({},(0,l.n)(e)),{},{resize:e.$resize||"none"})}));function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function w(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=j(e);if(t){var o=j(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}(this,r)}}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}h.displayName="StyledTextarea",h.displayName="StyledTextarea";var S=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(c,e);var t,r,s,l=w(c);function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(O(e=l.call.apply(l,[this].concat(r))),"state",{isFocused:e.props.autoFocus||!1}),C(O(e),"onFocus",(function(t){e.setState({isFocused:!0}),e.props.onFocus(t)})),C(O(e),"onBlur",(function(t){e.setState({isFocused:!1}),e.props.onBlur(t)})),e}return t=c,(r=[{key:"render",value:function(){var e=this.props.overrides,t=void 0===e?{}:e,r=b((0,o._O)(t.Root,p),2),s=r[0],l=r[1],c=(0,o.Qp)({Input:{component:h},InputContainer:{component:f}},t);return n.createElement(s,g({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},l),n.createElement(i.A,g({},this.props,{type:a.GT.textarea,overrides:c,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}])&&v(t.prototype,r),s&&v(t,s),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);C(S,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:a.SK.default});const A=S}}]);
|
@@ -2,4 +2,4 @@
|
|
2
2
|
50% {
|
3
3
|
color: rgba(0, 0, 0, 0);
|
4
4
|
}
|
5
|
-
`,a=(0,i.A)("span",{target:"edlqvik0"})((t=>{let{includeDot:e,shouldBlink:r,theme:n}=t;return{...e?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${s}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(90782);const u=t=>{let{dirty:e,value:r,inForm:i,maxLength:s,className:u,type:c="single",allowSubmitOnEnter:d=!0}=t;const p=[],h=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p.push((0,l.jsx)(a,{includeDot:p.length>0,shouldBlink:e,children:t},p.length))};if(e&&d){const t=i?"submit form":"apply";if("multiline"===c){h(`Press ${(0,n.u_)()?"\u2318":"Ctrl"}+Enter to ${t}`)}else"single"===c&&h(`Press Enter to ${t}`)}return s&&("chat"!==c||e)&&h(`${r.length}/${s}`,e&&r.length>=s),(0,l.jsx)(o.tp,{"data-testid":"InputInstructions",className:u,children:p})}},34752:(t,e,r)=>{"use strict";r.d(e,{X:()=>s,o:()=>i});var n=r(58878),o=r(25571);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(t,e,r){(0,o.se)(this.formClearListener)&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),(0,o._L)(e)&&(this.formClearListener=t.addFormClearedListener(e,r),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}}function s(t){let{element:e,widgetMgr:r,onFormCleared:i}=t;(0,n.useEffect)((()=>{if(!(0,o._L)(e.formId))return;const t=r.addFormClearedListener(e.formId,i);return()=>{t.disconnect()}}),[e,r,i])}},81260:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(58878),o=r(32698),i=r.n(o),s=r(59095),a=r(8151),l=r(29669),u=r(34752),c=r(68035),d=r(70474),p=r(78286),h=r(93480),f=r(997),m=r(25571);const y=(0,r(89653).A)("div",{target:"e11y4ecf0"})((t=>{let{width:e}=t;return{position:"relative",width:e}}),"");var b=r(90782);class g extends n.PureComponent{constructor(t){var e;super(t),e=this,this.formClearHelper=new u.o,this.id=void 0,this.state={dirty:!1,value:this.initialValue},this.commitWidgetValue=function(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{widgetMgr:n,element:o,fragmentId:i}=e.props;n.setStringValue(o,e.state.value,t,i),r&&e.setState({dirty:!1})},this.onFormCleared=()=>{this.setState(((t,e)=>{var r;return{value:null!==(r=e.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.onChange=t=>{const{value:e}=t.target,{element:r}=this.props,{maxChars:n}=r;0!==n&&e.length>n||((0,m.Ml)(this.props.element)?this.setState({dirty:!0,value:e},(()=>{this.commitWidgetValue({fromUi:!0},!1)})):this.setState({dirty:!0,value:e}))},this.onKeyPress=t=>{const{element:e,widgetMgr:r,fragmentId:n}=this.props,{formId:o}=e,i=r.allowFormSubmitOnEnter(o);"Enter"===t.key&&(this.state.dirty&&this.commitWidgetValue({fromUi:!0}),i&&r.submitForm(o,n))},this.id=i()("text_input_")}get initialValue(){var t;const e=this.props.widgetMgr.getStringValue(this.props.element);return null!==(t=null!==e&&void 0!==e?e:this.props.element.default)&&void 0!==t?t:null}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,this.setState({value:null!==t&&void 0!==t?t:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}getTypeString(){return this.props.element.type===l.ks.Type.PASSWORD?"password":"text"}render(){var t;const{dirty:e,value:r}=this.state,{element:n,width:o,disabled:i,widgetMgr:a,theme:l}=this.props,{placeholder:u,formId:g}=n,v=a.allowFormSubmitOnEnter(g)||!(0,m.Ml)({formId:g});return this.formClearHelper.manageFormClearListener(a,g,this.onFormCleared),(0,b.jsxs)(y,{className:"stTextInput","data-testid":"stTextInput",width:o,children:[(0,b.jsx)(d.L,{label:n.label,disabled:i,labelVisibility:(0,m.yv)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),htmlFor:this.id,children:n.help&&(0,b.jsx)(p.j,{children:(0,b.jsx)(h.A,{content:n.help,placement:f.W.TOP_RIGHT})})}),(0,b.jsx)(s.A,{value:null!==r&&void 0!==r?r:"",placeholder:u,onBlur:this.onBlur,onChange:this.onChange,onKeyPress:this.onKeyPress,"aria-label":n.label,disabled:i,id:this.id,type:this.getTypeString(),autoComplete:n.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:l.lineHeights.inputWidget,paddingRight:l.spacing.sm,paddingLeft:l.spacing.sm,paddingBottom:l.spacing.sm,paddingTop:l.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:l.sizes.minElementHeight,borderLeftWidth:l.sizes.borderWidth,borderRightWidth:l.sizes.borderWidth,borderTopWidth:l.sizes.borderWidth,borderBottomWidth:l.sizes.borderWidth}}}}),o>l.breakpoints.hideWidgetDetails&&(0,b.jsx)(c.A,{dirty:e,value:null!==r&&void 0!==r?r:"",maxLength:n.maxChars,inForm:(0,m.Ml)({formId:g}),allowSubmitOnEnter:v})]})}}const v=(0,a.b)(g)},59095:(t,e,r)=>{"use strict";r.d(e,{A:()=>F});var n=r(58878),o=r(35331),i=r(4842),s=r(18648),a=r(81301),l=r(92850);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}var c=["Root","StartEnhancer","EndEnhancer"],d=["startEnhancer","endEnhancer","overrides"];function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p.apply(this,arguments)}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(l){a=!0,o=l}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function m(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===u(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}(this,r)}}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var j=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(w,t);var e,r,u,f=g(w);function w(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,w);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return O(v(t=f.call.apply(f,[this].concat(r))),"state",{isFocused:t.props.autoFocus||!1}),O(v(t),"onFocus",(function(e){t.setState({isFocused:!0}),t.props.onFocus(e)})),O(v(t),"onBlur",(function(e){t.setState({isFocused:!1}),t.props.onBlur(e)})),t}return e=w,(r=[{key:"render",value:function(){var t=this.props,e=t.startEnhancer,r=t.endEnhancer,u=t.overrides,f=u.Root,y=u.StartEnhancer,b=u.EndEnhancer,g=m(u,c),v=m(t,d),w=h((0,o._O)(f,a.bL),2),O=w[0],j=w[1],F=h((0,o._O)(y,a.P2),2),C=F[0],P=F[1],x=h((0,o._O)(b,a.P2),2),I=x[0],W=x[1],_=(0,i.e)(this.props,this.state);return n.createElement(O,p({"data-baseweb":"input"},_,j,{$adjoined:S(e,r),$hasIconTrailing:this.props.clearable||"password"==this.props.type}),E(e)&&n.createElement(C,p({},_,P,{$position:l.vN.start}),"function"===typeof e?e(_):e),n.createElement(s.A,p({},v,{overrides:g,adjoined:S(e,r),onFocus:this.onFocus,onBlur:this.onBlur})),E(r)&&n.createElement(I,p({},_,W,{$position:l.vN.end}),"function"===typeof r?r(_):r))}}])&&y(e.prototype,r),u&&y(e,u),Object.defineProperty(e,"prototype",{writable:!1}),w}(n.Component);function S(t,e){return E(t)&&E(e)?l.fb.both:E(t)?l.fb.left:E(e)?l.fb.right:l.fb.none}function E(t){return Boolean(t||0===t)}O(j,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:l.SK.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});const F=j},32698:(t,e,r)=>{var n=r(30136),o=0;t.exports=function(t){var e=++o;return n(t)+e}}}]);
|
5
|
+
`,a=(0,i.A)("span",{target:"edlqvik0"})((t=>{let{includeDot:e,shouldBlink:r,theme:n}=t;return{...e?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${s}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(90782);const u=t=>{let{dirty:e,value:r,inForm:i,maxLength:s,className:u,type:c="single",allowEnterToSubmit:d=!0}=t;const p=[],h=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p.push((0,l.jsx)(a,{includeDot:p.length>0,shouldBlink:e,children:t},p.length))};if(e&&d){const t=i?"submit form":"apply";if("multiline"===c){h(`Press ${(0,n.u_)()?"\u2318":"Ctrl"}+Enter to ${t}`)}else"single"===c&&h(`Press Enter to ${t}`)}return s&&("chat"!==c||e)&&h(`${r.length}/${s}`,e&&r.length>=s),(0,l.jsx)(o.tp,{"data-testid":"InputInstructions",className:u,children:p})}},34752:(t,e,r)=>{"use strict";r.d(e,{X:()=>s,o:()=>i});var n=r(58878),o=r(25571);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(t,e,r){(0,o.se)(this.formClearListener)&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),(0,o._L)(e)&&(this.formClearListener=t.addFormClearedListener(e,r),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}}function s(t){let{element:e,widgetMgr:r,onFormCleared:i}=t;(0,n.useEffect)((()=>{if(!(0,o._L)(e.formId))return;const t=r.addFormClearedListener(e.formId,i);return()=>{t.disconnect()}}),[e,r,i])}},81260:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(58878),o=r(32698),i=r.n(o),s=r(59095),a=r(8151),l=r(29669),u=r(34752),c=r(68035),d=r(70474),p=r(78286),h=r(93480),f=r(997),m=r(25571);const y=(0,r(89653).A)("div",{target:"e11y4ecf0"})((t=>{let{width:e}=t;return{position:"relative",width:e}}),"");var b=r(90782);class g extends n.PureComponent{constructor(t){var e;super(t),e=this,this.formClearHelper=new u.o,this.id=void 0,this.state={dirty:!1,value:this.initialValue},this.commitWidgetValue=function(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{widgetMgr:n,element:o,fragmentId:i}=e.props;n.setStringValue(o,e.state.value,t,i),r&&e.setState({dirty:!1})},this.onFormCleared=()=>{this.setState(((t,e)=>{var r;return{value:null!==(r=e.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.onChange=t=>{const{value:e}=t.target,{element:r}=this.props,{maxChars:n}=r;0!==n&&e.length>n||((0,m.Ml)(this.props.element)?this.setState({dirty:!0,value:e},(()=>{this.commitWidgetValue({fromUi:!0},!1)})):this.setState({dirty:!0,value:e}))},this.onKeyPress=t=>{const{element:e,widgetMgr:r,fragmentId:n}=this.props,{formId:o}=e,i=r.allowFormEnterToSubmit(o);"Enter"===t.key&&(this.state.dirty&&this.commitWidgetValue({fromUi:!0}),i&&r.submitForm(o,n))},this.id=i()("text_input_")}get initialValue(){var t;const e=this.props.widgetMgr.getStringValue(this.props.element);return null!==(t=null!==e&&void 0!==e?e:this.props.element.default)&&void 0!==t?t:null}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,this.setState({value:null!==t&&void 0!==t?t:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}getTypeString(){return this.props.element.type===l.ks.Type.PASSWORD?"password":"text"}render(){var t;const{dirty:e,value:r}=this.state,{element:n,width:o,disabled:i,widgetMgr:a,theme:l}=this.props,{placeholder:u,formId:g}=n,v=a.allowFormEnterToSubmit(g)||!(0,m.Ml)({formId:g});return this.formClearHelper.manageFormClearListener(a,g,this.onFormCleared),(0,b.jsxs)(y,{className:"stTextInput","data-testid":"stTextInput",width:o,children:[(0,b.jsx)(d.L,{label:n.label,disabled:i,labelVisibility:(0,m.yv)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),htmlFor:this.id,children:n.help&&(0,b.jsx)(p.j,{children:(0,b.jsx)(h.A,{content:n.help,placement:f.W.TOP_RIGHT})})}),(0,b.jsx)(s.A,{value:null!==r&&void 0!==r?r:"",placeholder:u,onBlur:this.onBlur,onChange:this.onChange,onKeyPress:this.onKeyPress,"aria-label":n.label,disabled:i,id:this.id,type:this.getTypeString(),autoComplete:n.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:l.lineHeights.inputWidget,paddingRight:l.spacing.sm,paddingLeft:l.spacing.sm,paddingBottom:l.spacing.sm,paddingTop:l.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:l.sizes.minElementHeight,borderLeftWidth:l.sizes.borderWidth,borderRightWidth:l.sizes.borderWidth,borderTopWidth:l.sizes.borderWidth,borderBottomWidth:l.sizes.borderWidth}}}}),o>l.breakpoints.hideWidgetDetails&&(0,b.jsx)(c.A,{dirty:e,value:null!==r&&void 0!==r?r:"",maxLength:n.maxChars,inForm:(0,m.Ml)({formId:g}),allowEnterToSubmit:v})]})}}const v=(0,a.b)(g)},59095:(t,e,r)=>{"use strict";r.d(e,{A:()=>F});var n=r(58878),o=r(35331),i=r(4842),s=r(18648),a=r(81301),l=r(92850);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}var c=["Root","StartEnhancer","EndEnhancer"],d=["startEnhancer","endEnhancer","overrides"];function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p.apply(this,arguments)}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(l){a=!0,o=l}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function m(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===u(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}(this,r)}}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var j=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(w,t);var e,r,u,f=g(w);function w(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,w);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return O(v(t=f.call.apply(f,[this].concat(r))),"state",{isFocused:t.props.autoFocus||!1}),O(v(t),"onFocus",(function(e){t.setState({isFocused:!0}),t.props.onFocus(e)})),O(v(t),"onBlur",(function(e){t.setState({isFocused:!1}),t.props.onBlur(e)})),t}return e=w,(r=[{key:"render",value:function(){var t=this.props,e=t.startEnhancer,r=t.endEnhancer,u=t.overrides,f=u.Root,y=u.StartEnhancer,b=u.EndEnhancer,g=m(u,c),v=m(t,d),w=h((0,o._O)(f,a.bL),2),O=w[0],j=w[1],F=h((0,o._O)(y,a.P2),2),C=F[0],P=F[1],x=h((0,o._O)(b,a.P2),2),I=x[0],W=x[1],_=(0,i.e)(this.props,this.state);return n.createElement(O,p({"data-baseweb":"input"},_,j,{$adjoined:S(e,r),$hasIconTrailing:this.props.clearable||"password"==this.props.type}),E(e)&&n.createElement(C,p({},_,P,{$position:l.vN.start}),"function"===typeof e?e(_):e),n.createElement(s.A,p({},v,{overrides:g,adjoined:S(e,r),onFocus:this.onFocus,onBlur:this.onBlur})),E(r)&&n.createElement(I,p({},_,W,{$position:l.vN.end}),"function"===typeof r?r(_):r))}}])&&y(e.prototype,r),u&&y(e,u),Object.defineProperty(e,"prototype",{writable:!1}),w}(n.Component);function S(t,e){return E(t)&&E(e)?l.fb.both:E(t)?l.fb.left:E(e)?l.fb.right:l.fb.none}function E(t){return Boolean(t||0===t)}O(j,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:l.SK.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});const F=j},32698:(t,e,r)=>{var n=r(30136),o=0;t.exports=function(t){var e=++o;return n(t)+e}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[2055],{22044:(e,t,n)=>{n.d(t,{A:()=>f});var o=n(58878),s=n(53124),i=n.n(s),r=n(8151),l=n(41514),d=n(67214),a=n(64611),c=n(84152),h=n(89653);const p=(0,h.A)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:n}=e;const o=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:n.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:n.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:n.colors.fadedText60,borderRadius:"50%",...o,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:n.colors.bodyText,transition:"none"}}}),""),u=(0,h.A)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:n}=e;return{"&:hover":{[p]:{opacity:1,transform:"scale(1)",transition:"none"}},...n?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:t.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var m=n(90782);class x extends o.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels(this.props.theme.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:n}=this.state,{children:o,width:s,height:i,disableFullscreenMode:r}=this.props;let c=l.u,h=this.zoomIn,x="View fullscreen";return e&&(c=d.Q,h=this.zoomOut,x="Exit fullscreen"),(0,m.jsxs)(u,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,m.jsx)(p,{"data-testid":"StyledFullScreenButton",onClick:h,title:x,isExpanded:e,children:(0,m.jsx)(a.A,{content:c})}),o(e?{width:t,height:n,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:s,height:i,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}x.contextType=c.n;const g=(0,r.b)(x);const f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class n extends o.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:n,height:o,disableFullscreenMode:s}=this.props;return(0,m.jsx)(g,{width:n,height:o,disableFullscreenMode:t||s,children:t=>{let{width:n,height:o,expanded:s,expand:i,collapse:r}=t;return(0,m.jsx)(e,{...this.props,width:n,height:o,isFullScreen:s,expand:i,collapse:r})}})}}}return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,i()(n,e)}},85850:(e,t,n)=>{n.d(t,{K:()=>f,A:()=>w});n(58878);var o=n(8151),s=n(12274),i=n(63186),r=n(34914),l=n(997),d=n(36459),a=n(84720),c=n(64611),h=n(89653),p=n(58144);const u="-2.4rem",m=(0,h.A)("div",{target:"e2wxzia1"})((e=>{let{theme:t,locked:n,target:o}=e;return{padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:n?u:"-1rem",right:t.spacing.none,transition:"none",...!n&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:u},...o&&{[`${o}:hover &, ${o}:active &, ${o}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:u}}}}}),""),x=(0,h.A)("div",{target:"e2wxzia0"})((e=>{let{theme:t}=e;return{color:(0,p.iq)(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.default,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1}}),"");var g=n(90782);function f(e){let{label:t,show_label:n,icon:s,onClick:i}=e;const h=(0,o.u)(),p=n?t:"";return(0,g.jsx)("div",{"data-testid":"stElementToolbarButton",children:(0,g.jsx)(l.A,{content:(0,g.jsx)(r.Ay,{source:t,allowHTML:!1,style:{fontSize:h.fontSizes.sm}}),placement:l.W.TOP,onMouseEnterDelay:1e3,inline:!0,children:(0,g.jsxs)(d.Ay,{onClick:e=>{i&&i(),e.stopPropagation()},kind:a.KX.ELEMENT_TOOLBAR,children:[s&&(0,g.jsx)(c.A,{content:s,size:"md",testid:"stElementToolbarButtonIcon"}),p&&(0,g.jsx)("span",{children:p})]})})})}const w=e=>{let{onExpand:t,onCollapse:n,isFullScreen:o,locked:r,children:l,target:d,disableFullscreenMode:a}=e;return(0,g.jsx)(m,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:r||o,target:d,children:(0,g.jsxs)(x,{children:[l,t&&!a&&!o&&(0,g.jsx)(f,{label:"Fullscreen",icon:s.g,onClick:()=>t()}),n&&!a&&o&&(0,g.jsx)(f,{label:"Close fullscreen",icon:i.Q,onClick:()=>n()})]})})}}}]);
|