@corva/ui 0.92.0-12 → 0.92.0-13

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 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),r=require("@babel/runtime/helpers/objectWithoutProperties"),s=require("react"),i=require("@material-ui/core"),o=require("classnames"),n=require("../../IconButton/index.js"),l=require("../../Tooltip/Tooltip.js");require("../../Tooltip/ScrollableTooltip.js");var c=require("../../../icons/iconParkIcons.js");require("../../../icons/customIcons/icons/AddMessage.js"),require("../../../icons/customIcons/icons/Attention.js"),require("../../../icons/customIcons/icons/Collapse.js"),require("../../../icons/customIcons/icons/Expand.js"),require("../../../icons/customIcons/icons/FolderClosed.js"),require("../../../icons/customIcons/icons/FolderOpened.js"),require("../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../icons/customIcons/icons/Search.js"),require("../../../icons/customIcons/icons/Wellhub.js"),require("../../../icons/customIcons/icons/MultiRuler.js"),require("../../../icons/customIcons/icons/CautionFilled.js");var a=require("react/jsx-runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=u(e),p=u(t),m=u(r),b=u(o),j=["isExpanded","setIsExpanded","tooltipTitle","collapsibleHeader","collapsibleBody","maxCellWidth","maxCharsNumberFromStart","maxCharsNumberFromEnd","cellWidth","children"];function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function y(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){d.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 f=i.makeStyles((function(e){return{stickyCell:{position:"sticky",left:0,zIndex:2,background:e.palette.background.b6},stickyEmptyCell:{position:"sticky",right:0,zIndex:2},collapseHeader:{width:function(e){var t=e.isExpanded,r=e.maxCellWidth,s=e.cellWidth;return t?r:s}},tableCellWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between",width:function(e){var t=e.isExpanded,r=e.maxCellWidth,s=e.cellWidth;return t?r:s}},iconButton:{padding:0,fontSize:16,"&:hover":{backgroundColor:"transparent"}}}}));exports.TableCell=function(e){var t,r=e.isExpanded,o=e.setIsExpanded,u=e.tooltipTitle,d=e.collapsibleHeader,h=e.collapsibleBody,x=e.maxCellWidth,C=e.maxCharsNumberFromStart,q=e.maxCharsNumberFromEnd,I=e.cellWidth,O=e.children,g=m.default(e,j),E=g.stickyCell&&!g.emptyCell,v=f({isExpanded:r,cellWidth:I,maxCellWidth:x}),k=s.useState(!1),W=p.default(k,2),P=W[0],T=W[1];return a.jsxs(i.TableCell,y(y({},g),{},{className:b.default(d&&v.collapseHeader,E&&v.stickyCell,g.emptyCell&&v.stickyEmptyCell,E&&"stickyCell",g.emptyCell&&"stickyEmptyCell",g.className),children:[d&&a.jsxs("div",{className:v.tableCellWrapper,children:[O,a.jsx(n,{className:v.iconButton,size:"small",onClick:function(){T(!1),o(!r)},tooltipProps:{title:r?"Collapse":"Expand",open:P,disableHoverListener:!0,onMouseEnter:function(){return T(!0)},onMouseLeave:function(){return T(!1)}},children:r?a.jsx(c.LeftIcon,{size:16}):a.jsx(c.RightIcon,{size:16})})]}),h&&a.jsx(l.Tooltip,{title:r?"":u,children:a.jsx("div",{children:r?O:(t=u,t.length>C+q?"".concat(t.substring(0,C)," ... ").concat(t.substring(t.length-q)):t)})}),!d&&!h&&O]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),r=require("@babel/runtime/helpers/objectWithoutProperties"),s=require("react"),i=require("@material-ui/core"),o=require("classnames"),n=require("../../IconButton/index.js"),l=require("../../Tooltip/Tooltip.js");require("../../Tooltip/ScrollableTooltip.js");var c=require("../../../icons/iconParkIcons.js");require("../../../icons/customIcons/icons/AddMessage.js"),require("../../../icons/customIcons/icons/Attention.js"),require("../../../icons/customIcons/icons/Collapse.js"),require("../../../icons/customIcons/icons/Expand.js"),require("../../../icons/customIcons/icons/FolderClosed.js"),require("../../../icons/customIcons/icons/FolderOpened.js"),require("../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../icons/customIcons/icons/Search.js"),require("../../../icons/customIcons/icons/Wellhub.js"),require("../../../icons/customIcons/icons/MultiRuler.js"),require("../../../icons/customIcons/icons/CautionFilled.js");var a=require("react/jsx-runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=u(e),p=u(t),m=u(r),b=u(o),j=["isExpanded","setIsExpanded","tooltipTitle","collapsibleHeader","collapsibleBody","maxCellWidth","maxCharsNumberFromStart","maxCharsNumberFromEnd","cellWidth","children"];function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function y(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){d.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 f=i.makeStyles((function(e){return{stickyCell:{position:"sticky",left:0,zIndex:2,background:e.palette.background.b4},stickyEmptyCell:{position:"sticky",right:0,zIndex:2},collapseHeader:{width:function(e){var t=e.isExpanded,r=e.maxCellWidth,s=e.cellWidth;return t?r:s}},tableCellWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between",width:function(e){var t=e.isExpanded,r=e.maxCellWidth,s=e.cellWidth;return t?r:s}},iconButton:{padding:0,fontSize:16,"&:hover":{backgroundColor:"transparent"}}}}));exports.TableCell=function(e){var t,r=e.isExpanded,o=e.setIsExpanded,u=e.tooltipTitle,d=e.collapsibleHeader,h=e.collapsibleBody,x=e.maxCellWidth,C=e.maxCharsNumberFromStart,q=e.maxCharsNumberFromEnd,I=e.cellWidth,O=e.children,g=m.default(e,j),E=g.stickyCell&&!g.emptyCell,v=f({isExpanded:r,cellWidth:I,maxCellWidth:x}),k=s.useState(!1),W=p.default(k,2),P=W[0],T=W[1];return a.jsxs(i.TableCell,y(y({},g),{},{className:b.default(d&&v.collapseHeader,E&&v.stickyCell,g.emptyCell&&v.stickyEmptyCell,E&&"stickyCell",g.emptyCell&&"stickyEmptyCell",g.className),children:[d&&a.jsxs("div",{className:v.tableCellWrapper,children:[O,a.jsx(n,{className:v.iconButton,size:"small",onClick:function(){T(!1),o(!r)},tooltipProps:{title:r?"Collapse":"Expand",open:P,disableHoverListener:!0,onMouseEnter:function(){return T(!0)},onMouseLeave:function(){return T(!1)}},children:r?a.jsx(c.LeftIcon,{size:16}):a.jsx(c.RightIcon,{size:16})})]}),h&&a.jsx(l.Tooltip,{title:r?"":u,children:a.jsx("div",{children:r?O:(t=u,t.length>C+q?"".concat(t.substring(0,C)," ... ").concat(t.substring(t.length-q)):t)})}),!d&&!h&&O]}))};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/helpers/objectWithoutProperties";import{useState as r}from"react";import{makeStyles as i,TableCell as s}from"@material-ui/core";import n from"classnames";import l from"../../IconButton/index.js";import{Tooltip as c}from"../../Tooltip/Tooltip.js";import"../../Tooltip/ScrollableTooltip.js";import{LeftIcon as a,RightIcon as p}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/Expand.js";import"../../../icons/customIcons/icons/FolderClosed.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/Wellhub.js";import"../../../icons/customIcons/icons/MultiRuler.js";import"../../../icons/customIcons/icons/CautionFilled.js";import{jsxs as m,jsx as d}from"react/jsx-runtime";var u=["isExpanded","setIsExpanded","tooltipTitle","collapsibleHeader","collapsibleBody","maxCellWidth","maxCharsNumberFromStart","maxCharsNumberFromEnd","cellWidth","children"];function b(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 h(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?b(Object(r),!0).forEach((function(o){e(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var f=i((function(e){return{stickyCell:{position:"sticky",left:0,zIndex:2,background:e.palette.background.b6},stickyEmptyCell:{position:"sticky",right:0,zIndex:2},collapseHeader:{width:function(e){var t=e.isExpanded,o=e.maxCellWidth,r=e.cellWidth;return t?o:r}},tableCellWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between",width:function(e){var t=e.isExpanded,o=e.maxCellWidth,r=e.cellWidth;return t?o:r}},iconButton:{padding:0,fontSize:16,"&:hover":{backgroundColor:"transparent"}}}})),y=function(e){var i,b=e.isExpanded,y=e.setIsExpanded,j=e.tooltipTitle,C=e.collapsibleHeader,x=e.collapsibleBody,O=e.maxCellWidth,E=e.maxCharsNumberFromStart,I=e.maxCharsNumberFromEnd,g=e.cellWidth,k=e.children,v=o(e,u),W=v.stickyCell&&!v.emptyCell,P=f({isExpanded:b,cellWidth:g,maxCellWidth:O}),w=r(!1),N=t(w,2),T=N[0],F=N[1];return m(s,h(h({},v),{},{className:n(C&&P.collapseHeader,W&&P.stickyCell,v.emptyCell&&P.stickyEmptyCell,W&&"stickyCell",v.emptyCell&&"stickyEmptyCell",v.className),children:[C&&m("div",{className:P.tableCellWrapper,children:[k,d(l,{className:P.iconButton,size:"small",onClick:function(){F(!1),y(!b)},tooltipProps:{title:b?"Collapse":"Expand",open:T,disableHoverListener:!0,onMouseEnter:function(){return F(!0)},onMouseLeave:function(){return F(!1)}},children:d(b?a:p,{size:16})})]}),x&&d(c,{title:b?"":j,children:d("div",{children:b?k:(i=j,i.length>E+I?"".concat(i.substring(0,E)," ... ").concat(i.substring(i.length-I)):i)})}),!C&&!x&&k]}))};export{y as TableCell};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/helpers/objectWithoutProperties";import{useState as r}from"react";import{makeStyles as i,TableCell as s}from"@material-ui/core";import n from"classnames";import l from"../../IconButton/index.js";import{Tooltip as c}from"../../Tooltip/Tooltip.js";import"../../Tooltip/ScrollableTooltip.js";import{LeftIcon as a,RightIcon as p}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/Expand.js";import"../../../icons/customIcons/icons/FolderClosed.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/Wellhub.js";import"../../../icons/customIcons/icons/MultiRuler.js";import"../../../icons/customIcons/icons/CautionFilled.js";import{jsxs as m,jsx as d}from"react/jsx-runtime";var u=["isExpanded","setIsExpanded","tooltipTitle","collapsibleHeader","collapsibleBody","maxCellWidth","maxCharsNumberFromStart","maxCharsNumberFromEnd","cellWidth","children"];function b(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 h(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?b(Object(r),!0).forEach((function(o){e(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var f=i((function(e){return{stickyCell:{position:"sticky",left:0,zIndex:2,background:e.palette.background.b4},stickyEmptyCell:{position:"sticky",right:0,zIndex:2},collapseHeader:{width:function(e){var t=e.isExpanded,o=e.maxCellWidth,r=e.cellWidth;return t?o:r}},tableCellWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between",width:function(e){var t=e.isExpanded,o=e.maxCellWidth,r=e.cellWidth;return t?o:r}},iconButton:{padding:0,fontSize:16,"&:hover":{backgroundColor:"transparent"}}}})),y=function(e){var i,b=e.isExpanded,y=e.setIsExpanded,j=e.tooltipTitle,C=e.collapsibleHeader,x=e.collapsibleBody,O=e.maxCellWidth,E=e.maxCharsNumberFromStart,I=e.maxCharsNumberFromEnd,g=e.cellWidth,k=e.children,v=o(e,u),W=v.stickyCell&&!v.emptyCell,P=f({isExpanded:b,cellWidth:g,maxCellWidth:O}),w=r(!1),N=t(w,2),T=N[0],F=N[1];return m(s,h(h({},v),{},{className:n(C&&P.collapseHeader,W&&P.stickyCell,v.emptyCell&&P.stickyEmptyCell,W&&"stickyCell",v.emptyCell&&"stickyEmptyCell",v.className),children:[C&&m("div",{className:P.tableCellWrapper,children:[k,d(l,{className:P.iconButton,size:"small",onClick:function(){F(!1),y(!b)},tooltipProps:{title:b?"Collapse":"Expand",open:T,disableHoverListener:!0,onMouseEnter:function(){return F(!0)},onMouseLeave:function(){return F(!1)}},children:d(b?a:p,{size:16})})]}),x&&d(c,{title:b?"":j,children:d("div",{children:b?k:(i=j,i.length>E+I?"".concat(i.substring(0,E)," ... ").concat(i.substring(i.length-I)):i)})}),!C&&!x&&k]}))};export{y as TableCell};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.92.0-12",
3
+ "version": "0.92.0-13",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"