@corva/ui 3.49.0-3 → 3.49.0-5

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.
Files changed (51) hide show
  1. package/cjs-bundle/clients/jsonApi/postTaskAndWaitResult.js +1 -1
  2. package/cjs-bundle/components/ColorPicker/ColorPicketUtils.js +1 -1
  3. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js +1 -1
  4. package/cjs-bundle/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.js +1 -1
  5. package/cjs-bundle/components/Search/Search.js +1 -1
  6. package/cjs-bundle/components/Select/index.js +1 -1
  7. package/cjs-bundle/utils/goalsConfig/utils.js +1 -1
  8. package/clients/jsonApi/postTaskAndWaitResult.js +1 -1
  9. package/components/Autocomplete/Autocomplete.d.ts +2 -2
  10. package/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  11. package/components/ColorPicker/ColorPicketUtils.d.ts.map +1 -1
  12. package/components/ColorPicker/ColorPicketUtils.js +1 -1
  13. package/components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.d.ts.map +1 -1
  14. package/components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js +1 -1
  15. package/components/GradientManager/GradientSelect.d.ts +1 -1
  16. package/components/GradientManager/GradientSelect.d.ts.map +1 -1
  17. package/components/GradientManager/__tests__/pageHelpers.d.ts +5 -2
  18. package/components/GradientManager/__tests__/pageHelpers.d.ts.map +1 -1
  19. package/components/GradientPicker/__tests__/pageHelpers.d.ts +5 -2
  20. package/components/GradientPicker/__tests__/pageHelpers.d.ts.map +1 -1
  21. package/components/OffsetWellPickerV2/constants.d.ts +28 -0
  22. package/components/OffsetWellPickerV2/constants.d.ts.map +1 -1
  23. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.d.ts +28 -0
  24. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.d.ts.map +1 -1
  25. package/components/OffsetWellPickerV4/effects/useSortedWells.d.ts +1 -1
  26. package/components/OffsetWellPickerV4/effects/useSortedWells.d.ts.map +1 -1
  27. package/components/OffsetWellPickerV5/components/Filter/hooks/useGridEdgeDetection.d.ts.map +1 -1
  28. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useBoxSelection.d.ts.map +1 -1
  29. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useElementSize.d.ts.map +1 -1
  30. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useLassoKeyboardHandlers.d.ts.map +1 -1
  31. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useLassoSelection.d.ts.map +1 -1
  32. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapBounds.d.ts.map +1 -1
  33. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useRadiusKeyboardHandlers.d.ts.map +1 -1
  34. package/components/OffsetWellPickerV5/effects/useSortedWells.d.ts +1 -1
  35. package/components/OffsetWellPickerV5/effects/useSortedWells.d.ts.map +1 -1
  36. package/components/OffsetWellPickerV5/stores/view-store/ViewStoreProvider.d.ts.map +1 -1
  37. package/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.js +1 -1
  38. package/components/Search/Search.d.ts.map +1 -1
  39. package/components/Search/Search.js +1 -1
  40. package/components/Select/index.d.ts +1 -1
  41. package/components/Select/index.d.ts.map +1 -1
  42. package/components/Select/index.js +1 -1
  43. package/mcp-server/server.mjs +8 -8
  44. package/package.json +1 -1
  45. package/storyBookHelpers/utils.d.ts +1 -1
  46. package/storyBookHelpers/utils.d.ts.map +1 -1
  47. package/tsconfig.tsbuildinfo +1 -1
  48. package/utils/goalsConfig/goalsConfig.d.ts +2 -2
  49. package/utils/goalsConfig/goalsConfig.d.ts.map +1 -1
  50. package/utils/goalsConfig/utils.d.ts.map +1 -1
  51. package/utils/goalsConfig/utils.js +1 -1
@@ -1,2 +1,2 @@
1
- import o from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/objectWithoutProperties";import{jsx as t,jsxs as i,Fragment as s}from"react/jsx-runtime";import{useState as r,useRef as c,useCallback as l,useEffect as p,useMemo as a,cloneElement as u}from"react";import d from"classnames";import{debounce as m,isEmpty as h,omit as v,noop as I}from"lodash";import{Autocomplete as f}from"@material-ui/lab";import{Popper as b,Tooltip as g,Fade as C,Chip as j,TextField as O,InputAdornment as P,CircularProgress as A,MenuItem as S,Checkbox as x}from"@material-ui/core";import{AccessTime as y}from"@material-ui/icons";import F from"./components/Listbox.js";import G from"./components/Paper.js";import"./components/RecentSearches.js";import L from"./components/Groups.js";import R from"./components/SelectAllListItem.js";import{PaperContext as k}from"./context/index.js";import{useAutocompletOptions as N}from"./effects/useAutocompleteOptions.js";import D from"./styles.js";import{DownOneIcon as T,CloseSmallIcon as z}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import{MiddleTruncatedText as M}from"../MiddleTruncatedText/MiddleTruncatedText.js";import w from"../IconButton/index.js";var B=["AutocompleteProps","value","disableClearable","onChange","onInputChange","loading","options","optionSize","placeholder","onGroupChange","disabled","disableResetOnGroupChange","multiple","groups","GroupsComponent","recentSearchesMaxCount","dataStorageKey","RecentSearchesComponent","dataStorage","onInputReset","getOptionLabel","TextFieldProps","ListboxProps","onInputChangeCallback","renderCustomOption","isHiddenAllOption","isHiddenAllLabel","onOpen","selectedGroup","onGroupReset","onClose","popperProps","paperFooter","noOptionsText","ListboxComponent","isPrioritizedSelectedOptions","isOpenedFromParent","onFocus","InputProps","classes","popupIcon","shouldResetInputOnAutocompleteChange"],E=["popper","listbox","popupIndicator","popupIndicatorOpen","groupChip"],H=["InputProps","inputProps"],U=["input"],W=["classes","style"],K=["children","className"],_=["style"];function q(o,n){var e=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable}))),e.push.apply(e,t)}return e}function V(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?q(Object(t),!0).forEach((function(e){o(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(t,o))}))}return n}var Z={},J=function(L){var q=L.AutocompleteProps,J=void 0===q?{}:q,Q=L.value,X=L.disableClearable,Y=void 0!==X&&X,$=L.onChange,oo=L.onInputChange,no=void 0===oo?null:oo,eo=L.loading,to=void 0!==eo&&eo,io=L.options,so=void 0===io?[]:io,ro=L.optionSize,co=L.placeholder,lo=void 0===co?"Search...":co,po=L.onGroupChange,ao=void 0===po?function(){}:po,uo=L.disabled,mo=void 0!==uo&&uo,ho=L.disableResetOnGroupChange,vo=L.multiple,Io=void 0!==vo&&vo,fo=L.groups,bo=void 0===fo?[]:fo,go=L.GroupsComponent,Co=void 0===go?null:go,jo=L.recentSearchesMaxCount,Oo=void 0===jo?3:jo,Po=L.dataStorageKey,Ao=void 0===Po?"Search:recentSearches":Po,So=L.RecentSearchesComponent,xo=void 0===So?null:So,yo=L.dataStorage,Fo=void 0===yo?sessionStorage:yo,Go=L.onInputReset,Lo=void 0===Go?null:Go,Ro=L.getOptionLabel,ko=void 0===Ro?function(o){return o.label||""}:Ro,No=L.TextFieldProps,Do=void 0===No?{endAdornment:null}:No,To=L.ListboxProps,zo=void 0===To?null:To,Mo=L.onInputChangeCallback,wo=void 0===Mo?function(){}:Mo,Bo=L.renderCustomOption,Eo=void 0===Bo?null:Bo,Ho=L.isHiddenAllOption,Uo=void 0!==Ho&&Ho,Wo=L.isHiddenAllLabel,Ko=void 0!==Wo&&Wo,_o=L.onOpen,qo=void 0===_o?I:_o,Vo=L.selectedGroup,Zo=void 0===Vo?null:Vo,Jo=L.onGroupReset,Qo=void 0===Jo?function(){}:Jo,Xo=L.onClose,Yo=void 0===Xo?function(){}:Xo,$o=L.popperProps,on=void 0===$o?Z:$o,nn=L.paperFooter,en=L.noOptionsText,tn=void 0===en?"No Options":en,sn=L.ListboxComponent,rn=void 0===sn?F:sn,cn=L.isPrioritizedSelectedOptions,ln=void 0!==cn&&cn,pn=L.isOpenedFromParent,an=void 0===pn?void 0:pn,un=L.onFocus,dn=void 0===un?null:un,mn=L.InputProps,hn=void 0===mn?null:mn,vn=L.classes,In=void 0===vn?{}:vn,fn=L.popupIcon;void 0===fn&&t(T,{theme:"filled",fill:"#BDBDBD",size:16});var bn=L.shouldResetInputOnAutocompleteChange,gn=e(L,B),Cn=r(""),jn=n(Cn,2),On=jn[0],Pn=jn[1],An=r(""),Sn=n(An,2),xn=Sn[0],yn=Sn[1],Fn=r(!1),Gn=n(Fn,2),Ln=Gn[0],Rn=Gn[1],kn=r(!1),Nn=n(kn,2),Dn=Nn[0],Tn=Nn[1],zn=c(),Mn=c(),wn=N({options:so,value:Q,groups:bo,selectedGroup:Zo,isPrioritizedSelectedOptions:ln}),Bn=wn.autocompleteOptions,En=wn.isGrouped,Hn=wn.handleAutocompleOptionsUpdate,Un=D(),Wn=In.popper,Kn=In.listbox,_n=In.popupIndicator,qn=In.popupIndicatorOpen,Vn=In.groupChip,Zn=e(In,E),Jn=V({popper:d(Un.popper,Wn),listbox:d(Un.listbox,Kn),popupIndicator:d(Un.popupIndicator,_n),popupIndicatorOpen:d(Un.popupIndicatorOpen,qn)},Zn),Qn=function(){Pn(""),null==Lo||Lo()},Xn=l(m((function(o){return yn(o)}),500),[]),Yn=function(o){var n=bo.find((function(n){return n.id===o}));ho||Qn(),ao(n)},$n=function(o){On.length||Io&&"ArrowLeft"===o.code&&o.stopPropagation()};p((function(){Ln&&(zn.current.focus(),zn.current.setSelectionRange(On.length,On.length))}));var oe=Io&&Array.isArray(Q)?Q.length:null,ne=Io&&(null==Bn?void 0:Bn.length)===oe,ee=Io&&!!oe&&!ne,te=function(){return Qn(),J.getOptionDisabled&&ne?$(null,[so[so.length-1]]):$(null,ne||ee?[]:Bn)};p((function(){Xn(On),no&&no(On)}),[On]);var ie=function(o,n){"blur"===n&&(!o.relatedTarget||Mn.current.contains(o.relatedTarget))||(Yo(),Rn(!1))},se=function(){(null!=an?an:Ln)?(Rn(!1),Yo()):(Rn(!0),qo())},re=function(o){if(ne&&!Uo&&!Ko)return"All";var n=o[0].label||o[0].name||"";return 1===(null==o?void 0:o.length)?t("div",{children:t(M,{children:n})}):"".concat(null==o?void 0:o.length," Selected")},ce=h(Bn),le=a((function(){return{onOutsideClick:ie,isEmptyOptions:ce,loading:to,AllSelectComponent:!Uo&&Io&&!ce&&t(R,{className:Un.selectAllCheckbox,onClick:te,someSelected:ee,allSelected:ne}),RecentSearchesComponent:xo&&t(xo,{title:"Recent Searches",Icon:y,dataStorage:Fo,dataStorageKey:Ao,maxCount:Oo,isHidden:!h(On),onInputChange:function(o){return Pn(o)},inputValue:xn}),GroupsComponent:!Zo&&En&&Co&&t(Co,{onGroupClick:Yn,groups:bo})}}),[Zo,to,En,ce,On,Uo,Io,ce,xn,Yo,ie]),pe=a((function(){return function(o){var n=o.children,t=o.className,s=e(o,K);return i(G,V(V({},s),{},{className:t,inputRef:zn,ref:Mn,children:[n,nn]}))}}),[nn]),ae=a((function(){return function(o){var n=on.style,i=e(on,_);return t(b,V(V({},o),{},{style:V(V({},o.style),n),placement:"bottom-start"},i))}}),[on]);return t(k.Provider,{value:le,children:t(f,V(V({},v(gn,["InputProps","isNullable","isOpenedFromParent"])),{},{PopperComponent:ae,disableClearable:Y,onOpen:function(o){Hn(),Rn(!0),qo(o)},onClose:ie,open:null!=an?an:Ln,onChange:function(o,n){Io&&!bn||Pn(""),$(o,n)},forcePopupIcon:J.forcePopupIcon,fullWidth:!0,disabled:mo,value:Q,classes:Jn,renderInput:function(c){var l,p,a,m=r(!1),I=n(m,2),f=I[0],b=I[1],g=c.InputProps,C=c.inputProps,S=e(c,H),x=(null===(l=g.endAdornment)||void 0===l||null===(p=l.props)||void 0===p||null===(a=p.children)||void 0===a?void 0:a.length)>1?u(g.endAdornment,{children:g.endAdornment.props.children.slice(1),onMouseDown:function(o){return o.stopPropagation()},onMouseUp:function(o){return o.stopPropagation()}}):g.endAdornment,y=1===oe,F=f||Ln||On.length>0||!h(Q)||!h(null==hn?void 0:hn.startAdornment),G=hn||{},L=G.classes,R=(L=void 0===L?{}:L).input,k=void 0===R?"":R,N=e(L,U),D=G.style,T=e(G,W);return t(O,V(V(V({},S),v(Do,["endAdornment"])),{},{onBlur:function(){b(!1),y&&Tn(!0)},onFocus:function(){b(!0)},onKeyDown:$n,inputRef:zn,placeholder:lo,classes:{root:Un.searchInput},inputProps:V(V({style:{padding:5}},C),gn.inputProps),InputLabelProps:{shrink:F},InputProps:V(V(V({classes:V({input:d(Dn?Un.inputShrinked:y&&Un.inputExpanded,k)},N),style:V({paddingRight:0,paddingBottom:0},D)},g),T),{},{startAdornment:i(s,{children:[null==hn?void 0:hn.startAdornment,Zo&&t(j,{className:Un.selectedGroup,"data-not-migrated-muichip":!0,variant:"outlined",label:i("div",{className:Un.selectedGroupLabel,children:[Zo.name,t(z,{size:16,id:"removeGroupIcon",className:Un.removeIcon,onClick:Qo})]})},Zo.id),Io&&!h(Q)&&t("div",{onClick:se,id:"selectedOptions",className:d(Un.selectedLabel,Dn&&Un.selectedLabelExpanded),children:re(Q)})]}),endAdornment:i(s,{children:[i(P,{className:d(Un.endAdornment,o({},Un.removeIconWithDropdown,J.forcePopupIcon)),position:"end",children:[Do.endAdornment,to&&t(A,{color:"primary",size:20}),f&&On&&!Y&&t(w,{"data-testid":"".concat("AutocompleteSearch","_clear_icon"),size:"small",className:Un.iconButton,onClick:function(){Pn(""),Lo&&Lo()},tooltipProps:{title:"Clear"},children:t(z,{size:20,className:Un.closeIcon})})]}),J.forcePopupIcon&&x]})})}))},loading:to,options:Bn,renderGroup:function(o){var n=o.key,e=o.group,s=o.children;return!e||!h(Zo)&&Io?s:i("div",{className:Un.group,children:[t(g,{title:e,placement:"right",TransitionComponent:C,TransitionProps:{timeout:500},enterDelay:500,children:t(j,{"data-not-migrated-muichip":!0,className:d(Un.groupChip,Vn),variant:"outlined",label:e})}),s]},n)},disableCloseOnSelect:Io,multiple:Io,renderOption:Eo||function(o,n){var e=o.label,s=void 0===e?"":e,r=o.id;return Io?i("div",{className:d(Un.option,ro),"data-testid":"autocompleteOption_".concat(s,"MenuItem"),children:[t(x,{size:"small",disableRipple:!0,className:Un.checkbox,checked:n.selected}),t(M,{className:Un.optionLabelContainer,children:s})]},r):t(S,{className:Un.menuItem,value:r,"data-testid":"autocompleteOption_".concat(s,"MenuItem"),children:t(M,{className:Un.optionLabelContainer,children:s})},r)},groupBy:En?function(o){return o.group}:null,PaperComponent:pe,ListboxComponent:rn,inputValue:On,getOptionLabel:ko,getOptionDisabled:null==J?void 0:J.getOptionDisabled,onInputChange:function(o,n,e){Pn(ho?function(o){return"reset"===e?o:n}:n),wo(n,e)},loadingText:t("div",{className:Un.label,children:"Loading ..."}),noOptionsText:t("div",{className:Un.label,children:tn}),ListboxProps:zo,onFocus:function(){Tn(!1),null==dn||dn()}}))})};J.Groups=L;export{J as Search,J as default};
1
+ import o from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/objectWithoutProperties";import{jsx as t,jsxs as i,Fragment as s}from"react/jsx-runtime";import{useState as r,useRef as c,useCallback as l,useEffect as p,useMemo as a,cloneElement as u}from"react";import d from"classnames";import{debounce as m,isEmpty as h,omit as v,noop as I}from"lodash";import{Autocomplete as f}from"@material-ui/lab";import{Popper as b,Tooltip as g,Fade as C,Chip as j,TextField as O,InputAdornment as P,CircularProgress as A,MenuItem as S,Checkbox as x}from"@material-ui/core";import{AccessTime as y}from"@material-ui/icons";import F from"./components/Listbox.js";import G from"./components/Paper.js";import"./components/RecentSearches.js";import L from"./components/Groups.js";import R from"./components/SelectAllListItem.js";import{PaperContext as k}from"./context/index.js";import{useAutocompletOptions as N}from"./effects/useAutocompleteOptions.js";import D from"./styles.js";import{DownOneIcon as T,CloseSmallIcon as z}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import{MiddleTruncatedText as M}from"../MiddleTruncatedText/MiddleTruncatedText.js";import w from"../IconButton/index.js";var B=["AutocompleteProps","value","disableClearable","onChange","onInputChange","loading","options","optionSize","placeholder","onGroupChange","disabled","disableResetOnGroupChange","multiple","groups","GroupsComponent","recentSearchesMaxCount","dataStorageKey","RecentSearchesComponent","dataStorage","onInputReset","getOptionLabel","TextFieldProps","ListboxProps","onInputChangeCallback","renderCustomOption","isHiddenAllOption","isHiddenAllLabel","onOpen","selectedGroup","onGroupReset","onClose","popperProps","paperFooter","noOptionsText","ListboxComponent","isPrioritizedSelectedOptions","isOpenedFromParent","onFocus","InputProps","classes","popupIcon","shouldResetInputOnAutocompleteChange"],E=["popper","listbox","popupIndicator","popupIndicatorOpen","groupChip"],H=["InputProps","inputProps"],U=["input"],W=["classes","style"],K=["children","className"],_=["style"];function q(o,n){var e=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable}))),e.push.apply(e,t)}return e}function V(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?q(Object(t),!0).forEach((function(e){o(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(t,o))}))}return n}var Z={},J=function(L){var q=L.AutocompleteProps,J=void 0===q?{}:q,Q=L.value,X=L.disableClearable,Y=void 0!==X&&X,$=L.onChange,oo=L.onInputChange,no=void 0===oo?null:oo,eo=L.loading,to=void 0!==eo&&eo,io=L.options,so=void 0===io?[]:io,ro=L.optionSize,co=L.placeholder,lo=void 0===co?"Search...":co,po=L.onGroupChange,ao=void 0===po?function(){}:po,uo=L.disabled,mo=void 0!==uo&&uo,ho=L.disableResetOnGroupChange,vo=L.multiple,Io=void 0!==vo&&vo,fo=L.groups,bo=void 0===fo?[]:fo,go=L.GroupsComponent,Co=void 0===go?null:go,jo=L.recentSearchesMaxCount,Oo=void 0===jo?3:jo,Po=L.dataStorageKey,Ao=void 0===Po?"Search:recentSearches":Po,So=L.RecentSearchesComponent,xo=void 0===So?null:So,yo=L.dataStorage,Fo=void 0===yo?sessionStorage:yo,Go=L.onInputReset,Lo=void 0===Go?null:Go,Ro=L.getOptionLabel,ko=void 0===Ro?function(o){return o.label||""}:Ro,No=L.TextFieldProps,Do=void 0===No?{endAdornment:null}:No,To=L.ListboxProps,zo=void 0===To?null:To,Mo=L.onInputChangeCallback,wo=void 0===Mo?function(){}:Mo,Bo=L.renderCustomOption,Eo=void 0===Bo?null:Bo,Ho=L.isHiddenAllOption,Uo=void 0!==Ho&&Ho,Wo=L.isHiddenAllLabel,Ko=void 0!==Wo&&Wo,_o=L.onOpen,qo=void 0===_o?I:_o,Vo=L.selectedGroup,Zo=void 0===Vo?null:Vo,Jo=L.onGroupReset,Qo=void 0===Jo?function(){}:Jo,Xo=L.onClose,Yo=void 0===Xo?function(){}:Xo,$o=L.popperProps,on=void 0===$o?Z:$o,nn=L.paperFooter,en=L.noOptionsText,tn=void 0===en?"No Options":en,sn=L.ListboxComponent,rn=void 0===sn?F:sn,cn=L.isPrioritizedSelectedOptions,ln=void 0!==cn&&cn,pn=L.isOpenedFromParent,an=void 0===pn?void 0:pn,un=L.onFocus,dn=void 0===un?null:un,mn=L.InputProps,hn=void 0===mn?null:mn,vn=L.classes,In=void 0===vn?{}:vn,fn=L.popupIcon;void 0===fn&&t(T,{theme:"filled",fill:"#BDBDBD",size:16});var bn=L.shouldResetInputOnAutocompleteChange,gn=e(L,B),Cn=r(""),jn=n(Cn,2),On=jn[0],Pn=jn[1],An=r(""),Sn=n(An,2),xn=Sn[0],yn=Sn[1],Fn=r(!1),Gn=n(Fn,2),Ln=Gn[0],Rn=Gn[1],kn=r(!1),Nn=n(kn,2),Dn=Nn[0],Tn=Nn[1],zn=c(),Mn=c(),wn=N({options:so,value:Q,groups:bo,selectedGroup:Zo,isPrioritizedSelectedOptions:ln}),Bn=wn.autocompleteOptions,En=wn.isGrouped,Hn=wn.handleAutocompleOptionsUpdate,Un=D(),Wn=In.popper,Kn=In.listbox,_n=In.popupIndicator,qn=In.popupIndicatorOpen,Vn=In.groupChip,Zn=e(In,E),Jn=V({popper:d(Un.popper,Wn),listbox:d(Un.listbox,Kn),popupIndicator:d(Un.popupIndicator,_n),popupIndicatorOpen:d(Un.popupIndicatorOpen,qn)},Zn),Qn=function(){Pn(""),null==Lo||Lo()},Xn=l(m((function(o){return yn(o)}),500),[]),Yn=function(o){var n=bo.find((function(n){return n.id===o}));ho||Qn(),ao(n)},$n=function(o){On.length||Io&&"ArrowLeft"===o.code&&o.stopPropagation()};p((function(){Ln&&(zn.current.focus(),zn.current.setSelectionRange(On.length,On.length))}));var oe=Io&&Array.isArray(Q)?Q.length:null,ne=Io&&(null==Bn?void 0:Bn.length)===oe,ee=Io&&!!oe&&!ne,te=function(){return Qn(),J.getOptionDisabled&&ne?$(null,[so[so.length-1]]):$(null,ne||ee?[]:Bn)};p((function(){Xn(On),no&&no(On)}),[On]);var ie=function(o,n){var e=o;"blur"===n&&(!e.relatedTarget||Mn.current.contains(e.relatedTarget))||(Yo(),Rn(!1))},se=function(){(null!=an?an:Ln)?(Rn(!1),Yo()):(Rn(!0),qo())},re=function(o){if(ne&&!Uo&&!Ko)return"All";var n=o[0].label||o[0].name||"";return 1===(null==o?void 0:o.length)?t("div",{children:t(M,{children:n})}):"".concat(null==o?void 0:o.length," Selected")},ce=h(Bn),le=a((function(){return{onOutsideClick:ie,isEmptyOptions:ce,loading:to,AllSelectComponent:!Uo&&Io&&!ce&&t(R,{className:Un.selectAllCheckbox,onClick:te,someSelected:ee,allSelected:ne}),RecentSearchesComponent:xo&&t(xo,{title:"Recent Searches",Icon:y,dataStorage:Fo,dataStorageKey:Ao,maxCount:Oo,isHidden:!h(On),onInputChange:function(o){return Pn(o)},inputValue:xn}),GroupsComponent:!Zo&&En&&Co&&t(Co,{onGroupClick:Yn,groups:bo})}}),[Zo,to,En,ce,On,Uo,Io,ce,xn,Yo,ie]),pe=a((function(){return function(o){var n=o.children,t=o.className,s=e(o,K);return i(G,V(V({},s),{},{className:t,inputRef:zn,ref:Mn,children:[n,nn]}))}}),[nn]),ae=a((function(){return function(o){var n=on.style,i=e(on,_);return t(b,V(V({},o),{},{style:V(V({},o.style),n),placement:"bottom-start"},i))}}),[on]);return t(k.Provider,{value:le,children:t(f,V(V({},v(gn,["InputProps","isNullable","isOpenedFromParent"])),{},{PopperComponent:ae,disableClearable:Y,onOpen:function(o){Hn(),Rn(!0),qo(o)},onClose:ie,open:null!=an?an:Ln,onChange:function(o,n){Io&&!bn||Pn(""),$(o,n)},forcePopupIcon:J.forcePopupIcon,fullWidth:!0,disabled:mo,value:Q,classes:Jn,renderInput:function(c){var l,p,a,m=r(!1),I=n(m,2),f=I[0],b=I[1],g=c.InputProps,C=c.inputProps,S=e(c,H),x=(null===(l=g.endAdornment)||void 0===l||null===(p=l.props)||void 0===p||null===(a=p.children)||void 0===a?void 0:a.length)>1?u(g.endAdornment,{children:g.endAdornment.props.children.slice(1),onMouseDown:function(o){return o.stopPropagation()},onMouseUp:function(o){return o.stopPropagation()}}):g.endAdornment,y=1===oe,F=f||Ln||On.length>0||!h(Q)||!h(null==hn?void 0:hn.startAdornment),G=hn||{},L=G.classes,R=(L=void 0===L?{}:L).input,k=void 0===R?"":R,N=e(L,U),D=G.style,T=e(G,W);return t(O,V(V(V({},S),v(Do,["endAdornment"])),{},{onBlur:function(){b(!1),y&&Tn(!0)},onFocus:function(){b(!0)},onKeyDown:$n,inputRef:zn,placeholder:lo,classes:{root:Un.searchInput},inputProps:V(V({style:{padding:5}},C),gn.inputProps),InputLabelProps:{shrink:F},InputProps:V(V(V({classes:V({input:d(Dn?Un.inputShrinked:y&&Un.inputExpanded,k)},N),style:V({paddingRight:0,paddingBottom:0},D)},g),T),{},{startAdornment:i(s,{children:[null==hn?void 0:hn.startAdornment,Zo&&t(j,{className:Un.selectedGroup,"data-not-migrated-muichip":!0,variant:"outlined",label:i("div",{className:Un.selectedGroupLabel,children:[Zo.name,t(z,{size:16,id:"removeGroupIcon",className:Un.removeIcon,onClick:Qo})]})},Zo.id),Io&&!h(Q)&&t("div",{onClick:se,id:"selectedOptions",className:d(Un.selectedLabel,Dn&&Un.selectedLabelExpanded),children:re(Q)})]}),endAdornment:i(s,{children:[i(P,{className:d(Un.endAdornment,o({},Un.removeIconWithDropdown,J.forcePopupIcon)),position:"end",children:[Do.endAdornment,to&&t(A,{color:"primary",size:20}),f&&On&&!Y&&t(w,{"data-testid":"".concat("AutocompleteSearch","_clear_icon"),size:"small",className:Un.iconButton,onClick:function(){Pn(""),Lo&&Lo()},tooltipProps:{title:"Clear"},children:t(z,{size:20,className:Un.closeIcon})})]}),J.forcePopupIcon&&x]})})}))},loading:to,options:Bn,renderGroup:function(o){var n=o.key,e=o.group,s=o.children;return!e||!h(Zo)&&Io?s:i("div",{className:Un.group,children:[t(g,{title:e,placement:"right",TransitionComponent:C,TransitionProps:{timeout:500},enterDelay:500,children:t(j,{"data-not-migrated-muichip":!0,className:d(Un.groupChip,Vn),variant:"outlined",label:e})}),s]},n)},disableCloseOnSelect:Io,multiple:Io,renderOption:Eo||function(o,n){var e=o.label,s=void 0===e?"":e,r=o.id;return Io?i("div",{className:d(Un.option,ro),"data-testid":"autocompleteOption_".concat(s,"MenuItem"),children:[t(x,{size:"small",disableRipple:!0,className:Un.checkbox,checked:n.selected}),t(M,{className:Un.optionLabelContainer,children:s})]},r):t(S,{className:Un.menuItem,value:r,"data-testid":"autocompleteOption_".concat(s,"MenuItem"),children:t(M,{className:Un.optionLabelContainer,children:s})},r)},groupBy:En?function(o){return o.group}:null,PaperComponent:pe,ListboxComponent:rn,inputValue:On,getOptionLabel:ko,getOptionDisabled:null==J?void 0:J.getOptionDisabled,onInputChange:function(o,n,e){Pn(ho?function(o){return"reset"===e?o:n}:n),wo(n,e)},loadingText:t("div",{className:Un.label,children:"Loading ..."}),noOptionsText:t("div",{className:Un.label,children:tn}),ListboxProps:zo,onFocus:function(){Tn(!1),null==dn||dn()}}))})};J.Groups=L;export{J as Search,J as default};
2
2
  //# sourceMappingURL=Search.js.map
@@ -1,4 +1,4 @@
1
1
  import { SelectProps } from './types';
2
- declare const Select: <T extends unknown>({ FormControlProps, InputLabelProps, label, formHelperText, error, fullWidth, ...SelectProps }: SelectProps<T>) => JSX.Element;
2
+ declare const Select: <T extends unknown>({ FormControlProps, InputLabelProps, label, formHelperText, error, fullWidth, onChange, ...SelectProps }: SelectProps<T>) => JSX.Element;
3
3
  export default Select;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA8KtC,QAAA,MAAM,MAAM,GAAI,CAAC,SAAS,OAAO,EAAE,gGAQhC,WAAW,CAAC,CAAC,CAAC,KAAG,GAAG,CAAC,OAmDvB,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA8KtC,QAAA,MAAM,MAAM,GAAI,CAAC,SAAS,OAAO,EAAE,0GAShC,WAAW,CAAC,CAAC,CAAC,KAAG,GAAG,CAAC,OAoDvB,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useMemo as i}from"react";import{makeStyles as l,FormControl as n,InputLabel as a,Select as u,FormHelperText as p}from"@material-ui/core";import d from"uuid/v4";import c from"classnames";var s=["FormControlProps","InputLabelProps","label","formHelperText","error","fullWidth"];function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function b(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?m(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var M=l((function(e){return{formControlRoot:{"& .MuiSelect-icon":{top:"calc(50% - 8px)",right:4},"& .MuiSelect-icon.MuiSelect-iconOutlined":{right:8},"& .MuiSelect-icon.MuiSelect-iconFilled":{right:8},"&:hover":{"& .MuiFormLabel-root, & .MuiInputAdornment-root, & .MuiSelect-icon > svg > path":{color:e.palette.primary.contrastText},"& .MuiSelect-icon > svg > path":{stroke:e.palette.primary.contrastText,fill:e.palette.primary.contrastText},"& .MuiInput-underline:not(.Mui-disabled), & .MuiFilledInput-underline:not(.Mui-disabled)":{"&::before":{borderBottom:"2px solid ".concat(e.palette.primary.contrastText)}}},"& .MuiInputBase-root.Mui-focused":{"& .MuiSelect-icon > svg > path":{stroke:e.palette.primary.main,fill:e.palette.primary.main}},"& .MuiInput-underline, & .MuiFilledInput-underline":{"&::before":{borderBottom:"1px solid ".concat(e.palette.primary.text6)},"&.Mui-disabled":{"&::before":{opacity:"0.4",borderBottom:"1px solid ".concat(e.palette.primary.text6)},"&::after":{opacity:"0.4"}}},"& .MuiSelect-root":{"&.Mui-disabled":{color:e.palette.primary.contrastText,opacity:"0.4"}},"& .MuiFormLabel-root":{color:e.palette.primary.text6,"&.Mui-focused":{color:e.palette.primary.main},"&.Mui-disabled.MuiInputLabel-root":{color:e.palette.primary.text6,opacity:"0.4"}},"& .MuiSelect-icon.Mui-disabled":{color:e.palette.primary.contrastText,opacity:"0.4"},"& .MuiFormHelperText-root":{color:e.palette.primary.text6,"&.Mui-disabled":{opacity:"0.4"}},"& .MuiFilledInput-root":{backgroundColor:e.palette.background.b6,"&:hover":{backgroundColor:e.palette.background.b7},"&.Mui-disabled":{backgroundColor:e.palette.background.b6,opacity:"0.4"}},"& .MuiInputLabel-filled":{left:2},"& .MuiSelect-filled":{paddingLeft:14},"& .MuiSvgIcon-root.MuiSelect-icon":{color:e.palette.primary.text6},"& .MuiInputBase-root":{"& .MuiInputAdornment-root":{color:e.palette.primary.text6,"& svg":{height:16,width:16}},"&.Mui-error":{"& .MuiInputAdornment-root":{color:e.palette.error.main}},"&.Mui-disabled":{"& .MuiInputAdornment-root":{opacity:"0.4"}},"&.Mui-focused":{"& .MuiInputAdornment-root":{color:e.palette.primary.main}}}},menuList:{backgroundColor:e.palette.background.b9,"& .MuiMenuItem-root":{"&.Mui-selected":{backgroundColor:e.palette.primary.text9}}},error:{"&:hover":{"& .MuiInput-underline, & .MuiFilledInput-underline":{"&::after":{borderBottom:"2px solid ".concat(e.palette.error.main)}},"& .MuiInput-underline.Mui-disabled, & .MuiFilledInput-underline.Mui-disabled":{"&::before":{borderBottom:"1px solid ".concat(e.palette.error.main)},"&::after":{display:"none"}},"& .MuiOutlinedInput-root.Mui-error:not(.Mui-disabled) .MuiOutlinedInput-notchedOutline":{borderWidth:2}},"& .MuiFormLabel-root.MuiInputLabel-root":{color:e.palette.error.main,"&.Mui-focused":{color:e.palette.error.main},"&.Mui-disabled":{color:e.palette.error.main}},"& .MuiFormHelperText-root":{color:e.palette.error.main},"& .MuiInput-underline, & .MuiFilledInput-underline":{"&::after":{borderBottom:"1px solid ".concat(e.palette.error.main)},"&.Mui-disabled::after":{display:"none"},"&.Mui-disabled::before":{borderBottom:"1px solid ".concat(e.palette.error.main)}},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.error.main,opacity:"0.4"}},paper:{marginTop:8}}})),f=function(l){var m,f,y,v,h,g,I=l.FormControlProps,x=void 0===I?{}:I,O=l.InputLabelProps,P=void 0===O?{}:O,S=l.label,F=void 0===S?null:S,j=l.formHelperText,k=void 0===j?null:j,C=l.error,L=void 0!==C&&C,T=l.fullWidth,B=void 0!==T&&T,w=t(l,s),A=i(d,[]),W=M();return r(n,b(b({},x),{},{classes:b(b({},x.classes),{},{root:c(null===(m=x.classes)||void 0===m?void 0:m.root,W.formControlRoot,e({},W.error,L))}),disabled:x.disabled||w.disabled,fullWidth:B,error:L,children:[F&&o(a,b(b({id:A},P),{},{children:F})),o(u,b(b({},w),{},{labelId:A,label:F,MenuProps:b(b({getContentAnchorEl:null,anchorOrigin:{horizontal:"left",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"left"}},null==w?void 0:w.MenuProps),{},{classes:b(b({},null==w||null===(f=w.MenuProps)||void 0===f?void 0:f.classes),{},{paper:c(W.paper,null==w||null===(y=w.MenuProps)||void 0===y||null===(v=y.classes)||void 0===v?void 0:v.paper),list:c(null==w||null===(h=w.MenuProps)||void 0===h||null===(g=h.classes)||void 0===g?void 0:g.list,W.menuList)})}),fullWidth:B})),k&&o(p,{children:k})]}))};export{f as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useMemo as i}from"react";import{makeStyles as l,FormControl as n,InputLabel as a,Select as u,FormHelperText as p}from"@material-ui/core";import d from"uuid/v4";import c from"classnames";var s=["FormControlProps","InputLabelProps","label","formHelperText","error","fullWidth","onChange"];function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function b(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?m(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var M=l((function(e){return{formControlRoot:{"& .MuiSelect-icon":{top:"calc(50% - 8px)",right:4},"& .MuiSelect-icon.MuiSelect-iconOutlined":{right:8},"& .MuiSelect-icon.MuiSelect-iconFilled":{right:8},"&:hover":{"& .MuiFormLabel-root, & .MuiInputAdornment-root, & .MuiSelect-icon > svg > path":{color:e.palette.primary.contrastText},"& .MuiSelect-icon > svg > path":{stroke:e.palette.primary.contrastText,fill:e.palette.primary.contrastText},"& .MuiInput-underline:not(.Mui-disabled), & .MuiFilledInput-underline:not(.Mui-disabled)":{"&::before":{borderBottom:"2px solid ".concat(e.palette.primary.contrastText)}}},"& .MuiInputBase-root.Mui-focused":{"& .MuiSelect-icon > svg > path":{stroke:e.palette.primary.main,fill:e.palette.primary.main}},"& .MuiInput-underline, & .MuiFilledInput-underline":{"&::before":{borderBottom:"1px solid ".concat(e.palette.primary.text6)},"&.Mui-disabled":{"&::before":{opacity:"0.4",borderBottom:"1px solid ".concat(e.palette.primary.text6)},"&::after":{opacity:"0.4"}}},"& .MuiSelect-root":{"&.Mui-disabled":{color:e.palette.primary.contrastText,opacity:"0.4"}},"& .MuiFormLabel-root":{color:e.palette.primary.text6,"&.Mui-focused":{color:e.palette.primary.main},"&.Mui-disabled.MuiInputLabel-root":{color:e.palette.primary.text6,opacity:"0.4"}},"& .MuiSelect-icon.Mui-disabled":{color:e.palette.primary.contrastText,opacity:"0.4"},"& .MuiFormHelperText-root":{color:e.palette.primary.text6,"&.Mui-disabled":{opacity:"0.4"}},"& .MuiFilledInput-root":{backgroundColor:e.palette.background.b6,"&:hover":{backgroundColor:e.palette.background.b7},"&.Mui-disabled":{backgroundColor:e.palette.background.b6,opacity:"0.4"}},"& .MuiInputLabel-filled":{left:2},"& .MuiSelect-filled":{paddingLeft:14},"& .MuiSvgIcon-root.MuiSelect-icon":{color:e.palette.primary.text6},"& .MuiInputBase-root":{"& .MuiInputAdornment-root":{color:e.palette.primary.text6,"& svg":{height:16,width:16}},"&.Mui-error":{"& .MuiInputAdornment-root":{color:e.palette.error.main}},"&.Mui-disabled":{"& .MuiInputAdornment-root":{opacity:"0.4"}},"&.Mui-focused":{"& .MuiInputAdornment-root":{color:e.palette.primary.main}}}},menuList:{backgroundColor:e.palette.background.b9,"& .MuiMenuItem-root":{"&.Mui-selected":{backgroundColor:e.palette.primary.text9}}},error:{"&:hover":{"& .MuiInput-underline, & .MuiFilledInput-underline":{"&::after":{borderBottom:"2px solid ".concat(e.palette.error.main)}},"& .MuiInput-underline.Mui-disabled, & .MuiFilledInput-underline.Mui-disabled":{"&::before":{borderBottom:"1px solid ".concat(e.palette.error.main)},"&::after":{display:"none"}},"& .MuiOutlinedInput-root.Mui-error:not(.Mui-disabled) .MuiOutlinedInput-notchedOutline":{borderWidth:2}},"& .MuiFormLabel-root.MuiInputLabel-root":{color:e.palette.error.main,"&.Mui-focused":{color:e.palette.error.main},"&.Mui-disabled":{color:e.palette.error.main}},"& .MuiFormHelperText-root":{color:e.palette.error.main},"& .MuiInput-underline, & .MuiFilledInput-underline":{"&::after":{borderBottom:"1px solid ".concat(e.palette.error.main)},"&.Mui-disabled::after":{display:"none"},"&.Mui-disabled::before":{borderBottom:"1px solid ".concat(e.palette.error.main)}},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.error.main,opacity:"0.4"}},paper:{marginTop:8}}})),f=function(l){var m,f,y,h,v,g,I=l.FormControlProps,x=void 0===I?{}:I,O=l.InputLabelProps,P=void 0===O?{}:O,S=l.label,C=void 0===S?null:S,F=l.formHelperText,j=void 0===F?null:F,k=l.error,L=void 0!==k&&k,T=l.fullWidth,B=void 0!==T&&T,w=l.onChange,A=t(l,s),W=i(d,[]),D=M();return r(n,b(b({},x),{},{classes:b(b({},x.classes),{},{root:c(null===(m=x.classes)||void 0===m?void 0:m.root,D.formControlRoot,e({},D.error,L))}),disabled:x.disabled||A.disabled,fullWidth:B,error:L,children:[C&&o(a,b(b({id:W},P),{},{children:C})),o(u,b(b({},A),{},{onChange:w,labelId:W,label:C,MenuProps:b(b({getContentAnchorEl:null,anchorOrigin:{horizontal:"left",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"left"}},null==A?void 0:A.MenuProps),{},{classes:b(b({},null==A||null===(f=A.MenuProps)||void 0===f?void 0:f.classes),{},{paper:c(D.paper,null==A||null===(y=A.MenuProps)||void 0===y||null===(h=y.classes)||void 0===h?void 0:h.paper),list:c(null==A||null===(v=A.MenuProps)||void 0===v||null===(g=v.classes)||void 0===g?void 0:g.list,D.menuList)})}),fullWidth:B})),j&&o(p,{children:j})]}))};export{f as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -7815,13 +7815,13 @@ var componentsV1Data = [
7815
7815
  },
7816
7816
  {
7817
7817
  name: "onInputChange",
7818
- type: "(event: ChangeEvent, value: string, action: 'input' | 'reset' | 'clear') => void",
7818
+ type: "(event: ChangeEvent<{}>, value: string, action: 'input' | 'reset' | 'clear') => void",
7819
7819
  required: false,
7820
7820
  description: ""
7821
7821
  },
7822
7822
  {
7823
7823
  name: "onChange",
7824
- type: "(event: ChangeEvent, value: object | string, reason: 'create-option' | 'select-option' | 'remove-option' | 'clear' | 'blur') => void",
7824
+ type: "(event: ChangeEvent<{}>, value: object | string, reason: 'create-option' | 'select-option' | 'remove-option' | 'clear' | 'blur') => void",
7825
7825
  required: false,
7826
7826
  description: ""
7827
7827
  },
@@ -7872,27 +7872,27 @@ var componentsV1Data = [
7872
7872
  {
7873
7873
  name: "Default",
7874
7874
  description: "",
7875
- code: "{\n const [value, setValue] = useState<Option>();\n return (\n <Autocomplete\n {...props}\n value={value}\n onChange={(e, newValue, ...rest) => {\n setValue(newValue as Option);\n props.onChange?.(e, newValue, ...rest);\n }}\n renderInput={params => <TextField {...params} />}\n getOptionLabel={(option: Option) => option.name}\n renderOption={(option: Option) => option.name}\n />\n );\n}"
7875
+ code: "{\n const [value, setValue] = useState<Option>();\n return (\n <Autocomplete\n {...props}\n value={value}\n onChange={(e, newValue, ...rest) => {\n setValue(newValue as Option);\n props.onChange?.(e, newValue, ...rest);\n }}\n renderInput={params => <TextField {...params} />}\n getOptionLabel={(option) => (option as Option).name}\n renderOption={(option) => (option as Option).name}\n />\n );\n}"
7876
7876
  },
7877
7877
  {
7878
7878
  name: "InputOptions",
7879
7879
  description: "Input-related options should be done through `renderInput` prop",
7880
- code: "{\n return (\n <Autocomplete\n value={null}\n options={Options}\n getOptionLabel={(option: Option) => option.name}\n renderOption={(option: Option) => option.name}\n renderInput={params => (\n <TextField {...params} label=\"Field Label\" placeholder=\"Field placeholder\" />\n )}\n />\n );\n}"
7880
+ code: "{\n return (\n <Autocomplete\n value={null}\n options={Options}\n getOptionLabel={(option) => (option as Option).name}\n renderOption={(option) => (option as Option).name}\n renderInput={params => (\n <TextField {...params} label=\"Field Label\" placeholder=\"Field placeholder\" />\n )}\n />\n );\n}"
7881
7881
  },
7882
7882
  {
7883
7883
  name: "Sizes",
7884
7884
  description: "Input size can be controlled through `size` prop.",
7885
- code: "{\n return (\n <SbRow>\n <Autocomplete\n value={Options[1]}\n size=\"small\"\n options={Options}\n renderInput={params => <TextField {...params} />}\n getOptionLabel={(option: Option) => option.name}\n renderOption={(option: Option) => option.name}\n />\n <Autocomplete\n value={Options[1]}\n size=\"medium\"\n options={Options}\n renderInput={params => <TextField {...params} />}\n getOptionLabel={(option: Option) => option.name}\n renderOption={(option: Option) => option.name}\n />\n </SbRow>\n );\n}"
7885
+ code: "{\n return (\n <SbRow>\n <Autocomplete\n value={Options[1]}\n size=\"small\"\n options={Options}\n renderInput={params => <TextField {...params} />}\n getOptionLabel={(option) => (option as Option).name}\n renderOption={(option) => (option as Option).name}\n />\n <Autocomplete\n value={Options[1]}\n size=\"medium\"\n options={Options}\n renderInput={params => <TextField {...params} />}\n getOptionLabel={(option) => (option as Option).name}\n renderOption={(option) => (option as Option).name}\n />\n </SbRow>\n );\n}"
7886
7886
  },
7887
7887
  {
7888
7888
  name: "LoadingState",
7889
7889
  description: "Use `loading` and `loadingText` props to show a custom message when some data is being loaded in the background",
7890
- code: "{\n return (\n <Autocomplete\n value={null}\n options={[]}\n renderInput={params => <TextField {...params} />}\n getOptionLabel={(option: Option) => option.name}\n renderOption={(option: Option) => option.name}\n loading\n loadingText={\n <>\n Can't you see, I'm <u>loading</u>!\n </>\n }\n />\n );\n}"
7890
+ code: "{\n return (\n <Autocomplete\n value={null}\n options={[]}\n renderInput={params => <TextField {...params} />}\n getOptionLabel={(option) => (option as Option).name}\n renderOption={(option) => (option as Option).name}\n loading\n loadingText={\n <>\n Can't you see, I'm <u>loading</u>!\n </>\n }\n />\n );\n}"
7891
7891
  },
7892
7892
  {
7893
7893
  name: "DisabledOptions",
7894
7894
  description: "Use `getOptionDisabled` prop to tell which options are disabled",
7895
- code: "{\n return (\n <Autocomplete\n value={null}\n options={Options}\n renderInput={params => <TextField {...params} />}\n getOptionLabel={(option: Option) => option.name}\n renderOption={(option: Option) => option.name}\n getOptionDisabled={(option: Option) => option.id === '2'}\n />\n );\n}"
7895
+ code: "{\n return (\n <Autocomplete\n value={null}\n options={Options}\n renderInput={params => <TextField {...params} />}\n getOptionLabel={(option) => (option as Option).name}\n renderOption={(option) => (option as Option).name}\n getOptionDisabled={(option) => (option as Option).id === '2'}\n />\n );\n}"
7896
7896
  },
7897
7897
  {
7898
7898
  name: "Creatable",
@@ -9406,7 +9406,7 @@ var componentsV1Data = [
9406
9406
  {
9407
9407
  name: "Sizes",
9408
9408
  description: "Component takes all available height, and uses `resizeObserver` to automatically adjust own layout.\n\nBreakpoints: \\`${${...}}px\\` and \\`$${...}}px\\`",
9409
- code: "{\n const max = 500;\n const min = 100;\n const [height, setHeight] = useState(500);\n\n const onHeightChange = useCallback(\n (_: ChangeEvent, value: number | number[]) =>\n setHeight(value instanceof Array ? value[0] : value),\n []\n );\n\n return (\n <SbColumn>\n <div style={{ width: '200px' }}>\n Height: {height}px\n <Slider value={height} onChange={onHeightChange} min={min} max={max} />\n </div>\n\n <div style={{ height: `${max}px` }}>\n <div style={{ height: `${height}px` }}>\n <EmptyState\n image={EmptyState.IMAGES.FracFleetHasNoActivePad}\n title={EmptyState.APP_MESSAGES.fracFleetHasNoPad.title}\n subtitle={EmptyState.APP_MESSAGES.fracFleetHasNoPad.subtitle}\n />\n </div>\n </div>\n </SbColumn>\n );\n}"
9409
+ code: "{\n const max = 500;\n const min = 100;\n const [height, setHeight] = useState(500);\n\n const onHeightChange = useCallback(\n (_: ChangeEvent<{}>, value: number | number[]) =>\n setHeight(value instanceof Array ? value[0] : value),\n []\n );\n\n return (\n <SbColumn>\n <div style={{ width: '200px' }}>\n Height: {height}px\n <Slider value={height} onChange={onHeightChange} min={min} max={max} />\n </div>\n\n <div style={{ height: `${max}px` }}>\n <div style={{ height: `${height}px` }}>\n <EmptyState\n image={EmptyState.IMAGES.FracFleetHasNoActivePad}\n title={EmptyState.APP_MESSAGES.fracFleetHasNoPad.title}\n subtitle={EmptyState.APP_MESSAGES.fracFleetHasNoPad.subtitle}\n />\n </div>\n </div>\n </SbColumn>\n );\n}"
9410
9410
  }
9411
9411
  ],
9412
9412
  sourceUrl: "https://github.com/corva-ai/corva-ui/blob/develop/src/components/EmptyState/EmptyState.tsx",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "3.49.0-3",
3
+ "version": "3.49.0-5",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "Shared components/utils for Corva ui projects",
6
6
  "keywords": [
@@ -50,6 +50,6 @@ type PartialStory = {
50
50
  background?: Background;
51
51
  showCodeSource?: boolean;
52
52
  };
53
- export declare const mutateStory: (story: StoryFn, { name, description, fullWidth, background, showCodeSource }: PartialStory) => void;
53
+ export declare const mutateStory: (story: StoryFn<any>, { name, description, fullWidth, background, showCodeSource }: PartialStory) => void;
54
54
  export {};
55
55
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/storyBookHelpers/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,eAAO,MAAM,eAAe,GAC1B,WAAW;IAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,EACzD,iBAAiB;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,OAAO,CAAA;CAAE;;;;;kBAO5B,UAAU,QARd,GAAG,EAAE,KAAK,GAAG,CAQc;;;;kBAAvB,UAAU,QARd,GAAG,EAAE,KAAK,GAAG,CAQc;;;CAatD,CAAC;AAEF,KAAK,SAAS,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;IAAE,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACvE,KAAK,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AACzD,KAAK,gBAAgB,GAAG,eAAe,GAAG,UAAU,GAAG,WAAW,CAAC;AAEnE,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAC9C,MAAM,CAAC,gBAAgB,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,SAAS,CAiDvD,CAAC;AAIF,KAAK,iBAAiB,CAAC,CAAC,SAAS,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,SAAS,SAAS,aAAa,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnF,MAAM,IAAI,CAAC,SAAS,CAAC,EACrB,OAAO,iBAAiB,CAAC,SAAS,CAAC,SA2CpC,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,OAAO,OAAO,EACd,8DAA8D,YAAY,SAa3E,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/storyBookHelpers/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,eAAO,MAAM,eAAe,GAC1B,WAAW;IAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,EACzD,iBAAiB;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,OAAO,CAAA;CAAE;;;;;kBAO5B,UAAU,QARd,GAAG,EAAE,KAAK,GAAG,CAQc;;;;kBAAvB,UAAU,QARd,GAAG,EAAE,KAAK,GAAG,CAQc;;;CAatD,CAAC;AAEF,KAAK,SAAS,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;IAAE,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACvE,KAAK,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AACzD,KAAK,gBAAgB,GAAG,eAAe,GAAG,UAAU,GAAG,WAAW,CAAC;AAEnE,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAC9C,MAAM,CAAC,gBAAgB,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,SAAS,CAiDvD,CAAC;AAIF,KAAK,iBAAiB,CAAC,CAAC,SAAS,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,SAAS,SAAS,aAAa,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnF,MAAM,IAAI,CAAC,SAAS,CAAC,EACrB,OAAO,iBAAiB,CAAC,SAAS,CAAC,SA2CpC,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,OAAO,OAAO,CAAC,GAAG,CAAC,EACnB,8DAA8D,YAAY,SAa3E,CAAC"}