@corva/ui 0.44.0-8 → 0.44.0-9

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.
@@ -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{difference as p,uniqBy as m,isEmpty as c,sortBy 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{useAddedWellsByManual as w}from"./effects/useAddedWellsByManual.js";import{useSortedWells as B}from"./effects/useSortedWells.js";import{useRadiusWells as L}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as k}from"./effects/useTableColumns.js";import{Filter as H}from"./components/Filter/Filter.js";import{WellsMap as V}from"./components/Map/WellsMap.js";import F from"./components/OffsetWellsTable/OffsetWellsTable.js";import N from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as M,ColumnType as R,FilterType as U,ROWS_PER_PAGE as z}from"./constants.js";import{SEARCH_CATEGORIES as K}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";function q(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 G(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?q(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):q(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var _=function(a){var q=a.open,_=a.isWDUser,J=a.defaultSubjectWell,Q=a.currentUser,X=a.offsetSettings,Y=a.addWellsUsabilityInfo,Z=a.isViewOnly,$=a.onClose,ee=a.onSave,te=a.maxOffsetwellSize,re=i((function(){return te?te+1:null}),[te]),ie=n(null==X?void 0:X.filterExpanded),ne=r(ie,2),oe=ne[0],se=ne[1],le=n(null==X?void 0:X.mapHidden),ae=r(le,2),pe=ae[0],me=ae[1],ce=+(null==J?void 0:J.companyId)||+(null==Q?void 0:Q.company_id),de=null==J?void 0:J.asset_id,ue=n((null==X?void 0:X.filters)||{}),fe=r(ue,2),je=fe[0],Ce=fe[1],ve=n((null==X?void 0:X.wellSection)||M),be=r(ve,2),ge=be[0],he=be[1],Ae=o(!0),De=n([]),Se=r(De,2),ye=Se[0],Ie=Se[1],Pe=n(null),We=r(Pe,2),xe=We[0],Te=We[1],Oe=n((null==X?void 0:X.manualWellIds)||[]),Ee=r(Oe,2),we=Ee[0],Be=Ee[1],Le=n(!0),ke=r(Le,2),He=ke[0],Ve=ke[1],Fe=n(!1),Ne=r(Fe,2),Me=Ne[0],Re=Ne[1],Ue=n(!1),ze=r(Ue,2),Ke=ze[0],qe=ze[1],Ge=n(!1),_e=r(Ge,2),Je=_e[0],Qe=_e[1],Xe=o(),Ye=n(!0),Ze=r(Ye,2),$e=Ze[0],et=Ze[1];s((function(){Ae.current=!0}),[de,null==X?void 0:X.selectedWellIds]),s((function(){se(!Z&&(null==X?void 0:X.filterExpanded)),me(!Z&&(null==X?void 0:X.mapHidden)),Ce((null==X?void 0:X.filters)||{}),he((null==X?void 0:X.wellSection)||M),Be((null==X?void 0:X.manualWellIds)||[])}),[X,Z]);var tt=P(ce,Y),rt=x(_,de),it=r(rt,2),nt=it[0],ot=it[1],st=T(ce,null==X?void 0:X.metricsKeys),lt=r(st,2),at=lt[0],pt=lt[1],mt=W(ce,tt,nt,ot,de,at),ct=O(mt);s((function(){if(mt&&nt){var e=mt.find((function(e){return e.id===de}));if(e){var r=nt.filter((function(e){return e.value!==M})).map((function(e){return e.label})),i=G(G({},e),r.length>0&&t({},R.wellSection,r));Te(i)}else Te(null)}}),[nt,mt]);var dt=k(at),ut=E(mt,je),ft=w(mt,ut,we);s((function(){if(!Ae.current&&ut){var e=ut.map((function(e){return e.id})),t=ye.map((function(e){return e.id})),r=p(t,e);Be(r)}}),[ye,ut,Ae.current]),s((function(){if(ft)if(Ae.current){var e=m(mt.filter((function(e){return((null==X?void 0:X.selectedWellIds)||[]).includes(e.id)})).concat(xe),"id");Ie(e),Ae.current=!1}else Ie((function(e){var t=(ft||[]).filter((function(t){return!!e.find((function(e){var r=e.id;return t.id===r}))}));return m(t,"id")}))}),[mt,ft,null==X?void 0:X.selectedWellIds]);var jt=B(xe,ft,ye,Ve,Ae.current),Ct=r(jt,5),vt=Ct[0],bt=Ct[1],gt=Ct[2],ht=Ct[3],At=Ct[4];L(je[U.radius],mt,Ie,re);var Dt=l((function(e,t,r){var i;i=r===K.well.name?t:t.reduce((function(e,t){var r,i=null===(r=mt.find((function(e){return e.id===t})))||void 0===r?void 0:r.rigName,n=mt.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(n)}),[]);var n=mt.filter((function(e){var t=e.id;return i.includes(t)}));Ie(e?function(e){return m(e.concat(n),"id")}:function(e){return m(e.filter((function(e){var t=e.id;return!n.find((function(e){return e.id===t}))})))})}),[mt]),St=l((function(){qe(!0)}),[]),yt=l((function(e){pt(e)}),[]),It=l((function(t,r){Ie(r?function(r){return[].concat(e(r),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),Pt=l((function(e){if(e){var t=xe?ft.concat(xe):ft,r=m(t,"id");Ie(r)}else Ie([]),Be([])}),[ft,xe]),Wt=function(e){if(c(ot))Ie([]);else{var t=mt.filter((function(t){return ot[e].includes(t.id)}));Ie(t)}},xt=l((function(e){Be([]),he(e),Wt(e)}),[Wt]),Tt=i((function(){return ye.find((function(e){return e.id===de}))?ye.length-1:ye.length}),[ye,de]),Ot=i((function(){if(!ot)return!1;var e=ye.map((function(e){return e.id})),t=ot[ge]||[];return(re&&t.length>re?re+1:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[ot,J,ye,ge]),Et=function(){var e=(mt||[]).filter((function(e){return((null==X?void 0:X.selectedWellIds)||[]).includes(e.id)}));Ie(e);var t=G(G({},X),{},{mapHidden:pe,filterExpanded:oe});ee(t),$()},wt=i((function(){return!Ot||(!(c(je)||!je[U.sideTracks])||ge!==M)}),[Ot,je,ge]);s((function(){if(!re||re>ye.length)Qe(!1);else if(re<ye.length){var e=d(ye,"distance");Ie(e.slice(0,re))}else re===ye.length&&Qe(!0)}),[ye,re]);var Bt=!mt||!nt||!At,Lt=n(!1),kt=r(Lt,2),Ht=kt[0],Vt=kt[1],Ft=n(!1),Nt=r(Ft,2),Mt=Nt[0],Rt=Nt[1],Ut=n(z),zt=r(Ut,2),Kt=zt[0],qt=zt[1],Gt=n([]),_t=r(Gt,2),Jt=_t[0],Qt=_t[1];s((function(){if(At){var e=At.slice(0,Kt);Qt(e)}}),[At,Kt,xe]);return g(b,{open:q,onClose:Et,title:"Select Offset Wells",contentContainerClassName:N.offsetWellDialog,contentClassName:N.contentContainer,actionsClassName:N.modalActions,actions:!Z&&h("div",{className:N.actionsWrapper,children:[!Bt&&wt?g(I,{placement:"bottom-start",title:_?"To Synced Offsets in Offset App":"To Synced Offsets in Wellhub",children:g("div",{children:g(y,{onClick:function(){Be([]),Ce({}),he(M),Wt(M)},color:"primary",startIcon:g(f,{}),children:"Reset"})})}):g("div",{}),h("div",{className:N.buttonGap,children:[g(y,{onClick:Et,color:"primary",children:"Cancel"}),h(y,{variant:"contained",color:"primary",onClick:function(){var e=G(G({},X),{},{companyId:ce,subjectWellId:de,selectedWellIds:ye.map((function(e){return e.id})),manualWellIds:we,filters:je,metricsKeys:at,wellSection:ge,isSynced:Ot,mapHidden:pe,filterExpanded:oe});ee(e,ye),$()},children:["Select (",Tt,")"]})]})]}),children:Bt?g(A,{fullscreen:!1}):h("div",{className:N.contentWrapper,ref:Xe,children:[h("div",{className:N.countContainer,children:[g(D,{className:N.totalLabel,children:"Total:"}),g(D,{className:N.countValue,children:mt.length}),g(D,{className:N.selectedLabel,children:"Selected:"}),g(D,{className:N.countValue,children:Tt})]}),re&&re<=ye.length&&g(u,{className:N.viewOnlyTitleLabel,children:"This application can work with no more than (".concat(te,") offset wells at a time.")}),Z&&g(u,{className:N.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the Offset Well Selection app."}),h("div",{className:N.controlGroup,children:[h(y,{startIcon:g(oe?j:C,{}),classes:{root:N.filterButton},onClick:function(){return se((function(e){return!e}))},disabled:Z,children:["Filters",!c(je)&&h("div",{className:N.clearWrapper,onClick:function(e){e.stopPropagation(),Ce({})},children:[g(v,{className:N.clearIcon}),g("span",{className:N.clearLabel,children:"Clear"})]})]}),g(S,{rightLabel:"Map",color:"primary",checked:!pe,onChange:function(e){return me(!e.target.checked)}})]}),h("div",{className:N.content,onScroll:function(e){e.target&&(Ke&&(e.target.scrollLeft=0,qe(!1)),e.target.scrollLeft<=5&&Ht&&Vt(!1),e.target.scrollLeft>5&&!Ht&&Vt(!0),e.target.scrollTop<12&&Mt&&Rt(!1),e.target.scrollTop>=12&&!Mt&&Rt(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight)>=e.target.scrollHeight&&Kt<At.length&&qt((function(e){return e+z})))},children:[Mt&&g("div",{className:N.topGradient}),!pe&&g(V,{isViewOnly:Z,mapHidden:pe,companyId:ce,subjectWell:xe,offsetWellIds:ye.map((function(e){return e.id})),wells:mt,radius:je[U.radius],handleChanageOffsetWell:It}),g(H,{isHidden:!oe,isWDUser:_,filterOptions:ct,filters:je,wellSections:nt,selectedWellSection:ge,subjectWell:xe,onChangeFilters:Ce,onChangeBicWells:xt}),g(F,{isTableLoading:He,companyId:ce,subjectWellId:de,sortBy:vt,setSortBy:bt,sortDirection:gt,setSortDirection:ht,columnsWithDict:dt,wells:Jt,metricsKeys:at,setMetricsKeys:yt,handleChanageOffsetWell:It,handleChangeAllOffsetWells:Pt,handleAddRemoveAssets:Dt,isWellNameExpand:Me,setIsWellNameExpand:Re,isHscrollMoved:Ht,onHideAdvancedSearch:St,isViewOnly:Z,isLastWell:At.length<=Kt,contentRef:Xe,isHintPopperOpen:$e,setIsHintPopperOpen:et,isLimitedOffsetwells:Je})]})]})})};_.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,maxOffsetwellSize:a.number},_.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetwellSize:null};export{_ 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}from"lodash";import{Typography as d}from"@material-ui/core";import{Replay as u,Sort as f,FilterList as j,Close as C}from"@material-ui/icons";import v from"../Modal/Modal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"classnames";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as b,jsxs as g}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import h from"../LoadingIndicator/LoadingIndicator.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import{Regular12 as A}from"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import D from"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import S from"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../Notifications/Notifications.js";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import{Tooltip as y}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 I}from"./effects/useFetchWells.js";import{useAdvancedWells as P}from"./effects/useAdvancedWells.js";import{useBicWells as W}from"./effects/useBicWells.js";import{useCompanyMetricKey as x}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as T}from"./effects/useFilterOptions.js";import{useFilteredWells as O}from"./effects/useFilteredWells.js";import{useSortedWells as E}from"./effects/useSortedWells.js";import{useRadiusWells as w}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as B}from"./effects/useTableColumns.js";import{Filter as L}from"./components/Filter/Filter.js";import{WellsMap as k}from"./components/Map/WellsMap.js";import H from"./components/OffsetWellsTable/OffsetWellsTable.js";import V from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as F,ColumnType as N,FilterType as M,ROWS_PER_PAGE as R}from"./constants.js";import{SEARCH_CATEGORIES as U}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";function z(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 K(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?z(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):z(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var q=function(a){var z=a.open,q=a.isWDUser,G=a.defaultSubjectWell,_=a.currentUser,J=a.offsetSettings,Q=a.addWellsUsabilityInfo,X=a.isViewOnly,Y=a.onClose,Z=a.onSave,$=a.maxOffsetSize,ee=i((function(){return $+1}),[$]),te=o(null==J?void 0:J.filterExpanded),re=r(te,2),ie=re[0],oe=re[1],ne=o(null==J?void 0:J.mapHidden),se=r(ne,2),le=se[0],ae=se[1],pe=+(null==G?void 0:G.companyId)||+(null==_?void 0:_.company_id),me=null==G?void 0:G.asset_id,ce=o((null==J?void 0:J.filters)||{}),de=r(ce,2),ue=de[0],fe=de[1],je=o((null==J?void 0:J.wellSection)||F),Ce=r(je,2),ve=Ce[0],be=Ce[1],ge=n(!0),he=o([]),Ae=r(he,2),De=Ae[0],Se=Ae[1],ye=o(null),Ie=r(ye,2),Pe=Ie[0],We=Ie[1],xe=o(!0),Te=r(xe,2),Oe=Te[0],Ee=Te[1],we=o(!1),Be=r(we,2),Le=Be[0],ke=Be[1],He=o(!1),Ve=r(He,2),Fe=Ve[0],Ne=Ve[1],Me=o(!1),Re=r(Me,2),Ue=Re[0],ze=Re[1],Ke=n(),qe=o(!0),Ge=r(qe,2),_e=Ge[0],Je=Ge[1],Qe=n();s((function(){z&&Qe.current&&Qe.current.scrollTo(0,0)}),[z]);var Xe=i((function(){return!le&&ie?448:le?ie?232:0:216}),[le,ie]);s((function(){ge.current=!0}),[me,null==J?void 0:J.selectedWellIds]),s((function(){oe(!X&&(null==J?void 0:J.filterExpanded)),ae(!X&&(null==J?void 0:J.mapHidden)),fe((null==J?void 0:J.filters)||{}),be((null==J?void 0:J.wellSection)||F)}),[J,X]);var Ye=I(pe,Q),Ze=W(q,me),$e=r(Ze,2),et=$e[0],tt=$e[1],rt=x(pe,null==J?void 0:J.metricsKeys),it=r(rt,2),ot=it[0],nt=it[1],st=P(pe,Ye,et,tt,me,ot),lt=T(st);s((function(){if(st&&et){var e=st.find((function(e){return e.id===me}));if(e){var r=et.filter((function(e){return e.value!==F})).map((function(e){return e.label})),i=K(K({},e),r.length>0&&t({},N.wellSection,r));We(i)}else We(null)}}),[et,st]);var at=B(ot),pt=O(st,ue);s((function(){if(pt)if(ge.current){var e=p(st.filter((function(e){return((null==J?void 0:J.selectedWellIds)||[]).includes(e.id)})).concat(Pe),"id");Se(e),ge.current=!1}else Se((function(e){var t=(pt||[]).filter((function(t){return!!e.find((function(e){var r=e.id;return t.id===r}))}));return p(t,"id")}))}),[st,pt,null==J?void 0:J.selectedWellIds]);var mt=E(Pe,pt,De,Ee,ge.current),ct=r(mt,5),dt=ct[0],ut=ct[1],ft=ct[2],jt=ct[3],Ct=ct[4];w(ue[M.radius],pt,Se,ee);var vt=l((function(e,t,r){var i;i=r===U.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,o=st.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(o)}),[]);var o=st.filter((function(e){var t=e.id;return i.includes(t)}));Se(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}))})))})}),[st]),bt=l((function(){Ne(!0)}),[]),gt=l((function(e){nt(e)}),[]),ht=l((function(t,r){Se(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=Pe?pt.concat(Pe):pt,r=p(t,"id");Se(r)}else Se([])}),[pt,Pe]),Dt=function(e){if(m(tt))Se([]);else{var t=st.filter((function(t){return tt[e].includes(t.id)}));Se(t)}},St=l((function(e){be(e),Dt(e)}),[Dt]),yt=i((function(){return De.find((function(e){return e.id===me}))?De.length-1:De.length}),[De,me]),It=i((function(){if(!tt)return!1;var e=De.map((function(e){return e.id})),t=tt[ve]||[];return(ee&&t.length>ee?ee:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[tt,G,De,ve]),Pt=function(){var e=(st||[]).filter((function(e){return((null==J?void 0:J.selectedWellIds)||[]).includes(e.id)})).concat(Pe);Se(p(e,"id"));var t=K(K({},J),{},{mapHidden:le,filterExpanded:ie});Z(t),fe((null==J?void 0:J.filters)||{}),be((null==J?void 0:J.wellSection)||F),Y()},Wt=i((function(){return!It||(!(m(ue)||!ue[M.sideTracks])||ve!==F)}),[It,ue,ve]);s((function(){if(!ee||ee>De.length)ze(!1);else if(ee<De.length){var e=c(De,"distance");Se(e.slice(0,ee))}else ee===De.length&&ze(!0)}),[De,ee]);var xt=!st||!et||!Ct,Tt=o(!1),Ot=r(Tt,2),Et=Ot[0],wt=Ot[1],Bt=o(!1),Lt=r(Bt,2),kt=Lt[0],Ht=Lt[1],Vt=o(R),Ft=r(Vt,2),Nt=Ft[0],Mt=Ft[1],Rt=o([]),Ut=r(Rt,2),zt=Ut[0],Kt=Ut[1];s((function(){if(Ct){var e=Ct.slice(0,Nt);Kt(e)}}),[Ct,Nt,Pe]);return b(v,{open:!0,onClose:Pt,title:"Select Offset Wells",rootClassName:z?V.rootVisible:V.rootHidden,contentContainerClassName:V.offsetWellDialog,contentClassName:V.contentContainer,actionsClassName:V.modalActions,actions:!X&&g("div",{className:V.actionsWrapper,children:[!xt&&Wt?b(y,{placement:"bottom-start",title:q?"To Synced Offsets in Offset App":"To Synced Offsets in Wellhub",children:b("div",{children:b(S,{onClick:function(){fe({}),be(F),Dt(F)},color:"primary",startIcon:b(u,{}),children:"Reset"})})}):b("div",{}),g("div",{className:V.buttonGap,children:[b(S,{onClick:Pt,color:"primary",children:"Cancel"}),g(S,{variant:"contained",color:"primary",onClick:function(){Y();var e=K(K({},J),{},{companyId:pe,subjectWellId:me,selectedWellIds:De.map((function(e){return e.id})),filters:ue,metricsKeys:ot,wellSection:ve,isSynced:It,mapHidden:le,filterExpanded:ie});Z(e,De)},children:["Select (",yt,")"]})]})]}),children:xt?b(h,{fullscreen:!1}):g("div",{className:V.contentWrapper,ref:Ke,children:[g("div",{className:V.countContainer,children:[b(A,{className:V.totalLabel,children:"Total:"}),b(A,{className:V.countValue,children:st.length}),b(A,{className:V.selectedLabel,children:"Selected:"}),b(A,{className:V.countValue,children:yt})]}),ee&&ee<=De.length&&b(d,{className:V.viewOnlyTitleLabel,children:"This application can work with no more than (".concat($,") offset wells at a time.")}),X&&b(d,{className:V.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the Offset Well Selection app."}),g("div",{className:V.controlGroup,children:[g(S,{startIcon:b(ie?f:j,{}),classes:{root:V.filterButton},onClick:function(){return oe((function(e){return!e}))},disabled:X,children:["Filters",!m(ue)&&g("div",{className:V.clearWrapper,onClick:function(e){e.stopPropagation(),fe({})},children:[b(C,{className:V.clearIcon}),b("span",{className:V.clearLabel,children:"Clear"})]})]}),b(D,{rightLabel:"Map",color:"primary",checked:!le,onChange:function(e){return ae(!e.target.checked)}})]}),g("div",{className:V.content,onScroll:function(e){e.target&&(Fe&&(e.target.scrollLeft=0,Ne(!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+R})))},ref:Qe,children:[kt&&b("div",{className:V.topGradient}),!le&&z&&b(k,{isViewOnly:X,mapHidden:le,companyId:pe,subjectWell:Pe,offsetWellIds:De.map((function(e){return e.id})),wells:st,radius:ue[M.radius],handleChanageOffsetWell:ht}),b(L,{isHidden:!ie,isWDUser:q,filterOptions:lt,filters:ue,wellSections:et,selectedWellSection:ve,subjectWell:Pe,onChangeFilters:fe,onChangeBicWells:St}),b(H,{open:z,isTableLoading:Oe,companyId:pe,subjectWellId:me,sortBy:dt,setSortBy:ut,sortDirection:ft,setSortDirection:jt,columnsWithDict:at,wells:zt,metricsKeys:ot,setMetricsKeys:gt,handleChanageOffsetWell:ht,handleChangeAllOffsetWells:At,handleAddRemoveAssets:vt,isWellNameExpand:Le,setIsWellNameExpand:ke,isHscrollMoved:Et,onHideAdvancedSearch:bt,isViewOnly:X,isLastWell:Ct.length<=Nt,contentRef:Ke,isHintPopperOpen:_e,setIsHintPopperOpen:Je,isLimitedOffsetwells:Ue,containerRef:Qe,tableTop:Xe})]})]})})};q.propTypes={isWDUser:a.bool,defaultSubjectWell:a.shape({asset_id:a.number,companyId:a.number}),offsetSettings:a.shape({selectedWellIds:a.arrayOf(a.number),manualWellIds:a.arrayOf(a.number),filters:a.shape({}),metricsKeys:a.arrayOf(a.string),wellSection:a.string,companyId:a.number,subjectWellId:a.number,mapHidden:a.bool,filterExpanded:a.bool}),currentUser:a.shape({company_id:a.number}).isRequired,open:a.bool.isRequired,addWellsUsabilityInfo:a.func,isViewOnly:a.bool,onSave:a.func.isRequired,onClose:a.func.isRequired,maxOffsetSize:a.number},q.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:50};export{q as default};
@@ -1 +1 @@
1
- import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var l={offsetWellDialog:"OffsetWellPickerV4-module_offsetWellDialog__EkSjl",viewOnlyTitleLabel:"OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c",contentWrapper:"OffsetWellPickerV4-module_contentWrapper__gVGQ-",contentContainer:"OffsetWellPickerV4-module_contentContainer__Eb9sk",content:"OffsetWellPickerV4-module_content__mEQWD",modalActions:"OffsetWellPickerV4-module_modalActions__cShAH",actionsWrapper:"OffsetWellPickerV4-module_actionsWrapper__C0Ciz",buttonGap:"OffsetWellPickerV4-module_buttonGap__fjFT6",viewOnlyLabel:"OffsetWellPickerV4-module_viewOnlyLabel__GP44N",controlGroup:"OffsetWellPickerV4-module_controlGroup__Tsj99",filterButton:"OffsetWellPickerV4-module_filterButton__1VAsu",clearWrapper:"OffsetWellPickerV4-module_clearWrapper__vsIQx",clearIcon:"OffsetWellPickerV4-module_clearIcon__fHMVI",clearLabel:"OffsetWellPickerV4-module_clearLabel__kCh0J",topGradient:"OffsetWellPickerV4-module_topGradient__fAc7W",countContainer:"OffsetWellPickerV4-module_countContainer__p8V5A",totalLabel:"OffsetWellPickerV4-module_totalLabel__3n5bD",selectedLabel:"OffsetWellPickerV4-module_selectedLabel__BzClE",countValue:"OffsetWellPickerV4-module_countValue__dLG-K"};e(".OffsetWellPickerV4-module_offsetWellDialog__EkSjl{padding-bottom:40px;width:1100px}.OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c{color:var(--palette-primary-text-6);font-size:16px!important;line-height:140.6%!important;margin-bottom:16px!important;margin-left:40px!important}.OffsetWellPickerV4-module_contentWrapper__gVGQ-{display:flex;flex-direction:column;overflow:hidden auto;position:relative}.OffsetWellPickerV4-module_contentContainer__Eb9sk{display:flex;flex-direction:column;margin-top:-8px;overflow-y:hidden;padding:0;position:relative}.OffsetWellPickerV4-module_content__mEQWD{flex:1;margin:0 24px 0 40px;overflow:auto;position:relative}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-corner{background-color:transparent}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar{width:16px}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:hsla(240,2%,65%,.722);border:5px solid rgba(0,0,0,.01);border-radius:10px}.OffsetWellPickerV4-module_modalActions__cShAH{justify-content:flex-end;padding:8px 40px}.OffsetWellPickerV4-module_actionsWrapper__C0Ciz{display:flex;flex:1;justify-content:space-between}.OffsetWellPickerV4-module_buttonGap__fjFT6{display:flex;gap:16px}.OffsetWellPickerV4-module_viewOnlyLabel__GP44N{color:var(--palette-primary-text-6);padding-bottom:16px;padding-left:40px}.OffsetWellPickerV4-module_controlGroup__Tsj99{align-items:center;display:flex;height:32px;justify-content:space-between;margin-bottom:24px;margin-top:8px;padding:0 40px;width:100%}.OffsetWellPickerV4-module_filterButton__1VAsu{background-color:var(--palette-background-b-8)!important;height:32px!important}.OffsetWellPickerV4-module_filterButton__1VAsu:hover{background-color:var(--palette-background-b-7)!important}.OffsetWellPickerV4-module_clearWrapper__vsIQx{align-items:center;color:var(--palette-primary-main);display:flex;gap:4px;margin-left:8px}.OffsetWellPickerV4-module_clearWrapper__vsIQx:hover{color:var(--palette-primary-light)}.OffsetWellPickerV4-module_clearIcon__fHMVI{font-size:16px!important}.OffsetWellPickerV4-module_clearLabel__kCh0J{font-size:12px;font-weight:400;line-height:16px;text-transform:none}.OffsetWellPickerV4-module_topGradient__fAc7W{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);height:12px!important;left:0;position:sticky;top:0;width:100%;z-index:3}.OffsetWellPickerV4-module_countContainer__p8V5A{align-items:center;display:flex;height:24px;margin:0 0 16px 40px;z-index:9}.OffsetWellPickerV4-module_totalLabel__3n5bD{color:var(--palette-primary-text-6)}.OffsetWellPickerV4-module_selectedLabel__BzClE{color:var(--palette-primary-text-6);padding-left:16px}.OffsetWellPickerV4-module_countValue__dLG-K{color:var(--palette-primary-text-1);padding-left:8px}");export{l as default};
1
+ import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var l={rootVisible:"OffsetWellPickerV4-module_rootVisible__03Mu1",rootHidden:"OffsetWellPickerV4-module_rootHidden__zU9pC",offsetWellDialog:"OffsetWellPickerV4-module_offsetWellDialog__EkSjl",viewOnlyTitleLabel:"OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c",contentWrapper:"OffsetWellPickerV4-module_contentWrapper__gVGQ-",contentContainer:"OffsetWellPickerV4-module_contentContainer__Eb9sk",content:"OffsetWellPickerV4-module_content__mEQWD",modalActions:"OffsetWellPickerV4-module_modalActions__cShAH",actionsWrapper:"OffsetWellPickerV4-module_actionsWrapper__C0Ciz",buttonGap:"OffsetWellPickerV4-module_buttonGap__fjFT6",viewOnlyLabel:"OffsetWellPickerV4-module_viewOnlyLabel__GP44N",controlGroup:"OffsetWellPickerV4-module_controlGroup__Tsj99",filterButton:"OffsetWellPickerV4-module_filterButton__1VAsu",clearWrapper:"OffsetWellPickerV4-module_clearWrapper__vsIQx",clearIcon:"OffsetWellPickerV4-module_clearIcon__fHMVI",clearLabel:"OffsetWellPickerV4-module_clearLabel__kCh0J",topGradient:"OffsetWellPickerV4-module_topGradient__fAc7W",countContainer:"OffsetWellPickerV4-module_countContainer__p8V5A",totalLabel:"OffsetWellPickerV4-module_totalLabel__3n5bD",selectedLabel:"OffsetWellPickerV4-module_selectedLabel__BzClE",countValue:"OffsetWellPickerV4-module_countValue__dLG-K"};e(".OffsetWellPickerV4-module_rootVisible__03Mu1{display:flex!important}.OffsetWellPickerV4-module_rootHidden__zU9pC{display:none!important}.OffsetWellPickerV4-module_offsetWellDialog__EkSjl{padding-bottom:40px;width:1100px}.OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c{color:var(--palette-primary-text-6);font-size:16px!important;line-height:140.6%!important;margin-bottom:16px!important;margin-left:40px!important}.OffsetWellPickerV4-module_contentWrapper__gVGQ-{display:flex;flex-direction:column;overflow:hidden auto;position:relative}.OffsetWellPickerV4-module_contentContainer__Eb9sk{display:flex;flex-direction:column;margin-top:-8px;overflow-y:hidden;padding:0;position:relative}.OffsetWellPickerV4-module_content__mEQWD{flex:1;margin:0 24px 0 40px;overflow:auto;position:relative}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-corner{background-color:transparent}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar{width:16px}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:hsla(240,2%,65%,.722);border:5px solid rgba(0,0,0,.01);border-radius:10px}.OffsetWellPickerV4-module_modalActions__cShAH{justify-content:flex-end;padding:8px 40px}.OffsetWellPickerV4-module_actionsWrapper__C0Ciz{display:flex;flex:1;justify-content:space-between}.OffsetWellPickerV4-module_buttonGap__fjFT6{display:flex;gap:16px}.OffsetWellPickerV4-module_viewOnlyLabel__GP44N{color:var(--palette-primary-text-6);padding-bottom:16px;padding-left:40px}.OffsetWellPickerV4-module_controlGroup__Tsj99{align-items:center;display:flex;height:32px;justify-content:space-between;margin-bottom:24px;margin-top:8px;padding:0 40px;width:100%}.OffsetWellPickerV4-module_filterButton__1VAsu{background-color:var(--palette-background-b-8)!important;height:32px!important}.OffsetWellPickerV4-module_filterButton__1VAsu:hover{background-color:var(--palette-background-b-7)!important}.OffsetWellPickerV4-module_clearWrapper__vsIQx{align-items:center;color:var(--palette-primary-main);display:flex;gap:4px;margin-left:8px}.OffsetWellPickerV4-module_clearWrapper__vsIQx:hover{color:var(--palette-primary-light)}.OffsetWellPickerV4-module_clearIcon__fHMVI{font-size:16px!important}.OffsetWellPickerV4-module_clearLabel__kCh0J{font-size:12px;font-weight:400;line-height:16px;text-transform:none}.OffsetWellPickerV4-module_topGradient__fAc7W{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);height:12px!important;left:0;position:sticky;top:0;width:100%;z-index:3}.OffsetWellPickerV4-module_countContainer__p8V5A{align-items:center;display:flex;height:24px;margin:0 0 16px 40px;z-index:9}.OffsetWellPickerV4-module_totalLabel__3n5bD{color:var(--palette-primary-text-6)}.OffsetWellPickerV4-module_selectedLabel__BzClE{color:var(--palette-primary-text-6);padding-left:16px}.OffsetWellPickerV4-module_countValue__dLG-K{color:var(--palette-primary-text-1);padding-left:8px}");export{l as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as r}from"react";import{isEqual as i}from"lodash";import o from"prop-types";import{makeStyles as n,Menu as s,MenuItem as p,Checkbox as m}from"@material-ui/core";import a from"@material-ui/icons/Settings";import"@babel/runtime/helpers/defineProperty";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as l,Fragment as c,jsx as d}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"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/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 j from"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../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{METRICS_LIST as C,MAX_METRICS_COUNT as u}from"../../constants.js";var A=n((function(e){return{checkBox:{color:"grey",padding:"0px",marginRight:"10px"},paper:{transform:"translate(-40px, 4px) scale(1, 1) !important",maxHeight:"calc(80% - 80px)",backgroundColor:e.palette.background.b9},titleItem:{height:"24px !important"},titleLabel:{fontStyle:"italic",fontWeight:400,fontSize:"12px",lineHeight:"14px",letterSpacing:"0.4px",color:"#999999"},menuItem:{height:"54px !important"}}})),g=function(o){var n=o.metricsKeys,g=o.onChange,D=o.contentRef,v=A(),x=t([]),b=e(x,2),h=b[0],f=b[1],S=t(null),P=e(S,2),I=P[0],y=P[1];r((function(){f(n||[])}),[n]);return l(c,{children:[d(j,{size:"small",tooltipProps:{title:"Select Metrics"},onClick:function(e){y(e.currentTarget)},children:d(a,{})}),l(s,{id:"simple-menu",anchorEl:D.current,getContentAnchorEl:null,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"right"},classes:{paper:v.paper},keepMounted:!0,open:Boolean(I),onClose:function(){y(null),i(h,n)||g(h)},children:[d(p,{disabled:!0,value:"",className:v.titleItem,children:d("span",{className:v.titleLabel,children:"Up to 3 Metrics"})}),C.map((function(e){return l(p,{className:v.menuItem,disabled:h.length===u&&!h.includes(e.key),onClick:function(){return t=e.key,void(h.includes(t)?f(h.filter((function(e){return e!==t}))):f(h.concat(t)));var t},children:[d(m,{checked:h.includes(e.key),className:v.checkBox}),e.label]},e.key)}))]})]})};g.propTypes={metricsKeys:o.arrayOf(o.string).isRequired,onChange:o.func.isRequired};export{g as MetricsSettingMenu};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as r}from"react";import{isEqual as i}from"lodash";import o from"prop-types";import{makeStyles as n,Menu as s,MenuItem as p,Checkbox as m}from"@material-ui/core";import a from"@material-ui/icons/Settings";import"@babel/runtime/helpers/defineProperty";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as l,Fragment as c,jsx as d}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"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/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 j from"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../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{METRICS_LIST as C,MAX_METRICS_COUNT as u}from"../../constants.js";var A=n((function(e){return{checkBox:{color:"grey",padding:"0px",marginRight:"10px"},paper:{transform:"translate(-40px, 4px) scale(1, 1) !important",maxHeight:"calc(80% - 80px)",backgroundColor:e.palette.background.b9},titleItem:{position:"sticky",top:"0px",zIndex:9,marginBottom:"-8px",display:"flex",alignItems:"center",height:"40px",paddingLeft:"16px",background:e.palette.background.b9},titleLabel:{fontStyle:"italic",fontWeight:400,fontSize:"12px",lineHeight:"14px",letterSpacing:"0.4px",color:"#999999"},menuList:{paddingTop:"0px !important"},menuItem:{height:"54px !important"}}})),g=function(o){var n=o.metricsKeys,g=o.onChange,D=o.contentRef,v=A(),x=t([]),b=e(x,2),f=b[0],h=b[1],S=t(null),P=e(S,2),I=P[0],y=P[1];r((function(){h(n||[])}),[n]);return l(c,{children:[d(j,{size:"small",tooltipProps:{title:"Select Metrics"},onClick:function(e){y(e.currentTarget)},children:d(a,{})}),l(s,{id:"simple-menu",anchorEl:D.current,getContentAnchorEl:null,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"right"},classes:{paper:v.paper,list:v.menuList},keepMounted:!0,open:Boolean(I),onClose:function(){y(null),i(f,n)||g(f)},children:[d("div",{className:v.titleItem,children:d("span",{className:v.titleLabel,children:"Up to 3 Metrics"})}),C.map((function(e){return l(p,{className:v.menuItem,disabled:f.length===u&&!f.includes(e.key),onClick:function(){return t=e.key,void(f.includes(t)?h(f.filter((function(e){return e!==t}))):h(f.concat(t)));var t},children:[d(m,{checked:f.includes(e.key),className:v.checkBox}),e.label]},e.key)}))]})]})};g.propTypes={metricsKeys:o.arrayOf(o.string).isRequired,onChange:o.func.isRequired,contentRef:o.shape({current:o.instanceOf(Element)}).isRequired};export{g as MetricsSettingMenu};
@@ -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 m,TableHead as l,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 v from"./OffsetWellsTableRow.js";import{METRICS_LIST as b,EXPANED_WELLNAME_WIDTH as g,TableColumns as S}from"../../constants.js";import y from"./OffsetWellsTable.module.css.js";import{getIsImperial as x}from"../../utils/unitSystem.js";var P=function(r){var a=r.isTableLoading,P=r.companyId,I=r.subjectWellId,E=r.sortBy,T=r.setSortBy,W=r.sortDirection,w=r.setSortDirection,O=r.columnsWithDict,R=r.wells,B=r.metricsKeys,L=r.setMetricsKeys,k=r.handleChanageOffsetWell,H=r.handleChangeAllOffsetWells,V=r.handleAddRemoveAssets,F=r.isWellNameExpand,q=r.setIsWellNameExpand,M=r.isHscrollMoved,N=r.onHideAdvancedSearch,K=r.isViewOnly,z=r.isLastWell,U=r.contentRef,G=r.isHintPopperOpen,J=r.setIsHintPopperOpen,Q=r.isLimitedOffsetwells,X=i(),Y=i(),Z=o((function(){var e=R.filter((function(e){return e.checked}));return[e,R.length!==e.length&&e.length&&!Q,e.length===R.length||Q]}),[R,Q]),$=t(Z,3),_=$[0],ee=$[1],te=$[2],re=o((function(){return x()}),[]),ie=o((function(){return(B||[]).reduce((function(e,t){return e.concat(b.filter((function(e){return e.key===t})))}),[])}),[B]),oe=o((function(){return F?g-58:S[0].width[B.length]-58}),[F,null==B?void 0:B.length]);s((function(){var e=X.current.querySelector(".".concat(y.wellNameFixed));M?e.classList.remove(y.noShadow):e.classList.add(y.noShadow);var t=Y.current.querySelectorAll(".".concat(y.wellNameFixed));M?t.forEach((function(e){return e.classList.remove(y.noShadow)})):t.forEach((function(e){return e.classList.add(y.noShadow)}))}),[M,Y.current,X.current,R]);var se=n((function(e,t){T(e),w(t)}),[]),ne=n((function(e){L(e)}),[]),pe=n((function(e,t){L((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return a?j(A,{fullscreen:!1}):O&&R?C(f,{children:[j("div",{className:y.stickyTable,children:C(m,{"aria-label":"ows table head",innerRef:X,children:[j(l,{children:j(D,{columnsWithDict:O,metricsKeys:B,sortBy:E,sortDirection:W,indeterminate:ee,isAllWellsSelected:te,onChangeSort:se,onChangeMetricsKeys:ne,onUpdateMetricsKey:pe,isWellNameExpand:F,setIsWellNameExpand:q,handleChangeAllOffsetWells:H,wellNameStyle:y.wellNameFixed,isViewOnly:K,isImperial:re,contentRef:U,isHintPopperOpen:G,setIsHintPopperOpen:J})}),!K&&j(d,{children:j(c,{children:j(u,{className:y.searchCell,children:j(h,{companyId:P,wells:R,onChange:V,selectedWellIds:_.map((function(e){return e.id})),onHideAdvancedSearch:N})})})})]})}),j(m,{"aria-label":"ows table body",innerRef:Y,children:C(d,{children:[j(c,{children:j(u,{className:p(y.topShadow,e({},y.viewOnlyShadow,K))})}),R.map((function(e){return j(v,{columnsWithDict:O,subjectWellId:I,data:e,metricsKeys:B,metricsColumns:ie,handleChanageOffsetWell:k,isWellNameExpand:F,wellNameStyle:y.wellNameFixed,wellNameWidth:oe,isViewOnly:K,isImperial:re,isLimitedOffsetwells:Q},e.id)})),!z&&j(c,{children:j(u,{className:y.loadingCell,children:j("span",{children:"Loading..."})})}),j(c,{children:j(u,{className:y.bottomShadow})})]})})]}):null};P.propTypes={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};var I=r(P);export{I 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 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,q=r.setMetricsKeys,H=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.containerRef,$=r.tableTop,_=i(),ee=i(),te=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]),re=t(te,3),ie=re[0],oe=re[1],se=re[2],ne=o((function(){return P()}),[]),pe=o((function(){return(k||[]).reduce((function(e,t){return e.concat(v.filter((function(e){return e.key===t})))}),[])}),[k]),ae=o((function(){return N?g-58:S[0].width[k.length]-58}),[N,null==k?void 0:k.length]),le=o((function(){return ie.length*y}),[ie]);s((function(){var e=_.current.querySelector(".".concat(x.wellNameFixed));K?e.classList.remove(x.noShadow):e.classList.add(x.noShadow);var t=ee.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,ee.current,_.current,L]);var me=n((function(e,t){R(e),O(t)}),[]),de=n((function(e){q(e)}),[]),ce=n((function(e,t){q((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:oe,isAllWellsSelected:se,onChangeSort:me,onChangeMetricsKeys:de,onUpdateMetricsKey:ce,isWellNameExpand:N,setIsWellNameExpand:M,handleChangeAllOffsetWells:V,wellNameStyle:x.wellNameFixed,isViewOnly:U,isImperial:ne,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:ie.map((function(e){return e.id})),onHideAdvancedSearch:z})})})})]})}),j(l,{"aria-label":"ows table body",innerRef:ee,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:pe,handleChanageOffsetWell:H,isWellNameExpand:N,wellNameStyle:x.wellNameFixed,wellNameWidth:ae,isViewOnly:U,isImperial:ne,isLimitedOffsetwells:Y,flyTo:le,containerRef:Z,tableTop:$},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,containerRef:a.shape().isRequired,tableTop:a.number.isRequired};var T=r(I);export{T as default};
@@ -1 +1 @@
1
- import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var t={stickyTable:"OffsetWellsTable-module_stickyTable__LZCzy",searchCell:"OffsetWellsTable-module_searchCell__3IW23",bodyGrid:"OffsetWellsTable-module_bodyGrid__Ss17M",loadingCell:"OffsetWellsTable-module_loadingCell__rBu7-",topShadow:"OffsetWellsTable-module_topShadow__MPc8N",viewOnlyShadow:"OffsetWellsTable-module_viewOnlyShadow__DOW-4",bottomShadow:"OffsetWellsTable-module_bottomShadow__jxM6E",wellNameFixed:"OffsetWellsTable-module_wellNameFixed__tKtuD",noShadow:"OffsetWellsTable-module_noShadow__Ssp7E"};e('.OffsetWellsTable-module_stickyTable__LZCzy{background-color:var(--palette-background-b-9);position:sticky;top:0;z-index:9}.OffsetWellsTable-module_searchCell__3IW23{background-color:var(--palette-background-b-9);border-bottom:none!important;height:40px!important;padding:0!important}.OffsetWellsTable-module_bodyGrid__Ss17M{margin-top:12px!important;overflow:hidden!important}.OffsetWellsTable-module_bodyGrid__Ss17M::-webkit-scrollbar-corner{background:transparent}.OffsetWellsTable-module_loadingCell__rBu7-{border-bottom:none!important;color:var(--palette-primary-text-8)!important;font-size:12px!important;height:16px!important;padding:0!important;text-align:center!important}.OffsetWellsTable-module_topShadow__MPc8N{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);border-bottom:none!important;height:16px!important;padding:0!important;position:sticky;top:93px;width:100%;z-index:999}.OffsetWellsTable-module_viewOnlyShadow__DOW-4{top:49px}.OffsetWellsTable-module_bottomShadow__jxM6E{border-bottom:none!important;bottom:0;height:0!important;padding:0!important;position:sticky;width:100%;z-index:999}.OffsetWellsTable-module_bottomShadow__jxM6E:after{background-image:linear-gradient(180deg,rgba(65,65,65,0),#414141);bottom:0;content:" ";height:16px!important;position:absolute;width:100%}.OffsetWellsTable-module_wellNameFixed__tKtuD{box-shadow:4px 0 6px -3px #191919!important}.OffsetWellsTable-module_noShadow__Ssp7E{box-shadow:none!important}');export{t as default};
1
+ import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var o={stickyTable:"OffsetWellsTable-module_stickyTable__LZCzy",searchCell:"OffsetWellsTable-module_searchCell__3IW23",bodyTable:"OffsetWellsTable-module_bodyTable__djKsG",bodyGrid:"OffsetWellsTable-module_bodyGrid__Ss17M",loadingCell:"OffsetWellsTable-module_loadingCell__rBu7-",topShadow:"OffsetWellsTable-module_topShadow__MPc8N",viewOnlyShadow:"OffsetWellsTable-module_viewOnlyShadow__DOW-4",bottomShadow:"OffsetWellsTable-module_bottomShadow__jxM6E",wellNameFixed:"OffsetWellsTable-module_wellNameFixed__tKtuD",noShadow:"OffsetWellsTable-module_noShadow__Ssp7E"};e('.OffsetWellsTable-module_stickyTable__LZCzy{background-color:var(--palette-background-b-9);position:sticky;top:0;z-index:9}.OffsetWellsTable-module_searchCell__3IW23{background-color:var(--palette-background-b-9);border-bottom:none!important;height:40px!important;padding:0!important}.OffsetWellsTable-module_bodyTable__djKsG{position:relative}.OffsetWellsTable-module_bodyGrid__Ss17M{margin-top:12px!important;overflow:hidden!important}.OffsetWellsTable-module_bodyGrid__Ss17M::-webkit-scrollbar-corner{background:transparent}.OffsetWellsTable-module_loadingCell__rBu7-{border-bottom:none!important;color:var(--palette-primary-text-8)!important;font-size:12px!important;height:16px!important;padding:0!important;text-align:center!important}.OffsetWellsTable-module_topShadow__MPc8N{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);border-bottom:none!important;height:16px!important;padding:0!important;position:sticky;top:93px;width:100%;z-index:999}.OffsetWellsTable-module_viewOnlyShadow__DOW-4{top:49px}.OffsetWellsTable-module_bottomShadow__jxM6E{border-bottom:none!important;bottom:0;height:0!important;padding:0!important;position:sticky;width:100%;z-index:999}.OffsetWellsTable-module_bottomShadow__jxM6E:after{background-image:linear-gradient(180deg,rgba(65,65,65,0),#414141);bottom:0;content:" ";height:16px!important;position:absolute;width:100%}.OffsetWellsTable-module_wellNameFixed__tKtuD{box-shadow:4px 0 6px -3px #191919!important}.OffsetWellsTable-module_noShadow__Ssp7E{box-shadow:none!important}');export{o 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{withStyles as o,Tooltip as c,TableRow as d,TableCell as p,ClickAwayListener as m,Button as u,Checkbox as h,TableSortLabel as f}from"@material-ui/core";import{ArrowForwardIos as y}from"@material-ui/icons";import{MetricsSettingMenu as b}from"./MetricsSettingMenu.js";import{MetricsSelect as C}from"./MetricsSelect.js";import{EXPANED_WELLNAME_WIDTH as g,ColumnType as v}from"../../constants.js";import O from"./OffsetWellsTableHead.module.css.js";import{jsxs as w,jsx as N}from"react/jsx-runtime";var S=["title"];function R(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?R(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):R(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var q=function(e){var t=e.title,i=r(e,S);return N(c,{placement:"top-end",title:t,children:N(f,W({},i))})},j=o((function(e){return{tooltip:{width:"332px",maxWidth:"332px",height:"125px",padding:"16px",backgroundColor:e.palette.info.dark,borderRadius:"10px"},arrow:{color:e.palette.info.dark}}}))(c);function k(e,t){var r=e.find((function(e){return e.key===t}));return(null==r?void 0:r.width)||0}var D=function(r){var i=r.columnsWithDict,s=r.metricsKeys,o=r.sortBy,f=r.sortDirection,S=r.indeterminate,R=r.isAllWellsSelected,W=r.onChangeSort,D=r.onChangeMetricsKeys,x=r.onUpdateMetricsKey,E=r.isWellNameExpand,P=r.setIsWellNameExpand,A=r.handleChangeAllOffsetWells,I=r.wellNameStyle,M=r.isViewOnly,K=r.isImperial,L=r.contentRef,H=r.isHintPopperOpen,T=r.setIsHintPopperOpen,V=n(!1),B=e(V,2),z=B[0],U=B[1],G=function(e){W(e,e===o&&f===a.ASC?a.DESC:a.ASC)};return w(d,{className:O.tableRow,children:[w(p,{className:l(O.headCell,O.wellNameCell,I),style:{width:E?g:k(i,v.name)},children:[w("div",{className:O.nameWrapper,children:[!M&&N(m,{onClickAway:function(){return T(!1)},children:N(j,{open:H,interactive:!0,placement:"top-start",title:w("div",{className:O.popperContent,children:["Selected Offsets are automatically moved to the top of the list!",N("div",{className:O.popperButtonWrapper,children:N(u,{classes:{root:O.popperButton},onClick:function(){return T(!1)},children:"Got It"})})]}),arrow:"top",children:N(h,{size:"medium",onChange:function(e){return A(e.target.checked)},checked:R,indeterminate:S})})}),N(q,{title:"Sort",active:o===v.name,direction:o===v.name&&f===a.DESC?"desc":"asc",classes:{root:l(O.headerLabel,t({},O.cellDataViewOnly,M))},onClick:function(){return G(v.name)},children:"Well Name"})]}),N(c,{title:E?"Collapse":"Expand",children:N(y,{className:l(O.wellNameExpandIcon,t({},O.wellNameCollapsed,!E)),onClick:function(){return P(!E)}})})]}),N(p,{className:O.headCell,style:{width:k(i,v.status)}}),N(p,{className:O.headCell,style:{width:k(i,v.rig)},children:N("div",{className:O.nameWrapper,children:N(q,{title:"Sort",active:o===v.rig,direction:o===v.rig&&f===a.DESC?"desc":"asc",classes:{root:O.headerLabel},onClick:function(){return G(v.rig)},children:"Rig"})})}),N(p,{className:O.headCell,style:{width:k(i,v.distance)},children:N("div",{className:O.nameWrapper,children:N(q,{title:"Sort",active:o===v.distance,direction:o===v.distance&&f===a.DESC?"desc":"asc",classes:{root:O.headerLabel},onClick:function(){return G(v.distance)},children:"Distance (".concat(K?"miles":"km",")")})})}),N(p,{className:O.headCell,style:{width:k(i,v.lastActive)},children:N("div",{className:O.nameWrapper,children:N(q,{title:"Sort",active:o===v.lastActive,direction:o===v.lastActive&&f===a.DESC?"desc":"asc",classes:{root:O.headerLabel},onClick:function(){return G(v.lastActive)},children:"Last Active"})})}),s.map((function(e){return N(p,{className:O.headCell,style:{width:k(i,e)},children:N(q,{title:z?"":"Sort",active:o===e,direction:o===e&&f===a.DESC?"desc":"asc",classes:{root:O.headerLabel},onClick:function(){return G(e)},children:N(C,{isTooltipVisible:s.length>1,currentValue:e,onChange:function(t){return x(e,t)},setIsMenuOpen:U})})},e)})),N(p,{className:O.headCell,style:{width:k(i,v.wellSection)},children:N("div",{className:O.settingsHeader,children:N(b,{metricsKeys:s,onChange:D,contentRef:L})})})]})};D.propTypes={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,isHintPopperOpen:s.bool.isRequired,setIsHintPopperOpen:s.func.isRequired};var x=i(D);export{x as default};
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{withStyles as o,Tooltip as c,TableRow as d,TableCell as p,ClickAwayListener as u,Button as m,Checkbox as h,TableSortLabel as f}from"@material-ui/core";import{ArrowForwardIos as y}from"@material-ui/icons";import{MetricsSettingMenu as b}from"./MetricsSettingMenu.js";import{MetricsSelect as C}from"./MetricsSelect.js";import{EXPANED_WELLNAME_WIDTH as g,ColumnType as v}from"../../constants.js";import O from"./OffsetWellsTableHead.module.css.js";import{jsxs as w,jsx as N}from"react/jsx-runtime";var R=["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 q(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 W=function(e){var t=e.title,i=r(e,R);return N(c,{placement:"top-end",title:t,children:N(f,q({},i))})},j=o((function(e){return{tooltip:{width:"332px",maxWidth:"332px",height:"125px",padding:"16px",backgroundColor:e.palette.info.dark,borderRadius:"10px"},arrow:{color:e.palette.info.dark}}}))(c);function k(e,t){var r=e.find((function(e){return e.key===t}));return(null==r?void 0:r.width)||0}var D=function(r){var i=r.open,s=r.columnsWithDict,o=r.metricsKeys,f=r.sortBy,R=r.sortDirection,S=r.indeterminate,q=r.isAllWellsSelected,D=r.onChangeSort,E=r.onChangeMetricsKeys,x=r.onUpdateMetricsKey,P=r.isWellNameExpand,A=r.setIsWellNameExpand,I=r.handleChangeAllOffsetWells,M=r.wellNameStyle,K=r.isViewOnly,L=r.isImperial,H=r.contentRef,T=r.isHintPopperOpen,V=r.setIsHintPopperOpen,B=n(!1),z=e(B,2),U=z[0],G=z[1],F=function(e){D(e,e===f&&R===a.ASC?a.DESC:a.ASC)};return w(d,{className:O.tableRow,children:[w(p,{className:l(O.headCell,O.wellNameCell,M),style:{width:P?g:k(s,v.name)},children:[w("div",{className:O.nameWrapper,children:[!K&&i&&N(u,{onClickAway:function(){return V(!1)},children:N(j,{open:T,interactive:!0,placement:"top-start",title:w("div",{className:O.popperContent,children:["Selected Offsets are automatically moved to the top of the list!",N("div",{className:O.popperButtonWrapper,children:N(m,{classes:{root:O.popperButton},onClick:function(){return V(!1)},children:"Got It"})})]}),arrow:"top",children:N(h,{size:"medium",onChange:function(e){return I(e.target.checked)},checked:q,indeterminate:S})})}),N(W,{title:"Sort",active:f===v.name,direction:f===v.name&&R===a.DESC?"desc":"asc",classes:{root:l(O.headerLabel,t({},O.cellDataViewOnly,K))},onClick:function(){return F(v.name)},children:"Well Name"})]}),N(c,{title:P?"Collapse":"Expand",children:N(y,{className:l(O.wellNameExpandIcon,t({},O.wellNameCollapsed,!P)),onClick:function(){return A(!P)}})})]}),N(p,{className:O.headCell,style:{width:k(s,v.status)}}),N(p,{className:O.headCell,style:{width:k(s,v.rig)},children:N("div",{className:O.nameWrapper,children:N(W,{title:"Sort",active:f===v.rig,direction:f===v.rig&&R===a.DESC?"desc":"asc",classes:{root:O.headerLabel},onClick:function(){return F(v.rig)},children:"Rig"})})}),N(p,{className:O.headCell,style:{width:k(s,v.distance)},children:N("div",{className:O.nameWrapper,children:N(W,{title:"Sort",active:f===v.distance,direction:f===v.distance&&R===a.DESC?"desc":"asc",classes:{root:O.headerLabel},onClick:function(){return F(v.distance)},children:"Distance (".concat(L?"miles":"km",")")})})}),N(p,{className:O.headCell,style:{width:k(s,v.lastActive)},children:N("div",{className:O.nameWrapper,children:N(W,{title:"Sort",active:f===v.lastActive,direction:f===v.lastActive&&R===a.DESC?"desc":"asc",classes:{root:O.headerLabel},onClick:function(){return F(v.lastActive)},children:"Last Active"})})}),o.map((function(e){return N(p,{className:O.headCell,style:{width:k(s,e)},children:N(W,{title:U?"":"Sort",active:f===e,direction:f===e&&R===a.DESC?"desc":"asc",classes:{root:O.headerLabel},onClick:function(){return F(e)},children:N(C,{isTooltipVisible:o.length>1,currentValue:e,onChange:function(t){return x(e,t)},setIsMenuOpen:G})})},e)})),N(p,{className:O.headCell,style:{width:k(s,v.wellSection)},children:N("div",{className:O.settingsHeader,children:N(b,{metricsKeys:o,onChange:E,contentRef:H})})})]})};D.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,isHintPopperOpen:s.bool.isRequired,setIsHintPopperOpen:s.func.isRequired,contentRef:s.shape({current:s.instanceOf(Element)}).isRequired};var E=i(D);export{E as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import{memo as t,useRef as i}from"react";import l from"prop-types";import{startCase as r,get as s}from"lodash";import a from"classnames";import n from"moment";import{TableRow as o,TableCell as d,Checkbox as c,Tooltip as m,Typography as u}from"@material-ui/core";import{convertValue as h}from"../../../../utils/index.js";import{ColumnType as f,EXPANED_WELLNAME_WIDTH as y,StatusOptions as b}from"../../constants.js";import{SubjectWellMark as p}from"./SubjectWellMark.js";import N from"./OffsetWellsTableRow.module.css.js";import{jsxs as v,jsx as w}from"react/jsx-runtime";function g(e,t,i){var l=t.find((function(e){return e.key===i})),r=s(e,l.key);return"undefined"===r?"loading...":Number.isFinite(r)||r?l.unitType?h(r,l.unitType,l.from,l.to):r:"—"}function C(e,t){var i=s(e,f.distance);return Number.isFinite(i)?t?i:h(i,"length","mi","km"):"—"}function R(e,t){var i=e.find((function(e){return e.key===t}));return(null==i?void 0:i.width)||0}var W=function(t){var l,s,h=t.columnsWithDict,W=t.data,k=t.subjectWellId,q=t.metricsKeys,O=t.metricsColumns,j=t.handleChanageOffsetWell,D=t.isWellNameExpand,x=t.wellNameStyle,M=t.wellNameWidth,S=t.isViewOnly,T=t.isImperial,A=t.isLimitedOffsetwells,I=k===W.id,Y=e({},N.subjectWellRow,I),E=i(),F=!1,L=W[f.name]||"—",V=L;if(!D&&2*M<8*L.length){var z=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 i=Math.ceil(t.clientWidth);return document.body.removeChild(t),i}(L);if(z>2*M){var K=2*M/(z/L.length);V="".concat(L.substring(0,K/2-2),"\n... ").concat(L.substring(L.length-K/2+6)),F=!0}}return v(o,{className:N.bodyRow,children:[v(d,{className:a(N.bodyCell,N.wellNameCell,x,Y),style:{width:D?y:R(h,f.name)},innerRef:E,children:[I&&w(p,{className:N.subjectWellMark}),!I&&w(c,{size:"medium",checked:W.checked,disabled:S||A&&!W.checked,onChange:function(e){return j(W,e.target.checked)}}),w(m,{title:F?L:"",children:w(u,{variant:"body2",className:a(N.wellNameCursor,(l={},e(l,N.cellDataViewOnly,I),e(l,N.wellNamePreWrap,F),l)),children:F?V:L})})]}),w(d,{className:a(N.bodyCell,Y),style:{width:R(h,f.status)},children:!I&&w(m,{title:r(W[f.status]),children:w("div",{className:N.status,style:{background:null===(s=b.find((function(e){return e.value===W[f.status]})))||void 0===s?void 0:s.color}})})}),w(d,{className:a(N.bodyCell,Y),style:{width:R(h,f.rig)},children:w(u,{variant:"body2",className:N.cellData,children:W[f.rig]&&"Null"!==W[f.rig]?W[f.rig]:"—"})}),w(d,{className:a(N.bodyCell,Y),style:{width:R(h,f.distance)},children:w(u,{variant:"body2",className:N.cellData,children:C(W,T)})}),w(d,{className:a(N.bodyCell,Y),style:{width:R(h,f.lastActive)},children:w(u,{variant:"body2",className:N.cellData,children:W[f.lastActive]&&Number.isFinite(W[f.lastActive])?n.unix(W[f.lastActive]).format("MM/DD/YYYY"):"—"})}),q.map((function(e){return w(d,{className:a(N.bodyCell,Y),style:{width:R(h,e)},children:w(u,{variant:"body2",className:N.cellData,children:g(W,O,e)})},e)})),w(d,{className:a(N.bodyCell,N.lastCell,Y),style:{width:R(h,f.wellSection)}})]})};W.propTypes={columnsWithDict:l.arrayOf(l.shape({})).isRequired,data:l.shape({id:l.number,checked:l.bool,name:l.string,status:l.string}).isRequired,subjectWellId:l.number.isRequired,metricsKeys:l.arrayOf(l.string).isRequired,metricsColumns:l.arrayOf(l.shape({})).isRequired,handleChanageOffsetWell:l.func.isRequired,isWellNameExpand:l.bool.isRequired,wellNameStyle:l.string.isRequired,wellNameWidth:l.number.isRequired,isViewOnly:l.bool.isRequired,isImperial:l.bool.isRequired,isLimitedOffsetwells:l.bool.isRequired};var k=t(W);export{k as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as r,useRef as i,useState as l,useCallback as n,useEffect as s}from"react";import a from"prop-types";import{startCase as o,get as c}from"lodash";import u from"classnames";import d from"moment";import{TableRow as m,TableCell as f,Checkbox as y,Tooltip as h,Typography as p}from"@material-ui/core";import{convertValue as b}from"../../../../utils/index.js";import{ColumnType as v,ROW_HEIGHT as N,EXPANED_WELLNAME_WIDTH as w,StatusOptions as g}from"../../constants.js";import{SubjectWellMark as R}from"./SubjectWellMark.js";import C from"./OffsetWellsTableRow.module.css.js";import{jsxs as W,jsx as q}from"react/jsx-runtime";function T(e,t,r){var i=t.find((function(e){return e.key===r})),l=c(e,i.key);return"undefined"===l?"loading...":Number.isFinite(l)||l?i.unitType?b(l,i.unitType,i.from,i.to):l:"—"}function k(e,t){var r=c(e,v.distance);return Number.isFinite(r)?t?r:b(r,"length","mi","km"):"—"}function O(e,t){var r=e.find((function(e){return e.key===t}));return(null==r?void 0:r.width)||0}var x=function(r){var a,c,b=r.columnsWithDict,x=r.data,j=r.subjectWellId,D=r.metricsKeys,M=r.metricsColumns,I=r.handleChanageOffsetWell,S=r.isWellNameExpand,A=r.wellNameStyle,Y=r.wellNameWidth,z=r.isViewOnly,E=r.isImperial,F=r.isLimitedOffsetwells,L=r.flyTo,V=r.containerRef,K=r.tableTop,P=j===x.id,H=t({},C.subjectWellRow,P),B=i(),G=i(),J=l(!1),Q=e(J,2),U=Q[0],X=Q[1],Z=i(),$=!1,_=x[v.name]||"—",ee=_;if(!S&&2*Y<8*_.length){var te=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 r=Math.ceil(t.clientWidth);return document.body.removeChild(t),r}(_);if(te>2*Y){var re=2*Y/(te/_.length);ee="".concat(_.substring(0,re/2-2),"\n... ").concat(_.substring(_.length-re/2+6)),$=!0}}var ie=n((function(e,t){var r=t-e+16;B.current.style.position="absolute",B.current.style.top="".concat(e,"px"),B.current.style.zIndex=3,B.current.style.transition="transform ".concat(800,"ms ease"),B.current.style.transform="translateY(".concat(r,"px)")}),[]),le=n((function(){B.current.style.position="unset",B.current.style.zIndex=1,B.current.style.transition="none",B.current.style.transform="none"}),[]);s((function(){le(),X(!1),G.current&&(clearTimeout(G.current),G.current=null),Z.current=L}),[L]);var ne=n((function(e){if(!G.current){var t=B.current.offsetTop,r=L;e?Math.abs(r-t)>=7*N&&(V.current.scrollTo(0,r+K-2*N),t=r+K+7*N):r=t+7*N,X(!0),ie(t,r),G.current=setTimeout((function(){return I(x,e)}),800)}}),[x,L,K]);return W(m,{className:C.bodyRow,innerRef:B,children:[W(f,{className:u(C.bodyCell,C.wellNameCell,A,H),style:{width:S?w:O(b,v.name)},children:[P&&q(R,{className:C.subjectWellMark}),!P&&q(y,{size:"medium",checked:U&&Z.current===L?!x.checked:x.checked,disabled:z||F&&!x.checked,onChange:function(e){return ne(e.target.checked)}}),q(h,{title:$?_:"",children:q(p,{variant:"body2",className:u(C.wellNameCursor,(a={},t(a,C.cellDataViewOnly,P),t(a,C.wellNamePreWrap,$),a)),children:$?ee:_})})]}),q(f,{className:u(C.bodyCell,H),style:{width:O(b,v.status)},children:!P&&q(h,{title:o(x[v.status]),children:q("div",{className:C.status,style:{background:null===(c=g.find((function(e){return e.value===x[v.status]})))||void 0===c?void 0:c.color}})})}),q(f,{className:u(C.bodyCell,H),style:{width:O(b,v.rig)},children:q(p,{variant:"body2",className:C.cellData,children:x[v.rig]&&"Null"!==x[v.rig]?x[v.rig]:"—"})}),q(f,{className:u(C.bodyCell,H),style:{width:O(b,v.distance)},children:q(p,{variant:"body2",className:C.cellData,children:k(x,E)})}),q(f,{className:u(C.bodyCell,H),style:{width:O(b,v.lastActive)},children:q(p,{variant:"body2",className:C.cellData,children:x[v.lastActive]&&Number.isFinite(x[v.lastActive])?d.unix(x[v.lastActive]).format("MM/DD/YYYY"):"—"})}),D.map((function(e){return q(f,{className:u(C.bodyCell,H),style:{width:O(b,e)},children:q(p,{variant:"body2",className:C.cellData,children:T(x,M,e)})},e)})),q(f,{className:u(C.bodyCell,C.lastCell,H),style:{width:O(b,v.wellSection)}})]})};x.propTypes={columnsWithDict:a.arrayOf(a.shape({})).isRequired,data:a.shape({id:a.number,checked:a.bool,name:a.string,status:a.string}).isRequired,subjectWellId:a.number.isRequired,metricsKeys:a.arrayOf(a.string).isRequired,metricsColumns:a.arrayOf(a.shape({})).isRequired,handleChanageOffsetWell:a.func.isRequired,isWellNameExpand:a.bool.isRequired,wellNameStyle:a.string.isRequired,wellNameWidth:a.number.isRequired,isViewOnly:a.bool.isRequired,isImperial:a.bool.isRequired,isLimitedOffsetwells:a.bool.isRequired,flyTo:a.number.isRequired,containerRef:a.shape({current:a.instanceOf(Element)}).isRequired,tableTop:a.number.isRequired};var j=r(x);export{j 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="Entire Well",o=450,s=50,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:[340,310,285,203]},{type:u.status,label:"",key:u.status,width:[66,40,40,40]},{type:u.rig,label:"Rig",key:u.rig,width:[220,164,162,103]},{type:u.distance,label:"Distance",key:u.distance,width:[174,140,103,103]},{type:u.lastActive,label:"Last Active",key:u.lastActive,width:[180,126,108,108]},{type:u.metrics,label:"",key:"",width:[0,200,141,141]},{type:u.wellSection,label:"Well Section",key:u.wellSection,width:[40,40,40,40]}],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}));export{l as ALL_SECTION_KEY,i as ALL_SECTION_LABEL,u as ColumnType,r as ENTIRE_WELL_LABEL,o 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,s as ROWS_PER_PAGE,d as StatusOptions,m as TableColumns,c as WellStatus};
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="Entire Well",o=450,s=50,n=60,p=a,_={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"},c=[{value:_.rig,label:"Rig"},{value:_.program,label:"Program"},{value:_.basin,label:"Basin"},{value:_.county,label:"County"},{value:_.area,label:"Area"},{value:_.formation,label:"Target Formation"},{value:_.stringDesign,label:"String Design"}],d={unknown:"unknown",idle:"idle",active:"active",paused:"paused",complete:"complete"},u=[{value:d.unknown,color:"#9E9E9E"},{value:d.idle,color:"#BDBDBD"},{value:d.active,color:"#95F126"},{value:d.paused,color:"#FFF350"},{value:d.complete,color:"#2196F3"}],m={name:"name",status:"status",rig:"rigName",distance:"distance",lastActive:"lastActive",metrics:"metrics",wellSection:"wellSection"},g=[{type:m.name,label:"Well Name",key:m.name,width:[340,310,285,203]},{type:m.status,label:"",key:m.status,width:[66,40,40,40]},{type:m.rig,label:"Rig",key:m.rig,width:[220,164,162,103]},{type:m.distance,label:"Distance",key:m.distance,width:[174,140,103,103]},{type:m.lastActive,label:"Last Active",key:m.lastActive,width:[180,126,108,108]},{type:m.metrics,label:"",key:"",width:[0,200,141,141]},{type:m.wellSection,label:"Well Section",key:m.wellSection,width:[40,40,40,40]}],v=[{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"}],b=3,y=t([p.weight_to_weight_average,p.bottom_to_slips_average,p.drilling_connection_average,p.slips_to_bottom_average,p.hole_depth,p.hole_depth_change,p.drilled_feet_rotary,p.drilled_feet_slide,p.rop_gross,p.rop,p.rop_rotary,p.rop_slide,p.drilled_feet_rotary_percentage,p.drilled_feet_slide_percentage,p.on_bottom_percentage,p.on_bottom_time,p.cost_per_ft,p.cost_per_lat_ft,p.feet_per_day,p.tripping_in_speed_cased,p.tripping_in_speed_open,p.tripping_in_speed,p.tripping_out_speed_cased,p.tripping_out_speed_open,p.tripping_out_speed].concat(e("production"!==process.env.REACT_APP_ENVIRONMENT?[p.npt,p.circulating_time,p.spud_to_rig_release_time,p.spud_to_total_depth_time]:[])),"label"),h=y.map((function(e){return e.key}));export{l as ALL_SECTION_KEY,i as ALL_SECTION_LABEL,m as ColumnType,r as ENTIRE_WELL_LABEL,o as EXPANED_WELLNAME_WIDTH,c as FilterOptions,_ as FilterType,b as MAX_METRICS_COUNT,h as METRICS_KEYS,y as METRICS_LIST,v as OBJECTIVE_PERIOD_LIST,s as ROWS_PER_PAGE,n as ROW_HEIGHT,u as StatusOptions,g as TableColumns,d as WellStatus};
@@ -1 +1 @@
1
- import{useEffect as i}from"react";import{sortBy as o}from"lodash";function t(t,n,r,c){i((function(){if(n&&t){var i=[];if(n.forEach((function(o){o.distance<=t&&i.push(o)})),c&&c<i.length){var e=o(i,"distance");r(e.slice(0,c))}else r(i)}}),[t,n])}export{t as useRadiusWells};
1
+ import{useRef as r,useEffect as t}from"react";import{sortBy as n}from"lodash";function c(c,e,i,o){var a=r(-1);t((function(){if(e&&(-1===a.current&&(a.current=c),c&&a.current!==c)){a.current=c;var r=[];if(e.forEach((function(t){t.distance<=c&&r.push(t)})),o&&o<r.length){var t=n(r,"distance");i(t.slice(0,o))}else i(r)}}),[c,e])}export{c as useRadiusWells};
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as n}from"react";import{orderBy as o,isEmpty as i}from"lodash";import{SortDirection as c}from"react-virtualized";import{ColumnType as u}from"../constants.js";function f(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function a(r,f,a,l,s){var d=t(u.distance),m=e(d,2),b=m[0],O=m[1],y=t(c.ASC),j=e(y,2),h=j[0],v=j[1],P=t(null),g=e(P,2),w=g[0],D=g[1];return n((function(){if(f&&!s){var e=a.map((function(r){return r.id})).concat(null==r?void 0:r.id),t=a.filter((function(e){return e.id!==(null==r?void 0:r.id)})),n=f.filter((function(r){return!e.includes(r.id)})),c=o(n,[function(r){return r[b]}],[h.toLowerCase()]),u=(i(r)?[]:[r]).concat(t).concat(c).map((function(r){return a.find((function(e){return e.id===r.id}))?p(p({},r),{},{checked:!0}):p(p({},r),{},{checked:!1})}));D(u),l(!1)}}),[f,b,h,r,a,s]),[b,O,h,v,w]}export{a as useSortedWells};
1
+ import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as n}from"react";import{orderBy as o,isEmpty as i}from"lodash";import{SortDirection as c}from"react-virtualized";import{ColumnType as u}from"../constants.js";function f(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function a(r,f,a,l,s){var m=t(u.distance),b=e(m,2),d=b[0],O=b[1],y=t(c.ASC),j=e(y,2),h=j[0],P=j[1],v=t(null),g=e(v,2),w=g[0],D=g[1];return n((function(){if(f&&!s){var e=a.map((function(r){return r.id})),t=a.filter((function(e){return e.id!==(null==r?void 0:r.id)})),n=f.filter((function(r){return!e.includes(r.id)})),c=o(n,[function(r){return r[d]}],[h.toLowerCase()]),u=(i(r)?[]:[r]).concat(t).concat(c).map((function(r){return a.find((function(e){return e.id===r.id}))?p(p({},r),{},{checked:!0}):p(p({},r),{},{checked:!1})}));D(u),l(!1)}}),[f,d,h,r,a,s]),[d,O,h,P,w]}export{a as useSortedWells};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.44.0-8",
3
+ "version": "0.44.0-9",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"
@@ -1 +0,0 @@
1
- import r from"@babel/runtime/helpers/slicedToArray";import{useState as n,useRef as t,useEffect as e}from"react";import{isEqual as u}from"lodash";function c(c,o,i){var l=n(null),f=r(l,2),a=f[0],m=f[1],p=t(null),d=t([]);return e((function(){if(o&&!(p.current&&u(p.current,o)&&u(d.current,i))){var r=o.concat(c.filter((function(r){return i.includes(r.id)})));m(r),p.current=o,d.current=i}}),[c,o,i]),a}export{c as useAddedWellsByManual};