@corva/ui 3.20.4 → 3.20.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js +1 -1
  2. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  3. package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  4. package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js.map +1 -1
  5. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  6. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js.map +1 -1
  7. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
  8. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js.map +1 -1
  9. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.module.css.js +1 -1
  10. package/cjs-bundle/components/OffsetWellPickerV4/constants.js +1 -1
  11. package/cjs-bundle/components/OffsetWellPickerV4/constants.js.map +1 -1
  12. package/components/OffsetWellMap/OffsetWellMap.d.ts.map +1 -1
  13. package/components/OffsetWellMap/OffsetWellMap.js +1 -1
  14. package/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  15. package/components/OffsetWellPickerV4/OffsetWellPickerV4.d.ts.map +1 -1
  16. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  17. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js.map +1 -1
  18. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.d.ts +3 -1
  19. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.d.ts.map +1 -1
  20. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  21. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js.map +1 -1
  22. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.d.ts +3 -11
  23. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.d.ts.map +1 -1
  24. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
  25. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js.map +1 -1
  26. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.module.css.js +1 -1
  27. package/components/OffsetWellPickerV4/constants.js +1 -1
  28. package/components/OffsetWellPickerV4/constants.js.map +1 -1
  29. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as o,useState as s,useRef as i,useEffect as r,useMemo as n,useCallback as p,Fragment as m}from"react";import a from"classnames";import c from"prop-types";import{uniqBy as l}from"lodash";import{Table as d,TableHead as j,TableBody as u,TableRow as A,TableCell as C}from"@material-ui/core";import{METRICS_LIST as h,EXPANDED_WELL_NAME_WIDTH as v,TableColumns as f,ViewType as S,ROW_HEIGHT as g,SEARCH_CELL_EXPAND_WIDTH as b,SEARCH_CELL_DEFAULT_WIDTH as V,ColumnType as D}from"../../constants.js";import{getIsImperial as I}from"../../utils/unitSystem.js";import{AdvancedSearch as T}from"./AdvancedSearch/AdvancedSearch.js";import y from"./OffsetWellsTableHead.js";import P from"./OffsetWellsTableRow.js";import x from"./OffsetWellsTable.module.css.js";import{jsxs as B,jsx as W}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"@icon-park/react/es/all";import"../../../../icons/IconParkProvider.js";import"../../../../icons/customIcons/icons/AddMessage.js";import"../../../../icons/customIcons/icons/Attention.js";import"../../../../icons/customIcons/icons/Collapse.js";import"../../../../icons/customIcons/icons/Dashboard.js";import"../../../../icons/customIcons/icons/Expand.js";import"../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../../icons/customIcons/icons/FolderOpened.js";import"../../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../../icons/customIcons/icons/LessOrEqual.js";import"../../../../icons/customIcons/icons/Search.js";import"../../../../icons/customIcons/icons/Wellhub.js";import"../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../icons/customIcons/icons/Checkbox.js";import"../../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../../icons/customIcons/icons/Radio.js";import"../../../../icons/customIcons/icons/RadioChecked.js";import"../../../../icons/customIcons/icons/SimulFrac.js";import"../../../../icons/customIcons/icons/ZipperFrac.js";import"../../../../icons/customIcons/icons/CautionFilled.js";import"../../../../icons/customIcons/icons/MoreApp.js";import"../../../../icons/customIcons/icons/Pad.js";import"../../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../../icons/customIcons/icons/FracFleet.js";import"../../../../icons/customIcons/icons/Program.js";import"../../../../icons/customIcons/icons/Rig.js";import"../../../../icons/customIcons/icons/Well.js";import"../../../../icons/customIcons/icons/Gap.js";import"../../../../icons/customIcons/icons/Pin.js";import"../../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../../icons/customIcons/icons/AttentionFilled.js";import"../../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../../icons/customIcons/icons/Archive.js";import"../../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../../icons/customIcons/icons/Unarchive.js";import"../../../../icons/customIcons/icons/Archived.js";import"../../../../utils/mobileDetect.js";import"../../../IconButton/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/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../Modal/CorvaModal.css.js";import"uuid";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../AppIcon/AppIcon.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../../utils/index.js";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../../componentsV2/Text/Text.js";import"../../../../componentsV2/Grid/Grid.js";import"../../../../componentsV2/Grid/Grid.scss.js";import"../../../../componentsV2/Header/Header.scss.js";import"../../../../componentsV2/Button/Button.js";import"../../../../componentsV2/ButtonIcon/ButtonIcon.js";import"../../../../componentsV2/Tooltip/Tooltip.scss.js";import"../../../../componentsV2/Paper/Paper.js";import"../../../../componentsV2/Popover/Popover.scss.js";import"../../../../componentsV2/Radio/Radio.js";import"../../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../../componentsV2/Checkbox/Checkbox.js";import"../../../../componentsV2/TextInput/TextInput.js";import"../../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../../../componentsV2/TextLink/TextLink.js";import"../../../../componentsV2/Chip/Chip.js";import"../../../../componentsV2/ChipAlert/ChipAlert.js";import"../../../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../../../componentsV2/Avatar/Avatar.js";import"../../../../componentsV2/Avatar/constants.js";import"../../../../componentsV2/AvatarGroup/AvatarGroup.scss.js";import"@material-ui/lab";import"../../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../../componentsV2/ModalWindow/ModalWindow.scss.js";import"../../../../componentsV2/Modal/Modal.scss.js";import"../../../../componentsV2/Menu/Menu.js";import"../../../../componentsV2/Counter/Counter.js";import"../../../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../../../componentsV2/Switch/Switch.js";import"../../../../componentsV2/Tabs/Tabs.js";import"../../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../../componentsV2/FileIcon/FileIcon.js";import"react-dropzone";import"../../../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../../../componentsV2/Skeleton/Skeleton.scss.js";import"../../../../utils/main.js";import"../../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../../../componentsV2/Stepper/Step/Step.scss.js";import"../../../../componentsV2/Stepper/Stepper.scss.js";import"../../../../componentsV2/ButtonLive/ButtonLive.js";import"../../../../componentsV2/ButtonText/ButtonText.js";import"../../../../componentsV2/LiveDotIndicator/LiveDotIndicator.scss.js";import"../../../../componentsV2/IndicatorLive/IndicatorLive.scss.js";import"../../../../componentsV2/Accordion/Accordion.scss.js";import"../../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../../../componentsV2/BadgeComment/BadgeComment.js";import"../../../../componentsV2/AppContainer/AppContainer.js";import"../../../../componentsV2/AppContainer/AppContainer.constants.js";import"../../../../componentsV2/AppFooter/AppFooter.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../../componentsV2/AppHeader/AppHeader.constants.js";import"../../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../../../componentsV2/AppHeader/AppAssets/utils.js";import"../../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../../../constants/streamSourceType.js";import"../../../../types/shared/Completions.js";import"../../../PadModeSelect/types.js";import"lodash/flatten";import"lodash/partition";import"../../../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js";import"../../../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.constants.js";import"../../../../clients/jsonApi/index.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../../../../utils/env.js";import"../../../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../../../componentsV2/AppContainer/headerCommon.scss.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../../../componentsV2/AppSettings/AppSettings.js";import"../../../../componentsV2/AppSettings/AppSettings.constants.js";import"../../../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.js";import"../../../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../../../componentsV2/AppHeader/AppHeader.scss.js";import"../../../../componentsV2/OffsetWellsButton/OffsetWellsButton.scss.js";import"../../../../componentsV2/Autocomplete/Autocomplete.scss.js";import"../../../../componentsV2/Menu/MenuItem/MenuItem.scss.js";import"../../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.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/RestoreAppSizeButton/index.js";import"rollbar";import"@rollbar/react";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../Toaster/Toaster.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../AssetEditor/index.js";import"../../../AssetEditorV2/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import M from"../../../LoadingIndicator/LoadingIndicator.js";import"../../../Typography.js";import"../../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"slate";import"../../../EmptyState/EmptyState.js";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"react-color";import"../../../SettingEditors/ColorEditor/style.css.js";import"../../../SettingEditors/DropdownEditor/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/ChartSelect.js";import"../../../Chart/components/buttons/DragToZoomButton.js";import"../../../Chart/components/buttons/ZoomInButton.js";import"../../../Chart/components/buttons/ZoomOutButton.js";import"../../../Chart/components/buttons/PanButton.js";import"../../../Chart/components/buttons/ResetZoomButton.js";import"../../../Chart/components/buttons/HideAxesButton.js";import"../../../Chart/components/buttons/ChartTypeButton.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../MiddleTruncatedText/MiddleTruncatedText.js";import"../../../RangeSlider/constants.js";import"../../../RangeSlider/Input.css.js";import"../../../RangeSlider/RangeSlider.css.js";import"../../../AdvancedSlider/AdvancedSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/components/Button/index.js";import"moment-timezone";import"../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../../Button/components/LiveButton/styles.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"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../Select/SelectFilterBy.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../GradientPicker/GradientPicker.js";import"../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../GradientManager/GradientSelect.styles.js";import"../../../GradientManager/GradientManager.styles.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../utils/apiCalls.js";import"../../effects/useAdvancedWells.js";import"react-virtualized";import"../../effects/useAssetsData.js";import"../AppHeader/AppHeader.js";import"../Toolbar/Toolbar.js";import"../Filter/Filter.js";import"../Map/WellsMap.js";import"./AdvancedSearch/constants.js";import"../../utils/index.js";import"../../OffsetWellPickerV4.module.css.js";import"@material-ui/core/Snackbar";import"../../../Notifications/Toast.js";import"../../../../styles/typography/index.js";import"../../../../styles/counter/counter.module.scss.js";import"../../../OffsetWellMap/OffsetWellMap.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"../../../MiddleTruncate/MiddleTruncate.js";import"../../../PinnableFilters/PinnableFilters.js";import"../../../HeaderLayout/HeaderLayout.js";import"../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../PadOffsetsPicker/StagesSelector.js";import"../../../PadOffsetsPickerV2/PadOffsetsPickerV2.js";import"../../../Table/TableToolbar/TableToolbar.js";import"../../../Table/TableContainer/TableContainer.js";import"../../../Table/TableCell/TableCell.js";import"../../../Table/TablePagination/TablePagination.js";import"../../../Table/TablePaginationActions/TablePaginationActions.js";import"../../../Tooltip/ScrollableTooltip.js";import"../../../PriceInput/PriceInput.js";import"../../../LabelsCounter/LabelsCounter.js";import"../../../Stepper/Stepper.js";import"../../../Stepper/Step/Step.js";import"../../../Stepper/StepsWrapper.js";import"../../../Comment/CommentIcon/index.js";import"../../../FilesLoader/FilesLoader.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/Groups.js";import"../../../Search/components/SelectAllListItem.js";import"../../../StatusBadge/index.js";import"../../../Attachment/index.js";import"../../../EmojiIconButton.js";import"../../../FileUploadIconButton.js";import"../../../FilePreview/index.js";import"../../../FailedFileUploading.js";import"../../../UserMention/index.js";import"../../../CommentsInfo/index.js";import"../../../CommentInput/index.js";import"../../../Comment/index.js";import"../../../CommentLoader.js";import"../../../AssetNameLabel/AssetStatusBadge.js";import"../../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../../AssetEditorV2/components/SelectItem.js";import"../../../AssetEditorV2/components/MultipleAssetsToggle.js";import"../../../AssetEditorV2/components/PrimaryAssetSelectV2.js";import"../../../EChartsWrapper/EChartsWrapper.js";import"../../../AssetsMultipleSelector/AssetsMultipleSelector.js";import"@material-ui/icons/Close";import"@material-ui/icons/GetApp";import"../../../GoogleDocsViewer/index.js";import"../../../NewDocumentViewer/effects/useFileContent.js";import"../../../NewDocumentViewer/styles.js";import"../../../FilesLoaderV2/styles.js";import"../../../FilesDropzone/styles.js";import"../../../FilesProcessor/styles.js";import"../../../Hint/styles.js";import"@babel/runtime/helpers/taggedTemplateLiteral";import"fparser";import"../../../Formula/useFormulaStyles.js";import"../../../Formula/RootXIcon.js";import"../../../Formula/FormulaTextEditor.js";import"../../../Formula/CloseSuggestion.js";import"../../../Formula/SuggestionsMenu.js";function L(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,s)}return o}function w(e){for(var o=1;o<arguments.length;o++){var s=null!=arguments[o]?arguments[o]:{};o%2?L(Object(s),!0).forEach((function(o){t(e,o,s[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):L(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var F=function(o){var c=o.open,L=o.isTableLoading,F=o.companyId,E=o.subjectWellId,O=o.sortBy,R=o.setSortBy,k=o.sortDirection,H=o.setSortDirection,q=o.columnsWithDict,N=o.wells,G=o.metricsKeys,U=o.setMetricsKeys,z=o.handleChangeOffsetWell,K=o.handleChangeAllOffsetWells,Z=o.handleAddRemoveAssets,X=o.isWellNameExpand,J=o.setIsWellNameExpand,Q=o.isHScrollMoved,Y=o.onHideAdvancedSearch,$=o.isViewOnly,_=o.isLastWell,ee=o.contentRef,te=o.isLimitedOffsetWells,oe=o.maxOffsetWellNumber,se=o.wellSections,ie=o.setActiveWellId,re=o.viewType,ne=o.isWDUser,pe=o.taScores,me=s([]),ae=e(me,2),ce=ae[0],le=ae[1],de=s(null),je=e(de,2),ue=je[0],Ae=je[1],Ce=s(0),he=e(Ce,2),ve=he[0],fe=he[1],Se=s(0),ge=e(Se,2),be=ge[0],Ve=ge[1],De=i(),Ie=i(),Te=i();r((function(){var t=l(ce,"id"),o=l(N,"id");if(!ue)return le(o),void Ve(0);var s=function(e,t,o,s){var i,r=e.findIndex((function(e){return t===e.id})),n=o.findIndex((function(e){return t===e.id}));-1===n&&(n=o.length);var p=Math.round(((null===(i=s.current)||void 0===i?void 0:i.clientHeight)-145)/g+1),m=n-r;Math.abs(m)>p&&(n=r+p*Math.sign(m));var a=n-r;return[r,n,a,200*(.4*Math.abs(a)+2),Math.min(r,n),(Math.abs(a)+1)*g]}(t,ue,o,ee),i=e(s,6),r=i[0],n=i[1],p=i[2],m=i[3],a=i[4],c=i[5];if(Te.current=m,n===r)le(o);else{fe(a),Ve(c);var d=function(e,t,o,s){return e.map((function(e,i){var r=o<i&&i<=s||s<=i&&i<o;return i===o?w(w({},e),{},{moveTo:t}):r?w(w({},e),{},{moveTo:o<s?-1:1,delayTime:Math.abs(i-o)}):e}))}(t,p,r,n);le(d),setTimeout((function(){le(o),Ve(0),Ae(null)}),m)}}),[N,N.length]);var ye=n((function(){return l(ce,"id")}),[ce]),Pe=n((function(){var e=ye.filter((function(e){return e.checked}));return[e,ye.length!==e.length&&e.length&&!te,e.length===ye.length||te]}),[ye,te]),xe=e(Pe,3),Be=xe[0],We=xe[1],Me=xe[2],Le=n((function(){return I()}),[]),we=n((function(){return(G||[]).reduce((function(e,t){return e.concat(h.filter((function(e){return e.key===t})))}),[])}),[G]),Fe=n((function(){return X?v-58:f[0].width[G.length]-58}),[X,null==G?void 0:G.length]),Ee=n((function(){var e=X?b:V;return pe.length&&(e+=function(e,t){var o=e.find((function(e){return e.key===t}));return(null==o?void 0:o.width)||0}(q,D.taScore)),"".concat(e,"px")}),[X,pe]);r((function(){if(re!==S.mobile&&De.current&&Ie.current){var e=De.current.querySelector(".".concat(x.wellNameFixed));Q?e.classList.remove(x.noShadow):e.classList.add(x.noShadow);var t=Ie.current.querySelectorAll(".".concat(x.wellNameFixed));Q?t.forEach((function(e){return e.classList.remove(x.noShadow)})):t.forEach((function(e){return e.classList.add(x.noShadow)}))}}),[Q,Ie.current,De.current,ce]);var Oe=p((function(e,t){R(e),H(t)}),[]),Re=p((function(e){U(e)}),[]),ke=p((function(e,t){U((function(o){return o.map((function(o){return o===e?t:o}))}))}),[]);return q&&ye?B("div",{className:x.offsetWellsTable,children:[W("div",{className:x.stickyTable,children:W(d,{"aria-label":"ows table head",innerRef:De,children:W(j,{children:W(y,{open:c,columnsWithDict:q,metricsKeys:G,sortBy:O,sortDirection:k,indeterminate:We,isAllWellsSelected:Me,onChangeSort:Oe,onChangeMetricsKeys:Re,onUpdateMetricsKey:ke,isWellNameExpand:X,setIsWellNameExpand:J,handleChangeAllOffsetWells:K,wellNameStyle:x.wellNameFixed,isViewOnly:$,isImperial:Le,contentRef:ee,viewType:re,isTaColumnVisible:!!pe.length})})})}),!$&&B("div",{className:a(x.searchCellWrapper,t({},x.searchCellWrapperExpanded,X)),style:{"--dynamic-search-wrapper-width":Ee},children:[W("div",{className:x.searchCell,children:W(T,{companyId:F,subjectWellId:E,onChange:Z,selectedWellIds:Be.map((function(e){return e.id})),onHideAdvancedSearch:Y})}),!!X&&W("div",{className:x.searchCellEmpty})]}),W(d,{"aria-label":"ows table body",innerRef:Ie,className:x.bodyTable,children:B(u,{children:[W(A,{children:W(C,{className:a(x.topShadow,t({},x.viewOnlyShadow,$))})}),ye.map((function(e,t){return B(m,{children:[W(A,{children:ue&&be>0&&t===ve&&W(C,{style:{height:be}})}),W(P,{columnsWithDict:q,subjectWellId:E,data:e,metricsKeys:G,metricsColumns:we,handleChangeOffsetWell:z,isWellNameExpand:X,wellNameStyle:x.wellNameFixed,wellNameWidth:Fe,isViewOnly:$,isImperial:Le,isLimitedOffsetWells:te,maxOffsetWellNumber:oe,wellSections:se,setActiveWellId:ie,viewType:re,newCheckedWellId:null!=e&&e.moveTo?ue:0,setNewCheckedWellId:Ae,index:null!=e&&e.moveTo?t:0,flyDuration:null!=e&&e.moveTo?Te.current:0,isWDUser:ne,taScores:pe})]},e.id)})),!_&&W(A,{children:W(C,{className:x.loadingCell,children:W("span",{children:"Loading..."})})}),W(A,{children:W(C,{className:x.bottomShadow})})]})}),L&&W("div",{className:x.loadingContainer,children:W(M,{fullscreen:!1,className:x.loadingIndicator})})]}):null};F.propTypes={open:c.bool.isRequired,isTableLoading:c.bool.isRequired,companyId:c.number.isRequired,subjectWellId:c.number.isRequired,sortBy:c.string.isRequired,setSortBy:c.func.isRequired,sortDirection:c.string.isRequired,setSortDirection:c.func.isRequired,columnsWithDict:c.arrayOf(c.shape({})).isRequired,wells:c.arrayOf(c.shape({})).isRequired,metricsKeys:c.arrayOf(c.string).isRequired,setMetricsKeys:c.func.isRequired,handleChangeOffsetWell:c.func.isRequired,handleChangeAllOffsetWells:c.func.isRequired,handleAddRemoveAssets:c.func.isRequired,setIsWellNameExpand:c.func.isRequired,isWellNameExpand:c.bool.isRequired,isHScrollMoved:c.bool.isRequired,onHideAdvancedSearch:c.func.isRequired,isViewOnly:c.bool.isRequired,isLastWell:c.bool.isRequired,isLimitedOffsetWells:c.bool.isRequired,maxOffsetWellNumber:c.number.isRequired,contentRef:c.shape({}).isRequired,wellSections:c.arrayOf(c.shape({})).isRequired,setActiveWellId:c.func.isRequired,viewType:c.string.isRequired,isWDUser:c.bool.isRequired,taScores:c.arrayOf(c.shape({})).isRequired};var E=o(F);export{E as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{memo as o,useState as s,useRef as i,useEffect as r,useMemo as n,useCallback as p}from"react";import m from"classnames";import a from"prop-types";import{uniqBy as c}from"lodash";import{Table as l,TableHead as d,TableBody as j,TableRow as u,TableCell as C}from"@material-ui/core";import{METRICS_LIST as A,EXPANDED_WELL_NAME_WIDTH as h,TableColumns as S,ViewType as f,SEARCH_CELL_EXPAND_WIDTH as v,SEARCH_CELL_DEFAULT_WIDTH as g,ColumnType as V}from"../../constants.js";import{getIsImperial as b}from"../../utils/unitSystem.js";import{AdvancedSearch as D}from"./AdvancedSearch/AdvancedSearch.js";import I from"./OffsetWellsTableHead.js";import T from"./OffsetWellsTableRow.js";import x from"./OffsetWellsTable.module.css.js";import{jsxs as P,jsx as y}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"@icon-park/react/es/all";import"../../../../icons/IconParkProvider.js";import"../../../../icons/customIcons/icons/AddMessage.js";import"../../../../icons/customIcons/icons/Attention.js";import"../../../../icons/customIcons/icons/Collapse.js";import"../../../../icons/customIcons/icons/Dashboard.js";import"../../../../icons/customIcons/icons/Expand.js";import"../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../../icons/customIcons/icons/FolderOpened.js";import"../../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../../icons/customIcons/icons/LessOrEqual.js";import"../../../../icons/customIcons/icons/Search.js";import"../../../../icons/customIcons/icons/Wellhub.js";import"../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../icons/customIcons/icons/Checkbox.js";import"../../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../../icons/customIcons/icons/Radio.js";import"../../../../icons/customIcons/icons/RadioChecked.js";import"../../../../icons/customIcons/icons/SimulFrac.js";import"../../../../icons/customIcons/icons/ZipperFrac.js";import"../../../../icons/customIcons/icons/CautionFilled.js";import"../../../../icons/customIcons/icons/MoreApp.js";import"../../../../icons/customIcons/icons/Pad.js";import"../../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../../icons/customIcons/icons/FracFleet.js";import"../../../../icons/customIcons/icons/Program.js";import"../../../../icons/customIcons/icons/Rig.js";import"../../../../icons/customIcons/icons/Well.js";import"../../../../icons/customIcons/icons/Gap.js";import"../../../../icons/customIcons/icons/Pin.js";import"../../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../../icons/customIcons/icons/AttentionFilled.js";import"../../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../../icons/customIcons/icons/Archive.js";import"../../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../../icons/customIcons/icons/Unarchive.js";import"../../../../icons/customIcons/icons/Archived.js";import"../../../../utils/mobileDetect.js";import"../../../IconButton/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/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../Modal/CorvaModal.css.js";import"uuid";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../AppIcon/AppIcon.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../../utils/index.js";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../../componentsV2/Text/Text.js";import"../../../../componentsV2/Grid/Grid.js";import"../../../../componentsV2/Grid/Grid.scss.js";import"../../../../componentsV2/Header/Header.scss.js";import"../../../../componentsV2/Button/Button.js";import"../../../../componentsV2/ButtonIcon/ButtonIcon.js";import"../../../../componentsV2/Tooltip/Tooltip.scss.js";import"../../../../componentsV2/Paper/Paper.js";import"../../../../componentsV2/Popover/Popover.scss.js";import"../../../../componentsV2/Radio/Radio.js";import"../../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../../componentsV2/Checkbox/Checkbox.js";import"../../../../componentsV2/TextInput/TextInput.js";import"../../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../../../componentsV2/TextLink/TextLink.js";import"../../../../componentsV2/Chip/Chip.js";import"../../../../componentsV2/ChipAlert/ChipAlert.js";import"../../../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../../../componentsV2/Avatar/Avatar.js";import"../../../../componentsV2/Avatar/constants.js";import"../../../../componentsV2/AvatarGroup/AvatarGroup.scss.js";import"@material-ui/lab";import"../../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../../componentsV2/ModalWindow/ModalWindow.scss.js";import"../../../../componentsV2/Modal/Modal.scss.js";import"../../../../componentsV2/Menu/Menu.js";import"../../../../componentsV2/Counter/Counter.js";import"../../../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../../../componentsV2/Switch/Switch.js";import"../../../../componentsV2/Tabs/Tabs.js";import"../../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../../componentsV2/FileIcon/FileIcon.js";import"react-dropzone";import"../../../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../../../componentsV2/Skeleton/Skeleton.scss.js";import"../../../../utils/main.js";import"../../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../../../componentsV2/Stepper/Step/Step.scss.js";import"../../../../componentsV2/Stepper/Stepper.scss.js";import"../../../../componentsV2/ButtonLive/ButtonLive.js";import"../../../../componentsV2/ButtonText/ButtonText.js";import"../../../../componentsV2/LiveDotIndicator/LiveDotIndicator.scss.js";import"../../../../componentsV2/IndicatorLive/IndicatorLive.scss.js";import"../../../../componentsV2/Accordion/Accordion.scss.js";import"../../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../../../componentsV2/BadgeComment/BadgeComment.js";import"../../../../componentsV2/AppContainer/AppContainer.js";import"../../../../componentsV2/AppContainer/AppContainer.constants.js";import"../../../../componentsV2/AppFooter/AppFooter.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../../componentsV2/AppHeader/AppHeader.constants.js";import"../../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../../../componentsV2/AppHeader/AppAssets/utils.js";import"../../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../../../constants/streamSourceType.js";import"../../../../types/shared/Completions.js";import"../../../PadModeSelect/types.js";import"lodash/flatten";import"lodash/partition";import"../../../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js";import"../../../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.constants.js";import"../../../../clients/jsonApi/index.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../../../../utils/env.js";import"../../../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../../../componentsV2/AppContainer/headerCommon.scss.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../../../componentsV2/AppSettings/AppSettings.js";import"../../../../componentsV2/AppSettings/AppSettings.constants.js";import"../../../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.js";import"../../../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../../../componentsV2/AppHeader/AppHeader.scss.js";import"../../../../componentsV2/OffsetWellsButton/OffsetWellsButton.scss.js";import"../../../../componentsV2/Autocomplete/Autocomplete.scss.js";import"../../../../componentsV2/Menu/MenuItem/MenuItem.scss.js";import"../../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.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/RestoreAppSizeButton/index.js";import"rollbar";import"@rollbar/react";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../Toaster/Toaster.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../AssetEditor/index.js";import"../../../AssetEditorV2/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import B from"../../../LoadingIndicator/LoadingIndicator.js";import"../../../Typography.js";import"../../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"slate";import"../../../EmptyState/EmptyState.js";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"react-color";import"../../../SettingEditors/ColorEditor/style.css.js";import"../../../SettingEditors/DropdownEditor/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/ChartSelect.js";import"../../../Chart/components/buttons/DragToZoomButton.js";import"../../../Chart/components/buttons/ZoomInButton.js";import"../../../Chart/components/buttons/ZoomOutButton.js";import"../../../Chart/components/buttons/PanButton.js";import"../../../Chart/components/buttons/ResetZoomButton.js";import"../../../Chart/components/buttons/HideAxesButton.js";import"../../../Chart/components/buttons/ChartTypeButton.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../MiddleTruncatedText/MiddleTruncatedText.js";import"../../../RangeSlider/constants.js";import"../../../RangeSlider/Input.css.js";import"../../../RangeSlider/RangeSlider.css.js";import"../../../AdvancedSlider/AdvancedSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/components/Button/index.js";import"moment-timezone";import"../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../../Button/components/LiveButton/styles.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"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../Select/SelectFilterBy.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../GradientPicker/GradientPicker.js";import"../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../GradientManager/GradientSelect.styles.js";import"../../../GradientManager/GradientManager.styles.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../utils/apiCalls.js";import"../../effects/useAdvancedWells.js";import"react-virtualized";import"../../effects/useAssetsData.js";import"../AppHeader/AppHeader.js";import"../Toolbar/Toolbar.js";import"../Filter/Filter.js";import"../Map/WellsMap.js";import"./AdvancedSearch/constants.js";import"../../utils/index.js";import"../../OffsetWellPickerV4.module.css.js";import"@material-ui/core/Snackbar";import"../../../Notifications/Toast.js";import"../../../../styles/typography/index.js";import"../../../../styles/counter/counter.module.scss.js";import"../../../OffsetWellMap/OffsetWellMap.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"../../../MiddleTruncate/MiddleTruncate.js";import"../../../PinnableFilters/PinnableFilters.js";import"../../../HeaderLayout/HeaderLayout.js";import"../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../PadOffsetsPicker/StagesSelector.js";import"../../../PadOffsetsPickerV2/PadOffsetsPickerV2.js";import"../../../Table/TableToolbar/TableToolbar.js";import"../../../Table/TableContainer/TableContainer.js";import"../../../Table/TableCell/TableCell.js";import"../../../Table/TablePagination/TablePagination.js";import"../../../Table/TablePaginationActions/TablePaginationActions.js";import"../../../Tooltip/ScrollableTooltip.js";import"../../../PriceInput/PriceInput.js";import"../../../LabelsCounter/LabelsCounter.js";import"../../../Stepper/Stepper.js";import"../../../Stepper/Step/Step.js";import"../../../Stepper/StepsWrapper.js";import"../../../Comment/CommentIcon/index.js";import"../../../FilesLoader/FilesLoader.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/Groups.js";import"../../../Search/components/SelectAllListItem.js";import"../../../StatusBadge/index.js";import"../../../Attachment/index.js";import"../../../EmojiIconButton.js";import"../../../FileUploadIconButton.js";import"../../../FilePreview/index.js";import"../../../FailedFileUploading.js";import"../../../UserMention/index.js";import"../../../CommentsInfo/index.js";import"../../../CommentInput/index.js";import"../../../Comment/index.js";import"../../../CommentLoader.js";import"../../../AssetNameLabel/AssetStatusBadge.js";import"../../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../../AssetEditorV2/components/SelectItem.js";import"../../../AssetEditorV2/components/MultipleAssetsToggle.js";import"../../../AssetEditorV2/components/PrimaryAssetSelectV2.js";import"../../../EChartsWrapper/EChartsWrapper.js";import"../../../AssetsMultipleSelector/AssetsMultipleSelector.js";import"@material-ui/icons/Close";import"@material-ui/icons/GetApp";import"../../../GoogleDocsViewer/index.js";import"../../../NewDocumentViewer/effects/useFileContent.js";import"../../../NewDocumentViewer/styles.js";import"../../../FilesLoaderV2/styles.js";import"../../../FilesDropzone/styles.js";import"../../../FilesProcessor/styles.js";import"../../../Hint/styles.js";import"@babel/runtime/helpers/taggedTemplateLiteral";import"fparser";import"../../../Formula/useFormulaStyles.js";import"../../../Formula/RootXIcon.js";import"../../../Formula/FormulaTextEditor.js";import"../../../Formula/CloseSuggestion.js";import"../../../Formula/SuggestionsMenu.js";var W=function(o){var a=o.open,W=o.isTableLoading,L=o.companyId,F=o.subjectWellId,E=o.sortBy,M=o.setSortBy,R=o.sortDirection,w=o.setSortDirection,k=o.columnsWithDict,q=o.wells,H=o.metricsKeys,O=o.setMetricsKeys,N=o.handleChangeOffsetWell,G=o.handleChangeAllOffsetWells,U=o.handleAddRemoveAssets,z=o.isWellNameExpand,K=o.setIsWellNameExpand,Z=o.isHScrollMoved,X=o.onHideAdvancedSearch,J=o.isViewOnly,Q=o.isLastWell,Y=o.contentRef,$=o.offsetWellsContainerRef,_=o.isLimitedOffsetWells,ee=o.maxOffsetWellNumber,te=o.wellSections,oe=o.setActiveWellId,se=o.viewType,ie=o.isWDUser,re=o.taScores,ne=s([]),pe=t(ne,2),me=pe[0],ae=pe[1],ce=i(),le=i();r((function(){var e=c(q,"id");ae(e)}),[q,q.length]);var de=n((function(){return c(me,"id")}),[me]),je=n((function(){var e=de.filter((function(e){return e.checked}));return[e,de.length!==e.length&&e.length&&!_,e.length===de.length||_]}),[de,_]),ue=t(je,3),Ce=ue[0],Ae=ue[1],he=ue[2],Se=n((function(){return b()}),[]),fe=n((function(){return(H||[]).reduce((function(e,t){return e.concat(A.filter((function(e){return e.key===t})))}),[])}),[H]),ve=n((function(){return z?h-58:S[0].width[H.length]-58}),[z,null==H?void 0:H.length]),ge=n((function(){var e=z?v:g;return re.length&&(e+=function(e,t){var o=e.find((function(e){return e.key===t}));return(null==o?void 0:o.width)||0}(k,V.taScore)),"".concat(e,"px")}),[z,re]);r((function(){if(se!==f.mobile&&ce.current&&le.current){var e=ce.current.querySelector(".".concat(x.wellNameFixed));Z?e.classList.remove(x.noShadow):e.classList.add(x.noShadow);var t=le.current.querySelectorAll(".".concat(x.wellNameFixed));Z?t.forEach((function(e){return e.classList.remove(x.noShadow)})):t.forEach((function(e){return e.classList.add(x.noShadow)}))}}),[Z,le.current,ce.current,me]);var Ve=p((function(e,t){M(e),w(t)}),[]),be=p((function(e){O(e)}),[]),De=p((function(e,t){O((function(o){return o.map((function(o){return o===e?t:o}))}))}),[]);return k&&de?P("div",{className:x.offsetWellsTable,children:[y("div",{className:x.stickyTable,children:y(l,{"aria-label":"ows table head",innerRef:ce,children:y(d,{children:y(I,{open:a,columnsWithDict:k,metricsKeys:H,sortBy:E,sortDirection:R,indeterminate:Ae,isAllWellsSelected:he,onChangeSort:Ve,onChangeMetricsKeys:be,onUpdateMetricsKey:De,isWellNameExpand:z,setIsWellNameExpand:K,handleChangeAllOffsetWells:G,wellNameStyle:x.wellNameFixed,isViewOnly:J,isImperial:Se,contentRef:Y,viewType:se,isTaColumnVisible:!!re.length})})})}),!J&&P("div",{className:m(x.searchCellWrapper,e({},x.searchCellWrapperExpanded,z)),style:{"--dynamic-search-wrapper-width":ge},children:[y("div",{className:x.searchCell,children:y(D,{companyId:L,subjectWellId:F,onChange:U,selectedWellIds:Ce.map((function(e){return e.id})),onHideAdvancedSearch:X})}),!!z&&y("div",{className:x.searchCellEmpty})]}),y(l,{"aria-label":"ows table body",innerRef:le,className:x.bodyTable,children:P(j,{children:[y(u,{children:y(C,{className:m(x.topShadow,e({},x.viewOnlyShadow,J))})}),de.map((function(e){return y(T,{columnsWithDict:k,subjectWellId:F,data:e,metricsKeys:H,metricsColumns:fe,handleChangeOffsetWell:N,isWellNameExpand:z,wellNameStyle:x.wellNameFixed,wellNameWidth:ve,isViewOnly:J,isImperial:Se,isLimitedOffsetWells:_,maxOffsetWellNumber:ee,wellSections:te,setActiveWellId:oe,viewType:se,isWDUser:ie,taScores:re,offsetWellsContainerRef:$},e.id)})),!Q&&y(u,{children:y(C,{className:x.loadingCell,children:y("span",{children:"Loading..."})})}),y(u,{children:y(C,{className:x.bottomShadow})})]})}),W&&y("div",{className:x.loadingContainer,children:y(B,{fullscreen:!1,className:x.loadingIndicator})})]}):null};W.propTypes={open:a.bool.isRequired,isTableLoading:a.bool.isRequired,companyId:a.number.isRequired,subjectWellId:a.number.isRequired,sortBy:a.string.isRequired,setSortBy:a.func.isRequired,sortDirection:a.string.isRequired,setSortDirection:a.func.isRequired,columnsWithDict:a.arrayOf(a.shape({})).isRequired,wells:a.arrayOf(a.shape({})).isRequired,metricsKeys:a.arrayOf(a.string).isRequired,setMetricsKeys:a.func.isRequired,handleChangeOffsetWell:a.func.isRequired,handleChangeAllOffsetWells:a.func.isRequired,handleAddRemoveAssets:a.func.isRequired,setIsWellNameExpand:a.func.isRequired,isWellNameExpand:a.bool.isRequired,isHScrollMoved:a.bool.isRequired,onHideAdvancedSearch:a.func.isRequired,isViewOnly:a.bool.isRequired,isLastWell:a.bool.isRequired,isLimitedOffsetWells:a.bool.isRequired,maxOffsetWellNumber:a.number.isRequired,contentRef:a.shape({}).isRequired,offsetWellsContainerRef:a.shape({}).isRequired,wellSections:a.arrayOf(a.shape({})).isRequired,setActiveWellId:a.func.isRequired,viewType:a.string.isRequired,isWDUser:a.bool.isRequired,taScores:a.arrayOf(a.shape({})).isRequired};var L=o(W);export{L as default};
2
2
  //# sourceMappingURL=OffsetWellsTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellsTable.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js"],"sourcesContent":["import { useState, memo, useCallback, useEffect, useMemo, useRef, Fragment } from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { uniqBy } from 'lodash';\nimport { Table, TableBody, TableCell, TableHead, TableRow } from '@material-ui/core';\n\nimport {\n ColumnType,\n EXPANDED_WELL_NAME_WIDTH,\n SEARCH_CELL_DEFAULT_WIDTH,\n SEARCH_CELL_EXPAND_WIDTH,\n METRICS_LIST,\n ROW_HEIGHT,\n TableColumns,\n ViewType,\n} from '../../constants';\nimport { getIsImperial } from '../../utils/unitSystem';\n\nimport { AdvancedSearch } from './AdvancedSearch';\nimport OffsetWellsTableHead from './OffsetWellsTableHead';\nimport OffsetWellsTableRow from './OffsetWellsTableRow';\n\nimport styles from './OffsetWellsTable.module.css';\n\nimport { LoadingIndicator } from '~/components';\n\nconst FLYING_DURATION = 200;\nconst DIFF_WELL_NAME_WIDTH = 58;\n\nconst getWellsForAnimation = (wells, moveRowCount, oldPosition, newPosition) => {\n const newWells = wells.map((well, index) => {\n const isMoveRow =\n (oldPosition < index && index <= newPosition) ||\n (newPosition <= index && index < oldPosition);\n\n if (index === oldPosition) {\n return { ...well, moveTo: moveRowCount };\n } else if (isMoveRow) {\n return {\n ...well,\n moveTo: oldPosition < newPosition ? -1 : 1,\n delayTime: Math.abs(index - oldPosition),\n };\n }\n return well;\n });\n return newWells;\n};\n\nconst getParametersForAnimation = (wells, newCheckedWellId, updatedWells, contentRef) => {\n const oldPosition = wells.findIndex(well => newCheckedWellId === well.id);\n let newPosition = updatedWells.findIndex(well => newCheckedWellId === well.id);\n if (newPosition === -1) newPosition = updatedWells.length;\n const showRowNumber = Math.round((contentRef.current?.clientHeight - 145) / ROW_HEIGHT + 1);\n const diffPosition = newPosition - oldPosition;\n if (Math.abs(diffPosition) > showRowNumber) {\n newPosition = oldPosition + showRowNumber * Math.sign(diffPosition);\n }\n\n const moveRowCount = newPosition - oldPosition;\n const newFlyDuration = (Math.abs(moveRowCount) * 0.4 + 2) * FLYING_DURATION;\n const newEmptyRowIndex = Math.min(oldPosition, newPosition);\n const newEmptyRowSize = (Math.abs(moveRowCount) + 1) * ROW_HEIGHT;\n\n return [\n oldPosition,\n newPosition,\n moveRowCount,\n newFlyDuration,\n newEmptyRowIndex,\n newEmptyRowSize,\n ];\n};\n\nfunction getCellWidth(columnsWithDict, key) {\n const cell = columnsWithDict.find(item => item.key === key);\n return cell?.width || 0;\n}\n\nconst OffsetWellsTable = ({\n open,\n isTableLoading,\n companyId,\n subjectWellId,\n sortBy,\n setSortBy,\n sortDirection,\n setSortDirection,\n columnsWithDict,\n wells: updatedWells,\n metricsKeys,\n setMetricsKeys,\n handleChangeOffsetWell,\n handleChangeAllOffsetWells,\n handleAddRemoveAssets,\n isWellNameExpand,\n setIsWellNameExpand,\n isHScrollMoved,\n onHideAdvancedSearch,\n isViewOnly,\n isLastWell,\n contentRef,\n isLimitedOffsetWells,\n maxOffsetWellNumber,\n wellSections,\n setActiveWellId,\n viewType,\n isWDUser,\n taScores,\n}) => {\n const [wells, setWells] = useState([]);\n const [newCheckedWellId, setNewCheckedWellId] = useState(null);\n const [emptyRowIndex, setEmptyRowIndex] = useState(0);\n const [emptyRowSize, setEmptyRowSize] = useState(0);\n /** @type {ReturnType<typeof useRef<HTMLElement>>} */\n const headTableRef = useRef();\n /** @type {ReturnType<typeof useRef<HTMLElement>>} */\n const bodyTableRef = useRef();\n const flyDurationRef = useRef();\n\n useEffect(() => {\n const uniqOldWells = uniqBy(wells, 'id');\n const uniqUpdatedWells = uniqBy(updatedWells, 'id');\n\n if (!newCheckedWellId) {\n setWells(uniqUpdatedWells);\n setEmptyRowSize(0);\n return;\n }\n\n const [\n oldPosition,\n newPosition,\n moveRowCount,\n newFlyDuration,\n newEmptyRowIndex,\n newEmptyRowSize,\n ] = getParametersForAnimation(uniqOldWells, newCheckedWellId, uniqUpdatedWells, contentRef);\n\n flyDurationRef.current = newFlyDuration;\n\n if (newPosition === oldPosition) {\n setWells(uniqUpdatedWells);\n } else {\n setEmptyRowIndex(newEmptyRowIndex);\n setEmptyRowSize(newEmptyRowSize);\n const newWells = getWellsForAnimation(uniqOldWells, moveRowCount, oldPosition, newPosition);\n setWells(newWells);\n\n setTimeout(() => {\n setWells(uniqUpdatedWells);\n setEmptyRowSize(0);\n setNewCheckedWellId(null);\n }, newFlyDuration);\n }\n }, [updatedWells, updatedWells.length]);\n\n const uniqWells = useMemo(() => uniqBy(wells, 'id'), [wells]);\n\n const [selectedWells, indeterminate, isAllWellsSelected] = useMemo(() => {\n const selectedWells = uniqWells.filter(well => well.checked);\n const indeterminate =\n uniqWells.length !== selectedWells.length && selectedWells.length && !isLimitedOffsetWells;\n const isAllWellsSelected = selectedWells.length === uniqWells.length || isLimitedOffsetWells;\n\n return [selectedWells, indeterminate, isAllWellsSelected];\n }, [uniqWells, isLimitedOffsetWells]);\n\n const isImperial = useMemo(() => getIsImperial(), []);\n\n const metricsColumns = useMemo(() => {\n // NOTE: Pay attention to the order of metrics and duplication\n return (metricsKeys || []).reduce(\n (result, key) => result.concat(METRICS_LIST.filter(item => item.key === key)),\n []\n );\n }, [metricsKeys]);\n\n const wellNameWidth = useMemo(() => {\n if (isWellNameExpand) return EXPANDED_WELL_NAME_WIDTH - DIFF_WELL_NAME_WIDTH;\n return TableColumns[0].width[metricsKeys.length] - DIFF_WELL_NAME_WIDTH;\n }, [isWellNameExpand, metricsKeys?.length]);\n\n const searchWrapperWidth = useMemo(() => {\n let initialWidth = isWellNameExpand ? SEARCH_CELL_EXPAND_WIDTH : SEARCH_CELL_DEFAULT_WIDTH;\n if (taScores.length) {\n initialWidth += getCellWidth(columnsWithDict, ColumnType.taScore);\n }\n return `${initialWidth}px`;\n }, [isWellNameExpand, taScores]);\n\n // NOTE: Remove shadow from column\n useEffect(() => {\n if (viewType === ViewType.mobile || !headTableRef.current || !bodyTableRef.current) return;\n // Head table\n const headColumn = headTableRef.current.querySelector(`.${styles.wellNameFixed}`);\n if (!isHScrollMoved) {\n headColumn.classList.add(styles.noShadow);\n } else {\n headColumn.classList.remove(styles.noShadow);\n }\n\n // Body table\n const bodyColumns = bodyTableRef.current.querySelectorAll(`.${styles.wellNameFixed}`);\n if (!isHScrollMoved) {\n bodyColumns.forEach(th => th.classList.add(styles.noShadow));\n } else {\n bodyColumns.forEach(th => th.classList.remove(styles.noShadow));\n }\n }, [isHScrollMoved, bodyTableRef.current, headTableRef.current, wells]);\n\n const handleChangeSortBy = useCallback((sortKey, sortDirection) => {\n setSortBy(sortKey);\n setSortDirection(sortDirection);\n }, []);\n\n const handleChangeMetricsKeys = useCallback(newMetricsKeys => {\n setMetricsKeys(newMetricsKeys);\n }, []);\n\n const handleUpdateMetricsKey = useCallback((key, newValue) => {\n setMetricsKeys(prevKeys => prevKeys.map(item => (item === key ? newValue : item)));\n }, []);\n\n if (!columnsWithDict || !uniqWells) return null;\n\n return (\n <div className={styles.offsetWellsTable}>\n <div className={styles.stickyTable}>\n <Table aria-label=\"ows table head\" innerRef={headTableRef}>\n <TableHead>\n <OffsetWellsTableHead\n open={open}\n columnsWithDict={columnsWithDict}\n metricsKeys={metricsKeys}\n sortBy={sortBy}\n sortDirection={sortDirection}\n indeterminate={indeterminate}\n isAllWellsSelected={isAllWellsSelected}\n onChangeSort={handleChangeSortBy}\n onChangeMetricsKeys={handleChangeMetricsKeys}\n onUpdateMetricsKey={handleUpdateMetricsKey}\n isWellNameExpand={isWellNameExpand}\n setIsWellNameExpand={setIsWellNameExpand}\n handleChangeAllOffsetWells={handleChangeAllOffsetWells}\n wellNameStyle={styles.wellNameFixed}\n isViewOnly={isViewOnly}\n isImperial={isImperial}\n contentRef={contentRef}\n viewType={viewType}\n isTaColumnVisible={!!taScores.length}\n />\n </TableHead>\n </Table>\n </div>\n\n {!isViewOnly && (\n <div\n className={classNames(styles.searchCellWrapper, {\n [styles.searchCellWrapperExpanded]: isWellNameExpand,\n })}\n style={{ '--dynamic-search-wrapper-width': searchWrapperWidth }}\n >\n <div className={styles.searchCell}>\n <AdvancedSearch\n companyId={companyId}\n subjectWellId={subjectWellId}\n onChange={handleAddRemoveAssets}\n selectedWellIds={selectedWells.map(({ id }) => id)}\n onHideAdvancedSearch={onHideAdvancedSearch}\n />\n </div>\n {!!isWellNameExpand && <div className={styles.searchCellEmpty} />}\n </div>\n )}\n\n <Table aria-label=\"ows table body\" innerRef={bodyTableRef} className={styles.bodyTable}>\n <TableBody>\n <TableRow>\n <TableCell\n className={classNames(styles.topShadow, { [styles.viewOnlyShadow]: isViewOnly })}\n />\n </TableRow>\n {uniqWells.map((well, index) => (\n <Fragment key={well.id}>\n <TableRow>\n {newCheckedWellId && emptyRowSize > 0 && index === emptyRowIndex && (\n <TableCell style={{ height: emptyRowSize }} />\n )}\n </TableRow>\n <OffsetWellsTableRow\n columnsWithDict={columnsWithDict}\n subjectWellId={subjectWellId}\n data={well}\n metricsKeys={metricsKeys}\n metricsColumns={metricsColumns}\n handleChangeOffsetWell={handleChangeOffsetWell}\n isWellNameExpand={isWellNameExpand}\n wellNameStyle={styles.wellNameFixed}\n wellNameWidth={wellNameWidth}\n isViewOnly={isViewOnly}\n isImperial={isImperial}\n isLimitedOffsetWells={isLimitedOffsetWells}\n maxOffsetWellNumber={maxOffsetWellNumber}\n wellSections={wellSections}\n setActiveWellId={setActiveWellId}\n viewType={viewType}\n newCheckedWellId={well?.moveTo ? newCheckedWellId : 0}\n setNewCheckedWellId={setNewCheckedWellId}\n index={well?.moveTo ? index : 0}\n flyDuration={well?.moveTo ? flyDurationRef.current : 0}\n isWDUser={isWDUser}\n taScores={taScores}\n />\n </Fragment>\n ))}\n {!isLastWell && (\n <TableRow>\n <TableCell className={styles.loadingCell}>\n <span>Loading...</span>\n </TableCell>\n </TableRow>\n )}\n <TableRow>\n <TableCell className={styles.bottomShadow} />\n </TableRow>\n </TableBody>\n </Table>\n\n {isTableLoading && (\n <div className={styles.loadingContainer}>\n <LoadingIndicator fullscreen={false} className={styles.loadingIndicator} />\n </div>\n )}\n </div>\n );\n};\n\nOffsetWellsTable.propTypes = {\n open: PropTypes.bool.isRequired,\n isTableLoading: PropTypes.bool.isRequired,\n companyId: PropTypes.number.isRequired,\n subjectWellId: PropTypes.number.isRequired,\n sortBy: PropTypes.string.isRequired,\n setSortBy: PropTypes.func.isRequired,\n sortDirection: PropTypes.string.isRequired,\n setSortDirection: PropTypes.func.isRequired,\n columnsWithDict: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n wells: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n setMetricsKeys: PropTypes.func.isRequired,\n handleChangeOffsetWell: PropTypes.func.isRequired,\n handleChangeAllOffsetWells: PropTypes.func.isRequired,\n handleAddRemoveAssets: PropTypes.func.isRequired,\n setIsWellNameExpand: PropTypes.func.isRequired,\n isWellNameExpand: PropTypes.bool.isRequired,\n isHScrollMoved: PropTypes.bool.isRequired,\n onHideAdvancedSearch: PropTypes.func.isRequired,\n isViewOnly: PropTypes.bool.isRequired,\n isLastWell: PropTypes.bool.isRequired,\n isLimitedOffsetWells: PropTypes.bool.isRequired,\n maxOffsetWellNumber: PropTypes.number.isRequired,\n contentRef: PropTypes.shape({}).isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n setActiveWellId: PropTypes.func.isRequired,\n viewType: PropTypes.string.isRequired,\n isWDUser: PropTypes.bool.isRequired,\n taScores: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n};\n\nexport default memo(OffsetWellsTable);\n"],"names":["OffsetWellsTable","_ref","open","isTableLoading","companyId","subjectWellId","sortBy","setSortBy","sortDirection","setSortDirection","columnsWithDict","updatedWells","wells","metricsKeys","setMetricsKeys","handleChangeOffsetWell","handleChangeAllOffsetWells","handleAddRemoveAssets","isWellNameExpand","setIsWellNameExpand","isHScrollMoved","onHideAdvancedSearch","isViewOnly","isLastWell","contentRef","isLimitedOffsetWells","maxOffsetWellNumber","wellSections","setActiveWellId","viewType","isWDUser","taScores","useState","_useState2","_slicedToArray","_useState","setWells","_useState4","_useState3","newCheckedWellId","setNewCheckedWellId","_useState6","_useState5","emptyRowIndex","setEmptyRowIndex","_useState8","_useState7","emptyRowSize","setEmptyRowSize","headTableRef","useRef","bodyTableRef","flyDurationRef","useEffect","uniqOldWells","uniqBy","uniqUpdatedWells","getParametersForAnimation","_contentRef$current","oldPosition","findIndex","well","id","newPosition","length","showRowNumber","Math","round","current","clientHeight","ROW_HEIGHT","diffPosition","abs","sign","moveRowCount","min","_getParametersForAnim2","_getParametersForAnim","newFlyDuration","newEmptyRowIndex","newEmptyRowSize","newWells","map","index","isMoveRow","_objectSpread","moveTo","delayTime","getWellsForAnimation","setTimeout","uniqWells","useMemo","selectedWells","filter","checked","_useMemo2","_useMemo","indeterminate","isAllWellsSelected","isImperial","getIsImperial","metricsColumns","reduce","result","key","concat","METRICS_LIST","item","wellNameWidth","EXPANDED_WELL_NAME_WIDTH","TableColumns","width","searchWrapperWidth","initialWidth","SEARCH_CELL_EXPAND_WIDTH","SEARCH_CELL_DEFAULT_WIDTH","cell","find","getCellWidth","ColumnType","taScore","ViewType","mobile","headColumn","querySelector","styles","wellNameFixed","classList","remove","noShadow","add","bodyColumns","querySelectorAll","forEach","th","handleChangeSortBy","useCallback","sortKey","handleChangeMetricsKeys","newMetricsKeys","handleUpdateMetricsKey","newValue","prevKeys","_jsxs","className","offsetWellsTable","children","_jsx","stickyTable","Table","innerRef","TableHead","OffsetWellsTableHead","onChangeSort","onChangeMetricsKeys","onUpdateMetricsKey","wellNameStyle","isTaColumnVisible","classNames","searchCellWrapper","searchCellWrapperExpanded","style","searchCell","AdvancedSearch","onChange","selectedWellIds","_ref2","searchCellEmpty","bodyTable","TableBody","TableRow","TableCell","topShadow","_defineProperty","viewOnlyShadow","Fragment","height","OffsetWellsTableRow","data","flyDuration","loadingCell","bottomShadow","loadingContainer","LoadingIndicator","fullscreen","loadingIndicator","propTypes","PropTypes","bool","isRequired","number","string","func","arrayOf","shape","memo"],"mappings":"oivBA+EA,IAAMA,EAAmB,SA8BnBC,GAAA,IA7BJC,IAAAA,KACAC,IAAAA,eACAC,IAAAA,UACAC,IAAAA,cACAC,IAAAA,OACAC,IAAAA,UACAC,IAAAA,cACAC,IAAAA,iBACAC,IAAAA,gBACOC,IAAPC,MACAC,IAAAA,YACAC,IAAAA,eACAC,IAAAA,uBACAC,IAAAA,2BACAC,IAAAA,sBACAC,IAAAA,iBACAC,IAAAA,oBACAC,IAAAA,eACAC,IAAAA,qBACAC,IAAAA,WACAC,IAAAA,WACAC,KAAAA,WACAC,KAAAA,qBACAC,KAAAA,oBACAC,KAAAA,aACAC,KAAAA,gBACAC,KAAAA,SACAC,KAAAA,SACAC,KAAAA,SAE0BC,GAAAA,EAAS,IAAGC,GAAAC,EAAAC,GAAA,GAA/BvB,GAAKqB,GAAA,GAAEG,GAAQH,GAAA,GAC0BD,GAAAA,EAAS,MAAKK,GAAAH,EAAAI,GAAA,GAAvDC,GAAgBF,GAAA,GAAEG,GAAmBH,GAAA,GACFL,GAAAA,EAAS,GAAES,GAAAP,EAAAQ,GAAA,GAA9CC,GAAaF,GAAA,GAAEG,GAAgBH,GAAA,GACET,GAAAA,EAAS,GAAEa,GAAAX,EAAAY,GAAA,GAA5CC,GAAYF,GAAA,GAAEG,GAAeH,GAAA,GAE9BI,GAAeC,IAEfC,GAAeD,IACfE,GAAiBF,IAEvBG,GAAU,WACR,IAAMC,EAAeC,EAAO3C,GAAO,MAC7B4C,EAAmBD,EAAO5C,EAAc,M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AAUO,MAAM,CAAA,IAAKL,WAC9ChL,YAAa8K,EAAUM,QAAQN,EAAUI,QAAQF,WACjD/K,eAAgB6K,EAAUK,KAAKH,WAC/B9K,uBAAwB4K,EAAUK,KAAKH,WACvC7K,2BAA4B2K,EAAUK,KAAKH,WAC3C5K,sBAAuB0K,EAAUK,KAAKH,WACtC1K,oBAAqBwK,EAAUK,KAAKH,WACpC3K,iBAAkByK,EAAUC,KAAKC,WACjCzK,eAAgBuK,EAAUC,KAAKC,WAC/BxK,qBAAsBsK,EAAUK,KAAKH,WACrCvK,WAAYqK,EAAUC,KAAKC,WAC3BtK,WAAYoK,EAAUC,KAAKC,WAC3BpK,qBAAsBkK,EAAUC,KAAKC,WACrCnK,oBAAqBiK,EAAUG,OAAOD,WACtCrK,WAAYmK,EAAUO,MAAM,CAAA,GAAIL,WAChClK,aAAcgK,EAAUM,QAAQN,EAAUO,MAAM,CAAA,IAAKL,WACrDjK,gBAAiB+J,EAAUK,KAAKH,WAChChK,SAAU8J,EAAUI,OAAOF,WAC3B/J,SAAU6J,EAAUC,KAAKC,WACzB9J,SAAU4J,EAAUM,QAAQN,EAAUO,MAAM,CAAA,IAAKL,YAGnD,IAAeM,EAAAA,EAAKnM"}
1
+ {"version":3,"file":"OffsetWellsTable.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js"],"sourcesContent":["import { useState, memo, useCallback, useEffect, useMemo, useRef } from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { uniqBy } from 'lodash';\nimport { Table, TableBody, TableCell, TableHead, TableRow } from '@material-ui/core';\n\nimport {\n ColumnType,\n EXPANDED_WELL_NAME_WIDTH,\n SEARCH_CELL_DEFAULT_WIDTH,\n SEARCH_CELL_EXPAND_WIDTH,\n METRICS_LIST,\n TableColumns,\n ViewType,\n} from '../../constants';\nimport { getIsImperial } from '../../utils/unitSystem';\n\nimport { AdvancedSearch } from './AdvancedSearch';\nimport OffsetWellsTableHead from './OffsetWellsTableHead';\nimport OffsetWellsTableRow from './OffsetWellsTableRow';\n\nimport styles from './OffsetWellsTable.module.css';\n\nimport { LoadingIndicator } from '~/components';\n\nconst DIFF_WELL_NAME_WIDTH = 58;\n\nfunction getCellWidth(columnsWithDict, key) {\n const cell = columnsWithDict.find(item => item.key === key);\n return cell?.width || 0;\n}\n\nconst OffsetWellsTable = ({\n open,\n isTableLoading,\n companyId,\n subjectWellId,\n sortBy,\n setSortBy,\n sortDirection,\n setSortDirection,\n columnsWithDict,\n wells: updatedWells,\n metricsKeys,\n setMetricsKeys,\n handleChangeOffsetWell,\n handleChangeAllOffsetWells,\n handleAddRemoveAssets,\n isWellNameExpand,\n setIsWellNameExpand,\n isHScrollMoved,\n onHideAdvancedSearch,\n isViewOnly,\n isLastWell,\n contentRef,\n offsetWellsContainerRef,\n isLimitedOffsetWells,\n maxOffsetWellNumber,\n wellSections,\n setActiveWellId,\n viewType,\n isWDUser,\n taScores,\n}) => {\n const [wells, setWells] = useState([]);\n /** @type {ReturnType<typeof useRef<HTMLElement>>} */\n const headTableRef = useRef();\n /** @type {ReturnType<typeof useRef<HTMLElement>>} */\n const bodyTableRef = useRef();\n\n useEffect(() => {\n const uniqUpdatedWells = uniqBy(updatedWells, 'id');\n setWells(uniqUpdatedWells);\n }, [updatedWells, updatedWells.length]);\n\n const uniqWells = useMemo(() => uniqBy(wells, 'id'), [wells]);\n\n const [selectedWells, indeterminate, isAllWellsSelected] = useMemo(() => {\n const selectedWells = uniqWells.filter(well => well.checked);\n const indeterminate =\n uniqWells.length !== selectedWells.length && selectedWells.length && !isLimitedOffsetWells;\n const isAllWellsSelected = selectedWells.length === uniqWells.length || isLimitedOffsetWells;\n\n return [selectedWells, indeterminate, isAllWellsSelected];\n }, [uniqWells, isLimitedOffsetWells]);\n\n const isImperial = useMemo(() => getIsImperial(), []);\n\n const metricsColumns = useMemo(() => {\n // NOTE: Pay attention to the order of metrics and duplication\n return (metricsKeys || []).reduce(\n (result, key) => result.concat(METRICS_LIST.filter(item => item.key === key)),\n []\n );\n }, [metricsKeys]);\n\n const wellNameWidth = useMemo(() => {\n if (isWellNameExpand) return EXPANDED_WELL_NAME_WIDTH - DIFF_WELL_NAME_WIDTH;\n return TableColumns[0].width[metricsKeys.length] - DIFF_WELL_NAME_WIDTH;\n }, [isWellNameExpand, metricsKeys?.length]);\n\n const searchWrapperWidth = useMemo(() => {\n let initialWidth = isWellNameExpand ? SEARCH_CELL_EXPAND_WIDTH : SEARCH_CELL_DEFAULT_WIDTH;\n if (taScores.length) {\n initialWidth += getCellWidth(columnsWithDict, ColumnType.taScore);\n }\n return `${initialWidth}px`;\n }, [isWellNameExpand, taScores]);\n\n // NOTE: Remove shadow from column\n useEffect(() => {\n if (viewType === ViewType.mobile || !headTableRef.current || !bodyTableRef.current) return;\n // Head table\n const headColumn = headTableRef.current.querySelector(`.${styles.wellNameFixed}`);\n if (!isHScrollMoved) {\n headColumn.classList.add(styles.noShadow);\n } else {\n headColumn.classList.remove(styles.noShadow);\n }\n\n // Body table\n const bodyColumns = bodyTableRef.current.querySelectorAll(`.${styles.wellNameFixed}`);\n if (!isHScrollMoved) {\n bodyColumns.forEach(th => th.classList.add(styles.noShadow));\n } else {\n bodyColumns.forEach(th => th.classList.remove(styles.noShadow));\n }\n }, [isHScrollMoved, bodyTableRef.current, headTableRef.current, wells]);\n\n const handleChangeSortBy = useCallback((sortKey, sortDirection) => {\n setSortBy(sortKey);\n setSortDirection(sortDirection);\n }, []);\n\n const handleChangeMetricsKeys = useCallback(newMetricsKeys => {\n setMetricsKeys(newMetricsKeys);\n }, []);\n\n const handleUpdateMetricsKey = useCallback((key, newValue) => {\n setMetricsKeys(prevKeys => prevKeys.map(item => (item === key ? newValue : item)));\n }, []);\n\n if (!columnsWithDict || !uniqWells) return null;\n\n return (\n <div className={styles.offsetWellsTable}>\n <div className={styles.stickyTable}>\n <Table aria-label=\"ows table head\" innerRef={headTableRef}>\n <TableHead>\n <OffsetWellsTableHead\n open={open}\n columnsWithDict={columnsWithDict}\n metricsKeys={metricsKeys}\n sortBy={sortBy}\n sortDirection={sortDirection}\n indeterminate={indeterminate}\n isAllWellsSelected={isAllWellsSelected}\n onChangeSort={handleChangeSortBy}\n onChangeMetricsKeys={handleChangeMetricsKeys}\n onUpdateMetricsKey={handleUpdateMetricsKey}\n isWellNameExpand={isWellNameExpand}\n setIsWellNameExpand={setIsWellNameExpand}\n handleChangeAllOffsetWells={handleChangeAllOffsetWells}\n wellNameStyle={styles.wellNameFixed}\n isViewOnly={isViewOnly}\n isImperial={isImperial}\n contentRef={contentRef}\n viewType={viewType}\n isTaColumnVisible={!!taScores.length}\n />\n </TableHead>\n </Table>\n </div>\n\n {!isViewOnly && (\n <div\n className={classNames(styles.searchCellWrapper, {\n [styles.searchCellWrapperExpanded]: isWellNameExpand,\n })}\n style={{ '--dynamic-search-wrapper-width': searchWrapperWidth }}\n >\n <div className={styles.searchCell}>\n <AdvancedSearch\n companyId={companyId}\n subjectWellId={subjectWellId}\n onChange={handleAddRemoveAssets}\n selectedWellIds={selectedWells.map(({ id }) => id)}\n onHideAdvancedSearch={onHideAdvancedSearch}\n />\n </div>\n {!!isWellNameExpand && <div className={styles.searchCellEmpty} />}\n </div>\n )}\n\n <Table aria-label=\"ows table body\" innerRef={bodyTableRef} className={styles.bodyTable}>\n <TableBody>\n <TableRow>\n <TableCell\n className={classNames(styles.topShadow, { [styles.viewOnlyShadow]: isViewOnly })}\n />\n </TableRow>\n {uniqWells.map(well => (\n <OffsetWellsTableRow\n key={well.id}\n columnsWithDict={columnsWithDict}\n subjectWellId={subjectWellId}\n data={well}\n metricsKeys={metricsKeys}\n metricsColumns={metricsColumns}\n handleChangeOffsetWell={handleChangeOffsetWell}\n isWellNameExpand={isWellNameExpand}\n wellNameStyle={styles.wellNameFixed}\n wellNameWidth={wellNameWidth}\n isViewOnly={isViewOnly}\n isImperial={isImperial}\n isLimitedOffsetWells={isLimitedOffsetWells}\n maxOffsetWellNumber={maxOffsetWellNumber}\n wellSections={wellSections}\n setActiveWellId={setActiveWellId}\n viewType={viewType}\n isWDUser={isWDUser}\n taScores={taScores}\n offsetWellsContainerRef={offsetWellsContainerRef}\n />\n ))}\n {!isLastWell && (\n <TableRow>\n <TableCell className={styles.loadingCell}>\n <span>Loading...</span>\n </TableCell>\n </TableRow>\n )}\n <TableRow>\n <TableCell className={styles.bottomShadow} />\n </TableRow>\n </TableBody>\n </Table>\n\n {isTableLoading && (\n <div className={styles.loadingContainer}>\n <LoadingIndicator fullscreen={false} className={styles.loadingIndicator} />\n </div>\n )}\n </div>\n );\n};\n\nOffsetWellsTable.propTypes = {\n open: PropTypes.bool.isRequired,\n isTableLoading: PropTypes.bool.isRequired,\n companyId: PropTypes.number.isRequired,\n subjectWellId: PropTypes.number.isRequired,\n sortBy: PropTypes.string.isRequired,\n setSortBy: PropTypes.func.isRequired,\n sortDirection: PropTypes.string.isRequired,\n setSortDirection: PropTypes.func.isRequired,\n columnsWithDict: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n wells: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n setMetricsKeys: PropTypes.func.isRequired,\n handleChangeOffsetWell: PropTypes.func.isRequired,\n handleChangeAllOffsetWells: PropTypes.func.isRequired,\n handleAddRemoveAssets: PropTypes.func.isRequired,\n setIsWellNameExpand: PropTypes.func.isRequired,\n isWellNameExpand: PropTypes.bool.isRequired,\n isHScrollMoved: PropTypes.bool.isRequired,\n onHideAdvancedSearch: PropTypes.func.isRequired,\n isViewOnly: PropTypes.bool.isRequired,\n isLastWell: PropTypes.bool.isRequired,\n isLimitedOffsetWells: PropTypes.bool.isRequired,\n maxOffsetWellNumber: PropTypes.number.isRequired,\n contentRef: PropTypes.shape({}).isRequired,\n offsetWellsContainerRef: PropTypes.shape({}).isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n setActiveWellId: PropTypes.func.isRequired,\n viewType: PropTypes.string.isRequired,\n isWDUser: PropTypes.bool.isRequired,\n taScores: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n};\n\nexport default memo(OffsetWellsTable);\n"],"names":["OffsetWellsTable","_ref","open","isTableLoading","companyId","subjectWellId","sortBy","setSortBy","sortDirection","setSortDirection","columnsWithDict","updatedWells","wells","metricsKeys","setMetricsKeys","handleChangeOffsetWell","handleChangeAllOffsetWells","handleAddRemoveAssets","isWellNameExpand","setIsWellNameExpand","isHScrollMoved","onHideAdvancedSearch","isViewOnly","isLastWell","contentRef","offsetWellsContainerRef","isLimitedOffsetWells","maxOffsetWellNumber","wellSections","setActiveWellId","viewType","isWDUser","taScores","useState","_useState2","_slicedToArray","_useState","setWells","headTableRef","useRef","bodyTableRef","useEffect","uniqUpdatedWells","uniqBy","length","uniqWells","useMemo","selectedWells","filter","well","checked","_useMemo2","_useMemo","indeterminate","isAllWellsSelected","isImperial","getIsImperial","metricsColumns","reduce","result","key","concat","METRICS_LIST","item","wellNameWidth","EXPANDED_WELL_NAME_WIDTH","TableColumns","width","searchWrapperWidth","initialWidth","SEARCH_CELL_EXPAND_WIDTH","SEARCH_CELL_DEFAULT_WIDTH","cell","find","getCellWidth","ColumnType","taScore","ViewType","mobile","current","headColumn","querySelector","styles","wellNameFixed","classList","remove","noShadow","add","bodyColumns","querySelectorAll","forEach","th","handleChangeSortBy","useCallback","sortKey","handleChangeMetricsKeys","newMetricsKeys","handleUpdateMetricsKey","newValue","prevKeys","map","_jsxs","className","offsetWellsTable","children","_jsx","stickyTable","Table","innerRef","TableHead","OffsetWellsTableHead","onChangeSort","onChangeMetricsKeys","onUpdateMetricsKey","wellNameStyle","isTaColumnVisible","classNames","searchCellWrapper","searchCellWrapperExpanded","style","searchCell","AdvancedSearch","onChange","selectedWellIds","_ref2","id","searchCellEmpty","bodyTable","TableBody","TableRow","TableCell","topShadow","_defineProperty","viewOnlyShadow","OffsetWellsTableRow","data","loadingCell","bottomShadow","loadingContainer","LoadingIndicator","fullscreen","loadingIndicator","propTypes","PropTypes","bool","isRequired","number","string","func","arrayOf","shape","memo"],"mappings":"u8tBAgCA,IAAMA,EAAmB,SA+BnBC,GAAA,IA9BJC,IAAAA,KACAC,IAAAA,eACAC,IAAAA,UACAC,IAAAA,cACAC,IAAAA,OACAC,IAAAA,UACAC,IAAAA,cACAC,IAAAA,iBACAC,IAAAA,gBACOC,IAAPC,MACAC,IAAAA,YACAC,IAAAA,eACAC,IAAAA,uBACAC,IAAAA,2BACAC,IAAAA,sBACAC,IAAAA,iBACAC,IAAAA,oBACAC,IAAAA,eACAC,IAAAA,qBACAC,IAAAA,WACAC,IAAAA,WACAC,IAAAA,WACAC,IAAAA,wBACAC,IAAAA,qBACAC,KAAAA,oBACAC,KAAAA,aACAC,KAAAA,gBACAC,KAAAA,SACAC,KAAAA,SACAC,KAAAA,SAE0BC,GAAAA,EAAS,IAAGC,GAAAC,EAAAC,GAAA,GAA/BxB,GAAKsB,GAAA,GAAEG,GAAQH,GAAA,GAEhBI,GAAeC,IAEfC,GAAeD,IAErBE,GAAU,WACR,IAAMC,EAAmBC,EAAOhC,EAAc,MAC9C0B,GAASK,EACV,GAAE,CAAC/B,EAAcA,EAAaiC,SAE/B,IAAMC,GAAYC,GAAQ,WAAA,OAAMH,EAAO/B,GAAO,QAAO,CAACA,KAEKkC,GAAAA,GAAQ,WACjE,IAAMC,EAAgBF,GAAUG,QAAO,SAAAC,GAAI,OAAIA,EAAKC,WAKpD,MAAO,CAACH,EAHNF,GAAUD,SAAWG,EAAcH,QAAUG,EAAcH,SAAWlB,EAC7CqB,EAAcH,SAAWC,GAAUD,QAAUlB,EAG1E,GAAG,CAACmB,GAAWnB,IAAsByB,GAAAhB,EAAAiB,GAAA,GAP9BL,GAAaI,GAAA,GAAEE,GAAaF,GAAA,GAAEG,GAAkBH,GAAA,GASjDI,GAAaT,GAAQ,WAAA,OAAMU,GAAe,GAAE,IAE5CC,GAAiBX,GAAQ,WAE7B,OAAQjC,GAAe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O,MAAM,CAAA,IAAKL,WACxDrI,MAAOmI,EAAUM,QAAQN,EAAUO,MAAM,CAAA,IAAKL,WAC9CpI,YAAakI,EAAUM,QAAQN,EAAUI,QAAQF,WACjDnI,eAAgBiI,EAAUK,KAAKH,WAC/BlI,uBAAwBgI,EAAUK,KAAKH,WACvCjI,2BAA4B+H,EAAUK,KAAKH,WAC3ChI,sBAAuB8H,EAAUK,KAAKH,WACtC9H,oBAAqB4H,EAAUK,KAAKH,WACpC/H,iBAAkB6H,EAAUC,KAAKC,WACjC7H,eAAgB2H,EAAUC,KAAKC,WAC/B5H,qBAAsB0H,EAAUK,KAAKH,WACrC3H,WAAYyH,EAAUC,KAAKC,WAC3B1H,WAAYwH,EAAUC,KAAKC,WAC3BvH,qBAAsBqH,EAAUC,KAAKC,WACrCtH,oBAAqBoH,EAAUG,OAAOD,WACtCzH,WAAYuH,EAAUO,MAAM,CAAA,GAAIL,WAChCxH,wBAAyBsH,EAAUO,MAAM,CAAA,GAAIL,WAC7CrH,aAAcmH,EAAUM,QAAQN,EAAUO,MAAM,CAAA,IAAKL,WACrDpH,gBAAiBkH,EAAUK,KAAKH,WAChCnH,SAAUiH,EAAUI,OAAOF,WAC3BlH,SAAUgH,EAAUC,KAAKC,WACzBjH,SAAU+G,EAAUM,QAAQN,EAAUO,MAAM,CAAA,IAAKL,YAGnD,IAAeM,EAAAA,EAAKvJ"}
@@ -1,5 +1,5 @@
1
1
  declare const _default: import("react").MemoExoticComponent<{
2
- ({ columnsWithDict, data, subjectWellId, metricsKeys, metricsColumns, handleChangeOffsetWell, isWellNameExpand, wellNameStyle, wellNameWidth, isViewOnly, isImperial, isLimitedOffsetWells, maxOffsetWellNumber, wellSections, setActiveWellId, viewType, newCheckedWellId, setNewCheckedWellId, index, flyDuration, isWDUser, taScores, }: {
2
+ ({ columnsWithDict, data, subjectWellId, metricsKeys, metricsColumns, handleChangeOffsetWell, isWellNameExpand, wellNameStyle, wellNameWidth, isViewOnly, isImperial, isLimitedOffsetWells, maxOffsetWellNumber, wellSections, setActiveWellId, viewType, isWDUser, taScores, offsetWellsContainerRef, }: {
3
3
  columnsWithDict: any;
4
4
  data: any;
5
5
  subjectWellId: any;
@@ -16,12 +16,9 @@ declare const _default: import("react").MemoExoticComponent<{
16
16
  wellSections: any;
17
17
  setActiveWellId: any;
18
18
  viewType: any;
19
- newCheckedWellId: any;
20
- setNewCheckedWellId: any;
21
- index: any;
22
- flyDuration: any;
23
19
  isWDUser: any;
24
20
  taScores: any;
21
+ offsetWellsContainerRef: any;
25
22
  }): JSX.Element;
26
23
  propTypes: {
27
24
  columnsWithDict: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
@@ -30,8 +27,6 @@ declare const _default: import("react").MemoExoticComponent<{
30
27
  checked: PropTypes.Requireable<boolean>;
31
28
  name: PropTypes.Requireable<string>;
32
29
  status: PropTypes.Requireable<string>;
33
- moveTo: PropTypes.Requireable<number>;
34
- delayTime: PropTypes.Requireable<number>;
35
30
  }>>>;
36
31
  subjectWellId: PropTypes.Validator<number>;
37
32
  metricsKeys: PropTypes.Validator<string[]>;
@@ -47,12 +42,9 @@ declare const _default: import("react").MemoExoticComponent<{
47
42
  wellSections: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
48
43
  setActiveWellId: PropTypes.Validator<(...args: any[]) => any>;
49
44
  viewType: PropTypes.Validator<string>;
50
- newCheckedWellId: PropTypes.Validator<number>;
51
- setNewCheckedWellId: PropTypes.Validator<(...args: any[]) => any>;
52
- index: PropTypes.Validator<number>;
53
- flyDuration: PropTypes.Validator<number>;
54
45
  isWDUser: PropTypes.Validator<boolean>;
55
46
  taScores: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
47
+ offsetWellsContainerRef: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
56
48
  };
57
49
  }>;
58
50
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellsTableRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBACsB,YAAY"}
1
+ {"version":3,"file":"OffsetWellsTableRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBACsB,YAAY"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as l,useState as i,useRef as a,useCallback as n,useEffect as s,useMemo as r}from"react";import o from"prop-types";import{omit as c,startCase as d,get as u}from"lodash";import m from"classnames";import f from"moment";import{TableRow as h,TableCell as y,Tooltip as b,Checkbox as p,Typography as v}from"@material-ui/core";import{ColumnType as w,ROW_HEIGHT as N,ViewType as W,EXPANDED_WELL_NAME_WIDTH as g,LEAVE_TOUCH_DELAY as R,StatusOptions as k}from"../../constants.js";import{SubjectWellMark as C}from"./SubjectWellMark.js";import q from"./ViewWellSectionsName.js";import T from"./OffsetWellsTableRow.module.css.js";import{convertValue as x}from"../../../../utils/index.js";import{jsxs as D,jsx as O}from"react/jsx-runtime";var S="OffsetWellsTableRow";function I(e,t,l){var i=t.find((function(e){return e.key===l})),a=u(e,i.key);return"undefined"===a?"loading...":Number.isFinite(a)||a&&"Null"!==a?i.unitType?x(a,i.unitType,i.from,i.to):a:"—"}function j(e,t){var l=u(e,w.distance);return Number.isFinite(l)?t?l:x(l,"length","mi","km"):"—"}function M(e,t){var l,i=e.find((function(e){return e.wellId===t.id}));return null!==(l=null==i?void 0:i.taScore)&&void 0!==l?l:""}function _(e,t){var l=e.find((function(e){return e.key===t}));return(null==l?void 0:l.width)||0}var A=function(l){var o,u,x,A=l.columnsWithDict,L=l.data,V=l.subjectWellId,Y=l.metricsKeys,z=l.metricsColumns,E=l.handleChangeOffsetWell,F=l.isWellNameExpand,P=l.wellNameStyle,H=l.wellNameWidth,K=l.isViewOnly,U=l.isImperial,B=l.isLimitedOffsetWells,G=l.maxOffsetWellNumber,J=l.wellSections,Q=l.setActiveWellId,X=l.viewType,Z=l.newCheckedWellId,$=l.setNewCheckedWellId,ee=l.index,te=l.flyDuration,le=l.isWDUser,ie=l.taScores,ae=V===L.id,ne=t({},T.subjectWellRow,ae),se=i(L.checked),re=e(se,2),oe=re[0],ce=re[1],de=a(),ue=!1,me=L[w.name]||"—",fe=me;if(!F&&2*H<8*me.length){var he=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 l=Math.ceil(t.clientWidth);return document.body.removeChild(t),l}(me);if(he>2*H){var ye=2*H/(he/me.length);fe="".concat(me.substring(0,ye/2-2),"\n... ").concat(me.substring(me.length-ye/2+6)),ue=!0}}var be=n((function(e,t,l,i,a){var n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=t-e;de.current.style.position="absolute",de.current.style.top="".concat(e,"px"),de.current.style.zIndex=l===i?4:3,de.current.style.transition="transform ".concat(a,"ms ease ").concat(50*n,"ms"),de.current.style.transform="translateY(".concat(s,"px)")}),[]),pe=n((function(){de.current.style.position="unset",de.current.style.zIndex=1,de.current.style.transition="none",de.current.style.transform="none"}),[]),ve=n((function(e){$(L.id);var t=c(L,"moveTo");E(t,e),ce(e)}),[L,$,E]);s((function(){if(Z){var e=ee*N+16;if(L.moveTo){var t=e+N*L.moveTo;be(e,t,Z,L.id,te,L.delayTime)}}else pe()}),[L.moveTo,Z]),s((function(){ce(L.checked)}),[L.checked]);var we,Ne,We=r((function(){return L[w.wellSection]}),[L]),ge=r((function(){return K?"View only mode. To edit offsets, use ".concat(le?"Offset Selection App":"WellHub","."):B&&!L.checked?"App can’t process more than (".concat(G-1,") Offset Wells."):""}),[K,B,L.checked]);return D(h,{"data-testid":"".concat(S,"_row_").concat(me),className:m(T.bodyRow,t({},T.moveRow,1===Math.abs(L.moveTo)&&Z!==L.id)),innerRef:de,onMouseEnter:function(){Q(L.id)},onMouseLeave:function(){Q(null)},children:[D(y,{"data-testid":"".concat(S,"_well"),className:m(T.bodyCell,T.wellNameCell,ne,(o={},t(o,P,X!==W.mobile),t(o,T.wellNameCellMobile,X===W.mobile),o)),style:{width:F?g:_(A,w.name)},children:[ae&&O(C,{className:m(T.subjectWellMark,t({},T.subjectWellMarkMobile,X===W.mobile))}),!ae&&O(b,{title:ge,placement:"bottom-start",classes:{tooltipPlacementBottom:T.checkboxTooltip},children:O("div",{children:O(p,{"data-testid":"".concat(S,"_checkbox"),size:"medium",checked:oe,classes:{disabled:T.checkboxDisabled},disabled:K||B&&!L.checked,onChange:function(e){return ve(e.target.checked)}})})}),O(b,{title:ue?me:"",children:O(v,{variant:"body2",className:m(T.wellNameCursor,(u={},t(u,T.cellDataViewOnly,ae),t(u,T.wellNamePreWrap,ue),u)),children:ue?fe:me})})]}),O(y,{"data-testid":"".concat(S,"_dot"),className:m(T.bodyCell,ne),style:{width:_(A,w.status)},children:!ae&&O(b,{title:d(L[w.status]),enterTouchDelay:X===W.mobile&&0,leaveTouchDelay:X===W.mobile&&R,children:O("div",{className:T.statusContainer,children:O("div",{"data-testid":"".concat(S,"_color"),className:T.status,style:{background:null===(x=k.find((function(e){return e.value===L[w.status]})))||void 0===x?void 0:x.color}})})})}),O(y,{"data-testid":"".concat(S,"_rig"),className:m(T.bodyCell,ne),style:{width:_(A,w.rig)},children:O(v,{variant:"body2",className:T.cellData,children:L[w.rig]&&"Null"!==L[w.rig]?L[w.rig]:"—"})}),O(y,{"data-testid":"".concat(S,"_distance"),className:m(T.bodyCell,ne),style:{width:_(A,w.distance)},children:O(v,{variant:"body2",className:T.cellData,children:j(L,U)})}),!!ie.length&&O(y,{"data-testid":"".concat(S,"_ta"),className:m(T.bodyCell,ne),style:{width:_(A,w.taScore)},children:O(v,{variant:"body2",className:T.cellData,children:M(ie,L)})}),O(y,{"data-testid":"".concat(S,"_lastActive"),className:m(T.bodyCell,ne),style:{width:_(A,w.lastActive)},children:O(v,{variant:"body2",className:T.cellData,children:L[w.lastActive]&&Number.isFinite(L[w.lastActive])?f.unix(L[w.lastActive]).format("MM/DD/YYYY"):"—"})}),Y.map((function(e){return O(y,{"data-testid":"".concat(S,"_").concat(e),className:m(T.bodyCell,ne),style:{width:_(A,e)},children:O(v,{variant:"body2",className:T.cellData,children:I(L,z,e)})},e)})),O(y,{"data-testid":"".concat(S,"_wellSection"),className:m(T.bodyCell,T.lastCell,ne),style:{width:_(A,w.wellSection)},children:We&&We.length>1?O(b,{classes:{tooltip:T.customTooltip},title:O(q,{wellSectionNames:We}),children:O("div",{className:T.sectionLength,children:We.length})}):O(b,{title:We||"",children:O(v,{variant:"body2",className:T.cellData,style:{color:We&&1===We.length&&(we=We,Ne=e(we,1)[0],J.find((function(e){return e.label===Ne})).color)},children:We})})})]})};A.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,handleChangeOffsetWell: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,taScores:o.arrayOf(o.shape({})).isRequired};var L=l(A);export{L as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as l,useState as i,useCallback as a,useEffect as s,useMemo as n}from"react";import r from"prop-types";import{startCase as o,get as c}from"lodash";import d from"classnames";import u from"moment";import{TableRow as m,TableCell as f,Tooltip as h,Checkbox as b,Typography as y}from"@material-ui/core";import{ColumnType as p,ViewType as v,EXPANDED_WELL_NAME_WIDTH as w,LEAVE_TOUCH_DELAY as N,StatusOptions as W}from"../../constants.js";import{SubjectWellMark as g}from"./SubjectWellMark.js";import R from"./ViewWellSectionsName.js";import C from"./OffsetWellsTableRow.module.css.js";import{convertValue as k}from"../../../../utils/index.js";import{jsxs as q,jsx as O}from"react/jsx-runtime";var S="OffsetWellsTableRow";function D(e,t,l){var i=t.find((function(e){return e.key===l})),a=c(e,i.key);return"undefined"===a?"loading...":Number.isFinite(a)||a&&"Null"!==a?i.unitType?k(a,i.unitType,i.from,i.to):a:"—"}function T(e,t){var l=c(e,p.distance);return Number.isFinite(l)?t?l:k(l,"length","mi","km"):"—"}function j(e,t){var l,i=e.find((function(e){return e.wellId===t.id}));return null!==(l=null==i?void 0:i.taScore)&&void 0!==l?l:""}function x(e,t){var l=e.find((function(e){return e.key===t}));return(null==l?void 0:l.width)||0}var _=function(l){var r,c,k,_=l.columnsWithDict,A=l.data,M=l.subjectWellId,I=l.metricsKeys,L=l.metricsColumns,V=l.handleChangeOffsetWell,E=l.isWellNameExpand,F=l.wellNameStyle,Y=l.wellNameWidth,P=l.isViewOnly,z=l.isImperial,H=l.isLimitedOffsetWells,K=l.maxOffsetWellNumber,U=l.wellSections,B=l.setActiveWellId,G=l.viewType,J=l.isWDUser,Q=l.taScores,X=l.offsetWellsContainerRef,Z=M===A.id,$=t({},C.subjectWellRow,Z),ee=i(A.checked),te=e(ee,2),le=te[0],ie=te[1],ae=!1,se=A[p.name]||"—",ne=se;if(!E&&2*Y<8*se.length){var re=function(e){var t=document.createElement("span");document.body.appendChild(t),t.style.font="Roboto",t.style.fontSize="14px",t.style.letterSpacing="0.01071em",t.style.height="auto",t.style.width="auto",t.style.position="absolute",t.style.whiteSpace="nowrap",t.innerHTML=e;var l=Math.ceil(t.clientWidth);return document.body.removeChild(t),l}(se);if(re>2*Y){var oe=2*Y/(re/se.length);ne="".concat(se.substring(0,oe/2-2),"\n... ").concat(se.substring(se.length-oe/2+6)),ae=!0}}var ce=a((function(e){var t,l=(null===(t=X.current)||void 0===t?void 0:t.scrollTop)||0;V(A,e),ie(e),requestAnimationFrame((function(){X.current.scrollTop=l}))}),[A,V]);s((function(){ie(A.checked)}),[A.checked]);var de,ue,me=n((function(){return A[p.wellSection]}),[A]),fe=n((function(){return P?"View only mode. To edit offsets, use ".concat(J?"Offset Selection App":"WellHub","."):H&&!A.checked?"App can’t process more than (".concat(K-1,") Offset Wells."):""}),[P,H,A.checked]);return q(m,{"data-testid":"".concat(S,"_row_").concat(se),className:C.bodyRow,onMouseEnter:function(){B(A.id)},onMouseLeave:function(){B(null)},children:[q(f,{"data-testid":"".concat(S,"_well"),className:d(C.bodyCell,C.wellNameCell,$,(r={},t(r,F,G!==v.mobile),t(r,C.wellNameCellMobile,G===v.mobile),r)),style:{width:E?w:x(_,p.name)},children:[Z&&O(g,{className:d(C.subjectWellMark,t({},C.subjectWellMarkMobile,G===v.mobile))}),!Z&&O(h,{title:fe,placement:"bottom-start",classes:{tooltipPlacementBottom:C.checkboxTooltip},children:O("div",{children:O(b,{"data-testid":"".concat(S,"_checkbox"),size:"medium",checked:le,classes:{disabled:C.checkboxDisabled},disabled:P||H&&!A.checked,onChange:function(e){return ce(e.target.checked)}})})}),O(h,{title:ae?se:"",children:O(y,{variant:"body2",className:d(C.wellNameCursor,(c={},t(c,C.cellDataViewOnly,Z),t(c,C.wellNamePreWrap,ae),c)),children:ae?ne:se})})]}),O(f,{"data-testid":"".concat(S,"_dot"),className:d(C.bodyCell,$),style:{width:x(_,p.status)},children:!Z&&O(h,{title:o(A[p.status]),enterTouchDelay:G===v.mobile&&0,leaveTouchDelay:G===v.mobile&&N,children:O("div",{className:C.statusContainer,children:O("div",{"data-testid":"".concat(S,"_color"),className:C.status,style:{background:null===(k=W.find((function(e){return e.value===A[p.status]})))||void 0===k?void 0:k.color}})})})}),O(f,{"data-testid":"".concat(S,"_rig"),className:d(C.bodyCell,$),style:{width:x(_,p.rig)},children:O(y,{variant:"body2",className:C.cellData,children:A[p.rig]&&"Null"!==A[p.rig]?A[p.rig]:"—"})}),O(f,{"data-testid":"".concat(S,"_distance"),className:d(C.bodyCell,$),style:{width:x(_,p.distance)},children:O(y,{variant:"body2",className:C.cellData,children:T(A,z)})}),!!Q.length&&O(f,{"data-testid":"".concat(S,"_ta"),className:d(C.bodyCell,$),style:{width:x(_,p.taScore)},children:O(y,{variant:"body2",className:C.cellData,children:j(Q,A)})}),O(f,{"data-testid":"".concat(S,"_lastActive"),className:d(C.bodyCell,$),style:{width:x(_,p.lastActive)},children:O(y,{variant:"body2",className:C.cellData,children:A[p.lastActive]&&Number.isFinite(A[p.lastActive])?u.unix(A[p.lastActive]).format("MM/DD/YYYY"):"—"})}),I.map((function(e){return O(f,{"data-testid":"".concat(S,"_").concat(e),className:d(C.bodyCell,$),style:{width:x(_,e)},children:O(y,{variant:"body2",className:C.cellData,children:D(A,L,e)})},e)})),O(f,{"data-testid":"".concat(S,"_wellSection"),className:d(C.bodyCell,C.lastCell,$),style:{width:x(_,p.wellSection)},children:me&&me.length>1?O(h,{classes:{tooltip:C.customTooltip},title:O(R,{wellSectionNames:me}),children:O("div",{className:C.sectionLength,children:me.length})}):O(h,{title:me||"",children:O(y,{variant:"body2",className:C.cellData,style:{color:me&&1===me.length&&(de=me,ue=e(de,1)[0],U.find((function(e){return e.label===ue})).color)},children:me})})})]})};_.propTypes={columnsWithDict:r.arrayOf(r.shape({})).isRequired,data:r.shape({id:r.number,checked:r.bool,name:r.string,status:r.string}).isRequired,subjectWellId:r.number.isRequired,metricsKeys:r.arrayOf(r.string).isRequired,metricsColumns:r.arrayOf(r.shape({})).isRequired,handleChangeOffsetWell:r.func.isRequired,isWellNameExpand:r.bool.isRequired,wellNameStyle:r.string.isRequired,wellNameWidth:r.number.isRequired,isViewOnly:r.bool.isRequired,isImperial:r.bool.isRequired,isLimitedOffsetWells:r.bool.isRequired,maxOffsetWellNumber:r.number.isRequired,wellSections:r.arrayOf(r.shape({})).isRequired,setActiveWellId:r.func.isRequired,viewType:r.string.isRequired,isWDUser:r.bool.isRequired,taScores:r.arrayOf(r.shape({})).isRequired,offsetWellsContainerRef:r.shape({}).isRequired};var A=l(_);export{A as default};
2
2
  //# sourceMappingURL=OffsetWellsTableRow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellsTableRow.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js"],"sourcesContent":["import { memo, useCallback, useEffect, useRef, useState, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { startCase, get, omit } from 'lodash';\nimport classNames from 'classnames';\nimport moment from 'moment';\nimport { Typography, Checkbox, Tooltip, TableCell, TableRow } from '@material-ui/core';\n\nimport {\n ColumnType,\n EXPANDED_WELL_NAME_WIDTH,\n LEAVE_TOUCH_DELAY,\n ROW_HEIGHT,\n StatusOptions,\n ViewType,\n} from '../../constants';\n\nimport { SubjectWellMark } from './SubjectWellMark';\nimport ViewWellSectionsName from './ViewWellSectionsName';\n\nimport styles from './OffsetWellsTableRow.module.css';\n\nimport { convertValue } from '~/utils';\n\nconst PAGE_NAME = 'OffsetWellsTableRow';\nconst AVG_CHAR_WIDTH = 8;\n\nfunction formatMetricItem(data, metricsColumns, metricKey) {\n const metric = metricsColumns.find(item => item.key === metricKey);\n const value = get(data, metric.key);\n\n if (value === 'undefined') {\n return 'loading...';\n }\n\n if (Number.isFinite(value) || (value && value !== 'Null')) {\n return metric.unitType ? convertValue(value, metric.unitType, metric.from, metric.to) : value;\n }\n\n return '—';\n}\n\nfunction formatDistance(data, isImperial) {\n const value = get(data, ColumnType.distance);\n if (Number.isFinite(value)) {\n return isImperial ? value : convertValue(value, 'length', 'mi', 'km');\n }\n return '—';\n}\n\nfunction getTaValue(taScores, data) {\n const value = taScores.find(taData => taData.wellId === data.id);\n return value?.taScore ?? '';\n}\n\nfunction getCellWidth(columnsWithDict, key) {\n const cell = columnsWithDict.find(item => item.key === key);\n return cell?.width || 0;\n}\n\nfunction getTextWidth(strText) {\n const text = document.createElement('span');\n document.body.appendChild(text);\n text.style.font = 'Roboto';\n text.style.fontSize = '14px';\n text.style.letterSpacing = '0.01071em';\n text.style.height = 'auto';\n text.style.width = 'auto';\n text.style.position = 'absolute';\n text.style.whiteSpace = 'nowrap';\n text.innerHTML = strText;\n const textWidth = Math.ceil(text.clientWidth);\n document.body.removeChild(text);\n return textWidth;\n}\n\nconst OffsetWellsTableRow = ({\n columnsWithDict,\n data,\n subjectWellId,\n metricsKeys,\n metricsColumns,\n handleChangeOffsetWell,\n isWellNameExpand,\n wellNameStyle,\n wellNameWidth,\n isViewOnly,\n isImperial,\n isLimitedOffsetWells,\n maxOffsetWellNumber,\n wellSections,\n setActiveWellId,\n viewType,\n newCheckedWellId,\n setNewCheckedWellId,\n index,\n flyDuration,\n isWDUser,\n taScores,\n}) => {\n const isSubjectWell = subjectWellId === data.id;\n const borderStyle = { [styles.subjectWellRow]: isSubjectWell };\n const [isChecked, setIsChecked] = useState(data.checked);\n const tableRowRef = useRef();\n\n let isOverFlowWellName = false;\n const wellName = data[ColumnType.name] || '—';\n let truncWellName = wellName;\n if (!isWellNameExpand && wellNameWidth * 2 < wellName.length * AVG_CHAR_WIDTH) {\n const wellNameRealWidth = getTextWidth(wellName);\n if (wellNameRealWidth > wellNameWidth * 2) {\n const maxCounts = (wellNameWidth * 2) / (wellNameRealWidth / wellName.length);\n truncWellName = `${wellName.substring(0, maxCounts / 2 - 2)}\\n... ${wellName.substring(\n wellName.length - maxCounts / 2 + 6\n )}`;\n isOverFlowWellName = true;\n }\n }\n\n const flyingAnimation = useCallback(\n (currentTop, targetTop, newCheckedWellId, ownId, flyDuration, delayTime = 0) => {\n const movingOffsetY = targetTop - currentTop;\n tableRowRef.current.style.position = 'absolute';\n tableRowRef.current.style.top = `${currentTop}px`;\n tableRowRef.current.style.zIndex = newCheckedWellId === ownId ? 4 : 3;\n tableRowRef.current.style.transition = `transform ${flyDuration}ms ease ${delayTime * 50}ms`;\n tableRowRef.current.style.transform = `translateY(${movingOffsetY}px)`;\n },\n []\n );\n const clearAnimation = useCallback(() => {\n tableRowRef.current.style.position = 'unset';\n tableRowRef.current.style.zIndex = 1;\n tableRowRef.current.style.transition = 'none';\n tableRowRef.current.style.transform = 'none';\n }, []);\n\n const handleChangeCheckbox = useCallback(\n checked => {\n setNewCheckedWellId(data.id);\n const updateData = omit(data, 'moveTo');\n handleChangeOffsetWell(updateData, checked);\n setIsChecked(checked);\n },\n [data, setNewCheckedWellId, handleChangeOffsetWell]\n );\n useEffect(() => {\n if (newCheckedWellId) {\n const currentTop = index * ROW_HEIGHT + 16;\n if (data.moveTo) {\n const targetTop = currentTop + ROW_HEIGHT * data.moveTo;\n flyingAnimation(\n currentTop,\n targetTop,\n newCheckedWellId,\n data.id,\n flyDuration,\n data.delayTime\n );\n }\n } else {\n clearAnimation();\n }\n }, [data.moveTo, newCheckedWellId]);\n\n useEffect(() => {\n setIsChecked(data.checked);\n }, [data.checked]);\n\n const getSectionColor = ([sectionName]) => {\n return wellSections.find(wellSection => wellSection.label === sectionName).color;\n };\n\n const wellSectionData = useMemo(() => {\n return data[ColumnType.wellSection];\n }, [data]);\n\n const checkboxTooltipText = useMemo(() => {\n if (isViewOnly) {\n return `View only mode. To edit offsets, use ${\n isWDUser ? 'Offset Selection App' : 'WellHub'\n }.`;\n } else if (isLimitedOffsetWells && !data.checked) {\n return `App can’t process more than (${maxOffsetWellNumber - 1}) Offset Wells.`;\n } else {\n return '';\n }\n }, [isViewOnly, isLimitedOffsetWells, data.checked]);\n\n const handleMouseEnter = () => {\n setActiveWellId(data.id);\n };\n\n const handleMouseLeave = () => {\n setActiveWellId(null);\n };\n\n return (\n <TableRow\n data-testid={`${PAGE_NAME}_row_${wellName}`}\n className={classNames(styles.bodyRow, {\n [styles.moveRow]: Math.abs(data.moveTo) === 1 && newCheckedWellId !== data.id,\n })}\n innerRef={tableRowRef}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <TableCell\n data-testid={`${PAGE_NAME}_well`}\n className={classNames(styles.bodyCell, styles.wellNameCell, borderStyle, {\n [wellNameStyle]: viewType !== ViewType.mobile,\n [styles.wellNameCellMobile]: viewType === ViewType.mobile,\n })}\n style={{\n width: isWellNameExpand\n ? EXPANDED_WELL_NAME_WIDTH\n : getCellWidth(columnsWithDict, ColumnType.name),\n }}\n >\n {isSubjectWell && (\n <SubjectWellMark\n className={classNames(styles.subjectWellMark, {\n [styles.subjectWellMarkMobile]: viewType === ViewType.mobile,\n })}\n />\n )}\n {!isSubjectWell && (\n <Tooltip\n title={checkboxTooltipText}\n placement=\"bottom-start\"\n classes={{ tooltipPlacementBottom: styles.checkboxTooltip }}\n >\n <div>\n <Checkbox\n data-testid={`${PAGE_NAME}_checkbox`}\n size=\"medium\"\n checked={isChecked}\n classes={{ disabled: styles.checkboxDisabled }}\n disabled={isViewOnly || (isLimitedOffsetWells && !data.checked)}\n onChange={event => handleChangeCheckbox(event.target.checked)}\n />\n </div>\n </Tooltip>\n )}\n <Tooltip title={isOverFlowWellName ? wellName : ''}>\n <Typography\n variant=\"body2\"\n className={classNames(styles.wellNameCursor, {\n [styles.cellDataViewOnly]: isSubjectWell,\n [styles.wellNamePreWrap]: isOverFlowWellName,\n })}\n >\n {isOverFlowWellName ? truncWellName : wellName}\n </Typography>\n </Tooltip>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_dot`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.status) }}\n >\n {!isSubjectWell && (\n <Tooltip\n title={startCase(data[ColumnType.status])}\n enterTouchDelay={viewType === ViewType.mobile && 0}\n leaveTouchDelay={viewType === ViewType.mobile && LEAVE_TOUCH_DELAY}\n >\n <div className={styles.statusContainer}>\n <div\n data-testid={`${PAGE_NAME}_color`}\n className={styles.status}\n style={{\n background: StatusOptions.find(item => item.value === data[ColumnType.status])\n ?.color,\n }}\n />\n </div>\n </Tooltip>\n )}\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_rig`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.rig) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {data[ColumnType.rig] && data[ColumnType.rig] !== 'Null' ? data[ColumnType.rig] : '—'}\n </Typography>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_distance`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.distance) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {formatDistance(data, isImperial)}\n </Typography>\n </TableCell>\n\n {!!taScores.length && (\n <TableCell\n data-testid={`${PAGE_NAME}_ta`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.taScore) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {getTaValue(taScores, data)}\n </Typography>\n </TableCell>\n )}\n\n <TableCell\n data-testid={`${PAGE_NAME}_lastActive`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.lastActive) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {data[ColumnType.lastActive] && Number.isFinite(data[ColumnType.lastActive])\n ? moment.unix(data[ColumnType.lastActive]).format('MM/DD/YYYY')\n : '—'}\n </Typography>\n </TableCell>\n\n {metricsKeys.map(metricsKey => (\n <TableCell\n data-testid={`${PAGE_NAME}_${metricsKey}`}\n key={metricsKey}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, metricsKey) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {formatMetricItem(data, metricsColumns, metricsKey)}\n </Typography>\n </TableCell>\n ))}\n\n <TableCell\n data-testid={`${PAGE_NAME}_wellSection`}\n className={classNames(styles.bodyCell, styles.lastCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.wellSection) }}\n >\n {wellSectionData && wellSectionData.length > 1 ? (\n <Tooltip\n classes={{\n tooltip: styles.customTooltip,\n }}\n title={<ViewWellSectionsName wellSectionNames={wellSectionData} />}\n >\n <div className={styles.sectionLength}>{wellSectionData.length}</div>\n </Tooltip>\n ) : (\n <Tooltip title={wellSectionData || ''}>\n <Typography\n variant=\"body2\"\n className={styles.cellData}\n style={{\n color:\n wellSectionData &&\n wellSectionData.length === 1 &&\n getSectionColor(wellSectionData),\n }}\n >\n {wellSectionData}\n </Typography>\n </Tooltip>\n )}\n </TableCell>\n </TableRow>\n );\n};\n\nOffsetWellsTableRow.propTypes = {\n columnsWithDict: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n data: PropTypes.shape({\n id: PropTypes.number,\n checked: PropTypes.bool,\n name: PropTypes.string,\n status: PropTypes.string,\n moveTo: PropTypes.number,\n delayTime: PropTypes.number,\n }).isRequired,\n subjectWellId: PropTypes.number.isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n metricsColumns: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n handleChangeOffsetWell: PropTypes.func.isRequired,\n isWellNameExpand: PropTypes.bool.isRequired,\n wellNameStyle: PropTypes.string.isRequired,\n wellNameWidth: PropTypes.number.isRequired,\n isViewOnly: PropTypes.bool.isRequired,\n isImperial: PropTypes.bool.isRequired,\n isLimitedOffsetWells: PropTypes.bool.isRequired,\n maxOffsetWellNumber: PropTypes.number.isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n setActiveWellId: PropTypes.func.isRequired,\n viewType: PropTypes.string.isRequired,\n newCheckedWellId: PropTypes.number.isRequired,\n setNewCheckedWellId: PropTypes.func.isRequired,\n index: PropTypes.number.isRequired,\n flyDuration: PropTypes.number.isRequired,\n isWDUser: PropTypes.bool.isRequired,\n taScores: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n};\n\nexport default memo(OffsetWellsTableRow);\n"],"names":["PAGE_NAME","formatMetricItem","data","metricsColumns","metricKey","metric","find","item","key","value","get","Number","isFinite","unitType","convertValue","from","to","formatDistance","isImperial","ColumnType","distance","getTaValue","taScores","_value$taScore","taData","wellId","id","taScore","getCellWidth","columnsWithDict","cell","width","OffsetWellsTableRow","_ref","_classNames2","_classNames4","_StatusOptions$find","subjectWellId","metricsKeys","handleChangeOffsetWell","isWellNameExpand","wellNameStyle","wellNameWidth","isViewOnly","isLimitedOffsetWells","maxOffsetWellNumber","wellSections","setActiveWellId","viewType","newCheckedWellId","setNewCheckedWellId","index","flyDuration","isWDUser","isSubjectWell","borderStyle","styles","subjectWellRow","_useState","useState","checked","_useState2","_slicedToArray","isChecked","setIsChecked","tableRowRef","useRef","isOverFlowWellName","wellName","name","truncWellName","length","wellNameRealWidth","strText","text","document","createElement","body","appendChild","style","font","fontSize","letterSpacing","height","position","whiteSpace","innerHTML","textWidth","Math","ceil","clientWidth","removeChild","getTextWidth","maxCounts","substring","concat","flyingAnimation","useCallback","currentTop","targetTop","ownId","delayTime","movingOffsetY","current","top","zIndex","transition","transform","clearAnimation","handleChangeCheckbox","updateData","omit","useEffect","ROW_HEIGHT","moveTo","_ref2","sectionName","wellSectionData","useMemo","wellSection","checkboxTooltipText","_jsxs","TableRow","className","classNames","bodyRow","_defineProperty","moveRow","abs","innerRef","onMouseEnter","onMouseLeave","children","TableCell","bodyCell","wellNameCell","ViewType","mobile","wellNameCellMobile","EXPANDED_WELL_NAME_WIDTH","_jsx","SubjectWellMark","subjectWellMark","subjectWellMarkMobile","Tooltip","title","placement","classes","tooltipPlacementBottom","checkboxTooltip","Checkbox","size","disabled","checkboxDisabled","onChange","event","target","Typography","variant","wellNameCursor","cellDataViewOnly","wellNamePreWrap","status","startCase","enterTouchDelay","leaveTouchDelay","LEAVE_TOUCH_DELAY","statusContainer","background","StatusOptions","color","rig","cellData","lastActive","moment","unix","format","map","metricsKey","lastCell","tooltip","customTooltip","ViewWellSectionsName","wellSectionNames","sectionLength","label","propTypes","PropTypes","arrayOf","shape","isRequired","number","bool","string","func","memo"],"mappings":"y0BAuBA,IAAMA,EAAY,sBAGlB,SAASC,EAAiBC,EAAMC,EAAgBC,GAC9C,IAAMC,EAASF,EAAeG,MAAK,SAAAC,GAAI,OAAIA,EAAKC,MAAQJ,KAClDK,EAAQC,EAAIR,EAAMG,EAAOG,KAE/B,MAAc,cAAVC,EACK,aAGLE,OAAOC,SAASH,IAAWA,GAAmB,SAAVA,EAC/BJ,EAAOQ,SAAWC,EAAaL,EAAOJ,EAAOQ,SAAUR,EAAOU,KAAMV,EAAOW,IAAMP,EAGnF,GACT,CAEA,SAASQ,EAAef,EAAMgB,GAC5B,IAAMT,EAAQC,EAAIR,EAAMiB,EAAWC,UACnC,OAAIT,OAAOC,SAASH,GACXS,EAAaT,EAAQK,EAAaL,EAAO,SAAU,KAAM,MAE3D,GACT,CAEA,SAASY,EAAWC,EAAUpB,GAAM,IAAAqB,EAC5Bd,EAAQa,EAAShB,MAAK,SAAAkB,GAAM,OAAIA,EAAOC,SAAWvB,EAAKwB,MAC7D,eAAOjB,EAAAA,aAAK,EAALA,EAAOkB,uBAAW,EAC3B,CAEA,SAASC,EAAaC,EAAiBrB,GACrC,IAAMsB,EAAOD,EAAgBvB,MAAK,SAAAC,GAAI,OAAIA,EAAKC,MAAQA,KACvD,OAAOsB,eAAAA,EAAMC,QAAS,CACxB,CAkBA,IAAMC,EAAsB,SAuBtBC,GAAA,IAAAC,EAAAC,EAAAC,EAtBJP,IAAAA,gBACA3B,IAAAA,KACAmC,IAAAA,cACAC,IAAAA,YACAnC,IAAAA,eACAoC,IAAAA,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,WAAYyK,EAAUK,KAAKF,WAC3BlJ,qBAAsB+I,EAAUK,KAAKF,WACrCjJ,oBAAqB8I,EAAUI,OAAOD,WACtChJ,aAAc6I,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,WACrD/I,gBAAiB4I,EAAUO,KAAKJ,WAChC9I,SAAU2I,EAAUM,OAAOH,WAC3B7I,iBAAkB0I,EAAUI,OAAOD,WACnC5I,oBAAqByI,EAAUO,KAAKJ,WACpC3I,MAAOwI,EAAUI,OAAOD,WACxB1I,YAAauI,EAAUI,OAAOD,WAC9BzI,SAAUsI,EAAUK,KAAKF,WACzBxK,SAAUqK,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,YAGnD,IAAeK,EAAAA,EAAKnK"}
1
+ {"version":3,"file":"OffsetWellsTableRow.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js"],"sourcesContent":["import { memo, useCallback, useEffect, useState, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { startCase, get } from 'lodash';\nimport classNames from 'classnames';\nimport moment from 'moment';\nimport { Typography, Checkbox, Tooltip, TableCell, TableRow } from '@material-ui/core';\n\nimport {\n ColumnType,\n EXPANDED_WELL_NAME_WIDTH,\n LEAVE_TOUCH_DELAY,\n StatusOptions,\n ViewType,\n} from '../../constants';\n\nimport { SubjectWellMark } from './SubjectWellMark';\nimport ViewWellSectionsName from './ViewWellSectionsName';\n\nimport styles from './OffsetWellsTableRow.module.css';\n\nimport { convertValue } from '~/utils';\n\nconst PAGE_NAME = 'OffsetWellsTableRow';\nconst AVG_CHAR_WIDTH = 8;\n\nfunction formatMetricItem(data, metricsColumns, metricKey) {\n const metric = metricsColumns.find(item => item.key === metricKey);\n const value = get(data, metric.key);\n\n if (value === 'undefined') {\n return 'loading...';\n }\n\n if (Number.isFinite(value) || (value && value !== 'Null')) {\n return metric.unitType ? convertValue(value, metric.unitType, metric.from, metric.to) : value;\n }\n\n return '—';\n}\n\nfunction formatDistance(data, isImperial) {\n const value = get(data, ColumnType.distance);\n if (Number.isFinite(value)) {\n return isImperial ? value : convertValue(value, 'length', 'mi', 'km');\n }\n return '—';\n}\n\nfunction getTaValue(taScores, data) {\n const value = taScores.find(taData => taData.wellId === data.id);\n return value?.taScore ?? '';\n}\n\nfunction getCellWidth(columnsWithDict, key) {\n const cell = columnsWithDict.find(item => item.key === key);\n return cell?.width || 0;\n}\n\nfunction getTextWidth(strText) {\n const text = document.createElement('span');\n document.body.appendChild(text);\n text.style.font = 'Roboto';\n text.style.fontSize = '14px';\n text.style.letterSpacing = '0.01071em';\n text.style.height = 'auto';\n text.style.width = 'auto';\n text.style.position = 'absolute';\n text.style.whiteSpace = 'nowrap';\n text.innerHTML = strText;\n const textWidth = Math.ceil(text.clientWidth);\n document.body.removeChild(text);\n return textWidth;\n}\n\nconst OffsetWellsTableRow = ({\n columnsWithDict,\n data,\n subjectWellId,\n metricsKeys,\n metricsColumns,\n handleChangeOffsetWell,\n isWellNameExpand,\n wellNameStyle,\n wellNameWidth,\n isViewOnly,\n isImperial,\n isLimitedOffsetWells,\n maxOffsetWellNumber,\n wellSections,\n setActiveWellId,\n viewType,\n isWDUser,\n taScores,\n offsetWellsContainerRef,\n}) => {\n const isSubjectWell = subjectWellId === data.id;\n const borderStyle = { [styles.subjectWellRow]: isSubjectWell };\n const [isChecked, setIsChecked] = useState(data.checked);\n\n let isOverFlowWellName = false;\n const wellName = data[ColumnType.name] || '—';\n let truncWellName = wellName;\n if (!isWellNameExpand && wellNameWidth * 2 < wellName.length * AVG_CHAR_WIDTH) {\n const wellNameRealWidth = getTextWidth(wellName);\n if (wellNameRealWidth > wellNameWidth * 2) {\n const maxCounts = (wellNameWidth * 2) / (wellNameRealWidth / wellName.length);\n truncWellName = `${wellName.substring(0, maxCounts / 2 - 2)}\\n... ${wellName.substring(\n wellName.length - maxCounts / 2 + 6\n )}`;\n isOverFlowWellName = true;\n }\n }\n\n const handleChangeCheckbox = useCallback(\n checked => {\n const scrollTop = offsetWellsContainerRef.current?.scrollTop || 0;\n handleChangeOffsetWell(data, checked);\n setIsChecked(checked);\n\n requestAnimationFrame(() => {\n // eslint-disable-next-line no-param-reassign\n offsetWellsContainerRef.current.scrollTop = scrollTop;\n });\n },\n [data, handleChangeOffsetWell]\n );\n\n useEffect(() => {\n setIsChecked(data.checked);\n }, [data.checked]);\n\n const getSectionColor = ([sectionName]) => {\n return wellSections.find(wellSection => wellSection.label === sectionName).color;\n };\n\n const wellSectionData = useMemo(() => {\n return data[ColumnType.wellSection];\n }, [data]);\n\n const checkboxTooltipText = useMemo(() => {\n if (isViewOnly) {\n return `View only mode. To edit offsets, use ${\n isWDUser ? 'Offset Selection App' : 'WellHub'\n }.`;\n } else if (isLimitedOffsetWells && !data.checked) {\n return `App can’t process more than (${maxOffsetWellNumber - 1}) Offset Wells.`;\n } else {\n return '';\n }\n }, [isViewOnly, isLimitedOffsetWells, data.checked]);\n\n const handleMouseEnter = () => {\n setActiveWellId(data.id);\n };\n\n const handleMouseLeave = () => {\n setActiveWellId(null);\n };\n\n return (\n <TableRow\n data-testid={`${PAGE_NAME}_row_${wellName}`}\n className={styles.bodyRow}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <TableCell\n data-testid={`${PAGE_NAME}_well`}\n className={classNames(styles.bodyCell, styles.wellNameCell, borderStyle, {\n [wellNameStyle]: viewType !== ViewType.mobile,\n [styles.wellNameCellMobile]: viewType === ViewType.mobile,\n })}\n style={{\n width: isWellNameExpand\n ? EXPANDED_WELL_NAME_WIDTH\n : getCellWidth(columnsWithDict, ColumnType.name),\n }}\n >\n {isSubjectWell && (\n <SubjectWellMark\n className={classNames(styles.subjectWellMark, {\n [styles.subjectWellMarkMobile]: viewType === ViewType.mobile,\n })}\n />\n )}\n {!isSubjectWell && (\n <Tooltip\n title={checkboxTooltipText}\n placement=\"bottom-start\"\n classes={{ tooltipPlacementBottom: styles.checkboxTooltip }}\n >\n <div>\n <Checkbox\n data-testid={`${PAGE_NAME}_checkbox`}\n size=\"medium\"\n checked={isChecked}\n classes={{ disabled: styles.checkboxDisabled }}\n disabled={isViewOnly || (isLimitedOffsetWells && !data.checked)}\n onChange={event => handleChangeCheckbox(event.target.checked)}\n />\n </div>\n </Tooltip>\n )}\n <Tooltip title={isOverFlowWellName ? wellName : ''}>\n <Typography\n variant=\"body2\"\n className={classNames(styles.wellNameCursor, {\n [styles.cellDataViewOnly]: isSubjectWell,\n [styles.wellNamePreWrap]: isOverFlowWellName,\n })}\n >\n {isOverFlowWellName ? truncWellName : wellName}\n </Typography>\n </Tooltip>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_dot`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.status) }}\n >\n {!isSubjectWell && (\n <Tooltip\n title={startCase(data[ColumnType.status])}\n enterTouchDelay={viewType === ViewType.mobile && 0}\n leaveTouchDelay={viewType === ViewType.mobile && LEAVE_TOUCH_DELAY}\n >\n <div className={styles.statusContainer}>\n <div\n data-testid={`${PAGE_NAME}_color`}\n className={styles.status}\n style={{\n background: StatusOptions.find(item => item.value === data[ColumnType.status])\n ?.color,\n }}\n />\n </div>\n </Tooltip>\n )}\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_rig`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.rig) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {data[ColumnType.rig] && data[ColumnType.rig] !== 'Null' ? data[ColumnType.rig] : '—'}\n </Typography>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_distance`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.distance) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {formatDistance(data, isImperial)}\n </Typography>\n </TableCell>\n\n {!!taScores.length && (\n <TableCell\n data-testid={`${PAGE_NAME}_ta`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.taScore) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {getTaValue(taScores, data)}\n </Typography>\n </TableCell>\n )}\n\n <TableCell\n data-testid={`${PAGE_NAME}_lastActive`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.lastActive) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {data[ColumnType.lastActive] && Number.isFinite(data[ColumnType.lastActive])\n ? moment.unix(data[ColumnType.lastActive]).format('MM/DD/YYYY')\n : '—'}\n </Typography>\n </TableCell>\n\n {metricsKeys.map(metricsKey => (\n <TableCell\n data-testid={`${PAGE_NAME}_${metricsKey}`}\n key={metricsKey}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, metricsKey) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {formatMetricItem(data, metricsColumns, metricsKey)}\n </Typography>\n </TableCell>\n ))}\n\n <TableCell\n data-testid={`${PAGE_NAME}_wellSection`}\n className={classNames(styles.bodyCell, styles.lastCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.wellSection) }}\n >\n {wellSectionData && wellSectionData.length > 1 ? (\n <Tooltip\n classes={{\n tooltip: styles.customTooltip,\n }}\n title={<ViewWellSectionsName wellSectionNames={wellSectionData} />}\n >\n <div className={styles.sectionLength}>{wellSectionData.length}</div>\n </Tooltip>\n ) : (\n <Tooltip title={wellSectionData || ''}>\n <Typography\n variant=\"body2\"\n className={styles.cellData}\n style={{\n color:\n wellSectionData &&\n wellSectionData.length === 1 &&\n getSectionColor(wellSectionData),\n }}\n >\n {wellSectionData}\n </Typography>\n </Tooltip>\n )}\n </TableCell>\n </TableRow>\n );\n};\n\nOffsetWellsTableRow.propTypes = {\n columnsWithDict: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n data: PropTypes.shape({\n id: PropTypes.number,\n checked: PropTypes.bool,\n name: PropTypes.string,\n status: PropTypes.string,\n }).isRequired,\n subjectWellId: PropTypes.number.isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n metricsColumns: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n handleChangeOffsetWell: PropTypes.func.isRequired,\n isWellNameExpand: PropTypes.bool.isRequired,\n wellNameStyle: PropTypes.string.isRequired,\n wellNameWidth: PropTypes.number.isRequired,\n isViewOnly: PropTypes.bool.isRequired,\n isImperial: PropTypes.bool.isRequired,\n isLimitedOffsetWells: PropTypes.bool.isRequired,\n maxOffsetWellNumber: PropTypes.number.isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n setActiveWellId: PropTypes.func.isRequired,\n viewType: PropTypes.string.isRequired,\n isWDUser: PropTypes.bool.isRequired,\n taScores: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n offsetWellsContainerRef: PropTypes.shape({}).isRequired,\n};\n\nexport default memo(OffsetWellsTableRow);\n"],"names":["PAGE_NAME","formatMetricItem","data","metricsColumns","metricKey","metric","find","item","key","value","get","Number","isFinite","unitType","convertValue","from","to","formatDistance","isImperial","ColumnType","distance","getTaValue","taScores","_value$taScore","taData","wellId","id","taScore","getCellWidth","columnsWithDict","cell","width","OffsetWellsTableRow","_ref","_classNames","_classNames3","_StatusOptions$find","subjectWellId","metricsKeys","handleChangeOffsetWell","isWellNameExpand","wellNameStyle","wellNameWidth","isViewOnly","isLimitedOffsetWells","maxOffsetWellNumber","wellSections","setActiveWellId","viewType","isWDUser","offsetWellsContainerRef","isSubjectWell","borderStyle","styles","subjectWellRow","_useState","useState","checked","_useState2","_slicedToArray","isChecked","setIsChecked","isOverFlowWellName","wellName","name","truncWellName","length","wellNameRealWidth","strText","text","document","createElement","body","appendChild","style","font","fontSize","letterSpacing","height","position","whiteSpace","innerHTML","textWidth","Math","ceil","clientWidth","removeChild","getTextWidth","maxCounts","substring","concat","handleChangeCheckbox","useCallback","_offsetWellsContainer","scrollTop","current","requestAnimationFrame","useEffect","_ref2","sectionName","wellSectionData","useMemo","wellSection","checkboxTooltipText","_jsxs","TableRow","className","bodyRow","onMouseEnter","onMouseLeave","children","TableCell","classNames","bodyCell","wellNameCell","ViewType","mobile","_defineProperty","wellNameCellMobile","EXPANDED_WELL_NAME_WIDTH","_jsx","SubjectWellMark","subjectWellMark","subjectWellMarkMobile","Tooltip","title","placement","classes","tooltipPlacementBottom","checkboxTooltip","Checkbox","size","disabled","checkboxDisabled","onChange","event","target","Typography","variant","wellNameCursor","cellDataViewOnly","wellNamePreWrap","status","startCase","enterTouchDelay","leaveTouchDelay","LEAVE_TOUCH_DELAY","statusContainer","background","StatusOptions","color","rig","cellData","lastActive","moment","unix","format","map","metricsKey","lastCell","tooltip","customTooltip","ViewWellSectionsName","wellSectionNames","sectionLength","label","propTypes","PropTypes","arrayOf","shape","isRequired","number","bool","string","func","memo"],"mappings":"myBAsBA,IAAMA,EAAY,sBAGlB,SAASC,EAAiBC,EAAMC,EAAgBC,GAC9C,IAAMC,EAASF,EAAeG,MAAK,SAAAC,GAAI,OAAIA,EAAKC,MAAQJ,KAClDK,EAAQC,EAAIR,EAAMG,EAAOG,KAE/B,MAAc,cAAVC,EACK,aAGLE,OAAOC,SAASH,IAAWA,GAAmB,SAAVA,EAC/BJ,EAAOQ,SAAWC,EAAaL,EAAOJ,EAAOQ,SAAUR,EAAOU,KAAMV,EAAOW,IAAMP,EAGnF,GACT,CAEA,SAASQ,EAAef,EAAMgB,GAC5B,IAAMT,EAAQC,EAAIR,EAAMiB,EAAWC,UACnC,OAAIT,OAAOC,SAASH,GACXS,EAAaT,EAAQK,EAAaL,EAAO,SAAU,KAAM,MAE3D,GACT,CAEA,SAASY,EAAWC,EAAUpB,GAAM,IAAAqB,EAC5Bd,EAAQa,EAAShB,MAAK,SAAAkB,GAAM,OAAIA,EAAOC,SAAWvB,EAAKwB,MAC7D,eAAOjB,EAAAA,aAAK,E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EAAUE,MAAM,CAAA,IAAKC,WACxDxK,KAAMqK,EAAUE,MAAM,CACpB/I,GAAI6I,EAAUI,OACdlH,QAAS8G,EAAUK,KACnB5G,KAAMuG,EAAUM,OAChB/B,OAAQyB,EAAUM,SACjBH,WACHrI,cAAekI,EAAUI,OAAOD,WAChCpI,YAAaiI,EAAUC,QAAQD,EAAUM,QAAQH,WACjDvK,eAAgBoK,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,WACvDnI,uBAAwBgI,EAAUO,KAAKJ,WACvClI,iBAAkB+H,EAAUK,KAAKF,WACjCjI,cAAe8H,EAAUM,OAAOH,WAChChI,cAAe6H,EAAUI,OAAOD,WAChC/H,WAAY4H,EAAUK,KAAKF,WAC3BxJ,WAAYqJ,EAAUK,KAAKF,WAC3B9H,qBAAsB2H,EAAUK,KAAKF,WACrC7H,oBAAqB0H,EAAUI,OAAOD,WACtC5H,aAAcyH,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,WACrD3H,gBAAiBwH,EAAUO,KAAKJ,WAChC1H,SAAUuH,EAAUM,OAAOH,WAC3BzH,SAAUsH,EAAUK,KAAKF,WACzBpJ,SAAUiJ,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,WACjDxH,wBAAyBqH,EAAUE,MAAM,CAAA,GAAIC,YAG/C,IAAeK,EAAAA,EAAK/I"}
@@ -1,2 +1,2 @@
1
- import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={bodyRow:"OffsetWellsTableRow-module_bodyRow__UqDEw",bodyCell:"OffsetWellsTableRow-module_bodyCell__B-yWv",subjectWellRow:"OffsetWellsTableRow-module_subjectWellRow__x60wK",subjectWellMark:"OffsetWellsTableRow-module_subjectWellMark__S-nvA",subjectWellMarkMobile:"OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp",cellData:"OffsetWellsTableRow-module_cellData__SNLYB",cellDataViewOnly:"OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1",hoverCell:"OffsetWellsTableRow-module_hoverCell__4wFuk",wellNameCell:"OffsetWellsTableRow-module_wellNameCell__BBEf-",wellNameCellMobile:"OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm",lastCell:"OffsetWellsTableRow-module_lastCell__VEQCi",subjectWellImage:"OffsetWellsTableRow-module_subjectWellImage__IkmRP",statusContainer:"OffsetWellsTableRow-module_statusContainer__IUVWC",status:"OffsetWellsTableRow-module_status__qWj9c",customTooltip:"OffsetWellsTableRow-module_customTooltip__aeWUJ",wellNameCursor:"OffsetWellsTableRow-module_wellNameCursor__BlXVa",wellNamePreWrap:"OffsetWellsTableRow-module_wellNamePreWrap__oXXEB",sectionLength:"OffsetWellsTableRow-module_sectionLength__vxefy",moveRow:"OffsetWellsTableRow-module_moveRow__dV8Gw",checkboxTooltip:"OffsetWellsTableRow-module_checkboxTooltip__4e4Sp",checkboxDisabled:"OffsetWellsTableRow-module_checkboxDisabled__-lVnx"};e(".OffsetWellsTableRow-module_bodyRow__UqDEw{display:flex!important;flex-direction:row!important;margin-bottom:4px!important}.OffsetWellsTableRow-module_bodyRow__UqDEw:hover .OffsetWellsTableRow-module_bodyCell__B-yWv{background:#393939}.OffsetWellsTableRow-module_subjectWellRow__x60wK{border-color:var(--palette-primary-main)!important}.OffsetWellsTableRow-module_subjectWellMark__S-nvA{left:-1px;position:absolute;top:-1px;z-index:98}.OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp{top:16px}.OffsetWellsTableRow-module_bodyCell__B-yWv{align-items:center!important;background:var(--palette-background-b-8);border-top:1px solid var(--palette-primary-text-9);display:flex!important;height:56px!important;padding:0 12px 0 0!important}.OffsetWellsTableRow-module_cellData__SNLYB{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--palette-primary-text-1);display:-webkit-box;font-size:14px;font-weight:400;line-height:20px;overflow:hidden;overflow-wrap:break-word;white-space:normal}.OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1{padding-left:12px}.OffsetWellsTableRow-module_hoverCell__4wFuk{background:var(--palette-background-b-7)!important}.OffsetWellsTableRow-module_wellNameCell__BBEf-{border-bottom-left-radius:4px;border-left:1px solid var(--palette-primary-text-9);border-top-left-radius:4px;left:0;position:sticky;z-index:2}.OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm{position:static}.OffsetWellsTableRow-module_lastCell__VEQCi{border-bottom-right-radius:4px;border-right:1px solid var(--palette-primary-text-9);border-top-right-radius:4px}.OffsetWellsTableRow-module_subjectWellImage__IkmRP{height:16px;width:16px}.OffsetWellsTableRow-module_statusContainer__IUVWC{align-items:center;display:flex;height:32px;justify-content:center;width:32px}.OffsetWellsTableRow-module_status__qWj9c{border-radius:50%;cursor:default;height:8px;width:8px}.OffsetWellsTableRow-module_customTooltip__aeWUJ{opacity:.9!important}.OffsetWellsTableRow-module_wellNameCursor__BlXVa{color:var(--palette-primary-text-1);cursor:default;white-space:normal;word-break:break-all}.OffsetWellsTableRow-module_wellNamePreWrap__oXXEB{white-space:pre}.OffsetWellsTableRow-module_sectionLength__vxefy{background:var(--palette-primary-text-9);border-radius:20px;cursor:default;padding:2px 8px}.OffsetWellsTableRow-module_moveRow__dV8Gw{opacity:.38!important}.OffsetWellsTableRow-module_checkboxTooltip__4e4Sp{margin-left:11px!important;margin-top:-1px!important}.OffsetWellsTableRow-module_checkboxDisabled__-lVnx{opacity:.16!important}");export{l as default};
1
+ import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={bodyRow:"OffsetWellsTableRow-module_bodyRow__UqDEw",bodyCell:"OffsetWellsTableRow-module_bodyCell__B-yWv",subjectWellRow:"OffsetWellsTableRow-module_subjectWellRow__x60wK",subjectWellMark:"OffsetWellsTableRow-module_subjectWellMark__S-nvA",subjectWellMarkMobile:"OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp",cellData:"OffsetWellsTableRow-module_cellData__SNLYB",cellDataViewOnly:"OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1",hoverCell:"OffsetWellsTableRow-module_hoverCell__4wFuk",wellNameCell:"OffsetWellsTableRow-module_wellNameCell__BBEf-",wellNameCellMobile:"OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm",lastCell:"OffsetWellsTableRow-module_lastCell__VEQCi",subjectWellImage:"OffsetWellsTableRow-module_subjectWellImage__IkmRP",statusContainer:"OffsetWellsTableRow-module_statusContainer__IUVWC",status:"OffsetWellsTableRow-module_status__qWj9c",customTooltip:"OffsetWellsTableRow-module_customTooltip__aeWUJ",wellNameCursor:"OffsetWellsTableRow-module_wellNameCursor__BlXVa",wellNamePreWrap:"OffsetWellsTableRow-module_wellNamePreWrap__oXXEB",sectionLength:"OffsetWellsTableRow-module_sectionLength__vxefy",checkboxTooltip:"OffsetWellsTableRow-module_checkboxTooltip__4e4Sp",checkboxDisabled:"OffsetWellsTableRow-module_checkboxDisabled__-lVnx"};e(".OffsetWellsTableRow-module_bodyRow__UqDEw{display:flex!important;flex-direction:row!important;margin-bottom:4px!important}.OffsetWellsTableRow-module_bodyRow__UqDEw:hover .OffsetWellsTableRow-module_bodyCell__B-yWv{background:#393939}.OffsetWellsTableRow-module_subjectWellRow__x60wK{border-color:var(--palette-primary-main)!important}.OffsetWellsTableRow-module_subjectWellMark__S-nvA{left:-1px;position:absolute;top:-1px;z-index:98}.OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp{top:16px}.OffsetWellsTableRow-module_bodyCell__B-yWv{align-items:center!important;background:var(--palette-background-b-8);border-top:1px solid var(--palette-primary-text-9);display:flex!important;height:56px!important;padding:0 12px 0 0!important}.OffsetWellsTableRow-module_cellData__SNLYB{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--palette-primary-text-1);display:-webkit-box;font-size:14px;font-weight:400;line-height:20px;overflow:hidden;overflow-wrap:break-word;white-space:normal}.OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1{padding-left:12px}.OffsetWellsTableRow-module_hoverCell__4wFuk{background:var(--palette-background-b-7)!important}.OffsetWellsTableRow-module_wellNameCell__BBEf-{border-bottom-left-radius:4px;border-left:1px solid var(--palette-primary-text-9);border-top-left-radius:4px;left:0;position:sticky;z-index:2}.OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm{position:static}.OffsetWellsTableRow-module_lastCell__VEQCi{border-bottom-right-radius:4px;border-right:1px solid var(--palette-primary-text-9);border-top-right-radius:4px}.OffsetWellsTableRow-module_subjectWellImage__IkmRP{height:16px;width:16px}.OffsetWellsTableRow-module_statusContainer__IUVWC{align-items:center;display:flex;height:32px;justify-content:center;width:32px}.OffsetWellsTableRow-module_status__qWj9c{border-radius:50%;cursor:default;height:8px;width:8px}.OffsetWellsTableRow-module_customTooltip__aeWUJ{opacity:.9!important}.OffsetWellsTableRow-module_wellNameCursor__BlXVa{color:var(--palette-primary-text-1);cursor:default;white-space:normal;word-break:break-all}.OffsetWellsTableRow-module_wellNamePreWrap__oXXEB{white-space:pre}.OffsetWellsTableRow-module_sectionLength__vxefy{background:var(--palette-primary-text-9);border-radius:20px;cursor:default;padding:2px 8px}.OffsetWellsTableRow-module_checkboxTooltip__4e4Sp{margin-left:11px!important;margin-top:-1px!important}.OffsetWellsTableRow-module_checkboxDisabled__-lVnx{opacity:.16!important}");export{l as default};
2
2
  //# sourceMappingURL=OffsetWellsTableRow.module.css.js.map