@corva/ui 3.69.0-1 → 3.69.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/defineProperty"),r=require("react/jsx-runtime"),n=require("react"),o=require("classnames"),i=require("react-window"),a=require("@material-ui/core"),l=require("@material-ui/icons"),u=require("../../utils/convert.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=s(e),d=s(t),f=s(o);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){d.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p="ASC",y=p,b=a.makeStyles((function(e){var t={borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)",display:"flex",flexFlow:"row nowrap",alignItems:"center"},r={minWidth:1,marginRight:10,"&:first-child":{marginLeft:10}};return{root:{display:"flex",overflow:"auto",flexFlow:"column nowrap"},row:t,cell:r,header:t,headerCell:r,sortable:{cursor:"pointer"},oddRow:{backgroundColor:e.isLightTheme?"rgba(189, 189, 189, 0.1)":"#303030"},headerLabel:{lineHeight:"14px",fontSize:"12px",fontStyle:"normal",letterSpacing:"-0.25px",display:"flex",alignItems:"center",flexWrap:"wrap"},cellData:{lineHeight:"14px",fontSize:"12px",fontWeight:"normal",fontStyle:"normal",letterSpacing:"0.15px"},unitLabel:{fontSize:"10px",opacity:.5},settingIcon:{padding:"3px",fontSize:"20px"},sortIcon:{fontSize:"16px"}}}));function x(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,o=r.customUnit;return o?"(".concat(o,")"):n?"(".concat(u.getUnitDisplay(n),")"):""}function w(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function g(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}var v=function(e){var t=e.columns,o=e.data,u=e.useColumnSetting,s=e.useFixedColumnWidth,m=e.onOpenSettingDlg,v=e.width,j=e.height,S=e.headerHeight,_=e.rowHeight,C=e.showTopSettingIcon,k=e.customMuiStyles,z=e.isTopSettingIconShownAlways,O=e.CustomCellRenderer,N=e.CustomHeaderCellRenderer,D=e.customRowStyle,T=e.sort,R=e.sortBy,I=e.sortDirection,M=e.onScroll,P=void 0===M?function(){}:M,L=b(),q=n.useMemo((function(){return h(h({},L),k)}),[L,k]),V=n.useMemo((function(){return{label:"",key:"setting",width:u?25:0}}),[u]),A=n.useMemo((function(){return t.filter((function(e){return e.show}))}),[t]),H=n.useMemo((function(){return u?[].concat(c.default(A),[V]):A}),[A,u,V]),E=n.useMemo((function(){if(v<=0)return{};var e=d.default({},V.key,V.width),t=[];return A.filter((function(e){return Number.isFinite(e.width)})).forEach((function(r){e[r.key]=r.width-1,t.push(r.width-1)})),A.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(r){var n=t.reduce((function(e,t){return e+t}),0),o=Math.floor((v-n-V.width)/(A.length-t.length)),i=r.minWidth||65,a=o<i?i:o;e[r.key]=a-1,t.push(a-1)})),e}),[v,A,V]),B=n.useMemo((function(){return Object.values(E).reduce((function(e,t){return e+t}),0)}),[E]),F=z||B-12.5>=v;n.useEffect((function(){C(F)}),[F]);var W=n.useCallback((function(e){var t=e.index;return f.default(d.default({},q.oddRow,t%2==1))}),[q]),K=function(e){var n=e.label,o=e.dataKey,i=R||I||T;return N?r.jsx(N,{columnKey:o,columns:t,sortBy:R,sortDirection:I}):o===V.key?F?null:r.jsx(a.IconButton,{size:"small","aria-label":"customize columns",className:q.settingIcon,onClick:m,children:r.jsx(l.Settings,{fontSize:"inherit"})}):r.jsxs(a.Typography,{variant:"body2",className:f.default(q.headerLabel,w(t,o)),children:[n," ",r.jsx("span",{className:f.default(q.unitLabel,g(t,o)),children:x(t,o)}),i&&o!==R&&r.jsx(a.Tooltip,{title:"Sort A-Z",children:r.jsx(l.Sort,{fontSize:"small",className:L.sortIcon})}),i&&o===R&&(I===p?r.jsx(l.ArrowUpward,{fontSize:"small",className:L.sortIcon}):r.jsx(l.ArrowDownward,{fontSize:"small",className:L.sortIcon}))]})},U=n.useCallback((function(e){var n=e.ariaAttributes,o=e.style,i=e.data,l=e.tableColumns,u=e.index;return r.jsx("div",h(h({style:h(h({},o),null==D?void 0:D({index:u})),className:f.default(W({index:u}),L.row,"ReactVirtualized__Table__row")},n),{},{children:l.map((function(e){var n=e.key,o=i[u],l=O?r.jsx(O,{columnKey:n,value:o[n],rowData:o,columns:t}):r.jsx(a.Typography,{variant:"body2",className:q.cellData,children:o[n]});return r.jsx("div",{className:f.default(L.cell,"ReactVirtualized__Table__rowColumn"),style:{flex:"0 1 ".concat(E[n],"px"),overflow:"hidden"},children:l},n)}))}))}),[O,W,E,D,L,q.cellData,t]),G=n.useMemo((function(){return{width:s?B:v,height:j}}),[s,B,v,j]),Z=n.useMemo((function(){return{data:o,tableColumns:H}}),[o,H]),J=n.useCallback((function(e){return function(t){null==T||T({defaultSortDirection:y,event:t,sortBy:e,sortDirection:e!==R||I&&I!==y?y:"DESC"})}}),[T,R,I]),Q=R||I||T;return r.jsxs("div",{style:G,className:f.default(q.root,q.table,"ReactVirtualized__Table"),children:[r.jsx("div",{className:f.default(q.header,"ReactVirtualized__Table__headerRow"),style:{flex:"0 0 ".concat(S,"px")},children:H.map((function(e){return r.jsx("div",{className:f.default(q.headerCell,"setting"!==e.key&&T&&q.sortable,"ReactVirtualized__Table__headerColumn",Q&&"ReactVirtualized__Table__sortableHeaderColumn"),style:{flex:"0 1 ".concat(E[e.key],"px"),height:S},onClick:"setting"!==e.key?J(e.key):void 0,children:K({label:e.label,dataKey:e.key})},e.key)}))}),r.jsx(i.List,{rowProps:Z,rowCount:o.length,rowHeight:_,rowComponent:U,onScroll:P,className:"ReactVirtualized__Grid ReactVirtualized__Table__Grid"})]})};exports.VirtualizedTableComponent=v,exports.default=v;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/defineProperty"),r=require("react/jsx-runtime"),n=require("react"),i=require("classnames"),o=require("react-window"),a=require("@material-ui/core"),l=require("@material-ui/icons"),u=require("../../utils/convert.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=s(e),d=s(t),f=s(i);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){d.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p="ASC",y=p,b=a.makeStyles((function(e){var t={borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)",display:"flex",flexFlow:"row nowrap",alignItems:"center"},r={minWidth:1,marginRight:10,"&:first-child":{marginLeft:10}};return{root:{display:"flex",overflow:"auto",flexFlow:"column nowrap"},row:t,cell:r,header:t,headerCell:h(h({},r),{},{display:"flex",alignItems:"center"}),sortable:{cursor:"pointer"},oddRow:{backgroundColor:e.isLightTheme?"rgba(189, 189, 189, 0.1)":"#303030"},headerLabel:{lineHeight:"14px",fontSize:"12px",fontStyle:"normal",letterSpacing:"-0.25px",display:"flex",alignItems:"center",flexWrap:"wrap"},cellData:{lineHeight:"14px",fontSize:"12px",fontWeight:"normal",fontStyle:"normal",letterSpacing:"0.15px"},unitLabel:{fontSize:"10px",opacity:.5},settingIcon:{padding:"3px",fontSize:"20px"},sortIcon:{fontSize:"16px"}}}));function x(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,i=r.customUnit;return i?"(".concat(i,")"):n?"(".concat(u.getUnitDisplay(n),")"):""}function g(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function w(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}var v=function(e){var t=e.columns,i=e.data,u=e.useColumnSetting,s=e.useFixedColumnWidth,m=e.onOpenSettingDlg,v=e.width,j=e.height,S=e.headerHeight,_=e.rowHeight,C=e.showTopSettingIcon,k=e.customMuiStyles,z=e.isTopSettingIconShownAlways,O=e.CustomCellRenderer,N=e.CustomHeaderCellRenderer,D=e.customRowStyle,T=e.sort,R=e.sortBy,I=e.sortDirection,M=e.onScroll,P=void 0===M?function(){}:M,L=b(),q=n.useMemo((function(){return h(h({},L),k)}),[L,k]),V=n.useMemo((function(){return{label:"",key:"setting",width:u?25:0}}),[u]),A=n.useMemo((function(){return t.filter((function(e){return e.show}))}),[t]),H=n.useMemo((function(){return u?[].concat(c.default(A),[V]):A}),[A,u,V]),E=n.useMemo((function(){if(v<=0)return{};var e=d.default({},V.key,V.width),t=[];return A.filter((function(e){return Number.isFinite(e.width)})).forEach((function(r){e[r.key]=r.width-1,t.push(r.width-1)})),A.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(r){var n=t.reduce((function(e,t){return e+t}),0),i=Math.floor((v-n-V.width)/(A.length-t.length)),o=r.minWidth||65,a=i<o?o:i;e[r.key]=a-1,t.push(a-1)})),e}),[v,A,V]),B=n.useMemo((function(){return Object.values(E).reduce((function(e,t){return e+t}),0)}),[E]),F=z||B-12.5>=v;n.useEffect((function(){C(F)}),[F]);var W=n.useCallback((function(e){var t=e.index;return f.default(d.default({},q.oddRow,t%2==1))}),[q]),K=function(e){var n=e.label,i=e.dataKey,o=R||I||T;return N?r.jsx(N,{columnKey:i,columns:t,sortBy:R,sortDirection:I}):i===V.key?F?null:r.jsx(a.IconButton,{size:"small","aria-label":"customize columns",className:q.settingIcon,onClick:m,children:r.jsx(l.Settings,{fontSize:"inherit"})}):r.jsxs(a.Typography,{variant:"body2",className:f.default(q.headerLabel,g(t,i)),children:[n," ",r.jsx("span",{className:f.default(q.unitLabel,w(t,i)),children:x(t,i)}),o&&i!==R&&r.jsx(a.Tooltip,{title:"Sort A-Z",children:r.jsx(l.Sort,{fontSize:"small",className:L.sortIcon})}),o&&i===R&&(I===p?r.jsx(l.ArrowUpward,{fontSize:"small",className:L.sortIcon}):r.jsx(l.ArrowDownward,{fontSize:"small",className:L.sortIcon}))]})},U=n.useCallback((function(e){var n=e.ariaAttributes,i=e.style,o=e.data,l=e.tableColumns,u=e.index;return r.jsx("div",h(h({style:h(h({},i),null==D?void 0:D({index:u})),className:f.default(W({index:u}),L.row,"ReactVirtualized__Table__row")},n),{},{children:l.map((function(e){var n=e.key,i=o[u],l=O?r.jsx(O,{columnKey:n,value:i[n],rowData:i,columns:t}):r.jsx(a.Typography,{variant:"body2",className:q.cellData,children:i[n]});return r.jsx("div",{className:f.default(L.cell,"ReactVirtualized__Table__rowColumn"),style:{flex:"0 1 ".concat(E[n],"px"),overflow:"hidden"},children:l},n)}))}))}),[O,W,E,D,L,q.cellData,t]),G=n.useMemo((function(){return{width:s?B:v,height:j}}),[s,B,v,j]),Z=n.useMemo((function(){return{data:i,tableColumns:H}}),[i,H]),J=n.useCallback((function(e){return function(t){null==T||T({defaultSortDirection:y,event:t,sortBy:e,sortDirection:e!==R||I&&I!==y?y:"DESC"})}}),[T,R,I]),Q=R||I||T;return r.jsxs("div",{style:G,className:f.default(q.root,q.table,"ReactVirtualized__Table"),children:[r.jsx("div",{className:f.default(q.header,"ReactVirtualized__Table__headerRow"),style:{flex:"0 0 ".concat(S,"px")},children:H.map((function(e){return r.jsx("div",{className:f.default(q.headerCell,"setting"!==e.key&&T&&q.sortable,"ReactVirtualized__Table__headerColumn",Q&&"ReactVirtualized__Table__sortableHeaderColumn"),style:{flex:"0 1 ".concat(E[e.key],"px"),height:S},onClick:"setting"!==e.key?J(e.key):void 0,children:K({label:e.label,dataKey:e.key})},e.key)}))}),r.jsx(o.List,{rowProps:Z,rowCount:i.length,rowHeight:_,rowComponent:U,onScroll:P,className:"ReactVirtualized__Grid ReactVirtualized__Table__Grid"})]})};exports.VirtualizedTableComponent=v,exports.default=v;
2
2
  //# sourceMappingURL=VirtualizedTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizedTable.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualizedTable/VirtualizedTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAA8C,MAAM,OAAO,CAAC;AAa1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA4GhD,KAAK,8BAA8B,GAAG,IAAI,CACxC,qBAAqB,EACrB,cAAc,GAAG,iBAAiB,CACnC,GAAG;IACF,OAAO,EAAE,WAAW,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAC;IACvD,IAAI,EAAE,WAAW,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,YAAY,EAAE,WAAW,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAC;IACjE,SAAS,EAAE,WAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAgTxE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"VirtualizedTable.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualizedTable/VirtualizedTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAA8C,MAAM,OAAO,CAAC;AAa1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAgHhD,KAAK,8BAA8B,GAAG,IAAI,CACxC,qBAAqB,EACrB,cAAc,GAAG,iBAAiB,CACnC,GAAG;IACF,OAAO,EAAE,WAAW,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAC;IACvD,IAAI,EAAE,WAAW,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,YAAY,EAAE,WAAW,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAC;IACjE,SAAS,EAAE,WAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAgTxE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useMemo as o,useEffect as i,useCallback as a}from"react";import l from"classnames";import{List as c}from"react-window";import{makeStyles as u,Typography as s,IconButton as d,Tooltip as f}from"@material-ui/core";import{Settings as m,Sort as h,ArrowUpward as p,ArrowDownward as b}from"@material-ui/icons";import{getUnitDisplay as y}from"../../utils/convert.js";function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?g(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v="ASC",x=v,_=u((function(e){var t={borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)",display:"flex",flexFlow:"row nowrap",alignItems:"center"},r={minWidth:1,marginRight:10,"&:first-child":{marginLeft:10}};return{root:{display:"flex",overflow:"auto",flexFlow:"column nowrap"},row:t,cell:r,header:t,headerCell:r,sortable:{cursor:"pointer"},oddRow:{backgroundColor:e.isLightTheme?"rgba(189, 189, 189, 0.1)":"#303030"},headerLabel:{lineHeight:"14px",fontSize:"12px",fontStyle:"normal",letterSpacing:"-0.25px",display:"flex",alignItems:"center",flexWrap:"wrap"},cellData:{lineHeight:"14px",fontSize:"12px",fontWeight:"normal",fontStyle:"normal",letterSpacing:"0.15px"},unitLabel:{fontSize:"10px",opacity:.5},settingIcon:{padding:"3px",fontSize:"20px"},sortIcon:{fontSize:"16px"}}}));function S(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,o=r.customUnit;return o?"(".concat(o,")"):n?"(".concat(y(n),")"):""}function C(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function k(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}var O=function(u){var y=u.columns,g=u.data,O=u.useColumnSetting,z=u.useFixedColumnWidth,N=u.onOpenSettingDlg,R=u.width,j=u.height,D=u.headerHeight,T=u.rowHeight,P=u.showTopSettingIcon,I=u.customMuiStyles,L=u.isTopSettingIconShownAlways,V=u.CustomCellRenderer,H=u.CustomHeaderCellRenderer,A=u.customRowStyle,E=u.sort,F=u.sortBy,W=u.sortDirection,B=u.onScroll,K=void 0===B?function(){}:B,G=_(),M=o((function(){return w(w({},G),I)}),[G,I]),U=o((function(){return{label:"",key:"setting",width:O?25:0}}),[O]),Z=o((function(){return y.filter((function(e){return e.show}))}),[y]),q=o((function(){return O?[].concat(e(Z),[U]):Z}),[Z,O,U]),J=o((function(){if(R<=0)return{};var e=t({},U.key,U.width),r=[];return Z.filter((function(e){return Number.isFinite(e.width)})).forEach((function(t){e[t.key]=t.width-1,r.push(t.width-1)})),Z.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(t){var n=r.reduce((function(e,t){return e+t}),0),o=Math.floor((R-n-U.width)/(Z.length-r.length)),i=t.minWidth||65,a=o<i?i:o;e[t.key]=a-1,r.push(a-1)})),e}),[R,Z,U]),Q=o((function(){return Object.values(J).reduce((function(e,t){return e+t}),0)}),[J]),X=L||Q-12.5>=R;i((function(){P(X)}),[X]);var Y=a((function(e){var r=e.index;return l(t({},M.oddRow,r%2==1))}),[M]),$=function(e){var t=e.label,o=e.dataKey,i=F||W||E;return H?r(H,{columnKey:o,columns:y,sortBy:F,sortDirection:W}):o===U.key?X?null:r(d,{size:"small","aria-label":"customize columns",className:M.settingIcon,onClick:N,children:r(m,{fontSize:"inherit"})}):n(s,{variant:"body2",className:l(M.headerLabel,C(y,o)),children:[t," ",r("span",{className:l(M.unitLabel,k(y,o)),children:S(y,o)}),i&&o!==F&&r(f,{title:"Sort A-Z",children:r(h,{fontSize:"small",className:G.sortIcon})}),i&&o===F&&r(W===v?p:b,{fontSize:"small",className:G.sortIcon})]})},ee=a((function(e){var t=e.ariaAttributes,n=e.style,o=e.data,i=e.tableColumns,a=e.index;return r("div",w(w({style:w(w({},n),null==A?void 0:A({index:a})),className:l(Y({index:a}),G.row,"ReactVirtualized__Table__row")},t),{},{children:i.map((function(e){var t=e.key,n=o[a],i=V?r(V,{columnKey:t,value:n[t],rowData:n,columns:y}):r(s,{variant:"body2",className:M.cellData,children:n[t]});return r("div",{className:l(G.cell,"ReactVirtualized__Table__rowColumn"),style:{flex:"0 1 ".concat(J[t],"px"),overflow:"hidden"},children:i},t)}))}))}),[V,Y,J,A,G,M.cellData,y]),te=o((function(){return{width:z?Q:R,height:j}}),[z,Q,R,j]),re=o((function(){return{data:g,tableColumns:q}}),[g,q]),ne=a((function(e){return function(t){null==E||E({defaultSortDirection:x,event:t,sortBy:e,sortDirection:e!==F||W&&W!==x?x:"DESC"})}}),[E,F,W]),oe=F||W||E;return n("div",{style:te,className:l(M.root,M.table,"ReactVirtualized__Table"),children:[r("div",{className:l(M.header,"ReactVirtualized__Table__headerRow"),style:{flex:"0 0 ".concat(D,"px")},children:q.map((function(e){return r("div",{className:l(M.headerCell,"setting"!==e.key&&E&&M.sortable,"ReactVirtualized__Table__headerColumn",oe&&"ReactVirtualized__Table__sortableHeaderColumn"),style:{flex:"0 1 ".concat(J[e.key],"px"),height:D},onClick:"setting"!==e.key?ne(e.key):void 0,children:$({label:e.label,dataKey:e.key})},e.key)}))}),r(c,{rowProps:re,rowCount:g.length,rowHeight:T,rowComponent:ee,onScroll:K,className:"ReactVirtualized__Grid ReactVirtualized__Table__Grid"})]})};export{O as VirtualizedTableComponent,O as default};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useMemo as i,useEffect as o,useCallback as a}from"react";import l from"classnames";import{List as c}from"react-window";import{makeStyles as u,Typography as s,IconButton as d,Tooltip as f}from"@material-ui/core";import{Settings as m,Sort as h,ArrowUpward as p,ArrowDownward as b}from"@material-ui/icons";import{getUnitDisplay as y}from"../../utils/convert.js";function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?g(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v="ASC",x=v,_=u((function(e){var t={borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)",display:"flex",flexFlow:"row nowrap",alignItems:"center"},r={minWidth:1,marginRight:10,"&:first-child":{marginLeft:10}};return{root:{display:"flex",overflow:"auto",flexFlow:"column nowrap"},row:t,cell:r,header:t,headerCell:w(w({},r),{},{display:"flex",alignItems:"center"}),sortable:{cursor:"pointer"},oddRow:{backgroundColor:e.isLightTheme?"rgba(189, 189, 189, 0.1)":"#303030"},headerLabel:{lineHeight:"14px",fontSize:"12px",fontStyle:"normal",letterSpacing:"-0.25px",display:"flex",alignItems:"center",flexWrap:"wrap"},cellData:{lineHeight:"14px",fontSize:"12px",fontWeight:"normal",fontStyle:"normal",letterSpacing:"0.15px"},unitLabel:{fontSize:"10px",opacity:.5},settingIcon:{padding:"3px",fontSize:"20px"},sortIcon:{fontSize:"16px"}}}));function S(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,i=r.customUnit;return i?"(".concat(i,")"):n?"(".concat(y(n),")"):""}function C(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function k(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}var O=function(u){var y=u.columns,g=u.data,O=u.useColumnSetting,z=u.useFixedColumnWidth,N=u.onOpenSettingDlg,R=u.width,j=u.height,D=u.headerHeight,T=u.rowHeight,I=u.showTopSettingIcon,P=u.customMuiStyles,L=u.isTopSettingIconShownAlways,V=u.CustomCellRenderer,H=u.CustomHeaderCellRenderer,A=u.customRowStyle,E=u.sort,F=u.sortBy,W=u.sortDirection,B=u.onScroll,K=void 0===B?function(){}:B,G=_(),M=i((function(){return w(w({},G),P)}),[G,P]),U=i((function(){return{label:"",key:"setting",width:O?25:0}}),[O]),Z=i((function(){return y.filter((function(e){return e.show}))}),[y]),q=i((function(){return O?[].concat(e(Z),[U]):Z}),[Z,O,U]),J=i((function(){if(R<=0)return{};var e=t({},U.key,U.width),r=[];return Z.filter((function(e){return Number.isFinite(e.width)})).forEach((function(t){e[t.key]=t.width-1,r.push(t.width-1)})),Z.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(t){var n=r.reduce((function(e,t){return e+t}),0),i=Math.floor((R-n-U.width)/(Z.length-r.length)),o=t.minWidth||65,a=i<o?o:i;e[t.key]=a-1,r.push(a-1)})),e}),[R,Z,U]),Q=i((function(){return Object.values(J).reduce((function(e,t){return e+t}),0)}),[J]),X=L||Q-12.5>=R;o((function(){I(X)}),[X]);var Y=a((function(e){var r=e.index;return l(t({},M.oddRow,r%2==1))}),[M]),$=function(e){var t=e.label,i=e.dataKey,o=F||W||E;return H?r(H,{columnKey:i,columns:y,sortBy:F,sortDirection:W}):i===U.key?X?null:r(d,{size:"small","aria-label":"customize columns",className:M.settingIcon,onClick:N,children:r(m,{fontSize:"inherit"})}):n(s,{variant:"body2",className:l(M.headerLabel,C(y,i)),children:[t," ",r("span",{className:l(M.unitLabel,k(y,i)),children:S(y,i)}),o&&i!==F&&r(f,{title:"Sort A-Z",children:r(h,{fontSize:"small",className:G.sortIcon})}),o&&i===F&&r(W===v?p:b,{fontSize:"small",className:G.sortIcon})]})},ee=a((function(e){var t=e.ariaAttributes,n=e.style,i=e.data,o=e.tableColumns,a=e.index;return r("div",w(w({style:w(w({},n),null==A?void 0:A({index:a})),className:l(Y({index:a}),G.row,"ReactVirtualized__Table__row")},t),{},{children:o.map((function(e){var t=e.key,n=i[a],o=V?r(V,{columnKey:t,value:n[t],rowData:n,columns:y}):r(s,{variant:"body2",className:M.cellData,children:n[t]});return r("div",{className:l(G.cell,"ReactVirtualized__Table__rowColumn"),style:{flex:"0 1 ".concat(J[t],"px"),overflow:"hidden"},children:o},t)}))}))}),[V,Y,J,A,G,M.cellData,y]),te=i((function(){return{width:z?Q:R,height:j}}),[z,Q,R,j]),re=i((function(){return{data:g,tableColumns:q}}),[g,q]),ne=a((function(e){return function(t){null==E||E({defaultSortDirection:x,event:t,sortBy:e,sortDirection:e!==F||W&&W!==x?x:"DESC"})}}),[E,F,W]),ie=F||W||E;return n("div",{style:te,className:l(M.root,M.table,"ReactVirtualized__Table"),children:[r("div",{className:l(M.header,"ReactVirtualized__Table__headerRow"),style:{flex:"0 0 ".concat(D,"px")},children:q.map((function(e){return r("div",{className:l(M.headerCell,"setting"!==e.key&&E&&M.sortable,"ReactVirtualized__Table__headerColumn",ie&&"ReactVirtualized__Table__sortableHeaderColumn"),style:{flex:"0 1 ".concat(J[e.key],"px"),height:D},onClick:"setting"!==e.key?ne(e.key):void 0,children:$({label:e.label,dataKey:e.key})},e.key)}))}),r(c,{rowProps:re,rowCount:g.length,rowHeight:T,rowComponent:ee,onScroll:K,className:"ReactVirtualized__Grid ReactVirtualized__Table__Grid"})]})};export{O as VirtualizedTableComponent,O as default};
2
2
  //# sourceMappingURL=VirtualizedTable.js.map
@@ -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-1";
234
+ var version = "3.69.0-2";
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-1",
3
+ "version": "3.69.0-2",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "Shared components/utils for Corva ui projects",
6
6
  "keywords": [