@corva/ui 0.64.0-9 → 0.65.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/components/AssetEditorV2/components/SecondaryAssetSelect.js +1 -1
- package/cjs-bundle/components/AssetEditorV2/effects/index.js +1 -1
- package/cjs-bundle/components/AssetEditorV2/index.js +1 -1
- package/cjs-bundle/components/AssetNameLabel/AssetNameLabel.js +1 -1
- package/cjs-bundle/components/AssetNameLabel/AssetNameLabel.styles.css.js +1 -1
- package/cjs-bundle/components/AssetNameLabel/SecondaryAssetNameLable.styles.css.js +1 -1
- package/cjs-bundle/components/Attachment/index.js +1 -1
- package/cjs-bundle/components/DevCenter/AppHeader/AppHeader.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js +1 -1
- package/cjs-bundle/components/GradientPicker/GradientPicker.utils.js +1 -1
- package/cjs-bundle/components/IconButton/index.js +1 -1
- package/cjs-bundle/components/Modal/CorvaModal.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -0
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js +1 -1
- package/cjs-bundle/components/PadModeSelect/PadModeSelect.js +1 -1
- package/cjs-bundle/components/PadModeSelect/WellStreamActivityStatus.js +1 -1
- package/cjs-bundle/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.js +1 -1
- package/cjs-bundle/components/PadModeSelect/effects/useWellStreamsData.js +1 -1
- package/cjs-bundle/components/StatusBadge/constants.js +1 -1
- package/cjs-bundle/utils/bha.js +1 -1
- package/components/AssetEditorV2/components/SecondaryAssetSelect.d.ts.map +1 -1
- package/components/AssetEditorV2/components/SecondaryAssetSelect.js +1 -1
- package/components/AssetEditorV2/effects/index.d.ts +2 -1
- package/components/AssetEditorV2/effects/index.d.ts.map +1 -1
- package/components/AssetEditorV2/effects/index.js +1 -1
- package/components/AssetEditorV2/index.d.ts +6 -1
- package/components/AssetEditorV2/index.d.ts.map +1 -1
- package/components/AssetEditorV2/index.js +1 -1
- package/components/AssetNameLabel/AssetNameLabel.d.ts.map +1 -1
- package/components/AssetNameLabel/AssetNameLabel.js +1 -1
- package/components/AssetNameLabel/AssetNameLabel.styles.css.js +1 -1
- package/components/AssetNameLabel/SecondaryAssetNameLable.styles.css.js +1 -1
- package/components/Attachment/index.js +1 -1
- package/components/DevCenter/AppHeader/AppHeader.d.ts.map +1 -1
- package/components/DevCenter/AppHeader/AppHeader.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js +1 -1
- package/components/Formula/CloseSuggestion.d.ts +4 -0
- package/components/Formula/CloseSuggestion.d.ts.map +1 -0
- package/components/Formula/Formula.d.ts +25 -0
- package/components/Formula/Formula.d.ts.map +1 -0
- package/components/Formula/FormulaTextEditor.d.ts +12 -0
- package/components/Formula/FormulaTextEditor.d.ts.map +1 -0
- package/components/Formula/RootXIcon.d.ts +15 -0
- package/components/Formula/RootXIcon.d.ts.map +1 -0
- package/components/Formula/SuggestionsMenu.d.ts +7 -0
- package/components/Formula/SuggestionsMenu.d.ts.map +1 -0
- package/components/Formula/__tests__/Formula.test.d.ts +2 -0
- package/components/Formula/__tests__/Formula.test.d.ts.map +1 -0
- package/components/Formula/__tests__/utils.test.d.ts +2 -0
- package/components/Formula/__tests__/utils.test.d.ts.map +1 -0
- package/components/Formula/index.d.ts +2 -0
- package/components/Formula/index.d.ts.map +1 -0
- package/components/Formula/useFormulaFunction.d.ts +5 -0
- package/components/Formula/useFormulaFunction.d.ts.map +1 -0
- package/components/Formula/useFormulaStyles.d.ts +2 -0
- package/components/Formula/useFormulaStyles.d.ts.map +1 -0
- package/components/Formula/utils.d.ts +11 -0
- package/components/Formula/utils.d.ts.map +1 -0
- package/components/GradientPicker/GradientPicker.utils.d.ts.map +1 -1
- package/components/GradientPicker/GradientPicker.utils.js +1 -1
- package/components/IconButton/index.d.ts +1 -1
- package/components/IconButton/index.d.ts.map +1 -1
- package/components/IconButton/index.js +1 -1
- package/components/Modal/CorvaModal.d.ts +1 -1
- package/components/Modal/CorvaModal.d.ts.map +1 -1
- package/components/Modal/CorvaModal.js +1 -1
- package/components/Modal/types.d.ts +1 -0
- package/components/Modal/types.d.ts.map +1 -1
- package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.d.ts +16 -0
- package/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.d.ts.map +1 -0
- package/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -0
- package/components/OffsetWellPickerV2/components/Filter/index.d.ts +5 -1
- package/components/OffsetWellPickerV2/components/Filter/index.d.ts.map +1 -1
- package/components/OffsetWellPickerV2/components/Filter/index.js +1 -1
- package/components/OffsetWellPickerV2/effects/index.d.ts +1 -1
- package/components/OffsetWellPickerV2/effects/index.d.ts.map +1 -1
- package/components/OffsetWellPickerV2/effects/index.js +1 -1
- package/components/PadModeSelect/PadModeSelect.d.ts.map +1 -1
- package/components/PadModeSelect/PadModeSelect.js +1 -1
- package/components/PadModeSelect/WellStreamActivityStatus.d.ts.map +1 -1
- package/components/PadModeSelect/WellStreamActivityStatus.js +1 -1
- package/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.d.ts +2 -1
- package/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.d.ts.map +1 -1
- package/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.js +1 -1
- package/components/PadModeSelect/effects/useWellStreamsData.d.ts.map +1 -1
- package/components/PadModeSelect/effects/useWellStreamsData.js +1 -1
- package/components/StatusBadge/constants.d.ts.map +1 -1
- package/components/StatusBadge/constants.js +1 -1
- package/components/SwitchControl/index.d.ts +2 -16
- package/components/SwitchControl/index.d.ts.map +1 -1
- package/components/SwitchControl/types.d.ts +2 -2
- package/components/SwitchControl/types.d.ts.map +1 -1
- package/package.json +2 -1
- package/utils/bha.d.ts.map +1 -1
- package/utils/bha.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/slicedToArray";import{memo as t,useState as i,useEffect as o,useMemo as l,useCallback as r}from"react";import s from"prop-types";import{get as c,orderBy as a,uniq as d}from"lodash";import{makeStyles as u,Dialog as f,DialogTitle as m,Typography as p,Tooltip as b,IconButton as g,DialogContent as h,DialogActions as y,Button as S}from"@material-ui/core";import j from"@material-ui/icons/Close";import{useTheme as W}from"@material-ui/core/styles";import v from"@material-ui/core/useMediaQuery";import I from"classnames";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/slicedToArray";import{memo as t,useState as i,useEffect as o,useMemo as l,useCallback as r}from"react";import s from"prop-types";import{get as c,orderBy as a,uniq as d}from"lodash";import{makeStyles as u,Dialog as f,DialogTitle as m,Typography as p,Tooltip as b,IconButton as g,DialogContent as h,DialogActions as y,Button as S}from"@material-ui/core";import j from"@material-ui/icons/Close";import{useTheme as W}from"@material-ui/core/styles";import v from"@material-ui/core/useMediaQuery";import I from"classnames";import C from"../../permissions/usePermissions.js";import{PERMISSIONS as O}from"../../permissions/constants/index.js";import"../../permissions/withPermissionsHOC.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../clients/jsonApi/index.js";import"../../permissions/ProvidePermissions.js";import"../../permissions/PermissionsContext.js";import x from"../LoadingIndicator/LoadingIndicator.js";import N from"./components/Filter/index.js";import A from"./components/Map/index.js";import k from"./components/Table/index.js";import{useCompanies as D,useWells as w,useCompanyMetricKey as P,useFilteredWells as T,useWellsWithCoords as B,useRadiusWells as R,useOffsetWells as E,useMetricsData as z}from"./effects/index.js";import{DEFAULT_SETTINGS as L}from"./constants.js";import{jsxs as U,jsx as _,Fragment as q}from"react/jsx-runtime";import M from"./effects/biDirectionalFiltering.js";function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function H(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?F(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):F(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var K=u((function(e){return{dialogTitles:{display:"flex",justifyContent:"space-between",alignItems:"center"},title:{fontSize:20},subTitle:{fontSize:14,color:"#03BCD4","&:hover":{cursor:"pointer",textDecoration:"underline"}},subTitleSpace:{fontSize:14,color:"#03BCD4"},titleArea:{display:"flex",alignItems:"center"},closeIconButton:{fontSize:20,padding:4,"&:hover $closeIcon":{color:"#fff"}},closeIcon:{color:"#BDBDBD"},dialogActions:{justifyContent:"space-between",paddingTop:8,paddingBottom:8},bottomShadow:{width:"100%",height:"16px",backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9,")"),position:"absolute",bottom:"52px",zIndex:2},dialogActionsSmallScreen:{paddingRight:"100px"},dialogContent:{display:"flex",flexDirection:"column"},tabs:{background:"#414141"},selectedWells:{display:"flex",alignItems:"center"},selected:{fontSize:16},selectedLabel:{fontSize:12,marginLeft:14,color:"rgba(255, 255, 255, 0.54)"},selectedNumber:{fontSize:12,margin:4,color:"rgba(255, 255, 255, 0.8)"}}})),V=function(t){var s=t.isOpen,u=t.defaultSubjectWellId,F=t.companyId,V=t.offsetSetting,G=t.currentUser,Q=t.addWellsUsabilityInfo,$=t.unusableWellAlarm,J=t.isAdvancedSearch,X=t.bestCount,Y=t.onClose,Z=t.onSave,ee=K(),ne=W(),te=v(ne.breakpoints.down("sm")),ie=C([O.companySelectorView]),oe=n(ie,1)[0].active,le=i(F||c(V,"companyId")||+c(G,"company_id")),re=n(le,2),se=re[0],ce=re[1],ae=i(c(V,"subjectWellId")||u),de=n(ae,2),ue=de[0],fe=de[1],me=i(c(V,"filters")||L.filters),pe=n(me,2),be=pe[0],ge=pe[1],he=i(c(V,"radius")||L.radius),ye=n(he,2),Se=ye[0],je=ye[1],We=i(c(V,"excludeSideTrack")||!1),ve=n(We,2),Ie=ve[0],Ce=ve[1],Oe=i(c(V,"excludeNonEngineeredWells")||!1),xe=n(Oe,2),Ne=xe[0],Ae=xe[1],ke=i([]),De=n(ke,2),we=De[0],Pe=De[1],Te=i(L.sortInfo),Be=n(Te,2),Re=Be[0],Ee=Be[1],ze=i(!1),Le=n(ze,2),Ue=Le[0],_e=Le[1],qe=i([]),Me=n(qe,2),Fe=Me[0],He=Me[1];o((function(){s&&(He(c(V,"selectedWellIds")||[]),ce(F||c(V,"companyId")||+c(G,"company_id")),fe(c(V,"subjectWellId")||u))}),[s,V]);var Ke=l((function(){return!!ue}),[ue]),Ve=D(oe,J&&u,se),Ge=w(se,Q),Qe=P(se);o((function(){Pe((function(e){return Qe?[Qe]:e}))}),[Qe]);var $e=M(be,Ge),Je=T(be,Ie,Ne,Ge),Xe=l((function(){return Je&&ue?Je.find((function(e){return e.id===ue})):null}),[Je,ue]),Ye=B(Je,Xe);R(Se,Ye,He);var Ze=E(Se,Ge,Fe),en=z(se,Ye),nn=n(en,2),tn=nn[0],on=nn[1],ln=l((function(){return on?a(on,Re.key,1===Re.direction?"asc":"desc"):on}),[Re,on]),rn=r((function(e){ce(e),fe(null),He([]),ge(L.filters)}),[]),sn=r((function(e){var n=Je.find((function(n){return n.id===e}));n&&n.is_usable&&He(d(Fe.concat(e)))}),[Fe,Je]),cn=r((function(e){He(d(Fe.filter((function(n){return n!==e}))))}),[Fe]),an=r((function(){He(Je.filter((function(e){return e.is_usable})).map((function(e){return e.id})))}),[Je]),dn=r((function(){He([])}),[Je]),un=r((function(e){He([]),fe(e)}),[Ge]),fn=r((function(){He([]),fe(null)}),[]),mn=r((function(e){je(e)}),[]),pn=r((function(e){Ce(e)}),[]),bn=r((function(e){Ae(e)}),[]),gn=r((function(n,t){ge((function(i){return H(H({},i),{},e({},n,t))})),He([])}),[]),hn=r((function(){ge(H({},L.filters)),He([])}),[]),yn=r((function(){_e((function(e){return!e}))}),[]),Sn=r((function(e){Pe(e)}),[]),jn=r((function(e){Ee((function(n){return n.key===e?H(H({},n),{},{direction:-1*n.direction}):{key:e,direction:1}}))}),[]),Wn=function(){Y()},vn=!(Ge&&Je&&Ye&&on&&Ze&&ln);return U(f,{onBackdropClick:Y,onEscapeKeyDown:Y,maxWidth:"lg",fullWidth:!0,fullScreen:te,open:s,children:[_(m,{children:U("div",{className:ee.dialogTitles,children:[J?U("div",{className:ee.titleArea,children:[_(p,{className:ee.subTitle,onClick:Wn,children:"Select Offset Wells"}),_(p,{className:ee.subTitleSpace,children:" / "}),_(p,{className:ee.title,children:"Advanced Search"})]}):_(p,{className:ee.title,children:"Select Offset Wells"}),_(b,{title:"Close",children:_(g,{"data-not-migrated-muiiconbutton":!0,"aria-label":"close",className:ee.closeIconButton,onClick:Y,children:_(j,{className:ee.closeIcon})})})]})}),_(h,{className:ee.dialogContent,children:vn?_(x,{fullscreen:!1}):U(q,{children:[_(N,{companyId:se,companies:Ve,canViewCompanies:oe,radius:Se,excludeSideTrack:Ie,excludeNonEngineeredWells:Ne,wells:Je,subjectWell:Xe,filters:be,filtersOptions:$e,mapHidden:Ue,isRadiusEditable:Ke,onChangeCompany:rn,onSetSubjectWell:un,onChangeRadius:mn,onChangeSidetrack:pn,onChangeNonEngineeredWells:bn,onChangeFilters:gn,onClearFilters:hn,onToggleMap:yn}),_(A,{subjectWell:Xe,wells:Je,offsetWells:Ze,radius:Se,mapHidden:Ue,onSetSubjectWell:un,onRemoveSubjectWell:fn,onAddOffsetWell:sn,onDeleteOffsetWell:cn}),_(k,{subjectWell:Xe,wells:ln,offsetWells:Ze,metricsKeys:we,sortInfo:Re,isMetricsLoading:tn,unusableWellAlarm:$,onChangeMetricsKeys:Sn,onSorting:jn,onAddOffsetWell:sn,onDeleteOffsetWell:cn,onAddAllOffsetWells:an,onDeleteAllOffsetWells:dn})]})}),_("div",{className:ee.bottomShadow}),U(y,{className:I(ee.dialogActions,e({},ee.dialogActionsSmallScreen,te)),children:[J?U("div",{className:ee.selectedWells,children:[_(p,{className:ee.selected,children:"Selected:"}),_(p,{className:ee.selectedLabel,children:"Best:"}),_(p,{className:ee.selectedNumber,children:X}),_(p,{className:ee.selectedLabel,children:"Advanced Search:"}),_(p,{className:ee.selectedNumber,children:(null==Ze?void 0:Ze.length)||0})]}):_("div",{}),U("div",{children:[_(S,{"data-testid":"".concat("OffsetsPickerDialog","_cancel"),onClick:Wn,color:"primary",style:{marginRight:16},children:"CANCEL"}),U(S,{"data-testid":"".concat("OffsetsPickerDialog","_add"),variant:"contained",color:"primary",onClick:function(){var e=H(H({},V),{},{companyId:se,subjectWellId:ue,radius:Se,excludeSideTrack:Ie,excludeNonEngineeredWells:Ne,filters:be,selectedWellIds:d(Ze.map((function(e){return e.id})))});Z(e,Ze)},children:["ADD (",(null==Ze?void 0:Ze.length)||0,")"]})]})]})]})};V.propTypes={isOpen:s.bool.isRequired,defaultSubjectWellId:s.number,companyId:s.number,offsetSetting:s.shape({}).isRequired,currentUser:s.shape({}).isRequired,addWellsUsabilityInfo:s.func,unusableWellAlarm:s.string,isAdvancedSearch:s.bool,bestCount:s.number,onSave:s.func.isRequired,onClose:s.func.isRequired},V.defaultProps={defaultSubjectWellId:null,companyId:null,addWellsUsabilityInfo:null,unusableWellAlarm:"Unable to add",isAdvancedSearch:!1,bestCount:0};var G=t(V);export{G as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: import("react").ComponentType<Pick<Pick<Pick<{
|
|
2
|
+
value: any;
|
|
3
|
+
onChange: any;
|
|
4
|
+
classes: any;
|
|
5
|
+
"data-testid": any;
|
|
6
|
+
}, never> & Pick<PropTypes.InferProps<{
|
|
7
|
+
value: PropTypes.Validator<boolean>;
|
|
8
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
9
|
+
classes: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
|
|
10
|
+
'data-testid': PropTypes.Requireable<string>;
|
|
11
|
+
}>, "value" | "data-testid" | "classes" | "onChange">, "value" | "classes" | "onChange"> & {
|
|
12
|
+
'data-testid'?: string;
|
|
13
|
+
} & {}, "value" | "data-testid" | "onChange"> & import("@material-ui/core").StyledComponentProps<"formControl">>;
|
|
14
|
+
export default _default;
|
|
15
|
+
import PropTypes from "prop-types";
|
|
16
|
+
//# sourceMappingURL=NonEngineeredWellsSwitch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NonEngineeredWellsSwitch.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"prop-types";import{withStyles as t}from"@material-ui/core";import{jsx as o}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/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"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.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"react";import"uuid";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../AppIcon/AppIcon.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"classnames";import"lodash";import"@material-ui/icons";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/env.js";import"../../../GradientManager/configuration/constants.js";import"../../../../utils/index.js";import"jsona";import"../../../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.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"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"rollbar";import"@rollbar/react";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../AssetEditor/index.js";import"../../../AssetEditorV2/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../LoadingIndicator/LoadingIndicator.js";import"../../../Typography.js";import"../../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../EmptyState/EmptyState.js";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{SwitchControlComponent as r}from"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../Chart/components/ChartButton.js";import"../../../Chart/components/ChartButtons.js";import"../../../Chart/components/ChartWrapper.js";import"../../../Chart/components/AxisDropdown.js";import"../../../Chart/components/ChartSelect.js";import"../../../Chart/components/buttons/DragToZoomButton.js";import"../../../Chart/components/buttons/ZoomInButton.js";import"../../../Chart/components/buttons/ZoomOutButton.js";import"../../../Chart/components/buttons/PanButton.js";import"../../../Chart/components/buttons/ResetZoomButton.js";import"../../../Chart/components/buttons/HideAxesButton.js";import"../../../Chart/components/buttons/ChartTypeButton.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../AdvancedSlider/AdvancedSlider.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"../../../Select/SelectFilterBy.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../GradientManager/GradientSelect.styles.js";import"../../../GradientPicker/GradientPicker.js";import"../../../GradientManager/GradientManager.styles.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"../../OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../../Notifications/Toast.js";import"../../../Toaster/Toaster.js";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../Template/TemplateSharingDialog/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"../../../PadOffsetsPickerV2/PadOffsetsPickerV2.js";import"../../../Table/TableToolbar/TableToolbar.js";import"../../../Table/TableContainer/TableContainer.js";import"../../../Table/TableCell/TableCell.js";import"../../../Tooltip/ScrollableTooltip.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"../../../StatusBadge/index.js";import"../../../Attachment/index.js";import"../../../EmojiIconButton.js";import"../../../FileUploadIconButton.js";import"../../../FilePreview/index.js";import"../../../FailedFileUploading.js";import"../../../UserMention/index.js";import"../../../CommentsInfo/index.js";import"../../../CommentInput/index.js";import"../../../Comment/index.js";import"../../../CommentLoader.js";import"../../../AssetNameLabel/AssetStatusBadge.js";import"../../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../../AssetEditorV2/components/SelectItem.js";import"../../../AssetEditorV2/components/MultipleAssetsToggle.js";function i(e){var t=e.value,i=e.onChange,s=e.classes,n=e["data-testid"];return o(r,{"data-testid":n,rightLabel:"Exclude Non Engineered Wells",color:"primary",checked:t,onChange:function(e){i(e.target.checked)},size:"small",className:s.formControl})}i.propTypes={value:e.bool.isRequired,onChange:e.func.isRequired,classes:e.shape({}).isRequired,"data-testid":e.string},i.defaultProps={"data-testid":"NonEngineeredWellsSwitch"};var s=t({formControl:{display:"flex",alignItems:"flex-end",height:"56px"}})(i);export{s as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: import("react").MemoExoticComponent<typeof Filter>;
|
|
2
2
|
export default _default;
|
|
3
|
-
declare function Filter({ companyId, companies, canViewCompanies, wells, subjectWell, radius, excludeSideTrack, filters, filtersOptions, mapHidden, isRadiusEditable, onChangeCompany, onSetSubjectWell, onChangeFilters, onChangeRadius, onChangeSidetrack, onClearFilters, onToggleMap, }: {
|
|
3
|
+
declare function Filter({ companyId, companies, canViewCompanies, wells, subjectWell, radius, excludeSideTrack, excludeNonEngineeredWells, filters, filtersOptions, mapHidden, isRadiusEditable, onChangeCompany, onSetSubjectWell, onChangeFilters, onChangeRadius, onChangeSidetrack, onChangeNonEngineeredWells, onClearFilters, onToggleMap, }: {
|
|
4
4
|
companyId: any;
|
|
5
5
|
companies: any;
|
|
6
6
|
canViewCompanies: any;
|
|
@@ -8,6 +8,7 @@ declare function Filter({ companyId, companies, canViewCompanies, wells, subject
|
|
|
8
8
|
subjectWell: any;
|
|
9
9
|
radius: any;
|
|
10
10
|
excludeSideTrack: any;
|
|
11
|
+
excludeNonEngineeredWells: any;
|
|
11
12
|
filters: any;
|
|
12
13
|
filtersOptions: any;
|
|
13
14
|
mapHidden: any;
|
|
@@ -17,6 +18,7 @@ declare function Filter({ companyId, companies, canViewCompanies, wells, subject
|
|
|
17
18
|
onChangeFilters: any;
|
|
18
19
|
onChangeRadius: any;
|
|
19
20
|
onChangeSidetrack: any;
|
|
21
|
+
onChangeNonEngineeredWells: any;
|
|
20
22
|
onClearFilters: any;
|
|
21
23
|
onToggleMap: any;
|
|
22
24
|
}): JSX.Element;
|
|
@@ -30,6 +32,7 @@ declare namespace Filter {
|
|
|
30
32
|
const radius: PropTypes.Validator<number>;
|
|
31
33
|
const isRadiusEditable: PropTypes.Validator<boolean>;
|
|
32
34
|
const excludeSideTrack: PropTypes.Validator<boolean>;
|
|
35
|
+
const excludeNonEngineeredWells: PropTypes.Validator<boolean>;
|
|
33
36
|
const filters: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
|
|
34
37
|
const filtersOptions: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
|
|
35
38
|
const mapHidden: PropTypes.Validator<boolean>;
|
|
@@ -38,6 +41,7 @@ declare namespace Filter {
|
|
|
38
41
|
const onChangeFilters: PropTypes.Validator<(...args: any[]) => any>;
|
|
39
42
|
const onChangeRadius: PropTypes.Validator<(...args: any[]) => any>;
|
|
40
43
|
const onChangeSidetrack: PropTypes.Validator<(...args: any[]) => any>;
|
|
44
|
+
const onChangeNonEngineeredWells: PropTypes.Validator<(...args: any[]) => any>;
|
|
41
45
|
const onClearFilters: PropTypes.Validator<(...args: any[]) => any>;
|
|
42
46
|
const onToggleMap: PropTypes.Validator<(...args: any[]) => any>;
|
|
43
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV2/components/Filter/index.js"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV2/components/Filter/index.js"],"names":[],"mappings":";;AA2CA;;;;;;;;;;;;;;;;;;;;;gBAqFC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import{memo as i,useState as r}from"react";import
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import{memo as i,useState as r}from"react";import n from"prop-types";import{get as l}from"lodash";import{makeStyles as o}from"@material-ui/core";import{isNativeDetected as a,isMobileDetected as t}from"../../../../utils/mobileDetect.js";import s from"./SubjectWellSearch.js";import u from"./RadiusInput.js";import d from"./SidetrackSwitch.js";import c from"./NonEngineeredWellsSwitch.js";import p from"./ToggleFiltersButton.js";import m from"./ToggleMapButton.js";import f from"./SingleSelect.js";import g from"./MultiSelect.js";import h from"./ClearFiltersButton.js";import{FILTERS_LIST as C}from"../../constants.js";import{jsxs as b,jsx as R}from"react/jsx-runtime";var j=o({container:{display:"flex"},filters:{display:"flex",flexWrap:"wrap"},fileterSection:{display:"flex",width:"100%",alignItems:"center",flexWrap:"wrap"},subjectWellWrapper:{display:"flex",alignItems:"center",flexWrap:"wrap"}}),q=a||t;function W(i){var n=i.companyId,o=i.companies,a=i.canViewCompanies,t=i.wells,W=i.subjectWell,S=i.radius,y=i.excludeSideTrack,x=i.excludeNonEngineeredWells,w=i.filters,v=i.filtersOptions,T=i.mapHidden,N=i.isRadiusEditable,k=i.onChangeCompany,F=i.onSetSubjectWell,E=i.onChangeFilters,M=i.onChangeRadius,V=i.onChangeSidetrack,I=i.onChangeNonEngineeredWells,H=i.onClearFilters,O=i.onToggleMap,B=r(q),z=e(B,2),D=z[0],A=z[1],P=j({isMobile:q});return b("div",{children:[q&&R(p,{filtersHidden:D,onToggleFilters:function(){A((function(e){return!e}))}}),!D&&b("div",{className:P.container,children:[R(m,{mapHidden:T,onToggleMap:O}),R("div",{className:P.filters,children:b("div",{className:P.fileterSection,children:[a&&R(f,{"data-testid":"".concat("Filter","_companyDropdown"),label:"Company",items:o,currentValue:n,onChange:function(e){return k(e.target.value)}},"company"),C.map((function(e){var i=e.key,r=e.title,n=e.size,o=e.renderValue;return R(g,{title:r,size:n,options:l(v,i,[]),currentValues:l(w,i,[]),renderValue:o,onChange:function(e){return E(i,e)}},i)})),b("div",{className:P.subjectWellWrapper,children:[R(s,{wells:t,subjectWell:W,onChange:F}),R(u,{radius:S,editable:N,onChange:M}),R(d,{initialChecked:y,onChange:V}),R(c,{value:x,onChange:I}),R(h,{onClick:H})]})]})})]})]})}W.propTypes={canViewCompanies:n.bool.isRequired,companies:n.arrayOf(n.shape({})).isRequired,wells:n.arrayOf(n.shape({})).isRequired,subjectWell:n.shape({}),companyId:n.number.isRequired,radius:n.number.isRequired,isRadiusEditable:n.bool.isRequired,excludeSideTrack:n.bool.isRequired,excludeNonEngineeredWells:n.bool.isRequired,filters:n.shape({}).isRequired,filtersOptions:n.shape({}).isRequired,mapHidden:n.bool.isRequired,onChangeCompany:n.func.isRequired,onSetSubjectWell:n.func.isRequired,onChangeFilters:n.func.isRequired,onChangeRadius:n.func.isRequired,onChangeSidetrack:n.func.isRequired,onChangeNonEngineeredWells:n.func.isRequired,onClearFilters:n.func.isRequired,onToggleMap:n.func.isRequired},W.defaultProps={subjectWell:null};var S=i(W);export{S as default};
|
|
@@ -2,7 +2,7 @@ export function usePrevious(value: any): undefined;
|
|
|
2
2
|
export function useCompanies(canViewCompanies: any, isAdvancedSearch: any, companyId: any): any[];
|
|
3
3
|
export function useCompanyMetricKey(companyId: any): any;
|
|
4
4
|
export function useWells(companyId: any, addWellsUsabilityInfo: any): any;
|
|
5
|
-
export function useFilteredWells(dynamicFilters: any, excludeSideTrack: any, allWells: any): any;
|
|
5
|
+
export function useFilteredWells(dynamicFilters: any, excludeSideTrack: any, excludeNonEngineeredWells: any, allWells: any): any;
|
|
6
6
|
export function useWellsWithCoords(wells: any, subjectWell: any): any;
|
|
7
7
|
export function useOffsetWells(radius: any, allWells: any, selectedWellIds: any): any;
|
|
8
8
|
export function useMetricsData(companyId: any, wells: any): any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV2/effects/index.js"],"names":[],"mappings":"AAYA,mDAMC;AAED,kGAqBC;AAED,yDAmBC;AAED,0EAcC;AAED,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV2/effects/index.js"],"names":[],"mappings":"AAYA,mDAMC;AAED,kGAqBC;AAED,yDAmBC;AAED,0EAcC;AAED,iIAqCC;AAED,sEA8BC;AAED,sFAqBC;AAED,kEAkEC;AAED,yGAgBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import n from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/regenerator";import{useRef as i,useEffect as o,useState as s}from"react";import{get as u}from"lodash";import{mapbox as a}from"../../../utils/index.js";import{BENCHMARK_METRIC_GOAL as c}from"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../utils/env.js";import"../../GradientManager/configuration/constants.js";import{fetchCompanies as f,fetchCompanyGoals as l,fetchWells as p,fetchMetricsData as m}from"../utils/apiCalls.js";import{FILTERS as v,METRICS_KEYS as h}from"../constants.js";export{default as useBidirectionalFiltering}from"./biDirectionalFiltering.js";import{getCompanyGoalSetting as d}from"../../../utils/goals.js";function b(n,t){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.push.apply(r,e)}return r}function j(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?b(Object(e),!0).forEach((function(r){n(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):b(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var y=a.getAssetV2Coordinates,g=a.getDistanceByCoordinates;function O(n){var t=i();return o((function(){t.current=n})),t.current}function w(n,i,u){var a=s([]),c=r(a,2),l=c[0],p=c[1];return o((function(){function r(){return(r=t(e.mark((function t(){var r;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=3;break}return p([]),t.abrupt("return");case 3:return t.next=5,f();case 5:r=t.sent,i&&(r=r.filter((function(n){return n.id===u}))),p(r);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}!function(){r.apply(this,arguments)}()}),[n]),l}function x(n){var i=s(null),u=r(i,2),a=u[0],f=u[1];return o((function(){function r(){return(r=t(e.mark((function t(){var r,i;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l(n);case 2:r=t.sent,i=d(r,c),f(i);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}f(null),function(){r.apply(this,arguments)}()}),[n]),a}function k(n,i){var u=s(null),a=r(u,2),c=a[0],f=a[1];return o((function(){function r(){return(r=t(e.mark((function t(){var r;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=6;break}return t.next=3,p(n,i);case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=null;case 7:r=t.t0,f(r);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}f(null),function(){r.apply(this,arguments)}()}),[n]),c}function E(n,t,e,i){var u=s(null),a=r(u,2),c=a[0],f=a[1],l=/\sST0/g,p=["non-engineered","non engineered"];return o((function(){if(i){var r=Object.values(v).reduce((function(t,r){return t.filter((function(t){return e=t[r],!(i=n[r])||0===i.length||i.includes(e);var e,i}))}),i),o=(e?r.filter((function(n){return p.every((function(t){var r;return-1===(null===(r=n.name)||void 0===r?void 0:r.toLowerCase().search(t))}))})):r).filter((function(n){return t&&!n.name.match(l)||!t}));f(o)}else f(null)}),[i,n,t,e]),c}function P(n,t){var e=s(null),i=r(e,2),u=i[0],a=i[1];return o((function(){if(n){var r=t&&y(t,"topHole");if(r){var e=[];n.forEach((function(n){var t=y(n,"topHole");if(t){var i=parseFloat(g(r,t));e.push(j(j({},n),{},{distance:i}))}else e.push(n)})),a(e)}else a(n)}else a(n)}),[n,t]),u}function D(n,t,e){var i=s(null),u=r(i,2),a=u[0],c=u[1];return o((function(){if(t){var n=[];t.forEach((function(t){e.includes(t.id)&&t.is_usable&&n.push(t)})),c(n)}else c(null)}),[n,t,e]),a}function F(n,a){var c=i({}),f=s(!0),l=r(f,2),p=l[0],v=l[1],d=s(null),b=r(d,2),y=b[0],g=b[1];return o((function(){function r(){return(r=t(e.mark((function t(r){var i,o,s;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m(n,r);case 2:i=t.sent,o={},r.forEach((function(n){var t={},r=i.filter((function(t){return u(t,"asset_id")===n}));h.forEach((function(n){var e=r.find((function(t){return u(t,"data.key")===n})),i=u(e,"data.value");t[n]=Number.isFinite(i)?parseFloat(i).toFixed(2):null})),o[n]=t})),c.current=j(j({},c.current),o),s=[],a.forEach((function(n){s.push(j(j({},n),c.current[n.id]))})),v(!1),g(s);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}if(a)if(0!==a.length){var i=[];a.forEach((function(n){c.current[n.id]||i.push(n.id)})),v(!0),function(n){r.apply(this,arguments)}(i)}else g([]);else g(null)}),[a]),[p,y]}function C(n,t,r){var e=i(!1);o((function(){if(t){if(e.current){var i=[];t.forEach((function(t){t.distance<=n&&i.push(t.id)})),r(i)}e.current=!0}}),[n,t])}export{w as useCompanies,x as useCompanyMetricKey,E as useFilteredWells,F as useMetricsData,D as useOffsetWells,O as usePrevious,C as useRadiusWells,k as useWells,P as useWellsWithCoords};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PadModeSelect.d.ts","sourceRoot":"","sources":["../../../src/components/PadModeSelect/PadModeSelect.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"PadModeSelect.d.ts","sourceRoot":"","sources":["../../../src/components/PadModeSelect/PadModeSelect.js"],"names":[],"mappings":";AAsCA,wDA2HC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/slicedToArray";import{useState as r,useRef as o,useMemo as s}from"react";import n from"prop-types";import{first as a,flatten as i,partition as c}from"lodash";import{makeStyles as l,FormControl as m,Select as u,MenuItem as d}from"@material-ui/core";import{DEFAULT_SUPPORTED_PAD_MODES as p,COMPLETION_MODES as f}from"../../constants/completion.js";import v from"./WellStreamActivityStatus.js";import{PadMode as h,AssetStatus as y}from"./types.js";import{useWellStreamActivityTypeSubscription as S}from"./effects/useWellStreamActivityTypeSubscription.js";import{jsx as b,jsxs as I}from"react/jsx-runtime";var g=l({selectFormControl:{maxWidth:"320px",padding:"5px 8px",marginLeft:"auto"},padSelect:{fontSize:"14px","&:before":{borderBottom:0},"&:after":{borderBottom:0},"& .MuiSelect-root":{alignItems:"center",display:"flex"}},menuItem:{display:"flex",justifyContent:"space-between"},menuItemName:{textOverflow:"ellipsis",overflow:"hidden",width:"100%"}}),A=function(n){var l=n.completionAppType,A=n.padModeSetting,x=n.assets,w=n.onChange,C=n.disableActiveWellsInPadSelect,j=r(!1),M=t(j,2),O=M[0],W=M[1],N=o(),T=g(),P=A.mode===h.custom?"".concat(h.custom,"--").concat(a(A.selectedAssets)):A.mode,k=s((function(){return x.reduce((function(t,r){return[].concat(e(t),[{key:"".concat(h.custom,"--").concat(r.id),label:"".concat(r.name),assetId:r.asset_id,wellId:r.id,status:r.status}])}),[])}),[x,l]),z=p.concat(i(c(k,{status:y.active}))),q=function(e){var r=e.split("--"),o=t(r,2),s=o[0],n=o[1],a={mode:s};s===h.custom&&(a.mode=h.custom,a.selectedAssets=[parseInt(n,10)]),w(a)},B=function(e){return A.mode===h.custom&&+a(A.selectedAssets)==+e||O},F=z.find((function(e){return e.key===P}));null!=F&&F.assetId&&(N.current=null==F?void 0:F.assetId);var R=S({currentWellId:N.current,isStatusShown:!0,withSubscription:!0});return b(m,{classes:{root:T.selectFormControl},children:P&&b(u,{value:P,onChange:function(e){return q(e.target.value)},inputProps:{name:"padModeSelect",id:"pad-mode-select"},className:T.padSelect,onClose:function(){return W(!1)},onOpen:function(){return W(!0)},MenuProps:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},children:z.map((function(e){var t,r=e.key,o=e.label,s=e.assetId,n=e.wellId,a=e.status,i=B(n)&&a===y.active;return I(d,{value:r,className:T.menuItem,disabled:C&&a!==y.active&&r!==f.pad,children:[b("span",{className:T.menuItemName,children:o}),i&&b(v,{isStatusShown:B(n),currentWellId:s,subData:(null===(t=N.current)||void 0===t?void 0:t.assetId)===r?R:void 0})]},r)}))})})};A.propTypes={padModeSetting:n.shape({mode:n.string,selectedAssets:n.arrayOf(n.string)}),assets:n.arrayOf(n.shape()),completionAppType:n.string.isRequired,onChange:n.func.isRequired},A.defaultProps={padModeSetting:{},assets:[]};export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WellStreamActivityStatus.d.ts","sourceRoot":"","sources":["../../../src/components/PadModeSelect/WellStreamActivityStatus.tsx"],"names":[],"mappings":";AAmCA,QAAA,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"WellStreamActivityStatus.d.ts","sourceRoot":"","sources":["../../../src/components/PadModeSelect/WellStreamActivityStatus.tsx"],"names":[],"mappings":";AAmCA,QAAA,MAAM,wBAAwB,6BAoB7B,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{isEmpty as o}from"lodash";import{makeStyles as r,Chip as e}from"@material-ui/core";import{useWellStreamActivityTypeSubscription as i}from"./effects/useWellStreamActivityTypeSubscription.js";var
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{isEmpty as o}from"lodash";import{makeStyles as r,Chip as e}from"@material-ui/core";import{useWellStreamActivityTypeSubscription as i}from"./effects/useWellStreamActivityTypeSubscription.js";var a=r((function(t){return{chipRoot:{"&.MuiChip-root":{height:12,padding:"2px 8px",fontSize:10,backgroundColor:"".concat(t.palette.success.bright," !important"),marginLeft:4,"&:hover":{"& .MuiChip-label":{color:t.palette.background.b1}},"& .MuiChip-label":{color:t.palette.background.b1,padding:0,fontWeight:500,"&:hover":{color:t.palette.background.b1}}}}}})),l=function(r){var l,n=r.isStatusShown,u=r.currentWellId,p=r.subData,c=a(),s=i({currentWellId:u,isStatusShown:n}),d=p||s;return n&&u?o(d)?null:t(e,{label:null===(l=null==d?void 0:d.streamType)||void 0===l?void 0:l.toUpperCase(),classes:{root:c.chipRoot}}):null};export{l as default};
|
|
@@ -2,7 +2,8 @@ import { AssetStreamStatus } from '../types';
|
|
|
2
2
|
declare type StreamSubscriptionProps = {
|
|
3
3
|
isStatusShown: boolean;
|
|
4
4
|
currentWellId: number;
|
|
5
|
+
withSubscription?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export declare function useWellStreamActivityTypeSubscription(
|
|
7
|
+
export declare function useWellStreamActivityTypeSubscription({ currentWellId, isStatusShown, withSubscription, }: StreamSubscriptionProps): AssetStreamStatus;
|
|
7
8
|
export {};
|
|
8
9
|
//# sourceMappingURL=useWellStreamActivityTypeSubscription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWellStreamActivityTypeSubscription.d.ts","sourceRoot":"","sources":["../../../../src/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAkB,MAAM,UAAU,CAAC;AAyB7D,aAAK,uBAAuB,GAAG;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"useWellStreamActivityTypeSubscription.d.ts","sourceRoot":"","sources":["../../../../src/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAkB,MAAM,UAAU,CAAC;AAyB7D,aAAK,uBAAuB,GAAG;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAGF,wBAAgB,qCAAqC,CAAC,EACpD,aAAa,EACb,aAAa,EACb,gBAAgB,GACjB,EAAE,uBAAuB,GAAG,iBAAiB,CAsE7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'./../../../ext-esm/tslib/tslib.es6.js';import{useState as e,useRef as i,
|
|
1
|
+
import{__assign as t}from'./../../../ext-esm/tslib/tslib.es6.js';import{useState as e,useRef as i,useLayoutEffect as r}from"react";import{socketClient as a}from"../../../clients/index.js";import n from"./useWellStreamsData.js";import{initialDataFetcher as o}from"../utils/initialDataFetcher.js";var s={provider:"corva",collection:"completion.wits",event:"",params:{fields:"timestamp,collection,asset_id",limit:1,sort:"{ timestamp: -1 }"}},m={provider:"corva",collection:"wireline.wits",event:"",params:{fields:"timestamp,collection,asset_id,data.state",limit:1,sort:"{ timestamp: -1 }"}};function c(c){var l=c.currentWellId,u=c.isStatusShown,p=c.withSubscription,f=e({timestamp:0}),d=f[0],v=f[1],h=e({timestamp:0}),b=h[0],w=h[1],S=i([]),D=n({isStatusShown:u,currentWellId:l,wirelineData:d,fracData:b}),j=function(e){var i=e.data[0]||{},r=i.collection,a=i.timestamp,n=i.data,o=i.stage_number;a&&(r===m.collection?v((function(e){return t(t({},e),{timestamp:a,stageNumber:o,data:n})})):r===s.collection&&w((function(e){return t(t({},e),{timestamp:a})})))},_=function(e,i){var r=t(t({},i),{assetId:e}),n=a.subscribe(r,{onDataReceive:j});S.current.push(n)};return r((function(){if(l){var t=o(s),e=o(m),i=[t(l),e(l)];return p&&(_(l,s),_(l,m)),Promise.all(i).then((function(t){t.forEach((function(t){j({data:t})}))})),function(){S.current.forEach((function(t){return t()})),S.current=[],v({timestamp:0}),w({timestamp:0})}}}),[l]),D}export{c as useWellStreamActivityTypeSubscription};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWellStreamsData.d.ts","sourceRoot":"","sources":["../../../../src/components/PadModeSelect/effects/useWellStreamsData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAc,MAAM,UAAU,CAAC;AAGzE,aAAK,uBAAuB,GAAG;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,cAAc,CAAC;IAC7B,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;
|
|
1
|
+
{"version":3,"file":"useWellStreamsData.d.ts","sourceRoot":"","sources":["../../../../src/components/PadModeSelect/effects/useWellStreamsData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAc,MAAM,UAAU,CAAC;AAGzE,aAAK,uBAAuB,GAAG;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,cAAc,CAAC;IAC7B,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AASF,iBAAS,kBAAkB,CAAC,EAC1B,aAAa,EACb,aAAa,EACb,YAAY,EACZ,QAAQ,GACT,EAAE,uBAAuB,GAAG,iBAAiB,CAoC7C;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as r}from"react";import{StreamType as t}from"../types.js";import{getCurrentTimestamp as
|
|
1
|
+
import{useMemo as r}from"react";import{StreamType as t}from"../types.js";import{getCurrentTimestamp as a}from"../utils/time.js";var e={timestamp:0};function i(i){var m=i.isStatusShown,n=i.currentWellId,s=i.wirelineData,u=i.fracData;return r((function(){if(!m||!u||!s)return{};var r=(u||e).timestamp,i=(s||e).timestamp,f=a();if(f-r>60&&f-i>60)return{};var o=f-r<=60,c=f-i<=60;if(!o&&!c)return{};var l=t.Frac;return l=o!==c?o?t.Frac:t.Wireline:r<i?t.Frac:t.Wireline,Math.abs(r-i)<=5&&(l=t.Frac),{wellId:n,streamType:l}}),[s,u,m])}export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAExE,eAAO,MAAM,cAAc;;;;;;;CAO1B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,aAAK,KAAK,GAAG,OAAO,CAAC;AACrB,aAAK,OAAO,GAAG,SAAS,CAAC;AAEzB,oBAAY,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAG1D,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpD,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAKjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC;AAEF,eAAO,MAAM,OAAO,kEAAkE,CAAC;AAEvF,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC;AAEF,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAExE,eAAO,MAAM,cAAc;;;;;;;CAO1B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,aAAK,KAAK,GAAG,OAAO,CAAC;AACrB,aAAK,OAAO,GAAG,SAAS,CAAC;AAEzB,oBAAY,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAG1D,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpD,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAKjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC;AAEF,eAAO,MAAM,OAAO,kEAAkE,CAAC;AAEvF,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC;AAEF,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAyDrE,eAAO,MAAM,2BAA2B,UAqCvC,CAAC;AAqBF,eAAO,MAAM,6BAA6B,UAqCzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@material-ui/icons/Warning";import s from"@material-ui/icons/Done";import r from"@material-ui/icons/Error";import i from"@material-ui/icons/CheckCircle";import{DangerousIcon as o}from"../Icons/DangerousIcon.js";var n,a=959,c={FLAGGED:"flagged",EXPIRED:"expired",RESOLVED:"resolved",OPEN:"open",INVESTIGATION:"investigation",ON_HOLD:"on hold"},l={Missing:o,Issue:r,Resolved:i},t={missing:"Missing",issue:"Issue"},u={success:"success",warning:"warning",issue:"issue",error:"error"},m=((n={})[u.success]=s,n[u.warning]=e,n[u.issue]=r,n[u.error]=o,n),g="Recommendations may be incorrect based on data quality errors",p={recordProvider:"corva",recordCollections:{wellnessAlerts:"wellness_alerts",wcuRuleMapping:"wcu_rule_mapping",wellnessRuleSettings:"wellness_rule_settings",wcuRulesCheckTime:"wcu-rule-check-time"}},d="Data quality check passed",w=[188,190,216,237,348,358,359,360,361,370,375,382,389,391,392,397,406,418,237,216,406,182,437,375,238,310,175,34599,188,207,329],E=[40,156,32,84,137,157,158,160,159,164,139,168,178,181,183,187,196,208,84,32,196,34,224,139,80,104,24,131,40,63,124];export{l as ALERT_ICONS,t as ALERT_STATES,c as ALERT_STATUSES,m as BADGE_ICONS,u as BADGE_ICON_STATUSES,d as DATA_QUALITY_CHECK_PASSED,E as ENABLING_ON_PROD_APP_IDS_LIST,w as ENABLING_ON_QA_APP_IDS_LIST,a as MAX_MOBILE_WIDTH,p as METADATA,g as WARNING};
|
|
1
|
+
import e from"@material-ui/icons/Warning";import s from"@material-ui/icons/Done";import r from"@material-ui/icons/Error";import i from"@material-ui/icons/CheckCircle";import{DangerousIcon as o}from"../Icons/DangerousIcon.js";var n,a=959,c={FLAGGED:"flagged",EXPIRED:"expired",RESOLVED:"resolved",OPEN:"open",INVESTIGATION:"investigation",ON_HOLD:"on hold"},l={Missing:o,Issue:r,Resolved:i},t={missing:"Missing",issue:"Issue"},u={success:"success",warning:"warning",issue:"issue",error:"error"},m=((n={})[u.success]=s,n[u.warning]=e,n[u.issue]=r,n[u.error]=o,n),g="Recommendations may be incorrect based on data quality errors",p={recordProvider:"corva",recordCollections:{wellnessAlerts:"wellness_alerts",wcuRuleMapping:"wcu_rule_mapping",wellnessRuleSettings:"wellness_rule_settings",wcuRulesCheckTime:"wcu-rule-check-time"}},d="Data quality check passed",w=[188,190,216,237,348,358,359,360,361,370,375,382,389,391,392,397,406,418,237,216,406,182,437,375,238,310,175,34599,188,207,329,328,175,207],E=[40,156,32,84,137,157,158,160,159,164,139,168,178,181,183,187,196,208,84,32,196,34,224,139,80,104,24,131,40,63,124,121,24,63];export{l as ALERT_ICONS,t as ALERT_STATES,c as ALERT_STATUSES,m as BADGE_ICONS,u as BADGE_ICON_STATUSES,d as DATA_QUALITY_CHECK_PASSED,E as ENABLING_ON_PROD_APP_IDS_LIST,w as ENABLING_ON_QA_APP_IDS_LIST,a as MAX_MOBILE_WIDTH,p as METADATA,g as WARNING};
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
checked?: boolean;
|
|
5
|
-
onChange?: (event: import("react").ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
6
|
-
leftLabel?: import("react").ReactNode;
|
|
7
|
-
rightLabel?: import("react").ReactNode;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
size?: "small" | "medium";
|
|
10
|
-
className?: string;
|
|
11
|
-
customClasses?: Partial<Record<import("@material-ui/core").SwitchClassKey, string>>;
|
|
12
|
-
rightLabelTooltip?: import("react").ReactNode;
|
|
13
|
-
leftLabelTooltip?: import("react").ReactNode;
|
|
14
|
-
'data-testid'?: string;
|
|
15
|
-
} & {
|
|
16
|
-
classes: import("@material-ui/styles").ClassNameMap<string>;
|
|
17
|
-
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
2
|
+
import { SwitchControlTypes } from './types';
|
|
3
|
+
export declare const SwitchControlComponent: import("react").ForwardRefExoticComponent<SwitchControlTypes & import("react").RefAttributes<HTMLButtonElement>>;
|
|
18
4
|
export default SwitchControlComponent;
|
|
19
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SwitchControl/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SwitchControl/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA+D7C,eAAO,MAAM,sBAAsB,kHAgGlC,CAAC;AAgBF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent, ReactNode } from 'react';
|
|
2
|
-
import { SwitchClassKey
|
|
2
|
+
import { SwitchClassKey } from '@material-ui/core';
|
|
3
3
|
export declare type SwitchControlTypes = {
|
|
4
4
|
title?: string | ReactNode;
|
|
5
5
|
checked?: boolean;
|
|
@@ -13,5 +13,5 @@ export declare type SwitchControlTypes = {
|
|
|
13
13
|
rightLabelTooltip?: string | ReactNode;
|
|
14
14
|
leftLabelTooltip?: string | ReactNode;
|
|
15
15
|
'data-testid'?: string;
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/SwitchControl/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/SwitchControl/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,oBAAY,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5E,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;IACxD,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corva/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.0-0",
|
|
4
4
|
"description": "Shared components/utils for Corva ui projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"corva-ui"
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
"express": "4.17.1",
|
|
120
120
|
"file-extension": "4.0.5",
|
|
121
121
|
"file-saver": "1.3.8",
|
|
122
|
+
"fparser": "^2.0.2",
|
|
122
123
|
"fs": "0.0.1-security",
|
|
123
124
|
"highcharts": "8.1.2",
|
|
124
125
|
"highcharts-multicolor-series": "2.2.7",
|
package/utils/bha.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bha.d.ts","sourceRoot":"","sources":["../../src/utils/bha.js"],"names":[],"mappings":"AAwBO,uFASN;AAOM,mDAFK,MAAM,CAYjB;AAEM,uDAKN;AA0BM,
|
|
1
|
+
{"version":3,"file":"bha.d.ts","sourceRoot":"","sources":["../../src/utils/bha.js"],"names":[],"mappings":"AAwBO,uFASN;AAOM,mDAFK,MAAM,CAYjB;AAEM,uDAKN;AA0BM,yFAoCN;AAuCM,iEAkCN;AAGM,8DAEN;AAEM,iEAoFN;AAYM,gFAqBN;AAEM,wDAuBN"}
|
package/utils/bha.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/regenerator";import n from"lodash/get";import i from"lodash/maxBy";import{convertValue as o,getUnitDisplay as s}from"./convert.js";import{getAppStorage as u}from"../clients/jsonApi/index.js";import{COLLECTIONS as l,BHA_FAMILY as c,DRILLSTRING_KEYS as m,MOTOR_CONFIG as b,PERCENTILE_KEYS as p,METRICS_KEYS as f,MAX_INC_LIMIT as d,MAX_DEPTH_LIMIT as h,NON_MAGNETIC_TYPE as N}from"../constants/bha.js";function v(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function g(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?v(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):v(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var y,F=function(e,r,t){var a=t.filter((function(t){var a;return t.asset_id===e&&(null===(a=t.data)||void 0===a?void 0:a.id)===r}));return a.length>0?a[0]:[]},O=function(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t="shortLength",a=null===(e=r.find((function(e){return"bit"===e.family})))||void 0===e?void 0:e.size,n=a?"".concat(Math.round(1e3*a)/1e3):a,i=o(n,t,"in")||"-",u=s(t);return"".concat(i," ").concat(u)},k=function(e){var r=Number.isFinite(e)?o(e,"length","ft",null,3):0;return"".concat(r," ").concat(s("length"))},j=function(e,r,t,a){var n=e;return!function(e){return e&&-1!==e}(a)?null!=r&&r.company_id&&(n=g({company_id:r.company_id},n)):n=g({company_id:a},n),t&&(n["data.well_sections"]={$in:t}),n},w=(y=r(a.mark((function e(r,t){var n,i,o,s;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=r.map((function(e){var r=Number(e._id),a=e.bha_ids||[];return j({asset_id:r,"data.id":{$in:a}},e,null,t)}))).length){e.next=3;break}return e.abrupt("return",[]);case 3:return i={$or:n},o={aggregate:JSON.stringify([{$match:i},{$limit:1e4}])},s=[],e.prev=7,e.next=10,u(l.drillstring.provider,l.drillstring.collection,null,o);case 10:s=e.sent,e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),s=[];case 16:return e.abrupt("return",s);case 17:case"end":return e.stop()}}),e,null,[[7,13]])}))),function(e,r){return y.apply(this,arguments)}),x=function(e){var r=Object.values(c),t=!1;return e.reduce((function(e,a){var n=a.family,i=a.material;if(t||r.includes(n)||i===N){if(t=!0,r.includes(n)){var o={family:n,bitType:n===c.bit?a.bit_type:""};return e.push(o),e}return e.length&&"other"===e[e.length-1].family||e.push({family:"other",bitType:""}),e}return e}),[])},P=function(e){var r;if(!e.length)return 0;var t=null===(r=i(e,(function(e){var r,t=null===(r=e.data)||void 0===r?void 0:r.components;return x(t).reduce((function(e,r){var t=r.family;return t===c.rss||t===c.pdm?e+2:Object.values(c).includes(t)?e:e+1}),0)})).data)||void 0===r?void 0:r.components;return x(t).reduce((function(e,r){var t=r.family;return t===c.rss||t===c.pdm?e+2:Object.values(c).includes(t)?e:e+1}),0)},_=function(e,r){return parseFloat(parseFloat(e).toFixed(r)).toString()},S=function(e,r){var t;switch(r){case p.ropRotary:case p.ropSlide:case f.netROP:case f.ropRotary:case f.ropSlide:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"velocity","ft/h"));break;case f.distance:case f.holeDepth:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"length","ft"));break;case m.bitToBend:case m.hwdpLength:case f.rotaryFootage:case f.slideFootage:t=Number.isNaN(Number.parseFloat(e))?e:parseFloat(o(e,"length","ft")).fixFloat(2);break;case f.turnRate:case f.buildRate:t=Number.isNaN(Number.parseFloat(e))?e:parseFloat(o(e,"anglePerLength","dp100f")).toFixed(2);break;case f.onBottomTime:case f.totalTime:t=Number.isNaN(Number.parseFloat(e))?e:parseFloat(e).toFixed(2);break;case p.mse:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"msePressure","psi"));break;case p.wob:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"force","klbf"));break;case p.diffPressure:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"pressure","psi"));break;case p.flowIn:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"volumeFlowRate","gal/min"));break;case m.tfa:t=Number.isNaN(parseFloat(e))?e:parseFloat(e).fixFloat(2);break;case m.holeSize:t=Number.isNaN(Number.parseFloat(e))?e:_(o(e,"shortLength","in"),3);break;case m.motorSize:t=Number.isNaN(Number.parseFloat(e))?e:_(o(e,"shortLength","in"),2);break;case b.outer_diameter:t=Number.isNaN(Number.parseFloat(e))?e:_(o(e,"shortLength","in"),1);break;case m.motorBend:t=Number.isNaN(Number.parseFloat(e))?e:_(e,2);break;default:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(e)}return t},M=function(r,t,a){var n="inc"===a?d:parseInt(o(h,"length","ft"),10),i=[r,t].reduce((function(e,r){var t;return t=Number.isFinite(r)?n>=r?null:function(e){var r="inc"===e?d:parseInt(o(h,"length","ft"),10);return"Must be within 0 ~ ".concat(r)}(a):"Invalid value",e.concat([t])}),[]),s=e(i,2),u=s[0],l=s[1];return Number.isFinite(r)&&Number.isFinite(t)&&r>=t?["Should be less than max value","Should be greater than min value"]:[u,l]},T=function(e){var r=[];return e.forEach((function(e){var t=e.family,a=e.material,i=e.stabilizer;["bit","pdm","rss","stabilizer","ur"].includes(t)?r.push({family:t,hasStabilizer:!!i,bitType:n(e,"bit_type")}):"Non Magnetic"!==a||0!==r.length&&r.slice(-1)[0].material===a||r.push({family:"other",material:a})})),r};export{P as calculateBHALengthMax,F as getBHAInformation,T as getBHASchematic,O as getBhaBitSize,k as getBhaDepthIn,M as getErrors,S as getUnitConvertedValue,w as loadDrillStringData,_ as removeZero};
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/regenerator";import n from"lodash/get";import i from"lodash/maxBy";import{convertValue as o,getUnitDisplay as s}from"./convert.js";import{getAppStorage as u}from"../clients/jsonApi/index.js";import{COLLECTIONS as l,BHA_FAMILY as c,DRILLSTRING_KEYS as m,MOTOR_CONFIG as b,PERCENTILE_KEYS as p,METRICS_KEYS as f,MAX_INC_LIMIT as d,MAX_DEPTH_LIMIT as h,NON_MAGNETIC_TYPE as N}from"../constants/bha.js";function v(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function g(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?v(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):v(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var y,F=function(e,r,t){var a=t.filter((function(t){var a;return t.asset_id===e&&(null===(a=t.data)||void 0===a?void 0:a.id)===r}));return a.length>0?a[0]:[]},O=function(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t="shortLength",a=null===(e=r.find((function(e){return"bit"===e.family})))||void 0===e?void 0:e.size,n=a?"".concat(Math.round(1e3*a)/1e3):a,i=o(n,t,"in")||"-",u=s(t);return"".concat(i," ").concat(u)},k=function(e){var r=Number.isFinite(e)?o(e,"length","ft",null,3):0;return"".concat(r," ").concat(s("length"))},j=function(e,r,t,a){var n=e;return!function(e){return e&&-1!==e}(a)?null!=r&&r.company_id&&(n=g({company_id:r.company_id},n)):n=g({company_id:a},n),t&&(n["data.well_sections"]={$in:t}),n},w=(y=r(a.mark((function e(r,t){var n,i,o,s;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=r.map((function(e){var r=Number(e._id),a=e.bha_ids||[];return j({asset_id:r,"data.id":{$in:a}},e,null,t)}))).length){e.next=3;break}return e.abrupt("return",[]);case 3:return i=n.length>1?{$or:n}:n[0],o={aggregate:JSON.stringify([{$match:i},{$limit:1e4}])},s=[],e.prev=7,e.next=10,u(l.drillstring.provider,l.drillstring.collection,null,o);case 10:s=e.sent,e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),s=[];case 16:return e.abrupt("return",s);case 17:case"end":return e.stop()}}),e,null,[[7,13]])}))),function(e,r){return y.apply(this,arguments)}),x=function(e){var r=Object.values(c),t=!1;return e.reduce((function(e,a){var n=a.family,i=a.material;if(t||r.includes(n)||i===N){if(t=!0,r.includes(n)){var o={family:n,bitType:n===c.bit?a.bit_type:""};return e.push(o),e}return e.length&&"other"===e[e.length-1].family||e.push({family:"other",bitType:""}),e}return e}),[])},P=function(e){var r;if(!e.length)return 0;var t=null===(r=i(e,(function(e){var r,t=null===(r=e.data)||void 0===r?void 0:r.components;return x(t).reduce((function(e,r){var t=r.family;return t===c.rss||t===c.pdm?e+2:Object.values(c).includes(t)?e:e+1}),0)})).data)||void 0===r?void 0:r.components;return x(t).reduce((function(e,r){var t=r.family;return t===c.rss||t===c.pdm?e+2:Object.values(c).includes(t)?e:e+1}),0)},_=function(e,r){return parseFloat(parseFloat(e).toFixed(r)).toString()},S=function(e,r){var t;switch(r){case p.ropRotary:case p.ropSlide:case f.netROP:case f.ropRotary:case f.ropSlide:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"velocity","ft/h"));break;case f.distance:case f.holeDepth:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"length","ft"));break;case m.bitToBend:case m.hwdpLength:case f.rotaryFootage:case f.slideFootage:t=Number.isNaN(Number.parseFloat(e))?e:parseFloat(o(e,"length","ft")).fixFloat(2);break;case f.turnRate:case f.buildRate:t=Number.isNaN(Number.parseFloat(e))?e:parseFloat(o(e,"anglePerLength","dp100f")).toFixed(2);break;case f.onBottomTime:case f.totalTime:t=Number.isNaN(Number.parseFloat(e))?e:parseFloat(e).toFixed(2);break;case p.mse:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"msePressure","psi"));break;case p.wob:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"force","klbf"));break;case p.diffPressure:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"pressure","psi"));break;case p.flowIn:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(o(e,"volumeFlowRate","gal/min"));break;case m.tfa:t=Number.isNaN(parseFloat(e))?e:parseFloat(e).fixFloat(2);break;case m.holeSize:t=Number.isNaN(Number.parseFloat(e))?e:_(o(e,"shortLength","in"),3);break;case m.motorSize:t=Number.isNaN(Number.parseFloat(e))?e:_(o(e,"shortLength","in"),2);break;case b.outer_diameter:t=Number.isNaN(Number.parseFloat(e))?e:_(o(e,"shortLength","in"),1);break;case m.motorBend:t=Number.isNaN(Number.parseFloat(e))?e:_(e,2);break;default:t=Number.isNaN(Number.parseFloat(e))?e:Math.floor(e)}return t},M=function(r,t,a){var n="inc"===a?d:parseInt(o(h,"length","ft"),10),i=[r,t].reduce((function(e,r){var t;return t=Number.isFinite(r)?n>=r?null:function(e){var r="inc"===e?d:parseInt(o(h,"length","ft"),10);return"Must be within 0 ~ ".concat(r)}(a):"Invalid value",e.concat([t])}),[]),s=e(i,2),u=s[0],l=s[1];return Number.isFinite(r)&&Number.isFinite(t)&&r>=t?["Should be less than max value","Should be greater than min value"]:[u,l]},T=function(e){var r=[];return e.forEach((function(e){var t=e.family,a=e.material,i=e.stabilizer;["bit","pdm","rss","stabilizer","ur"].includes(t)?r.push({family:t,hasStabilizer:!!i,bitType:n(e,"bit_type")}):"Non Magnetic"!==a||0!==r.length&&r.slice(-1)[0].material===a||r.push({family:"other",material:a})})),r};export{P as calculateBHALengthMax,F as getBHAInformation,T as getBHASchematic,O as getBhaBitSize,k as getBhaDepthIn,M as getErrors,S as getUnitConvertedValue,w as loadDrillStringData,_ as removeZero};
|