streamlit-nightly 1.53.2.dev20260128__py3-none-any.whl → 1.53.2.dev20260131__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.
Files changed (222) hide show
  1. streamlit/config.py +3 -2
  2. streamlit/config_util.py +63 -8
  3. streamlit/elements/deck_gl_json_chart.py +5 -1
  4. streamlit/elements/lib/built_in_chart_utils.py +24 -4
  5. streamlit/elements/lib/color_util.py +20 -1
  6. streamlit/elements/vega_charts.py +24 -4
  7. streamlit/proto/Alert_pb2.py +2 -3
  8. streamlit/proto/AppPage_pb2.py +2 -3
  9. streamlit/proto/ArrowData_pb2.py +2 -3
  10. streamlit/proto/ArrowNamedDataSet_pb2.py +2 -3
  11. streamlit/proto/ArrowVegaLiteChart_pb2.py +2 -3
  12. streamlit/proto/Arrow_pb2.py +11 -18
  13. streamlit/proto/Arrow_pb2.pyi +1 -42
  14. streamlit/proto/AudioInput_pb2.py +2 -3
  15. streamlit/proto/Audio_pb2.py +2 -3
  16. streamlit/proto/AuthRedirect_pb2.py +2 -3
  17. streamlit/proto/AutoRerun_pb2.py +2 -3
  18. streamlit/proto/BackMsg_pb2.py +2 -3
  19. streamlit/proto/Balloons_pb2.py +2 -3
  20. streamlit/proto/BidiComponent_pb2.py +2 -3
  21. streamlit/proto/Block_pb2.py +36 -43
  22. streamlit/proto/Block_pb2.pyi +3 -48
  23. streamlit/proto/BokehChart_pb2.py +2 -3
  24. streamlit/proto/ButtonGroup_pb2.py +2 -3
  25. streamlit/proto/ButtonLikeIconPosition_pb2.py +2 -3
  26. streamlit/proto/Button_pb2.py +3 -6
  27. streamlit/proto/Button_pb2.pyi +1 -18
  28. streamlit/proto/CameraInput_pb2.py +2 -3
  29. streamlit/proto/ChatInput_pb2.py +5 -8
  30. streamlit/proto/ChatInput_pb2.pyi +1 -17
  31. streamlit/proto/Checkbox_pb2.py +2 -3
  32. streamlit/proto/ClientState_pb2.py +2 -3
  33. streamlit/proto/Code_pb2.py +3 -6
  34. streamlit/proto/Code_pb2.pyi +1 -18
  35. streamlit/proto/ColorPicker_pb2.py +2 -3
  36. streamlit/proto/Common_pb2.py +7 -8
  37. streamlit/proto/Common_pb2.pyi +2 -10
  38. streamlit/proto/Components_pb2.py +2 -3
  39. streamlit/proto/DateInput_pb2.py +2 -3
  40. streamlit/proto/DateTimeInput_pb2.py +2 -3
  41. streamlit/proto/DeckGlJsonChart_pb2.py +5 -12
  42. streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -54
  43. streamlit/proto/Delta_pb2.py +4 -6
  44. streamlit/proto/Delta_pb2.pyi +5 -14
  45. streamlit/proto/DocString_pb2.py +2 -3
  46. streamlit/proto/DownloadButton_pb2.py +2 -3
  47. streamlit/proto/Element_pb2.py +4 -7
  48. streamlit/proto/Element_pb2.pyi +3 -23
  49. streamlit/proto/Empty_pb2.py +2 -3
  50. streamlit/proto/Exception_pb2.py +2 -3
  51. streamlit/proto/Favicon_pb2.py +2 -3
  52. streamlit/proto/FileUploader_pb2.py +2 -3
  53. streamlit/proto/ForwardMsg_pb2.py +12 -18
  54. streamlit/proto/ForwardMsg_pb2.pyi +4 -48
  55. streamlit/proto/GapSize_pb2.py +2 -3
  56. streamlit/proto/GitInfo_pb2.py +2 -3
  57. streamlit/proto/GraphVizChart_pb2.py +3 -6
  58. streamlit/proto/GraphVizChart_pb2.pyi +1 -18
  59. streamlit/proto/Heading_pb2.py +2 -3
  60. streamlit/proto/HeightConfig_pb2.py +2 -3
  61. streamlit/proto/Html_pb2.py +2 -3
  62. streamlit/proto/IFrame_pb2.py +3 -10
  63. streamlit/proto/IFrame_pb2.pyi +1 -42
  64. streamlit/proto/Image_pb2.py +3 -6
  65. streamlit/proto/Image_pb2.pyi +1 -18
  66. streamlit/proto/Json_pb2.py +2 -3
  67. streamlit/proto/LabelVisibilityMessage_pb2.py +2 -3
  68. streamlit/proto/LinkButton_pb2.py +2 -3
  69. streamlit/proto/Logo_pb2.py +2 -3
  70. streamlit/proto/Markdown_pb2.py +2 -3
  71. streamlit/proto/Metric_pb2.py +2 -3
  72. streamlit/proto/MetricsEvent_pb2.py +2 -3
  73. streamlit/proto/MultiSelect_pb2.py +3 -6
  74. streamlit/proto/MultiSelect_pb2.pyi +1 -11
  75. streamlit/proto/Navigation_pb2.py +2 -3
  76. streamlit/proto/NewSession_pb2.py +27 -28
  77. streamlit/proto/NewSession_pb2.pyi +2 -12
  78. streamlit/proto/NumberInput_pb2.py +2 -3
  79. streamlit/proto/PageConfig_pb2.py +2 -3
  80. streamlit/proto/PageInfo_pb2.py +2 -3
  81. streamlit/proto/PageLink_pb2.py +2 -3
  82. streamlit/proto/PageNotFound_pb2.py +2 -3
  83. streamlit/proto/PageProfile_pb2.py +2 -3
  84. streamlit/proto/ParentMessage_pb2.py +2 -3
  85. streamlit/proto/PlotlyChart_pb2.py +5 -10
  86. streamlit/proto/PlotlyChart_pb2.pyi +1 -58
  87. streamlit/proto/Progress_pb2.py +2 -3
  88. streamlit/proto/Radio_pb2.py +3 -6
  89. streamlit/proto/Radio_pb2.pyi +2 -19
  90. streamlit/proto/RootContainer_pb2.py +2 -3
  91. streamlit/proto/Selectbox_pb2.py +3 -6
  92. streamlit/proto/Selectbox_pb2.pyi +2 -19
  93. streamlit/proto/SessionEvent_pb2.py +2 -3
  94. streamlit/proto/SessionStatus_pb2.py +2 -3
  95. streamlit/proto/Skeleton_pb2.py +2 -3
  96. streamlit/proto/Slider_pb2.py +2 -3
  97. streamlit/proto/Snow_pb2.py +2 -3
  98. streamlit/proto/Space_pb2.py +2 -3
  99. streamlit/proto/Spinner_pb2.py +2 -3
  100. streamlit/proto/TextAlignmentConfig_pb2.py +2 -3
  101. streamlit/proto/TextArea_pb2.py +3 -6
  102. streamlit/proto/TextArea_pb2.pyi +1 -18
  103. streamlit/proto/TextInput_pb2.py +2 -3
  104. streamlit/proto/Text_pb2.py +2 -3
  105. streamlit/proto/TimeInput_pb2.py +2 -3
  106. streamlit/proto/Toast_pb2.py +2 -3
  107. streamlit/proto/Transient_pb2.py +2 -3
  108. streamlit/proto/Video_pb2.py +2 -3
  109. streamlit/proto/WidgetStates_pb2.py +2 -3
  110. streamlit/proto/WidthConfig_pb2.py +2 -3
  111. streamlit/proto/openmetrics_data_model_pb2.py +2 -3
  112. streamlit/runtime/runtime.py +0 -4
  113. streamlit/static/index.html +1 -1
  114. streamlit/static/manifest.json +295 -295
  115. streamlit/static/static/js/{ErrorOutline.esm.D71F8ziR.js → ErrorOutline.esm.DC6KVDKK.js} +1 -1
  116. streamlit/static/static/js/{FileDownload.esm.yTkppsJy.js → FileDownload.esm.Z9hRQIHi.js} +1 -1
  117. streamlit/static/static/js/{FileHelper.hUOqtbwa.js → FileHelper.DqvW90pm.js} +1 -1
  118. streamlit/static/static/js/{FormClearHelper.DN8D_YXO.js → FormClearHelper.DTFnX0js.js} +1 -1
  119. streamlit/static/static/js/{InputInstructions.DbssY6d4.js → InputInstructions.CdzsN_Va.js} +1 -1
  120. streamlit/static/static/js/{Particles.BznyVdfo.js → Particles.12xFSjcn.js} +1 -1
  121. streamlit/static/static/js/{ProgressBar.C5uBOtcx.js → ProgressBar.Dg-oMbWg.js} +1 -1
  122. streamlit/static/static/js/{StreamlitSyntaxHighlighter.Nf1895x-.js → StreamlitSyntaxHighlighter.rbzmcipw.js} +1 -1
  123. streamlit/static/static/js/{TableChart.esm.DHKzVs3a.js → TableChart.esm.CzJtGIR-.js} +1 -1
  124. streamlit/static/static/js/{Toolbar.CQsWYXer.js → Toolbar.COH7NaOE.js} +1 -1
  125. streamlit/static/static/js/{WidgetLabelHelpIconInline.6xCU76OE.js → WidgetLabelHelpIconInline.Dlc8f0Ji.js} +1 -1
  126. streamlit/static/static/js/{base-input.Cs-E6S71.js → base-input.Q-zJLgRK.js} +4 -4
  127. streamlit/static/static/js/{checkbox.OTGupu18.js → checkbox.BKgWNdeI.js} +1 -1
  128. streamlit/static/static/js/{createDownloadLinkElement.DnBEQQbK.js → createDownloadLinkElement.6oO-YlYv.js} +1 -1
  129. streamlit/static/static/js/{data-grid-overlay-editor.COiiMi5r.js → data-grid-overlay-editor.CO0xdNiG.js} +1 -1
  130. streamlit/static/static/js/{downloader.K0GUNeuj.js → downloader.BBXcXdX1.js} +1 -1
  131. streamlit/static/static/js/{embed.o8HvK3mH.js → embed.CJzOXYBF.js} +1 -1
  132. streamlit/static/static/js/{es6.BHy5pqTP.js → es6.CdxPQzwJ.js} +2 -2
  133. streamlit/static/static/js/{formatNumber.BK7h0k2z.js → formatNumber.DB5irY8c.js} +1 -1
  134. streamlit/static/static/js/{iconPosition.2YynQUxu.js → iconPosition.BVScIr6G.js} +1 -1
  135. streamlit/static/static/js/{iframeResizer.contentWindow.D5h3hQuU.js → iframeResizer.contentWindow.D_QHVqPM.js} +1 -1
  136. streamlit/static/static/js/{index.cfuZ69LI.js → index.6DFY6LUF.js} +1 -1
  137. streamlit/static/static/js/{index.Dh3PJIlq.js → index.B80gSxrS.js} +1 -1
  138. streamlit/static/static/js/{index.DxfYCrPp.js → index.BDtN2n7T.js} +1 -1
  139. streamlit/static/static/js/{index.DLUSo6de.js → index.BED2_zc7.js} +1 -1
  140. streamlit/static/static/js/{index.CxWzt6oi.js → index.BQnLeHnr.js} +1 -1
  141. streamlit/static/static/js/{index.Cb03y5I8.js → index.BSYebegS.js} +1 -1
  142. streamlit/static/static/js/{index.BtuskCwg.js → index.BSpYHDvk.js} +1 -1
  143. streamlit/static/static/js/{index.q0ceUXt6.js → index.BiCbrx53.js} +1 -1
  144. streamlit/static/static/js/{index.CgVv04GM.js → index.Biyf9aUg.js} +1 -1
  145. streamlit/static/static/js/{index.BPdmXoYW.js → index.BqbKiDp2.js} +1 -1
  146. streamlit/static/static/js/{index.COh5V_89.js → index.BqxwnMem.js} +1 -1
  147. streamlit/static/static/js/{index.DVRCyxMp.js → index.BtOoVQt7.js} +1 -1
  148. streamlit/static/static/js/{index.C7wst9Tm.js → index.BxMkW82k.js} +1 -1
  149. streamlit/static/static/js/{index.5zqfJ-in.js → index.BxQxTpWl.js} +1 -1
  150. streamlit/static/static/js/{index.BtRWcqZV.js → index.C5oqIM3a.js} +1 -1
  151. streamlit/static/static/js/{index.iUV9rb8C.js → index.CBE2cIbj.js} +1 -1
  152. streamlit/static/static/js/{index.DcngUOyD.js → index.CE2WIFD1.js} +1 -1
  153. streamlit/static/static/js/{index.aCorc3Yt.js → index.CPc_uZux.js} +48 -48
  154. streamlit/static/static/js/{index.Bqmx23jK.js → index.CUYi3FrD.js} +1 -1
  155. streamlit/static/static/js/index.Cpu2p5bH.js +1 -0
  156. streamlit/static/static/js/{index.Bfo1cXfC.js → index.CrY1BsL3.js} +1 -1
  157. streamlit/static/static/js/{index.Dc5-tFdw.js → index.CtbETWQK.js} +1 -1
  158. streamlit/static/static/js/{index.CUkhn-vu.js → index.CvtybR-u.js} +1 -1
  159. streamlit/static/static/js/{index.BZ-GJVxB.js → index.CxoREvnF.js} +1 -1
  160. streamlit/static/static/js/{index.C6wyTXhz.js → index.D6OexhdL.js} +1 -1
  161. streamlit/static/static/js/{index.HmRK3HyC.js → index.D9v2Y8Gk.js} +1 -1
  162. streamlit/static/static/js/{index.8MlRyIxN.js → index.DAfIQKfP.js} +1 -1
  163. streamlit/static/static/js/index.DAnczAW2.js +2 -0
  164. streamlit/static/static/js/{index.TjMWsKSH.js → index.DAyGxxdm.js} +1 -1
  165. streamlit/static/static/js/{index.6c-qDsD7.js → index.DCe7fo-m.js} +1 -1
  166. streamlit/static/static/js/{index.CX0KdFyR.js → index.DNfyKqhQ.js} +1 -1
  167. streamlit/static/static/js/{index.DJfMW0Gy.js → index.DRoJNzFX.js} +1 -1
  168. streamlit/static/static/js/{index.DBPWUJsj.js → index.DU68jVpM.js} +54 -54
  169. streamlit/static/static/js/{index.BfMPq234.js → index.DZmBuE3z.js} +2 -2
  170. streamlit/static/static/js/{index.CYhhEdja.js → index.DhRAGiPR.js} +1 -1
  171. streamlit/static/static/js/{index.DlgcEr0f.js → index.DrcbvB2t.js} +1 -1
  172. streamlit/static/static/js/{index.DxGXuhh6.js → index.Dud7RRHc.js} +1 -1
  173. streamlit/static/static/js/{index.C2EoeVjP.js → index.DyXcT2tD.js} +1 -1
  174. streamlit/static/static/js/{index.Bgf49D1Z.js → index.DyfvmNCy.js} +222 -222
  175. streamlit/static/static/js/{index.CZf7Go1Z.js → index.GieKl4BG.js} +1 -1
  176. streamlit/static/static/js/{index.C65jHNhe.js → index.YULCxEtm.js} +1 -1
  177. streamlit/static/static/js/{index.DL_yE83J.js → index._1zqETQ9.js} +2 -2
  178. streamlit/static/static/js/{index.CwtpGPHA.js → index.bQJYmJ2T.js} +1 -1
  179. streamlit/static/static/js/{index.hlAfdSqC.js → index.iXh5nbLZ.js} +1 -1
  180. streamlit/static/static/js/index.mSdC1FV6.js +1 -0
  181. streamlit/static/static/js/{index.BIqcOZ_u.js → index.nL1fkE1D.js} +1 -1
  182. streamlit/static/static/js/{index.VwDKazgt.js → index.tuFFlbxa.js} +1 -1
  183. streamlit/static/static/js/{index.BzTVI_BY.js → index.y-pa6LIX.js} +1 -1
  184. streamlit/static/static/js/{input.CXGIJ7D6.js → input.BcC6sPE_.js} +1 -1
  185. streamlit/static/static/js/{main.CCVkbuxC.js → main.TU5_aabd.js} +1 -1
  186. streamlit/static/static/js/{memory.CNbnYs2A.js → memory.By_OTlI4.js} +1 -1
  187. streamlit/static/static/js/{number-overlay-editor.CvI6wkld.js → number-overlay-editor.FSRaRpbU.js} +1 -1
  188. streamlit/static/static/js/{pandasStylerUtils.CFSReOTm.js → pandasStylerUtils.3IiIKU9-.js} +1 -1
  189. streamlit/static/static/js/{sandbox.Bld0L3us.js → sandbox.DnxTbWzV.js} +1 -1
  190. streamlit/static/static/js/{styled-components.BoUHK6TA.js → styled-components.BeEcZ0vW.js} +1 -1
  191. streamlit/static/static/js/{throttle.ByDFm7WV.js → throttle.emUyC44c.js} +1 -1
  192. streamlit/static/static/js/{timepicker.CN6CUZEL.js → timepicker.DZ_ZufYF.js} +1 -1
  193. streamlit/static/static/js/{toConsumableArray.DwMycSpg.js → toConsumableArray.DDV1bN1-.js} +1 -1
  194. streamlit/static/static/js/uniqueId.DTwvAE-J.js +1 -0
  195. streamlit/static/static/js/{useBasicWidgetState.Bg0ZMUt5.js → useBasicWidgetState.DvpdEDYZ.js} +1 -1
  196. streamlit/static/static/js/{useIntlLocale.DgBUDcPA.js → useIntlLocale.BBDLbTq9.js} +1 -1
  197. streamlit/static/static/js/{useTextInputAutoExpand.DDBezxks.js → useTextInputAutoExpand.BIApLJKn.js} +1 -1
  198. streamlit/static/static/js/{useUpdateUiValue.Df1h6fXC.js → useUpdateUiValue.DQ4RuJNC.js} +1 -1
  199. streamlit/static/static/js/{useWaveformController.DbWw5MEk.js → useWaveformController.B0olyXLQ.js} +1 -1
  200. streamlit/static/static/js/{withCalculatedWidth.YaK0HIIP.js → withCalculatedWidth.DYeqePuh.js} +1 -1
  201. streamlit/static/static/js/{withFullScreenWrapper.CcWCKoY8.js → withFullScreenWrapper.DtkUCO_d.js} +1 -1
  202. streamlit/testing/v1/element_tree.py +16 -2
  203. streamlit/web/server/server.py +0 -1
  204. streamlit/web/server/starlette/starlette_app.py +0 -1
  205. {streamlit_nightly-1.53.2.dev20260128.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/METADATA +10 -25
  206. {streamlit_nightly-1.53.2.dev20260128.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/RECORD +209 -218
  207. streamlit/proto/DataFrame_pb2.py +0 -56
  208. streamlit/proto/DataFrame_pb2.pyi +0 -430
  209. streamlit/proto/NamedDataSet_pb2.py +0 -28
  210. streamlit/proto/NamedDataSet_pb2.pyi +0 -67
  211. streamlit/proto/PagesChanged_pb2.py +0 -28
  212. streamlit/proto/PagesChanged_pb2.pyi +0 -55
  213. streamlit/proto/VegaLiteChart_pb2.py +0 -29
  214. streamlit/proto/VegaLiteChart_pb2.pyi +0 -79
  215. streamlit/static/static/js/index.CSPY26T2.js +0 -1
  216. streamlit/static/static/js/index.CdsyTabv.js +0 -1
  217. streamlit/static/static/js/index.CjRU8O1O.js +0 -2
  218. streamlit/static/static/js/uniqueId.DcCWa2cf.js +0 -1
  219. streamlit_nightly-1.53.2.dev20260128.data/scripts/streamlit.cmd +0 -16
  220. {streamlit_nightly-1.53.2.dev20260128.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/WHEEL +0 -0
  221. {streamlit_nightly-1.53.2.dev20260128.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/entry_points.txt +0 -0
  222. {streamlit_nightly-1.53.2.dev20260128.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{aR as L,aS as E,aT as O,aU as A,z as B,r as n,l as H,az as k,aV as N,j as h,aW as $,o as F,p as D,ab as P,ac as U,aX as Y,aY as j,av as K,aZ as X,ae as Z}from"./index.aCorc3Yt.js";import{u as _}from"./useBasicWidgetState.Bg0ZMUt5.js";import{a as q}from"./_arrayIncludes.B19Iyn2B.js";import"./FormClearHelper.DN8D_YXO.js";import"./_baseIndexOf.BTknn6Gb.js";var G=200;function J(o,t,d,u){var e=-1,m=q,l=!0,p=o.length,s=[],f=t.length;if(!p)return s;t.length>=G&&(m=E,l=!1,t=new L(t));e:for(;++e<p;){var i=o[e],c=i;if(i=i!==0?i:0,l&&c===c){for(var g=f;g--;)if(t[g]===c)continue e;s.push(i)}else m(t,c,u)||s.push(i)}return s}var Q=O(function(o,t){return A(o)?J(o,t):[]});const ee=B("div",{target:"ekqzr6e0"})(({theme:o})=>({"span[aria-disabled='true']":{background:o.colors.fadedText05}})),te=(o,t)=>o.getStringArrayValue(t),oe=o=>o.default.map(t=>o.options[t])??null,re=o=>o.rawValues??null,se=(o,t,d,u)=>{t.setStringArrayValue(o,d.value,{fromUi:d.fromUi},u)},ne=o=>{const{element:t,widgetMgr:d,fragmentId:u}=o,e=H(),m=n.useContext(k),l=n.useRef(null),p=n.useRef(0),[s,f]=_({getStateFromWidgetMgr:te,getDefaultStateFromProto:oe,getCurrStateFromProto:re,updateWidgetMgrState:se,element:t,widgetMgr:d,fragmentId:u}),i=t.maxSelections>0&&s.length>=t.maxSelections,c=n.useMemo(()=>{if(t.maxSelections===0)return"No results";if(s.length===t.maxSelections){const r=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${r}. Remove an option first.`}return"No results"},[t.maxSelections,s.length]),g=n.useCallback(r=>{switch(r.type){case"remove":return Q(s,r.option?.value);case"clear":return[];case"select":return s.concat([r.option?.value]);default:throw new Error(`State transition is unknown: ${r.type}`)}},[s]),C=n.useCallback(r=>{t.maxSelections&&r.type==="select"&&s.length>=t.maxSelections||f({value:g(r),fromUi:!0})},[t.maxSelections,g,f,s.length]),{options:v}=t,{placeholder:R,disabled:z,selectOptions:w,inputReadOnly:T,valuesToUiMulti:b,createFilterOptions:y}=N({options:v,isMulti:!0,acceptNewOptions:t.acceptNewOptions??!1,placeholderInput:t.placeholder}),M=n.useCallback((r,a)=>i?[]:y(s)(r,a),[y,i,s]),S=o.disabled||z,W=n.useMemo(()=>b(s),[b,s]),V=n.useMemo(()=>{const r=e.fontSizes.baseFontSize*1.6+14;return`${Math.round(r*4.25)}px`},[e.fontSizes.baseFontSize]);n.useLayoutEffect(()=>{l.current&&(l.current.scrollTop=p.current)});const x=n.useCallback(r=>{p.current=r.currentTarget.scrollTop},[]),I=n.useMemo(()=>(function(a){return h($,{...a,ref:l,onScroll:x})}),[x]);return F("div",{className:"stMultiSelect","data-testid":"stMultiSelect",children:[h(U,{label:t.label,disabled:S,labelVisibility:D(t.labelVisibility?.value),children:t.help&&h(P,{content:t.help,label:t.label})}),h(ee,{children:h(Y,{creatable:t.acceptNewOptions??!1,options:w,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:R,type:X.select,multi:!0,onChange:C,value:W,disabled:S,size:"compact",noResultsMsg:c,filterOptions:M,closeOnSelect:!1,ignoreCase:!1,overrides:{Popover:{props:{ignoreBoundary:m,overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:K,props:{style:{cursor:"pointer"},overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:({$isFocused:r})=>{const a=Z(e.colors,r);return{maxHeight:V,minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a}}},Placeholder:{style:()=>({flex:"inherit",color:S?e.colors.fadedText40:e.colors.fadedText60})},ValueContainer:{component:I,style:()=>({overflowY:"auto",paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.grayTextColor,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.grayTextColor}},Tag:{props:{overrides:{Root:{style:{fontWeight:e.fontWeights.normal,borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:T}},Dropdown:{component:j}}})})]})},ue=n.memo(ne);export{ue as default};
1
+ import{aR as L,aS as E,aT as O,aU as A,z as B,r as n,l as H,az as k,aV as N,j as h,aW as $,o as F,p as D,ab as P,ac as U,aX as Y,aY as j,av as K,aZ as X,ae as Z}from"./index.CPc_uZux.js";import{u as _}from"./useBasicWidgetState.DvpdEDYZ.js";import{a as q}from"./_arrayIncludes.B19Iyn2B.js";import"./FormClearHelper.DTFnX0js.js";import"./_baseIndexOf.BTknn6Gb.js";var G=200;function J(o,t,d,u){var e=-1,m=q,l=!0,p=o.length,s=[],f=t.length;if(!p)return s;t.length>=G&&(m=E,l=!1,t=new L(t));e:for(;++e<p;){var i=o[e],c=i;if(i=i!==0?i:0,l&&c===c){for(var g=f;g--;)if(t[g]===c)continue e;s.push(i)}else m(t,c,u)||s.push(i)}return s}var Q=O(function(o,t){return A(o)?J(o,t):[]});const ee=B("div",{target:"ekqzr6e0"})(({theme:o})=>({"span[aria-disabled='true']":{background:o.colors.fadedText05}})),te=(o,t)=>o.getStringArrayValue(t),oe=o=>o.default.map(t=>o.options[t])??null,re=o=>o.rawValues??null,se=(o,t,d,u)=>{t.setStringArrayValue(o,d.value,{fromUi:d.fromUi},u)},ne=o=>{const{element:t,widgetMgr:d,fragmentId:u}=o,e=H(),m=n.useContext(k),l=n.useRef(null),p=n.useRef(0),[s,f]=_({getStateFromWidgetMgr:te,getDefaultStateFromProto:oe,getCurrStateFromProto:re,updateWidgetMgrState:se,element:t,widgetMgr:d,fragmentId:u}),i=t.maxSelections>0&&s.length>=t.maxSelections,c=n.useMemo(()=>{if(t.maxSelections===0)return"No results";if(s.length===t.maxSelections){const r=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${r}. Remove an option first.`}return"No results"},[t.maxSelections,s.length]),g=n.useCallback(r=>{switch(r.type){case"remove":return Q(s,r.option?.value);case"clear":return[];case"select":return s.concat([r.option?.value]);default:throw new Error(`State transition is unknown: ${r.type}`)}},[s]),C=n.useCallback(r=>{t.maxSelections&&r.type==="select"&&s.length>=t.maxSelections||f({value:g(r),fromUi:!0})},[t.maxSelections,g,f,s.length]),{options:v}=t,{placeholder:R,disabled:z,selectOptions:w,inputReadOnly:T,valuesToUiMulti:b,createFilterOptions:y}=N({options:v,isMulti:!0,acceptNewOptions:t.acceptNewOptions??!1,placeholderInput:t.placeholder}),M=n.useCallback((r,a)=>i?[]:y(s)(r,a),[y,i,s]),S=o.disabled||z,W=n.useMemo(()=>b(s),[b,s]),V=n.useMemo(()=>{const r=e.fontSizes.baseFontSize*1.6+14;return`${Math.round(r*4.25)}px`},[e.fontSizes.baseFontSize]);n.useLayoutEffect(()=>{l.current&&(l.current.scrollTop=p.current)});const x=n.useCallback(r=>{p.current=r.currentTarget.scrollTop},[]),I=n.useMemo(()=>(function(a){return h($,{...a,ref:l,onScroll:x})}),[x]);return F("div",{className:"stMultiSelect","data-testid":"stMultiSelect",children:[h(U,{label:t.label,disabled:S,labelVisibility:D(t.labelVisibility?.value),children:t.help&&h(P,{content:t.help,label:t.label})}),h(ee,{children:h(Y,{creatable:t.acceptNewOptions??!1,options:w,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:R,type:X.select,multi:!0,onChange:C,value:W,disabled:S,size:"compact",noResultsMsg:c,filterOptions:M,closeOnSelect:!1,ignoreCase:!1,overrides:{Popover:{props:{ignoreBoundary:m,overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:K,props:{style:{cursor:"pointer"},overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:({$isFocused:r})=>{const a=Z(e.colors,r);return{maxHeight:V,minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a}}},Placeholder:{style:()=>({flex:"inherit",color:S?e.colors.fadedText40:e.colors.fadedText60})},ValueContainer:{component:I,style:()=>({overflowY:"auto",paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.grayTextColor,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.grayTextColor}},Tag:{props:{overrides:{Root:{style:{fontWeight:e.fontWeights.normal,borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:T}},Dropdown:{component:j}}})})]})},ue=n.memo(ne);export{ue as default};
@@ -1 +1 @@
1
- import{r as o,L,H as M,B as w,u as T,o as U,j as u,b as A,c as P,D as j,a as N,I as Y}from"./index.aCorc3Yt.js";import{m as z}from"./iconPosition.2YynQUxu.js";import{c as R}from"./createDownloadLinkElement.DnBEQQbK.js";function F(S){const{disabled:i,element:r,widgetMgr:B,endpoints:t,fragmentId:g}=S,{help:v,label:x,icon:I,ignoreRerun:h,type:p,url:k,deferredFileId:n}=r,b=r.shortcut?r.shortcut:void 0,[C,f]=o.useState(!1),[l,s]=o.useState(null),{enforceDownloadInNewTab:d=!1}=o.useContext(L),{requestDeferredFile:D}=o.useContext(M);let m=w.SECONDARY;p==="primary"?m=w.PRIMARY:p==="tertiary"&&(m=w.TERTIARY);const c=o.useMemo(()=>t.buildDownloadUrl(k),[t,k]);o.useEffect(()=>{n?.length||t.checkSourceUrlResponse(c,"Download Button")},[c,t,n]);const E=o.useCallback(async()=>{if(!D||!n){s("Deferred download not properly configured");return}f(!0),s(null);try{const e=await D(n);if(e.errorMsg){s(e.errorMsg),f(!1);return}const a=t.buildDownloadUrl(e.url);t.checkSourceUrlResponse(a,"Download Button"),R({filename:"",url:a,enforceDownloadInNewTab:d}).click()}catch(e){const a=e instanceof Error?e.message:"Download failed";s(a)}finally{f(!1)}},[D,n,t,d]),y=o.useCallback(()=>{if(i)return;h||B.setTriggerValue(r,{fromUi:!0},g),!!n?.length?E():R({filename:"",url:c,enforceDownloadInNewTab:d}).click()},[i,h,B,r,g,n,E,c,d]);return T({shortcut:b,disabled:i,onActivate:y}),o.useEffect(()=>{if(l){const e=setTimeout(()=>s(null),5e3);return()=>clearTimeout(e)}},[l]),U("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:[u(N,{help:v,containerWidth:!0,children:u(A,{kind:m,size:P.SMALL,disabled:i||C,onClick:y,containerWidth:!0,children:u(j,{icon:C?"spinner":I,iconPosition:z(r.iconPosition),label:x,shortcut:b})})}),l&&u(Y,{"data-testid":"stDownloadButtonError",children:l})]})}const O=o.memo(F);export{O as default};
1
+ import{r as o,L,H as M,B as w,u as T,o as U,j as u,b as A,c as P,D as j,a as N,I as Y}from"./index.CPc_uZux.js";import{m as z}from"./iconPosition.BVScIr6G.js";import{c as R}from"./createDownloadLinkElement.6oO-YlYv.js";function F(S){const{disabled:i,element:r,widgetMgr:B,endpoints:t,fragmentId:g}=S,{help:v,label:x,icon:I,ignoreRerun:h,type:p,url:k,deferredFileId:n}=r,b=r.shortcut?r.shortcut:void 0,[C,f]=o.useState(!1),[l,s]=o.useState(null),{enforceDownloadInNewTab:d=!1}=o.useContext(L),{requestDeferredFile:D}=o.useContext(M);let m=w.SECONDARY;p==="primary"?m=w.PRIMARY:p==="tertiary"&&(m=w.TERTIARY);const c=o.useMemo(()=>t.buildDownloadUrl(k),[t,k]);o.useEffect(()=>{n?.length||t.checkSourceUrlResponse(c,"Download Button")},[c,t,n]);const E=o.useCallback(async()=>{if(!D||!n){s("Deferred download not properly configured");return}f(!0),s(null);try{const e=await D(n);if(e.errorMsg){s(e.errorMsg),f(!1);return}const a=t.buildDownloadUrl(e.url);t.checkSourceUrlResponse(a,"Download Button"),R({filename:"",url:a,enforceDownloadInNewTab:d}).click()}catch(e){const a=e instanceof Error?e.message:"Download failed";s(a)}finally{f(!1)}},[D,n,t,d]),y=o.useCallback(()=>{if(i)return;h||B.setTriggerValue(r,{fromUi:!0},g),!!n?.length?E():R({filename:"",url:c,enforceDownloadInNewTab:d}).click()},[i,h,B,r,g,n,E,c,d]);return T({shortcut:b,disabled:i,onActivate:y}),o.useEffect(()=>{if(l){const e=setTimeout(()=>s(null),5e3);return()=>clearTimeout(e)}},[l]),U("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:[u(N,{help:v,containerWidth:!0,children:u(A,{kind:m,size:P.SMALL,disabled:i||C,onClick:y,containerWidth:!0,children:u(j,{icon:C?"spinner":I,iconPosition:z(r.iconPosition),label:x,shortcut:b})})}),l&&u(Y,{"data-testid":"stDownloadButtonError",children:l})]})}const O=o.memo(F);export{O as default};