@stlite/desktop 0.22.2 → 0.24.0

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 (145) hide show
  1. package/build/asset-manifest.json +63 -91
  2. package/build/index.html +1 -1
  3. package/build/pyodide/openssl-1.1.1n.zip +0 -0
  4. package/build/pyodide/pyodide.asm.data +0 -0
  5. package/build/pyodide/pyodide.asm.js +1 -1
  6. package/build/pyodide/pyodide.asm.wasm +0 -0
  7. package/build/pyodide/pyodide.js +1 -1
  8. package/build/pyodide/pyodide_py.tar +0 -0
  9. package/build/pyodide/repodata.json +1 -1
  10. package/build/pyodide/ssl-1.0.0.zip +0 -0
  11. package/build/static/css/9.f71f4f0d.chunk.css +1 -0
  12. package/build/static/js/0.1470a040.chunk.js +1 -0
  13. package/build/static/js/{1.176aded5.chunk.js → 1.75536554.chunk.js} +1 -1
  14. package/build/static/js/10.e9d08ce6.chunk.js +1 -0
  15. package/build/static/js/11.245d6c33.chunk.js +9 -0
  16. package/build/static/js/12.a31ecc8c.chunk.js +17 -0
  17. package/build/static/js/13.6a2e32ae.chunk.js +1 -0
  18. package/build/static/js/14.1655f4db.chunk.js +1 -0
  19. package/build/static/js/15.b28e3a9f.chunk.js +2 -0
  20. package/build/static/js/{15.91a85aa0.chunk.js.LICENSE.txt → 15.b28e3a9f.chunk.js.LICENSE.txt} +0 -0
  21. package/build/static/js/16.4002de21.chunk.js +1 -0
  22. package/build/static/js/17.f01379ea.chunk.js +1 -0
  23. package/build/static/js/18.b32ef4e7.chunk.js +2 -0
  24. package/build/static/js/18.b32ef4e7.chunk.js.LICENSE.txt +60 -0
  25. package/build/static/js/19.757ce6cd.chunk.js +1 -0
  26. package/build/static/js/2.90589c59.chunk.js +2 -0
  27. package/build/static/js/{2.26deed5e.chunk.js.LICENSE.txt → 2.90589c59.chunk.js.LICENSE.txt} +7 -1
  28. package/build/static/js/{18.e3d4364d.chunk.js → 20.06333e7b.chunk.js} +1 -2
  29. package/build/static/js/21.3fab05ae.chunk.js +5 -0
  30. package/build/static/js/22.a1775ac4.chunk.js +1 -0
  31. package/build/static/js/23.fd21f92a.chunk.js +1 -0
  32. package/build/static/js/24.50f424ba.chunk.js +5 -0
  33. package/build/static/js/25.3855f89c.chunk.js +1 -0
  34. package/build/static/js/26.5f51a172.chunk.js +1 -0
  35. package/build/static/js/{27.d7aacc94.chunk.js → 27.f075da8f.chunk.js} +1 -2
  36. package/build/static/js/28.e76203d9.chunk.js +5 -0
  37. package/build/static/js/29.12291bff.chunk.js +1 -0
  38. package/build/static/js/3.8dacc9e7.chunk.js +1 -0
  39. package/build/static/js/30.9780f1e6.chunk.js +1 -0
  40. package/build/static/js/{31.9c06312e.chunk.js → 31.622e28f6.chunk.js} +1 -2
  41. package/build/static/js/{32.a1f2009d.chunk.js → 32.44bddfd2.chunk.js} +1 -2
  42. package/build/static/js/{33.1d5fce1c.chunk.js → 33.e3480cb9.chunk.js} +1 -2
  43. package/build/static/js/34.4e913e44.chunk.js +1 -0
  44. package/build/static/js/35.d8c3a90e.chunk.js +1 -0
  45. package/build/static/js/36.d7336b9b.chunk.js +1 -0
  46. package/build/static/js/{37.b845d4ba.chunk.js → 37.b06f1532.chunk.js} +1 -2
  47. package/build/static/js/38.2303d913.chunk.js +1 -0
  48. package/build/static/js/39.9cb4bae4.chunk.js +1 -0
  49. package/build/static/js/40.b8f90b9a.chunk.js +1 -0
  50. package/build/static/js/41.bb169dbf.chunk.js +1 -0
  51. package/build/static/js/42.e8639ee2.chunk.js +1 -0
  52. package/build/static/js/43.b5e07f4c.chunk.js +1 -0
  53. package/build/static/js/44.0206e0dc.chunk.js +1 -0
  54. package/build/static/js/45.db4595ee.chunk.js +1 -0
  55. package/build/static/js/46.f534e5a2.chunk.js +1 -0
  56. package/build/static/js/47.89ae0b12.chunk.js +1 -0
  57. package/build/static/js/48.86b245a1.chunk.js +1 -0
  58. package/build/static/js/49.1db19a37.chunk.js +1 -0
  59. package/build/static/js/6.9c8c6dae.chunk.js +2 -0
  60. package/build/static/js/{6.8496e815.chunk.js.LICENSE.txt → 6.9c8c6dae.chunk.js.LICENSE.txt} +6 -6
  61. package/build/static/js/7.e8b702b0.chunk.js +2 -0
  62. package/build/static/js/{7.54bbd037.chunk.js.LICENSE.txt → 7.e8b702b0.chunk.js.LICENSE.txt} +0 -0
  63. package/build/static/js/{8.934b1bbd.chunk.js → 8.348fb43a.chunk.js} +2 -2
  64. package/build/static/js/{8.934b1bbd.chunk.js.LICENSE.txt → 8.348fb43a.chunk.js.LICENSE.txt} +0 -0
  65. package/build/static/js/9.d99eed24.chunk.js +2 -0
  66. package/build/static/js/9.d99eed24.chunk.js.LICENSE.txt +5 -0
  67. package/build/static/js/main.31e91b88.chunk.js +27 -0
  68. package/build/static/js/runtime-main.e5a1f36a.js +1 -0
  69. package/build/static/media/fireworks.0906f02e.gif +0 -0
  70. package/package.json +6 -6
  71. package/build/pyodide/distutils.tar +0 -0
  72. package/build/static/css/10.fd9811dd.chunk.css +0 -1
  73. package/build/static/js/0.14aa4233.chunk.js +0 -1
  74. package/build/static/js/10.e5ea6d64.chunk.js +0 -1
  75. package/build/static/js/11.5e15526e.chunk.js +0 -10
  76. package/build/static/js/11.5e15526e.chunk.js.LICENSE.txt +0 -16
  77. package/build/static/js/12.8105987b.chunk.js +0 -18
  78. package/build/static/js/12.8105987b.chunk.js.LICENSE.txt +0 -16
  79. package/build/static/js/13.6f270c1f.chunk.js +0 -2
  80. package/build/static/js/13.6f270c1f.chunk.js.LICENSE.txt +0 -16
  81. package/build/static/js/14.3da5e7a9.chunk.js +0 -1
  82. package/build/static/js/15.91a85aa0.chunk.js +0 -2
  83. package/build/static/js/16.650490ee.chunk.js +0 -2
  84. package/build/static/js/16.650490ee.chunk.js.LICENSE.txt +0 -16
  85. package/build/static/js/17.4c6481b3.chunk.js +0 -1
  86. package/build/static/js/18.e3d4364d.chunk.js.LICENSE.txt +0 -16
  87. package/build/static/js/19.9004a138.chunk.js +0 -6
  88. package/build/static/js/19.9004a138.chunk.js.LICENSE.txt +0 -16
  89. package/build/static/js/2.26deed5e.chunk.js +0 -2
  90. package/build/static/js/20.1e287e6d.chunk.js +0 -1
  91. package/build/static/js/21.cc58bd99.chunk.js +0 -1
  92. package/build/static/js/22.fe58abe1.chunk.js +0 -2
  93. package/build/static/js/22.fe58abe1.chunk.js.LICENSE.txt +0 -16
  94. package/build/static/js/23.ee721415.chunk.js +0 -6
  95. package/build/static/js/23.ee721415.chunk.js.LICENSE.txt +0 -16
  96. package/build/static/js/24.36b10d26.chunk.js +0 -2
  97. package/build/static/js/24.36b10d26.chunk.js.LICENSE.txt +0 -16
  98. package/build/static/js/25.edf85627.chunk.js +0 -2
  99. package/build/static/js/25.edf85627.chunk.js.LICENSE.txt +0 -16
  100. package/build/static/js/26.99f3cc19.chunk.js +0 -2
  101. package/build/static/js/26.99f3cc19.chunk.js.LICENSE.txt +0 -58
  102. package/build/static/js/27.d7aacc94.chunk.js.LICENSE.txt +0 -16
  103. package/build/static/js/28.d24eb9cf.chunk.js +0 -6
  104. package/build/static/js/28.d24eb9cf.chunk.js.LICENSE.txt +0 -16
  105. package/build/static/js/29.fbb528d8.chunk.js +0 -2
  106. package/build/static/js/29.fbb528d8.chunk.js.LICENSE.txt +0 -16
  107. package/build/static/js/3.f4fb8871.chunk.js +0 -1
  108. package/build/static/js/30.32ab2cb4.chunk.js +0 -2
  109. package/build/static/js/30.32ab2cb4.chunk.js.LICENSE.txt +0 -16
  110. package/build/static/js/31.9c06312e.chunk.js.LICENSE.txt +0 -16
  111. package/build/static/js/32.a1f2009d.chunk.js.LICENSE.txt +0 -16
  112. package/build/static/js/33.1d5fce1c.chunk.js.LICENSE.txt +0 -16
  113. package/build/static/js/34.edb9c338.chunk.js +0 -2
  114. package/build/static/js/34.edb9c338.chunk.js.LICENSE.txt +0 -16
  115. package/build/static/js/35.6bd7c1ed.chunk.js +0 -2
  116. package/build/static/js/35.6bd7c1ed.chunk.js.LICENSE.txt +0 -16
  117. package/build/static/js/36.be12d12e.chunk.js +0 -2
  118. package/build/static/js/36.be12d12e.chunk.js.LICENSE.txt +0 -16
  119. package/build/static/js/37.b845d4ba.chunk.js.LICENSE.txt +0 -16
  120. package/build/static/js/38.0e8cfb78.chunk.js +0 -2
  121. package/build/static/js/38.0e8cfb78.chunk.js.LICENSE.txt +0 -16
  122. package/build/static/js/39.73c851be.chunk.js +0 -2
  123. package/build/static/js/39.73c851be.chunk.js.LICENSE.txt +0 -16
  124. package/build/static/js/40.1fc38a50.chunk.js +0 -2
  125. package/build/static/js/40.1fc38a50.chunk.js.LICENSE.txt +0 -16
  126. package/build/static/js/41.4ddf36bc.chunk.js +0 -2
  127. package/build/static/js/41.4ddf36bc.chunk.js.LICENSE.txt +0 -16
  128. package/build/static/js/42.e5620440.chunk.js +0 -2
  129. package/build/static/js/42.e5620440.chunk.js.LICENSE.txt +0 -16
  130. package/build/static/js/43.44eb58de.chunk.js +0 -2
  131. package/build/static/js/43.44eb58de.chunk.js.LICENSE.txt +0 -16
  132. package/build/static/js/44.35b43369.chunk.js +0 -2
  133. package/build/static/js/44.35b43369.chunk.js.LICENSE.txt +0 -16
  134. package/build/static/js/45.91664b3c.chunk.js +0 -2
  135. package/build/static/js/45.91664b3c.chunk.js.LICENSE.txt +0 -16
  136. package/build/static/js/46.e9639103.chunk.js +0 -2
  137. package/build/static/js/46.e9639103.chunk.js.LICENSE.txt +0 -16
  138. package/build/static/js/47.77b33a34.chunk.js +0 -2
  139. package/build/static/js/47.77b33a34.chunk.js.LICENSE.txt +0 -16
  140. package/build/static/js/6.8496e815.chunk.js +0 -2
  141. package/build/static/js/7.54bbd037.chunk.js +0 -2
  142. package/build/static/js/9.8ff376a2.chunk.js +0 -1
  143. package/build/static/js/main.118127a6.chunk.js +0 -28
  144. package/build/static/js/main.118127a6.chunk.js.LICENSE.txt +0 -33
  145. package/build/static/js/runtime-main.fe933feb.js +0 -1
@@ -1,16 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2018-2022 Streamlit Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 40.1fc38a50.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[40],{1804:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return u}));var s=i(0),o=i.n(s),l=i(193),r=i(162),a=i(33),n=i(1);class p extends o.a.PureComponent{constructor(...e){super(...e),this.formClearHelper=new l.b,this.state={value:this.initialValue},this.commitWidgetValue=e=>{this.props.widgetMgr.setStringValue(this.props.element,this.state.value,e)},this.onFormCleared=()=>{this.setState({value:this.props.element.default},(()=>this.commitWidgetValue({fromUi:!0})))},this.onColorClose=e=>{this.setState({value:e},(()=>this.commitWidgetValue({fromUi:!0})))}}get initialValue(){const e=this.props.widgetMgr.getStringValue(this.props.element);return void 0!==e?e:this.props.element.default}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:e},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{element:t,width:i,disabled:s,widgetMgr:o}=this.props,{value:l}=this.state;return this.formClearHelper.manageFormClearListener(o,t.formId,this.onFormCleared),Object(n.jsx)(r.a,{label:t.label,labelVisibility:Object(a.j)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),help:t.help,onChange:this.onColorClose,disabled:s,width:i,value:l})}}var u=p}}]);
@@ -1,16 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2018-2022 Streamlit Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 41.4ddf36bc.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[41],{1787:function(e,t,o){"use strict";o.r(t),o.d(t,"default",(function(){return T}));var n=o(0),i=o.n(n),l=o(1383),r=o(1744),a=o(20),d=o(61),s=o(194),c=o(19),u=o(118),m=o(33);let h;function g(e){const t=e&&u.b.getTypeName(e);let o=h.Text;return t?"bool"===t?o=h.Boolean:["int64","float64","range"].includes(t)?o=h.Number:t.startsWith("list")&&(o=h.List):o=h.Text,o}function b(e){return(e.displayContent||u.b.format(e.content,e.contentType)).replace(/(\r\n|\n|\r)/gm," ")}function p(e,t,o){const n=new RegExp(`${e}[,\\s].*{(?:[^}]*[\\s;]{1})?${t}:\\s*([^;}]+)[;]?.*}`,"gm");o=o.replace(/{/g," {");const i=n.exec(o);if(i)return i[1].trim()}function f(e,t,o="normal"){if(e===h.Text)return{kind:l.c.Text,data:"",displayData:"",allowOverlay:!0,readonly:t,style:o};if(e===h.Boolean)return{kind:l.c.Boolean,data:!1,readonly:t,allowOverlay:!1,style:o};if(e===h.Number)return{kind:l.c.Number,data:void 0,displayData:"",readonly:t,allowOverlay:!0,contentAlign:"right",style:o};if(e===h.List)return{kind:l.c.Bubble,data:[],allowOverlay:!0,style:o};throw new Error(`Unsupported cell type: ${e}`)}!function(e){e.Text="text",e.Number="number",e.Boolean="boolean",e.List="list"}(h||(h={}));var y=o(5);const x=Object(y.a)("div",{target:"e17g77xh0"})((({theme:e,width:t,height:o,minHeight:n,maxHeight:i,minWidth:l,maxWidth:r})=>({overflow:"auto",position:"relative",resize:"both",display:"inline-block",...t&&{width:`${t}px`},minHeight:`${n}px`,maxHeight:`${i}px`,minWidth:`${l}px`,maxWidth:`${r}px`,height:`${o}px`,border:`1px solid ${e.colors.fadedText05}`,"> div":{height:"100%",minWidth:"100%"},"& .dvn-scroller":{scrollbarWidth:"thin",overflowX:"overlay !important",overflowY:"overlay !important"},"&::-webkit-resizer":{display:"none"}})),"");o(1543);var v=o(1);function w(e){return{accentColor:e.colors.primary,accentFg:e.colors.white,accentLight:Object(a.g)(e.colors.primary,.9),borderColor:e.colors.fadedText05,fontFamily:e.genericFonts.bodyFont,bgSearchResult:Object(a.g)(e.colors.primary,.9),bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.bgMix,bgHeaderHasFocus:e.colors.secondaryBg,bgHeaderHovered:e.colors.bgMix,textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,headerFontStyle:`${e.fontSizes.sm}`,baseFontStyle:e.fontSizes.sm,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:Object(a.g)(e.colors.bodyText,.2),textLight:e.colors.fadedText60,textBubble:e.colors.fadedText60,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:8,cellVerticalPadding:3,bgBubble:e.colors.secondaryBg,bgBubbleSelected:e.colors.secondaryBg,linkColor:e.colors.linkText,drilldownBorder:e.colors.darkenedBgMix25}}function C(e,t,o){var a,d,s;const[u,y]=Object(n.useState)((()=>new Map)),x=function(e,t){var o,n,i,l,r,a;const d=[];if(t.isEmpty())return d.push({id:"empty-index",title:"",hasMenu:!1,getTemplate:()=>f(h.Text,!0,"faded"),columnType:h.Text}),d;const s=null!==(o=null===(n=t.types)||void 0===n||null===(i=n.index)||void 0===i?void 0:i.length)&&void 0!==o?o:0,c=null!==(l=null===(r=t.columns)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.length)&&void 0!==l?l:0;for(let u=0;u<s;u++){const e=g(t.types.index[u]);d.push({id:`index-${u}`,title:"",hasMenu:!1,getTemplate:()=>f(e,!0,"faded"),columnType:e})}for(let u=0;u<c;u++){const o=t.columns[0][u],n=g(t.types.data[u]),i=e.useContainerWidth||e.width;d.push({id:`column-${o}-${u}`,title:o,hasMenu:!1,getTemplate:()=>f(n,!0),columnType:n,...i?{grow:1}:{}})}return d}(e,t).map((e=>e.id&&u.has(e.id)&&void 0!==u.get(e.id)?{...e,width:u.get(e.id)}:e)),v=t.isEmpty()?1:t.dimensions.rows-1,w=null!==(a=null===(d=t.types)||void 0===d||null===(s=d.index)||void 0===s?void 0:s.length)&&void 0!==a?a:0,C=i.a.useCallback(((e,t)=>{e.id&&y(new Map(u).set(e.id,t))}),[x]),T=i.a.useCallback((([e,o])=>{if(t.isEmpty())return{...f(h.Text,!0,"faded"),displayData:"empty"};if(e>x.length-1)return f(h.Text,!0);const n=x[e].getTemplate();if(o>v-1)return n;try{return function(e,t,o){let n=e.kind;var i;if(e.kind===l.c.Custom&&(n=null===(i=e.data)||void 0===i?void 0:i.kind,!n))throw new Error("Unable to determine cell type for custom cell.");if(o&&t.cssId){const n={},i=p(t.cssId,"color",o);i&&(n.textDark=i);const l=p(t.cssId,"background-color",o);l&&(n.bgCell=l),n&&(e={...e,themeOverride:n})}if(n===l.c.Text){const o=b(t);return{...e,data:"string"!==typeof t.content&&Object(m.m)(t.content)?o:t.content,displayData:o}}if(n===l.c.Number){const o=b(t);let n=t.content;return n instanceof Int32Array&&(n=n[0]),{...e,data:Object(m.m)(n)?Number(n):void 0,displayData:o}}if(n===l.c.Boolean)return{...e,data:t.content};if(n===l.c.Bubble)return{...e,data:Object(m.m)(t.content)?JSON.parse(JSON.stringify(t.content,((e,t)=>"bigint"===typeof t?Number(t):t))):[]};throw new Error(`Unsupported cell kind: ${n}`)}(n,t.getCell(o+1,e),t.cssStyles)}catch(i){return Object(c.b)(i),n}}),[x,v,t]),{getCellContent:k}=Object(r.a)({columns:x,getCellContent:T,rows:v,sort:o}),S=function(e,t){return void 0===t?e:e.map((e=>e.id===t.column.id?{...e,title:"asc"===t.direction?`\u2191 ${e.title}`:`\u2193 ${e.title}`}:e))}(x,o);return{numRows:v,numIndices:w,columns:S,getCellContent:k,onColumnResize:C}}var T=Object(s.a)((function({element:e,data:t,width:o,height:n}){const[r,a]=i.a.useState(),s=Object(d.c)(),{numRows:c,numIndices:u,columns:m,getCellContent:g,onColumnResize:b}=C(e,t,r),[p,f]=i.a.useState(!0),[y,T]=i.a.useState({columns:l.a.empty(),rows:l.a.empty()}),k=i.a.useRef(null),S=i.a.useCallback((e=>{let t="asc";const o=m[e];if(r&&r.column.id===o.id){if("asc"!==r.direction)return void a(void 0);t="desc"}var n;a({column:o,direction:t,mode:(n=o.columnType,n===h.Number?"smart":"default")})}),[r,m]);let M,O=Math.max(35*(c+1)+3,73),H=Math.min(O,400);e.height&&(H=Math.max(e.height,73),O=Math.max(e.height,O)),n&&(H=Math.min(H,n),O=Math.min(O,n),e.height||(H=O));let B=o;return e.useContainerWidth?M=o:e.width&&(M=Math.min(Math.max(e.width,38),o),B=Math.min(Math.max(e.width,B),o)),Object(v.jsx)(x,{className:"stDataFrame",width:M,height:H,minHeight:73,maxHeight:O,minWidth:38,maxWidth:B,onBlur:()=>{p||T({columns:l.a.empty(),rows:l.a.empty(),current:void 0})},children:Object(v.jsx)(l.b,{ref:k,columns:m,rows:c,minColumnWidth:35,maxColumnWidth:650,rowHeight:35,headerHeight:35,getCellContent:g,onColumnResize:b,freezeColumns:u,smoothScrollX:!0,smoothScrollY:c<1e5,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:"rect",columnSelect:"none",rowSelect:"none",keybindings:{search:!0},onHeaderClicked:S,gridSelection:y,onGridSelectionChange:e=>{T(e)},theme:w(s),onMouseMove:e=>{"out-of-bounds"===e.kind&&p?f(!1):"out-of-bounds"===e.kind||p||f(!0)},experimental:{scrollbarWidthOverride:1}})})}))}}]);
@@ -1,16 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2018-2022 Streamlit Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 42.e5620440.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[42],{1805:function(e,t,s){"use strict";s.r(t),s.d(t,"default",(function(){return v}));var i=s(0),o=s.n(i),r=s(106),a=s.n(r),n=s(61),l=s(1771),d=s(29),p=s(193),m=s(113),h=s(114),u=s(50),c=s(33),g=s(1);const b="YYYY/MM/DD";function f(e){return e.map((e=>new Date(e)))}class y extends o.a.PureComponent{constructor(...e){super(...e),this.formClearHelper=new p.b,this.state={values:this.initialValue,isRange:this.props.element.isRange,isEmpty:!1},this.commitWidgetValue=e=>{this.props.widgetMgr.setStringArrayValue(this.props.element,this.state.values.map((e=>a()(e).format(b))),e)},this.onFormCleared=()=>{const e=f(this.props.element.default);this.setState({values:e},(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=({date:e})=>{this.setState({values:Array.isArray(e)?e:[e],isEmpty:!e},(()=>{this.state.isEmpty||this.commitWidgetValue({fromUi:!0})}))},this.handleClose=()=>{const{isEmpty:e}=this.state;e&&this.setState({values:f(this.props.element.default)},(()=>{this.commitWidgetValue({fromUi:!0})}))},this.getMaxDate=()=>{const{element:e}=this.props,t=e.max;return t&&t.length>0?a()(t,b).toDate():void 0}}get initialValue(){const e=this.props.widgetMgr.getStringArrayValue(this.props.element);return f(void 0!==e?e:this.props.element.default)}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({values:e.map((e=>new Date(e)))},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{width:t,element:s,disabled:i,theme:o,widgetMgr:r}=this.props,{values:n,isRange:p}=this.state,{colors:f,fontSizes:y}=o,v={width:t},C=a()(s.min,b).toDate(),x=this.getMaxDate();return this.formClearHelper.manageFormClearListener(r,s.formId,this.onFormCleared),Object(g.jsxs)("div",{className:"stDateInput",style:v,children:[Object(g.jsx)(m.d,{label:s.label,disabled:i,labelVisibility:Object(c.j)(null===(e=s.labelVisibility)||void 0===e?void 0:e.value),children:s.help&&Object(g.jsx)(m.b,{children:Object(g.jsx)(h.a,{content:s.help,placement:u.b.TOP_RIGHT})})}),Object(g.jsx)(l.a,{formatString:"yyyy/MM/dd",disabled:i,onChange:this.handleChange,onClose:this.handleClose,overrides:{Popover:{props:{placement:d.f.bottomLeft,overrides:{Body:{style:{border:`1px solid ${f.fadedText10}`}}}}},CalendarContainer:{style:{fontSize:y.sm}},Week:{style:{fontSize:y.sm}},Day:{style:({$selected:e})=>({"::after":{borderColor:e?f.transparent:""}})},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:f.transparent},":focus":{backgroundColor:f.transparent,outline:0}})},NextButton:{style:{display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:f.transparent},":focus":{backgroundColor:f.transparent,outline:0}}},Input:{props:{maskChar:null,overrides:{Root:{style:{borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px"}},Input:{style:{paddingRight:".5rem",paddingLeft:".5rem",paddingBottom:".5rem",paddingTop:".5rem"}}}}}},value:n,minDate:C,maxDate:x,range:p})]})}}var v=Object(n.f)(y)}}]);
@@ -1,16 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2018-2022 Streamlit Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 43.44eb58de.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[43],{1803:function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return a}));var s=i(0),n=i(53),r=i(23),c=i(85),l=i(88),d=i(1);var a=function(t){const{disabled:e,element:i,widgetMgr:a,width:o}=t,u={width:o},{getBaseUriParts:b}=Object(s.useContext)(n.a),h=Object(l.i)();return Object(d.jsx)("div",{className:"row-widget stDownloadButton",style:u,children:Object(d.jsx)(r.a,{help:i.help,children:Object(d.jsx)(r.d,{kind:r.b.PRIMARY,size:r.c.SMALL,disabled:e,onClick:()=>{if(a.setTriggerValue(i,{fromUi:!0}),i.url.startsWith("/media"))return void Object(l.g)(h,i.url);const t=document.createElement("a"),e=`${Object(c.b)(i.url,b())}?title=${encodeURIComponent(document.title)}`;t.setAttribute("href",e),t.setAttribute("target","_blank"),t.click()},children:i.label})})})}}}]);
@@ -1,16 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2018-2022 Streamlit Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 44.35b43369.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[44],{1789:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return f}));var s=i(0),o=i.n(s),a=i(61),r=i(1760),l=i(1761),n=i(1762),d=i(113),h=i(114),p=i(50),u=i(1);class m extends o.a.PureComponent{constructor(...e){super(...e),this.state={value:this.props.value},this.onChange=e=>{const t=parseInt(e.target.value,10);this.setState({value:t},(()=>this.props.onChange(t)))}}componentDidUpdate(e){e.value!==this.props.value&&this.props.value!==this.state.value&&this.setState({value:this.props.value})}render(){const{theme:e,width:t,help:i,label:s,horizontal:o,labelVisibility:a}=this.props;let{disabled:m}=this.props;const{colors:c,radii:b}=e,g={width:t},v=[...this.props.options];return 0===v.length&&(v.push("No options to select."),m=!0),Object(u.jsxs)("div",{className:"row-widget stRadio",style:g,children:[Object(u.jsx)(d.d,{label:s,disabled:m,labelVisibility:a,children:i&&Object(u.jsx)(d.c,{children:Object(u.jsx)(h.a,{content:i,placement:p.b.TOP_RIGHT})})}),Object(u.jsx)(r.a,{onChange:this.onChange,value:this.state.value.toString(),disabled:m,align:o?l.a.horizontal:l.a.vertical,"aria-label":s,children:v.map(((e,t)=>Object(u.jsx)(n.a,{value:t.toString(),overrides:{Root:{style:({$isFocusVisible:e})=>({marginBottom:0,marginTop:0,marginRight:"1rem",paddingLeft:0,alignItems:"start",paddingRight:"2px",backgroundColor:e?c.darkenedBgMix25:"",borderTopLeftRadius:b.md,borderTopRightRadius:b.md,borderBottomLeftRadius:b.md,borderBottomRightRadius:b.md})},RadioMarkOuter:{style:({$checked:e})=>({width:"1rem",height:"1rem",marginTop:"0.35rem",marginRight:"0",backgroundColor:e&&!m?c.primary:c.fadedText40})},RadioMarkInner:{style:({$checked:e})=>({height:e?"6px":".75rem",width:e?"6px":".75rem"})},Label:{style:{color:m?c.fadedText40:c.bodyText,position:"relative",top:"1px"}}},children:e},t)))})]})}}var c=Object(a.f)(m),b=i(193),g=i(33);class v extends o.a.PureComponent{constructor(...e){super(...e),this.formClearHelper=new b.b,this.state={value:this.initialValue},this.commitWidgetValue=e=>{this.props.widgetMgr.setIntValue(this.props.element,this.state.value,e)},this.onFormCleared=()=>{this.setState({value:this.props.element.default},(()=>this.commitWidgetValue({fromUi:!0})))},this.onChange=e=>{this.setState({value:e},(()=>this.commitWidgetValue({fromUi:!0})))}}get initialValue(){const e=this.props.widgetMgr.getIntValue(this.props.element);return void 0!==e?e:this.props.element.default}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:e},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){const{disabled:e,element:t,width:i,widgetMgr:s}=this.props,{horizontal:o,options:a,label:r,labelVisibility:l,help:n}=t;return this.formClearHelper.manageFormClearListener(s,t.formId,this.onFormCleared),Object(u.jsx)(c,{label:r,onChange:this.onChange,options:a,width:i,disabled:e,horizontal:o,labelVisibility:Object(g.j)(null===l||void 0===l?void 0:l.value),value:this.state.value,help:n})}}var f=v}}]);
@@ -1,16 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2018-2022 Streamlit Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 45.91664b3c.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[45],{1807:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return h}));var s=i(0),o=i.n(s),l=i(193),a=i(148),r=i(33),n=i(1);class p extends o.a.PureComponent{constructor(...e){super(...e),this.formClearHelper=new l.b,this.state={value:this.initialValue},this.commitWidgetValue=e=>{this.props.widgetMgr.setIntValue(this.props.element,this.state.value,e)},this.onFormCleared=()=>{this.setState({value:this.props.element.default},(()=>this.commitWidgetValue({fromUi:!0})))},this.onChange=e=>{this.setState({value:e},(()=>this.commitWidgetValue({fromUi:!0})))}}get initialValue(){const e=this.props.widgetMgr.getIntValue(this.props.element);return void 0!==e?e:this.props.element.default}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:e},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){const{options:e,help:t,label:i,labelVisibility:s,formId:o}=this.props.element,{disabled:l,widgetMgr:p}=this.props;return this.formClearHelper.manageFormClearListener(p,o,this.onFormCleared),Object(n.jsx)(a.b,{label:i,labelVisibility:Object(r.j)(null===s||void 0===s?void 0:s.value),options:e,disabled:l,width:this.props.width,onChange:this.onChange,value:this.state.value,help:t})}}var h=p}}]);
@@ -1,16 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2018-2022 Streamlit Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 46.e9639103.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[46],{1795:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return R}));var a=i(0),s=i.n(a),o=i(36),n=i(1809),r=i(61),l=i(1377),d=i(193),h=i(15),m=i(33),c=i(106),p=i.n(c),u=i(113),b=i(114),g=i(50),f=i(5),T=i(20);const y=Object(f.a)("div",{target:"e88czh83"})((({disabled:e,theme:t})=>({alignItems:"center",backgroundColor:e?t.colors.gray:t.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",boxShadow:"none",display:"flex",height:t.radii.xl,justifyContent:"center",width:t.radii.xl,":focus":{boxShadow:`0 0 0 0.2rem ${Object(T.g)(t.colors.primary,.5)}`,outline:"none"}})),""),j=Object(f.a)("div",{target:"e88czh82"})((({disabled:e,theme:t})=>({fontFamily:t.fonts.monospace,fontSize:t.fontSizes.sm,paddingBottom:t.spacing.twoThirdsSmFont,color:e?t.colors.gray:t.colors.primary,top:"-22px",position:"absolute",whiteSpace:"nowrap",backgroundColor:t.colors.transparent,lineHeight:t.lineHeights.base,fontWeight:"normal"})),""),v=Object(f.a)("div",{target:"e88czh81"})((({theme:e})=>({paddingBottom:e.spacing.none,paddingLeft:e.spacing.none,paddingRight:e.spacing.none,paddingTop:e.spacing.twoThirdsSmFont,justifyContent:"space-between",alignItems:"center",display:"flex"})),""),x=Object(f.a)("div",{target:"e88czh80"})((({disabled:e,theme:t})=>({lineHeight:t.lineHeights.base,fontWeight:"normal",fontSize:t.fontSizes.sm,fontFamily:t.fonts.monospace,color:e?t.colors.fadedText40:"inherit"})),"");var V=i(1);class O extends s.a.PureComponent{constructor(e){super(e),this.formClearHelper=new d.b,this.state=void 0,this.sliderRef=s.a.createRef(),this.thumbValueRef=s.a.createRef(),this.commitWidgetValueDebounced=void 0,this.commitWidgetValue=e=>{this.props.widgetMgr.setDoubleArrayValue(this.props.element,this.state.value,e)},this.onFormCleared=()=>{this.setState({value:this.props.element.default},(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=({value:e})=>{this.setState({value:e},(()=>this.commitWidgetValueDebounced({fromUi:!0})))},this.renderThumb=s.a.forwardRef(((e,t)=>{const{$value:i,$thumbIndex:a}=e,s=this.formatValue(i[a]),n=Object(o.pick)(e,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),r={};return(this.props.element.options.length>0||this.isDateTimeType())&&(r["aria-valuetext"]=s),this.thumbValueAlignment(),Object(V.jsx)(y,{...n,disabled:e.$disabled,ref:t,"aria-valuetext":s,"aria-label":this.props.element.label,children:Object(V.jsx)(j,{className:"StyledThumbValue","data-testid":"stThumbValue",disabled:e.$disabled,ref:this.thumbValueRef,children:s})})})),this.renderTickBar=()=>{const{disabled:e,element:t}=this.props,{max:i,min:a}=t;return Object(V.jsxs)(v,{"data-testid":"stTickBar",children:[Object(V.jsx)(x,{disabled:e,"data-testid":"stTickBarMin",children:this.formatValue(a)}),Object(V.jsx)(x,{disabled:e,"data-testid":"stTickBarMax",children:this.formatValue(i)})]})},this.commitWidgetValueDebounced=Object(m.b)(200,this.commitWidgetValue.bind(this)),this.state={value:this.initialValue}}get initialValue(){const e=this.props.widgetMgr.getDoubleArrayValue(this.props.element);return void 0!==e?e:this.props.element.default}componentDidMount(){this.thumbValueAlignment(),this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:e},(()=>{this.commitWidgetValue({fromUi:!1})}))}get value(){const{min:e,max:t}=this.props.element,{value:i}=this.state;let a=i[0],s=i.length>1?i[1]:i[0];return a>s&&(a=s),a<e&&(a=e),a>t&&(a=t),s<e&&(s=e),s>t&&(s=t),i.length>1?[a,s]:[a]}isDateTimeType(){const{dataType:e}=this.props.element;return e===h.t.DataType.DATETIME||e===h.t.DataType.DATE||e===h.t.DataType.TIME}formatValue(e){const{format:t,options:i}=this.props.element;return this.isDateTimeType()?p.a.utc(e/1e3).format(t):i.length>0?Object(l.sprintf)(t,i[e]):Object(l.sprintf)(t,e)}thumbValueAlignment(){const e=this.sliderRef.current,t=this.thumbValueRef.current;if(e&&t){const i=e.getBoundingClientRect(),a=t.getBoundingClientRect();t.style.left=a.left<i.left?"0":"",t.style.right=a.right>i.right?"0":""}}render(){var e;const{disabled:t,element:i,theme:a,width:s,widgetMgr:o}=this.props,{colors:r,fonts:l,fontSizes:d,spacing:h}=a,c={width:s};return this.formClearHelper.manageFormClearListener(o,i.formId,this.onFormCleared),Object(V.jsxs)("div",{ref:this.sliderRef,className:"stSlider",style:c,children:[Object(V.jsx)(u.d,{label:i.label,disabled:t,labelVisibility:Object(m.j)(null===(e=i.labelVisibility)||void 0===e?void 0:e.value),children:i.help&&Object(V.jsx)(u.b,{children:Object(V.jsx)(b.a,{content:i.help,placement:g.b.TOP_RIGHT})})}),Object(V.jsx)(n.a,{min:i.min,max:i.max,step:i.step,value:this.value,onChange:this.handleChange,disabled:t,overrides:{Root:{style:{paddingTop:h.twoThirdsSmFont}},Thumb:this.renderThumb,Tick:{style:{fontFamily:l.monospace,fontSize:d.sm}},Track:{style:{backgroundColor:"none !important",paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:h.twoThirdsSmFont}},InnerTrack:{style:({$disabled:e})=>({height:"4px",...e?{background:r.darkenedBgMix25}:{}})},TickBar:this.renderTickBar}})]})}}var R=Object(r.f)(O)}}]);
@@ -1,16 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2018-2022 Streamlit Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 47.77b33a34.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[47],{1808:function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return m}));var s=i(0),o=i(1685),r=i(193),a=i(113),n=i(114),l=i(50),d=i(33),p=i(1);class h extends s.PureComponent{constructor(...t){super(...t),this.formClearHelper=new r.b,this.state={value:this.initialValue},this.commitWidgetValue=t=>{this.props.widgetMgr.setStringValue(this.props.element,this.state.value,t)},this.onFormCleared=()=>{this.setState({value:this.props.element.default},(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=t=>{const e=this.dateToString(t);this.setState({value:e},(()=>this.commitWidgetValue({fromUi:!0})))},this.stringToDate=t=>{const[e,i]=t.split(":").map(Number),s=new Date;return s.setHours(e),s.setMinutes(i),s},this.dateToString=t=>`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}get initialValue(){const t=this.props.widgetMgr.getStringValue(this.props.element);return void 0!==t?t:this.props.element.default}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:t}=this.props.element;t&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:t}=this.props.element;this.props.element.setValue=!1,this.setState({value:t},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var t;const{disabled:e,width:i,element:s,widgetMgr:r}=this.props,h={width:i},m={Select:{props:{disabled:e,overrides:{ControlContainer:{style:{borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px"}},IconsContainer:{style:()=>({paddingRight:".5rem"})},ValueContainer:{style:()=>({paddingRight:".5rem",paddingLeft:".5rem",paddingBottom:".5rem",paddingTop:".5rem"})},Dropdown:{style:()=>({paddingTop:0,paddingBottom:0})},Popover:{props:{overrides:{Body:{style:()=>({marginTop:"1px"})}}}}}}}};return this.formClearHelper.manageFormClearListener(r,s.formId,this.onFormCleared),Object(p.jsxs)("div",{className:"stTimeInput",style:h,children:[Object(p.jsx)(a.d,{label:s.label,disabled:e,labelVisibility:Object(d.j)(null===(t=s.labelVisibility)||void 0===t?void 0:t.value),children:s.help&&Object(p.jsx)(a.b,{children:Object(p.jsx)(n.a,{content:s.help,placement:l.b.TOP_RIGHT})})}),Object(p.jsx)(o.a,{format:"24",value:this.stringToDate(this.state.value),onChange:this.handleChange,overrides:m,creatable:!0,"aria-label":s.label})]})}}var m=h}}]);
@@ -1,16 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2018-2022 Streamlit Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */