@corva/ui 0.72.0-0 → 0.72.0-1
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.
- package/cjs-bundle/components/AdvancedSlider/AdvancedSlider.js +1 -1
- package/cjs-bundle/components/Chip/index.js +1 -1
- package/cjs-bundle/components/DevCenter/AppHeader/AppHeader.js +1 -1
- package/cjs-bundle/components/DevCenter/AppHeader/AppHeaderStyles.js +1 -1
- package/components/AdvancedSlider/AdvancedSlider.d.ts.map +1 -1
- package/components/AdvancedSlider/AdvancedSlider.js +1 -1
- package/components/Chip/index.d.ts.map +1 -1
- package/components/Chip/index.js +1 -1
- package/components/DevCenter/AppHeader/AppHeader.d.ts +3 -1
- package/components/DevCenter/AppHeader/AppHeader.d.ts.map +1 -1
- package/components/DevCenter/AppHeader/AppHeader.js +1 -1
- package/components/DevCenter/AppHeader/AppHeaderStyles.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),i=require("react"),o=require("@material-ui/core"),n=require("re-resizable"),r=require("react-sizeme"),a=require("classnames"),l=require("lodash"),d=require("../shared/useThrottledCallback.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),i=require("react"),o=require("@material-ui/core"),n=require("re-resizable"),r=require("react-sizeme"),a=require("classnames"),l=require("lodash"),d=require("../shared/useThrottledCallback.js"),h=require("./Handle.js"),s=require("react/jsx-runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(e),m=u(t),f=u(a);function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function p(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach((function(t){c.default(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var g=function(e){var t,o,r=e.min,a=e.max,l=e.value,u=e.size,v=e.orientation,g=e.valueFormatter,b=e.displayFormatter,x=e.editableHandles,j=e.onChange,z=e.onStop,H=e.reversed,B=e.handlePosition,C=e.handleClasses,L=e.minimal,O=w(),k=i.useRef(null),R=i.useRef(null),F=i.useState([g(null==l?void 0:l.at(0)),g(null==l?void 0:l.at(1))]),S=m.default(F,2),P=S[0],E=S[1],M=i.useRef(null),q=i.useState(!1),T=m.default(q,2),D=T[0],I=T[1];i.useEffect((function(){if(!M.current){var e=[g(null==l?void 0:l.at(0)),g(null==l?void 0:l.at(1))],t=Math.min.apply(Math,e),i=Math.max.apply(Math,e);E([t,i])}}),[null==l?void 0:l.at(0),null==l?void 0:l.at(1)]);var N=m.default(P,2),W=N[0],A=N[1];i.useEffect((function(){if("horizontal"===v){var e=u.width/(a-r)*(W-r),t=u.width/(a-r)*(a-A);k.current.updateSize({width:H?t:e,height:u.height}),R.current.updateSize({width:H?e:t,height:u.height})}else if("vertical"===v){var i=u.height/(a-r)*(W-r),o=u.height/(a-r)*(a-A);k.current.updateSize({width:u.width,height:H?o:i}),R.current.updateSize({width:u.width,height:H?i:o})}}),[r,a,W,A,u.width,u.height,v]),i.useEffect((function(){var e=function(){document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",G),document.removeEventListener("touchmove",J),document.removeEventListener("touchend",K)};return D?(document.addEventListener("mousemove",_),document.addEventListener("mouseup",G),document.addEventListener("touchmove",J),document.addEventListener("touchend",K)):(e(),z()),function(){e()}}),[D]);var $=d.useThrottledCallback((function(e,t,i){M.current="onResize Event";var o=i.clientWidth,n=i.clientHeight,l=W,d=A;"right"===t?H?d=g(a-o/u.width*(a-r)):l=g(r+o/u.width*(a-r)):"left"===t?H?l=g(r+o/u.width*(a-r)):d=g(a-o/u.width*(a-r)):"bottom"===t?H?d=g(a-n/u.height*(a-r)):l=g(r+n/u.height*(a-r)):"top"===t&&(H?l=g(r+n/u.height*(a-r)):d=g(a-n/u.height*(a-r))),l=Math.min(l,A),d=Math.max(d,W),E([l,d]),j([l,d])})),X=d.useThrottledCallback((function(){M.current=null,z()})),Y=function(e,t){M.current={xPos:e,yPos:t,head:W,tail:A}},Z=function(e,t){if(M.current){var i;"horizontal"===v?i=(M.current.xPos-e)/u.width*(a-r):"vertical"===v&&(i=(M.current.yPos-t)/u.height*(a-r));var o,n,l=M.current.head-i*(H?-1:1),d=M.current.tail-i*(H?-1:1),h=M.current.tail-M.current.head;l<=r?(o=r,n=r+h):d>=a?(o=a-h,n=a):(o=l,n=d),o=g(o),n=g(n),E([o,n]),j([o,n])}},_=d.useThrottledCallback((function(e){Z(e.clientX,e.clientY)})),G=d.useThrottledCallback((function(){M.current=null,I(!1)})),J=d.useThrottledCallback((function(e){Z(e.touches[0].pageX,e.touches[0].pageY)})),K=d.useThrottledCallback((function(){M.current=null,I(!1)})),Q=d.useThrottledCallback((function(e){E([e,A]),j([e,A])})),U=d.useThrottledCallback((function(e){E([W,e]),j([W,e])})),V=i.useMemo((function(){return(A-W)/(a-r)*("vertical"===v?u.height:u.width)<30}),[r,a,W,A]),ee=function(e){var t={min:r,max:A,value:W,onChange:Q},i={min:W,max:a,value:A,onChange:U};return"head"===e?s.jsx(h.Handle,p({placement:"head",readOnly:!x,displayFormatter:b,orientation:v,classes:C,minimal:L},H?i:t)):"tail"===e?s.jsx(h.Handle,p({placement:"tail",readOnly:!x,displayFormatter:b,orientation:v,classes:C,minimal:L},H?t:i)):null};return s.jsx("div",{className:O.rootWrapper,children:s.jsxs("div",{className:f.default(O.root,(t={},c.default(t,O.horizontalRoot,"horizontal"===v),c.default(t,O.verticalRoot,"vertical"===v),c.default(t,O.minimal,L),t)),children:[s.jsx(n.Resizable,{ref:k,minHeight:0,minWidth:0,enable:{right:"horizontal"===v,bottom:"vertical"===v},handleComponent:{right:ee("head"),bottom:ee("head")},onResize:$,onResizeStop:X}),s.jsx("div",{className:O.body,"data-testid":"slider-body",onMouseDown:function(e){Y(e.clientX,e.clientY),I(!0)},onTouchStart:function(e){Y(e.touches[0].pageX,e.touches[0].pageY),I(!0)},children:V?s.jsx("div",{className:f.default((o={},c.default(o,O.horizontalBodyHandle,"horizontal"===v),c.default(o,O.verticalBodyHandle,"vertical"===v),c.default(o,O.leftBodyHandle,"left"===B),c.default(o,O.rightBodyHandle,"right"===B),c.default(o,O.topBodyHandle,"top"===B),c.default(o,O.bottomBodyHandle,"bottom"===B),o)),children:s.jsx("div",{className:O.bodyHandle,children:s.jsx(y,{orientation:"vertical",minimal:L})})}):s.jsx("div",{className:O.bodyHandleIcon,children:s.jsx(y,{orientation:v,minimal:L})})}),s.jsx(n.Resizable,{ref:R,minHeight:0,minWidth:0,enable:{left:"horizontal"===v,top:"vertical"===v},handleComponent:{left:ee("tail"),top:ee("tail")},onResize:$,onResizeStop:X})]})})};g.defaultProps={orientation:"horizontal",valueFormatter:Math.floor,displayFormatter:function(e){return e},onChange:l.noop,onStop:l.noop,reversed:!1,editableHandles:!0,handleClasses:{},minimal:!1};var b=r.withSize({monitorWidth:!0,monitorHeight:!0})(g),y=function(e){var t=e.orientation;return e.minimal?"horizontal"===t?s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"20",viewBox:"0 -2 16 16",fill:"none",children:s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.33333 4L4 4L4 12L5.33333 12L5.33333 4ZM8.66659 4L8.66659 12L7.33325 12L7.33325 4L8.66659 4ZM12.0001 4L12.0001 12L10.6667 12L10.6667 4L12.0001 4Z",fill:"white"})}):s.jsxs("svg",{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"12",height:"1"}),s.jsx("rect",{y:"3",width:"12",height:"1"}),s.jsx("rect",{y:"6",width:"12",height:"1"})]}):"horizontal"===t?s.jsxs("svg",{width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{x:"7.5",y:"0.5",width:"12",height:"1",transform:"rotate(90 7.5 0.5)"}),s.jsx("rect",{x:"4.5",y:"0.5",width:"12",height:"1",transform:"rotate(90 4.5 0.5)"}),s.jsx("rect",{x:"1.5",y:"0.5",width:"12",height:"1",transform:"rotate(90 1.5 0.5)"})]}):s.jsxs("svg",{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"12",height:"1"}),s.jsx("rect",{y:"3",width:"12",height:"1"}),s.jsx("rect",{y:"6",width:"12",height:"1"})]})},w=o.makeStyles((function(e){return{rootWrapper:{position:"relative",width:"100%",height:"100%",zIndex:100},root:{position:"absolute",width:"100%",height:"100%",zIndex:100,"&:hover:not($minimal) $body":{background:"#008BA366"},"&:hover $bodyHandle":{visibility:"visible"}},horizontalRoot:{display:"flex",alignItems:"center"},verticalRoot:{display:"flex",alignItems:"center",flexDirection:"column"},body:{position:"relative",flex:1,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",userSelect:"none",background:"#3B3B3B66",color:"#BDBDBD","& svg":{fill:"currentColor"},"&:hover":{cursor:"grab",background:"#008BA366",color:"#FFFFFF"},"&:active":{cursor:"grabbing"},"&:hover $bodyHandleIcon":{visibility:"visible"}},horizontalBodyHandle:{position:"absolute",bottom:-24},verticalBodyHandle:{position:"absolute",left:-24},leftBodyHandle:{position:"absolute",left:-24,right:"auto"},rightBodyHandle:{position:"absolute",right:-24,left:"auto"},topBodyHandle:{position:"absolute",top:-24,bottom:"auto"},bottomBodyHandle:{position:"absolute",bottom:-24,top:"auto"},bodyHandle:{width:24,height:24,borderRadius:"50%",background:"#03BCD4",color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",visibility:"hidden"},bodyHandleIcon:{visibility:"hidden"},minimal:{border:"1px solid ".concat(e.palette.background.b9),borderRadius:4,"& $body":{"&:hover":{background:"#008BA366"},margin:-1,width:"calc(100% + 2px)",height:"calc(100% + 2px)",backgroundColor:o.fade(e.palette.background.b7,.1),border:"1px solid ".concat(e.palette.primary.text9),borderRadius:4}}}}));exports.AdvancedSlider=g,exports.default=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),
|
|
1
|
+
"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),i=require("react/jsx-runtime"),t=require("@material-ui/core"),a=require("prop-types"),r=require("classnames");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=l(a),o=l(r),s=function(e){var i=e.width,t=void 0===i?18:i,a=e.height,r=void 0===a?14:a,l=e.fill.replace("#","%23");return"<svg width='".concat(t,"' height='").concat(r,"' viewBox='0 0 18 14' fill='").concat(l,"' xmlns='http://www.w3.org/2000/svg'><path d='M6 11.1698L1.83 6.99984L0.410004 8.40984L6 13.9998L18 1.99984L16.59 0.589844L6 11.1698Z'/></svg>")},c=t.makeStyles((function(e){return{checked:{"&::before":{content:'url("data:image/svg+xml; utf8, '.concat(s({fill:e.palette.primary.main}),'")'),display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,lineHeight:"24px",marginLeft:8,marginRight:"-4px",paddingTop:3},"&.Mui-disabled::before":{content:'url("data:image/svg+xml; utf8, '.concat(s({fill:e.palette.primary.text8}),'")')},"&.MuiChip-sizeSmall::before":{content:'url("data:image/svg+xml; utf8, '.concat(s({width:12,fill:e.palette.primary.main}),'")'),width:16,height:16},"&.MuiChip-sizeSmall.Mui-disabled::before":{content:'url("data:image/svg+xml; utf8, '.concat(s({width:12,fill:e.palette.primary.text8}),'")')},"&.MuiChip-root.MuiChip-clickable":{"& .MuiChip-label, & .MuiChip-deleteIcon, & .MuiChip-icon":{color:"#FFFFFF"}},"& .MuiChip-label:first-child":{marginLeft:"-4px"}},basic:{"&:not([data-not-migrated-MuiChip])":{"&.MuiChip-sizeSmall":{height:12,"& .MuiChip-label":{fontSize:10}},border:"none",textTransform:"uppercase",backgroundColor:e.palette.primary.main,padding:"0 8px",height:16,"& .MuiChip-label":{fontSize:12,fontWeight:500,lineHeight:"12px",letterSpacing:"1px",color:e.palette.background.b1,padding:0},"&:hover":{backgroundColor:e.palette.primary.main,"& .MuiChip-label":{color:e.palette.background.b1}}}}}})),p=function(a){var r,l=a.checked,n=a.classes,s=void 0===n?{}:n,p=c(),u=o.default(a.className,((r={})[p.basic]="basic"===a.variant,r)),d="basic"===a.variant?"default":a.variant;return l?i.jsx(t.Chip,e.__assign({},a,{className:u,classes:e.__assign(e.__assign({},s),{root:o.default(s.root,p.checked)}),variant:d})):i.jsx(t.Chip,e.__assign({},a,{className:u,variant:d}))},u={checked:n.default.bool,"data-testid":n.default.string};p.propTypes=u,p.defaultProps={checked:!1,"data-testid":"Chip"},module.exports=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),a=require("react"),s=require("lodash"),n=require("prop-types"),r=require("classnames"),i=require("@material-ui/core");require("../../Annotations/components/AnnotationsList/index.js");var l=require("../../Annotations/components/LastAnnotation/index.js");require("../../Annotations/AnnotationsContext.js");var d=require("../../../constants/segment.js"),o=require("../../../constants/devcenter.js");require("../../../constants/goals.js"),require("../../../constants/alerts.js"),require("../../../constants/apps.js"),require("../../../constants/drillstring.js"),require("../../../constants/completion.js"),require("../../../constants/appPackages.js"),require("../../../constants/notifications.js"),require("../../../constants/feed.js"),require("../../../constants/bha.js"),require("../../../utils/env.js"),require("../../GradientManager/configuration/constants.js");var u=require("../../../utils/devcenter.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),a=require("react"),s=require("lodash"),n=require("prop-types"),r=require("classnames"),i=require("@material-ui/core");require("../../Annotations/components/AnnotationsList/index.js");var l=require("../../Annotations/components/LastAnnotation/index.js");require("../../Annotations/AnnotationsContext.js");var d=require("../../../constants/segment.js"),o=require("../../../constants/devcenter.js");require("../../../constants/goals.js"),require("../../../constants/alerts.js"),require("../../../constants/apps.js"),require("../../../constants/drillstring.js"),require("../../../constants/completion.js"),require("../../../constants/appPackages.js"),require("../../../constants/notifications.js"),require("../../../constants/feed.js"),require("../../../constants/bha.js"),require("../../../utils/env.js"),require("../../GradientManager/configuration/constants.js");var u=require("../../../utils/devcenter.js"),c=require("./VersionBadge.js"),p=require("./PadMode.js"),f=require("./utils.js"),m=require("../../AssetNameLabel/SecondaryAssetNameLabel.js"),g=require("../../AssetNameLabel/AssetNameLabel.js"),j=require("./PadIcon.js"),v=require("./AppHeader.css.js"),h=require("./AppHeaderStyles.js"),A=require("react/jsx-runtime");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=b(e),x=b(t),S=b(n),q=b(r);function L(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,s)}return a}function N(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?L(Object(a),!0).forEach((function(t){y.default(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):L(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var P="DevCenter_AppHeader",_=function(e){return"/assets/".concat(null==e?void 0:e.asset_id)};function O(e){var t,n,r,p,b,y,S,L,O=e.app,I=e.appLastAnnotation,M=e.appSettings,w=e.badge,C=e.children,E=e.classes,T=e.coordinates,D=e.currentUser,W=e.fracFleet,k=e.isMaximized,B=e.logoSrc,F=e.onSettingChange,H=e.openAnnotationsList,R=e.primaryAssetStatusBadge,U=e.rig,V=e.showLastAnnotation,G=e.updateCurrentDashboardAppLastAnnotation,z=e.well,Y=e.wells,Z=e.PadModeComponent,J=e.activeWellName,K=a.useState(!1),Q=x.default(K,2),X=Q[0],$=Q[1],ee=a.useRef(null),te=null==T?void 0:T.pixelWidth;a.useEffect((function(){var e,t;$((null===(e=ee.current)||void 0===e?void 0:e.scrollWidth)>(null===(t=ee.current)||void 0===t?void 0:t.offsetWidth))}),[null===(t=ee.current)||void 0===t?void 0:t.offsetWidth,te]);var ae=f.getAppDimension(te),se=u.getAppName(O),ne=null==O||null===(n=O.package)||void 0===n||null===(r=n.manifest)||void 0===r||null===(p=r.application)||void 0===p?void 0:p.subtitle,re=u.getAppSegment(O),ie=re===d.SEGMENTS.COMPLETION,le=function(e){var t,a=e.appSettings,s=void 0===a?{}:a,n=e.well,r=e.rig,i=e.fracFleet,l=e.segment,o=l===d.SEGMENTS.DRILLING,u=l===d.SEGMENTS.COMPLETION,c=s.wellId,p=s.rigId,f=s.fracFleetId,m=s.padId,g=null==i||null===(t=i.pad_frac_fleets.find((function(e){return e.pad.id===(m||i.current_pad_id)})))||void 0===t?void 0:t.pad,j=o?c&&(null==n?void 0:n.name):null==g?void 0:g.name,v="/assets/types/pad/".concat(m||(null==i?void 0:i.current_pad_id)),h=o?null==r?void 0:r.name:null==i?void 0:i.name,A=!!(c||p||f),b=!1,y=o?h&&_(n):v;return u&&!A&&null!=n&&n.id&&null!=n&&n.name&&(b=!0,A=!0,y=_(n),h=n.name),{isPrimaryAssetStatusVisible:b,isPrimaryNameVisible:A,primaryAssetLink:y,primaryAssetName:h,secondaryAssetLink:o?_(n):"/assets/types/pad/".concat(m||(null==i?void 0:i.current_pad_id)),secondaryAssetName:j}}({appSettings:null==O?void 0:O.settings,well:z,rig:U,fracFleet:W,segment:re}),de=le.isPrimaryAssetStatusVisible,oe=le.isPrimaryNameVisible,ue=le.primaryAssetLink,ce=le.primaryAssetName,pe=le.secondaryAssetLink,fe=le.secondaryAssetName,me=[f.APP_LAYOUT_SIZES.MEDIUM,f.APP_LAYOUT_SIZES.SMALL].includes(ae),ge=O&&O.id===o.DEV_CENTER_CLI_APP_ID,je={fracFleet:W,wells:Y,well:z,onSettingChange:F,appSettings:M,disableActiveWellsInPadSelect:null==O||null===(b=O.package)||void 0===b||null===(y=b.manifest)||void 0===y||null===(S=y.application)||void 0===S||null===(L=S.ui)||void 0===L?void 0:L.disableActiveWellsInPadSelect},ve=h.useStyles({isMobileSize:me});return A.jsxs("div",{className:q.default(ve.appHeaderWrapper,E.appHeader),children:[A.jsxs("div",{className:ve.appHeaderContainer,children:[A.jsxs("div",{className:q.default(ve.titleBlock,E.titleBlock),children:[A.jsxs("div",{className:E.appHeaderTitleWrapper,ref:ee,children:[A.jsxs("div",{className:ve.titleWrapper,children:[B&&A.jsxs(A.Fragment,{children:[A.jsx("img",{className:ve.logo,src:B,alt:"company logo"}),A.jsx("div",{className:ve.separateLine})]}),A.jsx(i.Tooltip,{title:X?se:"",placement:"bottom",children:A.jsx("h6",{"data-testid":"".concat(P,"_name"),className:ve.title,children:se})}),A.jsx(c.VersionBadge,{appPackage:null==O?void 0:O.package})]}),w]}),(!me||B)&&ne&&A.jsx("h6",{"data-testid":"".concat(P,"_subtitle"),className:ve.subtitle,children:ne})]}),O&&T&&A.jsxs("div",{className:q.default(v.controlsContainer,k&&v.appMaximized),children:[!me&&A.jsxs(A.Fragment,{children:[ie&&J&&A.jsx(i.Typography,{variant:"caption",children:J}),ie&&A.jsx(Z,N({},je)),C]}),A.jsxs("div",{className:v.assetLabels,children:[fe&&A.jsx(m.SecondaryAssetNameLabel,{assetName:fe,coordinatesPixelWidth:te,dataTestId:"".concat(P,"_secondaryAsset"),href:!ge&&pe,icon:ie&&A.jsx(j.PadIcon,{}),isColored:!ie||O.settings.padId&&O.settings.padId!==W.current_pad_id}),oe&&A.jsx(g.AssetNameLabel,{assetName:ce,coordinatesPixelWidth:te,dataTestId:"".concat(P,"_primaryAsset"),href:!ge&&(ue||"/feed"),statusBadge:de&&R})]})]}),V&&I&&A.jsx(l,{annotation:I,appId:s.get(O,["app","id"]),currentUser:D,dashboardAppId:O.id,openAnnotationsList:H,updateCurrentDashboardAppLastAnnotation:G})]}),me&&ne&&!B&&A.jsx("h6",{"data-testid":"".concat(P,"_subtitle"),className:ve.subtitle,children:ne}),me&&A.jsxs(i.Box,{display:"flex",alignItems:"center",mt:1,children:[ie&&!z&&(Y||W)&&A.jsx("div",{className:v.padModeSelect,children:A.jsx(Z,N({},je))}),C]})]})}O.propTypes={app:S.default.object.isRequired,badge:S.default.node,classes:S.default.shape({appHeader:S.default.string,titleBlock:S.default.string,appHeaderTitleWrapper:S.default.string}),showLastAnnotation:S.default.bool,currentUser:S.default.shape({}),appLastAnnotation:S.default.shape({}),updateCurrentDashboardAppLastAnnotation:S.default.func,openAnnotationsList:S.default.func,rig:S.default.shape({name:S.default.string,asset_id:S.default.number}),well:S.default.shape({name:S.default.string,asset_id:S.default.number}),fracFleet:S.default.shape({name:S.default.string,current_pad_id:S.default.number,pad_frac_fleets:S.default.arrayOf(S.default.shape({pad:S.default.shape({id:S.default.number.isRequired}).isRequired})).isRequired}),wells:S.default.arrayOf(S.default.shape({})),coordinates:S.default.shape({pixelWidth:S.default.number.isRequired}),isMaximized:S.default.bool,appSettings:S.default.shape({}),onSettingChange:S.default.func,children:S.default.arrayOf(S.default.node),logoSrc:S.default.string,primaryAssetStatusBadge:S.default.node,PadModeComponent:S.default.elementType},O.defaultProps={appLastAnnotation:null,appSettings:null,badge:null,children:null,classes:{},coordinates:void 0,currentUser:void 0,fracFleet:null,isMaximized:!1,logoSrc:null,onSettingChange:void 0,openAnnotationsList:void 0,rig:null,showLastAnnotation:!0,updateCurrentDashboardAppLastAnnotation:function(){},well:null,wells:null,primaryAssetStatusBadge:null,PadModeComponent:p},exports.PAGE_NAME=P,exports.default=O;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/core").makeStyles((function(e){return{appHeaderWrapper:{width:"100%",marginBottom:8},appHeaderContainer:{display:"flex"},titleBlock:{display:"flex",justifyContent:"center",flexDirection:"column",
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/core").makeStyles((function(e){return{appHeaderWrapper:{width:"100%",marginBottom:8},appHeaderContainer:{display:"flex",justifyContent:"space-between"},titleBlock:{display:"flex",justifyContent:"center",flexDirection:"column",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:16},titleWrapper:{display:"flex",alignItems:"center"},logo:{maxWidth:"130px",maxHeight:"40px"},separateLine:{width:"1px",height:"16px",backgroundColor:e.palette.primary.text9,borderRadius:"1px",margin:"auto 12px"},title:{margin:"0 8px 0 1px",fontSize:"18px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:"24px",zIndex:1e3,fontWeight:"bold"},subtitle:{color:"#888",margin:"0 0 0 1px",fontSize:"12px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400,lineHeight:"16px"}}}));exports.useStyles=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdvancedSlider.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/AdvancedSlider.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AdvancedSlider.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/AdvancedSlider.js"],"names":[],"mappings":"AA0BO,wDA0VN;;;;;QAKmB,kDAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useRef as
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useRef as i,useState as o,useEffect as n,useMemo as r}from"react";import{makeStyles as a,fade as l}from"@material-ui/core";import{Resizable as h}from"re-resizable";import{withSize as d}from"react-sizeme";import c from"classnames";import{noop as s}from"lodash";import{useThrottledCallback as u}from"../shared/useThrottledCallback.js";import{Handle as m}from"./Handle.js";import{jsx as p,jsxs as v}from"react/jsx-runtime";function g(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function f(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?g(Object(o),!0).forEach((function(i){t(e,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):g(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var b=function(a){var l,d,s=a.min,g=a.max,b=a.value,y=a.size,z=a.orientation,B=a.valueFormatter,H=a.displayFormatter,L=a.editableHandles,O=a.onChange,F=a.onStop,j=a.reversed,P=a.handlePosition,C=a.handleClasses,R=a.minimal,S=x(),E=i(null),M=i(null),k=o([B(null==b?void 0:b.at(0)),B(null==b?void 0:b.at(1))]),D=e(k,2),I=D[0],N=D[1],W=i(null),$=o(!1),A=e($,2),X=A[0],Y=A[1];n((function(){if(!W.current){var t=[B(null==b?void 0:b.at(0)),B(null==b?void 0:b.at(1))],e=Math.min.apply(Math,t),i=Math.max.apply(Math,t);N([e,i])}}),[null==b?void 0:b.at(0),null==b?void 0:b.at(1)]);var T=e(I,2),Z=T[0],q=T[1];n((function(){if("horizontal"===z){var t=y.width/(g-s)*(Z-s),e=y.width/(g-s)*(g-q);E.current.updateSize({width:j?e:t,height:y.height}),M.current.updateSize({width:j?t:e,height:y.height})}else if("vertical"===z){var i=y.height/(g-s)*(Z-s),o=y.height/(g-s)*(g-q);E.current.updateSize({width:y.width,height:j?o:i}),M.current.updateSize({width:y.width,height:j?i:o})}}),[s,g,Z,q,y.width,y.height,z]),n((function(){var t=function(){document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",V),document.removeEventListener("touchmove",_),document.removeEventListener("touchend",tt)};return X?(document.addEventListener("mousemove",U),document.addEventListener("mouseup",V),document.addEventListener("touchmove",_),document.addEventListener("touchend",tt)):(t(),F()),function(){t()}}),[X]);var G=u((function(t,e,i){W.current="onResize Event";var o=i.clientWidth,n=i.clientHeight,r=Z,a=q;"right"===e?j?a=B(g-o/y.width*(g-s)):r=B(s+o/y.width*(g-s)):"left"===e?j?r=B(s+o/y.width*(g-s)):a=B(g-o/y.width*(g-s)):"bottom"===e?j?a=B(g-n/y.height*(g-s)):r=B(s+n/y.height*(g-s)):"top"===e&&(j?r=B(s+n/y.height*(g-s)):a=B(g-n/y.height*(g-s))),r=Math.min(r,q),a=Math.max(a,Z),N([r,a]),O([r,a])})),J=u((function(){W.current=null,F()})),K=function(t,e){W.current={xPos:t,yPos:e,head:Z,tail:q}},Q=function(t,e){if(W.current){var i;"horizontal"===z?i=(W.current.xPos-t)/y.width*(g-s):"vertical"===z&&(i=(W.current.yPos-e)/y.height*(g-s));var o,n,r=W.current.head-i*(j?-1:1),a=W.current.tail-i*(j?-1:1),l=W.current.tail-W.current.head;r<=s?(o=s,n=s+l):a>=g?(o=g-l,n=g):(o=r,n=a),o=B(o),n=B(n),N([o,n]),O([o,n])}},U=u((function(t){Q(t.clientX,t.clientY)})),V=u((function(){W.current=null,Y(!1)})),_=u((function(t){Q(t.touches[0].pageX,t.touches[0].pageY)})),tt=u((function(){W.current=null,Y(!1)})),et=u((function(t){N([t,q]),O([t,q])})),it=u((function(t){N([Z,t]),O([Z,t])})),ot=r((function(){return(q-Z)/(g-s)*("vertical"===z?y.height:y.width)<30}),[s,g,Z,q]),nt=function(t){var e={min:s,max:q,value:Z,onChange:et},i={min:Z,max:g,value:q,onChange:it};return"head"===t?p(m,f({placement:"head",readOnly:!L,displayFormatter:H,orientation:z,classes:C,minimal:R},j?i:e)):"tail"===t?p(m,f({placement:"tail",readOnly:!L,displayFormatter:H,orientation:z,classes:C,minimal:R},j?e:i)):null};return p("div",{className:S.rootWrapper,children:v("div",{className:c(S.root,(l={},t(l,S.horizontalRoot,"horizontal"===z),t(l,S.verticalRoot,"vertical"===z),t(l,S.minimal,R),l)),children:[p(h,{ref:E,minHeight:0,minWidth:0,enable:{right:"horizontal"===z,bottom:"vertical"===z},handleComponent:{right:nt("head"),bottom:nt("head")},onResize:G,onResizeStop:J}),p("div",{className:S.body,"data-testid":"slider-body",onMouseDown:function(t){K(t.clientX,t.clientY),Y(!0)},onTouchStart:function(t){K(t.touches[0].pageX,t.touches[0].pageY),Y(!0)},children:p("div",ot?{className:c((d={},t(d,S.horizontalBodyHandle,"horizontal"===z),t(d,S.verticalBodyHandle,"vertical"===z),t(d,S.leftBodyHandle,"left"===P),t(d,S.rightBodyHandle,"right"===P),t(d,S.topBodyHandle,"top"===P),t(d,S.bottomBodyHandle,"bottom"===P),d)),children:p("div",{className:S.bodyHandle,children:p(w,{orientation:"vertical",minimal:R})})}:{className:S.bodyHandleIcon,children:p(w,{orientation:z,minimal:R})})}),p(h,{ref:M,minHeight:0,minWidth:0,enable:{left:"horizontal"===z,top:"vertical"===z},handleComponent:{left:nt("tail"),top:nt("tail")},onResize:G,onResizeStop:J})]})})};b.defaultProps={orientation:"horizontal",valueFormatter:Math.floor,displayFormatter:function(t){return t},onChange:s,onStop:s,reversed:!1,editableHandles:!0,handleClasses:{},minimal:!1};var y=d({monitorWidth:!0,monitorHeight:!0})(b),w=function(t){var e=t.orientation;return t.minimal?"horizontal"===e?p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"20",viewBox:"0 -2 16 16",fill:"none",children:p("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.33333 4L4 4L4 12L5.33333 12L5.33333 4ZM8.66659 4L8.66659 12L7.33325 12L7.33325 4L8.66659 4ZM12.0001 4L12.0001 12L10.6667 12L10.6667 4L12.0001 4Z",fill:"white"})}):v("svg",{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p("rect",{width:"12",height:"1"}),p("rect",{y:"3",width:"12",height:"1"}),p("rect",{y:"6",width:"12",height:"1"})]}):v("svg","horizontal"===e?{width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p("rect",{x:"7.5",y:"0.5",width:"12",height:"1",transform:"rotate(90 7.5 0.5)"}),p("rect",{x:"4.5",y:"0.5",width:"12",height:"1",transform:"rotate(90 4.5 0.5)"}),p("rect",{x:"1.5",y:"0.5",width:"12",height:"1",transform:"rotate(90 1.5 0.5)"})]}:{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p("rect",{width:"12",height:"1"}),p("rect",{y:"3",width:"12",height:"1"}),p("rect",{y:"6",width:"12",height:"1"})]})},x=a((function(t){return{rootWrapper:{position:"relative",width:"100%",height:"100%",zIndex:100},root:{position:"absolute",width:"100%",height:"100%",zIndex:100,"&:hover:not($minimal) $body":{background:"#008BA366"},"&:hover $bodyHandle":{visibility:"visible"}},horizontalRoot:{display:"flex",alignItems:"center"},verticalRoot:{display:"flex",alignItems:"center",flexDirection:"column"},body:{position:"relative",flex:1,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",userSelect:"none",background:"#3B3B3B66",color:"#BDBDBD","& svg":{fill:"currentColor"},"&:hover":{cursor:"grab",background:"#008BA366",color:"#FFFFFF"},"&:active":{cursor:"grabbing"},"&:hover $bodyHandleIcon":{visibility:"visible"}},horizontalBodyHandle:{position:"absolute",bottom:-24},verticalBodyHandle:{position:"absolute",left:-24},leftBodyHandle:{position:"absolute",left:-24,right:"auto"},rightBodyHandle:{position:"absolute",right:-24,left:"auto"},topBodyHandle:{position:"absolute",top:-24,bottom:"auto"},bottomBodyHandle:{position:"absolute",bottom:-24,top:"auto"},bodyHandle:{width:24,height:24,borderRadius:"50%",background:"#03BCD4",color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",visibility:"hidden"},bodyHandleIcon:{visibility:"hidden"},minimal:{border:"1px solid ".concat(t.palette.background.b9),borderRadius:4,"& $body":{"&:hover":{background:"#008BA366"},margin:-1,width:"calc(100% + 2px)",height:"calc(100% + 2px)",backgroundColor:l(t.palette.background.b7,.1),border:"1px solid ".concat(t.palette.primary.text9),borderRadius:4}}}}));export{b as AdvancedSlider,y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA+B,SAAS,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,SAAS,MAAM,YAAY,CAAC;AAoFnC,UAAU,SACR,SAAQ,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,EACnC,SAAS,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC;IAC5C,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;CAC5C;AAED,QAAA,MAAM,IAAI;YAAW,SAAS,GAAG,WAAW;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA+B,SAAS,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,SAAS,MAAM,YAAY,CAAC;AAoFnC,UAAU,SACR,SAAQ,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,EACnC,SAAS,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC;IAC5C,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;CAC5C;AAED,QAAA,MAAM,IAAI;YAAW,SAAS,GAAG,WAAW;;;;;;;;;CAuB3C,CAAC;AAEF,QAAA,MAAM,aAAa;;;CAGlB,CAAC;AASF,eAAe,IAAI,CAAC"}
|
package/components/Chip/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as i}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as t}from"react/jsx-runtime";import{makeStyles as e,Chip as a}from"@material-ui/core";import r from"prop-types";import l from"classnames";var o=function(i){var t=i.width,e=void 0===t?18:t,a=i.height,r=void 0===a?14:a,l=i.fill.replace("#","%23");return"<svg width='".concat(e,"' height='").concat(r,"' viewBox='0 0 18 14' fill='").concat(l,"' xmlns='http://www.w3.org/2000/svg'><path d='M6 11.1698L1.83 6.99984L0.410004 8.40984L6 13.9998L18 1.99984L16.59 0.589844L6 11.1698Z'/></svg>")},n=e((function(i){return{checked:{"&::before":{content:'url("data:image/svg+xml; utf8, '.concat(o({fill:i.palette.primary.main}),'")'),display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,lineHeight:"24px",marginLeft:8,marginRight:"-4px",paddingTop:3},"&.Mui-disabled::before":{content:'url("data:image/svg+xml; utf8, '.concat(o({fill:i.palette.primary.text8}),'")')},"&.MuiChip-sizeSmall::before":{content:'url("data:image/svg+xml; utf8, '.concat(o({width:12,fill:i.palette.primary.main}),'")'),width:16,height:16},"&.MuiChip-sizeSmall.Mui-disabled::before":{content:'url("data:image/svg+xml; utf8, '.concat(o({width:12,fill:i.palette.primary.text8}),'")')},"&.MuiChip-root.MuiChip-clickable":{"& .MuiChip-label, & .MuiChip-deleteIcon, & .MuiChip-icon":{color:"#FFFFFF"}},"& .MuiChip-label:first-child":{marginLeft:"-4px"}},basic:{"&:not([data-not-migrated-MuiChip])":{"&.MuiChip-sizeSmall":{height:12,"& .MuiChip-label":{fontSize:10}},border:"none",textTransform:"uppercase",backgroundColor:i.palette.primary.main,padding:"0 8px",height:16,"& .MuiChip-label":{fontSize:12,fontWeight:500,lineHeight:"12px",letterSpacing:"1px",color:i.palette.background.b1,padding:0},"&:hover":{backgroundColor:i.palette.primary.main,"& .MuiChip-label":{color:i.palette.background.b1}}}}}})),c=function(e){var r,o=e.checked,c=e.classes,p=void 0===c?{}:c,s=n(),d=l(e.className,((r={})[s.basic]="basic"===e.variant,r)),h="basic"===e.variant?"default":e.variant;return t(a,i({},e,o?{className:d,classes:i(i({},p),{root:l(p.root,s.checked)}),variant:h}:{className:d,variant:h}))},p={checked:r.bool,"data-testid":r.string};c.propTypes=p,c.defaultProps={checked:!1,"data-testid":"Chip"};export{c as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const PAGE_NAME: "DevCenter_AppHeader";
|
|
2
2
|
export default AppHeader;
|
|
3
|
-
declare function AppHeader({ app, appLastAnnotation, appSettings, badge, children, classes, coordinates, currentUser, fracFleet, isMaximized, logoSrc, onSettingChange, openAnnotationsList, primaryAssetStatusBadge, rig, showLastAnnotation, updateCurrentDashboardAppLastAnnotation, well, wells, PadModeComponent, }: {
|
|
3
|
+
declare function AppHeader({ app, appLastAnnotation, appSettings, badge, children, classes, coordinates, currentUser, fracFleet, isMaximized, logoSrc, onSettingChange, openAnnotationsList, primaryAssetStatusBadge, rig, showLastAnnotation, updateCurrentDashboardAppLastAnnotation, well, wells, PadModeComponent, activeWellName, }: {
|
|
4
4
|
app: any;
|
|
5
5
|
appLastAnnotation: any;
|
|
6
6
|
appSettings: any;
|
|
@@ -21,6 +21,7 @@ declare function AppHeader({ app, appLastAnnotation, appSettings, badge, childre
|
|
|
21
21
|
well: any;
|
|
22
22
|
wells: any;
|
|
23
23
|
PadModeComponent: any;
|
|
24
|
+
activeWellName: any;
|
|
24
25
|
}): JSX.Element;
|
|
25
26
|
declare namespace AppHeader {
|
|
26
27
|
namespace propTypes {
|
|
@@ -28,6 +29,7 @@ declare namespace AppHeader {
|
|
|
28
29
|
const badge: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
29
30
|
const classes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
30
31
|
appHeader: PropTypes.Requireable<string>;
|
|
32
|
+
titleBlock: PropTypes.Requireable<string>;
|
|
31
33
|
appHeaderTitleWrapper: PropTypes.Requireable<string>;
|
|
32
34
|
}>>;
|
|
33
35
|
const showLastAnnotation: PropTypes.Requireable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppHeader/AppHeader.js"],"names":[],"mappings":"AAuBA,8CAA+C;;AA4C/C
|
|
1
|
+
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppHeader/AppHeader.js"],"names":[],"mappings":"AAuBA,8CAA+C;;AA4C/C;;;;;;;;;;;;;;;;;;;;;;gBA0JC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA4D0C,kEAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as a,useRef as n,useEffect as s}from"react";import{get as i}from"lodash";import r from"prop-types";import o from"classnames";import{Tooltip as l,Box as
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as a,useRef as n,useEffect as s}from"react";import{get as i}from"lodash";import r from"prop-types";import o from"classnames";import{Tooltip as l,Typography as d,Box as p}from"@material-ui/core";import"../../Annotations/components/AnnotationsList/index.js";import c from"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import{SEGMENTS as m}from"../../../constants/segment.js";import{DEV_CENTER_CLI_APP_ID as u}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../utils/env.js";import"../../GradientManager/configuration/constants.js";import{getAppName as f,getAppSegment as g}from"../../../utils/devcenter.js";import{VersionBadge as h}from"./VersionBadge.js";import v from"./PadMode.js";import{APP_LAYOUT_SIZES as b,getAppDimension as A}from"./utils.js";import{SecondaryAssetNameLabel as y}from"../../AssetNameLabel/SecondaryAssetNameLabel.js";import{AssetNameLabel as j}from"../../AssetNameLabel/AssetNameLabel.js";import{PadIcon as L}from"./PadIcon.js";import N from"./AppHeader.css.js";import{useStyles as P}from"./AppHeaderStyles.js";import{jsxs as S,Fragment as O,jsx as _}from"react/jsx-runtime";function w(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function I(t){for(var a=1;a<arguments.length;a++){var n=null!=arguments[a]?arguments[a]:{};a%2?w(Object(n),!0).forEach((function(a){e(t,a,n[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var C="DevCenter_AppHeader",M=function(e){return"/assets/".concat(null==e?void 0:e.asset_id)};function x(e){var r,v,w,x,W,k,D,H,T=e.app,B=e.appLastAnnotation,F=e.appSettings,R=e.badge,q=e.children,z=e.classes,E=e.coordinates,U=e.currentUser,V=e.fracFleet,G=e.isMaximized,J=e.logoSrc,K=e.onSettingChange,Q=e.openAnnotationsList,X=e.primaryAssetStatusBadge,Y=e.rig,Z=e.showLastAnnotation,$=e.updateCurrentDashboardAppLastAnnotation,ee=e.well,te=e.wells,ae=e.PadModeComponent,ne=e.activeWellName,se=a(!1),ie=t(se,2),re=ie[0],oe=ie[1],le=n(null),de=null==E?void 0:E.pixelWidth;s((function(){var e,t;oe((null===(e=le.current)||void 0===e?void 0:e.scrollWidth)>(null===(t=le.current)||void 0===t?void 0:t.offsetWidth))}),[null===(r=le.current)||void 0===r?void 0:r.offsetWidth,de]);var pe=A(de),ce=f(T),me=null==T||null===(v=T.package)||void 0===v||null===(w=v.manifest)||void 0===w||null===(x=w.application)||void 0===x?void 0:x.subtitle,ue=g(T),fe=ue===m.COMPLETION,ge=function(e){var t,a=e.appSettings,n=void 0===a?{}:a,s=e.well,i=e.rig,r=e.fracFleet,o=e.segment,l=o===m.DRILLING,d=o===m.COMPLETION,p=n.wellId,c=n.rigId,u=n.fracFleetId,f=n.padId,g=null==r||null===(t=r.pad_frac_fleets.find((function(e){return e.pad.id===(f||r.current_pad_id)})))||void 0===t?void 0:t.pad,h=l?p&&(null==s?void 0:s.name):null==g?void 0:g.name,v="/assets/types/pad/".concat(f||(null==r?void 0:r.current_pad_id)),b=l?null==i?void 0:i.name:null==r?void 0:r.name,A=!!(p||c||u),y=!1,j=l?b&&M(s):v;return d&&!A&&null!=s&&s.id&&null!=s&&s.name&&(y=!0,A=!0,j=M(s),b=s.name),{isPrimaryAssetStatusVisible:y,isPrimaryNameVisible:A,primaryAssetLink:j,primaryAssetName:b,secondaryAssetLink:l?M(s):"/assets/types/pad/".concat(f||(null==r?void 0:r.current_pad_id)),secondaryAssetName:h}}({appSettings:null==T?void 0:T.settings,well:ee,rig:Y,fracFleet:V,segment:ue}),he=ge.isPrimaryAssetStatusVisible,ve=ge.isPrimaryNameVisible,be=ge.primaryAssetLink,Ae=ge.primaryAssetName,ye=ge.secondaryAssetLink,je=ge.secondaryAssetName,Le=[b.MEDIUM,b.SMALL].includes(pe),Ne=T&&T.id===u,Pe={fracFleet:V,wells:te,well:ee,onSettingChange:K,appSettings:F,disableActiveWellsInPadSelect:null==T||null===(W=T.package)||void 0===W||null===(k=W.manifest)||void 0===k||null===(D=k.application)||void 0===D||null===(H=D.ui)||void 0===H?void 0:H.disableActiveWellsInPadSelect},Se=P({isMobileSize:Le});return S("div",{className:o(Se.appHeaderWrapper,z.appHeader),children:[S("div",{className:Se.appHeaderContainer,children:[S("div",{className:o(Se.titleBlock,z.titleBlock),children:[S("div",{className:z.appHeaderTitleWrapper,ref:le,children:[S("div",{className:Se.titleWrapper,children:[J&&S(O,{children:[_("img",{className:Se.logo,src:J,alt:"company logo"}),_("div",{className:Se.separateLine})]}),_(l,{title:re?ce:"",placement:"bottom",children:_("h6",{"data-testid":"".concat(C,"_name"),className:Se.title,children:ce})}),_(h,{appPackage:null==T?void 0:T.package})]}),R]}),(!Le||J)&&me&&_("h6",{"data-testid":"".concat(C,"_subtitle"),className:Se.subtitle,children:me})]}),T&&E&&S("div",{className:o(N.controlsContainer,G&&N.appMaximized),children:[!Le&&S(O,{children:[fe&&ne&&_(d,{variant:"caption",children:ne}),fe&&_(ae,I({},Pe)),q]}),S("div",{className:N.assetLabels,children:[je&&_(y,{assetName:je,coordinatesPixelWidth:de,dataTestId:"".concat(C,"_secondaryAsset"),href:!Ne&&ye,icon:fe&&_(L,{}),isColored:!fe||T.settings.padId&&T.settings.padId!==V.current_pad_id}),ve&&_(j,{assetName:Ae,coordinatesPixelWidth:de,dataTestId:"".concat(C,"_primaryAsset"),href:!Ne&&(be||"/feed"),statusBadge:he&&X})]})]}),Z&&B&&_(c,{annotation:B,appId:i(T,["app","id"]),currentUser:U,dashboardAppId:T.id,openAnnotationsList:Q,updateCurrentDashboardAppLastAnnotation:$})]}),Le&&me&&!J&&_("h6",{"data-testid":"".concat(C,"_subtitle"),className:Se.subtitle,children:me}),Le&&S(p,{display:"flex",alignItems:"center",mt:1,children:[fe&&!ee&&(te||V)&&_("div",{className:N.padModeSelect,children:_(ae,I({},Pe))}),q]})]})}x.propTypes={app:r.object.isRequired,badge:r.node,classes:r.shape({appHeader:r.string,titleBlock:r.string,appHeaderTitleWrapper:r.string}),showLastAnnotation:r.bool,currentUser:r.shape({}),appLastAnnotation:r.shape({}),updateCurrentDashboardAppLastAnnotation:r.func,openAnnotationsList:r.func,rig:r.shape({name:r.string,asset_id:r.number}),well:r.shape({name:r.string,asset_id:r.number}),fracFleet:r.shape({name:r.string,current_pad_id:r.number,pad_frac_fleets:r.arrayOf(r.shape({pad:r.shape({id:r.number.isRequired}).isRequired})).isRequired}),wells:r.arrayOf(r.shape({})),coordinates:r.shape({pixelWidth:r.number.isRequired}),isMaximized:r.bool,appSettings:r.shape({}),onSettingChange:r.func,children:r.arrayOf(r.node),logoSrc:r.string,primaryAssetStatusBadge:r.node,PadModeComponent:r.elementType},x.defaultProps={appLastAnnotation:null,appSettings:null,badge:null,children:null,classes:{},coordinates:void 0,currentUser:void 0,fracFleet:null,isMaximized:!1,logoSrc:null,onSettingChange:void 0,openAnnotationsList:void 0,rig:null,showLastAnnotation:!0,updateCurrentDashboardAppLastAnnotation:function(){},well:null,wells:null,primaryAssetStatusBadge:null,PadModeComponent:v};export{C as PAGE_NAME,x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as e}from"@material-ui/core";var t=e((function(e){return{appHeaderWrapper:{width:"100%",marginBottom:8},appHeaderContainer:{display:"flex"},titleBlock:{display:"flex",justifyContent:"center",flexDirection:"column",
|
|
1
|
+
import{makeStyles as e}from"@material-ui/core";var t=e((function(e){return{appHeaderWrapper:{width:"100%",marginBottom:8},appHeaderContainer:{display:"flex",justifyContent:"space-between"},titleBlock:{display:"flex",justifyContent:"center",flexDirection:"column",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:16},titleWrapper:{display:"flex",alignItems:"center"},logo:{maxWidth:"130px",maxHeight:"40px"},separateLine:{width:"1px",height:"16px",backgroundColor:e.palette.primary.text9,borderRadius:"1px",margin:"auto 12px"},title:{margin:"0 8px 0 1px",fontSize:"18px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:"24px",zIndex:1e3,fontWeight:"bold"},subtitle:{color:"#888",margin:"0 0 0 1px",fontSize:"12px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400,lineHeight:"16px"}}}));export{t as useStyles};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corva/ui",
|
|
3
|
-
"version": "0.72.0-
|
|
3
|
+
"version": "0.72.0-1",
|
|
4
4
|
"description": "Shared components/utils for Corva ui projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"corva-ui"
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"prettier": "^2.1.2",
|
|
135
135
|
"prop-types": "15.7.2",
|
|
136
136
|
"query-string": "4.3.4",
|
|
137
|
-
"re-resizable": "
|
|
137
|
+
"re-resizable": "6.9.11",
|
|
138
138
|
"react": "17.0.1",
|
|
139
139
|
"react-color": "2.18.1",
|
|
140
140
|
"react-cursor-position": "3.0.3",
|