@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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* jQuery Mousewheel 3.1.13
|
|
3
|
+
*
|
|
4
|
+
* Copyright jQuery Foundation and other contributors
|
|
5
|
+
* Released under the MIT license
|
|
6
|
+
* http://jquery.org/license
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/*!
|
|
10
|
+
* numbro.js
|
|
11
|
+
* version : 1.6.2
|
|
12
|
+
* author : Företagsplatsen AB
|
|
13
|
+
* license : MIT
|
|
14
|
+
* http://www.foretagsplatsen.se
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/*!
|
|
18
|
+
* Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors
|
|
19
|
+
* All rights reserved.
|
|
20
|
+
*
|
|
21
|
+
* Redistribution and use in source and binary forms, with or without modification,
|
|
22
|
+
* are permitted provided that the following conditions are met:
|
|
23
|
+
*
|
|
24
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
25
|
+
* this list of conditions and the following disclaimer.
|
|
26
|
+
*
|
|
27
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
28
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
29
|
+
* and/or other materials provided with the distribution.
|
|
30
|
+
*
|
|
31
|
+
* Neither the name of Anaconda nor the names of any contributors
|
|
32
|
+
* may be used to endorse or promote products derived from this software
|
|
33
|
+
* without specific prior written permission.
|
|
34
|
+
*
|
|
35
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
36
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
37
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
38
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
39
|
+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
40
|
+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
41
|
+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
42
|
+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
43
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
44
|
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
45
|
+
* THE POSSIBILITY OF SUCH DAMAGE.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
49
|
+
* http://hammerjs.github.io/
|
|
50
|
+
*
|
|
51
|
+
* Copyright (c) 2016 Jorik Tangelder;
|
|
52
|
+
* Licensed under the MIT license */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[4482],{25094:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(5057),a=n(66904),o=n.n(a),i=n(7742),c=n.n(i),s=n(96266);const u=t=>{let{className:e,scriptRunId:n,numParticles:r,numParticleTypes:a,ParticleComponent:i}=t;return(0,s.jsx)("div",{className:c()(e,"stHidden"),"data-testid":"".concat(e),children:o()(r).map((t=>{const e=Math.floor(Math.random()*a);return(0,s.jsx)(i,{particleType:e},n+t)}))})},l=(0,r.memo)(u)},48833:(t,e,n)=>{"use strict";n.r(e),n.d(e,{NUM_FLAKES:()=>v,default:()=>y});var r=n(5057);const a=n.p+"static/media/flake-0.beded754e8024c73d9d2.png",o=n.p+"static/media/flake-1.8077dc154e0bf900aa73.png",i=n.p+"static/media/flake-2.e3f07d06933dd0e84c24.png";var c,s=n(25094),u=n(82160),l=n(21371);const p=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Math.random()*(t-e)+e},d=()=>{return(0,l.F4)(c||(t=["\n from {\n transform:\n translateY(0)\n rotateX(","deg)\n rotateY(","deg)\n rotateZ(","deg);\n }\n\n to {\n transform:\n translateY(calc(100vh + ","px))\n rotateX(0)\n rotateY(0)\n rotateZ(0);\n }\n"],e||(e=t.slice(0)),c=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))),p(360),p(360),p(360),150);var t,e},f=(0,u.Z)("img",{target:"ekdfb790"})((t=>{let{theme:e}=t;return{position:"fixed",top:"".concat(-150,"px"),marginLeft:"".concat(-75,"px"),zIndex:e.zIndices.balloons,left:"".concat(p(90,10),"vw"),animationDelay:"".concat(p(4e3),"ms"),height:"".concat(150,"px"),width:"".concat(150,"px"),pointerEvents:"none",animationDuration:"3000ms",animationName:d(),animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1}}),"");var m=n(96266);const v=100,h=[a,o,i],x=h.length,g=t=>{let{particleType:e}=t;return(0,m.jsx)(f,{src:h[e]})},b=function(t){let{scriptRunId:e}=t;return(0,m.jsx)(s.Z,{className:"snow",scriptRunId:e,numParticleTypes:x,numParticles:v,ParticleComponent:g})},y=(0,r.memo)(b)},99980:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,r,a,o){for(var i=-1,c=n(e((r-t)/(a||1)),0),s=Array(c);c--;)s[o?c:++i]=t,t+=a;return s}},39594:(t,e,n)=>{var r=n(36418),a=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(a,""):t}},9186:(t,e,n)=>{var r=n(99980),a=n(27396),o=n(17046);t.exports=function(t){return function(e,n,i){return i&&"number"!=typeof i&&a(e,n,i)&&(n=i=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),i=void 0===i?e<n?1:-1:o(i),r(e,n,i,t)}}},36418:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},66904:(t,e,n)=>{var r=n(9186)();t.exports=r},17046:(t,e,n)=>{var r=n(81692),a=1/0;t.exports=function(t){return t?(t=r(t))===a||t===-1/0?17976931348623157e292*(t<0?-1:1):t===t?t:0:0===t?t:0}},81692:(t,e,n)=>{var r=n(39594),a=n(26271),o=n(71490),i=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(a(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=a(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=c.test(t);return n||s.test(t)?u(t.slice(2),n?2:8):i.test(t)?NaN:+t}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[4494],{44494:(t,e,s)=>{s.r(e),s.d(e,{default:()=>C});var i=s(5057),a=s(88084),r=s.n(a),o=s(47206),n=s(80865),l=s(9191),d=s(73830),p=s(52955),m=s(38944),h=s(93905),c=s(21034),u=s(98790),g=s(50120),f=s(96266);const v="YYYY/MM/DD";function b(t){return t.map((t=>new Date(t)))}class y extends i.PureComponent{constructor(){super(...arguments),this.formClearHelper=new p.K,this.state={values:this.initialValue,isRange:this.props.element.isRange,isEmpty:!1},this.commitWidgetValue=t=>{var e;this.props.widgetMgr.setStringArrayValue(this.props.element,(e=this.state.values)?e.map((t=>r()(t).format(v))):[],t)},this.onFormCleared=()=>{const t=b(this.props.element.default);this.setState({values:t,isEmpty:!t},(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=t=>{let{date:e}=t;if(null===e||void 0===e)return void this.setState({values:[],isEmpty:!0});const s=[];Array.isArray(e)?e.forEach((t=>{t&&s.push(t)})):s.push(e),this.setState({values:s,isEmpty:!s},(()=>{this.state.isEmpty||this.commitWidgetValue({fromUi:!0})}))},this.handleClose=()=>{const{isEmpty:t}=this.state;t&&this.setState(((t,e)=>({values:b(e.element.default),isEmpty:!b(e.element.default)})),(()=>{this.commitWidgetValue({fromUi:!0})}))},this.getMaxDate=()=>{const{element:t}=this.props,e=t.max;return e&&e.length>0?r()(e,v).toDate():void 0}}get initialValue(){const t=this.props.widgetMgr.getStringArrayValue(this.props.element);return b(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;const e=t.map((t=>new Date(t)));this.setState({values:e,isEmpty:!e},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var t;const{width:e,element:s,disabled:i,theme:a,widgetMgr:o}=this.props,{values:p,isRange:b}=this.state,{colors:y,fontSizes:C,lineHeights:x}=a,D={width:e},k=r()(s.min,v).toDate(),W=this.getMaxDate(),F=0===s.default.length&&!i,V=s.format.replaceAll(/[a-zA-Z]/g,"9"),I=s.format.replaceAll("Y","y").replaceAll("D","d");return this.formClearHelper.manageFormClearListener(o,s.formId,this.onFormCleared),(0,f.jsxs)("div",{className:"stDateInput",style:D,"data-testid":"stDateInput",children:[(0,f.jsx)(m.O,{label:s.label,disabled:i,labelVisibility:(0,g.iF)(null===(t=s.labelVisibility)||void 0===t?void 0:t.value),children:s.help&&(0,f.jsx)(h.dT,{children:(0,f.jsx)(c.Z,{content:s.help,placement:u.u.TOP_RIGHT})})}),(0,f.jsx)(n.Z,{"data-testid":"stDateInputPicker",density:l.pw.high,formatString:I,mask:b?"".concat(V," \u2013 ").concat(V):V,placeholder:b?"".concat(s.format," \u2013 ").concat(s.format):s.format,disabled:i,onChange:this.handleChange,onClose:this.handleClose,overrides:{Popover:{props:{placement:d.r4.bottomLeft,overrides:{Body:{style:{border:"1px solid ".concat(y.fadedText10)}}}}},CalendarContainer:{style:{fontSize:C.sm,paddingRight:a.spacing.sm,paddingLeft:a.spacing.sm,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}},Week:{style:{fontSize:C.sm}},Day:{style:t=>{let{$pseudoHighlighted:e,$pseudoSelected:s,$selected:i,$isHovered:a}=t;return{fontSize:C.sm,lineHeight:x.base,"::before":{backgroundColor:i||s||e||a?"".concat(y.secondaryBg," !important"):y.transparent},"::after":{borderColor:y.transparent}}}},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:y.transparent},":focus":{backgroundColor:y.transparent,outline:0}})},NextButton:{style:{display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:y.transparent},":focus":{backgroundColor:y.transparent,outline:0}}},Input:{props:{maskChar:null,overrides:{Root:{style:{borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px"}},ClearIcon:{props:{overrides:{Svg:{style:{color:a.colors.darkGray,transform:"scale(1.41)",width:a.spacing.twoXL,marginRight:"-8px",":hover":{fill:a.colors.bodyText}}}}}},Input:{style:{paddingRight:".5rem",paddingLeft:".5rem",paddingBottom:".5rem",paddingTop:".5rem"}}}}}},value:p,minDate:k,maxDate:W,range:b,clearable:F})]})}}const C=(0,o.b)(y)},52955:(t,e,s)=>{s.d(e,{K:()=>a});var i=s(50120);class a{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(t,e,s){null!=this.formClearListener&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),(0,i.bM)(e)&&(this.formClearListener=t.addFormClearedListener(e,s),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;null===(t=this.formClearListener)||void 0===t||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[4694],{4694:(t,o,e)=>{e.r(o),e.d(o,{default:()=>c});e(5057);var s=e(69212),i=e(82160),n=e(17966);const r=(0,i.Z)("div",{target:"e18r7x300"})((t=>{let{theme:o}=t;return{paddingBottom:o.spacing.smPx,lineHeight:o.lineHeights.normal,color:(0,n.yq)(o)}}),"");var a=e(46403),g=e(96266);const c=function(t){let{element:o,width:e}=t;return(0,g.jsxs)("div",{className:"stProgress",children:[(0,g.jsx)(r,{children:(0,g.jsx)(a.ZP,{source:o.text,allowHTML:!1,isLabel:!0})}),(0,g.jsx)(s.Z,{value:o.value,width:e})]})}},69212:(t,o,e)=>{e.d(o,{$:()=>l,Z:()=>d});var s=e(5057),i=e(47206),n=e(31808),r=e(17966),a=e(16449),g=e(80099),c=e(96266);let l=function(t){return t.EXTRASMALL="xs",t.SMALL="sm",t.MEDIUM="md",t.LARGE="lg",t.EXTRALARGE="xl",t}({});const d=function(t){let{value:o,width:e,size:d=l.SMALL,overrides:p}=t;const u=(0,i.u)(),m={xs:u.spacing.twoXS,sm:u.spacing.sm,md:u.spacing.lg,lg:u.spacing.xl,xl:u.spacing.twoXL},{activeTheme:h}=s.useContext(n.E),R=!(0,r.MJ)(h),b={BarContainer:{style:{marginTop:u.spacing.none,marginBottom:u.spacing.none,marginRight:u.spacing.none,marginLeft:u.spacing.none}},Bar:{style:t=>{let{$theme:o}=t;return{width:e?e.toString():void 0,marginTop:u.spacing.none,marginBottom:u.spacing.none,marginRight:u.spacing.none,marginLeft:u.spacing.none,height:m[d],backgroundColor:o.colors.progressbarTrackFill,borderTopLeftRadius:u.spacing.twoXS,borderTopRightRadius:u.spacing.twoXS,borderBottomLeftRadius:u.spacing.twoXS,borderBottomRightRadius:u.spacing.twoXS}}},BarProgress:{style:()=>({backgroundColor:R?u.colors.primary:u.colors.blue70,borderTopLeftRadius:u.spacing.twoXS,borderTopRightRadius:u.spacing.twoXS,borderBottomLeftRadius:u.spacing.twoXS,borderBottomRightRadius:u.spacing.twoXS})}};return(0,c.jsx)(a.Z,{value:o,overrides:(0,g.aO)(b,p)})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[4724],{94778:(e,t,r)=>{r.d(t,{Z:()=>p});r(5057);var n,o=r(50120),i=r(93905),a=r(82160);const s=(0,r(21371).F4)(n||(l=["\n 50% {\n color: rgba(0, 0, 0, 0);\n }\n"],c||(c=l.slice(0)),n=Object.freeze(Object.defineProperties(l,{raw:{value:Object.freeze(c)}}))));var l,c;const u=(0,a.Z)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:n}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:"".concat(s),animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var d=r(96266);const p=e=>{let{dirty:t,value:r,maxLength:n,className:a,type:s="single",inForm:l}=e;const c=[],p=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c.push((0,d.jsx)(u,{includeDot:c.length>0,shouldBlink:t,children:e},c.length))};if(t){const e=l?"submit form":"apply";if("multiline"===s){const t=(0,o.Ge)()?"\u2318":"Ctrl";p("Press ".concat(t,"+Enter to ").concat(e))}else"single"===s&&p("Press Enter to ".concat(e))}return n&&("chat"!==s||t)&&p("".concat(r.length,"/").concat(n),t&&r.length>=n),(0,d.jsx)(i.X7,{"data-testid":"InputInstructions",className:a,children:c})}},44724:(e,t,r)=>{r.r(t),r.d(t,{default:()=>O});var n=r(5057),o=r(47206),i=r(7896),a=r(63947),s=n.forwardRef((function(e,t){return n.createElement(a.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))}));s.displayName="Send";var l=r(76866),c=r(73401),u=r(94778),d=r(17966),p=r(96216),f=r(82160),h=r(60913);const y=(0,f.Z)("div",{target:"e1d2x3se5"})((e=>{let{theme:t,width:r,position:n}=e;const o=(0,d.Iy)(t);return{borderRadius:t.radii.lg,display:"flex",...n===h.xg.Position.BOTTOM&&{backgroundColor:o?t.colors.gray20:t.colors.gray90},width:"".concat(r,"px")}}),""),g=(0,f.Z)("div",{target:"e1d2x3se4"})((e=>{let{theme:t}=e;return{backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.lg,display:"flex",alignItems:"center"}}),""),b=(0,f.Z)("button",{target:"e1d2x3se3"})((e=>{let{theme:t,disabled:r,extended:n}=e;const o=(0,d.Iy)(t),[i,a]=o?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:n?t.radii.none:t.radii.lg,borderTopLeftRadius:n?t.radii.lg:t.radii.none,borderBottomRightRadius:t.radii.lg,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:1,margin:0,padding:t.spacing.sm,color:r?i:a,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:o?t.colors.gray10:t.colors.gray90},"&:hover":{backgroundColor:t.colors.primary,color:t.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),""),m=(0,f.Z)("div",{target:"e1d2x3se2"})((e=>{let{theme:t}=e;return{position:"fixed",bottom:"0px",paddingBottom:"70px",paddingTop:t.spacing.lg,backgroundColor:t.colors.bgColor,zIndex:t.zIndices.chatInput,["@media (max-width: ".concat(t.breakpoints.md,")")]:{display:"flex",flexDirection:"column",alignItems:"center",left:0,width:"100vw"}}}),""),v=(0,f.Z)("div",{target:"e1d2x3se1"})((()=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:"0px",pointerEvents:"none"})),""),x=(0,f.Z)("div",{target:"e1d2x3se0"})({name:"1lm6gnd",styles:"position:absolute;bottom:0px;right:3rem"});var w=r(96266);const O=function(e){let{width:t,element:r,widgetMgr:i}=e;const a=(0,o.u)(),[f,h]=(0,n.useState)(!1),[O,j]=(0,n.useState)(r.default),[C,k]=(0,n.useState)(0),P=(0,n.useRef)(null),S=(0,n.useRef)({minHeight:0,maxHeight:0}),I=()=>{O&&(i.setStringTriggerValue(r,O,{fromUi:!0}),h(!1),j(""),k(0))};(0,n.useEffect)((()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";j(e),h(""!==e)}}),[r]),(0,n.useEffect)((()=>{if(P.current){const{offsetHeight:e}=P.current;S.current.minHeight=e,S.current.maxHeight=6.5*e}}),[P]);const{disabled:R,placeholder:T,maxChars:E,position:z}=r,B=(0,d.Iy)(a),{minHeight:F,maxHeight:D}=S.current,Z=B?a.colors.gray70:a.colors.gray80,N=!!(C>0&&P.current)&&Math.abs(C-F)>1;return(0,w.jsx)(m,{className:"stChatFloatingInputContainer",children:(0,w.jsx)(y,{className:"stChatInputContainer",width:t,position:z,children:(0,w.jsxs)(g,{children:[(0,w.jsx)(l.Z,{inputRef:P,value:O,placeholder:T,onChange:e=>{const{value:t}=e.target,{maxChars:n}=r;0!==n&&t.length>n||(h(""!==t),j(t),k((()=>{let e=0;const{current:t}=P;if(t){const r=t.placeholder;t.placeholder="",t.style.height="auto",e=t.scrollHeight,t.placeholder=r,t.style.height=""}return e})()))},onKeyDown:e=>{const{metaKey:t,ctrlKey:r,shiftKey:n}=e;(e=>{var t;const{keyCode:r,key:n}=e;return("Enter"===n||13===r||10===r)&&!(!0===(null===(t=e.nativeEvent)||void 0===t?void 0:t.isComposing))})(e)&&!n&&!r&&!t&&(e.preventDefault(),I())},"aria-label":T,disabled:R,rows:1,overrides:{Root:{style:{outline:"none",backgroundColor:a.colors.transparent,borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px",width:"".concat(t,"px")}},InputContainer:{style:{backgroundColor:a.colors.transparent}},Input:{props:{"data-testid":"stChatInput"},style:{lineHeight:"1.4",backgroundColor:a.colors.transparent,"::placeholder":{color:Z},height:N?"".concat(C+1,"px"):"auto",maxHeight:D?"".concat(D,"px"):"none",paddingRight:"3rem",paddingLeft:a.spacing.sm,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}}}}),t>p.A.hideWidgetDetails&&(0,w.jsx)(x,{children:(0,w.jsx)(u.Z,{dirty:f,value:O,maxLength:E,type:"chat",inForm:!1})}),(0,w.jsx)(v,{children:(0,w.jsx)(b,{onClick:I,disabled:!f||R,extended:N,children:(0,w.jsx)(c.Z,{content:s,size:"xl",color:"inherit"})})})]})})})}},76866:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(5057),o=r(80099),i=r(97135),a=r(18150),s=r(53381),l=r(4547);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=(0,s.zo)("div",(function(e){return u(u({},(0,l.d5)(u(u({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})}));p.displayName="StyledTextAreaRoot",p.displayName="StyledTextAreaRoot";var f=(0,s.zo)("div",(function(e){return(0,l.hB)(u({$positive:!1},e))}));f.displayName="StyledTextareaContainer",f.displayName="StyledTextareaContainer";var h=(0,s.zo)("textarea",(function(e){return u(u({},(0,l.Hx)(e)),{},{resize:e.$resize||"none"})}));function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function w(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=j(e);if(t){var o=j(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}(this,r)}}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}h.displayName="StyledTextarea",h.displayName="StyledTextarea";var k=function(e){!function(e,t){if("function"!==typeof t&&null!==t)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&&x(e,t)}(c,e);var t,r,s,l=w(c);function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(O(e=l.call.apply(l,[this].concat(r))),"state",{isFocused:e.props.autoFocus||!1}),C(O(e),"onFocus",(function(t){e.setState({isFocused:!0}),e.props.onFocus(t)})),C(O(e),"onBlur",(function(t){e.setState({isFocused:!1}),e.props.onBlur(t)})),e}return t=c,(r=[{key:"render",value:function(){var e=this.props.overrides,t=void 0===e?{}:e,r=b((0,o.jb)(t.Root,p),2),s=r[0],l=r[1],c=(0,o.aO)({Input:{component:h},InputContainer:{component:f}},t);return n.createElement(s,g({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},l),n.createElement(i.Z,g({},this.props,{type:a.iB.textarea,overrides:c,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}])&&v(t.prototype,r),s&&v(t,s),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);C(k,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:a.NO.default});const P=k}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[4785],{94785:(t,e,s)=>{s.r(e),s.d(e,{default:()=>l});var i=s(5057),u=s(19954),r=s(96266);function l(t){let{element:e,width:s,endpoints:l}=t;const n=(0,i.useRef)(null);(0,i.useEffect)((()=>{n.current&&(n.current.currentTime=e.startTime)}),[e.startTime]);const a=(0,u.O0)(e.url),c=l.buildMediaURL(a);return(0,r.jsx)("audio",{id:"audio",ref:n,controls:!0,src:c,className:"stAudio",style:{width:s}})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[4831],{94778:(e,t,i)=>{i.d(t,{Z:()=>u});i(5057);var s,r=i(50120),o=i(93905),n=i(82160);const a=(0,i(21371).F4)(s||(l=["\n 50% {\n color: rgba(0, 0, 0, 0);\n }\n"],d||(d=l.slice(0)),s=Object.freeze(Object.defineProperties(l,{raw:{value:Object.freeze(d)}}))));var l,d;const c=(0,n.Z)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:i,theme:s}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:s.colors.gray,margin:"0 5px"}}:{},...i?{color:s.colors.red,animationName:"".concat(a),animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var h=i(96266);const u=e=>{let{dirty:t,value:i,maxLength:s,className:n,type:a="single",inForm:l}=e;const d=[],u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d.push((0,h.jsx)(c,{includeDot:d.length>0,shouldBlink:t,children:e},d.length))};if(t){const e=l?"submit form":"apply";if("multiline"===a){const t=(0,r.Ge)()?"\u2318":"Ctrl";u("Press ".concat(t,"+Enter to ").concat(e))}else"single"===a&&u("Press Enter to ".concat(e))}return s&&("chat"!==a||t)&&u("".concat(i.length,"/").concat(s),t&&i.length>=s),(0,h.jsx)(o.X7,{"data-testid":"InputInstructions",className:n,children:d})}},52955:(e,t,i)=>{i.d(t,{K:()=>r});var s=i(50120);class r{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,i){null!=this.formClearListener&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,s.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,i),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}},44831:(e,t,i)=>{i.r(t),i.d(t,{default:()=>D});var s=i(5057),r=i(52707),o=i(84332),n=i(47206),a=i(59500),l=i(52955),d=i(70714),c=i(60913),h=i(96216),u=i(21034),m=i(98790),p=i(73401),g=i(30124),f=i(94778),b=i(38944),v=i(93905),y=i(50120),x=i(82160);const V=(0,x.Z)("div",{target:"e116k4er3"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",borderWidth:"1px",borderStyle:"solid",borderColor:t.colors.widgetBorderColor||t.colors.widgetBackgroundColor||t.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.lg,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}}}),""),w=(0,x.Z)("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),C=(0,x.Z)("button",{target:"e116k4er1"})((e=>{let{theme:t}=e;return{margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:"".concat(32,"px"),justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.widgetBackgroundColor||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.lg,borderBottomRightRadius:t.radii.lg},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}}}),""),I=(0,x.Z)("div",{target:"e116k4er0"})((e=>{let{theme:t,clearable:i}=e;return{position:"absolute",marginRight:t.spacing.twoXS,left:0,right:"".concat(64+(i?12:0),"px")}}),"");var k=i(96266);class F extends s.PureComponent{constructor(e){super(e),this.formClearHelper=new l.K,this.inputRef=s.createRef(),this.formatValue=e=>{if((0,y.le)(e))return null;const t=function(e){return null==e||""===e?void 0:e}(this.props.element.format);if(null==t)return e.toString();try{return(0,a.sprintf)(t,e)}catch(i){return(0,d.KE)("Error in sprintf(".concat(t,", ").concat(e,"): ").concat(i)),String(e)}},this.isIntData=()=>this.props.element.dataType===c.Y2.DataType.INT,this.getMin=()=>this.props.element.hasMin?this.props.element.min:-1/0,this.getMax=()=>this.props.element.hasMax?this.props.element.max:1/0,this.getStep=()=>{const{step:e}=this.props.element;return e||(this.isIntData()?1:.01)},this.commitWidgetValue=e=>{const{value:t}=this.state,{element:i,widgetMgr:s}=this.props,r=this.props.element,o=this.getMin(),n=this.getMax();if((0,y.bb)(t)&&(o>t||t>n)){const e=this.inputRef.current;e&&e.reportValidity()}else{var a;const o=null!==(a=null!==t&&void 0!==t?t:r.default)&&void 0!==a?a:null;this.isIntData()?s.setIntValue(i,o,e):s.setDoubleValue(i,o,e),this.setState({dirty:!1,value:o,formattedValue:this.formatValue(o)})}},this.onFormCleared=()=>{this.setState(((e,t)=>{var i;return{value:null!==(i=t.element.default)&&void 0!==i?i:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0}),this.setState({isFocused:!1})},this.onFocus=()=>{this.setState({isFocused:!0})},this.onChange=e=>{const{value:t}=e.target;if(""===t)this.setState({dirty:!0,value:null,formattedValue:null});else{let e;e=this.isIntData()?parseInt(t,10):parseFloat(t),this.setState({dirty:!0,value:e,formattedValue:t})}},this.onKeyDown=e=>{const{key:t}=e;switch(t){case"ArrowUp":e.preventDefault(),this.modifyValueUsingStep("increment")();break;case"ArrowDown":e.preventDefault(),this.modifyValueUsingStep("decrement")()}},this.onKeyPress=e=>{"Enter"===e.key&&(this.state.dirty&&this.commitWidgetValue({fromUi:!0}),(0,y.$b)(this.props.element)&&this.props.widgetMgr.submitForm(this.props.element.formId))},this.modifyValueUsingStep=e=>()=>{const{value:t}=this.state,i=this.getStep();switch(e){case"increment":this.canIncrement&&this.setState({dirty:!0,value:(null!==t&&void 0!==t?t:this.getMin())+i},(()=>{this.commitWidgetValue({fromUi:!0})}));break;case"decrement":this.canDecrement&&this.setState({dirty:!0,value:(null!==t&&void 0!==t?t:this.getMax())-i},(()=>{this.commitWidgetValue({fromUi:!0})}))}},this.state={dirty:!1,value:this.initialValue,formattedValue:this.formatValue(this.initialValue),isFocused:!1}}get initialValue(){var e;const t=this.isIntData()?this.props.widgetMgr.getIntValue(this.props.element):this.props.widgetMgr.getDoubleValue(this.props.element);return null!==(e=null!==t&&void 0!==t?t:this.props.element.default)&&void 0!==e?e:null}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:null!==e&&void 0!==e?e:null,formattedValue:this.formatValue(null!==e&&void 0!==e?e:null)},(()=>{this.commitWidgetValue({fromUi:!1})}))}get canDecrement(){return!(0,y.le)(this.state.value)&&this.state.value-this.getStep()>=this.getMin()}get canIncrement(){return!(0,y.le)(this.state.value)&&this.state.value+this.getStep()<=this.getMax()}render(){var e;const{element:t,width:i,disabled:s,widgetMgr:n,theme:a}=this.props,{formattedValue:l,dirty:d,isFocused:c}=this.state,x={width:i},F=!this.canDecrement||s,D=!this.canIncrement||s,M=(0,y.le)(t.default)&&!s;return this.formClearHelper.manageFormClearListener(n,t.formId,this.onFormCleared),(0,k.jsxs)("div",{className:"stNumberInput",style:x,"data-testid":"stNumberInput",children:[(0,k.jsx)(b.O,{label:t.label,disabled:s,labelVisibility:(0,y.iF)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),children:t.help&&(0,k.jsx)(v.dT,{children:(0,k.jsx)(u.Z,{content:t.help,placement:m.u.TOP_RIGHT})})}),(0,k.jsxs)(V,{className:c?"focused":"",children:[(0,k.jsx)(g.Z,{type:"number",inputRef:this.inputRef,value:null!==l&&void 0!==l?l:"",placeholder:t.placeholder,onBlur:this.onBlur,onFocus:this.onFocus,onChange:this.onChange,onKeyPress:this.onKeyPress,onKeyDown:this.onKeyDown,clearable:M,clearOnEscape:M,disabled:s,"aria-label":t.label,overrides:{ClearIcon:{props:{overrides:{Svg:{style:{color:a.colors.darkGray,transform:"scale(1.4)",width:a.spacing.twoXL,marginRight:"-1.25em",":hover":{fill:a.colors.bodyText}}}}}},Input:{props:{step:this.getStep(),min:this.getMin(),max:this.getMax()},style:{lineHeight:"1.4",paddingRight:".5rem",paddingLeft:".5rem",paddingBottom:".5rem",paddingTop:".5rem"}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0})}}}),i>h.A.hideWidgetDetails&&(0,k.jsxs)(w,{children:[(0,k.jsx)(C,{className:"step-down",onClick:this.modifyValueUsingStep("decrement"),disabled:F,tabIndex:-1,children:(0,k.jsx)(p.Z,{content:r.W,size:"xs",color:this.canDecrement?"inherit":"disabled"})}),(0,k.jsx)(C,{className:"step-up",onClick:this.modifyValueUsingStep("increment"),disabled:D,tabIndex:-1,children:(0,k.jsx)(p.Z,{content:o.v,size:"xs",color:this.canIncrement?"inherit":"disabled"})})]})]}),i>h.A.hideWidgetDetails&&(0,k.jsx)(I,{clearable:M,children:(0,k.jsx)(f.Z,{dirty:d,value:null!==l&&void 0!==l?l:"",className:"input-instructions",inForm:(0,y.$b)({formId:t.formId})})})]})}}const D=(0,n.b)(F)}}]);
|