@corva/ui 3.36.0-3 → 3.36.0-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/components/AddComment/Popover.js +1 -1
- package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
- package/cjs-bundle/components/AddComment/components/Content.js +1 -1
- package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/cjs-bundle/components/Chart/effects/useChartModifier.js +1 -1
- package/cjs-bundle/components/Chart/effects/useChartModifier.js.map +1 -1
- package/cjs-bundle/components/CollapsableSidebar.js +1 -1
- package/cjs-bundle/components/CollapsableSidebar.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -1
- package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
- package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
- package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
- package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
- package/cjs-bundle/components/FeedItem/components/FeedComments.js +1 -1
- package/cjs-bundle/components/FeedItem/components/FeedComments.js.map +1 -1
- package/cjs-bundle/components/ImageViewer/index.js +1 -1
- package/cjs-bundle/components/ImageViewer/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/Filter.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js.map +1 -1
- package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
- package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/cjs-bundle/components/Popover/Popover.js +1 -1
- package/cjs-bundle/components/Popper/Popper.js +1 -1
- package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/AppHeader.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.scss.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js +2 -0
- package/cjs-bundle/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js.map +1 -0
- package/cjs-bundle/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js +2 -0
- package/cjs-bundle/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js.map +1 -0
- package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
- package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
- package/components/AddComment/Popover.js +1 -1
- package/components/AddComment/Popover.js.map +1 -1
- package/components/AddComment/components/Content.js +1 -1
- package/components/AddComment/components/Content.js.map +1 -1
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/components/Chart/effects/useChartModifier.js +1 -1
- package/components/Chart/effects/useChartModifier.js.map +1 -1
- package/components/CollapsableSidebar.js +1 -1
- package/components/CollapsableSidebar.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -1
- package/components/DocumentViewer/DocumentViewer.js +1 -1
- package/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
- package/components/FeedItem/FeedItem.js +1 -1
- package/components/FeedItem/FeedItem.js.map +1 -1
- package/components/FeedItem/components/FeedComments.js +1 -1
- package/components/FeedItem/components/FeedComments.js.map +1 -1
- package/components/ImageViewer/index.js +1 -1
- package/components/ImageViewer/index.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.js.map +1 -1
- package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
- package/components/OffsetWellPickerV4/components/Filter/Filter.js.map +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js.map +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js.map +1 -1
- package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
- package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js.map +1 -1
- package/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
- package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/components/Popover/Popover.js +1 -1
- package/components/Popper/Popper.js +1 -1
- package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
- package/componentsV2/AppHeader/AppHeader.d.ts +3 -1
- package/componentsV2/AppHeader/AppHeader.d.ts.map +1 -1
- package/componentsV2/AppHeader/AppHeader.js +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.d.ts +2 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.scss.js +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.d.ts +8 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.stories.d.ts +1 -0
- package/componentsV2/AppHeader/V3/AppHeaderV3.stories.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.d.ts +4 -0
- package/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.d.ts.map +1 -0
- package/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js +2 -0
- package/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js.map +1 -0
- package/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.d.ts +6 -0
- package/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.d.ts.map +1 -0
- package/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js +2 -0
- package/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js.map +1 -0
- package/componentsV2/AppHeader/V3/SettingsButton/index.d.ts +3 -0
- package/componentsV2/AppHeader/V3/SettingsButton/index.d.ts.map +1 -0
- package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
- package/package.json +1 -1
- package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.js +0 -2
- package/cjs-bundle/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.js.map +0 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.js +0 -2
- package/cjs-bundle/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.js.map +0 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js +0 -2
- package/cjs-bundle/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js.map +0 -1
- package/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.d.ts +0 -4
- package/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.d.ts.map +0 -1
- package/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.js +0 -2
- package/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.js.map +0 -1
- package/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.d.ts +0 -7
- package/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.d.ts.map +0 -1
- package/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.js +0 -2
- package/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.js.map +0 -1
- package/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js +0 -2
- package/componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js.map +0 -1
- package/componentsV2/AppHeader/V3/SettingsPopover/index.d.ts +0 -3
- package/componentsV2/AppHeader/V3/SettingsPopover/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffsetWellPickerV4.js","sources":["../../../src/components/OffsetWellPickerV4/OffsetWellPickerV4.js"],"sourcesContent":["import { useState, useEffect, useRef, useCallback, useMemo } from 'react';\nimport classNames from 'classnames';\nimport { isEmpty, uniq, uniqBy, sortBy as sortArray } from 'lodash';\nimport { InfoOutlined, Replay as ReplayIcon } from '@material-ui/icons';\n\nimport {\n useAdvancedWells,\n useBicWells,\n useFilterOptions,\n useCompanyMetricKey,\n useFilteredWells,\n useSortedWells,\n useTableColumns,\n useCompanyProvider,\n useCompanies,\n} from './effects';\nimport { useFetchWells } from './effects/useFetchWells';\nimport { fetchCompanyIdsByWellIds, fetchWellsByIds } from './utils/apiCalls';\nimport { AppHeader } from './components/AppHeader';\nimport { Toolbar } from './components/Toolbar';\nimport { Filter } from './components/Filter';\nimport { WellsMap } from './components/Map';\nimport { OffsetWellsTable } from './components/OffsetWellsTable';\nimport {\n ALL_SECTION_KEY,\n ColumnType,\n COMPANY_PROVIDERS_FOR_IDAS,\n DEFAULT_BIC_OFFSET_SIZE,\n DEFAULT_LOCAL_OFFSET_SIZE,\n FilterType,\n IOS_DEVICE,\n LEAVE_TOUCH_DELAY,\n MAX_OFFSET_SIZE,\n ROWS_PER_PAGE,\n SMALL_SCREEN_HEIGHT,\n SMALL_SCREEN_WIDTH,\n TOP_GRADIENT_MAP,\n ViewType,\n RESYNC_STATUS,\n} from './constants';\nimport { SEARCH_CATEGORIES } from './components/OffsetWellsTable/AdvancedSearch/constants';\nimport { getCoordinatedWells, getMobileOperatingSystem } from './utils';\n\nimport styles from './OffsetWellPickerV4.module.css';\n\nimport { showInfoNotification } from '~/utils';\nimport { NotificationsContainer } from '~/components/Notifications';\nimport { isMobileDetected, isNativeDetected } from '~/utils/mobileDetect';\nimport { typography } from '~/styles';\nimport { Regular12, Regular14 } from '~/components/Typography';\nimport { Button, Modal, LoadingIndicator, Tooltip } from '~/components';\nimport { useGlobalOffsetWellsSync } from '~/effects';\n\nconst PAGE_NAME = 'OffsetWellPickerV4';\nconst GLOBAL_MODE_LIMIT_TEXT = 'No global limit. Each app may have its own offset limit.';\n\n/**\n * @type {React.FC<import('./OffsetWellPickerV4.types').OffsetWellPickerV4Props>}\n */\nconst OffsetWellPickerV4 = ({\n open,\n isWDUser,\n defaultSubjectWell,\n currentUser,\n offsetSettings,\n addWellsUsabilityInfo,\n isViewOnly,\n onClose,\n onSave,\n maxOffsetSize: offsetSize = DEFAULT_BIC_OFFSET_SIZE,\n localMaxOffsetSize = DEFAULT_LOCAL_OFFSET_SIZE,\n syncAutoEnabled,\n isManualWellsEnabled = false,\n isGlobalMode = false,\n}) => {\n const [activeWellId, setActiveWellId] = useState(null);\n const maxOffsetSize = Math.min(offsetSize + 1, localMaxOffsetSize + 1, MAX_OFFSET_SIZE + 1);\n const maxOffsetWellNumber = Math.min(\n Math.max(maxOffsetSize, localMaxOffsetSize + 1),\n MAX_OFFSET_SIZE + 1\n );\n\n const subjectWellId = defaultSubjectWell?.asset_id;\n useGlobalOffsetWellsSync(offsetSettings, onSave, maxOffsetWellNumber, subjectWellId);\n\n const [isFilterExpanded, setIsFilterExpanded] = useState(offsetSettings?.filterExpanded);\n const [isMapHidden, setIsMapHidden] = useState(offsetSettings?.mapHidden);\n const assetCompanyId = +defaultSubjectWell?.companyId || +currentUser?.company_id;\n const hasValidAssetId = subjectWellId > 0;\n const [filters, setFilters] = useState(offsetSettings?.filters || {});\n const { canViewCompanies, companies } = useCompanies({ open });\n const [selectedWells, setSelectedWells] = useState([]);\n const [preselectedCompanyIds, setPreselectedCompanyIds] = useState([]);\n\n // Bootstrap: ensure companies of pre-selected wells (from settings) are fetched after refresh\n useEffect(() => {\n const selectedIds = offsetSettings?.selectedWellIds || [];\n if (!open || preselectedCompanyIds.length > 0 || selectedIds.length === 0) return;\n (async () => {\n const ids = await fetchCompanyIdsByWellIds(selectedIds);\n setPreselectedCompanyIds(ids);\n })();\n }, [open, offsetSettings?.selectedWellIds, preselectedCompanyIds.length]);\n\n // Compute which companies to fetch wells from\n const companyIdsToFetch = useMemo(() => {\n // Always include companies of selected wells so they remain visible\n const selectedWellCompanyIds = selectedWells\n .map(well => well.companyId)\n .filter(id => id != null);\n const bootstrapCompanyIds = preselectedCompanyIds || [];\n\n // If user can't view companies, use default behavior (fetch from user's company only)\n if (!canViewCompanies) {\n const baseIds = assetCompanyId ? [assetCompanyId] : [];\n return [...new Set([...baseIds, ...selectedWellCompanyIds, ...bootstrapCompanyIds])];\n }\n\n const companyFilter = filters[FilterType.company];\n // If no company filter set at all, default to subject well's company (initial state)\n if (companyFilter === undefined) {\n const baseIds = assetCompanyId ? [assetCompanyId] : [];\n return [...new Set([...baseIds, ...selectedWellCompanyIds, ...bootstrapCompanyIds])];\n }\n // If company filter is empty array, user cleared it = fetch all companies\n if (Array.isArray(companyFilter) && companyFilter.length === 0) {\n return null; // null means fetch from all companies\n }\n // If company filter has values, always include subject well's company + selected wells' companies\n const allIds = [...companyFilter];\n if (assetCompanyId && !allIds.includes(assetCompanyId)) {\n allIds.push(assetCompanyId);\n }\n [...selectedWellCompanyIds, ...bootstrapCompanyIds].forEach(id => {\n if (!allIds.includes(id)) {\n allIds.push(id);\n }\n });\n return allIds;\n }, [\n filters[FilterType.company],\n assetCompanyId,\n canViewCompanies,\n selectedWells,\n preselectedCompanyIds,\n ]);\n const [selectedWellSection, setSelectedWellSection] = useState(\n offsetSettings?.wellSection || ALL_SECTION_KEY\n );\n const initLoading = useRef(true);\n const [subjectWell, setSubjectWell] = useState(null);\n const [isTableLoading, setIsTableLoading] = useState(true);\n const hasBootstrappedSelectedWells = useRef(false);\n\n // Bootstrap: ensure selected wells are populated even if not yet in `wells`\n useEffect(() => {\n if (hasBootstrappedSelectedWells.current) return;\n const selectedIds = offsetSettings?.selectedWellIds || [];\n if (!open || selectedIds.length === 0) {\n hasBootstrappedSelectedWells.current = true;\n return;\n }\n (async () => {\n const missingIds = selectedIds.filter(id => !selectedWells.some(w => w.id === id));\n if (missingIds.length === 0) {\n hasBootstrappedSelectedWells.current = true;\n return;\n }\n const fetched = await fetchWellsByIds(missingIds);\n if (subjectWell) {\n setSelectedWells(prev => {\n const withSubject = fetched.find(w => w.id === subjectWell.id)\n ? fetched\n : fetched.concat(subjectWell);\n return uniqBy(prev.concat(withSubject), 'id');\n });\n } else {\n setSelectedWells(prev => uniqBy(prev.concat(fetched), 'id'));\n }\n hasBootstrappedSelectedWells.current = true;\n })();\n }, [open, offsetSettings?.selectedWellIds]);\n const [isWellNameExpand, setIsWellNameExpand] = useState(false);\n const [isAdvancedSearchHidden, setIsAdvancedSearchHidden] = useState(false);\n const contentRef = useRef();\n const offsetWellsContainerRef = useRef();\n /** @type {ReturnType<typeof useState<string>>} */\n const [viewType, setViewType] = useState(ViewType.none);\n\n /** @type {ReturnType<typeof useRef<string>>} */\n const prevViewType = useRef();\n const [isTopGradientShow, setIsTopGradientShow] = useState(false);\n const isLimitedOffsetWells = maxOffsetWellNumber <= selectedWells?.length;\n const topGradientTop = TOP_GRADIENT_MAP[viewType];\n\n /** @type {ReturnType<typeof useRef<number[]>>} */\n const prevSelectedWellIds = useRef();\n const [appLoading, setAppLoading] = useState(true);\n\n useEffect(() => {\n if (open && isLimitedOffsetWells) {\n showInfoNotification(\n `App can’t process more than (${maxOffsetWellNumber - 1}) Offset Wells.`\n );\n }\n // NOTE: Refresh when the offset well changes externally\n if (!open) {\n const isNotChanged =\n offsetSettings?.selectedWellIds?.length === prevSelectedWellIds.current?.length &&\n offsetSettings?.selectedWellIds?.every(id => prevSelectedWellIds.current?.includes(id));\n if (!isNotChanged) {\n initLoading.current = true;\n }\n prevSelectedWellIds.current = offsetSettings?.selectedWellIds;\n }\n }, [isLimitedOffsetWells, open, offsetSettings]);\n\n useEffect(() => {\n function handleResize() {\n if (window.innerWidth <= SMALL_SCREEN_WIDTH || isMobileDetected || isNativeDetected) {\n setViewType(ViewType.mobile);\n } else if (window.innerHeight <= SMALL_SCREEN_HEIGHT) {\n setViewType(ViewType.small);\n } else {\n setViewType(ViewType.normal);\n }\n }\n\n handleResize();\n window.addEventListener('resize', handleResize);\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, [open]);\n\n useEffect(() => {\n if (prevViewType.current && viewType === prevViewType.current) return;\n prevViewType.current = viewType;\n if (viewType === ViewType.small || viewType === ViewType.mobile) {\n setIsMapHidden(true);\n setIsFilterExpanded(false);\n } else {\n setIsFilterExpanded(!isViewOnly && offsetSettings?.filterExpanded);\n setIsMapHidden(!isViewOnly && offsetSettings?.mapHidden);\n }\n setFilters(offsetSettings?.filters || {});\n setSelectedWellSection(offsetSettings?.wellSection || ALL_SECTION_KEY);\n }, [offsetSettings, isViewOnly, viewType]);\n\n // NOTE: Fetch wells based on company filter\n const [rawWells, areWellsLoading] = useFetchWells(companyIdsToFetch, addWellsUsabilityInfo);\n const [companyProvider] = useCompanyProvider(assetCompanyId);\n\n const [\n wellSections,\n setWellSections,\n bicWells,\n setBicWells,\n resyncStatus,\n setResyncStatus,\n taScores,\n ] = useBicWells(isWDUser, currentUser, subjectWellId, rawWells, isManualWellsEnabled);\n\n useEffect(() => {\n setAppLoading(true);\n setWellSections(null);\n setBicWells(null);\n }, [subjectWellId]);\n\n const [metricsKeys, setMetricsKeys] = useCompanyMetricKey(\n assetCompanyId,\n offsetSettings?.metricsKeys\n );\n\n // NOTE: Calculate wells with coordinates, metrics and well section name\n const wellsWithoutCompanyName = useAdvancedWells(\n assetCompanyId,\n rawWells,\n wellSections,\n bicWells,\n subjectWellId,\n metricsKeys,\n open\n );\n\n // NOTE: Add company names to wells for display\n const wells = useMemo(() => {\n if (!wellsWithoutCompanyName || !companies?.length) return wellsWithoutCompanyName;\n\n const companyMap = {};\n companies.forEach(company => {\n companyMap[company.id] = company.name;\n });\n\n return wellsWithoutCompanyName.map(well => ({\n ...well,\n companyName: companyMap[well.companyId] || 'Null',\n }));\n }, [wellsWithoutCompanyName, companies]);\n\n const isAllWellsLoaded = !areWellsLoading && wells?.length === rawWells?.length;\n\n useEffect(() => {\n if (!isAllWellsLoaded) return;\n const syncOffsetWells = async () => {\n const isSynced = typeof offsetSettings?.isSynced === 'undefined' || offsetSettings?.isSynced;\n let offsetWellsChanged = true;\n if (isSynced) {\n const bicWellIds = bicWells[ALL_SECTION_KEY] || [];\n const isMatched = (offsetSettings?.selectedWellIds || []).every(wellId =>\n bicWellIds.includes(wellId)\n );\n // if well hub or offset selection app be changed\n if (bicWellIds.length !== offsetSettings?.selectedWellIds?.length || !isMatched) {\n const wellsByDistance = await getCoordinatedWells(bicWellIds, subjectWellId);\n let selectedWellIds = wellsByDistance.slice(0, maxOffsetSize + 1).map(well => well.id);\n selectedWellIds = wellsByDistance.slice(0, localMaxOffsetSize + 1).map(well => well.id);\n const newOffsetSetting = {\n ...offsetSettings,\n subjectWellId,\n selectedWellIds,\n offsetWellsLimited: maxOffsetWellNumber <= selectedWellIds.length,\n };\n const offsetWells = wellsByDistance.filter(well => selectedWellIds.includes(well.id));\n onSave(newOffsetSetting, offsetWells);\n } else {\n offsetWellsChanged = false;\n }\n } else {\n offsetWellsChanged = false;\n }\n\n if (!offsetWellsChanged) {\n const offsetWells = await getCoordinatedWells(\n offsetSettings?.selectedWellIds || [],\n subjectWellId\n );\n onSave(offsetSettings, offsetWells);\n }\n };\n\n if (syncAutoEnabled && appLoading && offsetSettings && bicWells) {\n syncOffsetWells();\n setAppLoading(false);\n }\n }, [offsetSettings, bicWells, subjectWellId, maxOffsetWellNumber, syncAutoEnabled]);\n\n const filterOptions = useFilterOptions(wells, companies, canViewCompanies);\n\n // NOTE: Subject well\n useEffect(() => {\n if (wells && wellSections) {\n const defaultSubjectWell = wells.find(well => well.id === subjectWellId);\n if (defaultSubjectWell) {\n const allSectionNames = wellSections\n .filter(item => item.value !== ALL_SECTION_KEY)\n .map(({ label }) => label);\n const subjectWellWithSection = {\n ...defaultSubjectWell,\n ...(allSectionNames.length > 0 && { [ColumnType.wellSection]: allSectionNames }),\n };\n setSubjectWell(subjectWellWithSection);\n } else {\n setSubjectWell(null);\n }\n }\n }, [wellSections, wells]);\n\n // NOTE: Table columns with metrics\n const columnsWithDict = useTableColumns(metricsKeys, canViewCompanies);\n // NOTE: Filter wells\n const filteredWells = useFilteredWells(wells, filters);\n\n // NOTE: Include selected wells from other companies so they can be deselected\n const wellsToDisplay = useMemo(() => {\n if (!filteredWells) return filteredWells;\n // Ensure ALL selected wells are displayed (at top via useSortedWells)\n // regardless of current company filter\n return uniqBy([...selectedWells, ...filteredWells], 'id');\n }, [filteredWells, selectedWells]);\n\n useEffect(() => {\n if (!filteredWells || !isAllWellsLoaded) return;\n\n if (initLoading.current) {\n let data = wells.filter(well => (offsetSettings?.selectedWellIds || []).includes(well.id));\n if (subjectWell) data = data.concat(subjectWell);\n setSelectedWells(uniqBy(data, 'id'));\n initLoading.current = false;\n }\n // Don't automatically deselect wells when filters change - let user manually deselect them\n }, [wells, filteredWells, offsetSettings?.selectedWellIds, isAllWellsLoaded]);\n\n // NOTE: Sort wells\n const [sortBy, setSortBy, sortDirection, setSortDirection, sortedWells] = useSortedWells(\n subjectWell,\n wellsToDisplay,\n selectedWells,\n setIsTableLoading\n );\n\n // NOTE: Add advanced wells\n const handleAddRemoveAssets = useCallback(\n (isAdding, newAssets, assetType) => {\n let addingWellIds;\n if (assetType === SEARCH_CATEGORIES.well.name) {\n addingWellIds = newAssets;\n } else {\n addingWellIds = newAssets.reduce((acc, assetId) => {\n const rigName = wells.find(well => well.id === assetId)?.rigName;\n const rigWellIds = wells.filter(well => well.rigName === rigName).map(well => well.id);\n return acc.concat(rigWellIds);\n }, []);\n }\n let addingWells = wells.filter(({ id }) => addingWellIds.includes(id));\n if (isAdding) {\n addingWells = addingWells.slice(\n 0,\n Math.min(addingWells.length, maxOffsetWellNumber - selectedWells.length)\n );\n setSelectedWells(selectedWells => uniqBy(selectedWells.concat(addingWells), 'id'));\n } else {\n setSelectedWells(selectedWells =>\n uniq(selectedWells.filter(({ id }) => !addingWells.find(well => well.id === id)))\n );\n }\n },\n [wells, selectedWells]\n );\n\n const handleHideAdvancedSearch = useCallback(() => {\n setIsAdvancedSearchHidden(true);\n }, []);\n\n // NOTE: Change metrics keys\n const handleChangeMetricsKeys = useCallback(newMetricsKeys => {\n setMetricsKeys(newMetricsKeys);\n }, []);\n\n // NOTE: Check and Uncheck one offset well\n const handleChangeOffsetWell = useCallback((well, checked) => {\n if (checked) {\n setSelectedWells(prevWells => [...prevWells, well]);\n } else {\n setSelectedWells(prevWells => prevWells.filter(item => item.id !== well.id));\n }\n }, []);\n\n // NOTE: Select and Unselect All wells\n const handleChangeAllOffsetWells = useCallback(\n checked => {\n if (checked) {\n const data = subjectWell ? filteredWells.concat(subjectWell) : filteredWells;\n const sortedData = sortArray(uniqBy(data, 'id'), 'distance');\n setSelectedWells(sortedData.slice(0, maxOffsetWellNumber));\n } else {\n setSelectedWells(subjectWell ? [subjectWell] : []);\n }\n },\n [filteredWells, subjectWell, maxOffsetWellNumber]\n );\n\n // NOTE: Well Section change filter\n const updateSelectedWellsBySection = section => {\n if (bicWells) {\n const sectionWells = wells?.filter(well => bicWells[section]?.includes(well.id)) || [];\n const limitedWells = sortArray(sectionWells, 'distance');\n setSelectedWells(limitedWells.slice(0, maxOffsetSize));\n } else {\n setSelectedWells(subjectWell ? [subjectWell] : []);\n }\n };\n\n const handleChangeWellSection = useCallback(\n section => {\n setSelectedWellSection(section);\n updateSelectedWellsBySection(section);\n },\n [updateSelectedWellsBySection]\n );\n\n // NOTE: Get Selected wells count\n const selectedWellsCount = useMemo(() => {\n if (selectedWells.find(well => well.id === subjectWellId)) {\n return selectedWells.length - 1;\n }\n return selectedWells.length;\n }, [selectedWells, subjectWellId]);\n\n // NOTE: Save offset setting\n const isSynced = useMemo(() => {\n if (!bicWells) return false;\n const selectedWellIds = selectedWells.map(({ id }) => id);\n let synced;\n const owsWellIds = bicWells[selectedWellSection] || [];\n const owsWellIdsLength = Math.min(owsWellIds.length, maxOffsetSize);\n\n if (owsWellIdsLength !== selectedWellIds.length) {\n synced = false;\n } else {\n synced = selectedWellIds.every(id => owsWellIds.includes(id));\n }\n return synced;\n }, [bicWells, selectedWells, selectedWellSection, maxOffsetSize]);\n\n const isXtoProvider = useMemo(() => {\n return companyProvider ? COMPANY_PROVIDERS_FOR_IDAS.includes(companyProvider) : false;\n }, [companyProvider]);\n\n const offsetLabel = useMemo(() => {\n if (isXtoProvider) {\n return 'IDAS generated offsets.';\n }\n\n return isWDUser ? 'Offset Selection App.' : 'WellHub.';\n }, [isXtoProvider, isWDUser]);\n\n const handleSave = () => {\n onClose();\n\n const newOffsetSetting = {\n ...offsetSettings,\n companyId: assetCompanyId,\n subjectWellId,\n selectedWellIds: selectedWells.map(({ id }) => id),\n filters,\n metricsKeys,\n wellSection: selectedWellSection,\n isSynced,\n mapHidden: isMapHidden,\n filterExpanded: isFilterExpanded,\n offsetWellsLimited: isLimitedOffsetWells,\n };\n onSave(newOffsetSetting, selectedWells);\n };\n\n const handleCancel = () => {\n let data = (wells || []).filter(well =>\n (offsetSettings?.selectedWellIds || []).includes(well.id)\n );\n if (subjectWell) data = data.concat(subjectWell);\n setSelectedWells(uniqBy(data, 'id'));\n\n const newOffsetSetting = {\n ...offsetSettings,\n mapHidden: isMapHidden,\n filterExpanded: isFilterExpanded,\n };\n onSave(newOffsetSetting);\n setFilters(offsetSettings?.filters || {});\n setSelectedWellSection(offsetSettings?.wellSection || ALL_SECTION_KEY);\n onClose();\n };\n\n const isTableFullLoading = isTableLoading || areWellsLoading;\n\n // NOTE: Reset processing\n const isResetVisible = useMemo(() => {\n if (!hasValidAssetId) return false;\n if (isTableFullLoading) return false;\n if (!isSynced) return true;\n if (!isEmpty(filters) && filters[FilterType.sideTracks]) return true;\n if (selectedWellSection !== ALL_SECTION_KEY) return true;\n return false;\n }, [hasValidAssetId, isSynced, filters, selectedWellSection, isTableFullLoading]);\n\n const handleReset = () => {\n setFilters({});\n setSelectedWellSection(ALL_SECTION_KEY);\n updateSelectedWellsBySection(ALL_SECTION_KEY);\n };\n\n const isLoading = !wells || !wellSections || !sortedWells || viewType === ViewType.none;\n\n // NOTE: Well Name shadow\n const [isHScrollMoved, setIsHScrollMoved] = useState(false);\n const [tableRowsCount, setTableRowsCount] = useState(ROWS_PER_PAGE);\n const [tableWells, setTableWells] = useState([]);\n\n useEffect(() => {\n if (!sortedWells) return;\n\n const wells = sortedWells.slice(0, tableRowsCount);\n setTableWells(wells);\n }, [sortedWells, tableRowsCount, subjectWell]);\n\n useEffect(() => {\n if (resyncStatus === RESYNC_STATUS.SUCCEEDED) {\n handleReset();\n }\n }, [bicWells]);\n\n const handleScroll = e => {\n if (!e.target) return;\n\n if (isAdvancedSearchHidden) {\n e.target.scrollLeft = 0;\n setIsAdvancedSearchHidden(false);\n }\n\n // Check if H-Scroll is visible\n if (e.target.scrollLeft <= 5 && isHScrollMoved) {\n setIsHScrollMoved(false);\n }\n if (e.target.scrollLeft > 5 && !isHScrollMoved) {\n setIsHScrollMoved(true);\n }\n\n if (e.target.scrollTop <= 5 && isTopGradientShow) {\n setIsTopGradientShow(false);\n }\n if (e.target.scrollTop > 5 && !isTopGradientShow) {\n setIsTopGradientShow(true);\n }\n\n // Check if scroll has reached top or bottom\n if (e.target.scrollHeight === e.target.offsetHeight) return;\n\n const currentScrollBottom = Math.round(e.target.scrollTop + e.target.offsetHeight + 2);\n\n if (currentScrollBottom >= e.target.scrollHeight && tableRowsCount < sortedWells.length) {\n setTableRowsCount(count => count + ROWS_PER_PAGE);\n }\n };\n\n const tooltipContainer = () => {\n return (\n <div>\n <span className={classNames(typography.regular12, typography.colors.t1)}>\n The offset list is being automatically populated by \n </span>\n <span className={classNames(typography.medium12, typography.colors.t1)}>{offsetLabel}</span>\n </div>\n );\n };\n\n return (\n <Modal\n open={open}\n onClose={handleCancel}\n title={\n <AppHeader\n isWDUser={isWDUser}\n viewType={viewType}\n totalCount={wells?.length ?? 0}\n selectedCount={selectedWellsCount}\n isViewOnly={isViewOnly}\n maxOffsetWellNumber={maxOffsetWellNumber}\n isGlobalMode={isGlobalMode}\n />\n }\n isMobile={viewType === ViewType.mobile}\n contentContainerClassName={classNames(styles.offsetWellDialog)}\n contentClassName={classNames(styles.contentContainer, {\n [styles.smallContainer]: viewType === ViewType.small,\n [styles.contentContainerMobile]: viewType === ViewType.mobile,\n })}\n actionsClassName={styles.modalActions}\n actions={\n !isViewOnly && (\n <div className={styles.actionsWrapper}>\n {!isLoading && isResetVisible ? (\n <Tooltip\n placement=\"bottom-start\"\n title={`Reset to Synced Offsets in ${isWDUser ? 'Offset App' : 'Wellhub'}`}\n >\n <div>\n <Button\n data-testid={`${PAGE_NAME}_reset`}\n onClick={handleReset}\n color=\"primary\"\n startIcon={viewType !== ViewType.mobile && <ReplayIcon />}\n classes={viewType === ViewType.mobile && { root: styles.resetButtonMobile }}\n >\n {viewType !== ViewType.mobile ? 'Reset' : <ReplayIcon />}\n </Button>\n </div>\n </Tooltip>\n ) : (\n hasValidAssetId && (\n <div className={viewType === ViewType.mobile && styles.infoIconContainer}>\n {viewType !== ViewType.mobile ? (\n <>\n <span className={classNames(typography.regular12, typography.colors.t6)}>\n The offset list is being automatically populated by \n </span>\n <span className={classNames(typography.medium12, typography.colors.t6)}>\n {offsetLabel}\n </span>\n </>\n ) : (\n <Tooltip\n title={tooltipContainer()}\n enterTouchDelay={0}\n leaveTouchDelay={LEAVE_TOUCH_DELAY}\n >\n <InfoOutlined className={styles.infoIcon} />\n </Tooltip>\n )}\n </div>\n )\n )}\n <div className={styles.buttonGap}>\n <Button data-testid={`${PAGE_NAME}_cancel`} onClick={handleCancel} color=\"primary\">\n Cancel\n </Button>\n <Button\n data-testid={`${PAGE_NAME}_selectedWells`}\n variant=\"contained\"\n color=\"primary\"\n onClick={handleSave}\n >\n Select ({selectedWellsCount})\n </Button>\n </div>\n </div>\n )\n }\n >\n <NotificationsContainer />\n {!isLoading ? (\n <div\n className={classNames(styles.contentWrapper, {\n [styles.contentBlocked]: isTableFullLoading,\n })}\n ref={contentRef}\n >\n {viewType === ViewType.mobile && (\n <div\n className={classNames(styles.countContainer, {\n [styles.countContainerMobile]: viewType === ViewType.mobile,\n })}\n >\n <Regular14 className={styles.totalLabel}>Total:</Regular14>\n <Regular14 data-testid={`${PAGE_NAME}_totalWells`} className={styles.countValue}>\n {wells.length}\n </Regular14>\n <Regular14 className={styles.selectedLabel}>Selected:</Regular14>\n <Regular14 data-testid={`${PAGE_NAME}_selected`} className={styles.countValue}>\n {selectedWellsCount}\n </Regular14>\n <Tooltip\n title={\n isGlobalMode\n ? GLOBAL_MODE_LIMIT_TEXT\n : `App can't process more than (${maxOffsetWellNumber - 1}) Offset Wells.`\n }\n placement=\"right\"\n >\n <Regular12\n data-testid={`${PAGE_NAME}_maxOffsetSize`}\n className={styles.maxOffsetSize}\n >\n {isGlobalMode ? '' : `/${maxOffsetWellNumber - 1}`}\n </Regular12>\n </Tooltip>\n </div>\n )}\n\n {viewType === ViewType.normal && (\n <Toolbar\n isViewOnly={isViewOnly}\n isXtoProvider={isXtoProvider}\n viewType={viewType}\n filters={filters}\n setFilters={setFilters}\n isFilterExpanded={isFilterExpanded}\n setIsFilterExpanded={setIsFilterExpanded}\n isMapHidden={isMapHidden}\n setIsMapHidden={setIsMapHidden}\n resyncStatus={resyncStatus}\n setResyncStatus={setResyncStatus}\n />\n )}\n\n {isTopGradientShow && (\n <div className={styles.topGradient} style={{ top: topGradientTop }} />\n )}\n <div\n className={classNames(styles.content, {\n [styles.contentBlocked]: isTableFullLoading,\n [styles.contentMobile]: viewType === ViewType.mobile,\n [styles.contentiOSMobile]: getMobileOperatingSystem() === IOS_DEVICE,\n })}\n ref={offsetWellsContainerRef}\n onScroll={e => handleScroll(e)}\n >\n {viewType !== ViewType.normal && (\n <Toolbar\n isViewOnly={isViewOnly}\n isXtoProvider={isXtoProvider}\n viewType={viewType}\n filters={filters}\n setFilters={setFilters}\n isFilterExpanded={isFilterExpanded}\n setIsFilterExpanded={setIsFilterExpanded}\n isMapHidden={isMapHidden}\n setIsMapHidden={setIsMapHidden}\n resyncStatus={resyncStatus}\n setResyncStatus={setResyncStatus}\n />\n )}\n {!isMapHidden && open && (\n <WellsMap\n isViewOnly={isViewOnly}\n mapHidden={isMapHidden}\n subjectWell={subjectWell}\n offsetWellIds={selectedWells.map(({ id }) => id)}\n wells={wellsToDisplay}\n radius={filters[FilterType.radius]}\n handleChangeOffsetWell={handleChangeOffsetWell}\n activeWellId={activeWellId}\n viewType={viewType}\n />\n )}\n <Filter\n isHidden={!isFilterExpanded}\n isWDUser={isWDUser}\n filterOptions={filterOptions}\n filters={filters}\n wellSections={wellSections}\n selectedWellSection={selectedWellSection}\n subjectWell={subjectWell}\n assetCompanyId={assetCompanyId}\n onChangeFilters={value => {\n setIsTableLoading(true);\n setTimeout(() => setFilters(value), 0);\n }}\n onChangeBicWells={handleChangeWellSection}\n />\n <OffsetWellsTable\n open={open}\n isTableLoading={isTableFullLoading}\n companyId={assetCompanyId}\n subjectWellId={subjectWellId}\n sortBy={sortBy}\n setSortBy={setSortBy}\n sortDirection={sortDirection}\n setSortDirection={setSortDirection}\n columnsWithDict={columnsWithDict}\n wells={tableWells}\n metricsKeys={metricsKeys}\n setMetricsKeys={handleChangeMetricsKeys}\n handleChangeOffsetWell={handleChangeOffsetWell}\n handleChangeAllOffsetWells={handleChangeAllOffsetWells}\n handleAddRemoveAssets={handleAddRemoveAssets}\n isWellNameExpand={isWellNameExpand}\n setIsWellNameExpand={setIsWellNameExpand}\n isHScrollMoved={isHScrollMoved}\n onHideAdvancedSearch={handleHideAdvancedSearch}\n isViewOnly={isViewOnly}\n isLastWell={sortedWells.length <= tableRowsCount}\n contentRef={contentRef}\n offsetWellsContainerRef={offsetWellsContainerRef}\n isLimitedOffsetWells={isLimitedOffsetWells}\n maxOffsetWellNumber={maxOffsetWellNumber}\n wellSections={wellSections}\n setActiveWellId={setActiveWellId}\n viewType={viewType}\n isWDUser={isWDUser}\n taScores={taScores}\n />\n </div>\n {isViewOnly && hasValidAssetId && (\n <div className={styles.viewOnlyInfoContainer}>\n <span className={classNames(typography.regular12, typography.colors.t6)}>\n The offset list is being automatically populated by \n </span>\n <span className={classNames(typography.medium12, typography.colors.t6)}>\n {offsetLabel}\n </span>\n </div>\n )}\n </div>\n ) : (\n <LoadingIndicator fullscreen={false} />\n )}\n </Modal>\n );\n};\n\nexport default OffsetWellPickerV4;\n"],"names":["PAGE_NAME","OffsetWellPickerV4","_ref","_wells$length","_classNames","_classNames4","open","isWDUser","defaultSubjectWell","currentUser","offsetSettings","addWellsUsabilityInfo","isViewOnly","onClose","onSave","_ref$maxOffsetSize","maxOffsetSize","offsetSize","DEFAULT_BIC_OFFSET_SIZE","_ref$localMaxOffsetSi","localMaxOffsetSize","DEFAULT_LOCAL_OFFSET_SIZE","syncAutoEnabled","_ref$isManualWellsEna","isManualWellsEnabled","_ref$isGlobalMode","isGlobalMode","useState","_useState2","_slicedToArray","_useState","activeWellId","setActiveWellId","Math","min","MAX_OFFSET_SIZE","maxOffsetWellNumber","max","subjectWellId","asset_id","useGlobalOffsetWellsSync","filterExpanded","_useState4","_useState3","isFilterExpanded","setIsFilterExpanded","mapHidden","_useState6","_useState5","isMapHidden","setIsMapHidden","assetCompanyId","companyId","company_id","hasValidAssetId","_useState7","filters","_useState8","setFilters","_useCompanies","useCompanies","canViewCompanies","companies","_useState10","_useState9","selectedWells","setSelectedWells","_useState12","_useState11","preselectedCompanyIds","setPreselectedCompanyIds","useEffect","selectedIds","selectedWellIds","length","_asyncToGenerator","_regeneratorRuntime","mark","_callee","ids","wrap","_context","prev","next","fetchCompanyIdsByWellIds","sent","stop","companyIdsToFetch","useMemo","selectedWellCompanyIds","map","well","filter","id","bootstrapCompanyIds","_toConsumableArray","Set","baseIds","companyFilter","FilterType","company","undefined","Array","isArray","allIds","includes","push","forEach","_useState13","wellSection","ALL_SECTION_KEY","_useState14","selectedWellSection","setSelectedWellSection","initLoading","useRef","_useState16","_useState15","subjectWell","setSubjectWell","_useState18","_useState17","isTableLoading","setIsTableLoading","hasBootstrappedSelectedWells","current","_callee2","missingIds","fetched","_context2","some","w","abrupt","fetchWellsByIds","withSubject","find","concat","uniqBy","_useState20","_useState19","isWellNameExpand","setIsWellNameExpand","_useState22","_useState21","isAdvancedSearchHidden","setIsAdvancedSearchHidden","contentRef","offsetWellsContainerRef","_useState23","ViewType","none","_useState24","viewType","setViewType","prevViewType","_useState26","_useState25","isTopGradientShow","setIsTopGradientShow","isLimitedOffsetWells","topGradientTop","TOP_GRADIENT_MAP","prevSelectedWellIds","_useState28","_useState27","appLoading","setAppLoading","_offsetSettings$selec","_prevSelectedWellIds$","_offsetSettings$selec2","showInfoNotification","every","_prevSelectedWellIds$2","handleResize","window","innerWidth","SMALL_SCREEN_WIDTH","isMobileDetected","isNativeDetected","mobile","innerHeight","SMALL_SCREEN_HEIGHT","small","normal","addEventListener","removeEventListener","_useFetchWells","useFetchWells","_useFetchWells2","rawWells","areWellsLoading","useCompanyProvider","companyProvider","_useCompanyProvider","useBicWells","_useBicWells2","_useBicWells","wellSections","setWellSections","bicWells","setBicWells","resyncStatus","setResyncStatus","taScores","useCompanyMetricKey","metricsKeys","_useCompanyMetricKey2","_useCompanyMetricKey","setMetricsKeys","wellsWithoutCompanyName","useAdvancedWells","wells","companyMap","name","_objectSpread","companyName","isAllWellsLoaded","_ref4","syncOffsetWells","_callee3","isSynced","offsetWellsChanged","_offsetSettings$selec3","bicWellIds","isMatched","wellsByDistance","newOffsetSetting","offsetWells","_offsetWells","_context3","wellId","getCoordinatedWells","slice","offsetWellsLimited","apply","this","arguments","filterOptions","useFilterOptions","allSectionNames","item","value","_ref5","label","subjectWellWithSection","_defineProperty","ColumnType","columnsWithDict","useTableColumns","filteredWells","useFilteredWells","wellsToDisplay","data","useSortedWells","_useSortedWells2","_useSortedWells","sortBy","setSortBy","sortDirection","setSortDirection","sortedWells","handleAddRemoveAssets","useCallback","isAdding","newAssets","assetType","addingWellIds","SEARCH_CATEGORIES","reduce","acc","assetId","_wells$find","rigName","rigWellIds","addingWells","_ref7","uniq","_ref8","handleHideAdvancedSearch","handleChangeMetricsKeys","newMetricsKeys","handleChangeOffsetWell","checked","prevWells","handleChangeAllOffsetWells","sortedData","sortArray","updateSelectedWellsBySection","section","sectionWells","_bicWells$section","limitedWells","handleChangeWellSection","selectedWellsCount","_ref9","owsWellIds","isXtoProvider","COMPANY_PROVIDERS_FOR_IDAS","offsetLabel","handleCancel","isTableFullLoading","isResetVisible","isEmpty","sideTracks","handleReset","isLoading","_useState30","_useState29","isHScrollMoved","setIsHScrollMoved","ROWS_PER_PAGE","_useState32","_useState31","tableRowsCount","setTableRowsCount","_useState34","_useState33","tableWells","setTableWells","RESYNC_STATUS","SUCCEEDED","_jsxs","Modal","title","_jsx","AppHeader","totalCount","selectedCount","isMobile","contentContainerClassName","classNames","styles","offsetWellDialog","contentClassName","contentContainer","smallContainer","contentContainerMobile","actionsClassName","modalActions","actions","className","actionsWrapper","children","Tooltip","placement","Button","onClick","color","startIcon","ReplayIcon","classes","root","resetButtonMobile","infoIconContainer","_Fragment","typography","regular12","colors","t6","medium12","t1","enterTouchDelay","leaveTouchDelay","LEAVE_TOUCH_DELAY","InfoOutlined","infoIcon","buttonGap","variant","_ref10","NotificationsContainer","LoadingIndicator","fullscreen","contentWrapper","contentBlocked","ref","countContainer","countContainerMobile","Regular14","totalLabel","countValue","selectedLabel","Regular12","Toolbar","topGradient","style","top","content","contentMobile","contentiOSMobile","getMobileOperatingSystem","IOS_DEVICE","onScroll","e","target","scrollLeft","scrollTop","scrollHeight","offsetHeight","round","count","handleScroll","WellsMap","offsetWellIds","_ref11","radius","Filter","isHidden","onChangeFilters","setTimeout","onChangeBicWells","OffsetWellsTable","onHideAdvancedSearch","isLastWell","viewOnlyInfoContainer"],"mappings":"siwBAqDA,IAAMA,GAAY,qBAMZC,GAAqB,SAerBC,IAAA,IAAAC,GAAAC,GAAAC,GAdJC,MAAAA,KACAC,MAAAA,SACAC,MAAAA,mBACAC,MAAAA,YACAC,MAAAA,eACAC,MAAAA,sBACAC,MAAAA,WACAC,MAAAA,QACAC,MAAAA,OAAMC,GAAAb,GACNc,cAAeC,eAAaC,EAAuBH,GAAAI,GAAAjB,GACnDkB,mBAAAA,eAAqBC,EAAyBF,GAC9CG,MAAAA,gBAAeC,GAAArB,GACfsB,qBAAAA,gBAA4BD,GAAAE,GAAAvB,GAC5BwB,aAAAA,gBAAoBD,GAEoBE,GAAAA,EAAS,MAAKC,GAAAC,EAAAC,GAAA,GAA/CC,GAAYH,GAAA,GAAEI,GAAeJ,GAAA,GAC9BZ,GAAgBiB,KAAKC,IAAIjB,GAAa,EAAGG,GAAqB,EAAGe,EAAkB,GACnFC,GAAsBH,KAAKC,IAC/BD,KAAKI,IAAIrB,GAAeI,GAAqB,GAC7Ce,EAAkB,GAGdG,GAAgB9B,cAAAA,EAAAA,GAAoB+B,SAC1CC,G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ZgZ,WAAYxJ,GAAY1L,QAAU+O,GAClCvK,WAAYA,GACZC,wBAAyBA,GACzBY,qBAAsBA,GACtB3H,oBAAqBA,GACrBiK,aAAcA,GACdrK,gBAAiBA,GACjBwH,SAAUA,GACVjJ,SAAUA,GACVoM,SAAUA,QAGb/L,IAAc0C,IACb2Q,EAAA,MAAA,CAAKmB,UAAWT,EAAOkF,sBAAsBvE,SAC3C,CAAAlB,GAAA,OAAA,CAAMgB,UAAWV,EAAWyB,GAAWC,UAAWD,GAAWE,OAAOC,IAAIhB,SAAA,yDAGxElB,GAAA,OAAA,CAAMgB,UAAWV,EAAWyB,GAAWI,SAAUJ,GAAWE,OAAOC,IAAIhB,SACpE5C,aAUjB"}
|
|
1
|
+
{"version":3,"file":"OffsetWellPickerV4.js","sources":["../../../src/components/OffsetWellPickerV4/OffsetWellPickerV4.js"],"sourcesContent":["import { useState, useEffect, useRef, useCallback, useMemo } from 'react';\nimport classNames from 'classnames';\nimport { isEmpty, uniq, uniqBy, sortBy as sortArray } from 'lodash';\nimport { InfoOutlined, Replay as ReplayIcon } from '@material-ui/icons';\n\nimport {\n useAdvancedWells,\n useBicWells,\n useFilterOptions,\n useCompanyMetricKey,\n useFilteredWells,\n useSortedWells,\n useTableColumns,\n useCompanyProvider,\n useCompanies,\n} from './effects';\nimport { useFetchWells } from './effects/useFetchWells';\nimport { fetchCompanyIdsByWellIds, fetchWellsByIds } from './utils/apiCalls';\nimport { AppHeader } from './components/AppHeader';\nimport { Toolbar } from './components/Toolbar';\nimport { Filter } from './components/Filter';\nimport { WellsMap } from './components/Map';\nimport { OffsetWellsTable } from './components/OffsetWellsTable';\nimport {\n ALL_SECTION_KEY,\n ColumnType,\n COMPANY_PROVIDERS_FOR_IDAS,\n DEFAULT_BIC_OFFSET_SIZE,\n DEFAULT_LOCAL_OFFSET_SIZE,\n FilterType,\n IOS_DEVICE,\n LEAVE_TOUCH_DELAY,\n MAX_OFFSET_SIZE,\n ROWS_PER_PAGE,\n SMALL_SCREEN_HEIGHT,\n SMALL_SCREEN_WIDTH,\n TOP_GRADIENT_MAP,\n ViewType,\n RESYNC_STATUS,\n} from './constants';\nimport { SEARCH_CATEGORIES } from './components/OffsetWellsTable/AdvancedSearch/constants';\nimport { getCoordinatedWells, getMobileOperatingSystem } from './utils';\n\nimport styles from './OffsetWellPickerV4.module.css';\n\nimport { showInfoNotification } from '~/utils';\nimport { NotificationsContainer } from '~/components/Notifications';\nimport { isMobileDetected, isNativeDetected } from '~/utils/mobileDetect';\nimport { typography } from '~/styles';\nimport { Regular12, Regular14 } from '~/components/Typography';\nimport { Button, Modal, LoadingIndicator, Tooltip } from '~/components';\nimport { useGlobalOffsetWellsSync } from '~/effects';\n\nconst PAGE_NAME = 'OffsetWellPickerV4';\nconst GLOBAL_MODE_LIMIT_TEXT = 'No global limit. Each app may have its own offset limit.';\n\n/**\n * @type {React.FC<import('./OffsetWellPickerV4.types').OffsetWellPickerV4Props>}\n */\nconst OffsetWellPickerV4 = ({\n open,\n isWDUser,\n defaultSubjectWell,\n currentUser,\n offsetSettings,\n addWellsUsabilityInfo,\n isViewOnly,\n onClose,\n onSave,\n maxOffsetSize: offsetSize = DEFAULT_BIC_OFFSET_SIZE,\n localMaxOffsetSize = DEFAULT_LOCAL_OFFSET_SIZE,\n syncAutoEnabled,\n isManualWellsEnabled = false,\n isGlobalMode = false,\n}) => {\n const [activeWellId, setActiveWellId] = useState(null);\n const maxOffsetSize = Math.min(offsetSize + 1, localMaxOffsetSize + 1, MAX_OFFSET_SIZE + 1);\n const maxOffsetWellNumber = Math.min(\n Math.max(maxOffsetSize, localMaxOffsetSize + 1),\n MAX_OFFSET_SIZE + 1\n );\n\n const subjectWellId = defaultSubjectWell?.asset_id;\n useGlobalOffsetWellsSync(offsetSettings, onSave, maxOffsetWellNumber, subjectWellId);\n\n const [isFilterExpanded, setIsFilterExpanded] = useState(offsetSettings?.filterExpanded);\n const [isMapHidden, setIsMapHidden] = useState(offsetSettings?.mapHidden);\n const assetCompanyId = +defaultSubjectWell?.companyId || +currentUser?.company_id;\n const hasValidAssetId = subjectWellId > 0;\n const [filters, setFilters] = useState(offsetSettings?.filters || {});\n const { canViewCompanies, companies } = useCompanies({ open });\n const [selectedWells, setSelectedWells] = useState([]);\n const [preselectedCompanyIds, setPreselectedCompanyIds] = useState([]);\n\n // Bootstrap: ensure companies of pre-selected wells (from settings) are fetched after refresh\n useEffect(() => {\n const selectedIds = offsetSettings?.selectedWellIds || [];\n if (!open || preselectedCompanyIds.length > 0 || selectedIds.length === 0) return;\n (async () => {\n const ids = await fetchCompanyIdsByWellIds(selectedIds);\n setPreselectedCompanyIds(ids);\n })();\n }, [open, offsetSettings?.selectedWellIds, preselectedCompanyIds.length]);\n\n // Compute which companies to fetch wells from\n const companyIdsToFetch = useMemo(() => {\n // Always include companies of selected wells so they remain visible\n const selectedWellCompanyIds = selectedWells\n .map(well => well.companyId)\n .filter(id => id != null);\n const bootstrapCompanyIds = preselectedCompanyIds || [];\n\n // If user can't view companies, use default behavior (fetch from user's company only)\n if (!canViewCompanies) {\n const baseIds = assetCompanyId ? [assetCompanyId] : [];\n return [...new Set([...baseIds, ...selectedWellCompanyIds, ...bootstrapCompanyIds])];\n }\n\n const companyFilter = filters[FilterType.company];\n // If no company filter set at all, default to subject well's company (initial state)\n if (companyFilter === undefined) {\n const baseIds = assetCompanyId ? [assetCompanyId] : [];\n return [...new Set([...baseIds, ...selectedWellCompanyIds, ...bootstrapCompanyIds])];\n }\n // If company filter is empty array, user cleared it = fetch all companies\n if (Array.isArray(companyFilter) && companyFilter.length === 0) {\n return null; // null means fetch from all companies\n }\n // If company filter has values, always include subject well's company + selected wells' companies\n const allIds = [...companyFilter];\n if (assetCompanyId && !allIds.includes(assetCompanyId)) {\n allIds.push(assetCompanyId);\n }\n [...selectedWellCompanyIds, ...bootstrapCompanyIds].forEach(id => {\n if (!allIds.includes(id)) {\n allIds.push(id);\n }\n });\n return allIds;\n }, [\n filters[FilterType.company],\n assetCompanyId,\n canViewCompanies,\n selectedWells,\n preselectedCompanyIds,\n ]);\n const [selectedWellSection, setSelectedWellSection] = useState(\n offsetSettings?.wellSection || ALL_SECTION_KEY\n );\n const initLoading = useRef(true);\n const [subjectWell, setSubjectWell] = useState(null);\n const [isTableLoading, setIsTableLoading] = useState(true);\n const hasBootstrappedSelectedWells = useRef(false);\n\n // Bootstrap: ensure selected wells are populated even if not yet in `wells`\n useEffect(() => {\n if (hasBootstrappedSelectedWells.current) return;\n const selectedIds = offsetSettings?.selectedWellIds || [];\n if (!open || selectedIds.length === 0) {\n hasBootstrappedSelectedWells.current = true;\n return;\n }\n (async () => {\n const missingIds = selectedIds.filter(id => !selectedWells.some(w => w.id === id));\n if (missingIds.length === 0) {\n hasBootstrappedSelectedWells.current = true;\n return;\n }\n const fetched = await fetchWellsByIds(missingIds);\n if (subjectWell) {\n setSelectedWells(prev => {\n const withSubject = fetched.find(w => w.id === subjectWell.id)\n ? fetched\n : fetched.concat(subjectWell);\n return uniqBy(prev.concat(withSubject), 'id');\n });\n } else {\n setSelectedWells(prev => uniqBy(prev.concat(fetched), 'id'));\n }\n hasBootstrappedSelectedWells.current = true;\n })();\n }, [open, offsetSettings?.selectedWellIds]);\n const [isWellNameExpand, setIsWellNameExpand] = useState(false);\n const [isAdvancedSearchHidden, setIsAdvancedSearchHidden] = useState(false);\n const contentRef = useRef();\n const offsetWellsContainerRef = useRef();\n /** @type {ReturnType<typeof useState<string>>} */\n const [viewType, setViewType] = useState(ViewType.none);\n\n /** @type {ReturnType<typeof useRef<string>>} */\n const prevViewType = useRef();\n const [isTopGradientShow, setIsTopGradientShow] = useState(false);\n const isLimitedOffsetWells = maxOffsetWellNumber <= selectedWells?.length;\n const topGradientTop = TOP_GRADIENT_MAP[viewType];\n\n /** @type {ReturnType<typeof useRef<number[]>>} */\n const prevSelectedWellIds = useRef();\n const [appLoading, setAppLoading] = useState(true);\n\n useEffect(() => {\n if (open && isLimitedOffsetWells) {\n showInfoNotification(\n `App can’t process more than (${maxOffsetWellNumber - 1}) Offset Wells.`\n );\n }\n // NOTE: Refresh when the offset well changes externally\n if (!open) {\n const isNotChanged =\n offsetSettings?.selectedWellIds?.length === prevSelectedWellIds.current?.length &&\n offsetSettings?.selectedWellIds?.every(id => prevSelectedWellIds.current?.includes(id));\n if (!isNotChanged) {\n initLoading.current = true;\n }\n prevSelectedWellIds.current = offsetSettings?.selectedWellIds;\n }\n }, [isLimitedOffsetWells, open, offsetSettings]);\n\n useEffect(() => {\n function handleResize() {\n if (window.innerWidth <= SMALL_SCREEN_WIDTH || isMobileDetected || isNativeDetected) {\n setViewType(ViewType.mobile);\n } else if (window.innerHeight <= SMALL_SCREEN_HEIGHT) {\n setViewType(ViewType.small);\n } else {\n setViewType(ViewType.normal);\n }\n }\n\n handleResize();\n window.addEventListener('resize', handleResize);\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, [open]);\n\n useEffect(() => {\n if (prevViewType.current && viewType === prevViewType.current) return;\n prevViewType.current = viewType;\n if (viewType === ViewType.small || viewType === ViewType.mobile) {\n setIsMapHidden(true);\n setIsFilterExpanded(false);\n } else {\n setIsFilterExpanded(!isViewOnly && offsetSettings?.filterExpanded);\n setIsMapHidden(!isViewOnly && offsetSettings?.mapHidden);\n }\n setFilters(offsetSettings?.filters || {});\n setSelectedWellSection(offsetSettings?.wellSection || ALL_SECTION_KEY);\n }, [offsetSettings, isViewOnly, viewType]);\n\n // NOTE: Fetch wells based on company filter\n const [rawWells, areWellsLoading] = useFetchWells(companyIdsToFetch, addWellsUsabilityInfo);\n const [companyProvider] = useCompanyProvider(assetCompanyId);\n\n const [\n wellSections,\n setWellSections,\n bicWells,\n setBicWells,\n resyncStatus,\n setResyncStatus,\n taScores,\n ] = useBicWells(isWDUser, currentUser, subjectWellId, rawWells, isManualWellsEnabled);\n\n useEffect(() => {\n setAppLoading(true);\n setWellSections(null);\n setBicWells(null);\n }, [subjectWellId]);\n\n const [metricsKeys, setMetricsKeys] = useCompanyMetricKey(\n assetCompanyId,\n offsetSettings?.metricsKeys\n );\n\n // NOTE: Calculate wells with coordinates, metrics and well section name\n const wellsWithoutCompanyName = useAdvancedWells(\n assetCompanyId,\n rawWells,\n wellSections,\n bicWells,\n subjectWellId,\n metricsKeys,\n open\n );\n\n // NOTE: Add company names to wells for display\n const wells = useMemo(() => {\n if (!wellsWithoutCompanyName || !companies?.length) return wellsWithoutCompanyName;\n\n const companyMap = {};\n companies.forEach(company => {\n companyMap[company.id] = company.name;\n });\n\n return wellsWithoutCompanyName.map(well => ({\n ...well,\n companyName: companyMap[well.companyId] || 'Null',\n }));\n }, [wellsWithoutCompanyName, companies]);\n\n const isAllWellsLoaded = !areWellsLoading && wells?.length === rawWells?.length;\n\n useEffect(() => {\n if (!isAllWellsLoaded) return;\n const syncOffsetWells = async () => {\n const isSynced = typeof offsetSettings?.isSynced === 'undefined' || offsetSettings?.isSynced;\n let offsetWellsChanged = true;\n if (isSynced) {\n const bicWellIds = bicWells[ALL_SECTION_KEY] || [];\n const isMatched = (offsetSettings?.selectedWellIds || []).every(wellId =>\n bicWellIds.includes(wellId)\n );\n // if well hub or offset selection app be changed\n if (bicWellIds.length !== offsetSettings?.selectedWellIds?.length || !isMatched) {\n const wellsByDistance = await getCoordinatedWells(bicWellIds, subjectWellId);\n let selectedWellIds = wellsByDistance.slice(0, maxOffsetSize + 1).map(well => well.id);\n selectedWellIds = wellsByDistance.slice(0, localMaxOffsetSize + 1).map(well => well.id);\n const newOffsetSetting = {\n ...offsetSettings,\n subjectWellId,\n selectedWellIds,\n offsetWellsLimited: maxOffsetWellNumber <= selectedWellIds.length,\n };\n const offsetWells = wellsByDistance.filter(well => selectedWellIds.includes(well.id));\n onSave(newOffsetSetting, offsetWells);\n } else {\n offsetWellsChanged = false;\n }\n } else {\n offsetWellsChanged = false;\n }\n\n if (!offsetWellsChanged) {\n const offsetWells = await getCoordinatedWells(\n offsetSettings?.selectedWellIds || [],\n subjectWellId\n );\n onSave(offsetSettings, offsetWells);\n }\n };\n\n if (syncAutoEnabled && appLoading && offsetSettings && bicWells) {\n syncOffsetWells();\n setAppLoading(false);\n }\n }, [offsetSettings, bicWells, subjectWellId, maxOffsetWellNumber, syncAutoEnabled]);\n\n const filterOptions = useFilterOptions(wells, companies, canViewCompanies);\n\n // NOTE: Subject well\n useEffect(() => {\n if (wells && wellSections) {\n const defaultSubjectWell = wells.find(well => well.id === subjectWellId);\n if (defaultSubjectWell) {\n const allSectionNames = wellSections\n .filter(item => item.value !== ALL_SECTION_KEY)\n .map(({ label }) => label);\n const subjectWellWithSection = {\n ...defaultSubjectWell,\n ...(allSectionNames.length > 0 && { [ColumnType.wellSection]: allSectionNames }),\n };\n setSubjectWell(subjectWellWithSection);\n } else {\n setSubjectWell(null);\n }\n }\n }, [wellSections, wells]);\n\n // NOTE: Table columns with metrics\n const columnsWithDict = useTableColumns(metricsKeys, canViewCompanies);\n // NOTE: Filter wells\n const filteredWells = useFilteredWells(wells, filters);\n\n // NOTE: Include selected wells from other companies so they can be deselected\n const wellsToDisplay = useMemo(() => {\n if (!filteredWells) return filteredWells;\n // Ensure ALL selected wells are displayed (at top via useSortedWells)\n // regardless of current company filter\n return uniqBy([...selectedWells, ...filteredWells], 'id');\n }, [filteredWells, selectedWells]);\n\n useEffect(() => {\n if (!filteredWells || !isAllWellsLoaded) return;\n\n if (initLoading.current) {\n let data = wells.filter(well => (offsetSettings?.selectedWellIds || []).includes(well.id));\n if (subjectWell) data = data.concat(subjectWell);\n setSelectedWells(uniqBy(data, 'id'));\n initLoading.current = false;\n }\n // Don't automatically deselect wells when filters change - let user manually deselect them\n }, [wells, filteredWells, offsetSettings?.selectedWellIds, isAllWellsLoaded]);\n\n // NOTE: Sort wells\n const [sortBy, setSortBy, sortDirection, setSortDirection, sortedWells] = useSortedWells(\n subjectWell,\n wellsToDisplay,\n selectedWells,\n setIsTableLoading\n );\n\n // NOTE: Add advanced wells\n const handleAddRemoveAssets = useCallback(\n (isAdding, newAssets, assetType) => {\n let addingWellIds;\n if (assetType === SEARCH_CATEGORIES.well.name) {\n addingWellIds = newAssets;\n } else {\n addingWellIds = newAssets.reduce((acc, assetId) => {\n const rigName = wells.find(well => well.id === assetId)?.rigName;\n const rigWellIds = wells.filter(well => well.rigName === rigName).map(well => well.id);\n return acc.concat(rigWellIds);\n }, []);\n }\n let addingWells = wells.filter(({ id }) => addingWellIds.includes(id));\n if (isAdding) {\n addingWells = addingWells.slice(\n 0,\n Math.min(addingWells.length, maxOffsetWellNumber - selectedWells.length)\n );\n setSelectedWells(selectedWells => uniqBy(selectedWells.concat(addingWells), 'id'));\n } else {\n setSelectedWells(selectedWells =>\n uniq(selectedWells.filter(({ id }) => !addingWells.find(well => well.id === id)))\n );\n }\n },\n [wells, selectedWells]\n );\n\n const handleHideAdvancedSearch = useCallback(() => {\n setIsAdvancedSearchHidden(true);\n }, []);\n\n // NOTE: Change metrics keys\n const handleChangeMetricsKeys = useCallback(newMetricsKeys => {\n setMetricsKeys(newMetricsKeys);\n }, []);\n\n // NOTE: Check and Uncheck one offset well\n const handleChangeOffsetWell = useCallback((well, checked) => {\n if (checked) {\n setSelectedWells(prevWells => [...prevWells, well]);\n } else {\n setSelectedWells(prevWells => prevWells.filter(item => item.id !== well.id));\n }\n }, []);\n\n // NOTE: Select and Unselect All wells\n const handleChangeAllOffsetWells = useCallback(\n checked => {\n if (checked) {\n const data = subjectWell ? filteredWells.concat(subjectWell) : filteredWells;\n const sortedData = sortArray(uniqBy(data, 'id'), 'distance');\n setSelectedWells(sortedData.slice(0, maxOffsetWellNumber));\n } else {\n setSelectedWells(subjectWell ? [subjectWell] : []);\n }\n },\n [filteredWells, subjectWell, maxOffsetWellNumber]\n );\n\n // NOTE: Well Section change filter\n const updateSelectedWellsBySection = section => {\n if (bicWells) {\n const sectionWells = wells?.filter(well => bicWells[section]?.includes(well.id)) || [];\n const limitedWells = sortArray(sectionWells, 'distance');\n setSelectedWells(limitedWells.slice(0, maxOffsetSize));\n } else {\n setSelectedWells(subjectWell ? [subjectWell] : []);\n }\n };\n\n const handleChangeWellSection = useCallback(\n section => {\n setSelectedWellSection(section);\n updateSelectedWellsBySection(section);\n },\n [updateSelectedWellsBySection]\n );\n\n // NOTE: Get Selected wells count\n const selectedWellsCount = useMemo(() => {\n if (selectedWells.find(well => well.id === subjectWellId)) {\n return selectedWells.length - 1;\n }\n return selectedWells.length;\n }, [selectedWells, subjectWellId]);\n\n // NOTE: Save offset setting\n const isSynced = useMemo(() => {\n if (!bicWells) return false;\n const selectedWellIds = selectedWells.map(({ id }) => id);\n let synced;\n const owsWellIds = bicWells[selectedWellSection] || [];\n const owsWellIdsLength = Math.min(owsWellIds.length, maxOffsetSize);\n\n if (owsWellIdsLength !== selectedWellIds.length) {\n synced = false;\n } else {\n synced = selectedWellIds.every(id => owsWellIds.includes(id));\n }\n return synced;\n }, [bicWells, selectedWells, selectedWellSection, maxOffsetSize]);\n\n const isXtoProvider = useMemo(() => {\n return companyProvider ? COMPANY_PROVIDERS_FOR_IDAS.includes(companyProvider) : false;\n }, [companyProvider]);\n\n const offsetLabel = useMemo(() => {\n if (isXtoProvider) {\n return 'IDAS generated offsets.';\n }\n\n return isWDUser ? 'Offset Selection App.' : 'WellHub.';\n }, [isXtoProvider, isWDUser]);\n\n const handleSave = () => {\n onClose();\n\n const newOffsetSetting = {\n ...offsetSettings,\n companyId: assetCompanyId,\n subjectWellId,\n selectedWellIds: selectedWells.map(({ id }) => id),\n filters,\n metricsKeys,\n wellSection: selectedWellSection,\n isSynced,\n mapHidden: isMapHidden,\n filterExpanded: isFilterExpanded,\n offsetWellsLimited: isLimitedOffsetWells,\n };\n onSave(newOffsetSetting, selectedWells);\n };\n\n const handleCancel = () => {\n let data = (wells || []).filter(well =>\n (offsetSettings?.selectedWellIds || []).includes(well.id)\n );\n if (subjectWell) data = data.concat(subjectWell);\n setSelectedWells(uniqBy(data, 'id'));\n\n const newOffsetSetting = {\n ...offsetSettings,\n mapHidden: isMapHidden,\n filterExpanded: isFilterExpanded,\n };\n onSave(newOffsetSetting);\n setFilters(offsetSettings?.filters || {});\n setSelectedWellSection(offsetSettings?.wellSection || ALL_SECTION_KEY);\n onClose();\n };\n\n const isTableFullLoading = isTableLoading || areWellsLoading;\n\n // NOTE: Reset processing\n const isResetVisible = useMemo(() => {\n if (!hasValidAssetId) return false;\n if (isTableFullLoading) return false;\n if (!isSynced) return true;\n if (!isEmpty(filters) && filters[FilterType.sideTracks]) return true;\n if (selectedWellSection !== ALL_SECTION_KEY) return true;\n return false;\n }, [hasValidAssetId, isSynced, filters, selectedWellSection, isTableFullLoading]);\n\n const handleReset = () => {\n setFilters({});\n setSelectedWellSection(ALL_SECTION_KEY);\n updateSelectedWellsBySection(ALL_SECTION_KEY);\n };\n\n const isLoading = !wells || !wellSections || !sortedWells || viewType === ViewType.none;\n\n // NOTE: Well Name shadow\n const [isHScrollMoved, setIsHScrollMoved] = useState(false);\n const [tableRowsCount, setTableRowsCount] = useState(ROWS_PER_PAGE);\n const [tableWells, setTableWells] = useState([]);\n\n useEffect(() => {\n if (!sortedWells) return;\n\n const wells = sortedWells.slice(0, tableRowsCount);\n setTableWells(wells);\n }, [sortedWells, tableRowsCount, subjectWell]);\n\n useEffect(() => {\n if (resyncStatus === RESYNC_STATUS.SUCCEEDED) {\n handleReset();\n }\n }, [bicWells]);\n\n const handleScroll = e => {\n if (!e.target) return;\n\n if (isAdvancedSearchHidden) {\n e.target.scrollLeft = 0;\n setIsAdvancedSearchHidden(false);\n }\n\n // Check if H-Scroll is visible\n if (e.target.scrollLeft <= 5 && isHScrollMoved) {\n setIsHScrollMoved(false);\n }\n if (e.target.scrollLeft > 5 && !isHScrollMoved) {\n setIsHScrollMoved(true);\n }\n\n if (e.target.scrollTop <= 5 && isTopGradientShow) {\n setIsTopGradientShow(false);\n }\n if (e.target.scrollTop > 5 && !isTopGradientShow) {\n setIsTopGradientShow(true);\n }\n\n // Check if scroll has reached top or bottom\n if (e.target.scrollHeight === e.target.offsetHeight) return;\n\n const currentScrollBottom = Math.round(e.target.scrollTop + e.target.offsetHeight + 2);\n\n if (currentScrollBottom >= e.target.scrollHeight && tableRowsCount < sortedWells.length) {\n setTableRowsCount(count => count + ROWS_PER_PAGE);\n }\n };\n\n const tooltipContainer = () => {\n return (\n <div>\n <span className={classNames(typography.regular12, typography.colors.t1)}>\n The offset list is being automatically populated by \n </span>\n <span className={classNames(typography.medium12, typography.colors.t1)}>{offsetLabel}</span>\n </div>\n );\n };\n\n return (\n <Modal\n open={open}\n onClose={handleCancel}\n title={\n <AppHeader\n isWDUser={isWDUser}\n viewType={viewType}\n totalCount={wells?.length ?? 0}\n selectedCount={selectedWellsCount}\n isViewOnly={isViewOnly}\n maxOffsetWellNumber={maxOffsetWellNumber}\n isGlobalMode={isGlobalMode}\n />\n }\n isMobile={viewType === ViewType.mobile}\n contentContainerClassName={classNames(styles.offsetWellDialog)}\n contentClassName={classNames(styles.contentContainer, {\n [styles.smallContainer]: viewType === ViewType.small,\n [styles.contentContainerMobile]: viewType === ViewType.mobile,\n })}\n actionsClassName={styles.modalActions}\n actions={\n !isViewOnly && (\n <div className={styles.actionsWrapper}>\n {!isLoading && isResetVisible ? (\n <Tooltip\n placement=\"bottom-start\"\n title={`Reset to Synced Offsets in ${isWDUser ? 'Offset App' : 'Wellhub'}`}\n >\n <div>\n <Button\n data-testid={`${PAGE_NAME}_reset`}\n onClick={handleReset}\n color=\"primary\"\n startIcon={viewType !== ViewType.mobile && <ReplayIcon />}\n classes={viewType === ViewType.mobile && { root: styles.resetButtonMobile }}\n >\n {viewType !== ViewType.mobile ? 'Reset' : <ReplayIcon />}\n </Button>\n </div>\n </Tooltip>\n ) : (\n hasValidAssetId && (\n <div className={viewType === ViewType.mobile && styles.infoIconContainer}>\n {viewType !== ViewType.mobile ? (\n <>\n <span className={classNames(typography.regular12, typography.colors.t6)}>\n The offset list is being automatically populated by \n </span>\n <span className={classNames(typography.medium12, typography.colors.t6)}>\n {offsetLabel}\n </span>\n </>\n ) : (\n <Tooltip\n title={tooltipContainer()}\n enterTouchDelay={0}\n leaveTouchDelay={LEAVE_TOUCH_DELAY}\n >\n <InfoOutlined className={styles.infoIcon} />\n </Tooltip>\n )}\n </div>\n )\n )}\n <div className={styles.buttonGap}>\n <Button data-testid={`${PAGE_NAME}_cancel`} onClick={handleCancel} color=\"primary\">\n Cancel\n </Button>\n <Button\n data-testid={`${PAGE_NAME}_selectedWells`}\n variant=\"contained\"\n color=\"primary\"\n onClick={handleSave}\n >\n Select ({selectedWellsCount})\n </Button>\n </div>\n </div>\n )\n }\n >\n <NotificationsContainer />\n {!isLoading ? (\n <div\n className={classNames(styles.contentWrapper, {\n [styles.contentBlocked]: isTableFullLoading,\n })}\n ref={contentRef}\n >\n {viewType === ViewType.mobile && (\n <div\n className={classNames(styles.countContainer, {\n [styles.countContainerMobile]: viewType === ViewType.mobile,\n })}\n >\n <Regular14 className={styles.totalLabel}>Total:</Regular14>\n <Regular14 data-testid={`${PAGE_NAME}_totalWells`} className={styles.countValue}>\n {wells.length}\n </Regular14>\n <Regular14 className={styles.selectedLabel}>Selected:</Regular14>\n <Regular14 data-testid={`${PAGE_NAME}_selected`} className={styles.countValue}>\n {selectedWellsCount}\n </Regular14>\n <Tooltip\n title={\n isGlobalMode\n ? GLOBAL_MODE_LIMIT_TEXT\n : `App can't process more than (${maxOffsetWellNumber - 1}) Offset Wells.`\n }\n placement=\"right\"\n >\n <Regular12\n data-testid={`${PAGE_NAME}_maxOffsetSize`}\n className={styles.maxOffsetSize}\n >\n {isGlobalMode ? '' : `/${maxOffsetWellNumber - 1}`}\n </Regular12>\n </Tooltip>\n </div>\n )}\n\n {viewType === ViewType.normal && (\n <Toolbar\n isViewOnly={isViewOnly}\n isXtoProvider={isXtoProvider}\n viewType={viewType}\n filters={filters}\n setFilters={setFilters}\n isFilterExpanded={isFilterExpanded}\n setIsFilterExpanded={setIsFilterExpanded}\n isMapHidden={isMapHidden}\n setIsMapHidden={setIsMapHidden}\n resyncStatus={resyncStatus}\n setResyncStatus={setResyncStatus}\n />\n )}\n\n {isTopGradientShow && (\n <div className={styles.topGradient} style={{ top: topGradientTop }} />\n )}\n <div\n className={classNames(styles.content, {\n [styles.contentBlocked]: isTableFullLoading,\n [styles.contentMobile]: viewType === ViewType.mobile,\n [styles.contentiOSMobile]: getMobileOperatingSystem() === IOS_DEVICE,\n })}\n ref={offsetWellsContainerRef}\n onScroll={e => handleScroll(e)}\n >\n {viewType !== ViewType.normal && (\n <Toolbar\n isViewOnly={isViewOnly}\n isXtoProvider={isXtoProvider}\n viewType={viewType}\n filters={filters}\n setFilters={setFilters}\n isFilterExpanded={isFilterExpanded}\n setIsFilterExpanded={setIsFilterExpanded}\n isMapHidden={isMapHidden}\n setIsMapHidden={setIsMapHidden}\n resyncStatus={resyncStatus}\n setResyncStatus={setResyncStatus}\n />\n )}\n {!isMapHidden && open && (\n <WellsMap\n isViewOnly={isViewOnly}\n mapHidden={isMapHidden}\n subjectWell={subjectWell}\n offsetWellIds={selectedWells.map(({ id }) => id)}\n wells={wellsToDisplay}\n radius={filters[FilterType.radius]}\n handleChangeOffsetWell={handleChangeOffsetWell}\n activeWellId={activeWellId}\n viewType={viewType}\n />\n )}\n <Filter\n isHidden={!isFilterExpanded}\n isWDUser={isWDUser}\n filterOptions={filterOptions}\n filters={filters}\n wellSections={wellSections}\n selectedWellSection={selectedWellSection}\n subjectWell={subjectWell}\n assetCompanyId={assetCompanyId}\n onChangeFilters={value => {\n setIsTableLoading(true);\n setTimeout(() => setFilters(value), 0);\n }}\n onChangeBicWells={handleChangeWellSection}\n />\n <OffsetWellsTable\n open={open}\n isTableLoading={isTableFullLoading}\n companyId={assetCompanyId}\n subjectWellId={subjectWellId}\n sortBy={sortBy}\n setSortBy={setSortBy}\n sortDirection={sortDirection}\n setSortDirection={setSortDirection}\n columnsWithDict={columnsWithDict}\n wells={tableWells}\n metricsKeys={metricsKeys}\n setMetricsKeys={handleChangeMetricsKeys}\n handleChangeOffsetWell={handleChangeOffsetWell}\n handleChangeAllOffsetWells={handleChangeAllOffsetWells}\n handleAddRemoveAssets={handleAddRemoveAssets}\n isWellNameExpand={isWellNameExpand}\n setIsWellNameExpand={setIsWellNameExpand}\n isHScrollMoved={isHScrollMoved}\n onHideAdvancedSearch={handleHideAdvancedSearch}\n isViewOnly={isViewOnly}\n isLastWell={sortedWells.length <= tableRowsCount}\n contentRef={contentRef}\n offsetWellsContainerRef={offsetWellsContainerRef}\n isLimitedOffsetWells={isLimitedOffsetWells}\n maxOffsetWellNumber={maxOffsetWellNumber}\n wellSections={wellSections}\n setActiveWellId={setActiveWellId}\n viewType={viewType}\n isWDUser={isWDUser}\n taScores={taScores}\n />\n </div>\n {isViewOnly && hasValidAssetId && (\n <div className={styles.viewOnlyInfoContainer}>\n <span className={classNames(typography.regular12, typography.colors.t6)}>\n The offset list is being automatically populated by \n </span>\n <span className={classNames(typography.medium12, typography.colors.t6)}>\n {offsetLabel}\n </span>\n </div>\n )}\n </div>\n ) : (\n <LoadingIndicator fullscreen={false} />\n )}\n </Modal>\n );\n};\n\nexport default OffsetWellPickerV4;\n"],"names":["PAGE_NAME","OffsetWellPickerV4","_ref","_wells$length","_classNames","_classNames4","open","isWDUser","defaultSubjectWell","currentUser","offsetSettings","addWellsUsabilityInfo","isViewOnly","onClose","onSave","_ref$maxOffsetSize","maxOffsetSize","offsetSize","DEFAULT_BIC_OFFSET_SIZE","_ref$localMaxOffsetSi","localMaxOffsetSize","DEFAULT_LOCAL_OFFSET_SIZE","syncAutoEnabled","_ref$isManualWellsEna","isManualWellsEnabled","_ref$isGlobalMode","isGlobalMode","useState","_useState2","_slicedToArray","_useState","activeWellId","setActiveWellId","Math","min","MAX_OFFSET_SIZE","maxOffsetWellNumber","max","subjectWellId","asset_id","useGlobalOffsetWellsSync","filterExpanded","_useState4","_useState3","isFilterExpanded","setIsFilterExpanded","mapHidden","_useState6","_useState5","isMapHidden","setIsMapHidden","assetCompanyId","companyId","company_id","hasValidAssetId","_useState7","filters","_useState8","setFilters","_useCompanies","useCompanies","canViewCompanies","companies","_useState10","_useState9","selectedWells","setSelectedWells","_useState12","_useState11","preselectedCompanyIds","setPreselectedCompanyIds","useEffect","selectedIds","selectedWellIds","length","_asyncToGenerator","_regeneratorRuntime","mark","_callee","ids","wrap","_context","prev","next","fetchCompanyIdsByWellIds","sent","stop","companyIdsToFetch","useMemo","selectedWellCompanyIds","map","well","filter","id","bootstrapCompanyIds","_toConsumableArray","Set","baseIds","companyFilter","FilterType","company","undefined","Array","isArray","allIds","includes","push","forEach","_useState13","wellSection","ALL_SECTION_KEY","_useState14","selectedWellSection","setSelectedWellSection","initLoading","useRef","_useState16","_useState15","subjectWell","setSubjectWell","_useState18","_useState17","isTableLoading","setIsTableLoading","hasBootstrappedSelectedWells","current","_callee2","missingIds","fetched","_context2","some","w","abrupt","fetchWellsByIds","withSubject","find","concat","uniqBy","_useState20","_useState19","isWellNameExpand","setIsWellNameExpand","_useState22","_useState21","isAdvancedSearchHidden","setIsAdvancedSearchHidden","contentRef","offsetWellsContainerRef","_useState23","ViewType","none","_useState24","viewType","setViewType","prevViewType","_useState26","_useState25","isTopGradientShow","setIsTopGradientShow","isLimitedOffsetWells","topGradientTop","TOP_GRADIENT_MAP","prevSelectedWellIds","_useState28","_useState27","appLoading","setAppLoading","_offsetSettings$selec","_prevSelectedWellIds$","_offsetSettings$selec2","showInfoNotification","every","_prevSelectedWellIds$2","handleResize","window","innerWidth","SMALL_SCREEN_WIDTH","isMobileDetected","isNativeDetected","mobile","innerHeight","SMALL_SCREEN_HEIGHT","small","normal","addEventListener","removeEventListener","_useFetchWells","useFetchWells","_useFetchWells2","rawWells","areWellsLoading","useCompanyProvider","companyProvider","_useCompanyProvider","useBicWells","_useBicWells2","_useBicWells","wellSections","setWellSections","bicWells","setBicWells","resyncStatus","setResyncStatus","taScores","useCompanyMetricKey","metricsKeys","_useCompanyMetricKey2","_useCompanyMetricKey","setMetricsKeys","wellsWithoutCompanyName","useAdvancedWells","wells","companyMap","name","_objectSpread","companyName","isAllWellsLoaded","_ref4","syncOffsetWells","_callee3","isSynced","offsetWellsChanged","_offsetSettings$selec3","bicWellIds","isMatched","wellsByDistance","newOffsetSetting","offsetWells","_offsetWells","_context3","wellId","getCoordinatedWells","slice","offsetWellsLimited","apply","this","arguments","filterOptions","useFilterOptions","allSectionNames","item","value","_ref5","label","subjectWellWithSection","_defineProperty","ColumnType","columnsWithDict","useTableColumns","filteredWells","useFilteredWells","wellsToDisplay","data","useSortedWells","_useSortedWells2","_useSortedWells","sortBy","setSortBy","sortDirection","setSortDirection","sortedWells","handleAddRemoveAssets","useCallback","isAdding","newAssets","assetType","addingWellIds","SEARCH_CATEGORIES","reduce","acc","assetId","_wells$find","rigName","rigWellIds","addingWells","_ref7","uniq","_ref8","handleHideAdvancedSearch","handleChangeMetricsKeys","newMetricsKeys","handleChangeOffsetWell","checked","prevWells","handleChangeAllOffsetWells","sortedData","sortArray","updateSelectedWellsBySection","section","sectionWells","_bicWells$section","limitedWells","handleChangeWellSection","selectedWellsCount","_ref9","owsWellIds","isXtoProvider","COMPANY_PROVIDERS_FOR_IDAS","offsetLabel","handleCancel","isTableFullLoading","isResetVisible","isEmpty","sideTracks","handleReset","isLoading","_useState30","_useState29","isHScrollMoved","setIsHScrollMoved","ROWS_PER_PAGE","_useState32","_useState31","tableRowsCount","setTableRowsCount","_useState34","_useState33","tableWells","setTableWells","RESYNC_STATUS","SUCCEEDED","_jsxs","Modal","title","_jsx","AppHeader","totalCount","selectedCount","isMobile","contentContainerClassName","classNames","styles","offsetWellDialog","contentClassName","contentContainer","smallContainer","contentContainerMobile","actionsClassName","modalActions","actions","className","actionsWrapper","children","Tooltip","placement","Button","onClick","color","startIcon","ReplayIcon","classes","root","resetButtonMobile","infoIconContainer","_Fragment","typography","regular12","colors","t6","medium12","t1","enterTouchDelay","leaveTouchDelay","LEAVE_TOUCH_DELAY","InfoOutlined","infoIcon","buttonGap","variant","_ref10","NotificationsContainer","LoadingIndicator","fullscreen","contentWrapper","contentBlocked","ref","countContainer","countContainerMobile","Regular14","totalLabel","countValue","selectedLabel","Regular12","Toolbar","topGradient","style","top","content","contentMobile","contentiOSMobile","getMobileOperatingSystem","IOS_DEVICE","onScroll","e","target","scrollLeft","scrollTop","scrollHeight","offsetHeight","round","count","handleScroll","WellsMap","offsetWellIds","_ref11","radius","Filter","isHidden","onChangeFilters","setTimeout","onChangeBicWells","OffsetWellsTable","onHideAdvancedSearch","isLastWell","viewOnlyInfoContainer"],"mappings":"6hwBAqDA,IAAMA,GAAY,qBAMZC,GAAqB,SAerBC,IAAA,IAAAC,GAAAC,GAAAC,GAdJC,MAAAA,KACAC,MAAAA,SACAC,MAAAA,mBACAC,MAAAA,YACAC,MAAAA,eACAC,MAAAA,sBACAC,MAAAA,WACAC,MAAAA,QACAC,MAAAA,OAAMC,GAAAb,GACNc,cAAeC,eAAaC,EAAuBH,GAAAI,GAAAjB,GACnDkB,mBAAAA,eAAqBC,EAAyBF,GAC9CG,MAAAA,gBAAeC,GAAArB,GACfsB,qBAAAA,gBAA4BD,GAAAE,GAAAvB,GAC5BwB,aAAAA,gBAAoBD,GAEoBE,GAAAA,EAAS,MAAKC,GAAAC,EAAAC,GAAA,GAA/CC,GAAYH,GAAA,GAAEI,GAAeJ,GAAA,GAC9BZ,GAAgBiB,KAAKC,IAAIjB,GAAa,EAAGG,GAAqB,EAAGe,EAAkB,GACnFC,GAAsBH,KAAKC,IAC/BD,KAAKI,IAAIrB,GAAeI,GAAqB,GAC7Ce,EAAkB,GAGdG,GAAgB9B,cAAAA,EAAAA,GAAoB+B,SAC1CC,GAAyB9B,GAAgBI,GAAQsB,IAEjD,IAAgDT,GAAAA,EAASjB,cAAAA,EAAAA,GAAgB+B,gBAAeC,GAAAb,EAAAc,GAAA,GAAjFC,GAAgBF,GAAA,GAAEG,GAAmBH,GAAA,GACNf,GAAAA,EAASjB,cAAAA,EAAAA,GAAgBoC,WAAUC,GAAAlB,EAAAmB,GAAA,GAAlEC,GAAWF,GAAA,GAAEG,G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AAAlB,GAAA,OAAA,CAAMgB,UAAWV,EAAWyB,GAAWC,UAAWD,GAAWE,OAAOC,IAAIhB,SAAA,yDAGxElB,GAAA,OAAA,CAAMgB,UAAWV,EAAWyB,GAAWI,SAAUJ,GAAWE,OAAOC,IAAIhB,SACpE5C,aAUjB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as o}from"react";import s from"prop-types";import{startCase as n,isEmpty as i,omit as r}from"lodash";import p from"moment";import m from"classnames";import{Divider as c,ListItemText as a}from"@material-ui/core";import{StatusOptions as l,FilterType as d,OBJECTIVE_PERIOD_LIST as j}from"../../constants.js";import{RadiusInput as u}from"./RadiusInput.js";import{MultiSelect as A}from"./MultiSelect.js";import{WellSection as C}from"./WellSection.js";import{PeriodSelect as V}from"./PeriodSelect.js";import v from"./Filter.module.css.js";import{jsxs as S,jsx as g,Fragment as I}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/Global.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"../../../../icons/customIcons/icons/InterventionUnit.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/Cell.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/Popover/Popover.js";import"../../../../componentsV2/Radio/Radio.js";import"../../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../../componentsV2/Checkbox/Checkbox.js";import"../../../../componentsV2/TextInput/TextInput.js";import"../../../../componentsV2/Label/Label.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/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../../componentsV2/Paper/Paper.js";import"../../../../componentsV2/ModalWindow/ModalWindow.scss.js";import"../../../../componentsV2/Modal/Modal.scss.js";import"../../../../componentsV2/Menu/Menu.js";import"../../../../componentsV2/utils.js";import"../../../../componentsV2/Hint/Hint.scss.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{Switch as b}from"../../../../componentsV2/Switch/Switch.js";import"../../../../componentsV2/Tabs/Tabs.js";import"../../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../../componentsV2/FileIcon/FileIcon.js";import"../../../../componentsV2/Tag/Tag.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/IndicatorLive/IndicatorLive.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"../../../../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"../../../../utils/getSingleAsset.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.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.js";import"../../../../componentsV2/Autocomplete/Autocomplete.scss.js";import"../../../../componentsV2/Menu/MenuItem/MenuItem.js";import"../../../../componentsV2/Autocomplete/AutocompleteListBox.js";import"../../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../../../componentsV2/DatePicker/DatePicker.js";import"../../../../componentsV2/DragHandle/DragHandle.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"../../../LoadingIndicator/LoadingIndicator.js";import"../../../Typography.js";import"../../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../../CollapsableSidebar.js";import f from"../../../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"../../../../permissions/PermissionsContext.js";import"../../../../permissions/constants/index.js";import"../../../../permissions/withPermissionsHOC.js";import"../../../../permissions/ProvidePermissions.js";import"../AppHeader/AppHeader.js";import"../Toolbar/Toolbar.js";import"../Map/WellsMap.js";import"../OffsetWellsTable/OffsetWellsTable.js";import"../OffsetWellsTable/AdvancedSearch/constants.js";import"../../utils/index.js";import"../../OffsetWellPickerV4.module.css.js";import"@material-ui/core/Snackbar";import"../../../Notifications/Toast.js";import"../../../Notifications/Notifications.scss.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"../../../../componentsV2/FileIcon/icons/ArchiveFileIcon.js";import"../../../../componentsV2/FileIcon/icons/CSVFileIcon.js";import"../../../../componentsV2/FileIcon/icons/DocFileIcon.js";import"../../../../componentsV2/FileIcon/icons/EDMFileIcon.js";import"../../../../componentsV2/FileIcon/icons/ExcelFileIcon.js";import"../../../../componentsV2/FileIcon/icons/ImageFileIcon.js";import"../../../../componentsV2/FileIcon/icons/JsonFileIcon.js";import"../../../../componentsV2/FileIcon/icons/LasFileIcon.js";import"../../../../componentsV2/FileIcon/icons/OtherFileIcon.js";import"../../../../componentsV2/FileIcon/icons/PdfFileIcon.js";import"../../../../componentsV2/FileIcon/icons/PowerPointFileIcon.js";import"../../../../componentsV2/FileIcon/icons/TxtFileIcon.js";import"../../../../componentsV2/FileIcon/icons/UnknownFileIcon.js";import"../../../../componentsV2/FileIcon/icons/VideoFileIcon.js";import"../../../../componentsV2/FileIcon/icons/XmlFileIcon.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 h(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 D(t){for(var o=1;o<arguments.length;o++){var s=null!=arguments[o]?arguments[o]:{};o%2?h(Object(s),!0).forEach((function(o){e(t,o,s[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):h(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}var P=function(s){var h=s.isHidden,P=s.isWDUser,T=s.filterOptions,x=s.wellSections,F=s.filters,y=s.selectedWellSection,B=s.subjectWell,M=s.assetCompanyId,L=s.onChangeFilters,E=s.onChangeBicWells,k=o({}),H=t(k,2),O=H[0],W=H[1],R=function(t,o){t===d.sideTracks?L(D(D({},F),{},e({},d.sideTracks,o))):L(o?D(D({},F),{},e({},t,o)):r(D({},F),[t]))},w=function(t){return function(o){var s=p(o);if(s.isValid()){var n=s.unix(),i=!1;"timeRangeFrom"===t?i=n>=F[d.timeRangeTo]:"timeRangeTo"===t&&(i=n<=F[d.timeRangeFrom]),W(i?e({},t,!0):{}),L(D(D({},F),{},e({},t,n)))}}};return S("div",{className:m(v.filterContainer,e({},v.hidden,h)),children:[g(c,{className:v.divideLine}),S("div",{className:v.filterGroup,children:[T.map((function(e,t){var o=e.value,s=e.label,n=e.options;if(o===d.company){var i,r={};n.forEach((function(e){r[e.id]=e.name}));var p=B?"Subject Well Company":"All",m=M?null===(i=n.find((function(e){return e.id===M})))||void 0===i?void 0:i.name:null;return g(A,{label:s,options:n.map((function(e){return e.name})),currentValues:(F[o]||[]).map((function(e){return r[e]})).filter(Boolean),showAllOption:!0,allText:p,linkedDefaultValue:m,ListMenuItem:function(e){var t=e.value;return g(a,{primary:t})},onChange:function(e){if(null===e||Array.isArray(e)&&0===e.length){R(o,B&&M?void 0:[])}else{var t=e.map((function(e){var t;return null===(t=n.find((function(t){return t.name===e})))||void 0===t?void 0:t.id})).filter(Boolean);R(o,t)}}},t)}return g(A,{label:s,options:n,currentValues:F[o],ListMenuItem:function(e){var t=e.value;return g(a,{primary:t})},onChange:function(e){return R(o,e)}},t)})),g(A,{label:"Status",options:l.map((function(e){return e.value})),currentValues:F[d.status],ValueComponent:function(e){var t,o=e.value;return S("div",{className:v.statusItem,children:[g("div",{className:v.statusIcon,style:{background:null===(t=l.find((function(e){return e.value===o})))||void 0===t?void 0:t.color}}),n(o)]})},ListMenuItem:function(e){var t,o=e.value;return S("div",{className:v.statusItem,children:[g("div",{className:v.statusIcon,style:{background:null===(t=l.find((function(e){return e.value===o})))||void 0===t?void 0:t.color}}),g(a,{primary:n(o)})]})},onChange:function(e){return R(d.status,e)}}),g(u,{"data-testid":"".concat("Filter","_radiusInput"),radius:F[d.radius],editable:!!B,onChange:function(e){return R(d.radius,e)}}),g(V,{label:"Last Active",currentValue:F[d.period]||"all",options:j,className:v.companySelect,onChange:function(e){return R(d.period,e)}}),"custom"===F[d.period]&&S(I,{children:[g("div",{className:v.filterItem,children:g(f,{variant:"inline",label:"Date From",format:"MM/DD/YY HH:mm",value:1e3*F[d.timeRangeFrom]||null,onChange:w("timeRangeFrom"),error:O.timeRangeFrom})}),g("div",{className:v.filterItem,children:g(f,{variant:"inline",label:"Date To",format:"MM/DD/YY HH:mm",value:1e3*F[d.timeRangeTo]||null,onChange:w("timeRangeTo"),error:O.timeRangeTo})})]}),g(b,{testId:"".concat("Filter","_ExcludeSidetracks"),size:"small",checked:F[d.sideTracks]||!1,onChange:function(e){return R(d.sideTracks,e)},onLabel:"Exclude Sidetracks"}),P&&!i(x)&&g(C,{selectedValue:y,wellSections:x,onChange:E})]})]})};P.propTypes={isHidden:s.bool.isRequired,isWDUser:s.bool.isRequired,filterOptions:s.arrayOf(s.shape({})).isRequired,wellSections:s.arrayOf(s.shape({})).isRequired,filters:s.shape({}).isRequired,selectedWellSection:s.string.isRequired,subjectWell:s.shape({}).isRequired,assetCompanyId:s.number.isRequired,onChangeFilters:s.func.isRequired,onChangeBicWells:s.func.isRequired};export{P as Filter};
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as o}from"react";import s from"prop-types";import{startCase as n,isEmpty as i,omit as r}from"lodash";import p from"moment";import m from"classnames";import{Divider as c,ListItemText as a}from"@material-ui/core";import{StatusOptions as l,FilterType as d,OBJECTIVE_PERIOD_LIST as j}from"../../constants.js";import{RadiusInput as u}from"./RadiusInput.js";import{MultiSelect as A}from"./MultiSelect.js";import{WellSection as C}from"./WellSection.js";import{PeriodSelect as V}from"./PeriodSelect.js";import S from"./Filter.module.css.js";import{jsxs as v,jsx as g,Fragment as I}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/Global.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"../../../../icons/customIcons/icons/InterventionUnit.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/Cell.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/Popover/Popover.js";import"../../../../componentsV2/Radio/Radio.js";import"../../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../../componentsV2/Checkbox/Checkbox.js";import"../../../../componentsV2/TextInput/TextInput.js";import"../../../../componentsV2/Label/Label.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/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../../componentsV2/Paper/Paper.js";import"../../../../componentsV2/ModalWindow/ModalWindow.scss.js";import"../../../../componentsV2/Modal/Modal.scss.js";import"../../../../componentsV2/Menu/Menu.js";import"../../../../componentsV2/utils.js";import"../../../../componentsV2/Hint/Hint.scss.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{Switch as b}from"../../../../componentsV2/Switch/Switch.js";import"../../../../componentsV2/Tabs/Tabs.js";import"../../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../../componentsV2/FileIcon/FileIcon.js";import"../../../../componentsV2/Tag/Tag.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/IndicatorLive/IndicatorLive.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"../../../../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"../../../../utils/getSingleAsset.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.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/AppHeader/V3/SettingsButton/SettingsButton.js";import"../../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js";import"../../../../componentsV2/AppSettings/AppSettings.js";import"../../../../componentsV2/AppSettings/AppSettings.constants.js";import"../../../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../../../componentsV2/AppSizeProvider/AppSizeProvider.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.js";import"../../../../componentsV2/Autocomplete/Autocomplete.scss.js";import"../../../../componentsV2/Menu/MenuItem/MenuItem.js";import"../../../../componentsV2/Autocomplete/AutocompleteListBox.js";import"../../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../../../componentsV2/DatePicker/DatePicker.js";import"../../../../componentsV2/DragHandle/DragHandle.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"../../../LoadingIndicator/LoadingIndicator.js";import"../../../Typography.js";import"../../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../../CollapsableSidebar.js";import f from"../../../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"../../../../permissions/PermissionsContext.js";import"../../../../permissions/constants/index.js";import"../../../../permissions/withPermissionsHOC.js";import"../../../../permissions/ProvidePermissions.js";import"../AppHeader/AppHeader.js";import"../Toolbar/Toolbar.js";import"../Map/WellsMap.js";import"../OffsetWellsTable/OffsetWellsTable.js";import"../OffsetWellsTable/AdvancedSearch/constants.js";import"../../utils/index.js";import"../../OffsetWellPickerV4.module.css.js";import"@material-ui/core/Snackbar";import"../../../Notifications/Toast.js";import"../../../Notifications/Notifications.scss.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"../../../../componentsV2/FileIcon/icons/ArchiveFileIcon.js";import"../../../../componentsV2/FileIcon/icons/CSVFileIcon.js";import"../../../../componentsV2/FileIcon/icons/DocFileIcon.js";import"../../../../componentsV2/FileIcon/icons/EDMFileIcon.js";import"../../../../componentsV2/FileIcon/icons/ExcelFileIcon.js";import"../../../../componentsV2/FileIcon/icons/ImageFileIcon.js";import"../../../../componentsV2/FileIcon/icons/JsonFileIcon.js";import"../../../../componentsV2/FileIcon/icons/LasFileIcon.js";import"../../../../componentsV2/FileIcon/icons/OtherFileIcon.js";import"../../../../componentsV2/FileIcon/icons/PdfFileIcon.js";import"../../../../componentsV2/FileIcon/icons/PowerPointFileIcon.js";import"../../../../componentsV2/FileIcon/icons/TxtFileIcon.js";import"../../../../componentsV2/FileIcon/icons/UnknownFileIcon.js";import"../../../../componentsV2/FileIcon/icons/VideoFileIcon.js";import"../../../../componentsV2/FileIcon/icons/XmlFileIcon.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 h(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,s)}return o}function D(e){for(var o=1;o<arguments.length;o++){var s=null!=arguments[o]?arguments[o]:{};o%2?h(Object(s),!0).forEach((function(o){t(e,o,s[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):h(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var T=function(s){var h=s.isHidden,T=s.isWDUser,P=s.filterOptions,x=s.wellSections,F=s.filters,y=s.selectedWellSection,B=s.subjectWell,M=s.assetCompanyId,L=s.onChangeFilters,E=s.onChangeBicWells,k=o({}),H=e(k,2),O=H[0],W=H[1],R=function(e,o){e===d.sideTracks?L(D(D({},F),{},t({},d.sideTracks,o))):L(o?D(D({},F),{},t({},e,o)):r(D({},F),[e]))},w=function(e){return function(o){var s=p(o);if(s.isValid()){var n=s.unix(),i=!1;"timeRangeFrom"===e?i=n>=F[d.timeRangeTo]:"timeRangeTo"===e&&(i=n<=F[d.timeRangeFrom]),W(i?t({},e,!0):{}),L(D(D({},F),{},t({},e,n)))}}};return v("div",{className:m(S.filterContainer,t({},S.hidden,h)),children:[g(c,{className:S.divideLine}),v("div",{className:S.filterGroup,children:[P.map((function(t,e){var o=t.value,s=t.label,n=t.options;if(o===d.company){var i,r={};n.forEach((function(t){r[t.id]=t.name}));var p=B?"Subject Well Company":"All",m=M?null===(i=n.find((function(t){return t.id===M})))||void 0===i?void 0:i.name:null;return g(A,{label:s,options:n.map((function(t){return t.name})),currentValues:(F[o]||[]).map((function(t){return r[t]})).filter(Boolean),showAllOption:!0,allText:p,linkedDefaultValue:m,ListMenuItem:function(t){var e=t.value;return g(a,{primary:e})},onChange:function(t){if(null===t||Array.isArray(t)&&0===t.length){R(o,B&&M?void 0:[])}else{var e=t.map((function(t){var e;return null===(e=n.find((function(e){return e.name===t})))||void 0===e?void 0:e.id})).filter(Boolean);R(o,e)}}},e)}return g(A,{label:s,options:n,currentValues:F[o],ListMenuItem:function(t){var e=t.value;return g(a,{primary:e})},onChange:function(t){return R(o,t)}},e)})),g(A,{label:"Status",options:l.map((function(t){return t.value})),currentValues:F[d.status],ValueComponent:function(t){var e,o=t.value;return v("div",{className:S.statusItem,children:[g("div",{className:S.statusIcon,style:{background:null===(e=l.find((function(t){return t.value===o})))||void 0===e?void 0:e.color}}),n(o)]})},ListMenuItem:function(t){var e,o=t.value;return v("div",{className:S.statusItem,children:[g("div",{className:S.statusIcon,style:{background:null===(e=l.find((function(t){return t.value===o})))||void 0===e?void 0:e.color}}),g(a,{primary:n(o)})]})},onChange:function(t){return R(d.status,t)}}),g(u,{"data-testid":"".concat("Filter","_radiusInput"),radius:F[d.radius],editable:!!B,onChange:function(t){return R(d.radius,t)}}),g(V,{label:"Last Active",currentValue:F[d.period]||"all",options:j,className:S.companySelect,onChange:function(t){return R(d.period,t)}}),"custom"===F[d.period]&&v(I,{children:[g("div",{className:S.filterItem,children:g(f,{variant:"inline",label:"Date From",format:"MM/DD/YY HH:mm",value:1e3*F[d.timeRangeFrom]||null,onChange:w("timeRangeFrom"),error:O.timeRangeFrom})}),g("div",{className:S.filterItem,children:g(f,{variant:"inline",label:"Date To",format:"MM/DD/YY HH:mm",value:1e3*F[d.timeRangeTo]||null,onChange:w("timeRangeTo"),error:O.timeRangeTo})})]}),g(b,{testId:"".concat("Filter","_ExcludeSidetracks"),size:"small",checked:F[d.sideTracks]||!1,onChange:function(t){return R(d.sideTracks,t)},onLabel:"Exclude Sidetracks"}),T&&!i(x)&&g(C,{selectedValue:y,wellSections:x,onChange:E})]})]})};T.propTypes={isHidden:s.bool.isRequired,isWDUser:s.bool.isRequired,filterOptions:s.arrayOf(s.shape({})).isRequired,wellSections:s.arrayOf(s.shape({})).isRequired,filters:s.shape({}).isRequired,selectedWellSection:s.string.isRequired,subjectWell:s.shape({}).isRequired,assetCompanyId:s.number.isRequired,onChangeFilters:s.func.isRequired,onChangeBicWells:s.func.isRequired};export{T as Filter};
|
|
2
2
|
//# sourceMappingURL=Filter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Filter.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/Filter/Filter.js"],"sourcesContent":["import { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { isEmpty, omit, startCase } from 'lodash';\nimport moment from 'moment';\nimport classNames from 'classnames';\nimport { Divider, ListItemText } from '@material-ui/core';\n\nimport { FilterType, OBJECTIVE_PERIOD_LIST, StatusOptions } from '../../constants';\n\nimport { RadiusInput } from './RadiusInput';\nimport { MultiSelect } from './MultiSelect';\nimport { WellSection } from './WellSection';\nimport { PeriodSelect } from './PeriodSelect';\n\nimport styles from './Filter.module.css';\n\nimport { DateTimePicker } from '~/components';\nimport { Switch } from '~/componentsV2/Switch';\n\nconst PAGE_NAME = 'Filter';\n\nexport const Filter = ({\n isHidden,\n isWDUser,\n filterOptions,\n wellSections,\n filters,\n selectedWellSection,\n subjectWell,\n assetCompanyId,\n onChangeFilters,\n onChangeBicWells,\n}) => {\n const [errors, setErrors] = useState({});\n\n const handleChangeFilter = (type, value) => {\n if (type === FilterType.sideTracks) {\n onChangeFilters({ ...filters, [FilterType.sideTracks]: value });\n } else {\n onChangeFilters(value ? { ...filters, [type]: value } : omit({ ...filters }, [type]));\n }\n };\n const handleCustomDateChange = key => dateString => {\n const newDate = moment(dateString);\n if (!newDate.isValid()) {\n return;\n }\n const timestamp = newDate.unix();\n\n let isInvalidDate = false;\n if (key === 'timeRangeFrom') {\n isInvalidDate = timestamp >= filters[FilterType.timeRangeTo];\n } else if (key === 'timeRangeTo') {\n isInvalidDate = timestamp <= filters[FilterType.timeRangeFrom];\n }\n\n if (isInvalidDate) {\n setErrors({\n [key]: true,\n });\n } else {\n setErrors({});\n }\n\n onChangeFilters({ ...filters, [key]: timestamp });\n };\n\n return (\n <div className={classNames(styles.filterContainer, { [styles.hidden]: isHidden })}>\n <Divider className={styles.divideLine} />\n <div className={styles.filterGroup}>\n {filterOptions.map(({ value, label, options }, index) => {\n const isCompanyFilter = value === FilterType.company;\n\n // Company filter: options are company objects {id, name}\n if (isCompanyFilter) {\n const companyMap = {};\n options.forEach(company => {\n companyMap[company.id] = company.name;\n });\n\n // Cosmetic: show \"Subject Well Company\" instead of \"All\" when subject well exists\n const allText = subjectWell ? 'Subject Well Company' : 'All';\n\n // Find subject well's company name to show as linked default\n const subjectCompanyName = assetCompanyId\n ? options.find(c => c.id === assetCompanyId)?.name\n : null;\n\n return (\n <MultiSelect\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n label={label}\n options={options.map(c => c.name)}\n currentValues={(filters[value] || []).map(id => companyMap[id]).filter(Boolean)}\n showAllOption\n allText={allText}\n linkedDefaultValue={subjectCompanyName}\n ListMenuItem={({ value: name }) => <ListItemText primary={name} />}\n onChange={names => {\n // When \"All\" (or \"Subject Well Company\") is selected, MultiSelect sends null\n if (names === null || (Array.isArray(names) && names.length === 0)) {\n // If subject well exists, remove filter (undefined) to restore initial state\n // Otherwise, set empty array to fetch all companies\n const filterValue = subjectWell && assetCompanyId ? undefined : [];\n handleChangeFilter(value, filterValue);\n return;\n }\n const ids = names\n .map(name => options.find(c => c.name === name)?.id)\n .filter(Boolean);\n handleChangeFilter(value, ids);\n }}\n />\n );\n }\n\n // Other filters: options are simple strings\n return (\n <MultiSelect\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n label={label}\n options={options}\n currentValues={filters[value]}\n ListMenuItem={({ value: itemValue }) => <ListItemText primary={itemValue} />}\n onChange={filterValue => handleChangeFilter(value, filterValue)}\n />\n );\n })}\n <MultiSelect\n label=\"Status\"\n options={StatusOptions.map(item => item.value)}\n currentValues={filters[FilterType.status]}\n ValueComponent={({ value }) => (\n <div className={styles.statusItem}>\n <div\n className={styles.statusIcon}\n style={{ background: StatusOptions.find(item => item.value === value)?.color }}\n />\n {startCase(value)}\n </div>\n )}\n ListMenuItem={({ value }) => (\n <div className={styles.statusItem}>\n <div\n className={styles.statusIcon}\n style={{ background: StatusOptions.find(item => item.value === value)?.color }}\n />\n <ListItemText primary={startCase(value)} />\n </div>\n )}\n onChange={value => handleChangeFilter(FilterType.status, value)}\n />\n <RadiusInput\n data-testid={`${PAGE_NAME}_radiusInput`}\n radius={filters[FilterType.radius]}\n editable={!!subjectWell}\n onChange={value => handleChangeFilter(FilterType.radius, value)}\n />\n <PeriodSelect\n label=\"Last Active\"\n currentValue={filters[FilterType.period] || 'all'}\n options={OBJECTIVE_PERIOD_LIST}\n className={styles.companySelect}\n onChange={value => handleChangeFilter(FilterType.period, value)}\n />\n {filters[FilterType.period] === 'custom' && (\n <>\n <div className={styles.filterItem}>\n <DateTimePicker\n variant=\"inline\"\n label=\"Date From\"\n format=\"MM/DD/YY HH:mm\"\n value={filters[FilterType.timeRangeFrom] * 1000 || null}\n onChange={handleCustomDateChange('timeRangeFrom')}\n error={errors.timeRangeFrom}\n />\n </div>\n <div className={styles.filterItem}>\n <DateTimePicker\n variant=\"inline\"\n label=\"Date To\"\n format=\"MM/DD/YY HH:mm\"\n value={filters[FilterType.timeRangeTo] * 1000 || null}\n onChange={handleCustomDateChange('timeRangeTo')}\n error={errors.timeRangeTo}\n />\n </div>\n </>\n )}\n <Switch\n testId={`${PAGE_NAME}_ExcludeSidetracks`}\n size=\"small\"\n checked={filters[FilterType.sideTracks] || false}\n onChange={checked => handleChangeFilter(FilterType.sideTracks, checked)}\n onLabel=\"Exclude Sidetracks\"\n />\n {isWDUser && !isEmpty(wellSections) && (\n <WellSection\n selectedValue={selectedWellSection}\n wellSections={wellSections}\n onChange={onChangeBicWells}\n />\n )}\n </div>\n </div>\n );\n};\n\nFilter.propTypes = {\n isHidden: PropTypes.bool.isRequired,\n isWDUser: PropTypes.bool.isRequired,\n filterOptions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n filters: PropTypes.shape({}).isRequired,\n selectedWellSection: PropTypes.string.isRequired,\n subjectWell: PropTypes.shape({}).isRequired,\n assetCompanyId: PropTypes.number.isRequired,\n onChangeFilters: PropTypes.func.isRequired,\n onChangeBicWells: PropTypes.func.isRequired,\n};\n"],"names":["Filter","_ref","isHidden","isWDUser","filterOptions","wellSections","filters","selectedWellSection","subjectWell","assetCompanyId","onChangeFilters","onChangeBicWells","_useState","useState","_useState2","_slicedToArray","errors","setErrors","handleChangeFilter","type","value","FilterType","sideTracks","_objectSpread","_defineProperty","omit","handleCustomDateChange","key","dateString","newDate","moment","isValid","timestamp","unix","isInvalidDate","timeRangeTo","timeRangeFrom","_jsxs","className","classNames","styles","filterContainer","hidden","children","_jsx","Divider","divideLine","filterGroup","map","_ref2","index","label","options","company","_options$find","companyMap","forEach","id","name","allText","subjectCompanyName","find","c","MultiSelect","currentValues","filter","Boolean","showAllOption","linkedDefaultValue","ListMenuItem","_ref3","ListItemText","primary","onChange","names","Array","isArray","length","undefined","ids","_options$find2","_ref4","itemValue","filterValue","StatusOptions","item","status","ValueComponent","_ref5","_StatusOptions$find","statusItem","statusIcon","style","background","color","startCase","_ref6","_StatusOptions$find2","RadiusInput","concat","radius","editable","PeriodSelect","currentValue","period","OBJECTIVE_PERIOD_LIST","companySelect","_Fragment","filterItem","DateTimePicker","variant","format","error","Switch","testId","size","checked","onLabel","isEmpty","WellSection","selectedValue","propTypes","PropTypes","bool","isRequired","arrayOf","shape","string","number","func"],"mappings":"+0yBAmBA,IAEaA,EAAS,SAWhBC,GAAA,IAVJC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,cACAC,IAAAA,aACAC,IAAAA,QACAC,IAAAA,oBACAC,IAAAA,YACAC,IAAAA,eACAC,IAAAA,gBACAC,IAAAA,iBAEAC,EAA4BC,EAAS,IAAGC,EAAAC,EAAAH,EAAA,GAAjCI,EAAMF,EAAA,GAAEG,EAASH,EAAA,GAElBI,EAAqB,SAACC,EAAMC,GAC5BD,IAASE,EAAWC,WACtBZ,EAAea,EAAAA,EAAA,CAAA,EAAMjB,GAAUe,CAAAA,EAAAA,EAAAA,CAAAA,EAAAA,EAAWC,WAAaF,KAEvDV,EAAgBU,EAAKG,EAAAA,EAAA,CAAA,EAAQjB,GAAO,GAAAkB,EAAA,CAAA,EAAGL,EAAOC,IAAUK,OAAUnB,GAAW,CAACa,MAG5EO,EAAyB,SAAAC,GAAG,OAAI,SAAAC,GACpC,IAAMC,EAAUC,EAAOF,GACvB,GAAKC,EAAQE,UAAb,CAGA,IAAMC,EAAYH,EAA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AejH,EACfF,aAAcA,EACdoE,SAAU9D,SAMtB,EAEAX,EAAOyH,UAAY,CACjBvH,SAAUwH,EAAUC,KAAKC,WACzBzH,SAAUuH,EAAUC,KAAKC,WACzBxH,cAAesH,EAAUG,QAAQH,EAAUI,MAAM,CAAA,IAAKF,WACtDvH,aAAcqH,EAAUG,QAAQH,EAAUI,MAAM,CAAA,IAAKF,WACrDtH,QAASoH,EAAUI,MAAM,CAAA,GAAIF,WAC7BrH,oBAAqBmH,EAAUK,OAAOH,WACtCpH,YAAakH,EAAUI,MAAM,CAAA,GAAIF,WACjCnH,eAAgBiH,EAAUM,OAAOJ,WACjClH,gBAAiBgH,EAAUO,KAAKL,WAChCjH,iBAAkB+G,EAAUO,KAAKL"}
|
|
1
|
+
{"version":3,"file":"Filter.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/Filter/Filter.js"],"sourcesContent":["import { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { isEmpty, omit, startCase } from 'lodash';\nimport moment from 'moment';\nimport classNames from 'classnames';\nimport { Divider, ListItemText } from '@material-ui/core';\n\nimport { FilterType, OBJECTIVE_PERIOD_LIST, StatusOptions } from '../../constants';\n\nimport { RadiusInput } from './RadiusInput';\nimport { MultiSelect } from './MultiSelect';\nimport { WellSection } from './WellSection';\nimport { PeriodSelect } from './PeriodSelect';\n\nimport styles from './Filter.module.css';\n\nimport { DateTimePicker } from '~/components';\nimport { Switch } from '~/componentsV2/Switch';\n\nconst PAGE_NAME = 'Filter';\n\nexport const Filter = ({\n isHidden,\n isWDUser,\n filterOptions,\n wellSections,\n filters,\n selectedWellSection,\n subjectWell,\n assetCompanyId,\n onChangeFilters,\n onChangeBicWells,\n}) => {\n const [errors, setErrors] = useState({});\n\n const handleChangeFilter = (type, value) => {\n if (type === FilterType.sideTracks) {\n onChangeFilters({ ...filters, [FilterType.sideTracks]: value });\n } else {\n onChangeFilters(value ? { ...filters, [type]: value } : omit({ ...filters }, [type]));\n }\n };\n const handleCustomDateChange = key => dateString => {\n const newDate = moment(dateString);\n if (!newDate.isValid()) {\n return;\n }\n const timestamp = newDate.unix();\n\n let isInvalidDate = false;\n if (key === 'timeRangeFrom') {\n isInvalidDate = timestamp >= filters[FilterType.timeRangeTo];\n } else if (key === 'timeRangeTo') {\n isInvalidDate = timestamp <= filters[FilterType.timeRangeFrom];\n }\n\n if (isInvalidDate) {\n setErrors({\n [key]: true,\n });\n } else {\n setErrors({});\n }\n\n onChangeFilters({ ...filters, [key]: timestamp });\n };\n\n return (\n <div className={classNames(styles.filterContainer, { [styles.hidden]: isHidden })}>\n <Divider className={styles.divideLine} />\n <div className={styles.filterGroup}>\n {filterOptions.map(({ value, label, options }, index) => {\n const isCompanyFilter = value === FilterType.company;\n\n // Company filter: options are company objects {id, name}\n if (isCompanyFilter) {\n const companyMap = {};\n options.forEach(company => {\n companyMap[company.id] = company.name;\n });\n\n // Cosmetic: show \"Subject Well Company\" instead of \"All\" when subject well exists\n const allText = subjectWell ? 'Subject Well Company' : 'All';\n\n // Find subject well's company name to show as linked default\n const subjectCompanyName = assetCompanyId\n ? options.find(c => c.id === assetCompanyId)?.name\n : null;\n\n return (\n <MultiSelect\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n label={label}\n options={options.map(c => c.name)}\n currentValues={(filters[value] || []).map(id => companyMap[id]).filter(Boolean)}\n showAllOption\n allText={allText}\n linkedDefaultValue={subjectCompanyName}\n ListMenuItem={({ value: name }) => <ListItemText primary={name} />}\n onChange={names => {\n // When \"All\" (or \"Subject Well Company\") is selected, MultiSelect sends null\n if (names === null || (Array.isArray(names) && names.length === 0)) {\n // If subject well exists, remove filter (undefined) to restore initial state\n // Otherwise, set empty array to fetch all companies\n const filterValue = subjectWell && assetCompanyId ? undefined : [];\n handleChangeFilter(value, filterValue);\n return;\n }\n const ids = names\n .map(name => options.find(c => c.name === name)?.id)\n .filter(Boolean);\n handleChangeFilter(value, ids);\n }}\n />\n );\n }\n\n // Other filters: options are simple strings\n return (\n <MultiSelect\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n label={label}\n options={options}\n currentValues={filters[value]}\n ListMenuItem={({ value: itemValue }) => <ListItemText primary={itemValue} />}\n onChange={filterValue => handleChangeFilter(value, filterValue)}\n />\n );\n })}\n <MultiSelect\n label=\"Status\"\n options={StatusOptions.map(item => item.value)}\n currentValues={filters[FilterType.status]}\n ValueComponent={({ value }) => (\n <div className={styles.statusItem}>\n <div\n className={styles.statusIcon}\n style={{ background: StatusOptions.find(item => item.value === value)?.color }}\n />\n {startCase(value)}\n </div>\n )}\n ListMenuItem={({ value }) => (\n <div className={styles.statusItem}>\n <div\n className={styles.statusIcon}\n style={{ background: StatusOptions.find(item => item.value === value)?.color }}\n />\n <ListItemText primary={startCase(value)} />\n </div>\n )}\n onChange={value => handleChangeFilter(FilterType.status, value)}\n />\n <RadiusInput\n data-testid={`${PAGE_NAME}_radiusInput`}\n radius={filters[FilterType.radius]}\n editable={!!subjectWell}\n onChange={value => handleChangeFilter(FilterType.radius, value)}\n />\n <PeriodSelect\n label=\"Last Active\"\n currentValue={filters[FilterType.period] || 'all'}\n options={OBJECTIVE_PERIOD_LIST}\n className={styles.companySelect}\n onChange={value => handleChangeFilter(FilterType.period, value)}\n />\n {filters[FilterType.period] === 'custom' && (\n <>\n <div className={styles.filterItem}>\n <DateTimePicker\n variant=\"inline\"\n label=\"Date From\"\n format=\"MM/DD/YY HH:mm\"\n value={filters[FilterType.timeRangeFrom] * 1000 || null}\n onChange={handleCustomDateChange('timeRangeFrom')}\n error={errors.timeRangeFrom}\n />\n </div>\n <div className={styles.filterItem}>\n <DateTimePicker\n variant=\"inline\"\n label=\"Date To\"\n format=\"MM/DD/YY HH:mm\"\n value={filters[FilterType.timeRangeTo] * 1000 || null}\n onChange={handleCustomDateChange('timeRangeTo')}\n error={errors.timeRangeTo}\n />\n </div>\n </>\n )}\n <Switch\n testId={`${PAGE_NAME}_ExcludeSidetracks`}\n size=\"small\"\n checked={filters[FilterType.sideTracks] || false}\n onChange={checked => handleChangeFilter(FilterType.sideTracks, checked)}\n onLabel=\"Exclude Sidetracks\"\n />\n {isWDUser && !isEmpty(wellSections) && (\n <WellSection\n selectedValue={selectedWellSection}\n wellSections={wellSections}\n onChange={onChangeBicWells}\n />\n )}\n </div>\n </div>\n );\n};\n\nFilter.propTypes = {\n isHidden: PropTypes.bool.isRequired,\n isWDUser: PropTypes.bool.isRequired,\n filterOptions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n filters: PropTypes.shape({}).isRequired,\n selectedWellSection: PropTypes.string.isRequired,\n subjectWell: PropTypes.shape({}).isRequired,\n assetCompanyId: PropTypes.number.isRequired,\n onChangeFilters: PropTypes.func.isRequired,\n onChangeBicWells: PropTypes.func.isRequired,\n};\n"],"names":["Filter","_ref","isHidden","isWDUser","filterOptions","wellSections","filters","selectedWellSection","subjectWell","assetCompanyId","onChangeFilters","onChangeBicWells","_useState","useState","_useState2","_slicedToArray","errors","setErrors","handleChangeFilter","type","value","FilterType","sideTracks","_objectSpread","_defineProperty","omit","handleCustomDateChange","key","dateString","newDate","moment","isValid","timestamp","unix","isInvalidDate","timeRangeTo","timeRangeFrom","_jsxs","className","classNames","styles","filterContainer","hidden","children","_jsx","Divider","divideLine","filterGroup","map","_ref2","index","label","options","company","_options$find","companyMap","forEach","id","name","allText","subjectCompanyName","find","c","MultiSelect","currentValues","filter","Boolean","showAllOption","linkedDefaultValue","ListMenuItem","_ref3","ListItemText","primary","onChange","names","Array","isArray","length","undefined","ids","_options$find2","_ref4","itemValue","filterValue","StatusOptions","item","status","ValueComponent","_ref5","_StatusOptions$find","statusItem","statusIcon","style","background","color","startCase","_ref6","_StatusOptions$find2","RadiusInput","concat","radius","editable","PeriodSelect","currentValue","period","OBJECTIVE_PERIOD_LIST","companySelect","_Fragment","filterItem","DateTimePicker","variant","format","error","Switch","testId","size","checked","onLabel","isEmpty","WellSection","selectedValue","propTypes","PropTypes","bool","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