intelicoreact 1.6.31 → 1.6.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +1 -1
- package/dist/Atomic/UI/Hint/Hint.d.ts +5 -0
- package/dist/Atomic/UI/Hint/Hint.js +1 -1
- package/dist/Atomic/UI/Hint/Hint.js.map +1 -0
- package/package.json +1 -1
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.d.ts +0 -19
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,l=Array(n);t<n;t++)l[t]=e[t];return l}function n(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function t(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{},r=Object.keys(l);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(l).filter(function(e){return Object.getOwnPropertyDescriptor(l,e).enumerable}))),r.forEach(function(t){n(e,t,l[t])})}return e}function l(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t.push.apply(t,l)}return t})(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}),e}function r(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,l,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),!n||o.length!==n);i=!0);}catch(e){u=!0,l=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw l}}return o}}(e,n)||u(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(n){return function(n){if(Array.isArray(n))return e(n)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||u(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function u(n,t){if(n){if("string"==typeof n)return e(n,t);var l=Object.prototype.toString.call(n).slice(8,-1);if("Object"===l&&n.constructor&&(l=n.constructor.name),"Map"===l||"Set"===l)return Array.from(l);if("Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return e(n,t)}}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return j}});var c=require("react/jsx-runtime"),a=w(require("classnames")),s=function(e,n){if(e&&e.__esModule)return e;if(null===e||(void 0===e?"undefined":i(e))!=="object"&&"function"!=typeof e)return{default:e};var t=_(n);if(t&&t.has(e))return t.get(e);var l={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var u=r?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(l,o,u):l[o]=e[o]}return l.default=e,t&&t.set(e,l),l}(require("react")),d=require("react-dom"),v=require("react-feather"),f=require("../../../Functions/fieldValueFormatters"),p=w(require("../../../Functions/useIsMobile/useIsMobile")),m=require("../../../Functions/utils"),h=w(require("../Input/Input")),g=w(require("../RadioInput/RadioInput")),b=w(require("./components/DropdownLoader"));function w(e){return e&&e.__esModule?e:{default:e}}function _(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(_=function(e){return e?t:n})(e)}require("./Dropdown.scss");var y="dropdown",j=function(e){var u,w,_,j,x,C,S,E,N,O,L,I,k,P,A,M,D,q=e.label,H=e.options,R=e.value,T=e.error,B=e.disabled,F=e.onChange,K=e.placeholder,W=e.className,U=e.isSearchable,z=e.entity,$=e.scrollReactionObj,V=e.isListTop,X=e.isNotValidateASCII,G=void 0!==X&&X,J=e.testId,Q=void 0===J?"dropdown":J,Y=e.sortAlphabetical,Z=void 0===Y||Y,ee=e.fieldKey,en=e.id,et=e.noOptionsText,el=void 0===et?"No options available":et,er=e.attributesOfNativeInput,eo=e.isDoNotPullOutListOfMainContainer,ei=e.withMobileLogic,eu=e.withActions,ec=e.minItemsForShowMobileSearch,ea=e.customTrigger,es=e.tabIndex,ed=e.onActionConfirmClick,ev=e.onActionCancelClick,ef=e.isDefaultOpened,ep=(0,p.default)().isMobile,em=ep&&ei&&window.screen.width<=768,eh=r((0,s.useState)((en||ee||Math.random().toString(16).slice(2)).toString()),1)[0],eg=r((0,s.useState)(!1),2),eb=eg[0],ew=eg[1],e_=r((0,s.useState)(),2),ey=e_[0],ej=e_[1],ex=(0,s.useRef)(null),eC=(0,s.useRef)(null),eS=(0,s.useRef)(null),eE=(0,s.useRef)(null),eN=(0,s.useRef)(null),eO=r((0,s.useState)(null),2),eL=eO[0],eI=eO[1],ek=r((0,s.useState)(!1),2),eP=ek[0],eA=ek[1],eM=r((0,s.useState)(!1),2),eD=eM[0],eq=eM[1],eH=r((0,s.useState)(!1),2),eR=eH[0],eT=eH[1],eB=r((0,s.useState)(!1),2),eF=eB[0],eK=eB[1],eW=r((0,s.useState)(0),2),eU=eW[0],ez=eW[1],e$=r((0,s.useState)(1),2),eV=e$[0],eX=e$[1],eG=(0,s.useCallback)(function(){var e;return null!=(e=null==H?void 0:H.reduce(function(e,n){if((null==n?void 0:n.list)||(null==n?void 0:n.items)){var t,l;e+=(null==n||null==(t=n.list)?void 0:t.length)||(null==n||null==(l=n.items)?void 0:l.length)||0}else++e;return e},0))?e:0},[H]);em&&(U=eG()>((void 0===ec?10:ec)||10));var eJ=function(e){var n=null==e?void 0:e.findIndex(function(e){return(null==e?void 0:e.value)==="other"});if(n>-1){var t=null==e?void 0:e.splice(n,1);e.push.apply(e,o(t))}return e},eQ=eJ(null!=H?H:[]);null==H||H.map(function(e){return e.items?e.items=eJ(e.items):e});var eY=eQ.map(function(e){var n;return l(t({},e),{items:U&&eP?null==(n=e.items)?void 0:n.slice().filter(function(e){var n;return(null==e||null==(n=e.label)?void 0:n.toLowerCase().includes((null==ey?void 0:ey.toLowerCase())||""))||!(null==e?void 0:e.value)||(null==e?void 0:e.value)===""}):null==e?void 0:e.items})}).filter(function(e){var n,t;return(null!=(t=null==(n=e.items)?void 0:n.length)?t:0)>0}),eZ=eQ.filter(function(e){var n;return!(null==(n=e.items)?void 0:n.length)}).filter(function(e){var n;return!U||!eP||(null==e||null==(n=e.label)?void 0:n.toLowerCase().includes((null==ey?void 0:ey.toLowerCase())||""))||!(null==e?void 0:e.value)||(null==e?void 0:e.value)===""}),e0=o(eZ).concat(o(eY)),e1=function(e){ew(!1),null==F||F(e.value)},e2=function(e){return!![9,13].includes(e.keyCode)&&(ew(!1),!0)},e3=function(e){return!![9,13].includes(e.keyCode)&&(ew(!0),!0)},e6=function(){return document.getElementById(eh)},e8=function(e){var n;(null==(n=e6())?void 0:n.contains(null==e?void 0:e.target))||(null==ex?void 0:ex.current)===null||(null==ex?void 0:ex.current.contains(null==e?void 0:e.target))||ew(!1)},e9=function(e){var n=e;G||(n=(0,f.formatToOnlyASCIICodeText)(n)),eA(!0),ej(n)},e4=function(e){e.target===(null==eN?void 0:eN.current)&&(e.stopPropagation(),e.preventDefault(),ew(!1))},e7=function(e,n,t){return e=null==e?void 0:e.replace(/["&<>]/g,function(e){var n;return null!=(n=({'"':""","&":"&","<":"<",">":">"})[e])?n:""}),(U&&ey?null==e?void 0:e.replace(RegExp(null==ey?void 0:ey.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"),"i"),function(e){return'<span class="bg--yellow">'.concat(e,"</span>")}):e)+(n?'<span class="dropdown__list-item-postfix">'.concat(n,"</span>"):"")+(t?'<span class="dropdown__list-item-description">'.concat(t,"</span>"):"")},e5=(j=z&&""!==z&&"string"==typeof z,x=function(e){"open_modal"===e.value?null==F||F("open_modal"):e1(e)},C=[{label:"New ".concat(z),value:"open_modal",className:"dropdown__list-item--modal"}].concat(o(null!=e0?e0:[])),{onChange:function(e){return j?x(e):e1(e)},options:j?C:H}),ne=function(e,t,l){var r,o,i,u;return(0,c.jsxs)("button",{type:"button","data-testid":"".concat(Q,"-").concat(l,"-option"),onMouseDown:function(){return e5.onChange(e)},className:(0,a.default)("".concat(y,"__list-item"),(n(u={},"".concat(y,"__list-item_active"),e.value===R),n(u,"".concat(y,"__list-item_disabled"),e.disabled),u),e.className),children:[!em&&(0,c.jsx)("span",{className:(0,a.default)("".concat(y,"__active-icon"),n({},"".concat(y,"__active-icon_active"),e.value===R)),children:(0,c.jsx)(v.Check,{})}),(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__list-item-label"),e.labelClassName||""),dangerouslySetInnerHTML:{__html:e7(e.label,e.postfix,e.description)}}),(null==e?void 0:e.icon)||"",em?null!=(i=null==e?void 0:e.customMobileIcon)?i:(0,c.jsx)(g.default,{value:e.value,checked:null==R?void 0:R.toString()}):""]},null==(o=e.value)||null==(r=o.toString())?void 0:r.replace(/ /g,"_"))},nn=function(e){var n,t,l,r,o,i;return(null!=(i=null==(n=e.items)?void 0:n.length)?i:0)>0?(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"-group"),e.className),children:[(0,c.jsx)("div",{className:"".concat(y,"-group__name"),children:e.label}),null==(t=e.items)?void 0:t.map(function(e,n){var t;return ne(e,n,null==(t=(null==e?void 0:e.testId)||n)?void 0:t.toString())})]},null==(o=e.label)||null==(r=o.toString())?void 0:r.replace(/ /g,"_").concat(null==(l=Date.now())?void 0:l.toString())):null},nt=null!=(A=null==H||null==(E=H.find(function(e){return e.value===R}))?void 0:E.label)?A:null==H?void 0:H.reduce(function(e,n){var t,l,r;return(null==e?void 0:e.length)?e:null!=(r=null==(l=n.items)||null==(t=l.find(function(e){return e.value===R}))?void 0:t.label)?r:""},""),nl=(0,s.useCallback)(function(e){var n=$||{},t=n.callback,l=n.isWithAnyScrolling,r=n.scrollingInaccuracy,o=null==e?void 0:e.target;t&&"function"==typeof t&&(l?t(e):Math.round(o.clientHeight+o.scrollTop+(void 0===r?0:r))>=o.scrollHeight&&t(e))},[e0]),nr=function(){var e,n;return eo?ex.current:null!=(n=null!=(e=document.querySelector("div#root"))?e:document.querySelector("div#app"))?n:document.querySelector("div#storybook-root")},no=function(){var e=document.createElement("div");e.setAttribute("id",eh),e.classList.add("dropdown__container"),em&&e.addEventListener("click",function(e){(null==e?void 0:e.target).id===eh&&ew(!1)});try{null==(n=e6())||n.remove()}finally{if(em){try{null==(r=document.getElementById("mlw-".concat(eh)))||r.remove()}catch(e){}var n,t,l,r,o=document.createElement("div");o.classList.add("dropdown-mobile"),o.setAttribute("id","mlw-".concat(eh)),null==o||o.append(e),null==(l=nr())||l.append(o)}else null==(t=nr())||t.append(e)}},ni=function(){var e,n,t,l,r,o,i,u,c,a,s,d,v,f,p,m,h=e6();if(!h||!eb)return!1;var g=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,b=null!=(v=null==ex||null==(e=ex.current)?void 0:e.getBoundingClientRect())?v:{},w=b.width,_=b.height,y=void 0===_?0:_,j=b.left,x=b.top,C=void 0===x?0:x,S=h.getElementsByClassName("dropdown__list")[0],E=null==eS||null==(n=eS.current)?void 0:n.getElementsByClassName("dropdown__list-header")[0],N=Number.parseInt(null!=(f=null==(l=getComputedStyle(null==eS?void 0:eS.current))||null==(t=l.marginTop)?void 0:t.replace("px",""))?f:0,10),O=null!=eL?eL:Number.parseInt(null!=(p=null==(o=getComputedStyle(S))||null==(r=o.maxHeight)?void 0:r.replace("px",""))?p:0,10);null===eL&&eI(O);var L=C-N,I=g-C-y-2*N,k=null==S||null==(i=S.getBoundingClientRect())?void 0:i.height,P=em?(null==eS||null==(c=eS.current)||null==(u=c.getBoundingClientRect())?void 0:u.height)-(null==E||null==(a=E.getBoundingClientRect())?void 0:a.height):L>=O||I>=O?O-3*N:L>I?L-3*N:I-4*N;return h.style.minWidth="".concat(w,"px"),h.style.left="".concat(j,"px"),h.style.top="".concat("bottom"==(L<I||I>=k?"bottom":"top")?C+y:C-3*N-Number.parseInt(null!=(m=null==(d=getComputedStyle(null==eS?void 0:eS.current))||null==(s=d.height)?void 0:s.replace("px",""))?m:0,10),"px"),S.style.maxHeight="".concat(P,"px"),!0},nu=function(e){var n=o(e);if(Z){var t=n.filter(function(e){return"open_modal"===e.value}),l=n.filter(function(e){return""===e.value}),r=n.filter(function(e){var n=e.value;return"open_modal"!==n&&""!==n}).sort(m.compareAlphabetical);n=o(t).concat(o(l),o(r)).map(function(e){return(null==e?void 0:e.items)&&(e.items=o(e.items).sort(m.compareAlphabetical)),e})}return n},nc=eb?e8:function(){};(0,s.useEffect)(function(){(!eo||ex.current)&&(no(),ef&&!ep&&ew(!0))},[eo,ex.current]),(0,s.useLayoutEffect)(function(){var e;return em?(window.removeEventListener("resize",ni),window.removeEventListener("mousewheel",nc),window.removeEventListener("scroll",nc),window.removeEventListener("touchmove",nc)):(window.addEventListener("resize",ni),window.addEventListener("mousewheel",nc),window.addEventListener("scroll",nc),window.addEventListener("touchmove",nc)),null==(e=e6())||e.addEventListener("click",nc),function(){var e;window.removeEventListener("resize",ni),window.removeEventListener("mousewheel",nc),window.removeEventListener("scroll",nc),window.removeEventListener("touchmove",nc),null==(e=e6())||e.removeEventListener("click",nc)}},[e6]),(0,s.useLayoutEffect)(function(){ni()},[eb,ey,em,H,null==eS||null==(O=eS.current)||null==(N=O.getBoundingClientRect())?void 0:N.height]),(0,s.useEffect)(function(){return document.addEventListener("click",e8,!0),function(){return document.removeEventListener("click",e8,!0)}},[]),(0,s.useEffect)(function(){return eb||eA(!1),$&&(void 0===$?"undefined":i($))==="object"&&eb&&eC&&eC.current&&eC.current.addEventListener("scroll",nl),function(){$&&(void 0===$?"undefined":i($))==="object"&&removeEventListener("scroll",nl)}},[eb,eC]),(0,s.useEffect)(function(){var e;return!ey&&eD&&(ej(nt),e=setTimeout(function(){return eE.current.select()},1)),eD||eb||ej(null),function(){clearTimeout(e)}},[eD]),(0,s.useEffect)(function(){var e,n,t,l;eb&&!eD&&(null==eE?void 0:eE.current)&&!em&&(null==(e=eE.current)||e.focus()),eb?null==(n=e6())||n.classList.add("dropdown__container--opened"):(null==(t=eE.current)||t.blur(),null==(l=e6())||l.classList.remove("dropdown__container--opened")),!eb&&em&&ej(null)},[eb]),(0,s.useEffect)(function(){if(eb&&em&&(null==eC?void 0:eC.current)&&!ey){var e,n,t,l;eT((null==eC||null==(e=eC.current)?void 0:e.scrollHeight)>(null==eC||null==(n=eC.current)?void 0:n.clientHeight)),eK(eR||(null==eC||null==(t=eC.current)?void 0:t.scrollHeight)>(null==eC||null==(l=eC.current)?void 0:l.clientHeight))}},[eb,em,eR,null==eC?void 0:eC.current,null==eC||null==(L=eC.current)?void 0:L.scrollHeight,null==eC||null==(I=eC.current)?void 0:I.clientHeight]),(0,s.useEffect)(function(){var e,n=function(e){var n,t;ez(Number.parseInt(null==e||null==(t=e.target)||null==(n=t.scrollTop)?void 0:n.toString(),10))};return eb&&em&&(null==eC?void 0:eC.current)&&(null==eC||null==(e=eC.current)||e.addEventListener("scroll",n)),function(){if((null==eC?void 0:eC.current)!==null){var e;null==eC||null==(e=eC.current)||e.removeEventListener("scroll",n)}}},[eb,em,null==eC?void 0:eC.current]),(0,s.useEffect)(function(){if(null==eC?void 0:eC.current){var e,n;eX(Number.parseInt(((null==eC||null==(e=eC.current)?void 0:e.scrollHeight)-(null==eC||null==(n=eC.current)?void 0:n.clientHeight)).toString(),10))}},[eU,null==eC?void 0:eC.current]),(0,s.useEffect)(function(){return function(){var e,n;null==(e=e6())||e.remove(),null==(n=document.getElementById("mlw-".concat(eh)))||n.remove()}},[]);var na=nt&&(null==(k=e0.find(function(e){return e.value===R}))?void 0:k.postfix)||null;if(!H)return null;return(0,c.jsxs)("div",{className:(0,a.default)(y,W,(n(M={disabled:B},"".concat(y,"-mobile"),em),n(M,"".concat(y,"--focused"),eb&&!em),n(M,"".concat(y,"--with-custom-trigger"),!!ea),M)),ref:ex,onKeyDown:e2,onKeyUp:e3,children:[(0,c.jsx)("button",{type:"button","data-testid":Q,className:(0,a.default)("".concat(y,"__trigger"),"input__wrap",(n(D={},"".concat(y,"__trigger--with-actions"),eu),n(D,"placeholder",!R),n(D,"error",T),D)),onClick:function(){return ew(!0)},onKeyDown:e2,onKeyUp:e3,tabIndex:es,children:ea||(0,c.jsxs)(c.Fragment,{children:[U&&!em?(0,c.jsx)("input",l(t({ref:eE,className:"".concat(y,"__input"),value:null==(P=eb?null!=ey?ey:"":null!=nt?nt:"")?void 0:P.toString(),onChange:function(e){return e9(e.target.value)},placeholder:K,onFocus:function(){return eq(!0)},onBlur:function(){return eq(!1)},onMouseDown:function(){eb||eq(!0)}},er),{tabIndex:-1})):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"text",children:nt||K||""}),na&&(0,c.jsx)("span",{className:"dropdown__list-item-postfix",children:na})]}),(0,c.jsx)("span",{className:(0,a.default)("".concat(y,"__arrow"),n({},"".concat(y,"__arrow_active"),eb)),onClick:function(e){null==e||e.stopPropagation(),ew(function(e){return!e})},children:em?(0,c.jsx)(v.Code,{className:"mobile-icon"}):eb?(0,c.jsx)(v.ChevronUp,{}):(0,c.jsx)(v.ChevronDown,{})})]})}),eu&&(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"__actions")),children:[(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__actions-item")),onClick:ed,children:(0,c.jsx)(v.Check,{})}),(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__actions-item")),onClick:ev,children:(0,c.jsx)(v.X,{})})]}),eb&&((S=e6())?(0,d.createPortal)((0,c.jsx)("div",{"data-testid":"".concat(Q,"-container-wrapper"),className:(0,a.default)("".concat(y,"__container-wrapper")),ref:eN,onClick:em?e4:function(){},children:(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"__list-wrapper"),(n(w={},"".concat(y,"__list-wrapper--fixed-height"),eF),n(w,"".concat(y,"__list-wrapper--with-bottom-shadow"),eR&&em),n(w,"".concat(y,"__list-wrapper--with-bottom-shadow-hidden"),eU===eV),w)),ref:eS,children:[em&&(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"__list-header"),(n(_={},"".concat(y,"__list-header-with-shadow"),eR&&em),n(_,"".concat(y,"__list-header-with-shadow-hidden"),0===eU),_)),children:[(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"__list-header-row")),children:[(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__list-label")),children:q}),(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__list-close-icon")),onClick:function(){return ew(!1)},children:(0,c.jsx)(v.X,{onClick:function(){return ew(!1)}})})]}),U&&(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__list-header-row")),children:(0,c.jsx)(h.default,t({ref:eE,className:"".concat(y,"__input"),value:null!=ey?ey:nt,onChange:e9,placeholder:K||"Search",withDelete:!0,onFocus:function(){return eq(!0)},onBlur:function(){return eq(!1)},onMouseDown:function(){eb||eq(!0)}},er))})]}),(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"__list"),n({},"".concat(y,"__list-top"),V)),ref:eC,children:[e5.options&&(null==(u=nu(e5.options))?void 0:u.map(function(e,n){if(null==e||null==(o=e.items)?void 0:o.length)if(!U||!eP)return nn(e);else{var r,o,i,u,c=null==(u=e.items)?void 0:u.slice().filter(function(e){var n;return(null==e||null==(n=e.label)?void 0:n.toLowerCase().includes((null==ey?void 0:ey.toLowerCase())||""))||!(null==e?void 0:e.value)||(null==e?void 0:e.value)===""});if(null==c?void 0:c.length)return nn(l(t({},e),{items:c}))}else if(!U||!eP||(null==e||null==(i=e.label)?void 0:i.toLowerCase().includes((null==ey?void 0:ey.toLowerCase())||""))||!(null==e?void 0:e.value)||(null==e?void 0:e.value)==="")return ne(e,n,null==(r=(null==e?void 0:e.testId)||n)?void 0:r.toString());return null})),!eZ.length&&!eY.length&&(0,c.jsx)("div",{className:"".concat(y,"__list-item ").concat(y,"__list-item--no-options"),children:el}),B&&eb&&(0,c.jsx)(b.default,{})]})]})}),S):null)]})};
|
|
1
|
+
function e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,l=Array(n);t<n;t++)l[t]=e[t];return l}function n(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function t(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{},r=Object.keys(l);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(l).filter(function(e){return Object.getOwnPropertyDescriptor(l,e).enumerable}))),r.forEach(function(t){n(e,t,l[t])})}return e}function l(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t.push.apply(t,l)}return t})(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}),e}function r(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,l,r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),!n||o.length!==n);i=!0);}catch(e){u=!0,l=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw l}}return o}}(e,n)||u(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(n){return function(n){if(Array.isArray(n))return e(n)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||u(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function u(n,t){if(n){if("string"==typeof n)return e(n,t);var l=Object.prototype.toString.call(n).slice(8,-1);if("Object"===l&&n.constructor&&(l=n.constructor.name),"Map"===l||"Set"===l)return Array.from(l);if("Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return e(n,t)}}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return j}});var c=require("react/jsx-runtime"),a=w(require("classnames")),s=function(e,n){if(e&&e.__esModule)return e;if(null===e||(void 0===e?"undefined":i(e))!=="object"&&"function"!=typeof e)return{default:e};var t=_(n);if(t&&t.has(e))return t.get(e);var l={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var u=r?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(l,o,u):l[o]=e[o]}return l.default=e,t&&t.set(e,l),l}(require("react")),d=require("react-dom"),v=require("react-feather"),f=require("../../../Functions/fieldValueFormatters"),p=w(require("../../../Functions/useIsMobile/useIsMobile")),m=require("../../../Functions/utils"),h=w(require("../Input/Input")),g=w(require("../RadioInput/RadioInput")),b=w(require("./components/DropdownLoader"));function w(e){return e&&e.__esModule?e:{default:e}}function _(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(_=function(e){return e?t:n})(e)}require("./Dropdown.scss");var y="dropdown",j=function(e){var u,w,_,j,x,C,S,E,N,O,L,I,k,P,A,M,D,q=e.label,H=e.options,R=e.value,B=e.error,T=e.disabled,F=e.onChange,K=e.placeholder,W=e.className,U=e.isSearchable,z=e.entity,$=e.scrollReactionObj,V=e.isListTop,X=e.isNotValidateASCII,G=void 0!==X&&X,J=e.testId,Q=void 0===J?"dropdown":J,Y=e.sortAlphabetical,Z=void 0===Y||Y,ee=e.fieldKey,en=e.id,et=e.noOptionsText,el=void 0===et?"No options available":et,er=e.attributesOfNativeInput,eo=e.isDoNotPullOutListOfMainContainer,ei=e.withMobileLogic,eu=e.withActions,ec=e.minItemsForShowMobileSearch,ea=e.customTrigger,es=e.tabIndex,ed=e.onActionConfirmClick,ev=e.onActionCancelClick,ef=e.isDefaultOpened,ep=(0,p.default)().isMobile,em=ep&&ei&&window.screen.width<=768,eh=r((0,s.useState)((en||ee||Math.random().toString(16).slice(2)).toString()),1)[0],eg=r((0,s.useState)(!1),2),eb=eg[0],ew=eg[1],e_=r((0,s.useState)(),2),ey=e_[0],ej=e_[1],ex=(0,s.useRef)(null),eC=(0,s.useRef)(null),eS=(0,s.useRef)(null),eE=(0,s.useRef)(null),eN=(0,s.useRef)(null),eO=r((0,s.useState)(null),2),eL=eO[0],eI=eO[1],ek=r((0,s.useState)(!1),2),eP=ek[0],eA=ek[1],eM=r((0,s.useState)(!1),2),eD=eM[0],eq=eM[1],eH=r((0,s.useState)(!1),2),eR=eH[0],eB=eH[1],eT=r((0,s.useState)(!1),2),eF=eT[0],eK=eT[1],eW=r((0,s.useState)(0),2),eU=eW[0],ez=eW[1],e$=r((0,s.useState)(1),2),eV=e$[0],eX=e$[1],eG=(0,s.useCallback)(function(){var e;return null!=(e=null==H?void 0:H.reduce(function(e,n){if((null==n?void 0:n.list)||(null==n?void 0:n.items)){var t,l;e+=(null==n||null==(t=n.list)?void 0:t.length)||(null==n||null==(l=n.items)?void 0:l.length)||0}else++e;return e},0))?e:0},[H]);em&&(U=eG()>((void 0===ec?10:ec)||10));var eJ=function(e){var n=null==e?void 0:e.findIndex(function(e){return(null==e?void 0:e.value)==="other"});if(n>-1){var t=null==e?void 0:e.splice(n,1);e.push.apply(e,o(t))}return e},eQ=eJ(null!=H?H:[]);null==H||H.map(function(e){return e.items?e.items=eJ(e.items):e});var eY=eQ.map(function(e){var n;return l(t({},e),{items:U&&eP?null==(n=e.items)?void 0:n.slice().filter(function(e){var n;return(null==e||null==(n=e.label)?void 0:n.toLowerCase().includes((null==ey?void 0:ey.toLowerCase())||""))||!(null==e?void 0:e.value)||(null==e?void 0:e.value)===""}):null==e?void 0:e.items})}).filter(function(e){var n,t;return(null!=(t=null==(n=e.items)?void 0:n.length)?t:0)>0}),eZ=eQ.filter(function(e){var n;return!(null==(n=e.items)?void 0:n.length)}).filter(function(e){var n;return!U||!eP||(null==e||null==(n=e.label)?void 0:n.toLowerCase().includes((null==ey?void 0:ey.toLowerCase())||""))||!(null==e?void 0:e.value)||(null==e?void 0:e.value)===""}),e0=o(eZ).concat(o(eY)),e1=function(e){ew(!1),null==F||F(e.value)},e2=function(e){return!![9,13].includes(e.keyCode)&&(ew(!1),!0)},e3=function(e){return!![9,13].includes(e.keyCode)&&(ew(!0),!0)},e6=function(){return document.getElementById(eh)},e8=function(e){var n;(null==(n=e6())?void 0:n.contains(null==e?void 0:e.target))||(null==ex?void 0:ex.current)===null||(null==ex?void 0:ex.current.contains(null==e?void 0:e.target))||ew(!1)},e9=function(e){var n=e;G||(n=(0,f.formatToOnlyASCIICodeText)(n)),eA(!0),ej(n)},e4=function(e){e.target===(null==eN?void 0:eN.current)&&(e.stopPropagation(),e.preventDefault(),ew(!1))},e7=function(e,n,t){return e=null==e?void 0:e.replace(/["&<>]/g,function(e){var n;return null!=(n=({'"':""","&":"&","<":"<",">":">"})[e])?n:""}),(U&&ey?null==e?void 0:e.replace(RegExp(null==ey?void 0:ey.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"),"i"),function(e){return'<span class="bg--yellow">'.concat(e,"</span>")}):e)+(n?'<span class="dropdown__list-item-postfix">'.concat(n,"</span>"):"")+(t?'<span class="dropdown__list-item-description">'.concat(t,"</span>"):"")},e5=(j=z&&""!==z&&"string"==typeof z,x=function(e){"open_modal"===e.value?null==F||F("open_modal"):e1(e)},C=[{label:"New ".concat(z),value:"open_modal",className:"dropdown__list-item--modal"}].concat(o(null!=e0?e0:[])),{onChange:function(e){return j?x(e):e1(e)},options:j?C:H}),ne=function(e,t,l){var r,o,i,u;return(0,c.jsxs)("button",{type:"button","data-testid":"".concat(Q,"-").concat(l,"-option"),onMouseDown:function(){return e5.onChange(e)},className:(0,a.default)("".concat(y,"__list-item"),(n(u={},"".concat(y,"__list-item_active"),e.value===R),n(u,"".concat(y,"__list-item_disabled"),e.disabled),u),e.className),value:null==e?void 0:e.value,children:[!em&&(0,c.jsx)("span",{className:(0,a.default)("".concat(y,"__active-icon"),n({},"".concat(y,"__active-icon_active"),e.value===R)),children:(0,c.jsx)(v.Check,{})}),(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__list-item-label"),e.labelClassName||""),dangerouslySetInnerHTML:{__html:e7(e.label,e.postfix,e.description)}}),(null==e?void 0:e.icon)||"",em?null!=(i=null==e?void 0:e.customMobileIcon)?i:(0,c.jsx)(g.default,{value:e.value,checked:null==R?void 0:R.toString()}):""]},null==(o=e.value)||null==(r=o.toString())?void 0:r.replace(/ /g,"_"))},nn=function(e){var n,t,l,r,o,i;return(null!=(i=null==(n=e.items)?void 0:n.length)?i:0)>0?(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"-group"),e.className),children:[(0,c.jsx)("div",{className:"".concat(y,"-group__name"),children:e.label}),null==(t=e.items)?void 0:t.map(function(e,n){var t;return ne(e,n,null==(t=(null==e?void 0:e.testId)||n)?void 0:t.toString())})]},null==(o=e.label)||null==(r=o.toString())?void 0:r.replace(/ /g,"_").concat(null==(l=Date.now())?void 0:l.toString())):null},nt=null!=(A=null==H||null==(E=H.find(function(e){return e.value===R}))?void 0:E.label)?A:null==H?void 0:H.reduce(function(e,n){var t,l,r;return(null==e?void 0:e.length)?e:null!=(r=null==(l=n.items)||null==(t=l.find(function(e){return e.value===R}))?void 0:t.label)?r:""},""),nl=(0,s.useCallback)(function(e){var n=$||{},t=n.callback,l=n.isWithAnyScrolling,r=n.scrollingInaccuracy,o=null==e?void 0:e.target;t&&"function"==typeof t&&(l?t(e):Math.round(o.clientHeight+o.scrollTop+(void 0===r?0:r))>=o.scrollHeight&&t(e))},[e0]),nr=function(){var e,n;return eo?ex.current:null!=(n=null!=(e=document.querySelector("div#root"))?e:document.querySelector("div#app"))?n:document.querySelector("div#storybook-root")},no=function(){var e=document.createElement("div");e.setAttribute("id",eh),e.classList.add("dropdown__container"),em&&e.addEventListener("click",function(e){(null==e?void 0:e.target).id===eh&&ew(!1)});try{null==(n=e6())||n.remove()}finally{if(em){try{null==(r=document.getElementById("mlw-".concat(eh)))||r.remove()}catch(e){}var n,t,l,r,o=document.createElement("div");o.classList.add("dropdown-mobile"),o.setAttribute("id","mlw-".concat(eh)),null==o||o.append(e),null==(l=nr())||l.append(o)}else null==(t=nr())||t.append(e)}},ni=function(){var e,n,t,l,r,o,i,u,c,a,s,d,v,f,p,m,h=e6();if(!h||!eb)return!1;var g=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,b=null!=(v=null==ex||null==(e=ex.current)?void 0:e.getBoundingClientRect())?v:{},w=b.width,_=b.height,y=void 0===_?0:_,j=b.left,x=b.top,C=void 0===x?0:x,S=h.getElementsByClassName("dropdown__list")[0],E=null==eS||null==(n=eS.current)?void 0:n.getElementsByClassName("dropdown__list-header")[0],N=Number.parseInt(null!=(f=null==(l=getComputedStyle(null==eS?void 0:eS.current))||null==(t=l.marginTop)?void 0:t.replace("px",""))?f:0,10),O=null!=eL?eL:Number.parseInt(null!=(p=null==(o=getComputedStyle(S))||null==(r=o.maxHeight)?void 0:r.replace("px",""))?p:0,10);null===eL&&eI(O);var L=C-N,I=g-C-y-2*N,k=null==S||null==(i=S.getBoundingClientRect())?void 0:i.height,P=em?(null==eS||null==(c=eS.current)||null==(u=c.getBoundingClientRect())?void 0:u.height)-(null==E||null==(a=E.getBoundingClientRect())?void 0:a.height):L>=O||I>=O?O-3*N:L>I?L-3*N:I-4*N;return h.style.minWidth="".concat(w,"px"),h.style.left="".concat(j,"px"),h.style.top="".concat("bottom"==(L<I||I>=k?"bottom":"top")?C+y:C-3*N-Number.parseInt(null!=(m=null==(d=getComputedStyle(null==eS?void 0:eS.current))||null==(s=d.height)?void 0:s.replace("px",""))?m:0,10),"px"),S.style.maxHeight="".concat(P,"px"),!0},nu=function(e){var n=o(e);if(Z){var t=n.filter(function(e){return"open_modal"===e.value}),l=n.filter(function(e){return""===e.value}),r=n.filter(function(e){var n=e.value;return"open_modal"!==n&&""!==n}).sort(m.compareAlphabetical);n=o(t).concat(o(l),o(r)).map(function(e){return(null==e?void 0:e.items)&&(e.items=o(e.items).sort(m.compareAlphabetical)),e})}return n},nc=eb?e8:function(){};(0,s.useEffect)(function(){(!eo||ex.current)&&(no(),ef&&!ep&&ew(!0))},[eo,ex.current]),(0,s.useLayoutEffect)(function(){var e;return em?(window.removeEventListener("resize",ni),window.removeEventListener("mousewheel",nc),window.removeEventListener("scroll",nc),window.removeEventListener("touchmove",nc)):(window.addEventListener("resize",ni),window.addEventListener("mousewheel",nc),window.addEventListener("scroll",nc),window.addEventListener("touchmove",nc)),null==(e=e6())||e.addEventListener("click",nc),function(){var e;window.removeEventListener("resize",ni),window.removeEventListener("mousewheel",nc),window.removeEventListener("scroll",nc),window.removeEventListener("touchmove",nc),null==(e=e6())||e.removeEventListener("click",nc)}},[e6]),(0,s.useLayoutEffect)(function(){ni()},[eb,ey,em,H,null==eS||null==(O=eS.current)||null==(N=O.getBoundingClientRect())?void 0:N.height]),(0,s.useEffect)(function(){return document.addEventListener("click",e8,!0),function(){return document.removeEventListener("click",e8,!0)}},[]),(0,s.useEffect)(function(){return eb||eA(!1),$&&(void 0===$?"undefined":i($))==="object"&&eb&&eC&&eC.current&&eC.current.addEventListener("scroll",nl),function(){$&&(void 0===$?"undefined":i($))==="object"&&removeEventListener("scroll",nl)}},[eb,eC]),(0,s.useEffect)(function(){var e;return ey||!eD||em||(ej(nt),e=setTimeout(function(){return eE.current.select()},1)),eD||eb||ej(null),function(){clearTimeout(e)}},[eD]),(0,s.useEffect)(function(){if(eb&&!eD&&(null==eE?void 0:eE.current)&&!em&&(null==(e=eE.current)||e.focus()),eb?null==(n=e6())||n.classList.add("dropdown__container--opened"):(null==(t=eE.current)||t.blur(),null==(l=e6())||l.classList.remove("dropdown__container--opened")),eb&&em){var e,n,t,l,r,o,i,u,c=null==eC||null==(r=eC.current)?void 0:r.querySelector("button[value='".concat(R,"']"));c&&(null==eC||null==(u=eC.current)||u.scrollTo(0,(null==c||null==(o=c.getBoundingClientRect())?void 0:o.y)-(null==eC||null==(i=eC.current)?void 0:i.getBoundingClientRect().y)-16))}!eb&&em&&ej(null)},[eb]),(0,s.useEffect)(function(){if(eb&&em&&(null==eC?void 0:eC.current)&&!ey){var e,n,t,l;eB((null==eC||null==(e=eC.current)?void 0:e.scrollHeight)>(null==eC||null==(n=eC.current)?void 0:n.clientHeight)),eK(eR||(null==eC||null==(t=eC.current)?void 0:t.scrollHeight)>(null==eC||null==(l=eC.current)?void 0:l.clientHeight))}},[eb,em,eR,null==eC?void 0:eC.current,null==eC||null==(L=eC.current)?void 0:L.scrollHeight,null==eC||null==(I=eC.current)?void 0:I.clientHeight]),(0,s.useEffect)(function(){var e,n=function(e){var n,t;ez(Number.parseInt(null==e||null==(t=e.target)||null==(n=t.scrollTop)?void 0:n.toString(),10))};return eb&&em&&(null==eC?void 0:eC.current)&&(null==eC||null==(e=eC.current)||e.addEventListener("scroll",n)),function(){if((null==eC?void 0:eC.current)!==null){var e;null==eC||null==(e=eC.current)||e.removeEventListener("scroll",n)}}},[eb,em,null==eC?void 0:eC.current]),(0,s.useEffect)(function(){if(null==eC?void 0:eC.current){var e,n;eX(Number.parseInt(((null==eC||null==(e=eC.current)?void 0:e.scrollHeight)-(null==eC||null==(n=eC.current)?void 0:n.clientHeight)).toString(),10))}},[eU,null==eC?void 0:eC.current]),(0,s.useEffect)(function(){return function(){var e,n;null==(e=e6())||e.remove(),null==(n=document.getElementById("mlw-".concat(eh)))||n.remove()}},[]);var na=nt&&(null==(k=e0.find(function(e){return e.value===R}))?void 0:k.postfix)||null;if(!H)return null;return(0,c.jsxs)("div",{className:(0,a.default)(y,W,(n(M={disabled:T},"".concat(y,"-mobile"),em),n(M,"".concat(y,"--focused"),eb&&!em),n(M,"".concat(y,"--with-custom-trigger"),!!ea),M)),ref:ex,onKeyDown:e2,onKeyUp:e3,children:[(0,c.jsx)("button",{type:"button","data-testid":Q,className:(0,a.default)("".concat(y,"__trigger"),"input__wrap",(n(D={},"".concat(y,"__trigger--with-actions"),eu),n(D,"placeholder",!R),n(D,"error",B),D)),onClick:function(){return ew(!0)},onKeyDown:e2,onKeyUp:e3,tabIndex:es,children:ea||(0,c.jsxs)(c.Fragment,{children:[U&&!em?(0,c.jsx)("input",l(t({ref:eE,className:"".concat(y,"__input"),value:null==(P=eb?null!=ey?ey:"":null!=nt?nt:"")?void 0:P.toString(),onChange:function(e){return e9(e.target.value)},placeholder:K,onFocus:function(){return eq(!0)},onBlur:function(){return eq(!1)},onMouseDown:function(){eb||eq(!0)}},er),{tabIndex:-1})):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"text",children:nt||K||""}),na&&(0,c.jsx)("span",{className:"dropdown__list-item-postfix",children:na})]}),(0,c.jsx)("span",{className:(0,a.default)("".concat(y,"__arrow"),n({},"".concat(y,"__arrow_active"),eb)),onClick:function(e){null==e||e.stopPropagation(),ew(function(e){return!e})},children:em?(0,c.jsx)(v.Code,{className:"mobile-icon"}):eb?(0,c.jsx)(v.ChevronUp,{}):(0,c.jsx)(v.ChevronDown,{})})]})}),eu&&(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"__actions")),children:[(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__actions-item")),onClick:ed,children:(0,c.jsx)(v.Check,{})}),(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__actions-item")),onClick:ev,children:(0,c.jsx)(v.X,{})})]}),eb&&((S=e6())?(0,d.createPortal)((0,c.jsx)("div",{"data-testid":"".concat(Q,"-container-wrapper"),className:(0,a.default)("".concat(y,"__container-wrapper")),ref:eN,onClick:em?e4:function(){},children:(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"__list-wrapper"),(n(w={},"".concat(y,"__list-wrapper--fixed-height"),eF),n(w,"".concat(y,"__list-wrapper--with-bottom-shadow"),eR&&em),n(w,"".concat(y,"__list-wrapper--with-bottom-shadow-hidden"),eU===eV),w)),ref:eS,children:[em&&(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"__list-header"),(n(_={},"".concat(y,"__list-header-with-shadow"),eR&&em),n(_,"".concat(y,"__list-header-with-shadow-hidden"),0===eU),_)),children:[(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"__list-header-row")),children:[(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__list-label")),children:q}),(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__list-close-icon")),onClick:function(){return ew(!1)},children:(0,c.jsx)(v.X,{onClick:function(){return ew(!1)}})})]}),U&&(0,c.jsx)("div",{className:(0,a.default)("".concat(y,"__list-header-row")),children:(0,c.jsx)(h.default,t({ref:eE,className:"".concat(y,"__input"),value:ey,onChange:e9,placeholder:K||"Search",withDelete:!0,onFocus:function(){return eq(!0)},onBlur:function(){return eq(!1)},onMouseDown:function(){eb||eq(!0)}},er))})]}),(0,c.jsxs)("div",{className:(0,a.default)("".concat(y,"__list"),n({},"".concat(y,"__list-top"),V)),ref:eC,children:[e5.options&&(null==(u=nu(e5.options))?void 0:u.map(function(e,n){if(null==e||null==(o=e.items)?void 0:o.length)if(!U||!eP)return nn(e);else{var r,o,i,u,c=null==(u=e.items)?void 0:u.slice().filter(function(e){var n;return(null==e||null==(n=e.label)?void 0:n.toLowerCase().includes((null==ey?void 0:ey.toLowerCase())||""))||!(null==e?void 0:e.value)||(null==e?void 0:e.value)===""});if(null==c?void 0:c.length)return nn(l(t({},e),{items:c}))}else if(!U||!eP||(null==e||null==(i=e.label)?void 0:i.toLowerCase().includes((null==ey?void 0:ey.toLowerCase())||""))||!(null==e?void 0:e.value)||(null==e?void 0:e.value)==="")return ne(e,n,null==(r=(null==e?void 0:e.testId)||n)?void 0:r.toString());return null})),!eZ.length&&!eY.length&&(0,c.jsx)("div",{className:"".concat(y,"__list-item ").concat(y,"__list-item--no-options"),children:el}),T&&eb&&(0,c.jsx)(b.default,{})]})]})}),S):null)]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(t,n){return function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(n=i.next()).done)&&(o.push(n.value),!t||o.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(t,n)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}}(t,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return b}});var n=require("react/jsx-runtime"),r=f(require("classnames")),i=function(e,t){if(e&&e.__esModule)return e;if(null===e||(void 0===e?"undefined":e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)!="object"&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=i?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(require("react")),o=require("react-dom"),l=require("react-feather"),a=require("../../../Functions/utils"),c=require("../../../Molecular/CustomIcons"),u=f(require("../../Layout/Spinner/Spinner")),s=require("./partials/_constants"),d=require("./partials/_utils");function f(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}require("./Hint.scss");var p=new Map,m=!1,h={};function _(){}var b=function(e){var f,v,b,y,g=e.hint,O=e.side,E=void 0===O?"right":O,j=e.className,x=e.hintContainer,N=void 0===x?h:x,w=e.label,M=void 0===w?"":w,C=e.variant,S=void 0===C?"filled":C,P=e.handleOpenType,L=void 0===P?"click":P,k=e.onClickCallback,T=e.onOpenChange,A=void 0===T?_:T,H=e.key,I=e.id,D=e.children,q=e.icon,B=e.isAccessability,W=void 0!==B&&B,F=e.testId,V=void 0===F?"hint":F,R=e.isHoverableContent,z=void 0!==R&&R,U=e.isLoading,$=e.isCloseOnChildrenClick,G=(0,i.useRef)(null),J=t((0,i.useState)(null!=(y=null!=I?I:H)?y:Math.random().toString(16).slice(2)),1)[0],K=t((0,i.useState)((f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},s.I_AM_OPENED_EVENT_OPTIONS),v=v={detail:{hintId:J}},Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(v)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(v)).forEach(function(e){Object.defineProperty(f,e,Object.getOwnPropertyDescriptor(v,e))}),f)),1)[0],Q=t((0,i.useState)(!1),2),X=Q[0],Y=Q[1],Z=t((0,i.useState)(new d.HandleScrollObj(Y)),1)[0],ee=t((0,i.useState)(new d.HandleClickOutsideObj(J,Y)),1)[0],et="function"==typeof k,en={onMouseEnter:function(){var e=p.get(J);if(e&&clearTimeout(e),"hover"===L){var t=setTimeout(function(){var e,t;Y(!0),X||null==k||k(),null==(t=G.current)||null==(e=t.dispatchEvent)||e.call(t,new CustomEvent(s.I_AM_OPENED_EVENT_NAME,K))},350);p.set(J,t)}},onMouseLeave:function(){var e=p.get(J);if(e&&clearTimeout(e),z||"hover"!==L){if(z&&"hover"===L){var t=setTimeout(function(){m||Y(!1),p.delete(J)},100);p.set(J,t)}}else{var n=setTimeout(function(){Y(!1),p.delete(J)},1e3);p.set(J,n)}},onMouseLeaveHoverableContent:function(){var e=p.get(J);if(e&&clearTimeout(e),z&&"hover"===L){var t=setTimeout(function(){Y(!1),m=!1,p.delete(J)},100);p.set(J,t)}},onClick:void 0!==$&&$?function(){return Y(!1)}:function(){}},er=function(){var e,t,n,r,i=(0,d.getHintContainer)(J);if(!i||!X)return!1;var o=(null==G?void 0:G.current)!==null?null==G||null==(e=G.current)?void 0:e.getBoundingClientRect():{},l=o.width,a=void 0===l?0:l,c=o.top,u=void 0===c?0:c,s=o.left,f=void 0===s?0:s,v=null!=N?N:{},p=v.addWidth,m=v.addLeft,h=v.addTop,_=document.documentElement.clientWidth,b=document.documentElement.clientHeight,y=i.getElementsByClassName("hint__text")[0],g=(null==y?void 0:y.getBoundingClientRect())||{},O=g.width,j=g.height;switch(i.style.width=X?null==(t=(p&&!Number.isNaN(+p)?+p:0)+a)?void 0:t.toString().concat("px"):"0",i.style.left=X?null==(n=(m&&!Number.isNaN(+m)?+m:0)+f)?void 0:n.toString().concat("px"):"0",i.style.top=X?null==(r=(h&&!Number.isNaN(+h)?+h:0)+u)?void 0:r.toString().concat("px"):"0",i.style.maxHeight=X?null==j?void 0:j.toString().concat("px"):"0",E){case"top":case"centeredTop":u-j-10<0&&(y.classList.remove("hint__text_".concat(E)),y.classList.add("hint__text_".concat("top"===E?"bottom":"centeredBottom")));break;case"bottom":case"centeredBottom":u+j+20>b&&(y.classList.remove("hint__text_".concat(E)),y.classList.add("hint__text_".concat("bottom"===E?"top":"centeredTop")));break;case"left":f-O-10<0&&(y.classList.remove("hint__text_".concat(E)),y.classList.add("hint__text_right"));break;default:f+a+O+10>_&&(y.classList.remove("hint__text_".concat(E)),y.classList.add("hint__text_left"))}};return(0,i.useEffect)(function(){(0,d.initHintContainer)(J,N);var e=function(e){var t;if((null==e||null==(t=e.detail)?void 0:t.hintId)!==J){Y(!1);var n=p.get(J);n&&(clearTimeout(n),p.delete(J))}return e};return G.current&&document.addEventListener(s.I_AM_OPENED_EVENT_NAME,e),function(){document.removeEventListener(s.I_AM_OPENED_EVENT_NAME,e);var t=p.get(J);t&&(clearTimeout(t),p.delete(J))}},[]),(0,i.useEffect)(function(){return er(),null==A||A(X),X?(document.addEventListener("scroll",Z,!0),document.addEventListener("click",ee,!0)):(document.removeEventListener("scroll",Z,!0),document.removeEventListener("click",ee,!0)),function(){var e=p.get(J);e&&(clearTimeout(e),p.delete(J))}},[X]),(0,n.jsxs)("div",{"data-testid":V,className:(0,r.default)("hint",j),ref:G,children:[(0,n.jsxs)("button",{tabIndex:W?0:-1,"data-testid":"string"==typeof M&&M.length?null==(b=M.replace)?void 0:b.call(M,/\s/g,"-"):"".concat(V,"--button"),"aria-label":W&&"string"==typeof M?M:"",onClick:function(){return"click"===L&&(et?null==k?void 0:k():Y(!X))},onMouseEnter:en.onMouseEnter,onMouseLeave:en.onMouseLeave,className:(0,r.default)("hint__button",{hint__button_active:X}),children:[q||null===q||(0,n.jsxs)(n.Fragment,{children:["outlined"===S&&(0,n.jsx)(l.HelpCircle,{width:16,height:16,className:"hint__icon outlined"}),"filled"===S&&(0,n.jsx)(c.HelpCircleFilled,{className:"hint__icon filled"}),"warning"===S&&(0,n.jsx)(l.AlertTriangle,{className:"hint__icon",color:"#F06D8D",width:16,height:16})]}),M&&(0,n.jsx)("span",{className:(0,r.default)("hint__label",{"color--primary":X}),children:(0,a.capitalized)(M)})]}),X&&function(e){var t=(0,d.getHintContainer)(J);return t?(0,o.createPortal)((0,n.jsxs)("div",{"data-testid":"test-hint-text",className:(0,r.default)("hint__text","hint__text_".concat(E),"hint--".concat(e,"__text")),onMouseEnter:function(){m=!0},onMouseLeave:en.onMouseLeaveHoverableContent,onClick:en.onClick,children:[U&&(0,n.jsx)(u.default,{size:"small"}),g,D]}),t):null}(j)]})};
|
|
1
|
+
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(t,n){return function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(n=i.next()).done)&&(o.push(n.value),!t||o.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(t,n)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}}(t,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return b}});var n=require("react/jsx-runtime"),r=f(require("classnames")),i=function(e,t){if(e&&e.__esModule)return e;if(null===e||(void 0===e?"undefined":e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)!="object"&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=i?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(require("react")),o=require("react-dom"),l=require("react-feather"),a=require("../../../Functions/utils"),c=require("../../../Molecular/CustomIcons"),u=f(require("../../Layout/Spinner/Spinner")),s=require("./partials/_constants"),d=require("./partials/_utils");function f(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}require("./Hint.scss");var p=new Map,m=!1,h={};function _(){}var b=function(e){var f,v,b,y,g=e.hint,O=e.side,E=void 0===O?"right":O,j=e.className,x=e.hintContainer,N=void 0===x?h:x,w=e.label,M=void 0===w?"":w,C=e.variant,S=void 0===C?"filled":C,P=e.handleOpenType,L=void 0===P?"click":P,k=e.onClickCallback,T=e.onOpenChange,A=void 0===T?_:T,H=e.key,I=e.id,D=e.children,q=e.icon,B=e.isAccessability,W=void 0!==B&&B,F=e.testId,V=void 0===F?"hint":F,R=e.isHoverableContent,z=void 0!==R&&R,U=e.isLoading,$=e.isCloseOnChildrenClick,G=(0,i.useRef)(null),J=t((0,i.useState)(null!=(y=null!=I?I:H)?y:Math.random().toString(16).slice(2)),1)[0],K=t((0,i.useState)((f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},s.I_AM_OPENED_EVENT_OPTIONS),v=v={detail:{hintId:J}},Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(v)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(v)).forEach(function(e){Object.defineProperty(f,e,Object.getOwnPropertyDescriptor(v,e))}),f)),1)[0],Q=t((0,i.useState)(!1),2),X=Q[0],Y=Q[1],Z=t((0,i.useState)(new d.HandleScrollObj(Y)),1)[0],ee=t((0,i.useState)(new d.HandleClickOutsideObj(J,Y)),1)[0],et="function"==typeof k,en={onMouseEnter:function(){var e=p.get(J);if(e&&clearTimeout(e),"hover"===L){var t=setTimeout(function(){var e,t;Y(!0),X||null==k||k(),null==(t=G.current)||null==(e=t.dispatchEvent)||e.call(t,new CustomEvent(s.I_AM_OPENED_EVENT_NAME,K))},350);p.set(J,t)}},onMouseLeave:function(){var e=p.get(J);if(e&&clearTimeout(e),z||"hover"!==L){if(z&&"hover"===L){var t=setTimeout(function(){m||Y(!1),p.delete(J)},100);p.set(J,t)}}else{var n=setTimeout(function(){Y(!1),p.delete(J)},1e3);p.set(J,n)}},onMouseLeaveHoverableContent:function(){var e=p.get(J);if(e&&clearTimeout(e),z&&"hover"===L){var t=setTimeout(function(){Y(!1),m=!1,p.delete(J)},100);p.set(J,t)}},onClick:void 0!==$&&$?function(){return Y(!1)}:function(){}},er=function(){var e,t,n,r,i=(0,d.getHintContainer)(J);if(!i||!X)return!1;var o=(null==G?void 0:G.current)!==null?null==G||null==(e=G.current)?void 0:e.getBoundingClientRect():{},l=o.width,a=void 0===l?0:l,c=o.top,u=void 0===c?0:c,s=o.left,f=void 0===s?0:s,v=null!=N?N:{},p=v.addWidth,m=v.addLeft,h=v.addTop,_=document.documentElement.clientWidth,b=document.documentElement.clientHeight,y=i.getElementsByClassName("hint__text")[0],g=(null==y?void 0:y.getBoundingClientRect())||{},O=g.width,j=g.height;switch(i.style.width=X?null==(t=(p&&!Number.isNaN(+p)?+p:0)+a)?void 0:t.toString().concat("px"):"0",i.style.left=X?null==(n=(m&&!Number.isNaN(+m)?+m:0)+f)?void 0:n.toString().concat("px"):"0",i.style.top=X?null==(r=(h&&!Number.isNaN(+h)?+h:0)+u)?void 0:r.toString().concat("px"):"0",i.style.maxHeight=X?null==j?void 0:j.toString().concat("px"):"0",E){case"top":case"centeredTop":u-j-10<0&&(y.classList.remove("hint__text_".concat(E)),y.classList.add("hint__text_".concat("top"===E?"bottom":"centeredBottom")));break;case"bottom":case"centeredBottom":u+j+20>b&&(y.classList.remove("hint__text_".concat(E)),y.classList.add("hint__text_".concat("bottom"===E?"top":"centeredTop")));break;case"left":f-O-10<0&&(y.classList.remove("hint__text_".concat(E)),y.classList.add("hint__text_right"));break;default:f+a+O+10>_&&(y.classList.remove("hint__text_".concat(E)),y.classList.add("hint__text_left"))}};return(0,i.useEffect)(function(){(0,d.initHintContainer)(J,N);var e=function(e){var t;if((null==e||null==(t=e.detail)?void 0:t.hintId)!==J){Y(!1);var n=p.get(J);n&&(clearTimeout(n),p.delete(J))}return e};return G.current&&document.addEventListener(s.I_AM_OPENED_EVENT_NAME,e),function(){document.removeEventListener(s.I_AM_OPENED_EVENT_NAME,e);var t=p.get(J);t&&(clearTimeout(t),p.delete(J))}},[]),(0,i.useEffect)(function(){return er(),null==A||A(X),X?(document.addEventListener("scroll",Z,!0),document.addEventListener("click",ee,!0)):(document.removeEventListener("scroll",Z,!0),document.removeEventListener("click",ee,!0)),function(){var e=p.get(J);e&&(clearTimeout(e),p.delete(J))}},[X]),(0,n.jsxs)("div",{"data-testid":V,className:(0,r.default)("hint",j),ref:G,children:[(0,n.jsxs)("button",{tabIndex:W?0:-1,"data-testid":"string"==typeof M&&M.length?null==(b=M.replace)?void 0:b.call(M,/\s/g,"-"):"".concat(V,"--button"),"aria-label":W&&"string"==typeof M?M:"",onClick:function(){return"click"===L&&(et?null==k?void 0:k():Y(!X))},onMouseEnter:en.onMouseEnter,onMouseLeave:en.onMouseLeave,className:(0,r.default)("hint__button",{hint__button_active:X}),children:[q||null===q||(0,n.jsxs)(n.Fragment,{children:["outlined"===S&&(0,n.jsx)(l.HelpCircle,{width:16,height:16,className:"hint__icon outlined"}),"filled"===S&&(0,n.jsx)(c.HelpCircleFilled,{className:"hint__icon filled"}),"warning"===S&&(0,n.jsx)(l.AlertTriangle,{className:"hint__icon",color:"#F06D8D",width:16,height:16})]}),M&&(0,n.jsx)("span",{className:(0,r.default)("hint__label",{"color--primary":X}),children:(0,a.capitalized)(M)})]}),X&&function(e){var t=(0,d.getHintContainer)(J);return t?(0,o.createPortal)((0,n.jsxs)("div",{"data-testid":"test-hint-text",className:(0,r.default)("hint__text","hint__text_".concat(E),"hint--".concat(e,"__text")),onMouseEnter:function(){z&&(m=!0)},onMouseLeave:z?en.onMouseLeaveHoverableContent:void 0,onClick:en.onClick,children:[U&&(0,n.jsx)(u.default,{size:"small"}),g,D]}),t):null}(j)]})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hint.js","sourceRoot":"","sources":["../../../../src/Atomic/UI/Hint/Hint.tsx"],"names":[],"mappings":";;;AAKA,oEAA4B;AAC5B,uDAA2D;AAC3D,yCAAyC;AACzC,iDAA0D;AAE1D,oDAAuD;AACvD,gEAAkE;AAElE,mFAAmD;AAEnD,sDAA0F;AAC1F,8CAAgH;AAEhH,uBAAqB;AAErB,iDAAiD;AACjD,MAAM,cAAc,GAAG,IAAI,GAAG,EAA0B,CAAC;AAEzD,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAElC,MAAM,iBAAiB,GAAG,EAAiC,CAAC;AAE5D,SAAS,eAAe,KAAU,CAAC;AAMnC,MAAM,IAAI,GAAyB,CAAC,EAClC,IAAI,EACJ,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C,KAAK,CAAC,CAAC,CAAC,EAAE,EACrE,OAAO,EAAE,GAAG,EAAE,CACZ,cAAc,KAAK,OAAO;mBACvB,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,aAAf,eAAe,uBAAf,eAAe,EAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,EACjE,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,SAAS,EAAE,IAAA,oBAAE,EAAC,cAAc,EAAE,EAAE,mBAAmB,EAAE,MAAM,EAAE,CAAC;YAE7D,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,CACxB;gBACG,OAAO,KAAK,UAAU,IAAI,8BAAC,0BAAU,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAC,qBAAqB,GAAG;gBAC/F,OAAO,KAAK,QAAQ,IAAI,8BAAC,8BAAgB,IAAC,SAAS,EAAC,mBAAmB,GAAG;gBAC1E,OAAO,KAAK,SAAS,IAAI,CACxB,8BAAC,6BAAa,IAAC,SAAS,EAAC,YAAY,EAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAI,CAChF,CACA,CACJ;YACA,KAAK,IAAI,wCAAM,SAAS,EAAE,IAAA,oBAAE,EAAC,aAAa,EAAE,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC,IAAG,IAAA,mBAAW,EAAC,KAAK,CAAC,CAAQ,CAChG;QAER,MAAM,IAAI,mBAAmB,CAAC,SAAS,CAAC,CACrC,CACP,CAAC;AACJ,CAAC,CAAA;AAED,kBAAe,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export default FileLoaderLocal;
|
|
2
|
-
declare function FileLoaderLocal({ groupId, id, fieldId, fieldKey, label, error, outerError, isRequired, accept, onChange, className, value, isNoTrashIcon, maxItemSizeBytes, testId, attributesOfNativeInput, }: {
|
|
3
|
-
groupId: any;
|
|
4
|
-
id: any;
|
|
5
|
-
fieldId: any;
|
|
6
|
-
fieldKey: any;
|
|
7
|
-
label: any;
|
|
8
|
-
error: any;
|
|
9
|
-
outerError: any;
|
|
10
|
-
isRequired: any;
|
|
11
|
-
accept: any;
|
|
12
|
-
onChange: any;
|
|
13
|
-
className: any;
|
|
14
|
-
value: any;
|
|
15
|
-
isNoTrashIcon?: boolean | undefined;
|
|
16
|
-
maxItemSizeBytes: any;
|
|
17
|
-
testId?: string | undefined;
|
|
18
|
-
attributesOfNativeInput?: {} | undefined;
|
|
19
|
-
}): JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileLoaderLocal.js","sourceRoot":"","sources":["../../../../src/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js"],"names":[],"mappings":";;;AAAA,0DAA0B;AAE1B,oEAA4B;AAC5B,iDAA4D;AAE5D,oDAGkC;AAElC,kCAAgC;AAEhC,MAAM,aAAa,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvC,MAAM,eAAe,GAAG,CAAC,EACvB,OAAO,EACP,EAAE,EACF,OAAO,EACP,QAAQ,EACR,KAAK,EACL,KAAK,EACL,UAAU,EACV,UAAU,EACV,MAAM,EACN,QAAQ,EACR,SAAS,EACT,KAAK,EACL,aAAa,GAAG,KAAK,EACrB,gBAAgB,EAChB,MAAM,GAAG,mBAAmB,EAC5B,uBAAuB,GAAG,EAAE,GAC7B,EAAE,EAAE;IACH,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,EAAE;QAC5B,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACtC,OAAO,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,CAAC,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,MAAM,mBAAmB,GAAG,GAAG,EAAE;QAC/B,IAAI,CAAC,KAAK,E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