react-dropdown-select
Advanced tools
Comparing version 4.9.4 to 4.10.0
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("prop-types")):"function"==typeof define&&define.amd?define("reactDropdownSelect",["react","react-dom","prop-types"],t):"object"==typeof exports?exports.reactDropdownSelect=t(require("react"),require("react-dom"),require("prop-types")):e.reactDropdownSelect=t(e.React,e.ReactDOM,e.PropTypes)}(this,((e,t,r)=>(()=>{"use strict";var n={602:e=>{e.exports=r},359:t=>{t.exports=e},318:e=>{e.exports=t}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{function e(){return e=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},e.apply(this,arguments)}a.r(s),a.d(s,{Select:()=>Ot,default:()=>_t});var t=a(359),r=a.n(t);function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=n((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),c=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),l=Math.abs,u=String.fromCharCode,p=Object.assign;function d(e){return e.trim()}function f(e,t,r){return e.replace(t,r)}function h(e,t){return e.indexOf(t)}function m(e,t){return 0|e.charCodeAt(t)}function v(e,t,r){return e.slice(t,r)}function g(e){return e.length}function y(e){return e.length}function b(e,t){return t.push(e),e}var w=1,x=1,k=0,S=0,C=0,R="";function A(e,t,r,n,o,a,s){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:w,column:x,length:s,return:""}}function E(e,t){return p(A("",null,null,"",null,null,0),e,{length:-e.length},t)}function D(){return C=S>0?m(R,--S):0,x--,10===C&&(x=1,w--),C}function O(){return C=S<k?m(R,S++):0,x++,10===C&&(x=1,w++),C}function P(){return m(R,S)}function _(){return S}function I(e,t){return v(R,e,t)}function F(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function N(e){return w=x=1,k=g(R=e),S=0,[]}function B(e){return R="",e}function T(e){return d(I(S-1,z(91===e?e+2:40===e?e+1:e)))}function $(e){for(;(C=P())&&C<33;)O();return F(e)>2||F(C)>3?"":" "}function j(e,t){for(;--t&&O()&&!(C<48||C>102||C>57&&C<65||C>70&&C<97););return I(e,_()+(t<6&&32==P()&&32==O()))}function z(e){for(;O();)switch(C){case e:return S;case 34:case 39:34!==e&&39!==e&&z(C);break;case 40:41===e&&z(e);break;case 92:O()}return S}function L(e,t){for(;O()&&e+C!==57&&(e+C!==84||47!==P()););return"/*"+I(t,S-1)+"*"+u(47===e?e:O())}function q(e){for(;!F(P());)O();return I(e,S)}var M="-ms-",H="-moz-",K="-webkit-",U="comm",G="rule",W="decl",V="@keyframes";function X(e,t){for(var r="",n=y(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Y(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case W:return e.return=e.return||e.value;case U:return"";case V:return e.return=e.value+"{"+X(e.children,n)+"}";case G:e.value=e.props.join(",")}return g(r=X(e.children,n))?e.return=e.value+"{"+r+"}":""}function J(e){var t=y(e);return function(r,n,o,a){for(var s="",i=0;i<t;i++)s+=e[i](r,n,o,a)||"";return s}}function Z(e){return B(Q("",null,null,null,[""],e=N(e),0,[0],e))}function Q(e,t,r,n,o,a,s,i,c){for(var l=0,p=0,d=s,v=0,y=0,w=0,x=1,k=1,S=1,C=0,R="",A=o,E=a,I=n,F=R;k;)switch(w=C,C=O()){case 40:if(108!=w&&58==m(F,d-1)){-1!=h(F+=f(T(C),"&","&\f"),"&\f")&&(S=-1);break}case 34:case 39:case 91:F+=T(C);break;case 9:case 10:case 13:case 32:F+=$(w);break;case 92:F+=j(_()-1,7);continue;case 47:switch(P()){case 42:case 47:b(te(L(O(),_()),t,r),c);break;default:F+="/"}break;case 123*x:i[l++]=g(F)*S;case 125*x:case 59:case 0:switch(C){case 0:case 125:k=0;case 59+p:-1==S&&(F=f(F,/\f/g,"")),y>0&&g(F)-d&&b(y>32?re(F+";",n,r,d-1):re(f(F," ","")+";",n,r,d-2),c);break;case 59:F+=";";default:if(b(I=ee(F,t,r,l,p,o,i,R,A=[],E=[],d),a),123===C)if(0===p)Q(F,t,I,I,A,a,d,i,E);else switch(99===v&&110===m(F,3)?100:v){case 100:case 108:case 109:case 115:Q(e,I,I,n&&b(ee(e,I,I,0,0,o,i,R,o,A=[],d),E),o,E,d,i,n?A:E);break;default:Q(F,I,I,I,[""],E,0,i,E)}}l=p=y=0,x=S=1,R=F="",d=s;break;case 58:d=1+g(F),y=w;default:if(x<1)if(123==C)--x;else if(125==C&&0==x++&&125==D())continue;switch(F+=u(C),C*x){case 38:S=p>0?1:(F+="\f",-1);break;case 44:i[l++]=(g(F)-1)*S,S=1;break;case 64:45===P()&&(F+=T(O())),v=P(),p=d=g(R=F+=q(_())),C++;break;case 45:45===w&&2==g(F)&&(x=0)}}return a}function ee(e,t,r,n,o,a,s,i,c,u,p){for(var h=o-1,m=0===o?a:[""],g=y(m),b=0,w=0,x=0;b<n;++b)for(var k=0,S=v(e,h+1,h=l(w=s[b])),C=e;k<g;++k)(C=d(w>0?m[k]+" "+S:f(S,/&\f/g,m[k])))&&(c[x++]=C);return A(e,t,r,0===o?G:i,c,u,p)}function te(e,t,r){return A(e,t,r,U,u(C),v(e,2,-2),0)}function re(e,t,r,n){return A(e,t,r,W,v(e,0,n),v(e,n+1,-1),n)}var ne=function(e,t,r){for(var n=0,o=0;n=o,o=P(),38===n&&12===o&&(t[r]=1),!F(o);)O();return I(e,S)},oe=new WeakMap,ae=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||oe.get(r))&&!n){oe.set(e,!0);for(var o=[],a=function(e,t){return B(function(e,t){var r=-1,n=44;do{switch(F(n)){case 0:38===n&&12===P()&&(t[r]=1),e[r]+=ne(S-1,t,r);break;case 2:e[r]+=T(n);break;case 4:if(44===n){e[++r]=58===P()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=u(n)}}while(n=O());return e}(N(e),t))}(t,o),s=r.props,i=0,c=0;i<a.length;i++)for(var l=0;l<s.length;l++,c++)e.props[c]=o[i]?a[i].replace(/&\f/g,s[l]):s[l]+" "+a[i]}}},se=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ie(e,t){switch(function(e,t){return 45^m(e,0)?(((t<<2^m(e,0))<<2^m(e,1))<<2^m(e,2))<<2^m(e,3):0}(e,t)){case 5103:return K+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return K+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return K+e+H+e+M+e+e;case 6828:case 4268:return K+e+M+e+e;case 6165:return K+e+M+"flex-"+e+e;case 5187:return K+e+f(e,/(\w+).+(:[^]+)/,K+"box-$1$2"+M+"flex-$1$2")+e;case 5443:return K+e+M+"flex-item-"+f(e,/flex-|-self/,"")+e;case 4675:return K+e+M+"flex-line-pack"+f(e,/align-content|flex-|-self/,"")+e;case 5548:return K+e+M+f(e,"shrink","negative")+e;case 5292:return K+e+M+f(e,"basis","preferred-size")+e;case 6060:return K+"box-"+f(e,"-grow","")+K+e+M+f(e,"grow","positive")+e;case 4554:return K+f(e,/([^-])(transform)/g,"$1"+K+"$2")+e;case 6187:return f(f(f(e,/(zoom-|grab)/,K+"$1"),/(image-set)/,K+"$1"),e,"")+e;case 5495:case 3959:return f(e,/(image-set\([^]*)/,K+"$1$`$1");case 4968:return f(f(e,/(.+:)(flex-)?(.*)/,K+"box-pack:$3"+M+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+K+e+e;case 4095:case 3583:case 4068:case 2532:return f(e,/(.+)-inline(.+)/,K+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(g(e)-1-t>6)switch(m(e,t+1)){case 109:if(45!==m(e,t+4))break;case 102:return f(e,/(.+:)(.+)-([^]+)/,"$1"+K+"$2-$3$1"+H+(108==m(e,t+3)?"$3":"$2-$3"))+e;case 115:return~h(e,"stretch")?ie(f(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==m(e,t+1))break;case 6444:switch(m(e,g(e)-3-(~h(e,"!important")&&10))){case 107:return f(e,":",":"+K)+e;case 101:return f(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+K+(45===m(e,14)?"inline-":"")+"box$3$1"+K+"$2$3$1"+M+"$2box$3")+e}break;case 5936:switch(m(e,t+11)){case 114:return K+e+M+f(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return K+e+M+f(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return K+e+M+f(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return K+e+M+e+e}return e}var ce,le,ue="undefined"!=typeof document,pe=ue?void 0:(ce=function(){return e=function(){var e={};return function(t){return e[t]}},t=Object.create(null),function(r){return void 0===t[r]&&(t[r]=e()),t[r]};var e,t},le=new WeakMap,function(e){if(le.has(e))return le.get(e);var t=ce();return le.set(e,t),t}),de=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case W:e.return=ie(e.value,e.length);break;case V:return X([E(e,{value:f(e.value,"@","@"+K)})],n);case G:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return X([E(e,{props:[f(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return X([E(e,{props:[f(t,/:(plac\w+)/,":"+K+"input-$1")]}),E(e,{props:[f(t,/:(plac\w+)/,":-moz-$1")]}),E(e,{props:[f(t,/:(plac\w+)/,M+"input-$1")]})],n)}return""}))}}],fe=function(e){var t=e.key;if(ue&&"css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var n,o,a=e.stylisPlugins||de,s={},i=[];ue&&(n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)s[t[r]]=!0;i.push(e)})));var l,u=[ae,se];if(ue){var p,d=[Y,(l=function(e){p.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],f=J(u.concat(a,d));o=function(e,t,r,n){p=r,X(Z(e?e+"{"+t.styles+"}":t.styles),f),n&&(g.inserted[t.name]=!0)}}else{var h=[Y],m=J(u.concat(a,h)),v=pe(a)(t);o=function(e,t,r,n){var o=t.name,a=function(e,t){var r=t.name;return void 0===v[r]&&(v[r]=X(Z(e?e+"{"+t.styles+"}":t.styles),m)),v[r]}(e,t);return void 0===g.compat?(n&&(g.inserted[o]=!0),a):n?void(g.inserted[o]=a):a}}var g={key:t,sheet:new c({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return g.sheet.hydrate(i),g},he="undefined"!=typeof document,me=!!t.useInsertionEffect&&t.useInsertionEffect,ve=he&&me||function(e){return e()},ge=(me||t.useLayoutEffect,"undefined"!=typeof document),ye=t.createContext("undefined"!=typeof HTMLElement?fe({key:"css"}):null);ye.Provider;var be=function(e){return(0,t.forwardRef)((function(r,n){var o=(0,t.useContext)(ye);return e(r,o,n)}))};ge||(be=function(e){return function(r){var n=(0,t.useContext)(ye);return null===n?(n=fe({key:"css"}),t.createElement(ye.Provider,{value:n},e(r,n))):e(r,n)}});var we=t.createContext({}),xe="undefined"!=typeof document,ke=function(e,t,r){var n=e.key+"-"+t.name;(!1===r||!1===xe&&void 0!==e.compat)&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},Se={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ce(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var Re=/[A-Z]|^ms/g,Ae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ee=function(e){return 45===e.charCodeAt(1)},De=function(e){return null!=e&&"boolean"!=typeof e},Oe=Ce((function(e){return Ee(e)?e:e.replace(Re,"-$&").toLowerCase()})),Pe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ae,(function(e,t,r){return Ie={name:t,styles:r,next:Ie},t}))}return 1===Se[e]||Ee(e)||"number"!=typeof t||0===t?t:t+"px"};function _e(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return Ie={name:r.name,styles:r.styles,next:Ie},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)Ie={name:n.name,styles:n.styles,next:Ie},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=_e(e,t,r[o])+";";else for(var a in r){var s=r[a];if("object"!=typeof s)null!=t&&void 0!==t[s]?n+=a+"{"+t[s]+"}":De(s)&&(n+=Oe(a)+":"+Pe(a,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var i=_e(e,t,s);switch(a){case"animation":case"animationName":n+=Oe(a)+":"+i+";";break;default:n+=a+"{"+i+"}"}}else for(var c=0;c<s.length;c++)De(s[c])&&(n+=Oe(a)+":"+Pe(a,s[c])+";")}return n}(e,t,r);case"function":if(void 0!==e){var o=Ie,a=r(e);return Ie=o,_e(e,t,a)}}if(null==t)return r;var s=t[r];return void 0!==s?s:r}var Ie,Fe=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Ne=i,Be=function(e){return"theme"!==e},Te=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Ne:Be},$e=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},je="undefined"!=typeof document,ze=function(e){var r=e.cache,n=e.serialized,o=e.isStringTag;ke(r,n,o);var a=ve((function(){return function(e,t,r){ke(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o="",a=t;do{var s=e.insert(t===a?"."+n:"",a,e.sheet,!0);xe||void 0===s||(o+=s),a=a.next}while(void 0!==a);if(!xe&&0!==o.length)return o}}(r,n,o)}));if(!je&&void 0!==a){for(var s,i=n.name,c=n.next;void 0!==c;)i+=" "+c.name,c=c.next;return t.createElement("style",((s={})["data-emotion"]=r.key+" "+i,s.dangerouslySetInnerHTML={__html:a},s.nonce=r.sheet.nonce,s))}return null},Le=function r(n,o){var a,s,i=n.__emotion_real===n,c=i&&n.__emotion_base||n;void 0!==o&&(a=o.label,s=o.target);var l=$e(n,o,i),u=l||Te(c),p=!u("as");return function(){var d=arguments,f=i&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==a&&f.push("label:"+a+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{f.push(d[0][0]);for(var h=d.length,m=1;m<h;m++)f.push(d[m],d[0][m])}var v=be((function(e,r,n){var o,a,i,d,h=p&&e.as||c,m="",v=[],g=e;if(null==e.theme){for(var y in g={},e)g[y]=e[y];g.theme=t.useContext(we)}"string"==typeof e.className?(o=r.registered,a=v,i=e.className,d="",i.split(" ").forEach((function(e){void 0!==o[e]?a.push(o[e]+";"):d+=e+" "})),m=d):null!=e.className&&(m=e.className+" ");var b=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,o="";Ie=void 0;var a=e[0];null==a||void 0===a.raw?(n=!1,o+=_e(r,t,a)):o+=a[0];for(var s=1;s<e.length;s++)o+=_e(r,t,e[s]),n&&(o+=a[s]);Fe.lastIndex=0;for(var i,c="";null!==(i=Fe.exec(o));)c+="-"+i[1];var l=function(e){for(var t,r=0,n=0,o=e.length;o>=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:Ie}}(f.concat(v),r.registered,g);m+=r.key+"-"+b.name,void 0!==s&&(m+=" "+s);var w=p&&void 0===l?Te(h):u,x={};for(var k in e)p&&"as"===k||w(k)&&(x[k]=e[k]);return x.className=m,x.ref=n,t.createElement(t.Fragment,null,t.createElement(ze,{cache:r,serialized:b,isStringTag:"string"==typeof h}),t.createElement(h,x))}));return v.displayName=void 0!==a?a:"Styled("+("string"==typeof c?c:c.displayName||c.name||"Component")+")",v.defaultProps=n.defaultProps,v.__emotion_real=v,v.__emotion_base=c,v.__emotion_styles=f,v.__emotion_forwardProp=l,Object.defineProperty(v,"toString",{value:function(){return"."+s}}),v.withComponent=function(t,n){return r(t,e({},o,n,{shouldForwardProp:$e(v,n,!0)})).apply(void 0,f)},v}},qe=a(318),Me=a.n(qe);function He(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ke(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}a(602);const Ue=function(e){function t(){for(var t,n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];return Ke(He(t=e.call.apply(e,[this].concat(o))||this),"container",r().createRef()),Ke(He(t),"handleClick",(function(e){var r=t.container.current,n=e.target,o=t.props.onClickOutside;(r&&r===n||r&&!r.contains(n))&&o(e)})),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.componentDidMount=function(){document.addEventListener("click",this.handleClick,!0)},n.componentWillUnmount=function(){document.removeEventListener("click",this.handleClick,!0)},n.render=function(){var e=this.props,t=e.className,n=e.children;return r().createElement("div",{className:t,ref:this.container},n)},t}(r().Component);var Ge=function(e,t,r){return!!t.find((function(t){return Xe(t,r.valueField)===e||Xe(t,r.labelField)===e}))},We=function(e,t){return 4===e.length&&(e=""+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"}"),"rgba("+parseInt(e.slice(1,3),16)+", "+parseInt(e.slice(3,5),16)+", "+parseInt(e.slice(5,7),16)+(t&&", "+t)+")"},Ve=function(e,t){var r;return void 0===t&&(t=0),function(){for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];r&&clearTimeout(r),r=setTimeout((function(){e.apply(void 0,o),r=null}),t)}},Xe=function(e,t){return t?t.split(".").reduce((function(e,t){return e[t]}),e):void 0},Ye=function(e,t,r){if(!t)return e;var n=Array.isArray(t)?t:t.split(".").filter((function(e){return e.length}));return n.length?Ye(e[n.shift()],n,r):void 0===e?r:e},Je=function(){return"undefined"==typeof window&&(global.window={}),window},Ze="react-dropdown-select",Qe=Le("span",{target:"e1l4eby50"})("padding:0 5px;border-radius:2px;line-height:21px;margin:3px 0 3px 5px;background:",(function(e){return e.color}),";color:#fff;display:flex;flex-direction:",(function(e){return"rtl"===e.direction?"row-reverse":"row"}),";.",Ze,"-option-remove{cursor:pointer;width:22px;height:22px;display:inline-block;text-align:center;margin:0 -5px 0 0px;border-radius:0 3px 3px 0;:hover{color:tomato;}}:hover,:hover>span{opacity:0.9;}");const et=function(e){var t=e.item,n=e.props,o=e.state,a=e.methods;return t&&n.optionRenderer?n.optionRenderer({item:t,props:n,state:o,methods:a}):r().createElement(Qe,{role:"listitem",disabled:n.disabled,direction:n.direction,className:Ze+"-option",color:n.color},r().createElement("span",{className:Ze+"-option-label"},Xe(t,n.labelField)),r().createElement("span",{className:Ze+"-option-remove",onClick:function(e){return a.removeItem(e,t,n.closeOnSelect)}},"×"))};function tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var nt=function(e,t){var r=e.addPlaceholder,n=e.searchable,o=e.placeholder,a=t.values&&0===t.values.length;return t.values&&0<t.values.length&&r&&n?r:a?o:""},ot=function(e){function t(){for(var t,n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];return rt(tt(t=e.call.apply(e,[this].concat(o))||this),"input",r().createRef()),rt(tt(t),"onBlur",(function(e){return e.stopPropagation(),t.props.state.dropdown?t.input.current.focus():t.input.current.blur()})),rt(tt(t),"handleKeyPress",(function(e){var r=t.props,n=r.props,o=r.state,a=r.methods;return n.create&&"Enter"===e.key&&!Ge(o.search,[].concat(o.values,n.options),t.props)&&o.search&&null===o.cursor&&a.createNew(o.search)})),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){(this.props.state.dropdown||e.state.dropdown!==this.props.state.dropdown&&this.props.state.dropdown||this.props.props.autoFocus)&&this.input.current.focus(),e.state.dropdown===this.props.state.dropdown||this.props.state.dropdown||this.input.current.blur()},n.render=function(){var e=this.props,t=e.props,n=e.state,o=e.methods;return t.inputRenderer?t.inputRenderer({props:t,state:n,methods:o,inputRef:this.input}):r().createElement(at,{ref:this.input,tabIndex:"-1",onFocus:function(e){return e.stopPropagation()},className:Ze+"-input",size:o.getInputSize(),value:n.search,readOnly:!t.searchable,onClick:function(){return o.dropDown("open")},onKeyPress:this.handleKeyPress,onChange:o.setSearch,onBlur:this.onBlur,placeholder:nt(t,n),disabled:t.disabled})},t}(t.Component),at=Le("input",{target:"e11wid6y0"})("line-height:inherit;border:none;margin-left:5px;background:transparent;padding:0;width:calc(",(function(e){return e.size+"ch"})," + 5px);font-size:smaller;",(function(e){return e.readOnly&&"cursor: pointer;"})," :focus{outline:none;}");const st=ot;var it=Le("div",{target:"e1gn6jc30"})({name:"1m5113o",styles:"display:flex;flex:1;flex-wrap:wrap"});const ct=function(e){var t=e.props,n=e.state,o=e.methods;return r().createElement(it,{className:Ze+"-content "+(t.multi?Ze+"-type-multi":Ze+"-type-single"),onClick:function(e){e.stopPropagation(),o.dropDown("open")}},t.contentRenderer?t.contentRenderer({props:t,state:n,methods:o}):r().createElement(r().Fragment,null,t.multi?n.values&&n.values.map((function(e){return r().createElement(et,{key:""+Xe(e,t.valueField)+Xe(e,t.labelField),item:e,state:n,props:t,methods:o})})):n.values&&0<n.values.length&&r().createElement("span",null,Xe(n.values[0],t.labelField)),r().createElement(st,{props:t,methods:o,state:n})))};var lt=Le("div",{target:"e1l5ho1t0"})("padding:10px;text-align:center;color:",(function(e){return e.color}),";");const ut=function(e){var t=e.props,n=e.state,o=e.methods;return t.noDataRenderer?t.noDataRenderer({props:t,state:n,methods:o}):r().createElement(lt,{className:Ze+"-no-data",color:t.color},t.noDataLabel)};var pt=function(e){function t(){for(var t,n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];return function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(o))||this),"item",r().createRef()),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props,t=e.props,r=e.methods;this.item.current&&!t.multi&&t.keepSelectedInList&&r.isSelected(this.props.item)&&this.item.current.scrollIntoView({block:"nearest",inline:"start"})},n.componentDidUpdate=function(){this.props.state.cursor===this.props.itemIndex&&this.item.current&&this.item.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},n.render=function(){var e=this.props,t=e.props,n=e.state,o=e.methods,a=e.item,s=e.itemIndex;return t.itemRenderer?t.itemRenderer({item:a,itemIndex:s,props:t,state:n,methods:o}):!t.keepSelectedInList&&o.isSelected(a)?null:r().createElement(dt,{role:"option",ref:this.item,"aria-selected":o.isSelected(a),"aria-disabled":a.disabled,"aria-label":Xe(a,t.labelField),disabled:a.disabled,key:""+Xe(a,t.valueField)+Xe(a,t.labelField),tabIndex:"-1",className:Ze+"-item "+(o.isSelected(a)?Ze+"-item-selected":"")+" "+(n.cursor===s?Ze+"-item-active":"")+" "+(a.disabled?Ze+"-item-disabled":""),onClick:a.disabled?void 0:function(){return o.addItem(a)},onKeyPress:a.disabled?void 0:function(){return o.addItem(a)},color:t.color},Xe(a,t.labelField)," ",a.disabled&&r().createElement("ins",null,t.disabledLabel))},t}(t.Component),dt=Le("span",{target:"evc32pp0"})("padding:5px 10px;cursor:pointer;border-bottom:1px solid #fff;&.",Ze,"-item-active{border-bottom:1px solid #fff;",(function(e){var t=e.disabled,r=e.color;return!t&&r&&"background: "+We(r,.1)+";"}),";}:hover,:focus{background:",(function(e){var t=e.color;return t&&We(t,.1)}),";outline:none;}&.",Ze,"-item-selected{",(function(e){var t=e.disabled,r=e.color;return t?"\n background: #f2f2f2;\n color: #ccc;\n ":"\n background: "+r+";\n color: #fff;\n border-bottom: 1px solid #fff;\n "}),";}",(function(e){return e.disabled?"\n background: #f2f2f2;\n color: #ccc;\n\n ins {\n text-decoration: none;\n border:1px solid #ccc;\n border-radius: 2px;\n padding: 0px 3px;\n font-size: x-small;\n text-transform: uppercase;\n }\n ":""}),";");const ft=pt;var ht=function(e,t){var r=t.getSelectRef().getBoundingClientRect(),n=r.bottom+parseInt(e.dropdownHeight,10)+parseInt(e.dropdownGap,10);return"auto"===e.dropdownPosition?n>Je().innerHeight&&n>r.top?"top":"bottom":e.dropdownPosition},mt=Le("div",{target:"e1qjn9k91"})("position:absolute;",(function(e){var t=e.selectBounds,r=e.dropdownGap;return"top"===e.dropdownPosition?"bottom: "+(t.height+2+r)+"px":"top: "+(t.height+2+r)+"px"}),";",(function(e){var t=e.selectBounds,r=e.dropdownGap,n=e.dropdownPosition;return e.portal?"\n position: fixed;\n "+("bottom"===n?"top: "+(t.bottom+r)+"px;":"bottom: "+(Je().innerHeight-t.top+r)+"px;")+"\n left: "+(t.left-1)+"px;":"left: -1px;"}),";border:1px solid #ccc;width:",(function(e){return e.selectBounds.width}),"px;padding:0;display:flex;flex-direction:column;background:#fff;border-radius:2px;box-shadow:0 0 10px 0 ",(function(){return We("#000000",.2)}),";max-height:",(function(e){return e.dropdownHeight}),";overflow:auto;z-index:9;:focus{outline:none;}"),vt=Le("div",{target:"e1qjn9k90"})("color:",(function(e){return e.color}),";padding:5px 10px;:hover{background:",(function(e){var t=e.color;return t&&We(t,.1)}),";outline:none;cursor:pointer;}");const gt=function(e){var t=e.props,n=e.state,o=e.methods;return r().createElement(mt,{tabIndex:"-1","aria-expanded":"true",role:"list",dropdownPosition:ht(t,o),selectBounds:n.selectBounds,portal:t.portal,dropdownGap:t.dropdownGap,dropdownHeight:t.dropdownHeight,className:Ze+"-dropdown "+Ze+"-dropdown-position-"+ht(t,o)},t.dropdownRenderer?t.dropdownRenderer({props:t,state:n,methods:o}):r().createElement(r().Fragment,null,t.create&&n.search&&!Ge(n.search,[].concat(n.values,t.options),t)&&r().createElement(vt,{role:"button",className:Ze+"-dropdown-add-new",color:t.color,onClick:function(){return o.createNew(n.search)}},t.createNewLabel.replace("{search}",'"'+n.search+'"')),0===n.searchResults.length?r().createElement(ut,{className:Ze+"-no-data",state:n,props:t,methods:o}):n.searchResults.map((function(e,a){return r().createElement(ft,{key:e[t.valueField].toString(),item:e,itemIndex:a,state:n,props:t,methods:o})}))))};var yt=Le("div",{target:"e1l5cpc30"})("@keyframes dual-ring-spin{0%{transform:rotate(0deg);}100%{transform:rotate(180deg);}}padding:0 5px;display:block;width:auto;height:auto;:after{content:' ';display:block;width:16px;height:16px;border-radius:50%;border-width:1px;border-style:solid;border-color:",(function(e){return e.color})," transparent;animation:dual-ring-spin 0.7s ease-in-out infinite;margin:0 0 0 -10px;}");const bt=function(e){var t=e.props;return t.loadingRenderer?t.loadingRenderer({props:t}):r().createElement(yt,{className:Ze+"-loading",color:t.color})};var wt=Le("div",{target:"e11qlq5e0"})({name:"992gsg",styles:"line-height:25px;margin:0 10px;cursor:pointer;:focus{outline:none;}:hover{color:tomato;}"});const xt=function(e){var t=e.props,n=e.state,o=e.methods;return t.clearRenderer?t.clearRenderer({props:t,state:n,methods:o}):r().createElement(wt,{className:Ze+"-clear",tabIndex:"-1",onClick:function(){return o.clearAll()},onKeyPress:function(){return o.clearAll()}},"×")};var kt=Le("div",{target:"e19h5j1v0"})({name:"cmi1n0",styles:"border-left:1px solid #ccc;width:1px;height:25px;display:block"});const St=function(e){var t=e.props,n=e.state,o=e.methods;return t.separatorRenderer?t.separatorRenderer({props:t,state:n,methods:o}):r().createElement(kt,{className:Ze+"-separator"})};var Ct=Le("div",{target:"e1vudypg0"})("text-align:center;",(function(e){var t=e.dropdownOpen,r=e.rotate;return t?"\n pointer-events: all;\n "+(r?"transform: rotate(0deg);margin: 0px 0 -3px 5px;":"")+"\n ":"\n pointer-events: none;\n "+(r?"margin: 0 0 0 5px;transform: rotate(180deg);":"")+"\n "}),";cursor:pointer;svg{width:16px;height:16px;}:hover{path{stroke:",(function(e){return e.color}),";}}:focus{outline:none;path{stroke:",(function(e){return e.color}),";}}");const Rt=function(e){var t=e.props,n=e.state,o=e.methods;return r().createElement(Ct,{tabIndex:"-1",onClick:function(e){return o.dropDown(n.dropdown?"close":"open",e)},dropdownOpen:n.dropdown,onKeyPress:function(e){return o.dropDown("toggle",e)},onKeyDown:function(e){return o.dropDown("toggle",e)},className:Ze+"-dropdown-handle",rotate:t.dropdownHandleRenderer?0:1,color:t.color},t.dropdownHandleRenderer?t.dropdownHandleRenderer({props:t,state:n,methods:o}):r().createElement("svg",{fill:"currentColor",viewBox:"0 0 40 40"},r().createElement("path",{d:"M31 26.4q0 .3-.2.5l-1.1 1.2q-.3.2-.6.2t-.5-.2l-8.7-8.8-8.8 8.8q-.2.2-.5.2t-.5-.2l-1.2-1.2q-.2-.2-.2-.5t.2-.5l10.4-10.4q.3-.2.6-.2t.5.2l10.4 10.4q.2.2.2.5z"})))};function At(){return At=Object.assign||function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},At.apply(this,arguments)}function Et(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ot=function(e){function t(t){var n;return Dt(Et(n=e.call(this,t)||this),"onDropdownClose",(function(){n.setState({cursor:null}),n.props.onDropdownClose()})),Dt(Et(n),"onScroll",(function(){n.props.closeOnScroll&&n.dropDown("close"),n.updateSelectBounds()})),Dt(Et(n),"updateSelectBounds",(function(){return n.select.current&&n.setState({selectBounds:n.select.current.getBoundingClientRect()})})),Dt(Et(n),"getSelectBounds",(function(){return n.state.selectBounds})),Dt(Et(n),"dropDown",(function(e,t,r){void 0===e&&(e="toggle"),void 0===r&&(r=!1);var o=t&&t.target||t&&t.srcElement;return void 0!==n.props.onDropdownCloseRequest&&n.state.dropdown&&!1===r&&"close"===e?n.props.onDropdownCloseRequest({props:n.props,methods:n.methods,state:n.state,close:function(){return n.dropDown("close",null,!0)}}):n.props.portal&&!n.props.closeOnScroll&&!n.props.closeOnSelect&&t&&o&&o.offsetParent&&o.offsetParent.classList.contains("react-dropdown-select-dropdown")?void 0:n.props.keepOpen?n.setState({dropdown:!0}):"close"===e&&n.state.dropdown?(n.select.current.blur(),n.setState({dropdown:!1,search:n.props.clearOnBlur?"":n.state.search,searchResults:n.props.options})):"open"!==e||n.state.dropdown?"toggle"===e&&(n.select.current.focus(),n.setState({dropdown:!n.state.dropdown})):n.setState({dropdown:!0})})),Dt(Et(n),"getSelectRef",(function(){return n.select.current})),Dt(Et(n),"addItem",(function(e){if(n.props.multi){if(Ge(Xe(e,n.props.valueField),n.state.values,n.props))return n.removeItem(null,e,!1);n.setState({values:[].concat(n.state.values,[e])})}else n.setState({values:[e],dropdown:!1});return n.props.clearOnSelect&&n.setState({search:""},(function(){n.setState({searchResults:n.searchResults()})})),!0})),Dt(Et(n),"removeItem",(function(e,t,r){void 0===r&&(r=!1),e&&r&&(e.preventDefault(),e.stopPropagation(),n.dropDown("close")),n.setState({values:n.state.values.filter((function(e){return Xe(e,n.props.valueField)!==Xe(t,n.props.valueField)}))})})),Dt(Et(n),"setSearch",(function(e){n.setState({cursor:null}),n.setState({search:e.target.value},(function(){n.setState({searchResults:n.searchResults()})}))})),Dt(Et(n),"getInputSize",(function(){return n.state.search?n.state.search.length:0<n.state.values.length?n.props.addPlaceholder.length:n.props.placeholder.length})),Dt(Et(n),"toggleSelectAll",(function(){return n.setState({values:0===n.state.values.length?n.selectAll():n.clearAll()})})),Dt(Et(n),"clearAll",(function(){n.props.onClearAll(),n.setState({values:[]})})),Dt(Et(n),"selectAll",(function(e){void 0===e&&(e=[]),n.props.onSelectAll();var t=0<e.length?e:n.props.options.filter((function(e){return!e.disabled}));n.setState({values:t})})),Dt(Et(n),"isSelected",(function(e){return!!n.state.values.find((function(t){return Xe(t,n.props.valueField)===Xe(e,n.props.valueField)}))})),Dt(Et(n),"areAllSelected",(function(){return n.state.values.length===n.props.options.filter((function(e){return!e.disabled})).length})),Dt(Et(n),"safeString",(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})),Dt(Et(n),"sortBy",(function(){var e=n.props,t=e.sortBy,r=e.options;return t?(r.sort((function(e,r){return Ye(e,t)<Ye(r,t)?-1:Ye(e,t)>Ye(r,t)?1:0})),r):r})),Dt(Et(n),"searchFn",(function(e){var t=e.state,r=e.methods,o=new RegExp(r.safeString(t.search),"i");return r.sortBy().filter((function(e){return o.test(Xe(e,n.props.searchBy)||Xe(e,n.props.valueField))}))})),Dt(Et(n),"searchResults",(function(){var e={state:n.state,props:n.props,methods:n.methods};return n.props.searchFn(e)||n.searchFn(e)})),Dt(Et(n),"activeCursorItem",(function(e){return n.setState({activeCursorItem:e})})),Dt(Et(n),"handleKeyDown",(function(e){var t={event:e,state:n.state,props:n.props,methods:n.methods,setState:n.setState.bind(Et(n))};return n.props.handleKeyDownFn(t)||n.handleKeyDownFn(t)})),Dt(Et(n),"handleKeyDownFn",(function(e){var t=e.event,r=e.state,o=e.props,a=e.methods,s=e.setState,i=r.cursor,c=r.searchResults,l="Escape"===t.key,u="Enter"===t.key,p="ArrowUp"===t.key,d="ArrowDown"===t.key,f="Backspace"===t.key,h="Tab"===t.key&&!t.shiftKey,m=t.shiftKey&&"Tab"===t.key;if(d&&!r.dropdown)return t.preventDefault(),n.dropDown("open"),s({cursor:0});if((d||h&&r.dropdown)&&null===i)return s({cursor:0});if((p||d||m&&r.dropdown||h&&r.dropdown)&&t.preventDefault(),l&&n.dropDown("close"),u){var v=c[i];if(v&&!v.disabled){if(o.create&&Ge(r.search,r.values,o))return null;a.addItem(v)}}return(d||h&&r.dropdown)&&c.length===i?s({cursor:0}):((d||h&&r.dropdown)&&s((function(e){return{cursor:e.cursor+1}})),(p||m&&r.dropdown)&&0<i&&s((function(e){return{cursor:e.cursor-1}})),(p||m&&r.dropdown)&&0===i&&s({cursor:c.length}),void(f&&o.backspaceDelete&&0===n.getInputSize()&&n.setState({values:n.state.values.slice(0,-1)})))})),Dt(Et(n),"renderDropdown",(function(){return n.props.portal?Me().createPortal(r().createElement(gt,{props:n.props,state:n.state,methods:n.methods}),n.dropdownRoot):r().createElement(gt,{props:n.props,state:n.state,methods:n.methods})})),Dt(Et(n),"createNew",(function(e){var t,r=((t={})[n.props.labelField]=e,t[n.props.valueField]=e,t);n.addItem(r),n.props.onCreateNew(r),n.setState({search:""})})),n.state={dropdown:!1,values:t.values,search:"",selectBounds:{},cursor:null,searchResults:t.options},n.methods={removeItem:n.removeItem,dropDown:n.dropDown,addItem:n.addItem,setSearch:n.setSearch,getInputSize:n.getInputSize,toggleSelectAll:n.toggleSelectAll,clearAll:n.clearAll,selectAll:n.selectAll,searchResults:n.searchResults,getSelectRef:n.getSelectRef,isSelected:n.isSelected,getSelectBounds:n.getSelectBounds,areAllSelected:n.areAllSelected,handleKeyDown:n.handleKeyDown,activeCursorItem:n.activeCursorItem,createNew:n.createNew,sortBy:n.sortBy,safeString:n.safeString},n.select=r().createRef(),n.dropdownRoot="undefined"!=typeof document&&document.createElement("div"),n}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.portal&&this.props.portal.appendChild(this.dropdownRoot),Je().addEventListener("resize",Ve(this.updateSelectBounds)),Je().addEventListener("scroll",Ve(this.onScroll)),this.dropDown("close"),this.select&&this.updateSelectBounds()},n.componentDidUpdate=function(e,t){var r=this;!this.props.compareValuesFunc(e.values,this.props.values)&&this.props.compareValuesFunc(e.values,t.values)&&(this.setState({values:this.props.values},(function(){r.props.onChange(r.state.values)})),this.updateSelectBounds()),e.options!==this.props.options&&this.setState({searchResults:this.searchResults()}),t.values!==this.state.values&&(this.props.onChange(this.state.values),this.updateSelectBounds()),t.search!==this.state.search&&this.updateSelectBounds(),t.values!==this.state.values&&this.props.closeOnSelect&&this.dropDown("close"),e.multi!==this.props.multi&&this.updateSelectBounds(),t.dropdown&&t.dropdown!==this.state.dropdown&&this.onDropdownClose(),t.dropdown||t.dropdown===this.state.dropdown||this.props.onDropdownOpen()},n.componentWillUnmount=function(){this.props.portal&&this.props.portal.removeChild(this.dropdownRoot),Je().removeEventListener("resize",Ve(this.updateSelectBounds,this.props.debounceDelay)),Je().removeEventListener("scroll",Ve(this.onScroll,this.props.debounceDelay))},n.render=function(){var e=this;return r().createElement(Ue,{onClickOutside:function(t){return e.dropDown("close",t)}},r().createElement(Pt,At({onKeyDown:this.handleKeyDown,"aria-label":"Dropdown select","aria-expanded":this.state.dropdown,onClick:function(t){return e.dropDown("open",t)},tabIndex:this.props.disabled?"-1":"0",direction:this.props.direction,style:this.props.style,ref:this.select,disabled:this.props.disabled,className:Ze+" "+this.props.className,color:this.props.color},this.props.additionalProps),r().createElement(ct,{props:this.props,state:this.state,methods:this.methods}),(this.props.name||this.props.required)&&r().createElement("input",{tabIndex:-1,style:{opacity:0,width:0,position:"absolute"},name:this.props.name,required:this.props.required,pattern:this.props.pattern,defaultValue:this.state.values.map((function(t){return t[e.props.labelField]})).toString()||[],disabled:this.props.disabled}),this.props.loading&&r().createElement(bt,{props:this.props}),this.props.clearable&&r().createElement(xt,{props:this.props,state:this.state,methods:this.methods}),this.props.separator&&r().createElement(St,{props:this.props,state:this.state,methods:this.methods}),this.props.dropdownHandle&&r().createElement(Rt,{onClick:function(){return e.select.current.focus()},props:this.props,state:this.state,methods:this.methods}),this.state.dropdown&&!this.props.disabled&&this.renderDropdown()))},t}(t.Component);Ot.defaultProps={addPlaceholder:"",placeholder:"Select...",values:[],options:[],multi:!1,disabled:!1,searchBy:"label",sortBy:null,clearable:!1,searchable:!0,dropdownHandle:!0,separator:!1,keepOpen:void 0,noDataLabel:"No data",createNewLabel:"add {search}",disabledLabel:"disabled",dropdownGap:5,closeOnScroll:!1,debounceDelay:0,labelField:"label",valueField:"value",color:"#0074D9",keepSelectedInList:!0,closeOnSelect:!1,clearOnBlur:!0,clearOnSelect:!0,dropdownPosition:"bottom",dropdownHeight:"300px",autoFocus:!1,portal:null,create:!1,direction:"ltr",name:null,required:!1,pattern:void 0,onChange:function(){},onDropdownOpen:function(){},onDropdownClose:function(){},onDropdownCloseRequest:void 0,onClearAll:function(){},onSelectAll:function(){},onCreateNew:function(){},searchFn:function(){},handleKeyDownFn:function(){},additionalProps:null,backspaceDelete:!0,compareValuesFunc:function(e,t){return JSON.stringify(e)===JSON.stringify(t)}};var Pt=Le("div",{target:"e1gzf2xs0"})("box-sizing:border-box;position:relative;display:flex;border:1px solid #ccc;width:100%;border-radius:2px;padding:2px 5px;flex-direction:row;direction:",(function(e){return e.direction}),";align-items:center;cursor:pointer;min-height:36px;",(function(e){return e.disabled?"cursor: not-allowed;pointer-events: none;opacity: 0.3;":"pointer-events: all;"})," :hover,:focus-within{border-color:",(function(e){return e.color}),";}:focus,:focus-within{outline:0;box-shadow:0 0 0 3px ",(function(e){var t=e.color;return We(t,.2)}),";}*{box-sizing:border-box;}");const _t=Ot})(),s})())); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("prop-types")):"function"==typeof define&&define.amd?define("reactDropdownSelect",["react","react-dom","prop-types"],t):"object"==typeof exports?exports.reactDropdownSelect=t(require("react"),require("react-dom"),require("prop-types")):e.reactDropdownSelect=t(e.React,e.ReactDOM,e.PropTypes)}(this,((e,t,r)=>(()=>{"use strict";var n={602:e=>{e.exports=r},359:t=>{t.exports=e},318:e=>{e.exports=t}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{function e(){return e=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},e.apply(this,arguments)}a.r(s),a.d(s,{Select:()=>Ft,default:()=>Bt});var t=a(359),r=a.n(t);function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=n((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),c=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),l=Math.abs,u=String.fromCharCode,p=Object.assign;function d(e){return e.trim()}function f(e,t,r){return e.replace(t,r)}function h(e,t){return e.indexOf(t)}function m(e,t){return 0|e.charCodeAt(t)}function v(e,t,r){return e.slice(t,r)}function g(e){return e.length}function b(e){return e.length}function y(e,t){return t.push(e),e}var w=1,x=1,k=0,S=0,C=0,O="";function A(e,t,r,n,o,a,s){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:w,column:x,length:s,return:""}}function P(e,t){return p(A("",null,null,"",null,null,0),e,{length:-e.length},t)}function R(){return C=S>0?m(O,--S):0,x--,10===C&&(x=1,w--),C}function E(){return C=S<k?m(O,S++):0,x++,10===C&&(x=1,w++),C}function D(){return m(O,S)}function _(){return S}function I(e,t){return v(O,e,t)}function j(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function F(e){return w=x=1,k=g(O=e),S=0,[]}function N(e){return O="",e}function B(e){return d(I(S-1,$(91===e?e+2:40===e?e+1:e)))}function T(e){for(;(C=D())&&C<33;)E();return j(e)>2||j(C)>3?"":" "}function L(e,t){for(;--t&&E()&&!(C<48||C>102||C>57&&C<65||C>70&&C<97););return I(e,_()+(t<6&&32==D()&&32==E()))}function $(e){for(;E();)switch(C){case e:return S;case 34:case 39:34!==e&&39!==e&&$(C);break;case 40:41===e&&$(e);break;case 92:E()}return S}function z(e,t){for(;E()&&e+C!==57&&(e+C!==84||47!==D()););return"/*"+I(t,S-1)+"*"+u(47===e?e:E())}function q(e){for(;!j(D());)E();return I(e,S)}var M="-ms-",H="-moz-",K="-webkit-",U="comm",G="rule",W="decl",V="@keyframes";function X(e,t){for(var r="",n=b(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Y(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case W:return e.return=e.return||e.value;case U:return"";case V:return e.return=e.value+"{"+X(e.children,n)+"}";case G:e.value=e.props.join(",")}return g(r=X(e.children,n))?e.return=e.value+"{"+r+"}":""}function J(e){var t=b(e);return function(r,n,o,a){for(var s="",i=0;i<t;i++)s+=e[i](r,n,o,a)||"";return s}}function Z(e){return N(Q("",null,null,null,[""],e=F(e),0,[0],e))}function Q(e,t,r,n,o,a,s,i,c){for(var l=0,p=0,d=s,v=0,b=0,w=0,x=1,k=1,S=1,C=0,O="",A=o,P=a,I=n,j=O;k;)switch(w=C,C=E()){case 40:if(108!=w&&58==m(j,d-1)){-1!=h(j+=f(B(C),"&","&\f"),"&\f")&&(S=-1);break}case 34:case 39:case 91:j+=B(C);break;case 9:case 10:case 13:case 32:j+=T(w);break;case 92:j+=L(_()-1,7);continue;case 47:switch(D()){case 42:case 47:y(te(z(E(),_()),t,r),c);break;default:j+="/"}break;case 123*x:i[l++]=g(j)*S;case 125*x:case 59:case 0:switch(C){case 0:case 125:k=0;case 59+p:-1==S&&(j=f(j,/\f/g,"")),b>0&&g(j)-d&&y(b>32?re(j+";",n,r,d-1):re(f(j," ","")+";",n,r,d-2),c);break;case 59:j+=";";default:if(y(I=ee(j,t,r,l,p,o,i,O,A=[],P=[],d),a),123===C)if(0===p)Q(j,t,I,I,A,a,d,i,P);else switch(99===v&&110===m(j,3)?100:v){case 100:case 108:case 109:case 115:Q(e,I,I,n&&y(ee(e,I,I,0,0,o,i,O,o,A=[],d),P),o,P,d,i,n?A:P);break;default:Q(j,I,I,I,[""],P,0,i,P)}}l=p=b=0,x=S=1,O=j="",d=s;break;case 58:d=1+g(j),b=w;default:if(x<1)if(123==C)--x;else if(125==C&&0==x++&&125==R())continue;switch(j+=u(C),C*x){case 38:S=p>0?1:(j+="\f",-1);break;case 44:i[l++]=(g(j)-1)*S,S=1;break;case 64:45===D()&&(j+=B(E())),v=D(),p=d=g(O=j+=q(_())),C++;break;case 45:45===w&&2==g(j)&&(x=0)}}return a}function ee(e,t,r,n,o,a,s,i,c,u,p){for(var h=o-1,m=0===o?a:[""],g=b(m),y=0,w=0,x=0;y<n;++y)for(var k=0,S=v(e,h+1,h=l(w=s[y])),C=e;k<g;++k)(C=d(w>0?m[k]+" "+S:f(S,/&\f/g,m[k])))&&(c[x++]=C);return A(e,t,r,0===o?G:i,c,u,p)}function te(e,t,r){return A(e,t,r,U,u(C),v(e,2,-2),0)}function re(e,t,r,n){return A(e,t,r,W,v(e,0,n),v(e,n+1,-1),n)}var ne=function(e,t,r){for(var n=0,o=0;n=o,o=D(),38===n&&12===o&&(t[r]=1),!j(o);)E();return I(e,S)},oe=new WeakMap,ae=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||oe.get(r))&&!n){oe.set(e,!0);for(var o=[],a=function(e,t){return N(function(e,t){var r=-1,n=44;do{switch(j(n)){case 0:38===n&&12===D()&&(t[r]=1),e[r]+=ne(S-1,t,r);break;case 2:e[r]+=B(n);break;case 4:if(44===n){e[++r]=58===D()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=u(n)}}while(n=E());return e}(F(e),t))}(t,o),s=r.props,i=0,c=0;i<a.length;i++)for(var l=0;l<s.length;l++,c++)e.props[c]=o[i]?a[i].replace(/&\f/g,s[l]):s[l]+" "+a[i]}}},se=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ie(e,t){switch(function(e,t){return 45^m(e,0)?(((t<<2^m(e,0))<<2^m(e,1))<<2^m(e,2))<<2^m(e,3):0}(e,t)){case 5103:return K+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return K+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return K+e+H+e+M+e+e;case 6828:case 4268:return K+e+M+e+e;case 6165:return K+e+M+"flex-"+e+e;case 5187:return K+e+f(e,/(\w+).+(:[^]+)/,K+"box-$1$2"+M+"flex-$1$2")+e;case 5443:return K+e+M+"flex-item-"+f(e,/flex-|-self/,"")+e;case 4675:return K+e+M+"flex-line-pack"+f(e,/align-content|flex-|-self/,"")+e;case 5548:return K+e+M+f(e,"shrink","negative")+e;case 5292:return K+e+M+f(e,"basis","preferred-size")+e;case 6060:return K+"box-"+f(e,"-grow","")+K+e+M+f(e,"grow","positive")+e;case 4554:return K+f(e,/([^-])(transform)/g,"$1"+K+"$2")+e;case 6187:return f(f(f(e,/(zoom-|grab)/,K+"$1"),/(image-set)/,K+"$1"),e,"")+e;case 5495:case 3959:return f(e,/(image-set\([^]*)/,K+"$1$`$1");case 4968:return f(f(e,/(.+:)(flex-)?(.*)/,K+"box-pack:$3"+M+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+K+e+e;case 4095:case 3583:case 4068:case 2532:return f(e,/(.+)-inline(.+)/,K+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(g(e)-1-t>6)switch(m(e,t+1)){case 109:if(45!==m(e,t+4))break;case 102:return f(e,/(.+:)(.+)-([^]+)/,"$1"+K+"$2-$3$1"+H+(108==m(e,t+3)?"$3":"$2-$3"))+e;case 115:return~h(e,"stretch")?ie(f(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==m(e,t+1))break;case 6444:switch(m(e,g(e)-3-(~h(e,"!important")&&10))){case 107:return f(e,":",":"+K)+e;case 101:return f(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+K+(45===m(e,14)?"inline-":"")+"box$3$1"+K+"$2$3$1"+M+"$2box$3")+e}break;case 5936:switch(m(e,t+11)){case 114:return K+e+M+f(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return K+e+M+f(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return K+e+M+f(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return K+e+M+e+e}return e}var ce,le,ue="undefined"!=typeof document,pe=ue?void 0:(ce=function(){return e=function(){var e={};return function(t){return e[t]}},t=Object.create(null),function(r){return void 0===t[r]&&(t[r]=e()),t[r]};var e,t},le=new WeakMap,function(e){if(le.has(e))return le.get(e);var t=ce();return le.set(e,t),t}),de=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case W:e.return=ie(e.value,e.length);break;case V:return X([P(e,{value:f(e.value,"@","@"+K)})],n);case G:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return X([P(e,{props:[f(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return X([P(e,{props:[f(t,/:(plac\w+)/,":"+K+"input-$1")]}),P(e,{props:[f(t,/:(plac\w+)/,":-moz-$1")]}),P(e,{props:[f(t,/:(plac\w+)/,M+"input-$1")]})],n)}return""}))}}],fe=function(e){var t=e.key;if(ue&&"css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var n,o,a=e.stylisPlugins||de,s={},i=[];ue&&(n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)s[t[r]]=!0;i.push(e)})));var l,u=[ae,se];if(ue){var p,d=[Y,(l=function(e){p.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],f=J(u.concat(a,d));o=function(e,t,r,n){p=r,X(Z(e?e+"{"+t.styles+"}":t.styles),f),n&&(g.inserted[t.name]=!0)}}else{var h=[Y],m=J(u.concat(a,h)),v=pe(a)(t);o=function(e,t,r,n){var o=t.name,a=function(e,t){var r=t.name;return void 0===v[r]&&(v[r]=X(Z(e?e+"{"+t.styles+"}":t.styles),m)),v[r]}(e,t);return void 0===g.compat?(n&&(g.inserted[o]=!0),a):n?void(g.inserted[o]=a):a}}var g={key:t,sheet:new c({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return g.sheet.hydrate(i),g},he="undefined"!=typeof document,me=!!t.useInsertionEffect&&t.useInsertionEffect,ve=he&&me||function(e){return e()},ge=(me||t.useLayoutEffect,"undefined"!=typeof document),be=t.createContext("undefined"!=typeof HTMLElement?fe({key:"css"}):null);be.Provider;var ye=function(e){return(0,t.forwardRef)((function(r,n){var o=(0,t.useContext)(be);return e(r,o,n)}))};ge||(ye=function(e){return function(r){var n=(0,t.useContext)(be);return null===n?(n=fe({key:"css"}),t.createElement(be.Provider,{value:n},e(r,n))):e(r,n)}});var we=t.createContext({}),xe="undefined"!=typeof document,ke=function(e,t,r){var n=e.key+"-"+t.name;(!1===r||!1===xe&&void 0!==e.compat)&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},Se={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ce(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var Oe=/[A-Z]|^ms/g,Ae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pe=function(e){return 45===e.charCodeAt(1)},Re=function(e){return null!=e&&"boolean"!=typeof e},Ee=Ce((function(e){return Pe(e)?e:e.replace(Oe,"-$&").toLowerCase()})),De=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ae,(function(e,t,r){return Ie={name:t,styles:r,next:Ie},t}))}return 1===Se[e]||Pe(e)||"number"!=typeof t||0===t?t:t+"px"};function _e(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return Ie={name:r.name,styles:r.styles,next:Ie},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)Ie={name:n.name,styles:n.styles,next:Ie},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=_e(e,t,r[o])+";";else for(var a in r){var s=r[a];if("object"!=typeof s)null!=t&&void 0!==t[s]?n+=a+"{"+t[s]+"}":Re(s)&&(n+=Ee(a)+":"+De(a,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var i=_e(e,t,s);switch(a){case"animation":case"animationName":n+=Ee(a)+":"+i+";";break;default:n+=a+"{"+i+"}"}}else for(var c=0;c<s.length;c++)Re(s[c])&&(n+=Ee(a)+":"+De(a,s[c])+";")}return n}(e,t,r);case"function":if(void 0!==e){var o=Ie,a=r(e);return Ie=o,_e(e,t,a)}}if(null==t)return r;var s=t[r];return void 0!==s?s:r}var Ie,je=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Fe=i,Ne=function(e){return"theme"!==e},Be=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Fe:Ne},Te=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},Le="undefined"!=typeof document,$e=function(e){var r=e.cache,n=e.serialized,o=e.isStringTag;ke(r,n,o);var a=ve((function(){return function(e,t,r){ke(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o="",a=t;do{var s=e.insert(t===a?"."+n:"",a,e.sheet,!0);xe||void 0===s||(o+=s),a=a.next}while(void 0!==a);if(!xe&&0!==o.length)return o}}(r,n,o)}));if(!Le&&void 0!==a){for(var s,i=n.name,c=n.next;void 0!==c;)i+=" "+c.name,c=c.next;return t.createElement("style",((s={})["data-emotion"]=r.key+" "+i,s.dangerouslySetInnerHTML={__html:a},s.nonce=r.sheet.nonce,s))}return null},ze=function r(n,o){var a,s,i=n.__emotion_real===n,c=i&&n.__emotion_base||n;void 0!==o&&(a=o.label,s=o.target);var l=Te(n,o,i),u=l||Be(c),p=!u("as");return function(){var d=arguments,f=i&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==a&&f.push("label:"+a+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{f.push(d[0][0]);for(var h=d.length,m=1;m<h;m++)f.push(d[m],d[0][m])}var v=ye((function(e,r,n){var o,a,i,d,h=p&&e.as||c,m="",v=[],g=e;if(null==e.theme){for(var b in g={},e)g[b]=e[b];g.theme=t.useContext(we)}"string"==typeof e.className?(o=r.registered,a=v,i=e.className,d="",i.split(" ").forEach((function(e){void 0!==o[e]?a.push(o[e]+";"):d+=e+" "})),m=d):null!=e.className&&(m=e.className+" ");var y=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,o="";Ie=void 0;var a=e[0];null==a||void 0===a.raw?(n=!1,o+=_e(r,t,a)):o+=a[0];for(var s=1;s<e.length;s++)o+=_e(r,t,e[s]),n&&(o+=a[s]);je.lastIndex=0;for(var i,c="";null!==(i=je.exec(o));)c+="-"+i[1];var l=function(e){for(var t,r=0,n=0,o=e.length;o>=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:Ie}}(f.concat(v),r.registered,g);m+=r.key+"-"+y.name,void 0!==s&&(m+=" "+s);var w=p&&void 0===l?Be(h):u,x={};for(var k in e)p&&"as"===k||w(k)&&(x[k]=e[k]);return x.className=m,x.ref=n,t.createElement(t.Fragment,null,t.createElement($e,{cache:r,serialized:y,isStringTag:"string"==typeof h}),t.createElement(h,x))}));return v.displayName=void 0!==a?a:"Styled("+("string"==typeof c?c:c.displayName||c.name||"Component")+")",v.defaultProps=n.defaultProps,v.__emotion_real=v,v.__emotion_base=c,v.__emotion_styles=f,v.__emotion_forwardProp=l,Object.defineProperty(v,"toString",{value:function(){return"."+s}}),v.withComponent=function(t,n){return r(t,e({},o,n,{shouldForwardProp:Te(v,n,!0)})).apply(void 0,f)},v}},qe=a(318),Me=a.n(qe);function He(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ke(e,t){return Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ke(e,t)}function Ue(e,t,r){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}a(602);const Ge=function(e){function t(){for(var t,n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];return Ue(He(t=e.call.apply(e,[this].concat(o))||this),"container",r().createRef()),Ue(He(t),"handleClick",(function(e){var r=t.container.current,n=e.target,o=t.props.onClickOutside;(r&&r===n||r&&!r.contains(n))&&o(e)})),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ke(e,t)}(t,e);var n=t.prototype;return n.componentDidMount=function(){document.addEventListener("click",this.handleClick,!0)},n.componentWillUnmount=function(){document.removeEventListener("click",this.handleClick,!0)},n.render=function(){var e=this.props,t=e.className,n=e.children;return r().createElement("div",{className:t,ref:this.container},n)},t}(r().Component);var We=function(e,t,r){return!!t.find((function(t){return Ye(t,r.valueField)===e||Ye(t,r.labelField)===e}))},Ve=function(e,t){return 4===e.length&&(e=""+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"}"),"rgba("+parseInt(e.slice(1,3),16)+", "+parseInt(e.slice(3,5),16)+", "+parseInt(e.slice(5,7),16)+(t&&", "+t)+")"},Xe=function(e,t){var r;return void 0===t&&(t=0),function(){for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];r&&clearTimeout(r),r=setTimeout((function(){e.apply(void 0,o),r=null}),t)}},Ye=function(e,t){return t?t.split(".").reduce((function(e,t){return e[t]}),e):void 0},Je=function(e,t,r){if(!t)return e;var n=Array.isArray(t)?t:t.split(".").filter((function(e){return e.length}));return n.length?Je(e[n.shift()],n,r):void 0===e?r:e},Ze=function(){return"undefined"==typeof window&&(global.window={}),window},Qe="react-dropdown-select",et=ze("span",{target:"e1l4eby50"})("padding:0 5px;border-radius:2px;line-height:21px;margin:3px 0 3px 5px;background:",(function(e){return e.color}),";color:#fff;display:flex;flex-direction:",(function(e){return"rtl"===e.direction?"row-reverse":"row"}),";.",Qe,"-option-remove{cursor:pointer;width:22px;height:22px;display:inline-block;text-align:center;margin:0 -5px 0 0px;border-radius:0 3px 3px 0;:hover{color:tomato;}}:hover,:hover>span{opacity:0.9;}");const tt=function(e){var t=e.item,n=e.props,o=e.state,a=e.methods;return t&&n.optionRenderer?n.optionRenderer({item:t,props:n,state:o,methods:a}):r().createElement(et,{role:"listitem",disabled:n.disabled,direction:n.direction,className:Qe+"-option",color:n.color},r().createElement("span",{className:Qe+"-option-label"},Ye(t,n.labelField)),r().createElement("span",{className:Qe+"-option-remove",onClick:function(e){return a.removeItem(e,t,n.closeOnSelect)}},"×"))};function rt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}function ot(e,t,r){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var at=function(e,t){var r=e.addPlaceholder,n=e.searchable,o=e.placeholder,a=t.values&&0===t.values.length;return t.values&&0<t.values.length&&r&&n?r:a?o:""},st=function(e){function t(){for(var t,n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];return ot(rt(t=e.call.apply(e,[this].concat(o))||this),"input",r().createRef()),ot(rt(t),"onBlur",(function(e){return e.stopPropagation(),t.props.state.dropdown?t.input.current.focus():t.input.current.blur()})),ot(rt(t),"handleKeyPress",(function(e){var r=t.props,n=r.props,o=r.state,a=r.methods;return n.create&&"Enter"===e.key&&!We(o.search,[].concat(o.values,n.options),t.props)&&o.search&&null===o.cursor&&a.createNew(o.search)})),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nt(e,t)}(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){(this.props.state.dropdown||e.state.dropdown!==this.props.state.dropdown&&this.props.state.dropdown||this.props.props.autoFocus)&&this.input.current.focus(),e.state.dropdown===this.props.state.dropdown||this.props.state.dropdown||this.input.current.blur()},n.render=function(){var e=this.props,t=e.props,n=e.state,o=e.methods;return t.inputRenderer?t.inputRenderer({props:t,state:n,methods:o,inputRef:this.input}):r().createElement(it,{ref:this.input,tabIndex:"-1",onFocus:function(e){return e.stopPropagation()},className:Qe+"-input",size:o.getInputSize(),value:n.search,readOnly:!t.searchable,onClick:function(){return o.dropDown("open")},onKeyPress:this.handleKeyPress,onChange:o.setSearch,onBlur:this.onBlur,placeholder:at(t,n),disabled:t.disabled})},t}(t.Component),it=ze("input",{target:"e11wid6y0"})("line-height:inherit;border:none;margin-left:5px;background:transparent;padding:0;width:calc(",(function(e){return e.size+"ch"})," + 5px);font-size:smaller;",(function(e){return e.readOnly&&"cursor: pointer;"})," :focus{outline:none;}");const ct=st;var lt=ze("div",{target:"e1gn6jc30"})({name:"1m5113o",styles:"display:flex;flex:1;flex-wrap:wrap"});const ut=function(e){var t=e.props,n=e.state,o=e.methods;return r().createElement(lt,{className:Qe+"-content "+(t.multi?Qe+"-type-multi":Qe+"-type-single"),onClick:function(e){e.stopPropagation(),o.dropDown("open")}},t.contentRenderer?t.contentRenderer({props:t,state:n,methods:o}):r().createElement(r().Fragment,null,t.multi?n.values&&n.values.map((function(e){return r().createElement(tt,{key:""+Ye(e,t.valueField)+Ye(e,t.labelField),item:e,state:n,props:t,methods:o})})):n.values&&0<n.values.length&&r().createElement("span",null,Ye(n.values[0],t.labelField)),r().createElement(ct,{props:t,methods:o,state:n})))};var pt=ze("div",{target:"e1l5ho1t0"})("padding:10px;text-align:center;color:",(function(e){return e.color}),";");const dt=function(e){var t=e.props,n=e.state,o=e.methods;return t.noDataRenderer?t.noDataRenderer({props:t,state:n,methods:o}):r().createElement(pt,{className:Qe+"-no-data",color:t.color},t.noDataLabel)};function ft(e,t){return ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ft(e,t)}var ht=function(e){function t(){for(var t,n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];return function(e,t,r){t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(o))||this),"item",r().createRef()),t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ft(e,t)}(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props,t=e.props,r=e.methods;this.item.current&&!t.multi&&t.keepSelectedInList&&r.isSelected(this.props.item)&&this.item.current.scrollIntoView({block:"nearest",inline:"start"})},n.componentDidUpdate=function(){this.props.state.cursor===this.props.itemIndex&&this.item.current&&this.item.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},n.render=function(){var e=this.props,t=e.props,n=e.state,o=e.methods,a=e.item,s=e.itemIndex;return t.itemRenderer?t.itemRenderer({item:a,itemIndex:s,props:t,state:n,methods:o}):!t.keepSelectedInList&&o.isSelected(a)?null:r().createElement(mt,{role:"option",ref:this.item,"aria-selected":o.isSelected(a),"aria-disabled":a.disabled,"aria-label":Ye(a,t.labelField),disabled:a.disabled,key:""+Ye(a,t.valueField)+Ye(a,t.labelField),tabIndex:"-1",className:Qe+"-item "+(o.isSelected(a)?Qe+"-item-selected":"")+" "+(n.cursor===s?Qe+"-item-active":"")+" "+(a.disabled?Qe+"-item-disabled":""),onClick:a.disabled?void 0:function(){return o.addItem(a)},onKeyPress:a.disabled?void 0:function(){return o.addItem(a)},color:t.color},Ye(a,t.labelField)," ",a.disabled&&r().createElement("ins",null,t.disabledLabel))},t}(t.Component),mt=ze("span",{target:"evc32pp0"})("padding:5px 10px;cursor:pointer;border-bottom:1px solid #fff;&.",Qe,"-item-active{border-bottom:1px solid #fff;",(function(e){var t=e.disabled,r=e.color;return!t&&r&&"background: "+Ve(r,.1)+";"}),";}:hover,:focus{background:",(function(e){var t=e.color;return t&&Ve(t,.1)}),";outline:none;}&.",Qe,"-item-selected{",(function(e){var t=e.disabled,r=e.color;return t?"\n background: #f2f2f2;\n color: #ccc;\n ":"\n background: "+r+";\n color: #fff;\n border-bottom: 1px solid #fff;\n "}),";}",(function(e){return e.disabled?"\n background: #f2f2f2;\n color: #ccc;\n\n ins {\n text-decoration: none;\n border:1px solid #ccc;\n border-radius: 2px;\n padding: 0px 3px;\n font-size: x-small;\n text-transform: uppercase;\n }\n ":""}),";");const vt=ht;var gt=function(e,t){var r=t.getSelectRef().getBoundingClientRect(),n=r.bottom+parseInt(e.dropdownHeight,10)+parseInt(e.dropdownGap,10);return"auto"===e.dropdownPosition?n>Ze().innerHeight&&n>r.top?"top":"bottom":e.dropdownPosition},bt=ze("div",{target:"e1qjn9k92"})("position:absolute;",(function(e){var t=e.selectBounds,r=e.dropdownGap;return"top"===e.dropdownPosition?"bottom: "+(t.height+2+r)+"px":"top: "+(t.height+2+r)+"px"}),";",(function(e){var t=e.selectBounds,r=e.dropdownGap,n=e.dropdownPosition;return e.portal?"\n position: fixed;\n "+("bottom"===n?"top: "+(t.bottom+r)+"px;":"bottom: "+(Ze().innerHeight-t.top+r)+"px;")+"\n left: "+(t.left-1)+"px;":"left: -1px;"}),";border:1px solid #ccc;width:",(function(e){return e.selectBounds.width}),"px;padding:0;display:flex;flex-direction:column;background:#fff;border-radius:2px;box-shadow:0 0 10px 0 ",(function(){return Ve("#000000",.2)}),";max-height:",(function(e){return e.dropdownHeight}),";overflow:auto;z-index:9;:focus{outline:none;}"),yt=ze("div",{target:"e1qjn9k91"})("color:",(function(e){return e.color}),";padding:5px 10px;:hover{background:",(function(e){var t=e.color;return t&&Ve(t,.1)}),";outline:none;cursor:pointer;}"),wt=ze("div",{target:"e1qjn9k90"})("color:",(function(e){return e.color}),";padding:5px 10px;position:sticky;bottom:0;margin:0;opacity:1;background:#fff;box-shadow:0 0 10px 0 ",(function(){return Ve("#000000",.2)}),";:hover{outline:none;cursor:pointer;}");const xt=function(e){var t=e.props,n=e.state,o=e.methods;return r().createElement(bt,{tabIndex:"-1","aria-expanded":"true",role:"list",dropdownPosition:gt(t,o),selectBounds:n.selectBounds,portal:t.portal,dropdownGap:t.dropdownGap,dropdownHeight:t.dropdownHeight,className:Qe+"-dropdown "+Qe+"-dropdown-position-"+gt(t,o)},t.dropdownRenderer?t.dropdownRenderer({props:t,state:n,methods:o}):r().createElement(r().Fragment,null,t.create&&n.search&&!We(n.search,[].concat(n.values,t.options),t)&&r().createElement(yt,{role:"button",className:Qe+"-dropdown-add-new",color:t.color,onClick:function(){return o.createNew(n.search)}},t.createNewLabel.replace("{search}",'"'+n.search+'"')),0===n.searchResults.length?r().createElement(dt,{className:Qe+"-no-data",state:n,props:t,methods:o}):n.searchResults.map((function(e,a){return r().createElement(vt,{key:e[t.valueField].toString(),item:e,itemIndex:a,state:n,props:t,methods:o})})),t.selectAll&&t.options&&t.multi&&r().createElement(wt,{role:"button",className:Qe+"-dropdown-select-all",color:t.color,onClick:function(){return o.areAllSelected()?o.clearAll():o.selectAll()}},o.areAllSelected()?t.clearAllLabel:t.selectAllLabel)))};var kt=ze("div",{target:"e1l5cpc30"})("@keyframes dual-ring-spin{0%{transform:rotate(0deg);}100%{transform:rotate(180deg);}}padding:0 5px;display:block;width:auto;height:auto;:after{content:' ';display:block;width:16px;height:16px;border-radius:50%;border-width:1px;border-style:solid;border-color:",(function(e){return e.color})," transparent;animation:dual-ring-spin 0.7s ease-in-out infinite;margin:0 0 0 -10px;}");const St=function(e){var t=e.props;return t.loadingRenderer?t.loadingRenderer({props:t}):r().createElement(kt,{className:Qe+"-loading",color:t.color})};var Ct=ze("div",{target:"e11qlq5e0"})({name:"992gsg",styles:"line-height:25px;margin:0 10px;cursor:pointer;:focus{outline:none;}:hover{color:tomato;}"});const Ot=function(e){var t=e.props,n=e.state,o=e.methods;return t.clearRenderer?t.clearRenderer({props:t,state:n,methods:o}):r().createElement(Ct,{className:Qe+"-clear",tabIndex:"-1",onClick:function(){return o.clearAll()},onKeyPress:function(){return o.clearAll()}},"×")};var At=ze("div",{target:"e19h5j1v0"})({name:"cmi1n0",styles:"border-left:1px solid #ccc;width:1px;height:25px;display:block"});const Pt=function(e){var t=e.props,n=e.state,o=e.methods;return t.separatorRenderer?t.separatorRenderer({props:t,state:n,methods:o}):r().createElement(At,{className:Qe+"-separator"})};var Rt=ze("div",{target:"e1vudypg0"})("text-align:center;",(function(e){var t=e.dropdownOpen,r=e.rotate;return t?"\n pointer-events: all;\n "+(r?"transform: rotate(0deg);margin: 0px 0 -3px 5px;":"")+"\n ":"\n pointer-events: none;\n "+(r?"margin: 0 0 0 5px;transform: rotate(180deg);":"")+"\n "}),";cursor:pointer;svg{width:16px;height:16px;}:hover{path{stroke:",(function(e){return e.color}),";}}:focus{outline:none;path{stroke:",(function(e){return e.color}),";}}");const Et=function(e){var t=e.props,n=e.state,o=e.methods;return r().createElement(Rt,{tabIndex:"-1",onClick:function(e){return o.dropDown(n.dropdown?"close":"open",e)},dropdownOpen:n.dropdown,onKeyPress:function(e){return o.dropDown("toggle",e)},onKeyDown:function(e){return o.dropDown("toggle",e)},className:Qe+"-dropdown-handle",rotate:t.dropdownHandleRenderer?0:1,color:t.color},t.dropdownHandleRenderer?t.dropdownHandleRenderer({props:t,state:n,methods:o}):r().createElement("svg",{fill:"currentColor",viewBox:"0 0 40 40"},r().createElement("path",{d:"M31 26.4q0 .3-.2.5l-1.1 1.2q-.3.2-.6.2t-.5-.2l-8.7-8.8-8.8 8.8q-.2.2-.5.2t-.5-.2l-1.2-1.2q-.2-.2-.2-.5t.2-.5l10.4-10.4q.3-.2.6-.2t.5.2l10.4 10.4q.2.2.2.5z"})))};function Dt(){return Dt=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},Dt.apply(this,arguments)}function _t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function It(e,t){return It=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},It(e,t)}function jt(e,t,r){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ft=function(e){function t(t){var n;return jt(_t(n=e.call(this,t)||this),"onDropdownClose",(function(){n.setState({cursor:null}),n.props.onDropdownClose()})),jt(_t(n),"onScroll",(function(){n.props.closeOnScroll&&n.dropDown("close"),n.updateSelectBounds()})),jt(_t(n),"updateSelectBounds",(function(){return n.select.current&&n.setState({selectBounds:n.select.current.getBoundingClientRect()})})),jt(_t(n),"getSelectBounds",(function(){return n.state.selectBounds})),jt(_t(n),"dropDown",(function(e,t,r){void 0===e&&(e="toggle"),void 0===r&&(r=!1);var o=t&&t.target||t&&t.srcElement;return void 0!==n.props.onDropdownCloseRequest&&n.state.dropdown&&!1===r&&"close"===e?n.props.onDropdownCloseRequest({props:n.props,methods:n.methods,state:n.state,close:function(){return n.dropDown("close",null,!0)}}):n.props.portal&&!n.props.closeOnScroll&&!n.props.closeOnSelect&&t&&o&&o.offsetParent&&o.offsetParent.classList.contains("react-dropdown-select-dropdown")?void 0:n.props.keepOpen?n.setState({dropdown:!0}):"close"===e&&n.state.dropdown?(n.select.current.blur(),n.setState({dropdown:!1,search:n.props.clearOnBlur?"":n.state.search,searchResults:n.props.options})):"open"!==e||n.state.dropdown?"toggle"===e&&(n.select.current.focus(),n.setState({dropdown:!n.state.dropdown})):n.setState({dropdown:!0})})),jt(_t(n),"getSelectRef",(function(){return n.select.current})),jt(_t(n),"addItem",(function(e){if(n.props.multi){if(We(Ye(e,n.props.valueField),n.state.values,n.props))return n.removeItem(null,e,!1);n.setState({values:[].concat(n.state.values,[e])})}else n.setState({values:[e],dropdown:!1});return n.props.clearOnSelect&&n.setState({search:""},(function(){n.setState({searchResults:n.searchResults()})})),!0})),jt(_t(n),"removeItem",(function(e,t,r){void 0===r&&(r=!1),e&&r&&(e.preventDefault(),e.stopPropagation(),n.dropDown("close")),n.setState({values:n.state.values.filter((function(e){return Ye(e,n.props.valueField)!==Ye(t,n.props.valueField)}))})})),jt(_t(n),"setSearch",(function(e){n.setState({cursor:null}),n.setState({search:e.target.value},(function(){n.setState({searchResults:n.searchResults()})}))})),jt(_t(n),"getInputSize",(function(){return n.state.search?n.state.search.length:0<n.state.values.length?n.props.addPlaceholder.length:n.props.placeholder.length})),jt(_t(n),"toggleSelectAll",(function(){return n.setState({values:0===n.state.values.length?n.selectAll():n.clearAll()})})),jt(_t(n),"clearAll",(function(){n.props.onClearAll(),n.setState({values:[]})})),jt(_t(n),"selectAll",(function(e){void 0===e&&(e=[]),n.props.onSelectAll();var t=0<e.length?e:n.props.options.filter((function(e){return!e.disabled}));n.setState({values:t})})),jt(_t(n),"isSelected",(function(e){return!!n.state.values.find((function(t){return Ye(t,n.props.valueField)===Ye(e,n.props.valueField)}))})),jt(_t(n),"areAllSelected",(function(){return n.state.values.length===n.props.options.filter((function(e){return!e.disabled})).length})),jt(_t(n),"safeString",(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})),jt(_t(n),"sortBy",(function(){var e=n.props,t=e.sortBy,r=e.options;return t?(r.sort((function(e,r){return Je(e,t)<Je(r,t)?-1:Je(e,t)>Je(r,t)?1:0})),r):r})),jt(_t(n),"searchFn",(function(e){var t=e.state,r=e.methods,o=new RegExp(r.safeString(t.search),"i");return r.sortBy().filter((function(e){return o.test(Ye(e,n.props.searchBy)||Ye(e,n.props.valueField))}))})),jt(_t(n),"searchResults",(function(){var e={state:n.state,props:n.props,methods:n.methods};return n.props.searchFn(e)||n.searchFn(e)})),jt(_t(n),"activeCursorItem",(function(e){return n.setState({activeCursorItem:e})})),jt(_t(n),"handleKeyDown",(function(e){var t={event:e,state:n.state,props:n.props,methods:n.methods,setState:n.setState.bind(_t(n))};return n.props.handleKeyDownFn(t)||n.handleKeyDownFn(t)})),jt(_t(n),"handleKeyDownFn",(function(e){var t=e.event,r=e.state,o=e.props,a=e.methods,s=e.setState,i=r.cursor,c=r.searchResults,l="Escape"===t.key,u="Enter"===t.key,p="ArrowUp"===t.key,d="ArrowDown"===t.key,f="Backspace"===t.key,h="Tab"===t.key&&!t.shiftKey,m=t.shiftKey&&"Tab"===t.key;if(d&&!r.dropdown)return t.preventDefault(),n.dropDown("open"),s({cursor:0});if((d||h&&r.dropdown)&&null===i)return s({cursor:0});if((p||d||m&&r.dropdown||h&&r.dropdown)&&t.preventDefault(),l&&n.dropDown("close"),u){var v=c[i];if(v&&!v.disabled){if(o.create&&We(r.search,r.values,o))return null;a.addItem(v)}}return(d||h&&r.dropdown)&&c.length===i?s({cursor:0}):((d||h&&r.dropdown)&&s((function(e){return{cursor:e.cursor+1}})),(p||m&&r.dropdown)&&0<i&&s((function(e){return{cursor:e.cursor-1}})),(p||m&&r.dropdown)&&0===i&&s({cursor:c.length}),void(f&&o.backspaceDelete&&0===n.getInputSize()&&n.setState({values:n.state.values.slice(0,-1)})))})),jt(_t(n),"renderDropdown",(function(){return n.props.portal?Me().createPortal(r().createElement(xt,{props:n.props,state:n.state,methods:n.methods}),n.dropdownRoot):r().createElement(xt,{props:n.props,state:n.state,methods:n.methods})})),jt(_t(n),"createNew",(function(e){var t,r=((t={})[n.props.labelField]=e,t[n.props.valueField]=e,t);n.addItem(r),n.props.onCreateNew(r),n.setState({search:""})})),n.state={dropdown:!1,values:t.values,search:"",selectBounds:{},cursor:null,searchResults:t.options},n.methods={removeItem:n.removeItem,dropDown:n.dropDown,addItem:n.addItem,setSearch:n.setSearch,getInputSize:n.getInputSize,toggleSelectAll:n.toggleSelectAll,clearAll:n.clearAll,selectAll:n.selectAll,searchResults:n.searchResults,getSelectRef:n.getSelectRef,isSelected:n.isSelected,getSelectBounds:n.getSelectBounds,areAllSelected:n.areAllSelected,handleKeyDown:n.handleKeyDown,activeCursorItem:n.activeCursorItem,createNew:n.createNew,sortBy:n.sortBy,safeString:n.safeString},n.select=r().createRef(),n.dropdownRoot="undefined"!=typeof document&&document.createElement("div"),n}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,It(e,t)}(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.portal&&this.props.portal.appendChild(this.dropdownRoot),Ze().addEventListener("resize",Xe(this.updateSelectBounds)),Ze().addEventListener("scroll",Xe(this.onScroll)),this.dropDown("close"),this.select&&this.updateSelectBounds()},n.componentDidUpdate=function(e,t){var r=this;!this.props.compareValuesFunc(e.values,this.props.values)&&this.props.compareValuesFunc(e.values,t.values)&&(this.setState({values:this.props.values},(function(){r.props.onChange(r.state.values)})),this.updateSelectBounds()),e.options!==this.props.options&&this.setState({searchResults:this.searchResults()}),t.values!==this.state.values&&(this.props.onChange(this.state.values),this.updateSelectBounds()),t.search!==this.state.search&&this.updateSelectBounds(),t.values!==this.state.values&&this.props.closeOnSelect&&this.dropDown("close"),e.multi!==this.props.multi&&this.updateSelectBounds(),t.dropdown&&t.dropdown!==this.state.dropdown&&this.onDropdownClose(),t.dropdown||t.dropdown===this.state.dropdown||this.props.onDropdownOpen()},n.componentWillUnmount=function(){this.props.portal&&this.props.portal.removeChild(this.dropdownRoot),Ze().removeEventListener("resize",Xe(this.updateSelectBounds,this.props.debounceDelay)),Ze().removeEventListener("scroll",Xe(this.onScroll,this.props.debounceDelay))},n.render=function(){var e=this;return r().createElement(Ge,{onClickOutside:function(t){return e.dropDown("close",t)}},r().createElement(Nt,Dt({onKeyDown:this.handleKeyDown,"aria-label":"Dropdown select","aria-expanded":this.state.dropdown,onClick:function(t){return e.dropDown("open",t)},tabIndex:this.props.disabled?"-1":"0",direction:this.props.direction,style:this.props.style,ref:this.select,disabled:this.props.disabled,className:Qe+" "+this.props.className,color:this.props.color},this.props.additionalProps),r().createElement(ut,{props:this.props,state:this.state,methods:this.methods}),(this.props.name||this.props.required)&&r().createElement("input",{tabIndex:-1,style:{opacity:0,width:0,position:"absolute"},name:this.props.name,required:this.props.required,pattern:this.props.pattern,defaultValue:this.state.values.map((function(t){return t[e.props.labelField]})).toString()||[],disabled:this.props.disabled}),this.props.loading&&r().createElement(St,{props:this.props}),this.props.clearable&&r().createElement(Ot,{props:this.props,state:this.state,methods:this.methods}),this.props.separator&&r().createElement(Pt,{props:this.props,state:this.state,methods:this.methods}),this.props.dropdownHandle&&r().createElement(Et,{onClick:function(){return e.select.current.focus()},props:this.props,state:this.state,methods:this.methods}),this.state.dropdown&&!this.props.disabled&&this.renderDropdown()))},t}(t.Component);Ft.defaultProps={addPlaceholder:"",placeholder:"Select...",selectAll:!1,selectAllLabel:"Select all",clearAllLabel:"Clear all",values:[],options:[],multi:!1,disabled:!1,searchBy:"label",sortBy:null,clearable:!1,searchable:!0,dropdownHandle:!0,separator:!1,keepOpen:void 0,noDataLabel:"No data",createNewLabel:"add {search}",disabledLabel:"disabled",dropdownGap:5,closeOnScroll:!1,debounceDelay:0,labelField:"label",valueField:"value",color:"#0074D9",keepSelectedInList:!0,closeOnSelect:!1,clearOnBlur:!0,clearOnSelect:!0,dropdownPosition:"bottom",dropdownHeight:"300px",autoFocus:!1,portal:null,create:!1,direction:"ltr",name:null,required:!1,pattern:void 0,onChange:function(){},onDropdownOpen:function(){},onDropdownClose:function(){},onDropdownCloseRequest:void 0,onClearAll:function(){},onSelectAll:function(){},onCreateNew:function(){},searchFn:function(){},handleKeyDownFn:function(){},additionalProps:null,backspaceDelete:!0,compareValuesFunc:function(e,t){return JSON.stringify(e)===JSON.stringify(t)}};var Nt=ze("div",{target:"e1gzf2xs0"})("box-sizing:border-box;position:relative;display:flex;border:1px solid #ccc;width:100%;border-radius:2px;padding:2px 5px;flex-direction:row;direction:",(function(e){return e.direction}),";align-items:center;cursor:pointer;min-height:36px;",(function(e){return e.disabled?"cursor: not-allowed;pointer-events: none;opacity: 0.3;":"pointer-events: all;"})," :hover,:focus-within{border-color:",(function(e){return e.color}),";}:focus,:focus-within{outline:0;box-shadow:0 0 0 3px ",(function(e){var t=e.color;return Ve(t,.2)}),";}*{box-sizing:border-box;}");const Bt=Ft})(),s})())); |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _react=_interopRequireDefault(require("react")),_propTypes=_interopRequireDefault(require("prop-types"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var ClickOutside=/*#__PURE__*/function(a){function b(){for(var b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return b=a.call.apply(a,[this].concat(d))||this,_defineProperty(_assertThisInitialized(b),"container",_react.default.createRef()),_defineProperty(_assertThisInitialized(b),"handleClick",function(a){var c=b.container.current,d=a.target,e=b.props.onClickOutside;(c&&c===d||c&&!c.contains(d))&&e(a)}),b}_inheritsLoose(b,a);var c=b.prototype;return c.componentDidMount=function componentDidMount(){document.addEventListener("click",this.handleClick,!0)},c.componentWillUnmount=function componentWillUnmount(){document.removeEventListener("click",this.handleClick,!0)},c.render=function render(){var a=this.props,b=a.className,c=a.children;return _react.default.createElement("div",{className:b,ref:this.container},c)},b}(_react.default.Component),_default=ClickOutside;exports.default=_default; | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _react=_interopRequireDefault(require("react")),_propTypes=_interopRequireDefault(require("prop-types"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,_setPrototypeOf(a,b)}function _setPrototypeOf(a,b){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,b){return a.__proto__=b,a},_setPrototypeOf(a,b)}function _defineProperty(a,b,c){return b=_toPropertyKey(b),b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==typeof b?b:b+""}function _toPrimitive(a,b){if("object"!=typeof a||null===a)return a;var c=a[Symbol.toPrimitive];if(c!==void 0){var d=c.call(a,b||"default");if("object"!=typeof d)return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}var ClickOutside=/*#__PURE__*/function(a){function b(){for(var b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return b=a.call.apply(a,[this].concat(d))||this,_defineProperty(_assertThisInitialized(b),"container",_react.default.createRef()),_defineProperty(_assertThisInitialized(b),"handleClick",function(a){var c=b.container.current,d=a.target,e=b.props.onClickOutside;(c&&c===d||c&&!c.contains(d))&&e(a)}),b}_inheritsLoose(b,a);var c=b.prototype;return c.componentDidMount=function componentDidMount(){document.addEventListener("click",this.handleClick,!0)},c.componentWillUnmount=function componentWillUnmount(){document.removeEventListener("click",this.handleClick,!0)},c.render=function render(){var a=this.props,b=a.className,c=a.children;return _react.default.createElement("div",{className:b,ref:this.container},c)},b}(_react.default.Component),_default=ClickOutside;exports.default=_default; |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _base=_interopRequireDefault(require("@emotion/styled/base")),_react=_interopRequireDefault(require("react")),_constants=require("../constants"),_NoData=_interopRequireDefault(require("../components/NoData")),_Item=_interopRequireDefault(require("../components/Item")),_util=require("../util");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var dropdownPosition=function(a,b){var c=b.getSelectRef().getBoundingClientRect(),d=c.bottom+parseInt(a.dropdownHeight,10)+parseInt(a.dropdownGap,10);return"auto"===a.dropdownPosition?d>(0,_util.isomorphicWindow)().innerHeight&&d>c.top?"top":"bottom":a.dropdownPosition},Dropdown=function(a){var b=a.props,c=a.state,d=a.methods;return _react.default.createElement(DropDown,{tabIndex:"-1","aria-expanded":"true",role:"list",dropdownPosition:dropdownPosition(b,d),selectBounds:c.selectBounds,portal:b.portal,dropdownGap:b.dropdownGap,dropdownHeight:b.dropdownHeight,className:_constants.LIB_NAME+"-dropdown "+_constants.LIB_NAME+"-dropdown-position-"+dropdownPosition(b,d)},b.dropdownRenderer?b.dropdownRenderer({props:b,state:c,methods:d}):_react.default.createElement(_react.default.Fragment,null,b.create&&c.search&&!(0,_util.valueExistInSelected)(c.search,[].concat(c.values,b.options),b)&&_react.default.createElement(AddNew,{role:"button",className:_constants.LIB_NAME+"-dropdown-add-new",color:b.color,onClick:function onClick(){return d.createNew(c.search)}},b.createNewLabel.replace("{search}","\""+c.search+"\"")),0===c.searchResults.length?_react.default.createElement(_NoData.default,{className:_constants.LIB_NAME+"-no-data",state:c,props:b,methods:d}):c.searchResults.map(function(a,e){return _react.default.createElement(_Item.default,{key:a[b.valueField].toString(),item:a,itemIndex:e,state:c,props:b,methods:d})})))},DropDown=/*#__PURE__*/(0,_base.default)("div","production"===process.env.NODE_ENV?{target:"e1qjn9k91"}:{target:"e1qjn9k91",label:"DropDown"})("position:absolute;",function(a){var b=a.selectBounds,c=a.dropdownGap,d=a.dropdownPosition;return"top"===d?"bottom: "+(b.height+2+c)+"px":"top: "+(b.height+2+c)+"px"},";",function(a){var b=a.selectBounds,c=a.dropdownGap,d=a.dropdownPosition,e=a.portal;return e?"\n position: fixed;\n "+("bottom"===d?"top: "+(b.bottom+c)+"px;":"bottom: "+((0,_util.isomorphicWindow)().innerHeight-b.top+c)+"px;")+"\n left: "+(b.left-1)+"px;":"left: -1px;"},";border:1px solid #ccc;width:",function(a){var b=a.selectBounds;return b.width},"px;padding:0;display:flex;flex-direction:column;background:#fff;border-radius:2px;box-shadow:0 0 10px 0 ",function(){return(0,_util.hexToRGBA)("#000000",.2)},";max-height:",function(a){var b=a.dropdownHeight;return b},";overflow:auto;z-index:9;:focus{outline:none;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0Ryb3Bkb3duLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZFMkIiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvRHJvcGRvd24uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyBMSUJfTkFNRSB9IGZyb20gJy4uL2NvbnN0YW50cyc7XG5pbXBvcnQgTm9EYXRhIGZyb20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Cd7c2VhcmNofScsIGBcIiR7c3RhdGUuc2VhcmNofVwiYCl9XG4gICAgICAgICAgPC9BZGROZXc+XG4gICAgICAgICl9XG4gICAgICAgIHtzdGF0ZS5zZWFyY2hSZXN1bHRzLmxlbmd0aCA9PT0gMCA/IChcbiAgICAgICAgICA8Tm9EYXRhXG4gICAgICAgICAgICBjbGFzc05hbWU9e2Ake0xJQl9OQU1FfS1uby1kYXRhYH1cbiAgICAgICAgICAgIHN0YXRlPXtzdGF0ZX1cbiAgICAgICAgICAgIHByb3BzPXtwcm9wc31cbiAgICAgICAgICAgIG1ldGhvZHM9e21ldGhvZHN9XG4gICAgICAgICAgLz5cbiAgICAgICAgKSA6IChcbiAgICAgICAgICAgIHN0YXRlLnNlYXJjaFJlc3VsdHNcbiAgICAgICAgICAgICAgLm1hcCgoaXRlbSwgaXRlbUluZGV4KSA9PiAoXG4gICAgICAgICAgICAgICAgPEl0ZW1cbiAgICAgICAgICAgICAgICAgIGtleT17aXRlbVtwcm9wcy52YWx1ZUZpZWxkXS50b1N0cmluZygpfVxuICAgICAgICAgICAgICAgICAgaXRlbT17aXRlbX1cbiAgICAgICAgICAgICAgICAgIGl0ZW1JbmRleD17aXRlbUluZGV4fVxuICAgICAgICAgICAgICAgICAgc3RhdGU9e3N0YXRlfVxuICAgICAgICAgICAgICAgICAgcHJvcHM9e3Byb3BzfVxuICAgICAgICAgICAgICAgICAgbWV0aG9kcz17bWV0aG9kc31cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICApKVxuICAgICAgICAgICl9XG4gICAgICA8L1JlYWN0LkZyYWdtZW50PlxuICAgICl9XG4gIDwvRHJvcERvd24+XG4pO1xuXG5jb25zdCBEcm9wRG93biA9IHN0eWxlZC5kaXZgXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgJHsoeyBzZWxlY3RCb3VuZHMsIGRyb3Bkb3duR2FwLCBkcm9wZG93blBvc2l0aW9uIH0pID0+XG4gICAgZHJvcGRvd25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93OiBhdXRvO1xuICB6LWluZGV4OiA5O1xuXG4gIDpmb2N1cyB7XG4gICAgb3V0bGluZTogbm9uZTtcbiAgfVxufVxuYDtcblxuY29uc3QgQWRkTmV3ID0gc3R5bGVkLmRpdmBcbiAgY29sb3I6ICR7KHsgY29sb3IgfSkgPT4gY29sb3J9O1xuICBwYWRkaW5nOiA1cHggMTBweDtcblxuICA6aG92ZXIge1xuICAgIGJhY2tncm91bmQ6ICR7KHsgY29sb3IgfSkgPT4gY29sb3IgJiYgaGV4VG9SR0JBKGNvbG9yLCAwLjEpfTtcbiAgICBvdXRsaW5lOiBub25lO1xuICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgfVxuYDtcblxuZXhwb3J0IGRlZmF1bHQgRHJvcGRvd247XG4iXX0= */")),AddNew=/*#__PURE__*/(0,_base.default)("div","production"===process.env.NODE_ENV?{target:"e1qjn9k90"}:{target:"e1qjn9k90",label:"AddNew"})("color:",function(a){var b=a.color;return b},";padding:5px 10px;:hover{background:",function(a){var b=a.color;return b&&(0,_util.hexToRGBA)(b,.1)},";outline:none;cursor:pointer;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0Ryb3Bkb3duLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZHeUIiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvRHJvcGRvd24uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyBMSUJfTkFNRSB9IGZyb20gJy4uL2NvbnN0YW50cyc7XG5pbXBvcnQgTm9EYXRhIGZyb20gJy4uL2NvbXBvbmVudHMvTm9EYXRhJztcbmltcG9ydCBJd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9XG4gICAgICAgICAgPC9BZGROZXc+XG4gICAgICAgICl9XG4gICAgICAgIHtzdGF0ZS5zZWFyY2hSZXN1bHRzLmxlbmd0aCA9PT0gMCA/IChcbiAgICAgICAgICA8Tm9EYXRhXG4gICAgICAgICAgICBjbGFzc05hbWU9e2Ake0xJQl9OQU1FfS1uby1kYXRhYH1cbiAgICAgICAgICAgIHN0YXRlPXtzdGF0ZX1cbiAgICAgICAgICAgIHByb3BzPXtwcm9wc31cbiAgICAgICAgICAgIG1ldGhvZHM9e21ldGhvZHN9XG4gICAgICAgICAgLz5cbiAgICAgICAgKSA6IChcbiAgICAgICAgICAgIHN0YXRlLnNlYXJjaFJlc3VsdHNcbiAgICAgICAgICAgICAgLm1hcCgoaXRlbSwgaXRlbUluZGV4KSA9PiAoXG4gICAgICAgICAgICAgICAgPEl0ZW1cbiAgICAgICAgICAgICAgICAgIGtleT17aXRlbVtwcm9wcy52YWx1ZUZpZWxkXS50b1N0cmluZygpfVxuICAgICAgICAgICAgICAgICAgaXRlbT17aXRlbX1cbiAgICAgICAgICAgICAgICAgIGl0ZW1JbmRleD17aXRlbUluZGV4fVxuICAgICAgICAgICAgICAgICAgc3RhdGU9e3N0YXRlfVxuICAgICAgICAgICAgICAgICAgcHJvcHM9e3Byb3BzfVxuICAgICAgICAgICAgICAgICAgbWV0aG9kcz17bWV0aG9kc31cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICApKVxuICAgICAgICAgICl9XG4gICAgICA8L1JlYWN0LkZyYWdtZW50PlxuICAgICl9XG4gIDwvRHJvcERvd24+XG4pO1xuXG5jb25zdCBEcm9wRG93biA9IHN0eWxlZC5kaXZgXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgJHsoeyBzZWxlY3RCb3VuZHMsIGRyb3Bkb3duR2FwLCBkcm9wZG93blBvc2l0aW9uIH0pID0+XG4gICAgZHJvcGRvd25Qb3NpdGlvbiA9PT0gJ3RvcCdcbiAgICAgID8gYGJvdH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cyB7XG4gICAgb3V0bGluZTogbm9uZTtcbiAgfVxufVxuYDtcblxuY29uc3QgQWRkTmV3ID0gc3R5bGVkLmRpdmBcbiAgY29sb3I6ICR7KHsgY29sb3IgfSkgPT4gY29sb3J9O1xuICBwYWRkaW5nOiA1cHggMTBweDtcblxuICA6aG92ZXIge1xuICAgIGJhY2tncm91bmQ6ICR7KHsgY29sb3IgfSkgPT4gY29sb3IgJiYgaGV4VG9SR0JBKGNvbG9yLCAwLjEpfTtcbiAgICBvdXRsaW5lOiBub25lO1xuICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgfVxuYDtcblxuZXhwb3J0IGRlZmF1bHQgRHJvcGRvd247XG4iXX0= */")),_default=Dropdown;exports.default=_default; | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _base=_interopRequireDefault(require("@emotion/styled/base")),_react=_interopRequireDefault(require("react")),_constants=require("../constants"),_NoData=_interopRequireDefault(require("../components/NoData")),_Item=_interopRequireDefault(require("../components/Item")),_util=require("../util");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var dropdownPosition=function(a,b){var c=b.getSelectRef().getBoundingClientRect(),d=c.bottom+parseInt(a.dropdownHeight,10)+parseInt(a.dropdownGap,10);return"auto"===a.dropdownPosition?d>(0,_util.isomorphicWindow)().innerHeight&&d>c.top?"top":"bottom":a.dropdownPosition},Dropdown=function(a){var b=a.props,c=a.state,d=a.methods;return _react.default.createElement(DropDown,{tabIndex:"-1","aria-expanded":"true",role:"list",dropdownPosition:dropdownPosition(b,d),selectBounds:c.selectBounds,portal:b.portal,dropdownGap:b.dropdownGap,dropdownHeight:b.dropdownHeight,className:_constants.LIB_NAME+"-dropdown "+_constants.LIB_NAME+"-dropdown-position-"+dropdownPosition(b,d)},b.dropdownRenderer?b.dropdownRenderer({props:b,state:c,methods:d}):_react.default.createElement(_react.default.Fragment,null,b.create&&c.search&&!(0,_util.valueExistInSelected)(c.search,[].concat(c.values,b.options),b)&&_react.default.createElement(AddNew,{role:"button",className:_constants.LIB_NAME+"-dropdown-add-new",color:b.color,onClick:function onClick(){return d.createNew(c.search)}},b.createNewLabel.replace("{search}","\""+c.search+"\"")),0===c.searchResults.length?_react.default.createElement(_NoData.default,{className:_constants.LIB_NAME+"-no-data",state:c,props:b,methods:d}):c.searchResults.map(function(a,e){return _react.default.createElement(_Item.default,{key:a[b.valueField].toString(),item:a,itemIndex:e,state:c,props:b,methods:d})}),b.selectAll&&b.options&&b.multi&&_react.default.createElement(SelectAll,{role:"button",className:_constants.LIB_NAME+"-dropdown-select-all",color:b.color,onClick:function onClick(){return d.areAllSelected()?d.clearAll():d.selectAll()}},d.areAllSelected()?b.clearAllLabel:b.selectAllLabel)))},DropDown=/*#__PURE__*/(0,_base.default)("div","production"===process.env.NODE_ENV?{target:"e1qjn9k92"}:{target:"e1qjn9k92",label:"DropDown"})("position:absolute;",function(a){var b=a.selectBounds,c=a.dropdownGap,d=a.dropdownPosition;return"top"===d?"bottom: "+(b.height+2+c)+"px":"top: "+(b.height+2+c)+"px"},";",function(a){var b=a.selectBounds,c=a.dropdownGap,d=a.dropdownPosition,e=a.portal;return e?"\n position: fixed;\n "+("bottom"===d?"top: "+(b.bottom+c)+"px;":"bottom: "+((0,_util.isomorphicWindow)().innerHeight-b.top+c)+"px;")+"\n left: "+(b.left-1)+"px;":"left: -1px;"},";border:1px solid #ccc;width:",function(a){var b=a.selectBounds;return b.width},"px;padding:0;display:flex;flex-direction:column;background:#fff;border-radius:2px;box-shadow:0 0 10px 0 ",function(){return(0,_util.hexToRGBA)("#000000",.2)},";max-height:",function(a){var b=a.dropdownHeight;return b},";overflow:auto;z-index:9;:focus{outline:none;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0Ryb3Bkb3duLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXdGMkIiLCJm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AmJiBoZXhUb1JHQkEoY29sb3IsIDAuMSl9O1xuICAgIG91dGxpbmU6IG5vbmU7XG4gICAgY3Vyc29yOiBwb2ludGVyO1xuICB9XG5gO1xuXG5jb25zdCBTZWxlY3RBbGwgPSBzdHlsZWQuZGl2YFxuICBjb2xvcjogJHsoeyBjb2xvciB9KSA9PiBjb2xvcn07XG4gIHBhZGRpbmc6IDVweCAxMHB4O1xuICBwb3NpdGlvbjogc3RpY2t5O1xuICBib3R0b206IDA7XG4gIG1hcmdpbjogMDtcbiAgb3BhY2l0eTogMTtcbiAgYmFja2dyb3VuZDogI2ZmZjtcbiAgYm94LXNoYWRvdzogMCAwIDEwcHggMCAkeygpID0+IGhleFRvUkdCQSgnIzAwMDAwMCcsIDAuMil9O1xuXG4gIDpob3ZlciB7XG4gICAgb3V0bGluZTogbm9uZTtcbiAgICBjdXJzb3I6IHBvaW50ZXI7XG4gIH1cbmA7XG5cbmV4cG9ydCBkZWZhdWx0IERyb3Bkb3duO1xuIl19 */")),AddNew=/*#__PURE__*/(0,_base.default)("div","production"===process.env.NODE_ENV?{target:"e1qjn9k91"}:{target:"e1qjn9k91",label:"AddNew"})("color:",function(a){var b=a.color;return b},";padding:5px 10px;:hover{background:",function(a){var b=a.color;return b&&(0,_util.hexToRGBA)(b,.1)},";outline:none;cursor:pointer;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0Ryb3Bkb3duLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTRIeUIiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvRHJvcGRvd24uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXB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KSA9PiBjb2xvcn07XG4gIHBhZGRpbmc6IDVweCAxMHB4O1xuICBwb3NpdGlvbjogc3RpY2t5O1xuICBib3R0b206IDA7XG4gIG1hcmdpbjogMDtcbiAgb3BhY2l0eTogMTtcbiAgYmFja2dyb3VuZDogI2ZmZjtcbiAgYm94LXNoYWRvdzogMCAwIDEwcHggMCAkeygpID0+IGhleFRvUkdCQSgnIzAwMDAwMCcsIDAuMil9O1xuXG4gIDpob3ZlciB7XG4gICAgb3V0bGluZTogbm9uZTtcbiAgICBjdXJzb3I6IHBvaW50ZXI7XG4gIH1cbmA7XG5cbmV4cG9ydCBkZWZhdWx0IERyb3Bkb3duO1xuIl19 */")),SelectAll=/*#__PURE__*/(0,_base.default)("div","production"===process.env.NODE_ENV?{target:"e1qjn9k90"}:{target:"e1qjn9k90",label:"SelectAll"})("color:",function(a){var b=a.color;return b},";padding:5px 10px;position:sticky;bottom:0;margin:0;opacity:1;background:#fff;box-shadow:0 0 10px 0 ",function(){return(0,_util.hexToRGBA)("#000000",.2)},";:hover{outline:none;cursor:pointer;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0Ryb3Bkb3duLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVJNEIiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvRHJvcGRvd24uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyBMSUJfTkFNRSB9IGZyb20gJy4uL2NvbnN0YW50cyc7XG5pbXBvcnQgTm9EYXRhIGZyb20gJy4uL2NvbXBvbmVudHMvTm9EYXRhJztcbmltcG9ydCBJdGVtIGZyb20gJy4uL2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yb3VuZDogI2ZmZjtcbiAgYm94LXNoYWRvdzogMCAwIDEwcHggMCAkeygpID0+IGhleFRvUkdCQSgnIzAwMDAwMCcsIDAuMil9O1xuXG4gIDpob3ZlciB7XG4gICAgb3V0bGluZTogbm9uZTtcbiAgICBjdXJzb3I6IHBvaW50ZXI7XG4gIH1cbmA7XG5cbmV4cG9ydCBkZWZhdWx0IERyb3Bkb3duO1xuIl19 */")),_default=Dropdown;exports.default=_default; |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _base=_interopRequireDefault(require("@emotion/styled/base")),_react=_interopRequireWildcard(require("react")),_util=require("../util"),PropTypes=_interopRequireWildcard(require("prop-types")),_constants=require("../constants");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var a=new WeakMap;return _getRequireWildcardCache=function(){return a},a}function _interopRequireWildcard(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=_getRequireWildcardCache();if(b&&b.has(a))return b.get(a);var c={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in a)if(Object.prototype.hasOwnProperty.call(a,e)){var f=d?Object.getOwnPropertyDescriptor(a,e):null;f&&(f.get||f.set)?Object.defineProperty(c,e,f):c[e]=a[e]}return c.default=a,b&&b.set(a,c),c}function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var handlePlaceHolder=function(a,b){var c=a.addPlaceholder,d=a.searchable,e=a.placeholder,f=b.values&&0===b.values.length,g=b.values&&0<b.values.length;return g&&c&&d?c:f?e:g&&!d?"":""},Input=/*#__PURE__*/function(a){function b(){for(var b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return b=a.call.apply(a,[this].concat(d))||this,_defineProperty(_assertThisInitialized(b),"input",_react.default.createRef()),_defineProperty(_assertThisInitialized(b),"onBlur",function(a){return a.stopPropagation(),b.props.state.dropdown?b.input.current.focus():b.input.current.blur()}),_defineProperty(_assertThisInitialized(b),"handleKeyPress",function(a){var c=b.props,d=c.props,e=c.state,f=c.methods;return d.create&&"Enter"===a.key&&!(0,_util.valueExistInSelected)(e.search,[].concat(e.values,d.options),b.props)&&e.search&&null===e.cursor&&f.createNew(e.search)}),b}_inheritsLoose(b,a);var c=b.prototype;return c.componentDidUpdate=function componentDidUpdate(a){(this.props.state.dropdown||a.state.dropdown!==this.props.state.dropdown&&this.props.state.dropdown||this.props.props.autoFocus)&&this.input.current.focus(),a.state.dropdown===this.props.state.dropdown||this.props.state.dropdown||this.input.current.blur()},c.render=function render(){var a=this.props,b=a.props,c=a.state,d=a.methods;return b.inputRenderer?b.inputRenderer({props:b,state:c,methods:d,inputRef:this.input}):_react.default.createElement(InputComponent,{ref:this.input,tabIndex:"-1",onFocus:function onFocus(a){return a.stopPropagation()},className:_constants.LIB_NAME+"-input",size:d.getInputSize(),value:c.search,readOnly:!b.searchable,onClick:function onClick(){return d.dropDown("open")},onKeyPress:this.handleKeyPress,onChange:d.setSearch,onBlur:this.onBlur,placeholder:handlePlaceHolder(b,c),disabled:b.disabled})},b}(_react.Component),InputComponent=/*#__PURE__*/(0,_base.default)("input","production"===process.env.NODE_ENV?{target:"e11wid6y0"}:{target:"e11wid6y0",label:"InputComponent"})("line-height:inherit;border:none;margin-left:5px;background:transparent;padding:0;width:calc(",function(a){var b=a.size;return b+"ch"}," + 5px);font-size:smaller;",function(a){var b=a.readOnly;return b&&"cursor: pointer;"}," :focus{outline:none;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21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XtoYW5kbGVQbGFjZUhvbGRlcihwcm9wcywgc3RhdGUpfVxuICAgICAgICBkaXNhYmxlZD17cHJvcHMuZGlzYWJsZWR9XG4gICAgICAvPlxuICAgICk7XG4gIH1cbn1cblxuSW5wdXQucHJvcFR5cGVzID0ge1xuICBwcm9wczogUHJvcFR5cGVzLm9iamVjdCxcbiAgc3RhdGU6IFByb3BUeXBlcy5vYmplY3QsXG4gIG1ldGhvZHM6IFByb3BUeXBlcy5vYmplY3Rcbn07XG5cbmNvbnN0IElucHV0Q29tcG9uZW50ID0gc3R5bGVkLmlucHV0YFxuICBsaW5lLWhlaWdodDogaW5oZXJpdDtcbiAgYm9yZGVyOiBub25lO1xuICBtYXJnaW4tbGVmdDogNXB4O1xuICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbiAgcGFkZGluZzogMDtcbiAgd2lkdGg6IGNhbGMoJHsoeyBzaXplIH0pID0+IGAke3NpemV9Y2hgfSArIDVweCk7XG4gIGZvbnQtc2l6ZTogc21hbGxlcjtcbiAgJHsoeyByZWFkT25seSB9KSA9PiByZWFkT25seSAmJiAnY3Vyc29yOiBwb2ludGVyOyd9XG4gIDpmb2N1cyB7XG4gICAgb3V0bGluZTogbm9uZTtcbiAgfVxuYDtcblxuZXhwb3J0IGRlZmF1bHQgSW5wdXQ7XG4iXX0= */")),_default=Input;exports.default=_default; | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _base=_interopRequireDefault(require("@emotion/styled/base")),_react=_interopRequireWildcard(require("react")),_util=require("../util"),PropTypes=_interopRequireWildcard(require("prop-types")),_constants=require("../constants");function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d.default=a,c&&c.set(a,d),d}function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,_setPrototypeOf(a,b)}function _setPrototypeOf(a,b){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,b){return a.__proto__=b,a},_setPrototypeOf(a,b)}function _defineProperty(a,b,c){return b=_toPropertyKey(b),b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==typeof b?b:b+""}function _toPrimitive(a,b){if("object"!=typeof a||null===a)return a;var c=a[Symbol.toPrimitive];if(c!==void 0){var d=c.call(a,b||"default");if("object"!=typeof d)return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}var handlePlaceHolder=function(a,b){var c=a.addPlaceholder,d=a.searchable,e=a.placeholder,f=b.values&&0===b.values.length,g=b.values&&0<b.values.length;return g&&c&&d?c:f?e:g&&!d?"":""},Input=/*#__PURE__*/function(a){function b(){for(var b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return b=a.call.apply(a,[this].concat(d))||this,_defineProperty(_assertThisInitialized(b),"input",_react.default.createRef()),_defineProperty(_assertThisInitialized(b),"onBlur",function(a){return a.stopPropagation(),b.props.state.dropdown?b.input.current.focus():b.input.current.blur()}),_defineProperty(_assertThisInitialized(b),"handleKeyPress",function(a){var c=b.props,d=c.props,e=c.state,f=c.methods;return d.create&&"Enter"===a.key&&!(0,_util.valueExistInSelected)(e.search,[].concat(e.values,d.options),b.props)&&e.search&&null===e.cursor&&f.createNew(e.search)}),b}_inheritsLoose(b,a);var c=b.prototype;return c.componentDidUpdate=function componentDidUpdate(a){(this.props.state.dropdown||a.state.dropdown!==this.props.state.dropdown&&this.props.state.dropdown||this.props.props.autoFocus)&&this.input.current.focus(),a.state.dropdown===this.props.state.dropdown||this.props.state.dropdown||this.input.current.blur()},c.render=function render(){var a=this.props,b=a.props,c=a.state,d=a.methods;return b.inputRenderer?b.inputRenderer({props:b,state:c,methods:d,inputRef:this.input}):_react.default.createElement(InputComponent,{ref:this.input,tabIndex:"-1",onFocus:function onFocus(a){return a.stopPropagation()},className:_constants.LIB_NAME+"-input",size:d.getInputSize(),value:c.search,readOnly:!b.searchable,onClick:function onClick(){return d.dropDown("open")},onKeyPress:this.handleKeyPress,onChange:d.setSearch,onBlur:this.onBlur,placeholder:handlePlaceHolder(b,c),disabled:b.disabled})},b}(_react.Component),InputComponent=/*#__PURE__*/(0,_base.default)("input","production"===process.env.NODE_ENV?{target:"e11wid6y0"}:{target:"e11wid6y0",label:"InputComponent"})("line-height:inherit;border:none;margin-left:5px;background:transparent;padding:0;width:calc(",function(a){var b=a.size;return b+"ch"}," + 5px);font-size:smaller;",function(a){var b=a.readOnly;return b&&"cursor: pointer;"}," :focus{outline:none;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0lucHV0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlHbUMiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvSW5wdXQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgQ29tcG9uZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgdmFsdWV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bnN0IElucHV0Q29tcG9uZW50ID0gc3R5bGVkLmlucHV0YFxuICBsaW5lLWhlaWdodDogaW5oZXJpdDtcbiAgYm9yZGVyOiBub25lO1xuICBtYXJnaW4tbGVmdDogNXB4O1xuICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbiAgcGFkZGluZzogMDtcbiAgd2lkdGg6IGNhbGMoJHsoeyBzaXplIH0pID0+IGAke3NpemV9Y2hgfSArIDVweCk7XG4gIGZvbnQtc2l6ZTogc21hbGxlcjtcbiAgJHsoeyByZWFkT25seSB9KSA9PiByZWFkT25seSAmJiAnY3Vyc29yOiBwb2ludGVyOyd9XG4gIDpmb2N1cyB7XG4gICAgb3V0bGluZTogbm9uZTtcbiAgfVxuYDtcblxuZXhwb3J0IGRlZmF1bHQgSW5wdXQ7XG4iXX0= */")),_default=Input;exports.default=_default; |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _base=_interopRequireDefault(require("@emotion/styled/base")),_react=_interopRequireWildcard(require("react")),_util=require("../util"),PropTypes=_interopRequireWildcard(require("prop-types")),_constants=require("../constants");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var a=new WeakMap;return _getRequireWildcardCache=function(){return a},a}function _interopRequireWildcard(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=_getRequireWildcardCache();if(b&&b.has(a))return b.get(a);var c={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in a)if(Object.prototype.hasOwnProperty.call(a,e)){var f=d?Object.getOwnPropertyDescriptor(a,e):null;f&&(f.get||f.set)?Object.defineProperty(c,e,f):c[e]=a[e]}return c.default=a,b&&b.set(a,c),c}function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var Item=/*#__PURE__*/function(a){function b(){for(var b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return b=a.call.apply(a,[this].concat(d))||this,_defineProperty(_assertThisInitialized(b),"item",_react.default.createRef()),b}_inheritsLoose(b,a);var c=b.prototype;return c.componentDidMount=function componentDidMount(){var a=this.props,b=a.props,c=a.methods;this.item.current&&!b.multi&&b.keepSelectedInList&&c.isSelected(this.props.item)&&this.item.current.scrollIntoView({block:"nearest",inline:"start"})},c.componentDidUpdate=function componentDidUpdate(){this.props.state.cursor===this.props.itemIndex&&this.item.current&&this.item.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},c.render=function render(){var a=this.props,b=a.props,c=a.state,d=a.methods,e=a.item,f=a.itemIndex;return b.itemRenderer?b.itemRenderer({item:e,itemIndex:f,props:b,state:c,methods:d}):!b.keepSelectedInList&&d.isSelected(e)?null:_react.default.createElement(ItemComponent,{role:"option",ref:this.item,"aria-selected":d.isSelected(e),"aria-disabled":e.disabled,"aria-label":(0,_util.getByPath)(e,b.labelField),disabled:e.disabled,key:""+(0,_util.getByPath)(e,b.valueField)+(0,_util.getByPath)(e,b.labelField),tabIndex:"-1",className:_constants.LIB_NAME+"-item "+(d.isSelected(e)?_constants.LIB_NAME+"-item-selected":"")+" "+(c.cursor===f?_constants.LIB_NAME+"-item-active":"")+" "+(e.disabled?_constants.LIB_NAME+"-item-disabled":""),onClick:e.disabled?void 0:function(){return d.addItem(e)},onKeyPress:e.disabled?void 0:function(){return d.addItem(e)},color:b.color},(0,_util.getByPath)(e,b.labelField)," ",e.disabled&&_react.default.createElement("ins",null,b.disabledLabel))},b}(_react.Component),ItemComponent=/*#__PURE__*/(0,_base.default)("span","production"===process.env.NODE_ENV?{target:"evc32pp0"}:{target:"evc32pp0",label:"ItemComponent"})("padding:5px 10px;cursor:pointer;border-bottom:1px solid #fff;&.",_constants.LIB_NAME,"-item-active{border-bottom:1px solid #fff;",function(a){var b=a.disabled,c=a.color;return!b&&c&&"background: "+(0,_util.hexToRGBA)(c,.1)+";"},";}:hover,:focus{background:",function(a){var b=a.color;return b&&(0,_util.hexToRGBA)(b,.1)},";outline:none;}&.",_constants.LIB_NAME,"-item-selected{",function(a){var b=a.disabled,c=a.color;return b?"\n background: #f2f2f2;\n color: #ccc;\n ":"\n background: "+c+";\n color: #fff;\n border-bottom: 1px solid #fff;\n "},";}",function(a){var b=a.disabled;return b?"\n background: #f2f2f2;\n color: #ccc;\n\n ins {\n text-decoration: none;\n border:1px solid #ccc;\n border-radius: 2px;\n padding: 0px 3px;\n font-size: x-small;\n text-transform: uppercase;\n }\n ":""},";"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0l0ZW0uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUVpQyIsImZpbGUiOiIuLi8uLi9zcmMvY29tcG9uZW50cy9JdGVtLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0LCB7IENvbXBvbmVudCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGhleFRvUkdCQSwgZ2V0QnlQYXRoIH0gZnJvbSAnLi4vdXRpbCc7XG5pbXBvcnQgKiBhcyBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyBMSUJfTkFNRSB9IGZyb20gJy4uL2NvbnN0YW50cyc7XG5cbmNsYXNzIEl0ZW0gZXh0ZW5kcyBDb21wb25lbnQge1xuICBpdGVtID0gUmVhY3QuY3JlYXRlUmVmKCk7XG5cbiAgY29tcG9uZW50RGlkTW91bnQoKSB7XG4gICAgY29u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1xuICAgIGBcbiAgICAgICAgOiBgXG4gICAgYmFja2dyb3VuZDogJHtjb2xvcn07XG4gICAgY29sb3I6ICNmZmY7XG4gICAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICNmZmY7XG4gICAgYH1cbiAgfVxuXG4gICR7KHsgZGlzYWJsZWQgfSkgPT5cbiAgICBkaXNhYmxlZFxuICAgICAgPyBgXG4gICAgYmFja2dyb3VuZDogI2YyZjJmMjtcbiAgICBjb2xvcjogI2NjYztcblxuICAgIGlucyB7XG4gICAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gICAgICBib3JkZXI6MXB4IHNvbGlkICNjY2M7XG4gICAgICBib3JkZXItcmFkaXVzOiAycHg7XG4gICAgICBwYWRkaW5nOiAwcHggM3B4O1xuICAgICAgZm9udC1zaXplOiB4LXNtYWxsO1xuICAgICAgdGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcbiAgICB9XG4gICAgYFxuICAgICAgOiAnJ31cbmA7XG5cbmV4cG9ydCBkZWZhdWx0IEl0ZW07XG4iXX0= */")),_default=Item;exports.default=_default; | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _base=_interopRequireDefault(require("@emotion/styled/base")),_react=_interopRequireWildcard(require("react")),_util=require("../util"),PropTypes=_interopRequireWildcard(require("prop-types")),_constants=require("../constants");function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d.default=a,c&&c.set(a,d),d}function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,_setPrototypeOf(a,b)}function _setPrototypeOf(a,b){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,b){return a.__proto__=b,a},_setPrototypeOf(a,b)}function _defineProperty(a,b,c){return b=_toPropertyKey(b),b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==typeof b?b:b+""}function _toPrimitive(a,b){if("object"!=typeof a||null===a)return a;var c=a[Symbol.toPrimitive];if(c!==void 0){var d=c.call(a,b||"default");if("object"!=typeof d)return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}var Item=/*#__PURE__*/function(a){function b(){for(var b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return b=a.call.apply(a,[this].concat(d))||this,_defineProperty(_assertThisInitialized(b),"item",_react.default.createRef()),b}_inheritsLoose(b,a);var c=b.prototype;return c.componentDidMount=function componentDidMount(){var a=this.props,b=a.props,c=a.methods;this.item.current&&!b.multi&&b.keepSelectedInList&&c.isSelected(this.props.item)&&this.item.current.scrollIntoView({block:"nearest",inline:"start"})},c.componentDidUpdate=function componentDidUpdate(){this.props.state.cursor===this.props.itemIndex&&this.item.current&&this.item.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},c.render=function render(){var a=this.props,b=a.props,c=a.state,d=a.methods,e=a.item,f=a.itemIndex;return b.itemRenderer?b.itemRenderer({item:e,itemIndex:f,props:b,state:c,methods:d}):!b.keepSelectedInList&&d.isSelected(e)?null:_react.default.createElement(ItemComponent,{role:"option",ref:this.item,"aria-selected":d.isSelected(e),"aria-disabled":e.disabled,"aria-label":(0,_util.getByPath)(e,b.labelField),disabled:e.disabled,key:""+(0,_util.getByPath)(e,b.valueField)+(0,_util.getByPath)(e,b.labelField),tabIndex:"-1",className:_constants.LIB_NAME+"-item "+(d.isSelected(e)?_constants.LIB_NAME+"-item-selected":"")+" "+(c.cursor===f?_constants.LIB_NAME+"-item-active":"")+" "+(e.disabled?_constants.LIB_NAME+"-item-disabled":""),onClick:e.disabled?void 0:function(){return d.addItem(e)},onKeyPress:e.disabled?void 0:function(){return d.addItem(e)},color:b.color},(0,_util.getByPath)(e,b.labelField)," ",e.disabled&&_react.default.createElement("ins",null,b.disabledLabel))},b}(_react.Component),ItemComponent=/*#__PURE__*/(0,_base.default)("span","production"===process.env.NODE_ENV?{target:"evc32pp0"}:{target:"evc32pp0",label:"ItemComponent"})("padding:5px 10px;cursor:pointer;border-bottom:1px solid #fff;&.",_constants.LIB_NAME,"-item-active{border-bottom:1px solid #fff;",function(a){var b=a.disabled,c=a.color;return!b&&c&&"background: "+(0,_util.hexToRGBA)(c,.1)+";"},";}:hover,:focus{background:",function(a){var b=a.color;return b&&(0,_util.hexToRGBA)(b,.1)},";outline:none;}&.",_constants.LIB_NAME,"-item-selected{",function(a){var b=a.disabled,c=a.color;return b?"\n background: #f2f2f2;\n color: #ccc;\n ":"\n background: "+c+";\n color: #fff;\n border-bottom: 1px solid #fff;\n "},";}",function(a){var b=a.disabled;return b?"\n background: #f2f2f2;\n color: #ccc;\n\n ins {\n text-decoration: none;\n border:1px solid #ccc;\n border-radius: 2px;\n padding: 0px 3px;\n font-size: x-small;\n text-transform: uppercase;\n }\n ":""},";"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0l0ZW0uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUVpQyIsImZpbGUiOiIuLi8uLi9zcmMvY29tcG9uZW50cy9JdGVtLmpzIi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GNvbG9yIH0pID0+ICFkaXNhYmxlZCAmJiBjb2xvciAmJiBgYmFja2dyb3VuZDogJHtoZXhUb1JHQkEoY29sb3IsIDAuMSl9O2B9XG4gIH1cblxuICA6aG92ZXIsXG4gIDpmb2N1cyB7XG4gICAgYmFja2dyb3VuZDogJHsoeyBjb2xvciB9KSA9PiBjb2xvciAmJiBoZXhUb1JHQkEoY29sb3IsIDAuMSl9O1xuICAgIG91dGxpbmU6IG5vbmU7XG4gIH1cblxuICAmLiR7TElCX05BTUV9LWl0ZW0tc2VsZWN0ZWQge1xuICAgICR7KHsgZGlzYWJsZWQsIGNvbG9yIH0pID0+XG4gICAgICBkaXNhYmxlZFxuICAgICAgICA/IGBcbiAgICBiYWNrZ3JvdW5kOiAjZjJmMmYyO1xuICAgIGNvbG9yOiAjY2NjO1xuICAgIGBcbiAgICAgICAgOiBgXG4gICAgYmFja2dyb3VuZDogJHtjb2xvcn07XG4gICAgY29sb3I6ICNmZmY7XG4gICAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICNmZmY7XG4gICAgYH1cbiAgfVxuXG4gICR7KHsgZGlzYWJsZWQgfSkgPT5cbiAgICBkaXNhYmxlZFxuICAgICAgPyBgXG4gICAgYmFja2dyb3VuZDogI2YyZjJmMjtcbiAgICBjb2xvcjogI2NjYztcblxuICAgIGlucyB7XG4gICAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gICAgICBib3JkZXI6MXB4IHNvbGlkICNjY2M7XG4gICAgICBib3JkZXItcmFkaXVzOiAycHg7XG4gICAgICBwYWRkaW5nOiAwcHggM3B4O1xuICAgICAgZm9udC1zaXplOiB4LXNtYWxsO1xuICAgICAgdGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcbiAgICB9XG4gICAgYFxuICAgICAgOiAnJ31cbmA7XG5cbmV4cG9ydCBkZWZhdWx0IEl0ZW07XG4iXX0= */")),_default=Item;exports.default=_default; |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.__esModule=!0,exports.default=exports.Select=void 0;var _base=_interopRequireDefault(require("@emotion/styled/base")),_react=_interopRequireWildcard(require("react")),_reactDom=_interopRequireDefault(require("react-dom")),_propTypes=_interopRequireDefault(require("prop-types")),_ClickOutside=_interopRequireDefault(require("./components/ClickOutside")),_Content=_interopRequireDefault(require("./components/Content")),_Dropdown=_interopRequireDefault(require("./components/Dropdown")),_Loading=_interopRequireDefault(require("./components/Loading")),_Clear=_interopRequireDefault(require("./components/Clear")),_Separator=_interopRequireDefault(require("./components/Separator")),_DropdownHandle=_interopRequireDefault(require("./components/DropdownHandle")),_util=require("./util"),_constants=require("./constants");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var a=new WeakMap;return _getRequireWildcardCache=function(){return a},a}function _interopRequireWildcard(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=_getRequireWildcardCache();if(b&&b.has(a))return b.get(a);var c={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in a)if(Object.prototype.hasOwnProperty.call(a,e)){var f=d?Object.getOwnPropertyDescriptor(a,e):null;f&&(f.get||f.set)?Object.defineProperty(c,e,f):c[e]=a[e]}return c.default=a,b&&b.set(a,c),c}function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var Select=/*#__PURE__*/function(a){function b(b){var c;return c=a.call(this,b)||this,_defineProperty(_assertThisInitialized(c),"onDropdownClose",function(){c.setState({cursor:null}),c.props.onDropdownClose()}),_defineProperty(_assertThisInitialized(c),"onScroll",function(){c.props.closeOnScroll&&c.dropDown("close"),c.updateSelectBounds()}),_defineProperty(_assertThisInitialized(c),"updateSelectBounds",function(){return c.select.current&&c.setState({selectBounds:c.select.current.getBoundingClientRect()})}),_defineProperty(_assertThisInitialized(c),"getSelectBounds",function(){return c.state.selectBounds}),_defineProperty(_assertThisInitialized(c),"dropDown",function(a,b,d){void 0===a&&(a="toggle"),void 0===d&&(d=!1);var e=b&&b.target||b&&b.srcElement;return void 0!==c.props.onDropdownCloseRequest&&c.state.dropdown&&!1===d&&"close"===a?c.props.onDropdownCloseRequest({props:c.props,methods:c.methods,state:c.state,close:function close(){return c.dropDown("close",null,!0)}}):c.props.portal&&!c.props.closeOnScroll&&!c.props.closeOnSelect&&b&&e&&e.offsetParent&&e.offsetParent.classList.contains("react-dropdown-select-dropdown")?void 0:c.props.keepOpen?c.setState({dropdown:!0}):"close"===a&&c.state.dropdown?(c.select.current.blur(),c.setState({dropdown:!1,search:c.props.clearOnBlur?"":c.state.search,searchResults:c.props.options})):"open"!==a||c.state.dropdown?"toggle"===a&&(c.select.current.focus(),c.setState({dropdown:!c.state.dropdown})):c.setState({dropdown:!0})}),_defineProperty(_assertThisInitialized(c),"getSelectRef",function(){return c.select.current}),_defineProperty(_assertThisInitialized(c),"addItem",function(a){if(c.props.multi){if((0,_util.valueExistInSelected)((0,_util.getByPath)(a,c.props.valueField),c.state.values,c.props))return c.removeItem(null,a,!1);c.setState({values:[].concat(c.state.values,[a])})}else c.setState({values:[a],dropdown:!1});return c.props.clearOnSelect&&c.setState({search:""},function(){c.setState({searchResults:c.searchResults()})}),!0}),_defineProperty(_assertThisInitialized(c),"removeItem",function(a,b,d){void 0===d&&(d=!1),a&&d&&(a.preventDefault(),a.stopPropagation(),c.dropDown("close")),c.setState({values:c.state.values.filter(function(a){return(0,_util.getByPath)(a,c.props.valueField)!==(0,_util.getByPath)(b,c.props.valueField)})})}),_defineProperty(_assertThisInitialized(c),"setSearch",function(a){c.setState({cursor:null}),c.setState({search:a.target.value},function(){c.setState({searchResults:c.searchResults()})})}),_defineProperty(_assertThisInitialized(c),"getInputSize",function(){return c.state.search?c.state.search.length:0<c.state.values.length?c.props.addPlaceholder.length:c.props.placeholder.length}),_defineProperty(_assertThisInitialized(c),"toggleSelectAll",function(){return c.setState({values:0===c.state.values.length?c.selectAll():c.clearAll()})}),_defineProperty(_assertThisInitialized(c),"clearAll",function(){c.props.onClearAll(),c.setState({values:[]})}),_defineProperty(_assertThisInitialized(c),"selectAll",function(a){void 0===a&&(a=[]),c.props.onSelectAll();var b=0<a.length?a:c.props.options.filter(function(a){return!a.disabled});c.setState({values:b})}),_defineProperty(_assertThisInitialized(c),"isSelected",function(a){return!!c.state.values.find(function(b){return(0,_util.getByPath)(b,c.props.valueField)===(0,_util.getByPath)(a,c.props.valueField)})}),_defineProperty(_assertThisInitialized(c),"areAllSelected",function(){return c.state.values.length===c.props.options.filter(function(a){return!a.disabled}).length}),_defineProperty(_assertThisInitialized(c),"safeString",function(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}),_defineProperty(_assertThisInitialized(c),"sortBy",function(){var a=c.props,d=a.sortBy,e=a.options;return d?(e.sort(function(c,a){return(0,_util.getProp)(c,d)<(0,_util.getProp)(a,d)?-1:(0,_util.getProp)(c,d)>(0,_util.getProp)(a,d)?1:0}),e):e}),_defineProperty(_assertThisInitialized(c),"searchFn",function(a){var b=a.state,d=a.methods,e=new RegExp(d.safeString(b.search),"i");return d.sortBy().filter(function(a){return e.test((0,_util.getByPath)(a,c.props.searchBy)||(0,_util.getByPath)(a,c.props.valueField))})}),_defineProperty(_assertThisInitialized(c),"searchResults",function(){var a={state:c.state,props:c.props,methods:c.methods};return c.props.searchFn(a)||c.searchFn(a)}),_defineProperty(_assertThisInitialized(c),"activeCursorItem",function(a){return c.setState({activeCursorItem:a})}),_defineProperty(_assertThisInitialized(c),"handleKeyDown",function(a){var b={event:a,state:c.state,props:c.props,methods:c.methods,setState:c.setState.bind(_assertThisInitialized(c))};return c.props.handleKeyDownFn(b)||c.handleKeyDownFn(b)}),_defineProperty(_assertThisInitialized(c),"handleKeyDownFn",function(a){var b=a.event,d=a.state,e=a.props,f=a.methods,g=a.setState,h=d.cursor,i=d.searchResults,j="Escape"===b.key,k="Enter"===b.key,l="ArrowUp"===b.key,m="ArrowDown"===b.key,n="Backspace"===b.key,o="Tab"===b.key&&!b.shiftKey,p=b.shiftKey&&"Tab"===b.key;if(m&&!d.dropdown)return b.preventDefault(),c.dropDown("open"),g({cursor:0});if((m||o&&d.dropdown)&&null===h)return g({cursor:0});if((l||m||p&&d.dropdown||o&&d.dropdown)&&b.preventDefault(),j&&c.dropDown("close"),k){var q=i[h];if(q&&!q.disabled){if(e.create&&(0,_util.valueExistInSelected)(d.search,d.values,e))return null;f.addItem(q)}}return(m||o&&d.dropdown)&&i.length===h?g({cursor:0}):void((m||o&&d.dropdown)&&g(function(a){return{cursor:a.cursor+1}}),(l||p&&d.dropdown)&&0<h&&g(function(a){return{cursor:a.cursor-1}}),(l||p&&d.dropdown)&&0===h&&g({cursor:i.length}),n&&e.backspaceDelete&&0===c.getInputSize()&&c.setState({values:c.state.values.slice(0,-1)}))}),_defineProperty(_assertThisInitialized(c),"renderDropdown",function(){return c.props.portal?_reactDom.default.createPortal(_react.default.createElement(_Dropdown.default,{props:c.props,state:c.state,methods:c.methods}),c.dropdownRoot):_react.default.createElement(_Dropdown.default,{props:c.props,state:c.state,methods:c.methods})}),_defineProperty(_assertThisInitialized(c),"createNew",function(a){var b,d=(b={},b[c.props.labelField]=a,b[c.props.valueField]=a,b);c.addItem(d),c.props.onCreateNew(d),c.setState({search:""})}),c.state={dropdown:!1,values:b.values,search:"",selectBounds:{},cursor:null,searchResults:b.options},c.methods={removeItem:c.removeItem,dropDown:c.dropDown,addItem:c.addItem,setSearch:c.setSearch,getInputSize:c.getInputSize,toggleSelectAll:c.toggleSelectAll,clearAll:c.clearAll,selectAll:c.selectAll,searchResults:c.searchResults,getSelectRef:c.getSelectRef,isSelected:c.isSelected,getSelectBounds:c.getSelectBounds,areAllSelected:c.areAllSelected,handleKeyDown:c.handleKeyDown,activeCursorItem:c.activeCursorItem,createNew:c.createNew,sortBy:c.sortBy,safeString:c.safeString},c.select=_react.default.createRef(),c.dropdownRoot="undefined"!=typeof document&&document.createElement("div"),c}_inheritsLoose(b,a);var c=b.prototype;return c.componentDidMount=function componentDidMount(){this.props.portal&&this.props.portal.appendChild(this.dropdownRoot),(0,_util.isomorphicWindow)().addEventListener("resize",(0,_util.debounce)(this.updateSelectBounds)),(0,_util.isomorphicWindow)().addEventListener("scroll",(0,_util.debounce)(this.onScroll)),this.dropDown("close"),this.select&&this.updateSelectBounds()},c.componentDidUpdate=function componentDidUpdate(a,b){var c=this;!this.props.compareValuesFunc(a.values,this.props.values)&&this.props.compareValuesFunc(a.values,b.values)&&(this.setState({values:this.props.values},function(){c.props.onChange(c.state.values)}),this.updateSelectBounds()),a.options!==this.props.options&&this.setState({searchResults:this.searchResults()}),b.values!==this.state.values&&(this.props.onChange(this.state.values),this.updateSelectBounds()),b.search!==this.state.search&&this.updateSelectBounds(),b.values!==this.state.values&&this.props.closeOnSelect&&this.dropDown("close"),a.multi!==this.props.multi&&this.updateSelectBounds(),b.dropdown&&b.dropdown!==this.state.dropdown&&this.onDropdownClose(),b.dropdown||b.dropdown===this.state.dropdown||this.props.onDropdownOpen()},c.componentWillUnmount=function componentWillUnmount(){this.props.portal&&this.props.portal.removeChild(this.dropdownRoot),(0,_util.isomorphicWindow)().removeEventListener("resize",(0,_util.debounce)(this.updateSelectBounds,this.props.debounceDelay)),(0,_util.isomorphicWindow)().removeEventListener("scroll",(0,_util.debounce)(this.onScroll,this.props.debounceDelay))},c.render=function render(){var a=this;return _react.default.createElement(_ClickOutside.default,{onClickOutside:function onClickOutside(b){return a.dropDown("close",b)}},_react.default.createElement(ReactDropdownSelect,_extends({onKeyDown:this.handleKeyDown,"aria-label":"Dropdown select","aria-expanded":this.state.dropdown,onClick:function onClick(b){return a.dropDown("open",b)},tabIndex:this.props.disabled?"-1":"0",direction:this.props.direction,style:this.props.style,ref:this.select,disabled:this.props.disabled,className:_constants.LIB_NAME+" "+this.props.className,color:this.props.color},this.props.additionalProps),_react.default.createElement(_Content.default,{props:this.props,state:this.state,methods:this.methods}),(this.props.name||this.props.required)&&_react.default.createElement("input",{tabIndex:-1,style:{opacity:0,width:0,position:"absolute"},name:this.props.name,required:this.props.required,pattern:this.props.pattern,defaultValue:this.state.values.map(function(b){return b[a.props.labelField]}).toString()||[],disabled:this.props.disabled}),this.props.loading&&_react.default.createElement(_Loading.default,{props:this.props}),this.props.clearable&&_react.default.createElement(_Clear.default,{props:this.props,state:this.state,methods:this.methods}),this.props.separator&&_react.default.createElement(_Separator.default,{props:this.props,state:this.state,methods:this.methods}),this.props.dropdownHandle&&_react.default.createElement(_DropdownHandle.default,{onClick:function onClick(){return a.select.current.focus()},props:this.props,state:this.state,methods:this.methods}),this.state.dropdown&&!this.props.disabled&&this.renderDropdown()))},b}(_react.Component);exports.Select=Select,Select.defaultProps={addPlaceholder:"",placeholder:"Select...",values:[],options:[],multi:!1,disabled:!1,searchBy:"label",sortBy:null,clearable:!1,searchable:!0,dropdownHandle:!0,separator:!1,keepOpen:void 0,noDataLabel:"No data",createNewLabel:"add {search}",disabledLabel:"disabled",dropdownGap:5,closeOnScroll:!1,debounceDelay:0,labelField:"label",valueField:"value",color:"#0074D9",keepSelectedInList:!0,closeOnSelect:!1,clearOnBlur:!0,clearOnSelect:!0,dropdownPosition:"bottom",dropdownHeight:"300px",autoFocus:!1,portal:null,create:!1,direction:"ltr",name:null,required:!1,pattern:void 0,onChange:function onChange(){},onDropdownOpen:function onDropdownOpen(){},onDropdownClose:function onDropdownClose(){},onDropdownCloseRequest:void 0,onClearAll:function onClearAll(){},onSelectAll:function onSelectAll(){},onCreateNew:function onCreateNew(){},searchFn:function searchFn(){},handleKeyDownFn:function handleKeyDownFn(){},additionalProps:null,backspaceDelete:!0,compareValuesFunc:_util.isEqual};var ReactDropdownSelect=/*#__PURE__*/(0,_base.default)("div","production"===process.env.NODE_ENV?{target:"e1gzf2xs0"}:{target:"e1gzf2xs0",label:"ReactDropdownSelect"})("box-sizing:border-box;position:relative;display:flex;border:1px solid #ccc;width:100%;border-radius:2px;padding:2px 5px;flex-direction:row;direction:",function(a){var b=a.direction;return b},";align-items:center;cursor:pointer;min-height:36px;",function(a){var b=a.disabled;return b?"cursor: not-allowed;pointer-events: none;opacity: 0.3;":"pointer-events: all;"}," :hover,:focus-within{border-color:",function(a){var b=a.color;return b},";}:focus,:focus-within{outline:0;box-shadow:0 0 0 3px ",function(a){var b=a.color;return(0,_util.hexToRGBA)(b,.2)},";}*{box-sizing:border-box;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErbEJzQyIsImZpbGUiOiIuLi9zcmMvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgQ29tcG9uZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IFJlYWN0RE9NIGZyb20gJ3JlYWN0LWRvbSc7XG5pbXBvcnQgUHJvcFR5cGVzIGZyb20gJ3Byb3AtdHlwZXMnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IENsaWNrT3V0c2lkZSBmcm9tICcuL2NvbXBvbmVudHMvQ2xpY2tPdXRzaWRlJztcblxuaW1wb3J0IENvbnRlbnQgZnJvbSAnLi9jb21wb25lbnRzL0NvbnRlbnQnO1xuaW1wb3J0IERyb3Bkb3duIGZyb20gJy4vY29tcG9uZW50cy9Ecm9wZG93bic7XG5pbXBvcnQgTG9hZGluZyBmc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ZC5kaXZgXG4gIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgZGlzcGxheTogZmxleDtcbiAgYm9yZGVyOiAxcHggc29saWQgI2NjYztcbiAgd2lkdGg6IDEwMCU7XG4gIGJvcmRlci1yYWRpdXM6IDJweDtcbiAgcGFkZGluZzogMnB4IDVweDtcbiAgZmxleC1kaXJlY3Rpb246IHJvdztcbiAgZGlyZWN0aW9uOiAkeyh7IGRpcmVjdGlvbiB9KSA9PiBkaXJlY3Rpb259O1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBjdXJzb3I6IHBvaW50ZXI7XG4gIG1pbi1oZWlnaHQ6IDM2cHg7XG4gICR7KHsgZGlzYWJsZWQgfSkgPT5cbiAgICBkaXNhYmxlZCA/ICdjdXJzb3I6IG5vdC1hbGxvd2VkO3BvaW50ZXItZXZlbnRzOiBub25lO29wYWNpdHk6IDAuMzsnIDogJ3BvaW50ZXItZXZlbnRzOiBhbGw7J31cblxuICA6aG92ZXIsXG4gIDpmb2N1cy13aXRoaW4ge1xuICAgIGJvcmRlci1jb2xvcjogJHsoeyBjb2xvciB9KSA9PiBjb2xvcn07XG4gIH1cblxuICA6Zm9jdXMsXG4gIDpmb2N1cy13aXRoaW4ge1xuICAgIG91dGxpbmU6IDA7XG4gICAgYm94LXNoYWRvdzogMCAwIDAgM3B4ICR7KHsgY29sb3IgfSkgPT4gaGV4VG9SR0JBKGNvbG9yLCAwLjIpfTtcbiAgfVxuXG4gICoge1xuICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gIH1cbmA7XG5cbmV4cG9ydCBkZWZhdWx0IFNlbGVjdDtcbiJdfQ== */")),_default=Select;exports.default=_default; | ||
"use strict";exports.__esModule=!0,exports.default=exports.Select=void 0;var _base=_interopRequireDefault(require("@emotion/styled/base")),_react=_interopRequireWildcard(require("react")),_reactDom=_interopRequireDefault(require("react-dom")),_propTypes=_interopRequireDefault(require("prop-types")),_ClickOutside=_interopRequireDefault(require("./components/ClickOutside")),_Content=_interopRequireDefault(require("./components/Content")),_Dropdown=_interopRequireDefault(require("./components/Dropdown")),_Loading=_interopRequireDefault(require("./components/Loading")),_Clear=_interopRequireDefault(require("./components/Clear")),_Separator=_interopRequireDefault(require("./components/Separator")),_DropdownHandle=_interopRequireDefault(require("./components/DropdownHandle")),_util=require("./util"),_constants=require("./constants");function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d.default=a,c&&c.set(a,d),d}function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,_setPrototypeOf(a,b)}function _setPrototypeOf(a,b){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,b){return a.__proto__=b,a},_setPrototypeOf(a,b)}function _defineProperty(a,b,c){return b=_toPropertyKey(b),b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==typeof b?b:b+""}function _toPrimitive(a,b){if("object"!=typeof a||null===a)return a;var c=a[Symbol.toPrimitive];if(c!==void 0){var d=c.call(a,b||"default");if("object"!=typeof d)return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}var Select=/*#__PURE__*/function(a){function b(b){var c;return c=a.call(this,b)||this,_defineProperty(_assertThisInitialized(c),"onDropdownClose",function(){c.setState({cursor:null}),c.props.onDropdownClose()}),_defineProperty(_assertThisInitialized(c),"onScroll",function(){c.props.closeOnScroll&&c.dropDown("close"),c.updateSelectBounds()}),_defineProperty(_assertThisInitialized(c),"updateSelectBounds",function(){return c.select.current&&c.setState({selectBounds:c.select.current.getBoundingClientRect()})}),_defineProperty(_assertThisInitialized(c),"getSelectBounds",function(){return c.state.selectBounds}),_defineProperty(_assertThisInitialized(c),"dropDown",function(a,b,d){void 0===a&&(a="toggle"),void 0===d&&(d=!1);var e=b&&b.target||b&&b.srcElement;return void 0!==c.props.onDropdownCloseRequest&&c.state.dropdown&&!1===d&&"close"===a?c.props.onDropdownCloseRequest({props:c.props,methods:c.methods,state:c.state,close:function close(){return c.dropDown("close",null,!0)}}):c.props.portal&&!c.props.closeOnScroll&&!c.props.closeOnSelect&&b&&e&&e.offsetParent&&e.offsetParent.classList.contains("react-dropdown-select-dropdown")?void 0:c.props.keepOpen?c.setState({dropdown:!0}):"close"===a&&c.state.dropdown?(c.select.current.blur(),c.setState({dropdown:!1,search:c.props.clearOnBlur?"":c.state.search,searchResults:c.props.options})):"open"!==a||c.state.dropdown?"toggle"===a&&(c.select.current.focus(),c.setState({dropdown:!c.state.dropdown})):c.setState({dropdown:!0})}),_defineProperty(_assertThisInitialized(c),"getSelectRef",function(){return c.select.current}),_defineProperty(_assertThisInitialized(c),"addItem",function(a){if(c.props.multi){if((0,_util.valueExistInSelected)((0,_util.getByPath)(a,c.props.valueField),c.state.values,c.props))return c.removeItem(null,a,!1);c.setState({values:[].concat(c.state.values,[a])})}else c.setState({values:[a],dropdown:!1});return c.props.clearOnSelect&&c.setState({search:""},function(){c.setState({searchResults:c.searchResults()})}),!0}),_defineProperty(_assertThisInitialized(c),"removeItem",function(a,b,d){void 0===d&&(d=!1),a&&d&&(a.preventDefault(),a.stopPropagation(),c.dropDown("close")),c.setState({values:c.state.values.filter(function(a){return(0,_util.getByPath)(a,c.props.valueField)!==(0,_util.getByPath)(b,c.props.valueField)})})}),_defineProperty(_assertThisInitialized(c),"setSearch",function(a){c.setState({cursor:null}),c.setState({search:a.target.value},function(){c.setState({searchResults:c.searchResults()})})}),_defineProperty(_assertThisInitialized(c),"getInputSize",function(){return c.state.search?c.state.search.length:0<c.state.values.length?c.props.addPlaceholder.length:c.props.placeholder.length}),_defineProperty(_assertThisInitialized(c),"toggleSelectAll",function(){return c.setState({values:0===c.state.values.length?c.selectAll():c.clearAll()})}),_defineProperty(_assertThisInitialized(c),"clearAll",function(){c.props.onClearAll(),c.setState({values:[]})}),_defineProperty(_assertThisInitialized(c),"selectAll",function(a){void 0===a&&(a=[]),c.props.onSelectAll();var b=0<a.length?a:c.props.options.filter(function(a){return!a.disabled});c.setState({values:b})}),_defineProperty(_assertThisInitialized(c),"isSelected",function(a){return!!c.state.values.find(function(b){return(0,_util.getByPath)(b,c.props.valueField)===(0,_util.getByPath)(a,c.props.valueField)})}),_defineProperty(_assertThisInitialized(c),"areAllSelected",function(){return c.state.values.length===c.props.options.filter(function(a){return!a.disabled}).length}),_defineProperty(_assertThisInitialized(c),"safeString",function(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}),_defineProperty(_assertThisInitialized(c),"sortBy",function(){var a=c.props,d=a.sortBy,e=a.options;return d?(e.sort(function(c,a){return(0,_util.getProp)(c,d)<(0,_util.getProp)(a,d)?-1:(0,_util.getProp)(c,d)>(0,_util.getProp)(a,d)?1:0}),e):e}),_defineProperty(_assertThisInitialized(c),"searchFn",function(a){var b=a.state,d=a.methods,e=new RegExp(d.safeString(b.search),"i");return d.sortBy().filter(function(a){return e.test((0,_util.getByPath)(a,c.props.searchBy)||(0,_util.getByPath)(a,c.props.valueField))})}),_defineProperty(_assertThisInitialized(c),"searchResults",function(){var a={state:c.state,props:c.props,methods:c.methods};return c.props.searchFn(a)||c.searchFn(a)}),_defineProperty(_assertThisInitialized(c),"activeCursorItem",function(a){return c.setState({activeCursorItem:a})}),_defineProperty(_assertThisInitialized(c),"handleKeyDown",function(a){var b={event:a,state:c.state,props:c.props,methods:c.methods,setState:c.setState.bind(_assertThisInitialized(c))};return c.props.handleKeyDownFn(b)||c.handleKeyDownFn(b)}),_defineProperty(_assertThisInitialized(c),"handleKeyDownFn",function(a){var b=a.event,d=a.state,e=a.props,f=a.methods,g=a.setState,h=d.cursor,i=d.searchResults,j="Escape"===b.key,k="Enter"===b.key,l="ArrowUp"===b.key,m="ArrowDown"===b.key,n="Backspace"===b.key,o="Tab"===b.key&&!b.shiftKey,p=b.shiftKey&&"Tab"===b.key;if(m&&!d.dropdown)return b.preventDefault(),c.dropDown("open"),g({cursor:0});if((m||o&&d.dropdown)&&null===h)return g({cursor:0});if((l||m||p&&d.dropdown||o&&d.dropdown)&&b.preventDefault(),j&&c.dropDown("close"),k){var q=i[h];if(q&&!q.disabled){if(e.create&&(0,_util.valueExistInSelected)(d.search,d.values,e))return null;f.addItem(q)}}return(m||o&&d.dropdown)&&i.length===h?g({cursor:0}):void((m||o&&d.dropdown)&&g(function(a){return{cursor:a.cursor+1}}),(l||p&&d.dropdown)&&0<h&&g(function(a){return{cursor:a.cursor-1}}),(l||p&&d.dropdown)&&0===h&&g({cursor:i.length}),n&&e.backspaceDelete&&0===c.getInputSize()&&c.setState({values:c.state.values.slice(0,-1)}))}),_defineProperty(_assertThisInitialized(c),"renderDropdown",function(){return c.props.portal?_reactDom.default.createPortal(_react.default.createElement(_Dropdown.default,{props:c.props,state:c.state,methods:c.methods}),c.dropdownRoot):_react.default.createElement(_Dropdown.default,{props:c.props,state:c.state,methods:c.methods})}),_defineProperty(_assertThisInitialized(c),"createNew",function(a){var b,d=(b={},b[c.props.labelField]=a,b[c.props.valueField]=a,b);c.addItem(d),c.props.onCreateNew(d),c.setState({search:""})}),c.state={dropdown:!1,values:b.values,search:"",selectBounds:{},cursor:null,searchResults:b.options},c.methods={removeItem:c.removeItem,dropDown:c.dropDown,addItem:c.addItem,setSearch:c.setSearch,getInputSize:c.getInputSize,toggleSelectAll:c.toggleSelectAll,clearAll:c.clearAll,selectAll:c.selectAll,searchResults:c.searchResults,getSelectRef:c.getSelectRef,isSelected:c.isSelected,getSelectBounds:c.getSelectBounds,areAllSelected:c.areAllSelected,handleKeyDown:c.handleKeyDown,activeCursorItem:c.activeCursorItem,createNew:c.createNew,sortBy:c.sortBy,safeString:c.safeString},c.select=_react.default.createRef(),c.dropdownRoot="undefined"!=typeof document&&document.createElement("div"),c}_inheritsLoose(b,a);var c=b.prototype;return c.componentDidMount=function componentDidMount(){this.props.portal&&this.props.portal.appendChild(this.dropdownRoot),(0,_util.isomorphicWindow)().addEventListener("resize",(0,_util.debounce)(this.updateSelectBounds)),(0,_util.isomorphicWindow)().addEventListener("scroll",(0,_util.debounce)(this.onScroll)),this.dropDown("close"),this.select&&this.updateSelectBounds()},c.componentDidUpdate=function componentDidUpdate(a,b){var c=this;!this.props.compareValuesFunc(a.values,this.props.values)&&this.props.compareValuesFunc(a.values,b.values)&&(this.setState({values:this.props.values},function(){c.props.onChange(c.state.values)}),this.updateSelectBounds()),a.options!==this.props.options&&this.setState({searchResults:this.searchResults()}),b.values!==this.state.values&&(this.props.onChange(this.state.values),this.updateSelectBounds()),b.search!==this.state.search&&this.updateSelectBounds(),b.values!==this.state.values&&this.props.closeOnSelect&&this.dropDown("close"),a.multi!==this.props.multi&&this.updateSelectBounds(),b.dropdown&&b.dropdown!==this.state.dropdown&&this.onDropdownClose(),b.dropdown||b.dropdown===this.state.dropdown||this.props.onDropdownOpen()},c.componentWillUnmount=function componentWillUnmount(){this.props.portal&&this.props.portal.removeChild(this.dropdownRoot),(0,_util.isomorphicWindow)().removeEventListener("resize",(0,_util.debounce)(this.updateSelectBounds,this.props.debounceDelay)),(0,_util.isomorphicWindow)().removeEventListener("scroll",(0,_util.debounce)(this.onScroll,this.props.debounceDelay))},c.render=function render(){var a=this;return _react.default.createElement(_ClickOutside.default,{onClickOutside:function onClickOutside(b){return a.dropDown("close",b)}},_react.default.createElement(ReactDropdownSelect,_extends({onKeyDown:this.handleKeyDown,"aria-label":"Dropdown select","aria-expanded":this.state.dropdown,onClick:function onClick(b){return a.dropDown("open",b)},tabIndex:this.props.disabled?"-1":"0",direction:this.props.direction,style:this.props.style,ref:this.select,disabled:this.props.disabled,className:_constants.LIB_NAME+" "+this.props.className,color:this.props.color},this.props.additionalProps),_react.default.createElement(_Content.default,{props:this.props,state:this.state,methods:this.methods}),(this.props.name||this.props.required)&&_react.default.createElement("input",{tabIndex:-1,style:{opacity:0,width:0,position:"absolute"},name:this.props.name,required:this.props.required,pattern:this.props.pattern,defaultValue:this.state.values.map(function(b){return b[a.props.labelField]}).toString()||[],disabled:this.props.disabled}),this.props.loading&&_react.default.createElement(_Loading.default,{props:this.props}),this.props.clearable&&_react.default.createElement(_Clear.default,{props:this.props,state:this.state,methods:this.methods}),this.props.separator&&_react.default.createElement(_Separator.default,{props:this.props,state:this.state,methods:this.methods}),this.props.dropdownHandle&&_react.default.createElement(_DropdownHandle.default,{onClick:function onClick(){return a.select.current.focus()},props:this.props,state:this.state,methods:this.methods}),this.state.dropdown&&!this.props.disabled&&this.renderDropdown()))},b}(_react.Component);exports.Select=Select,Select.defaultProps={addPlaceholder:"",placeholder:"Select...",selectAll:!1,selectAllLabel:"Select all",clearAllLabel:"Clear all",values:[],options:[],multi:!1,disabled:!1,searchBy:"label",sortBy:null,clearable:!1,searchable:!0,dropdownHandle:!0,separator:!1,keepOpen:void 0,noDataLabel:"No data",createNewLabel:"add {search}",disabledLabel:"disabled",dropdownGap:5,closeOnScroll:!1,debounceDelay:0,labelField:"label",valueField:"value",color:"#0074D9",keepSelectedInList:!0,closeOnSelect:!1,clearOnBlur:!0,clearOnSelect:!0,dropdownPosition:"bottom",dropdownHeight:"300px",autoFocus:!1,portal:null,create:!1,direction:"ltr",name:null,required:!1,pattern:void 0,onChange:function onChange(){},onDropdownOpen:function onDropdownOpen(){},onDropdownClose:function onDropdownClose(){},onDropdownCloseRequest:void 0,onClearAll:function onClearAll(){},onSelectAll:function onSelectAll(){},onCreateNew:function onCreateNew(){},searchFn:function searchFn(){},handleKeyDownFn:function handleKeyDownFn(){},additionalProps:null,backspaceDelete:!0,compareValuesFunc:_util.isEqual};var ReactDropdownSelect=/*#__PURE__*/(0,_base.default)("div","production"===process.env.NODE_ENV?{target:"e1gzf2xs0"}:{target:"e1gzf2xs0",label:"ReactDropdownSelect"})("box-sizing:border-box;position:relative;display:flex;border:1px solid #ccc;width:100%;border-radius:2px;padding:2px 5px;flex-direction:row;direction:",function(a){var b=a.direction;return b},";align-items:center;cursor:pointer;min-height:36px;",function(a){var b=a.disabled;return b?"cursor: not-allowed;pointer-events: none;opacity: 0.3;":"pointer-events: all;"}," :hover,:focus-within{border-color:",function(a){var b=a.color;return b},";}:focus,:focus-within{outline:0;box-shadow:0 0 0 3px ",function(a){var b=a.color;return(0,_util.hexToRGBA)(b,.2)},";}*{box-sizing:border-box;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxbUJzQyIsImZpbGUiOiIuLi9zcmMvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgQ29tcG9uZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IFJlYWN0RE9NIGZyb20gJ3JlYWN0LWRvbSc7XG5pbXBvcnQgUHJvcFR5cGVzIGZyb20gJ3Byb3AtdHlwZXMnO1xuaW1wb3J0IHN0e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Y29sb3J9O1xuICB9XG5cbiAgOmZvY3VzLFxuICA6Zm9jdXMtd2l0aGluIHtcbiAgICBvdXRsaW5lOiAwO1xuICAgIGJveC1zaGFkb3c6IDAgMCAwIDNweCAkeyh7IGNvbG9yIH0pID0+IGhleFRvUkdCQShjb2xvciwgMC4yKX07XG4gIH1cblxuICAqIHtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICB9XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBTZWxlY3Q7XG4iXX0= */")),_default=Select;exports.default=_default; |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.__esModule=!0,exports.isomorphicWindow=exports.getProp=exports.getByPath=exports.isEqual=exports.debounce=exports.hexToRGBA=exports.valueExistInSelected=void 0;var valueExistInSelected=function(a,b,c){return!!b.find(function(b){return getByPath(b,c.valueField)===a||getByPath(b,c.labelField)===a})};exports.valueExistInSelected=valueExistInSelected;var hexToRGBA=function(a,b){4===a.length&&(a=""+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]+"}");var c=parseInt(a.slice(1,3),16),d=parseInt(a.slice(3,5),16),e=parseInt(a.slice(5,7),16);return"rgba("+c+", "+d+", "+e+(b&&", "+b)+")"};exports.hexToRGBA=hexToRGBA;var debounce=function(a,b){void 0===b&&(b=0);var c;return function(){for(var d=arguments.length,e=Array(d),f=0;f<d;f++)e[f]=arguments[f];c&&clearTimeout(c),c=setTimeout(function(){a.apply(void 0,e),c=null},b)}};exports.debounce=debounce;var isEqual=function(c,a){return JSON.stringify(c)===JSON.stringify(a)};exports.isEqual=isEqual;var getByPath=function(a,b){return b?b.split(".").reduce(function(a,b){return a[b]},a):void 0};exports.getByPath=getByPath;var getProp=function(a,b,c){if(!b)return a;var d=Array.isArray(b)?b:b.split(".").filter(function(a){return a.length});return d.length?getProp(a[d.shift()],d,c):void 0===a?c:a};exports.getProp=getProp;var isomorphicWindow=function(){return"undefined"==typeof window&&(global.window={}),window};exports.isomorphicWindow=isomorphicWindow; | ||
"use strict";exports.__esModule=!0,exports.valueExistInSelected=exports.isomorphicWindow=exports.isEqual=exports.hexToRGBA=exports.getProp=exports.getByPath=exports.debounce=void 0;var valueExistInSelected=function(a,b,c){return!!b.find(function(b){return getByPath(b,c.valueField)===a||getByPath(b,c.labelField)===a})};exports.valueExistInSelected=valueExistInSelected;var hexToRGBA=function(a,b){4===a.length&&(a=""+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]+"}");var c=parseInt(a.slice(1,3),16),d=parseInt(a.slice(3,5),16),e=parseInt(a.slice(5,7),16);return"rgba("+c+", "+d+", "+e+(b&&", "+b)+")"};exports.hexToRGBA=hexToRGBA;var debounce=function(a,b){void 0===b&&(b=0);var c;return function(){for(var d=arguments.length,e=Array(d),f=0;f<d;f++)e[f]=arguments[f];c&&clearTimeout(c),c=setTimeout(function(){a.apply(void 0,e),c=null},b)}};exports.debounce=debounce;var isEqual=function(c,a){return JSON.stringify(c)===JSON.stringify(a)};exports.isEqual=isEqual;var getByPath=function(a,b){return b?b.split(".").reduce(function(a,b){return a[b]},a):void 0};exports.getByPath=getByPath;var getProp=function(a,b,c){if(!b)return a;var d=Array.isArray(b)?b:b.split(".").filter(function(a){return a.length});return d.length?getProp(a[d.shift()],d,c):void 0===a?c:a};exports.getProp=getProp;var isomorphicWindow=function(){return"undefined"==typeof window&&(global.window={}),window};exports.isomorphicWindow=isomorphicWindow; |
{ | ||
"name": "react-dropdown-select", | ||
"version": "4.9.4", | ||
"version": "4.10.0", | ||
"description": "Customizable dropdown select for react", | ||
@@ -78,3 +78,3 @@ "main": "dist/react-dropdown-select.js", | ||
"husky": "^3.1.0", | ||
"jest": "^25.3.0", | ||
"jest": "^25.5.4", | ||
"prettier": "1.18.2", | ||
@@ -81,0 +81,0 @@ "prop-types": "^15.7.2", |
@@ -95,42 +95,45 @@ # react-dropdown-select | ||
| Prop | Type | Default | Description | | ||
| ------------------------------------------------------------------------------------------- | ----------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | ||
| values | array | [] | Selected values | | ||
| options | array | [] | Available options, (option with key `disabled: true` will be disabled) | | ||
| keepOpen | bool | false | If true, dropdown will always stay open (good for debugging) | | ||
| autoFocus | bool | false | If true, and `searchable`, dropdown will auto focus | | ||
| clearOnBlur | bool | true | If true, and `searchable`, search value will be cleared on blur | | ||
| clearOnSelect | bool | true | If true, and `searchable`, search value will be cleared upon value select/de-select | | ||
| name | string | null | If set, input type hidden would be added in the component with the value of the `name` prop as name and select's `values` as value | | ||
| required | bool | false | If set, input type hidden would be added in the component with `required` prop as true/false | | ||
| pattern | string | null | If set, input type hidden would be added in the component with `pattern` prop as regex | | ||
| dropdownGap | number | 5 | Gap between select element and dropdown | | ||
| multi | bool | false | If true - will act as multi-select, if false - only one option will be selected at the time | | ||
| placeholder | string | "Select..." | Placeholder shown where there are no selected values | | ||
| addPlaceholder | string | "" | Secondary placeholder on search field if any value selected | | ||
| disabled | bool | false | Disable select and all interactions | | ||
| style | object | {} | Style object to pass to select | | ||
| className | string | | CSS class attribute to pass to select | | ||
| loading | bool | false | Loading indicator | | ||
| clearable | bool | false | Clear all indicator | | ||
| searchable | bool | true | If true, select will have search input text | | ||
| separator | bool | false | Separator line between close all and dropdown handle | | ||
| dropdownHandle | bool | true | Dropdown handle to open/close dropdown | | ||
| dropdownHeight | string | "300px" | Minimum height of a dropdown | | ||
| direction | string | "ltr" | direction of a dropdown "ltr", "rtl" or "auto" | | ||
| searchBy | string | label | Search by object property in values | | ||
| sortBy | string | null | Sort by object property in values | | ||
| labelField | string | "label" | Field in data to use for label | | ||
| valueField | string | "value" | Field in data to use for value | | ||
| color | string | "#0074D9" | Base color to use in component, also can be overwritten via CSS | | ||
| closeOnScroll | bool | false | If true, scrolling the page will close the dropdown | | ||
| closeOnSelect | bool | false | If true, selecting option will close the dropdown | | ||
| [dropdownPosition](https://sanusart.github.io/react-dropdown-select/prop/dropdown-position) | string | "bottom" | Available options are "auto", "top" and "bottom" defaults to "bottom". Auto will adjust itself according Select's position on the page | | ||
| keepSelectedInList | bool | true | If false, selected item will not appear in a list | | ||
| Prop | Type | Default | Description | | ||
|---------------------------------------------------------------------------------------------|-----------|----------------|----------------------------------------------------------------------------------------------------------------------------------------| | ||
| values | array | [] | Selected values | | ||
| options | array | [] | Available options, (option with key `disabled: true` will be disabled) | | ||
| keepOpen | bool | false | If true, dropdown will always stay open (good for debugging) | | ||
| autoFocus | bool | false | If true, and `searchable`, dropdown will auto focus | | ||
| clearOnBlur | bool | true | If true, and `searchable`, search value will be cleared on blur | | ||
| clearOnSelect | bool | true | If true, and `searchable`, search value will be cleared upon value select/de-select | | ||
| name | string | null | If set, input type hidden would be added in the component with the value of the `name` prop as name and select's `values` as value | | ||
| required | bool | false | If set, input type hidden would be added in the component with `required` prop as true/false | | ||
| pattern | string | null | If set, input type hidden would be added in the component with `pattern` prop as regex | | ||
| dropdownGap | number | 5 | Gap between select element and dropdown | | ||
| multi | bool | false | If true - will act as multi-select, if false - only one option will be selected at the time | | ||
| placeholder | string | "Select..." | Placeholder shown where there are no selected values | | ||
| addPlaceholder | string | "" | Secondary placeholder on search field if any value selected | | ||
| disabled | bool | false | Disable select and all interactions | | ||
| style | object | {} | Style object to pass to select | | ||
| className | string | | CSS class attribute to pass to select | | ||
| loading | bool | false | Loading indicator | | ||
| clearable | bool | false | Clear all indicator | | ||
| searchable | bool | true | If true, select will have search input text | | ||
| separator | bool | false | Separator line between close all and dropdown handle | | ||
| dropdownHandle | bool | true | Dropdown handle to open/close dropdown | | ||
| dropdownHeight | string | "300px" | Minimum height of a dropdown | | ||
| direction | string | "ltr" | direction of a dropdown "ltr", "rtl" or "auto" | | ||
| searchBy | string | label | Search by object property in values | | ||
| sortBy | string | null | Sort by object property in values | | ||
| labelField | string | "label" | Field in data to use for label | | ||
| valueField | string | "value" | Field in data to use for value | | ||
| color | string | "#0074D9" | Base color to use in component, also can be overwritten via CSS | | ||
| closeOnScroll | bool | false | If true, scrolling the page will close the dropdown | | ||
| closeOnSelect | bool | false | If true, selecting option will close the dropdown | | ||
| [dropdownPosition](https://sanusart.github.io/react-dropdown-select/prop/dropdown-position) | string | "bottom" | Available options are "auto", "top" and "bottom" defaults to "bottom". Auto will adjust itself according Select's position on the page | | ||
| keepSelectedInList | bool | true | If false, selected item will not appear in a list | | ||
| portal | DOM element | false | If valid dom element specified - dropdown will break out to render inside the specified element | | ||
| create | bool | false | If true, select will create value from search string and fire `onCreateNew` callback prop | | ||
| backspaceDelete | bool | true | If true, backspace key will delete last value | | ||
| createNewLabel | string | "add {search}" | If create set to true, this will be the label of the "add new" component. `{search}` will be replaced by search value | | ||
| disabledLabel | string | "disabled" | Label shown on disabled field (after) the text | | ||
| additionalProps | object | null | Additional props to pass to Select | | ||
| create | bool | false | If true, select will create value from search string and fire `onCreateNew` callback prop | | ||
| backspaceDelete | bool | true | If true, backspace key will delete last value | | ||
| createNewLabel | string | "add {search}" | If create set to true, this will be the label of the "add new" component. `{search}` will be replaced by search value | | ||
| disabledLabel | string | "disabled" | Label shown on disabled field (after) the text | | ||
| selectAll | bool | false | Allow to select all | | ||
| selectAllLabel | string | "Select all" | Label for "Select all" | | ||
| clearAllLabel | string | "Clear all" | Label for "Clear all" | | ||
| additionalProps | object | null | Additional props to pass to Select | | ||
@@ -137,0 +140,0 @@ ### Callback props |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
180588
168
37