@stlite/desktop 0.80.0 → 0.80.2
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/build/assets/{FileDownload.esm-CGGZqf24.js → FileDownload.esm-Cz2LbMhY.js} +1 -1
- package/build/assets/{FormClearHelper-CgY1PHFo.js → FormClearHelper-EZKsnYaC.js} +1 -1
- package/build/assets/{Hooks-DSz3TreG.js → Hooks-DqtQqOH-.js} +1 -1
- package/build/assets/{InputInstructions-Da_XbwOd.js → InputInstructions-DjR1o_IC.js} +1 -1
- package/build/assets/{ProgressBar-Dtx4om_-.js → ProgressBar-BaA1RCol.js} +1 -1
- package/build/assets/{RenderInPortalIfExists-CGcG4XZP.js → RenderInPortalIfExists-BahSgp7T.js} +1 -1
- package/build/assets/{Toolbar-FcJw8P3i.js → Toolbar-BeKg-rY_.js} +1 -1
- package/build/assets/{base-input-CmONXDO4.js → base-input-7pZdCg4C.js} +1 -1
- package/build/assets/createSuper-Bqo77rD3.js +1 -0
- package/build/assets/{data-grid-overlay-editor-QBvhT7Gv.js → data-grid-overlay-editor-6ASg9CnD.js} +1 -1
- package/build/assets/{downloader-CMM-05VD.js → downloader-D4L4FTII.js} +1 -1
- package/build/assets/{es6-DhhL9D4J.js → es6-GdMCiz1N.js} +2 -2
- package/build/assets/getPrototypeOf-Dklemi9S.js +1 -0
- package/build/assets/{iframeResizer.contentWindow-YHmj42JB.js → iframeResizer.contentWindow-CRAvgT5G.js} +1 -1
- package/build/assets/{index-DdyJvCFp.js → index-5yVA-bl8.js} +1 -1
- package/build/assets/{index-D26NtueC.js → index-8ikjqTDj.js} +1 -1
- package/build/assets/{index-D4RoBA_O.js → index-B-uPh0v-.js} +1 -1
- package/build/assets/{index-hYugbL4y.js → index-B6GOeWBY.js} +1 -1
- package/build/assets/{index-Bdf8V5aG.js → index-BOejvDqO.js} +1 -1
- package/build/assets/{index-CclTmpN7.js → index-BSA4PqEL.js} +1 -1
- package/build/assets/{index-BjWJFoG-.js → index-BcbEpO1A.js} +1 -1
- package/build/assets/{index-CVlJl5rr.js → index-BdwwnBBF.js} +1 -1
- package/build/assets/{index-DYYkHfIj.js → index-BldW1rGN.js} +1 -1
- package/build/assets/{index-tPM7YhKy.js → index-BrwVL_Zl.js} +1 -1
- package/build/assets/{index-B_Id9-1s.js → index-BuJCpP7X.js} +1 -1
- package/build/assets/{index-BwjoUCNo.js → index-Bx_n8HNg.js} +34 -34
- package/build/assets/{index-Cx5RDj1j.js → index-BxmhUlpg.js} +1 -1
- package/build/assets/{index-zxdZLnOx.js → index-CEDVfch7.js} +1 -1
- package/build/assets/{index-DDdbfcty.js → index-CK59iqlY.js} +1 -1
- package/build/assets/{index-CU_ErDon.js → index-CLUlOndI.js} +1 -1
- package/build/assets/{index-xwpN0M9S.js → index-CbCdgvRj.js} +1 -1
- package/build/assets/{index-DJR_P__y.js → index-CnK5OFBo.js} +1 -1
- package/build/assets/{index-CVDdljau.js → index-Cr6ZktV0.js} +1 -1
- package/build/assets/{index-Z97zCVlB.js → index-CuBoBzf5.js} +1 -1
- package/build/assets/{index-DWYLSf3l.js → index-DAhsgsYC.js} +1 -1
- package/build/assets/{index-BVUe3D3r.js → index-DS7pLXMF.js} +5 -5
- package/build/assets/{index-B4n5HlkF.js → index-D_5yFUtX.js} +1 -1
- package/build/assets/{index-vzzDJjGk.js → index-D_MPEPA-.js} +1 -1
- package/build/assets/{index-B525bGzJ.js → index-DdYwgLCs.js} +1 -1
- package/build/assets/{index-C2H2QMCy.js → index-DdoeZmBn.js} +1 -1
- package/build/assets/{index-RsmuLiMj.js → index-Djk6g3D7.js} +1 -1
- package/build/assets/{index-8APIqgoz.js → index-DlZHr_LT.js} +1 -1
- package/build/assets/{index-CF-qa2K-.js → index-DrSKeLtv.js} +1 -1
- package/build/assets/{index-B-eWDw1Y.js → index-LrDlyKHF.js} +1 -1
- package/build/assets/{index-owAG4lAc.js → index-TDAWCZaF.js} +1 -1
- package/build/assets/{index-Ez6wOCxn.js → index-dy4Fq-_I.js} +1 -1
- package/build/assets/{index-C4T9lB1B.js → index-gQih6j7P.js} +1 -1
- package/build/assets/{index-DVwGEZVS.js → index-lK_Z41d7.js} +1 -1
- package/build/assets/{index-B234xKIE.js → index-ririmK9i.js} +1 -1
- package/build/assets/{index-BZSCrRo-.js → index-se3PiCWO.js} +1 -1
- package/build/assets/{index-D_v8mdkx.js → index-yNPtrbxs.js} +1 -1
- package/build/assets/{input-uWrlyNdh.js → input-D70-L3j9.js} +1 -1
- package/build/assets/{memory-C3YA36Ob.js → memory-CcbiQyNI.js} +1 -1
- package/build/assets/{number-overlay-editor-cdMzdt98.js → number-overlay-editor-DwRDmB7O.js} +1 -1
- package/build/assets/{sandbox-nkebs-Xk.js → sandbox-DNuj5tuK.js} +1 -1
- package/build/assets/{slicedToArray-bge8IXL1.js → slicedToArray-DvZOPupn.js} +1 -1
- package/build/assets/{textarea-BRC6-IPU.js → textarea-CwCvq-TS.js} +1 -1
- package/build/assets/{timepicker-clKKYW7X.js → timepicker-D2Q8PdLE.js} +2 -2
- package/build/assets/{uniqueId-CyfnMhlx.js → uniqueId-CZt8iarg.js} +1 -1
- package/build/assets/{useBasicWidgetState-DYDJWF1h.js → useBasicWidgetState-T4r0nY5O.js} +1 -1
- package/build/assets/{useOnInputChange-Bri4Ggii.js → useOnInputChange-Cs15AJnE.js} +1 -1
- package/build/assets/{withFullScreenWrapper-CkF8UtaI.js → withFullScreenWrapper-i_wAtCLZ.js} +1 -1
- package/build/assets/{worker-DYZLk67q.js → worker-DWdDGetD.js} +6 -6
- package/build/electron/worker.js +6 -6
- package/build/index.html +1 -1
- package/package.json +4 -5
- package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
- package/build/assets/createSuper-DFd_7HWg.js +0 -1
- package/build/assets/getPrototypeOf-BuqC2LfE.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as s,bj as n,a$ as b}from"./index-
|
|
1
|
+
import{r as o,j as s,bj as n,a$ as b}from"./index-Bx_n8HNg.js";import{a as f}from"./useBasicWidgetState-T4r0nY5O.js";import"./FormClearHelper-EZKsnYaC.js";const p=(e,t)=>e.getStringValue(t),S=e=>e.default??null,h=e=>e.value??null,v=(e,t,a,l)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},l)},c=({element:e,disabled:t,widgetMgr:a,width:l,fragmentId:g})=>{var i;const[m,r]=f({getStateFromWidgetMgr:p,getDefaultStateFromProto:S,getCurrStateFromProto:h,updateWidgetMgrState:v,element:e,widgetMgr:a,fragmentId:g}),u=o.useCallback(d=>{r({value:d,fromUi:!0})},[r]);return s.jsx(n,{label:e.label,labelVisibility:b((i=e.labelVisibility)==null?void 0:i.value),help:e.help,onChange:u,disabled:t,width:l,value:m})},w=o.memo(c);export{w as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as m,bk as Kt,bl as Xt,bm as Qt,bn as Zt,b as zr,g as Ur,b2 as x,be as ue,bf as ce,bo as qr,bd as Gt,b3 as E,a0 as Jt,bp as Kr,bq as er,br as tr,bs as Xr,b4 as pe,bt as Qr,bu as Zr,bv as Gr,a4 as Jr,a3 as rr,M as en,a6 as tn,G as Ne,B as rn,j as de,a_ as nn,a$ as on,bc as an,b0 as ln,aK as sn}from"./index-
|
|
1
|
+
import{r as m,bk as Kt,bl as Xt,bm as Qt,bn as Zt,b as zr,g as Ur,b2 as x,be as ue,bf as ce,bo as qr,bd as Gt,b3 as E,a0 as Jt,bp as Kr,bq as er,br as tr,bs as Xr,b4 as pe,bt as Qr,bu as Zr,bv as Gr,a4 as Jr,a3 as rr,M as en,a6 as tn,G as Ne,B as rn,j as de,a_ as nn,a$ as on,bc as an,b0 as ln,aK as sn}from"./index-Bx_n8HNg.js";import{a as un}from"./useBasicWidgetState-T4r0nY5O.js";import{D as oe,a as ae,T as cn,l as Ve}from"./timepicker-D2Q8PdLE.js";import{I as pn}from"./input-D70-L3j9.js";import{I as dn}from"./base-input-7pZdCg4C.js";import"./FormClearHelper-EZKsnYaC.js";import"./getPrototypeOf-Dklemi9S.js";import"./createSuper-Bqo77rD3.js";var fn=["title","size","color","overrides"];function Ye(){return Ye=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},Ye.apply(this,arguments)}function hn(t,r){if(t==null)return{};var o=yn(t,r),n,e;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(e=0;e<a.length;e++)n=a[e],!(r.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function yn(t,r){if(t==null)return{};var o={},n=Object.keys(t),e,a;for(a=0;a<n.length;a++)e=n[a],!(r.indexOf(e)>=0)&&(o[e]=t[e]);return o}function gn(t,r){return Dn(t)||vn(t,r)||bn(t,r)||mn()}function mn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bn(t,r){if(t){if(typeof t=="string")return nr(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return nr(t,r)}}function nr(t,r){(r==null||r>t.length)&&(r=t.length);for(var o=0,n=new Array(r);o<r;o++)n[o]=t[o];return n}function vn(t,r){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var n=[],e=!0,a=!1,i,l;try{for(o=o.call(t);!(e=(i=o.next()).done)&&(n.push(i.value),!(r&&n.length===r));e=!0);}catch(u){a=!0,l=u}finally{try{!e&&o.return!=null&&o.return()}finally{if(a)throw l}}return n}}function Dn(t){if(Array.isArray(t))return t}function Sn(t,r){var o=Kt(),n=gn(o,2),e=n[1],a=t.title,i=a===void 0?"Left":a,l=t.size,u=t.color,s=t.overrides,y=s===void 0?{}:s,p=hn(t,fn),d=Xt({component:e.icons&&e.icons.ChevronLeft?e.icons.ChevronLeft:null},y&&y.Svg?Qt(y.Svg):{});return m.createElement(Zt,Ye({viewBox:"0 0 24 24",ref:r,title:i,size:l,color:u,overrides:{Svg:d}},p),m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"}))}const or=m.forwardRef(Sn);var On=["title","size","color","overrides"];function We(){return We=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},We.apply(this,arguments)}function wn(t,r){if(t==null)return{};var o=kn(t,r),n,e;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(e=0;e<a.length;e++)n=a[e],!(r.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function kn(t,r){if(t==null)return{};var o={},n=Object.keys(t),e,a;for(a=0;a<n.length;a++)e=n[a],!(r.indexOf(e)>=0)&&(o[e]=t[e]);return o}function Cn(t,r){return Pn(t)||Hn(t,r)||jn(t,r)||Mn()}function Mn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jn(t,r){if(t){if(typeof t=="string")return ar(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return ar(t,r)}}function ar(t,r){(r==null||r>t.length)&&(r=t.length);for(var o=0,n=new Array(r);o<r;o++)n[o]=t[o];return n}function Hn(t,r){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var n=[],e=!0,a=!1,i,l;try{for(o=o.call(t);!(e=(i=o.next()).done)&&(n.push(i.value),!(r&&n.length===r));e=!0);}catch(u){a=!0,l=u}finally{try{!e&&o.return!=null&&o.return()}finally{if(a)throw l}}return n}}function Pn(t){if(Array.isArray(t))return t}function En(t,r){var o=Kt(),n=Cn(o,2),e=n[1],a=t.title,i=a===void 0?"Right":a,l=t.size,u=t.color,s=t.overrides,y=s===void 0?{}:s,p=wn(t,On),d=Xt({component:e.icons&&e.icons.ChevronRight?e.icons.ChevronRight:null},y&&y.Svg?Qt(y.Svg):{});return m.createElement(Zt,We({viewBox:"0 0 24 24",ref:r,title:i,size:l,color:u,overrides:{Svg:d}},p),m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29289 7.29289C8.90237 7.68342 8.90237 8.31658 9.29289 8.70711L12.5858 12L9.29289 15.2929C8.90237 15.6834 8.90237 16.3166 9.29289 16.7071C9.68342 17.0976 10.3166 17.0976 10.7071 16.7071L14.7071 12.7071C14.8946 12.5196 15 12.2652 15 12C15 11.7348 14.8946 11.4804 14.7071 11.2929L10.7071 7.29289C10.3166 6.90237 9.68342 6.90237 9.29289 7.29289Z"}))}const ir=m.forwardRef(En);var lr={exports:{}};function An(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var _e=An(m),In=zr;function xn(t,r){for(var o=Object.getOwnPropertyNames(r),n=0;n<o.length;n++){var e=o[n],a=Object.getOwnPropertyDescriptor(r,e);a&&a.configurable&&t[e]===void 0&&Object.defineProperty(t,e,a)}return t}function ze(){return(ze=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t}).apply(this,arguments)}function Rn(t,r){t.prototype=Object.create(r.prototype),xn(t.prototype.constructor=t,r)}function Ln(t,r){if(t==null)return{};var o,n,e={},a=Object.keys(t);for(n=0;n<a.length;n++)o=a[n],0<=r.indexOf(o)||(e[o]=t[o]);return e}function ie(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var $n=function(t,r,o,n,e,a,i,l){if(!t){var u;if(r===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[o,n,e,a,i,l],y=0;(u=new Error(r.replace(/%s/g,function(){return s[y++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},sr=$n;function ur(t,r,o){if("selectionStart"in t&&"selectionEnd"in t)t.selectionStart=r,t.selectionEnd=o;else{var n=t.createTextRange();n.collapse(!0),n.moveStart("character",r),n.moveEnd("character",o-r),n.select()}}function Bn(t){var r=0,o=0;if("selectionStart"in t&&"selectionEnd"in t)r=t.selectionStart,o=t.selectionEnd;else{var n=document.selection.createRange();n.parentElement()===t&&(r=-n.moveStart("character",-t.value.length),o=-n.moveEnd("character",-t.value.length))}return{start:r,end:o,length:o-r}}var Tn={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},Fn="_";function cr(t,r,o){var n="",e="",a=null,i=[];if(r===void 0&&(r=Fn),o==null&&(o=Tn),!t||typeof t!="string")return{maskChar:r,formatChars:o,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var l=!1;return t.split("").forEach(function(u){l=!l&&u==="\\"||(l||!o[u]?(i.push(n.length),n.length===i.length-1&&(e+=u)):a=n.length+1,n+=u,!1)}),{maskChar:r,formatChars:o,prefix:e,mask:n,lastEditablePosition:a,permanents:i}}function K(t,r){return t.permanents.indexOf(r)!==-1}function Oe(t,r,o){var n=t.mask,e=t.formatChars;if(!o)return!1;if(K(t,r))return n[r]===o;var a=e[n[r]];return new RegExp(a).test(o)}function pr(t,r){return r.split("").every(function(o,n){return K(t,n)||!Oe(t,n,o)})}function fe(t,r){var o=t.maskChar,n=t.prefix;if(!o){for(;r.length>n.length&&K(t,r.length-1);)r=r.slice(0,r.length-1);return r.length}for(var e=n.length,a=r.length;a>=n.length;a--){var i=r[a];if(!K(t,a)&&Oe(t,a,i)){e=a+1;break}}return e}function dr(t,r){return fe(t,r)===t.mask.length}function te(t,r){var o=t.maskChar,n=t.mask,e=t.prefix;if(!o){for((r=Ue(t,"",r,0)).length<e.length&&(r=e);r.length<n.length&&K(t,r.length);)r+=n[r.length];return r}if(r)return Ue(t,te(t,""),r,0);for(var a=0;a<n.length;a++)K(t,a)?r+=n[a]:r+=o;return r}function Nn(t,r,o,n){var e=o+n,a=t.maskChar,i=t.mask,l=t.prefix,u=r.split("");if(a)return u.map(function(y,p){return p<o||e<=p?y:K(t,p)?i[p]:a}).join("");for(var s=e;s<u.length;s++)K(t,s)&&(u[s]="");return o=Math.max(l.length,o),u.splice(o,e-o),r=u.join(""),te(t,r)}function Ue(t,r,o,n){var e=t.mask,a=t.maskChar,i=t.prefix,l=o.split(""),u=dr(t,r);return!a&&n>r.length&&(r+=e.slice(r.length,n)),l.every(function(s){for(;f=s,K(t,d=n)&&f!==e[d];){if(n>=r.length&&(r+=e[n]),y=s,p=n,a&&K(t,p)&&y===a)return!0;if(++n>=e.length)return!1}var y,p,d,f;return!Oe(t,n,s)&&s!==a||(n<r.length?r=a||u||n<i.length?r.slice(0,n)+s+r.slice(n+1):(r=r.slice(0,n)+s+r.slice(n),te(t,r)):a||(r+=s),++n<e.length)}),r}function Vn(t,r,o,n){var e=t.mask,a=t.maskChar,i=o.split(""),l=n;return i.every(function(u){for(;y=u,K(t,s=n)&&y!==e[s];)if(++n>=e.length)return!1;var s,y;return(Oe(t,n,u)||u===a)&&n++,n<e.length}),n-l}function Yn(t,r){for(var o=r;0<=o;--o)if(!K(t,o))return o;return null}function he(t,r){for(var o=t.mask,n=r;n<o.length;++n)if(!K(t,n))return n;return null}function qe(t){return t||t===0?t+"":""}function Wn(t,r,o,n,e){var a=t.mask,i=t.prefix,l=t.lastEditablePosition,u=r,s="",y=0,p=0,d=Math.min(e.start,o.start);return o.end>e.start?p=(y=Vn(t,n,s=u.slice(e.start,o.end),d))?e.length:0:u.length<n.length&&(p=n.length-u.length),u=n,p&&(p===1&&!e.length&&(d=e.start===o.start?he(t,o.start):Yn(t,o.start)),u=Nn(t,u,d,p)),u=Ue(t,u,s,d),(d+=y)>=a.length?d=a.length:d<i.length&&!y?d=i.length:d>=i.length&&d<l&&y&&(d=he(t,d)),s||(s=null),{value:u=te(t,u),enteredString:s,selection:{start:d,end:d}}}function _n(){var t=new RegExp("windows","i"),r=new RegExp("phone","i"),o=navigator.userAgent;return t.test(o)&&r.test(o)}function q(t){return typeof t=="function"}function zn(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame}function fr(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function hr(t){return(fr()?zn():function(){return setTimeout(t,1e3/60)})(t)}function Ke(t){(fr()||clearTimeout)(t)}var Un=function(t){function r(n){var e=t.call(this,n)||this;e.focused=!1,e.mounted=!1,e.previousSelection=null,e.selectionDeferId=null,e.saveSelectionLoopDeferId=null,e.saveSelectionLoop=function(){e.previousSelection=e.getSelection(),e.saveSelectionLoopDeferId=hr(e.saveSelectionLoop)},e.runSaveSelectionLoop=function(){e.saveSelectionLoopDeferId===null&&e.saveSelectionLoop()},e.stopSaveSelectionLoop=function(){e.saveSelectionLoopDeferId!==null&&(Ke(e.saveSelectionLoopDeferId),e.saveSelectionLoopDeferId=null,e.previousSelection=null)},e.getInputDOMNode=function(){if(!e.mounted)return null;var c=In.findDOMNode(ie(ie(e))),h=typeof window<"u"&&c instanceof window.Element;if(c&&!h)return null;if(c.nodeName!=="INPUT"&&(c=c.querySelector("input")),!c)throw new Error("react-input-mask: inputComponent doesn't contain input node");return c},e.getInputValue=function(){var c=e.getInputDOMNode();return c?c.value:null},e.setInputValue=function(c){var h=e.getInputDOMNode();h&&(e.value=c,h.value=c)},e.setCursorToEnd=function(){var c=fe(e.maskOptions,e.value),h=he(e.maskOptions,c);h!==null&&e.setCursorPosition(h)},e.setSelection=function(c,h,g){g===void 0&&(g={});var b=e.getInputDOMNode(),v=e.isFocused();b&&v&&(g.deferred||ur(b,c,h),e.selectionDeferId!==null&&Ke(e.selectionDeferId),e.selectionDeferId=hr(function(){e.selectionDeferId=null,ur(b,c,h)}),e.previousSelection={start:c,end:h,length:Math.abs(h-c)})},e.getSelection=function(){return Bn(e.getInputDOMNode())},e.getCursorPosition=function(){return e.getSelection().start},e.setCursorPosition=function(c){e.setSelection(c,c)},e.isFocused=function(){return e.focused},e.getBeforeMaskedValueChangeConfig=function(){var c=e.maskOptions,h=c.mask,g=c.maskChar,b=c.permanents,v=c.formatChars;return{mask:h,maskChar:g,permanents:b,alwaysShowMask:!!e.props.alwaysShowMask,formatChars:v}},e.isInputAutofilled=function(c,h,g,b){var v=e.getInputDOMNode();try{if(v.matches(":-webkit-autofill"))return!0}catch{}return!e.focused||b.end<g.length&&h.end===c.length},e.onChange=function(c){var h=ie(ie(e)).beforePasteState,g=ie(ie(e)).previousSelection,b=e.props.beforeMaskedValueChange,v=e.getInputValue(),D=e.value,S=e.getSelection();e.isInputAutofilled(v,S,D,g)&&(D=te(e.maskOptions,""),g={start:0,end:0,length:0}),h&&(g=h.selection,D=h.value,S={start:g.start+v.length,end:g.start+v.length,length:0},v=D.slice(0,g.start)+v+D.slice(g.end),e.beforePasteState=null);var P=Wn(e.maskOptions,v,S,D,g),j=P.enteredString,k=P.selection,H=P.value;if(q(b)){var O=b({value:H,selection:k},{value:D,selection:g},j,e.getBeforeMaskedValueChangeConfig());H=O.value,k=O.selection}e.setInputValue(H),q(e.props.onChange)&&e.props.onChange(c),e.isWindowsPhoneBrowser?e.setSelection(k.start,k.end,{deferred:!0}):e.setSelection(k.start,k.end)},e.onFocus=function(c){var h=e.props.beforeMaskedValueChange,g=e.maskOptions,b=g.mask,v=g.prefix;if(e.focused=!0,e.mounted=!0,b){if(e.value)fe(e.maskOptions,e.value)<e.maskOptions.mask.length&&e.setCursorToEnd();else{var D=te(e.maskOptions,v),S=te(e.maskOptions,D),P=fe(e.maskOptions,S),j=he(e.maskOptions,P),k={start:j,end:j};if(q(h)){var H=h({value:S,selection:k},{value:e.value,selection:null},null,e.getBeforeMaskedValueChangeConfig());S=H.value,k=H.selection}var O=S!==e.getInputValue();O&&e.setInputValue(S),O&&q(e.props.onChange)&&e.props.onChange(c),e.setSelection(k.start,k.end)}e.runSaveSelectionLoop()}q(e.props.onFocus)&&e.props.onFocus(c)},e.onBlur=function(c){var h=e.props.beforeMaskedValueChange,g=e.maskOptions.mask;if(e.stopSaveSelectionLoop(),e.focused=!1,g&&!e.props.alwaysShowMask&&pr(e.maskOptions,e.value)){var b="";q(h)&&(b=h({value:b,selection:null},{value:e.value,selection:e.previousSelection},null,e.getBeforeMaskedValueChangeConfig()).value);var v=b!==e.getInputValue();v&&e.setInputValue(b),v&&q(e.props.onChange)&&e.props.onChange(c)}q(e.props.onBlur)&&e.props.onBlur(c)},e.onMouseDown=function(c){if(!e.focused&&document.addEventListener){e.mouseDownX=c.clientX,e.mouseDownY=c.clientY,e.mouseDownTime=new Date().getTime();var h=function g(b){if(document.removeEventListener("mouseup",g),e.focused){var v=Math.abs(b.clientX-e.mouseDownX),D=Math.abs(b.clientY-e.mouseDownY),S=Math.max(v,D),P=new Date().getTime()-e.mouseDownTime;(S<=10&&P<=200||S<=5&&P<=300)&&e.setCursorToEnd()}};document.addEventListener("mouseup",h)}q(e.props.onMouseDown)&&e.props.onMouseDown(c)},e.onPaste=function(c){q(e.props.onPaste)&&e.props.onPaste(c),c.defaultPrevented||(e.beforePasteState={value:e.getInputValue(),selection:e.getSelection()},e.setInputValue(""))},e.handleRef=function(c){e.props.children==null&&q(e.props.inputRef)&&e.props.inputRef(c)};var a=n.mask,i=n.maskChar,l=n.formatChars,u=n.alwaysShowMask,s=n.beforeMaskedValueChange,y=n.defaultValue,p=n.value;e.maskOptions=cr(a,i,l),y==null&&(y=""),p==null&&(p=y);var d=qe(p);if(e.maskOptions.mask&&(u||d)&&(d=te(e.maskOptions,d),q(s))){var f=n.value;n.value==null&&(f=y),d=s({value:d,selection:null},{value:f=qe(f),selection:null},null,e.getBeforeMaskedValueChangeConfig()).value}return e.value=d,e}Rn(r,t);var o=r.prototype;return o.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=_n(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value))},o.componentDidUpdate=function(){var n=this.previousSelection,e=this.props,a=e.beforeMaskedValueChange,i=e.alwaysShowMask,l=e.mask,u=e.maskChar,s=e.formatChars,y=this.maskOptions,p=i||this.isFocused(),d=this.props.value!=null,f=d?qe(this.props.value):this.value,c=n?n.start:null;if(this.maskOptions=cr(l,u,s),this.maskOptions.mask){!y.mask&&this.isFocused()&&this.runSaveSelectionLoop();var h=this.maskOptions.mask&&this.maskOptions.mask!==y.mask;if(y.mask||d||(f=this.getInputValue()),(h||this.maskOptions.mask&&(f||p))&&(f=te(this.maskOptions,f)),h){var g=fe(this.maskOptions,f);(c===null||g<c)&&(c=dr(this.maskOptions,f)?g:he(this.maskOptions,g))}!this.maskOptions.mask||!pr(this.maskOptions,f)||p||d&&this.props.value||(f="");var b={start:c,end:c};if(q(a)){var v=a({value:f,selection:b},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());f=v.value,b=v.selection}this.value=f;var D=this.getInputValue()!==this.value;D?(this.setInputValue(this.value),this.forceUpdate()):h&&this.forceUpdate();var S=!1;b.start!=null&&b.end!=null&&(S=!n||n.start!==b.start||n.end!==b.end),(S||D)&&this.setSelection(b.start,b.end)}else y.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},o.componentWillUnmount=function(){this.mounted=!1,this.selectionDeferId!==null&&Ke(this.selectionDeferId),this.stopSaveSelectionLoop()},o.render=function(){var n,e=this.props,a=(e.mask,e.alwaysShowMask,e.maskChar,e.formatChars,e.inputRef,e.beforeMaskedValueChange,e.children),i=Ln(e,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(a){q(a)||sr(!1);var l=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],u=ze({},i);l.forEach(function(y){return delete u[y]}),n=a(u),l.filter(function(y){return n.props[y]!=null&&n.props[y]!==i[y]}).length&&sr(!1)}else n=_e.createElement("input",ze({ref:this.handleRef},i));var s={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(i.disabled||i.readOnly||(s.onChange=this.onChange,s.onPaste=this.onPaste,s.onMouseDown=this.onMouseDown),i.value!=null&&(s.value=this.value)),n=_e.cloneElement(n,s)},r}(_e.Component),qn=Un;lr.exports=qn;var Kn=lr.exports;const Xn=Ur(Kn);var Qn=["startEnhancer","endEnhancer","error","positive","onChange","onFocus","onBlur","value","disabled","readOnly"],Zn=["Input"],Gn=["mask","maskChar","overrides"];function yr(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)}return o}function Xe(t){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?yr(Object(o),!0).forEach(function(n){Jn(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):yr(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Jn(t,r,o){return r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function we(t){"@babel/helpers - typeof";return we=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},we(t)}function ye(){return ye=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},ye.apply(this,arguments)}function Qe(t,r){if(t==null)return{};var o=eo(t,r),n,e;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(e=0;e<a.length;e++)n=a[e],!(r.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function eo(t,r){if(t==null)return{};var o={},n=Object.keys(t),e,a;for(a=0;a<n.length;a++)e=n[a],!(r.indexOf(e)>=0)&&(o[e]=t[e]);return o}var gr=m.forwardRef(function(t,r){t.startEnhancer,t.endEnhancer,t.error,t.positive;var o=t.onChange,n=t.onFocus,e=t.onBlur,a=t.value,i=t.disabled,l=t.readOnly,u=Qe(t,Qn);return m.createElement(Xn,ye({onChange:o,onFocus:n,onBlur:e,value:a,disabled:i,readOnly:l},u),function(s){return m.createElement(dn,ye({ref:r,onChange:o,onFocus:n,onBlur:e,value:a,disabled:i,readOnly:l},s))})});gr.displayName="MaskOverride";function mr(t){var r=t.mask,o=t.maskChar,n=t.overrides;n=n===void 0?{}:n;var e=n.Input,a=e===void 0?{}:e,i=Qe(n,Zn),l=Qe(t,Gn),u=gr,s={},y={};typeof a=="function"?u=a:we(a)==="object"&&(u=a.component||u,s=a.props||{},y=a.style||{}),we(s)==="object"&&(s=Xe(Xe({},s),{},{mask:s.mask||r,maskChar:s.maskChar||o}));var p=Xe({Input:{component:u,props:s,style:y}},i);return m.createElement(pn,ye({},l,{overrides:p}))}mr.defaultProps={maskChar:" "};var Ze=Object.freeze({horizontal:"horizontal",vertical:"vertical"}),br=[0,1,2,3,4,5,6],to=[0,1,2,3,4,5,6,7,8,9,10,11],T={high:"high",default:"default"},re={startDate:"startDate",endDate:"endDate"},ro={default:"default",locked:"locked"};function vr(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)}return o}function le(t){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?vr(Object(o),!0).forEach(function(n){no(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):vr(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function no(t,r,o){return r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}var Ge=x("label",function(t){var r=t.$disabled,o=t.$theme,n=o.colors,e=o.typography;return le(le({},e.font250),{},{width:"100%",color:r?n.contentSecondary:n.contentPrimary,display:"block",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0})});Ge.displayName="Label",Ge.displayName="Label";var Je=x("span",function(t){var r=t.$theme.sizing;return{display:"flex",width:"100%",marginTop:r.scale300,marginRight:0,marginBottom:r.scale300,marginLeft:0}});Je.displayName="LabelContainer",Je.displayName="LabelContainer";var et=x("span",function(t){var r=t.$disabled,o=t.$counterError,n=t.$theme,e=n.colors,a=n.typography;return le(le({},a.font100),{},{flex:0,width:"100%",color:o?e.negative400:r?e.contentSecondary:e.contentPrimary})});et.displayName="LabelEndEnhancer",et.displayName="LabelEndEnhancer";var tt=x("div",function(t){var r=t.$error,o=t.$positive,n=t.$theme,e=n.colors,a=n.sizing,i=n.typography,l=e.contentSecondary;return r?l=e.negative400:o&&(l=e.positive400),le(le({},i.font100),{},{color:l,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,marginTop:a.scale300,marginRight:0,marginBottom:a.scale300,marginLeft:0})});tt.displayName="Caption",tt.displayName="Caption";var rt=x("div",function(t){var r=t.$theme.sizing;return{width:"100%",marginBottom:r.scale600}});rt.displayName="ControlContainer",rt.displayName="ControlContainer";function ne(){return ne=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},ne.apply(this,arguments)}function ke(t){"@babel/helpers - typeof";return ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ke(t)}function oo(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function ao(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function io(t,r,o){return ao(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function lo(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&nt(t,r)}function nt(t,r){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,n){return o.__proto__=n,o},nt(t,r)}function so(t){var r=po();return function(){var o=Ce(t),n;if(r){var e=Ce(this).constructor;n=Reflect.construct(o,arguments,e)}else n=o.apply(this,arguments);return uo(this,n)}}function uo(t,r){if(r&&(ke(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return co(t)}function co(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function po(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ce(t){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ce(t)}function fo(t,r,o){return r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function ho(t,r,o,n){return r&&typeof r!="boolean"?typeof r=="function"?r(n):r:o&&typeof o!="boolean"?typeof o=="function"?o(n):o:t?typeof t=="function"?t(n):t:null}var ot=function(t){lo(o,t);var r=so(o);function o(){return oo(this,o),r.apply(this,arguments)}return io(o,[{key:"render",value:function(){var n=this.props,e=n.overrides,a=e.Label,i=e.LabelEndEnhancer,l=e.LabelContainer,u=e.Caption,s=e.ControlContainer,y=n.label,p=n.caption,d=n.disabled,f=n.error,c=n.positive,h=n.htmlFor,g=n.children,b=n.counter,v=m.Children.only(g).props,D={$disabled:!!d,$error:!!f,$positive:!!c},S=ue(a)||Ge,P=ue(i)||et,j=ue(l)||Je,k=ue(u)||tt,H=ue(s)||rt,O=ho(p,f,c,D),M=this.props.labelEndEnhancer;if(b){var C=null,w=null,I=null;ke(b)==="object"&&(w=b.length,C=b.maxLength,I=b.error),C=C||v.maxLength,w==null&&typeof v.value=="string"&&(w=v.value.length),w==null&&(w=0),D.$length=w,C==null?M||(M="".concat(w)):(D.$maxLength=w,M||(M="".concat(w,"/").concat(C)),w>C&&I==null&&(I=!0)),I&&(D.$error=!0,D.$counterError=!0)}return m.createElement(m.Fragment,null,y&&m.createElement(j,ne({},D,ce(l)),m.createElement(S,ne({"data-baseweb":"form-control-label",htmlFor:h||v.id},D,ce(a)),typeof y=="function"?y(D):y),!!M&&m.createElement(P,ne({},D,ce(i)),typeof M=="function"?M(D):M)),m.createElement(qr,null,function(G){return m.createElement(H,ne({"data-baseweb":"form-control-container"},D,ce(s)),m.Children.map(g,function(z,Se){if(z){var A=z.key||String(Se);return m.cloneElement(z,{key:A,"aria-errormessage":f?G:null,"aria-describedby":p||c?G:null,disabled:v.disabled||d,error:typeof v.error<"u"?v.error:D.$error,positive:typeof v.positive<"u"?v.positive:D.$positive})}}),(!!p||!!f||c)&&m.createElement(k,ne({"data-baseweb":"form-control-caption",id:G},D,ce(u)),O))}))}}]),o}(m.Component);fo(ot,"defaultProps",{overrides:{},label:null,caption:null,disabled:!1,counter:!1});function Dr(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)}return o}function Sr(t){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?Dr(Object(o),!0).forEach(function(n){yo(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Dr(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function yo(t,r,o){return r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}var go=function(t){return to.map(function(r){return{id:r.toString(),label:t(r)}})},mo=function(t,r){return t.map(function(o){return r.includes(Number(o.id))?o:Sr(Sr({},o),{},{disabled:!0})})},bo=function(t){var r=t.filterMonthsList,o=t.formatMonthLabel,n=go(o);return r&&(n=mo(n,r)),n};function vo(t){var r=t.$range,o=r===void 0?!1:r,n=t.$disabled,e=n===void 0?!1:n,a=t.$isHighlighted,i=a===void 0?!1:a,l=t.$isHovered,u=l===void 0?!1:l,s=t.$selected,y=s===void 0?!1:s,p=t.$hasRangeSelected,d=p===void 0?!1:p,f=t.$startDate,c=f===void 0?!1:f,h=t.$endDate,g=h===void 0?!1:h,b=t.$pseudoSelected,v=b===void 0?!1:b,D=t.$hasRangeHighlighted,S=D===void 0?!1:D,P=t.$pseudoHighlighted,j=P===void 0?!1:P,k=t.$hasRangeOnRight,H=k===void 0?!1:k,O=t.$startOfMonth,M=O===void 0?!1:O,C=t.$endOfMonth,w=C===void 0?!1:C,I=t.$outsideMonth,G=I===void 0?!1:I;return"".concat(+o).concat(+e).concat(+(i||u)).concat(+y).concat(+d).concat(+c).concat(+g).concat(+v).concat(+S).concat(+j).concat(+(S&&!j&&H)).concat(+(S&&!j&&!H)).concat(+M).concat(+w).concat(+G)}function Do(t,r){return ko(t)||wo(t,r)||Oo(t,r)||So()}function So(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oo(t,r){if(t){if(typeof t=="string")return Or(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Or(t,r)}}function Or(t,r){(r==null||r>t.length)&&(r=t.length);for(var o=0,n=new Array(r);o<r;o++)n[o]=t[o];return n}function wo(t,r){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var n=[],e=!0,a=!1,i,l;try{for(o=o.call(t);!(e=(i=o.next()).done)&&(n.push(i.value),!(r&&n.length===r));e=!0);}catch(u){a=!0,l=u}finally{try{!e&&o.return!=null&&o.return()}finally{if(a)throw l}}return n}}function ko(t){if(Array.isArray(t))return t}function wr(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)}return o}function B(t){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?wr(Object(o),!0).forEach(function(n){ge(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):wr(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function ge(t,r,o){return r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}var at=x("div",function(t){var r=t.$separateRangeInputs;return B({width:"100%"},r?{display:"flex",justifyContent:"center"}:{})});at.displayName="StyledInputWrapper",at.displayName="StyledInputWrapper";var it=x("div",function(t){var r=t.$theme;return B(B({},r.typography.LabelMedium),{},{marginBottom:r.sizing.scale300})});it.displayName="StyledInputLabel",it.displayName="StyledInputLabel";var lt=x("div",function(t){var r=t.$theme;return{width:"100%",marginRight:r.sizing.scale300}});lt.displayName="StyledStartDate",lt.displayName="StyledStartDate";var st=x("div",function(t){return t.$theme,{width:"100%"}});st.displayName="StyledEndDate",st.displayName="StyledEndDate";var ut=x("div",function(t){var r=t.$theme,o=r.typography,n=r.colors,e=r.borders;return B(B({},o.font200),{},{color:n.calendarForeground,backgroundColor:n.calendarBackground,textAlign:"center",borderTopLeftRadius:e.surfaceBorderRadius,borderTopRightRadius:e.surfaceBorderRadius,borderBottomRightRadius:e.surfaceBorderRadius,borderBottomLeftRadius:e.surfaceBorderRadius,display:"inline-block"})});ut.displayName="StyledRoot",ut.displayName="StyledRoot";var ct=x("div",function(t){var r=t.$orientation;return{display:"flex",flexDirection:r===Ze.vertical?"column":"row"}});ct.displayName="StyledMonthContainer",ct.displayName="StyledMonthContainer";var pt=x("div",function(t){var r=t.$theme.sizing,o=t.$density;return{paddingTop:r.scale300,paddingBottom:o===T.high?r.scale400:r.scale300,paddingLeft:r.scale500,paddingRight:r.scale500}});pt.displayName="StyledCalendarContainer",pt.displayName="StyledCalendarContainer";var Me=x("div",function(t){var r=t.$theme,o=r.direction==="rtl"?"right":"left";return{marginBottom:r.sizing.scale600,paddingLeft:r.sizing.scale600,paddingRight:r.sizing.scale600,textAlign:o}});Me.displayName="StyledSelectorContainer",Me.displayName="StyledSelectorContainer";var dt=x("div",function(t){var r=t.$theme,o=r.typography,n=r.borders,e=r.colors,a=r.sizing,i=t.$density;return B(B({},i===T.high?o.LabelMedium:o.LabelLarge),{},{color:e.calendarHeaderForeground,display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:a.scale600,paddingBottom:a.scale300,paddingLeft:a.scale600,paddingRight:a.scale600,backgroundColor:e.calendarHeaderBackground,borderTopLeftRadius:n.surfaceBorderRadius,borderTopRightRadius:n.surfaceBorderRadius,borderBottomRightRadius:0,borderBottomLeftRadius:0,minHeight:i===T.high?"calc(".concat(a.scale800," + ").concat(a.scale0,")"):a.scale950})});dt.displayName="StyledCalendarHeader",dt.displayName="StyledCalendarHeader";var ft=x("div",function(t){return{color:t.$theme.colors.calendarHeaderForeground,backgroundColor:t.$theme.colors.calendarHeaderBackground,whiteSpace:"nowrap"}});ft.displayName="StyledMonthHeader",ft.displayName="StyledMonthHeader";var ht=x("button",function(t){var r=t.$theme,o=r.typography,n=r.colors,e=t.$isFocusVisible,a=t.$density;return B(B({},a===T.high?o.LabelMedium:o.LabelLarge),{},{alignItems:"center",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,color:n.calendarHeaderForeground,cursor:"pointer",display:"flex",outline:"none",":focus":{boxShadow:e?"0 0 0 3px ".concat(n.accent):"none"}})});ht.displayName="StyledMonthYearSelectButton",ht.displayName="StyledMonthYearSelectButton";var yt=x("span",function(t){var r=t.$theme.direction==="rtl"?"marginRight":"marginLeft";return ge({alignItems:"center",display:"flex"},r,t.$theme.sizing.scale500)});yt.displayName="StyledMonthYearSelectIconContainer",yt.displayName="StyledMonthYearSelectIconContainer";function kr(t){var r=t.$theme,o=t.$disabled,n=t.$isFocusVisible;return{boxSizing:"border-box",display:"flex",color:o?r.colors.calendarHeaderForegroundDisabled:r.colors.calendarHeaderForeground,cursor:o?"default":"pointer",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0",marginBottom:0,marginTop:0,outline:"none",":focus":o?{}:{boxShadow:n?"0 0 0 3px ".concat(r.colors.accent):"none"}}}var gt=x("button",kr);gt.displayName="StyledPrevButton",gt.displayName="StyledPrevButton";var mt=x("button",kr);mt.displayName="StyledNextButton",mt.displayName="StyledNextButton";var bt=x("div",function(t){return{display:"inline-block"}});bt.displayName="StyledMonth",bt.displayName="StyledMonth";var vt=x("div",function(t){var r=t.$theme.sizing;return{whiteSpace:"nowrap",display:"flex",marginBottom:r.scale0}});vt.displayName="StyledWeek",vt.displayName="StyledWeek";function R(t,r){var o,n=t.substr(0,12)+"1"+t.substr(13),e=t.substr(0,13)+"1"+t.substr(14);return o={},ge(o,t,r),ge(o,n,r),ge(o,e,r),o}function Dt(t,r){var o=r.colors,n={":before":{content:null},":after":{content:null}},e=n,a={color:o.calendarForegroundDisabled,":before":{content:null},":after":{content:null}},i={color:o.calendarForegroundDisabled,":before":{borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",backgroundColor:"transparent"},":after":{borderTopLeftRadius:"0%",borderTopRightRadius:"0%",borderBottomLeftRadius:"0%",borderBottomRightRadius:"0%",borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}},l={":before":{content:null}},u=1;t&&t[u]==="1"&&(e=a);var s=Object.assign({},R("001000000000000",{color:o.calendarDayForegroundPseudoSelected}),R("000100000000000",{color:o.calendarDayForegroundSelected}),R("001100000000000",{color:o.calendarDayForegroundSelectedHighlighted}),{"010000000000000":{color:o.calendarForegroundDisabled,":after":{content:null}}},{"011000000000000":{color:o.calendarForegroundDisabled,":after":{content:null}}},R("000000000000001",i),R("101000000000000",l),R("101010000000000",l),R("100100000000000",{color:o.calendarDayForegroundSelected}),R("101100000000000",{color:o.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),R("100111100000000",{color:o.calendarDayForegroundSelected,":before":{content:null}}),R("101111100000000",{color:o.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),R("100111000000000",{color:o.calendarDayForegroundSelected}),R("100110100000000",{color:o.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),R("100100001010000",{color:o.calendarDayForegroundSelected}),R("100100001001000",{color:o.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),R("101000001010000",{":before":{left:null,right:"50%"}}),{"101000001001000":{}},{"101000001001100":{}},{"101000001001010":{}},R("100010010000000",{color:o.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),{"101000001100000":{color:o.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}},R("100000001100000",{color:o.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),R("101111000000000",{color:o.calendarDayForegroundSelectedHighlighted}),R("101110100000000",{color:o.calendarDayForegroundSelectedHighlighted,":before":{left:null,right:"50%"}}),R("101010010000000",{color:o.calendarDayForegroundPseudoSelectedHighlighted,":before":{left:"0",width:"100%"}}),R("100000000000001",i),R("100000001010001",i),R("100000001001001",i),R("100010000000001",i));return s[t]||e}var St=x("div",function(t){var r=t.$disabled,o=t.$isFocusVisible,n=t.$isHighlighted,e=t.$peekNextMonth,a=t.$pseudoSelected,i=t.$range,l=t.$selected,u=t.$outsideMonth,s=t.$outsideMonthWithinRange,y=t.$hasDateLabel,p=t.$density,d=t.$hasLockedBehavior,f=t.$selectedInput,c=t.$value,h=t.$theme,g=h.colors,b=h.typography,v=h.sizing,D=vo(t),S;y?p===T.high?S="60px":S="70px":p===T.high?S="40px":S="48px";var P=Array.isArray(c)?c:[c,null],j=Do(P,2),k=j[0],H=j[1],O=f===re.startDate?H!==null&&typeof H<"u":k!==null&&typeof k<"u",M=i&&!(d&&!O);return B(B(B({},p===T.high?b.ParagraphSmall:b.ParagraphMedium),{},{boxSizing:"border-box",position:"relative",cursor:r||!e&&u?"default":"pointer",color:g.calendarForeground,display:"inline-block",width:p===T.high?"42px":"50px",height:S,lineHeight:p===T.high?v.scale700:v.scale900,textAlign:"center",paddingTop:v.scale300,paddingBottom:v.scale300,paddingLeft:v.scale300,paddingRight:v.scale300,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,outline:"none",backgroundColor:"transparent",transform:"scale(1)"},Dt(D,t.$theme)),{},{":after":B(B({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",boxShadow:o&&(!u||e)?"0 0 0 3px ".concat(g.accent):"none",backgroundColor:l?g.calendarDayBackgroundSelectedHighlighted:a&&n?g.calendarDayBackgroundPseudoSelectedHighlighted:g.calendarBackground,height:y?"100%":p===T.high?"42px":"50px",width:"100%",position:"absolute",top:y?0:"-1px",left:0,paddingTop:v.scale200,paddingBottom:v.scale200,borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderTopColor:g.borderSelected,borderBottomColor:g.borderSelected,borderRightColor:g.borderSelected,borderLeftColor:g.borderSelected,borderTopLeftRadius:y?v.scale800:"100%",borderTopRightRadius:y?v.scale800:"100%",borderBottomLeftRadius:y?v.scale800:"100%",borderBottomRightRadius:y?v.scale800:"100%"},Dt(D,t.$theme)[":after"]||{}),s?{content:null}:{})},M?{":before":B(B({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",backgroundColor:g.mono300,position:"absolute",height:"100%",width:"50%",top:0,left:"50%",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftWidth:"0",borderRightWidth:"0",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopColor:"transparent",borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},Dt(D,t.$theme)[":before"]||{}),s?{backgroundColor:g.mono300,left:"0",width:"100%",content:'""'}:{})}:{})});St.displayName="StyledDay",St.displayName="StyledDay";var Ot=x("div",function(t){var r=t.$theme,o=r.typography,n=r.colors,e=t.$selected;return B(B({},o.ParagraphXSmall),{},{color:e?n.contentInverseTertiary:n.contentTertiary})});Ot.displayName="StyledDayLabel",Ot.displayName="StyledDayLabel";var wt=x("div",function(t){var r=t.$theme,o=r.typography,n=r.colors,e=r.sizing,a=t.$density;return B(B({},o.LabelMedium),{},{color:n.contentTertiary,boxSizing:"border-box",position:"relative",cursor:"default",display:"inline-block",width:a===T.high?"42px":"50px",height:a===T.high?"40px":"48px",textAlign:"center",lineHeight:e.scale900,paddingTop:e.scale300,paddingBottom:e.scale300,paddingLeft:e.scale200,paddingRight:e.scale200,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,backgroundColor:"transparent"})});wt.displayName="StyledWeekdayHeader",wt.displayName="StyledWeekdayHeader";function kt(t){"@babel/helpers - typeof";return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},kt(t)}function U(){return U=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},U.apply(this,arguments)}function Q(t,r){return Ho(t)||jo(t,r)||Mo(t,r)||Co()}function Co(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,E as S,_ as B,c,a5 as T,M as L,j as s,aY as V}from"./index-
|
|
1
|
+
import{r as a,E as S,_ as B,c,a5 as T,M as L,j as s,aY as V}from"./index-Bx_n8HNg.js";import{I as K}from"./InputInstructions-DjR1o_IC.js";import{i as M}from"./inputUtils-CptNuJwn.js";import{T as A}from"./textarea-CwCvq-TS.js";import"./base-input-7pZdCg4C.js";var R=a.forwardRef(function(e,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(S,B({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),a.createElement("rect",{width:24,height:24,fill:"none"}),a.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"}))});R.displayName="Send";const D=c("div",{target:"e1d2x3se4"})(({theme:e,width:r})=>({borderRadius:e.radii.default,display:"flex",backgroundColor:e.colors.widgetBackgroundColor??e.colors.secondaryBg,width:`${r}px`}),""),N=c("div",{target:"e1d2x3se3"})(({theme:e})=>({backgroundColor:e.colors.transparent,position:"relative",flexGrow:1,borderRadius:e.radii.default,display:"flex",alignItems:"center"}),""),F=c("button",{target:"e1d2x3se2"})(({theme:e,disabled:r,extended:l})=>{const g=T(e),[t,h]=g?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:l?"0":e.radii.default,borderTopLeftRadius:l?e.radii.default:"0",borderBottomRightRadius:e.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:r?t:h,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:g?e.colors.gray10:e.colors.gray90},"&:hover":{backgroundColor:e.colors.primary,color:e.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray}}},""),G=c("div",{target:"e1d2x3se1"})({name:"1v03qtz",styles:"display:flex;align-items:flex-end;height:100%;position:absolute;right:0;pointer-events:none"}),U=c("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),_=6.5,k=1;function q({width:e,element:r,widgetMgr:l,fragmentId:g}){const t=L(),[h,p]=a.useState(!1),[u,m]=a.useState(r.default),[f,x]=a.useState(0),n=a.useRef(null),b=a.useRef({minHeight:0,maxHeight:0}),z=()=>{let o=0;const{current:i}=n;if(i){const d=i.placeholder;i.placeholder="",i.style.height="auto",o=i.scrollHeight,i.placeholder=d,i.style.height=""}return o},y=()=>{n.current&&n.current.focus(),u&&(l.setStringTriggerValue(r,u,{fromUi:!0},g),p(!1),m(""),x(0))},j=o=>{const{metaKey:i,ctrlKey:d,shiftKey:E}=o;M(o)&&!E&&!d&&!i&&(o.preventDefault(),y())},I=o=>{const{value:i}=o.target,{maxChars:d}=r;d!==0&&i.length>d||(p(i!==""),m(i),x(z()))};a.useEffect(()=>{if(r.setValue){r.setValue=!1;const o=r.value||"";m(o),p(o!=="")}},[r]),a.useEffect(()=>{if(n.current){const{offsetHeight:o}=n.current;b.current.minHeight=o,b.current.maxHeight=o*_}},[n]);const{disabled:v,placeholder:C,maxChars:W}=r,{minHeight:$,maxHeight:w}=b.current,H=f>0&&n.current?Math.abs(f-$)>k:!1;return s.jsx(D,{className:"stChatInput","data-testid":"stChatInput",width:e,children:s.jsxs(N,{children:[s.jsx(A,{inputRef:n,value:u,placeholder:C,onChange:I,onKeyDown:j,"aria-label":C,disabled:v,rows:1,overrides:{Root:{style:{minHeight:t.sizes.minElementHeight,outline:"none",backgroundColor:t.colors.transparent,borderLeftWidth:t.sizes.borderWidth,borderRightWidth:t.sizes.borderWidth,borderTopWidth:t.sizes.borderWidth,borderBottomWidth:t.sizes.borderWidth,width:`${e}px`}},InputContainer:{style:{backgroundColor:t.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:t.lineHeights.inputWidget,backgroundColor:t.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:H?`${f+k}px`:"auto",maxHeight:w?`${w}px`:"none",paddingLeft:t.spacing.sm,paddingBottom:t.spacing.sm,paddingTop:t.spacing.sm,paddingRight:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`}}}}),e>t.breakpoints.hideWidgetDetails&&s.jsx(U,{children:s.jsx(K,{dirty:h,value:u,maxLength:W,type:"chat",inForm:!1})}),s.jsx(G,{children:s.jsx(F,{onClick:y,disabled:!h||v,extended:H,"data-testid":"stChatInputSubmitButton",children:s.jsx(V,{content:R,size:"xl",color:"inherit"})})})]})})}export{q as default};
|