streamlit 1.49.0__py3-none-any.whl → 1.50.0__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/column_config.py +2 -0
- streamlit/commands/navigation.py +3 -1
- streamlit/components/v1/custom_component.py +17 -42
- streamlit/config.py +306 -0
- streamlit/connections/base_connection.py +4 -2
- streamlit/dataframe_util.py +3 -2
- streamlit/delta_generator.py +2 -3
- streamlit/elements/arrow.py +63 -43
- streamlit/elements/deck_gl_json_chart.py +1 -0
- streamlit/elements/form.py +6 -6
- streamlit/elements/graphviz_chart.py +23 -6
- streamlit/elements/iframe.py +0 -2
- streamlit/elements/image.py +10 -9
- streamlit/elements/layouts.py +58 -11
- streamlit/elements/lib/built_in_chart_utils.py +95 -29
- streamlit/elements/lib/column_config_utils.py +5 -0
- streamlit/elements/lib/column_types.py +563 -144
- streamlit/elements/lib/dialog.py +1 -0
- streamlit/elements/lib/layout_utils.py +4 -4
- streamlit/elements/lib/pandas_styler_utils.py +30 -14
- streamlit/elements/lib/utils.py +17 -5
- streamlit/elements/map.py +1 -3
- streamlit/elements/media.py +2 -0
- streamlit/elements/metric.py +10 -32
- streamlit/elements/plotly_chart.py +17 -9
- streamlit/elements/pyplot.py +6 -6
- streamlit/elements/vega_charts.py +110 -44
- streamlit/elements/widgets/audio_input.py +48 -0
- streamlit/elements/widgets/button.py +27 -25
- streamlit/elements/widgets/button_group.py +1 -0
- streamlit/elements/widgets/camera_input.py +1 -0
- streamlit/elements/widgets/chat.py +1 -0
- streamlit/elements/widgets/checkbox.py +1 -0
- streamlit/elements/widgets/color_picker.py +1 -0
- streamlit/elements/widgets/data_editor.py +6 -5
- streamlit/elements/widgets/file_uploader.py +1 -0
- streamlit/elements/widgets/multiselect.py +10 -0
- streamlit/elements/widgets/number_input.py +3 -0
- streamlit/elements/widgets/radio.py +1 -0
- streamlit/elements/widgets/select_slider.py +1 -0
- streamlit/elements/widgets/selectbox.py +4 -0
- streamlit/elements/widgets/slider.py +1 -0
- streamlit/elements/widgets/text_widgets.py +6 -0
- streamlit/elements/widgets/time_widgets.py +9 -0
- streamlit/elements/write.py +1 -17
- streamlit/git_util.py +65 -43
- streamlit/material_icon_names.py +1 -1
- streamlit/proto/Arrow_pb2.py +10 -8
- streamlit/proto/Arrow_pb2.pyi +31 -2
- streamlit/proto/AudioInput_pb2.py +2 -2
- streamlit/proto/AudioInput_pb2.pyi +6 -2
- streamlit/proto/Block_pb2.py +11 -11
- streamlit/proto/Block_pb2.pyi +5 -0
- streamlit/proto/NewSession_pb2.py +18 -16
- streamlit/proto/NewSession_pb2.pyi +135 -2
- streamlit/runtime/app_session.py +18 -5
- streamlit/runtime/theme_util.py +148 -0
- streamlit/static/index.html +2 -2
- streamlit/static/manifest.json +221 -221
- streamlit/static/static/css/index.CHEnSPGk.css +1 -0
- streamlit/static/static/css/{index.C8X8rNzw.css → index.CIiu7Ygf.css} +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.u9XvzxL8.js → ErrorOutline.esm.DUpR0_Ka.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.CaRyZ-b2.js → FileDownload.esm.CN4j9-1w.js} +1 -1
- streamlit/static/static/js/{FileHelper.Dk2SwIi3.js → FileHelper.CaIUKG91.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.l_UPPvkg.js → FormClearHelper.DTcdrasw.js} +1 -1
- streamlit/static/static/js/{Hooks.BxrVEftw.js → Hooks.BRba_Own.js} +1 -1
- streamlit/static/static/js/InputInstructions.xnSDuYeQ.js +1 -0
- streamlit/static/static/js/{Particles.DkY6FDnc.js → Particles.CElH0XX2.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BPtSM82n.js → ProgressBar.DetlP5aY.js} +2 -2
- streamlit/static/static/js/Toolbar.C77ar7rq.js +1 -0
- streamlit/static/static/js/{base-input.egUI4LjJ.js → base-input.BQft14La.js} +3 -3
- streamlit/static/static/js/{checkbox.ButpszcE.js → checkbox.yZOfXCeX.js} +1 -1
- streamlit/static/static/js/{createSuper.DYJA5xa6.js → createSuper.Dh9w1cs8.js} +1 -1
- streamlit/static/static/js/data-grid-overlay-editor.DcuHuCyW.js +1 -0
- streamlit/static/static/js/{downloader.B3TjsSPZ.js → downloader.MeHtkq8r.js} +1 -1
- streamlit/static/static/js/{es6.BYSNuG4D.js → es6.VpBPGCnM.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CNPHJsF2.js → iframeResizer.contentWindow.yMw_ARIL.js} +1 -1
- streamlit/static/static/js/{index.DgpIMUsr.js → index.64ejlaaT.js} +1 -1
- streamlit/static/static/js/{index.BBnWuh07.js → index.6xX1278W.js} +90 -91
- streamlit/static/static/js/index.B-hiXRzw.js +1 -0
- streamlit/static/static/js/{index.DtwkPJs5.js → index.B0H9IXUJ.js} +47 -47
- streamlit/static/static/js/{index.0tDq1WXk.js → index.B4cAbHP6.js} +1 -1
- streamlit/static/static/js/{index.CFjU0x00.js → index.B4dUQfni.js} +1 -1
- streamlit/static/static/js/{index.BrD9sbpx.js → index.BPQo7BKk.js} +1 -1
- streamlit/static/static/js/index.Baqa90pe.js +2 -0
- streamlit/static/static/js/{index.uInpwWAP.js → index.Bj9JgOEC.js} +1 -1
- streamlit/static/static/js/index.BjCwMzj4.js +3 -0
- streamlit/static/static/js/{index.C3EXAI-u.js → index.Bm3VbPB5.js} +1 -1
- streamlit/static/static/js/{index.DGcW849X.js → index.Bxz2yX3P.js} +1 -1
- streamlit/static/static/js/{index.CeXLlclc.js → index.BycLveZ4.js} +1 -1
- streamlit/static/static/js/{index.CjQnYKID.js → index.C9BdUqTi.js} +1 -1
- streamlit/static/static/js/index.CFMf5_ez.js +197 -0
- streamlit/static/static/js/index.CGYqqs6j.js +1 -0
- streamlit/static/static/js/{index.CFePF7s4.js → index.CH1tqnSs.js} +1 -1
- streamlit/static/static/js/{index.BoJaJReB.js → index.CMItVsFA.js} +1 -1
- streamlit/static/static/js/{index.CuEFSQ-o.js → index.CTBk8Vk2.js} +1 -1
- streamlit/static/static/js/index.CiAQIz1H.js +7 -0
- streamlit/static/static/js/index.Cj7DSzVR.js +73 -0
- streamlit/static/static/js/index.Ck8rQ9OL.js +1 -0
- streamlit/static/static/js/{index.CqSRo6zQ.js → index.ClELlchS.js} +2 -2
- streamlit/static/static/js/{index.DP1rDFP0.js → index.Cnpi3o3E.js} +1 -1
- streamlit/static/static/js/{index.Cl_966eE.js → index.Ctn27_AE.js} +1 -1
- streamlit/static/static/js/{index.D4jR1m1z.js → index.D2QEXQq_.js} +1 -1
- streamlit/static/static/js/index.DH71Ezyj.js +1 -0
- streamlit/static/static/js/{index.CfiZGqj3.js → index.DHh-U0dK.js} +2 -2
- streamlit/static/static/js/{index.Bp1Of6L8.js → index.DK7hD7_w.js} +1 -1
- streamlit/static/static/js/{index.MQLQLR5Z.js → index.DKv_lNO7.js} +1 -1
- streamlit/static/static/js/index.DNLrMXgm.js +12 -0
- streamlit/static/static/js/index.DW0Grddz.js +1 -0
- streamlit/static/static/js/{index.Cb9gN2T2.js → index.Dbe-Q3C-.js} +1 -1
- streamlit/static/static/js/index.DcPNYEUo.js +1 -0
- streamlit/static/static/js/index.DuxqVQpd.js +1 -0
- streamlit/static/static/js/{index.BH79B25f.js → index.FFOzOWzC.js} +1 -1
- streamlit/static/static/js/{index.DWedOrkQ.js → index.GRUzrudl.js} +1 -1
- streamlit/static/static/js/{input.CbP5ZuQ7.js → input.s6pjQ49A.js} +1 -1
- streamlit/static/static/js/{memory.BuacVo2L.js → memory.Cuvsdfrl.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.BZb9zRl_.js → number-overlay-editor.DdgVR5m3.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DSM84rOS.js → possibleConstructorReturn.CqidKeei.js} +1 -1
- streamlit/static/static/js/{sandbox.C480llMG.js → sandbox.CCQREcJx.js} +1 -1
- streamlit/static/static/js/{timepicker.BunxCVp7.js → timepicker.mkJF97Bb.js} +4 -4
- streamlit/static/static/js/{toConsumableArray.B4o8rEx1.js → toConsumableArray.De7I7KVR.js} +1 -1
- streamlit/static/static/js/{uniqueId.tii0yosY.js → uniqueId.RI1LJdtz.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.Bnm4FD6K.js → useBasicWidgetState.CedkNjUW.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.Dgtwc1m0.js → useTextInputAutoExpand.Ca7w8dVs.js} +2 -2
- streamlit/static/static/js/{useUpdateUiValue.DjXdMFGw.js → useUpdateUiValue.DeXelfRH.js} +1 -1
- streamlit/static/static/js/withFullScreenWrapper.C3561XxJ.js +1 -0
- streamlit/static/static/media/MaterialSymbols-Rounded.DeCZgS-4.woff2 +0 -0
- streamlit/string_util.py +58 -1
- streamlit/web/bootstrap.py +0 -31
- streamlit/web/server/routes.py +17 -4
- streamlit/web/server/server.py +1 -0
- {streamlit-1.49.0.dist-info → streamlit-1.50.0.dist-info}/METADATA +1 -1
- {streamlit-1.49.0.dist-info → streamlit-1.50.0.dist-info}/RECORD +137 -136
- streamlit/static/static/css/index.COe1010n.css +0 -1
- streamlit/static/static/js/InputInstructions.C254RU9X.js +0 -1
- streamlit/static/static/js/Toolbar.BO_3WBaS.js +0 -1
- streamlit/static/static/js/data-grid-overlay-editor.C9gQLEnU.js +0 -1
- streamlit/static/static/js/index.BDZorv41.js +0 -1
- streamlit/static/static/js/index.BeTC4Yl-.js +0 -197
- streamlit/static/static/js/index.BnOd05Ko.js +0 -2
- streamlit/static/static/js/index.Bpe4-O2W.js +0 -1
- streamlit/static/static/js/index.C1qCS-sd.js +0 -1
- streamlit/static/static/js/index.C77g9sAQ.js +0 -3
- streamlit/static/static/js/index.Ca3y4ztK.js +0 -1
- streamlit/static/static/js/index.CbwuUwu4.js +0 -12
- streamlit/static/static/js/index.DKb-BAE2.js +0 -1
- streamlit/static/static/js/index.DStzYLqM.js +0 -73
- streamlit/static/static/js/index.DVKQKDLu.js +0 -1
- streamlit/static/static/js/index.DYbRPmVF.js +0 -1
- streamlit/static/static/js/index.z992t-BQ.js +0 -7
- streamlit/static/static/js/withFullScreenWrapper.0cy2pVf5.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.CBxVaFdk.woff2 +0 -0
- {streamlit-1.49.0.data → streamlit-1.50.0.data}/scripts/streamlit.cmd +0 -0
- {streamlit-1.49.0.dist-info → streamlit-1.50.0.dist-info}/WHEEL +0 -0
- {streamlit-1.49.0.dist-info → streamlit-1.50.0.dist-info}/entry_points.txt +0 -0
- {streamlit-1.49.0.dist-info → streamlit-1.50.0.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,E as x,_ as U,v as p,aA as X,e as g,j as a,ao as m,b as y,c as O,B as w,at as j,F as _,bg as G,aR as K,bo as Y,m as f,aa as F,bh as J,bi as Q,l as Z,R as ee,T as te,P as ie,W as se}from"./index.BBnWuh07.js";import{F as oe}from"./FormClearHelper.l_UPPvkg.js";import{g as I,F as S,b as le,D as ne,I as ae,C as re,a as de,s as ce}from"./FileHelper.Dk2SwIi3.js";import{S as pe,P as ge}from"./ProgressBar.BPtSM82n.js";import{u as ue}from"./Hooks.BxrVEftw.js";import{U as v}from"./UploadFileInfo.C-jY39rj.js";var C=c.forwardRef(function(e,s){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(x,U({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:s}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});C.displayName="ChevronLeft";var b=c.forwardRef(function(e,s){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(x,U({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:s}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});b.displayName="ChevronRight";var M=c.forwardRef(function(e,s){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(x,U({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:s}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});M.displayName="CloudUpload";var B=c.forwardRef(function(e,s){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(x,U({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:s}),c.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});B.displayName="Error";const D=p("section",{target:"e1d2qte90"})(({isDisabled:e,theme:s})=>({display:"flex",gap:s.spacing.lg,alignItems:"center",padding:s.spacing.lg,backgroundColor:s.colors.secondaryBg,borderRadius:s.radii.default,border:s.colors.widgetBorderColor?`${s.sizes.borderWidth} solid ${s.colors.widgetBorderColor}`:void 0,height:s.sizes.largestElementHeight,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${s.colors.primary}`},cursor:e?"not-allowed":"pointer"})),he=p("div",{target:"e1d2qte91"})(({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex",gap:e.spacing.lg,minWidth:0,width:"100%"})),V=p("span",{target:"e1d2qte92"})(({theme:e})=>({color:e.colors.darkenedBgMix100})),L=p("span",{target:"e1d2qte93"})(({theme:e,disabled:s})=>({color:s?e.colors.fadedText40:e.colors.bodyText})),fe=p("span",{target:"e1d2qte94"})(({theme:e,disabled:s})=>({fontSize:e.fontSizes.sm,color:s?e.colors.fadedText40:e.colors.fadedText60,display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:"100%"})),me=p("div",{target:"e1d2qte95"})({display:"flex",flexDirection:"column",minWidth:0,maxWidth:"100%"}),Fe=p("span",{target:"e1d2qte96"})({whiteSpace:"nowrap"}),E=p("div",{target:"e1d2qte97"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),ye=p("ul",{target:"e1d2qte98"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none})),P=p("li",{target:"e1d2qte99"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),A=p("div",{target:"e1d2qte910"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),T=p("div",{target:"e1d2qte911"})(({theme:e,disabled:s})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:s?e.colors.fadedText40:e.colors.bodyText})),W=p("div",{target:"e1d2qte912"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),we=p("span",{target:"e1d2qte913"})(({theme:e})=>({marginRight:e.spacing.twoXS})),Se=p("div",{target:"e1d2qte914"})(({theme:e,disabled:s})=>({display:"flex",padding:e.spacing.twoXS,color:s?e.colors.fadedText40:e.colors.darkenedBgMix100})),N=p("small",{target:"e1d2qte915"})(({theme:e})=>({color:e.colors.red,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),R=p("span",{target:"e1d2qte916"})({}),xe=e=>({[D]:{display:"flex",flexDirection:"column",alignItems:"flex-start",height:"auto",gap:e.spacing.sm},[V]:{display:"none"},[L]:{marginBottom:e.spacing.twoXS},[E]:{paddingRight:e.spacing.lg},[W]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[T]:{width:e.sizes.full},[A]:{flexDirection:"column"},[N]:{height:"auto",whiteSpace:"initial"},[R]:{display:"none"},[P]:{margin:e.spacing.none,padding:e.spacing.none}}),Ue=p("div",{target:"e1d2qte917"})(({theme:e,width:s})=>{if(s<X("23rem"))return xe(e)}),ve=({multiple:e,acceptedExtensions:s,maxSizeBytes:t,acceptDirectory:i=!1,disabled:o})=>{const l=()=>i?"directories":e?"files":"file",n=()=>s.length?` • ${s.map(d=>d.replace(/^\./,"").toUpperCase()).join(", ")}`:null,r=()=>`Limit ${I(t,S.Byte,0)} per file`;return g(he,{"data-testid":"stFileUploaderDropzoneInstructions",children:[a(V,{children:a(m,{content:M,size:"threeXL"})}),g(me,{children:[g(L,{disabled:o,children:["Drag and drop ",l()," here"]}),g(fe,{disabled:o,children:[r(),n()]})]})]})},ze=c.memo(ve),Ie=({onDrop:e,multiple:s,acceptedExtensions:t,maxSizeBytes:i,disabled:o,label:l,acceptDirectory:n=!1})=>a(ne,{onDrop:e,multiple:s,accept:le(t),maxSize:i,disabled:o,useFsAccessApi:!1,children:({getRootProps:r,getInputProps:d})=>{const u=d({multiple:s||!!n});return g(D,{...r(),"data-testid":"stFileUploaderDropzone",isDisabled:o,"aria-label":l,"aria-disabled":o,children:[a("input",{"data-testid":"stFileUploaderDropzoneInput",...u,...n&&{webkitdirectory:""}}),a(ze,{multiple:s,acceptedExtensions:t,maxSizeBytes:i,acceptDirectory:n,disabled:o}),a(Fe,{children:a(y,{kind:w.SECONDARY,disabled:o,size:O.SMALL,children:n?"Browse directories":"Browse files"})})]})}}),Ce=c.memo(Ie),q=p("small",{target:"e1w49r0d0"})(({kind:e,disabled:s,theme:t})=>{const{danger:i,fadedText60:o,fadedText40:l}=t.colors;let n=o;return s&&(n=l),e==="danger"&&(n=i),{color:n,fontSize:t.fontSizes.sm,lineHeight:t.lineHeights.tight}}),be=({fileInfo:e,disabled:s})=>e.status.type==="uploading"?a(ge,{value:e.status.progress,size:pe.SMALL}):e.status.type==="error"?g(N,{children:[a(we,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),a(R,{children:a(m,{content:B,size:"lg"})})]}):e.status.type==="uploaded"?a(q,{disabled:s,children:I(e.size,S.Byte)}):null,Me=({fileInfo:e,onDelete:s,disabled:t})=>g(W,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[a(Se,{disabled:t,children:a(m,{content:ae,size:"twoXL"})}),g(A,{className:"stFileUploaderFileData",children:[a(T,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,disabled:t,children:e.name}),a(be,{fileInfo:e,disabled:t})]}),a("div",{"data-testid":"stFileUploaderDeleteBtn",children:a(y,{onClick:()=>s(e.id),kind:w.MINIMAL,disabled:t,"aria-label":`Remove ${e.name}`,children:a(m,{content:re,size:"lg"})})})]}),Be=c.memo(Me),De=p("div",{target:"egc9vxm0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),Ve=p("div",{target:"egc9vxm1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),Le=({currentPage:e,totalPages:s,onNext:t,onPrevious:i})=>g(De,{"data-testid":"stFileUploaderPagination",children:[a(q,{children:`Showing page ${e} of ${s}`}),g(Ve,{children:[a(y,{onClick:i,kind:w.MINIMAL,children:a(m,{content:C,size:"xl"})}),a(y,{onClick:t,kind:w.MINIMAL,children:a(m,{content:b,size:"xl"})})]})]}),Ee=c.memo(Le),z=(e,s)=>Math.ceil(e.length/s),Pe=e=>j(({pageSize:t,items:i,resetOnAdd:o,...l})=>{const[n,r]=c.useState(0),[d,u]=c.useState(()=>z(i,t)),h=ue(i);c.useEffect(()=>{h&&h.length!==i.length&&u(z(i,t)),h&&h.length<i.length?o&&r(0):n+1>=d&&r(d-1)},[i,n,t,h,o,d]);const H=()=>{r(Math.min(n+1,d-1))},k=()=>{r(Math.max(0,n-1))},$=i.slice(n*t,n*t+t);return g(_,{children:[a(e,{items:$,...l}),i.length>t?a(Ee,{pageSize:t,totalPages:d,currentPage:n+1,onNext:H,onPrevious:k}):null]})},e),Ae=({items:e,onDelete:s,disabled:t})=>a(ye,{children:e.map(i=>a(P,{children:a(Be,{fileInfo:i,onDelete:s,disabled:t})},i.id))}),Te=Pe(Ae),We=e=>a(E,{children:a(Te,{...e})}),Ne=c.memo(We);class Re extends c.PureComponent{constructor(s){super(s),this.formClearHelper=new oe,this.localFileIdCounter=1,this.forceUpdatingStatus=!1,this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:i,widgetMgr:o,fragmentId:l}=this.props,n=o.getFileUploaderStateValue(i);K(t,n)||o.setFileUploaderStateValue(i,t,{fromUi:!0},l)},this.isFileTypeAllowed=t=>{const{element:i}=this.props,{type:o}=i;if(!o||o.length===0)return!0;const l=t.name.toLowerCase();return o.some(n=>l.endsWith(n.toLowerCase()))},this.filterDirectoryFiles=t=>{const i=[],o=[];return t.forEach(l=>{this.isFileTypeAllowed(l)?i.push(l):o.push({file:l,errors:[{code:"file-invalid-type",message:`${l.type} files are not allowed.`}]})}),{accepted:i,rejected:o}},this.dropHandler=(t,i)=>{const{element:o}=this.props,{multipleFiles:l}=o;if(!!o.acceptDirectory&&t.length>0){const{accepted:r,rejected:d}=this.filterDirectoryFiles(t);t=r,i=[...i,...d]}if(!l&&t.length===0&&i.length>1){const r=i.findIndex(d=>d.errors.length===1&&d.errors[0].code==="too-many-files");r>=0&&(t.push(i[r].file),i.splice(r,1))}if(this.props.uploadClient.fetchFileURLs(t).then(r=>{if(!l&&t.length>0){const d=this.state.files.find(u=>u.status.type!=="error");d&&(this.forceUpdatingStatus=!0,this.deleteFile(d.id),this.forceUpdatingStatus=!1)}Y(r,t).forEach(([d,u])=>{this.uploadFile(d,u)})}).catch(r=>{this.addFiles(t.map(d=>new v(d.name,d.size,this.nextLocalFileId(),{type:"error",errorMessage:r})))}),i.length>0){const r=i.map(d=>de(d,this.nextLocalFileId(),this.maxUploadSizeInBytes));this.addFiles(r)}},this.uploadFile=(t,i)=>{const o=new AbortController,l=i.webkitRelativePath||i.name,n=new v(l,i.size,this.nextLocalFileId(),{type:"uploading",abortController:o,progress:1});this.addFile(n),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,i,r=>this.onUploadProgress(r,n.id),o.signal).then(()=>this.onUploadComplete(n.id,t)).catch(r=>{r instanceof DOMException&&r.name==="AbortError"||this.updateFile(n.id,n.setStatus({type:"error",errorMessage:r?r.toString():"Unknown error"}))})},this.onUploadComplete=(t,i)=>{const o=this.getFile(t);f(o)||o.status.type!=="uploading"||this.updateFile(o.id,o.setStatus({type:"uploaded",fileId:i.fileId,fileUrls:i}))},this.deleteFile=t=>{if(this.props.disabled)return;const i=this.getFile(t);f(i)||(i.status.type==="uploading"&&i.status.abortController.abort(),i.status.type==="uploaded"&&i.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(i.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{F.flushSync(()=>{this.setState(i=>({files:[...i.files,t]}))})},this.addFiles=t=>{F.flushSync(()=>{this.setState(i=>({files:[...i.files,...t]}))})},this.removeFile=t=>{F.flushSync(()=>{this.setState(i=>({files:i.files.filter(o=>o.id!==t)}))})},this.getFile=t=>this.state.files.find(i=>i.id===t),this.updateFile=(t,i)=>{F.flushSync(()=>{this.setState(o=>({files:o.files.map(l=>l.id===t?i:l)}))})},this.onUploadProgress=(t,i)=>{const o=this.getFile(i);if(f(o)||o.status.type!=="uploading")return;const l=Math.round(t.loaded*100/t.total);o.status.progress!==l&&this.updateFile(i,o.setStatus({type:"uploading",abortController:o.status.abortController,progress:l}))},this.onFormCleared=()=>{F.flushSync(()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(f(t))return;const{widgetMgr:i,element:o,fragmentId:l}=this.props;i.setFileUploaderStateValue(o,t,{fromUi:!0},l)})})},this.state=this.initialValue}get initialValue(){const s={files:[]},{widgetMgr:t,element:i}=this.props,o=t.getFileUploaderStateValue(i);if(f(o))return s;const{uploadedFileInfo:l}=o;return f(l)||l.length===0?s:{files:l.map(n=>{const r=n.name,d=n.size,u=n.fileId,h=n.fileUrls;return new v(r,d,this.nextLocalFileId(),{type:"uploaded",fileId:u,fileUrls:h})})}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){const s=this.props.element.maxUploadSizeMb;return ce(s,S.Megabyte,S.Byte)}get status(){const s=t=>t.status.type==="uploading";return this.state.files.some(s)||this.forceUpdatingStatus?"updating":"ready"}componentDidMount(){const s=this.createWidgetValue(),{element:t,widgetMgr:i,fragmentId:o}=this.props;i.getFileUploaderStateValue(t)===void 0&&i.setFileUploaderStateValue(t,s,{fromUi:!1},o)}createWidgetValue(){const s=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:i,size:o,status:l}=t,{fileId:n,fileUrls:r}=l;return new J({fileId:n,fileUrls:r,name:i,size:o})});return new Q({uploadedFileInfo:s})}render(){const{files:s}=this.state,{element:t,disabled:i,widgetMgr:o,width:l}=this.props,n=t.type;this.formClearHelper.manageFormClearListener(o,t.formId,this.onFormCleared);const r=s.slice().reverse();return g(Ue,{className:"stFileUploader","data-testid":"stFileUploader",width:l,children:[a(se,{label:t.label,disabled:i,labelVisibility:Z(t.labelVisibility?.value),children:t.help&&a(ee,{children:a(te,{content:t.help,placement:ie.TOP_RIGHT})})}),a(Ce,{onDrop:this.dropHandler,multiple:t.multipleFiles,acceptedExtensions:n,maxSizeBytes:this.maxUploadSizeInBytes,label:t.label,disabled:i,acceptDirectory:!!t.acceptDirectory}),r.length>0&&a(Ne,{items:r,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0,disabled:i})]})}nextLocalFileId(){return this.localFileIdCounter++}}const je=G(c.memo(Re));export{je as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,E as X,_ as K,v as x,az as I,m as b,o as M,x as dt,u as pt,a6 as ft,a7 as mt,aA as O,e as N,j as l,l as bt,R as gt,T as ht,P as yt,W as It,y as Tt,ao as j}from"./index.BBnWuh07.js";import{u as wt}from"./uniqueId.tii0yosY.js";import{I as Ct}from"./InputInstructions.C254RU9X.js";import{u as St}from"./FormClearHelper.l_UPPvkg.js";import{s as Vt}from"./sprintf.D7DtBTRn.js";import{I as vt}from"./input.CbP5ZuQ7.js";import"./base-input.egUI4LjJ.js";var q=r.forwardRef(function(t,e){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(X,K({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M0 3v2h8V3H0z"}))});q.displayName="Minus";var J=r.forwardRef(function(t,e){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(X,K({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});J.displayName="Plus";const xt=x("div",{target:"eaba2yi0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor??t.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),kt=x("div",{target:"eaba2yi1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),_=x("button",{target:"eaba2yi2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),Dt=x("div",{target:"eaba2yi3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),Et=dt.getLogger("NumberInput");function Rt(t){return b(t)||t===""?void 0:t}const Nt=({value:t,format:e,step:n,dataType:m})=>{if(b(t))return null;let o=Rt(e);if(b(o)&&M(n)){const u=n.toString();m===I.DataType.FLOAT&&n!==0&&u.includes(".")&&(o=`%0.${u.split(".")[1].length}f`)}if(b(o))return t.toString();try{return Vt.sprintf(o,t)}catch(u){return Et.warn(`Error in sprintf(${o}, ${t}): ${u}`),String(t)}},zt=(t,e,n)=>b(t)?!1:t-e>=n,Ft=(t,e,n)=>b(t)?!1:t+e<=n,Wt=t=>(t.element.dataType===I.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,G=({step:t,dataType:e})=>t||(e===I.DataType.INT?1:.01),Lt=({disabled:t,element:e,widgetMgr:n,fragmentId:m})=>{const o=pt(),{dataType:u,id:C,formId:f,default:z,format:F,icon:k,min:g,max:h}=e,{width:W,elementRef:Q}=ft(),[d,Y]=r.useState(()=>G(e)),Z=Wt({element:e,widgetMgr:n}),[y,T]=r.useState(!1),[s,w]=r.useState(Z),[L,B]=r.useState(!1),S=r.useRef(null),P=r.useRef(wt("number_input_")),U=r.useMemo(()=>Nt({value:s,dataType:u,format:F,step:d}),[s,u,F,d]),V=zt(s,d,g),v=Ft(s,d,h),H=mt({formId:f}),tt=H?n.allowFormEnterToSubmit(f):y,et=L&&W>o.breakpoints.hideWidgetDetails;r.useEffect(()=>{Y(G({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]);const c=r.useCallback(({value:a,source:i})=>{if(M(a)&&(g>a||a>h))S.current?.reportValidity();else{const p=a??z??null;switch(u){case I.DataType.INT:n.setIntValue({id:C,formId:f},p,i,m);break;case I.DataType.FLOAT:n.setDoubleValue({id:C,formId:f},p,i,m);break;default:throw new Error("Invalid data type")}T(!1),w(p)}},[g,h,S,n,m,u,C,f,z]),ot=r.useCallback(()=>{y&&c({value:s,source:{fromUi:!0}}),B(!1)},[y,s,c]),rt=r.useCallback(()=>{B(!0)},[]),A=r.useCallback(()=>{const{value:a}=e;e.setValue=!1,w(a??null),c({value:a??null,source:{fromUi:!1}})},[e,c]);r.useEffect(()=>{e.setValue?A():c({value:s,source:{fromUi:!1}});const a=S.current;if(a){const i=p=>{p.preventDefault()};return a.addEventListener("wheel",i),()=>{a.removeEventListener("wheel",i)}}},[]),e.setValue&&A();const D=b(e.default)&&!t,nt=r.useCallback(()=>{const a=e.default??null;w(a),c({value:a,source:{fromUi:!0}})},[e]);St({element:e,widgetMgr:n,onFormCleared:nt});const at=a=>{const{value:i}=a.target;if(i==="")T(!0),w(null);else{let p;e.dataType===I.DataType.INT?p=parseInt(i,10):p=parseFloat(i),T(!0),w(p)}},E=r.useCallback(()=>{v&&(T(!0),c({value:(s??g)+d,source:{fromUi:!0}}))},[s,g,d,v]),R=r.useCallback(()=>{V&&(T(!0),c({value:(s??h)-d,source:{fromUi:!0}}))},[s,h,d,V]),st=r.useCallback(a=>{const{key:i}=a;switch(i){case"ArrowUp":a.preventDefault(),E();break;case"ArrowDown":a.preventDefault(),R();break}},[E,R]),it=r.useCallback(a=>{a.key==="Enter"&&(y&&c({value:s,source:{fromUi:!0}}),n.allowFormEnterToSubmit(f)&&n.submitForm(f,m))},[y,s,c,n,f,m]),$=k?.startsWith(":material"),lt=$?"lg":"base",ct=O(o.iconSizes.lg)+2*O(o.spacing.twoXS),ut=k?o.breakpoints.hideNumberInputControls+ct:o.breakpoints.hideNumberInputControls;return N("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:Q,children:[l(It,{label:e.label,disabled:t,labelVisibility:bt(e.labelVisibility?.value),htmlFor:P.current,children:e.help&&l(gt,{children:l(ht,{content:e.help,placement:yt.TOP_RIGHT})})}),N(xt,{className:L?"focused":"","data-testid":"stNumberInputContainer",children:[l(vt,{type:"number",inputRef:S,value:U??"",placeholder:e.placeholder,onBlur:ot,onFocus:rt,onChange:at,onKeyPress:it,onKeyDown:st,clearable:D,clearOnEscape:D,disabled:t,"aria-label":e.label,startEnhancer:e.icon&&l(Tt,{"data-testid":"stNumberInputIcon",iconValue:e.icon,size:lt}),id:P.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.darkGray,padding:o.spacing.threeXS,height:o.sizes.clearIconSize,width:o.sizes.clearIconSize,":hover":{fill:o.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:d,min:g,max:h,type:"number",inputMode:""},style:{fontWeight:o.fontWeights.normal,lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,"::placeholder":{color:o.colors.fadedText60}}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0,paddingLeft:k?o.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:o.iconSizes.lg,color:$?o.colors.fadedText60:"inherit"}}}}),W>ut&&N(kt,{children:[l(_,{"data-testid":"stNumberInputStepDown",onClick:R,disabled:!V||t,tabIndex:-1,children:l(j,{content:q,size:"xs",color:V?"inherit":o.colors.disabled})}),l(_,{"data-testid":"stNumberInputStepUp",onClick:E,disabled:!v||t,tabIndex:-1,children:l(j,{content:J,size:"xs",color:v?"inherit":o.colors.disabled})})]})]}),et&&l(Dt,{clearable:D,children:l(Ct,{dirty:y,value:U??"",inForm:H,allowEnterToSubmit:tt})})]})},jt=r.memo(Lt);export{jt as default};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{v as c,a1 as l,r as i,j as e,ar as p}from"./index.BBnWuh07.js";import{P as d,R as f}from"./Particles.DkY6FDnc.js";const g=""+new URL("../media/flake-0.DgWaVvm5.png",import.meta.url).href,u=""+new URL("../media/flake-1.B2r5AHMK.png",import.meta.url).href,E=""+new URL("../media/flake-2.BnWSExPC.png",import.meta.url).href,o=150,s=150,S=10,x=90,_=4e3,a=(t,n=0)=>Math.random()*(t-n)+n,w=()=>l(`from{transform:translateY(0)
|
|
2
|
-
rotateX(`,a(360),`deg)
|
|
3
|
-
rotateY(`,a(360),`deg)
|
|
4
|
-
rotateZ(`,a(360),"deg);}to{transform:translateY(calc(100vh + ",o,`px))
|
|
5
|
-
rotateX(0)
|
|
6
|
-
rotateY(0)
|
|
7
|
-
rotateZ(0);}`),A=c("img",{target:"es7rdur0"})(({theme:t})=>({position:"fixed",top:`${-o}px`,marginLeft:`${-s/2}px`,zIndex:t.zIndices.balloons,left:`${a(x,S)}vw`,animationDelay:`${a(_)}ms`,height:`${o}px`,width:`${s}px`,pointerEvents:"none",animationDuration:"3000ms",animationName:w(),animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),I=100,m=[g,u,E],M=m.length,h=i.memo(({particleType:t,resourceCrossOriginMode:n})=>{const r=m[t];return e(A,{src:r,crossOrigin:p(n,r)})}),P=function({scriptRunId:n}){return e(f,{children:e(d,{className:"stSnow","data-testid":"stSnow",scriptRunId:n,numParticleTypes:M,numParticles:I,ParticleComponent:h})})},L=i.memo(P);export{I as NUM_FLAKES,L as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,v as f,L as p,as as h,u as x,a6 as y,j as i,at as C}from"./index.BBnWuh07.js";const m=n.createContext(null);m.displayName="ElementFullscreenContext";const g=f("div",{target:"e1q5ojhd0"})(({theme:e,isExpanded:t})=>({width:"100%",...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"}:{}})),w=()=>{const{setFullScreen:e}=n.useContext(p),[t,s]=n.useState(!1),{fullHeight:r,fullWidth:c}=h(),l=n.useCallback(a=>{s(a),e(a)},[e]),u=n.useCallback(()=>{document.body.style.overflow="hidden",l(!0)},[l]),o=n.useCallback(()=>{document.body.style.overflow="unset",l(!1)},[l]),d=n.useCallback(a=>{a.keyCode===27&&t&&o()},[o,t]);return n.useEffect(()=>(document.addEventListener("keydown",d,!1),()=>{document.removeEventListener("keydown",d,!1)}),[d]),n.useMemo(()=>({expanded:t,zoomIn:u,zoomOut:o,fullHeight:r,fullWidth:c}),[t,u,o,r,c])},F=({children:e})=>{const t=x(),{expanded:s,fullHeight:r,fullWidth:c,zoomIn:l,zoomOut:u}=w(),{width:o,elementRef:d}=y(),a=n.useMemo(()=>({width:s?c:o,height:s?r:void 0,expanded:s,expand:l,collapse:u}),[s,r,c,o,l,u]);return i(m.Provider,{value:a,children:i(g,{ref:d,isExpanded:s,"data-testid":"stFullScreenFrame",theme:t,children:e})})};function E(e){const t=s=>i(F,{children:i(e,{...s})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,C(t,e)}export{m as E,E as w};
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|