@stlite/desktop 0.42.4 → 0.43.1
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.
- package/bin/dump_artifacts.js +5 -5
- package/build/asset-manifest.json +77 -74
- package/build/index.html +1 -1
- package/build/static/css/1619.7ce51b75.chunk.css +1 -0
- package/build/static/css/7652.c24b25fa.chunk.css +1 -0
- package/build/static/css/7895.c24b25fa.chunk.css +1 -0
- package/build/static/css/main.fb5f4d99.css +1 -0
- package/build/static/js/1046.ea522608.chunk.js +1 -0
- package/build/static/js/1189.71b89117.chunk.js +1 -0
- package/build/static/js/1261.242b7386.chunk.js +1 -0
- package/build/static/js/142.dbf9ec20.chunk.js +1 -0
- package/build/static/js/144.2477d27a.chunk.js +1 -0
- package/build/static/js/1619.c039c65c.chunk.js +1 -0
- package/build/static/js/1687.a144d952.chunk.js +1 -0
- package/build/static/js/1729.528431ca.chunk.js +1 -0
- package/build/static/js/1740.32a0c10e.chunk.js +1 -0
- package/build/static/js/1839.a1fce0e6.chunk.js +1 -0
- package/build/static/js/2385.2cbc4e3c.chunk.js +1 -0
- package/build/static/js/2448.e6f85eda.chunk.js +1 -0
- package/build/static/js/{6557.fd2f35c8.chunk.js → 2873.cf145dcb.chunk.js} +1 -1
- package/build/static/js/2940.dd2240b9.chunk.js +1 -0
- package/build/static/js/3185.d317b162.chunk.js +1 -0
- package/build/static/js/4021.16f5498a.chunk.js +1 -0
- package/build/static/js/4232.b0bbe2e6.chunk.js +2 -0
- package/build/static/js/4232.b0bbe2e6.chunk.js.LICENSE.txt +52 -0
- package/build/static/js/4482.2f210b65.chunk.js +1 -0
- package/build/static/js/4494.c6ab91c6.chunk.js +1 -0
- package/build/static/js/4694.7e63f0ef.chunk.js +1 -0
- package/build/static/js/4724.366489f9.chunk.js +1 -0
- package/build/static/js/4785.3ac653c2.chunk.js +1 -0
- package/build/static/js/4831.3170175f.chunk.js +1 -0
- package/build/static/js/4949.391c96be.chunk.js +2 -0
- package/build/static/js/{2961.54b0c743.chunk.js.LICENSE.txt → 4949.391c96be.chunk.js.LICENSE.txt} +15 -15
- package/build/static/js/5037.03a99abb.chunk.js +1 -0
- package/build/static/js/5299.ad735cb8.chunk.js +1 -0
- package/build/static/js/5361.bc476229.chunk.js +2 -0
- package/build/static/js/5703.a68ecfdc.chunk.js +2 -0
- package/build/static/js/5703.a68ecfdc.chunk.js.LICENSE.txt +40 -0
- package/build/static/js/6134.5e3e3f58.chunk.js +1 -0
- package/build/static/js/6679.f4ee1d77.chunk.js +2 -0
- package/build/static/js/6679.f4ee1d77.chunk.js.LICENSE.txt +62 -0
- package/build/static/js/6802.ffb6887c.chunk.js +1 -0
- package/build/static/js/6865.12e417bf.chunk.js +1 -0
- package/build/static/js/698.7dce549b.chunk.js +1 -0
- package/build/static/js/7125.21833215.chunk.js +1 -0
- package/build/static/js/{7332.52202888.chunk.js → 7332.cb5400eb.chunk.js} +1 -1
- package/build/static/js/7579.7b9cc9ee.chunk.js +1 -0
- package/build/static/js/7652.f436cbbf.chunk.js +1 -0
- package/build/static/js/7696.406d4ef7.chunk.js +1 -0
- package/build/static/js/7895.198c568c.chunk.js +1 -0
- package/build/static/js/790.4b5acd65.chunk.js +1 -0
- package/build/static/js/865.143ae622.chunk.js +1 -0
- package/build/static/js/8801.77babe65.chunk.js +1 -0
- package/build/static/js/9005.87bae37e.chunk.js +1 -0
- package/build/static/js/9166.d35e76c1.chunk.js +2 -0
- package/build/static/js/9166.d35e76c1.chunk.js.LICENSE.txt +13 -0
- package/build/static/js/9311.f444417e.chunk.js +1 -0
- package/build/static/js/9320.14465db9.chunk.js +1 -0
- package/build/static/js/9813.c894655a.chunk.js +1 -0
- package/build/static/js/main.94addb49.js +28 -0
- package/build/static/js/{main.78d8e51a.js.LICENSE.txt → main.94addb49.js.LICENSE.txt} +23 -3
- package/build/static/media/SourceCodePro-Bold.17a68a0751a813474a0e.woff2 +0 -0
- package/build/static/media/SourceCodePro-BoldItalic.d45b7a3df103d441d78b.woff2 +0 -0
- package/build/static/media/SourceCodePro-Italic.ec122a420df4175e74f2.woff2 +0 -0
- package/build/static/media/SourceCodePro-Regular.84b900b88d09398d86b0.woff2 +0 -0
- package/build/static/media/SourceCodePro-SemiBold.17291d1c493cb25eb2c3.woff2 +0 -0
- package/build/static/media/SourceCodePro-SemiBoldItalic.f879ae27307c3926522b.woff2 +0 -0
- package/build/static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2 +0 -0
- package/build/static/media/SourceSansPro-BoldItalic.1d664be59d2eb5fef029.woff2 +0 -0
- package/build/static/media/SourceSansPro-Italic.8a9bfea74d43927d6eec.woff2 +0 -0
- package/build/static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2 +0 -0
- package/build/static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2 +0 -0
- package/build/static/media/SourceSansPro-SemiBoldItalic.befb0a2824eabc5ce36b.woff2 +0 -0
- package/build/static/media/SourceSerifPro-Bold.d7975b56594770699ae0.woff2 +0 -0
- package/build/static/media/SourceSerifPro-BoldItalic.913697a7178b128caa4c.woff2 +0 -0
- package/build/static/media/SourceSerifPro-Italic.d3529cb5797663ac5d88.woff2 +0 -0
- package/build/static/media/SourceSerifPro-Regular.e6c37aa3926474cc93e1.woff2 +0 -0
- package/build/static/media/SourceSerifPro-SemiBold.5c1d378dd5990ef334ca.woff2 +0 -0
- package/build/static/media/SourceSerifPro-SemiBoldItalic.249e948b885d0c7d30a8.woff2 +0 -0
- package/build/static/media/index.c05687ef19f5bac24939.cjs +1 -0
- package/build/static/media/index.cf5b321a6e04bf47c12e.cjs +1 -0
- package/build/static/media/index.db61103fb7fdd62b9c44.cjs +1 -0
- package/build/static/media/index.f29488c1099d5e3883ac.cjs +1 -0
- package/package.json +5 -5
- package/build/static/css/5099.60b7ada4.chunk.css +0 -1
- package/build/static/css/main.73ab603a.css +0 -1
- package/build/static/js/1318.57c335d2.chunk.js +0 -1
- package/build/static/js/142.3d0fb3e3.chunk.js +0 -1
- package/build/static/js/172.0ee3e7c6.chunk.js +0 -5
- package/build/static/js/1839.29b0ce99.chunk.js +0 -1
- package/build/static/js/2327.b8572a38.chunk.js +0 -1
- package/build/static/js/2775.c1ed54fa.chunk.js +0 -5
- package/build/static/js/291.aa03bc71.chunk.js +0 -1
- package/build/static/js/2961.54b0c743.chunk.js +0 -2
- package/build/static/js/3580.31cb6ce5.chunk.js +0 -1
- package/build/static/js/3603.e3f6f11d.chunk.js +0 -2
- package/build/static/js/3603.e3f6f11d.chunk.js.LICENSE.txt +0 -135
- package/build/static/js/3744.6440bac0.chunk.js +0 -2
- package/build/static/js/3744.6440bac0.chunk.js.LICENSE.txt +0 -5
- package/build/static/js/3975.5538132d.chunk.js +0 -1
- package/build/static/js/4140.edb6c36a.chunk.js +0 -1
- package/build/static/js/4141.623ab362.chunk.js +0 -9
- package/build/static/js/4320.5977ee6b.chunk.js +0 -2
- package/build/static/js/4320.5977ee6b.chunk.js.LICENSE.txt +0 -20
- package/build/static/js/5093.304fcb1e.chunk.js +0 -1
- package/build/static/js/5099.51feed45.chunk.js +0 -1
- package/build/static/js/5177.21c4f353.chunk.js +0 -2
- package/build/static/js/5241.0326c97c.chunk.js +0 -1
- package/build/static/js/5440.c7134ed1.chunk.js +0 -1
- package/build/static/js/5617.837c33c0.chunk.js +0 -1
- package/build/static/js/6679.a8b5d830.chunk.js +0 -2
- package/build/static/js/6679.a8b5d830.chunk.js.LICENSE.txt +0 -60
- package/build/static/js/6683.aab9fa01.chunk.js +0 -1
- package/build/static/js/6756.2cb6963c.chunk.js +0 -1
- package/build/static/js/6862.886eab8e.chunk.js +0 -1
- package/build/static/js/6865.b0803b6b.chunk.js +0 -1
- package/build/static/js/6913.30734208.chunk.js +0 -17
- package/build/static/js/6939.c09d92c1.chunk.js +0 -1
- package/build/static/js/787.a500c8a4.chunk.js +0 -1
- package/build/static/js/792.04aad606.chunk.js +0 -1
- package/build/static/js/8035.dc118cc9.chunk.js +0 -1
- package/build/static/js/8295.c3cd87de.chunk.js +0 -1
- package/build/static/js/8418.aed275df.chunk.js +0 -1
- package/build/static/js/8486.e56533d6.chunk.js +0 -1
- package/build/static/js/865.9e23130b.chunk.js +0 -1
- package/build/static/js/9004.6a66722a.chunk.js +0 -1
- package/build/static/js/9042.a6fcbc74.chunk.js +0 -5
- package/build/static/js/9107.b49ea9ea.chunk.js +0 -5
- package/build/static/js/9130.8e10440e.chunk.js +0 -1
- package/build/static/js/9166.1a468fb9.chunk.js +0 -2
- package/build/static/js/9166.1a468fb9.chunk.js.LICENSE.txt +0 -13
- package/build/static/js/9382.c417d448.chunk.js +0 -1
- package/build/static/js/9615.c725e9d2.chunk.js +0 -1
- package/build/static/js/9733.e3808291.chunk.js +0 -2
- package/build/static/js/9733.e3808291.chunk.js.LICENSE.txt +0 -8
- package/build/static/js/9915.fe11690a.chunk.js +0 -1
- package/build/static/js/main.78d8e51a.js +0 -28
- package/build/static/media/SourceCodePro-Bold.52ac8f3034507f1d9e53.ttf +0 -0
- package/build/static/media/SourceCodePro-BoldItalic.05b618077343fbbd92b7.ttf +0 -0
- package/build/static/media/SourceCodePro-Italic.454577c22304619db035.ttf +0 -0
- package/build/static/media/SourceCodePro-Regular.70cc7ff27245e82ad414.ttf +0 -0
- package/build/static/media/SourceCodePro-SemiBold.4d4c53c06b5bebed1cf3.ttf +0 -0
- package/build/static/media/SourceCodePro-SemiBoldItalic.2f5470bc8b2cd27a5c4b.ttf +0 -0
- package/build/static/media/SourceSansPro-Bold.12e6acd2589d00c9d0aa.ttf +0 -0
- package/build/static/media/SourceSansPro-BoldItalic.7c4f9b00300acb82f0f6.ttf +0 -0
- package/build/static/media/SourceSansPro-Italic.3c01996d38a55834ddcb.ttf +0 -0
- package/build/static/media/SourceSansPro-Regular.efa76f8326aa5cee3bdd.ttf +0 -0
- package/build/static/media/SourceSansPro-SemiBold.43cc81b496222dc9ce3c.ttf +0 -0
- package/build/static/media/SourceSansPro-SemiBoldItalic.c30987e28fc21daba1ae.ttf +0 -0
- package/build/static/media/SourceSerifPro-Bold.bada4fe17051c992f22f.ttf +0 -0
- package/build/static/media/SourceSerifPro-BoldItalic.9f9b1eb2d82e26bb2f4a.ttf +0 -0
- package/build/static/media/SourceSerifPro-Italic.90931d6ad253cd8de8e4.ttf +0 -0
- package/build/static/media/SourceSerifPro-Regular.6f22301c30206f4bad62.ttf +0 -0
- package/build/static/media/SourceSerifPro-SemiBold.b27cb117978bab2c80a3.ttf +0 -0
- package/build/static/media/SourceSerifPro-SemiBoldItalic.1266f2c17835efdcff7b.ttf +0 -0
- package/build/static/media/index.09797f5e19b3c0491904.cjs +0 -1
- package/build/static/media/index.1e3d64b0fcde879f0060.cjs +0 -1
- package/build/static/media/index.85823dd8655ed4119d0c.cjs +0 -1
- package/build/static/media/index.b599194a631d76b49328.cjs +0 -1
- /package/build/static/css/{4320.1edfa457.chunk.css → 5703.1edfa457.chunk.css} +0 -0
- /package/build/static/js/{5177.21c4f353.chunk.js.LICENSE.txt → 5361.bc476229.chunk.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[5241],{83201:(e,t,s)=>{s.d(t,{$:()=>c,Z:()=>h});var i=s(5057),r=s(31476),o=s(23878),a=s(16449),n=s(80099),l=s(35450),d=s(96266);let c;!function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"}(c||(c={}));const h=function({value:e,width:t,size:s=c.SMALL,overrides:h}){const g=(0,r.u)(),u={xs:g.spacing.twoXS,sm:g.spacing.sm,md:g.spacing.lg,lg:g.spacing.xl,xl:g.spacing.twoXL},{activeTheme:p}=i.useContext(l.E),m=!(0,o.MJ)(p),f={BarContainer:{style:{marginTop:g.spacing.none,marginBottom:g.spacing.none,marginRight:g.spacing.none,marginLeft:g.spacing.none}},Bar:{style:({$theme:e})=>({width:t?t.toString():void 0,marginTop:g.spacing.none,marginBottom:g.spacing.none,marginRight:g.spacing.none,marginLeft:g.spacing.none,height:u[s],backgroundColor:e.colors.progressbarTrackFill,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})},BarProgress:{style:()=>({backgroundColor:m?g.colors.primary:g.colors.blue70,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})}};return(0,d.jsx)(a.Z,{value:e,overrides:(0,n.aO)(f,h)})}},15241:(e,t,s)=>{s.r(t),s.d(t,{default:()=>q});var i,r=s(30967),o=s(10458),a=s.n(o),n=s(65873),l=s.n(n),d=s(5057),c=s(98927),h=s(87509),g=s(89401),u=s(4337),p=s(18950),m=s(98209),f=s(95870),S=s(46434),w=s(90747),x=s(83201),R=s(45490),b=s(59990);function F(e,t){switch(e){case i.XSMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.sm}`,fontSize:t.fontSizes.sm};case i.SMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.md}`};case i.LARGE:return{padding:`${t.spacing.md} ${t.spacing.md}`};default:return{padding:`${t.spacing.xs} ${t.spacing.md}`}}}!function(e){e.XSMALL="xsmall",e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(i||(i={}));const C=(0,R.Z)("div",{target:"e11drzth9"})((()=>({position:"relative",overflow:"hidden",width:"100%",objectFit:"contain"})),""),I=(0,R.Z)("div",{target:"e11drzth8"})((({theme:e,width:t})=>({backgroundColor:e.colors.secondaryBg,borderRadius:`${e.radii.lg} ${e.radii.lg} 0 0`,width:"100%",height:9*t/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),""),v=(0,R.Z)("p",{target:"e11drzth7"})((({theme:e})=>({marginTop:e.spacing.sm,textAlign:"center"})),""),E=(0,R.Z)("img",{target:"e11drzth6"})((({theme:e,opacity:t})=>({borderRadius:`${e.radii.lg} ${e.radii.lg} 0 0`,objectFit:"contain",opacity:t})),""),P=(0,R.Z)("a",{target:"e11drzth5"})((({theme:e})=>({color:e.colors.primary,display:"block",textDecoration:"none"})),""),T=(0,R.Z)("span",{target:"e11drzth4"})((()=>({display:"flex",alignItems:"center"})),""),M=(0,R.Z)("div",{target:"e11drzth3"})((({theme:e})=>({position:"absolute",top:e.spacing.lg,right:e.spacing.lg,zIndex:1,color:e.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),""),y=(0,R.Z)("div",{target:"e11drzth1"})((()=>({height:"fit-content",width:"100%",position:"absolute",bottom:0})),""),L=(0,R.Z)("button",{target:"e11drzth0"})((({theme:e})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:e.colors.lightenedBg05,border:`1px solid ${e.colors.fadedText10}`,borderRadius:`0 0 ${e.radii.lg} ${e.radii.lg}`,"&:hover":{borderColor:e.colors.primary,color:e.colors.primary},"&:active":{color:e.colors.white,borderColor:e.colors.primary,backgroundColor:e.colors.primary},"&:focus:not(:active)":{borderColor:e.colors.primary,color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:e.colors.fadedText40},fontWeight:e.fontWeights.normal,padding:`${e.spacing.xs} ${e.spacing.md}`,margin:0,lineHeight:e.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${(0,b.DZ)(e.colors.primary,.5)}`},...F(i.MEDIUM,e)})),"");var j=s(96266);const U=function({disabled:e,onClick:t,children:s,progress:i}){return(0,j.jsxs)(L,{disabled:e||!1,onClick:t||(()=>{}),progress:i||null,"data-testid":"stCameraInputButton",children:[s,i&&(0,j.jsx)(y,{children:(0,j.jsx)(x.Z,{value:i,size:x.$.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarProgress:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarContainer:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}}}})})]})};var k=s(96457),z=s(46401),$=s(22131);let Z;!function(e){e.USER="user",e.ENVIRONMENT="environment"}(Z||(Z={}));const D=({switchFacingMode:e})=>(0,j.jsx)(M,{children:(0,j.jsx)(g.ZP,{content:"Switch camera",placement:g.ug.TOP_RIGHT,children:(0,j.jsx)(z.ZP,{kind:z.nW.MINIMAL,onClick:e,children:(0,j.jsx)(h.ZP,{content:k.Z,size:"twoXL",color:$.Z.white})})})});var X=s(85585),O=s(31476),_=s(11226),A=s(74947),B=s.n(A),N=s(61921);let G;!function(e){e.PENDING="pending",e.SUCCESS="success",e.ERROR="error"}(G||(G={}));const V=({width:e})=>(0,j.jsxs)(I,{width:e,children:[(0,j.jsx)(h.ZP,{size:"threeXL",color:$.Z.gray60,content:X.n}),(0,j.jsxs)(v,{children:["This app would like to use your camera.",(0,j.jsx)(P,{href:N.U3,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),W=({handleCapture:e,width:t,disabled:s,clearPhotoInProgress:i,setClearPhotoInProgress:r,facingMode:o,setFacingMode:a})=>{const[n,l]=(0,d.useState)(G.PENDING),c=(0,d.useRef)(null),[h,g]=(0,d.useState)(t),u=(0,d.useCallback)((0,S.Ds)(1e3,g),[]);(0,d.useEffect)((()=>{u(t)}),[t,u]);const p=(0,O.u)();return(0,j.jsxs)(C,{width:h,children:[n===G.SUCCESS||s||i?_.tq&&(0,j.jsx)(D,{switchFacingMode:a}):(0,j.jsx)(V,{width:h}),(0,j.jsx)(I,{hidden:n!==G.SUCCESS&&!s&&!i,width:h,children:!s&&(0,j.jsx)(B(),{audio:!1,ref:c,screenshotFormat:"image/jpeg",screenshotQuality:1,width:h,height:9*h/16,style:{borderRadius:`${p.radii.lg} ${p.radii.lg} 0 0`},onUserMediaError:()=>{l(G.ERROR)},onUserMedia:()=>{l(G.SUCCESS),r(!1)},videoConstraints:{width:{ideal:h},facingMode:o}})}),(0,j.jsx)(U,{onClick:function(){if(null!==c.current){const t=c.current.getScreenshot();e(t)}},disabled:n!==G.SUCCESS||s||i,children:"Take Photo"})]})};class H extends d.PureComponent{constructor(e){super(e),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new m.Kz,this.getProgress=()=>{if(this.state.files.length>0&&"uploading"===this.state.files[this.state.files.length-1].status.type){return this.state.files[this.state.files.length-1].status.progress}},this.setClearPhotoInProgress=e=>{this.setState({clearPhotoInProgress:e})},this.setFacingMode=()=>{this.setState((e=>({facingMode:e.facingMode===Z.USER?Z.ENVIRONMENT:Z.USER})))},this.handleCapture=e=>{if(null===e)return Promise.resolve();this.setState({imgSrc:e,shutter:!0,minShutterEffectPassed:!1});var t,s;return(t=e,s=`camera-input-${(new Date).toISOString().replace(/:/g,"_")}.jpg`,fetch(t).then((e=>e.arrayBuffer())).then((e=>new File([e],s,{type:"image/jpeg"})))).then((e=>this.uploadFile(e))).then((()=>{return e=150,new Promise((t=>setTimeout(t,e)));var e})).then((()=>{this.setState(((t,s)=>({imgSrc:e,shutter:t.shutter,minShutterEffectPassed:!0})))})).catch((e=>{(0,f.H)(e)}))},this.removeCapture=()=>{0!==this.state.files.length&&(this.state.files.forEach((e=>this.deleteFile(e.id))),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=e=>{const{element:t,widgetMgr:s}=this.props;if(e.disabled!==this.props.disabled&&this.props.disabled)return this.reset(),void s.setFileUploaderStateValue(t,new c.xO,{fromUi:!1});if("ready"!==this.status)return;const i=this.createWidgetValue();if(void 0===i)return;const r=s.getFileUploaderStateValue(t);l().isEqual(i,r)||s.setFileUploaderStateValue(t,i,{fromUi:!0})},this.onFormCleared=()=>{this.setState({files:[]},(()=>{const e=this.createWidgetValue();null!=e&&(this.setState({imgSrc:null}),this.props.widgetMgr.setFileUploaderStateValue(this.props.element,e,{fromUi:!0}))}))},this.deleteFile=e=>{const t=this.getFile(e);null!=t&&("uploading"===t.status.type&&t.status.cancelToken.cancel(),this.removeFile(e))},this.addFile=e=>{this.setState((t=>({files:[...t.files,e]})))},this.removeFile=e=>{this.setState((t=>({files:t.files.filter((t=>t.id!==e))})))},this.getFile=e=>this.state.files.find((t=>t.id===e)),this.updateFile=(e,t)=>{this.setState((s=>({files:s.files.map((s=>s.id===e?t:s))})))},this.onUploadComplete=(e,t)=>{this.setState((e=>({newestServerFileId:Math.max(e.newestServerFileId,t),shutter:!1})));const s=this.getFile(e);null!=s&&"uploading"===s.status.type&&this.updateFile(s.id,s.setStatus({type:"uploaded",serverFileId:t}))},this.onUploadProgress=(e,t)=>{const s=this.getFile(t);if(null==s||"uploading"!==s.status.type)return;const i=Math.round(100*e.loaded/e.total);s.status.progress!==i&&this.updateFile(t,s.setStatus({type:"uploading",cancelToken:s.status.cancelToken,progress:i}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=e=>{const t=a().CancelToken.source(),s=new w.R(e.name,e.size,this.nextLocalFileId(),{type:"uploading",cancelToken:t,progress:1});this.addFile(s),this.props.uploadClient.uploadFile(this.props.element,e,(e=>this.onUploadProgress(e,s.id)),t.token).then((e=>this.onUploadComplete(s.id,e))).catch((e=>{a().isCancel(e)||this.updateFile(s.id,s.setStatus({type:"error",errorMessage:e?e.toString():"Unknown error"}))}))},this.state=this.initialValue}get initialValue(){const e={files:[],newestServerFileId:0,imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:Z.USER},{widgetMgr:t,element:s}=this.props,i=t.getFileUploaderStateValue(s);if(null==i)return e;const{maxFileId:r,uploadedFileInfo:o}=i;return null==r||0===r||null==o?e:{files:o.map((e=>{const t=e.name,s=e.size,i=e.id;return new w.R(t,s,this.nextLocalFileId(),{type:"uploaded",serverFileId:i})})),newestServerFileId:Number(r),imgSrc:0===o.length?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:Z.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){return this.state.files.some((e=>"uploading"===e.status.type))?"updating":"ready"}createWidgetValue(){if(0===this.state.newestServerFileId)return;const e=this.state.files.filter((e=>"uploaded"===e.status.type)).map((e=>{const{name:t,size:s,status:i}=e;return new c.jM({id:i.serverFileId,name:t,size:s})}));return new c.xO({maxFileId:this.state.newestServerFileId,uploadedFileInfo:e})}render(){var e;const{element:t,widgetMgr:s,disabled:i,width:o}=this.props;return this.formClearHelper.manageFormClearListener(s,t.formId,this.onFormCleared),(0,j.jsxs)(C,{width:o,className:"row-widget","data-testid":"stCameraInput",children:[(0,j.jsx)(p.ON,{label:t.label,disabled:i,labelVisibility:(0,S.iF)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),children:t.help&&(0,j.jsx)(p.dT,{children:(0,j.jsx)(u.ZP,{content:t.help,placement:g.ug.TOP_RIGHT})})}),this.state.imgSrc?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(I,{width:o,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&(0,j.jsx)(E,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:o,height:9*o/16})}),(0,j.jsx)(U,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||i,children:this.getProgress()?"Uploading...":(0,j.jsxs)(T,{children:[(0,j.jsx)(h.ZP,{content:r.X,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):(0,j.jsx)(W,{handleCapture:this.handleCapture,width:o,disabled:i,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode})]})}nextLocalFileId(){return this.localFileIdCounter++}}const q=H},90747:(e,t,s)=>{s.d(t,{R:()=>i});class i{setStatus(e){return new i(this.name,this.size,this.id,e)}constructor(e,t,s,i){this.name=void 0,this.size=void 0,this.status=void 0,this.id=void 0,this.name=e,this.size=t,this.id=s,this.status=i}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[5440],{85440:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>y});var r=o(5057),s=o(11226),i=o(78164),n=o.n(i),l=o(31476),a=o(98209),p=o(81607),u=o(94861),d=o(87118),h=o(18950);const c=(0,o(45490).Z)("div",{target:"e10apx9u0"})((({theme:e})=>({"span[aria-disabled='true']":{background:e.colors.fadedText05}})),"");var m=o(4337),g=o(89401),f=o(88707),v=o(98184),b=o(46434),x=o(96266);class S extends r.PureComponent{constructor(...e){super(...e),this.formClearHelper=new a.Kz,this.state={value:this.initialValue},this.commitWidgetValue=e=>{this.props.widgetMgr.setIntArrayValue(this.props.element,this.state.value,e)},this.onFormCleared=()=>{this.setState(((e,t)=>({value:t.element.default})),(()=>this.commitWidgetValue({fromUi:!0})))},this.onChange=e=>{this.props.element.maxSelections&&"select"===e.type&&this.state.value.length>=this.props.element.maxSelections||this.setState(this.generateNewState(e),(()=>{this.commitWidgetValue({fromUi:!0})}))},this.filterOptions=(e,t)=>{if(this.overMaxSelections())return[];const o=e.filter((e=>!this.state.value.includes(Number(e.value))));return(0,v.H)(o,t)}}overMaxSelections(){return this.props.element.maxSelections>0&&this.state.value.length>=this.props.element.maxSelections}getNoResultsMsg(){if(0===this.props.element.maxSelections)return"No results";const e=1!==this.props.element.maxSelections?"options":"option";return`You can only select up to ${this.props.element.maxSelections} ${e}. Remove an option first.`}get initialValue(){const e=this.props.widgetMgr.getIntArrayValue(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})}))}get valueFromState(){return this.state.value.map((e=>{const t=this.props.element.options[e];return{value:e.toString(),label:t}}))}generateNewState(e){const t=()=>{var t;const o=null===(t=e.option)||void 0===t?void 0:t.value;return parseInt(o,10)};switch(e.type){case"remove":return{value:n()(this.state.value,t())};case"clear":return{value:[]};case"select":return{value:this.state.value.concat([t()])};default:throw new Error(`State transition is unknown: ${e.type}`)}}render(){var e;const{element:t,theme:o,width:r,widgetMgr:i}=this.props,n={width:r},{options:l}=t,a=0===l.length||this.props.disabled,v=0===l.length?"No options to select.":"Choose an option",S=l.map(((e,t)=>({label:e,value:t.toString()})));this.formClearHelper.manageFormClearListener(i,t.formId,this.onFormCleared);const y=l.length>10;return(0,x.jsxs)("div",{className:"row-widget stMultiSelect",style:n,children:[(0,x.jsx)(h.ON,{label:t.label,disabled:a,labelVisibility:(0,b.iF)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),children:t.help&&(0,x.jsx)(h.dT,{children:(0,x.jsx)(m.ZP,{content:t.help,placement:g.ug.TOP_RIGHT})})}),(0,x.jsx)(c,{children:(0,x.jsx)(u.Z,{options:S,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:v,type:d.wD.select,multi:!0,onChange:this.onChange,value:this.valueFromState,disabled:a,size:"compact",noResultsMsg:this.getNoResultsMsg(),filterOptions:this.filterOptions,closeOnSelect:!1,overrides:{SelectArrow:{component:p.Z,props:{overrides:{Svg:{style:()=>({width:o.iconSizes.xl,height:o.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:o.spacing.sm})},ControlContainer:{style:{borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px"}},Placeholder:{style:()=>({flex:"inherit"})},ValueContainer:{style:()=>({minHeight:"38.4px",paddingLeft:o.spacing.sm,paddingTop:0,paddingBottom:0,paddingRight:0})},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.darkGray,transform:"scale(1.5)",width:o.spacing.twoXL,":hover":{fill:o.colors.bodyText}}}}}},SearchIcon:{style:{color:o.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{borderTopLeftRadius:o.radii.md,borderTopRightRadius:o.radii.md,borderBottomRightRadius:o.radii.md,borderBottomLeftRadius:o.radii.md,fontSize:o.fontSizes.sm,paddingLeft:o.spacing.sm,marginLeft:0,marginRight:o.spacing.sm,height:"28px"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"10px",height:"10px"}}}}},Text:{style:{fontSize:o.fontSizes.md}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:o.fontSizes.sm}}}}},Input:{props:{readOnly:s.tq&&!1===y?"readonly":null}},Dropdown:{component:f.s}}})})]})}}const y=(0,l.b)(S)},97247:(e,t,o)=>{var r=o(54305);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},89479:e=>{e.exports=function(e,t,o){for(var r=-1,s=null==e?0:e.length;++r<s;)if(o(t,e[r]))return!0;return!1}},3895:(e,t,o)=>{var r=o(98323),s=o(97247),i=o(89479),n=o(73470),l=o(74631),a=o(51565);e.exports=function(e,t,o,p){var u=-1,d=s,h=!0,c=e.length,m=[],g=t.length;if(!c)return m;o&&(t=n(t,l(o))),p?(d=i,h=!1):t.length>=200&&(d=a,h=!1,t=new r(t));e:for(;++u<c;){var f=e[u],v=null==o?f:o(f);if(f=p||0!==f?f:0,h&&v===v){for(var b=g;b--;)if(t[b]===v)continue e;m.push(f)}else d(t,v,p)||m.push(f)}return m}},60238:e=>{e.exports=function(e,t,o,r){for(var s=e.length,i=o+(r?1:-1);r?i--:++i<s;)if(t(e[i],i,e))return i;return-1}},54305:(e,t,o)=>{var r=o(60238),s=o(24981),i=o(23481);e.exports=function(e,t,o){return t===t?i(e,t,o):r(e,s,o)}},24981:e=>{e.exports=function(e){return e!==e}},23481:e=>{e.exports=function(e,t,o){for(var r=o-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}},78164:(e,t,o)=>{var r=o(3895),s=o(86456),i=o(7244),n=s((function(e,t){return i(e)?r(e,t):[]}));e.exports=n}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[5617],{75617:(e,t,o)=>{o.r(t),o.d(t,{default:()=>$});var n=o(5057),r=o(53812),i=o(82601),l=o(55927);let d;!function(e){e.ASCENDING="ascending",e.DESCENDING="descending"}(d||(d={}));var s=o(45490);const a=(0,s.Z)("div",{target:"e1xdbg9g8"})((({width:e,theme:t})=>({width:e,border:`1px solid ${t.colors.fadedText05}`,boxSizing:"content-box","& .table-top-right":{overflow:"hidden !important",paddingRight:"6px"},"& .table-bottom-left":{overflow:"hidden !important",paddingBottom:"6px"},"& .table-bottom-right":{overflow:"overlay !important"},"& .table-bottom-right:focus-visible":{outline:"none"},"& .table-bottom-right:focus":{outline:"none"}})),""),c=(0,s.Z)("div",{target:"e1xdbg9g7"})((({theme:e})=>({padding:`${e.spacing.twoXS} ${e.spacing.xs}`,borderBottom:`1px solid ${e.colors.fadedText05}`,borderRight:`1px solid ${e.colors.fadedText05}`,fontSize:e.fontSizes.md,fontFamily:e.genericFonts.bodyFont,lineHeight:e.lineHeights.table,display:"flex",alignItems:"center",justifyContent:"flex-start"})),""),h=e=>({color:e.colors.fadedText60,borderBottom:`1px solid ${e.colors.fadedText05}`,borderRight:`1px solid ${e.colors.fadedText05}`,zIndex:1}),m=e=>({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:e.lineHeights.table}),u=(0,s.Z)(c,{target:"e1xdbg9g6"})((({theme:e})=>h(e)),""),g=(0,s.Z)(c,{target:"e1xdbg9g5"})((({theme:e})=>({userSelect:"none",...h(e),...m(e)})),""),f=(0,s.Z)(c,{target:"e1xdbg9g4"})((({theme:e})=>({userSelect:"none",...h(e),...m(e)})),""),x=(0,s.Z)(c,{target:"e1xdbg9g3"})((({theme:e})=>m(e)),""),w=(0,s.Z)("div",{target:"e1xdbg9g2"})((({verticalLocator:e,horizontalLocator:t,width:o,height:n})=>({position:"absolute",[e]:"0px",[t]:"0px",width:o,height:n})),""),p=(0,s.Z)("div",{target:"e1xdbg9g1"})((({theme:e})=>({fontFamily:e.genericFonts.codeFont,color:e.colors.fadedText60,fontStyle:"italic",fontSize:e.fontSizes.md,textAlign:"center"})),""),b=(0,s.Z)("span",{target:"e1xdbg9g0"})((({theme:e})=>({color:e.colors.fadedText05,verticalAlign:"top"})),"");var C=o(76850),y=o(95870);const v=!("undefined"===typeof window||!window.document||!window.document.createElement);let S;function N(e){if((!S&&0!==S||e)&&v){const e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),S=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return S}var I=o(3888);const D=2*I.CH.smPx,E=(e,t,o,n)=>{const{headerRows:r,headerCols:i,dataRows:d,cols:s,rows:a}=(0,l.kG)(o),c=D*r,h=t-2-N(),m=function(e,t,o,n,r,i){const l=25,d=e>2?200:400,s=({index:e})=>{const o=e,r=8*10/10,d=24,s=100;let a=l;for(let l=0;l<Math.min(t,s);l++){let e=-1;e=l<n?l:t>s?Math.floor(Math.random()*t):l;const{contents:c}=i(o,e),h=(c?c.length:0)*r+d;h>a&&(a=h)}return a};let a=[];const c=Array.from(Array(e),((e,t)=>s({index:t}))),h=c.reduce(((e,t)=>e+t),0),m=r-h,u=e=>e.filter((e=>e>d));if(m<0)a=c.map((e=>e>d?d:e));else{const e=u(c),t=m/e.length;a=c.map(((o,n)=>n in e.keys()?o+t:o))}let g=a.reduce(((e,t)=>e+t),0);if(g>r*(2/3)&&g<r){const t=(r-g)/e;a=a.map((e=>e+t)),g=a.reduce(((e,t)=>e+t),0)}const f=Math.min(g,r),x=({index:e})=>a[e],w=a.slice(0,o).reduce(((e,t)=>e+t));return{elementWidth:f,columnWidth:x,headerWidth:w}}(s,a,i,r,h,n);let{elementWidth:u,columnWidth:g,headerWidth:f}=m;if(0===d&&u<60){u=60,f=60;let e=0;for(let t=0;t<s;t++)e+=g({index:t});e<60&&(g=()=>60/s)}const x=a*D,w=(e||300)-2;e=Math.min(x,w);return u+=x>w?N():0,{rowHeight:D,headerHeight:c,border:2,columnWidth:g,headerWidth:f,elementWidth:u,height:e}},R={corner:u,"col-header":g,"row-header":f,data:x};var G=o(31478),k=o(95421),A=n.forwardRef((function(e,t){return n.createElement(k.D,(0,G.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M4 1L0 5l1.5 1.5L4 4l2.5 2.5L8 5 4 1z"}))}));A.displayName="ChevronTop";var T=n.forwardRef((function(e,t){return n.createElement(k.D,(0,G.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M1.5 1L0 2.5l4 4 4-4L6.5 1 4 3.5 1.5 1z"}))}));T.displayName="ChevronBottom";var W=o(87509),z=o(96266);function Z({CellType:e,columnIndex:t,contents:o,rowIndex:n,sortedByUser:r,style:i,columnSortDirection:l,headerClickedCallback:s}){let a,c,h,m=o;const u=l===d.DESCENDING;null!=s&&0===n&&(a=()=>s(t),c="button",h=0,m=null==l?`Sort by column "${o}"`:`Sorted by column "${o}" (${u?"descending":"ascending"})`);const g=0===n?function(e){switch(e){case d.ASCENDING:return(0,z.jsx)(b,{"data-testid":"sortIcon",children:(0,z.jsx)(W.ZP,{content:A,size:"xs",margin:"0 0 0 twoXS"})});case d.DESCENDING:return(0,z.jsx)(b,{"data-testid":"sortIcon",children:(0,z.jsx)(W.ZP,{content:T,size:"xs",margin:"0 0 0 twoXS"})});default:return null}}(l):void 0;return(0,z.jsxs)(e,{style:i,onClick:a,role:c,tabIndex:h,title:m,"data-testid":e.displayName,"data-test-sort-direction":l,children:[o,r?g:""]})}const $=(0,i.Z)((function({element:e,height:t,width:o}){const i=n.useRef(null),[s,c]=(0,n.useState)(!1),[h,m]=(0,n.useState)(0),[u,g]=(0,n.useState)(d.ASCENDING),[,f]=(0,l.oo)(e.get("data")),{headerRows:x,headerCols:b,dataRows:v,cols:S,rows:N}=(0,l.kG)(e),I=e=>{let t=d.ASCENDING;h===e&&(t=u===d.ASCENDING?d.DESCENDING:d.ASCENDING),m(e),g(t),c(!0)},D=(t=>{const{headerCols:o,dataRows:n}=(0,l.kG)(e),r=u!==d.DESCENDING;if(h<o||h-o>=t){const e=new Array(n);for(let t=0;t<n;t+=1)e[t]=r?t:n-(t+1);return e}return(0,l.X_)(e,h-o,r)})(f),G=function({element:e,headerRows:t,sortedDataRowIndices:o}){return(n,r)=>{if(null!=o&&r>=t){const e=r-t;e>=0&&e<o.length?(r=o[e],r+=t):(0,y.KE)(`Bad sortedDataRowIndices (rowIndex=${r}, headerRows=${t}, sortedDataRowIndices.length=${o.length}`)}const{contents:i,styles:d,type:s}=(0,l.me)(e,n,r);return{Component:R[s],styles:d,contents:(0,C.H7)(i)}}}({element:e,headerRows:x,sortedDataRowIndices:D}),k=function(e){return({columnIndex:t,key:o,rowIndex:n,style:r})=>{const{Component:i,styles:l,contents:d}=e(t,n),a=0===n?I:void 0,c=t===h?u:void 0,m={...r,...l,borderBottom:n===v?"none":void 0,borderRight:t===S-b?"none":void 0};return(0,z.jsx)(Z,{CellType:i,columnIndex:t,rowIndex:n,style:m,contents:d,sortedByUser:s,columnSortDirection:c,headerClickedCallback:a},o)}}(G),{rowHeight:A,headerHeight:T,border:W,height:$,elementWidth:j,columnWidth:B,headerWidth:L}=E(t,o,e,G);return setTimeout((()=>{null!=i.current&&i.current.recomputeGridSize()}),0),(0,n.useEffect)((()=>{h-b>=f&&(m(0),g(d.ASCENDING),c(!1))}),[h,b,f]),(0,z.jsxs)(a,{width:j,className:"stDataFrame",children:[(0,z.jsx)(r.yR,{cellRenderer:k,fixedColumnCount:b,fixedRowCount:x,columnWidth:B,columnCount:S,enableFixedColumnScroll:!1,enableFixedRowScroll:!1,height:$,rowHeight:A,rowCount:N,width:j,classNameBottomLeftGrid:"table-bottom-left",classNameBottomRightGrid:"table-bottom-right",classNameTopRightGrid:"table-top-right",ref:i}),(0,z.jsx)(w,{verticalLocator:"top",horizontalLocator:"right",width:W,height:T}),(0,z.jsx)(w,{verticalLocator:"bottom",horizontalLocator:"left",width:L,height:W}),0===v?(0,z.jsx)(p,{children:"empty"}):null]})}))}}]);
|