@corva/ui 0.46.0-1 → 0.46.0-11
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/components/DevCenter/AppHeader/AppHeader.js +1 -1
- package/components/DevCenter/AppHeader/AppHeaderStyles.js +1 -1
- package/components/DevCenter/AppsDataProvider/effects/dataResolvers.js +1 -1
- package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
- package/components/EmptyView/EmptyAppView/EmptyAppView.js +1 -1
- package/components/OffsetWellButton/OffsetWellButton.js +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.module.css.js +1 -1
- package/components/OffsetWellPickerV4/components/AppHeader/AppHeader.js +1 -0
- package/components/OffsetWellPickerV4/components/AppHeader/AppHeader.module.css.js +1 -0
- package/components/OffsetWellPickerV4/components/Map/MapView.js +1 -1
- package/components/OffsetWellPickerV4/components/Map/MapView.module.css.js +1 -1
- package/components/OffsetWellPickerV4/components/Map/WellTooltip.js +1 -1
- package/components/OffsetWellPickerV4/components/Map/WellTooltip.module.css.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AssetResultSection.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/components/OffsetWellPickerV4/constants.js +1 -1
- package/components/OffsetWellPickerV4/effects/useBicWells.js +1 -1
- package/components/OffsetWellPickerV4/utils/apiCalls.js +1 -1
- package/config/theme/tableOverrides.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useRef as n,useState as a,useEffect as r}from"react";import{get as i}from"lodash";import o from"prop-types";import s from"classnames";import{Tooltip as l}from"@material-ui/core";import"../../Annotations/components/AnnotationsList/index.js";import p from"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import{SEGMENTS as d}from"../../../constants/segment.js";import{DEV_CENTER_CLI_APP_ID as c}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import{getAppName as m,getAppSegment as u}from"../../../utils/devcenter.js";import f from"./VersionBadge.js";import h from"./PadMode.js";import{getAppDimension as
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useRef as n,useState as a,useEffect as r}from"react";import{get as i}from"lodash";import o from"prop-types";import s from"classnames";import{Tooltip as l}from"@material-ui/core";import"../../Annotations/components/AnnotationsList/index.js";import p from"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import{SEGMENTS as d}from"../../../constants/segment.js";import{DEV_CENTER_CLI_APP_ID as c}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import{getAppName as m,getAppSegment as u}from"../../../utils/devcenter.js";import f from"./VersionBadge.js";import h from"./PadMode.js";import{getAppDimension as g}from"./utils.js";import b from"../../AssetNameLabel/SecondaryAssetNameLabel.js";import v from"../../AssetNameLabel/PrimaryAssetNameLabel.js";import A from"./AppHeader.css.js";import{useStyles as j}from"./AppHeaderStyles.js";import{jsxs as L,Fragment as y,jsx as O}from"react/jsx-runtime";function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function N(t){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?w(Object(a),!0).forEach((function(n){e(t,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):w(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var S="DevCenter_AppHeader",P="SMALL",_=function(e){return"/assets/".concat(null==e?void 0:e.asset_id)};function x(e){var o,w,x,C,M=e.app,W=e.appLastAnnotation,D=e.appSettings,I=e.badge,H=e.classes,z=e.coordinates,R=e.currentUser,T=e.fracFleet,k=e.isMaximized,q=e.onSettingChange,F=e.openAnnotationsList,E=e.rig,U=e.showLastAnnotation,B=e.updateCurrentDashboardAppLastAnnotation,G=e.well,V=e.wells,J=e.children,K=e.logoSrc,Q=j(),X=null==z?void 0:z.pixelWidth,Y=g(X),Z=m(M),$=null==M||null===(o=M.package)||void 0===o||null===(w=o.manifest)||void 0===w||null===(x=w.application)||void 0===x?void 0:x.subtitle,ee=u(M),te=ee===d.DRILLING,ne=(null==M?void 0:M.settings)||{},ae=ne.wellId,re=ne.rigId,ie=ne.fracFleetId,oe=ne.padId,se=oe&&(null==T||null===(C=T.pad_frac_fleets.find((function(e){return e.pad.id===oe})))||void 0===C?void 0:C.pad),le=te?null==E?void 0:E.name:null==T?void 0:T.name,pe=te?ae&&(null==G?void 0:G.name):oe&&(null==se?void 0:se.name),de=!!(ae||re||ie),ce=null!=T&&T.current_pad_id?"/assets/types/pad/".concat(null==T?void 0:T.current_pad_id):null,me=te?le&&_(G):ce,ue=te?_(G):oe&&"/assets/types/pad/".concat(oe),fe=M&&M.id===c,he={fracFleet:T,wells:V,well:G,onSettingChange:q,appSettings:D},ge=n(null),be=a({width:0}),ve=t(be,2),Ae=ve[0],je=ve[1],Le=a({width:0}),ye=t(Le,2),Oe=ye[0],we=ye[1],Ne=a(!1),Se=t(Ne,2),Pe=Se[0],_e=Se[1];return r((function(){var e,t;_e(Math.abs((null===(e=ge.current)||void 0===e?void 0:e.offsetWidth)-(null===(t=ge.current)||void 0===t?void 0:t.scrollWidth))>1)}),[null==Ae?void 0:Ae.width,null==Oe?void 0:Oe.width,X]),L(y,{children:[L("div",{className:s(Q.appHeaderContainer,H.appHeader),children:[L("div",{className:Q.titleBlock,children:[L("div",{className:H.appHeaderTitleWrapper,ref:ge,children:[L("div",{className:Q.titleWrapper,children:[K&&L(y,{children:[O("img",{className:Q.logo,src:K,alt:"company logo"}),O("div",{className:Q.separateLine})]}),O(l,{title:Pe?Z:"",placement:"bottom",children:O("h6",{"data-testid":"".concat(S,"_name"),className:Q.title,children:Z})}),O(f,{app:M})]}),I]}),$&&O("h6",{"data-testid":"".concat(S,"_subtitle"),className:Q.subtitle,children:$})]}),M&&z&&L("div",{className:s(A.controlsContainer,k&&A.appMaximized),children:[ee===d.COMPLETION&&Y!==P&&O(h,N({},he)),J,pe&&O(b,{secondaryAssetName:pe,coordinatesPixelWidth:z.pixelWidth,secondaryAssetLink:!fe&&ue,pageName:S,onSize:function(e){return we(e)}}),de&&O(v,{primaryAssetName:le,pageName:S,coordinatesPixelWidth:z.pixelWidth,primaryAssetLink:!fe&&(me||"/feed"),onSize:function(e){return je(e)}})]}),U&&W&&O(p,{dashboardAppId:M.id,appId:i(M,["app","id"]),annotation:W,openAnnotationsList:F,updateCurrentDashboardAppLastAnnotation:B,currentUser:R})]}),ee===d.COMPLETION&&Y===P&&O("div",{className:s(A.padModeSelect,A.smallPadModeSelect),children:O(h,N({},he))})]})}x.propTypes={app:o.object.isRequired,badge:o.node,classes:o.shape({appHeader:o.string,appHeaderTitleWrapper:o.string,appHeaderChildren:o.string}),showLastAnnotation:o.bool,currentUser:o.shape({}),appLastAnnotation:o.shape({}),updateCurrentDashboardAppLastAnnotation:o.func,openAnnotationsList:o.func,rig:o.shape({name:o.string,asset_id:o.number}),well:o.shape({name:o.string,asset_id:o.number}),fracFleet:o.shape({name:o.string,current_pad_id:o.number,pad_frac_fleets:o.arrayOf(o.shape({pad:o.shape({id:o.number.isRequired}).isRequired})).isRequired}),wells:o.arrayOf(o.shape({})),coordinates:o.shape({pixelWidth:o.number.isRequired}),isMaximized:o.bool,appSettings:o.shape({}),onSettingChange:o.func,children:o.arrayOf(o.node),logoSrc:o.string},x.defaultProps={appLastAnnotation:null,appSettings:null,badge:null,classes:{},coordinates:void 0,currentUser:void 0,fracFleet:null,isMaximized:!1,onSettingChange:void 0,openAnnotationsList:void 0,rig:null,showLastAnnotation:!0,updateCurrentDashboardAppLastAnnotation:function(){},well:null,wells:null,children:null,logoSrc:null};export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as e}from"@material-ui/core";var i=e({appHeaderContainer:{display:"flex"},titleBlock:{display:"inline",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",paddingRight:8},titleWrapper:{display:"flex",alignItems:"center"},title:{margin:"0 8px 0 1px",fontSize:"18px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:"24px",zIndex:1e3,fontWeight:"bold"},subtitle:{color:"#888",margin:"0 0 0 1px",fontSize:"12px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400,lineHeight:"16px"}});export{i as useStyles};
|
|
1
|
+
import{makeStyles as e}from"@material-ui/core";var i=e((function(e){return{appHeaderContainer:{display:"flex"},titleBlock:{display:"inline",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",paddingRight:8},titleWrapper:{display:"flex",alignItems:"center"},logo:{maxWidth:"130px",maxHeight:"40px"},separateLine:{width:"1px",height:"16px",backgroundColor:e.palette.primary.text9,borderRadius:"1px",margin:"auto 12px"},title:{margin:"0 8px 0 1px",fontSize:"18px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:"24px",zIndex:1e3,fontWeight:"bold"},subtitle:{color:"#888",margin:"0 0 0 1px",fontSize:"12px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400,lineHeight:"16px"}}}));export{i as useStyles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/toConsumableArray";import a from"@babel/runtime/regenerator";import{keyBy as i,get as u,merge as s}from"lodash";import{ASSET_TYPES as c}from"../../../../constants/assetTypes.js";import{getAppsDataByWells as o,getAppsDataByRigs as p,getAppsDataByFFs as
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/toConsumableArray";import a from"@babel/runtime/regenerator";import{keyBy as i,get as u,merge as s}from"lodash";import{ASSET_TYPES as c}from"../../../../constants/assetTypes.js";import{getAppsDataByWells as o,getAppsDataByRigs as p,getAppsDataByFFs as l,getAppsDataByPads as d,prepareDataForResolver as f,fetchWells as b,fetchRigs as m,fetchFracFleets as y,fetchFracFleetWells as h,fetchPadWells as v,isAppWithSettings as w,getAppAssetSpecificTypeId as g,fetchAssetEntitiesByAssetIds as O}from"./utils.js";function j(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var P=function(e,r){var t=e.reduce((function(e,t){if(w(t))return e;var n=g(t,"deprecatedAssetId");return e.add(n||r),e}),new Set);return n(t)};function x(e,r){return k.apply(this,arguments)}function k(){return(k=t(a.mark((function e(t,n){var i,u,s,o,p,l,d;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.current.deprecatedAssetData,u=Object.keys(i),(s=t.filter((function(e){return!u.includes(String(e))}))).length){e.next=5;break}return e.abrupt("return",i);case 5:return e.next=7,O(s);case 7:if(o=e.sent){e.next=10;break}return e.abrupt("return",i);case 10:return p={rig:c.rig.id,well:c.well.id},l=Object.values(o).flat().reduce((function(e,t){var n=t.data;return e[n.attributes.asset_id]=r({},p[n.type],n.id),e}),{}),d=I(I({},i),l),n.current.cachedDeprecatedAssetData=d,e.abrupt("return",d);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function D(e,r,t){return A.apply(this,arguments)}function A(){return(A=t(a.mark((function e(r,t,n){var i;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x(P(r,t),n);case 2:return i=e.sent,e.abrupt("return",r.map((function(e){if(w(e))return e;var r=g(e,"deprecatedAssetId");return I(I({},e),{},{settings:i[r||t]})})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(e,r,t,n){return F.apply(this,arguments)}function F(){return(F=t(a.mark((function r(t,n,c,w){var g,O,j,P,x,k,A,B,F,S,_,q,T,E,R,W,C,G,z,H,J,K,L;return a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,D(t,n,c);case 2:return g=r.sent,O=f(g,c),j=O.appsWellIds,P=O.appsRigIds,x=O.appsFracFleetIds,k=O.appsPadIds,A=O.uniqueWellIds,B=O.uniqueRigIds,F=O.uniqueFFIds,r.next=6,Promise.all([b(A),m(B),y(F),h(x,t),v(k,t)]);case 6:return S=r.sent,_=e(S,5),q=_[0],T=_[1],E=_[2],R=_[3],W=_[4],C=(null==q?void 0:q.data)&&i(q.data.map((function(e){var r=u(e,"relationships.rig.data.id"),t=q.included.find((function(e){return"rig"===e.type&&e.id===r}));return I(I({},e),{},{rig:t})})),"id"),G=(null==T?void 0:T.data)&&i(T.data.map((function(e){var r=u(e,"relationships.active_well.data.id")||u(e,"relationships.last_active_well.data.id"),t=T.included.find((function(e){return"well"===e.type&&e.id===r}));return I(I({},e),{},{well:t})})),"id"),z=E&&i(E,"id"),w({wellsById:C||{},rigsById:G||{},fracFleetsById:z||{}}),H=o(j,c.current.wellsById),J=p(P,c.current.rigsById),K=l(x,c.current.fracFleetsById,R),L=d(k,W),r.abrupt("return",s(H,J,K,L));case 22:case"end":return r.stop()}}),r)})))).apply(this,arguments)}export{x as getAppSettingsByDeprecatedAssetId,D as getAppsWithUnifiedSettings,P as getDeprecatedAssetIds,B as resolveAppsData};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import a from"jsona";import{get as u,isEmpty as i,keyBy as s,uniq as c}from"lodash";import{getWells as
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import a from"jsona";import{get as u,isEmpty as i,keyBy as s,uniq as c}from"lodash";import{getWells as l,getRigs as o,getFracFleets as p,getFracFleetWells as f,getPadWells as d,getResolvedAssets as m}from"../../../../clients/jsonApi/index.js";import{DEV_CENTER_CLI_APP_ID as b}from"../../../../constants/devcenter.js";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{ASSET_TYPES as v}from"../../../../constants/assetTypes.js";function h(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var y=new a,g=function(r,e){return+u(r,["settings",e])},_=function(r,e){return c(r.map((function(r){var e=t(r,2);return e[0],e[1]})).filter((function(r){return Number.isFinite(r)&&!e.includes(String(r))})))};function j(r){return x.apply(this,arguments)}function x(){return(x=e(n.mark((function r(e){return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,l({ids:e,fields:["well.name","well.settings","well.company","well.asset_id","well.last_active_at","well.id","well.rig","rig.name","rig.asset_id","company.id"]});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}function k(r){return O.apply(this,arguments)}function O(){return(O=e(n.mark((function r(e){return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,o({ids:e,fields:["rig.name","rig.settings","rig.asset_id","rig.active_well","rig.last_active_well","well.name","well.settings","well.company","well.asset_id","well.last_active_at","well.id","well.company.id"]});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}function I(r){return P.apply(this,arguments)}function P(){return(P=e(n.mark((function r(e){return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,m({assets:e});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}var F=function(r,e){return{well:r&&w(w({},r.attributes),{},{id:r.id,companyId:u(r,"relationships.company.data.id")}),rig:{name:u(e,"attributes.name"),id:u(e,"id"),asset_id:u(e,"attributes.asset_id")}}},B=function(r,e){return e&&!i(e)?r.reduce((function(r,n){var a=t(n,2),u=a[0],i=a[1],s=e[i];return r[u]=F(s,s.rig),r}),{}):{}},D=function(r,e){return e&&!i(e)?r.reduce((function(r,n){var a=t(n,2),u=a[0],i=a[1],s=e[i];return r[u]=F(s.well,s),r}),{}):{}},q=function(r,e,n){return e||n?r.reduce((function(r,a){var u=t(a,2),i=u[0],s=u[1],c=null==e?void 0:e[s],l=null==n?void 0:n[i];return r[i]={fracFleet:c,wells:l},r}),{}):{}},z=function(r,e){return r||e?r.reduce((function(r,n){var a=t(n,2),u=a[0];a[1];var i=null==e?void 0:e[u];return r[u]={wells:i},r}),{}):{}};function A(r){return E.apply(this,arguments)}function E(){return(E=e(n.mark((function r(e){var t;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,p({ids:e,fields:["frac_fleet.name","frac_fleet.pads","frac_fleet.current_pad_id","frac_fleet.pad_frac_fleets"]});case 5:return t=r.sent,r.abrupt("return",t?y.deserialize(t):[]);case 9:return r.prev=9,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",[]);case 13:case"end":return r.stop()}}),r,null,[[2,9]])})))).apply(this,arguments)}function S(r,e){return T.apply(this,arguments)}function T(){return T=e(n.mark((function r(a,i){var c,l,o;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=s(i,"id"),l=a.map(function(){var r=e(n.mark((function r(e){var a,i,s,l,o,p;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=t(e,2),i=a[0],s=a[1],l={fields:"all",frac_fleet_id:s},o=c[i],i===b?l.app_key=u(o,["app","app_key"]):l.app_id=u(o,["app","id"]),r.prev=4,r.next=7,f(l);case 7:return p=r.sent,r.abrupt("return",p?y.deserialize(p):[]);case 11:return r.prev=11,r.t0=r.catch(4),console.error(r.t0),r.abrupt("return",[]);case 15:case"end":return r.stop()}}),r,null,[[4,11]])})));return function(e){return r.apply(this,arguments)}}()),r.next=4,Promise.all(l);case 4:return o=r.sent,r.abrupt("return",o.reduce((function(r,e,t){return r[a[t][0]]=e,r}),{}));case 6:case"end":return r.stop()}}),r)}))),T.apply(this,arguments)}function R(r,e){return W.apply(this,arguments)}function W(){return W=e(n.mark((function r(a,i){var c,l,o;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=s(i,"id"),l=a.map(function(){var r=e(n.mark((function r(e){var a,i,s,l,o,p;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=t(e,2),i=a[0],s=a[1],l={fields:"all"},o=c[i],i===b?l.app_key=u(o,["app","app_key"]):l.app_id=u(o,["app","id"]),r.prev=4,r.next=7,d(s,l);case 7:return p=r.sent,r.abrupt("return",p?y.deserialize(p):[]);case 11:return r.prev=11,r.t0=r.catch(4),console.error(r.t0),r.abrupt("return",[]);case 15:case"end":return r.stop()}}),r,null,[[4,11]])})));return function(e){return r.apply(this,arguments)}}()),r.next=4,Promise.all(l);case 4:return o=r.sent,r.abrupt("return",o.reduce((function(r,e,t){return r[a[t][0]]=e,r}),{}));case 6:case"end":return r.stop()}}),r)}))),W.apply(this,arguments)}var G=function(r){return[r.id,g(r,v.well.id),g(r,v.rig.id),g(r,v.frac_fleet.id),g(r,v.pad.id),g(r,"deprecatedAssetId")].join("-")},H=function(r){return Boolean(g(r,v.well.id)||g(r,v.rig.id)||g(r,v.frac_fleet.id)||g(r,v.pad.id))},L=function(r){return{id:r.id,rig:null,well:null,fracFleet:null,wells:null,isLoading:!0,appHash:G(r)}},N=function(e){return e.reduce((function(e,t){return w(w({},e),{},r({},t.id,L(t)))}),{})},C=function(r,e){var t=[],n=[],a=[],u=[],i=[];r.forEach((function(r){var e=g(r,v.well.id),s=g(r,v.rig.id),c=g(r,v.frac_fleet.id),l=g(r,v.pad.id),o=r.id;i.push([o]),e?t.push([o,e]):s?n.push([o,s]):c&&(a.push([o,c]),l&&u.push([o,l]))}));var s=e.current,c=s.rigsById,l=s.wellsById,o=s.fracFleetsById,p=_(t,Object.keys(l)),f=_(n,Object.keys(c)),d=_(a,Object.keys(o));return{appsWellIds:t,appsRigIds:n,appsFracFleetIds:a,appsPadIds:u,appIds:i,uniqueWellIds:p,uniqueRigIds:f,uniqueFFIds:d}};export{I as fetchAssetEntitiesByAssetIds,S as fetchFracFleetWells,A as fetchFracFleets,R as fetchPadWells,k as fetchRigs,j as fetchWells,g as getAppAssetSpecificTypeId,G as getAppHash,q as getAppsDataByFFs,z as getAppsDataByPads,D as getAppsDataByRigs,B as getAppsDataByWells,L as getInitialAppData,N as getInitialAppsDataState,_ as getUniqAssetIds,H as isAppWithSettings,C as prepareDataForResolver};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{useState as a,useEffect as i,useRef as r}from"react";import o from"prop-types";import n from"classnames";import{makeStyles as p}from"@material-ui/core";import s from"../../DevCenter/AppHeader/AppHeader.js";import{jsxs as l,jsx as d,Fragment as c}from"react/jsx-runtime";var m,u={appNotSubscribed:{title:"No
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{useState as a,useEffect as i,useRef as r}from"react";import o from"prop-types";import n from"classnames";import{makeStyles as p}from"@material-ui/core";import s from"../../DevCenter/AppHeader/AppHeader.js";import{jsxs as l,jsx as d,Fragment as c}from"react/jsx-runtime";var m,u={appNotSubscribed:{title:"No Subscription",subtitle:"Contact Corva Account Representative to get access to the App"},assetNotSubscribed:{title:"Selected Asset is no longer subscribed to the app.",subtitle:"Сhange the asset in settings."},internalAppError:{title:"App Loading Error"},appPackageWasNotFound:{title:"App package was not found",subtitle:"Please choose another version in the app settings menu or delete and add app again on your dashboard"},fracFleetWasNotFound:{title:"Frac fleet was not found"},fracFleetHasNoPad:{title:"Frac fleet has no active pad"},padHasNoWells:{title:"This pad has no wells"}},f={empty:"empty",error:"error",noData:"noData",noSubscription:"noSubscription"},g=(t(m={},f.empty,"/static/media/e607e3aa0a4603bb7ae7f83a2148511e.svg"),t(m,f.error,"/static/media/9b185a425ea91b6c2beedfef39c06663.svg"),t(m,f.noData,"/static/media/1bfc6e5d9cbb531a554ab8d025fa23e9.svg"),t(m,f.noSubscription,"/static/media/76e3ee12638391cba164716321509ad7.svg"),m),b=p((function(e){var t=e.palette;return{wrapper:{display:"flex",flexDirection:"column",textAlign:"center",alignItems:"center",justifyContent:"center",height:"100%",padding:24,overflow:"auto"},title:{color:t.primary.text7,fontSize:32,lineHeight:"38px",marginBottom:8,"&.medium":{fontSize:24,lineHeight:"28px"},"&.small":{fontSize:24,lineHeight:"28px"},fontStyle:"italic"},subtitle:{color:t.primary.text6,fontSize:16,lineHeight:"22px",marginBottom:24,"&.medium":{fontSize:14,lineHeight:"20px"},"&.small":{fontSize:14,lineHeight:"20px"}},imageWrapper:{display:"flex",flexGrow:"1",maxWidth:390,maxHeight:300,width:"100%","&.medium":{maxidth:260,maxHeight:200}},backgroundImage:{width:"100%",backgroundImage:function(e){return"url(".concat([g[e.state]],")")},backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"},appHeader:{display:"flex",padding:"12px",flexWrap:"wrap",justifyContent:"space-between"},container:{height:"100%",flexDirection:"column",display:"flex"}}}));function h(t){var o=t.title,p=t.subtitle,m=t.state,u=t.withAppHeader,f=t.app,g=t.actions,h=b({state:m}),x=a(!1),v=e(x,2),y=v[0],H=v[1];i((function(){H(!0)}),[]);var S=r(null),A=S.current,w=(null==A?void 0:A.offsetHeight)<300,N=(null==A?void 0:A.offsetHeight)<400;return l("div",{className:h.container,children:[u&&d(s,{app:f,classes:{appHeader:h.appHeader}}),d("div",{className:h.wrapper,ref:S,children:y&&l(c,{children:[d("div",{"data-testid":"".concat("EmptyAppView","_title"),className:n(h.title,N&&"medium",w&&"small"),children:o}),g,p&&d("div",{"data-testid":"".concat("EmptyAppView","_subtitle"),className:n(h.subtitle,N&&"medium",w&&"small"),children:p}),!w&&d("div",{className:n(h.imageWrapper,N&&"medium"),children:d("div",{className:h.backgroundImage})})]})})]})}h.propTypes={actions:o.node,app:o.shape({}),state:o.string,subtitle:o.oneOfType([o.string,o.node]),title:o.string.isRequired,withAppHeader:o.bool},h.defaultProps={actions:null,app:void 0,state:f.empty,subtitle:"",withAppHeader:!1},h.APP_MESSAGES=u,h.EMPTY_STATES=f;export{u as APP_MESSAGES,f as EMPTY_STATES,h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import{useState as t}from"react";import r from"prop-types";import o from"classnames";import{makeStyles as i,Typography as n,Tooltip as s}from"@material-ui/core";import{Edit as p,
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import{useState as t}from"react";import r from"prop-types";import o from"classnames";import{makeStyles as i,Typography as n,Tooltip as s}from"@material-ui/core";import{Edit as p,ExpandLess as m,ExpandMore as a}from"@material-ui/icons";import"@babel/runtime/helpers/defineProperty";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as l,jsx as d}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../LoadingIndicator/LoadingIndicator.js";import"../../constants/segment.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"lodash";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.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/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import c from"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../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"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";var j=i((function(e){var t=e.palette;return{disabled:{opacity:.4,pointerEvents:"none"},offsetContainer:{cursor:"pointer",display:"flex",flexWrap:"nowrap",alignItems:"center",width:"fit-content"},hoveredContainer:{backgroundColor:"rgba(3, 188, 212, 0.16)"},offsetText:{color:t.primary.text6,fontSize:12,paddingRight:4,"&:hover":{color:t.primary.contrastText}},buttons:{display:"flex"},isActive:{color:t.primary.contrastText},primaryIcon:{"&:hover":{backgroundColor:"rgba(3, 188, 212, 0.16)"}}}})),C=function(r){var i=r.onClick,C=r.wells,u=r.disabled,A=r.expanded,v=r.onExpand,D=t(!1),b=e(D,2),f=b[0],x=b[1],g=j(),P=C.length,S=!(!P||!v),h=l("div",{className:o(g.offsetContainer,u&&g.disabled),onClick:i,onMouseMove:function(e){var t=e.target,r=t.parentNode;t.getAttribute("data-icon")||r.getAttribute("data-icon")?x(!1):x(!0)},onMouseLeave:function(){x(!1)},children:[l(n,{className:o(g.offsetText,f&&g.isActive),children:["Offset Wells (",P,")"]}),d(c,{className:o(g.primaryIcon,f&&g.hoveredContainer),color:"primary",size:"medium",children:d(p,{})})]});return l("div",{className:g.buttons,children:[d(s,{title:"Edit Offset Wells",placement:"bottom",children:h}),S&&d(c,{tooltipProps:{title:A?"Collapse Offset Wells":"Expand Offset Wells"},onClick:function(e){e.stopPropagation(),v()},color:"default",size:"medium","data-icon":"expandIcon",children:d(A?m:a,{"data-icon":"expandIcon"})})]})};C.propTypes={onClick:r.func.isRequired,wells:r.arrayOf(r.shape({id:r.number,title:r.string})),disabled:r.bool,onExpand:r.func,expanded:r.bool},C.defaultProps={onExpand:null,expanded:!1,wells:[],disabled:!1};export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as i,useMemo as o,useRef as n,useEffect as s,useCallback as l}from"react";import a from"prop-types";import{uniqBy as p,sortBy as m,isEmpty as c,isEqual as d}from"lodash";import{Typography as u}from"@material-ui/core";import{Sort as f,FilterList as j,Close as C}from"@material-ui/icons";import v from"../Modal/Modal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"classnames";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";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/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as b,jsxs as g}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import h from"../LoadingIndicator/LoadingIndicator.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import{Regular12 as A}from"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import D from"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import S from"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../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"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../Notifications/Notifications.js";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import{formatTimestamp as y}from"../../utils/time.js";import{useFetchWells as W}from"./effects/useFetchWells.js";import{useAdvancedWells as I}from"./effects/useAdvancedWells.js";import{useBicWells as P}from"./effects/useBicWells.js";import{useCompanyMetricKey as x}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as T}from"./effects/useFilterOptions.js";import{useFilteredWells as O}from"./effects/useFilteredWells.js";import{useSortedWells as E}from"./effects/useSortedWells.js";import{useRadiusWells as w}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as B}from"./effects/useTableColumns.js";import{Filter as L}from"./components/Filter/Filter.js";import{WellsMap as k}from"./components/Map/WellsMap.js";import V from"./components/OffsetWellsTable/OffsetWellsTable.js";import F from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as H,ColumnType as N,FilterType as M,ROWS_PER_PAGE as R}from"./constants.js";import{SEARCH_CATEGORIES as U}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function z(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?_(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var K="OffsetWellPickerV4",q=function(a){var _,q=a.open,G=a.isWDUser,Y=a.defaultSubjectWell,J=a.currentUser,Q=a.offsetSettings,X=a.addWellsUsabilityInfo,Z=a.isViewOnly,$=a.onClose,ee=a.onSave,te=a.maxOffsetSize,re=i(null),ie=r(re,2),oe=ie[0],ne=ie[1],se=o((function(){return te+1}),[te]),le=i(null==Q?void 0:Q.filterExpanded),ae=r(le,2),pe=ae[0],me=ae[1],ce=i(null==Q?void 0:Q.mapHidden),de=r(ce,2),ue=de[0],fe=de[1],je=+(null==Y?void 0:Y.companyId)||+(null==J?void 0:J.company_id),Ce=null==Y?void 0:Y.asset_id,ve=i((null==Q?void 0:Q.filters)||{}),be=r(ve,2),ge=be[0],he=be[1],Ae=i((null==Q?void 0:Q.wellSection)||H),De=r(Ae,2),Se=De[0],ye=De[1],We=n(!0),Ie=i([]),Pe=r(Ie,2),xe=Pe[0],Te=Pe[1],Oe=i(null),Ee=r(Oe,2),we=Ee[0],Be=Ee[1],Le=i(!0),ke=r(Le,2),Ve=ke[0],Fe=ke[1],He=i(!1),Ne=r(He,2),Me=Ne[0],Re=Ne[1],Ue=i(!1),_e=r(Ue,2),ze=_e[0],Ke=_e[1],qe=i(!1),Ge=r(qe,2),Ye=Ge[0],Je=Ge[1],Qe=n(),Xe=o((function(){return!ue&&pe?448:ue?pe?232:0:216}),[ue,pe]);s((function(){We.current=!0}),[Ce,null==Q?void 0:Q.selectedWellIds]),s((function(){me(!Z&&(null==Q?void 0:Q.filterExpanded)),fe(!Z&&(null==Q?void 0:Q.mapHidden)),he((null==Q?void 0:Q.filters)||{}),ye((null==Q?void 0:Q.wellSection)||H)}),[Q,Z]);var Ze=W(je,X),$e=P(G,Ce),et=r($e,3),tt=et[0],rt=et[1],it=et[2],ot=x(je,null==Q?void 0:Q.metricsKeys),nt=r(ot,2),st=nt[0],lt=nt[1],at=I(je,Ze,tt,rt,Ce,st),pt=T(at);s((function(){if(at&&tt){var e=at.find((function(e){return e.id===Ce}));if(e){var r=tt.filter((function(e){return e.value!==H})).map((function(e){return e.label})),i=z(z({},e),r.length>0&&t({},N.wellSection,r));Be(i)}else Be(null)}}),[tt,at]);var mt=B(st),ct=O(at,ge);s((function(){if(ct)if(We.current){var e=at.filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)}));we&&(e=e.concat(we)),Te(p(e,"id")),We.current=!1}else Te((function(e){var t=(ct||[]).filter((function(t){return!!e.find((function(e){var r=e.id;return t.id===r}))}));return we&&(t=t.concat(we)),p(t,"id")}))}),[at,ct,null==Q?void 0:Q.selectedWellIds]);var dt=E(we,ct,xe,Fe,We.current),ut=r(dt,5),ft=ut[0],jt=ut[1],Ct=ut[2],vt=ut[3],bt=ut[4];w(ge[M.radius],ct,Te,se);var gt=l((function(e,t,r){var i;i=r===U.well.name?t:t.reduce((function(e,t){var r,i=null===(r=at.find((function(e){return e.id===t})))||void 0===r?void 0:r.rigName,o=at.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(o)}),[]);var o=at.filter((function(e){var t=e.id;return i.includes(t)}));Te(e?function(e){return p(e.concat(o),"id")}:function(e){return p(e.filter((function(e){var t=e.id;return!o.find((function(e){return e.id===t}))})))})}),[at]),ht=l((function(){Ke(!0)}),[]),At=l((function(e){lt(e)}),[]),Dt=l((function(t,r){Te(r?function(r){return[].concat(e(r),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),St=l((function(e){if(e){var t=we?ct.concat(we):ct,r=p(t,"id");Te(r)}else Te(we?[we]:[])}),[ct,we]),yt=function(e){if(c(rt))Te(we?[we]:[]);else{var t=at.filter((function(t){return rt[e].includes(t.id)}));Te(t)}},Wt=l((function(e){ye(e),yt(e)}),[yt]),It=o((function(){return xe.find((function(e){return e.id===Ce}))?xe.length-1:xe.length}),[xe,Ce]),Pt=o((function(){if(!rt)return!1;var e=xe.map((function(e){return e.id})),t=rt[Se]||[];return(se&&t.length>se?se:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[rt,Y,xe,Se]),xt=function(){var e=(at||[]).filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)}));we&&(e=e.concat(we)),Te(p(e,"id")),d(ge,Q.filters)||(We.current=!0);var t=z(z({},Q),{},{mapHidden:ue,filterExpanded:pe});ee(t),he((null==Q?void 0:Q.filters)||{}),ye((null==Q?void 0:Q.wellSection)||H),$()};s((function(){if(!se||se>xe.length)Je(!1);else if(se<xe.length){var e=m(xe,"distance");Te(e.slice(0,se))}else se===xe.length&&Je(!0)}),[xe,se]);var Tt=!at||!tt||!bt,Ot=i(!1),Et=r(Ot,2),wt=Et[0],Bt=Et[1],Lt=i(!1),kt=r(Lt,2),Vt=kt[0],Ft=kt[1],Ht=i(R),Nt=r(Ht,2),Mt=Nt[0],Rt=Nt[1],Ut=i([]),_t=r(Ut,2),zt=_t[0],Kt=_t[1];s((function(){if(bt){var e=bt.slice(0,Mt);Kt(e)}}),[bt,Mt,we]);return b(v,{open:q,onClose:xt,title:"Select Offset Wells",contentContainerClassName:F.offsetWellDialog,contentClassName:F.contentContainer,actionsClassName:F.modalActions,actions:!Z&&g("div",{className:F.actionsWrapper,children:[b(A,{"data-testid":"".concat(K,"_lastUpdated"),className:F.watermark,children:"Last updated by ".concat((null==it||null===(_=it.changedBy)||void 0===_?void 0:_.name)||"Unknown"," in ").concat(G?"Offset Well Selection app":"Wellhub"," at ").concat(y(null==it?void 0:it.timestamp,"hh:mm MM/DD/YYYY"))}),g("div",{className:F.buttonGap,children:[b(S,{"data-testid":"".concat(K,"_cancel"),onClick:xt,color:"primary",children:"Cancel"}),g(S,{"data-testid":"".concat(K,"_select"),variant:"contained",color:"primary",onClick:function(){$();var e=z(z({},Q),{},{companyId:je,subjectWellId:Ce,selectedWellIds:xe.map((function(e){return e.id})),filters:ge,metricsKeys:st,wellSection:Se,isSynced:Pt,mapHidden:ue,filterExpanded:pe});ee(e,xe)},children:["Select (",It,")"]})]})]}),children:Tt?b(h,{fullscreen:!1}):g("div",{className:F.contentWrapper,ref:Qe,children:[g("div",{className:F.countContainer,children:[b(A,{className:F.totalLabel,children:"Total:"}),b(A,{"data-testid":"".concat(K,"_totalWells"),className:F.countValue,children:at.length}),b(A,{className:F.selectedLabel,children:"Selected:"}),b(A,{"data-testid":"".concat(K,"_selected"),className:F.countValue,children:It})]}),se&&se<=xe.length&&b(u,{"data-testid":"".concat(K,"_no more"),className:F.viewOnlyTitleLabel,children:"This app supports no more than (".concat(te,") offset wells at a time.")}),Z&&b(u,{"data-testid":"".concat(K,"_viewOnly"),className:F.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the Offset Well Selection app."}),g("div",{className:F.controlGroup,children:[g(S,{"data-testid":"".concat(K,"_filters"),startIcon:b(pe?f:j,{}),classes:{root:F.filterButton},onClick:function(){return me((function(e){return!e}))},disabled:Z,children:["Filters",!c(ge)&&g("div",{className:F.clearWrapper,onClick:function(e){e.stopPropagation(),he({})},children:[b(C,{className:F.clearIcon}),b("span",{className:F.clearLabel,children:"Clear"})]})]}),b(D,{"data-testid":"".concat(K,"_map"),rightLabel:"Map",color:"primary",checked:!ue,onChange:function(e){return fe(!e.target.checked)}})]}),g("div",{className:F.content,onScroll:function(e){e.target&&(ze&&(e.target.scrollLeft=0,Ke(!1)),e.target.scrollLeft<=5&&wt&&Bt(!1),e.target.scrollLeft>5&&!wt&&Bt(!0),e.target.scrollTop<12&&Vt&&Ft(!1),e.target.scrollTop>=12&&!Vt&&Ft(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight)>=e.target.scrollHeight&&Mt<bt.length&&Rt((function(e){return e+R})))},children:[Vt&&b("div",{className:F.topGradient}),!ue&&q&&b(k,{isViewOnly:Z,mapHidden:ue,companyId:je,subjectWell:we,offsetWellIds:xe.map((function(e){return e.id})),wells:at,radius:ge[M.radius],handleChanageOffsetWell:Dt,activeWellId:oe}),b(L,{isHidden:!pe,isWDUser:G,filterOptions:pt,filters:ge,wellSections:tt,selectedWellSection:Se,subjectWell:we,onChangeFilters:he,onChangeBicWells:Wt}),b(V,{open:q,isTableLoading:Ve,companyId:je,subjectWellId:Ce,sortBy:ft,setSortBy:jt,sortDirection:Ct,setSortDirection:vt,columnsWithDict:mt,wells:zt,metricsKeys:st,setMetricsKeys:At,handleChanageOffsetWell:Dt,handleChangeAllOffsetWells:St,handleAddRemoveAssets:gt,isWellNameExpand:Me,setIsWellNameExpand:Re,isHscrollMoved:wt,onHideAdvancedSearch:ht,isViewOnly:Z,isLastWell:bt.length<=Mt,contentRef:Qe,isLimitedOffsetwells:Ye,tableTop:Xe,wellSections:tt,setActiveWellId:ne})]})]})})};q.propTypes={isWDUser:a.bool,defaultSubjectWell:a.shape({asset_id:a.number,companyId:a.number}),offsetSettings:a.shape({selectedWellIds:a.arrayOf(a.number),manualWellIds:a.arrayOf(a.number),filters:a.shape({}),metricsKeys:a.arrayOf(a.string),wellSection:a.string,companyId:a.number,subjectWellId:a.number,mapHidden:a.bool,filterExpanded:a.bool,hintPopupClosed:a.bool}),currentUser:a.shape({company_id:a.number}).isRequired,open:a.bool.isRequired,addWellsUsabilityInfo:a.func,isViewOnly:a.bool,onSave:a.func.isRequired,onClose:a.func.isRequired,maxOffsetSize:a.number},q.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:50};export{q as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as i,useMemo as n,useRef as o,useEffect as s,useCallback as l}from"react";import a from"prop-types";import p from"classnames";import{uniqBy as m,isEmpty as c,sortBy as d,isEqual as u}from"lodash";import{Typography as f}from"@material-ui/core";import{Replay as j,Sort as C,FilterList as v,Close as b}from"@material-ui/icons";import h from"../Modal/Modal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";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/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as g,jsxs as A,Fragment as S}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import D from"../LoadingIndicator/LoadingIndicator.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import{Regular12 as y}from"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import W from"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import I from"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../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"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../Notifications/Notifications.js";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import{Tooltip as P}from"../Tooltip/Tooltip.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import{useFetchWells as x}from"./effects/useFetchWells.js";import{useAdvancedWells as T}from"./effects/useAdvancedWells.js";import{useBicWells as O}from"./effects/useBicWells.js";import{useCompanyMetricKey as E}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as w}from"./effects/useFilterOptions.js";import{useFilteredWells as B}from"./effects/useFilteredWells.js";import{useSortedWells as L}from"./effects/useSortedWells.js";import{useRadiusWells as k}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as H}from"./effects/useTableColumns.js";import{AppHeader as V}from"./components/AppHeader/AppHeader.js";import{Filter as F}from"./components/Filter/Filter.js";import{WellsMap as N}from"./components/Map/WellsMap.js";import M from"./components/OffsetWellsTable/OffsetWellsTable.js";import R from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as _,ViewType as U,SMALL_SCREEN_HEIGHT as z,ColumnType as K,FilterType as G,ROWS_PER_PAGE as q,MAX_OFFSET_SIZE as J}from"./constants.js";import{SEARCH_CATEGORIES as Q}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function Y(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?X(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):X(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var Z="OffsetWellPickerV4",$=function(a){var J,X=a.open,$=a.isWDUser,ee=a.defaultSubjectWell,te=a.currentUser,re=a.offsetSettings,ie=a.addWellsUsabilityInfo,ne=a.isViewOnly,oe=a.onClose,se=a.onSave,le=a.maxOffsetSize,ae=i(null),pe=r(ae,2),me=pe[0],ce=pe[1],de=n((function(){return le+1}),[le]),ue=i(null==re?void 0:re.filterExpanded),fe=r(ue,2),je=fe[0],Ce=fe[1],ve=i(null==re?void 0:re.mapHidden),be=r(ve,2),he=be[0],ge=be[1],Ae=+(null==ee?void 0:ee.companyId)||+(null==te?void 0:te.company_id),Se=null==ee?void 0:ee.asset_id,De=i((null==re?void 0:re.filters)||{}),ye=r(De,2),We=ye[0],Ie=ye[1],Pe=i((null==re?void 0:re.wellSection)||_),xe=r(Pe,2),Te=xe[0],Oe=xe[1],Ee=o(!0),we=i([]),Be=r(we,2),Le=Be[0],ke=Be[1],He=i(null),Ve=r(He,2),Fe=Ve[0],Ne=Ve[1],Me=i(!0),Re=r(Me,2),_e=Re[0],Ue=Re[1],ze=i(!1),Ke=r(ze,2),Ge=Ke[0],qe=Ke[1],Je=i(!1),Qe=r(Je,2),Xe=Qe[0],Ye=Qe[1],Ze=i(!1),$e=r(Ze,2),et=$e[0],tt=$e[1],rt=o(),it=i(U.normal),nt=r(it,2),ot=nt[0],st=nt[1];s((function(){window.innerHeight<z?st(U.small):st(U.normal)}),[window.innerHeight]);var lt=n((function(){return!he&&je?448:he?je?232:0:216}),[he,je]);s((function(){Ee.current=!0}),[Se,null==re?void 0:re.selectedWellIds]),s((function(){ot===U.small?(ge(!0),Ce(!1)):(Ce(!ne&&(null==re?void 0:re.filterExpanded)),ge(!ne&&(null==re?void 0:re.mapHidden))),Ie((null==re?void 0:re.filters)||{}),Oe((null==re?void 0:re.wellSection)||_)}),[re,ne,ot]);var at=x(Ae,ie),pt=O($,Se),mt=r(pt,2),ct=mt[0],dt=mt[1],ut=E(Ae,null==re?void 0:re.metricsKeys),ft=r(ut,2),jt=ft[0],Ct=ft[1],vt=T(Ae,at,ct,dt,Se,jt),bt=w(vt);s((function(){if(vt&&ct){var e=vt.find((function(e){return e.id===Se}));if(e){var r=ct.filter((function(e){return e.value!==_})).map((function(e){return e.label})),i=Y(Y({},e),r.length>0&&t({},K.wellSection,r));Ne(i)}else Ne(null)}}),[ct,vt]);var ht=H(jt),gt=B(vt,We);s((function(){if(gt)if(Ee.current){var e=vt.filter((function(e){return((null==re?void 0:re.selectedWellIds)||[]).includes(e.id)}));Fe&&(e=e.concat(Fe)),ke(m(e,"id")),Ee.current=!1}else ke((function(e){var t=(gt||[]).filter((function(t){return!!e.find((function(e){var r=e.id;return t.id===r}))}));return Fe&&(t=t.concat(Fe)),m(t,"id")}))}),[vt,gt,null==re?void 0:re.selectedWellIds]);var At=L(Fe,gt,Le,Ue,Ee.current),St=r(At,5),Dt=St[0],yt=St[1],Wt=St[2],It=St[3],Pt=St[4];k(We[G.radius],gt,ke,de);var xt=l((function(e,t,r){var i;i=r===Q.well.name?t:t.reduce((function(e,t){var r,i=null===(r=vt.find((function(e){return e.id===t})))||void 0===r?void 0:r.rigName,n=vt.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(n)}),[]);var n=vt.filter((function(e){var t=e.id;return i.includes(t)}));ke(e?function(e){return m(e.concat(n),"id")}:function(e){return m(e.filter((function(e){var t=e.id;return!n.find((function(e){return e.id===t}))})))})}),[vt]),Tt=l((function(){Ye(!0)}),[]),Ot=l((function(e){Ct(e)}),[]),Et=l((function(t,r){ke(r?function(r){return[].concat(e(r),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),wt=l((function(e){if(e){var t=Fe?gt.concat(Fe):gt,r=m(t,"id");ke(r)}else ke(Fe?[Fe]:[])}),[gt,Fe]),Bt=function(e){if(c(dt))ke(Fe?[Fe]:[]);else{var t=vt.filter((function(t){return dt[e].includes(t.id)}));ke(t)}},Lt=l((function(e){Oe(e),Bt(e)}),[Bt]),kt=n((function(){return Le.find((function(e){return e.id===Se}))?Le.length-1:Le.length}),[Le,Se]),Ht=n((function(){if(!dt)return!1;var e=Le.map((function(e){return e.id})),t=dt[Te]||[];return(de&&t.length>de?de:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[dt,ee,Le,Te]),Vt=function(){var e=(vt||[]).filter((function(e){return((null==re?void 0:re.selectedWellIds)||[]).includes(e.id)}));Fe&&(e=e.concat(Fe)),ke(m(e,"id")),u(We,re.filters)||(Ee.current=!0);var t=Y(Y({},re),{},{mapHidden:he,filterExpanded:je});se(t),Ie((null==re?void 0:re.filters)||{}),Oe((null==re?void 0:re.wellSection)||_),oe()},Ft=n((function(){return!Ht||(!(c(We)||!We[G.sideTracks])||Te!==_)}),[Ht,We,Te]);s((function(){if(!de||de>Le.length)tt(!1);else if(de<Le.length){var e=d(Le,"distance");ke(e.slice(0,de))}else de===Le.length&&tt(!0)}),[Le,de]);var Nt=!vt||!ct||!Pt,Mt=i(!1),Rt=r(Mt,2),_t=Rt[0],Ut=Rt[1],zt=i(!1),Kt=r(zt,2),Gt=Kt[0],qt=Kt[1],Jt=i(q),Qt=r(Jt,2),Xt=Qt[0],Yt=Qt[1],Zt=i([]),$t=r(Zt,2),er=$t[0],tr=$t[1];s((function(){if(Pt){var e=Pt.slice(0,Xt);tr(e)}}),[Pt,Xt,Fe]);var rr=function(e){e.target&&(Xe&&(e.target.scrollLeft=0,Ye(!1)),e.target.scrollLeft<=5&&_t&&Ut(!1),e.target.scrollLeft>5&&!_t&&Ut(!0),e.target.scrollTop<12&&Gt&&qt(!1),e.target.scrollTop>=12&&!Gt&&qt(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight)>=e.target.scrollHeight&&Xt<Pt.length&&Yt((function(e){return e+q})))};return g(h,{open:X,onClose:Vt,title:g(V,{isWDUser:$,viewType:ot,totalCount:null!==(J=null==vt?void 0:vt.length)&&void 0!==J?J:0,selectedCount:kt,isViewOnly:ne,maxOffsetSize:le}),contentContainerClassName:R.offsetWellDialog,contentClassName:R.contentContainer,actionsClassName:R.modalActions,actions:!ne&&A("div",{className:R.actionsWrapper,children:[!Nt&&Ft?g(P,{placement:"bottom-start",title:$?"To Synced Offsets in Offset App":"To Synced Offsets in Wellhub",children:g("div",{children:g(I,{"data-testid":"".concat(Z,"_reset"),onClick:function(){Ie({}),Oe(_),Bt(_)},color:"primary",startIcon:g(j,{}),children:"Reset"})})}):g("div",{className:R.footerLabel,children:"The offset list is being automatically populated by ".concat($?"Offset Selection App":"WellHub",".")}),A("div",{className:R.buttonGap,children:[g(I,{"data-testid":"".concat(Z,"_cancel"),onClick:Vt,color:"primary",children:"Cancel"}),A(I,{"data-testid":"".concat(Z,"_selectedWells"),variant:"contained",color:"primary",onClick:function(){oe();var e=Y(Y({},re),{},{companyId:Ae,subjectWellId:Se,selectedWellIds:Le.map((function(e){return e.id})),filters:We,metricsKeys:jt,wellSection:Te,isSynced:Ht,mapHidden:he,filterExpanded:je});se(e,Le)},children:["Select (",kt,")"]})]})]}),children:Nt?g(D,{fullscreen:!1}):A("div",{className:p(R.contentWrapper,t({},R.contentWrapperSmall,ot===U.small)),ref:rt,onScroll:function(e){return ot===U.small&&rr(e)},children:[ot===U.normal&&A(S,{children:[A("div",{className:R.countContainer,children:[g(y,{className:R.totalLabel,children:"Total:"}),g(y,{"data-testid":"".concat(Z,"_totalWells"),className:R.countValue,children:vt.length}),g(y,{className:R.selectedLabel,children:"Selected:"}),g(y,{"data-testid":"".concat(Z,"_selected"),className:R.countValue,children:kt})]}),de&&de<=Le.length&&g(f,{"data-testid":"".concat(Z,"_no more"),className:R.viewOnlyTitleLabel,children:"This app supports no more than (".concat(le,") offset wells at a time.")}),ne&&g(f,{"data-testid":"".concat(Z,"_viewOnly"),className:R.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the ".concat($?"Offset Well Selection app.":"Wellhub.")})]}),A("div",{className:p(R.controlGroup,t({},R.controlGroupSmall,ot===U.small)),children:[A(I,{"data-testid":"".concat(Z,"_filters"),startIcon:g(je?C:v,{}),classes:{root:R.filterButton},onClick:function(){return Ce((function(e){return!e}))},disabled:ne,children:["Filters",!c(We)&&A("div",{className:R.clearWrapper,onClick:function(e){e.stopPropagation(),Ie({})},children:[g(b,{className:R.clearIcon}),g("span",{className:R.clearLabel,children:"Clear"})]})]}),g(W,{"data-testid":"".concat(Z,"_map"),rightLabel:"Map",color:"primary",checked:!he,onChange:function(e){return ge(!e.target.checked)}})]}),A("div",{className:p(R.content,t({},R.contentSmall,ot===U.small)),onScroll:function(e){return ot!==U.small&&rr(e)},children:[Gt&&g("div",{className:R.topGradient}),!he&&X&&g(N,{isViewOnly:ne,mapHidden:he,companyId:Ae,subjectWell:Fe,offsetWellIds:Le.map((function(e){return e.id})),wells:vt,radius:We[G.radius],handleChanageOffsetWell:Et,activeWellId:me}),g(F,{isHidden:!je,isWDUser:$,filterOptions:bt,filters:We,wellSections:ct,selectedWellSection:Te,subjectWell:Fe,onChangeFilters:Ie,onChangeBicWells:Lt}),g(M,{open:X,isTableLoading:_e,companyId:Ae,subjectWellId:Se,sortBy:Dt,setSortBy:yt,sortDirection:Wt,setSortDirection:It,columnsWithDict:ht,wells:er,metricsKeys:jt,setMetricsKeys:Ot,handleChanageOffsetWell:Et,handleChangeAllOffsetWells:wt,handleAddRemoveAssets:xt,isWellNameExpand:Ge,setIsWellNameExpand:qe,isHscrollMoved:_t,onHideAdvancedSearch:Tt,isViewOnly:ne,isLastWell:Pt.length<=Xt,contentRef:rt,isLimitedOffsetwells:et,tableTop:lt,wellSections:ct,setActiveWellId:ce})]})]})})};$.propTypes={isWDUser:a.bool,defaultSubjectWell:a.shape({asset_id:a.number,companyId:a.number}),offsetSettings:a.shape({selectedWellIds:a.arrayOf(a.number),manualWellIds:a.arrayOf(a.number),filters:a.shape({}),metricsKeys:a.arrayOf(a.string),wellSection:a.string,companyId:a.number,subjectWellId:a.number,mapHidden:a.bool,filterExpanded:a.bool,hintPopupClosed:a.bool}),currentUser:a.shape({company_id:a.number}).isRequired,open:a.bool.isRequired,addWellsUsabilityInfo:a.func,isViewOnly:a.bool,onSave:a.func.isRequired,onClose:a.func.isRequired,maxOffsetSize:a.number},$.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:J};export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var l={offsetWellDialog:"OffsetWellPickerV4-module_offsetWellDialog__EkSjl",viewOnlyTitleLabel:"OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c",contentWrapper:"OffsetWellPickerV4-module_contentWrapper__gVGQ-",contentContainer:"OffsetWellPickerV4-module_contentContainer__Eb9sk",content:"OffsetWellPickerV4-module_content__mEQWD",modalActions:"OffsetWellPickerV4-module_modalActions__cShAH",actionsWrapper:"OffsetWellPickerV4-module_actionsWrapper__C0Ciz",buttonGap:"OffsetWellPickerV4-module_buttonGap__fjFT6",viewOnlyLabel:"OffsetWellPickerV4-module_viewOnlyLabel__GP44N",controlGroup:"OffsetWellPickerV4-module_controlGroup__Tsj99",filterButton:"OffsetWellPickerV4-module_filterButton__1VAsu",clearWrapper:"OffsetWellPickerV4-module_clearWrapper__vsIQx",clearIcon:"OffsetWellPickerV4-module_clearIcon__fHMVI",clearLabel:"OffsetWellPickerV4-module_clearLabel__kCh0J",topGradient:"OffsetWellPickerV4-module_topGradient__fAc7W",countContainer:"OffsetWellPickerV4-module_countContainer__p8V5A",totalLabel:"OffsetWellPickerV4-module_totalLabel__3n5bD",selectedLabel:"OffsetWellPickerV4-module_selectedLabel__BzClE",countValue:"OffsetWellPickerV4-module_countValue__dLG-K",
|
|
1
|
+
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var l={offsetWellDialog:"OffsetWellPickerV4-module_offsetWellDialog__EkSjl",viewOnlyTitleLabel:"OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c",contentWrapper:"OffsetWellPickerV4-module_contentWrapper__gVGQ-",contentWrapperSmall:"OffsetWellPickerV4-module_contentWrapperSmall__7HN4o",contentContainer:"OffsetWellPickerV4-module_contentContainer__Eb9sk",content:"OffsetWellPickerV4-module_content__mEQWD",contentSmall:"OffsetWellPickerV4-module_contentSmall__GoW6F",modalActions:"OffsetWellPickerV4-module_modalActions__cShAH",actionsWrapper:"OffsetWellPickerV4-module_actionsWrapper__C0Ciz",buttonGap:"OffsetWellPickerV4-module_buttonGap__fjFT6",viewOnlyLabel:"OffsetWellPickerV4-module_viewOnlyLabel__GP44N",controlGroup:"OffsetWellPickerV4-module_controlGroup__Tsj99",controlGroupSmall:"OffsetWellPickerV4-module_controlGroupSmall__lQjj8",filterButton:"OffsetWellPickerV4-module_filterButton__1VAsu",clearWrapper:"OffsetWellPickerV4-module_clearWrapper__vsIQx",clearIcon:"OffsetWellPickerV4-module_clearIcon__fHMVI",clearLabel:"OffsetWellPickerV4-module_clearLabel__kCh0J",topGradient:"OffsetWellPickerV4-module_topGradient__fAc7W",countContainer:"OffsetWellPickerV4-module_countContainer__p8V5A",totalLabel:"OffsetWellPickerV4-module_totalLabel__3n5bD",selectedLabel:"OffsetWellPickerV4-module_selectedLabel__BzClE",countValue:"OffsetWellPickerV4-module_countValue__dLG-K",footerLabel:"OffsetWellPickerV4-module_footerLabel__qJrgJ"};e(".OffsetWellPickerV4-module_offsetWellDialog__EkSjl{padding-bottom:40px;width:1100px}.OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c{color:var(--palette-primary-text-6);font-size:16px!important;line-height:140.6%!important;margin-bottom:16px!important;margin-left:40px!important}.OffsetWellPickerV4-module_contentWrapper__gVGQ-{display:flex;flex-direction:column;overflow:hidden auto;position:relative}.OffsetWellPickerV4-module_contentWrapperSmall__7HN4o{margin:0 24px 0 40px;overflow:auto}.OffsetWellPickerV4-module_contentWrapperSmall__7HN4o::-webkit-scrollbar-corner{background-color:transparent}.OffsetWellPickerV4-module_contentContainer__Eb9sk{display:flex;flex-direction:column;margin-top:-8px;overflow-y:hidden;padding:0;position:relative}.OffsetWellPickerV4-module_content__mEQWD{flex:1;margin:0 24px 0 40px;overflow:auto;position:relative}.OffsetWellPickerV4-module_contentSmall__GoW6F{margin:0;overflow:unset}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-corner{background-color:transparent}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar{width:16px}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:hsla(240,2%,65%,.722);border:5px solid rgba(0,0,0,.01);border-radius:10px}.OffsetWellPickerV4-module_modalActions__cShAH{justify-content:flex-end;padding:8px 40px}.OffsetWellPickerV4-module_actionsWrapper__C0Ciz{align-items:center;display:flex;flex:1;justify-content:space-between}.OffsetWellPickerV4-module_buttonGap__fjFT6{display:flex;gap:16px}.OffsetWellPickerV4-module_viewOnlyLabel__GP44N{color:var(--palette-primary-text-6);padding-bottom:16px;padding-left:40px}.OffsetWellPickerV4-module_controlGroup__Tsj99{align-items:center;display:flex;height:32px;justify-content:space-between;margin-bottom:24px;margin-top:8px;padding:0 40px;width:100%}.OffsetWellPickerV4-module_controlGroupSmall__lQjj8{left:0;padding:0;position:sticky}.OffsetWellPickerV4-module_filterButton__1VAsu{background-color:var(--palette-background-b-8)!important;height:32px!important}.OffsetWellPickerV4-module_filterButton__1VAsu:hover{background-color:var(--palette-background-b-7)!important}.OffsetWellPickerV4-module_clearWrapper__vsIQx{align-items:center;color:var(--palette-primary-main);display:flex;gap:4px;margin-left:8px}.OffsetWellPickerV4-module_clearWrapper__vsIQx:hover{color:var(--palette-primary-light)}.OffsetWellPickerV4-module_clearIcon__fHMVI{font-size:16px!important}.OffsetWellPickerV4-module_clearLabel__kCh0J{font-size:12px;font-weight:400;line-height:16px;text-transform:none}.OffsetWellPickerV4-module_topGradient__fAc7W{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);height:12px!important;left:0;position:sticky;top:0;width:100%;z-index:3}.OffsetWellPickerV4-module_countContainer__p8V5A{align-items:center;display:flex;height:24px;margin:0 0 16px 40px;z-index:9}.OffsetWellPickerV4-module_totalLabel__3n5bD{color:var(--palette-primary-text-6)}.OffsetWellPickerV4-module_selectedLabel__BzClE{color:var(--palette-primary-text-6);padding-left:16px}.OffsetWellPickerV4-module_countValue__dLG-K{color:var(--palette-primary-text-1);padding-left:8px}.OffsetWellPickerV4-module_footerLabel__qJrgJ{color:var(--palette-primary-text-6);font-size:12px}");export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"prop-types";import{Divider as i,Tooltip as l,Badge as t,Typography as s}from"@material-ui/core";import a from"@material-ui/icons/Info";import{Regular20 as o,Regular12 as r}from"../../../Typography.js";import{ViewType as n,MAX_OFFSET_SIZE as c}from"../../constants.js";import p from"./AppHeader.module.css.js";import{jsx as d,jsxs as m}from"react/jsx-runtime";var h=function(e){var i=e.sourceApp,l=e.isViewOnly,t=e.maxOffsetSize;return l&&t!==c?m("div",{className:p.tooltipContainer,children:[m("div",{className:p.tooltipWrapper,children:[d(s,{className:p.tooltipLabel,children:"1."}),m(s,{className:p.tooltipLabel,children:["This application can work with no more than (",t,") Offset Wells at a time."]})]}),m("div",{className:p.tooltipWrapper,children:[d(s,{className:p.tooltipLabel,children:"2."}),m(s,{className:p.tooltipLabel,children:["The window is in the view only mode. To edit offset wells, use the ",i,"."]})]})]}):l?d("div",{className:p.tooltipContainer,children:m("span",{className:p.tooltipLabel,children:["The window is in the view only mode. To edit offset wells, use the ",i,"."]})}):t!==c?d("div",{className:p.tooltipContainer,children:m("span",{className:p.tooltipLabel,children:["This application can work with no more than (",t,") Offset Wells at a time."]})}):null};h.propTypes={sourceApp:e.string.isRequired,isViewOnly:e.bool.isRequired,maxOffsetSize:e.number.isRequired};var f=function(e){var s=e.isWDUser,f=e.viewType,u=e.totalCount,N=e.selectedCount,w=e.isViewOnly,b=e.maxOffsetSize;return f===n.normal?d("div",{className:p.headerContainer,children:d(o,{children:"Select Offset Wells"})}):m("div",{className:p.headerContainer,children:[d(o,{children:"Select Offset Wells"}),d(i,{className:p.divideLine}),d(r,{className:p.totalLabel,children:"Total:"}),d(r,{"data-testid":"".concat("AppHeader","_totalWells"),className:p.countValue,children:u}),d(r,{className:p.selectedLabel,children:"Selected:"}),d(r,{"data-testid":"".concat("AppHeader","_selected"),className:p.countValue,children:N}),(w||b!==c)&&d(l,{title:d(h,{sourceApp:s?"Offset Well Selection app":"Wellhub",isViewOnly:w,maxOffsetSize:b}),placement:"right",classes:{popper:w&&b!==c&&p.tooltipPopper},children:m("div",{className:p.infoWrapper,children:[d(a,{className:p.infoIcon}),w&&b!==c&&d(t,{badgeContent:2,classes:{badge:p.infoBadge}})]})})]})};f.propTypes={isWDUser:e.bool.isRequired,viewType:e.string.isRequired,totalCount:e.number.isRequired,selectedCount:e.number.isRequired,isViewOnly:e.bool.isRequired,maxOffsetSize:e.number.isRequired};export{f as AppHeader};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var p={headerContainer:"AppHeader-module_headerContainer__U12-A",divideLine:"AppHeader-module_divideLine__Ug9rR",totalLabel:"AppHeader-module_totalLabel__ML9sB",selectedLabel:"AppHeader-module_selectedLabel__m24nY",countValue:"AppHeader-module_countValue__m4GWf",infoWrapper:"AppHeader-module_infoWrapper__m1oQh",infoIcon:"AppHeader-module_infoIcon__jOp74",infoBadge:"AppHeader-module_infoBadge__1GFr3",tooltipPopper:"AppHeader-module_tooltipPopper__jEQDa",tooltipContainer:"AppHeader-module_tooltipContainer__lXXED",tooltipWrapper:"AppHeader-module_tooltipWrapper__0zW5f",tooltipLabel:"AppHeader-module_tooltipLabel__k-8QA"};e(".AppHeader-module_headerContainer__U12-A{align-items:center;display:flex;flex-direction:row}.AppHeader-module_divideLine__Ug9rR{height:12px;margin-left:16px!important;margin-right:16px!important;width:1px}.AppHeader-module_totalLabel__ML9sB{color:var(--palette-primary-text-6)}.AppHeader-module_selectedLabel__m24nY{color:var(--palette-primary-text-6);padding-left:16px}.AppHeader-module_countValue__m4GWf{color:var(--palette-primary-text-1);padding-left:4px}.AppHeader-module_infoWrapper__m1oQh{align-items:center;display:flex;margin-left:8px;position:relative}.AppHeader-module_infoIcon__jOp74{color:var(--palette-info-light);font-size:20px!important}.AppHeader-module_infoBadge__1GFr3{background-color:var(--palette-primary-text-9);border:2px solid var(--palette-background-b-9);border-radius:16px!important;box-sizing:content-box!important;color:var(--palette-primary-text-6);font-size:11px!important;font-weight:400!important;height:16px!important;line-height:14px!important;min-width:16px!important;padding:0!important;right:-2px!important;top:-10px!important}.AppHeader-module_tooltipPopper__jEQDa{margin-left:12px!important}.AppHeader-module_tooltipContainer__lXXED{display:flex;flex-direction:column;gap:12px;padding:4px}.AppHeader-module_tooltipWrapper__0zW5f{display:flex;gap:4px}.AppHeader-module_tooltipLabel__k-8QA{color:#fff!important;font-size:12px!important;font-weight:400!important;letter-spacing:.4px!important;line-height:16px!important}");export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/slicedToArray";import{useRef as e,useState as t,useEffect as n,createElement as o}from"react";import i from"react-dom";import{get as c}from"lodash";import u from"prop-types";import l from"mapbox.js";import{mapbox as s}from"../../../../utils/index.js";import a from"./MapView.module.css.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../utils/apiCalls.js";import"../../effects/useAdvancedWells.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"../../constants.js";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"@babel/runtime/helpers/typeof";import"moment";import"react-virtualized";import"../../effects/useAssetsData.js";import{usePreviousWells as m}from"../../effects/usePreviousWells.js";import{jsx as d,Fragment as f}from"react/jsx-runtime";var p=s.isValidCoordinates,v=[29.749907,-95.358421],b=function(u){var s,
|
|
1
|
+
import r from"@babel/runtime/helpers/slicedToArray";import{useRef as e,useState as t,useEffect as n,createElement as o}from"react";import i from"react-dom";import{get as c}from"lodash";import u from"prop-types";import l from"mapbox.js";import{mapbox as s}from"../../../../utils/index.js";import a from"./MapView.module.css.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../utils/apiCalls.js";import"../../effects/useAdvancedWells.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"../../constants.js";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"@babel/runtime/helpers/typeof";import"moment";import"react-virtualized";import"../../effects/useAssetsData.js";import{usePreviousWells as m}from"../../effects/usePreviousWells.js";import{jsx as d,Fragment as f}from"react/jsx-runtime";var p=s.isValidCoordinates,v=[29.749907,-95.358421],b=["_renderer","_bounds","min"],h=function(u){var s,h=u.isViewOnly,y=u.subjectWell,g=u.wells,j=u.offsetWellIds,C=u.radius,B=u.popUpFormatter,T=u.formationColors,W=u.handleChanageOffsetWell,F=u.activeWellId,O=null==y||null===(s=y.topHole)||void 0===s?void 0:s.coordinates,k=e(),x=e(null),D=e(),E=e(),L=e(),w=e(null),q=t(!1),R=r(q,2),N=R[0],V=R[1],P=e(),_=e(),A=(null==y?void 0:y.id)===F,G=m(g),M=t(null),S=r(M,2),z=S[0],I=S[1];n((function(){k.current||(k.current=l.mapbox.map(x.current,null,{attributionControl:!1,scrollWheelZoom:!1,zoomControl:!1}).setView(v,1),l.control.zoom({position:"bottomright"}).addTo(k.current),l.mapbox.styleLayer("mapbox://styles/mapbox/dark-v9").addTo(k.current))}),[]),n((function(){if(k.current){if(D.current&&(k.current.removeLayer(D.current),D.current=null),E.current&&k.current.removeLayer(E.current),!O)return D.current=null,void(E.current=null);C&&(D.current=l.circle(O,1609.34*C,{stroke:!1,fill:!0,fillOpacity:.2,fillColor:"#03BCD4",className:"circle_500"}),D.current.addTo(k.current))}}),[C,O]);var U=function(r,e,t,n,o,i){o&&r.setStyle({fillColor:"#63EFFF"}),i&&V(!0),w.current=l.circleMarker(e,{radius:i?5:12,stroke:!1,fill:!0,fillOpacity:.24,fillColor:o?"#63EFFF":t,className:"circle_highlight"}),w.current.addEventListener("mouseout",(function(){L.current.removeFrom(k.current),L.current=l.featureGroup(P.current),L.current.addTo(k.current),k.current.closePopup(),o&&r.setStyle({fillColor:"#03BCD4"}),i&&V(!1)})),w.current.addEventListener("click",(function(){h||W(n,!(o&&!i))}));var c=P.current.concat(w.current);L.current.removeFrom(k.current),L.current=l.featureGroup(c),L.current.addTo(k.current)},H=function(r,e,t,n,u){var s=document.createElement("div"),a=o(B,{isViewOnly:h,well:r,color:c(T,r.formation,"#BDBDBD"),isOffsetWell:e,isSubjectWell:t,offset:u});i.render(d(f,{children:a}),s),l.popup().setLatLng(n).setContent(s).openOn(k.current)};return n((function(){if(k.current&&g&&j){k.current.closePopup(),L.current&&L.current.removeFrom(k.current);var r=[],e=[],t=[];g.forEach((function(r){r.id!==(null==y?void 0:y.id)&&(j.includes(r.id)?e.push(r):t.push(r))})),[].concat(t,e,[y]).forEach((function(e){var t,n=null==e||null===(t=e.topHole)||void 0===t?void 0:t.coordinates;if(n&&p(n)){var o=(null==y?void 0:y.id)===e.id,i=j.includes(e.id)||o,u=i?"#03BCD4":c(T,e.formation,"#BDBDBD"),s=i?1:.3,a=l.circleMarker(n,{radius:5,stroke:!1,fill:!0,fillOpacity:s,fillColor:u,className:"circle_500"});if(a.addEventListener("mouseover",(function(r){var t=[0,0];z&&c(r.target,b)&&(t=[c(r.target,b).x-z.x,c(r.target,b).y-z.y]),H(e,i,o,n,t),U(a,n,u,e,i,o)})),o&&(_.current=a),r.push(a),e.id===F&&!A){var m=l.circleMarker(n,{radius:12,stroke:!1,fill:!0,fillOpacity:.24,fillColor:u,className:"circle_1200"});r.push(m)}}})),r.length&&(L.current=l.featureGroup(r),L.current.addTo(k.current)),P.current=r,setTimeout((function(){D.current&&D.current.bringToBack(),k.current&&D.current&&g!==G&&k.current.fitBounds(D.current.getBounds(),{padding:[5,5]})}),500)}}),[y,g,j,z]),n((function(){if(N&&c(k.current,b)){var r=[c(k.current,b).x-z.x,c(k.current,b).y-z.y];H(y,!0,!0,O,r)}}),[N,z,y,O]),n((function(){if(k.current&&O){E.current&&E.current.removeFrom(k.current);var r=l.icon({iconUrl:N||A?"/static/media/5e9c4959259cb12c11b2c5eaf27eb3ad.svg":"/static/media/9efe5882f31d2f22bd57af92069d0a3e.svg",iconSize:N||A?[70,20]:[62,12],iconAnchor:N||A?[35,29]:[31,25],className:"dot"});E.current=l.marker(O,{icon:r}),E.current.addTo(k.current),_.current&&(E.current.addEventListener("mouseover",(function(){V(!0),U(_.current,O,"#03BCD4",y,!0,!0)})),E.current.addEventListener("mouseout",(function(){L.current.removeFrom(k.current),L.current=l.featureGroup(P.current),L.current.addTo(k.current),k.current.closePopup(),_.current.setStyle({fillColor:"#03BCD4"}),V(!1)})))}}),[N,O,C,y,A,z]),n((function(){setTimeout((function(){D.current&&D.current.bringToBack(),y?k.current&&D.current&&C&&k.current.fitBounds(D.current.getBounds(),{padding:[5,5]}):k.current&&L.current&&k.current.fitBounds(L.current.getBounds()),c(k.current,b)&&I(c(k.current,b))}),500)}),[C,y]),d("div",{className:a.mapView,children:d("div",{className:a.mapMain,ref:x})})};h.propTypes={isViewOnly:u.bool.isRequired,subjectWell:u.shape({id:u.number,formation:u.string}),wells:u.arrayOf(u.shape({})).isRequired,offsetWellIds:u.arrayOf(u.number).isRequired,radius:u.number.isRequired,formationColors:u.shape({}).isRequired,popUpFormatter:u.func.isRequired,handleChanageOffsetWell:u.func.isRequired,activeWellId:u.number.isRequired},h.defaultProps={subjectWell:null};export{h as MapView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var a={mapView:"MapView-module_mapView__1RP-8",mapMain:"MapView-module_mapMain__mVZCO"};e(".MapView-module_mapView__1RP-8{width:100%}.MapView-module_mapMain__mVZCO{background-color:var(--palette-background-b-9);border-radius:4px;flex:100;height:200px;width:100%}.MapView-module_mapView__1RP-8 .leaflet-popup-content-wrapper{background-color:
|
|
1
|
+
import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var a={mapView:"MapView-module_mapView__1RP-8",mapMain:"MapView-module_mapMain__mVZCO"};e(".MapView-module_mapView__1RP-8{width:100%}.MapView-module_mapMain__mVZCO{background-color:var(--palette-background-b-9);border-radius:4px;flex:100;height:200px;width:100%}.MapView-module_mapView__1RP-8 .leaflet-popup{left:0!important;top:0!important;transform:none!important}.MapView-module_mapView__1RP-8 .leaflet-popup-content-wrapper{background-color:transparent;border-radius:4px;opacity:.9}.MapView-module_mapView__1RP-8 .leaflet-popup-content{padding:8px}.MapView-module_mapView__1RP-8 .leaflet-popup-close-button,.MapView-module_mapView__1RP-8 .leaflet-popup-tip{display:none}.MapView-module_mapView__1RP-8 .leaflet-control-zoom{background:none;border:none;box-shadow:none}.MapView-module_mapView__1RP-8 .leaflet-control-zoom a{align-items:center;background:var(--palette-background-b-6);border-radius:4px;color:var(--palette-primary-text-6);content:unset;display:flex;font-size:20px;height:30px;justify-content:center;margin-top:4px;opacity:1;text-align:center;text-indent:unset;width:30px}.MapView-module_mapView__1RP-8 .leaflet-control-zoom a:hover{background:var(--palette-background-b-7);border-radius:4px;color:var(--palette-primary-text-1)}.MapView-module_mapView__1RP-8 .leaflet-touch .leaflet-bar,.MapView-module_mapView__1RP-8 .leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:0 solid transparent}");export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"moment";import l from"@material-ui/icons/Info";import
|
|
1
|
+
import e from"classnames";import o from"moment";import l from"@material-ui/icons/Info";import t from"@material-ui/icons/Block";import i from"./WellTooltip.module.css.js";import{jsxs as a,jsx as m}from"react/jsx-runtime";var s=function(){return function(s){var n=s.isViewOnly,r=s.well,c=s.color,f=s.isOffsetWell,d=s.isSubjectWell,p=s.offset;return a("div",{className:i.wellTooltip,style:{marginLeft:null==p?void 0:p[0],marginTop:null==p?void 0:p[1]},children:[m("span",{className:e(i.commonItem,i.wellName),children:r.name}),a("div",{className:i.tooltipItem,children:["Depth: ",Number.isFinite(r.totalDepth)?Math.floor(r.totalDepth).toFixed(2):"N/A",Number.isFinite(r.totalDepth)&&m("span",{className:i.unit,children:" ft"})]}),a("div",{className:e(i.commonItem,i.tooltipItem),children:["Release Date: ",Number.isFinite(r.rigReleaseDate)?o.unix(r.rigReleaseDate).format("MM/DD/YYYY"):"N/A"]}),a("div",{className:e(i.commonItem,i.formationItem),children:["Target Formation:",m("div",{className:i.formation,style:{backgroundColor:c}}),r.formation]}),!n&&!d&&a("div",{className:e(i.commonItem,i.info),children:[f?m(t,{className:i.blockIcon}):m(l,{className:i.infoIcon}),m("span",f?{className:i.infoLabel,children:"Click to deselect Offset Well"}:{className:i.infoLabel,children:"Click to select Offset Well"})]})]})}};export{s as WellTooltip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={wellTooltip:"WellTooltip-module_wellTooltip__w9AZN",wellName:"WellTooltip-module_wellName__9Xp0F",tooltipItem:"WellTooltip-module_tooltipItem__BgiRN",unit:"WellTooltip-module_unit__L80Hh",formationItem:"WellTooltip-module_formationItem__gzw-Q",formation:"WellTooltip-module_formation__y9x-2",info:"WellTooltip-module_info__O1KTT",infoIcon:"WellTooltip-module_infoIcon__GQACG",blockIcon:"WellTooltip-module_blockIcon__4GoyV",infoLabel:"WellTooltip-module_infoLabel__ZRhqk"};o(".WellTooltip-module_wellTooltip__w9AZN{color:var(--palette-primary-text-1);display:flex;flex-direction:column;font-family:Roboto;font-style:normal;gap:4px;width:fit-content}.WellTooltip-module_wellName__9Xp0F{font-size:12px;font-weight:400;line-height:16px;padding-bottom:4px}.WellTooltip-module_tooltipItem__BgiRN{font-size:14px;font-weight:400;line-height:20px}.WellTooltip-module_unit__L80Hh{color:var(--palette-primary-text-6);font-size:12px;font-weight:400;line-height:14px}.WellTooltip-module_formationItem__gzw-Q{align-items:center;display:flex;flex-direction:row;font-size:14px;font-weight:400;line-height:20px}.WellTooltip-module_formation__y9x-2{border-radius:50%;height:8px;margin-left:8px;margin-right:4px;width:8px}.WellTooltip-module_info__O1KTT{align-items:center;display:flex;flex-direction:row;gap:4px;padding-top:8px}.WellTooltip-module_infoIcon__GQACG{color:#64b5f6!important;font-size:16px!important;position:relative!important}.WellTooltip-module_blockIcon__4GoyV{color:#dadada!important;font-size:16px!important;position:relative!important}.WellTooltip-module_infoLabel__ZRhqk{color:var(--palette-primary-text-6);font-size:12px;font-weight:400;line-height:16px}");export{l as default};
|
|
1
|
+
import o from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={wellTooltip:"WellTooltip-module_wellTooltip__w9AZN",commonItem:"WellTooltip-module_commonItem__n822-",wellName:"WellTooltip-module_wellName__9Xp0F",tooltipItem:"WellTooltip-module_tooltipItem__BgiRN",unit:"WellTooltip-module_unit__L80Hh",formationItem:"WellTooltip-module_formationItem__gzw-Q",formation:"WellTooltip-module_formation__y9x-2",info:"WellTooltip-module_info__O1KTT",infoIcon:"WellTooltip-module_infoIcon__GQACG",blockIcon:"WellTooltip-module_blockIcon__4GoyV",infoLabel:"WellTooltip-module_infoLabel__ZRhqk"};o(".WellTooltip-module_wellTooltip__w9AZN{background-color:var(--palette-background-b-8);border-radius:4px;color:var(--palette-primary-text-1);display:flex;flex-direction:column;font-family:Roboto;font-style:normal;gap:4px;min-width:180px;padding:8px;position:absolute;width:fit-content}.WellTooltip-module_commonItem__n822-{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.WellTooltip-module_wellName__9Xp0F{font-size:12px;font-weight:400;line-height:16px;padding-bottom:4px}.WellTooltip-module_tooltipItem__BgiRN{font-size:14px;font-weight:400;line-height:20px}.WellTooltip-module_unit__L80Hh{color:var(--palette-primary-text-6);font-size:12px;font-weight:400;line-height:14px}.WellTooltip-module_formationItem__gzw-Q{align-items:center;display:flex;flex-direction:row;font-size:14px;font-weight:400;line-height:20px}.WellTooltip-module_formation__y9x-2{border-radius:50%;height:8px;margin-left:8px;margin-right:4px;width:8px}.WellTooltip-module_info__O1KTT{align-items:center;display:flex;flex-direction:row;gap:4px;padding-top:8px}.WellTooltip-module_infoIcon__GQACG{color:#64b5f6!important;font-size:16px!important;position:relative!important}.WellTooltip-module_blockIcon__4GoyV{color:#dadada!important;font-size:16px!important;position:relative!important}.WellTooltip-module_infoLabel__ZRhqk{color:var(--palette-primary-text-6);font-size:12px;font-weight:400;line-height:16px}");export{l as default};
|
package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import{useState as r,useRef as o}from"react";import t from"prop-types";import{TextField as n,InputAdornment as a,Popover as
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import{useState as r,useRef as o}from"react";import t from"prop-types";import{TextField as n,InputAdornment as a,Popover as l}from"@material-ui/core";import{Search as c}from"@material-ui/icons";import i from"./AutoCompleteAssetSearch.js";import s from"./AdvancedSearch.module.css.js";import{jsxs as d,Fragment as u,jsx as m}from"react/jsx-runtime";var p=function(t){var p=t.companyId,f=t.subjectWellId,h=t.onChange,v=t.selectedWellIds,I=t.onHideAdvancedSearch,g=r(null),b=e(g,2),A=b[0],C=b[1],y=r(""),j=e(y,2),R=j[0],W=j[1],q=o(),O=function(){W(""),C(null),I()};return d(u,{children:[m(n,{"data-testid":"ows_advanced_search",id:"well-section-search-textfield",placeholder:"Add Offset ...",InputProps:{startAdornment:m(a,{position:"start",children:m(c,{className:s.searchIcon})}),className:s.searchInput},classes:{root:s.searchRoot},ref:q,value:R,onChange:function(e){W(e.target.value),e.target.value&&C(q.current)},onClick:function(e){C(e.currentTarget)}}),m(l,{open:Boolean(A),anchorEl:A,onClose:O,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:m(i,{subjectWellId:f,value:R,company:p,selectedWellIds:v,onChange:h,onClose:O})})]})};p.propTypes={companyId:t.number.isRequired,subjectWellId:t.number.isRequired,onChange:t.func.isRequired,selectedWellIds:t.arrayOf(t.number).isRequired,onHideAdvancedSearch:t.func.isRequired};export{p as AdvancedSearch};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import{useRef as t,useState as r,useMemo as i,useEffect as s}from"react";import n from"classnames";import a from"prop-types";import{sum as l,startCase as o,get as c,isEmpty as u}from"lodash";import{makeStyles as d,List as p,ListSubheader as m,Chip as h,ListItem as f,Checkbox as g,Typography as x}from"@material-ui/core";import{SEARCH_CATEGORIES as
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import{useRef as t,useState as r,useMemo as i,useEffect as s}from"react";import n from"classnames";import a from"prop-types";import{sum as l,startCase as o,get as c,isEmpty as u}from"lodash";import{makeStyles as d,List as p,ListSubheader as m,Chip as h,ListItem as f,Checkbox as g,Typography as x}from"@material-ui/core";import{SEARCH_CATEGORIES as b}from"./constants.js";import{StatusOptions as v,ROWS_PER_PAGE as y}from"../../../constants.js";import{jsxs as R,jsx as A}from"react/jsx-runtime";var I=d((function(e){return{assetListWrapper:{margin:"8px 0",flex:1},assetListContainer:{maxHeight:"350px",backgroundColor:e.palette.background.paper,position:"relative",overflow:"auto"},listSection:{backgroundColor:"inherit"},ul:{backgroundColor:"inherit",padding:0},listGutters:{padding:"2px 8px"},assetTypeSubheaderChip:{height:"24px",color:e.palette.primary.text6},assetItemTextRoot:{minWidth:"300px"},assetItemTextPrimary:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},loadingInfo:{textAlign:"center",fontSize:"12px",lineHeight:"17px",color:e.palette.primary.text8},empty:{color:e.palette.primary.text6,fontSize:"12px",fontStyle:"italic",marginLeft:"8px"},menuItem:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},allMenuItem:{boxShadow:"inset 0px -1px 0px rgba(255, 255, 255, 0.25)"},statusWrapper:{display:"flex",alignItems:"center",width:"102px"},status:{width:"8px",height:"8px",marginRight:"8px",borderRadius:"50%",cursor:"default"}}})),k=function(a){var d=a.subjectWellId,k=a.page,C=a.assetType,S=a.loading,N=a.groupedAssets,T=a.onClickAsset,w=a.onClickAllAsset,H=a.onScrollReached,q=I(),W=t(null),j=r("top"),L=e(j,2),_=L[0],G=L[1],M=r(0),z=e(M,2),O=z[0],P=z[1],Y=l(null==N?void 0:N.map((function(t){var r=e(t,2);r[0];var i=r[1];return(null==i?void 0:i.length)||0}))),B=i((function(){if(1===N.length){var e=N[0][1],t=e.filter((function(e){return e.checked})).length;return[t>0&&e.length!==t,t===e.length]}return[!1,!1]}),[N]),D=e(B,2),E=D[0],F=D[1];s((function(){S?P(Y):("top"===_&&W.current.scrollTo(0,5),"bottom"===_&&W.current.scrollTo(0,W.current.scrollHeight-W.current.offsetHeight-5),"auto"===_&&W.current.scrollTo(0,(W.current.scrollHeight-W.current.offsetHeight)*O/Y))}),[S]);return R("div",{className:q.assetListWrapper,children:[R(p,{className:q.assetListContainer,subheader:A("li",{}),onScroll:function(t){if(t.target.scrollHeight!==t.target.offsetHeight){var r=t.target.scrollTop+t.target.offsetHeight;Math.abs(t.target.scrollHeight-r)<1&&!function(t,r){return!t.find((function(t){var i=e(t,2);return i[0],i[1].length===y*r}))}(N,k)&&(G("auto"),H("bottom"))}},ref:W,children:[N.map((function(t){var r=e(t,2),i=r[0],s=r[1];return A("li",{className:q.listSection,children:R("ul",{className:q.ul,children:[!C&&A(m,{classes:{gutters:q.listGutters},children:A(h,{className:q.assetTypeSubheaderChip,variant:"outlined",label:b[i].labelPlural},i)}),C&&A(f,{button:!0,classes:{gutters:q.listGutters},onClick:function(){return w(!F,i)},children:A("div",{className:n(q.menuItem,q.allMenuItem),children:R("div",{children:[A(g,{checked:F,indeterminate:E,style:{marginRight:8}}),"All"]})})}),s.map((function(e){var t;return A(f,{"data-testid":"".concat("AssetResultSection","_item_").concat(e.name,"MenuItem"),button:!0,classes:{gutters:q.listGutters},disabled:e.type===b.well.name&&!e.visibility.includes("visible")||!e.redirectAssetId||e.redirectAssetId===d,onClick:function(){return T(e,i)},children:R("div",{className:q.menuItem,children:[R("div",{children:[A(g,{checked:e.checked,style:{marginRight:8}}),e.name]}),R("div",{className:q.statusWrapper,children:[A("div",{className:q.status,style:{background:null===(t=v.find((function(t){return t.value===e.status})))||void 0===t?void 0:t.color}}),o(e.status)]})]})},"item-".concat(i,"-").concat(c(e,"asset_id")?c(e,"asset_id"):c(e,"id")))}))]})},"section-".concat(i))})),u(N)&&A("div",{className:q.empty,children:"Your search did not match any Asset Name"})]}),S&&A(x,{"data-testid":"".concat("AssetResultSection","_loading"),className:q.loadingInfo,children:"Loading..."})]})};k.propTypes={subjectWellId:a.number.isRequired,page:a.number.isRequired,assetType:a.string.isRequired,loading:a.bool.isRequired,groupedAssets:a.arrayOf(a.shape({})).isRequired,onClickAsset:a.func.isRequired,onClickAllAsset:a.func.isRequired,onScrollReached:a.func.isRequired};export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useRef as r,useEffect as o,useMemo as n}from"react";import i from"prop-types";import{get as s}from"lodash";import{withStyles as
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useRef as r,useEffect as o,useMemo as n}from"react";import i from"prop-types";import{get as s}from"lodash";import{withStyles as l,Tooltip as a,makeStyles as p,Chip as c,Input as u}from"@material-ui/core";import d from"@material-ui/icons/Close";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../utils/apiCalls.js";import"../../../effects/useAdvancedWells.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"../../../constants.js";import"../../../../../utils/index.js";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"@babel/runtime/helpers/typeof";import"moment";import"react-virtualized";import{useAssetsData as m}from"../../../effects/useAssetsData.js";import f from"./AssetTypesSection.js";import h from"./AssetResultSection.js";import{SEARCH_CATEGORIES as x,CATEGORY_KEY_VALUES as b}from"./constants.js";import{jsxs as g,jsx as y,Fragment as C}from"react/jsx-runtime";var j=l((function(){return{tooltip:{backgroundColor:"#414141",color:"#ffffff",fontSize:"11px",lineHeight:"16px",borderRadius:"4px",boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.12)",padding:"4px"}}}))(a),I=p((function(e){return{wrapper:{width:"996px",display:"flex",flexDirection:"column",padding:16},inputWrapper:{display:"flex",width:"auto",margin:"0 8px 8px",alignItems:"center",flexWrap:"nowrap",justifyContent:"space-between"},selectedChip:{height:"24px",margin:"4px"},selectedChipDeleteIcon:{width:"16px",height:"16px",color:e.palette.primary.text6,"&:hover":{color:e.palette.primary.text1}},selectedLabel:{fontWeight:400,fontSize:"16px",lineHeight:"22px",color:e.palette.primary.text1,whiteSpace:"nowrap",paddingLeft:"4px",paddingRight:"8px"},disabledIcon:{width:"16px",height:"16px",color:e.palette.primary.text6,opacity:.4},closeIconButton:{padding:0,"&:hover $closeIcon":{color:e.palette.primary.text1}},searchInput:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottom:"2px solid #03BCD4"},closeIcon:{color:e.palette.primary.text6,fontSize:"18px"}}})),v=function(i){var l=i.company,a=i.subjectWellId,p=i.value,v=i.selectedWellIds,A=i.onChange,w=t(null),W=e(w,2),R=W[0],S=W[1],k=t(null),D=e(k,2),T=D[0],q=D[1],z=t(1),N=e(z,2),L=N[0],B=N[1],H=I(),K=r();o((function(){q(p)}),[p]);var O=m(T,R,L,l,v),P=e(O,2),U=P[0],F=P[1],G=n((function(){return R&&F&&0!==F.length?F[0][1].filter((function(e){return e.checked})).length:0}),[R,F]);return g("div",{className:H.wrapper,children:[y("div",{className:H.inputWrapper,children:g("div",{className:H.searchInput,children:[R&&g(C,{children:[y(c,{"data-not-migrated-muichip":!0,classes:{root:H.selectedChip,deleteIcon:H.selectedChipDeleteIcon},label:s(x,[R,"labelPlural"],"Assets"),deleteIcon:y(d,{}),onDelete:function(){S(null)}}),G>0&&g("span",{className:H.selectedLabel,children:[G," Selected"]})]}),y(u,{"data-testid":"".concat("AutoCompleteAssetSearch","_searchInput"),inputRef:K,autoFocus:!0,disableUnderline:!0,fullWidth:!0,value:T||"",placeholder:"Add Offset ...",onChange:function(e){var t=e.target.value;K.current.focus(),q(t),B(1)},onKeyUp:function(t){var r=t.target.value,o=t.keyCode,n=b.find((function(t){var o=e(t,2);return o[0],o[1].autoCategorizedKey===r.trim().toLowerCase()}));if(n&&(13===o||32===o))return q(""),S(n[0]),void B(1);""===r&&8===o&&(S(null),B(1))}}),y(j,{title:"Clear",children:y(d,{className:R||T?H.selectedChipDeleteIcon:H.disabledIcon,onClick:function(){K.current.focus(),q(""),S(null),B(1)}})})]})}),!R&&!T&&y(f,{onClickAssetType:function(e){K.current.focus(),S(e),B(1)}}),(R||T)&&y(h,{subjectWellId:a,page:L,assetType:R,loading:U,groupedAssets:F,onClickAsset:function(e,t){A(!e.checked,[e.redirectAssetId],t)},onClickAllAsset:function(e,t){var r=F[0][1];A(e,r.map((function(e){return e.redirectAssetId})),t)},onScrollReached:function(e){"top"===e&&L>1&&B((function(e){return e-1})),"bottom"===e&&B((function(e){return e+1}))}})]})};v.propTypes={subjectWellId:i.number.isRequired,company:i.number.isRequired,value:i.string.isRequired,selectedWellIds:i.arrayOf(i.number).isRequired,onChange:i.func.isRequired};export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{memo as r,useRef as i,useMemo as o,useEffect as s,useCallback as n}from"react";import p from"classnames";import a from"prop-types";import{Table as l,TableHead as m,TableBody as d,TableRow as c,TableCell as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as j,jsxs as C,Fragment as f}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import A from"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"lodash";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.js";import"../../../../constants/goals.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/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/index.js";import"../../../ContextMenuItem/index.js";import"../../../FolderMenuItem/index.js";import"../../../EditableItem/EditableItem/index.js";import"../../../EditableItem/EditableItemWithBadge/index.js";import"../../../Checkbox/index.js";import"../../../FolderMenuItemWithLinks/index.js";import"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../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"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../PinnableFilters/PinnableFilters.js";import"../../../HeaderLayout/HeaderLayout.js";import"../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../PadOffsetsPicker/StagesSelector.js";import"../../../Table/TableToolbar/TableToolbar.js";import"../../../Tooltip/MuiTooltipDcWrapper.js";import"../../../PriceInput/PriceInput.js";import"../../../LabelsCounter/LabelsCounter.js";import"../../../Stepper/Step.js";import"../../../Stepper/StepsWrapper.js";import"../../../Stepper/Stepper.js";import"../../../Comment/CommentIcon/index.js";import"../../../FilesLoader/FilesLoader.js";import"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/InputAdornmentLeft.js";import"../../../Search/components/Groups.js";import{AdvancedSearch as h}from"./AdvancedSearch/AdvancedSearch.js";import v from"./OffsetWellsTableHead.js";import D from"./OffsetWellsTableRow.js";import{METRICS_LIST as b,EXPANED_WELLNAME_WIDTH as S,TableColumns as g,ROW_HEIGHT as y}from"../../constants.js";import x from"./OffsetWellsTable.module.css.js";import{getIsImperial as I}from"../../utils/unitSystem.js";var P=function(r){var a=r.open,P=r.isTableLoading,T=r.companyId,W=r.subjectWellId,E=r.sortBy,w=r.setSortBy,R=r.sortDirection,B=r.setSortDirection,L=r.columnsWithDict,O=r.wells,k=r.metricsKeys,q=r.setMetricsKeys,V=r.handleChanageOffsetWell,F=r.handleChangeAllOffsetWells,N=r.handleAddRemoveAssets,M=r.isWellNameExpand,H=r.setIsWellNameExpand,K=r.isHscrollMoved,z=r.onHideAdvancedSearch,U=r.isViewOnly,G=r.isLastWell,J=r.contentRef,Q=r.isLimitedOffsetwells,X=r.tableTop,Y=r.wellSections,Z=r.setActiveWellId,$=i(),_=i(),ee=o((function(){var e=O.filter((function(e){return e.checked}));return[e,O.length!==e.length&&e.length&&!Q,e.length===O.length||Q]}),[O,Q]),te=t(ee,3),re=te[0],ie=te[1],oe=te[2],se=o((function(){return I()}),[]),ne=o((function(){return(k||[]).reduce((function(e,t){return e.concat(b.filter((function(e){return e.key===t})))}),[])}),[k]),pe=o((function(){return M?S-58:g[0].width[k.length]-58}),[M,null==k?void 0:k.length]),ae=o((function(){return re.length*y}),[re]);s((function(){var e=$.current.querySelector(".".concat(x.wellNameFixed));K?e.classList.remove(x.noShadow):e.classList.add(x.noShadow);var t=_.current.querySelectorAll(".".concat(x.wellNameFixed));K?t.forEach((function(e){return e.classList.remove(x.noShadow)})):t.forEach((function(e){return e.classList.add(x.noShadow)}))}),[K,_.current,$.current,O]);var le=n((function(e,t){w(e),B(t)}),[]),me=n((function(e){q(e)}),[]),de=n((function(e,t){q((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return P?j(A,{fullscreen:!1}):L&&O?C(f,{children:[j("div",{className:x.stickyTable,children:C(l,{"aria-label":"ows table head",innerRef:$,children:[j(m,{children:j(v,{open:a,columnsWithDict:L,metricsKeys:k,sortBy:E,sortDirection:R,indeterminate:ie,isAllWellsSelected:oe,onChangeSort:le,onChangeMetricsKeys:me,onUpdateMetricsKey:de,isWellNameExpand:M,setIsWellNameExpand:H,handleChangeAllOffsetWells:F,wellNameStyle:x.wellNameFixed,isViewOnly:U,isImperial:se,contentRef:J})}),!U&&j(d,{children:j(c,{children:j(u,{className:x.searchCell,children:j(h,{companyId:T,wells:O,onChange:N,selectedWellIds:re.map((function(e){return e.id})),onHideAdvancedSearch:z})})})})]})}),j(l,{"aria-label":"ows table body",innerRef:_,className:x.bodyTable,children:C(d,{children:[j(c,{children:j(u,{className:p(x.topShadow,e({},x.viewOnlyShadow,U))})}),O.map((function(e){return j(D,{columnsWithDict:L,subjectWellId:W,data:e,metricsKeys:k,metricsColumns:ne,handleChanageOffsetWell:V,isWellNameExpand:M,wellNameStyle:x.wellNameFixed,wellNameWidth:pe,isViewOnly:U,isImperial:se,isLimitedOffsetwells:Q,flyTo:ae,tableTop:X,wellSections:Y,setActiveWellId:Z},e.id)})),!G&&j(c,{children:j(u,{className:x.loadingCell,children:j("span",{children:"Loading..."})})}),j(c,{children:j(u,{className:x.bottomShadow})})]})})]}):null};P.propTypes={open:a.bool.isRequired,isTableLoading:a.bool.isRequired,companyId:a.number.isRequired,subjectWellId:a.number.isRequired,sortBy:a.string.isRequired,setSortBy:a.func.isRequired,sortDirection:a.string.isRequired,setSortDirection:a.func.isRequired,columnsWithDict:a.arrayOf(a.shape({})).isRequired,wells:a.arrayOf(a.shape({})).isRequired,metricsKeys:a.arrayOf(a.string).isRequired,setMetricsKeys:a.func.isRequired,handleChanageOffsetWell:a.func.isRequired,handleChangeAllOffsetWells:a.func.isRequired,handleAddRemoveAssets:a.func.isRequired,setIsWellNameExpand:a.func.isRequired,isWellNameExpand:a.bool.isRequired,isHscrollMoved:a.bool.isRequired,onHideAdvancedSearch:a.func.isRequired,isViewOnly:a.bool.isRequired,isLastWell:a.bool.isRequired,isLimitedOffsetwells:a.bool.isRequired,contentRef:a.shape().isRequired,tableTop:a.number.isRequired,wellSections:a.arrayOf(a.shape({})).isRequired,setActiveWellId:a.func.isRequired};var T=r(P);export{T as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{memo as r,useRef as i,useMemo as o,useEffect as s,useCallback as n}from"react";import p from"classnames";import a from"prop-types";import{Table as l,TableHead as m,TableBody as d,TableRow as c,TableCell as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as j,jsxs as C,Fragment as f}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import A from"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"lodash";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.js";import"../../../../constants/goals.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/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/index.js";import"../../../ContextMenuItem/index.js";import"../../../FolderMenuItem/index.js";import"../../../EditableItem/EditableItem/index.js";import"../../../EditableItem/EditableItemWithBadge/index.js";import"../../../Checkbox/index.js";import"../../../FolderMenuItemWithLinks/index.js";import"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../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"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../PinnableFilters/PinnableFilters.js";import"../../../HeaderLayout/HeaderLayout.js";import"../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../PadOffsetsPicker/StagesSelector.js";import"../../../Table/TableToolbar/TableToolbar.js";import"../../../Tooltip/MuiTooltipDcWrapper.js";import"../../../PriceInput/PriceInput.js";import"../../../LabelsCounter/LabelsCounter.js";import"../../../Stepper/Step.js";import"../../../Stepper/StepsWrapper.js";import"../../../Stepper/Stepper.js";import"../../../Comment/CommentIcon/index.js";import"../../../FilesLoader/FilesLoader.js";import"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/InputAdornmentLeft.js";import"../../../Search/components/Groups.js";import{AdvancedSearch as h}from"./AdvancedSearch/AdvancedSearch.js";import v from"./OffsetWellsTableHead.js";import b from"./OffsetWellsTableRow.js";import{METRICS_LIST as D,EXPANED_WELLNAME_WIDTH as S,TableColumns as g,ROW_HEIGHT as y}from"../../constants.js";import x from"./OffsetWellsTable.module.css.js";import{getIsImperial as I}from"../../utils/unitSystem.js";var P=function(r){var a=r.open,P=r.isTableLoading,T=r.companyId,W=r.subjectWellId,E=r.sortBy,w=r.setSortBy,R=r.sortDirection,B=r.setSortDirection,L=r.columnsWithDict,O=r.wells,k=r.metricsKeys,q=r.setMetricsKeys,V=r.handleChanageOffsetWell,F=r.handleChangeAllOffsetWells,N=r.handleAddRemoveAssets,M=r.isWellNameExpand,H=r.setIsWellNameExpand,K=r.isHscrollMoved,z=r.onHideAdvancedSearch,U=r.isViewOnly,G=r.isLastWell,J=r.contentRef,Q=r.isLimitedOffsetwells,X=r.tableTop,Y=r.wellSections,Z=r.setActiveWellId,$=i(),_=i(),ee=o((function(){var e=O.filter((function(e){return e.checked}));return[e,O.length!==e.length&&e.length&&!Q,e.length===O.length||Q]}),[O,Q]),te=t(ee,3),re=te[0],ie=te[1],oe=te[2],se=o((function(){return I()}),[]),ne=o((function(){return(k||[]).reduce((function(e,t){return e.concat(D.filter((function(e){return e.key===t})))}),[])}),[k]),pe=o((function(){return M?S-58:g[0].width[k.length]-58}),[M,null==k?void 0:k.length]),ae=o((function(){return re.length*y}),[re]);s((function(){var e=$.current.querySelector(".".concat(x.wellNameFixed));K?e.classList.remove(x.noShadow):e.classList.add(x.noShadow);var t=_.current.querySelectorAll(".".concat(x.wellNameFixed));K?t.forEach((function(e){return e.classList.remove(x.noShadow)})):t.forEach((function(e){return e.classList.add(x.noShadow)}))}),[K,_.current,$.current,O]);var le=n((function(e,t){w(e),B(t)}),[]),me=n((function(e){q(e)}),[]),de=n((function(e,t){q((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return P?j(A,{fullscreen:!1}):L&&O?C(f,{children:[j("div",{className:x.stickyTable,children:C(l,{"aria-label":"ows table head",innerRef:$,children:[j(m,{children:j(v,{open:a,columnsWithDict:L,metricsKeys:k,sortBy:E,sortDirection:R,indeterminate:ie,isAllWellsSelected:oe,onChangeSort:le,onChangeMetricsKeys:me,onUpdateMetricsKey:de,isWellNameExpand:M,setIsWellNameExpand:H,handleChangeAllOffsetWells:F,wellNameStyle:x.wellNameFixed,isViewOnly:U,isImperial:se,contentRef:J})}),!U&&j(d,{children:j(c,{children:j(u,{className:x.searchCell,children:j(h,{companyId:T,subjectWellId:W,wells:O,onChange:N,selectedWellIds:re.map((function(e){return e.id})),onHideAdvancedSearch:z})})})})]})}),j(l,{"aria-label":"ows table body",innerRef:_,className:x.bodyTable,children:C(d,{children:[j(c,{children:j(u,{className:p(x.topShadow,e({},x.viewOnlyShadow,U))})}),O.map((function(e){return j(b,{columnsWithDict:L,subjectWellId:W,data:e,metricsKeys:k,metricsColumns:ne,handleChanageOffsetWell:V,isWellNameExpand:M,wellNameStyle:x.wellNameFixed,wellNameWidth:pe,isViewOnly:U,isImperial:se,isLimitedOffsetwells:Q,flyTo:ae,tableTop:X,wellSections:Y,setActiveWellId:Z},e.id)})),!G&&j(c,{children:j(u,{className:x.loadingCell,children:j("span",{children:"Loading..."})})}),j(c,{children:j(u,{className:x.bottomShadow})})]})})]}):null};P.propTypes={open:a.bool.isRequired,isTableLoading:a.bool.isRequired,companyId:a.number.isRequired,subjectWellId:a.number.isRequired,sortBy:a.string.isRequired,setSortBy:a.func.isRequired,sortDirection:a.string.isRequired,setSortDirection:a.func.isRequired,columnsWithDict:a.arrayOf(a.shape({})).isRequired,wells:a.arrayOf(a.shape({})).isRequired,metricsKeys:a.arrayOf(a.string).isRequired,setMetricsKeys:a.func.isRequired,handleChanageOffsetWell:a.func.isRequired,handleChangeAllOffsetWells:a.func.isRequired,handleAddRemoveAssets:a.func.isRequired,setIsWellNameExpand:a.func.isRequired,isWellNameExpand:a.bool.isRequired,isHscrollMoved:a.bool.isRequired,onHideAdvancedSearch:a.func.isRequired,isViewOnly:a.bool.isRequired,isLastWell:a.bool.isRequired,isLimitedOffsetwells:a.bool.isRequired,contentRef:a.shape().isRequired,tableTop:a.number.isRequired,wellSections:a.arrayOf(a.shape({})).isRequired,setActiveWellId:a.func.isRequired};var T=r(P);export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{sortBy as t}from"lodash";import"../../utils/index.js";import*as a from"../../utils/metrics/metricsConfig.js";var l="all",
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import{sortBy as t}from"lodash";import"../../utils/index.js";import*as a from"../../utils/metrics/metricsConfig.js";var l=800,i={normal:"normal",small:"small screen",tablet:"tablet",mobile:"mobile"},o=50,r="all",s="All",n=450,p=50,_=60,m=a,c={status:"status",rig:"rigName",program:"programName",basin:"basin",county:"county",area:"area",formation:"formation",stringDesign:"stringDesign",radius:"radius",period:"period",sideTracks:"sideTracks",timeRangeFrom:"timeRangeFrom",timeRangeTo:"timeRangeTo"},d=[{value:c.rig,label:"Rig"},{value:c.program,label:"Program"},{value:c.basin,label:"Basin"},{value:c.county,label:"County"},{value:c.area,label:"Area"},{value:c.formation,label:"Target Formation"},{value:c.stringDesign,label:"String Design"}],u={unknown:"unknown",idle:"idle",active:"active",paused:"paused",complete:"complete"},g=[{value:u.unknown,color:"#9E9E9E"},{value:u.idle,color:"#BDBDBD"},{value:u.active,color:"#95F126"},{value:u.paused,color:"#FFF350"},{value:u.complete,color:"#2196F3"}],b={name:"name",status:"status",rig:"rigName",distance:"distance",lastActive:"lastActive",metrics:"metrics",wellSection:"wellSection"},v=[{type:b.name,label:"Well Name",key:b.name,width:[280,197,197,186]},{type:b.status,label:"",key:b.status,width:[40,40,40,30]},{type:b.rig,label:"Rig",key:b.rig,width:[220,140,140,93]},{type:b.distance,label:"Distance",key:b.distance,width:[160,160,122,93]},{type:b.lastActive,label:"Last Active",key:b.lastActive,width:[140,140,108,98]},{type:b.metrics,label:"",key:"",width:[0,212,141,141]},{type:b.wellSection,label:"Well Section",key:b.wellSection,width:[180,131,131,97]}],y=[{value:"all",label:"All"},{value:"last12h",label:"Last 12 hrs"},{value:"last24h",label:"Last 24 hrs"},{value:"last7d",label:"Last 7 days"},{value:"lastMonth",label:"Last Month"},{value:"custom",label:"Сustom"}],h=3,F=t([m.weight_to_weight_average,m.bottom_to_slips_average,m.drilling_connection_average,m.slips_to_bottom_average,m.hole_depth,m.hole_depth_change,m.drilled_feet_rotary,m.drilled_feet_slide,m.rop_gross,m.rop,m.rop_rotary,m.rop_slide,m.drilled_feet_rotary_percentage,m.drilled_feet_slide_percentage,m.on_bottom_percentage,m.on_bottom_time,m.cost_per_ft,m.cost_per_lat_ft,m.feet_per_day,m.tripping_in_speed_cased,m.tripping_in_speed_open,m.tripping_in_speed,m.tripping_out_speed_cased,m.tripping_out_speed_open,m.tripping_out_speed].concat(e("production"!==process.env.REACT_APP_ENVIRONMENT?[m.npt,m.circulating_time,m.spud_to_rig_release_time,m.spud_to_total_depth_time]:[])),"label"),w=F.map((function(e){return e.key})),f=["#6EACFF","#69B919","#E95DAF","#A77DFF","#77FFC1","#018EFE","#FF5D7E","#B9E310","#FFD111","#24BB8E","#C426F3"];export{r as ALL_SECTION_KEY,s as ALL_SECTION_LABEL,b as ColumnType,n as EXPANED_WELLNAME_WIDTH,d as FilterOptions,c as FilterType,h as MAX_METRICS_COUNT,o as MAX_OFFSET_SIZE,w as METRICS_KEYS,F as METRICS_LIST,y as OBJECTIVE_PERIOD_LIST,p as ROWS_PER_PAGE,_ as ROW_HEIGHT,l as SMALL_SCREEN_HEIGHT,g as StatusOptions,v as TableColumns,i as ViewType,f as WellSectionColors,u as WellStatus};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import a from"@babel/runtime/regenerator";import{useState as o,useEffect as c}from"react";import{isEmpty as l,uniq as
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import a from"@babel/runtime/regenerator";import{useState as o,useEffect as c}from"react";import{isEmpty as l,uniq as s,get as u}from"lodash";import{fetchOffsetWellSelections as i,fetchWellhubWells as p}from"../utils/apiCalls.js";import{WellSectionColors as f,ALL_SECTION_KEY as b,ALL_SECTION_LABEL as m}from"../constants.js";function v(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var h=function(v,h){var y=o(null),d=n(y,2),j=d[0],w=d[1],x=o(null),P=n(x,2),g=P[0],k=P[1];return c((function(){var n,o,c=(n=t(a.mark((function t(){var n,o,c,u,p,v;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!h){t.next=7;break}return t.next=4,i(h);case 4:t.t0=t.sent,t.next=8;break;case 7:t.t0=[];case 8:n=t.t0,o=!l(n)&&JSON.parse(n[0].data.filters),c=!l(n)&&n[0].data.result&&JSON.parse(n[0].data.result),o&&c?(u=o.filterTabs.map((function(e,r){return{value:e.value,label:e.name,color:f[r]}})),p=[],v=u.reduce((function(e,t){var n=t.value,a=s(c[n].concat(h));return p=p.concat(a),O(O({},e),{},r({},n,a))}),{}),v=O(O({},v),{},r({},b,s(p))),w([{value:b,label:m}].concat(e(u))),k(v)):(w([{value:b,label:m}]),k(r({},b,[h]))),t.next=19;break;case 14:t.prev=14,t.t1=t.catch(0),console.error("offetwell selection fetch error: ",t.t1),w([]),k([]);case 19:case"end":return t.stop()}}),t,null,[[0,14]])}))),function(){return n.apply(this,arguments)}),y=(o=t(a.mark((function e(){var t,n,o;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p(h);case 3:t=e.sent,n=u(t[0],"data.offset_wells")||[],o=r({},b,s(n.map((function(e){return e.id})).concat(h))),w([{value:b,label:m}]),k(o),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(0),console.error("wellhub fetch error: ",e.t0),w([]),k([]);case 15:case"end":return e.stop()}}),e,null,[[0,10]])}))),function(){return o.apply(this,arguments)});h?v?c():y():(w([]),k([]))}),[v,h]),[j,g]};export{h as useBicWells};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import a from"jsona";import{range as s,get as i,concat as u}from"lodash";import{getAppStorage as
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import a from"jsona";import{range as s,get as i,concat as u}from"lodash";import{getAppStorage as c,getAssets as o,getCompanyGoals as p,getWells as l,getRigs as f}from"../../../clients/jsonApi/index.js";import{METRICS_KEYS as b,ROWS_PER_PAGE as m}from"../constants.js";function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?d(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=new a;function h(t,e){return g.apply(this,arguments)}function g(){return(g=r(n.mark((function t(e,r){var a,s,u;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=null,t.prev=1,t.next=4,o({types:["well"],company_id:e?+e:void 0,fields:["asset.name","asset.parent_asset_id","asset.parent_asset_name","asset.status","asset.stats","asset.target_formation","asset.string_design","asset.root_asset_name","asset.basin","asset.county","asset.area","asset.visibility","asset.top_hole","asset.settings","well.settings","asset.last_active_at"],per_page:1e4,sort:"name"});case 4:a=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:if(s=a?a.data.map((function(t){return{id:Number(t.id),name:i(t,"attributes.name"),status:i(t,"attributes.status"),rigId:i(t,"attributes.parent_asset_id")||"Null",rigName:i(t,"attributes.parent_asset_name")||"Null",formation:i(t,"attributes.target_formation")||"Null",stringDesign:i(t,"attributes.string_design")||"Null",programName:i(t,"attributes.root_asset_name")||"Null",basin:i(t,"attributes.basin")||"Null",county:i(t,"attributes.county")||"Null",area:i(t,"attributes.area")||"Null",visibility:i(t,"attributes.visibility"),topHole:i(t,"attributes.top_hole"),rigReleaseDate:i(t,"attributes.stats.well_end"),totalDepth:i(t,"attributes.stats.total_depth"),is_usable:!0,apiNumber:i(t,"attributes.settings.api_number","-"),lastActive:new Date(i(t,"attributes.last_active_at")).getTime()/1e3}})).filter((function(t){return t.visibility.includes("visible")})):[],"function"!=typeof r){t.next=16;break}return t.next=14,r(s);case 14:return u=t.sent,t.abrupt("return",u);case 16:return t.abrupt("return",s);case 17:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function _(t){return w.apply(this,arguments)}function w(){return(w=r(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",c("corva","data.offset-wells.bic",e,{limit:1,sort:"{timestamp: -1}"}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t){return k.apply(this,arguments)}function k(){return(k=r(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=null,t.prev=1,t.next=4,c("corva","data.offset_wells",e,{limit:1});case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:return t.abrupt("return",r||[]);case 11:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function O(t){return N.apply(this,arguments)}function N(){return(N=r(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,p(e);case 3:r=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0);case 9:return t.abrupt("return",r&&i(r,"company_goals")||{});case 10:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}function j(t,e){return P.apply(this,arguments)}function P(){return P=r(n.mark((function t(a,i){var u,o,p;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==i.length){t.next=2;break}return t.abrupt("return",[]);case 2:return u=Math.floor(i.length/200)+1,t.next=5,Promise.all(s(u).map(function(){var t=r(n.mark((function t(e,r){var s,u,o,p;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company_id:a,"data.asset_id":{$in:i.slice(200*r,200*(r+1))},"data.key":{$in:b},"data.type":"asset"},u={_id:0,"data.key":1,"data.value":1,asset_id:"$data.asset_id"},o={aggregate:JSON.stringify([{$match:s},{$project:u}])},p=null,t.prev=4,t.next=7,c("corva","metrics",null,o);case 7:p=t.sent,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(4),console.error(t.t0);case 13:return t.abrupt("return",p||[]);case 14:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e,r){return t.apply(this,arguments)}}()));case 5:return o=t.sent,p=[],o.forEach((function(t){return p.push.apply(p,e(t))})),t.abrupt("return",p);case 9:case"end":return t.stop()}}),t)}))),P.apply(this,arguments)}function D(t,e,r){return A.apply(this,arguments)}function A(){return(A=r(n.mark((function t(e,r,a){var s,i,u;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company:a,search:e,per_page:m,page:r,fields:["well.name","well.asset_id","well.settings","well.status","well.rigName","well.visibility"],sort:"name"},t.prev=2,t.next=5,l(s);case 5:i=t.sent,t.next=12;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0),i=[];case 12:return u=y.deserialize(i),t.abrupt("return",u.map((function(t){return{redirectAssetId:t.asset_id,apiNumber:t.settings.api_number,name:t.name,asset_id:t.asset_id,status:t.status,rigName:t.rigName,visibility:t.visibility,type:"well"}})));case 14:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function $(t,e,r){return E.apply(this,arguments)}function E(){return(E=r(n.mark((function t(e,r,a){var s,u,c;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company:a,search:e,per_page:m,page:r,fields:["rig.name","rig.active_well","rig.asset_id"],sort:"name"},t.prev=2,t.next=5,f(s);case 5:u=t.sent,t.next=12;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0),u=[];case 12:return c=y.deserialize(u),t.abrupt("return",c.map((function(t){return v({redirectAssetId:i(t,["active_well","asset_id"])||null},t)})));case 14:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function I(t,e){return S.apply(this,arguments)}function S(){return S=r(n.mark((function t(r,a){var s,i,c,o,p,l=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=l.length>2&&void 0!==l[2]?l[2]:1,i=l.length>3?l[3]:void 0,"well"!==a){t.next=7;break}return t.next=5,D(r,s,i);case 5:return c=t.sent,t.abrupt("return",c);case 7:if("rig"!==a){t.next=12;break}return t.next=10,$(r,s,i);case 10:return o=t.sent,t.abrupt("return",o);case 12:return t.next=14,Promise.all([D(r,s,i),$(r,s,i)]);case 14:return p=t.sent,t.abrupt("return",u.apply(void 0,e(p)));case 16:case"end":return t.stop()}}),t)}))),S.apply(this,arguments)}export{I as fetchAllAssets,O as fetchCompanyGoals,j as fetchMetricsData,_ as fetchOffsetWellSelections,x as fetchWellhubWells,h as fetchWells};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./palette.mjs.js";var e=o.primary,t=o.background,i={
|
|
1
|
+
import o from"./palette.mjs.js";var e=o.primary,t=o.background,i={MuiTableCell:{root:{borderBottomColor:e.text9,height:56,letterSpacing:"0.4px",lineHeight:"20px",paddingLeft:8,paddingRight:8,"&.dense":{fontSize:14,lineHeight:"14px",height:28}},stickyHeader:{backgroundColor:t.b6},head:{color:e.text7,fontSize:14,lineHeight:"14px","&.MuiTableCell-sizeSmall":{fontSize:12,height:48,lineHeight:"14px"},"&.dense":{fontSize:12,lineHeight:"12px",height:28}},body:{fontSize:16},sizeSmall:{fontSize:14,height:48,lineHeight:"20px",paddingRight:16}},MuiTableRow:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"},"&.Mui-selected, .MuiTableRow-root.Mui-selected:hover":{backgroundColor:"rgba(3, 188, 212, 0.2)"}},head:{borderTop:"1px solid ".concat(e.text9)}},MuiTableSortLabel:{root:{flexDirection:"row",justifyContent:"flex-end","&:hover":{color:o.primary.contrastText,"& .MuiTableSortLabel-icon":{opacity:1,color:o.primary.contrastText},"&.MuiTableSortLabel-active":{color:o.primary.contrastText,"&.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiSvgIcon-root.MuiTableSortLabel-icon":{color:o.primary.contrastText}}},"&.MuiTableSortLabel-active":{color:o.primary.text7,"&.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiSvgIcon-root.MuiTableSortLabel-icon":{color:o.primary.text7}}},icon:{marginRight:0,color:o.primary.text7,fontSize:16}},MuiTablePagination:{toolbar:{paddingTop:10},caption:{fontSize:12},selectRoot:{marginRight:31,marginLeft:3,"& .MuiTablePagination-select":{paddingRight:31,paddingLeft:2}},input:{fontSize:12,position:"relative",top:1},selectIcon:{"&.MuiSvgIcon-root.MuiSelect-icon":{fontSize:16,top:5}},actions:{marginLeft:23,"& .MuiIconButton-root":{color:e.text6,fontSize:16,padding:7,"&:hover":{color:e.contrastText},"&.Mui-disabled":{color:e.text8}}},root:{"& .MuiSvgIcon-root":{color:"inherit",fontSize:"inherit"}}}};export{i as default};
|