@corva/ui 0.51.0-1 → 0.51.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.d.ts +1 -3
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.d.ts +11 -5
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.module.css.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffsetWellPickerV4.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellPickerV4/OffsetWellPickerV4.js"],"names":[],"mappings":";AA4CA;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"OffsetWellPickerV4.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellPickerV4/OffsetWellPickerV4.js"],"names":[],"mappings":";AA4CA;;;;;;;;;;;gBAumBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import{useState as i,useMemo as r,useRef as n,useEffect as s,useCallback as l}from"react";import a from"prop-types";import p from"classnames";import{uniqBy as m,isEmpty as c,sortBy as d,isEqual as u}from"lodash";import{Typography as f}from"@material-ui/core";import{Replay as j,InfoOutlined as C}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"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import{jsx as v,jsxs as h,Fragment as g}from"react/jsx-runtime";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/AppContext.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import A from"../LoadingIndicator/LoadingIndicator.js";import{Regular12 as y}from"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.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"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.js";import"../Chart/components/AxisDropdown.js";import"../Chart/components/buttons/DragToZoomButton.js";import"../Chart/components/buttons/ZoomInButton.js";import"../Chart/components/buttons/ZoomOutButton.js";import"../Chart/components/buttons/PanButton.js";import"../Chart/components/buttons/ResetZoomButton.js";import"../Chart/components/buttons/HideAxesButton.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../AdvancedSlider/AdvancedSlider.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import D 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"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../clients/jsonApi/index.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellMap/OffsetWellMap.js";import"../Notifications/Notifications.js";import"uuid";import"../Toaster/Toaster.js";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"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import{Tooltip as S}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"../HelpCenter/HelpCenterIcon.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../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 I from"../../styles/typography/index.js";import"../../styles/counter/counter.module.scss.js";import{isMobileDetected as T,isNativeDetected as W}from"../../utils/mobileDetect.js";import{useFetchWells as x}from"./effects/useFetchWells.js";import{useAdvancedWells as P}from"./effects/useAdvancedWells.js";import{useBicWells as O}from"./effects/useBicWells.js";import{useCompanyMetricKey as w}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as E}from"./effects/useFilterOptions.js";import{useFilteredWells as B}from"./effects/useFilteredWells.js";import{useSortedWells as H}from"./effects/useSortedWells.js";import{useRadiusWells as L}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as F}from"./effects/useTableColumns.js";import{AppHeader as V}from"./components/AppHeader/AppHeader.js";import{Toolbar as M}from"./components/Toolbar/Toolbar.js";import{Filter as N}from"./components/Filter/Filter.js";import{WellsMap as k}from"./components/Map/WellsMap.js";import R from"./components/OffsetWellsTable/OffsetWellsTable.js";import U from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as _,ViewType as z,ColumnType as K,FilterType as q,ROWS_PER_PAGE as G,LEAVE_TOUCH_DELAY as Z,MAX_OFFSET_SIZE as J,SMALL_SCREEN_WIDTH as Q,SMALL_SCREEN_HEIGHT as X}from"./constants.js";import{SEARCH_CATEGORIES as Y}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";import{CustomInfoIcon as $}from"./components/CustomInfoIcon/CustomInfoIcon.js";function ee(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function te(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ee(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var oe="OffsetWellPickerV4",ie=function(a){var J,ee,ie=a.open,re=a.isWDUser,ne=a.defaultSubjectWell,se=a.currentUser,le=a.offsetSettings,ae=a.addWellsUsabilityInfo,pe=a.isViewOnly,me=a.onClose,ce=a.onSave,de=a.maxOffsetSize,ue=i(null),fe=o(ue,2),je=fe[0],Ce=fe[1],be=r((function(){return de+1}),[de]),ve=i(null==le?void 0:le.filterExpanded),he=o(ve,2),ge=he[0],Ae=he[1],ye=i(null==le?void 0:le.mapHidden),De=o(ye,2),Se=De[0],Ie=De[1],Te=+(null==ne?void 0:ne.companyId)||+(null==se?void 0:se.company_id),We=null==ne?void 0:ne.asset_id,xe=i((null==le?void 0:le.filters)||{}),Pe=o(xe,2),Oe=Pe[0],we=Pe[1],Ee=i((null==le?void 0:le.wellSection)||_),Be=o(Ee,2),He=Be[0],Le=Be[1],Fe=n(!0),Ve=i([]),Me=o(Ve,2),Ne=Me[0],ke=Me[1],Re=i(null),Ue=o(Re,2),_e=Ue[0],ze=Ue[1],Ke=i(!0),qe=o(Ke,2),Ge=qe[0],Ze=qe[1],Je=i(!1),Qe=o(Je,2),Xe=Qe[0],Ye=Qe[1],$e=i(!1),et=o($e,2),tt=et[0],ot=et[1],it=i(!1),rt=o(it,2),nt=rt[0],st=rt[1],lt=n(),at=i(z.none),pt=o(at,2),mt=pt[0],ct=pt[1],dt=i(!1),ut=o(dt,2),ft=ut[0],jt=ut[1],Ct=r((function(){return be&&be<=Ne.length}),[Ne]),bt=r((function(){return mt===z.small?0:mt===z.mobile?52:48}),[Ct,mt]);s((function(){function e(){window.innerWidth<=Q||T||W?ct(z.mobile):window.innerHeight<=X?ct(z.small):ct(z.normal)}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[ie]);var vt=r((function(){return!Se&&ge?448:Se?ge?232:0:216}),[Se,ge]);s((function(){Fe.current=!0}),[We,null==le?void 0:le.selectedWellIds]),s((function(){mt===z.small||mt===z.mobile?(Ie(!0),Ae(!1)):(Ae(!pe&&(null==le?void 0:le.filterExpanded)),Ie(!pe&&(null==le?void 0:le.mapHidden))),we((null==le?void 0:le.filters)||{}),Le((null==le?void 0:le.wellSection)||_)}),[le,pe,mt]);var ht=x(Te,ae),gt=O(re,We),At=o(gt,2),yt=At[0],Dt=At[1],St=w(Te,null==le?void 0:le.metricsKeys),It=o(St,2),Tt=It[0],Wt=It[1],xt=P(Te,ht,yt,Dt,We,Tt),Pt=E(xt);s((function(){if(xt&&yt){var e=xt.find((function(e){return e.id===We}));if(e){var o=yt.filter((function(e){return e.value!==_})).map((function(e){return e.label})),i=te(te({},e),o.length>0&&t({},K.wellSection,o));ze(i)}else ze(null)}}),[yt,xt]);var Ot=F(Tt),wt=B(xt,Oe);s((function(){if(wt)if(Fe.current){var e=xt.filter((function(e){return((null==le?void 0:le.selectedWellIds)||[]).includes(e.id)}));_e&&(e=e.concat(_e)),ke(m(e,"id")),Fe.current=!1}else ke((function(e){var t=(wt||[]).filter((function(t){return!!e.find((function(e){var o=e.id;return t.id===o}))}));return _e&&(t=t.concat(_e)),m(t,"id")}))}),[xt,wt,null==le?void 0:le.selectedWellIds]);var Et=H(_e,wt,Ne,Ze,Fe.current),Bt=o(Et,5),Ht=Bt[0],Lt=Bt[1],Ft=Bt[2],Vt=Bt[3],Mt=Bt[4];L(Oe[q.radius],wt,ke,be);var Nt=l((function(e,t,o){var i;i=o===Y.well.name?t:t.reduce((function(e,t){var o,i=null===(o=xt.find((function(e){return e.id===t})))||void 0===o?void 0:o.rigName,r=xt.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(r)}),[]);var r=xt.filter((function(e){var t=e.id;return i.includes(t)}));ke(e?function(e){return m(e.concat(r),"id")}:function(e){return m(e.filter((function(e){var t=e.id;return!r.find((function(e){return e.id===t}))})))})}),[xt]),kt=l((function(){ot(!0)}),[]),Rt=l((function(e){Wt(e)}),[]),Ut=l((function(t,o){ke(o?function(o){return[].concat(e(o),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),_t=l((function(e){if(e){var t=_e?wt.concat(_e):wt,o=m(t,"id");ke(o)}else ke(_e?[_e]:[])}),[wt,_e]),zt=function(e){if(c(Dt))ke(_e?[_e]:[]);else{var t=xt.filter((function(t){return Dt[e].includes(t.id)}));ke(t)}},Kt=l((function(e){Le(e),zt(e)}),[zt]),qt=r((function(){return Ne.find((function(e){return e.id===We}))?Ne.length-1:Ne.length}),[Ne,We]),Gt=r((function(){if(!Dt)return!1;var e=Ne.map((function(e){return e.id})),t=Dt[He]||[];return(be&&t.length>be?be:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[Dt,ne,Ne,He]),Zt=function(){var e=(xt||[]).filter((function(e){return((null==le?void 0:le.selectedWellIds)||[]).includes(e.id)}));_e&&(e=e.concat(_e)),ke(m(e,"id")),u(Oe,le.filters)||(Fe.current=!0);var t=te(te({},le),{},{mapHidden:Se,filterExpanded:ge});ce(t),we((null==le?void 0:le.filters)||{}),Le((null==le?void 0:le.wellSection)||_),me()},Jt=r((function(){return!Gt||(!(c(Oe)||!Oe[q.sideTracks])||He!==_)}),[Gt,Oe,He]);s((function(){if(!be||be>Ne.length)st(!1);else if(be<Ne.length){var e=d(Ne,"distance");ke(e.slice(0,be))}else be===Ne.length&&st(!0)}),[Ne,be]);var Qt=!xt||!yt||!Mt||mt===z.none,Xt=i(!1),Yt=o(Xt,2),$t=Yt[0],eo=Yt[1],to=i(G),oo=o(to,2),io=oo[0],ro=oo[1],no=i([]),so=o(no,2),lo=so[0],ao=so[1];s((function(){if(Mt){var e=Mt.slice(0,io);ao(e)}}),[Mt,io,_e]);return v(b,{open:ie,onClose:Zt,title:v(V,{isWDUser:re,viewType:mt,totalCount:null!==(J=null==xt?void 0:xt.length)&&void 0!==J?J:0,selectedCount:qt,isViewOnly:pe,maxOffsetwellNumber:be,maxOffsetSize:de}),isMobile:mt===z.mobile,contentContainerClassName:p(U.offsetWellDialog,t({},U.offsetWellDialogMobile,mt===z.mobile)),contentClassName:p(U.contentContainer,(ee={},t(ee,U.smallContainer,mt===z.small),t(ee,U.contentContainerMobile,mt===z.mobile),ee)),actionsClassName:p(U.modalActions,t({},U.modalActionsMobile,mt===z.mobile)),actions:!pe&&h("div",{className:U.actionsWrapper,children:[!Qt&&Jt?v(S,{placement:"bottom-start",title:"Reset to Synced Offsets in ".concat(re?"Offset App":"Wellhub"),children:v("div",{children:v(D,{"data-testid":"".concat(oe,"_reset"),onClick:function(){we({}),Le(_),zt(_)},color:"primary",startIcon:mt!==z.mobile&&v(j,{}),classes:mt===z.mobile&&{root:U.resetButtonMobile},children:mt!==z.mobile?"Reset":v(j,{})})})}):v("div",{className:mt===z.mobile&&U.infoIconContainer,children:mt!==z.mobile?h(g,{children:[v("span",{className:p(I.regular12,I.colors.t6),children:"The offset list is being automatically populated by "}),v("span",{className:p(I.medium12,I.colors.t6),children:re?"Offset Selection App.":"WellHub."})]}):v(S,{title:h("div",{children:[v("span",{className:p(I.regular12,I.colors.t1),children:"The offset list is being automatically populated by "}),v("span",{className:p(I.medium12,I.colors.t1),children:re?"Offset Selection App.":"WellHub."})]}),enterTouchDelay:0,leaveTouchDelay:Z,children:v(C,{className:U.infoIcon})})}),h("div",{className:U.buttonGap,children:[v(D,{"data-testid":"".concat(oe,"_cancel"),onClick:Zt,color:"primary",children:"Cancel"}),h(D,{"data-testid":"".concat(oe,"_selectedWells"),variant:"contained",color:"primary",onClick:function(){me();var e=te(te({},le),{},{companyId:Te,subjectWellId:We,selectedWellIds:Ne.map((function(e){return e.id})),filters:Oe,metricsKeys:Tt,wellSection:He,isSynced:Gt,mapHidden:Se,filterExpanded:ge});ce(e,Ne)},children:["Select (",qt,")"]})]})]}),children:Qt?v(A,{fullscreen:!1}):h("div",{className:p(U.contentWrapper),ref:lt,children:[mt===z.mobile&&h(g,{children:[h("div",{className:p(U.countContainer,t({},U.countContainerMobile,mt===z.mobile)),children:[v(y,{className:U.totalLabel,children:"Total:"}),v(y,{"data-testid":"".concat(oe,"_totalWells"),className:U.countValue,children:xt.length}),v(y,{className:U.selectedLabel,children:"Selected:"}),v(y,{"data-testid":"".concat(oe,"_selected"),className:U.countValue,children:qt}),mt===z.mobile&&(pe||Ct)&&v($,{isWDUser:re,isViewOnly:pe,maxOffsetwellNumber:be-1,selectedCount:qt,viewType:mt,maxOffsetSize:de})]}),mt!==z.mobile&&h(g,{children:[Ct&&v(f,{"data-testid":"".concat(oe,"_no more"),className:U.viewOnlyTitleLabel,children:"This app supports no more than (".concat(de,") offset wells at a time.")}),pe&&mt!==z.mobile&&v(f,{"data-testid":"".concat(oe,"_viewOnly"),className:U.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the ".concat(re?"Offset Well Selection app.":"Wellhub.")})]})]}),mt===z.normal&&v(M,{isViewOnly:pe,viewType:mt,filters:Oe,setFilters:we,isFilterExpanded:ge,setIsFilterExpanded:Ae,isMapHidden:Se,setIsMapHidden:Ie}),ft&&v("div",{className:U.topGradient,style:{top:bt}}),h("div",{className:p(U.content,t({},U.contentMobile,mt===z.mobile)),onScroll:function(e){return function(e){e.target&&(tt&&(e.target.scrollLeft=0,ot(!1)),e.target.scrollLeft<=5&&$t&&eo(!1),e.target.scrollLeft>5&&!$t&&eo(!0),e.target.scrollTop<=5&&ft&&jt(!1),e.target.scrollTop>5&&!ft&&jt(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight)>=e.target.scrollHeight&&io<Mt.length&&ro((function(e){return e+G})))}(e)},children:[mt!==z.normal&&v(M,{isViewOnly:pe,viewType:mt,filters:Oe,setFilters:we,isFilterExpanded:ge,setIsFilterExpanded:Ae,isMapHidden:Se,setIsMapHidden:Ie}),!Se&&ie&&v(k,{isViewOnly:pe,mapHidden:Se,companyId:Te,subjectWell:_e,offsetWellIds:Ne.map((function(e){return e.id})),wells:xt,radius:Oe[q.radius],handleChanageOffsetWell:Ut,activeWellId:je,viewType:mt}),v(N,{isHidden:!ge,isWDUser:re,filterOptions:Pt,filters:Oe,wellSections:yt,selectedWellSection:He,subjectWell:_e,onChangeFilters:we,onChangeBicWells:Kt}),v(R,{open:ie,isTableLoading:Ge,companyId:Te,subjectWellId:We,sortBy:Ht,setSortBy:Lt,sortDirection:Ft,setSortDirection:Vt,columnsWithDict:Ot,wells:lo,metricsKeys:Tt,setMetricsKeys:Rt,handleChanageOffsetWell:Ut,handleChangeAllOffsetWells:_t,handleAddRemoveAssets:Nt,isWellNameExpand:Xe,setIsWellNameExpand:Ye,isHscrollMoved:$t,onHideAdvancedSearch:kt,isViewOnly:pe,isLastWell:Mt.length<=io,contentRef:lt,isLimitedOffsetwells:nt,tableTop:vt,wellSections:yt,setActiveWellId:Ce,viewType:mt})]})]})})};ie.propTypes={isWDUser:a.bool,defaultSubjectWell:a.shape({asset_id:a.number,companyId:a.number}),offsetSettings:a.shape({selectedWellIds:a.arrayOf(a.number),manualWellIds:a.arrayOf(a.number),filters:a.shape({}),metricsKeys:a.arrayOf(a.string),wellSection:a.string,companyId:a.number,subjectWellId:a.number,mapHidden:a.bool,filterExpanded:a.bool,hintPopupClosed:a.bool}),currentUser:a.shape({company_id:a.number}).isRequired,open:a.bool.isRequired,addWellsUsabilityInfo:a.func,isViewOnly:a.bool,onSave:a.func.isRequired,onClose:a.func.isRequired,maxOffsetSize:a.number},ie.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:J};export{ie as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import{useState as i,useMemo as r,useRef as n,useEffect as s,useCallback as l}from"react";import a from"prop-types";import p from"classnames";import{uniqBy as m,isEmpty as c,sortBy as d,isEqual as u}from"lodash";import{Typography as f}from"@material-ui/core";import{Replay as j,InfoOutlined as C}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"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import{jsx as v,jsxs as h,Fragment as g}from"react/jsx-runtime";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/AppContext.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import A from"../LoadingIndicator/LoadingIndicator.js";import{Regular12 as y}from"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.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"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.js";import"../Chart/components/AxisDropdown.js";import"../Chart/components/buttons/DragToZoomButton.js";import"../Chart/components/buttons/ZoomInButton.js";import"../Chart/components/buttons/ZoomOutButton.js";import"../Chart/components/buttons/PanButton.js";import"../Chart/components/buttons/ResetZoomButton.js";import"../Chart/components/buttons/HideAxesButton.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../AdvancedSlider/AdvancedSlider.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import D 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"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../clients/jsonApi/index.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellMap/OffsetWellMap.js";import"../Notifications/Notifications.js";import"uuid";import"../Toaster/Toaster.js";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"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import{Tooltip as S}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"../HelpCenter/HelpCenterIcon.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../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 I from"../../styles/typography/index.js";import"../../styles/counter/counter.module.scss.js";import{isMobileDetected as W,isNativeDetected as T}from"../../utils/mobileDetect.js";import{useFetchWells as x}from"./effects/useFetchWells.js";import{useAdvancedWells as P}from"./effects/useAdvancedWells.js";import{useBicWells as O}from"./effects/useBicWells.js";import{useCompanyMetricKey as w}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as E}from"./effects/useFilterOptions.js";import{useFilteredWells as B}from"./effects/useFilteredWells.js";import{useSortedWells as H}from"./effects/useSortedWells.js";import{useRadiusWells as L}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as F}from"./effects/useTableColumns.js";import{AppHeader as V}from"./components/AppHeader/AppHeader.js";import{Toolbar as M}from"./components/Toolbar/Toolbar.js";import{Filter as N}from"./components/Filter/Filter.js";import{WellsMap as k}from"./components/Map/WellsMap.js";import R from"./components/OffsetWellsTable/OffsetWellsTable.js";import U from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as _,ViewType as z,ColumnType as K,FilterType as q,ROWS_PER_PAGE as G,LEAVE_TOUCH_DELAY as Z,MAX_OFFSET_SIZE as J,SMALL_SCREEN_WIDTH as Q,SMALL_SCREEN_HEIGHT as X}from"./constants.js";import{SEARCH_CATEGORIES as Y}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";import{CustomInfoIcon as $}from"./components/CustomInfoIcon/CustomInfoIcon.js";function ee(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function te(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ee(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var oe="OffsetWellPickerV4",ie=function(a){var J,ee,ie=a.open,re=a.isWDUser,ne=a.defaultSubjectWell,se=a.currentUser,le=a.offsetSettings,ae=a.addWellsUsabilityInfo,pe=a.isViewOnly,me=a.onClose,ce=a.onSave,de=a.maxOffsetSize,ue=i(null),fe=o(ue,2),je=fe[0],Ce=fe[1],be=r((function(){return de+1}),[de]),ve=i(null==le?void 0:le.filterExpanded),he=o(ve,2),ge=he[0],Ae=he[1],ye=i(null==le?void 0:le.mapHidden),De=o(ye,2),Se=De[0],Ie=De[1],We=+(null==ne?void 0:ne.companyId)||+(null==se?void 0:se.company_id),Te=null==ne?void 0:ne.asset_id,xe=i((null==le?void 0:le.filters)||{}),Pe=o(xe,2),Oe=Pe[0],we=Pe[1],Ee=i((null==le?void 0:le.wellSection)||_),Be=o(Ee,2),He=Be[0],Le=Be[1],Fe=n(!0),Ve=i([]),Me=o(Ve,2),Ne=Me[0],ke=Me[1],Re=i(null),Ue=o(Re,2),_e=Ue[0],ze=Ue[1],Ke=i(!0),qe=o(Ke,2),Ge=qe[0],Ze=qe[1],Je=i(!1),Qe=o(Je,2),Xe=Qe[0],Ye=Qe[1],$e=i(!1),et=o($e,2),tt=et[0],ot=et[1],it=i(!1),rt=o(it,2),nt=rt[0],st=rt[1],lt=n(),at=i(z.none),pt=o(at,2),mt=pt[0],ct=pt[1],dt=i(!1),ut=o(dt,2),ft=ut[0],jt=ut[1],Ct=r((function(){return be&&be<=Ne.length}),[Ne]),bt=r((function(){return mt===z.small?0:mt===z.mobile?52:48}),[Ct,mt]);s((function(){function e(){window.innerWidth<=Q||W||T?ct(z.mobile):window.innerHeight<=X?ct(z.small):ct(z.normal)}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[ie]),s((function(){Fe.current=!0}),[Te,null==le?void 0:le.selectedWellIds]),s((function(){mt===z.small||mt===z.mobile?(Ie(!0),Ae(!1)):(Ae(!pe&&(null==le?void 0:le.filterExpanded)),Ie(!pe&&(null==le?void 0:le.mapHidden))),we((null==le?void 0:le.filters)||{}),Le((null==le?void 0:le.wellSection)||_)}),[le,pe,mt]);var vt=x(We,ae),ht=O(re,Te),gt=o(ht,2),At=gt[0],yt=gt[1],Dt=w(We,null==le?void 0:le.metricsKeys),St=o(Dt,2),It=St[0],Wt=St[1],Tt=P(We,vt,At,yt,Te,It),xt=E(Tt);s((function(){if(Tt&&At){var e=Tt.find((function(e){return e.id===Te}));if(e){var o=At.filter((function(e){return e.value!==_})).map((function(e){return e.label})),i=te(te({},e),o.length>0&&t({},K.wellSection,o));ze(i)}else ze(null)}}),[At,Tt]);var Pt=F(It),Ot=B(Tt,Oe);s((function(){if(Ot)if(Fe.current){var e=Tt.filter((function(e){return((null==le?void 0:le.selectedWellIds)||[]).includes(e.id)}));_e&&(e=e.concat(_e)),ke(m(e,"id")),Fe.current=!1}else ke((function(e){var t=(Ot||[]).filter((function(t){return!!e.find((function(e){var o=e.id;return t.id===o}))}));return _e&&(t=t.concat(_e)),m(t,"id")}))}),[Tt,Ot,null==le?void 0:le.selectedWellIds]);var wt=H(_e,Ot,Ne,Ze,Fe.current),Et=o(wt,5),Bt=Et[0],Ht=Et[1],Lt=Et[2],Ft=Et[3],Vt=Et[4];L(Oe[q.radius],Ot,ke,be);var Mt=l((function(e,t,o){var i;i=o===Y.well.name?t:t.reduce((function(e,t){var o,i=null===(o=Tt.find((function(e){return e.id===t})))||void 0===o?void 0:o.rigName,r=Tt.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(r)}),[]);var r=Tt.filter((function(e){var t=e.id;return i.includes(t)}));ke(e?function(e){return m(e.concat(r),"id")}:function(e){return m(e.filter((function(e){var t=e.id;return!r.find((function(e){return e.id===t}))})))})}),[Tt]),Nt=l((function(){ot(!0)}),[]),kt=l((function(e){Wt(e)}),[]),Rt=l((function(t,o){ke(o?function(o){return[].concat(e(o),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),Ut=l((function(e){if(e){var t=_e?Ot.concat(_e):Ot,o=m(t,"id");ke(o)}else ke(_e?[_e]:[])}),[Ot,_e]),_t=function(e){if(c(yt))ke(_e?[_e]:[]);else{var t=Tt.filter((function(t){return yt[e].includes(t.id)}));ke(t)}},zt=l((function(e){Le(e),_t(e)}),[_t]),Kt=r((function(){return Ne.find((function(e){return e.id===Te}))?Ne.length-1:Ne.length}),[Ne,Te]),qt=r((function(){if(!yt)return!1;var e=Ne.map((function(e){return e.id})),t=yt[He]||[];return(be&&t.length>be?be:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[yt,ne,Ne,He]),Gt=function(){var e=(Tt||[]).filter((function(e){return((null==le?void 0:le.selectedWellIds)||[]).includes(e.id)}));_e&&(e=e.concat(_e)),ke(m(e,"id")),u(Oe,le.filters)||(Fe.current=!0);var t=te(te({},le),{},{mapHidden:Se,filterExpanded:ge});ce(t),we((null==le?void 0:le.filters)||{}),Le((null==le?void 0:le.wellSection)||_),me()},Zt=r((function(){return!qt||(!(c(Oe)||!Oe[q.sideTracks])||He!==_)}),[qt,Oe,He]);s((function(){if(!be||be>Ne.length)st(!1);else if(be<Ne.length){var e=d(Ne,"distance");ke(e.slice(0,be))}else be===Ne.length&&st(!0)}),[Ne,be]);var Jt=!Tt||!At||!Vt||mt===z.none,Qt=i(!1),Xt=o(Qt,2),Yt=Xt[0],$t=Xt[1],eo=i(G),to=o(eo,2),oo=to[0],io=to[1],ro=i([]),no=o(ro,2),so=no[0],lo=no[1];s((function(){if(Vt){var e=Vt.slice(0,oo);lo(e)}}),[Vt,oo,_e]);return v(b,{open:ie,onClose:Gt,title:v(V,{isWDUser:re,viewType:mt,totalCount:null!==(J=null==Tt?void 0:Tt.length)&&void 0!==J?J:0,selectedCount:Kt,isViewOnly:pe,maxOffsetwellNumber:be,maxOffsetSize:de}),isMobile:mt===z.mobile,contentContainerClassName:p(U.offsetWellDialog,t({},U.offsetWellDialogMobile,mt===z.mobile)),contentClassName:p(U.contentContainer,(ee={},t(ee,U.smallContainer,mt===z.small),t(ee,U.contentContainerMobile,mt===z.mobile),ee)),actionsClassName:p(U.modalActions,t({},U.modalActionsMobile,mt===z.mobile)),actions:!pe&&h("div",{className:U.actionsWrapper,children:[!Jt&&Zt?v(S,{placement:"bottom-start",title:"Reset to Synced Offsets in ".concat(re?"Offset App":"Wellhub"),children:v("div",{children:v(D,{"data-testid":"".concat(oe,"_reset"),onClick:function(){we({}),Le(_),_t(_)},color:"primary",startIcon:mt!==z.mobile&&v(j,{}),classes:mt===z.mobile&&{root:U.resetButtonMobile},children:mt!==z.mobile?"Reset":v(j,{})})})}):v("div",{className:mt===z.mobile&&U.infoIconContainer,children:mt!==z.mobile?h(g,{children:[v("span",{className:p(I.regular12,I.colors.t6),children:"The offset list is being automatically populated by "}),v("span",{className:p(I.medium12,I.colors.t6),children:re?"Offset Selection App.":"WellHub."})]}):v(S,{title:h("div",{children:[v("span",{className:p(I.regular12,I.colors.t1),children:"The offset list is being automatically populated by "}),v("span",{className:p(I.medium12,I.colors.t1),children:re?"Offset Selection App.":"WellHub."})]}),enterTouchDelay:0,leaveTouchDelay:Z,children:v(C,{className:U.infoIcon})})}),h("div",{className:U.buttonGap,children:[v(D,{"data-testid":"".concat(oe,"_cancel"),onClick:Gt,color:"primary",children:"Cancel"}),h(D,{"data-testid":"".concat(oe,"_selectedWells"),variant:"contained",color:"primary",onClick:function(){me();var e=te(te({},le),{},{companyId:We,subjectWellId:Te,selectedWellIds:Ne.map((function(e){return e.id})),filters:Oe,metricsKeys:It,wellSection:He,isSynced:qt,mapHidden:Se,filterExpanded:ge});ce(e,Ne)},children:["Select (",Kt,")"]})]})]}),children:Jt?v(A,{fullscreen:!1}):h("div",{className:p(U.contentWrapper),ref:lt,children:[mt===z.mobile&&h(g,{children:[h("div",{className:p(U.countContainer,t({},U.countContainerMobile,mt===z.mobile)),children:[v(y,{className:U.totalLabel,children:"Total:"}),v(y,{"data-testid":"".concat(oe,"_totalWells"),className:U.countValue,children:Tt.length}),v(y,{className:U.selectedLabel,children:"Selected:"}),v(y,{"data-testid":"".concat(oe,"_selected"),className:U.countValue,children:Kt}),mt===z.mobile&&(pe||Ct)&&v($,{isWDUser:re,isViewOnly:pe,maxOffsetwellNumber:be-1,selectedCount:Kt,viewType:mt,maxOffsetSize:de})]}),mt!==z.mobile&&h(g,{children:[Ct&&v(f,{"data-testid":"".concat(oe,"_no more"),className:U.viewOnlyTitleLabel,children:"This app supports no more than (".concat(de,") offset wells at a time.")}),pe&&mt!==z.mobile&&v(f,{"data-testid":"".concat(oe,"_viewOnly"),className:U.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the ".concat(re?"Offset Well Selection app.":"Wellhub.")})]})]}),mt===z.normal&&v(M,{isViewOnly:pe,viewType:mt,filters:Oe,setFilters:we,isFilterExpanded:ge,setIsFilterExpanded:Ae,isMapHidden:Se,setIsMapHidden:Ie}),ft&&v("div",{className:U.topGradient,style:{top:bt}}),h("div",{className:p(U.content,t({},U.contentMobile,mt===z.mobile)),onScroll:function(e){return function(e){e.target&&(tt&&(e.target.scrollLeft=0,ot(!1)),e.target.scrollLeft<=5&&Yt&&$t(!1),e.target.scrollLeft>5&&!Yt&&$t(!0),e.target.scrollTop<=5&&ft&&jt(!1),e.target.scrollTop>5&&!ft&&jt(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight+2)>=e.target.scrollHeight&&oo<Vt.length&&io((function(e){return e+G})))}(e)},children:[mt!==z.normal&&v(M,{isViewOnly:pe,viewType:mt,filters:Oe,setFilters:we,isFilterExpanded:ge,setIsFilterExpanded:Ae,isMapHidden:Se,setIsMapHidden:Ie}),!Se&&ie&&v(k,{isViewOnly:pe,mapHidden:Se,companyId:We,subjectWell:_e,offsetWellIds:Ne.map((function(e){return e.id})),wells:Tt,radius:Oe[q.radius],handleChanageOffsetWell:Rt,activeWellId:je,viewType:mt}),v(N,{isHidden:!ge,isWDUser:re,filterOptions:xt,filters:Oe,wellSections:At,selectedWellSection:He,subjectWell:_e,onChangeFilters:we,onChangeBicWells:zt}),v(R,{open:ie,isTableLoading:Ge,companyId:We,subjectWellId:Te,sortBy:Bt,setSortBy:Ht,sortDirection:Lt,setSortDirection:Ft,columnsWithDict:Pt,wells:so,metricsKeys:It,setMetricsKeys:kt,handleChanageOffsetWell:Rt,handleChangeAllOffsetWells:Ut,handleAddRemoveAssets:Mt,isWellNameExpand:Xe,setIsWellNameExpand:Ye,isHscrollMoved:Yt,onHideAdvancedSearch:Nt,isViewOnly:pe,isLastWell:Vt.length<=oo,contentRef:lt,isLimitedOffsetwells:nt,wellSections:At,setActiveWellId:Ce,viewType:mt})]})]})})};ie.propTypes={isWDUser:a.bool,defaultSubjectWell:a.shape({asset_id:a.number,companyId:a.number}),offsetSettings:a.shape({selectedWellIds:a.arrayOf(a.number),manualWellIds:a.arrayOf(a.number),filters:a.shape({}),metricsKeys:a.arrayOf(a.string),wellSection:a.string,companyId:a.number,subjectWellId:a.number,mapHidden:a.bool,filterExpanded:a.bool,hintPopupClosed:a.bool}),currentUser:a.shape({company_id:a.number}).isRequired,open:a.bool.isRequired,addWellsUsabilityInfo:a.func,isViewOnly:a.bool,onSave:a.func.isRequired,onClose:a.func.isRequired,maxOffsetSize:a.number},ie.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:J};export{ie as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: import("react").MemoExoticComponent<{
|
|
2
|
-
({ open, isTableLoading, companyId, subjectWellId, sortBy, setSortBy, sortDirection, setSortDirection, columnsWithDict, wells, metricsKeys, setMetricsKeys, handleChanageOffsetWell, handleChangeAllOffsetWells, handleAddRemoveAssets, isWellNameExpand, setIsWellNameExpand, isHscrollMoved, onHideAdvancedSearch, isViewOnly, isLastWell, contentRef, isLimitedOffsetwells,
|
|
2
|
+
({ open, isTableLoading, companyId, subjectWellId, sortBy, setSortBy, sortDirection, setSortDirection, columnsWithDict, wells: updatedWells, metricsKeys, setMetricsKeys, handleChanageOffsetWell, handleChangeAllOffsetWells, handleAddRemoveAssets, isWellNameExpand, setIsWellNameExpand, isHscrollMoved, onHideAdvancedSearch, isViewOnly, isLastWell, contentRef, isLimitedOffsetwells, wellSections, setActiveWellId, viewType, }: {
|
|
3
3
|
open: any;
|
|
4
4
|
isTableLoading: any;
|
|
5
5
|
companyId: any;
|
|
@@ -23,7 +23,6 @@ declare const _default: import("react").MemoExoticComponent<{
|
|
|
23
23
|
isLastWell: any;
|
|
24
24
|
contentRef: any;
|
|
25
25
|
isLimitedOffsetwells: any;
|
|
26
|
-
tableTop: any;
|
|
27
26
|
wellSections: any;
|
|
28
27
|
setActiveWellId: any;
|
|
29
28
|
viewType: any;
|
|
@@ -52,7 +51,6 @@ declare const _default: import("react").MemoExoticComponent<{
|
|
|
52
51
|
isLastWell: PropTypes.Validator<boolean>;
|
|
53
52
|
isLimitedOffsetwells: PropTypes.Validator<boolean>;
|
|
54
53
|
contentRef: PropTypes.Validator<NonNullable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>>;
|
|
55
|
-
tableTop: PropTypes.Validator<number>;
|
|
56
54
|
wellSections: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
|
|
57
55
|
setActiveWellId: PropTypes.Validator<(...args: any[]) => any>;
|
|
58
56
|
viewType: PropTypes.Validator<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{memo as r,useRef as i,useMemo as o,useEffect as s,useCallback as n}from"react";import p from"classnames";import a from"prop-types";import{Table as l,TableHead as m,TableBody as d,TableRow as c,TableCell as u}from"@material-ui/core";import{jsx as j,jsxs as C,Fragment as f}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";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"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.js";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../DevCenter/AppContext.js";import"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import h from"../../../LoadingIndicator/LoadingIndicator.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"lodash";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"../../../Chart/components/ChartButton.js";import"../../../Chart/components/ChartButtons.js";import"../../../Chart/components/ChartWrapper.js";import"../../../Chart/components/AxisDropdown.js";import"../../../Chart/components/buttons/DragToZoomButton.js";import"../../../Chart/components/buttons/ZoomInButton.js";import"../../../Chart/components/buttons/ZoomOutButton.js";import"../../../Chart/components/buttons/PanButton.js";import"../../../Chart/components/buttons/ResetZoomButton.js";import"../../../Chart/components/buttons/HideAxesButton.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../AdvancedSlider/AdvancedSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/index.js";import"../../../ContextMenuItem/index.js";import"../../../FolderMenuItem/index.js";import"../../../EditableItem/EditableItem/index.js";import"../../../EditableItem/EditableItemWithBadge/index.js";import"../../../Checkbox/index.js";import"../../../FolderMenuItemWithLinks/index.js";import"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../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"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../../clients/jsonApi/index.js";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../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"../../../OffsetWellMap/OffsetWellMap.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../Toaster/Toaster.js";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"../../../Table/TableContainer/TableContainer.js";import"../../../Table/TableCell/TableCell.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"../../../HelpCenter/HelpCenterIcon.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 A}from"./AdvancedSearch/AdvancedSearch.js";import b from"./OffsetWellsTableHead.js";import v from"./OffsetWellsTableRow.js";import{METRICS_LIST as D,EXPANED_WELLNAME_WIDTH as g,TableColumns as S,ROW_HEIGHT as y,ViewType as T}from"../../constants.js";import x from"./OffsetWellsTable.module.css.js";import{getIsImperial as I}from"../../utils/unitSystem.js";var P=function(r){var a,P=r.open,W=r.isTableLoading,w=r.companyId,E=r.subjectWellId,R=r.sortBy,B=r.setSortBy,O=r.sortDirection,L=r.setSortDirection,F=r.columnsWithDict,k=r.wells,q=r.metricsKeys,V=r.setMetricsKeys,N=r.handleChanageOffsetWell,H=r.handleChangeAllOffsetWells,M=r.handleAddRemoveAssets,K=r.isWellNameExpand,Z=r.setIsWellNameExpand,z=r.isHscrollMoved,U=r.onHideAdvancedSearch,G=r.isViewOnly,J=r.isLastWell,Q=r.contentRef,X=r.isLimitedOffsetwells,Y=r.tableTop,$=r.wellSections,_=r.setActiveWellId,ee=r.viewType,te=i(),re=i(),ie=o((function(){var e=k.filter((function(e){return e.checked}));return[e,k.length!==e.length&&e.length&&!X,e.length===k.length||X]}),[k,X]),oe=t(ie,3),se=oe[0],ne=oe[1],pe=oe[2],ae=o((function(){return I()}),[]),le=o((function(){return(q||[]).reduce((function(e,t){return e.concat(D.filter((function(e){return e.key===t})))}),[])}),[q]),me=o((function(){return K?g-58:S[0].width[q.length]-58}),[K,null==q?void 0:q.length]),de=o((function(){return se.length*y}),[se]);s((function(){if(ee!==T.mobile){var e=te.current.querySelector(".".concat(x.wellNameFixed));z?e.classList.remove(x.noShadow):e.classList.add(x.noShadow);var t=re.current.querySelectorAll(".".concat(x.wellNameFixed));z?t.forEach((function(e){return e.classList.remove(x.noShadow)})):t.forEach((function(e){return e.classList.add(x.noShadow)}))}}),[z,re.current,te.current,k]);var ce=n((function(e,t){B(e),L(t)}),[]),ue=n((function(e){V(e)}),[]),je=n((function(e,t){V((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return W?j(h,{fullscreen:!1}):F&&k?C(f,{children:[j("div",{className:x.stickyTable,children:j(l,{"aria-label":"ows table head",innerRef:te,children:j(m,{children:j(b,{open:P,columnsWithDict:F,metricsKeys:q,sortBy:R,sortDirection:O,indeterminate:ne,isAllWellsSelected:pe,onChangeSort:ce,onChangeMetricsKeys:ue,onUpdateMetricsKey:je,isWellNameExpand:K,setIsWellNameExpand:Z,handleChangeAllOffsetWells:H,wellNameStyle:x.wellNameFixed,isViewOnly:G,isImperial:ae,contentRef:Q,viewType:ee})})})}),!G&&j("div",{className:x.searchCell,children:j(A,{companyId:w,subjectWellId:E,wells:k,onChange:M,selectedWellIds:se.map((function(e){return e.id})),onHideAdvancedSearch:U,width:null===(a=Q.current)||void 0===a?void 0:a.getBoundingClientRect().width})}),j(l,{"aria-label":"ows table body",innerRef:re,className:x.bodyTable,children:C(d,{children:[j(c,{children:j(u,{className:p(x.topShadow,e({},x.viewOnlyShadow,G))})}),k.map((function(e){return j(v,{columnsWithDict:F,subjectWellId:E,data:e,metricsKeys:q,metricsColumns:le,handleChanageOffsetWell:N,isWellNameExpand:K,wellNameStyle:x.wellNameFixed,wellNameWidth:me,isViewOnly:G,isImperial:ae,isLimitedOffsetwells:X,flyTo:de,tableTop:Y,wellSections:$,setActiveWellId:_,viewType:ee},e.id)})),!J&&j(c,{children:j(u,{className:x.loadingCell,children:j("span",{children:"Loading..."})})}),j(c,{children:j(u,{className:x.bottomShadow})})]})})]}):null};P.propTypes={open:a.bool.isRequired,isTableLoading:a.bool.isRequired,companyId:a.number.isRequired,subjectWellId:a.number.isRequired,sortBy:a.string.isRequired,setSortBy:a.func.isRequired,sortDirection:a.string.isRequired,setSortDirection:a.func.isRequired,columnsWithDict:a.arrayOf(a.shape({})).isRequired,wells:a.arrayOf(a.shape({})).isRequired,metricsKeys:a.arrayOf(a.string).isRequired,setMetricsKeys:a.func.isRequired,handleChanageOffsetWell:a.func.isRequired,handleChangeAllOffsetWells:a.func.isRequired,handleAddRemoveAssets:a.func.isRequired,setIsWellNameExpand:a.func.isRequired,isWellNameExpand:a.bool.isRequired,isHscrollMoved:a.bool.isRequired,onHideAdvancedSearch:a.func.isRequired,isViewOnly:a.bool.isRequired,isLastWell:a.bool.isRequired,isLimitedOffsetwells:a.bool.isRequired,contentRef:a.shape().isRequired,tableTop:a.number.isRequired,wellSections:a.arrayOf(a.shape({})).isRequired,setActiveWellId:a.func.isRequired,viewType:a.string.isRequired};var W=r(P);export{W as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as r,useState as i,useRef as o,useEffect as n,useMemo as s,useCallback as a,Fragment as p}from"react";import l from"classnames";import m from"prop-types";import{Table as d,TableHead as c,TableBody as u,TableRow as j,TableCell as C}from"@material-ui/core";import{jsx as f,jsxs as h,Fragment as v}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";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"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.js";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../DevCenter/AppContext.js";import"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import b from"../../../LoadingIndicator/LoadingIndicator.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"lodash";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"../../../Chart/components/ChartButton.js";import"../../../Chart/components/ChartButtons.js";import"../../../Chart/components/ChartWrapper.js";import"../../../Chart/components/AxisDropdown.js";import"../../../Chart/components/buttons/DragToZoomButton.js";import"../../../Chart/components/buttons/ZoomInButton.js";import"../../../Chart/components/buttons/ZoomOutButton.js";import"../../../Chart/components/buttons/PanButton.js";import"../../../Chart/components/buttons/ResetZoomButton.js";import"../../../Chart/components/buttons/HideAxesButton.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../AdvancedSlider/AdvancedSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/index.js";import"../../../ContextMenuItem/index.js";import"../../../FolderMenuItem/index.js";import"../../../EditableItem/EditableItem/index.js";import"../../../EditableItem/EditableItemWithBadge/index.js";import"../../../Checkbox/index.js";import"../../../FolderMenuItemWithLinks/index.js";import"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../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"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../../clients/jsonApi/index.js";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../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"../../../OffsetWellMap/OffsetWellMap.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../Toaster/Toaster.js";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"../../../Table/TableContainer/TableContainer.js";import"../../../Table/TableCell/TableCell.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"../../../HelpCenter/HelpCenterIcon.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 A}from"./AdvancedSearch/AdvancedSearch.js";import g from"./OffsetWellsTableHead.js";import D from"./OffsetWellsTableRow.js";import{METRICS_LIST as y,EXPANED_WELLNAME_WIDTH as S,TableColumns as T,ViewType as x,ROW_HEIGHT as P}from"../../constants.js";import I from"./OffsetWellsTable.module.css.js";import{getIsImperial as w}from"../../utils/unitSystem.js";function W(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 O(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?W(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):W(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var E=function(r){var m,W=r.open,E=r.isTableLoading,B=r.companyId,R=r.subjectWellId,L=r.sortBy,k=r.setSortBy,M=r.sortDirection,F=r.setSortDirection,q=r.columnsWithDict,V=r.wells,N=r.metricsKeys,H=r.setMetricsKeys,K=r.handleChanageOffsetWell,Z=r.handleChangeAllOffsetWells,z=r.handleAddRemoveAssets,U=r.isWellNameExpand,G=r.setIsWellNameExpand,J=r.isHscrollMoved,Q=r.onHideAdvancedSearch,X=r.isViewOnly,Y=r.isLastWell,$=r.contentRef,_=r.isLimitedOffsetwells,ee=r.wellSections,te=r.setActiveWellId,re=r.viewType,ie=i([]),oe=e(ie,2),ne=oe[0],se=oe[1],ae=i(null),pe=e(ae,2),le=pe[0],me=pe[1],de=i(0),ce=e(de,2),ue=ce[0],je=ce[1],Ce=i(0),fe=e(Ce,2),he=fe[0],ve=fe[1],be=o(),Ae=o(),ge=o();n((function(){if(!le)return se(V),void ve(0);var t=function(e,t,r,i){var o,n=e.findIndex((function(e){return t===e.id})),s=r.findIndex((function(e){return t===e.id}));-1===s&&(s=r.length);var a=Math.round(((null===(o=i.current)||void 0===o?void 0:o.clientHeight)-145)/P+1),p=s-n;Math.abs(p)>a&&(s=n+a*Math.sign(p));var l=s-n;return[n,s,l,200*(.4*Math.abs(l)+2),Math.min(n,s),(Math.abs(l)+1)*P]}(ne,le,V,$),r=e(t,6),i=r[0],o=r[1],n=r[2],s=r[3],a=r[4],p=r[5];if(ge.current=s,o===i)se(V);else{je(a),ve(p);var l=function(e,t,r,i){return e.map((function(e,o){var n=r<o&&o<=i||i<=o&&o<r;return o===r?O(O({},e),{},{moveTo:t}):n?O(O({},e),{},{moveTo:r<i?-1:1,delayTime:Math.abs(o-r)}):e}))}(ne,n,i,o);se(l),setTimeout((function(){se(V),ve(0),me(null)}),s)}}),[V]);var De=s((function(){var e=ne.filter((function(e){return e.checked}));return[e,ne.length!==e.length&&e.length&&!_,e.length===ne.length||_]}),[ne,_]),ye=e(De,3),Se=ye[0],Te=ye[1],xe=ye[2],Pe=s((function(){return w()}),[]),Ie=s((function(){return(N||[]).reduce((function(e,t){return e.concat(y.filter((function(e){return e.key===t})))}),[])}),[N]),we=s((function(){return U?S-58:T[0].width[N.length]-58}),[U,null==N?void 0:N.length]);n((function(){if(re!==x.mobile){var e=be.current.querySelector(".".concat(I.wellNameFixed));J?e.classList.remove(I.noShadow):e.classList.add(I.noShadow);var t=Ae.current.querySelectorAll(".".concat(I.wellNameFixed));J?t.forEach((function(e){return e.classList.remove(I.noShadow)})):t.forEach((function(e){return e.classList.add(I.noShadow)}))}}),[J,Ae.current,be.current,ne]);var We=a((function(e,t){k(e),F(t)}),[]),Oe=a((function(e){H(e)}),[]),Ee=a((function(e,t){H((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return E?f(b,{fullscreen:!1}):q&&ne?h(v,{children:[f("div",{className:I.stickyTable,children:f(d,{"aria-label":"ows table head",innerRef:be,children:f(c,{children:f(g,{open:W,columnsWithDict:q,metricsKeys:N,sortBy:L,sortDirection:M,indeterminate:Te,isAllWellsSelected:xe,onChangeSort:We,onChangeMetricsKeys:Oe,onUpdateMetricsKey:Ee,isWellNameExpand:U,setIsWellNameExpand:G,handleChangeAllOffsetWells:Z,wellNameStyle:I.wellNameFixed,isViewOnly:X,isImperial:Pe,contentRef:$,viewType:re})})})}),!X&&f("div",{className:I.searchCell,children:f(A,{companyId:B,subjectWellId:R,wells:ne,onChange:z,selectedWellIds:Se.map((function(e){return e.id})),onHideAdvancedSearch:Q,width:null===(m=$.current)||void 0===m?void 0:m.getBoundingClientRect().width})}),f(d,{"aria-label":"ows table body",innerRef:Ae,className:I.bodyTable,children:h(u,{children:[f(j,{children:f(C,{className:l(I.topShadow,t({},I.viewOnlyShadow,X))})}),ne.map((function(e,t){return h(p,{children:[f(j,{children:le&&he>0&&t===ue&&f(C,{style:{height:he}})}),f(D,{columnsWithDict:q,subjectWellId:R,data:e,metricsKeys:N,metricsColumns:Ie,handleChanageOffsetWell:K,isWellNameExpand:U,wellNameStyle:I.wellNameFixed,wellNameWidth:we,isViewOnly:X,isImperial:Pe,isLimitedOffsetwells:_,wellSections:ee,setActiveWellId:te,viewType:re,newCheckedWellId:null!=e&&e.moveTo?le:0,setNewCheckedWellId:me,index:null!=e&&e.moveTo?t:0,flyDuration:null!=e&&e.moveTo?ge.current:0})]},e.id)})),!Y&&f(j,{children:f(C,{className:I.loadingCell,children:f("span",{children:"Loading..."})})}),f(j,{children:f(C,{className:I.bottomShadow})})]})})]}):null};E.propTypes={open:m.bool.isRequired,isTableLoading:m.bool.isRequired,companyId:m.number.isRequired,subjectWellId:m.number.isRequired,sortBy:m.string.isRequired,setSortBy:m.func.isRequired,sortDirection:m.string.isRequired,setSortDirection:m.func.isRequired,columnsWithDict:m.arrayOf(m.shape({})).isRequired,wells:m.arrayOf(m.shape({})).isRequired,metricsKeys:m.arrayOf(m.string).isRequired,setMetricsKeys:m.func.isRequired,handleChanageOffsetWell:m.func.isRequired,handleChangeAllOffsetWells:m.func.isRequired,handleAddRemoveAssets:m.func.isRequired,setIsWellNameExpand:m.func.isRequired,isWellNameExpand:m.bool.isRequired,isHscrollMoved:m.bool.isRequired,onHideAdvancedSearch:m.func.isRequired,isViewOnly:m.bool.isRequired,isLastWell:m.bool.isRequired,isLimitedOffsetwells:m.bool.isRequired,contentRef:m.shape().isRequired,wellSections:m.arrayOf(m.shape({})).isRequired,setActiveWellId:m.func.isRequired,viewType:m.string.isRequired};var B=r(E);export{B as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: import("react").MemoExoticComponent<{
|
|
2
|
-
({ columnsWithDict, data, subjectWellId, metricsKeys, metricsColumns, handleChanageOffsetWell, isWellNameExpand, wellNameStyle, wellNameWidth, isViewOnly, isImperial, isLimitedOffsetwells,
|
|
2
|
+
({ columnsWithDict, data, subjectWellId, metricsKeys, metricsColumns, handleChanageOffsetWell, isWellNameExpand, wellNameStyle, wellNameWidth, isViewOnly, isImperial, isLimitedOffsetwells, wellSections, setActiveWellId, viewType, newCheckedWellId, setNewCheckedWellId, index, flyDuration, }: {
|
|
3
3
|
columnsWithDict: any;
|
|
4
4
|
data: any;
|
|
5
5
|
subjectWellId: any;
|
|
@@ -12,11 +12,13 @@ declare const _default: import("react").MemoExoticComponent<{
|
|
|
12
12
|
isViewOnly: any;
|
|
13
13
|
isImperial: any;
|
|
14
14
|
isLimitedOffsetwells: any;
|
|
15
|
-
flyTo: any;
|
|
16
|
-
tableTop: any;
|
|
17
15
|
wellSections: any;
|
|
18
16
|
setActiveWellId: any;
|
|
19
17
|
viewType: any;
|
|
18
|
+
newCheckedWellId: any;
|
|
19
|
+
setNewCheckedWellId: any;
|
|
20
|
+
index: any;
|
|
21
|
+
flyDuration: any;
|
|
20
22
|
}): JSX.Element;
|
|
21
23
|
propTypes: {
|
|
22
24
|
columnsWithDict: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
|
|
@@ -25,6 +27,8 @@ declare const _default: import("react").MemoExoticComponent<{
|
|
|
25
27
|
checked: PropTypes.Requireable<boolean>;
|
|
26
28
|
name: PropTypes.Requireable<string>;
|
|
27
29
|
status: PropTypes.Requireable<string>;
|
|
30
|
+
moveTo: PropTypes.Requireable<number>;
|
|
31
|
+
delayTime: PropTypes.Requireable<number>;
|
|
28
32
|
}>>>;
|
|
29
33
|
subjectWellId: PropTypes.Validator<number>;
|
|
30
34
|
metricsKeys: PropTypes.Validator<string[]>;
|
|
@@ -36,11 +40,13 @@ declare const _default: import("react").MemoExoticComponent<{
|
|
|
36
40
|
isViewOnly: PropTypes.Validator<boolean>;
|
|
37
41
|
isImperial: PropTypes.Validator<boolean>;
|
|
38
42
|
isLimitedOffsetwells: PropTypes.Validator<boolean>;
|
|
39
|
-
flyTo: PropTypes.Validator<number>;
|
|
40
|
-
tableTop: PropTypes.Validator<number>;
|
|
41
43
|
wellSections: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
|
|
42
44
|
setActiveWellId: PropTypes.Validator<(...args: any[]) => any>;
|
|
43
45
|
viewType: PropTypes.Validator<string>;
|
|
46
|
+
newCheckedWellId: PropTypes.Validator<number>;
|
|
47
|
+
setNewCheckedWellId: PropTypes.Validator<(...args: any[]) => any>;
|
|
48
|
+
index: PropTypes.Validator<number>;
|
|
49
|
+
flyDuration: PropTypes.Validator<number>;
|
|
44
50
|
};
|
|
45
51
|
}>;
|
|
46
52
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as i,useState as l,useRef as n,useCallback as a,useEffect as r,useMemo as s}from"react";import o from"prop-types";import{omit as c,startCase as d,get as m}from"lodash";import u from"classnames";import h from"moment";import{TableRow as f,TableCell as y,Checkbox as b,Tooltip as p,Typography as v}from"@material-ui/core";import{convertValue as w}from"../../../../utils/index.js";import{ColumnType as N,ROW_HEIGHT as g,ViewType as R,EXPANED_WELLNAME_WIDTH as W,LEAVE_TOUCH_DELAY as C,StatusOptions as k}from"../../constants.js";import{SubjectWellMark as T}from"./SubjectWellMark.js";import q from"./OffsetWellsTableRow.module.css.js";import x from"./ViewWellSectionsName.js";import{jsxs as D,jsx as O}from"react/jsx-runtime";var S="OffsetWellsTableRow";function j(e,t,i){var l=t.find((function(e){return e.key===i})),n=m(e,l.key);return"undefined"===n?"loading...":Number.isFinite(n)||n?l.unitType?w(n,l.unitType,l.from,l.to):n:"—"}function I(e,t){var i=m(e,N.distance);return Number.isFinite(i)?t?i:w(i,"length","mi","km"):"—"}function M(e,t){var i=e.find((function(e){return e.key===t}));return(null==i?void 0:i.width)||0}var _=function(i){var o,m,w,_=i.columnsWithDict,A=i.data,L=i.subjectWellId,Y=i.metricsKeys,z=i.metricsColumns,E=i.handleChanageOffsetWell,V=i.isWellNameExpand,F=i.wellNameStyle,K=i.wellNameWidth,P=i.isViewOnly,H=i.isImperial,B=i.isLimitedOffsetwells,G=i.wellSections,J=i.setActiveWellId,Q=i.viewType,U=i.newCheckedWellId,X=i.setNewCheckedWellId,Z=i.index,$=i.flyDuration,ee=L===A.id,te=t({},q.subjectWellRow,ee),ie=l(A.checked),le=e(ie,2),ne=le[0],ae=le[1],re=n(),se=!1,oe=A[N.name]||"—",ce=oe;if(!V&&2*K<8*oe.length){var de=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.style.whiteSpace="nowrap",t.innerHTML=e;var i=Math.ceil(t.clientWidth);return document.body.removeChild(t),i}(oe);if(de>2*K){var me=2*K/(de/oe.length);ce="".concat(oe.substring(0,me/2-2),"\n... ").concat(oe.substring(oe.length-me/2+6)),se=!0}}var ue=a((function(e,t,i,l,n){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,r=t-e;re.current.style.position="absolute",re.current.style.top="".concat(e,"px"),re.current.style.zIndex=i===l?4:3,re.current.style.transition="transform ".concat(n,"ms ease ").concat(50*a,"ms"),re.current.style.transform="translateY(".concat(r,"px)")}),[]),he=a((function(){re.current.style.position="unset",re.current.style.zIndex=1,re.current.style.transition="none",re.current.style.transform="none"}),[]),fe=a((function(e){X(A.id);var t=c(A,"moveTo");E(t,e),ae(e)}),[A,X,E]);r((function(){if(U){var e=Z*g+16;if(A.moveTo){var t=e+g*A.moveTo;ue(e,t,U,A.id,$,A.delayTime)}}else he()}),[A.moveTo,U]),r((function(){ae(A.checked)}),[A.checked]);var ye,be,pe=s((function(){return A[N.wellSection]}),[A]);return D(f,{"data-testid":"".concat(S,"_row_").concat(oe),className:u(q.bodyRow,t({},q.moveRow,1===Math.abs(A.moveTo)&&U!==A.id)),innerRef:re,onMouseEnter:function(){J(A.id)},onMouseLeave:function(){J(null)},children:[D(y,{"data-testid":"".concat(S,"_well"),className:u(q.bodyCell,q.wellNameCell,te,(o={},t(o,F,Q!==R.mobile),t(o,q.wellNameCellMobile,Q===R.mobile),o)),style:{width:V?W:M(_,N.name)},children:[ee&&O(T,{className:u(q.subjectWellMark,t({},q.subjectWellMarkMobile,Q===R.mobile))}),!ee&&O(b,{"data-testid":"".concat(S,"_checkbox"),size:"medium",checked:ne,disabled:P||B&&!A.checked,onChange:function(e){return fe(e.target.checked)}}),O(p,{title:se?oe:"",children:O(v,{variant:"body2",className:u(q.wellNameCursor,(m={},t(m,q.cellDataViewOnly,ee),t(m,q.wellNamePreWrap,se),m)),children:se?ce:oe})})]}),O(y,{"data-testid":"".concat(S,"_dot"),className:u(q.bodyCell,te),style:{width:M(_,N.status)},children:!ee&&O(p,{title:d(A[N.status]),enterTouchDelay:Q===R.mobile&&0,leaveTouchDelay:Q===R.mobile&&C,children:O("div",{className:q.statusContainer,children:O("div",{"data-testid":"".concat(S,"_color"),className:q.status,style:{background:null===(w=k.find((function(e){return e.value===A[N.status]})))||void 0===w?void 0:w.color}})})})}),O(y,{"data-testid":"".concat(S,"_rig"),className:u(q.bodyCell,te),style:{width:M(_,N.rig)},children:O(v,{variant:"body2",className:q.cellData,children:A[N.rig]&&"Null"!==A[N.rig]?A[N.rig]:"—"})}),O(y,{"data-testid":"".concat(S,"_distance"),className:u(q.bodyCell,te),style:{width:M(_,N.distance)},children:O(v,{variant:"body2",className:q.cellData,children:I(A,H)})}),O(y,{"data-testid":"".concat(S,"_lastActive"),className:u(q.bodyCell,te),style:{width:M(_,N.lastActive)},children:O(v,{variant:"body2",className:q.cellData,children:A[N.lastActive]&&Number.isFinite(A[N.lastActive])?h.unix(A[N.lastActive]).format("MM/DD/YYYY"):"—"})}),Y.map((function(e){return O(y,{"data-testid":"".concat(S,"_").concat(e),className:u(q.bodyCell,te),style:{width:M(_,e)},children:O(v,{variant:"body2",className:q.cellData,children:j(A,z,e)})},e)})),O(y,{"data-testid":"".concat(S,"_wellSection"),className:u(q.bodyCell,q.lastCell,te),style:{width:M(_,N.wellSection)},children:pe&&pe.length>1?O(p,{classes:{tooltip:q.customTooltip},title:O(x,{wellSectionNames:pe}),children:O("div",{className:q.sectionLength,children:pe.length})}):O(p,{title:pe||"",children:O(v,{variant:"body2",className:q.cellData,style:{color:pe&&1===pe.length&&(ye=pe,be=e(ye,1)[0],G.find((function(e){return e.label===be})).color)},children:pe})})})]})};_.propTypes={columnsWithDict:o.arrayOf(o.shape({})).isRequired,data:o.shape({id:o.number,checked:o.bool,name:o.string,status:o.string,moveTo:o.number,delayTime:o.number}).isRequired,subjectWellId:o.number.isRequired,metricsKeys:o.arrayOf(o.string).isRequired,metricsColumns:o.arrayOf(o.shape({})).isRequired,handleChanageOffsetWell:o.func.isRequired,isWellNameExpand:o.bool.isRequired,wellNameStyle:o.string.isRequired,wellNameWidth:o.number.isRequired,isViewOnly:o.bool.isRequired,isImperial:o.bool.isRequired,isLimitedOffsetwells:o.bool.isRequired,wellSections:o.arrayOf(o.shape({})).isRequired,setActiveWellId:o.func.isRequired,viewType:o.string.isRequired,newCheckedWellId:o.number.isRequired,setNewCheckedWellId:o.func.isRequired,index:o.number.isRequired,flyDuration:o.number.isRequired};var A=i(_);export{A as default};
|
package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.module.css.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={bodyRow:"OffsetWellsTableRow-module_bodyRow__UqDEw",bodyCell:"OffsetWellsTableRow-module_bodyCell__B-yWv",subjectWellRow:"OffsetWellsTableRow-module_subjectWellRow__x60wK",subjectWellMark:"OffsetWellsTableRow-module_subjectWellMark__S-nvA",subjectWellMarkMobile:"OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp",cellData:"OffsetWellsTableRow-module_cellData__SNLYB",cellDataViewOnly:"OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1",hoverCell:"OffsetWellsTableRow-module_hoverCell__4wFuk",wellNameCell:"OffsetWellsTableRow-module_wellNameCell__BBEf-",wellNameCellMobile:"OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm",lastCell:"OffsetWellsTableRow-module_lastCell__VEQCi",subjectWellImage:"OffsetWellsTableRow-module_subjectWellImage__IkmRP",statusContainer:"OffsetWellsTableRow-module_statusContainer__IUVWC",status:"OffsetWellsTableRow-module_status__qWj9c",customTooltip:"OffsetWellsTableRow-module_customTooltip__aeWUJ",wellNameCursor:"OffsetWellsTableRow-module_wellNameCursor__BlXVa",wellNamePreWrap:"OffsetWellsTableRow-module_wellNamePreWrap__oXXEB",sectionLength:"OffsetWellsTableRow-module_sectionLength__vxefy"};e(".OffsetWellsTableRow-module_bodyRow__UqDEw{display:flex!important;flex-direction:row!important;margin-bottom:4px!important}.OffsetWellsTableRow-module_bodyRow__UqDEw:hover .OffsetWellsTableRow-module_bodyCell__B-yWv{background:#393939}.OffsetWellsTableRow-module_subjectWellRow__x60wK{border-color:var(--palette-primary-main)!important}.OffsetWellsTableRow-module_subjectWellMark__S-nvA{left:-1px;position:absolute;top:-1px;z-index:98}.OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp{top:16px}.OffsetWellsTableRow-module_bodyCell__B-yWv{align-items:center!important;background:var(--palette-background-b-8);border-top:1px solid var(--palette-primary-text-9);display:flex!important;height:56px!important;padding:0 12px 0 0!important}.OffsetWellsTableRow-module_cellData__SNLYB{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--palette-primary-text-1);display:-webkit-box;font-size:14px;font-weight:400;line-height:20px;overflow:hidden;overflow-wrap:break-word;white-space:normal}.OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1{padding-left:12px}.OffsetWellsTableRow-module_hoverCell__4wFuk{background:var(--palette-background-b-7)!important}.OffsetWellsTableRow-module_wellNameCell__BBEf-{border-bottom-left-radius:4px;border-left:1px solid var(--palette-primary-text-9);border-top-left-radius:4px;left:0;position:sticky;z-index:2}.OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm{position:static}.OffsetWellsTableRow-module_lastCell__VEQCi{border-bottom-right-radius:4px;border-right:1px solid var(--palette-primary-text-9);border-top-right-radius:4px}.OffsetWellsTableRow-module_subjectWellImage__IkmRP{height:16px;width:16px}.OffsetWellsTableRow-module_statusContainer__IUVWC{align-items:center;display:flex;height:32px;justify-content:center;width:32px}.OffsetWellsTableRow-module_status__qWj9c{border-radius:50%;cursor:default;height:8px;width:8px}.OffsetWellsTableRow-module_customTooltip__aeWUJ{opacity:.9!important}.OffsetWellsTableRow-module_wellNameCursor__BlXVa{color:var(--palette-primary-text-1);cursor:default;white-space:normal;word-break:break-all}.OffsetWellsTableRow-module_wellNamePreWrap__oXXEB{white-space:pre}.OffsetWellsTableRow-module_sectionLength__vxefy{background:var(--palette-primary-text-9);border-radius:20px;cursor:default;padding:2px 8px}");export{l as default};
|
|
1
|
+
import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={bodyRow:"OffsetWellsTableRow-module_bodyRow__UqDEw",bodyCell:"OffsetWellsTableRow-module_bodyCell__B-yWv",subjectWellRow:"OffsetWellsTableRow-module_subjectWellRow__x60wK",subjectWellMark:"OffsetWellsTableRow-module_subjectWellMark__S-nvA",subjectWellMarkMobile:"OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp",cellData:"OffsetWellsTableRow-module_cellData__SNLYB",cellDataViewOnly:"OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1",hoverCell:"OffsetWellsTableRow-module_hoverCell__4wFuk",wellNameCell:"OffsetWellsTableRow-module_wellNameCell__BBEf-",wellNameCellMobile:"OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm",lastCell:"OffsetWellsTableRow-module_lastCell__VEQCi",subjectWellImage:"OffsetWellsTableRow-module_subjectWellImage__IkmRP",statusContainer:"OffsetWellsTableRow-module_statusContainer__IUVWC",status:"OffsetWellsTableRow-module_status__qWj9c",customTooltip:"OffsetWellsTableRow-module_customTooltip__aeWUJ",wellNameCursor:"OffsetWellsTableRow-module_wellNameCursor__BlXVa",wellNamePreWrap:"OffsetWellsTableRow-module_wellNamePreWrap__oXXEB",sectionLength:"OffsetWellsTableRow-module_sectionLength__vxefy",moveRow:"OffsetWellsTableRow-module_moveRow__dV8Gw"};e(".OffsetWellsTableRow-module_bodyRow__UqDEw{display:flex!important;flex-direction:row!important;margin-bottom:4px!important}.OffsetWellsTableRow-module_bodyRow__UqDEw:hover .OffsetWellsTableRow-module_bodyCell__B-yWv{background:#393939}.OffsetWellsTableRow-module_subjectWellRow__x60wK{border-color:var(--palette-primary-main)!important}.OffsetWellsTableRow-module_subjectWellMark__S-nvA{left:-1px;position:absolute;top:-1px;z-index:98}.OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp{top:16px}.OffsetWellsTableRow-module_bodyCell__B-yWv{align-items:center!important;background:var(--palette-background-b-8);border-top:1px solid var(--palette-primary-text-9);display:flex!important;height:56px!important;padding:0 12px 0 0!important}.OffsetWellsTableRow-module_cellData__SNLYB{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--palette-primary-text-1);display:-webkit-box;font-size:14px;font-weight:400;line-height:20px;overflow:hidden;overflow-wrap:break-word;white-space:normal}.OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1{padding-left:12px}.OffsetWellsTableRow-module_hoverCell__4wFuk{background:var(--palette-background-b-7)!important}.OffsetWellsTableRow-module_wellNameCell__BBEf-{border-bottom-left-radius:4px;border-left:1px solid var(--palette-primary-text-9);border-top-left-radius:4px;left:0;position:sticky;z-index:2}.OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm{position:static}.OffsetWellsTableRow-module_lastCell__VEQCi{border-bottom-right-radius:4px;border-right:1px solid var(--palette-primary-text-9);border-top-right-radius:4px}.OffsetWellsTableRow-module_subjectWellImage__IkmRP{height:16px;width:16px}.OffsetWellsTableRow-module_statusContainer__IUVWC{align-items:center;display:flex;height:32px;justify-content:center;width:32px}.OffsetWellsTableRow-module_status__qWj9c{border-radius:50%;cursor:default;height:8px;width:8px}.OffsetWellsTableRow-module_customTooltip__aeWUJ{opacity:.9!important}.OffsetWellsTableRow-module_wellNameCursor__BlXVa{color:var(--palette-primary-text-1);cursor:default;white-space:normal;word-break:break-all}.OffsetWellsTableRow-module_wellNamePreWrap__oXXEB{white-space:pre}.OffsetWellsTableRow-module_sectionLength__vxefy{background:var(--palette-primary-text-9);border-radius:20px;cursor:default;padding:2px 8px}.OffsetWellsTableRow-module_moveRow__dV8Gw{opacity:.38!important}");export{l as default};
|