@corva/ui 0.62.0-3 → 0.62.0-4
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/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js +1 -1
- package/cjs-bundle/components/StatusBadge/components/DQStatusIcon.js +1 -1
- package/cjs-bundle/components/StatusBadge/constants.js +1 -1
- package/cjs-bundle/components/StatusBadge/index.js +1 -1
- package/cjs-bundle/components/WellSummary/WellSummaryItemValue.js +1 -1
- package/cjs-bundle/constants/feed.js +1 -1
- package/cjs-bundle/effects/useDelayedDcFullscreenElemOpen.js +1 -1
- package/cjs-bundle/effects/useWellnessAlerts.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.d.ts +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.d.ts.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js +1 -1
- package/components/StatusBadge/components/DQStatusIcon.d.ts.map +1 -1
- package/components/StatusBadge/components/DQStatusIcon.js +1 -1
- package/components/StatusBadge/constants.d.ts +3 -1
- package/components/StatusBadge/constants.d.ts.map +1 -1
- package/components/StatusBadge/constants.js +1 -1
- package/components/StatusBadge/index.d.ts +1 -1
- package/components/StatusBadge/index.d.ts.map +1 -1
- package/components/StatusBadge/index.js +1 -1
- package/components/WellSummary/WellSummaryItemValue.js +1 -1
- package/constants/feed.js +1 -1
- package/effects/useDelayedDcFullscreenElemOpen.d.ts.map +1 -1
- package/effects/useDelayedDcFullscreenElemOpen.js +1 -1
- package/effects/useWellnessAlerts.d.ts.map +1 -1
- package/effects/useWellnessAlerts.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./../../../ext-esm/style-inject/dist/style-inject.es.js')(".DevCenterAppContainer_container__6zeRh{background-color:#201f1f;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.dc-app-container__light-theme{background-color:#fff;box-shadow:inset 0 0 0 2px #ccc;color:rgba(0,0,0,.87)}.dc-app-container__pdf-report{zoom:.5}.c-dashboard-report__app--light-theme,.dc-app-container__light-theme{scrollbar-color:hsla(0,0%,50%,.6) transparent!important}.DevCenterAppContainer_dc-app-container__FBbdv:has(.DevCenterAppContainer_c-status-badge--error__CdoM3){border:1px solid var(--palette-error-main)}.DevCenterAppContainer_containerContent__Jxol2{height:100%;overflow:hidden;width:100%}.DevCenterAppContainer_containerMaximized__rJ5mZ{bottom:10px;box-shadow:0 0 18px 3px rgba(0,0,0,.75);height:auto;left:10px;overflow:hidden;position:fixed;right:10px;top:10px;width:auto;z-index:500}.DevCenterAppContainer_containerMaximized__rJ5mZ .DevCenterAppContainer_containerContent__Jxol2{margin-right:28px;width:auto}.DevCenterAppContainer_footerIconButton__4XZ-y{margin-right:4px!important}"),module.exports={container:"DevCenterAppContainer_container__6zeRh","dc-app-container":"DevCenterAppContainer_dc-app-container__FBbdv","c-status-badge--error":"DevCenterAppContainer_c-status-badge--error__CdoM3",containerContent:"DevCenterAppContainer_containerContent__Jxol2",containerMaximized:"DevCenterAppContainer_containerMaximized__rJ5mZ",footerIconButton:"DevCenterAppContainer_footerIconButton__4XZ-y"};
|
|
1
|
+
"use strict";require('./../../../ext-esm/style-inject/dist/style-inject.es.js')(".DevCenterAppContainer_container__6zeRh{background-color:#201f1f;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.dc-app-container__light-theme{background-color:#fff;box-shadow:inset 0 0 0 2px #ccc;color:rgba(0,0,0,.87)}.dc-app-container__pdf-report{zoom:.5}.c-dashboard-report__app--light-theme,.dc-app-container__light-theme{scrollbar-color:hsla(0,0%,50%,.6) transparent!important}.DevCenterAppContainer_dc-app-container__FBbdv:has(.DevCenterAppContainer_c-status-badge--error__CdoM3){border:1px solid var(--palette-error-main)}.DevCenterAppContainer_c-app-container__O2-6P:has(.DevCenterAppContainer_c-status-badge--issue__USrlm){border:1px solid orange}.DevCenterAppContainer_containerContent__Jxol2{height:100%;overflow:hidden;width:100%}.DevCenterAppContainer_containerMaximized__rJ5mZ{bottom:10px;box-shadow:0 0 18px 3px rgba(0,0,0,.75);height:auto;left:10px;overflow:hidden;position:fixed;right:10px;top:10px;width:auto;z-index:500}.DevCenterAppContainer_containerMaximized__rJ5mZ .DevCenterAppContainer_containerContent__Jxol2{margin-right:28px;width:auto}.DevCenterAppContainer_footerIconButton__4XZ-y{margin-right:4px!important}"),module.exports={container:"DevCenterAppContainer_container__6zeRh","dc-app-container":"DevCenterAppContainer_dc-app-container__FBbdv","c-status-badge--error":"DevCenterAppContainer_c-status-badge--error__CdoM3","c-app-container":"DevCenterAppContainer_c-app-container__O2-6P","c-status-badge--issue":"DevCenterAppContainer_c-status-badge--issue__USrlm",containerContent:"DevCenterAppContainer_containerContent__Jxol2",containerMaximized:"DevCenterAppContainer_containerMaximized__rJ5mZ",footerIconButton:"DevCenterAppContainer_footerIconButton__4XZ-y"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n,e=require('./../../../../../ext-esm/tslib/tslib.es6.js'),r=require("react/jsx-runtime"),t=require("react");!function(n){n.CLOSED="CLOSED",n.OPENNING="OPENNING",n.OPENED="OPENED",n.CLOSING="CLOSING"}(n||(n={}));var u=t.createContext(null);exports.DcFullscreenElemsCoordinatorProvider=function(i){var o=i.setIsFullscreenModalMode,s=i.children,c={name:n.CLOSED,currentElementInfo:null},a=t.useRef({}),l=t.useMemo((function(){function r(n){var r=n.transitionFn,t=n.plannedAfterTransitionFinishCb;return e.__awaiter(this,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r()];case 1:return e.sent(),[3,3];case 2:return n=e.sent(),console.error("Transition error: ",n),[3,3];case 3:return t(),[2]}}))}))}function t(e){var r=e.id;a.current[r]={name:n.OPENED,currentElementInfo:e},a.current[r].currentElementInfo.setIsOpened(!0)}function u(e){var u=e.id;a.current[u]={name:n.OPENNING,currentElementInfo:null},r({transitionFn:function(){return o(!0)},plannedAfterTransitionFinishCb:function(){t(e)}})}function i(t){var u=this;a.current[t].name=n.CLOSING,r({transitionFn:function(){return e.__awaiter(u,void 0,void 0,(function(){var r;return e.__generator(this,(function(e){return null===(r=a.current[t].currentElementInfo)||void 0===r||r.setIsOpened(!1),a.current[t].currentElementInfo=null,Object.keys(a.current).some((function(e){var r=a.current[e].name;return r===n.OPENNING||r===n.OPENED}))?[2]:[2,o(!1)]}))}))},plannedAfterTransitionFinishCb:function(){a.current[t].name=n.CLOSED}})}return{requestOpen:function(e){var r,i=e.id;switch((null===(r=a.current)||void 0===r?void 0:r[i])||(a.current[i]=c),a.current[e.id].name){case n.CLOSED:u(e);break;case n.OPENNING:case n.OPENED:t(e);break;case n.CLOSING:u(e)}},requestClose:function(n,e){var r;void 0===e&&(e=!1);var t=n.id;if((null===(r=a.current)||void 0===r?void 0:r[t])||(a.current[t]=c),e)return o(!1);i(t)}}}),[o]);return r.jsx(u.Provider,e.__assign({value:l},{children:s}))},exports.useDcFullscreenElemsCoordinator=function(){return t.useContext(u)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@material-ui/core"),t=require("classnames"),a=require("../constants.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@material-ui/core"),t=require("classnames"),a=require("../constants.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=s(t),n=r.makeStyles((function(e){return{small:{fontSize:"16px"},warning:{color:e.palette.warning.main},issue:{color:"#ffa500"},error:{color:e.palette.error.main},success:{color:e.palette.success.bright}}}));exports.DQStatusIcon=function(r){var t=r.color,s=r.className,c=r.iconType,l=a.BADGE_ICONS[c],u=n();return e.jsx(l,{className:o.default(u.small,u[t],s)})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/icons/Warning"),r=require("@material-ui/icons/Done"),s=require("@material-ui/icons/Error"),i=require("@material-ui/icons/CheckCircle"),o=require("../Icons/DangerousIcon.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/icons/Warning"),r=require("@material-ui/icons/Done"),s=require("@material-ui/icons/Error"),i=require("@material-ui/icons/CheckCircle"),o=require("../Icons/DangerousIcon.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u,t=n(e),a=n(r),l=n(s),c=n(i),d={Missing:o.DangerousIcon,Issue:l.default,Resolved:c.default},E={success:"success",warning:"warning",issue:"issue",error:"error"},g=((u={})[E.success]=a.default,u[E.warning]=t.default,u[E.issue]=l.default,u[E.error]=o.DangerousIcon,u);exports.ALERT_ICONS=d,exports.ALERT_STATES={missing:"Missing",issue:"Issue"},exports.ALERT_STATUSES={FLAGGED:"flagged",EXPIRED:"expired",RESOLVED:"resolved",OPEN:"open",INVESTIGATION:"investigation",ON_HOLD:"on hold"},exports.BADGE_ICONS=g,exports.BADGE_ICON_STATUSES=E,exports.MAX_MOBILE_WIDTH=959,exports.METADATA={recordProvider:"corva",recordCollections:{wellnessAlerts:"wellness_alerts",wcuRuleMapping:"wcu_rule_mapping",wellnessRuleSettings:"wellness_rule_settings",wcuRulesCheckTime:"wcu-rule-check-time"}},exports.WARNING="Recommendations may be incorrect based on data quality errors";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),n=require("react"),a=require("moment"),s=require("classnames"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),n=require("react"),a=require("moment"),s=require("classnames"),o=require("@material-ui/core"),r=require("../Tooltip/Tooltip.js");require("../Tooltip/ScrollableTooltip.js");var i=require("./constants.js"),c=require("./components/DQStatusIcon.js"),p=require("./components/DQUnvalidatedContent.js"),u=require("./components/ReportIssueModal.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(a),g=l(s),m=o.makeStyles((function(e){return{statusBadgeWrapper:{backgroundColor:e.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(e){var t=e.isSuccessTypeIcon,n=e.isErrorTypeIcon,a=e.isIssueTypeIcon;return"12px 0 2px ".concat(t||n||a?6:2,"px")},whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:e.palette.primary.text6,marginLeft:function(e){return e.isIconExist&&4}},warningMessage:{color:e.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:{zIndex:1,"& .MuiTooltip-tooltip":{position:"absolute",bottom:0,width:"max-content",transformOrigin:"center top",maxWidth:"none",padding:4,fontSize:12,boxShadow:"0px 0px 4px 2px rgb(0 0 0 / 12%)",fontWeight:400,lineHeight:"16px",letterSpacing:"0.4px",backgroundColor:e.palette.background.b9}},DQIconWrapper:{display:"flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:24,width:24,minWidth:24,borderRadius:12,"&:hover":{backgroundColor:function(e){var t=e.isErrorTypeIcon,n=e.isSuccessTypeIcon,a=e.isIssueTypeIcon;return t?"rgba(244, 67, 54, 0.1)":n?"rgba(117, 219, 41, 0.2)":a?"rgba(255, 193, 7, 0.16)":"transparent"}}}}}));exports.StatusBadge=function(a){var s=a.assetsData,l=void 0===s?{}:s,x=a.appWidth,_=a.DQIssueTooltipMaxHeight,f=a.iconType,S=a.className,I=a.lastTimestamp,T=a.onReportErrorClick,h=a.warningData,b=n.useState(!1),y=b[0],v=b[1],j=n.useState(!1),N=j[0],D=j[1],E=n.useState(null),C=E[0],A=E[1],W=null==h?void 0:h.message,w=f===i.BADGE_ICON_STATUSES.error,M=f===i.BADGE_ICON_STATUSES.success,q=f===i.BADGE_ICON_STATUSES.issue,B=x<i.MAX_MOBILE_WIDTH,O=m({isIconExist:!!f,isSuccessTypeIcon:M,isErrorTypeIcon:w,isIssueTypeIcon:q});n.useEffect((function(){return function(){return clearTimeout(C)}}),[]);var Q=function(){clearTimeout(C),D(!0)},k=function(){var e=setTimeout((function(){return D(!1)}),700);A(e)};return t.jsxs("div",e.__assign({"data-testid":"Status_badge",className:g.default(O.statusBadgeWrapper,"c-status-badge--".concat(f),S)},{children:[t.jsxs("div",e.__assign({className:O.statusBadgeContent},{children:[f&&t.jsx(r.Tooltip,e.__assign({disableHoverListener:!0,open:N,onMouseEnter:Q,onMouseLeave:k,PopperProps:{className:O.popper},placement:"top-start",title:t.jsx(p.DQUnvalidatedContent,{onMouseEnter:Q,onMouseLeave:k,assetsData:l,maxHeight:_,onClick:function(){return v(!0)}})},{children:t.jsx("div",e.__assign({className:O.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(f)},{children:t.jsx(c.DQStatusIcon,{color:f,iconType:f})}))})),I&&t.jsxs(o.Typography,e.__assign({className:g.default(O.text,O.timestamp),variant:"body1"},{children:["Last Update: ",d.default.unix(I).format("M/D/YYYY h:mm a")]})),h&&t.jsxs(t.Fragment,{children:[t.jsx(r.Tooltip,e.__assign({placement:"top",title:W?"".concat(i.WARNING,". ").concat(W):i.WARNING},{children:t.jsx("div",e.__assign({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:t.jsx(c.DQStatusIcon,{className:O.badgeIconWarning,color:i.BADGE_ICON_STATUSES.warning,iconType:i.BADGE_ICON_STATUSES.warning})}))})),!B&&t.jsx(o.Typography,e.__assign({className:g.default(O.text,O.warningMessage),variant:"body1"},{children:W?"".concat(i.WARNING,". ").concat(W):i.WARNING}))]})]})),t.jsx(u.ReportIssueModal,{assets:Object.keys(l).map((function(e){return{name:e,id:l[e][0].alert.assetId}})),open:y,onSave:T,onClose:function(){return v(!1)}})]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),a=require("prop-types"),t=require("@material-ui/core"),r=require("lodash"),s=require("moment"),i=require("classnames");require("../../constants/goals.js"),require("../../constants/segment.js"),require("../../constants/alerts.js"),require("../../constants/apps.js"),require("../../constants/drillstring.js"),require("../../constants/completion.js"),require("../../constants/notifications.js"),require("../../constants/feed.js"),require("../../constants/bha.js"),require("../../utils/env.js");var n=require("../../constants/wellSummary.js");require("../GradientManager/configuration/constants.js");var l=require("../Drillstring/BHASchematic.js");require("../Drillstring/BHATable/index.js"),require("../Drillstring/BHAComponentIcon.js"),require("../Drillstring/BHAComponentDetail/index.js"),require("../Drillstring/BHATileIcon.js"),require("../Drillstring/BHATile/BHATile.js"),require("../Drillstring/BHAList/BHAList.js"),require("../Drillstring/BHAComponentsTable/BHAComponentsTable.js"),require("../../utils/drillstring/conversion.js");var c=require("../../utils/drillstring/schematic.js"),o=require("../../utils/convert.js"),u=require("../../utils/main.js"),d=require("../../utils/formatting.js"),p=require("react/jsx-runtime");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=h(e),g=h(a),L=h(s),y=h(i),f="/static/media/6684df900ff63f28b07f9c505fb7a66e.svg",N=t.makeStyles({value:{fontSize:"14px",fontWeight:500},valueSuffix:{color:"#9E9E9E"},hasLeftMargin:{marginLeft:4},bhaRoot:{display:"flex",alignItems:"center"},bhaIdRoot:{backgroundColor:"#2196F3",borderRadius:"50%",marginRight:"8px",display:"flex",alignItems:"center",justifyContent:"center"},realBhaRoot:{width:"16px",height:"16px"},bhaIdLabel:{fontWeight:500,fontSize:"12px"},dummyBhaIdLabel:{paddingLeft:"4px",paddingRight:"4px"},bhaActiveIndicator:{fontSize:"12px",padding:"4px",fontWeight:500},nptRoot:{display:"flex",alignItems:"center"},rectIndicator:{width:"8px",height:"8px",backgroundColor:"#D32F2F",borderRadius:"2px",marginRight:"8px"},stageActual:{fontSize:"16px"},stagePercent:{color:"#9E9E9E",marginLeft:"4px"},fluidProppantType:{color:"#9E9E9E"},valueWrapper:{display:"flex",alignItems:"center"},rightImg:{marginRight:"4px"},centerImg:{marginLeft:"4px",marginRight:"4px"},rotate:{transform:"rotate(180deg)"},profileRoot:{display:"flex",alignItems:"flex-start"},profile:{width:"20px",height:"20px",borderRadius:"50%",fontSize:"10px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"8px",backgroundSize:"20px 20px",backgroundRepeat:"no-repeat",backgroundPosition:"center"},plugsIcon:{marginLeft:-8}});function x(e){var a=e.item,s=e.summaryData,i=N();if(!s)return null;if(a.key===n.DRILLING_WELL_SUMMARY.HOLE_DEPTH.key){var h=a.dataGetter(s).holeDepth;return Number.isFinite(h)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:f,alt:"hole_depth",className:i.centerImg}),p.jsxs("span",{className:y.default(i.value,i.hasLeftMargin),children:[Math.floor(h),"’"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.BIT_HOLE_DEPTH.key){var g=a.dataGetter(s),x=g.bitDepth,v=g.holeDepth;return[x,v].every(Number.isFinite)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:"/static/media/fa2667bad3591deb178e99b521571578.svg",alt:"bit_depth",className:i.rightImg}),p.jsxs("span",{className:i.value,children:[Math.floor(x),"’ / "]}),p.jsx("img",{src:f,alt:"hole_depth",className:i.centerImg}),p.jsxs("span",{className:i.value,children:[Math.floor(v),"’"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.DIVERGENCE.key){var I=a.dataGetter(s),M=I.distance,R=I.ahead,j=I.right;return[M,R,j].every(Number.isFinite)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("span",{className:i.value,children:"".concat(o.convertValue(M,"length","ft")," ").concat(o.getUnitDisplay("length"))}),p.jsx("img",{src:"/static/media/53cecdbd86f03352bda956fca25b537d.svg",alt:"up_arrow",className:y.default(i.centerImg,m.default({},i.rotate,R<0))}),p.jsx("span",{className:i.value,children:"".concat(Math.abs(o.convertValue(R,"length","ft"))," ").concat(o.getUnitDisplay("length")," ").concat(R>0?"Ahead":"Behind")}),p.jsx("img",{src:"/static/media/d32edb0ff9a69145d2c7917855263251.svg",alt:"left_arrow",className:y.default(i.centerImg,m.default({},i.rotate,j>0))}),p.jsx("span",{className:i.value,children:"".concat(Math.abs(o.convertValue(j,"length","ft"))," ").concat(o.getUnitDisplay("length")," ").concat(j>0?"Right":"Left")})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.LAST_ACTIVE.key||a.key===n.COMPLETION_WELL_SUMMARY.LAST_ACTIVE.key){var _=a.dataGetter(s).timestamp;return p.jsx(t.Typography,{className:i.value,children:_?L.default.unix(_).format("MM/DD/YYYY HH:mm"):"-"})}if(a.key===n.DRILLING_WELL_SUMMARY.CURRENT_ACTIVITY.key||a.key===n.COMPLETION_WELL_SUMMARY.CURRENT_ACTIVITY.key){var E=a.dataGetter(s).activityName;return p.jsx(t.Typography,{className:i.value,children:d.orDash(r.upperFirst(E||"-"))})}if(a.key===n.DRILLING_WELL_SUMMARY.PHASE.key){var T=a.dataGetter(s).phaseName;return p.jsx(t.Typography,{className:i.value,children:d.orDash(T)})}if(a.key===n.DRILLING_WELL_SUMMARY.HOLE_SECTION.key){var A=a.dataGetter(s).sectionName;return p.jsx(t.Typography,{className:i.value,children:d.orDash(A)})}if([n.DRILLING_WELL_SUMMARY.MUD.key,n.DRILLOUT_WELL_SUMMARY.MUD.key].includes(a.key)){var k=a.dataGetter(s),S=k.mudType,D=k.mudDensity;return p.jsx(t.Typography,{className:i.value,children:S||D?p.jsxs(p.Fragment,{children:[S&&"".concat(S,", "),D&&"".concat(o.convertValue(D,"density","ppg")," ").concat(o.getUnitDisplay("density"))]}):"-"})}if(a.key===n.DRILLING_WELL_SUMMARY.NPT.key||a.key===n.COMPLETION_WELL_SUMMARY.NPT.key){var b=a.dataGetter(s),U=b.nptType,G=b.startTime,O=b.endTime;return U&&G&&O?p.jsxs("div",{className:i.nptRoot,children:[p.jsx("div",{className:i.rectIndicator}),p.jsxs(t.Typography,{className:i.value,children:[r.upperFirst(U),": ",((O-G)/3600).fixFloat(1)," hr"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.OPERATIONS_SUMMARY.key||a.key===n.COMPLETION_WELL_SUMMARY.OPERATIONS_SUMMARY.key){var Y=a.dataGetter(s),W=Y.dateTime,q=Y.summary;return p.jsxs(t.Typography,{className:i.value,children:[W?L.default.unix(W).format("MM/DD/YYYY HH:mm"):"-",p.jsx("br",{}),q]})}if(a.key===n.COMPLETION_WELL_SUMMARY.STAGE.key){var C=a.dataGetter(s),P=C.planned,H=C.actual;return H&&P?p.jsxs(t.Typography,{className:i.value,children:[p.jsx("span",{className:i.stageActual,children:H}),p.jsx("span",{children:"/"}),p.jsx("span",{children:P}),p.jsxs("span",{className:i.stagePercent,children:["Stg ",Math.floor(H/P*100)," %"]})]}):"-"}if(a.key===n.COMPLETION_WELL_SUMMARY.FLUIDS.key){var B=a.dataGetter(s).fluids;return p.jsx("div",{children:0===B.length?"-":B.map((function(e){var a=e.type,r=e.amount,s=e.unit;return p.jsxs(t.Typography,{className:i.value,children:[p.jsxs("span",{className:i.fluidProppantType,children:[a," - "]}),p.jsx("span",{children:"".concat(o.convertValue(r,"oil",s)," ").concat(o.getUnitDisplay("oil"))})]},"".concat(a,"_").concat(r))}))})}if(a.key===n.COMPLETION_WELL_SUMMARY.PROPPANTS.key){var F=a.dataGetter(s).proppants;return p.jsx("div",{children:0===F.length?"-":F.map((function(e){var a=e.type,r=e.amount,s=e.unit;return p.jsxs(t.Typography,{className:i.value,children:[p.jsxs("span",{className:i.fluidProppantType,children:[a," - "]}),p.jsx("span",{children:"".concat(o.convertValue(r,"mass",s)," ").concat(o.getUnitDisplay("mass"))})]},"".concat(a,"_").concat(r))}))})}if(a.key===n.DRILLING_WELL_SUMMARY.ALERT.key||a.key===n.COMPLETION_WELL_SUMMARY.ALERT.key){var V=a.dataGetter(s).decisionPath;return p.jsx(t.Typography,{className:i.value,children:d.orDash(V)})}if(a.key===n.DRILLING_WELL_SUMMARY.ANNOTATION.key||a.key===n.COMPLETION_WELL_SUMMARY.ANNOTATION.key){var w=a.dataGetter(s),z=w.firstName,J=w.lastName,K=w.profilePhoto,Q=w.content,X="".concat(z," ").concat(J),Z="".concat((z||"").charAt(0)).concat((J||"").charAt(0));return Q?p.jsxs("div",{className:i.profileRoot,children:[p.jsx("div",{className:i.profile,style:{backgroundColor:"#".concat(u.getColorFromString(X)),backgroundImage:"url(".concat(K,")")},children:K?null:Z}),p.jsx(t.Typography,{className:i.value,children:Q})]}):"-"}if([n.DRILLING_WELL_SUMMARY.BHA.key,n.DRILLOUT_WELL_SUMMARY.BHA.key].includes(a.key)){var $=n.DRILLOUT_WELL_SUMMARY.BHA.key===a.key,ee=a.dataGetter(s),ae=ee.bhaId,te=ee.components,re=ae&&String(ae)||"-",se=ae&&c.getBHASchematic(te||[],$)||[];return p.jsxs("div",{className:i.bhaRoot,children:[p.jsx("div",{className:y.default(i.bhaIdRoot,m.default({},i.realBhaRoot,!re.includes("."))),children:p.jsx(t.Typography,{className:y.default(i.bhaIdLabel,m.default({},i.dummyBhaIdLabel,re.includes("."))),children:re})}),p.jsx(l,{schematic:se,containerHeight:20,containerWidth:120})]})}if(a.key===n.DRILLING_WELL_SUMMARY.CASING.key){var ie=a.dataGetter(s).outerDiameter;return ie?p.jsx(t.Typography,{className:i.value,children:"".concat(o.convertValue(ie,"shortLength")," ").concat(o.getUnitDisplay("shortLength"))}):null}if(a.key===n.DRILLING_WELL_SUMMARY.BHA_COUNT.key){var ne=a.dataGetter(s).count;return p.jsx(t.Typography,{className:i.value,children:d.orDash(ne)})}if(a.key===n.COMPLETION_WELL_SUMMARY.STAGES_DESIGN.key){var le=a.dataGetter(s).totalNumberOfStages;return Number.isFinite(le)?p.jsxs(t.Typography,{className:i.value,children:["-/",le," ",p.jsx("span",{className:i.valueSuffix,children:"Stg"})]}):"-"}if(a.key===n.COMPLETION_WELL_SUMMARY.PLUGS_DRILLED_COUNT.key){var ce=a.dataGetter(s).plugsDrilledCount;return Number.isFinite(ce)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:"/static/media/b0c8b3ba66c35ef3128cc93c5c538060.svg",alt:"drillout",className:i.plugsIcon}),p.jsx("span",{className:y.default(i.value,i.hasLeftMargin),children:ce})]}):"-"}if("development"===process.env.NODE_ENV)throw new Error("".concat(a.key," wasn't handled in WellSummaryItemValue. Returning null"));return null}x.propTypes={item:g.default.shape({key:g.default.string,label:g.default.string,icon:g.default.node,dataGetter:g.default.func}).isRequired,summaryData:g.default.shape({}).isRequired},module.exports=x;
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),a=require("prop-types"),t=require("@material-ui/core"),r=require("lodash"),s=require("moment"),i=require("classnames");require("../../constants/goals.js"),require("../../constants/segment.js"),require("../../constants/alerts.js"),require("../../constants/apps.js"),require("../../constants/drillstring.js"),require("../../constants/completion.js"),require("../../constants/notifications.js"),require("../../constants/feed.js"),require("../../constants/bha.js"),require("../../utils/env.js");var n=require("../../constants/wellSummary.js");require("../GradientManager/configuration/constants.js");var l=require("../Drillstring/BHASchematic.js");require("../Drillstring/BHATable/index.js"),require("../Drillstring/BHAComponentIcon.js"),require("../Drillstring/BHAComponentDetail/index.js"),require("../Drillstring/BHATileIcon.js"),require("../Drillstring/BHATile/BHATile.js"),require("../Drillstring/BHAList/BHAList.js"),require("../Drillstring/BHAComponentsTable/BHAComponentsTable.js"),require("../../utils/drillstring/conversion.js");var c=require("../../utils/drillstring/schematic.js"),o=require("../../utils/convert.js"),u=require("../../utils/main.js"),d=require("../../utils/formatting.js"),p=require("react/jsx-runtime");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=h(e),g=h(a),L=h(s),y=h(i),f="/static/media/6684df900ff63f28b07f9c505fb7a66e.svg",N=t.makeStyles({value:{fontSize:"14px",fontWeight:500},valueSuffix:{color:"#9E9E9E"},hasLeftMargin:{marginLeft:4},bhaRoot:{display:"flex",alignItems:"center"},bhaIdRoot:{backgroundColor:"#2196F3",borderRadius:"50%",marginRight:"8px",display:"flex",alignItems:"center",justifyContent:"center"},realBhaRoot:{width:"16px",height:"16px"},bhaIdLabel:{fontWeight:500,fontSize:"12px"},dummyBhaIdLabel:{paddingLeft:"4px",paddingRight:"4px"},bhaActiveIndicator:{fontSize:"12px",padding:"4px",fontWeight:500},nptRoot:{display:"flex",alignItems:"center"},rectIndicator:{width:"8px",height:"8px",backgroundColor:"#D32F2F",borderRadius:"2px",marginRight:"8px"},stageActual:{fontSize:"16px"},stagePercent:{color:"#9E9E9E",marginLeft:"4px"},fluidProppantType:{color:"#9E9E9E"},valueWrapper:{display:"flex",alignItems:"center"},rightImg:{marginRight:"4px"},centerImg:{marginLeft:"4px",marginRight:"4px"},rotate:{transform:"rotate(180deg)"},profileRoot:{display:"flex",alignItems:"flex-start"},profile:{width:"20px",height:"20px",borderRadius:"50%",fontSize:"10px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"8px",backgroundSize:"20px 20px",backgroundRepeat:"no-repeat",backgroundPosition:"center"},plugsIcon:{marginLeft:-8}});function x(e){var a=e.item,s=e.summaryData,i=N();if(!s)return null;if(a.key===n.DRILLING_WELL_SUMMARY.HOLE_DEPTH.key){var h=a.dataGetter(s).holeDepth;return Number.isFinite(h)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:f,alt:"hole_depth",className:i.centerImg}),p.jsxs("span",{className:y.default(i.value,i.hasLeftMargin),children:[Math.floor(h),"’"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.BIT_HOLE_DEPTH.key){var g=a.dataGetter(s),x=g.bitDepth,v=g.holeDepth;return[x,v].every(Number.isFinite)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:"/static/media/fa2667bad3591deb178e99b521571578.svg",alt:"bit_depth",className:i.rightImg}),p.jsxs("span",{className:i.value,children:[Math.floor(x),"’ / "]}),p.jsx("img",{src:f,alt:"hole_depth",className:i.centerImg}),p.jsxs("span",{className:i.value,children:[Math.floor(v),"’"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.DIVERGENCE.key){var I=a.dataGetter(s),M=I.distance,R=I.ahead,j=I.right;return[M,R,j].every(Number.isFinite)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("span",{className:i.value,children:"".concat(o.convertValue(M,"length","ft")," ").concat(o.getUnitDisplay("length"))}),p.jsx("img",{src:"/static/media/53cecdbd86f03352bda956fca25b537d.svg",alt:"up_arrow",className:y.default(i.centerImg,m.default({},i.rotate,R<0))}),p.jsx("span",{className:i.value,children:"".concat(Math.abs(o.convertValue(R,"length","ft"))," ").concat(o.getUnitDisplay("length")," ").concat(R>0?"Ahead":"Behind")}),p.jsx("img",{src:"/static/media/d32edb0ff9a69145d2c7917855263251.svg",alt:"left_arrow",className:y.default(i.centerImg,m.default({},i.rotate,j>0))}),p.jsx("span",{className:i.value,children:"".concat(Math.abs(o.convertValue(j,"length","ft"))," ").concat(o.getUnitDisplay("length")," ").concat(j>0?"Right":"Left")})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.LAST_ACTIVE.key||a.key===n.COMPLETION_WELL_SUMMARY.LAST_ACTIVE.key){var _=a.dataGetter(s).timestamp;return p.jsx(t.Typography,{className:i.value,children:_?L.default.unix(_).format("MM/DD/YYYY HH:mm"):"-"})}if(a.key===n.DRILLING_WELL_SUMMARY.CURRENT_ACTIVITY.key||a.key===n.COMPLETION_WELL_SUMMARY.CURRENT_ACTIVITY.key){var E=a.dataGetter(s).activityName;return p.jsx(t.Typography,{className:i.value,children:d.orDash(r.upperFirst(E||"-"))})}if(a.key===n.DRILLING_WELL_SUMMARY.PHASE.key){var T=a.dataGetter(s).phaseName;return p.jsx(t.Typography,{className:i.value,children:d.orDash(T)})}if(a.key===n.DRILLING_WELL_SUMMARY.HOLE_SECTION.key){var A=a.dataGetter(s).sectionName;return p.jsx(t.Typography,{className:i.value,children:d.orDash(A)})}if([n.DRILLING_WELL_SUMMARY.MUD.key,n.DRILLOUT_WELL_SUMMARY.MUD.key].includes(a.key)){var k=a.dataGetter(s),S=k.mudType,D=k.mudDensity;return p.jsx(t.Typography,{className:i.value,children:S||D?p.jsxs(p.Fragment,{children:[S&&"".concat(S,", "),D&&"".concat(o.convertValue(D,"density","ppg")," ").concat(o.getUnitDisplay("density"))]}):"-"})}if(a.key===n.DRILLING_WELL_SUMMARY.NPT.key||a.key===n.COMPLETION_WELL_SUMMARY.NPT.key){var b=a.dataGetter(s),U=b.nptType,G=b.startTime,O=b.endTime;return U&&G&&O?p.jsxs("div",{className:i.nptRoot,children:[p.jsx("div",{className:i.rectIndicator}),p.jsxs(t.Typography,{className:i.value,children:[r.upperFirst(U),": ",((O-G)/3600).fixFloat(1)," hr"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.OPERATIONS_SUMMARY.key||a.key===n.COMPLETION_WELL_SUMMARY.OPERATIONS_SUMMARY.key){var Y=a.dataGetter(s),W=Y.dateTime,q=Y.summary;return p.jsxs(t.Typography,{className:i.value,children:[W?L.default.unix(W).format("MM/DD/YYYY HH:mm"):"-",p.jsx("br",{}),q]})}if(a.key===n.COMPLETION_WELL_SUMMARY.STAGE.key){var C=a.dataGetter(s),P=C.planned,H=C.actual;return H&&P?p.jsxs(t.Typography,{className:i.value,children:[p.jsx("span",{className:i.stageActual,children:H}),p.jsx("span",{children:"/"}),p.jsx("span",{children:P}),p.jsxs("span",{className:i.stagePercent,children:["Stg ",Math.floor(H/P*100)," %"]})]}):"-"}if(a.key===n.COMPLETION_WELL_SUMMARY.FLUIDS.key){var B=a.dataGetter(s).fluids;return p.jsx("div",{children:0===B.length?"-":B.map((function(e){var a=e.type,r=e.amount,s=e.unit;return p.jsxs(t.Typography,{className:i.value,children:[p.jsxs("span",{className:i.fluidProppantType,children:[a," - "]}),p.jsx("span",{children:"".concat(o.convertValue(r,"oil",s)," ").concat(o.getUnitDisplay("oil"))})]},"".concat(a,"_").concat(r))}))})}if(a.key===n.COMPLETION_WELL_SUMMARY.PROPPANTS.key){var F=a.dataGetter(s).proppants;return p.jsx("div",{children:0===F.length?"-":F.map((function(e){var a=e.type,r=e.amount,s=e.unit;return p.jsxs(t.Typography,{className:i.value,children:[p.jsxs("span",{className:i.fluidProppantType,children:[a," - "]}),p.jsx("span",{children:"".concat(o.convertValue(r,"mass",s)," ").concat(o.getUnitDisplay("mass"))})]},"".concat(a,"_").concat(r))}))})}if(a.key===n.DRILLING_WELL_SUMMARY.ALERT.key||a.key===n.COMPLETION_WELL_SUMMARY.ALERT.key){var V=a.dataGetter(s).decisionPath;return p.jsx(t.Typography,{className:i.value,children:d.orDash(V)})}if(a.key===n.DRILLING_WELL_SUMMARY.ANNOTATION.key||a.key===n.COMPLETION_WELL_SUMMARY.ANNOTATION.key){var w=a.dataGetter(s),z=w.firstName,J=w.lastName,K=w.profilePhoto,Q=w.content,X="".concat(z," ").concat(J),Z="".concat((z||"").charAt(0)).concat((J||"").charAt(0));return Q?p.jsxs("div",{className:i.profileRoot,children:[p.jsx("div",{className:i.profile,style:{backgroundColor:"#".concat(u.getColorFromString(X)),backgroundImage:"url(".concat(K,")")},children:K?null:Z}),p.jsx(t.Typography,{className:i.value,children:Q})]}):"-"}if([n.DRILLING_WELL_SUMMARY.BHA.key,n.DRILLOUT_WELL_SUMMARY.BHA.key].includes(a.key)){var $=n.DRILLOUT_WELL_SUMMARY.BHA.key===a.key,ee=a.dataGetter(s),ae=ee.bhaId,te=ee.components,re=ae&&String(ae)||"-",se=ae&&c.getBHASchematic(te||[],$)||[];return p.jsxs("div",{className:i.bhaRoot,children:[p.jsx("div",{className:y.default(i.bhaIdRoot,m.default({},i.realBhaRoot,!re.includes("."))),children:p.jsx(t.Typography,{className:y.default(i.bhaIdLabel,m.default({},i.dummyBhaIdLabel,re.includes("."))),children:re})}),p.jsx(l,{schematic:se,containerHeight:20,containerWidth:120})]})}if(a.key===n.DRILLING_WELL_SUMMARY.CASING.key){var ie=a.dataGetter(s).outerDiameter;return ie?p.jsx(t.Typography,{className:i.value,children:"".concat(o.convertValue(ie,"shortLength","in")," ").concat(o.getUnitDisplay("shortLength"))}):null}if(a.key===n.DRILLING_WELL_SUMMARY.BHA_COUNT.key){var ne=a.dataGetter(s).count;return p.jsx(t.Typography,{className:i.value,children:d.orDash(ne)})}if(a.key===n.COMPLETION_WELL_SUMMARY.STAGES_DESIGN.key){var le=a.dataGetter(s).totalNumberOfStages;return Number.isFinite(le)?p.jsxs(t.Typography,{className:i.value,children:["-/",le," ",p.jsx("span",{className:i.valueSuffix,children:"Stg"})]}):"-"}if(a.key===n.COMPLETION_WELL_SUMMARY.PLUGS_DRILLED_COUNT.key){var ce=a.dataGetter(s).plugsDrilledCount;return Number.isFinite(ce)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:"/static/media/b0c8b3ba66c35ef3128cc93c5c538060.svg",alt:"drillout",className:i.plugsIcon}),p.jsx("span",{className:y.default(i.value,i.hasLeftMargin),children:ce})]}):"-"}if("development"===process.env.NODE_ENV)throw new Error("".concat(a.key," wasn't handled in WellSummaryItemValue. Returning null"));return null}x.propTypes={item:g.default.shape({key:g.default.string,label:g.default.string,icon:g.default.node,dataGetter:g.default.func}).isRequired,summaryData:g.default.shape({}).isRequired},module.exports=x;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/toConsumableArray"),o=require("../config/theme/palette.mjs.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(e),n=l(t);function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,l)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach((function(t){r.default(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var p={TRACES_MEMO:"traces_memo",POST:"post",DEPTH_COMMENTS:"depth_comments"},i=[{label:"Post",category:"post",type:p.POST,segment:["drilling","completion"]},{label:"Alert",category:"post",type:"alert",segment:["drilling","completion"]},{label:"Operational Note",category:"post",type:"operational_note",segment:["drilling"]},{label:"Operation Summary",category:"post",type:"operation_summary",segment:["drilling"]},{label:"Daily Cost",category:"post",type:"daily_cost",segment:["drilling"]},{label:"Document",category:"post",type:"document",segment:["drilling"]},{label:"Fluid Report",category:"post",type:"fluid_report",segment:["drilling"]},{label:"BHA",category:"post",type:"bha",segment:["drilling"]},{label:"Survey Station",category:"post",type:"survey_station",segment:["drilling"]}].concat(n.default("production"!==process.env.REACT_APP_ENVIRONMENT?[{label:"Well Plan",category:"post",type:"well_plan",segment:["drilling"]}]:[]),[{label:"Driller Memo",category:"post",type:"driller_memo",segment:["drilling"]},{label:"NPT",category:"post",type:"npt_event",segment:["drilling"]},{label:"Lessons Learned",category:"post",type:"lessons_learned",segment:["drilling"]},{label:"Operational Note",category:"post",type:"completion_operational_note",segment:["completion"]},{label:"Operation Summary",category:"post",type:"completion_operation_summary",segment:["completion"]},{label:"Daily Cost",category:"post",type:"completion_daily_cost",segment:["completion"]},{label:"Document",category:"post",type:"completion_document",segment:["completion"]},{label:"Stage Overview",category:"post",type:"completion_actual_stage",segment:["completion"]},{label:"NPT",category:"post",type:"completion_npt_event",segment:["completion"]},{label:"App Annotation",category:"post",type:"app_annotation",segment:["drilling","completion"]},{label:"Traces Memo",category:"post",type:p.TRACES_MEMO,segment:["drilling","completion"]},{label:"Geosteering Recommendations",category:"post",type:"geosteering_comments",segment:["drilling","completion"]},{label:"Depth Comments",category:"comment",type:p.DEPTH_COMMENTS,segment:["drilling","completion"]},{label:"Hookload Point Annotations",category:"comment",type:"hookload_broomstick_comment",showCreatorToLabel:!0,segment:["drilling"]},{label:"DvD Comment",category:"comment",type:"dvd_comment",showCreatorToLabel:!0,segment:["drilling"]},{label:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/toConsumableArray"),o=require("../config/theme/palette.mjs.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(e),n=l(t);function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,l)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach((function(t){r.default(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var p={TRACES_MEMO:"traces_memo",POST:"post",DEPTH_COMMENTS:"depth_comments"},i=[{label:"Post",category:"post",type:p.POST,segment:["drilling","completion"]},{label:"Alert",category:"post",type:"alert",segment:["drilling","completion"]},{label:"Operational Note",category:"post",type:"operational_note",segment:["drilling"]},{label:"Operation Summary",category:"post",type:"operation_summary",segment:["drilling"]},{label:"Daily Cost",category:"post",type:"daily_cost",segment:["drilling"]},{label:"Document",category:"post",type:"document",segment:["drilling"]},{label:"Fluid Report",category:"post",type:"fluid_report",segment:["drilling"]},{label:"BHA",category:"post",type:"bha",segment:["drilling"]},{label:"Survey Station",category:"post",type:"survey_station",segment:["drilling"]}].concat(n.default("production"!==process.env.REACT_APP_ENVIRONMENT?[{label:"Well Plan",category:"post",type:"well_plan",segment:["drilling"]}]:[]),[{label:"Driller Memo",category:"post",type:"driller_memo",segment:["drilling"]},{label:"NPT",category:"post",type:"npt_event",segment:["drilling"]},{label:"Lessons Learned",category:"post",type:"lessons_learned",segment:["drilling"]},{label:"Operational Note",category:"post",type:"completion_operational_note",segment:["completion"]},{label:"Operation Summary",category:"post",type:"completion_operation_summary",segment:["completion"]},{label:"Daily Cost",category:"post",type:"completion_daily_cost",segment:["completion"]},{label:"Document",category:"post",type:"completion_document",segment:["completion"]},{label:"Stage Overview",category:"post",type:"completion_actual_stage",segment:["completion"]},{label:"NPT",category:"post",type:"completion_npt_event",segment:["completion"]},{label:"App Annotation",category:"post",type:"app_annotation",segment:["drilling","completion"]},{label:"Traces Memo",category:"post",type:p.TRACES_MEMO,segment:["drilling","completion"]},{label:"Geosteering Recommendations",category:"post",type:"geosteering_comments",segment:["drilling","completion"]},{label:"Depth Comments",category:"comment",type:p.DEPTH_COMMENTS,segment:["drilling","completion"]},{label:"Hookload Point Annotations",category:"comment",type:"hookload_broomstick_comment",showCreatorToLabel:!0,segment:["drilling"]},{label:"DvD Comment",category:"comment",type:"dvd_comment",showCreatorToLabel:!0,segment:["drilling"]},{label:"Parameter Comparison",category:"comment",type:"pc_comment",showCreatorToLabel:!0,segment:["drilling","completion"]},{label:"Drilling Dysfunction",category:"post",type:"drilling_dysfunction_event",showCreatorToLabel:!0,segment:["drilling"]},{label:"Npt Lessons Comment",category:"comment",type:"npt_lessons_comment",showCreatorToLabel:!0,segment:["drilling"]}]),E=i.reduce((function(e,t){return s(s({},e),{},r.default({},t.type,t))}),{}),_={RIG_FILTERS:[{label:"All",value:"all"},{label:"Filter by asset",value:"filterByAsset"}],DATE_RANGE_FILTERS:[{label:"Last 24 hours",value:"last24hours"},{label:"Last 7 days",value:"last7days"},{label:"Custom",value:"custom"}],CONTENT_TYPE_FILTERS:i.map((function(e){return{label:e.label,value:e.type,segment:e.segment}})),USER_FILTERS:[{label:"All",value:"all"},{label:"Filter by user",value:"filterByUser"}]},c=i.reduce((function(e,t){var o=t.type;return[].concat(n.default(e),[o])}),[]),m={suggestions:{list:{background:o.background.b9},item:{color:"white",height:30,"&focused":{backgroundColor:"rgba(255, 255, 255, 0.08)"}}}};exports.ADD_FEED_ITEM_TO_DELETE_LIST="ADD_FEED_ITEM_TO_DELETE_LIST",exports.ADD_FEED_ITEM_TO_UPDATE_LIST="ADD_FEED_ITEM_TO_UPDATE_LIST",exports.ADD_NEW_FEED_ITEMS="ADD_NEW_FEED_ITEMS",exports.CLEAR_NEW_FEED_ITEMS="CLEAR_NEW_FEED_ITEMS",exports.DEFAULT_CONTENT_TYPES_FILTER=c,exports.DELETE_FEED_ITEM_FROM_DELETE_LIST="DELETE_FEED_ITEM_FROM_DELETE_LIST",exports.DELETE_FEED_ITEM_FROM_UPDATE_LIST="DELETE_FEED_ITEM_FROM_UPDATE_LIST",exports.DELETE_NEW_FEED_ITEM="DELETE_NEW_FEED_ITEM",exports.FEED={SUBSCRIPTIONS:[{collection:"feed"}]},exports.FEED_ITEM_CONFIGS=i,exports.FEED_ITEM_TYPES=p,exports.FEED_ITEM_TYPES_BY_KEY=E,exports.IS_FEED_SHOWN=!0,exports.MENTION_STYLE=m,exports.NAME="feed",exports.SIDEBAR_FILTERS=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");require("../components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js"),require("react/jsx-runtime"),require("../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js"),require("../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js"),require("../components/DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js"),require("../components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js"),require("../components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js"),require("../components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js"),require("../components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js");var n=require("../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js");require("../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js"),require("../components/DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js");var r=require("uuid");exports.useDelayedDcFullscreenElemOpen=function(t){var o=t.isOpen,s=e.useState(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");require("../components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js"),require("react/jsx-runtime"),require("../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js"),require("../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js"),require("../components/DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js"),require("../components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js"),require("../components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js"),require("../components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js"),require("../components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js");var n=require("../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js");require("../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js"),require("../components/DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js");var r=require("uuid");exports.useDelayedDcFullscreenElemOpen=function(t){var o=t.isOpen,s=e.useState(!1),p=s[0],i=s[1],c=n.useDcFullscreenElemsCoordinator(),u=c.requestOpen,C=c.requestClose,D=e.useState((function(){return r.v4()}))[0];return e.useEffect((function(){o?u({setIsOpened:i,id:D}):C({setIsOpened:i,id:D})}),[o]),e.useEffect((function(){return function(){C({setIsOpened:i,id:D},!0)}}),[]),{delayedIsOpen:p}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../ext-esm/tslib/tslib.es6.js'),t=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../ext-esm/tslib/tslib.es6.js'),t=require("react"),n=require("uuid"),s=require("../utils/resolveWellHubSlug.js"),r=require("../utils/env.js"),u=require("../components/StatusBadge/api.js"),i=require("../components/StatusBadge/utils.js"),a=require("../components/StatusBadge/constants.js");exports.useWellnessAlerts=function(l){var o=l.asset,d=l.multiRigAssets,c=void 0===d?[]:d,v=l.appId,g=l.dashboards,m=t.useState({}),f=m[0],p=m[1],S=t.useState(""),_=S[0],A=S[1];return t.useEffect((function(){var t=[];r.isDevOrQAEnv?t.push(174,190,23120):t.push(42,1022);var l={id:null==o?void 0:o.id,name:null==o?void 0:o.name},d=l.id?[l]:c;try{d.length&&t.includes(v)?function(t){e.__awaiter(void 0,void 0,void 0,(function(){var r,l,o,d,c,m,f,S,_,h,T,E;return e.__generator(this,(function(q){switch(q.label){case 0:return[4,u.getWCURuleMapping(v)];case 1:return r=q.sent(),[4,u.getWellnessRuleSettings(null===(h=r[0])||void 0===h?void 0:h.rule_id)];case 2:return(l=q.sent()).length?[4,s(g)]:[2];case 3:return o=q.sent(),d=t.map((function(e){return e.id})),[4,Promise.all(l.map((function(e){var t=e.data.name;return u.getWellnessAlerts(d,t)}))).then((function(e){return e.map((function(e){return e.map((function(e){return i.parseWellnessAlertFromJson(e)}))}))}))];case 4:return c=q.sent(),m=i.getNewWellnessAlerts(t,c,o),f=t.reduce((function(t,s){var r,u=s.id;return e.__assign(e.__assign({},t),((r={})[s.name]=l.map((function(e){var r;return(null===(r=t[s.name])||void 0===r?void 0:r.find((function(t){return t.name===e.data.name})))||{alert:{assetId:u,category:e.data.category,status:a.ALERT_STATUSES.RESOLVED,emptyMessage:"Data quality check passed"},id:n.v4(),isResolved:!0,name:e.data.name,linkToDQPage:i.getLinkToDQPage({assetId:u,wellHubSlug:o})}})),r))}),e.__assign({},m)),S=Object.keys(f),_="",S.filter((function(e){return f[e].every((function(e){return e.isResolved}))})).length===S.length&&(_=a.BADGE_ICON_STATUSES.success),S.filter((function(e){return f[e].some((function(e){return e.missingNum}))})).length&&(_=a.BADGE_ICON_STATUSES.error),S.filter((function(e){return f[e].some((function(e){return e.issuesNum}))})).length&&(_=a.BADGE_ICON_STATUSES.issue),A(_),p({alertsData:f,lastTimestamp:null===(E=null===(T=f[S[0]][0])||void 0===T?void 0:T.alert)||void 0===E?void 0:E.statusUpdatedAt}),[2]}}))}))}(d):(p({}),A(""))}catch(e){console.error(e)}}),[null==o?void 0:o.id,c.length]),{wellnessAlerts:f,statusBadgeIconType:_}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var t={container:"DevCenterAppContainer_container__6zeRh","dc-app-container":"DevCenterAppContainer_dc-app-container__FBbdv","c-status-badge--error":"DevCenterAppContainer_c-status-badge--error__CdoM3",containerContent:"DevCenterAppContainer_containerContent__Jxol2",containerMaximized:"DevCenterAppContainer_containerMaximized__rJ5mZ",footerIconButton:"DevCenterAppContainer_footerIconButton__4XZ-y"};e(".DevCenterAppContainer_container__6zeRh{background-color:#201f1f;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.dc-app-container__light-theme{background-color:#fff;box-shadow:inset 0 0 0 2px #ccc;color:rgba(0,0,0,.87)}.dc-app-container__pdf-report{zoom:.5}.c-dashboard-report__app--light-theme,.dc-app-container__light-theme{scrollbar-color:hsla(0,0%,50%,.6) transparent!important}.DevCenterAppContainer_dc-app-container__FBbdv:has(.DevCenterAppContainer_c-status-badge--error__CdoM3){border:1px solid var(--palette-error-main)}.DevCenterAppContainer_containerContent__Jxol2{height:100%;overflow:hidden;width:100%}.DevCenterAppContainer_containerMaximized__rJ5mZ{bottom:10px;box-shadow:0 0 18px 3px rgba(0,0,0,.75);height:auto;left:10px;overflow:hidden;position:fixed;right:10px;top:10px;width:auto;z-index:500}.DevCenterAppContainer_containerMaximized__rJ5mZ .DevCenterAppContainer_containerContent__Jxol2{margin-right:28px;width:auto}.DevCenterAppContainer_footerIconButton__4XZ-y{margin-right:4px!important}");export{t as default};
|
|
1
|
+
import e from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var t={container:"DevCenterAppContainer_container__6zeRh","dc-app-container":"DevCenterAppContainer_dc-app-container__FBbdv","c-status-badge--error":"DevCenterAppContainer_c-status-badge--error__CdoM3","c-app-container":"DevCenterAppContainer_c-app-container__O2-6P","c-status-badge--issue":"DevCenterAppContainer_c-status-badge--issue__USrlm",containerContent:"DevCenterAppContainer_containerContent__Jxol2",containerMaximized:"DevCenterAppContainer_containerMaximized__rJ5mZ",footerIconButton:"DevCenterAppContainer_footerIconButton__4XZ-y"};e(".DevCenterAppContainer_container__6zeRh{background-color:#201f1f;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.dc-app-container__light-theme{background-color:#fff;box-shadow:inset 0 0 0 2px #ccc;color:rgba(0,0,0,.87)}.dc-app-container__pdf-report{zoom:.5}.c-dashboard-report__app--light-theme,.dc-app-container__light-theme{scrollbar-color:hsla(0,0%,50%,.6) transparent!important}.DevCenterAppContainer_dc-app-container__FBbdv:has(.DevCenterAppContainer_c-status-badge--error__CdoM3){border:1px solid var(--palette-error-main)}.DevCenterAppContainer_c-app-container__O2-6P:has(.DevCenterAppContainer_c-status-badge--issue__USrlm){border:1px solid orange}.DevCenterAppContainer_containerContent__Jxol2{height:100%;overflow:hidden;width:100%}.DevCenterAppContainer_containerMaximized__rJ5mZ{bottom:10px;box-shadow:0 0 18px 3px rgba(0,0,0,.75);height:auto;left:10px;overflow:hidden;position:fixed;right:10px;top:10px;width:auto;z-index:500}.DevCenterAppContainer_containerMaximized__rJ5mZ .DevCenterAppContainer_containerContent__Jxol2{margin-right:28px;width:auto}.DevCenterAppContainer_footerIconButton__4XZ-y{margin-right:4px!important}");export{t as default};
|
|
@@ -9,7 +9,7 @@ interface ElementInfo {
|
|
|
9
9
|
}
|
|
10
10
|
interface Api {
|
|
11
11
|
requestOpen: (elInfo: ElementInfo) => void;
|
|
12
|
-
requestClose: (elInfo: ElementInfo) => void;
|
|
12
|
+
requestClose: (elInfo: ElementInfo, isUnmount?: boolean) => void;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Component designed to manage fullscreen elements inside of iframe(such as tooltips, popovers, modals).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DcFullscreenElemsCoordinatorProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,EAAE,EACF,cAAc,EACd,QAAQ,EACR,SAAS,EACV,MAAM,OAAO,CAAC;AASf,UAAU,KAAK;IACb,wBAAwB,EAAE,CAAC,GAAG,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CACnC;AAED,UAAU,WAAW;IACnB,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,GAAG;IACX,WAAW,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"DcFullscreenElemsCoordinatorProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,EAAE,EACF,cAAc,EACd,QAAQ,EACR,SAAS,EACV,MAAM,OAAO,CAAC;AASf,UAAU,KAAK;IACb,wBAAwB,EAAE,CAAC,GAAG,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CACnC;AAED,UAAU,WAAW;IACnB,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,GAAG;IACX,WAAW,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAClE;AAgBD;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,oCAAoC,EAAE,EAAE,CAAC,KAAK,CAuH1D,CAAC;AAEF,wBAAgB,+BAA+B,QAE9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as n,__awaiter as r,__generator as e}from'./../../../../../ext-esm/tslib/tslib.es6.js';import{jsx as t}from"react/jsx-runtime";import{createContext as i,useRef as u,useMemo as
|
|
1
|
+
import{__assign as n,__awaiter as r,__generator as e}from'./../../../../../ext-esm/tslib/tslib.es6.js';import{jsx as t}from"react/jsx-runtime";import{createContext as i,useRef as u,useMemo as o,useContext as c}from"react";var s;!function(n){n.CLOSED="CLOSED",n.OPENNING="OPENNING",n.OPENED="OPENED",n.CLOSING="CLOSING"}(s||(s={}));var a=i(null),l=function(i){var c=i.setIsFullscreenModalMode,l=i.children,f={name:s.CLOSED,currentElementInfo:null},d=u({}),E=o((function(){function n(n){var t=n.transitionFn,i=n.plannedAfterTransitionFinishCb;return r(this,void 0,void 0,(function(){var n;return e(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,t()];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),console.error("Transition error: ",n),[3,3];case 3:return i(),[2]}}))}))}function t(n){var r=n.id;d.current[r]={name:s.OPENED,currentElementInfo:n},d.current[r].currentElementInfo.setIsOpened(!0)}function i(r){var e=r.id;d.current[e]={name:s.OPENNING,currentElementInfo:null},n({transitionFn:function(){return c(!0)},plannedAfterTransitionFinishCb:function(){t(r)}})}function u(t){var i=this;d.current[t].name=s.CLOSING,n({transitionFn:function(){return r(i,void 0,void 0,(function(){var n;return e(this,(function(r){return null===(n=d.current[t].currentElementInfo)||void 0===n||n.setIsOpened(!1),d.current[t].currentElementInfo=null,Object.keys(d.current).some((function(n){var r=d.current[n].name;return r===s.OPENNING||r===s.OPENED}))?[2]:[2,c(!1)]}))}))},plannedAfterTransitionFinishCb:function(){d.current[t].name=s.CLOSED}})}return{requestOpen:function(n){var r,e=n.id;switch((null===(r=d.current)||void 0===r?void 0:r[e])||(d.current[e]=f),d.current[n.id].name){case s.CLOSED:i(n);break;case s.OPENNING:case s.OPENED:t(n);break;case s.CLOSING:i(n)}},requestClose:function(n,r){var e;void 0===r&&(r=!1);var t=n.id;if((null===(e=d.current)||void 0===e?void 0:e[t])||(d.current[t]=f),r)return c(!1);u(t)}}}),[c]);return t(a.Provider,n({value:E},{children:l}))};function f(){return c(a)}export{l as DcFullscreenElemsCoordinatorProvider,f as useDcFullscreenElemsCoordinator};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DQStatusIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQStatusIcon.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAe,eAAe,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"DQStatusIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQStatusIcon.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAe,eAAe,EAAE,MAAM,cAAc,CAAC;AAU5D,aAAK,SAAS,GAAG;IACf,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,YAAY,mCAAoC,SAAS,KAAG,WAOxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{makeStyles as o}from"@material-ui/core";import e from"classnames";import{BADGE_ICONS as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{makeStyles as o}from"@material-ui/core";import e from"classnames";import{BADGE_ICONS as a}from"../constants.js";var t=o((function(r){return{small:{fontSize:"16px"},warning:{color:r.palette.warning.main},issue:{color:"#ffa500"},error:{color:r.palette.error.main},success:{color:r.palette.success.bright}}})),s=function(o){var s=o.color,c=o.className,n=o.iconType,i=a[n],m=t();return r(i,{className:e(m.small,m[s],c)})};export{s as DQStatusIcon};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const MAX_MOBILE_WIDTH = 959;
|
|
2
|
-
export declare type BadgeIconStatus = 'warning' | 'error' | 'success';
|
|
2
|
+
export declare type BadgeIconStatus = 'warning' | 'issue' | 'error' | 'success';
|
|
3
3
|
export declare const ALERT_STATUSES: {
|
|
4
4
|
FLAGGED: string;
|
|
5
5
|
EXPIRED: string;
|
|
@@ -47,12 +47,14 @@ export declare type AssetData = Record<string, AssetItem[]>;
|
|
|
47
47
|
declare type BadgeIconStatuses = {
|
|
48
48
|
success: 'success';
|
|
49
49
|
warning: 'warning';
|
|
50
|
+
issue: 'issue';
|
|
50
51
|
error: 'error';
|
|
51
52
|
};
|
|
52
53
|
export declare const BADGE_ICON_STATUSES: BadgeIconStatuses;
|
|
53
54
|
export declare const BADGE_ICONS: {
|
|
54
55
|
success: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
|
|
55
56
|
warning: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
|
|
57
|
+
issue: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
|
|
56
58
|
error: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
|
|
57
59
|
};
|
|
58
60
|
export declare const WARNING = "Recommendations may be incorrect based on data quality errors";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAExE,eAAO,MAAM,cAAc;;;;;;;CAO1B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,aAAK,KAAK,GAAG,OAAO,CAAC;AACrB,aAAK,OAAO,GAAG,SAAS,CAAC;AAEzB,oBAAY,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAG1D,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpD,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAKjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC;AAEF,eAAO,MAAM,OAAO,kEAAkE,CAAC;AAEvF,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@material-ui/icons/Warning";import
|
|
1
|
+
import e from"@material-ui/icons/Warning";import s from"@material-ui/icons/Done";import r from"@material-ui/icons/Error";import i from"@material-ui/icons/CheckCircle";import{DangerousIcon as o}from"../Icons/DangerousIcon.js";var n,c=959,l={FLAGGED:"flagged",EXPIRED:"expired",RESOLVED:"resolved",OPEN:"open",INVESTIGATION:"investigation",ON_HOLD:"on hold"},a={Missing:o,Issue:r,Resolved:i},u={missing:"Missing",issue:"Issue"},t={success:"success",warning:"warning",issue:"issue",error:"error"},m=((n={})[t.success]=s,n[t.warning]=e,n[t.issue]=r,n[t.error]=o,n),g="Recommendations may be incorrect based on data quality errors",p={recordProvider:"corva",recordCollections:{wellnessAlerts:"wellness_alerts",wcuRuleMapping:"wcu_rule_mapping",wellnessRuleSettings:"wellness_rule_settings",wcuRulesCheckTime:"wcu-rule-check-time"}};export{a as ALERT_ICONS,u as ALERT_STATES,l as ALERT_STATUSES,m as BADGE_ICONS,t as BADGE_ICON_STATUSES,c as MAX_MOBILE_WIDTH,p as METADATA,g as WARNING};
|
|
@@ -5,7 +5,7 @@ declare type StatusBadgeProps = {
|
|
|
5
5
|
appWidth: number;
|
|
6
6
|
className?: string;
|
|
7
7
|
DQIssueTooltipMaxHeight?: number;
|
|
8
|
-
iconType?: 'error' | 'success';
|
|
8
|
+
iconType?: 'error' | 'success' | 'issue';
|
|
9
9
|
lastTimestamp: number;
|
|
10
10
|
onReportErrorClick: (description: string, assetId: number) => void;
|
|
11
11
|
warningData?: Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAkD,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAkD,SAAS,EAAE,MAAM,aAAa,CAAC;AAkFxF,aAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,WAAW,4HASrB,gBAAgB,KAAG,WAyGrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as e,jsx as o,Fragment as n}from"react/jsx-runtime";import{useState as a,useEffect as r}from"react";import i from"moment";import s from"classnames";import{makeStyles as c,Typography as p}from"@material-ui/core";import{Tooltip as l}from"../Tooltip/Tooltip.js";import"../Tooltip/ScrollableTooltip.js";import{WARNING as m,BADGE_ICON_STATUSES as d,MAX_MOBILE_WIDTH as u}from"./constants.js";import{DQStatusIcon as g}from"./components/DQStatusIcon.js";import{DQUnvalidatedContent as f}from"./components/DQUnvalidatedContent.js";import{ReportIssueModal as x}from"./components/ReportIssueModal.js";var h=c((function(t){return{statusBadgeWrapper:{backgroundColor:t.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(t){var e=t.isSuccessTypeIcon,o=t.isErrorTypeIcon;return"12px 0 2px ".concat(e||o?6:2,"px")},whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:t.palette.primary.text6,marginLeft:function(t){return t.isIconExist&&4}},warningMessage:{color:t.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:{zIndex:1,"& .MuiTooltip-tooltip":{position:"absolute",bottom:0,width:"max-content",transformOrigin:"center top",maxWidth:"none",padding:4,fontSize:12,boxShadow:"0px 0px 4px 2px rgb(0 0 0 / 12%)",fontWeight:400,lineHeight:"16px",letterSpacing:"0.4px",backgroundColor:t.palette.background.b9}},DQIconWrapper:{display:"flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:24,width:24,minWidth:24,borderRadius:12,"&:hover":{backgroundColor:function(t){var e=t.isErrorTypeIcon,o=t.isSuccessTypeIcon;return e?"rgba(244, 67, 54, 0.1)":o?"rgba(117, 219, 41, 0.2)":"transparent"}}}}})),b=function(c){var b=c.assetsData,
|
|
1
|
+
import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as e,jsx as o,Fragment as n}from"react/jsx-runtime";import{useState as a,useEffect as r}from"react";import i from"moment";import s from"classnames";import{makeStyles as c,Typography as p}from"@material-ui/core";import{Tooltip as l}from"../Tooltip/Tooltip.js";import"../Tooltip/ScrollableTooltip.js";import{WARNING as m,BADGE_ICON_STATUSES as d,MAX_MOBILE_WIDTH as u}from"./constants.js";import{DQStatusIcon as g}from"./components/DQStatusIcon.js";import{DQUnvalidatedContent as f}from"./components/DQUnvalidatedContent.js";import{ReportIssueModal as x}from"./components/ReportIssueModal.js";var h=c((function(t){return{statusBadgeWrapper:{backgroundColor:t.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(t){var e=t.isSuccessTypeIcon,o=t.isErrorTypeIcon,n=t.isIssueTypeIcon;return"12px 0 2px ".concat(e||o||n?6:2,"px")},whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:t.palette.primary.text6,marginLeft:function(t){return t.isIconExist&&4}},warningMessage:{color:t.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:{zIndex:1,"& .MuiTooltip-tooltip":{position:"absolute",bottom:0,width:"max-content",transformOrigin:"center top",maxWidth:"none",padding:4,fontSize:12,boxShadow:"0px 0px 4px 2px rgb(0 0 0 / 12%)",fontWeight:400,lineHeight:"16px",letterSpacing:"0.4px",backgroundColor:t.palette.background.b9}},DQIconWrapper:{display:"flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:24,width:24,minWidth:24,borderRadius:12,"&:hover":{backgroundColor:function(t){var e=t.isErrorTypeIcon,o=t.isSuccessTypeIcon,n=t.isIssueTypeIcon;return e?"rgba(244, 67, 54, 0.1)":o?"rgba(117, 219, 41, 0.2)":n?"rgba(255, 193, 7, 0.16)":"transparent"}}}}})),b=function(c){var b=c.assetsData,I=void 0===b?{}:b,v=c.appWidth,T=c.DQIssueTooltipMaxHeight,y=c.iconType,S=c.className,w=c.lastTimestamp,_=c.onReportErrorClick,D=c.warningData,j=a(!1),C=j[0],M=j[1],W=a(!1),k=W[0],E=W[1],N=a(null),L=N[0],Q=N[1],H=null==D?void 0:D.message,z=y===d.error,B=y===d.success,Y=y===d.issue,O=v<u,R=h({isIconExist:!!y,isSuccessTypeIcon:B,isErrorTypeIcon:z,isIssueTypeIcon:Y});r((function(){return function(){return clearTimeout(L)}}),[]);var P=function(){clearTimeout(L),E(!0)},U=function(){var t=setTimeout((function(){return E(!1)}),700);Q(t)};return e("div",t({"data-testid":"Status_badge",className:s(R.statusBadgeWrapper,"c-status-badge--".concat(y),S)},{children:[e("div",t({className:R.statusBadgeContent},{children:[y&&o(l,t({disableHoverListener:!0,open:k,onMouseEnter:P,onMouseLeave:U,PopperProps:{className:R.popper},placement:"top-start",title:o(f,{onMouseEnter:P,onMouseLeave:U,assetsData:I,maxHeight:T,onClick:function(){return M(!0)}})},{children:o("div",t({className:R.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(y)},{children:o(g,{color:y,iconType:y})}))})),w&&e(p,t({className:s(R.text,R.timestamp),variant:"body1"},{children:["Last Update: ",i.unix(w).format("M/D/YYYY h:mm a")]})),D&&e(n,{children:[o(l,t({placement:"top",title:H?"".concat(m,". ").concat(H):m},{children:o("div",t({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:o(g,{className:R.badgeIconWarning,color:d.warning,iconType:d.warning})}))})),!O&&o(p,t({className:s(R.text,R.warningMessage),variant:"body1"},{children:H?"".concat(m,". ").concat(H):m}))]})]})),o(x,{assets:Object.keys(I).map((function(t){return{name:t,id:I[t][0].alert.assetId}})),open:C,onSave:_,onClose:function(){return M(!1)}})]}))};export{b as StatusBadge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"prop-types";import{makeStyles as a,Typography as r}from"@material-ui/core";import{upperFirst as i}from"lodash";import n from"moment";import s from"classnames";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/env.js";import{DRILLING_WELL_SUMMARY as l,COMPLETION_WELL_SUMMARY as c,DRILLOUT_WELL_SUMMARY as o}from"../../constants/wellSummary.js";import"../GradientManager/configuration/constants.js";import m from"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../utils/drillstring/conversion.js";import{getBHASchematic as d}from"../../utils/drillstring/schematic.js";import{convertValue as p,getUnitDisplay as u}from"../../utils/convert.js";import h from"../../utils/main.js";import{orDash as f}from"../../utils/formatting.js";import{jsxs as g,jsx as y,Fragment as v}from"react/jsx-runtime";var N="/static/media/6684df900ff63f28b07f9c505fb7a66e.svg",k=a({value:{fontSize:"14px",fontWeight:500},valueSuffix:{color:"#9E9E9E"},hasLeftMargin:{marginLeft:4},bhaRoot:{display:"flex",alignItems:"center"},bhaIdRoot:{backgroundColor:"#2196F3",borderRadius:"50%",marginRight:"8px",display:"flex",alignItems:"center",justifyContent:"center"},realBhaRoot:{width:"16px",height:"16px"},bhaIdLabel:{fontWeight:500,fontSize:"12px"},dummyBhaIdLabel:{paddingLeft:"4px",paddingRight:"4px"},bhaActiveIndicator:{fontSize:"12px",padding:"4px",fontWeight:500},nptRoot:{display:"flex",alignItems:"center"},rectIndicator:{width:"8px",height:"8px",backgroundColor:"#D32F2F",borderRadius:"2px",marginRight:"8px"},stageActual:{fontSize:"16px"},stagePercent:{color:"#9E9E9E",marginLeft:"4px"},fluidProppantType:{color:"#9E9E9E"},valueWrapper:{display:"flex",alignItems:"center"},rightImg:{marginRight:"4px"},centerImg:{marginLeft:"4px",marginRight:"4px"},rotate:{transform:"rotate(180deg)"},profileRoot:{display:"flex",alignItems:"flex-start"},profile:{width:"20px",height:"20px",borderRadius:"50%",fontSize:"10px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"8px",backgroundSize:"20px 20px",backgroundRepeat:"no-repeat",backgroundPosition:"center"},plugsIcon:{marginLeft:-8}});function b(t){var a=t.item,b=t.summaryData,I=k();if(!b)return null;if(a.key===l.HOLE_DEPTH.key){var T=a.dataGetter(b).holeDepth;return Number.isFinite(T)?g("div",{className:I.valueWrapper,children:[y("img",{src:N,alt:"hole_depth",className:I.centerImg}),g("span",{className:s(I.value,I.hasLeftMargin),children:[Math.floor(T),"’"]})]}):"-"}if(a.key===l.BIT_HOLE_DEPTH.key){var A=a.dataGetter(b),x=A.bitDepth,R=A.holeDepth;return[x,R].every(Number.isFinite)?g("div",{className:I.valueWrapper,children:[y("img",{src:"/static/media/fa2667bad3591deb178e99b521571578.svg",alt:"bit_depth",className:I.rightImg}),g("span",{className:I.value,children:[Math.floor(x),"’ / "]}),y("img",{src:N,alt:"hole_depth",className:I.centerImg}),g("span",{className:I.value,children:[Math.floor(R),"’"]})]}):"-"}if(a.key===l.DIVERGENCE.key){var E=a.dataGetter(b),D=E.distance,S=E.ahead,j=E.right;return[D,S,j].every(Number.isFinite)?g("div",{className:I.valueWrapper,children:[y("span",{className:I.value,children:"".concat(p(D,"length","ft")," ").concat(u("length"))}),y("img",{src:"/static/media/53cecdbd86f03352bda956fca25b537d.svg",alt:"up_arrow",className:s(I.centerImg,e({},I.rotate,S<0))}),y("span",{className:I.value,children:"".concat(Math.abs(p(S,"length","ft"))," ").concat(u("length")," ").concat(S>0?"Ahead":"Behind")}),y("img",{src:"/static/media/d32edb0ff9a69145d2c7917855263251.svg",alt:"left_arrow",className:s(I.centerImg,e({},I.rotate,j>0))}),y("span",{className:I.value,children:"".concat(Math.abs(p(j,"length","ft"))," ").concat(u("length")," ").concat(j>0?"Right":"Left")})]}):"-"}if(a.key===l.LAST_ACTIVE.key||a.key===c.LAST_ACTIVE.key){var G=a.dataGetter(b).timestamp;return y(r,{className:I.value,children:G?n.unix(G).format("MM/DD/YYYY HH:mm"):"-"})}if(a.key===l.CURRENT_ACTIVITY.key||a.key===c.CURRENT_ACTIVITY.key){var L=a.dataGetter(b).activityName;return y(r,{className:I.value,children:f(i(L||"-"))})}if(a.key===l.PHASE.key){var H=a.dataGetter(b).phaseName;return y(r,{className:I.value,children:f(H)})}if(a.key===l.HOLE_SECTION.key){var C=a.dataGetter(b).sectionName;return y(r,{className:I.value,children:f(C)})}if([l.MUD.key,o.MUD.key].includes(a.key)){var _=a.dataGetter(b),B=_.mudType,M=_.mudDensity;return y(r,{className:I.value,children:B||M?g(v,{children:[B&&"".concat(B,", "),M&&"".concat(p(M,"density","ppg")," ").concat(u("density"))]}):"-"})}if(a.key===l.NPT.key||a.key===c.NPT.key){var P=a.dataGetter(b),O=P.nptType,Y=P.startTime,F=P.endTime;return O&&Y&&F?g("div",{className:I.nptRoot,children:[y("div",{className:I.rectIndicator}),g(r,{className:I.value,children:[i(O),": ",((F-Y)/3600).fixFloat(1)," hr"]})]}):"-"}if(a.key===l.OPERATIONS_SUMMARY.key||a.key===c.OPERATIONS_SUMMARY.key){var U=a.dataGetter(b),W=U.dateTime,w=U.summary;return g(r,{className:I.value,children:[W?n.unix(W).format("MM/DD/YYYY HH:mm"):"-",y("br",{}),w]})}if(a.key===c.STAGE.key){var V=a.dataGetter(b),z=V.planned,q=V.actual;return q&&z?g(r,{className:I.value,children:[y("span",{className:I.stageActual,children:q}),y("span",{children:"/"}),y("span",{children:z}),g("span",{className:I.stagePercent,children:["Stg ",Math.floor(q/z*100)," %"]})]}):"-"}if(a.key===c.FLUIDS.key){var J=a.dataGetter(b).fluids;return y("div",{children:0===J.length?"-":J.map((function(e){var t=e.type,a=e.amount,i=e.unit;return g(r,{className:I.value,children:[g("span",{className:I.fluidProppantType,children:[t," - "]}),y("span",{children:"".concat(p(a,"oil",i)," ").concat(u("oil"))})]},"".concat(t,"_").concat(a))}))})}if(a.key===c.PROPPANTS.key){var K=a.dataGetter(b).proppants;return y("div",{children:0===K.length?"-":K.map((function(e){var t=e.type,a=e.amount,i=e.unit;return g(r,{className:I.value,children:[g("span",{className:I.fluidProppantType,children:[t," - "]}),y("span",{children:"".concat(p(a,"mass",i)," ").concat(u("mass"))})]},"".concat(t,"_").concat(a))}))})}if(a.key===l.ALERT.key||a.key===c.ALERT.key){var Q=a.dataGetter(b).decisionPath;return y(r,{className:I.value,children:f(Q)})}if(a.key===l.ANNOTATION.key||a.key===c.ANNOTATION.key){var X=a.dataGetter(b),Z=X.firstName,$=X.lastName,ee=X.profilePhoto,te=X.content,ae="".concat(Z," ").concat($),re="".concat((Z||"").charAt(0)).concat(($||"").charAt(0));return te?g("div",{className:I.profileRoot,children:[y("div",{className:I.profile,style:{backgroundColor:"#".concat(h.getColorFromString(ae)),backgroundImage:"url(".concat(ee,")")},children:ee?null:re}),y(r,{className:I.value,children:te})]}):"-"}if([l.BHA.key,o.BHA.key].includes(a.key)){var ie=o.BHA.key===a.key,ne=a.dataGetter(b),se=ne.bhaId,le=ne.components,ce=se&&String(se)||"-",oe=se&&d(le||[],ie)||[];return g("div",{className:I.bhaRoot,children:[y("div",{className:s(I.bhaIdRoot,e({},I.realBhaRoot,!ce.includes("."))),children:y(r,{className:s(I.bhaIdLabel,e({},I.dummyBhaIdLabel,ce.includes("."))),children:ce})}),y(m,{schematic:oe,containerHeight:20,containerWidth:120})]})}if(a.key===l.CASING.key){var me=a.dataGetter(b).outerDiameter;return me?y(r,{className:I.value,children:"".concat(p(me,"shortLength")," ").concat(u("shortLength"))}):null}if(a.key===l.BHA_COUNT.key){var de=a.dataGetter(b).count;return y(r,{className:I.value,children:f(de)})}if(a.key===c.STAGES_DESIGN.key){var pe=a.dataGetter(b).totalNumberOfStages;return Number.isFinite(pe)?g(r,{className:I.value,children:["-/",pe," ",y("span",{className:I.valueSuffix,children:"Stg"})]}):"-"}if(a.key===c.PLUGS_DRILLED_COUNT.key){var ue=a.dataGetter(b).plugsDrilledCount;return Number.isFinite(ue)?g("div",{className:I.valueWrapper,children:[y("img",{src:"/static/media/b0c8b3ba66c35ef3128cc93c5c538060.svg",alt:"drillout",className:I.plugsIcon}),y("span",{className:s(I.value,I.hasLeftMargin),children:ue})]}):"-"}if("development"===process.env.NODE_ENV)throw new Error("".concat(a.key," wasn't handled in WellSummaryItemValue. Returning null"));return null}b.propTypes={item:t.shape({key:t.string,label:t.string,icon:t.node,dataGetter:t.func}).isRequired,summaryData:t.shape({}).isRequired};export{b as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"prop-types";import{makeStyles as a,Typography as r}from"@material-ui/core";import{upperFirst as i}from"lodash";import n from"moment";import s from"classnames";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/env.js";import{DRILLING_WELL_SUMMARY as l,COMPLETION_WELL_SUMMARY as c,DRILLOUT_WELL_SUMMARY as o}from"../../constants/wellSummary.js";import"../GradientManager/configuration/constants.js";import m from"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../utils/drillstring/conversion.js";import{getBHASchematic as d}from"../../utils/drillstring/schematic.js";import{convertValue as p,getUnitDisplay as u}from"../../utils/convert.js";import h from"../../utils/main.js";import{orDash as f}from"../../utils/formatting.js";import{jsxs as g,jsx as y,Fragment as v}from"react/jsx-runtime";var N="/static/media/6684df900ff63f28b07f9c505fb7a66e.svg",k=a({value:{fontSize:"14px",fontWeight:500},valueSuffix:{color:"#9E9E9E"},hasLeftMargin:{marginLeft:4},bhaRoot:{display:"flex",alignItems:"center"},bhaIdRoot:{backgroundColor:"#2196F3",borderRadius:"50%",marginRight:"8px",display:"flex",alignItems:"center",justifyContent:"center"},realBhaRoot:{width:"16px",height:"16px"},bhaIdLabel:{fontWeight:500,fontSize:"12px"},dummyBhaIdLabel:{paddingLeft:"4px",paddingRight:"4px"},bhaActiveIndicator:{fontSize:"12px",padding:"4px",fontWeight:500},nptRoot:{display:"flex",alignItems:"center"},rectIndicator:{width:"8px",height:"8px",backgroundColor:"#D32F2F",borderRadius:"2px",marginRight:"8px"},stageActual:{fontSize:"16px"},stagePercent:{color:"#9E9E9E",marginLeft:"4px"},fluidProppantType:{color:"#9E9E9E"},valueWrapper:{display:"flex",alignItems:"center"},rightImg:{marginRight:"4px"},centerImg:{marginLeft:"4px",marginRight:"4px"},rotate:{transform:"rotate(180deg)"},profileRoot:{display:"flex",alignItems:"flex-start"},profile:{width:"20px",height:"20px",borderRadius:"50%",fontSize:"10px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"8px",backgroundSize:"20px 20px",backgroundRepeat:"no-repeat",backgroundPosition:"center"},plugsIcon:{marginLeft:-8}});function b(t){var a=t.item,b=t.summaryData,I=k();if(!b)return null;if(a.key===l.HOLE_DEPTH.key){var T=a.dataGetter(b).holeDepth;return Number.isFinite(T)?g("div",{className:I.valueWrapper,children:[y("img",{src:N,alt:"hole_depth",className:I.centerImg}),g("span",{className:s(I.value,I.hasLeftMargin),children:[Math.floor(T),"’"]})]}):"-"}if(a.key===l.BIT_HOLE_DEPTH.key){var A=a.dataGetter(b),x=A.bitDepth,R=A.holeDepth;return[x,R].every(Number.isFinite)?g("div",{className:I.valueWrapper,children:[y("img",{src:"/static/media/fa2667bad3591deb178e99b521571578.svg",alt:"bit_depth",className:I.rightImg}),g("span",{className:I.value,children:[Math.floor(x),"’ / "]}),y("img",{src:N,alt:"hole_depth",className:I.centerImg}),g("span",{className:I.value,children:[Math.floor(R),"’"]})]}):"-"}if(a.key===l.DIVERGENCE.key){var E=a.dataGetter(b),D=E.distance,S=E.ahead,j=E.right;return[D,S,j].every(Number.isFinite)?g("div",{className:I.valueWrapper,children:[y("span",{className:I.value,children:"".concat(p(D,"length","ft")," ").concat(u("length"))}),y("img",{src:"/static/media/53cecdbd86f03352bda956fca25b537d.svg",alt:"up_arrow",className:s(I.centerImg,e({},I.rotate,S<0))}),y("span",{className:I.value,children:"".concat(Math.abs(p(S,"length","ft"))," ").concat(u("length")," ").concat(S>0?"Ahead":"Behind")}),y("img",{src:"/static/media/d32edb0ff9a69145d2c7917855263251.svg",alt:"left_arrow",className:s(I.centerImg,e({},I.rotate,j>0))}),y("span",{className:I.value,children:"".concat(Math.abs(p(j,"length","ft"))," ").concat(u("length")," ").concat(j>0?"Right":"Left")})]}):"-"}if(a.key===l.LAST_ACTIVE.key||a.key===c.LAST_ACTIVE.key){var G=a.dataGetter(b).timestamp;return y(r,{className:I.value,children:G?n.unix(G).format("MM/DD/YYYY HH:mm"):"-"})}if(a.key===l.CURRENT_ACTIVITY.key||a.key===c.CURRENT_ACTIVITY.key){var L=a.dataGetter(b).activityName;return y(r,{className:I.value,children:f(i(L||"-"))})}if(a.key===l.PHASE.key){var H=a.dataGetter(b).phaseName;return y(r,{className:I.value,children:f(H)})}if(a.key===l.HOLE_SECTION.key){var C=a.dataGetter(b).sectionName;return y(r,{className:I.value,children:f(C)})}if([l.MUD.key,o.MUD.key].includes(a.key)){var _=a.dataGetter(b),B=_.mudType,M=_.mudDensity;return y(r,{className:I.value,children:B||M?g(v,{children:[B&&"".concat(B,", "),M&&"".concat(p(M,"density","ppg")," ").concat(u("density"))]}):"-"})}if(a.key===l.NPT.key||a.key===c.NPT.key){var P=a.dataGetter(b),O=P.nptType,Y=P.startTime,F=P.endTime;return O&&Y&&F?g("div",{className:I.nptRoot,children:[y("div",{className:I.rectIndicator}),g(r,{className:I.value,children:[i(O),": ",((F-Y)/3600).fixFloat(1)," hr"]})]}):"-"}if(a.key===l.OPERATIONS_SUMMARY.key||a.key===c.OPERATIONS_SUMMARY.key){var U=a.dataGetter(b),W=U.dateTime,w=U.summary;return g(r,{className:I.value,children:[W?n.unix(W).format("MM/DD/YYYY HH:mm"):"-",y("br",{}),w]})}if(a.key===c.STAGE.key){var V=a.dataGetter(b),z=V.planned,q=V.actual;return q&&z?g(r,{className:I.value,children:[y("span",{className:I.stageActual,children:q}),y("span",{children:"/"}),y("span",{children:z}),g("span",{className:I.stagePercent,children:["Stg ",Math.floor(q/z*100)," %"]})]}):"-"}if(a.key===c.FLUIDS.key){var J=a.dataGetter(b).fluids;return y("div",{children:0===J.length?"-":J.map((function(e){var t=e.type,a=e.amount,i=e.unit;return g(r,{className:I.value,children:[g("span",{className:I.fluidProppantType,children:[t," - "]}),y("span",{children:"".concat(p(a,"oil",i)," ").concat(u("oil"))})]},"".concat(t,"_").concat(a))}))})}if(a.key===c.PROPPANTS.key){var K=a.dataGetter(b).proppants;return y("div",{children:0===K.length?"-":K.map((function(e){var t=e.type,a=e.amount,i=e.unit;return g(r,{className:I.value,children:[g("span",{className:I.fluidProppantType,children:[t," - "]}),y("span",{children:"".concat(p(a,"mass",i)," ").concat(u("mass"))})]},"".concat(t,"_").concat(a))}))})}if(a.key===l.ALERT.key||a.key===c.ALERT.key){var Q=a.dataGetter(b).decisionPath;return y(r,{className:I.value,children:f(Q)})}if(a.key===l.ANNOTATION.key||a.key===c.ANNOTATION.key){var X=a.dataGetter(b),Z=X.firstName,$=X.lastName,ee=X.profilePhoto,te=X.content,ae="".concat(Z," ").concat($),re="".concat((Z||"").charAt(0)).concat(($||"").charAt(0));return te?g("div",{className:I.profileRoot,children:[y("div",{className:I.profile,style:{backgroundColor:"#".concat(h.getColorFromString(ae)),backgroundImage:"url(".concat(ee,")")},children:ee?null:re}),y(r,{className:I.value,children:te})]}):"-"}if([l.BHA.key,o.BHA.key].includes(a.key)){var ie=o.BHA.key===a.key,ne=a.dataGetter(b),se=ne.bhaId,le=ne.components,ce=se&&String(se)||"-",oe=se&&d(le||[],ie)||[];return g("div",{className:I.bhaRoot,children:[y("div",{className:s(I.bhaIdRoot,e({},I.realBhaRoot,!ce.includes("."))),children:y(r,{className:s(I.bhaIdLabel,e({},I.dummyBhaIdLabel,ce.includes("."))),children:ce})}),y(m,{schematic:oe,containerHeight:20,containerWidth:120})]})}if(a.key===l.CASING.key){var me=a.dataGetter(b).outerDiameter;return me?y(r,{className:I.value,children:"".concat(p(me,"shortLength","in")," ").concat(u("shortLength"))}):null}if(a.key===l.BHA_COUNT.key){var de=a.dataGetter(b).count;return y(r,{className:I.value,children:f(de)})}if(a.key===c.STAGES_DESIGN.key){var pe=a.dataGetter(b).totalNumberOfStages;return Number.isFinite(pe)?g(r,{className:I.value,children:["-/",pe," ",y("span",{className:I.valueSuffix,children:"Stg"})]}):"-"}if(a.key===c.PLUGS_DRILLED_COUNT.key){var ue=a.dataGetter(b).plugsDrilledCount;return Number.isFinite(ue)?g("div",{className:I.valueWrapper,children:[y("img",{src:"/static/media/b0c8b3ba66c35ef3128cc93c5c538060.svg",alt:"drillout",className:I.plugsIcon}),y("span",{className:s(I.value,I.hasLeftMargin),children:ue})]}):"-"}if("development"===process.env.NODE_ENV)throw new Error("".concat(a.key," wasn't handled in WellSummaryItemValue. Returning null"));return null}b.propTypes={item:t.shape({key:t.string,label:t.string,icon:t.node,dataGetter:t.func}).isRequired,summaryData:t.shape({}).isRequired};export{b as default};
|
package/constants/feed.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import o from"../config/theme/palette.mjs.js";function l(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,l)}return o}function n(t){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?l(Object(n),!0).forEach((function(o){e(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var r="feed",a="ADD_NEW_FEED_ITEMS",
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import o from"../config/theme/palette.mjs.js";function l(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,l)}return o}function n(t){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?l(Object(n),!0).forEach((function(o){e(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var r="feed",a="ADD_NEW_FEED_ITEMS",s="DELETE_NEW_FEED_ITEM",i="CLEAR_NEW_FEED_ITEMS",p="ADD_FEED_ITEM_TO_UPDATE_LIST",m="DELETE_FEED_ITEM_FROM_UPDATE_LIST",c="ADD_FEED_ITEM_TO_DELETE_LIST",g="DELETE_FEED_ITEM_FROM_DELETE_LIST",y={SUBSCRIPTIONS:[{collection:"feed"}]},_={TRACES_MEMO:"traces_memo",POST:"post",DEPTH_COMMENTS:"depth_comments"},b=[{label:"Post",category:"post",type:_.POST,segment:["drilling","completion"]},{label:"Alert",category:"post",type:"alert",segment:["drilling","completion"]},{label:"Operational Note",category:"post",type:"operational_note",segment:["drilling"]},{label:"Operation Summary",category:"post",type:"operation_summary",segment:["drilling"]},{label:"Daily Cost",category:"post",type:"daily_cost",segment:["drilling"]},{label:"Document",category:"post",type:"document",segment:["drilling"]},{label:"Fluid Report",category:"post",type:"fluid_report",segment:["drilling"]},{label:"BHA",category:"post",type:"bha",segment:["drilling"]},{label:"Survey Station",category:"post",type:"survey_station",segment:["drilling"]}].concat(t("production"!==process.env.REACT_APP_ENVIRONMENT?[{label:"Well Plan",category:"post",type:"well_plan",segment:["drilling"]}]:[]),[{label:"Driller Memo",category:"post",type:"driller_memo",segment:["drilling"]},{label:"NPT",category:"post",type:"npt_event",segment:["drilling"]},{label:"Lessons Learned",category:"post",type:"lessons_learned",segment:["drilling"]},{label:"Operational Note",category:"post",type:"completion_operational_note",segment:["completion"]},{label:"Operation Summary",category:"post",type:"completion_operation_summary",segment:["completion"]},{label:"Daily Cost",category:"post",type:"completion_daily_cost",segment:["completion"]},{label:"Document",category:"post",type:"completion_document",segment:["completion"]},{label:"Stage Overview",category:"post",type:"completion_actual_stage",segment:["completion"]},{label:"NPT",category:"post",type:"completion_npt_event",segment:["completion"]},{label:"App Annotation",category:"post",type:"app_annotation",segment:["drilling","completion"]},{label:"Traces Memo",category:"post",type:_.TRACES_MEMO,segment:["drilling","completion"]},{label:"Geosteering Recommendations",category:"post",type:"geosteering_comments",segment:["drilling","completion"]},{label:"Depth Comments",category:"comment",type:_.DEPTH_COMMENTS,segment:["drilling","completion"]},{label:"Hookload Point Annotations",category:"comment",type:"hookload_broomstick_comment",showCreatorToLabel:!0,segment:["drilling"]},{label:"DvD Comment",category:"comment",type:"dvd_comment",showCreatorToLabel:!0,segment:["drilling"]},{label:"Parameter Comparison",category:"comment",type:"pc_comment",showCreatorToLabel:!0,segment:["drilling","completion"]},{label:"Drilling Dysfunction",category:"post",type:"drilling_dysfunction_event",showCreatorToLabel:!0,segment:["drilling"]},{label:"Npt Lessons Comment",category:"comment",type:"npt_lessons_comment",showCreatorToLabel:!0,segment:["drilling"]}]),E=b.reduce((function(t,o){return n(n({},t),{},e({},o.type,o))}),{}),u={RIG_FILTERS:[{label:"All",value:"all"},{label:"Filter by asset",value:"filterByAsset"}],DATE_RANGE_FILTERS:[{label:"Last 24 hours",value:"last24hours"},{label:"Last 7 days",value:"last7days"},{label:"Custom",value:"custom"}],CONTENT_TYPE_FILTERS:b.map((function(e){return{label:e.label,value:e.type,segment:e.segment}})),USER_FILTERS:[{label:"All",value:"all"},{label:"Filter by user",value:"filterByUser"}]},d=b.reduce((function(e,o){var l=o.type;return[].concat(t(e),[l])}),[]),T=!0,D={suggestions:{list:{background:o.background.b9},item:{color:"white",height:30,"&focused":{backgroundColor:"rgba(255, 255, 255, 0.08)"}}}};export{c as ADD_FEED_ITEM_TO_DELETE_LIST,p as ADD_FEED_ITEM_TO_UPDATE_LIST,a as ADD_NEW_FEED_ITEMS,i as CLEAR_NEW_FEED_ITEMS,d as DEFAULT_CONTENT_TYPES_FILTER,g as DELETE_FEED_ITEM_FROM_DELETE_LIST,m as DELETE_FEED_ITEM_FROM_UPDATE_LIST,s as DELETE_NEW_FEED_ITEM,y as FEED,b as FEED_ITEM_CONFIGS,_ as FEED_ITEM_TYPES,E as FEED_ITEM_TYPES_BY_KEY,T as IS_FEED_SHOWN,D as MENTION_STYLE,r as NAME,u as SIDEBAR_FILTERS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDelayedDcFullscreenElemOpen.d.ts","sourceRoot":"","sources":["../../src/effects/useDelayedDcFullscreenElemOpen.tsx"],"names":[],"mappings":"AAIA,UAAU,KAAK;IACb,MAAM,EAAE,OAAO,CAAC;CACjB;AASD,wBAAgB,8BAA8B,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK;;
|
|
1
|
+
{"version":3,"file":"useDelayedDcFullscreenElemOpen.d.ts","sourceRoot":"","sources":["../../src/effects/useDelayedDcFullscreenElemOpen.tsx"],"names":[],"mappings":"AAIA,UAAU,KAAK;IACb,MAAM,EAAE,OAAO,CAAC;CACjB;AASD,wBAAgB,8BAA8B,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK;;EAuB/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useState as e,useEffect as n}from"react";import"../components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"react/jsx-runtime";import"../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js";import"../components/DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import{useDcFullscreenElemsCoordinator as t}from"../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../components/DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import{v4 as o}from"uuid";function r(r){var p=r.isOpen,s=e(
|
|
1
|
+
import{useState as e,useEffect as n}from"react";import"../components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"react/jsx-runtime";import"../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js";import"../components/DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import{useDcFullscreenElemsCoordinator as t}from"../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../components/DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import{v4 as o}from"uuid";function r(r){var p=r.isOpen,s=e(!1),i=s[0],c=s[1],m=t(),C=m.requestOpen,D=m.requestClose,v=e((function(){return o()}))[0];return n((function(){p?C({setIsOpened:c,id:v}):D({setIsOpened:c,id:v})}),[p]),n((function(){return function(){D({setIsOpened:c,id:v},!0)}}),[]),{delayedIsOpen:i}}export{r as useDelayedDcFullscreenElemOpen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWellnessAlerts.d.ts","sourceRoot":"","sources":["../../src/effects/useWellnessAlerts.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,iBAAiB;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useWellnessAlerts.d.ts","sourceRoot":"","sources":["../../src/effects/useWellnessAlerts.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,iBAAiB;;;;;;;;CAuG7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as n}from'./../ext-esm/tslib/tslib.es6.js';import{useState as r,useEffect as
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as n}from'./../ext-esm/tslib/tslib.es6.js';import{useState as r,useEffect as s}from"react";import{v4 as i}from"uuid";import o from"../utils/resolveWellHubSlug.js";import{isDevOrQAEnv as u}from"../utils/env.js";import{getWellnessAlerts as a,getWellnessRuleSettings as l,getWCURuleMapping as d}from"../components/StatusBadge/api.js";import{getNewWellnessAlerts as m,getLinkToDQPage as c,parseWellnessAlertFromJson as f}from"../components/StatusBadge/utils.js";import{ALERT_STATUSES as v,BADGE_ICON_STATUSES as p}from"../components/StatusBadge/constants.js";var g=function(g){var h=g.asset,y=g.multiRigAssets,b=void 0===y?[]:y,j=g.appId,S=g.dashboards,B=r({}),D=B[0],I=B[1],R=r(""),k=R[0],w=R[1];return s((function(){var r=[];u?r.push(174,190,23120):r.push(42,1022);var s={id:null==h?void 0:h.id,name:null==h?void 0:h.name},g=s.id?[s]:b;try{g.length&&r.includes(j)?function(r){t(void 0,void 0,void 0,(function(){var t,s,u,g,h,y,b,B,D,R,k,A;return e(this,(function(e){switch(e.label){case 0:return[4,d(j)];case 1:return t=e.sent(),[4,l(null===(R=t[0])||void 0===R?void 0:R.rule_id)];case 2:return(s=e.sent()).length?[4,o(S)]:[2];case 3:return u=e.sent(),g=r.map((function(t){return t.id})),[4,Promise.all(s.map((function(t){var e=t.data.name;return a(g,e)}))).then((function(t){return t.map((function(t){return t.map((function(t){return f(t)}))}))}))];case 4:return h=e.sent(),y=m(r,h,u),b=r.reduce((function(t,e){var r,o=e.id;return n(n({},t),((r={})[e.name]=s.map((function(n){var r;return(null===(r=t[e.name])||void 0===r?void 0:r.find((function(t){return t.name===n.data.name})))||{alert:{assetId:o,category:n.data.category,status:v.RESOLVED,emptyMessage:"Data quality check passed"},id:i(),isResolved:!0,name:n.data.name,linkToDQPage:c({assetId:o,wellHubSlug:u})}})),r))}),n({},y)),B=Object.keys(b),D="",B.filter((function(t){return b[t].every((function(t){return t.isResolved}))})).length===B.length&&(D=p.success),B.filter((function(t){return b[t].some((function(t){return t.missingNum}))})).length&&(D=p.error),B.filter((function(t){return b[t].some((function(t){return t.issuesNum}))})).length&&(D=p.issue),w(D),I({alertsData:b,lastTimestamp:null===(A=null===(k=b[B[0]][0])||void 0===k?void 0:k.alert)||void 0===A?void 0:A.statusUpdatedAt}),[2]}}))}))}(g):(I({}),w(""))}catch(t){console.error(t)}}),[null==h?void 0:h.id,b.length]),{wellnessAlerts:D,statusBadgeIconType:k}};export{g as useWellnessAlerts};
|