@corva/ui 3.69.0-3 → 3.69.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.
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),o=require("@babel/runtime/helpers/objectWithoutProperties"),r=require("react"),i=require("classnames"),n=require("@material-ui/core"),a=require("lodash"),l=require("../context/index.js"),c=require("react/jsx-runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=u(e),d=u(t),p=u(o),b=u(i),f=["children"];function h(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function g(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?h(Object(o),!0).forEach((function(t){s.default(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):h(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var m=n.makeStyles((function(e){var t=e.palette,o=e.spacing;return{list:{height:"100%",padding:o(1,0),fontSize:16,"& .MuiAutocomplete-option":{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"}},'& .MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:"initial"},"& .MuiAutocomplete-option:active":{backgroundColor:"initial"}},noTopPadding:{paddingTop:0,"& $topShadow::before":{top:0}},shadow:{position:"sticky",display:"none",width:"100%",zIndex:1,"&::before":{content:"''",position:"absolute",width:"100%",height:o(1),zIndex:1}},bottomShadow:{bottom:0,"&::before":{bottom:o(-1),backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(t.background.b9," 100%)")}},topShadow:{top:0,"&::before":{top:o(-1),backgroundImage:"linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ".concat(t.background.b9," 100%)")}},visibleShadow:{display:"block"}}})),v=r.memo((function(e){var t=e.children,o=p.default(e,f),i=r.useState(!1),u=d.default(i,2),s=u[0],h=u[1],v=r.useState(!1),w=d.default(v,2),y=w[0],j=w[1],O=r.useRef(),S=m(),k=l.default().AllSelectComponent;return r.useEffect((function(){var e=O.current,t=a.throttle((function(){h((null==e?void 0:e.scrollTop)>0),j((null==e?void 0:e.clientHeight)+(null==e?void 0:e.scrollTop)<(null==e?void 0:e.scrollHeight))}),100,{leading:!0});return t(),null==e||e.addEventListener("scroll",t),function(){null==e||e.removeEventListener("scroll",t)}})),c.jsxs(n.List,g(g({},o),{},{className:b.default(o.className,S.list,!!k&&S.noTopPadding),ref:O,role:"listbox",children:[c.jsx("div",{className:b.default(S.shadow,S.topShadow,s&&S.visibleShadow)}),t,c.jsx("div",{className:b.default(S.shadow,S.bottomShadow,y&&S.visibleShadow)})]}))}));module.exports=v;
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),r=require("@babel/runtime/helpers/objectWithoutProperties"),o=require("react"),i=require("classnames"),n=require("@material-ui/core"),a=require("lodash"),l=require("../context/index.js"),c=require("react/jsx-runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=u(e),d=u(t),p=u(r),b=u(i),f=["children"];function h(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){s.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var m=n.makeStyles((function(e){var t=e.palette,r=e.spacing;return{list:{height:"100%",padding:r(1,0),fontSize:16,"& .MuiAutocomplete-option":{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"}},'& .MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:"initial"},"& .MuiAutocomplete-option:active":{backgroundColor:"initial"}},noTopPadding:{paddingTop:0,"& $topShadow::before":{top:0}},shadow:{position:"sticky",display:"none",width:"100%",zIndex:1,"&::before":{content:"''",position:"absolute",width:"100%",height:r(1),zIndex:1}},bottomShadow:{bottom:0,"&::before":{bottom:r(-1),backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(t.background.b9," 100%)")}},topShadow:{top:0,"&::before":{top:r(-1),backgroundImage:"linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ".concat(t.background.b9," 100%)")}},visibleShadow:{display:"block"}}})),v=o.forwardRef((function(e,t){var r=e.children,i=p.default(e,f),u=o.useState(!1),s=d.default(u,2),h=s[0],v=s[1],w=o.useState(!1),y=d.default(w,2),j=y[0],O=y[1],S=o.useRef(),k=m(),P=l.default().AllSelectComponent,x=o.useCallback((function(e){S.current=e,"function"==typeof t?t(e):t&&(t.current=e)}),[t]);return o.useEffect((function(){var e=S.current,t=a.throttle((function(){v((null==e?void 0:e.scrollTop)>0),O((null==e?void 0:e.clientHeight)+(null==e?void 0:e.scrollTop)<(null==e?void 0:e.scrollHeight))}),100,{leading:!0});return t(),null==e||e.addEventListener("scroll",t),function(){null==e||e.removeEventListener("scroll",t)}})),c.jsxs(n.List,g(g({},i),{},{className:b.default(i.className,k.list,!!P&&k.noTopPadding),ref:x,role:"listbox",children:[c.jsx("div",{className:b.default(k.shadow,k.topShadow,h&&k.visibleShadow)}),r,c.jsx("div",{className:b.default(k.shadow,k.bottomShadow,j&&k.visibleShadow)})]}))})),w=o.memo(v);module.exports=w;
2
2
  //# sourceMappingURL=Listbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Listbox.js","sources":["../../../../../src/components/Search/components/Listbox.js"],"sourcesContent":["import { memo, useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport { List, makeStyles } from '@material-ui/core';\nimport { throttle } from 'lodash';\n\nimport usePaperContext from '~/components/Search/context';\n\nconst useStyles = makeStyles(({ palette, spacing }) => ({\n list: {\n height: '100%',\n padding: spacing(1, 0),\n fontSize: 16,\n '& .MuiAutocomplete-option': {\n display: 'block',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.16)',\n },\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"]': {\n backgroundColor: 'initial',\n },\n '& .MuiAutocomplete-option:active': {\n backgroundColor: 'initial',\n },\n },\n noTopPadding: {\n paddingTop: 0,\n\n '& $topShadow::before': {\n top: 0,\n },\n },\n shadow: {\n position: 'sticky',\n display: 'none',\n width: '100%',\n zIndex: 1,\n\n '&::before': {\n content: \"''\",\n position: 'absolute',\n width: '100%',\n height: spacing(1),\n zIndex: 1,\n },\n },\n bottomShadow: {\n bottom: 0,\n\n '&::before': {\n bottom: spacing(-1),\n backgroundImage: `linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n topShadow: {\n top: 0,\n\n '&::before': {\n top: spacing(-1),\n backgroundImage: `linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n visibleShadow: {\n display: 'block',\n },\n}));\n\n/**\n * @type {React.ForwardRefExoticComponent<React.ComponentProps<List>}\n */\nconst Listbox = ({ children, ...props }) => {\n const [topScrollShadow, setTopScrollShadow] = useState(false);\n const [bottomScrollShadow, setBottomScrollShadow] = useState(false);\n const listRef = useRef();\n const classes = useStyles();\n\n const { AllSelectComponent } = usePaperContext();\n\n useEffect(() => {\n const node = listRef.current;\n const onScroll = throttle(\n () => {\n setTopScrollShadow(node?.scrollTop > 0);\n setBottomScrollShadow(node?.clientHeight + node?.scrollTop < node?.scrollHeight);\n },\n 100,\n { leading: true }\n );\n\n onScroll();\n node?.addEventListener('scroll', onScroll);\n\n return () => {\n node?.removeEventListener('scroll', onScroll);\n };\n });\n\n return (\n <List\n {...props}\n className={classNames(\n props.className,\n classes.list,\n !!AllSelectComponent && classes.noTopPadding\n )}\n ref={listRef}\n role=\"listbox\"\n >\n <div\n className={classNames(\n classes.shadow,\n classes.topShadow,\n topScrollShadow && classes.visibleShadow\n )}\n />\n {children}\n <div\n className={classNames(\n classes.shadow,\n classes.bottomShadow,\n bottomScrollShadow && classes.visibleShadow\n )}\n />\n </List>\n );\n};\n\nexport default memo(Listbox);\n"],"names":["useStyles","makeStyles","_ref","palette","spacing","list","height","padding","fontSize","display","overflow","whiteSpace","textOverflow","backgroundColor","noTopPadding","paddingTop","top","shadow","position","width","zIndex","content","bottomShadow","bottom","backgroundImage","background","b9","topShadow","visibleShadow","memo","_ref2","children","props","_objectWithoutProperties","_excluded","useState","_useState2","_slicedToArray","_useState","topScrollShadow","setTopScrollShadow","_useState4","_useState3","bottomScrollShadow","setBottomScrollShadow","listRef","useRef","classes","AllSelectComponent","usePaperContext","useEffect","node","current","onScroll","throttle","scrollTop","clientHeight","scrollHeight","leading","addEventListener","removeEventListener","_jsxs","List","_objectSpread","className","classNames","ref","role","_jsx","jsx"],"mappings":"8gCAOA,IAAMA,EAAYC,EAAAA,YAAW,SAAAC,GAAA,IAAGC,IAAAA,QAASC,IAAAA,QAAO,MAAQ,CACtDC,KAAM,CACJC,OAAQ,OACRC,QAASH,EAAQ,EAAG,GACpBI,SAAU,GACV,4BAA6B,CAC3BC,QAAS,QACTC,SAAU,SACVC,WAAY,SACZC,aAAc,WAEd,UAAW,CACTC,gBAAiB,8BAGrB,kDAAmD,CACjDA,gBAAiB,WAEnB,mCAAoC,CA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AAAA,EAAA,GACC/B,GAAK,GAAA,CACTgC,UAAWC,EAAAA,QACTjC,EAAMgC,UACNjB,EAAQ1C,OACN2C,GAAsBD,EAAQjC,cAElCoD,IAAKrB,EACLsB,KAAK,UAASpC,SAEd,CAAAqC,EAAAC,IAAA,MAAA,CACEL,UAAWC,EAAAA,QACTlB,EAAQ9B,OACR8B,EAAQpB,UACRY,GAAmBQ,EAAQnB,iBAG9BG,EACDqC,EAAAC,IAAA,MAAA,CACEL,UAAWC,EAAAA,QACTlB,EAAQ9B,OACR8B,EAAQzB,aACRqB,GAAsBI,EAAQnB,oBAKxC"}
1
+ {"version":3,"file":"Listbox.js","sources":["../../../../../src/components/Search/components/Listbox.js"],"sourcesContent":["import { forwardRef, memo, useCallback, useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport { List, makeStyles } from '@material-ui/core';\nimport { throttle } from 'lodash';\n\nimport usePaperContext from '~/components/Search/context';\n\nconst useStyles = makeStyles(({ palette, spacing }) => ({\n list: {\n height: '100%',\n padding: spacing(1, 0),\n fontSize: 16,\n '& .MuiAutocomplete-option': {\n display: 'block',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.16)',\n },\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"]': {\n backgroundColor: 'initial',\n },\n '& .MuiAutocomplete-option:active': {\n backgroundColor: 'initial',\n },\n },\n noTopPadding: {\n paddingTop: 0,\n\n '& $topShadow::before': {\n top: 0,\n },\n },\n shadow: {\n position: 'sticky',\n display: 'none',\n width: '100%',\n zIndex: 1,\n\n '&::before': {\n content: \"''\",\n position: 'absolute',\n width: '100%',\n height: spacing(1),\n zIndex: 1,\n },\n },\n bottomShadow: {\n bottom: 0,\n\n '&::before': {\n bottom: spacing(-1),\n backgroundImage: `linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n topShadow: {\n top: 0,\n\n '&::before': {\n top: spacing(-1),\n backgroundImage: `linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n visibleShadow: {\n display: 'block',\n },\n}));\n\n/**\n * @type {React.ForwardRefExoticComponent<React.ComponentProps<List>}\n */\nconst Listbox = forwardRef(({ children, ...props }, ref) => {\n const [topScrollShadow, setTopScrollShadow] = useState(false);\n const [bottomScrollShadow, setBottomScrollShadow] = useState(false);\n const listRef = useRef();\n const classes = useStyles();\n\n const { AllSelectComponent } = usePaperContext();\n\n const setRef = useCallback(\n node => {\n listRef.current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n // eslint-disable-next-line no-param-reassign\n ref.current = node;\n }\n },\n [ref]\n );\n\n useEffect(() => {\n const node = listRef.current;\n const onScroll = throttle(\n () => {\n setTopScrollShadow(node?.scrollTop > 0);\n setBottomScrollShadow(node?.clientHeight + node?.scrollTop < node?.scrollHeight);\n },\n 100,\n { leading: true }\n );\n\n onScroll();\n node?.addEventListener('scroll', onScroll);\n\n return () => {\n node?.removeEventListener('scroll', onScroll);\n };\n });\n\n return (\n <List\n {...props}\n className={classNames(\n props.className,\n classes.list,\n !!AllSelectComponent && classes.noTopPadding\n )}\n ref={setRef}\n role=\"listbox\"\n >\n <div\n className={classNames(\n classes.shadow,\n classes.topShadow,\n topScrollShadow && classes.visibleShadow\n )}\n />\n {children}\n <div\n className={classNames(\n classes.shadow,\n classes.bottomShadow,\n bottomScrollShadow && classes.visibleShadow\n )}\n />\n </List>\n );\n});\n\nexport default memo(Listbox);\n"],"names":["useStyles","makeStyles","_ref","palette","spacing","list","height","padding","fontSize","display","overflow","whiteSpace","textOverflow","backgroundColor","noTopPadding","paddingTop","top","shadow","position","width","zIndex","content","bottomShadow","bottom","backgroundImage","background","b9","topShadow","visibleShadow","Listbox","forwardRef","_ref2","ref","children","props","_objectWithoutProperties","_excluded","useState","_useState2","_slicedToArray","_useState","topScrollShadow","setTopScrollShadow","_useState4","_useState3","bottomScrollShadow","setBottomScrollShadow","listRef","useRef","classes","AllSelectComponent","usePaperContext","setRef","useCallback","node","current","useEffect","onScroll","throttle","scrollTop","clientHeight","scrollHeight","leading","addEventListener","removeEventListener","_jsxs","List","_objectSpread","className","classNames","role","_jsx","jsx","memo"],"mappings":"8gCAOA,IAAMA,EAAYC,EAAAA,YAAW,SAAAC,GAAA,IAAGC,IAAAA,QAASC,IAAAA,QAAO,MAAQ,CACtDC,KAAM,CACJC,OAAQ,OACRC,QAASH,EAAQ,EAAG,GACpBI,SAAU,GACV,4BAA6B,CAC3BC,QAAS,QACTC,SAAU,SACVC,WAAY,SACZC,aAAc,WAEd,UAAW,CACTC,gBAAiB,8BAGrB,kDAAmD,CACjDA,gBAAiB,WAEnB,mCAAoC,CAClCA,gBAAiB,YAGrBC,aAAc,CACZC,WAAY,EAEZ,uBAAwB,CACtBC,IAAK,IAGTC,OAAQ,CACNC,SAAU,SACVT,QAAS,OACTU,MAAO,OACPC,OAAQ,EAER,YAAa,CACXC,QAAS,KACTH,SAAU,WACVC,MAAO,OACPb,OAAQF,EAAQ,GAChBgB,OAAQ,IAGZE,aAAc,CACZC,OAAQ,EAER,YAAa,CACXA,OAAQnB,GAAS,GACjBoB,gBAAoErB,mDAAAA,OAAAA,EAAQsB,WAAWC,GAAE,YAG7FC,UAAW,CACTX,IAAK,EAEL,YAAa,CACXA,IAAKZ,GAAS,GACdoB,gBAAkErB,iDAAAA,OAAAA,EAAQsB,WAAWC,GAAE,YAG3FE,cAAe,CACbnB,QAAS,SAEZ,IAKKoB,EAAUC,EAAUA,YAAC,SAAAC,EAAyBC,GAAQ,IAA9BC,IAAAA,SAAaC,EAAKC,EAAA,QAAAJ,EAAAK,GACAC,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAAtDC,EAAeH,EAAA,GAAEI,EAAkBJ,EAAA,GACUD,EAAAA,EAAQA,UAAC,GAAMM,EAAAJ,EAAAA,QAAAK,EAAA,GAA5DC,EAAkBF,EAAA,GAAEG,EAAqBH,EAAA,GAC1CI,EAAUC,EAAAA,SACVC,EAAUjD,IAERkD,EAAuBC,EAAAA,UAAvBD,mBAEFE,EAASC,eACb,SAAAC,GACEP,EAAQQ,QAAUD,EACC,mBAARtB,EACTA,EAAIsB,GACKtB,IAETA,EAAIuB,QAAUD,EAElB,GACA,CAACtB,IAsBH,OAnBAwB,EAAAA,WAAU,WACR,IAAMF,EAAOP,EAAQQ,QACfE,EAAWC,EAAAA,UACf,WACEhB,GAAmBY,aAAAA,EAAAA,EAAMK,WAAY,GACrCb,GAAsBQ,eAAAA,EAAMM,eAAeN,aAAAA,EAAAA,EAAMK,YAAYL,aAAAA,EAAAA,EAAMO,cACpE,GACD,IACA,CAAEC,SAAS,IAMb,OAHAL,IACAH,SAAAA,EAAMS,iBAAiB,SAAUN,GAE1B,WACLH,SAAAA,EAAMU,oBAAoB,SAAUP,GAExC,IAGEQ,EAAAA,KAACC,EAAAA,KAAIC,EAAAA,EAAA,GACCjC,GAAK,GAAA,CACTkC,UAAWC,EAAAA,QACTnC,EAAMkC,UACNnB,EAAQ5C,OACN6C,GAAsBD,EAAQnC,cAElCkB,IAAKoB,EACLkB,KAAK,UAASrC,SAEd,CAAAsC,EAAAC,IAAA,MAAA,CACEJ,UAAWC,EAAAA,QACTpB,EAAQhC,OACRgC,EAAQtB,UACRc,GAAmBQ,EAAQrB,iBAG9BK,EACDsC,EAAAC,IAAA,MAAA,CACEJ,UAAWC,EAAAA,QACTpB,EAAQhC,OACRgC,EAAQ3B,aACRuB,GAAsBI,EAAQrB,oBAKxC,IAEe6C,EAAAA,EAAAA,KAAK5C"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import{memo as r,useState as i,useRef as n,useEffect as a}from"react";import l from"classnames";import{makeStyles as c,List as p}from"@material-ui/core";import{throttle as d}from"lodash";import s from"../context/index.js";import{jsxs as b,jsx as u}from"react/jsx-runtime";var m=["children"];function f(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,r)}return t}function h(o){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){e(o,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(r,e))}))}return o}var g=c((function(e){var o=e.palette,t=e.spacing;return{list:{height:"100%",padding:t(1,0),fontSize:16,"& .MuiAutocomplete-option":{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"}},'& .MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:"initial"},"& .MuiAutocomplete-option:active":{backgroundColor:"initial"}},noTopPadding:{paddingTop:0,"& $topShadow::before":{top:0}},shadow:{position:"sticky",display:"none",width:"100%",zIndex:1,"&::before":{content:"''",position:"absolute",width:"100%",height:t(1),zIndex:1}},bottomShadow:{bottom:0,"&::before":{bottom:t(-1),backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(o.background.b9," 100%)")}},topShadow:{top:0,"&::before":{top:t(-1),backgroundImage:"linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ".concat(o.background.b9," 100%)")}},visibleShadow:{display:"block"}}})),v=r((function(e){var r=e.children,c=t(e,m),f=i(!1),v=o(f,2),w=v[0],O=v[1],y=i(!1),j=o(y,2),S=j[0],P=j[1],k=n(),x=g(),T=s().AllSelectComponent;return a((function(){var e=k.current,o=d((function(){O((null==e?void 0:e.scrollTop)>0),P((null==e?void 0:e.clientHeight)+(null==e?void 0:e.scrollTop)<(null==e?void 0:e.scrollHeight))}),100,{leading:!0});return o(),null==e||e.addEventListener("scroll",o),function(){null==e||e.removeEventListener("scroll",o)}})),b(p,h(h({},c),{},{className:l(c.className,x.list,!!T&&x.noTopPadding),ref:k,role:"listbox",children:[u("div",{className:l(x.shadow,x.topShadow,w&&x.visibleShadow)}),r,u("div",{className:l(x.shadow,x.bottomShadow,S&&x.visibleShadow)})]}))}));export{v as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as r,useState as i,useRef as n,useCallback as a,useEffect as l,memo as c}from"react";import p from"classnames";import{makeStyles as d,List as s}from"@material-ui/core";import{throttle as u}from"lodash";import b from"../context/index.js";import{jsxs as m,jsx as f}from"react/jsx-runtime";var h=["children"];function g(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,r)}return t}function v(o){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){e(o,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(r,e))}))}return o}var w=d((function(e){var o=e.palette,t=e.spacing;return{list:{height:"100%",padding:t(1,0),fontSize:16,"& .MuiAutocomplete-option":{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"}},'& .MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:"initial"},"& .MuiAutocomplete-option:active":{backgroundColor:"initial"}},noTopPadding:{paddingTop:0,"& $topShadow::before":{top:0}},shadow:{position:"sticky",display:"none",width:"100%",zIndex:1,"&::before":{content:"''",position:"absolute",width:"100%",height:t(1),zIndex:1}},bottomShadow:{bottom:0,"&::before":{bottom:t(-1),backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(o.background.b9," 100%)")}},topShadow:{top:0,"&::before":{top:t(-1),backgroundImage:"linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ".concat(o.background.b9," 100%)")}},visibleShadow:{display:"block"}}})),y=c(r((function(e,r){var c=e.children,d=t(e,h),g=i(!1),y=o(g,2),O=y[0],j=y[1],S=i(!1),P=o(S,2),k=P[0],x=P[1],T=n(),A=w(),C=b().AllSelectComponent,D=a((function(e){T.current=e,"function"==typeof r?r(e):r&&(r.current=e)}),[r]);return l((function(){var e=T.current,o=u((function(){j((null==e?void 0:e.scrollTop)>0),x((null==e?void 0:e.clientHeight)+(null==e?void 0:e.scrollTop)<(null==e?void 0:e.scrollHeight))}),100,{leading:!0});return o(),null==e||e.addEventListener("scroll",o),function(){null==e||e.removeEventListener("scroll",o)}})),m(s,v(v({},d),{},{className:p(d.className,A.list,!!C&&A.noTopPadding),ref:D,role:"listbox",children:[f("div",{className:p(A.shadow,A.topShadow,O&&A.visibleShadow)}),c,f("div",{className:p(A.shadow,A.bottomShadow,k&&A.visibleShadow)})]}))})));export{y as default};
2
2
  //# sourceMappingURL=Listbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Listbox.js","sources":["../../../../src/components/Search/components/Listbox.js"],"sourcesContent":["import { memo, useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport { List, makeStyles } from '@material-ui/core';\nimport { throttle } from 'lodash';\n\nimport usePaperContext from '~/components/Search/context';\n\nconst useStyles = makeStyles(({ palette, spacing }) => ({\n list: {\n height: '100%',\n padding: spacing(1, 0),\n fontSize: 16,\n '& .MuiAutocomplete-option': {\n display: 'block',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.16)',\n },\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"]': {\n backgroundColor: 'initial',\n },\n '& .MuiAutocomplete-option:active': {\n backgroundColor: 'initial',\n },\n },\n noTopPadding: {\n paddingTop: 0,\n\n '& $topShadow::before': {\n top: 0,\n },\n },\n shadow: {\n position: 'sticky',\n display: 'none',\n width: '100%',\n zIndex: 1,\n\n '&::before': {\n content: \"''\",\n position: 'absolute',\n width: '100%',\n height: spacing(1),\n zIndex: 1,\n },\n },\n bottomShadow: {\n bottom: 0,\n\n '&::before': {\n bottom: spacing(-1),\n backgroundImage: `linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n topShadow: {\n top: 0,\n\n '&::before': {\n top: spacing(-1),\n backgroundImage: `linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n visibleShadow: {\n display: 'block',\n },\n}));\n\n/**\n * @type {React.ForwardRefExoticComponent<React.ComponentProps<List>}\n */\nconst Listbox = ({ children, ...props }) => {\n const [topScrollShadow, setTopScrollShadow] = useState(false);\n const [bottomScrollShadow, setBottomScrollShadow] = useState(false);\n const listRef = useRef();\n const classes = useStyles();\n\n const { AllSelectComponent } = usePaperContext();\n\n useEffect(() => {\n const node = listRef.current;\n const onScroll = throttle(\n () => {\n setTopScrollShadow(node?.scrollTop > 0);\n setBottomScrollShadow(node?.clientHeight + node?.scrollTop < node?.scrollHeight);\n },\n 100,\n { leading: true }\n );\n\n onScroll();\n node?.addEventListener('scroll', onScroll);\n\n return () => {\n node?.removeEventListener('scroll', onScroll);\n };\n });\n\n return (\n <List\n {...props}\n className={classNames(\n props.className,\n classes.list,\n !!AllSelectComponent && classes.noTopPadding\n )}\n ref={listRef}\n role=\"listbox\"\n >\n <div\n className={classNames(\n classes.shadow,\n classes.topShadow,\n topScrollShadow && classes.visibleShadow\n )}\n />\n {children}\n <div\n className={classNames(\n classes.shadow,\n classes.bottomShadow,\n bottomScrollShadow && classes.visibleShadow\n )}\n />\n </List>\n );\n};\n\nexport default memo(Listbox);\n"],"names":["useStyles","makeStyles","_ref","palette","spacing","list","height","padding","fontSize","display","overflow","whiteSpace","textOverflow","backgroundColor","noTopPadding","paddingTop","top","shadow","position","width","zIndex","content","bottomShadow","bottom","backgroundImage","background","b9","topShadow","visibleShadow","memo","_ref2","children","props","_objectWithoutProperties","_excluded","useState","_useState2","_slicedToArray","_useState","topScrollShadow","setTopScrollShadow","_useState4","_useState3","bottomScrollShadow","setBottomScrollShadow","listRef","useRef","classes","AllSelectComponent","usePaperContext","useEffect","node","current","onScroll","throttle","scrollTop","clientHeight","scrollHeight","leading","addEventListener","removeEventListener","_jsxs","List","_objectSpread","className","classNames","ref","role","_jsx"],"mappings":"ygCAOA,IAAMA,EAAYC,GAAW,SAAAC,GAAA,IAAGC,IAAAA,QAASC,IAAAA,QAAO,MAAQ,CACtDC,KAAM,CACJC,OAAQ,OACRC,QAASH,EAAQ,EAAG,GACpBI,SAAU,GACV,4BAA6B,CAC3BC,QAAS,QACTC,SAAU,SACVC,WAAY,SACZC,aAAc,WAEd,UAAW,CACTC,gBAAiB,8BAGrB,kDAAmD,CACjDA,gBAAiB,WAEnB,mCAAoC,CAClCA,gBAAiB,YAGrBC,aAAc,CACZC,WAAY,EAEZ,uBAAwB,CACtBC,IAAK,IAGTC,OAAQ,CACNC,SAAU,SACVT,QAAS,OACTU,MAAO,OACPC,OAAQ,EAER,YAAa,CACXC,QAAS,KACTH,SAAU,WACVC,MAAO,OACPb,OAAQF,EAAQ,GAChBgB,OAAQ,IAGZE,aAAc,CACZC,OAAQ,EAER,YAAa,CACXA,OAAQnB,GAAS,GACjBoB,gBAAoErB,mDAAAA,OAAAA,EAAQsB,WAAWC,GAAE,YAG7FC,UAAW,CACTX,IAAK,EAEL,YAAa,CACXA,IAAKZ,GAAS,GACdoB,gBAAkErB,iDAAAA,OAAAA,EAAQsB,WAAWC,GAAE,YAG3FE,cAAe,CACbnB,QAAS,SAEZ,IA8DcoB,EAAAA,GAzDC,SAA4BC,GAAA,IAAzBC,IAAAA,SAAaC,EAAKC,EAAAH,EAAAI,GACWC,EAAAA,GAAS,GAAMC,EAAAC,EAAAC,EAAA,GAAtDC,EAAeH,EAAA,GAAEI,EAAkBJ,EAAA,GACUD,EAAAA,GAAS,GAAMM,EAAAJ,EAAAK,EAAA,GAA5DC,EAAkBF,EAAA,GAAEG,EAAqBH,EAAA,GAC1CI,EAAUC,IACVC,EAAU/C,IAERgD,EAAuBC,IAAvBD,mBAqBR,OAnBAE,GAAU,WACR,IAAMC,EAAON,EAAQO,QACfC,EAAWC,GACf,WACEd,GAAmBW,aAAAA,EAAAA,EAAMI,WAAY,GACrCX,GAAsBO,eAAAA,EAAMK,eAAeL,aAAAA,EAAAA,EAAMI,YAAYJ,aAAAA,EAAAA,EAAMM,cACpE,GACD,IACA,CAAEC,SAAS,IAMb,OAHAL,IACAF,SAAAA,EAAMQ,iBAAiB,SAAUN,GAE1B,WACLF,SAAAA,EAAMS,oBAAoB,SAAUP,GAExC,IAGEQ,EAACC,EAAIC,EAAAA,EAAA,GACC/B,GAAK,GAAA,CACTgC,UAAWC,EACTjC,EAAMgC,UACNjB,EAAQ1C,OACN2C,GAAsBD,EAAQjC,cAElCoD,IAAKrB,EACLsB,KAAK,UAASpC,SAEd,CAAAqC,EAAA,MAAA,CACEJ,UAAWC,EACTlB,EAAQ9B,OACR8B,EAAQpB,UACRY,GAAmBQ,EAAQnB,iBAG9BG,EACDqC,EAAA,MAAA,CACEJ,UAAWC,EACTlB,EAAQ9B,OACR8B,EAAQzB,aACRqB,GAAsBI,EAAQnB,oBAKxC"}
1
+ {"version":3,"file":"Listbox.js","sources":["../../../../src/components/Search/components/Listbox.js"],"sourcesContent":["import { forwardRef, memo, useCallback, useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport { List, makeStyles } from '@material-ui/core';\nimport { throttle } from 'lodash';\n\nimport usePaperContext from '~/components/Search/context';\n\nconst useStyles = makeStyles(({ palette, spacing }) => ({\n list: {\n height: '100%',\n padding: spacing(1, 0),\n fontSize: 16,\n '& .MuiAutocomplete-option': {\n display: 'block',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.16)',\n },\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"]': {\n backgroundColor: 'initial',\n },\n '& .MuiAutocomplete-option:active': {\n backgroundColor: 'initial',\n },\n },\n noTopPadding: {\n paddingTop: 0,\n\n '& $topShadow::before': {\n top: 0,\n },\n },\n shadow: {\n position: 'sticky',\n display: 'none',\n width: '100%',\n zIndex: 1,\n\n '&::before': {\n content: \"''\",\n position: 'absolute',\n width: '100%',\n height: spacing(1),\n zIndex: 1,\n },\n },\n bottomShadow: {\n bottom: 0,\n\n '&::before': {\n bottom: spacing(-1),\n backgroundImage: `linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n topShadow: {\n top: 0,\n\n '&::before': {\n top: spacing(-1),\n backgroundImage: `linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n visibleShadow: {\n display: 'block',\n },\n}));\n\n/**\n * @type {React.ForwardRefExoticComponent<React.ComponentProps<List>}\n */\nconst Listbox = forwardRef(({ children, ...props }, ref) => {\n const [topScrollShadow, setTopScrollShadow] = useState(false);\n const [bottomScrollShadow, setBottomScrollShadow] = useState(false);\n const listRef = useRef();\n const classes = useStyles();\n\n const { AllSelectComponent } = usePaperContext();\n\n const setRef = useCallback(\n node => {\n listRef.current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n // eslint-disable-next-line no-param-reassign\n ref.current = node;\n }\n },\n [ref]\n );\n\n useEffect(() => {\n const node = listRef.current;\n const onScroll = throttle(\n () => {\n setTopScrollShadow(node?.scrollTop > 0);\n setBottomScrollShadow(node?.clientHeight + node?.scrollTop < node?.scrollHeight);\n },\n 100,\n { leading: true }\n );\n\n onScroll();\n node?.addEventListener('scroll', onScroll);\n\n return () => {\n node?.removeEventListener('scroll', onScroll);\n };\n });\n\n return (\n <List\n {...props}\n className={classNames(\n props.className,\n classes.list,\n !!AllSelectComponent && classes.noTopPadding\n )}\n ref={setRef}\n role=\"listbox\"\n >\n <div\n className={classNames(\n classes.shadow,\n classes.topShadow,\n topScrollShadow && classes.visibleShadow\n )}\n />\n {children}\n <div\n className={classNames(\n classes.shadow,\n classes.bottomShadow,\n bottomScrollShadow && classes.visibleShadow\n )}\n />\n </List>\n );\n});\n\nexport default memo(Listbox);\n"],"names":["useStyles","makeStyles","_ref","palette","spacing","list","height","padding","fontSize","display","overflow","whiteSpace","textOverflow","backgroundColor","noTopPadding","paddingTop","top","shadow","position","width","zIndex","content","bottomShadow","bottom","backgroundImage","background","b9","topShadow","visibleShadow","memo","forwardRef","_ref2","ref","children","props","_objectWithoutProperties","_excluded","useState","_useState2","_slicedToArray","_useState","topScrollShadow","setTopScrollShadow","_useState4","_useState3","bottomScrollShadow","setBottomScrollShadow","listRef","useRef","classes","AllSelectComponent","usePaperContext","setRef","useCallback","node","current","useEffect","onScroll","throttle","scrollTop","clientHeight","scrollHeight","leading","addEventListener","removeEventListener","_jsxs","List","_objectSpread","className","classNames","role","_jsx"],"mappings":"0iCAOA,IAAMA,EAAYC,GAAW,SAAAC,GAAA,IAAGC,IAAAA,QAASC,IAAAA,QAAO,MAAQ,CACtDC,KAAM,CACJC,OAAQ,OACRC,QAASH,EAAQ,EAAG,GACpBI,SAAU,GACV,4BAA6B,CAC3BC,QAAS,QACTC,SAAU,SACVC,WAAY,SACZC,aAAc,WAEd,UAAW,CACTC,gBAAiB,8BAGrB,kDAAmD,CACjDA,gBAAiB,WAEnB,mCAAoC,CAClCA,gBAAiB,YAGrBC,aAAc,CACZC,WAAY,EAEZ,uBAAwB,CACtBC,IAAK,IAGTC,OAAQ,CACNC,SAAU,SACVT,QAAS,OACTU,MAAO,OACPC,OAAQ,EAER,YAAa,CACXC,QAAS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nC,cAElCkB,IAAKoB,EACLkB,KAAK,UAASrC,SAEd,CAAAsC,EAAA,MAAA,CACEH,UAAWC,EACTpB,EAAQhC,OACRgC,EAAQtB,UACRc,GAAmBQ,EAAQrB,iBAG9BK,EACDsC,EAAA,MAAA,CACEH,UAAWC,EACTpB,EAAQhC,OACRgC,EAAQ3B,aACRuB,GAAsBI,EAAQrB,oBAKxC"}
@@ -231,7 +231,7 @@ const validateDsn = (dsn) => {
231
231
 
232
232
  const MCP_SERVER_VERSION = '1.3.0';
233
233
 
234
- var version = "3.69.0-3";
234
+ var version = "3.69.0-5";
235
235
 
236
236
  const CORVA_UI_VERSION = version;
237
237
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "3.69.0-3",
3
+ "version": "3.69.0-5",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "Shared components/utils for Corva ui projects",
6
6
  "keywords": [
@@ -177,7 +177,7 @@
177
177
  "immutable": "3.8.2",
178
178
  "jscpd": "^3.4.5",
179
179
  "jsona": "1.5.1",
180
- "lodash": "4.18.1",
180
+ "lodash": "^4.18.1",
181
181
  "lz-string": "^1.5.0",
182
182
  "mapbox-gl": "3.16.0",
183
183
  "mobile-detect": "1.4.3",
@@ -316,5 +316,8 @@
316
316
  "engines": {
317
317
  "node": "^24"
318
318
  },
319
+ "resolutions": {
320
+ "lodash": "4.18.1"
321
+ },
319
322
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
320
323
  }