streamlit-nightly 1.42.1.dev20250210__py2.py3-none-any.whl → 1.42.1.dev20250212__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/page_config.py +1 -1
- streamlit/config.py +9 -0
- streamlit/elements/arrow.py +11 -0
- streamlit/elements/widgets/data_editor.py +22 -6
- streamlit/proto/Arrow_pb2.py +8 -8
- streamlit/proto/Arrow_pb2.pyi +7 -2
- streamlit/proto/NewSession_pb2.py +16 -16
- streamlit/proto/NewSession_pb2.pyi +12 -3
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.CJC5yID5.js → FileDownload.esm.gmDYBMnS.js} +1 -1
- streamlit/static/static/js/{FileDropzone.BxEWox87.js → FileDropzone.BhS2dkwO.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.D3S2tctS.js → FormClearHelper.BjdyfMQx.js} +1 -1
- streamlit/static/static/js/{Hooks.BwOODKo2.js → Hooks.BKB06vs4.js} +1 -1
- streamlit/static/static/js/{InputInstructions.Cm2uD0mH.js → InputInstructions.BEaJdOY6.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BqFWIdp2.js → ProgressBar.DycN90bZ.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.ax0m2H0_.js → RenderInPortalIfExists.BhsYk57k.js} +1 -1
- streamlit/static/static/js/{Toolbar.CRowl_WL.js → Toolbar.M28tVbcl.js} +1 -1
- streamlit/static/static/js/{base-input.krLFbHyn.js → base-input.BJFXZaN6.js} +1 -1
- streamlit/static/static/js/{createSuper.k6SaTk0j.js → createSuper.CR2BB5ll.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BUaZRQkO.js → data-grid-overlay-editor.DThw5LO3.js} +1 -1
- streamlit/static/static/js/{downloader.CFLXdJg2.js → downloader.oXcdDod3.js} +1 -1
- streamlit/static/static/js/{es6.gxLg_8ha.js → es6.Dm6Lr5sS.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.DkwEeyR9.js → iframeResizer.contentWindow.EQIQrAd4.js} +1 -1
- streamlit/static/static/js/{index.Cesoqj5i.js → index.0Eb9CO_K.js} +1 -1
- streamlit/static/static/js/{index.cRZuEjlj.js → index.B1X_ANFX.js} +1 -1
- streamlit/static/static/js/{index.BSsjknPR.js → index.B2zhJEHf.js} +1 -1
- streamlit/static/static/js/{index.BOCJ0fVC.js → index.B49jyHZy.js} +1 -1
- streamlit/static/static/js/{index.Cj8uDDnI.js → index.BELZ0Ua3.js} +1 -1
- streamlit/static/static/js/{index.DXBI5Jkr.js → index.BZUNGvtg.js} +2 -2
- streamlit/static/static/js/{index.BOR0ctru.js → index.BjOrvaSf.js} +1 -1
- streamlit/static/static/js/{index.DJY4JXFf.js → index.BkwFDrjh.js} +1 -1
- streamlit/static/static/js/{index.BdR17uHT.js → index.BmunCvlQ.js} +1 -1
- streamlit/static/static/js/{index.Blgy4CCd.js → index.BrTAJ7cx.js} +7 -7
- streamlit/static/static/js/{index.CUPb182F.js → index.BzhkD1G1.js} +1 -1
- streamlit/static/static/js/{index.DrwNQ7G8.js → index.C-qfcK5k.js} +22 -22
- streamlit/static/static/js/{index.DEpXqZe9.js → index.C02XURgk.js} +1 -1
- streamlit/static/static/js/{index.BiQ_POiE.js → index.C8ahq2Yl.js} +1 -1
- streamlit/static/static/js/{index.BOVOcQJK.js → index.CAvxO15c.js} +1 -1
- streamlit/static/static/js/{index.Cksh9dIb.js → index.CIgcpP2h.js} +1 -1
- streamlit/static/static/js/{index.Be3Ud760.js → index.CPA4hfh-.js} +15 -15
- streamlit/static/static/js/{index.BAHug0jz.js → index.CYO_k8m0.js} +1 -1
- streamlit/static/static/js/{index.CoIye-dC.js → index.CYR86Hh7.js} +1 -1
- streamlit/static/static/js/{index.PzwaVSFN.js → index.Cb9G_5ys.js} +1 -1
- streamlit/static/static/js/{index.BbOp1EEY.js → index.Cm_RlOaX.js} +61 -61
- streamlit/static/static/js/{index.C-4bC9wo.js → index.CqE8cJhC.js} +1 -1
- streamlit/static/static/js/{index.DooQ24w4.js → index.D-x9B5Oa.js} +1 -1
- streamlit/static/static/js/{index.FyfJgAtw.js → index.D2G_9kKo.js} +1 -1
- streamlit/static/static/js/{index.D69WEQtH.js → index.DHr41xKA.js} +1 -1
- streamlit/static/static/js/{index.BaBZULmv.js → index.DXjCUYHV.js} +1 -1
- streamlit/static/static/js/{index.C_Vm41WK.js → index.DhzvJb2S.js} +1 -1
- streamlit/static/static/js/{index.D8KPGiS9.js → index.DvCjEp1s.js} +1 -1
- streamlit/static/static/js/{index.UW7UEFVt.js → index.DwnmFzkn.js} +1 -1
- streamlit/static/static/js/{index.xMCeK5i-.js → index.DxFBqI9I.js} +1 -1
- streamlit/static/static/js/{index.C1ewZGYv.js → index.L2uUYiab.js} +1 -1
- streamlit/static/static/js/{index.C8CCX_u3.js → index.V7XbIe_g.js} +1 -1
- streamlit/static/static/js/{index.CVtSssNQ.js → index.Vm77sF3W.js} +1 -1
- streamlit/static/static/js/{index.B7i1hjL6.js → index.X-CeecsU.js} +1 -1
- streamlit/static/static/js/{index.C_eNMQ0G.js → index.YLipy1A9.js} +1 -1
- streamlit/static/static/js/{index.DxK0b7hW.js → index.tuHBuV8y.js} +1 -1
- streamlit/static/static/js/{index.waVftNUu.js → index.xghdNmh6.js} +1 -1
- streamlit/static/static/js/{input.RldPkbfl.js → input.Ch5EKcBw.js} +1 -1
- streamlit/static/static/js/{memory.CJUkEDwO.js → memory.cKfo0PEw.js} +1 -1
- streamlit/static/static/js/{mergeWith.mP6-fMJS.js → mergeWith.CrVvaazT.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.Cexyv1f1.js → number-overlay-editor.C5_oSHKj.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.Bfw_ecB7.js → possibleConstructorReturn.B1H1HPCb.js} +1 -1
- streamlit/static/static/js/{sandbox.B9QCFfso.js → sandbox.ZiYcTL56.js} +1 -1
- streamlit/static/static/js/{textarea.BphfZ_P9.js → textarea.GanBEqei.js} +1 -1
- streamlit/static/static/js/{timepicker.BGFe-2JD.js → timepicker.D-6GNeM1.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.BtjgDmTZ.js → toConsumableArray.DP3pcQU2.js} +1 -1
- streamlit/static/static/js/{uniqueId.BG3aVKeE.js → uniqueId.Br0SB0lz.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.GQaAM6uH.js → useBasicWidgetState.DDri_chl.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.B6mIpebi.js → useOnInputChange.DwB-vggD.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.XgZUnj3Y.js → withFullScreenWrapper.sAYwL3bu.js} +1 -1
- {streamlit_nightly-1.42.1.dev20250210.dist-info → streamlit_nightly-1.42.1.dev20250212.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.42.1.dev20250210.dist-info → streamlit_nightly-1.42.1.dev20250212.dist-info}/RECORD +79 -79
- {streamlit_nightly-1.42.1.dev20250210.data → streamlit_nightly-1.42.1.dev20250212.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.42.1.dev20250210.dist-info → streamlit_nightly-1.42.1.dev20250212.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.42.1.dev20250210.dist-info → streamlit_nightly-1.42.1.dev20250212.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.42.1.dev20250210.dist-info → streamlit_nightly-1.42.1.dev20250212.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,3 @@
|
|
1
|
-
import{bv as P,bI as ve,bw as O,r as u,y as me,z as ne,j as R,bA as ye,bs as $e,bb as Oe,bt as Re,aE as oe,br as _e}from"./index.
|
1
|
+
import{bv as P,bI as ve,bw as O,r as u,y as me,z as ne,j as R,bA as ye,bs as $e,bb as Oe,bt as Re,aE as oe,br as _e}from"./index.BrTAJ7cx.js";import{a as Pe}from"./useBasicWidgetState.DDri_chl.js";import"./FormClearHelper.BjdyfMQx.js";var ie={vertical:"vertical",horizontal:"horizontal"};function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ae(Object(n),!0).forEach(function(r){_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,I=1,L=2;function B(e){return e.$isActive?L:e.$isHovered?I:E}function we(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(B(e)){case E:return t.tickFillErrorSelected;case I:return t.tickFillErrorSelectedHover;case L:return t.tickFillErrorSelectedHoverActive}else switch(B(e)){case E:return t.tickFillSelected;case I:return t.tickFillSelectedHover;case L:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function Se(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(B(e)){case E:return t.tickFillError;case I:return t.tickFillErrorHover;case L:return t.tickFillErrorHoverActive}else switch(B(e)){case E:return t.tickFill;case I:return t.tickFillHover;case L:return t.tickFillActive}}function Me(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return _({},"padding".concat(o),s)}function ke(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=P("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=P("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",h=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},_(t,"margin".concat(h),c?a.scale200:null),_(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var K=P("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:Se(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});K.displayName="RadioMarkInner";K.displayName="RadioMarkInner";var J=P("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:we(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});J.displayName="RadioMarkOuter";J.displayName="RadioMarkOuter";var Q=P("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},Me(e)),{},{color:ke(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=P("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=P("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},_(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),_(t,"margin".concat(s),o?n.sizing.scale200:null),_(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Fe(e,t){return Te(e)||Le(e,t)||Ie(e,t)||Ee()}function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ie(e,t){if(e){if(typeof e=="string")return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,t)}}function se(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Le(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Te(e){if(Array.isArray(e))return e}function Ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xe(e,t,n){return t&&je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function De(e,t){if(typeof t!="function"&&t!==null)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&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},U(e,t)}function Be(e){var t=ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ce(this,o)}}function Ce(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function j(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ue=function(e){De(n,e);var t=Be(n);function n(){var r;Ae(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),x(j(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),x(j(r),"handleFocus",function(a,c){ve(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),x(j(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return xe(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=O(s.RadioGroupRoot,q),c=Fe(a,2),h=c[0],b=c[1];return u.createElement(h,V({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},b),u.Children.map(this.props.children,function(p,f){if(!u.isValidElement(p))return null;var l=o.props.value===p.props.value;return u.cloneElement(p,{align:o.props.align,autoFocus:o.props.autoFocus,checked:l,disabled:o.props.disabled||p.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===f,isFocusVisible:o.state.isFocusVisible,tabIndex:f===0&&!o.props.value||l?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(d){return o.handleBlur(d,f)},onFocus:function(d){return o.handleFocus(d,f)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);x(ue,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function M(e,t){return Ue(e)||Ve(e,t)||Ne(e,t)||He()}function He(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(e,t){if(e){if(typeof e=="string")return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return le(e,t)}}function le(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ue(e){if(Array.isArray(e))return e}function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qe(e,t,n){return t&&We(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xe(e,t){if(typeof t!="function"&&t!==null)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&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function Ke(e){var t=Qe();return function(){var r=z(e),o;if(t){var i=z(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Je(this,o)}}function Je(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e){return e==="top"||e==="left"}function Ze(e){return e==="bottom"||e==="right"}var et=function(t){return t.stopPropagation()},ce=function(e){Xe(n,e);var t=Ke(n);function n(){var r;Ge(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return qe(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=O(i.Root,X),a=M(s,2),c=a[0],h=a[1],b=O(i.Label,Q),p=M(b,2),f=p[0],l=p[1],$=O(i.Input,Y),d=M($,2),T=d[0],H=d[1],w=O(i.Description,Z),A=M(w,2),v=A[0],g=A[1],m=O(i.RadioMarkInner,K),ee=M(m,2),pe=ee[0],fe=ee[1],de=O(i.RadioMarkOuter,J),te=M(de,2),he=te[0],be=te[1],S={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},re=u.createElement(f,y({},S,l),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(ge){return ge.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,y({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},S,h),Ye(this.props.labelPlacement)&&re,u.createElement(he,y({},S,be),u.createElement(pe,y({},S,fe))),u.createElement(T,y({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:et,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},S,H)),Ze(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(v,y({},S,g),this.props.description))}}]),n}(u.Component);F(ce,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function tt({disabled:e,horizontal:t,width:n,value:r,onChange:o,options:i,captions:s,label:a,labelVisibility:c,help:h}){const[b,p]=u.useState(r??null);u.useEffect(()=>{r!==b&&p(r??null)},[r]);const f=u.useCallback(v=>{const g=parseInt(v.target.value,10);p(g),o(g)},[o]),l=me(),$={width:n},d=s.length>0,T=i.length>0,H=T?i:["No options to select."],w=e||!T,A=v=>v==""&&t&&d?" ":v;return ne("div",{className:"stRadio","data-testid":"stRadio",style:$,children:[R(Re,{label:a,disabled:w,labelVisibility:c,children:h&&R(ye,{children:R($e,{content:h,placement:Oe.TOP_RIGHT})})}),R(ue,{onChange:f,value:b!==null?b.toString():void 0,disabled:w,align:t?ie.horizontal:ie.vertical,"aria-label":a,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:H.map((v,g)=>ne(ce,{value:g.toString(),overrides:{Root:{style:({$isFocusVisible:m})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:d?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:m?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:m})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:m&&!w?l.colors.primary:l.colors.fadedText40})},RadioMarkInner:{style:({$checked:m})=>({height:m?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`,width:m?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`})},Label:{style:{color:w?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[R(oe,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&R(oe,{source:A(s[g]),allowHTML:!1,isCaption:!0,isLabel:!0})]},g))})]})}const rt=u.memo(tt);function nt({disabled:e,element:t,widgetMgr:n,width:r,fragmentId:o}){const[i,s]=Pe({getStateFromWidgetMgr:ot,getDefaultStateFromProto:it,getCurrStateFromProto:at,updateWidgetMgrState:st,element:t,widgetMgr:n,fragmentId:o}),a=u.useCallback($=>{s({value:$,fromUi:!0})},[s]),{horizontal:c,options:h,captions:b,label:p,labelVisibility:f,help:l}=t;return R(rt,{label:p,onChange:a,options:h,captions:b,width:r,disabled:e,horizontal:c,labelVisibility:_e(f==null?void 0:f.value),value:i??null,help:l})}function ot(e,t){return e.getIntValue(t)}function it(e){return e.default??null}function at(e){return e.value??null}function st(e,t,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const ft=u.memo(nt);export{ft as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as o,E as X,_ as q,n as x,am as lt,y as ut,cp as ct,N as J,cA as I,K as f,z,j as c,br as dt,bE as pt,bs as ft,bb as bt,bt as mt,bo as K}from"./index.
|
1
|
+
import{r as o,E as X,_ as q,n as x,am as lt,y as ut,cp as ct,N as J,cA as I,K as f,z,j as c,br as dt,bE as pt,bs as ft,bb as bt,bt as mt,bo as K}from"./index.BrTAJ7cx.js";import{s as gt}from"./sprintf.C-r3gIuM.js";import{u as yt}from"./uniqueId.Br0SB0lz.js";import{u as It}from"./FormClearHelper.BjdyfMQx.js";import{I as ht}from"./InputInstructions.BEaJdOY6.js";import{I as Tt}from"./input.Ch5EKcBw.js";import"./base-input.BJFXZaN6.js";var Q=o.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(X,q({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),o.createElement("path",{d:"M0 3v2h8V3H0z"}))});Q.displayName="Minus";var Y=o.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(X,q({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),o.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Y.displayName="Plus";const Ct=x("div",{target:"e5tuigk0"})(({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}}})),wt=x("div",{target:"e5tuigk1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),G=x("button",{target:"e5tuigk2"})(({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"},"&:last-of-type":{borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),St=x("div",{target:"e5tuigk3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),Vt=lt.getLogger("NumberInput");function vt(t){return f(t)||t===""?void 0:t}const kt=t=>(t.element.dataType===I.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,M=({step:t,dataType:e})=>t||(e===I.DataType.INT?1:.01),W=({value:t,format:e,step:r,dataType:h})=>{if(f(t))return null;let i=vt(e);if(f(i)&&J(r)){const n=r.toString();h===I.DataType.FLOAT&&r!==0&&n.includes(".")&&(i=`%0.${n.split(".")[1].length}f`)}if(f(i))return t.toString();try{return gt.sprintf(i,t)}catch(n){return Vt.warn(`Error in sprintf(${i}, ${t}): ${n}`),String(t)}},xt=(t,e,r)=>f(t)?!1:t-e>=r,Rt=(t,e,r)=>f(t)?!1:t+e<=r,Dt=({disabled:t,element:e,widgetMgr:r,width:h,fragmentId:i})=>{var O;const n=ut(),{dataType:w,id:R,formId:p,default:B,format:A}=e,b=e.hasMin?e.min:-1/0,m=e.hasMax?e.max:1/0,[s,Z]=o.useState(M(e)),H=kt({element:e,widgetMgr:r}),[g,T]=o.useState(!1),[l,C]=o.useState(H),[P,S]=o.useState(W({value:H,...e,step:s})),[L,U]=o.useState(!1),D=o.useRef(null),$=o.useRef(yt("number_input_")),V=xt(l,s,b),v=Rt(l,s,m),_=ct({formId:p}),tt=_?r.allowFormEnterToSubmit(p):g,et=L&&h>n.breakpoints.hideWidgetDetails;o.useEffect(()=>{Z(M({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]);const u=o.useCallback(({value:a,source:d})=>{var y;if(J(a)&&(b>a||a>m))(y=D.current)==null||y.reportValidity();else{const k=a??B??null;switch(w){case I.DataType.INT:r.setIntValue({id:R,formId:p},k,d,i);break;case I.DataType.FLOAT:r.setDoubleValue({id:R,formId:p},k,d,i);break;default:throw new Error("Invalid data type")}T(!1),C(k),S(W({value:k,dataType:w,format:A,step:s}))}},[b,m,D,r,i,s,w,R,p,B,A]),ot=o.useCallback(()=>{g&&u({value:l,source:{fromUi:!0}}),U(!1)},[g,l,u]),rt=o.useCallback(()=>{U(!0)},[]),j=o.useCallback(()=>{const{value:a}=e;e.setValue=!1,C(a??null),S(W({value:a??null,...e,step:s})),u({value:a??null,source:{fromUi:!1}})},[e,s,u]);o.useEffect(()=>{e.setValue?j():u({value:l,source:{fromUi:!1}})},[]),e.setValue&&j();const E=f(e.default)&&!t,nt=o.useCallback(()=>{const a=e.default??null;C(a),u({value:a,source:{fromUi:!0}})},[e]);It({element:e,widgetMgr:r,onFormCleared:nt});const at=a=>{const{value:d}=a.target;if(d==="")T(!0),C(null),S(null);else{let y;e.dataType===I.DataType.INT?y=parseInt(d,10):y=parseFloat(d),T(!0),C(y),S(d)}},N=o.useCallback(()=>{v&&(T(!0),u({value:(l??b)+s,source:{fromUi:!0}}))},[l,b,s,v]),F=o.useCallback(()=>{V&&(T(!0),u({value:(l??m)-s,source:{fromUi:!0}}))},[l,m,s,V]),st=o.useCallback(a=>{const{key:d}=a;switch(d){case"ArrowUp":a.preventDefault(),N();break;case"ArrowDown":a.preventDefault(),F();break}},[N,F]),it=o.useCallback(a=>{a.key==="Enter"&&(g&&u({value:l,source:{fromUi:!0}}),r.allowFormEnterToSubmit(p)&&r.submitForm(p,i))},[g,l,u,r,p,i]);return z("div",{className:"stNumberInput","data-testid":"stNumberInput",style:{width:h},children:[c(mt,{label:e.label,disabled:t,labelVisibility:dt((O=e.labelVisibility)==null?void 0:O.value),htmlFor:$.current,children:e.help&&c(pt,{children:c(ft,{content:e.help,placement:bt.TOP_RIGHT})})}),z(Ct,{className:L?"focused":"","data-testid":"stNumberInputContainer",children:[c(Tt,{type:"number",inputRef:D,value:P??"",placeholder:e.placeholder,onBlur:ot,onFocus:rt,onChange:at,onKeyPress:it,onKeyDown:st,clearable:E,clearOnEscape:E,disabled:t,"aria-label":e.label,id:$.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:n.colors.darkGray,padding:n.spacing.threeXS,height:n.sizes.clearIconSize,width:n.sizes.clearIconSize,":hover":{fill:n.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:b,max:m,type:"number",inputMode:""},style:{lineHeight:n.lineHeights.inputWidget,paddingRight:n.spacing.sm,paddingLeft:n.spacing.sm,paddingBottom:n.spacing.sm,paddingTop:n.spacing.sm}},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}}}}),h>n.breakpoints.hideNumberInputControls&&z(wt,{children:[c(G,{"data-testid":"stNumberInputStepDown",onClick:F,disabled:!V||t,tabIndex:-1,children:c(K,{content:Q,size:"xs",color:V?"inherit":n.colors.disabled})}),c(G,{"data-testid":"stNumberInputStepUp",onClick:N,disabled:!v||t,tabIndex:-1,children:c(K,{content:Y,size:"xs",color:v?"inherit":n.colors.disabled})})]})]}),et&&c(St,{clearable:E,children:c(ht,{dirty:g,value:P??"",inForm:_,allowEnterToSubmit:tt})})]})},Ht=o.memo(Dt);export{Ht as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as s,K as S,j as d,br as x,c4 as V}from"./index.
|
1
|
+
import{r as s,K as S,j as d,br as x,c4 as V}from"./index.BrTAJ7cx.js";import{a as v}from"./useBasicWidgetState.DDri_chl.js";import"./FormClearHelper.BjdyfMQx.js";const U=(t,e)=>t.getIntValue(e),h=t=>t.default??null,C=t=>t.value??null,F=(t,e,o,a)=>{e.setIntValue(t,o.value,{fromUi:o.fromUi},a)},I=({disabled:t,element:e,widgetMgr:o,width:a,fragmentId:u})=>{const{options:n,help:c,label:i,labelVisibility:r,placeholder:m}=e,[g,l]=v({getStateFromWidgetMgr:U,getDefaultStateFromProto:h,getCurrStateFromProto:C,updateWidgetMgrState:F,element:e,widgetMgr:o,fragmentId:u}),f=s.useCallback(b=>{l({value:b,fromUi:!0})},[l]),p=S(e.default)&&!t;return d(V,{label:i,labelVisibility:x(r==null?void 0:r.value),options:n,disabled:t,width:a,onChange:f,value:g,help:c,placeholder:m,clearable:p})},E=s.memo(I);export{E as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as z,r as s,y as R,cp as I,z as U,j as u,br as k,bE as H,bs as L,bb as B,bt as D,cr as j}from"./index.
|
1
|
+
import{n as z,r as s,y as R,cp as I,z as U,j as u,br as k,bE as H,bs as L,bb as B,bt as D,cr as j}from"./index.BrTAJ7cx.js";import{u as O}from"./uniqueId.Br0SB0lz.js";import{u as _,a as K,b as $}from"./useOnInputChange.DwB-vggD.js";import{a as q}from"./useBasicWidgetState.DDri_chl.js";import{I as A}from"./InputInstructions.BEaJdOY6.js";import{I as G}from"./input.Ch5EKcBw.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.BjdyfMQx.js";import"./base-input.BJFXZaN6.js";const N=z("div",{target:"e1sommdr0"})(({width:e})=>({position:"relative",width:e}));function w({disabled:e,element:t,widgetMgr:a,width:n,fragmentId:m}){var g;const[r,l]=s.useState(S(a,t)??null),[i,d]=s.useState(!1),W=s.useCallback(()=>{l(t.default??null),d(!0)},[t.default]),[y,p]=q({getStateFromWidgetMgr:S,getDefaultStateFromProto:J,getCurrStateFromProto:Q,updateWidgetMgrState:X,element:t,widgetMgr:a,fragmentId:m,onFormCleared:W});_(y,r,l,i);const[T,h]=s.useState(!1),o=R(),[b]=s.useState(()=>O("text_input_")),{placeholder:x,formId:f}=t,c=s.useCallback(()=>{d(!1),p({value:r,fromUi:!0})},[r,p]),C=I({formId:f})?a.allowFormEnterToSubmit(f):i,V=T&&n>o.breakpoints.hideWidgetDetails,F=s.useCallback(()=>{i&&c(),h(!1)},[i,c]),v=s.useCallback(()=>{h(!0)},[]),E=K({formId:t.formId,maxChars:t.maxChars,setDirty:d,setUiValue:l,setValueWithSource:p}),P=$(t.formId,c,i,a,m);return U(N,{className:"stTextInput","data-testid":"stTextInput",width:n,children:[u(D,{label:t.label,disabled:e,labelVisibility:k((g=t.labelVisibility)==null?void 0:g.value),htmlFor:b,children:t.help&&u(H,{children:u(L,{content:t.help,placement:B.TOP_RIGHT})})}),u(G,{value:r??"",placeholder:x,onBlur:F,onFocus:v,onChange:E,onKeyPress:P,"aria-label":t.label,disabled:e,id:b,type:Y(t),autoComplete:t.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.sm,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:o.sizes.minElementHeight,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth}}}}),V&&u(A,{dirty:i,value:r??"",maxLength:t.maxChars,inForm:I({formId:t.formId}),allowEnterToSubmit:C})]})}function S(e,t){return e.getStringValue(t)??null}function J(e){return e.default??null}function Q(e){return e.value??null}function X(e,t,a,n){t.setStringValue(e,a.value,{fromUi:a.fromUi},n)}function Y(e){return e.type===j.Type.PASSWORD?"password":"text"}const ut=s.memo(w);export{ut as default};
|