@corva/ui 0.45.0-3 → 0.45.0-5
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/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.module.css.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/ViewWellSectionsName.js +1 -0
- package/components/OffsetWellPickerV4/constants.js +1 -1
- package/components/OffsetWellPickerV4/effects/useBicWells.js +1 -1
- package/components/RangeSlider/Input.css.js +1 -1
- package/components/RangeSlider/RangeSlider.css.js +1 -1
- package/components/RangeSlider/RangeSlider.js +1 -1
- package/config/theme/tableOverrides.js +1 -1
- package/constants/alerts.js +1 -1
- package/package.json +1 -1
|
@@ -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{useMemo as i,useState as n,useRef as o,useEffect as s,useCallback as l}from"react";import a from"prop-types";import{uniqBy as p,isEmpty as m,sortBy as c,isEqual as d}from"lodash";import{Typography as u}from"@material-ui/core";import{Replay as f,Sort as j,FilterList as C,Close as v}from"@material-ui/icons";import b 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 g,jsxs as h}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"../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 D}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 S 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 y 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 I}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 P}from"./effects/useFetchWells.js";import{useAdvancedWells as W}from"./effects/useAdvancedWells.js";import{useBicWells as x}from"./effects/useBicWells.js";import{useCompanyMetricKey as T}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as O}from"./effects/useFilterOptions.js";import{useFilteredWells as E}from"./effects/useFilteredWells.js";import{useSortedWells as w}from"./effects/useSortedWells.js";import{useRadiusWells as B}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as L}from"./effects/useTableColumns.js";import{Filter as k}from"./components/Filter/Filter.js";import{WellsMap as H}from"./components/Map/WellsMap.js";import V from"./components/OffsetWellsTable/OffsetWellsTable.js";import F from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as N,ColumnType as M,FilterType as R,ROWS_PER_PAGE as U}from"./constants.js";import{SEARCH_CATEGORIES as z}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";function K(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 q(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?K(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):K(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var G=function(a){var K=a.open,G=a.isWDUser,_=a.defaultSubjectWell,J=a.currentUser,Q=a.offsetSettings,X=a.addWellsUsabilityInfo,Y=a.isViewOnly,Z=a.onClose,$=a.onSave,ee=a.maxOffsetSize,te=i((function(){return ee+1}),[ee]),re=n(null==Q?void 0:Q.filterExpanded),ie=r(re,2),ne=ie[0],oe=ie[1],se=n(null==Q?void 0:Q.mapHidden),le=r(se,2),ae=le[0],pe=le[1],me=+(null==_?void 0:_.companyId)||+(null==J?void 0:J.company_id),ce=null==_?void 0:_.asset_id,de=n((null==Q?void 0:Q.filters)||{}),ue=r(de,2),fe=ue[0],je=ue[1],Ce=n((null==Q?void 0:Q.wellSection)||N),ve=r(Ce,2),be=ve[0],ge=ve[1],he=o(!0),Ae=n([]),De=r(Ae,2),Se=De[0],ye=De[1],Ie=n(null),Pe=r(Ie,2),We=Pe[0],xe=Pe[1],Te=n(!0),Oe=r(Te,2),Ee=Oe[0],we=Oe[1],Be=n(!1),Le=r(Be,2),ke=Le[0],He=Le[1],Ve=n(!1),Fe=r(Ve,2),Ne=Fe[0],Me=Fe[1],Re=n(!1),Ue=r(Re,2),ze=Ue[0],Ke=Ue[1],qe=o(),Ge=n(!0),_e=r(Ge,2),Je=_e[0],Qe=_e[1],Xe=i((function(){return!ae&&ne?448:ae?ne?232:0:216}),[ae,ne]);s((function(){he.current=!0}),[ce,null==Q?void 0:Q.selectedWellIds]),s((function(){oe(!Y&&(null==Q?void 0:Q.filterExpanded)),pe(!Y&&(null==Q?void 0:Q.mapHidden)),je((null==Q?void 0:Q.filters)||{}),ge((null==Q?void 0:Q.wellSection)||N)}),[Q,Y]);var Ye=P(me,X),Ze=x(G,ce),$e=r(Ze,2),et=$e[0],tt=$e[1],rt=T(me,null==Q?void 0:Q.metricsKeys),it=r(rt,2),nt=it[0],ot=it[1],st=W(me,Ye,et,tt,ce,nt),lt=O(st);s((function(){if(st&&et){var e=st.find((function(e){return e.id===ce}));if(e){var r=et.filter((function(e){return e.value!==N})).map((function(e){return e.label})),i=q(q({},e),r.length>0&&t({},M.wellSection,r));xe(i)}else xe(null)}}),[et,st]);var at=L(nt),pt=E(st,fe);s((function(){if(pt)if(he.current){var e=p(st.filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)})).concat(We),"id");ye(e),he.current=!1}else ye((function(e){var t=(pt||[]).filter((function(t){return!!e.find((function(e){var r=e.id;return t.id===r}))})).concat(We);return p(t,"id")}))}),[st,pt,null==Q?void 0:Q.selectedWellIds]);var mt=w(We,pt,Se,we,he.current),ct=r(mt,5),dt=ct[0],ut=ct[1],ft=ct[2],jt=ct[3],Ct=ct[4];B(fe[R.radius],pt,ye,te);var vt=l((function(e,t,r){var i;i=r===z.well.name?t:t.reduce((function(e,t){var r,i=null===(r=st.find((function(e){return e.id===t})))||void 0===r?void 0:r.rigName,n=st.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(n)}),[]);var n=st.filter((function(e){var t=e.id;return i.includes(t)}));ye(e?function(e){return p(e.concat(n),"id")}:function(e){return p(e.filter((function(e){var t=e.id;return!n.find((function(e){return e.id===t}))})))})}),[st]),bt=l((function(){Me(!0)}),[]),gt=l((function(e){ot(e)}),[]),ht=l((function(t,r){ye(r?function(r){return[].concat(e(r),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),At=l((function(e){if(e){var t=We?pt.concat(We):pt,r=p(t,"id");ye(r)}else ye(We?[We]:[])}),[pt,We]),Dt=function(e){if(m(tt))ye(We?[We]:[]);else{var t=st.filter((function(t){return tt[e].includes(t.id)}));ye(t)}},St=l((function(e){ge(e),Dt(e)}),[Dt]),yt=i((function(){return Se.find((function(e){return e.id===ce}))?Se.length-1:Se.length}),[Se,ce]),It=i((function(){if(!tt)return!1;var e=Se.map((function(e){return e.id})),t=tt[be]||[];return(te&&t.length>te?te:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[tt,_,Se,be]),Pt=function(){var e=(st||[]).filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)})).concat(We);ye(p(e,"id")),d(fe,Q.filters)||(he.current=!0);var t=q(q({},Q),{},{mapHidden:ae,filterExpanded:ne});$(t),je((null==Q?void 0:Q.filters)||{}),ge((null==Q?void 0:Q.wellSection)||N),Z()},Wt=i((function(){return!It||(!(m(fe)||!fe[R.sideTracks])||be!==N)}),[It,fe,be]);s((function(){if(!te||te>Se.length)Ke(!1);else if(te<Se.length){var e=c(Se,"distance");ye(e.slice(0,te))}else te===Se.length&&Ke(!0)}),[Se,te]);var xt=!st||!et||!Ct,Tt=n(!1),Ot=r(Tt,2),Et=Ot[0],wt=Ot[1],Bt=n(!1),Lt=r(Bt,2),kt=Lt[0],Ht=Lt[1],Vt=n(U),Ft=r(Vt,2),Nt=Ft[0],Mt=Ft[1],Rt=n([]),Ut=r(Rt,2),zt=Ut[0],Kt=Ut[1];s((function(){if(Ct){var e=Ct.slice(0,Nt);Kt(e)}}),[Ct,Nt,We]);return g(b,{open:K,onClose:Pt,title:"Select Offset Wells",contentContainerClassName:F.offsetWellDialog,contentClassName:F.contentContainer,actionsClassName:F.modalActions,actions:!Y&&h("div",{className:F.actionsWrapper,children:[!xt&&Wt?g(I,{placement:"bottom-start",title:G?"To Synced Offsets in Offset App":"To Synced Offsets in Wellhub",children:g("div",{children:g(y,{onClick:function(){je({}),ge(N),Dt(N)},color:"primary",startIcon:g(f,{}),children:"Reset"})})}):g("div",{}),h("div",{className:F.buttonGap,children:[g(y,{onClick:Pt,color:"primary",children:"Cancel"}),h(y,{variant:"contained",color:"primary",onClick:function(){Z();var e=q(q({},Q),{},{companyId:me,subjectWellId:ce,selectedWellIds:Se.map((function(e){return e.id})),filters:fe,metricsKeys:nt,wellSection:be,isSynced:It,mapHidden:ae,filterExpanded:ne});$(e,Se)},children:["Select (",yt,")"]})]})]}),children:xt?g(A,{fullscreen:!1}):h("div",{className:F.contentWrapper,ref:qe,children:[h("div",{className:F.countContainer,children:[g(D,{className:F.totalLabel,children:"Total:"}),g(D,{className:F.countValue,children:st.length}),g(D,{className:F.selectedLabel,children:"Selected:"}),g(D,{className:F.countValue,children:yt})]}),te&&te<=Se.length&&g(u,{className:F.viewOnlyTitleLabel,children:"This application can work with no more than (".concat(ee,") offset wells at a time.")}),Y&&g(u,{className:F.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the Offset Well Selection app."}),h("div",{className:F.controlGroup,children:[h(y,{startIcon:g(ne?j:C,{}),classes:{root:F.filterButton},onClick:function(){return oe((function(e){return!e}))},disabled:Y,children:["Filters",!m(fe)&&h("div",{className:F.clearWrapper,onClick:function(e){e.stopPropagation(),je({})},children:[g(v,{className:F.clearIcon}),g("span",{className:F.clearLabel,children:"Clear"})]})]}),g(S,{rightLabel:"Map",color:"primary",checked:!ae,onChange:function(e){return pe(!e.target.checked)}})]}),h("div",{className:F.content,onScroll:function(e){e.target&&(Ne&&(e.target.scrollLeft=0,Me(!1)),e.target.scrollLeft<=5&&Et&&wt(!1),e.target.scrollLeft>5&&!Et&&wt(!0),e.target.scrollTop<12&&kt&&Ht(!1),e.target.scrollTop>=12&&!kt&&Ht(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight)>=e.target.scrollHeight&&Nt<Ct.length&&Mt((function(e){return e+U})))},children:[kt&&g("div",{className:F.topGradient}),!ae&&K&&g(H,{isViewOnly:Y,mapHidden:ae,companyId:me,subjectWell:We,offsetWellIds:Se.map((function(e){return e.id})),wells:st,radius:fe[R.radius],handleChanageOffsetWell:ht}),g(k,{isHidden:!ne,isWDUser:G,filterOptions:lt,filters:fe,wellSections:et,selectedWellSection:be,subjectWell:We,onChangeFilters:je,onChangeBicWells:St}),g(V,{open:K,isTableLoading:Ee,companyId:me,subjectWellId:ce,sortBy:dt,setSortBy:ut,sortDirection:ft,setSortDirection:jt,columnsWithDict:at,wells:zt,metricsKeys:nt,setMetricsKeys:gt,handleChanageOffsetWell:ht,handleChangeAllOffsetWells:At,handleAddRemoveAssets:vt,isWellNameExpand:ke,setIsWellNameExpand:He,isHscrollMoved:Et,onHideAdvancedSearch:bt,isViewOnly:Y,isLastWell:Ct.length<=Nt,contentRef:qe,isHintPopperOpen:Je,setIsHintPopperOpen:Qe,isLimitedOffsetwells:ze,tableTop:Xe})]})]})})};G.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}),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},G.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:50};export{G 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{useMemo as i,useState as o,useRef as n,useEffect as s,useCallback as l}from"react";import a from"prop-types";import{uniqBy as p,isEmpty as m,sortBy as c,isEqual as d}from"lodash";import{Typography as u}from"@material-ui/core";import{Replay as f,Sort as j,FilterList as C,Close as v}from"@material-ui/icons";import b 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 g,jsxs as h}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"../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 D}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 S 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 y 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 I}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 P}from"./effects/useFetchWells.js";import{useAdvancedWells as W}from"./effects/useAdvancedWells.js";import{useBicWells as x}from"./effects/useBicWells.js";import{useCompanyMetricKey as T}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as O}from"./effects/useFilterOptions.js";import{useFilteredWells as E}from"./effects/useFilteredWells.js";import{useSortedWells as w}from"./effects/useSortedWells.js";import{useRadiusWells as B}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as L}from"./effects/useTableColumns.js";import{Filter as k}from"./components/Filter/Filter.js";import{WellsMap as V}from"./components/Map/WellsMap.js";import F from"./components/OffsetWellsTable/OffsetWellsTable.js";import H from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as N,ColumnType as M,FilterType as R,ROWS_PER_PAGE as U}from"./constants.js";import{SEARCH_CATEGORIES as z}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";function K(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 q(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?K(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):K(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var G=function(a){var K=a.open,G=a.isWDUser,_=a.defaultSubjectWell,J=a.currentUser,Q=a.offsetSettings,X=a.addWellsUsabilityInfo,Y=a.isViewOnly,Z=a.onClose,$=a.onSave,ee=a.maxOffsetSize,te=i((function(){return ee+1}),[ee]),re=o(null==Q?void 0:Q.filterExpanded),ie=r(re,2),oe=ie[0],ne=ie[1],se=o(null==Q?void 0:Q.mapHidden),le=r(se,2),ae=le[0],pe=le[1],me=+(null==_?void 0:_.companyId)||+(null==J?void 0:J.company_id),ce=null==_?void 0:_.asset_id,de=o((null==Q?void 0:Q.filters)||{}),ue=r(de,2),fe=ue[0],je=ue[1],Ce=o((null==Q?void 0:Q.wellSection)||N),ve=r(Ce,2),be=ve[0],ge=ve[1],he=n(!0),Ae=o([]),De=r(Ae,2),Se=De[0],ye=De[1],Ie=o(null),Pe=r(Ie,2),We=Pe[0],xe=Pe[1],Te=o(!0),Oe=r(Te,2),Ee=Oe[0],we=Oe[1],Be=o(!1),Le=r(Be,2),ke=Le[0],Ve=Le[1],Fe=o(!1),He=r(Fe,2),Ne=He[0],Me=He[1],Re=o(!1),Ue=r(Re,2),ze=Ue[0],Ke=Ue[1],qe=n(),Ge=i((function(){return!ae&&oe?448:ae?oe?232:0:216}),[ae,oe]);s((function(){he.current=!0}),[ce,null==Q?void 0:Q.selectedWellIds]),s((function(){ne(!Y&&(null==Q?void 0:Q.filterExpanded)),pe(!Y&&(null==Q?void 0:Q.mapHidden)),je((null==Q?void 0:Q.filters)||{}),ge((null==Q?void 0:Q.wellSection)||N)}),[Q,Y]);var _e=P(me,X),Je=x(G,ce),Qe=r(Je,2),Xe=Qe[0],Ye=Qe[1],Ze=T(me,null==Q?void 0:Q.metricsKeys),$e=r(Ze,2),et=$e[0],tt=$e[1],rt=W(me,_e,Xe,Ye,ce,et),it=O(rt);s((function(){if(rt&&Xe){var e=rt.find((function(e){return e.id===ce}));if(e){var r=Xe.filter((function(e){return e.value!==N})).map((function(e){return e.label})),i=q(q({},e),r.length>0&&t({},M.wellSection,r));xe(i)}else xe(null)}}),[Xe,rt]);var ot=L(et),nt=E(rt,fe);s((function(){if(nt)if(he.current){var e=p(rt.filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)})).concat(We),"id");ye(e),he.current=!1}else ye((function(e){var t=(nt||[]).filter((function(t){return!!e.find((function(e){var r=e.id;return t.id===r}))})).concat(We);return p(t,"id")}))}),[rt,nt,null==Q?void 0:Q.selectedWellIds]);var st=w(We,nt,Se,we,he.current),lt=r(st,5),at=lt[0],pt=lt[1],mt=lt[2],ct=lt[3],dt=lt[4];B(fe[R.radius],nt,ye,te);var ut=l((function(e,t,r){var i;i=r===z.well.name?t:t.reduce((function(e,t){var r,i=null===(r=rt.find((function(e){return e.id===t})))||void 0===r?void 0:r.rigName,o=rt.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(o)}),[]);var o=rt.filter((function(e){var t=e.id;return i.includes(t)}));ye(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}))})))})}),[rt]),ft=l((function(){Me(!0)}),[]),jt=l((function(e){tt(e)}),[]),Ct=l((function(t,r){ye(r?function(r){return[].concat(e(r),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),vt=l((function(e){if(e){var t=We?nt.concat(We):nt,r=p(t,"id");ye(r)}else ye(We?[We]:[])}),[nt,We]),bt=function(e){if(m(Ye))ye(We?[We]:[]);else{var t=rt.filter((function(t){return Ye[e].includes(t.id)}));ye(t)}},gt=l((function(e){ge(e),bt(e)}),[bt]),ht=i((function(){return Se.find((function(e){return e.id===ce}))?Se.length-1:Se.length}),[Se,ce]),At=i((function(){if(!Ye)return!1;var e=Se.map((function(e){return e.id})),t=Ye[be]||[];return(te&&t.length>te?te:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[Ye,_,Se,be]),Dt=function(){var e=(rt||[]).filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)})).concat(We);ye(p(e,"id")),d(fe,Q.filters)||(he.current=!0);var t=q(q({},Q),{},{mapHidden:ae,filterExpanded:oe});$(t),je((null==Q?void 0:Q.filters)||{}),ge((null==Q?void 0:Q.wellSection)||N),Z()},St=i((function(){return!At||(!(m(fe)||!fe[R.sideTracks])||be!==N)}),[At,fe,be]);s((function(){if(!te||te>Se.length)Ke(!1);else if(te<Se.length){var e=c(Se,"distance");ye(e.slice(0,te))}else te===Se.length&&Ke(!0)}),[Se,te]);var yt=!rt||!Xe||!dt,It=o(!1),Pt=r(It,2),Wt=Pt[0],xt=Pt[1],Tt=o(!1),Ot=r(Tt,2),Et=Ot[0],wt=Ot[1],Bt=o(U),Lt=r(Bt,2),kt=Lt[0],Vt=Lt[1],Ft=o([]),Ht=r(Ft,2),Nt=Ht[0],Mt=Ht[1];s((function(){if(dt){var e=dt.slice(0,kt);Mt(e)}}),[dt,kt,We]);return g(b,{open:K,onClose:Dt,title:"Select Offset Wells",contentContainerClassName:H.offsetWellDialog,contentClassName:H.contentContainer,actionsClassName:H.modalActions,actions:!Y&&h("div",{className:H.actionsWrapper,children:[!yt&&St?g(I,{placement:"bottom-start",title:G?"To Synced Offsets in Offset App":"To Synced Offsets in Wellhub",children:g("div",{children:g(y,{onClick:function(){je({}),ge(N),bt(N)},color:"primary",startIcon:g(f,{}),children:"Reset"})})}):g("div",{}),h("div",{className:H.buttonGap,children:[g(y,{onClick:Dt,color:"primary",children:"Cancel"}),h(y,{variant:"contained",color:"primary",onClick:function(){Z();var e=q(q({},Q),{},{companyId:me,subjectWellId:ce,selectedWellIds:Se.map((function(e){return e.id})),filters:fe,metricsKeys:et,wellSection:be,isSynced:At,mapHidden:ae,filterExpanded:oe});$(e,Se)},children:["Select (",ht,")"]})]})]}),children:yt?g(A,{fullscreen:!1}):h("div",{className:H.contentWrapper,ref:qe,children:[h("div",{className:H.countContainer,children:[g(D,{className:H.totalLabel,children:"Total:"}),g(D,{className:H.countValue,children:rt.length}),g(D,{className:H.selectedLabel,children:"Selected:"}),g(D,{className:H.countValue,children:ht})]}),te&&te<=Se.length&&g(u,{className:H.viewOnlyTitleLabel,children:"This app supports no more than (".concat(ee,") offset wells at a time.")}),Y&&g(u,{className:H.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the Offset Well Selection app."}),h("div",{className:H.controlGroup,children:[h(y,{startIcon:g(oe?j:C,{}),classes:{root:H.filterButton},onClick:function(){return ne((function(e){return!e}))},disabled:Y,children:["Filters",!m(fe)&&h("div",{className:H.clearWrapper,onClick:function(e){e.stopPropagation(),je({})},children:[g(v,{className:H.clearIcon}),g("span",{className:H.clearLabel,children:"Clear"})]})]}),g(S,{rightLabel:"Map",color:"primary",checked:!ae,onChange:function(e){return pe(!e.target.checked)}})]}),h("div",{className:H.content,onScroll:function(e){e.target&&(Ne&&(e.target.scrollLeft=0,Me(!1)),e.target.scrollLeft<=5&&Wt&&xt(!1),e.target.scrollLeft>5&&!Wt&&xt(!0),e.target.scrollTop<12&&Et&&wt(!1),e.target.scrollTop>=12&&!Et&&wt(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight)>=e.target.scrollHeight&&kt<dt.length&&Vt((function(e){return e+U})))},children:[Et&&g("div",{className:H.topGradient}),!ae&&K&&g(V,{isViewOnly:Y,mapHidden:ae,companyId:me,subjectWell:We,offsetWellIds:Se.map((function(e){return e.id})),wells:rt,radius:fe[R.radius],handleChanageOffsetWell:Ct}),g(k,{isHidden:!oe,isWDUser:G,filterOptions:it,filters:fe,wellSections:Xe,selectedWellSection:be,subjectWell:We,onChangeFilters:je,onChangeBicWells:gt}),g(F,{open:K,isTableLoading:Ee,companyId:me,subjectWellId:ce,sortBy:at,setSortBy:pt,sortDirection:mt,setSortDirection:ct,columnsWithDict:ot,wells:Nt,metricsKeys:et,setMetricsKeys:jt,handleChanageOffsetWell:Ct,handleChangeAllOffsetWells:vt,handleAddRemoveAssets:ut,isWellNameExpand:ke,setIsWellNameExpand:Ve,isHscrollMoved:Wt,onHideAdvancedSearch:ft,isViewOnly:Y,isLastWell:dt.length<=kt,contentRef:qe,isLimitedOffsetwells:ze,tableTop:Ge,wellSections:Xe})]})]})})};G.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},G.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:50};export{G 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 b from"./OffsetWellsTableHead.js";import D from"./OffsetWellsTableRow.js";import{METRICS_LIST as v,EXPANED_WELLNAME_WIDTH as g,TableColumns as S,ROW_HEIGHT as y}from"../../constants.js";import x from"./OffsetWellsTable.module.css.js";import{getIsImperial as P}from"../../utils/unitSystem.js";var I=function(r){var a=r.open,I=r.isTableLoading,T=r.companyId,E=r.subjectWellId,W=r.sortBy,R=r.setSortBy,w=r.sortDirection,O=r.setSortDirection,B=r.columnsWithDict,L=r.wells,k=r.metricsKeys,H=r.setMetricsKeys,q=r.handleChanageOffsetWell,V=r.handleChangeAllOffsetWells,F=r.handleAddRemoveAssets,N=r.isWellNameExpand,M=r.setIsWellNameExpand,K=r.isHscrollMoved,z=r.onHideAdvancedSearch,U=r.isViewOnly,G=r.isLastWell,J=r.contentRef,Q=r.isHintPopperOpen,X=r.setIsHintPopperOpen,Y=r.isLimitedOffsetwells,Z=r.tableTop,$=i(),_=i(),ee=o((function(){var e=L.filter((function(e){return e.checked}));return[e,L.length!==e.length&&e.length&&!Y,e.length===L.length||Y]}),[L,Y]),te=t(ee,3),re=te[0],ie=te[1],oe=te[2],se=o((function(){return P()}),[]),ne=o((function(){return(k||[]).reduce((function(e,t){return e.concat(v.filter((function(e){return e.key===t})))}),[])}),[k]),pe=o((function(){return N?g-58:S[0].width[k.length]-58}),[N,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,L]);var le=n((function(e,t){R(e),O(t)}),[]),me=n((function(e){H(e)}),[]),de=n((function(e,t){H((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return I?j(A,{fullscreen:!1}):B&&L?C(f,{children:[j("div",{className:x.stickyTable,children:C(l,{"aria-label":"ows table head",innerRef:$,children:[j(m,{children:j(b,{open:a,columnsWithDict:B,metricsKeys:k,sortBy:W,sortDirection:w,indeterminate:ie,isAllWellsSelected:oe,onChangeSort:le,onChangeMetricsKeys:me,onUpdateMetricsKey:de,isWellNameExpand:N,setIsWellNameExpand:M,handleChangeAllOffsetWells:V,wellNameStyle:x.wellNameFixed,isViewOnly:U,isImperial:se,contentRef:J,isHintPopperOpen:Q,setIsHintPopperOpen:X})}),!U&&j(d,{children:j(c,{children:j(u,{className:x.searchCell,children:j(h,{companyId:T,wells:L,onChange:F,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))})}),L.map((function(e){return j(D,{columnsWithDict:B,subjectWellId:E,data:e,metricsKeys:k,metricsColumns:ne,handleChanageOffsetWell:q,isWellNameExpand:N,wellNameStyle:x.wellNameFixed,wellNameWidth:pe,isViewOnly:U,isImperial:se,isLimitedOffsetwells:Y,flyTo:ae,tableTop: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};I.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,isHintPopperOpen:a.bool.isRequired,setIsHintPopperOpen:a.func.isRequired,isLimitedOffsetwells:a.bool.isRequired,contentRef:a.shape().isRequired,tableTop:a.number.isRequired};var T=r(I);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 D from"./OffsetWellsTableHead.js";import b from"./OffsetWellsTableRow.js";import{METRICS_LIST as v,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,E=r.subjectWellId,W=r.sortBy,w=r.setSortBy,R=r.sortDirection,B=r.setSortDirection,L=r.columnsWithDict,O=r.wells,k=r.metricsKeys,V=r.setMetricsKeys,q=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=i(),$=i(),_=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]),ee=t(_,3),te=ee[0],re=ee[1],ie=ee[2],oe=o((function(){return I()}),[]),se=o((function(){return(k||[]).reduce((function(e,t){return e.concat(v.filter((function(e){return e.key===t})))}),[])}),[k]),ne=o((function(){return M?S-58:g[0].width[k.length]-58}),[M,null==k?void 0:k.length]),pe=o((function(){return te.length*y}),[te]);s((function(){var e=Z.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,Z.current,O]);var ae=n((function(e,t){w(e),B(t)}),[]),le=n((function(e){V(e)}),[]),me=n((function(e,t){V((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:Z,children:[j(m,{children:j(D,{open:a,columnsWithDict:L,metricsKeys:k,sortBy:W,sortDirection:R,indeterminate:re,isAllWellsSelected:ie,onChangeSort:ae,onChangeMetricsKeys:le,onUpdateMetricsKey:me,isWellNameExpand:M,setIsWellNameExpand:H,handleChangeAllOffsetWells:F,wellNameStyle:x.wellNameFixed,isViewOnly:U,isImperial:oe,contentRef:J})}),!U&&j(d,{children:j(c,{children:j(u,{className:x.searchCell,children:j(h,{companyId:T,wells:O,onChange:N,selectedWellIds:te.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:E,data:e,metricsKeys:k,metricsColumns:se,handleChanageOffsetWell:q,isWellNameExpand:M,wellNameStyle:x.wellNameFixed,wellNameWidth:ne,isViewOnly:U,isImperial:oe,isLimitedOffsetwells:Q,flyTo:pe,tableTop:X,wellSections:Y},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};var T=r(P);export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{memo as i,useState as n}from"react";import l from"classnames";import s from"prop-types";import{SortDirection as a}from"react-virtualized";import{
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{memo as i,useState as n}from"react";import l from"classnames";import s from"prop-types";import{SortDirection as a}from"react-virtualized";import{TableRow as c,TableCell as o,Checkbox as d,Tooltip as m,TableSortLabel as u}from"@material-ui/core";import{ArrowForwardIos as p}from"@material-ui/icons";import{MetricsSettingMenu as h}from"./MetricsSettingMenu.js";import{MetricsSelect as f}from"./MetricsSelect.js";import{EXPANED_WELLNAME_WIDTH as y,ColumnType as b}from"../../constants.js";import C from"./OffsetWellsTableHead.module.css.js";import{jsxs as g,jsx as v}from"react/jsx-runtime";var O=["title"];function S(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 w(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?S(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var N=function(e){var t=e.title,i=r(e,O);return v(m,{placement:"top-end",title:t,children:v(u,w({},i))})};function R(e,t){var r=e.find((function(e){return e.key===t}));return(null==r?void 0:r.width)||0}var q=function(r){var i=r.open,s=r.columnsWithDict,u=r.metricsKeys,O=r.sortBy,S=r.sortDirection,w=r.indeterminate,q=r.isAllWellsSelected,W=r.onChangeSort,j=r.onChangeMetricsKeys,D=r.onUpdateMetricsKey,E=r.isWellNameExpand,k=r.setIsWellNameExpand,A=r.handleChangeAllOffsetWells,P=r.wellNameStyle,x=r.isViewOnly,L=r.isImperial,M=r.contentRef,K=n(!1),I=e(K,2),T=I[0],V=I[1],z=function(e){W(e,e===O&&S===a.ASC?a.DESC:a.ASC)};return g(c,{className:C.tableRow,children:[v(o,{className:l(C.headCell,C.wellNameCell,P),style:{width:E?y:R(s,b.name)},children:g("div",{className:C.nameWrapper,children:[!x&&i&&v(d,{size:"medium",onChange:function(e){return A(e.target.checked)},checked:q,indeterminate:w}),v(N,{title:"Sort",active:O===b.name,direction:O===b.name&&S===a.DESC?"desc":"asc",classes:{root:l(C.headerLabel,t({},C.cellDataViewOnly,x))},onClick:function(){return z(b.name)},children:"Well Name"})]})}),v(o,{className:C.headCell,style:{width:R(s,b.status)},children:v(m,{title:E?"Collapse":"Expand",children:v(p,{className:l(C.wellNameExpandIcon,t({},C.wellNameCollapsed,!E)),onClick:function(){return k(!E)}})})}),v(o,{className:C.headCell,style:{width:R(s,b.rig)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===b.rig,direction:O===b.rig&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(b.rig)},children:"Rig"})})}),v(o,{className:C.headCell,style:{width:R(s,b.distance)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===b.distance,direction:O===b.distance&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(b.distance)},children:"Distance (".concat(L?"miles":"km",")")})})}),v(o,{className:C.headCell,style:{width:R(s,b.lastActive)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===b.lastActive,direction:O===b.lastActive&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(b.lastActive)},children:"Last Active"})})}),u.map((function(e){return v(o,{className:C.headCell,style:{width:R(s,e)},children:v(N,{title:T?"":"Sort",active:O===e,direction:O===e&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(e)},children:v(f,{isTooltipVisible:u.length>1,currentValue:e,onChange:function(t){return D(e,t)},setIsMenuOpen:V})})},e)})),v(o,{className:C.headCell,style:{width:R(s,b.wellSection)},children:g("div",{className:C.settingsHeader,children:[v("span",{className:C.headerLabel,children:"Well Section"}),v(h,{metricsKeys:u,onChange:j,contentRef:M})]})})]})};q.propTypes={open:s.bool.isRequired,columnsWithDict:s.arrayOf(s.shape({key:s.string,label:s.string,type:s.string,width:s.number})).isRequired,metricsKeys:s.arrayOf(s.string).isRequired,sortBy:s.string.isRequired,sortDirection:s.string.isRequired,indeterminate:s.bool.isRequired,isAllWellsSelected:s.bool.isRequired,style:s.shape({}).isRequired,onChangeSort:s.func.isRequired,onChangeMetricsKeys:s.func.isRequired,onUpdateMetricsKey:s.func.isRequired,isWellNameExpand:s.bool.isRequired,setIsWellNameExpand:s.func.isRequired,handleChangeAllOffsetWells:s.func.isRequired,wellNameStyle:s.string.isRequired,isViewOnly:s.bool.isRequired,isImperial:s.bool.isRequired,contentRef:s.shape({current:s.instanceOf(Element)}).isRequired};var W=i(q);export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as l,useRef as r,useState as i,useCallback as n,useEffect as s,useMemo as a}from"react";import o from"prop-types";import{startCase as c,get as u}from"lodash";import d from"classnames";import m from"moment";import{TableRow as f,TableCell as h,Checkbox as y,Tooltip as p,Typography as b}from"@material-ui/core";import{convertValue as N}from"../../../../utils/index.js";import{ColumnType as v,EXPANED_WELLNAME_WIDTH as w,StatusOptions as g,ROW_HEIGHT as R}from"../../constants.js";import{SubjectWellMark as C}from"./SubjectWellMark.js";import W from"./OffsetWellsTableRow.module.css.js";import q from"./ViewWellSectionsName.js";import{jsxs as T,jsx as k}from"react/jsx-runtime";function O(e,t,l){var r=t.find((function(e){return e.key===l})),i=u(e,r.key);return"undefined"===i?"loading...":Number.isFinite(i)||i?r.unitType?N(i,r.unitType,r.from,r.to):i:"—"}function j(e,t){var l=u(e,v.distance);return Number.isFinite(l)?t?l:N(l,"length","mi","km"):"—"}function x(e,t){var l=e.find((function(e){return e.key===t}));return(null==l?void 0:l.width)||0}var S=function(l){var o,u,N=l.columnsWithDict,S=l.data,D=l.subjectWellId,M=l.metricsKeys,I=l.metricsColumns,A=l.handleChanageOffsetWell,Y=l.isWellNameExpand,z=l.wellNameStyle,L=l.wellNameWidth,V=l.isViewOnly,E=l.isImperial,F=l.isLimitedOffsetwells,K=l.flyTo,P=l.tableTop,H=l.wellSections,B=D===S.id,G=t({},W.subjectWellRow,B),J=r(),Q=r(),U=i(!1),X=e(U,2),Z=X[0],$=X[1],_=r(),ee=!1,te=S[v.name]||"—",le=te;if(!Y&&2*L<8*te.length){var re=function(e){var t=document.createElement("span");document.body.appendChild(t),t.style.font="Roboto",t.style.fontSize="14px",t.style.letterSpacing="0.01071em",t.style.height="auto",t.style.width="auto",t.style.position="absolute",t.innerHTML=e;var l=Math.ceil(t.clientWidth);return document.body.removeChild(t),l}(te);if(re>2*L){var ie=2*L/(re/te.length);le="".concat(te.substring(0,ie/2-2),"\n... ").concat(te.substring(te.length-ie/2+6)),ee=!0}}var ne=n((function(e,t){var l=t-e+16;J.current.style.position="absolute",J.current.style.top="".concat(e,"px"),J.current.style.zIndex=3,J.current.style.transition="transform ".concat(800,"ms ease"),J.current.style.transform="translateY(".concat(l,"px)")}),[]),se=n((function(){J.current.style.position="unset",J.current.style.zIndex=1,J.current.style.transition="none",J.current.style.transform="none"}),[]);s((function(){se(),$(!1),Q.current&&(clearTimeout(Q.current),Q.current=null),_.current=K}),[K]);var ae,oe,ce=n((function(e){if(!Q.current){var t=J.current.offsetTop,l=K;e?Math.abs(l-t)>=7*R&&(l=t-7*R):l=t+7*R,$(!0),ne(t,l),Q.current=setTimeout((function(){return A(S,e)}),800)}}),[S,K,P]),ue=a((function(){return S[v.wellSection]}),[S]);return T(f,{className:W.bodyRow,innerRef:J,children:[T(h,{className:d(W.bodyCell,W.wellNameCell,z,G),style:{width:Y?w:x(N,v.name)},children:[B&&k(C,{className:W.subjectWellMark}),!B&&k(y,{size:"medium",checked:Z&&_.current===K?!S.checked:S.checked,disabled:V||F&&!S.checked,onChange:function(e){return ce(e.target.checked)}}),k(p,{title:ee?te:"",children:k(b,{variant:"body2",className:d(W.wellNameCursor,(o={},t(o,W.cellDataViewOnly,B),t(o,W.wellNamePreWrap,ee),o)),children:ee?le:te})})]}),k(h,{className:d(W.bodyCell,G),style:{width:x(N,v.status)},children:!B&&k(p,{title:c(S[v.status]),children:k("div",{className:W.status,style:{background:null===(u=g.find((function(e){return e.value===S[v.status]})))||void 0===u?void 0:u.color}})})}),k(h,{className:d(W.bodyCell,G),style:{width:x(N,v.rig)},children:k(b,{variant:"body2",className:W.cellData,children:S[v.rig]&&"Null"!==S[v.rig]?S[v.rig]:"—"})}),k(h,{className:d(W.bodyCell,G),style:{width:x(N,v.distance)},children:k(b,{variant:"body2",className:W.cellData,children:j(S,E)})}),k(h,{className:d(W.bodyCell,G),style:{width:x(N,v.lastActive)},children:k(b,{variant:"body2",className:W.cellData,children:S[v.lastActive]&&Number.isFinite(S[v.lastActive])?m.unix(S[v.lastActive]).format("MM/DD/YYYY"):"—"})}),M.map((function(e){return k(h,{className:d(W.bodyCell,G),style:{width:x(N,e)},children:k(b,{variant:"body2",className:W.cellData,children:O(S,I,e)})},e)})),k(h,{className:d(W.bodyCell,W.lastCell,G),style:{width:x(N,v.wellSection)},children:ue&&ue.length>1?k(p,{classes:{tooltip:W.customTooltip},title:k(q,{wellSectionNames:ue}),children:k("div",{className:W.sectionLength,children:ue.length})}):k(p,{title:ue||"",children:k(b,{variant:"body2",className:W.cellData,style:{color:ue&&1===ue.length&&(ae=ue,oe=e(ae,1)[0],H.find((function(e){return e.label===oe})).color)},children:ue})})})]})};S.propTypes={columnsWithDict:o.arrayOf(o.shape({})).isRequired,data:o.shape({id:o.number,checked:o.bool,name:o.string,status:o.string}).isRequired,subjectWellId:o.number.isRequired,metricsKeys:o.arrayOf(o.string).isRequired,metricsColumns:o.arrayOf(o.shape({})).isRequired,handleChanageOffsetWell:o.func.isRequired,isWellNameExpand:o.bool.isRequired,wellNameStyle:o.string.isRequired,wellNameWidth:o.number.isRequired,isViewOnly:o.bool.isRequired,isImperial:o.bool.isRequired,isLimitedOffsetwells:o.bool.isRequired,flyTo:o.number.isRequired,tableTop:o.number.isRequired,wellSections:o.arrayOf(o.shape({})).isRequired};var D=l(S);export{D as default};
|
package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.module.css.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={bodyRow:"OffsetWellsTableRow-module_bodyRow__UqDEw",subjectWellRow:"OffsetWellsTableRow-module_subjectWellRow__x60wK",subjectWellMark:"OffsetWellsTableRow-module_subjectWellMark__S-nvA",bodyCell:"OffsetWellsTableRow-module_bodyCell__B-yWv",cellData:"OffsetWellsTableRow-module_cellData__SNLYB",cellDataViewOnly:"OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1",hoverCell:"OffsetWellsTableRow-module_hoverCell__4wFuk",wellNameCell:"OffsetWellsTableRow-module_wellNameCell__BBEf-",lastCell:"OffsetWellsTableRow-module_lastCell__VEQCi",subjectWellImage:"OffsetWellsTableRow-module_subjectWellImage__IkmRP",status:"OffsetWellsTableRow-module_status__qWj9c",customTooltip:"OffsetWellsTableRow-module_customTooltip__aeWUJ",wellNameCursor:"OffsetWellsTableRow-module_wellNameCursor__BlXVa",wellNamePreWrap:"OffsetWellsTableRow-module_wellNamePreWrap__oXXEB"};e(".OffsetWellsTableRow-module_bodyRow__UqDEw{display:flex!important;flex-direction:row!important;margin-bottom:4px!important}.OffsetWellsTableRow-module_subjectWellRow__x60wK{border-color:var(--palette-primary-main)!important}.OffsetWellsTableRow-module_subjectWellMark__S-nvA{left:-1px;position:absolute;top:-1px;z-index:98}.OffsetWellsTableRow-module_bodyCell__B-yWv{align-items:center!important;background:var(--palette-background-b-8)!important;border-bottom:1px solid var(--palette-primary-text-9);border-top:1px solid var(--palette-primary-text-9);display:flex!important;height:56px!important;padding:0 12px 0 0!important}.OffsetWellsTableRow-module_cellData__SNLYB{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--palette-primary-text-1);display:-webkit-box;font-size:14px;font-weight:400;line-height:20px;overflow:hidden;overflow-wrap:break-word}.OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1{padding-left:12px}.OffsetWellsTableRow-module_hoverCell__4wFuk{background:var(--palette-background-b-7)!important}.OffsetWellsTableRow-module_wellNameCell__BBEf-{border-bottom-left-radius:4px;border-left:1px solid var(--palette-primary-text-9);border-top-left-radius:4px;left:0;position:sticky;z-index:2}.OffsetWellsTableRow-module_lastCell__VEQCi{border-bottom-right-radius:4px;border-right:1px solid var(--palette-primary-text-9);border-top-right-radius:4px}.OffsetWellsTableRow-module_subjectWellImage__IkmRP{height:16px;width:16px}.OffsetWellsTableRow-module_status__qWj9c{border-radius:50%;cursor:default;height:8px;width:8px}.OffsetWellsTableRow-module_customTooltip__aeWUJ{
|
|
1
|
+
import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={bodyRow:"OffsetWellsTableRow-module_bodyRow__UqDEw",subjectWellRow:"OffsetWellsTableRow-module_subjectWellRow__x60wK",subjectWellMark:"OffsetWellsTableRow-module_subjectWellMark__S-nvA",bodyCell:"OffsetWellsTableRow-module_bodyCell__B-yWv",cellData:"OffsetWellsTableRow-module_cellData__SNLYB",cellDataViewOnly:"OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1",hoverCell:"OffsetWellsTableRow-module_hoverCell__4wFuk",wellNameCell:"OffsetWellsTableRow-module_wellNameCell__BBEf-",lastCell:"OffsetWellsTableRow-module_lastCell__VEQCi",subjectWellImage:"OffsetWellsTableRow-module_subjectWellImage__IkmRP",status:"OffsetWellsTableRow-module_status__qWj9c",customTooltip:"OffsetWellsTableRow-module_customTooltip__aeWUJ",wellNameCursor:"OffsetWellsTableRow-module_wellNameCursor__BlXVa",wellNamePreWrap:"OffsetWellsTableRow-module_wellNamePreWrap__oXXEB",sectionLength:"OffsetWellsTableRow-module_sectionLength__vxefy"};e(".OffsetWellsTableRow-module_bodyRow__UqDEw{display:flex!important;flex-direction:row!important;margin-bottom:4px!important}.OffsetWellsTableRow-module_subjectWellRow__x60wK{border-color:var(--palette-primary-main)!important}.OffsetWellsTableRow-module_subjectWellMark__S-nvA{left:-1px;position:absolute;top:-1px;z-index:98}.OffsetWellsTableRow-module_bodyCell__B-yWv{align-items:center!important;background:var(--palette-background-b-8)!important;border-bottom:1px solid var(--palette-primary-text-9);border-top:1px solid var(--palette-primary-text-9);display:flex!important;height:56px!important;padding:0 12px 0 0!important}.OffsetWellsTableRow-module_cellData__SNLYB{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--palette-primary-text-1);display:-webkit-box;font-size:14px;font-weight:400;line-height:20px;overflow:hidden;overflow-wrap:break-word}.OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1{padding-left:12px}.OffsetWellsTableRow-module_hoverCell__4wFuk{background:var(--palette-background-b-7)!important}.OffsetWellsTableRow-module_wellNameCell__BBEf-{border-bottom-left-radius:4px;border-left:1px solid var(--palette-primary-text-9);border-top-left-radius:4px;left:0;position:sticky;z-index:2}.OffsetWellsTableRow-module_lastCell__VEQCi{border-bottom-right-radius:4px;border-right:1px solid var(--palette-primary-text-9);border-top-right-radius:4px}.OffsetWellsTableRow-module_subjectWellImage__IkmRP{height:16px;width:16px}.OffsetWellsTableRow-module_status__qWj9c{border-radius:50%;cursor:default;height:8px;width:8px}.OffsetWellsTableRow-module_customTooltip__aeWUJ{opacity:.9!important}.OffsetWellsTableRow-module_wellNameCursor__BlXVa{color:var(--palette-primary-text-1);cursor:default;word-break:break-all}.OffsetWellsTableRow-module_wellNamePreWrap__oXXEB{white-space:pre}.OffsetWellsTableRow-module_sectionLength__vxefy{background:var(--palette-primary-text-9);border-radius:20px;cursor:default;padding:2px 8px}");export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"prop-types";import{isEmpty as i}from"lodash";import{makeStyles as n,Typography as a}from"@material-ui/core";import{jsxs as t,jsx as r}from"react/jsx-runtime";var o=n({mainContainer:{padding:"8px"},title:{fontSize:"12px",lineHeight:"16px",marginBottom:"8px"},sectionNameContainer:{display:"flex",flexDirection:"column",gap:"4px"},sectionName:{display:"flex",gap:"8px",alignItems:"center"}}),l=function(e){var n=e.wellSectionNames,l=o();return i(n)?null:t("div",{className:l.mainContainer,children:[r("div",{className:l.title,children:"Best in Well Sections: "}),r("div",{className:l.sectionNameContainer,children:n.map((function(e){return r("div",{className:l.sectionName,children:r(a,{variant:"body2",children:e})})}))})]})};l.propTypes={wellSectionNames:e.arrayOf(e.string).isRequired};export{l 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",i="All",r=450,o=50,s=60,n=a,p={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"},_=[{value:p.rig,label:"Rig"},{value:p.program,label:"Program"},{value:p.basin,label:"Basin"},{value:p.county,label:"County"},{value:p.area,label:"Area"},{value:p.formation,label:"Target Formation"},{value:p.stringDesign,label:"String Design"}],c={unknown:"unknown",idle:"idle",active:"active",paused:"paused",complete:"complete"},d=[{value:c.unknown,color:"#9E9E9E"},{value:c.idle,color:"#BDBDBD"},{value:c.active,color:"#95F126"},{value:c.paused,color:"#FFF350"},{value:c.complete,color:"#2196F3"}],u={name:"name",status:"status",rig:"rigName",distance:"distance",lastActive:"lastActive",metrics:"metrics",wellSection:"wellSection"},m=[{type:u.name,label:"Well Name",key:u.name,width:[
|
|
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",i="All",r=450,o=50,s=60,n=a,p={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"},_=[{value:p.rig,label:"Rig"},{value:p.program,label:"Program"},{value:p.basin,label:"Basin"},{value:p.county,label:"County"},{value:p.area,label:"Area"},{value:p.formation,label:"Target Formation"},{value:p.stringDesign,label:"String Design"}],c={unknown:"unknown",idle:"idle",active:"active",paused:"paused",complete:"complete"},d=[{value:c.unknown,color:"#9E9E9E"},{value:c.idle,color:"#BDBDBD"},{value:c.active,color:"#95F126"},{value:c.paused,color:"#FFF350"},{value:c.complete,color:"#2196F3"}],u={name:"name",status:"status",rig:"rigName",distance:"distance",lastActive:"lastActive",metrics:"metrics",wellSection:"wellSection"},m=[{type:u.name,label:"Well Name",key:u.name,width:[280,197,197,186]},{type:u.status,label:"",key:u.status,width:[40,40,40,30]},{type:u.rig,label:"Rig",key:u.rig,width:[220,140,140,93]},{type:u.distance,label:"Distance",key:u.distance,width:[160,160,122,93]},{type:u.lastActive,label:"Last Active",key:u.lastActive,width:[140,140,108,98]},{type:u.metrics,label:"",key:"",width:[0,212,141,141]},{type:u.wellSection,label:"Well Section",key:u.wellSection,width:[180,131,131,97]}],g=[{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"}],v=3,b=t([n.weight_to_weight_average,n.bottom_to_slips_average,n.drilling_connection_average,n.slips_to_bottom_average,n.hole_depth,n.hole_depth_change,n.drilled_feet_rotary,n.drilled_feet_slide,n.rop_gross,n.rop,n.rop_rotary,n.rop_slide,n.drilled_feet_rotary_percentage,n.drilled_feet_slide_percentage,n.on_bottom_percentage,n.on_bottom_time,n.cost_per_ft,n.cost_per_lat_ft,n.feet_per_day,n.tripping_in_speed_cased,n.tripping_in_speed_open,n.tripping_in_speed,n.tripping_out_speed_cased,n.tripping_out_speed_open,n.tripping_out_speed].concat(e("production"!==process.env.REACT_APP_ENVIRONMENT?[n.npt,n.circulating_time,n.spud_to_rig_release_time,n.spud_to_total_depth_time]:[])),"label"),y=b.map((function(e){return e.key})),h=["#6EACFF","#69B919","#E95DAF","#A77DFF","#77FFC1","#018EFE","#FF5D7E","#B9E310","#FFD111","#24BB8E","#C426F3"];export{l as ALL_SECTION_KEY,i as ALL_SECTION_LABEL,u as ColumnType,r as EXPANED_WELLNAME_WIDTH,_ as FilterOptions,p as FilterType,v as MAX_METRICS_COUNT,y as METRICS_KEYS,b as METRICS_LIST,g as OBJECTIVE_PERIOD_LIST,o as ROWS_PER_PAGE,s as ROW_HEIGHT,d as StatusOptions,m as TableColumns,h as WellSectionColors,c 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 s,get as u}from"lodash";import{fetchOffsetWellSelections as i,fetchWellhubWells as p}from"../utils/apiCalls.js";import{
|
|
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'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={rangeSliderInput:"Input_rangeSliderInput__uoNkK",rotated:"Input_rotated__GBHlR"};t(".Input_rangeSliderInput__uoNkK{background:var(--palette-background-b-6);border:none;border:1px solid var(--palette-primary-text-6);border-radius:4px;color:var(--palette-primary-text-6);cursor:default;display:block;font-size:14px;font-weight:500;height:24px;line-height:24px;margin:0 0 0 auto;min-width:40px;outline:none;padding:2px 4px;text-align:center}.Input_rangeSliderInput__uoNkK:focus{background-color:var(--palette-background-b-7)}.Input_rangeSliderInput__uoNkK:focus,.Input_rangeSliderInput__uoNkK:hover{border:1px solid var(--palette-primary-main);color:var(--palette-primary-contrast-text)}.Input_rotated__GBHlR{transform:rotate(180deg)}");export{e as default};
|
|
1
|
+
import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={rangeSliderInput:"Input_rangeSliderInput__uoNkK",rotated:"Input_rotated__GBHlR"};t(".Input_rangeSliderInput__uoNkK{background:var(--palette-background-b-6);border:none;border:1px solid var(--palette-primary-text-6);border-radius:4px;color:var(--palette-primary-text-6);cursor:default;display:block;font-size:14px;font-weight:500;height:24px;line-height:24px;margin:0 0 0 auto;max-width:fit-content;min-width:40px;outline:none;padding:2px 4px;text-align:center}.Input_rangeSliderInput__uoNkK:focus{background-color:var(--palette-background-b-7)}.Input_rangeSliderInput__uoNkK:focus,.Input_rangeSliderInput__uoNkK:hover{border:1px solid var(--palette-primary-main);color:var(--palette-primary-contrast-text)}.Input_rotated__GBHlR{transform:rotate(180deg)}");export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var r={rangeSliderHorizontal:"RangeSlider_rangeSliderHorizontal__SAdDE",rangeSliderVertical:"RangeSlider_rangeSliderVertical__k8ac-",rangeSliderRail:"RangeSlider_rangeSliderRail__ufDMI",rangeSliderRailHorizontal:"RangeSlider_rangeSliderRailHorizontal__rLPtT",rotatedVerticalRange:"RangeSlider_rotatedVerticalRange__-oEIw",rangeSliderRailVertical:"RangeSlider_rangeSliderRailVertical__4zKzk",rangeSliderBar:"RangeSlider_rangeSliderBar__Kj3LC",rangeSliderBarHorizontal:"RangeSlider_rangeSliderBarHorizontal__is0F7",rangeSliderBarVertical:"RangeSlider_rangeSliderBarVertical__2DexQ",rangeSliderBarView:"RangeSlider_rangeSliderBarView__6dNQB",rangeSliderBarViewHorizontal:"RangeSlider_rangeSliderBarViewHorizontal__6pRPw",rangeSliderBarViewVertical:"RangeSlider_rangeSliderBarViewVertical__W2QnY",rangeSliderThumb:"RangeSlider_rangeSliderThumb__KMaq0",rangeSliderLabel:"RangeSlider_rangeSliderLabel__3-qO8",rangeSliderInputDivider:"RangeSlider_rangeSliderInputDivider__PcwIK",rangeSliderCompactInputs:"RangeSlider_rangeSliderCompactInputs__ukFLL",disabled:"RangeSlider_disabled__8eBEv"};e('.RangeSlider_rangeSliderHorizontal__SAdDE{align-items:center;display:flex;padding:30px 0 12px;position:relative}.RangeSlider_rangeSliderVertical__k8ac-{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;padding:0 30px}.RangeSlider_rangeSliderRail__ufDMI{background-color:rgba(99,239,255,.24);border-radius:1px;height:3px;position:relative}.RangeSlider_rangeSliderRail__ufDMI:after,.RangeSlider_rangeSliderRail__ufDMI:before{background:#63efff;border-radius:1px;content:"";height:3px;position:absolute;width:2px}.RangeSlider_rangeSliderRail__ufDMI:before{left:0;top:0}.RangeSlider_rangeSliderRail__ufDMI:after{right:0;top:0}.RangeSlider_rangeSliderRailHorizontal__rLPtT{margin:0 6px;width:100%}.RangeSlider_rotatedVerticalRange__-oEIw{transform:rotate(180deg)}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI{width:3px}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:after,.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:before{height:2px;width:3px}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:after{bottom:0!important;top:unset}.RangeSlider_rangeSliderRailVertical__4zKzk{height:100%;margin:6px 0;width:2px}.RangeSlider_rangeSliderBar__Kj3LC{position:absolute;z-index:1}.RangeSlider_rangeSliderBarHorizontal__is0F7{height:12px;margin:1px 0 0;transform:translateY(-50%)}.RangeSlider_rangeSliderBarVertical__2DexQ{height:100%;margin:1px 0 0;width:12px}.RangeSlider_rangeSliderBarView__6dNQB{background:var(--palette-primary-main);border-radius:1px}.RangeSlider_rangeSliderBarViewHorizontal__6pRPw{height:3px;margin:5px 0 0}.RangeSlider_rangeSliderBarViewVertical__W2QnY{height:100%;width:3px}.RangeSlider_rangeSliderBar__Kj3LC:hover>.
|
|
1
|
+
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var r={rangeSliderHorizontal:"RangeSlider_rangeSliderHorizontal__SAdDE",rangeSliderVertical:"RangeSlider_rangeSliderVertical__k8ac-",rangeSliderRail:"RangeSlider_rangeSliderRail__ufDMI",rangeSliderRailHorizontal:"RangeSlider_rangeSliderRailHorizontal__rLPtT",rotatedVerticalRange:"RangeSlider_rotatedVerticalRange__-oEIw",rangeSliderRailVertical:"RangeSlider_rangeSliderRailVertical__4zKzk",rangeSliderBar:"RangeSlider_rangeSliderBar__Kj3LC",rangeSliderBarHorizontal:"RangeSlider_rangeSliderBarHorizontal__is0F7",rangeSliderBarVertical:"RangeSlider_rangeSliderBarVertical__2DexQ",rangeSliderBarView:"RangeSlider_rangeSliderBarView__6dNQB",rangeSliderBarViewHorizontal:"RangeSlider_rangeSliderBarViewHorizontal__6pRPw",rangeSliderBarViewVertical:"RangeSlider_rangeSliderBarViewVertical__W2QnY",rangeSliderThumb:"RangeSlider_rangeSliderThumb__KMaq0",mobileRangeSliderThumb:"RangeSlider_mobileRangeSliderThumb__TEj2q",rangeSliderLabel:"RangeSlider_rangeSliderLabel__3-qO8",rangeSliderInputDivider:"RangeSlider_rangeSliderInputDivider__PcwIK",rangeSliderCompactInputs:"RangeSlider_rangeSliderCompactInputs__ukFLL",disabled:"RangeSlider_disabled__8eBEv"};e('.RangeSlider_rangeSliderHorizontal__SAdDE{align-items:center;display:flex;padding:30px 0 12px;position:relative}.RangeSlider_rangeSliderVertical__k8ac-{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;padding:0 30px}.RangeSlider_rangeSliderRail__ufDMI{background-color:rgba(99,239,255,.24);border-radius:1px;height:3px;position:relative}.RangeSlider_rangeSliderRail__ufDMI:after,.RangeSlider_rangeSliderRail__ufDMI:before{background:#63efff;border-radius:1px;content:"";height:3px;opacity:.24;position:absolute;width:2px}.RangeSlider_rangeSliderRail__ufDMI:before{left:0;top:0}.RangeSlider_rangeSliderRail__ufDMI:after{right:0;top:0}.RangeSlider_rangeSliderRailHorizontal__rLPtT{margin:0 6px;width:100%}.RangeSlider_rotatedVerticalRange__-oEIw{transform:rotate(180deg)}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI{width:3px}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:after,.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:before{height:2px;width:3px}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:after{bottom:0!important;top:unset}.RangeSlider_rangeSliderRailVertical__4zKzk{height:100%;margin:6px 0;width:2px}.RangeSlider_rangeSliderBar__Kj3LC{position:absolute;z-index:1}.RangeSlider_rangeSliderBarHorizontal__is0F7{height:12px;margin:1px 0 0;transform:translateY(-50%)}.RangeSlider_rangeSliderBarVertical__2DexQ{height:100%;margin:1px 0 0;width:12px}.RangeSlider_rangeSliderBarView__6dNQB{background:var(--palette-primary-main);border-radius:1px}.RangeSlider_rangeSliderBarViewHorizontal__6pRPw{height:3px;margin:5px 0 0;position:relative}.RangeSlider_rangeSliderBarViewVertical__W2QnY{height:100%;width:3px}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewHorizontal__6pRPw:before,.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewVertical__W2QnY:before{background:#03bcd4;border-radius:1px;content:"";opacity:.4;position:absolute}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewHorizontal__6pRPw:before{bottom:-2px;height:7px;width:100%}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewVertical__W2QnY:before{height:100%;left:-2px;width:7px}.RangeSlider_rangeSliderThumb__KMaq0{align-items:center;display:flex;height:25px;justify-content:center;position:absolute;transform:translate(-50%,-50%);width:25px;z-index:1}.RangeSlider_mobileRangeSliderThumb__TEj2q.RangeSlider_rangeSliderThumb__KMaq0:hover>.RangeSlider_rangeSliderLabel__3-qO8{box-shadow:none!important}.RangeSlider_mobileRangeSliderThumb__TEj2q:hover.RangeSlider_rangeSliderThumb__KMaq0:before{background:#d9d9d9;border-radius:20px;content:"";height:39px;left:50%;opacity:.1;position:absolute;top:50%;transform:translate(-50%,-50%);width:39px}.RangeSlider_rangeSliderLabel__3-qO8{background:var(--palette-primary-main);border-radius:9px;height:9px;position:relative;transition:box-shadow .3s;width:9px}.RangeSlider_rangeSliderThumb__KMaq0:hover>.RangeSlider_rangeSliderLabel__3-qO8{box-shadow:0 0 0 8px rgba(3,188,212,.2)}.RangeSlider_rangeSliderInputDivider__PcwIK{background:var(--palette-background-b-9);color:#fff;font-size:10px;font-weight:500}.RangeSlider_rangeSliderCompactInputs__ukFLL{align-items:center;background:var(--palette-background-b-9);border-radius:4px;display:flex;justify-content:center;position:absolute;transform:translate(-50%,-50%)}.RangeSlider_disabled__8eBEv{opacity:.4}');export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/slicedToArray";import{useState as t,useRef as r,useEffect as
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/slicedToArray";import{useState as t,useRef as r,useEffect as i}from"react";import o from"classnames";import{round as a,throttle as l}from"lodash";import u from"prop-types";import{isMobileDetected as s}from"../../utils/mobileDetect.js";import{horizontalStrategy as m}from"./strategies/horizontal.js";import{verticalStrategy as c}from"./strategies/vertical.js";import{calculatePercentForValue as f,updateFromValue as d,updateToValue as g,calculateValueFromPercent as p}from"./utils.js";import R from"./inputs/FromInput.js";import O from"./inputs/ToInput.js";import{RangeSliderControl as b,RangeSliderOrientation as v}from"./constants.js";import S from"./RangeSlider.css.js";import{jsxs as h,jsx as T}from"react/jsx-runtime";function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function B(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var I=function(u){var y,I,M,j,C=u.min,N=u.max,w=u.from,A=u.to,P=u.minRange,F=u.disabled,V=u.onChange,L=u.orientation,x=u.precision,E=u.isSingleRange,D=u.isWithoutInput,z=t(null),H=n(z,2),U=H[0],_=H[1],W=t(null),q=n(W,2),X=q[0],Y=q[1],Z=t(null),k=n(Z,2),G=k[0],J=k[1],K=t(b.FROM),Q=n(K,2),$=Q[0],ee=Q[1],ne=t(null),te=n(ne,2),re=te[0],ie=te[1],oe=t({}),ae=n(oe,2),le=ae[0],ue=ae[1],se=t({from:!1,bar:!1,to:!1}),me=n(se,2),ce=me[0],fe=me[1],de=r(null),ge=r(null),pe=r(null),Re=r(null),Oe=r(null),be=L===v.HORIZONTAL,ve=L===v.VERTICAL,Se=E&&D;i((function(){L===v.HORIZONTAL&&J(m),L===v.VERTICAL&&J(c)}),[L]),i((function(){E&&V({from:0,to:A})}),[E]),i((function(){if(G){var n,t=a(w,x),r=a(A,x),i=a(C,x),o=a(N,x),l=f(t,i,o),u=f(r,i,o);ue((e(n={},b.FROM,G.getThumbStyles(l,$===b.FROM)),e(n,b.TO,G.getThumbStyles(u,$===b.TO)),e(n,b.BAR,G.getBarStyles(l,u)),e(n,b.FROM_INPUT,G.getInputStyles(re===b.FROM||re===b.BAR||ce.from)),e(n,b.TO_INPUT,G.getInputStyles(re===b.TO||re===b.BAR||ce.to)),n)),_(t.toString()),Y(r.toString())}}),[G,C,N,w,A,re,ce]);var he=function(e){var n=G.getCoordinates(e,de.current.getBoundingClientRect()),t=f(n.new,n.min,n.max),r=a(p(t,C,N),x);if(r!==w){var i=d(r,w,A,C,P);V(i)}},Te=function(e){var n=ve&&E?G.getRotatedCoordinates(e,de.current.getBoundingClientRect()):G.getCoordinates(e,de.current.getBoundingClientRect()),t=f(n.new,n.min,n.max),r=a(p(t,C,N),x);if(r!==A){var i=g(r,w,A,N,P);V(i)}},ye=function(e,n){var t=G.getBarCoordinates(e,n,de.current.getBoundingClientRect()),r=f(t.new,t.min,t.max),i=a(p(r,C,N),x),o=a(A+(i-w),x);if(i<C){var l=C-i;i=C,o=a(o+l,x)}if(o>N){var u=o-N;o=N,i=a(i-u,x)}i!==w&&o!==A&&i>=C&&o<=N&&V({from:i,to:o})},Be=function(n){n!==b.BAR?fe(B(B({},ce),{},e({},n,!0))):fe({from:!0,bar:!0,to:!0})},Ie=function(n){n!==b.BAR?fe(B(B({},ce),{},e({},n,!1))):fe({from:!1,bar:!1,to:!1})},Me=function(e,n){if(!(E&&e===b.BAR||F)){n.stopPropagation(),ee(e),ie(e);var t=n.clientX,r=n.clientY,i=n.target.getBoundingClientRect(),o=i.x,a=i.y,u=l((function(n){!function(e){return e===b.FROM?he:e===b.TO?Te:ye}(e)(n,{clientX:t,clientY:r,x:o,y:a})}),4);document.addEventListener("mousemove",u),document.addEventListener("mouseup",(function e(){ie(null),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",e)}))}},je=function(e,n){var t=n.target.value;Number.isNaN(t)||function(e){return e===b.FROM?_:Y}(e)(t)},Ce=function(e,n){var t=n.target.value,r=a(t,x);if(e===b.FROM){var i=d(r,w,A,C,P);V(i)}if(e===b.TO){var o=g(r,w,A,N,P);V(o)}};return h("div",{className:o((y={},e(y,S.disabled,F),e(y,S.rangeSliderHorizontal,be),e(y,S.rangeSliderVertical,ve),e(y,S.rotatedVerticalRange,ve&&E),y)),children:[!E&&T(R,{compStyles:le[b.FROM_INPUT],isVerticalOrientation:ve,max:N,disabled:F,precision:x,fromInputRef:Re,from:w,fromInputValue:U,onInputChange:je,validateInputChange:Ce}),h("div",{className:o(S.rangeSliderRail,(I={},e(I,S.rangeSliderRailHorizontal,be),e(I,S.rangeSliderRailVertical,ve),I)),ref:de,children:[!E&&T("div",{ref:ge,className:o(S.rangeSliderThumb,s&&S.mobileRangeSliderThumb),style:le[b.FROM],onMouseDown:function(e){return Me(b.FROM,e)},onMouseEnter:function(){Be(b.FROM)},onMouseLeave:function(){Ie(b.FROM)},children:T("div",{className:S.rangeSliderLabel})}),T("div",{className:o(S.rangeSliderBar,(M={},e(M,S.rangeSliderBarHorizontal,be),e(M,S.rangeSliderBarVertical,ve),M)),style:le[b.BAR],onMouseDown:function(e){return Me(b.BAR,e)},onMouseEnter:function(){Be(b.BAR)},onMouseLeave:function(){Ie(b.BAR)},children:T("div",{className:o(S.rangeSliderBarView,(j={},e(j,S.rangeSliderBarViewHorizontal,be),e(j,S.rangeSliderBarViewVertical,ve),j))})}),T("div",{ref:pe,className:o(S.rangeSliderThumb,s&&S.mobileRangeSliderThumb),style:le[b.TO],onMouseDown:function(e){return Me(b.TO,e)},onMouseEnter:function(){Be(b.TO)},onMouseLeave:function(){Ie(b.TO)},children:T("div",{className:S.rangeSliderLabel})})]}),!Se&&T(O,{compStyles:le[b.TO_INPUT],disabled:F,isVerticalOrientation:ve,rotated:ve&&E,max:N,precision:x,toInputRef:Oe,to:A,toInputValue:X,onInputChange:je,validateInputChange:Ce})]})};I.propTypes={min:u.number,max:u.number,from:u.number.isRequired,to:u.number.isRequired,orientation:u.oneOf(["horizontal","vertical"]),precision:u.number,minRange:u.number,onChange:u.func,isSingleRange:u.bool,isWithoutInput:u.bool},I.defaultProps={min:0,max:100,orientation:"horizontal",precision:0,minRange:0,onChange:function(){},isSingleRange:!1,isWithoutInput:!1};export{I as default};
|
|
@@ -1 +1 @@
|
|
|
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};
|
|
1
|
+
import o from"./palette.mjs.js";var e=o.primary,t=o.background,i={MuiTable:{root:{width:"inherit"},stickyHeader:{"&:before":{content:"no-open-quote",position:"absolute",width:"inherit",height:"16px",background:"linear-gradient(360deg, rgba(44, 44, 44, 0) 0%, ".concat(o.background.b6," 100%)")}}},MuiTableCell:{root:{borderBottomColor:e.text9,height:56,letterSpacing:"0.4px",lineHeight:"20px",whiteSpace:"nowrap",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};
|
package/constants/alerts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/helpers/toConsumableArray";function l(e,a){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),l.push.apply(l,t)}return l}function t(a){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(l){e(a,l,r[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(r,e))}))}return a}var r="alerts",o="ADD_NEW_ALERTS",u="DELETE_NEW_ALERT",i="CLEAR_NEW_ALERTS",s={company:{value:"company",label:"Company"},personal:{value:"personal",label:"Personal"}},n={advanced:"advanced",simple:"simple"},d="desktop",c="banner",b={email:{label:"Email",userPreferencesKey:"emails_enabled"},mobile:{label:"Mobile App notifications",userPreferencesKey:"push_notifications_enabled"},sms:{label:"SMS/Text Message",userPreferencesKey:"sms_enabled"}},p=[{value:"INFO",label:"Info"},{value:"WARNING",label:"Warning"},{value:"CRITICAL",label:"Critical"}],v={INFO:"rgb(119, 195, 241)",WARNING:"rgb(242, 192, 70)",CRITICAL:"rgb(237, 70, 48)"},m={SUBSCRIPTIONS:[{collection:"alerts"}]},_=[{label:"Annulus Pressure Loss",value:"hydraulics.pressure-loss.data.predicted_annulus_pressure_loss"},{label:"Bit HSI",value:"hydraulics.pressure-loss.data.bit_hsi"},{label:"Bit Jet Impact Force",value:"hydraulics.pressure-loss.data.bit_jet_impact_force"},{label:"ECD at Bit",value:"hydraulics.pressure-loss.data.predicted_ecd_at_bit"},{label:"ECD at Casing",value:"hydraulics.pressure-loss.data.predicted_ecd_at_casing"},{label:"Minimum Recommended Flowrate",value:"hydraulics.overview.data.recommended_minimum_flowrate"},{label:"Predicted Standpipe Pressure",value:"hydraulics.pressure-loss.data.predicted_standpipe_pressure"},{label:"Standpipe Pressure",value:"hydraulics.pressure-loss.data.standpipe_pressure"}],y=[{label:"Bit RPM",value:"pdm.operating-condition.data.total_bit_rpm"},{label:"Bit Torque",value:"pdm.operating-condition.data.total_bit_torque"},{label:"Diff Press",value:"pdm.operating-condition.data.differential_pressure"},{label:"PDM RPM",value:"pdm.operating-condition.data.rpm"},{label:"PDM Torque",value:"pdm.operating-condition.data.torque"}],
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/helpers/toConsumableArray";function l(e,a){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),l.push.apply(l,t)}return l}function t(a){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(l){e(a,l,r[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(r,e))}))}return a}var r="alerts",o="ADD_NEW_ALERTS",u="DELETE_NEW_ALERT",i="CLEAR_NEW_ALERTS",s={company:{value:"company",label:"Company"},personal:{value:"personal",label:"Personal"}},n={advanced:"advanced",simple:"simple"},d="desktop",c="banner",b={email:{label:"Email",userPreferencesKey:"emails_enabled"},mobile:{label:"Mobile App notifications",userPreferencesKey:"push_notifications_enabled"},sms:{label:"SMS/Text Message",userPreferencesKey:"sms_enabled"}},p=[{value:"INFO",label:"Info"},{value:"WARNING",label:"Warning"},{value:"CRITICAL",label:"Critical"}],v={INFO:"rgb(119, 195, 241)",WARNING:"rgb(242, 192, 70)",CRITICAL:"rgb(237, 70, 48)"},m={SUBSCRIPTIONS:[{collection:"alerts"}]},_=[{label:"Annulus Pressure Loss",value:"hydraulics.pressure-loss.data.predicted_annulus_pressure_loss"},{label:"Bit HSI",value:"hydraulics.pressure-loss.data.bit_hsi"},{label:"Bit Jet Impact Force",value:"hydraulics.pressure-loss.data.bit_jet_impact_force"},{label:"ECD at Bit",value:"hydraulics.pressure-loss.data.predicted_ecd_at_bit"},{label:"ECD at Casing",value:"hydraulics.pressure-loss.data.predicted_ecd_at_casing"},{label:"Minimum Recommended Flowrate",value:"hydraulics.overview.data.recommended_minimum_flowrate"},{label:"Predicted Standpipe Pressure",value:"hydraulics.pressure-loss.data.predicted_standpipe_pressure"},{label:"Standpipe Pressure",value:"hydraulics.pressure-loss.data.standpipe_pressure"}],y=[{label:"Bit RPM",value:"pdm.operating-condition.data.total_bit_rpm"},{label:"Bit Torque",value:"pdm.operating-condition.data.total_bit_torque"},{label:"Diff Press",value:"pdm.operating-condition.data.differential_pressure"},{label:"PDM RPM",value:"pdm.operating-condition.data.rpm"},{label:"PDM Torque",value:"pdm.operating-condition.data.torque"}],h=[{label:"Bit Aggressivity",value:"torque-and-drag.downhole-transfer.data.downhole.bit_aggressivity"},{label:"Drag Severity",value:"torque-and-drag.overview.data.drag.severity"},{label:"Predicted Surface Torque",value:"torque-and-drag.predictions.data.predicted_surface_torque"},{label:"Predicted Downhole Torque",value:"torque-and-drag.predictions.data.downhole_torque"}],g=[{label:"BH",value:"wits.data.block_height"},{label:"Bit Depth",value:"wits.data.bit_depth"},{label:"Diff Press",value:"wits.data.diff_press"},{label:"Flow In",value:"wits.data.mud_flow_in"},{label:"Flow Out",value:"wits.data.mud_flow_out"},{label:"Flow Out %",value:"wits.data.mud_flow_out_percent"},{label:"Hole Depth",value:"wits.data.hole_depth"},{label:"Hookload",value:"wits.data.hook_load"},{label:"MV",value:"wits.data.mud_volume"},{label:"ROP",value:"wits.data.rop"},{label:"Rotary Torque",value:"wits.data.rotary_torque"},{label:"RPM",value:"wits.data.rotary_rpm"},{label:"SPM",value:"wits.data.pump_spm_total"},{label:"Standpipe Pressure",value:"wits.data.standpipe_pressure"},{label:"Weight on Bit",value:"wits.data.weight_on_bit"}],f=[{label:"Directional:"}].concat(a([{label:"Distance to plan",value:"directional.accuracy.data.accuracy.distance_to_plan"},{label:"Dogleg Severity",value:"directional.trend.data.last_dls.dls"},{label:"High/Low divergence from plan",value:"directional.accuracy.data.recommendation.high"},{label:"Right/Left divergence from plan",value:"directional.accuracy.data.recommendation.right"}]),[{label:"Hydraulics:"}],a(_),[{label:"PDM:"}],a(y),[{label:"Torque and Drag:"}],a(h),[{label:"WITS:"}],a(g)),w=f.map((function(e){var a=e.label,l=e.value;return{label:"".concat(a).concat(l?" (".concat(l,")"):""),value:l}})),D=a(f),P={s:"s",min:"min",h:"h",d:"d"},O=[{value:"continuous",label:"Continuous"},{value:"once-per-asset",label:"Once Per Asset"},{value:"once",label:"Once"}],A=[{value:"AND",label:"AND"},{value:"OR",label:"OR"}],R=[{value:"=",label:"="},{value:"!=",label:"!="},{value:">",label:">"},{value:">=",label:">="},{value:"<",label:"<"},{value:"<=",label:"<="},{value:"~",label:"~"},{value:"!~",label:"!~"}],E=[{value:"average",label:"Average"},{value:"median",label:"Median"},{value:"count",label:"Count"},{value:"percentage",label:"% Change"},{value:"minimum",label:"Minimum"},{value:"maximum",label:"Maximum"},{value:"value",label:"Any Match"}],C=[{label:"All",value:"all"},{label:"Last 12 hours",value:"last12hours"},{label:"Last 24 hours",value:"last24hours"},{label:"Last 7 days",value:"last7days"},{label:"Last month",value:"lastMonth"},{label:"Custom",value:"custom"}],N=C.reduce((function(a,l){return t(t({},a),{},e({},l.value,l))}),{}),S="ADD_ALERT_BANNERS",M="REMOVE_ALERT_BANNER",T="ADD_ALERT_BANNER_SOUND",L="REMOVE_ALERT_BANNER_SOUND",I=function(e){return e&&["Corva","Corva Default Company Do Not Use","Chevron","Default Company","Sai Company","Shell","Completion Company"].includes(e.getIn(["company","name"]))};export{S as ADD_ALERT_BANNERS,T as ADD_ALERT_BANNER_SOUND,o as ADD_NEW_ALERTS,w as ADVANCED_MODE_VALUE_PATHS,m as ALERTS,n as ALERT_DEFINITION_MODES,s as ALERT_DEFINITION_TYPES,p as ALERT_LEVELS,v as ALERT_LEVEL_COLOR,b as ALERT_NOTIFICATION_TYPE_USER_PREFERENCES,c as BANNER_ALERT_NOTIFICATION_TYPE,i as CLEAR_NEW_ALERTS,A as COMBINE_LOGICS,C as DATE_RANGE_FILTERS,N as DATE_RANGE_FILTERS_BY_KEYS,u as DELETE_NEW_ALERT,d as DESKTOP_ALERT_NOTIFICATION_TYPE,r as NAME,R as OPERATORS,O as RECURRENCES,M as REMOVE_ALERT_BANNER,L as REMOVE_ALERT_BANNER_SOUND,E as SAMPLING_FUNCTIONS,D as SIMPLE_MODE_VALUE_PATHS,P as TIME_UNITS,I as isAlertBannerEnabled};
|