@corva/ui 0.53.0-7 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.module.css.js +1 -1
- package/components/OffsetWellPickerV4/components/AppHeader/AppHeader.d.ts +3 -1
- package/components/OffsetWellPickerV4/components/AppHeader/AppHeader.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/components/AppHeader/AppHeader.js +1 -1
- package/components/OffsetWellPickerV4/components/CustomInfoIcon/CustomInfoIcon.d.ts +2 -9
- package/components/OffsetWellPickerV4/components/CustomInfoIcon/CustomInfoIcon.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/components/CustomInfoIcon/CustomInfoIcon.js +1 -0
- package/components/OffsetWellPickerV4/components/CustomInfoIcon/CustomInfoIcon.module.css.js +1 -0
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.d.ts +3 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.d.ts +3 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
- package/components/VirtualizedTable/VirtualizedTable.d.ts.map +1 -1
- package/components/VirtualizedTable/VirtualizedTable.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":";AA+CA;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"OffsetWellPickerV4.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellPickerV4/OffsetWellPickerV4.js"],"names":[],"mappings":";AA+CA;;;;;;;;;;;;gBAqlBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import i from"@babel/runtime/helpers/slicedToArray";import{useState as o,useRef as r,useMemo as n,useEffect as s,useCallback as l}from"react";import a from"prop-types";import p from"classnames";import{uniqBy as m,sortBy as c,isEmpty as d}from"lodash";import{Replay as u,InfoOutlined as f}from"@material-ui/icons";import j from"../Modal/Modal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../ImagesGrid/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 C,jsxs as b,Fragment as v}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 h from"../LoadingIndicator/LoadingIndicator.js";import{Regular14 as g,Regular12 as A}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 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"@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"../Template/TemplateSharingDialog/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"@material-ui/core";import"../Table/TableToolbar/TableToolbar.js";import"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import{Tooltip as D}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"../StatusBadge/index.js";import"../Attachment/index.js";import"../EmojiIconButton.js";import"../FileUploadIconButton.js";import"../FilePreview/index.js";import"../FailedFileUploading.js";import"../UserMention/index.js";import"../CommentsInfo/index.js";import"../CommentInput/index.js";import"../Comment/index.js";import"../CommentLoader.js";import"../../utils/index.js";import y from"../../styles/typography/index.js";import"../../styles/counter/counter.module.scss.js";import{isMobileDetected as x,isNativeDetected as I}from"../../utils/mobileDetect.js";import{useFetchWells as W}from"./effects/useFetchWells.js";import{useAdvancedWells as T}from"./effects/useAdvancedWells.js";import{useBicWells as P}from"./effects/useBicWells.js";import{useCompanyMetricKey as O}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as w}from"./effects/useFilterOptions.js";import{useFilteredWells as E}from"./effects/useFilteredWells.js";import{useSortedWells as B}from"./effects/useSortedWells.js";import{useRadiusWells as M}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as F}from"./effects/useTableColumns.js";import{AppHeader as H}from"./components/AppHeader/AppHeader.js";import{Toolbar as L}from"./components/Toolbar/Toolbar.js";import{Filter as V}from"./components/Filter/Filter.js";import{WellsMap as k}from"./components/Map/WellsMap.js";import N from"./components/OffsetWellsTable/OffsetWellsTable.js";import R from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as U,ViewType as z,ColumnType as _,FilterType as K,ROWS_PER_PAGE as G,LEAVE_TOUCH_DELAY as q,IOS_DEVICE as Z,DEFAULT_BIC_OFFSET_SIZE as J,DEFAULT_LOCAL_OFFSET_SIZE as Q,MAX_OFFSET_SIZE as X,SMALL_SCREEN_WIDTH as Y,SMALL_SCREEN_HEIGHT as $}from"./constants.js";import{SEARCH_CATEGORIES as ee}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";import{getMobileOperatingSystem as te}from"./utils/index.js";import{showInfoNotification as ie}from"../../utils/notificationToasts.js";function oe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function re(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?oe(Object(o),!0).forEach((function(i){t(e,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):oe(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var ne="OffsetWellPickerV4",se=function(a){var J,Q,oe,se=a.open,le=a.isWDUser,ae=a.defaultSubjectWell,pe=a.currentUser,me=a.offsetSettings,ce=a.addWellsUsabilityInfo,de=a.isViewOnly,ue=a.onClose,fe=a.onSave,je=a.maxOffsetSize,Ce=a.localMaxOffsetSize,be=o(null),ve=i(be,2),he=ve[0],ge=ve[1],Ae=Math.min(je+1,Ce+1,X+1),Se=Math.min(Math.max(Ae,Ce+1),X+1),De=o(null==me?void 0:me.filterExpanded),ye=i(De,2),xe=ye[0],Ie=ye[1],We=o(null==me?void 0:me.mapHidden),Te=i(We,2),Pe=Te[0],Oe=Te[1],we=+(null==ae?void 0:ae.companyId)||+(null==pe?void 0:pe.company_id),Ee=null==ae?void 0:ae.asset_id,Be=o((null==me?void 0:me.filters)||{}),Me=i(Be,2),Fe=Me[0],He=Me[1],Le=o((null==me?void 0:me.wellSection)||U),Ve=i(Le,2),ke=Ve[0],Ne=Ve[1],Re=r(!0),Ue=o([]),ze=i(Ue,2),_e=ze[0],Ke=ze[1],Ge=o(null),qe=i(Ge,2),Ze=qe[0],Je=qe[1],Qe=o(!0),Xe=i(Qe,2),Ye=Xe[0],$e=Xe[1],et=o(!1),tt=i(et,2),it=tt[0],ot=tt[1],rt=o(!1),nt=i(rt,2),st=nt[0],lt=nt[1],at=r(),pt=o(z.none),mt=i(pt,2),ct=mt[0],dt=mt[1],ut=r(),ft=o(!1),jt=i(ft,2),Ct=jt[0],bt=jt[1],vt=n((function(){return Se<=_e.length}),[_e,Se]),ht=n((function(){return ct===z.small?0:ct===z.mobile?52:48}),[ct]);s((function(){se&&vt&&ie("App can’t process more than (".concat(Se-1,") Offset Wells."))}),[vt,se,me]),s((function(){function e(){window.innerWidth<=Y||x||I?dt(z.mobile):window.innerHeight<=$?dt(z.small):dt(z.normal)}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[se]),s((function(){ut.current&&ct===ut.current||(ut.current=ct,ct===z.small||ct===z.mobile?(Oe(!0),Ie(!1)):(Ie(!de&&(null==me?void 0:me.filterExpanded)),Oe(!de&&(null==me?void 0:me.mapHidden))),He((null==me?void 0:me.filters)||{}),Ne((null==me?void 0:me.wellSection)||U))}),[me,de,ct]);var gt=W(we,ce),At=P(le,Ee,gt),St=i(At,2),Dt=St[0],yt=St[1],xt=O(we,null==me?void 0:me.metricsKeys),It=i(xt,2),Wt=It[0],Tt=It[1],Pt=T(we,gt,Dt,yt,Ee),Ot=w(Pt);s((function(){if(Pt&&Dt){var e=Pt.find((function(e){return e.id===Ee}));if(e){var i=Dt.filter((function(e){return e.value!==U})).map((function(e){return e.label})),o=re(re({},e),i.length>0&&t({},_.wellSection,i));Je(o)}else Je(null)}}),[Dt,Pt]);var wt=F(Wt),Et=E(Pt,Fe);s((function(){if(Et)if(Re.current){var e=Pt.filter((function(e){return((null==me?void 0:me.selectedWellIds)||[]).includes(e.id)}));Ze&&(e=e.concat(Ze)),Ke(m(e,"id")),Re.current=!1}else Ke((function(e){var t=(Et||[]).filter((function(t){return!!e.find((function(e){var i=e.id;return t.id===i}))}));return Ze&&(t=t.concat(Ze)),m(t,"id")}))}),[Pt,Et,null==me?void 0:me.selectedWellIds]);var Bt=B(Ze,Et,_e,$e,Re.current),Mt=i(Bt,5),Ft=Mt[0],Ht=Mt[1],Lt=Mt[2],Vt=Mt[3],kt=Mt[4];M(Fe[K.radius],Et,Ke,Se);var Nt=l((function(e,t,i){var o;o=i===ee.well.name?t:t.reduce((function(e,t){var i,o=null===(i=Pt.find((function(e){return e.id===t})))||void 0===i?void 0:i.rigName,r=Pt.filter((function(e){return e.rigName===o})).map((function(e){return e.id}));return e.concat(r)}),[]);var r=Pt.filter((function(e){var t=e.id;return o.includes(t)}));e?(r=r.slice(0,Math.min(r.length,Se-_e.length)),Ke((function(e){return m(e.concat(r),"id")}))):Ke((function(e){return m(e.filter((function(e){var t=e.id;return!r.find((function(e){return e.id===t}))})))}))}),[Pt,_e]),Rt=l((function(){lt(!0)}),[]),Ut=l((function(e){Tt(e)}),[]),zt=l((function(t,i){Ke(i?function(i){return[].concat(e(i),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),_t=l((function(e){if(e){var t=Ze?Et.concat(Ze):Et,i=c(m(t,"id"),"distance");Ke(i.slice(0,Se))}else Ke(Ze?[Ze]:[])}),[Et,Ze,Se]),Kt=function(e){if(d(yt))Ke(Ze?[Ze]:[]);else{var t=Pt.filter((function(t){return yt[e].includes(t.id)})),i=c(t,"distance");Ke(i.slice(0,Ae))}},Gt=l((function(e){Ne(e),Kt(e)}),[Kt]),qt=n((function(){return _e.find((function(e){return e.id===Ee}))?_e.length-1:_e.length}),[_e,Ee]),Zt=n((function(){if(!yt)return!1;var e=_e.map((function(e){return e.id})),t=yt[ke]||[];return Math.min(t.length,Ae)===e.length&&e.every((function(e){return t.includes(e)}))}),[yt,_e,ke,Ae]),Jt=function(){var e=(Pt||[]).filter((function(e){return((null==me?void 0:me.selectedWellIds)||[]).includes(e.id)}));Ze&&(e=e.concat(Ze)),Ke(m(e,"id"));var t=re(re({},me),{},{mapHidden:Pe,filterExpanded:xe});fe(t),He((null==me?void 0:me.filters)||{}),Ne((null==me?void 0:me.wellSection)||U),ue()},Qt=n((function(){return!Zt||(!(d(Fe)||!Fe[K.sideTracks])||ke!==U)}),[Zt,Fe,ke]),Xt=!Pt||!Dt||!kt||ct===z.none,Yt=o(!1),$t=i(Yt,2),ei=$t[0],ti=$t[1],ii=o(G),oi=i(ii,2),ri=oi[0],ni=oi[1],si=o([]),li=i(si,2),ai=li[0],pi=li[1];s((function(){if(kt){var e=kt.slice(0,ri);pi(e)}}),[kt,ri,Ze]);return C(j,{open:se,onClose:Jt,title:C(H,{isWDUser:le,viewType:ct,totalCount:null!==(J=null==Pt?void 0:Pt.length)&&void 0!==J?J:0,selectedCount:qt,isViewOnly:de,maxOffsetwellNumber:Se}),isMobile:ct===z.mobile,contentContainerClassName:p(R.offsetWellDialog,t({},R.offsetWellDialogMobile,ct===z.mobile)),contentClassName:p(R.contentContainer,(Q={},t(Q,R.smallContainer,ct===z.small),t(Q,R.contentContainerMobile,ct===z.mobile),Q)),actionsClassName:p(R.modalActions,t({},R.modalActionsMobile,ct===z.mobile)),actions:!de&&b("div",{className:R.actionsWrapper,children:[!Xt&&Qt?C(D,{placement:"bottom-start",title:"Reset to Synced Offsets in ".concat(le?"Offset App":"Wellhub"),children:C("div",{children:C(S,{"data-testid":"".concat(ne,"_reset"),onClick:function(){He({}),Ne(U),Kt(U)},color:"primary",startIcon:ct!==z.mobile&&C(u,{}),classes:ct===z.mobile&&{root:R.resetButtonMobile},children:ct!==z.mobile?"Reset":C(u,{})})})}):C("div",{className:ct===z.mobile&&R.infoIconContainer,children:ct!==z.mobile?b(v,{children:[C("span",{className:p(y.regular12,y.colors.t6),children:"The offset list is being automatically populated by "}),C("span",{className:p(y.medium12,y.colors.t6),children:le?"Offset Selection App.":"WellHub."})]}):C(D,{title:b("div",{children:[C("span",{className:p(y.regular12,y.colors.t1),children:"The offset list is being automatically populated by "}),C("span",{className:p(y.medium12,y.colors.t1),children:le?"Offset Selection App.":"WellHub."})]}),enterTouchDelay:0,leaveTouchDelay:q,children:C(f,{className:R.infoIcon})})}),b("div",{className:R.buttonGap,children:[C(S,{"data-testid":"".concat(ne,"_cancel"),onClick:Jt,color:"primary",children:"Cancel"}),b(S,{"data-testid":"".concat(ne,"_selectedWells"),variant:"contained",color:"primary",onClick:function(){ue();var e=re(re({},me),{},{companyId:we,subjectWellId:Ee,selectedWellIds:_e.map((function(e){return e.id})),filters:Fe,metricsKeys:Wt,wellSection:ke,isSynced:Zt,mapHidden:Pe,filterExpanded:xe,offsetWellsLimited:vt});fe(e,_e)},children:["Select (",qt,")"]})]})]}),children:Xt?C(h,{fullscreen:!1}):b("div",{className:p(R.contentWrapper),ref:at,children:[ct===z.mobile&&b("div",{className:p(R.countContainer,t({},R.countContainerMobile,ct===z.mobile)),children:[C(g,{className:R.totalLabel,children:"Total:"}),C(g,{"data-testid":"".concat(ne,"_totalWells"),className:R.countValue,children:Pt.length}),C(g,{className:R.selectedLabel,children:"Selected:"}),C(g,{"data-testid":"".concat(ne,"_selected"),className:R.countValue,children:qt}),C(D,{title:"App can’t process more than (".concat(Se-1,") Offset Wells."),placement:"right",children:b(A,{"data-testid":"".concat(ne,"_maxOffsetSize"),className:R.maxOffsetSize,children:["/",Se-1]})})]}),ct===z.normal&&C(L,{isViewOnly:de,viewType:ct,filters:Fe,setFilters:He,isFilterExpanded:xe,setIsFilterExpanded:Ie,isMapHidden:Pe,setIsMapHidden:Oe}),Ct&&C("div",{className:R.topGradient,style:{top:ht}}),b("div",{className:p(R.content,(oe={},t(oe,R.contentMobile,ct===z.mobile),t(oe,R.contentiOSMobile,te()===Z),oe)),onScroll:function(e){return function(e){e.target&&(st&&(e.target.scrollLeft=0,lt(!1)),e.target.scrollLeft<=5&&ei&&ti(!1),e.target.scrollLeft>5&&!ei&&ti(!0),e.target.scrollTop<=5&&Ct&&bt(!1),e.target.scrollTop>5&&!Ct&&bt(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight+2)>=e.target.scrollHeight&&ri<kt.length&&ni((function(e){return e+G})))}(e)},children:[ct!==z.normal&&C(L,{isViewOnly:de,viewType:ct,filters:Fe,setFilters:He,isFilterExpanded:xe,setIsFilterExpanded:Ie,isMapHidden:Pe,setIsMapHidden:Oe}),!Pe&&se&&C(k,{isViewOnly:de,mapHidden:Pe,companyId:we,subjectWell:Ze,offsetWellIds:_e.map((function(e){return e.id})),wells:Pt,radius:Fe[K.radius],handleChanageOffsetWell:zt,activeWellId:he,viewType:ct}),C(V,{isHidden:!xe,isWDUser:le,filterOptions:Ot,filters:Fe,wellSections:Dt,selectedWellSection:ke,subjectWell:Ze,onChangeFilters:function(e){$e(!0),setTimeout((function(){return He(e)}),0)},onChangeBicWells:Gt}),C(N,{open:se,isTableLoading:Ye,companyId:we,subjectWellId:Ee,sortBy:Ft,setSortBy:Ht,sortDirection:Lt,setSortDirection:Vt,columnsWithDict:wt,wells:ai,metricsKeys:Wt,setMetricsKeys:Ut,handleChanageOffsetWell:zt,handleChangeAllOffsetWells:_t,handleAddRemoveAssets:Nt,isWellNameExpand:it,setIsWellNameExpand:ot,isHscrollMoved:ei,onHideAdvancedSearch:Rt,isViewOnly:de,isLastWell:kt.length<=ri,contentRef:at,isLimitedOffsetwells:vt,maxOffsetwellNumber:Se,wellSections:Dt,setActiveWellId:ge,viewType:ct})]})]})})};se.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,localMaxOffsetSize:a.number},se.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:J,localMaxOffsetSize:Q};export{se as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import i from"@babel/runtime/helpers/slicedToArray";import{useState as o,useRef as r,useMemo as n,useEffect as s,useCallback as l}from"react";import a from"prop-types";import p from"classnames";import{uniqBy as m,sortBy as c,isEmpty as d}from"lodash";import{Replay as u,InfoOutlined as f}from"@material-ui/icons";import j from"../Modal/Modal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../ImagesGrid/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 C,jsxs as b,Fragment as v}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 h from"../LoadingIndicator/LoadingIndicator.js";import{Regular14 as g,Regular12 as A}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 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"@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"../Template/TemplateSharingDialog/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"@material-ui/core";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"../StatusBadge/index.js";import"../Attachment/index.js";import"../EmojiIconButton.js";import"../FileUploadIconButton.js";import"../FilePreview/index.js";import"../FailedFileUploading.js";import"../UserMention/index.js";import"../CommentsInfo/index.js";import"../CommentInput/index.js";import"../Comment/index.js";import"../CommentLoader.js";import"../../utils/index.js";import D from"../../styles/typography/index.js";import"../../styles/counter/counter.module.scss.js";import{isMobileDetected as x,isNativeDetected as I}from"../../utils/mobileDetect.js";import{useFetchWells as W}from"./effects/useFetchWells.js";import{useAdvancedWells as T}from"./effects/useAdvancedWells.js";import{useBicWells as O}from"./effects/useBicWells.js";import{useCompanyMetricKey as P}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as w}from"./effects/useFilterOptions.js";import{useFilteredWells as E}from"./effects/useFilteredWells.js";import{useSortedWells as B}from"./effects/useSortedWells.js";import{useRadiusWells as M}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as F}from"./effects/useTableColumns.js";import{AppHeader as H}from"./components/AppHeader/AppHeader.js";import{Toolbar as L}from"./components/Toolbar/Toolbar.js";import{Filter as N}from"./components/Filter/Filter.js";import{WellsMap as V}from"./components/Map/WellsMap.js";import k from"./components/OffsetWellsTable/OffsetWellsTable.js";import R from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as U,ViewType as z,ColumnType as _,FilterType as K,ROWS_PER_PAGE as G,LEAVE_TOUCH_DELAY as q,IOS_DEVICE as Z,DEFAULT_BIC_OFFSET_SIZE as J,DEFAULT_LOCAL_OFFSET_SIZE as Q,MAX_OFFSET_SIZE as X,SMALL_SCREEN_WIDTH as Y,SMALL_SCREEN_HEIGHT as $}from"./constants.js";import{SEARCH_CATEGORIES as ee}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";import{getMobileOperatingSystem as te}from"./utils/index.js";import{showInfoNotification as ie}from"../../utils/notificationToasts.js";function oe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function re(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?oe(Object(o),!0).forEach((function(i){t(e,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):oe(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var ne="OffsetWellPickerV4",se=function(a){var J,Q,oe,se=a.open,le=a.isWDUser,ae=a.defaultSubjectWell,pe=a.currentUser,me=a.offsetSettings,ce=a.addWellsUsabilityInfo,de=a.isViewOnly,ue=a.onClose,fe=a.onSave,je=a.maxOffsetSize,Ce=a.localMaxOffsetSize,be=o(null),ve=i(be,2),he=ve[0],ge=ve[1],Ae=Math.min(je+1,Ce+1,X+1),ye=Math.min(Math.max(Ae,Ce+1),X+1),Se=o(null==me?void 0:me.filterExpanded),De=i(Se,2),xe=De[0],Ie=De[1],We=o(null==me?void 0:me.mapHidden),Te=i(We,2),Oe=Te[0],Pe=Te[1],we=+(null==ae?void 0:ae.companyId)||+(null==pe?void 0:pe.company_id),Ee=null==ae?void 0:ae.asset_id,Be=o((null==me?void 0:me.filters)||{}),Me=i(Be,2),Fe=Me[0],He=Me[1],Le=o((null==me?void 0:me.wellSection)||U),Ne=i(Le,2),Ve=Ne[0],ke=Ne[1],Re=r(!0),Ue=o([]),ze=i(Ue,2),_e=ze[0],Ke=ze[1],Ge=o(null),qe=i(Ge,2),Ze=qe[0],Je=qe[1],Qe=o(!0),Xe=i(Qe,2),Ye=Xe[0],$e=Xe[1],et=o(!1),tt=i(et,2),it=tt[0],ot=tt[1],rt=o(!1),nt=i(rt,2),st=nt[0],lt=nt[1],at=r(),pt=o(z.none),mt=i(pt,2),ct=mt[0],dt=mt[1],ut=r(),ft=o(!1),jt=i(ft,2),Ct=jt[0],bt=jt[1],vt=n((function(){return ye<=_e.length}),[_e,ye]),ht=n((function(){return ct===z.small?0:ct===z.mobile?52:48}),[ct]);s((function(){se&&vt&&ie("App can’t process more than (".concat(ye-1,") Offset Wells."))}),[vt,se,me]),s((function(){function e(){window.innerWidth<=Y||x||I?dt(z.mobile):window.innerHeight<=$?dt(z.small):dt(z.normal)}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[se]),s((function(){ut.current&&ct===ut.current||(ut.current=ct,ct===z.small||ct===z.mobile?(Pe(!0),Ie(!1)):(Ie(!de&&(null==me?void 0:me.filterExpanded)),Pe(!de&&(null==me?void 0:me.mapHidden))),He((null==me?void 0:me.filters)||{}),ke((null==me?void 0:me.wellSection)||U))}),[me,de,ct]);var gt=W(we,ce),At=O(le,Ee,gt),yt=i(At,2),St=yt[0],Dt=yt[1],xt=P(we,null==me?void 0:me.metricsKeys),It=i(xt,2),Wt=It[0],Tt=It[1],Ot=T(we,gt,St,Dt,Ee),Pt=w(Ot);s((function(){if(Ot&&St){var e=Ot.find((function(e){return e.id===Ee}));if(e){var i=St.filter((function(e){return e.value!==U})).map((function(e){return e.label})),o=re(re({},e),i.length>0&&t({},_.wellSection,i));Je(o)}else Je(null)}}),[St,Ot]);var wt=F(Wt),Et=E(Ot,Fe);s((function(){if(Et)if(Re.current){var e=Ot.filter((function(e){return((null==me?void 0:me.selectedWellIds)||[]).includes(e.id)}));Ze&&(e=e.concat(Ze)),Ke(m(e,"id")),Re.current=!1}else Ke((function(e){var t=(Et||[]).filter((function(t){return!!e.find((function(e){var i=e.id;return t.id===i}))}));return Ze&&(t=t.concat(Ze)),m(t,"id")}))}),[Ot,Et,null==me?void 0:me.selectedWellIds]);var Bt=B(Ze,Et,_e,$e,Re.current),Mt=i(Bt,5),Ft=Mt[0],Ht=Mt[1],Lt=Mt[2],Nt=Mt[3],Vt=Mt[4];M(Fe[K.radius],Et,Ke,ye);var kt=l((function(e,t,i){var o;o=i===ee.well.name?t:t.reduce((function(e,t){var i,o=null===(i=Ot.find((function(e){return e.id===t})))||void 0===i?void 0:i.rigName,r=Ot.filter((function(e){return e.rigName===o})).map((function(e){return e.id}));return e.concat(r)}),[]);var r=Ot.filter((function(e){var t=e.id;return o.includes(t)}));e?(r=r.slice(0,Math.min(r.length,ye-_e.length)),Ke((function(e){return m(e.concat(r),"id")}))):Ke((function(e){return m(e.filter((function(e){var t=e.id;return!r.find((function(e){return e.id===t}))})))}))}),[Ot,_e]),Rt=l((function(){lt(!0)}),[]),Ut=l((function(e){Tt(e)}),[]),zt=l((function(t,i){Ke(i?function(i){return[].concat(e(i),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),_t=l((function(e){if(e){var t=Ze?Et.concat(Ze):Et,i=c(m(t,"id"),"distance");Ke(i.slice(0,ye))}else Ke(Ze?[Ze]:[])}),[Et,Ze,ye]),Kt=function(e){if(d(Dt))Ke(Ze?[Ze]:[]);else{var t=Ot.filter((function(t){return Dt[e].includes(t.id)})),i=c(t,"distance");Ke(i.slice(0,Ae))}},Gt=l((function(e){ke(e),Kt(e)}),[Kt]),qt=n((function(){return _e.find((function(e){return e.id===Ee}))?_e.length-1:_e.length}),[_e,Ee]),Zt=n((function(){if(!Dt)return!1;var e=_e.map((function(e){return e.id})),t=Dt[Ve]||[];return Math.min(t.length,Ae)===e.length&&e.every((function(e){return t.includes(e)}))}),[Dt,_e,Ve,Ae]),Jt=function(){var e=(Ot||[]).filter((function(e){return((null==me?void 0:me.selectedWellIds)||[]).includes(e.id)}));Ze&&(e=e.concat(Ze)),Ke(m(e,"id"));var t=re(re({},me),{},{mapHidden:Oe,filterExpanded:xe});fe(t),He((null==me?void 0:me.filters)||{}),ke((null==me?void 0:me.wellSection)||U),ue()},Qt=n((function(){return!Zt||(!(d(Fe)||!Fe[K.sideTracks])||Ve!==U)}),[Zt,Fe,Ve]),Xt=!Ot||!St||!Vt||ct===z.none,Yt=o(!1),$t=i(Yt,2),ei=$t[0],ti=$t[1],ii=o(G),oi=i(ii,2),ri=oi[0],ni=oi[1],si=o([]),li=i(si,2),ai=li[0],pi=li[1];s((function(){if(Vt){var e=Vt.slice(0,ri);pi(e)}}),[Vt,ri,Ze]);return C(j,{open:se,onClose:Jt,title:C(H,{isWDUser:le,viewType:ct,totalCount:null!==(J=null==Ot?void 0:Ot.length)&&void 0!==J?J:0,selectedCount:qt,isViewOnly:de,maxOffsetwellNumber:ye}),isMobile:ct===z.mobile,contentContainerClassName:p(R.offsetWellDialog,t({},R.offsetWellDialogMobile,ct===z.mobile)),contentClassName:p(R.contentContainer,(Q={},t(Q,R.smallContainer,ct===z.small),t(Q,R.contentContainerMobile,ct===z.mobile),Q)),actionsClassName:p(R.modalActions,t({},R.modalActionsMobile,ct===z.mobile)),actions:!de&&b("div",{className:R.actionsWrapper,children:[!Xt&&Qt?C(S,{placement:"bottom-start",title:"Reset to Synced Offsets in ".concat(le?"Offset App":"Wellhub"),children:C("div",{children:C(y,{"data-testid":"".concat(ne,"_reset"),onClick:function(){He({}),ke(U),Kt(U)},color:"primary",startIcon:ct!==z.mobile&&C(u,{}),classes:ct===z.mobile&&{root:R.resetButtonMobile},children:ct!==z.mobile?"Reset":C(u,{})})})}):C("div",{className:ct===z.mobile&&R.infoIconContainer,children:ct!==z.mobile?b(v,{children:[C("span",{className:p(D.regular12,D.colors.t6),children:"The offset list is being automatically populated by "}),C("span",{className:p(D.medium12,D.colors.t6),children:le?"Offset Selection App.":"WellHub."})]}):C(S,{title:b("div",{children:[C("span",{className:p(D.regular12,D.colors.t1),children:"The offset list is being automatically populated by "}),C("span",{className:p(D.medium12,D.colors.t1),children:le?"Offset Selection App.":"WellHub."})]}),enterTouchDelay:0,leaveTouchDelay:q,children:C(f,{className:R.infoIcon})})}),b("div",{className:R.buttonGap,children:[C(y,{"data-testid":"".concat(ne,"_cancel"),onClick:Jt,color:"primary",children:"Cancel"}),b(y,{"data-testid":"".concat(ne,"_selectedWells"),variant:"contained",color:"primary",onClick:function(){ue();var e=re(re({},me),{},{companyId:we,subjectWellId:Ee,selectedWellIds:_e.map((function(e){return e.id})),filters:Fe,metricsKeys:Wt,wellSection:Ve,isSynced:Zt,mapHidden:Oe,filterExpanded:xe,offsetWellsLimited:vt});fe(e,_e)},children:["Select (",qt,")"]})]})]}),children:Xt?C(h,{fullscreen:!1}):b("div",{className:p(R.contentWrapper),ref:at,children:[ct===z.mobile&&b("div",{className:p(R.countContainer,t({},R.countContainerMobile,ct===z.mobile)),children:[C(g,{className:R.totalLabel,children:"Total:"}),C(g,{"data-testid":"".concat(ne,"_totalWells"),className:R.countValue,children:Ot.length}),C(g,{className:R.selectedLabel,children:"Selected:"}),C(g,{"data-testid":"".concat(ne,"_selected"),className:R.countValue,children:qt}),C(S,{title:"App can’t process more than (".concat(ye-1,") Offset Wells."),placement:"right",children:b(A,{"data-testid":"".concat(ne,"_maxOffsetSize"),className:R.maxOffsetSize,children:["/",ye-1]})})]}),ct===z.normal&&C(L,{isViewOnly:de,viewType:ct,filters:Fe,setFilters:He,isFilterExpanded:xe,setIsFilterExpanded:Ie,isMapHidden:Oe,setIsMapHidden:Pe}),Ct&&C("div",{className:R.topGradient,style:{top:ht}}),b("div",{className:p(R.content,(oe={},t(oe,R.contentMobile,ct===z.mobile),t(oe,R.contentiOSMobile,te()===Z),oe)),onScroll:function(e){return function(e){e.target&&(st&&(e.target.scrollLeft=0,lt(!1)),e.target.scrollLeft<=5&&ei&&ti(!1),e.target.scrollLeft>5&&!ei&&ti(!0),e.target.scrollTop<=5&&Ct&&bt(!1),e.target.scrollTop>5&&!Ct&&bt(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight+2)>=e.target.scrollHeight&&ri<Vt.length&&ni((function(e){return e+G})))}(e)},children:[ct!==z.normal&&C(L,{isViewOnly:de,viewType:ct,filters:Fe,setFilters:He,isFilterExpanded:xe,setIsFilterExpanded:Ie,isMapHidden:Oe,setIsMapHidden:Pe}),!Oe&&se&&C(V,{isViewOnly:de,mapHidden:Oe,companyId:we,subjectWell:Ze,offsetWellIds:_e.map((function(e){return e.id})),wells:Ot,radius:Fe[K.radius],handleChanageOffsetWell:zt,activeWellId:he,viewType:ct}),C(N,{isHidden:!xe,isWDUser:le,filterOptions:Pt,filters:Fe,wellSections:St,selectedWellSection:Ve,subjectWell:Ze,onChangeFilters:function(e){$e(!0),setTimeout((function(){return He(e)}),0)},onChangeBicWells:Gt}),C(k,{open:se,isTableLoading:Ye,companyId:we,subjectWellId:Ee,sortBy:Ft,setSortBy:Ht,sortDirection:Lt,setSortDirection:Nt,columnsWithDict:wt,wells:ai,metricsKeys:Wt,setMetricsKeys:Ut,handleChanageOffsetWell:zt,handleChangeAllOffsetWells:_t,handleAddRemoveAssets:kt,isWellNameExpand:it,setIsWellNameExpand:ot,isHscrollMoved:ei,onHideAdvancedSearch:Rt,isViewOnly:de,isLastWell:Vt.length<=ri,contentRef:at,isLimitedOffsetwells:vt,maxOffsetwellNumber:ye,wellSections:St,setActiveWellId:ge,viewType:ct,isWDUser:le})]}),de&&b("div",{className:R.viewOnlyInfoContainer,children:[C("span",{className:p(D.regular12,D.colors.t6),children:"The offset list is being automatically populated by "}),C("span",{className:p(D.medium12,D.colors.t6),children:le?"Offset Selection App.":"WellHub."})]})]})})};se.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,localMaxOffsetSize:a.number},se.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:J,localMaxOffsetSize:Q};export{se as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var l={offsetWellDialog:"OffsetWellPickerV4-module_offsetWellDialog__EkSjl",offsetWellDialogMobile:"OffsetWellPickerV4-module_offsetWellDialogMobile__ng66x",viewOnlyTitleLabel:"OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c",contentWrapper:"OffsetWellPickerV4-module_contentWrapper__gVGQ-",contentContainer:"OffsetWellPickerV4-module_contentContainer__Eb9sk",smallContainer:"OffsetWellPickerV4-module_smallContainer__ngDTM",contentContainerMobile:"OffsetWellPickerV4-module_contentContainerMobile__0VZNE",content:"OffsetWellPickerV4-module_content__mEQWD",contentMobile:"OffsetWellPickerV4-module_contentMobile__jM5ou",contentiOSMobile:"OffsetWellPickerV4-module_contentiOSMobile__e4Coq",modalActions:"OffsetWellPickerV4-module_modalActions__cShAH",modalActionsMobile:"OffsetWellPickerV4-module_modalActionsMobile__ttUJ0",actionsWrapper:"OffsetWellPickerV4-module_actionsWrapper__C0Ciz",buttonGap:"OffsetWellPickerV4-module_buttonGap__fjFT6",viewOnlyLabel:"OffsetWellPickerV4-module_viewOnlyLabel__GP44N",countContainer:"OffsetWellPickerV4-module_countContainer__p8V5A",countContainerMobile:"OffsetWellPickerV4-module_countContainerMobile__HPiI2",totalLabel:"OffsetWellPickerV4-module_totalLabel__3n5bD",selectedLabel:"OffsetWellPickerV4-module_selectedLabel__BzClE",countValue:"OffsetWellPickerV4-module_countValue__dLG-K",maxOffsetSize:"OffsetWellPickerV4-module_maxOffsetSize__MBfqm",resetButtonMobile:"OffsetWellPickerV4-module_resetButtonMobile__dCDdg",infoIconContainer:"OffsetWellPickerV4-module_infoIconContainer__olAOe",infoIcon:"OffsetWellPickerV4-module_infoIcon__8tuGL",topGradient:"OffsetWellPickerV4-module_topGradient__fAc7W"};e(".OffsetWellPickerV4-module_offsetWellDialog__EkSjl{max-height:calc(100% - 32px);padding-bottom:40px;width:1100px}.OffsetWellPickerV4-module_offsetWellDialogMobile__ng66x{margin-top:50px;overflow-y:hidden;padding-bottom:0}.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;overflow-y:hidden;padding:0;position:relative}.OffsetWellPickerV4-module_smallContainer__ngDTM{margin-top:4px}.OffsetWellPickerV4-module_contentContainerMobile__0VZNE{height:calc(100% - 104px)}.OffsetWellPickerV4-module_content__mEQWD{flex:1;margin:0 24px 0 40px;overflow:auto;position:relative}.OffsetWellPickerV4-module_contentMobile__jM5ou{margin:0 0 0 16px}.OffsetWellPickerV4-module_contentiOSMobile__e4Coq{margin:0 16px}.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_modalActionsMobile__ttUJ0{padding:10px 16px}.OffsetWellPickerV4-module_actionsWrapper__C0Ciz{align-items:center;display:flex;flex:1;justify-content:space-between}.OffsetWellPickerV4-module_buttonGap__fjFT6{display:flex;gap:16px}.OffsetWellPickerV4-module_viewOnlyLabel__GP44N{color:var(--palette-primary-text-6);padding-bottom:16px;padding-left:40px}.OffsetWellPickerV4-module_countContainer__p8V5A{align-items:center;display:flex;height:24px;margin:0 0 16px 40px;z-index:9}.OffsetWellPickerV4-module_countContainerMobile__HPiI2{margin-left:16px;margin-top:14px}.OffsetWellPickerV4-module_totalLabel__3n5bD{color:var(--palette-primary-text-6)}.OffsetWellPickerV4-module_selectedLabel__BzClE{color:var(--palette-primary-text-6);padding-left:16px}.OffsetWellPickerV4-module_countValue__dLG-K{color:var(--palette-primary-text-1);padding-left:8px}.OffsetWellPickerV4-module_maxOffsetSize__MBfqm{color:var(--palette-primary-text-6);cursor:default;padding-left:4px}.OffsetWellPickerV4-module_resetButtonMobile__dCDdg{max-height:40px;max-width:40px;min-height:40px;min-width:40px!important}.OffsetWellPickerV4-module_infoIconContainer__olAOe{height:40px}.OffsetWellPickerV4-module_infoIcon__8tuGL{color:#dadada;height:40px!important;padding:10px;width:40px!important}.OffsetWellPickerV4-module_topGradient__fAc7W{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);border-bottom:none!important;height:16px!important;padding:0!important;position:absolute;top:120px;width:100%;z-index:3}");export{l as default};
|
|
1
|
+
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var l={offsetWellDialog:"OffsetWellPickerV4-module_offsetWellDialog__EkSjl",offsetWellDialogMobile:"OffsetWellPickerV4-module_offsetWellDialogMobile__ng66x",viewOnlyTitleLabel:"OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c",contentWrapper:"OffsetWellPickerV4-module_contentWrapper__gVGQ-",contentContainer:"OffsetWellPickerV4-module_contentContainer__Eb9sk",smallContainer:"OffsetWellPickerV4-module_smallContainer__ngDTM",contentContainerMobile:"OffsetWellPickerV4-module_contentContainerMobile__0VZNE",content:"OffsetWellPickerV4-module_content__mEQWD",contentMobile:"OffsetWellPickerV4-module_contentMobile__jM5ou",contentiOSMobile:"OffsetWellPickerV4-module_contentiOSMobile__e4Coq",modalActions:"OffsetWellPickerV4-module_modalActions__cShAH",modalActionsMobile:"OffsetWellPickerV4-module_modalActionsMobile__ttUJ0",actionsWrapper:"OffsetWellPickerV4-module_actionsWrapper__C0Ciz",buttonGap:"OffsetWellPickerV4-module_buttonGap__fjFT6",viewOnlyLabel:"OffsetWellPickerV4-module_viewOnlyLabel__GP44N",countContainer:"OffsetWellPickerV4-module_countContainer__p8V5A",countContainerMobile:"OffsetWellPickerV4-module_countContainerMobile__HPiI2",totalLabel:"OffsetWellPickerV4-module_totalLabel__3n5bD",selectedLabel:"OffsetWellPickerV4-module_selectedLabel__BzClE",countValue:"OffsetWellPickerV4-module_countValue__dLG-K",maxOffsetSize:"OffsetWellPickerV4-module_maxOffsetSize__MBfqm",resetButtonMobile:"OffsetWellPickerV4-module_resetButtonMobile__dCDdg",infoIconContainer:"OffsetWellPickerV4-module_infoIconContainer__olAOe",viewOnlyInfoContainer:"OffsetWellPickerV4-module_viewOnlyInfoContainer__Fr4nL",infoIcon:"OffsetWellPickerV4-module_infoIcon__8tuGL",topGradient:"OffsetWellPickerV4-module_topGradient__fAc7W"};e(".OffsetWellPickerV4-module_offsetWellDialog__EkSjl{max-height:calc(100% - 32px);padding-bottom:40px;width:1100px}.OffsetWellPickerV4-module_offsetWellDialogMobile__ng66x{margin-top:50px;overflow-y:hidden;padding-bottom:0}.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;overflow-y:hidden;padding:0;position:relative}.OffsetWellPickerV4-module_smallContainer__ngDTM{margin-top:4px}.OffsetWellPickerV4-module_contentContainerMobile__0VZNE{height:calc(100% - 104px)}.OffsetWellPickerV4-module_content__mEQWD{flex:1;margin:0 24px 0 40px;overflow:auto;position:relative}.OffsetWellPickerV4-module_contentMobile__jM5ou{margin:0 0 0 16px}.OffsetWellPickerV4-module_contentiOSMobile__e4Coq{margin:0 16px}.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_modalActionsMobile__ttUJ0{padding:10px 16px}.OffsetWellPickerV4-module_actionsWrapper__C0Ciz{align-items:center;display:flex;flex:1;justify-content:space-between}.OffsetWellPickerV4-module_buttonGap__fjFT6{display:flex;gap:16px}.OffsetWellPickerV4-module_viewOnlyLabel__GP44N{color:var(--palette-primary-text-6);padding-bottom:16px;padding-left:40px}.OffsetWellPickerV4-module_countContainer__p8V5A{align-items:center;display:flex;height:24px;margin:0 0 16px 40px;z-index:9}.OffsetWellPickerV4-module_countContainerMobile__HPiI2{margin-left:16px;margin-top:14px}.OffsetWellPickerV4-module_totalLabel__3n5bD{color:var(--palette-primary-text-6)}.OffsetWellPickerV4-module_selectedLabel__BzClE{color:var(--palette-primary-text-6);padding-left:16px}.OffsetWellPickerV4-module_countValue__dLG-K{color:var(--palette-primary-text-1);padding-left:8px}.OffsetWellPickerV4-module_maxOffsetSize__MBfqm{color:var(--palette-primary-text-6);cursor:default;padding-left:4px}.OffsetWellPickerV4-module_resetButtonMobile__dCDdg{max-height:40px;max-width:40px;min-height:40px;min-width:40px!important}.OffsetWellPickerV4-module_infoIconContainer__olAOe{height:40px}.OffsetWellPickerV4-module_viewOnlyInfoContainer__Fr4nL{padding:24px 40px 0}.OffsetWellPickerV4-module_infoIcon__8tuGL{color:#dadada;height:40px!important;padding:10px;width:40px!important}.OffsetWellPickerV4-module_topGradient__fAc7W{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);border-bottom:none!important;height:16px!important;padding:0!important;position:absolute;top:120px;width:100%;z-index:3}");export{l as default};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export function AppHeader({ viewType, totalCount, selectedCount, maxOffsetwellNumber }: {
|
|
1
|
+
export function AppHeader({ isWDUser, viewType, totalCount, selectedCount, isViewOnly, maxOffsetwellNumber, }: {
|
|
2
|
+
isWDUser: any;
|
|
2
3
|
viewType: any;
|
|
3
4
|
totalCount: any;
|
|
4
5
|
selectedCount: any;
|
|
6
|
+
isViewOnly: any;
|
|
5
7
|
maxOffsetwellNumber: any;
|
|
6
8
|
}): JSX.Element;
|
|
7
9
|
export namespace AppHeader {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV4/components/AppHeader/AppHeader.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV4/components/AppHeader/AppHeader.js"],"names":[],"mappings":"AASO;;;;;;;gBAuCN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"prop-types";import{Divider as t,Tooltip as
|
|
1
|
+
import e from"prop-types";import{Divider as t,Tooltip as r}from"@material-ui/core";import{Regular20 as s,Regular14 as a,Regular12 as i}from"../../../Typography.js";import{ViewType as l}from"../../constants.js";import{CustomInfoIcon as o}from"../CustomInfoIcon/CustomInfoIcon.js";import c from"./AppHeader.module.css.js";import{jsx as n,jsxs as m}from"react/jsx-runtime";var d=function(e){var d=e.isWDUser,p=e.viewType,f=e.totalCount,u=e.selectedCount,h=e.isViewOnly,N=e.maxOffsetwellNumber;return p===l.mobile?n("div",{className:c.headerContainer,children:n(s,{children:"Select Offset Wells"})}):m("div",{className:c.headerContainer,children:[n(s,{children:"Select Offset Wells"}),n(t,{className:c.divideLine}),n(a,{className:c.totalLabel,children:"Total:"}),n(a,{"data-testid":"".concat("AppHeader","_totalWells"),className:c.countValue,children:f}),n(a,{className:c.selectedLabel,children:"Selected:"}),n(a,{"data-testid":"".concat("AppHeader","_selected"),className:c.countValue,children:u}),n(r,{title:"App can’t process more than (".concat(N-1,") Offset Wells."),placement:"right",children:m(i,{"data-testid":"".concat("AppHeader","_maxOffsetSize"),className:c.maxOffsetSize,children:["/",N-1]})}),h&&n(o,{viewType:p,isWDUser:d})]})};d.propTypes={viewType:e.string.isRequired,totalCount:e.number.isRequired,selectedCount:e.number.isRequired,maxOffsetwellNumber:e.number.isRequired};export{d as AppHeader};
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
export function CustomInfoIcon({
|
|
2
|
-
isWDUser: any;
|
|
3
|
-
isViewOnly: any;
|
|
4
|
-
maxOffsetwellNumber: any;
|
|
5
|
-
selectedCount: any;
|
|
1
|
+
export function CustomInfoIcon({ viewType, isWDUser }: {
|
|
6
2
|
viewType: any;
|
|
3
|
+
isWDUser: any;
|
|
7
4
|
}): JSX.Element;
|
|
8
5
|
export namespace CustomInfoIcon {
|
|
9
6
|
namespace propTypes {
|
|
10
|
-
const isWDUser: PropTypes.Validator<boolean>;
|
|
11
|
-
const selectedCount: PropTypes.Validator<number>;
|
|
12
|
-
const isViewOnly: PropTypes.Validator<boolean>;
|
|
13
|
-
const maxOffsetwellNumber: PropTypes.Validator<number>;
|
|
14
7
|
const viewType: PropTypes.Validator<string>;
|
|
15
8
|
}
|
|
16
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomInfoIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV4/components/CustomInfoIcon/CustomInfoIcon.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CustomInfoIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV4/components/CustomInfoIcon/CustomInfoIcon.js"],"names":[],"mappings":"AAOA;;;gBAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"prop-types";import{Tooltip as o}from"@material-ui/core";import i from"@material-ui/icons/Info";import r from"./CustomInfoIcon.module.css.js";import{ViewType as t,LEAVE_TOUCH_DELAY as m}from"../../constants.js";import{jsx as s}from"react/jsx-runtime";function l(e){var l=e.viewType,n=e.isWDUser;return s(o,{title:"View only mode. To edit offsets, use ".concat(n?"Offset Well Selection app.":"Wellhub."),enterTouchDelay:l===t.mobile&&0,leaveTouchDelay:l===t.mobile&&m,placement:l===t.mobile?"":"right",children:s("div",{className:r.infoWrapper,children:s(i,{className:r.infoIcon})})})}l.propTypes={viewType:e.string.isRequired};export{l as CustomInfoIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var n={infoWrapper:"CustomInfoIcon-module_infoWrapper__uxAjc",infoIcon:"CustomInfoIcon-module_infoIcon__VAE52"};o(".CustomInfoIcon-module_infoWrapper__uxAjc{align-items:center;display:flex;margin-left:8px;position:relative}.CustomInfoIcon-module_infoIcon__VAE52{color:var(--palette-info-light);font-size:20px!important}");export{n 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: updatedWells, metricsKeys, setMetricsKeys, handleChanageOffsetWell, handleChangeAllOffsetWells, handleAddRemoveAssets, isWellNameExpand, setIsWellNameExpand, isHscrollMoved, onHideAdvancedSearch, isViewOnly, isLastWell, contentRef, isLimitedOffsetwells, maxOffsetwellNumber, wellSections, setActiveWellId, viewType, }: {
|
|
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, maxOffsetwellNumber, wellSections, setActiveWellId, viewType, isWDUser, }: {
|
|
3
3
|
open: any;
|
|
4
4
|
isTableLoading: any;
|
|
5
5
|
companyId: any;
|
|
@@ -27,6 +27,7 @@ declare const _default: import("react").MemoExoticComponent<{
|
|
|
27
27
|
wellSections: any;
|
|
28
28
|
setActiveWellId: any;
|
|
29
29
|
viewType: any;
|
|
30
|
+
isWDUser: any;
|
|
30
31
|
}): JSX.Element;
|
|
31
32
|
propTypes: {
|
|
32
33
|
open: PropTypes.Validator<boolean>;
|
|
@@ -56,6 +57,7 @@ declare const _default: import("react").MemoExoticComponent<{
|
|
|
56
57
|
wellSections: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
|
|
57
58
|
setActiveWellId: PropTypes.Validator<(...args: any[]) => any>;
|
|
58
59
|
viewType: PropTypes.Validator<string>;
|
|
60
|
+
isWDUser: PropTypes.Validator<boolean>;
|
|
59
61
|
};
|
|
60
62
|
}>;
|
|
61
63
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
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{jsxs as f,jsx as h}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"uuid";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../ImagesGrid/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"../../../Toaster/Toaster.js";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../Template/TemplateSharingDialog/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../PinnableFilters/PinnableFilters.js";import"../../../HeaderLayout/HeaderLayout.js";import"../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../PadOffsetsPicker/StagesSelector.js";import"../../../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"../../../StatusBadge/index.js";import"../../../Attachment/index.js";import"../../../EmojiIconButton.js";import"../../../FileUploadIconButton.js";import"../../../FilePreview/index.js";import"../../../FailedFileUploading.js";import"../../../UserMention/index.js";import"../../../CommentsInfo/index.js";import"../../../CommentInput/index.js";import"../../../Comment/index.js";import"../../../CommentLoader.js";import{AdvancedSearch as v}from"./AdvancedSearch/AdvancedSearch.js";import A from"./OffsetWellsTableHead.js";import g from"./OffsetWellsTableRow.js";import{METRICS_LIST as D,EXPANED_WELLNAME_WIDTH as S,TableColumns as y,ViewType as x,ROW_HEIGHT as T}from"../../constants.js";import I from"./OffsetWellsTable.module.css.js";import{getIsImperial as P}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 W=function(r){var m,w=r.open,W=r.isTableLoading,E=r.companyId,B=r.subjectWellId,R=r.sortBy,L=r.setSortBy,F=r.sortDirection,M=r.setSortDirection,k=r.columnsWithDict,N=r.wells,q=r.metricsKeys,V=r.setMetricsKeys,H=r.handleChanageOffsetWell,K=r.handleChangeAllOffsetWells,U=r.handleAddRemoveAssets,Z=r.isWellNameExpand,z=r.setIsWellNameExpand,G=r.isHscrollMoved,J=r.onHideAdvancedSearch,Q=r.isViewOnly,X=r.isLastWell,Y=r.contentRef,$=r.isLimitedOffsetwells,_=r.maxOffsetwellNumber,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],be=fe[1],ve=o(),Ae=o(),ge=o();n((function(){if(!le)return se(N),void be(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)/T+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)*T]}(ne,le,N,Y),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(N);else{je(a),be(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(N),be(0),me(null)}),s)}}),[N]);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,$]),Se=e(De,3),ye=Se[0],xe=Se[1],Te=Se[2],Ie=s((function(){return P()}),[]),Pe=s((function(){return(q||[]).reduce((function(e,t){return e.concat(D.filter((function(e){return e.key===t})))}),[])}),[q]),we=s((function(){return Z?S-58:y[0].width[q.length]-58}),[Z,null==q?void 0:q.length]);n((function(){if(re!==x.mobile&&ve.current&&Ae.current){var e=ve.current.querySelector(".".concat(I.wellNameFixed));G?e.classList.remove(I.noShadow):e.classList.add(I.noShadow);var t=Ae.current.querySelectorAll(".".concat(I.wellNameFixed));G?t.forEach((function(e){return e.classList.remove(I.noShadow)})):t.forEach((function(e){return e.classList.add(I.noShadow)}))}}),[G,Ae.current,ve.current,ne]);var Oe=a((function(e,t){L(e),M(t)}),[]),We=a((function(e){V(e)}),[]),Ee=a((function(e,t){V((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return k&&ne?f("div",{className:I.offsetWellsTable,children:[h("div",{className:I.stickyTable,children:h(d,{"aria-label":"ows table head",innerRef:ve,children:h(c,{children:h(A,{open:w,columnsWithDict:k,metricsKeys:q,sortBy:R,sortDirection:F,indeterminate:xe,isAllWellsSelected:Te,onChangeSort:Oe,onChangeMetricsKeys:We,onUpdateMetricsKey:Ee,isWellNameExpand:Z,setIsWellNameExpand:z,handleChangeAllOffsetWells:K,wellNameStyle:I.wellNameFixed,isViewOnly:Q,isImperial:Ie,contentRef:Y,viewType:re})})})}),!Q&&h("div",{className:I.searchCell,children:h(v,{companyId:E,subjectWellId:B,wells:ne,onChange:U,selectedWellIds:ye.map((function(e){return e.id})),onHideAdvancedSearch:J,width:null===(m=Y.current)||void 0===m?void 0:m.getBoundingClientRect().width})}),h(d,{"aria-label":"ows table body",innerRef:Ae,className:I.bodyTable,children:f(u,{children:[h(j,{children:h(C,{className:l(I.topShadow,t({},I.viewOnlyShadow,Q))})}),ne.map((function(e,t){return f(p,{children:[h(j,{children:le&&he>0&&t===ue&&h(C,{style:{height:he}})}),h(g,{columnsWithDict:k,subjectWellId:B,data:e,metricsKeys:q,metricsColumns:Pe,handleChanageOffsetWell:H,isWellNameExpand:Z,wellNameStyle:I.wellNameFixed,wellNameWidth:we,isViewOnly:Q,isImperial:Ie,isLimitedOffsetwells:$,maxOffsetwellNumber:_,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)})),!X&&h(j,{children:h(C,{className:I.loadingCell,children:h("span",{children:"Loading..."})})}),h(j,{children:h(C,{className:I.bottomShadow})})]})}),W&&h(b,{fullscreen:!1,className:I.loadingContainer})]}):null};W.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,maxOffsetwellNumber:m.number.isRequired,contentRef:m.shape().isRequired,wellSections:m.arrayOf(m.shape({})).isRequired,setActiveWellId:m.func.isRequired,viewType:m.string.isRequired};var E=r(W);export{E 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{jsxs as f,jsx as h}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"uuid";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../ImagesGrid/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"../../../Toaster/Toaster.js";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../Template/TemplateSharingDialog/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../PinnableFilters/PinnableFilters.js";import"../../../HeaderLayout/HeaderLayout.js";import"../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../PadOffsetsPicker/StagesSelector.js";import"../../../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"../../../StatusBadge/index.js";import"../../../Attachment/index.js";import"../../../EmojiIconButton.js";import"../../../FileUploadIconButton.js";import"../../../FilePreview/index.js";import"../../../FailedFileUploading.js";import"../../../UserMention/index.js";import"../../../CommentsInfo/index.js";import"../../../CommentInput/index.js";import"../../../Comment/index.js";import"../../../CommentLoader.js";import{AdvancedSearch as v}from"./AdvancedSearch/AdvancedSearch.js";import A from"./OffsetWellsTableHead.js";import g from"./OffsetWellsTableRow.js";import{METRICS_LIST as D,EXPANED_WELLNAME_WIDTH as S,TableColumns as y,ViewType as x,ROW_HEIGHT as T}from"../../constants.js";import I from"./OffsetWellsTable.module.css.js";import{getIsImperial as P}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 W(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 O=function(r){var m,w=r.open,O=r.isTableLoading,E=r.companyId,B=r.subjectWellId,R=r.sortBy,L=r.setSortBy,F=r.sortDirection,M=r.setSortDirection,k=r.columnsWithDict,N=r.wells,q=r.metricsKeys,V=r.setMetricsKeys,H=r.handleChanageOffsetWell,K=r.handleChangeAllOffsetWells,U=r.handleAddRemoveAssets,Z=r.isWellNameExpand,z=r.setIsWellNameExpand,G=r.isHscrollMoved,J=r.onHideAdvancedSearch,Q=r.isViewOnly,X=r.isLastWell,Y=r.contentRef,$=r.isLimitedOffsetwells,_=r.maxOffsetwellNumber,ee=r.wellSections,te=r.setActiveWellId,re=r.viewType,ie=r.isWDUser,oe=i([]),ne=e(oe,2),se=ne[0],ae=ne[1],pe=i(null),le=e(pe,2),me=le[0],de=le[1],ce=i(0),ue=e(ce,2),je=ue[0],Ce=ue[1],fe=i(0),he=e(fe,2),be=he[0],ve=he[1],Ae=o(),ge=o(),De=o();n((function(){if(!me)return ae(N),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)/T+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)*T]}(se,me,N,Y),r=e(t,6),i=r[0],o=r[1],n=r[2],s=r[3],a=r[4],p=r[5];if(De.current=s,o===i)ae(N);else{Ce(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?W(W({},e),{},{moveTo:t}):n?W(W({},e),{},{moveTo:r<i?-1:1,delayTime:Math.abs(o-r)}):e}))}(se,n,i,o);ae(l),setTimeout((function(){ae(N),ve(0),de(null)}),s)}}),[N]);var Se=s((function(){var e=se.filter((function(e){return e.checked}));return[e,se.length!==e.length&&e.length&&!$,e.length===se.length||$]}),[se,$]),ye=e(Se,3),xe=ye[0],Te=ye[1],Ie=ye[2],Pe=s((function(){return P()}),[]),we=s((function(){return(q||[]).reduce((function(e,t){return e.concat(D.filter((function(e){return e.key===t})))}),[])}),[q]),We=s((function(){return Z?S-58:y[0].width[q.length]-58}),[Z,null==q?void 0:q.length]);n((function(){if(re!==x.mobile&&Ae.current&&ge.current){var e=Ae.current.querySelector(".".concat(I.wellNameFixed));G?e.classList.remove(I.noShadow):e.classList.add(I.noShadow);var t=ge.current.querySelectorAll(".".concat(I.wellNameFixed));G?t.forEach((function(e){return e.classList.remove(I.noShadow)})):t.forEach((function(e){return e.classList.add(I.noShadow)}))}}),[G,ge.current,Ae.current,se]);var Oe=a((function(e,t){L(e),M(t)}),[]),Ee=a((function(e){V(e)}),[]),Be=a((function(e,t){V((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return k&&se?f("div",{className:I.offsetWellsTable,children:[h("div",{className:I.stickyTable,children:h(d,{"aria-label":"ows table head",innerRef:Ae,children:h(c,{children:h(A,{open:w,columnsWithDict:k,metricsKeys:q,sortBy:R,sortDirection:F,indeterminate:Te,isAllWellsSelected:Ie,onChangeSort:Oe,onChangeMetricsKeys:Ee,onUpdateMetricsKey:Be,isWellNameExpand:Z,setIsWellNameExpand:z,handleChangeAllOffsetWells:K,wellNameStyle:I.wellNameFixed,isViewOnly:Q,isImperial:Pe,contentRef:Y,viewType:re})})})}),!Q&&h("div",{className:I.searchCell,children:h(v,{companyId:E,subjectWellId:B,wells:se,onChange:U,selectedWellIds:xe.map((function(e){return e.id})),onHideAdvancedSearch:J,width:null===(m=Y.current)||void 0===m?void 0:m.getBoundingClientRect().width})}),h(d,{"aria-label":"ows table body",innerRef:ge,className:I.bodyTable,children:f(u,{children:[h(j,{children:h(C,{className:l(I.topShadow,t({},I.viewOnlyShadow,Q))})}),se.map((function(e,t){return f(p,{children:[h(j,{children:me&&be>0&&t===je&&h(C,{style:{height:be}})}),h(g,{columnsWithDict:k,subjectWellId:B,data:e,metricsKeys:q,metricsColumns:we,handleChanageOffsetWell:H,isWellNameExpand:Z,wellNameStyle:I.wellNameFixed,wellNameWidth:We,isViewOnly:Q,isImperial:Pe,isLimitedOffsetwells:$,maxOffsetwellNumber:_,wellSections:ee,setActiveWellId:te,viewType:re,newCheckedWellId:null!=e&&e.moveTo?me:0,setNewCheckedWellId:de,index:null!=e&&e.moveTo?t:0,flyDuration:null!=e&&e.moveTo?De.current:0,isWDUser:ie})]},e.id)})),!X&&h(j,{children:h(C,{className:I.loadingCell,children:h("span",{children:"Loading..."})})}),h(j,{children:h(C,{className:I.bottomShadow})})]})}),O&&h(b,{fullscreen:!1,className:I.loadingContainer})]}):null};O.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,maxOffsetwellNumber:m.number.isRequired,contentRef:m.shape().isRequired,wellSections:m.arrayOf(m.shape({})).isRequired,setActiveWellId:m.func.isRequired,viewType:m.string.isRequired,isWDUser:m.bool.isRequired};var E=r(O);export{E 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, maxOffsetwellNumber, wellSections, setActiveWellId, viewType, newCheckedWellId, setNewCheckedWellId, index, flyDuration, }: {
|
|
2
|
+
({ columnsWithDict, data, subjectWellId, metricsKeys, metricsColumns, handleChanageOffsetWell, isWellNameExpand, wellNameStyle, wellNameWidth, isViewOnly, isImperial, isLimitedOffsetwells, maxOffsetwellNumber, wellSections, setActiveWellId, viewType, newCheckedWellId, setNewCheckedWellId, index, flyDuration, isWDUser, }: {
|
|
3
3
|
columnsWithDict: any;
|
|
4
4
|
data: any;
|
|
5
5
|
subjectWellId: any;
|
|
@@ -20,6 +20,7 @@ declare const _default: import("react").MemoExoticComponent<{
|
|
|
20
20
|
setNewCheckedWellId: any;
|
|
21
21
|
index: any;
|
|
22
22
|
flyDuration: any;
|
|
23
|
+
isWDUser: any;
|
|
23
24
|
}): JSX.Element;
|
|
24
25
|
propTypes: {
|
|
25
26
|
columnsWithDict: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
|
|
@@ -49,6 +50,7 @@ declare const _default: import("react").MemoExoticComponent<{
|
|
|
49
50
|
setNewCheckedWellId: PropTypes.Validator<(...args: any[]) => any>;
|
|
50
51
|
index: PropTypes.Validator<number>;
|
|
51
52
|
flyDuration: PropTypes.Validator<number>;
|
|
53
|
+
isWDUser: PropTypes.Validator<boolean>;
|
|
52
54
|
};
|
|
53
55
|
}>;
|
|
54
56
|
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 s,useMemo as r}from"react";import o from"prop-types";import{omit as c,startCase as d,get as m}from"lodash";import u from"classnames";import f from"moment";import{TableRow as h,TableCell as b,Tooltip as y,Checkbox 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 W,EXPANED_WELLNAME_WIDTH as R,LEAVE_TOUCH_DELAY as k,StatusOptions as C}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,V=i.metricsKeys,Y=i.metricsColumns,z=i.handleChanageOffsetWell,E=i.isWellNameExpand,F=i.wellNameStyle,P=i.wellNameWidth,H=i.isViewOnly,K=i.isImperial,U=i.isLimitedOffsetwells,B=i.maxOffsetwellNumber,G=i.wellSections,J=i.setActiveWellId,Q=i.viewType,X=i.newCheckedWellId,Z=i.setNewCheckedWellId,$=i.index,ee=i.flyDuration,te=i.isWDUser,ie=L===A.id,le=t({},q.subjectWellRow,ie),ne=l(A.checked),ae=e(ne,2),se=ae[0],re=ae[1],oe=n(),ce=!1,de=A[N.name]||"—",me=de;if(!E&&2*P<8*de.length){var ue=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}(de);if(ue>2*P){var fe=2*P/(ue/de.length);me="".concat(de.substring(0,fe/2-2),"\n... ").concat(de.substring(de.length-fe/2+6)),ce=!0}}var he=a((function(e,t,i,l,n){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=t-e;oe.current.style.position="absolute",oe.current.style.top="".concat(e,"px"),oe.current.style.zIndex=i===l?4:3,oe.current.style.transition="transform ".concat(n,"ms ease ").concat(50*a,"ms"),oe.current.style.transform="translateY(".concat(s,"px)")}),[]),be=a((function(){oe.current.style.position="unset",oe.current.style.zIndex=1,oe.current.style.transition="none",oe.current.style.transform="none"}),[]),ye=a((function(e){Z(A.id);var t=c(A,"moveTo");z(t,e),re(e)}),[A,Z,z]);s((function(){if(X){var e=$*g+16;if(A.moveTo){var t=e+g*A.moveTo;he(e,t,X,A.id,ee,A.delayTime)}}else be()}),[A.moveTo,X]),s((function(){re(A.checked)}),[A.checked]);var pe,ve,we=r((function(){return A[N.wellSection]}),[A]),Ne=r((function(){return H?"View only mode. To edit offsets, use ".concat(te?"Offset Selection App":"WellHub","."):U&&!A.checked?"App can’t process more than (".concat(B-1,") Offset Wells."):""}),[H,U,A.checked]);return D(h,{"data-testid":"".concat(S,"_row_").concat(de),className:u(q.bodyRow,t({},q.moveRow,1===Math.abs(A.moveTo)&&X!==A.id)),innerRef:oe,onMouseEnter:function(){J(A.id)},onMouseLeave:function(){J(null)},children:[D(b,{"data-testid":"".concat(S,"_well"),className:u(q.bodyCell,q.wellNameCell,le,(o={},t(o,F,Q!==W.mobile),t(o,q.wellNameCellMobile,Q===W.mobile),o)),style:{width:E?R:M(_,N.name)},children:[ie&&O(T,{className:u(q.subjectWellMark,t({},q.subjectWellMarkMobile,Q===W.mobile))}),!ie&&O(y,{title:Ne,placement:"bottom-start",classes:{tooltipPlacementBottom:q.checkboxTooltip},children:O("div",{children:O(p,{"data-testid":"".concat(S,"_checkbox"),size:"medium",checked:se,classes:{disabled:q.checkboxDisabled},disabled:H||U&&!A.checked,onChange:function(e){return ye(e.target.checked)}})})}),O(y,{title:ce?de:"",children:O(v,{variant:"body2",className:u(q.wellNameCursor,(m={},t(m,q.cellDataViewOnly,ie),t(m,q.wellNamePreWrap,ce),m)),children:ce?me:de})})]}),O(b,{"data-testid":"".concat(S,"_dot"),className:u(q.bodyCell,le),style:{width:M(_,N.status)},children:!ie&&O(y,{title:d(A[N.status]),enterTouchDelay:Q===W.mobile&&0,leaveTouchDelay:Q===W.mobile&&k,children:O("div",{className:q.statusContainer,children:O("div",{"data-testid":"".concat(S,"_color"),className:q.status,style:{background:null===(w=C.find((function(e){return e.value===A[N.status]})))||void 0===w?void 0:w.color}})})})}),O(b,{"data-testid":"".concat(S,"_rig"),className:u(q.bodyCell,le),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(b,{"data-testid":"".concat(S,"_distance"),className:u(q.bodyCell,le),style:{width:M(_,N.distance)},children:O(v,{variant:"body2",className:q.cellData,children:I(A,K)})}),O(b,{"data-testid":"".concat(S,"_lastActive"),className:u(q.bodyCell,le),style:{width:M(_,N.lastActive)},children:O(v,{variant:"body2",className:q.cellData,children:A[N.lastActive]&&Number.isFinite(A[N.lastActive])?f.unix(A[N.lastActive]).format("MM/DD/YYYY"):"—"})}),V.map((function(e){return O(b,{"data-testid":"".concat(S,"_").concat(e),className:u(q.bodyCell,le),style:{width:M(_,e)},children:O(v,{variant:"body2",className:q.cellData,children:j(A,Y,e)})},e)})),O(b,{"data-testid":"".concat(S,"_wellSection"),className:u(q.bodyCell,q.lastCell,le),style:{width:M(_,N.wellSection)},children:we&&we.length>1?O(y,{classes:{tooltip:q.customTooltip},title:O(x,{wellSectionNames:we}),children:O("div",{className:q.sectionLength,children:we.length})}):O(y,{title:we||"",children:O(v,{variant:"body2",className:q.cellData,style:{color:we&&1===we.length&&(pe=we,ve=e(pe,1)[0],G.find((function(e){return e.label===ve})).color)},children:we})})})]})};_.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,maxOffsetwellNumber:o.number.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,isWDUser:o.bool.isRequired};var A=i(_);export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedTable.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualizedTable/VirtualizedTable.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AA4FnC,aAAK,8BAA8B,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEtG,eAAO,MAAM,yBAAyB;sQAmBnC,8BAA8B,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"VirtualizedTable.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualizedTable/VirtualizedTable.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AA4FnC,aAAK,8BAA8B,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEtG,eAAO,MAAM,yBAAyB;sQAmBnC,8BAA8B,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6K9C,CAAA;AAED,QAAA,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCvC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaF,wBAAgE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r,
|
|
1
|
+
import{__assign as e,__spreadArray as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useMemo as i,useEffect as o}from"react";import a from"prop-types";import l from"classnames";import{Table as s,Column as u,SortDirection as c}from"react-virtualized";import{withStyles as d,IconButton as m,Typography as h,Tooltip as f}from"@material-ui/core";import{Settings as g,Sort as p,ArrowUpward as b,ArrowDownward as y}from"@material-ui/icons";import{getUnitDisplay as w}from"../../utils/convert.js";function S(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,i=r.customUnit;return i?"(".concat(i,")"):n?"(".concat(w(n),")"):""}function R(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function x(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}var v=function(a){var d=a.columns,w=a.data,v=a.useColumnSetting,C=a.useFixedColumnWidth,_=a.onOpenSettingDlg,z=a.classes,k=a.width,T=a.height,q=a.headerHeight,I=a.rowHeight,N=a.showTopSettingIcon,L=a.customMuiStyles,D=a.isTopSettingIconShownAlways,H=a.CustomCellRenderer,B=a.customRowStyle,W=a.sort,O=a.sortBy,j=a.sortDirection,A=e(e({},z),L),F=i((function(){return{label:"",key:"setting",width:v?25:0}}),[v]),K=i((function(){return d.filter((function(e){return e.show}))}),[d]),V=i((function(){return v?t(t([],K,!0),[F],!1):K}),[K,v,F]),M=i((function(){var e;if(k<=0)return{};var t=((e={})[F.key]=F.width,e),r=[];return K.filter((function(e){return Number.isFinite(e.width)})).forEach((function(e){t[e.key]=e.width-1,r.push(e.width-1)})),K.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(e){var n=r.reduce((function(e,t){return e+t}),0),i=Math.floor((k-n-F.width)/(K.length-r.length)),o=e.minWidth||65,a=i<o?o:i;t[e.key]=a-1,r.push(a-1)})),t}),[k,K,F]),E=i((function(){return Object.values(M).reduce((function(e,t){return e+t}),0)}),[M]),G=D||E-12.5>=k;o((function(){N(G)}),[G]);var U=function(t){var i=t.label,o=t.dataKey,a=O||j||W;return o===F.key?G?null:r(m,e({size:"small","aria-label":"customize columns",className:A.settingIcon,onClick:_},{children:r(g,{fontSize:"inherit"})})):n(h,e({variant:"body2",className:l(A.headerLabel,R(d,o))},{children:[i," ",r("span",e({className:l(A.unitLabel,x(d,o))},{children:S(d,o)})),a&&o!==O&&r(f,e({title:"Sort A-Z"},{children:r(p,{fontSize:"small",className:z.sortIcon})})),a&&o===O&&(j===c.ASC?r(b,{fontSize:"small",className:z.sortIcon}):r(y,{fontSize:"small",className:z.sortIcon}))]}))},P=function(t){var n=t.dataKey,i=t.rowData;return H?r(H,{columnKey:n,value:i[n]}):r(h,e({variant:"body2",className:A.cellData},{children:i[n]}))};return r(s,e({width:C?E:k,height:T,headerHeight:q,rowClassName:function(e){var t,r=e.index;return l(((t={})[A.oddRow]=r%2==1,t))},rowHeight:I,rowCount:w.length,rowGetter:function(e){var t=e.index;return w[t]},rowStyle:B||{},className:A.table,sort:W,sortBy:O,sortDirection:j},{children:V.map((function(e){return r(u,{width:M[e.key]||0,dataKey:e.key,label:e.label,headerRenderer:U,cellRenderer:P},e.key)}))}))},C={columns:a.arrayOf(a.shape({show:a.bool,minWidth:a.number,width:a.number,key:a.string,label:a.string})).isRequired,data:a.arrayOf(a.shape({})).isRequired,useColumnSetting:a.bool.isRequired,useFixedColumnWidth:a.bool.isRequired,headerHeight:a.number.isRequired,rowHeight:a.number.isRequired,width:a.number.isRequired,height:a.number.isRequired,onOpenSettingDlg:a.func.isRequired,showTopSettingIcon:a.func.isRequired,sort:a.func,sortBy:a.string,sortDirection:a.string,classes:a.shape({sortIcon:a.string}).isRequired,customMuiStyles:a.shape({table:a.string,oddRow:a.string,headerLabel:a.string,cellData:a.string,unitLabel:a.string,settingIcon:a.string}).isRequired,isTopSettingIconShownAlways:a.bool.isRequired,CustomCellRenderer:a.func,customRowStyle:a.func};v.propTypes=C,v.defaultProps={CustomCellRenderer:null,customRowStyle:null,sort:null,sortBy:null,sortDirection:null};var _=d((function(e){return{table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},oddRow:{backgroundColor:e.isLightTheme?"rgba(189, 189, 189, 0.1)":"#303030"},headerLabel:{lineHeight:"14px",fontSize:"12px",fontStyle:"normal",letterSpacing:"-0.25px",display:"flex",alignItems:"center",flexWrap:"wrap"},cellData:{lineHeight:"14px",fontSize:"12px",fontWeight:"normal",fontStyle:"normal",letterSpacing:"0.15px"},unitLabel:{fontSize:"10px",opacity:.5},settingIcon:{padding:"3px",fontSize:"20px"},sortIcon:{fontSize:"16px"}}}))(v);export{v as VirtualizedTableComponent,_ as default};
|