@corva/ui 0.60.0-rc.2 → 0.60.0-rc.3

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";var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),o=require("react"),i=require("prop-types"),a=require("classnames"),n=require("@material-ui/core"),s=require("@material-ui/icons"),l=require("../IconButton/index.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=r(i),c=r(a),f=n.makeStyles((function(e){var t=e.palette;return{disabled:{opacity:.4,pointerEvents:"none"},offsetContainer:{cursor:"pointer",display:"flex",whiteSpace:"nowrap",flexWrap:"nowrap",alignItems:"center",width:"fit-content"},hoveredContainer:{backgroundColor:"rgba(3, 188, 212, 0.16)"},offsetText:{color:t.primary.text6,fontSize:12,paddingRight:4,"&:hover":{color:t.primary.contrastText}},buttons:{display:"flex",alignItems:"center"},isActive:{color:t.primary.contrastText},primaryIcon:{"&:hover":{backgroundColor:"rgba(3, 188, 212, 0.16)"}},infoIcon:{marginRight:"8px",fontSize:"20px",color:t.info.light},infoTooltip:{maxWidth:"264px"}}})),p=function(i){var a=i.onClick,r=i.wells,d=i.disabled,p=i.expanded,u=i.onExpand,x=i.offsetWellsLimited,m=o.useState(!1),g=m[0],h=m[1],b=f(),y=r.length,v=!(!y||!u),j=t.jsxs("div",e.__assign({className:c.default(b.offsetContainer,d&&b.disabled),onClick:a,onMouseMove:function(e){var t=e.target,o=t.parentNode;t.getAttribute("data-icon")||o.getAttribute("data-icon")?h(!1):h(!0)},onMouseLeave:function(){h(!1)}},{children:[t.jsxs(n.Typography,e.__assign({className:c.default(b.offsetText,g&&b.isActive)},{children:["Offset Wells (",y,")"]})),t.jsx(l,e.__assign({className:c.default(b.primaryIcon,g&&b.hoveredContainer),color:"primary",size:"medium"},{children:t.jsx(s.Edit,{})}))]}));return t.jsxs("div",e.__assign({className:b.buttons},{children:[x&&t.jsx(n.Tooltip,e.__assign({title:"Offset wells list wasn't populated completely due to technical limitations of the app.",classes:{tooltip:b.infoTooltip}},{children:t.jsx(s.Info,{className:b.infoIcon})})),t.jsx(n.Tooltip,e.__assign({title:"Edit Offset Wells",placement:"bottom"},{children:j})),v&&t.jsx(l,e.__assign({tooltipProps:{title:p?"Collapse Offset Wells":"Expand Offset Wells"},onClick:function(e){e.stopPropagation(),u()},color:"default",size:"medium","data-icon":"expandIcon"},{children:p?t.jsx(s.ExpandLess,{"data-icon":"expandIcon"}):t.jsx(s.ExpandMore,{"data-icon":"expandIcon"})}))]}))},u={onClick:d.default.func.isRequired,wells:d.default.arrayOf(d.default.shape({id:d.default.number,title:d.default.string})),disabled:d.default.bool,onExpand:d.default.func,expanded:d.default.bool,offsetWellsLimited:d.default.bool};p.propTypes=u,p.defaultProps={onExpand:null,expanded:!1,wells:[],disabled:!1,offsetWellsLimited:!1},module.exports=p;
1
+ "use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),o=require("react"),i=require("prop-types"),a=require("classnames"),s=require("@material-ui/core"),n=require("@material-ui/icons"),l=require("../IconButton/index.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=r(i),c=r(a),f=s.makeStyles((function(e){var t=e.palette;return{disabled:{opacity:.4,pointerEvents:"none"},offsetContainer:{cursor:"pointer",display:"flex",whiteSpace:"nowrap",flexWrap:"nowrap",alignItems:"center",width:"fit-content"},hoveredContainer:{backgroundColor:"rgba(3, 188, 212, 0.16)"},offsetText:{color:t.primary.text6,fontSize:12,paddingRight:4,"&:hover":{color:t.primary.contrastText}},buttons:{display:"flex",alignItems:"center"},isActive:{color:t.primary.contrastText},primaryIcon:{"&:hover":{backgroundColor:"rgba(3, 188, 212, 0.16)"}},infoIcon:{marginRight:"8px",fontSize:"20px",color:t.info.light},infoTooltip:{maxWidth:"264px"}}})),p=function(i){var a=i.onClick,r=i.wells,d=i.disabled,p=i.expanded,u=i.onExpand,x=i.offsetWellsLimited,m=i.isTooltipDisabled,b=o.useState(!1),g=b[0],h=b[1],y=f(),v=r.length,j=!(!v||!u),_=t.jsxs("div",e.__assign({className:c.default(y.offsetContainer,d&&y.disabled),onClick:a,onMouseMove:function(e){var t=e.target,o=t.parentNode;t.getAttribute("data-icon")||o.getAttribute("data-icon")?h(!1):h(!0)},onMouseLeave:function(){h(!1)}},{children:[t.jsxs(s.Typography,e.__assign({className:c.default(y.offsetText,g&&y.isActive)},{children:["Offset Wells (",v,")"]})),t.jsx(l,e.__assign({className:c.default(y.primaryIcon,g&&y.hoveredContainer),color:"primary",size:"medium"},{children:t.jsx(n.Edit,{})}))]}));return t.jsxs("div",e.__assign({className:y.buttons},{children:[x&&t.jsx(s.Tooltip,e.__assign({title:"Offset wells list wasn't populated completely due to technical limitations of the app.",classes:{tooltip:y.infoTooltip}},{children:t.jsx(n.Info,{className:y.infoIcon})})),t.jsx(s.Tooltip,e.__assign({title:"Edit Offset Wells",placement:"bottom"},{children:_})),j&&t.jsx(l,e.__assign({tooltipProps:!m&&{title:p?"Collapse Offset Wells":"Expand Offset Wells"},onClick:function(e){e.stopPropagation(),u()},color:"default",size:"medium","data-icon":"expandIcon"},{children:p?t.jsx(n.ExpandLess,{"data-icon":"expandIcon"}):t.jsx(n.ExpandMore,{"data-icon":"expandIcon"})}))]}))},u={onClick:d.default.func.isRequired,wells:d.default.arrayOf(d.default.shape({id:d.default.number,title:d.default.string})),disabled:d.default.bool,onExpand:d.default.func,expanded:d.default.bool,offsetWellsLimited:d.default.bool,isTooltipDisabled:d.default.bool};p.propTypes=u,p.defaultProps={onExpand:null,expanded:!1,wells:[],disabled:!1,offsetWellsLimited:!1,isTooltipDisabled:!1},module.exports=p;
@@ -2,7 +2,7 @@
2
2
  import PropTypes from 'prop-types';
3
3
  declare type OffsetWellButtonProps = PropTypes.InferProps<typeof offsetWellButtonPropTypes>;
4
4
  declare const OffsetWellButton: {
5
- ({ onClick, wells, disabled, expanded, onExpand, offsetWellsLimited, }: OffsetWellButtonProps): JSX.Element;
5
+ ({ onClick, wells, disabled, expanded, onExpand, offsetWellsLimited, isTooltipDisabled, }: OffsetWellButtonProps): JSX.Element;
6
6
  propTypes: {
7
7
  onClick: PropTypes.Validator<(...args: any[]) => any>;
8
8
  wells: PropTypes.Requireable<PropTypes.InferProps<{
@@ -13,6 +13,7 @@ declare const OffsetWellButton: {
13
13
  onExpand: PropTypes.Requireable<(...args: any[]) => any>;
14
14
  expanded: PropTypes.Requireable<boolean>;
15
15
  offsetWellsLimited: PropTypes.Requireable<boolean>;
16
+ isTooltipDisabled: PropTypes.Requireable<boolean>;
16
17
  };
17
18
  defaultProps: {
18
19
  onExpand: any;
@@ -20,6 +21,7 @@ declare const OffsetWellButton: {
20
21
  wells: any[];
21
22
  disabled: boolean;
22
23
  offsetWellsLimited: boolean;
24
+ isTooltipDisabled: boolean;
23
25
  };
24
26
  };
25
27
  declare const offsetWellButtonPropTypes: {
@@ -32,6 +34,7 @@ declare const offsetWellButtonPropTypes: {
32
34
  onExpand: PropTypes.Requireable<(...args: any[]) => any>;
33
35
  expanded: PropTypes.Requireable<boolean>;
34
36
  offsetWellsLimited: PropTypes.Requireable<boolean>;
37
+ isTooltipDisabled: PropTypes.Requireable<boolean>;
35
38
  };
36
39
  export default OffsetWellButton;
37
40
  //# sourceMappingURL=OffsetWellButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellButton.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellButton/OffsetWellButton.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAyDnC,aAAK,qBAAqB,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEpF,QAAA,MAAM,gBAAgB;4EAOnB,qBAAqB,GAAG,WAAW;;;;;;;;;;;;;;;;;;;CA4ErC,CAAC;AAEF,QAAA,MAAM,yBAAyB;;;;;;;;;;CAY9B,CAAC;AAYF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"OffsetWellButton.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellButton/OffsetWellButton.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAyDnC,aAAK,qBAAqB,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEpF,QAAA,MAAM,gBAAgB;+FAQnB,qBAAqB,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;CAgFrC,CAAC;AAEF,QAAA,MAAM,yBAAyB;;;;;;;;;;;CAa9B,CAAC;AAaF,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as o,jsx as t}from"react/jsx-runtime";import{useState as i}from"react";import n from"prop-types";import r from"classnames";import{makeStyles as a,Typography as l,Tooltip as s}from"@material-ui/core";import{Edit as c,Info as d,ExpandLess as p,ExpandMore as f}from"@material-ui/icons";import m from"../IconButton/index.js";var u=a((function(e){var o=e.palette;return{disabled:{opacity:.4,pointerEvents:"none"},offsetContainer:{cursor:"pointer",display:"flex",whiteSpace:"nowrap",flexWrap:"nowrap",alignItems:"center",width:"fit-content"},hoveredContainer:{backgroundColor:"rgba(3, 188, 212, 0.16)"},offsetText:{color:o.primary.text6,fontSize:12,paddingRight:4,"&:hover":{color:o.primary.contrastText}},buttons:{display:"flex",alignItems:"center"},isActive:{color:o.primary.contrastText},primaryIcon:{"&:hover":{backgroundColor:"rgba(3, 188, 212, 0.16)"}},infoIcon:{marginRight:"8px",fontSize:"20px",color:o.info.light},infoTooltip:{maxWidth:"264px"}}})),x=function(n){var a=n.onClick,x=n.wells,h=n.disabled,b=n.expanded,g=n.onExpand,v=n.offsetWellsLimited,y=i(!1),C=y[0],w=y[1],I=u(),W=x.length,T=!(!W||!g),k=o("div",e({className:r(I.offsetContainer,h&&I.disabled),onClick:a,onMouseMove:function(e){var o=e.target,t=o.parentNode;o.getAttribute("data-icon")||t.getAttribute("data-icon")?w(!1):w(!0)},onMouseLeave:function(){w(!1)}},{children:[o(l,e({className:r(I.offsetText,C&&I.isActive)},{children:["Offset Wells (",W,")"]})),t(m,e({className:r(I.primaryIcon,C&&I.hoveredContainer),color:"primary",size:"medium"},{children:t(c,{})}))]}));return o("div",e({className:I.buttons},{children:[v&&t(s,e({title:"Offset wells list wasn't populated completely due to technical limitations of the app.",classes:{tooltip:I.infoTooltip}},{children:t(d,{className:I.infoIcon})})),t(s,e({title:"Edit Offset Wells",placement:"bottom"},{children:k})),T&&t(m,e({tooltipProps:{title:b?"Collapse Offset Wells":"Expand Offset Wells"},onClick:function(e){e.stopPropagation(),g()},color:"default",size:"medium","data-icon":"expandIcon"},{children:t(b?p:f,{"data-icon":"expandIcon"})}))]}))},h={onClick:n.func.isRequired,wells:n.arrayOf(n.shape({id:n.number,title:n.string})),disabled:n.bool,onExpand:n.func,expanded:n.bool,offsetWellsLimited:n.bool};x.propTypes=h,x.defaultProps={onExpand:null,expanded:!1,wells:[],disabled:!1,offsetWellsLimited:!1};export{x as default};
1
+ import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as o,jsx as t}from"react/jsx-runtime";import{useState as i}from"react";import n from"prop-types";import l from"classnames";import{makeStyles as a,Typography as r,Tooltip as s}from"@material-ui/core";import{Edit as d,Info as p,ExpandLess as c,ExpandMore as f}from"@material-ui/icons";import m from"../IconButton/index.js";var u=a((function(e){var o=e.palette;return{disabled:{opacity:.4,pointerEvents:"none"},offsetContainer:{cursor:"pointer",display:"flex",whiteSpace:"nowrap",flexWrap:"nowrap",alignItems:"center",width:"fit-content"},hoveredContainer:{backgroundColor:"rgba(3, 188, 212, 0.16)"},offsetText:{color:o.primary.text6,fontSize:12,paddingRight:4,"&:hover":{color:o.primary.contrastText}},buttons:{display:"flex",alignItems:"center"},isActive:{color:o.primary.contrastText},primaryIcon:{"&:hover":{backgroundColor:"rgba(3, 188, 212, 0.16)"}},infoIcon:{marginRight:"8px",fontSize:"20px",color:o.info.light},infoTooltip:{maxWidth:"264px"}}})),b=function(n){var a=n.onClick,b=n.wells,x=n.disabled,h=n.expanded,g=n.onExpand,v=n.offsetWellsLimited,y=n.isTooltipDisabled,C=i(!1),T=C[0],w=C[1],I=u(),W=b.length,k=!(!W||!g),E=o("div",e({className:l(I.offsetContainer,x&&I.disabled),onClick:a,onMouseMove:function(e){var o=e.target,t=o.parentNode;o.getAttribute("data-icon")||t.getAttribute("data-icon")?w(!1):w(!0)},onMouseLeave:function(){w(!1)}},{children:[o(r,e({className:l(I.offsetText,T&&I.isActive)},{children:["Offset Wells (",W,")"]})),t(m,e({className:l(I.primaryIcon,T&&I.hoveredContainer),color:"primary",size:"medium"},{children:t(d,{})}))]}));return o("div",e({className:I.buttons},{children:[v&&t(s,e({title:"Offset wells list wasn't populated completely due to technical limitations of the app.",classes:{tooltip:I.infoTooltip}},{children:t(p,{className:I.infoIcon})})),t(s,e({title:"Edit Offset Wells",placement:"bottom"},{children:E})),k&&t(m,e({tooltipProps:!y&&{title:h?"Collapse Offset Wells":"Expand Offset Wells"},onClick:function(e){e.stopPropagation(),g()},color:"default",size:"medium","data-icon":"expandIcon"},{children:t(h?c:f,{"data-icon":"expandIcon"})}))]}))},x={onClick:n.func.isRequired,wells:n.arrayOf(n.shape({id:n.number,title:n.string})),disabled:n.bool,onExpand:n.func,expanded:n.bool,offsetWellsLimited:n.bool,isTooltipDisabled:n.bool};b.propTypes=x,b.defaultProps={onExpand:null,expanded:!1,wells:[],disabled:!1,offsetWellsLimited:!1,isTooltipDisabled:!1};export{b as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.60.0-rc.2",
3
+ "version": "0.60.0-rc.3",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"