@corva/ui 3.35.0-7 → 3.35.0-8
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/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/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/Filter/MultiSelect.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/MultiSelect.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.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/OffsetWellsTable/OffsetWellsTable.module.css.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.module.css.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.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/OffsetWellPickerV4/constants.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/constants.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useCompanies.js +2 -0
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useCompanies.js.map +1 -0
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useFetchWells.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useFilterOptions.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useFilterOptions.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useTableColumns.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useTableColumns.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/utils/apiCalls.js +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/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/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/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.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.js.map +1 -1
- package/components/OffsetWellPickerV4/components/Filter/Filter.d.ts +3 -1
- package/components/OffsetWellPickerV4/components/Filter/Filter.d.ts.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/Filter/MultiSelect.d.ts +5 -1
- package/components/OffsetWellPickerV4/components/Filter/MultiSelect.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/components/Filter/MultiSelect.js +1 -1
- package/components/OffsetWellPickerV4/components/Filter/MultiSelect.js.map +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.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/OffsetWellsTable/OffsetWellsTable.module.css.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js.map +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.module.css.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.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/OffsetWellPickerV4/constants.d.ts +3 -0
- package/components/OffsetWellPickerV4/constants.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/constants.js +1 -1
- package/components/OffsetWellPickerV4/constants.js.map +1 -1
- package/components/OffsetWellPickerV4/effects/index.d.ts +1 -0
- package/components/OffsetWellPickerV4/effects/useCompanies.d.ts +7 -0
- package/components/OffsetWellPickerV4/effects/useCompanies.d.ts.map +1 -0
- package/components/OffsetWellPickerV4/effects/useCompanies.js +2 -0
- package/components/OffsetWellPickerV4/effects/useCompanies.js.map +1 -0
- package/components/OffsetWellPickerV4/effects/useFetchWells.d.ts +1 -1
- package/components/OffsetWellPickerV4/effects/useFetchWells.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/effects/useFetchWells.js +1 -1
- package/components/OffsetWellPickerV4/effects/useFilterOptions.d.ts +2 -2
- package/components/OffsetWellPickerV4/effects/useFilterOptions.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/effects/useFilterOptions.js +1 -1
- package/components/OffsetWellPickerV4/effects/useFilterOptions.js.map +1 -1
- package/components/OffsetWellPickerV4/effects/useTableColumns.d.ts +1 -1
- package/components/OffsetWellPickerV4/effects/useTableColumns.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/effects/useTableColumns.js +1 -1
- package/components/OffsetWellPickerV4/effects/useTableColumns.js.map +1 -1
- package/components/OffsetWellPickerV4/utils/apiCalls.d.ts +3 -1
- package/components/OffsetWellPickerV4/utils/apiCalls.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/utils/apiCalls.js +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/package.json +1 -1
package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffsetWellsTableRow.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js"],"sourcesContent":["import { memo, useCallback, useEffect, useState, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { startCase, get } from 'lodash';\nimport classNames from 'classnames';\nimport moment from 'moment';\nimport { Typography, Checkbox, Tooltip, TableCell, TableRow } from '@material-ui/core';\n\nimport {\n ColumnType,\n EXPANDED_WELL_NAME_WIDTH,\n LEAVE_TOUCH_DELAY,\n StatusOptions,\n ViewType,\n} from '../../constants';\n\nimport { SubjectWellMark } from './SubjectWellMark';\nimport ViewWellSectionsName from './ViewWellSectionsName';\n\nimport styles from './OffsetWellsTableRow.module.css';\n\nimport { convertValue } from '~/utils';\n\nconst PAGE_NAME = 'OffsetWellsTableRow';\nconst AVG_CHAR_WIDTH = 8;\n\nfunction formatMetricItem(data, metricsColumns, metricKey) {\n const metric = metricsColumns.find(item => item.key === metricKey);\n const value = get(data, metric.key);\n\n if (value === 'undefined') {\n return 'loading...';\n }\n\n if (Number.isFinite(value) || (value && value !== 'Null')) {\n return metric.unitType ? convertValue(value, metric.unitType, metric.from, metric.to) : value;\n }\n\n return '—';\n}\n\nfunction formatDistance(data, isImperial) {\n const value = get(data, ColumnType.distance);\n if (Number.isFinite(value)) {\n return isImperial ? value : convertValue(value, 'length', 'mi', 'km');\n }\n return '—';\n}\n\nfunction getTaValue(taScores, data) {\n const value = taScores.find(taData => taData.wellId === data.id);\n return value?.taScore ?? '';\n}\n\nfunction getCellWidth(columnsWithDict, key) {\n const cell = columnsWithDict.find(item => item.key === key);\n return cell?.width || 0;\n}\n\nfunction getTextWidth(strText) {\n const text = document.createElement('span');\n document.body.appendChild(text);\n text.style.font = 'Roboto';\n text.style.fontSize = '14px';\n text.style.letterSpacing = '0.01071em';\n text.style.height = 'auto';\n text.style.width = 'auto';\n text.style.position = 'absolute';\n text.style.whiteSpace = 'nowrap';\n text.innerHTML = strText;\n const textWidth = Math.ceil(text.clientWidth);\n document.body.removeChild(text);\n return textWidth;\n}\n\nconst OffsetWellsTableRow = ({\n columnsWithDict,\n data,\n subjectWellId,\n metricsKeys,\n metricsColumns,\n handleChangeOffsetWell,\n isWellNameExpand,\n wellNameStyle,\n wellNameWidth,\n isViewOnly,\n isImperial,\n isLimitedOffsetWells,\n maxOffsetWellNumber,\n wellSections,\n setActiveWellId,\n viewType,\n isWDUser,\n taScores,\n offsetWellsContainerRef,\n}) => {\n const isSubjectWell = subjectWellId === data.id;\n const borderStyle = { [styles.subjectWellRow]: isSubjectWell };\n const [isChecked, setIsChecked] = useState(data.checked);\n\n let isOverFlowWellName = false;\n const wellName = data[ColumnType.name] || '—';\n let truncWellName = wellName;\n if (!isWellNameExpand && wellNameWidth * 2 < wellName.length * AVG_CHAR_WIDTH) {\n const wellNameRealWidth = getTextWidth(wellName);\n if (wellNameRealWidth > wellNameWidth * 2) {\n const maxCounts = (wellNameWidth * 2) / (wellNameRealWidth / wellName.length);\n truncWellName = `${wellName.substring(0, maxCounts / 2 - 2)}\\n... ${wellName.substring(\n wellName.length - maxCounts / 2 + 6\n )}`;\n isOverFlowWellName = true;\n }\n }\n\n const handleChangeCheckbox = useCallback(\n checked => {\n const scrollTop = offsetWellsContainerRef.current?.scrollTop || 0;\n handleChangeOffsetWell(data, checked);\n setIsChecked(checked);\n\n requestAnimationFrame(() => {\n // eslint-disable-next-line no-param-reassign\n offsetWellsContainerRef.current.scrollTop = scrollTop;\n });\n },\n [data, handleChangeOffsetWell]\n );\n\n useEffect(() => {\n setIsChecked(data.checked);\n }, [data.checked]);\n\n const getSectionColor = ([sectionName]) => {\n return wellSections.find(wellSection => wellSection.label === sectionName).color;\n };\n\n const wellSectionData = useMemo(() => {\n return data[ColumnType.wellSection];\n }, [data]);\n\n const checkboxTooltipText = useMemo(() => {\n if (isViewOnly) {\n return `View only mode. To edit offsets, use ${\n isWDUser ? 'Offset Selection App' : 'WellHub'\n }.`;\n } else if (isLimitedOffsetWells && !data.checked) {\n return `App can’t process more than (${maxOffsetWellNumber - 1}) Offset Wells.`;\n } else {\n return '';\n }\n }, [isViewOnly, isLimitedOffsetWells, data.checked]);\n\n const handleMouseEnter = () => {\n setActiveWellId(data.id);\n };\n\n const handleMouseLeave = () => {\n setActiveWellId(null);\n };\n\n return (\n <TableRow\n data-testid={`${PAGE_NAME}_row_${wellName}`}\n className={styles.bodyRow}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <TableCell\n data-testid={`${PAGE_NAME}_well`}\n className={classNames(styles.bodyCell, styles.wellNameCell, borderStyle, {\n [wellNameStyle]: viewType !== ViewType.mobile,\n [styles.wellNameCellMobile]: viewType === ViewType.mobile,\n })}\n style={{\n width: isWellNameExpand\n ? EXPANDED_WELL_NAME_WIDTH\n : getCellWidth(columnsWithDict, ColumnType.name),\n }}\n >\n {isSubjectWell && (\n <SubjectWellMark\n className={classNames(styles.subjectWellMark, {\n [styles.subjectWellMarkMobile]: viewType === ViewType.mobile,\n })}\n />\n )}\n {!isSubjectWell && (\n <Tooltip\n title={checkboxTooltipText}\n placement=\"bottom-start\"\n classes={{ tooltipPlacementBottom: styles.checkboxTooltip }}\n >\n <div>\n <Checkbox\n data-testid={`${PAGE_NAME}_checkbox`}\n size=\"medium\"\n checked={isChecked}\n classes={{ disabled: styles.checkboxDisabled }}\n disabled={isViewOnly || (isLimitedOffsetWells && !data.checked)}\n onChange={event => handleChangeCheckbox(event.target.checked)}\n />\n </div>\n </Tooltip>\n )}\n <Tooltip title={isOverFlowWellName ? wellName : ''}>\n <Typography\n variant=\"body2\"\n className={classNames(styles.wellNameCursor, {\n [styles.cellDataViewOnly]: isSubjectWell,\n [styles.wellNamePreWrap]: isOverFlowWellName,\n })}\n >\n {isOverFlowWellName ? truncWellName : wellName}\n </Typography>\n </Tooltip>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_dot`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.status) }}\n >\n {!isSubjectWell && (\n <Tooltip\n title={startCase(data[ColumnType.status])}\n enterTouchDelay={viewType === ViewType.mobile && 0}\n leaveTouchDelay={viewType === ViewType.mobile && LEAVE_TOUCH_DELAY}\n >\n <div className={styles.statusContainer}>\n <div\n data-testid={`${PAGE_NAME}_color`}\n className={styles.status}\n style={{\n background: StatusOptions.find(item => item.value === data[ColumnType.status])\n ?.color,\n }}\n />\n </div>\n </Tooltip>\n )}\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_rig`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.rig) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {data[ColumnType.rig] && data[ColumnType.rig] !== 'Null' ? data[ColumnType.rig] : '—'}\n </Typography>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_distance`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.distance) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {formatDistance(data, isImperial)}\n </Typography>\n </TableCell>\n\n {!!taScores.length && (\n <TableCell\n data-testid={`${PAGE_NAME}_ta`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.taScore) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {getTaValue(taScores, data)}\n </Typography>\n </TableCell>\n )}\n\n <TableCell\n data-testid={`${PAGE_NAME}_lastActive`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.lastActive) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {data[ColumnType.lastActive] && Number.isFinite(data[ColumnType.lastActive])\n ? moment.unix(data[ColumnType.lastActive]).format('MM/DD/YYYY')\n : '—'}\n </Typography>\n </TableCell>\n\n {metricsKeys.map(metricsKey => (\n <TableCell\n data-testid={`${PAGE_NAME}_${metricsKey}`}\n key={metricsKey}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, metricsKey) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {formatMetricItem(data, metricsColumns, metricsKey)}\n </Typography>\n </TableCell>\n ))}\n\n <TableCell\n data-testid={`${PAGE_NAME}_wellSection`}\n className={classNames(styles.bodyCell, styles.lastCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.wellSection) }}\n >\n {wellSectionData && wellSectionData.length > 1 ? (\n <Tooltip\n classes={{\n tooltip: styles.customTooltip,\n }}\n title={<ViewWellSectionsName wellSectionNames={wellSectionData} />}\n >\n <div className={styles.sectionLength}>{wellSectionData.length}</div>\n </Tooltip>\n ) : (\n <Tooltip title={wellSectionData || ''}>\n <Typography\n variant=\"body2\"\n className={styles.cellData}\n style={{\n color:\n wellSectionData &&\n wellSectionData.length === 1 &&\n getSectionColor(wellSectionData),\n }}\n >\n {wellSectionData}\n </Typography>\n </Tooltip>\n )}\n </TableCell>\n </TableRow>\n );\n};\n\nOffsetWellsTableRow.propTypes = {\n columnsWithDict: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n data: PropTypes.shape({\n id: PropTypes.number,\n checked: PropTypes.bool,\n name: PropTypes.string,\n status: PropTypes.string,\n }).isRequired,\n subjectWellId: PropTypes.number.isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n metricsColumns: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n handleChangeOffsetWell: PropTypes.func.isRequired,\n isWellNameExpand: PropTypes.bool.isRequired,\n wellNameStyle: PropTypes.string.isRequired,\n wellNameWidth: PropTypes.number.isRequired,\n isViewOnly: PropTypes.bool.isRequired,\n isImperial: PropTypes.bool.isRequired,\n isLimitedOffsetWells: PropTypes.bool.isRequired,\n maxOffsetWellNumber: PropTypes.number.isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n setActiveWellId: PropTypes.func.isRequired,\n viewType: PropTypes.string.isRequired,\n isWDUser: PropTypes.bool.isRequired,\n taScores: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n offsetWellsContainerRef: PropTypes.shape({}).isRequired,\n};\n\nexport default memo(OffsetWellsTableRow);\n"],"names":["PAGE_NAME","formatMetricItem","data","metricsColumns","metricKey","metric","find","item","key","value","get","Number","isFinite","unitType","convertValue","from","to","formatDistance","isImperial","ColumnType","distance","getTaValue","taScores","_value$taScore","taData","wellId","id","taScore","getCellWidth","columnsWithDict","cell","width","OffsetWellsTableRow","_ref","_classNames","_classNames3","_StatusOptions$find","subjectWellId","metricsKeys","handleChangeOffsetWell","isWellNameExpand","wellNameStyle","wellNameWidth","isViewOnly","isLimitedOffsetWells","maxOffsetWellNumber","wellSections","setActiveWellId","viewType","isWDUser","offsetWellsContainerRef","isSubjectWell","borderStyle","styles","subjectWellRow","_useState","useState","checked","_useState2","_slicedToArray","isChecked","setIsChecked","isOverFlowWellName","wellName","name","truncWellName","length","wellNameRealWidth","strText","text","document","createElement","body","appendChild","style","font","fontSize","letterSpacing","height","position","whiteSpace","innerHTML","textWidth","Math","ceil","clientWidth","removeChild","getTextWidth","maxCounts","substring","concat","handleChangeCheckbox","useCallback","_offsetWellsContainer","scrollTop","current","requestAnimationFrame","useEffect","_ref2","sectionName","wellSectionData","useMemo","wellSection","checkboxTooltipText","_jsxs","TableRow","className","bodyRow","onMouseEnter","onMouseLeave","children","TableCell","classNames","bodyCell","wellNameCell","ViewType","mobile","_defineProperty","wellNameCellMobile","EXPANDED_WELL_NAME_WIDTH","_jsx","SubjectWellMark","subjectWellMark","subjectWellMarkMobile","Tooltip","title","placement","classes","tooltipPlacementBottom","checkboxTooltip","Checkbox","size","disabled","checkboxDisabled","onChange","event","target","Typography","variant","wellNameCursor","cellDataViewOnly","wellNamePreWrap","status","startCase","enterTouchDelay","leaveTouchDelay","LEAVE_TOUCH_DELAY","statusContainer","background","StatusOptions","color","rig","cellData","lastActive","moment","unix","format","map","metricsKey","lastCell","tooltip","customTooltip","ViewWellSectionsName","wellSectionNames","sectionLength","label","propTypes","PropTypes","arrayOf","shape","isRequired","number","bool","string","func","memo"],"mappings":"myBAsBA,IAAMA,EAAY,sBAGlB,SAASC,EAAiBC,EAAMC,EAAgBC,GAC9C,IAAMC,EAASF,EAAeG,MAAK,SAAAC,GAAI,OAAIA,EAAKC,MAAQJ,KAClDK,EAAQC,EAAIR,EAAMG,EAAOG,KAE/B,MAAc,cAAVC,EACK,aAGLE,OAAOC,SAASH,IAAWA,GAAmB,SAAVA,EAC/BJ,EAAOQ,SAAWC,EAAaL,EAAOJ,EAAOQ,SAAUR,EAAOU,KAAMV,EAAOW,IAAMP,EAGnF,GACT,CAEA,SAASQ,EAAef,EAAMgB,GAC5B,IAAMT,EAAQC,EAAIR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4E,MACElD,IAC2B,IAA3BA,GAAgBlC,SA7LWgC,GA8LXE,GA9LND,GAAiBxC,EAAAuC,GAAA,GAAN,GAC5BpD,EAAaxC,MAAK,SAAAgG,GAAW,OAAIA,EAAY+D,QAAUlE,EAAW,IAAEmD,QA8L/DxC,SAEDV,WAOf,EAEApE,EAAoBsI,UAAY,CAC9BzI,gBAAiB0I,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,WACxDxK,KAAMqK,EAAUE,MAAM,CACpB/I,GAAI6I,EAAUI,OACdlH,QAAS8G,EAAUK,KACnB5G,KAAMuG,EAAUM,OAChB/B,OAAQyB,EAAUM,SACjBH,WACHrI,cAAekI,EAAUI,OAAOD,WAChCpI,YAAaiI,EAAUC,QAAQD,EAAUM,QAAQH,WACjDvK,eAAgBoK,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,WACvDnI,uBAAwBgI,EAAUO,KAAKJ,WACvClI,iBAAkB+H,EAAUK,KAAKF,WACjCjI,cAAe8H,EAAUM,OAAOH,WAChChI,cAAe6H,EAAUI,OAAOD,WAChC/H,WAAY4H,EAAUK,KAAKF,WAC3BxJ,WAAYqJ,EAAUK,KAAKF,WAC3B9H,qBAAsB2H,EAAUK,KAAKF,WACrC7H,oBAAqB0H,EAAUI,OAAOD,WACtC5H,aAAcyH,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,WACrD3H,gBAAiBwH,EAAUO,KAAKJ,WAChC1H,SAAUuH,EAAUM,OAAOH,WAC3BzH,SAAUsH,EAAUK,KAAKF,WACzBpJ,SAAUiJ,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,WACjDxH,wBAAyBqH,EAAUE,MAAM,CAAA,GAAIC,YAG/C,IAAeK,EAAAA,EAAK/I"}
|
|
1
|
+
{"version":3,"file":"OffsetWellsTableRow.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js"],"sourcesContent":["import { memo, useCallback, useEffect, useState, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { startCase, get } from 'lodash';\nimport classNames from 'classnames';\nimport moment from 'moment';\nimport { Typography, Checkbox, Tooltip, TableCell, TableRow } from '@material-ui/core';\n\nimport {\n ColumnType,\n EXPANDED_WELL_NAME_WIDTH,\n LEAVE_TOUCH_DELAY,\n StatusOptions,\n ViewType,\n} from '../../constants';\n\nimport { SubjectWellMark } from './SubjectWellMark';\nimport ViewWellSectionsName from './ViewWellSectionsName';\n\nimport styles from './OffsetWellsTableRow.module.css';\n\nimport { convertValue } from '~/utils';\n\nconst PAGE_NAME = 'OffsetWellsTableRow';\nconst AVG_CHAR_WIDTH = 8;\n\nfunction formatMetricItem(data, metricsColumns, metricKey) {\n const metric = metricsColumns.find(item => item.key === metricKey);\n const value = get(data, metric.key);\n\n if (value === 'undefined') {\n return 'loading...';\n }\n\n if (Number.isFinite(value) || (value && value !== 'Null')) {\n return metric.unitType ? convertValue(value, metric.unitType, metric.from, metric.to) : value;\n }\n\n return '—';\n}\n\nfunction formatDistance(data, isImperial) {\n const value = get(data, ColumnType.distance);\n if (Number.isFinite(value)) {\n return isImperial ? value : convertValue(value, 'length', 'mi', 'km');\n }\n return '—';\n}\n\nfunction getTaValue(taScores, data) {\n const value = taScores.find(taData => taData.wellId === data.id);\n return value?.taScore ?? '';\n}\n\nfunction getCellWidth(columnsWithDict, key) {\n const cell = columnsWithDict.find(item => item.key === key);\n return cell?.width || 0;\n}\n\nfunction getTextWidth(strText) {\n const text = document.createElement('span');\n document.body.appendChild(text);\n text.style.font = 'Roboto';\n text.style.fontSize = '14px';\n text.style.letterSpacing = '0.01071em';\n text.style.height = 'auto';\n text.style.width = 'auto';\n text.style.position = 'absolute';\n text.style.whiteSpace = 'nowrap';\n text.innerHTML = strText;\n const textWidth = Math.ceil(text.clientWidth);\n document.body.removeChild(text);\n return textWidth;\n}\n\nconst OffsetWellsTableRow = ({\n columnsWithDict,\n data,\n subjectWellId,\n metricsKeys,\n metricsColumns,\n handleChangeOffsetWell,\n isWellNameExpand,\n wellNameStyle,\n wellNameWidth,\n isViewOnly,\n isImperial,\n isLimitedOffsetWells,\n maxOffsetWellNumber,\n wellSections,\n setActiveWellId,\n viewType,\n isWDUser,\n taScores,\n offsetWellsContainerRef,\n}) => {\n const isSubjectWell = subjectWellId === data.id;\n const borderStyle = { [styles.subjectWellRow]: isSubjectWell };\n const [isChecked, setIsChecked] = useState(data.checked);\n\n let isOverFlowWellName = false;\n const wellName = data[ColumnType.name] || '—';\n let truncWellName = wellName;\n if (!isWellNameExpand && wellNameWidth * 2 < wellName.length * AVG_CHAR_WIDTH) {\n const wellNameRealWidth = getTextWidth(wellName);\n if (wellNameRealWidth > wellNameWidth * 2) {\n const maxCounts = (wellNameWidth * 2) / (wellNameRealWidth / wellName.length);\n truncWellName = `${wellName.substring(0, maxCounts / 2 - 2)}\\n... ${wellName.substring(\n wellName.length - maxCounts / 2 + 6\n )}`;\n isOverFlowWellName = true;\n }\n }\n\n const handleChangeCheckbox = useCallback(\n checked => {\n const scrollTop = offsetWellsContainerRef.current?.scrollTop || 0;\n handleChangeOffsetWell(data, checked);\n setIsChecked(checked);\n\n requestAnimationFrame(() => {\n // eslint-disable-next-line no-param-reassign\n offsetWellsContainerRef.current.scrollTop = scrollTop;\n });\n },\n [data, handleChangeOffsetWell]\n );\n\n useEffect(() => {\n setIsChecked(data.checked);\n }, [data.checked]);\n\n const getSectionColor = ([sectionName]) => {\n return wellSections.find(wellSection => wellSection.label === sectionName).color;\n };\n\n const wellSectionData = useMemo(() => {\n return data[ColumnType.wellSection];\n }, [data]);\n\n const checkboxTooltipText = useMemo(() => {\n if (isViewOnly) {\n return `View only mode. To edit offsets, use ${\n isWDUser ? 'Offset Selection App' : 'WellHub'\n }.`;\n } else if (isLimitedOffsetWells && !data.checked) {\n return `App can’t process more than (${maxOffsetWellNumber - 1}) Offset Wells.`;\n } else {\n return '';\n }\n }, [isViewOnly, isLimitedOffsetWells, data.checked]);\n\n const handleMouseEnter = () => {\n setActiveWellId(data.id);\n };\n\n const handleMouseLeave = () => {\n setActiveWellId(null);\n };\n\n return (\n <TableRow\n data-testid={`${PAGE_NAME}_row_${wellName}`}\n className={styles.bodyRow}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <TableCell\n data-testid={`${PAGE_NAME}_well`}\n className={classNames(styles.bodyCell, styles.wellNameCell, borderStyle, {\n [wellNameStyle]: viewType !== ViewType.mobile,\n [styles.wellNameCellMobile]: viewType === ViewType.mobile,\n })}\n style={{\n width: isWellNameExpand\n ? EXPANDED_WELL_NAME_WIDTH\n : getCellWidth(columnsWithDict, ColumnType.name),\n }}\n >\n {isSubjectWell && (\n <SubjectWellMark\n className={classNames(styles.subjectWellMark, {\n [styles.subjectWellMarkMobile]: viewType === ViewType.mobile,\n })}\n />\n )}\n {!isSubjectWell && (\n <Tooltip\n title={checkboxTooltipText}\n placement=\"bottom-start\"\n classes={{ tooltipPlacementBottom: styles.checkboxTooltip }}\n >\n <div>\n <Checkbox\n data-testid={`${PAGE_NAME}_checkbox`}\n size=\"medium\"\n checked={isChecked}\n classes={{ disabled: styles.checkboxDisabled }}\n disabled={isViewOnly || (isLimitedOffsetWells && !data.checked)}\n onChange={event => handleChangeCheckbox(event.target.checked)}\n />\n </div>\n </Tooltip>\n )}\n <Tooltip title={isOverFlowWellName ? wellName : ''}>\n <Typography\n variant=\"body2\"\n className={classNames(styles.wellNameCursor, {\n [styles.cellDataViewOnly]: isSubjectWell,\n [styles.wellNamePreWrap]: isOverFlowWellName,\n })}\n >\n {isOverFlowWellName ? truncWellName : wellName}\n </Typography>\n </Tooltip>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_dot`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.status) }}\n >\n {!isSubjectWell && (\n <Tooltip\n title={startCase(data[ColumnType.status])}\n enterTouchDelay={viewType === ViewType.mobile && 0}\n leaveTouchDelay={viewType === ViewType.mobile && LEAVE_TOUCH_DELAY}\n >\n <div className={styles.statusContainer}>\n <div\n data-testid={`${PAGE_NAME}_color`}\n className={styles.status}\n style={{\n background: StatusOptions.find(item => item.value === data[ColumnType.status])\n ?.color,\n }}\n />\n </div>\n </Tooltip>\n )}\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_company`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.company) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {data[ColumnType.company] && data[ColumnType.company] !== 'Null'\n ? data[ColumnType.company]\n : '—'}\n </Typography>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_rig`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.rig) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {data[ColumnType.rig] && data[ColumnType.rig] !== 'Null' ? data[ColumnType.rig] : '—'}\n </Typography>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_distance`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.distance) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {formatDistance(data, isImperial)}\n </Typography>\n </TableCell>\n\n {!!taScores.length && (\n <TableCell\n data-testid={`${PAGE_NAME}_ta`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.taScore) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {getTaValue(taScores, data)}\n </Typography>\n </TableCell>\n )}\n\n <TableCell\n data-testid={`${PAGE_NAME}_lastActive`}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.lastActive) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {data[ColumnType.lastActive] && Number.isFinite(data[ColumnType.lastActive])\n ? moment.unix(data[ColumnType.lastActive]).format('MM/DD/YYYY')\n : '—'}\n </Typography>\n </TableCell>\n\n {metricsKeys.map(metricsKey => (\n <TableCell\n data-testid={`${PAGE_NAME}_${metricsKey}`}\n key={metricsKey}\n className={classNames(styles.bodyCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, metricsKey) }}\n >\n <Typography variant=\"body2\" className={styles.cellData}>\n {formatMetricItem(data, metricsColumns, metricsKey)}\n </Typography>\n </TableCell>\n ))}\n\n <TableCell\n data-testid={`${PAGE_NAME}_wellSection`}\n className={classNames(styles.bodyCell, styles.lastCell, borderStyle)}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.wellSection) }}\n >\n {wellSectionData && wellSectionData.length > 1 ? (\n <Tooltip\n classes={{\n tooltip: styles.customTooltip,\n }}\n title={<ViewWellSectionsName wellSectionNames={wellSectionData} />}\n >\n <div className={styles.sectionLength}>{wellSectionData.length}</div>\n </Tooltip>\n ) : (\n <Tooltip title={wellSectionData || ''}>\n <Typography\n variant=\"body2\"\n className={styles.cellData}\n style={{\n color:\n wellSectionData &&\n wellSectionData.length === 1 &&\n getSectionColor(wellSectionData),\n }}\n >\n {wellSectionData}\n </Typography>\n </Tooltip>\n )}\n </TableCell>\n </TableRow>\n );\n};\n\nOffsetWellsTableRow.propTypes = {\n columnsWithDict: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n data: PropTypes.shape({\n id: PropTypes.number,\n checked: PropTypes.bool,\n name: PropTypes.string,\n status: PropTypes.string,\n }).isRequired,\n subjectWellId: PropTypes.number.isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n metricsColumns: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n handleChangeOffsetWell: PropTypes.func.isRequired,\n isWellNameExpand: PropTypes.bool.isRequired,\n wellNameStyle: PropTypes.string.isRequired,\n wellNameWidth: PropTypes.number.isRequired,\n isViewOnly: PropTypes.bool.isRequired,\n isImperial: PropTypes.bool.isRequired,\n isLimitedOffsetWells: PropTypes.bool.isRequired,\n maxOffsetWellNumber: PropTypes.number.isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n setActiveWellId: PropTypes.func.isRequired,\n viewType: PropTypes.string.isRequired,\n isWDUser: PropTypes.bool.isRequired,\n taScores: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n offsetWellsContainerRef: PropTypes.shape({}).isRequired,\n};\n\nexport default memo(OffsetWellsTableRow);\n"],"names":["PAGE_NAME","formatMetricItem","data","metricsColumns","metricKey","metric","find","item","key","value","get","Number","isFinite","unitType","convertValue","from","to","formatDistance","isImperial","ColumnType","distance","getTaValue","taScores","_value$taScore","taData","wellId","id","taScore","getCellWidth","columnsWithDict","cell","width","OffsetWellsTableRow","_ref","_classNames","_classNames3","_StatusOptions$find","subjectWellId","metricsKeys","handleChangeOffsetWell","isWellNameExpand","wellNameStyle","wellNameWidth","isViewOnly","isLimitedOffsetWells","maxOffsetWellNumber","wellSections","setActiveWellId","viewType","isWDUser","offsetWellsContainerRef","isSubjectWell","borderStyle","styles","subjectWellRow","_useState","useState","checked","_useState2","_slicedToArray","isChecked","setIsChecked","isOverFlowWellName","wellName","name","truncWellName","length","wellNameRealWidth","strText","text","document","createElement","body","appendChild","style","font","fontSize","letterSpacing","height","position","whiteSpace","innerHTML","textWidth","Math","ceil","clientWidth","removeChild","getTextWidth","maxCounts","substring","concat","handleChangeCheckbox","useCallback","_offsetWellsContainer","scrollTop","current","requestAnimationFrame","useEffect","_ref2","sectionName","wellSectionData","useMemo","wellSection","checkboxTooltipText","_jsxs","TableRow","className","bodyRow","onMouseEnter","onMouseLeave","children","TableCell","classNames","bodyCell","wellNameCell","ViewType","mobile","_defineProperty","wellNameCellMobile","EXPANDED_WELL_NAME_WIDTH","_jsx","SubjectWellMark","subjectWellMark","subjectWellMarkMobile","Tooltip","title","placement","classes","tooltipPlacementBottom","checkboxTooltip","Checkbox","size","disabled","checkboxDisabled","onChange","event","target","Typography","variant","wellNameCursor","cellDataViewOnly","wellNamePreWrap","status","startCase","enterTouchDelay","leaveTouchDelay","LEAVE_TOUCH_DELAY","statusContainer","background","StatusOptions","color","company","cellData","rig","lastActive","moment","unix","format","map","metricsKey","lastCell","tooltip","customTooltip","ViewWellSectionsName","wellSectionNames","sectionLength","label","propTypes","PropTypes","arrayOf","shape","isRequired","number","bool","string","func","memo"],"mappings":"myBAsBA,IAAMA,EAAY,sBAGlB,SAASC,EAAiBC,EAAMC,EAAgBC,GAC9C,IAAMC,EAASF,EAAeG,MAAK,SAAAC,GAAI,OAAIA,EAAKC,MAAQJ,KAClDK,EAAQC,EAAIR,EAAMG,EAAOG,KAE/B,MAAc,cAAVC,EACK,aAGLE,OAAOC,SAASH,IAAWA,GAAmB,SAAVA,EAC/BJ,EAAOQ,SAAWC,EAAaL,EAAOJ,EAAOQ,SAAUR,EAAOU,KAAMV,EAAOW,IAAMP,EAGnF,GACT,CAEA,SAASQ,EAAef,EAAMgB,GAC5B,IAAMT,EAAQC,EAAIR,EAAMiB,EAAWC,UACnC,OAAIT,OAAOC,SAASH,GACXS,EAAaT,EAAQK,EAAaL,EAAO,SAAU,KAAM,MAE3D,GACT,CAEA,SAASY,EAAWC,EAAUpB,GAAM,IAAAqB,EAC5Bd,EAAQa,EAAShB,MAAK,SAAAkB,GAAM,OAAIA,EAAOC,SAAWvB,EAAKwB,MAC7D,eAAOjB,EAAAA,aAAK,EAALA,EAAOkB,uBAAW,EAC3B,CAEA,SAASC,EAAaC,EAAiBrB,GACrC,IAAMsB,EAAOD,EAAgBvB,MAAK,SAAAC,GAAI,OAAIA,EAAKC,MAAQA,KACvD,OAAOsB,eAAAA,EAAMC,QAAS,CACxB,CAkBA,IAAMC,EAAsB,SAoBtBC,GAAA,IAAAC,EAAAC,EAAAC,EAnBJP,IAAAA,gBACA3B,IAAAA,KACAmC,IAAAA,cACAC,IAAAA,YACAnC,IAAAA,eACAoC,IAAAA,uBACAC,IAAAA,iBACAC,IAAAA,cACAC,IAAAA,cACAC,IAAAA,WAC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AAM,CACpBhJ,GAAI8I,EAAUI,OACdnH,QAAS+G,EAAUK,KACnB7G,KAAMwG,EAAUM,OAChBhC,OAAQ0B,EAAUM,SACjBH,WACHtI,cAAemI,EAAUI,OAAOD,WAChCrI,YAAakI,EAAUC,QAAQD,EAAUM,QAAQH,WACjDxK,eAAgBqK,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,WACvDpI,uBAAwBiI,EAAUO,KAAKJ,WACvCnI,iBAAkBgI,EAAUK,KAAKF,WACjClI,cAAe+H,EAAUM,OAAOH,WAChCjI,cAAe8H,EAAUI,OAAOD,WAChChI,WAAY6H,EAAUK,KAAKF,WAC3BzJ,WAAYsJ,EAAUK,KAAKF,WAC3B/H,qBAAsB4H,EAAUK,KAAKF,WACrC9H,oBAAqB2H,EAAUI,OAAOD,WACtC7H,aAAc0H,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,WACrD5H,gBAAiByH,EAAUO,KAAKJ,WAChC3H,SAAUwH,EAAUM,OAAOH,WAC3B1H,SAAUuH,EAAUK,KAAKF,WACzBrJ,SAAUkJ,EAAUC,QAAQD,EAAUE,MAAM,CAAA,IAAKC,WACjDzH,wBAAyBsH,EAAUE,MAAM,CAAA,GAAIC,YAG/C,IAAeK,EAAAA,EAAKhJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"@babel/runtime/helpers/defineProperty";import{useCallback as t,useMemo as e}from"react";import s from"classnames";import i from"prop-types";import{isEmpty as n}from"lodash";import{RESYNC_STATUS as r,ViewType as p}from"../../constants.js";import m from"./Toolbar.module.css.js";import{jsxs as c,jsx as a}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"@material-ui/core";import{LeftAlignmentIcon as l,CenterAlignmentIcon as d,CloseSmallIcon as j}from"../../../../icons/iconParkIcons.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"@babel/runtime/helpers/slicedToArray";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 u}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"moment";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../../../../utils/env.js";import"../../../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../../../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"../../../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 A from"../../../Button/components/Button/index.js";import"moment-timezone";import"../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../../Button/components/LiveButton/styles.js";import"../../../ContextMenuItem/index.js";import"../../../FolderMenuItem/index.js";import"../../../EditableItem/EditableItem/index.js";import"../../../EditableItem/EditableItemWithBadge/index.js";import"../../../Checkbox/index.js";import"../../../FolderMenuItemWithLinks/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../Select/SelectFilterBy.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../GradientPicker/GradientPicker.js";import"../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../GradientManager/GradientSelect.styles.js";import"../../../GradientManager/GradientManager.styles.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../utils/apiCalls.js";import"../../effects/useAdvancedWells.js";import"react-virtualized";import"../../effects/useAssetsData.js";import"../AppHeader/AppHeader.js";import"../Filter/Filter.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";var C=function(i){var C,V=i.isViewOnly,S=i.isXtoProvider,I=i.viewType,g=i.filters,v=i.setFilters,D=i.isFilterExpanded,b=i.setIsFilterExpanded,h=i.isMapHidden,T=i.setIsMapHidden,P=i.resyncStatus,x=i.setResyncStatus,F=t((function(){x(r.TRIGGERED)}),[]),f=e((function(){return P===r.RUNNING}),[P]);return c("div",{className:s(m.controlGroup,(C={},o(C,m.controlGroupSmall,I===p.small),o(C,m.controlGroupMobile,I===p.mobile),C)),children:[c("div",{className:m.buttonGap,children:[c(A,{"data-testid":"".concat("Toolbar","_filters"),startIcon:a(D?l:d,{size:"small"}),classes:{root:m.filterButton},onClick:function(){return b((function(o){return!o}))},disabled:V,children:["Filters",!n(g)&&c("div",{className:m.clearWrapper,onClick:function(o){o.stopPropagation(),v({})},children:[a(j,{size:"small",className:m.clearIcon}),a("span",{className:m.clearLabel,children:"Clear"})]})]}),S&&a(A,{classes:{root:m.resyncButton},variant:"contained",onClick:F,disabled:V||f,children:"Re-Sync with IDAS"})]}),a(u,{"data-testid":"".concat("Toolbar","_map"),onLabel:"Map",checked:!h,onChange:function(o){return T(!o)}})]})};C.propTypes={isViewOnly:i.bool.isRequired,viewType:i.string.isRequired,filters:i.shape({}).isRequired,setFilters:i.func.isRequired,isFilterExpanded:i.bool.isRequired,setIsFilterExpanded:i.func.isRequired,isMapHidden:i.bool.isRequired,setIsMapHidden:i.func.isRequired};export{C as Toolbar};
|
|
1
|
+
import o from"@babel/runtime/helpers/defineProperty";import{useCallback as t,useMemo as e}from"react";import s from"classnames";import i from"prop-types";import{isEmpty as n}from"lodash";import{RESYNC_STATUS as r,ViewType as p}from"../../constants.js";import m from"./Toolbar.module.css.js";import{jsxs as c,jsx as a}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"@material-ui/core";import{LeftAlignmentIcon as l,CenterAlignmentIcon as d,CloseSmallIcon as j}from"../../../../icons/iconParkIcons.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"@babel/runtime/helpers/slicedToArray";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 u}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"moment";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../../../../utils/env.js";import"../../../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../../../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"../../../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 A from"../../../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"../Filter/Filter.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";var C=function(i){var C,V=i.isViewOnly,S=i.isXtoProvider,I=i.viewType,g=i.filters,v=i.setFilters,D=i.isFilterExpanded,b=i.setIsFilterExpanded,h=i.isMapHidden,P=i.setIsMapHidden,T=i.resyncStatus,x=i.setResyncStatus,F=t((function(){x(r.TRIGGERED)}),[]),f=e((function(){return T===r.RUNNING}),[T]);return c("div",{className:s(m.controlGroup,(C={},o(C,m.controlGroupSmall,I===p.small),o(C,m.controlGroupMobile,I===p.mobile),C)),children:[c("div",{className:m.buttonGap,children:[c(A,{"data-testid":"".concat("Toolbar","_filters"),startIcon:a(D?l:d,{size:"small"}),classes:{root:m.filterButton},onClick:function(){return b((function(o){return!o}))},disabled:V,children:["Filters",!n(g)&&c("div",{className:m.clearWrapper,onClick:function(o){o.stopPropagation(),v({})},children:[a(j,{size:"small",className:m.clearIcon}),a("span",{className:m.clearLabel,children:"Clear"})]})]}),S&&a(A,{classes:{root:m.resyncButton},variant:"contained",onClick:F,disabled:V||f,children:"Re-Sync with IDAS"})]}),a(u,{"data-testid":"".concat("Toolbar","_map"),onLabel:"Map",checked:!h,onChange:function(o){return P(!o)}})]})};C.propTypes={isViewOnly:i.bool.isRequired,viewType:i.string.isRequired,filters:i.shape({}).isRequired,setFilters:i.func.isRequired,isFilterExpanded:i.bool.isRequired,setIsFilterExpanded:i.func.isRequired,isMapHidden:i.bool.isRequired,setIsMapHidden:i.func.isRequired};export{C as Toolbar};
|
|
2
2
|
//# sourceMappingURL=Toolbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js"],"sourcesContent":["import { useCallback, useMemo } from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { isEmpty } from 'lodash';\n\nimport { RESYNC_STATUS, ViewType } from '../../constants';\n\nimport styles from './Toolbar.module.css';\n\nimport { Button } from '~/components';\nimport { Switch } from '~/componentsV2/Switch';\nimport { CenterAlignmentIcon, CloseSmallIcon, LeftAlignmentIcon } from '~/icons';\n\nconst PAGE_NAME = 'Toolbar';\n\nexport const Toolbar = ({\n isViewOnly,\n isXtoProvider,\n viewType,\n filters,\n setFilters,\n isFilterExpanded,\n setIsFilterExpanded,\n isMapHidden,\n setIsMapHidden,\n resyncStatus,\n setResyncStatus,\n}) => {\n const handleResync = useCallback(() => {\n setResyncStatus(RESYNC_STATUS.TRIGGERED);\n }, []);\n\n const isResyncRunning = useMemo(() => {\n return resyncStatus === RESYNC_STATUS.RUNNING;\n }, [resyncStatus]);\n\n return (\n <div\n className={classNames(styles.controlGroup, {\n [styles.controlGroupSmall]: viewType === ViewType.small,\n [styles.controlGroupMobile]: viewType === ViewType.mobile,\n })}\n >\n <div className={styles.buttonGap}>\n <Button\n data-testid={`${PAGE_NAME}_filters`}\n startIcon={\n isFilterExpanded ? (\n <LeftAlignmentIcon size=\"small\" />\n ) : (\n <CenterAlignmentIcon size=\"small\" />\n )\n }\n classes={{ root: styles.filterButton }}\n onClick={() => setIsFilterExpanded(prev => !prev)}\n disabled={isViewOnly}\n >\n Filters\n {!isEmpty(filters) && (\n <div\n className={styles.clearWrapper}\n onClick={e => {\n e.stopPropagation();\n setFilters({});\n }}\n >\n <CloseSmallIcon size=\"small\" className={styles.clearIcon} />\n <span className={styles.clearLabel}>Clear</span>\n </div>\n )}\n </Button>\n {isXtoProvider && (\n <Button\n classes={{ root: styles.resyncButton }}\n variant=\"contained\"\n onClick={handleResync}\n disabled={isViewOnly || isResyncRunning}\n >\n Re-Sync with IDAS\n </Button>\n )}\n </div>\n <Switch\n data-testid={`${PAGE_NAME}_map`}\n onLabel=\"Map\"\n checked={!isMapHidden}\n onChange={checked => setIsMapHidden(!checked)}\n />\n </div>\n );\n};\n\nToolbar.propTypes = {\n isViewOnly: PropTypes.bool.isRequired,\n viewType: PropTypes.string.isRequired,\n filters: PropTypes.shape({}).isRequired,\n setFilters: PropTypes.func.isRequired,\n isFilterExpanded: PropTypes.bool.isRequired,\n setIsFilterExpanded: PropTypes.func.isRequired,\n isMapHidden: PropTypes.bool.isRequired,\n setIsMapHidden: PropTypes.func.isRequired,\n};\n"],"names":["Toolbar","_ref","_classNames","isViewOnly","isXtoProvider","viewType","filters","setFilters","isFilterExpanded","setIsFilterExpanded","isMapHidden","setIsMapHidden","resyncStatus","setResyncStatus","handleResync","useCallback","RESYNC_STATUS","TRIGGERED","isResyncRunning","useMemo","RUNNING","_jsxs","className","classNames","styles","controlGroup","_defineProperty","controlGroupSmall","ViewType","small","controlGroupMobile","mobile","children","buttonGap","Button","concat","startIcon","_jsx","LeftAlignmentIcon","CenterAlignmentIcon","size","classes","root","filterButton","onClick","prev","disabled","isEmpty","clearWrapper","e","stopPropagation","CloseSmallIcon","clearIcon","clearLabel","resyncButton","variant","Switch","onLabel","checked","onChange","propTypes","PropTypes","bool","isRequired","string","shape","func"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Toolbar.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js"],"sourcesContent":["import { useCallback, useMemo } from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { isEmpty } from 'lodash';\n\nimport { RESYNC_STATUS, ViewType } from '../../constants';\n\nimport styles from './Toolbar.module.css';\n\nimport { Button } from '~/components';\nimport { Switch } from '~/componentsV2/Switch';\nimport { CenterAlignmentIcon, CloseSmallIcon, LeftAlignmentIcon } from '~/icons';\n\nconst PAGE_NAME = 'Toolbar';\n\nexport const Toolbar = ({\n isViewOnly,\n isXtoProvider,\n viewType,\n filters,\n setFilters,\n isFilterExpanded,\n setIsFilterExpanded,\n isMapHidden,\n setIsMapHidden,\n resyncStatus,\n setResyncStatus,\n}) => {\n const handleResync = useCallback(() => {\n setResyncStatus(RESYNC_STATUS.TRIGGERED);\n }, []);\n\n const isResyncRunning = useMemo(() => {\n return resyncStatus === RESYNC_STATUS.RUNNING;\n }, [resyncStatus]);\n\n return (\n <div\n className={classNames(styles.controlGroup, {\n [styles.controlGroupSmall]: viewType === ViewType.small,\n [styles.controlGroupMobile]: viewType === ViewType.mobile,\n })}\n >\n <div className={styles.buttonGap}>\n <Button\n data-testid={`${PAGE_NAME}_filters`}\n startIcon={\n isFilterExpanded ? (\n <LeftAlignmentIcon size=\"small\" />\n ) : (\n <CenterAlignmentIcon size=\"small\" />\n )\n }\n classes={{ root: styles.filterButton }}\n onClick={() => setIsFilterExpanded(prev => !prev)}\n disabled={isViewOnly}\n >\n Filters\n {!isEmpty(filters) && (\n <div\n className={styles.clearWrapper}\n onClick={e => {\n e.stopPropagation();\n setFilters({});\n }}\n >\n <CloseSmallIcon size=\"small\" className={styles.clearIcon} />\n <span className={styles.clearLabel}>Clear</span>\n </div>\n )}\n </Button>\n {isXtoProvider && (\n <Button\n classes={{ root: styles.resyncButton }}\n variant=\"contained\"\n onClick={handleResync}\n disabled={isViewOnly || isResyncRunning}\n >\n Re-Sync with IDAS\n </Button>\n )}\n </div>\n <Switch\n data-testid={`${PAGE_NAME}_map`}\n onLabel=\"Map\"\n checked={!isMapHidden}\n onChange={checked => setIsMapHidden(!checked)}\n />\n </div>\n );\n};\n\nToolbar.propTypes = {\n isViewOnly: PropTypes.bool.isRequired,\n viewType: PropTypes.string.isRequired,\n filters: PropTypes.shape({}).isRequired,\n setFilters: PropTypes.func.isRequired,\n isFilterExpanded: PropTypes.bool.isRequired,\n setIsFilterExpanded: PropTypes.func.isRequired,\n isMapHidden: PropTypes.bool.isRequired,\n setIsMapHidden: PropTypes.func.isRequired,\n};\n"],"names":["Toolbar","_ref","_classNames","isViewOnly","isXtoProvider","viewType","filters","setFilters","isFilterExpanded","setIsFilterExpanded","isMapHidden","setIsMapHidden","resyncStatus","setResyncStatus","handleResync","useCallback","RESYNC_STATUS","TRIGGERED","isResyncRunning","useMemo","RUNNING","_jsxs","className","classNames","styles","controlGroup","_defineProperty","controlGroupSmall","ViewType","small","controlGroupMobile","mobile","children","buttonGap","Button","concat","startIcon","_jsx","LeftAlignmentIcon","CenterAlignmentIcon","size","classes","root","filterButton","onClick","prev","disabled","isEmpty","clearWrapper","e","stopPropagation","CloseSmallIcon","clearIcon","clearLabel","resyncButton","variant","Switch","onLabel","checked","onChange","propTypes","PropTypes","bool","isRequired","string","shape","func"],"mappings":"ihxBAaA,IAEaA,EAAU,SAYjBC,GAAA,IAAAC,EAXJC,IAAAA,WACAC,IAAAA,cACAC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,WACAC,IAAAA,iBACAC,IAAAA,oBACAC,IAAAA,YACAC,IAAAA,eACAC,IAAAA,aACAC,IAAAA,gBAEMC,EAAeC,GAAY,WAC/BF,EAAgBG,EAAcC,UAC/B,GAAE,IAEGC,EAAkBC,GAAQ,WAC9B,OAAOP,IAAiBI,EAAcI,OACxC,GAAG,CAACR,IAEJ,OACES,EAAA,MAAA,CACEC,UAAWC,EAAWC,EAAOC,cAAYv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WAC5BpD,eAAgBkD,EAAUK,KAAKH"}
|
|
@@ -26,6 +26,7 @@ export const SEARCH_CELL_EXPAND_WIDTH: 1270;
|
|
|
26
26
|
export const NonConvertableMetrics: string[];
|
|
27
27
|
export namespace FilterType {
|
|
28
28
|
let status: string;
|
|
29
|
+
let company: string;
|
|
29
30
|
let rig: string;
|
|
30
31
|
let program: string;
|
|
31
32
|
let basin: string;
|
|
@@ -58,6 +59,8 @@ export namespace ColumnType {
|
|
|
58
59
|
export let name: string;
|
|
59
60
|
let status_1: string;
|
|
60
61
|
export { status_1 as status };
|
|
62
|
+
let company_1: string;
|
|
63
|
+
export { company_1 as company };
|
|
61
64
|
let rig_1: string;
|
|
62
65
|
export { rig_1 as rig };
|
|
63
66
|
export let distance: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellPickerV4/constants.js"],"names":[],"mappings":"AAIA,sCAAuC;AACvC,qCAAsC;;;;;;;;AAQtC,mCAAoC;AACpC,yCAA0C;AAC1C,2CAA4C;AAE5C,uCAAwC;AACxC,+BAAgC;AAChC,2CAA4C;AAC5C,mCAAoC;AAEpC,oCAAqC;AACrC,sCAAuC;AACvC,2CAA4C;AAC5C,+BAAgC;AAChC,4BAA6B;AAC7B,sCAAuC;AACvC,kDAAkD;AAClD,6CAA8C;AAC9C,4CAA6C;AAG7C,6CAA4D
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellPickerV4/constants.js"],"names":[],"mappings":"AAIA,sCAAuC;AACvC,qCAAsC;;;;;;;;AAQtC,mCAAoC;AACpC,yCAA0C;AAC1C,2CAA4C;AAE5C,uCAAwC;AACxC,+BAAgC;AAChC,2CAA4C;AAC5C,mCAAoC;AAEpC,oCAAqC;AACrC,sCAAuC;AACvC,2CAA4C;AAC5C,+BAAgC;AAChC,4BAA6B;AAC7B,sCAAuC;AACvC,kDAAkD;AAClD,6CAA8C;AAC9C,4CAA6C;AAG7C,6CAA4D;;;;;;;;;;;;;;;;;AAmB5D;;;IAiCE;;;;;;;;AAUF;;;IAME;;;;;;;;;;;;;;;AAcF;;;;;IAuDE;AAEF;;;IAOE;AAEF,kCAAmC;AAEnC;;;IAwCE;;;;;;;;;;AAWF,yCAYE;AAEF;;EAME;AAEF,sDAAuD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import{sortBy as a}from"lodash";import"../../utils/index.js";import*as l from"../../utils/metrics/metricsConfig.js";var i
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import{sortBy as a}from"lodash";import"../../utils/index.js";import*as l from"../../utils/metrics/metricsConfig.js";var o,i=800,r=650,n={none:"none",normal:"normal",small:"small screen",tablet:"tablet",mobile:"mobile"},s=1e3,p=50,m=50,_="Android",c="iOS",d="Window Phone",u="other",g="all",b="All",y=450,v=50,h=1e4,F=["xto"],E=1020,A=1270,w=l,f=[w.mud_type.key],D={status:"status",company:"companyId",rig:"rigName",program:"programName",basin:"basin",county:"county",area:"area",formation:"formation",stringDesign:"stringDesign",radius:"radius",period:"period",sideTracks:"sideTracks",timeRangeFrom:"timeRangeFrom",timeRangeTo:"timeRangeTo"},k=[{value:D.company,label:"Company"},{value:D.rig,label:"Rig"},{value:D.program,label:"Program/BU"},{value:D.basin,label:"Basin"},{value:D.county,label:"County"},{value:D.area,label:"Area"},{value:D.formation,label:"Target Formation"},{value:D.stringDesign,label:"String Design"}],C={unknown:"unknown",idle:"idle",active:"active",paused:"paused",complete:"complete"},S=[{value:C.unknown,color:"#9E9E9E"},{value:C.idle,color:"#BDBDBD"},{value:C.active,color:"#95F126"},{value:C.paused,color:"#FFF350"},{value:C.complete,color:"#2196F3"}],N={name:"name",status:"status",company:"companyName",rig:"rigName",distance:"distance",taScore:"TA",lastActive:"lastActive",metrics:"metrics",wellSection:"wellSection"},R=[{type:N.name,label:"Well Name",key:N.name,width:[280,197,197,186]},{type:N.status,label:"",key:N.status,width:[40,40,40,30]},{type:N.company,label:"Company",key:N.company,width:[180,140,140,93]},{type:N.rig,label:"Rig",key:N.rig,width:[220,140,140,93]},{type:N.distance,label:"Distance",key:N.distance,width:[160,160,122,93]},{type:N.taScore,label:"TA",key:N.taScore,width:[90,90,75,70]},{type:N.lastActive,label:"Last Active",key:N.lastActive,width:[140,140,108,98]},{type:N.metrics,label:"",key:"",width:[0,212,141,141]},{type:N.wellSection,label:"Well Section",key:N.wellSection,width:[180,131,131,97]}],T=[{value:"all",label:"All"},{value:"last12h",label:"Last 12 hrs"},{value:"last24h",label:"Last 24 hrs"},{value:"last7d",label:"Last 7 days"},{value:"lastMonth",label:"Last Month"},{value:"custom",label:"Custom"}],B=3,I=a([w.weight_to_weight_average,w.bottom_to_slips_average,w.drilling_connection_average,w.slips_to_bottom_average,w.hole_depth,w.hole_depth_change,w.drilled_feet_rotary,w.drilled_feet_slide,w.rop_gross,w.rop,w.rop_rotary,w.rop_slide,w.drilled_feet_rotary_percentage,w.drilled_feet_slide_percentage,w.on_bottom_percentage,w.on_bottom_time,w.cost_per_ft,w.cost_per_lat_ft,w.feet_per_day,w.tripping_in_speed_cased,w.tripping_in_speed_open,w.tripping_in_speed,w.tripping_out_speed_cased,w.tripping_out_speed_open,w.tripping_out_speed,w.target_formation,w.mud_type,w.total_time].concat(t("production"!==process.env.REACT_APP_ENVIRONMENT?[w.npt,w.circulating_time,w.spud_to_rig_release_time,w.spud_to_total_depth_time]:[])),"label"),L=["#6EACFF","#69B919","#E95DAF","#A77DFF","#77FFC1","#018EFE","#FF5D7E","#B9E310","#FFD111","#24BB8E","#C426F3"],P=(e(o={},n.small,0),e(o,n.mobile,52),e(o,n.none,48),e(o,n.tablet,48),e(o,n.normal,48),o),U="hole_depth_change",x={SUCCESS:"succeeded",FAILURE:"failed"},G={INITIAL:0,TRIGGERED:1,RUNNING:2,SUCCEEDED:3,FAILED:-1};export{g as ALL_SECTION_KEY,b as ALL_SECTION_LABEL,_ as ANDROID_DEVICE,F as COMPANY_PROVIDERS_FOR_IDAS,N as ColumnType,p as DEFAULT_BIC_OFFSET_SIZE,m as DEFAULT_LOCAL_OFFSET_SIZE,U as DEFAULT_METRICS_KEY,y as EXPANDED_WELL_NAME_WIDTH,k as FilterOptions,D as FilterType,c as IOS_DEVICE,h as LEAVE_TOUCH_DELAY,B as MAX_METRICS_COUNT,s as MAX_OFFSET_SIZE,I as METRICS_LIST,f as NonConvertableMetrics,T as OBJECTIVE_PERIOD_LIST,u as OTHER_DEVICE,G as RESYNC_STATUS,x as RESYNC_TASK_RESPONSE,v as ROWS_PER_PAGE,E as SEARCH_CELL_DEFAULT_WIDTH,A as SEARCH_CELL_EXPAND_WIDTH,i as SMALL_SCREEN_HEIGHT,r as SMALL_SCREEN_WIDTH,S as StatusOptions,P as TOP_GRADIENT_MAP,R as TableColumns,n as ViewType,d as WINDOWS_PHONE,L as WellSectionColors,C as WellStatus};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../src/components/OffsetWellPickerV4/constants.js"],"sourcesContent":["import { sortBy } from 'lodash';\n\nimport { metricsUtils } from '~/utils';\n\nexport const SMALL_SCREEN_HEIGHT = 800;\nexport const SMALL_SCREEN_WIDTH = 650;\nexport const ViewType = {\n none: 'none',\n normal: 'normal',\n small: 'small screen',\n tablet: 'tablet',\n mobile: 'mobile',\n};\nexport const MAX_OFFSET_SIZE = 1000;\nexport const DEFAULT_BIC_OFFSET_SIZE = 50;\nexport const DEFAULT_LOCAL_OFFSET_SIZE = 50;\n\nexport const ANDROID_DEVICE = 'Android';\nexport const IOS_DEVICE = 'iOS';\nexport const WINDOWS_PHONE = 'Window Phone';\nexport const OTHER_DEVICE = 'other';\n\nexport const ALL_SECTION_KEY = 'all';\nexport const ALL_SECTION_LABEL = 'All';\nexport const EXPANDED_WELL_NAME_WIDTH = 450;\nexport const ROWS_PER_PAGE = 50;\nexport const ROW_HEIGHT = 60;\nexport const LEAVE_TOUCH_DELAY = 10000;\nexport const COMPANY_PROVIDERS_FOR_IDAS = ['xto'];\nexport const SEARCH_CELL_DEFAULT_WIDTH = 1020;\nexport const SEARCH_CELL_EXPAND_WIDTH = 1270;\nconst metrics = metricsUtils.default;\n\nexport const NonConvertableMetrics = [metrics.mud_type.key];\n\nexport const FilterType = {\n status: 'status',\n rig: 'rigName',\n program: 'programName',\n basin: 'basin',\n county: 'county',\n area: 'area',\n formation: 'formation',\n stringDesign: 'stringDesign',\n radius: 'radius',\n period: 'period',\n sideTracks: 'sideTracks',\n timeRangeFrom: 'timeRangeFrom',\n timeRangeTo: 'timeRangeTo',\n};\n\nexport const FilterOptions = [\n {\n value: FilterType.rig,\n label: 'Rig',\n },\n {\n value: FilterType.program,\n label: 'Program/BU',\n },\n {\n value: FilterType.basin,\n label: 'Basin',\n },\n {\n value: FilterType.county,\n label: 'County',\n },\n {\n value: FilterType.area,\n label: 'Area',\n },\n {\n value: FilterType.formation,\n label: 'Target Formation',\n },\n {\n value: FilterType.stringDesign,\n label: 'String Design',\n },\n];\n\nexport const WellStatus = {\n unknown: 'unknown',\n idle: 'idle',\n active: 'active',\n paused: 'paused',\n complete: 'complete',\n};\n\nexport const StatusOptions = [\n { value: WellStatus.unknown, color: '#9E9E9E' },\n { value: WellStatus.idle, color: '#BDBDBD' },\n { value: WellStatus.active, color: '#95F126' },\n { value: WellStatus.paused, color: '#FFF350' },\n { value: WellStatus.complete, color: '#2196F3' },\n];\n\nexport const ColumnType = {\n name: 'name',\n status: 'status',\n rig: 'rigName',\n distance: 'distance',\n taScore: 'TA',\n lastActive: 'lastActive',\n metrics: 'metrics',\n wellSection: 'wellSection',\n};\n\nexport const TableColumns = [\n {\n type: ColumnType.name,\n label: 'Well Name',\n key: ColumnType.name,\n width: [280, 197, 197, 186],\n },\n {\n type: ColumnType.status,\n label: '',\n key: ColumnType.status,\n width: [40, 40, 40, 30],\n },\n {\n type: ColumnType.rig,\n label: 'Rig',\n key: ColumnType.rig,\n width: [220, 140, 140, 93],\n },\n {\n type: ColumnType.distance,\n label: 'Distance',\n key: ColumnType.distance,\n width: [160, 160, 122, 93],\n },\n {\n type: ColumnType.taScore,\n label: 'TA',\n key: ColumnType.taScore,\n width: [90, 90, 75, 70],\n },\n {\n type: ColumnType.lastActive,\n label: 'Last Active',\n key: ColumnType.lastActive,\n width: [140, 140, 108, 98],\n },\n {\n type: ColumnType.metrics,\n label: '',\n key: '',\n width: [0, 212, 141, 141],\n },\n {\n type: ColumnType.wellSection,\n label: 'Well Section',\n key: ColumnType.wellSection,\n width: [180, 131, 131, 97],\n },\n];\n\nexport const OBJECTIVE_PERIOD_LIST = [\n { value: 'all', label: 'All' },\n { value: 'last12h', label: 'Last 12 hrs' },\n { value: 'last24h', label: 'Last 24 hrs' },\n { value: 'last7d', label: 'Last 7 days' },\n { value: 'lastMonth', label: 'Last Month' },\n { value: 'custom', label: 'Custom' },\n];\n\nexport const MAX_METRICS_COUNT = 3;\n\nexport const METRICS_LIST = sortBy(\n [\n metrics.weight_to_weight_average,\n metrics.bottom_to_slips_average,\n metrics.drilling_connection_average,\n metrics.slips_to_bottom_average,\n metrics.hole_depth,\n metrics.hole_depth_change,\n metrics.drilled_feet_rotary,\n metrics.drilled_feet_slide,\n metrics.rop_gross,\n metrics.rop,\n metrics.rop_rotary,\n metrics.rop_slide,\n metrics.drilled_feet_rotary_percentage,\n metrics.drilled_feet_slide_percentage,\n metrics.on_bottom_percentage,\n metrics.on_bottom_time,\n metrics.cost_per_ft,\n metrics.cost_per_lat_ft,\n metrics.feet_per_day,\n metrics.tripping_in_speed_cased,\n metrics.tripping_in_speed_open,\n metrics.tripping_in_speed,\n metrics.tripping_out_speed_cased,\n metrics.tripping_out_speed_open,\n metrics.tripping_out_speed,\n metrics.target_formation,\n metrics.mud_type,\n metrics.total_time,\n ...(process.env.REACT_APP_ENVIRONMENT !== 'production'\n ? [\n metrics.npt,\n metrics.circulating_time,\n metrics.spud_to_rig_release_time,\n metrics.spud_to_total_depth_time,\n ]\n : []),\n ],\n 'label'\n);\n\nexport const DEFAULT_SETTINGS = {\n radius: 0,\n filters: {},\n sortInfo: {\n key: 'name',\n direction: 1,\n },\n};\n\nexport const WellSectionColors = [\n '#6EACFF',\n '#69B919',\n '#E95DAF',\n '#A77DFF',\n '#77FFC1',\n '#018EFE',\n '#FF5D7E',\n '#B9E310',\n '#FFD111',\n '#24BB8E',\n '#C426F3',\n];\n\nexport const TOP_GRADIENT_MAP = {\n [ViewType.small]: 0,\n [ViewType.mobile]: 52,\n [ViewType.none]: 48,\n [ViewType.tablet]: 48,\n [ViewType.normal]: 48,\n};\n\nexport const DEFAULT_METRICS_KEY = 'hole_depth_change';\n\nexport const RESYNC_TASK_RESPONSE = {\n SUCCESS: 'succeeded',\n FAILURE: 'failed',\n};\n\nexport const RESYNC_STATUS = {\n INITIAL: 0,\n TRIGGERED: 1,\n RUNNING: 2,\n SUCCEEDED: 3,\n FAILED: -1,\n};\n"],"names":["SMALL_SCREEN_HEIGHT","SMALL_SCREEN_WIDTH","ViewType","none","normal","small","tablet","mobile","MAX_OFFSET_SIZE","DEFAULT_BIC_OFFSET_SIZE","DEFAULT_LOCAL_OFFSET_SIZE","ANDROID_DEVICE","IOS_DEVICE","WINDOWS_PHONE","OTHER_DEVICE","ALL_SECTION_KEY","ALL_SECTION_LABEL","EXPANDED_WELL_NAME_WIDTH","ROWS_PER_PAGE","LEAVE_TOUCH_DELAY","COMPANY_PROVIDERS_FOR_IDAS","SEARCH_CELL_DEFAULT_WIDTH","SEARCH_CELL_EXPAND_WIDTH","metrics","metricsUtils","NonConvertableMetrics","mud_type","key","FilterType","status","rig","program","basin","county","area","formation","stringDesign","radius","period","sideTracks","timeRangeFrom","timeRangeTo","FilterOptions","value","label","WellStatus","unknown","idle","active","paused","complete","StatusOptions","color","ColumnType","name","distance","taScore","lastActive","wellSection","TableColumns","type","width","OBJECTIVE_PERIOD_LIST","MAX_METRICS_COUNT","METRICS_LIST","sortBy","weight_to_weight_average","bottom_to_slips_average","drilling_connection_average","slips_to_bottom_average","hole_depth","hole_depth_change","drilled_feet_rotary","drilled_feet_slide","rop_gross","rop","rop_rotary","rop_slide","drilled_feet_rotary_percentage","drilled_feet_slide_percentage","on_bottom_percentage","on_bottom_time","cost_per_ft","cost_per_lat_ft","feet_per_day","tripping_in_speed_cased","tripping_in_speed_open","tripping_in_speed","tripping_out_speed_cased","tripping_out_speed_open","tripping_out_speed","target_formation","total_time","process","env","REACT_APP_ENVIRONMENT","npt","circulating_time","spud_to_rig_release_time","spud_to_total_depth_time","WellSectionColors","TOP_GRADIENT_MAP","_defineProperty","_TOP_GRADIENT_MAP","DEFAULT_METRICS_KEY","RESYNC_TASK_RESPONSE","SUCCESS","FAILURE","RESYNC_STATUS","INITIAL","TRIGGERED","RUNNING","SUCCEEDED","FAILED"],"mappings":"uOAIaA,EAAsB,IACtBC,EAAqB,IACrBC,EAAW,CACtBC,KAAM,OACNC,OAAQ,SACRC,MAAO,eACPC,OAAQ,SACRC,OAAQ,UAEGC,EAAkB,IAClBC,EAA0B,GAC1BC,EAA4B,GAE5BC,EAAiB,UACjBC,EAAa,MACbC,EAAgB,eAChBC,EAAe,QAEfC,EAAkB,MAClBC,EAAoB,MACpBC,EAA2B,IAC3BC,EAAgB,GAEhBC,EAAoB,IACpBC,EAA6B,CAAC,OAC9BC,EAA4B,KAC5BC,EAA2B,KAClCC,EAAUC,EAEHC,EAAwB,CAACF,EAAQG,SAASC,KAE1CC,EAAa,CACxBC,OAAQ,SACRC,IAAK,UACLC,QAAS,cACTC,MAAO,QACPC,OAAQ,SACRC,KAAM,OACNC,UAAW,YACXC,aAAc,eACdC,OAAQ,SACRC,OAAQ,SACRC,WAAY,aACZC,cAAe,gBACfC,YAAa,eAGFC,EAAgB,CAC3B,CACEC,MAAOf,EAAWE,IAClBc,MAA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A,EAASC,KAAO,IAChBD,EAAAA,EAAAA,EAASI,OAAS,IAAEgG,EAAAC,EACpBrG,EAASE,OAAS,IACpBmG,GAEYC,EAAsB,oBAEtBC,EAAuB,CAClCC,QAAS,YACTC,QAAS,UAGEC,EAAgB,CAC3BC,QAAS,EACTC,UAAW,EACXC,QAAS,EACTC,UAAW,EACXC,QAAS"}
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../src/components/OffsetWellPickerV4/constants.js"],"sourcesContent":["import { sortBy } from 'lodash';\n\nimport { metricsUtils } from '~/utils';\n\nexport const SMALL_SCREEN_HEIGHT = 800;\nexport const SMALL_SCREEN_WIDTH = 650;\nexport const ViewType = {\n none: 'none',\n normal: 'normal',\n small: 'small screen',\n tablet: 'tablet',\n mobile: 'mobile',\n};\nexport const MAX_OFFSET_SIZE = 1000;\nexport const DEFAULT_BIC_OFFSET_SIZE = 50;\nexport const DEFAULT_LOCAL_OFFSET_SIZE = 50;\n\nexport const ANDROID_DEVICE = 'Android';\nexport const IOS_DEVICE = 'iOS';\nexport const WINDOWS_PHONE = 'Window Phone';\nexport const OTHER_DEVICE = 'other';\n\nexport const ALL_SECTION_KEY = 'all';\nexport const ALL_SECTION_LABEL = 'All';\nexport const EXPANDED_WELL_NAME_WIDTH = 450;\nexport const ROWS_PER_PAGE = 50;\nexport const ROW_HEIGHT = 60;\nexport const LEAVE_TOUCH_DELAY = 10000;\nexport const COMPANY_PROVIDERS_FOR_IDAS = ['xto'];\nexport const SEARCH_CELL_DEFAULT_WIDTH = 1020;\nexport const SEARCH_CELL_EXPAND_WIDTH = 1270;\nconst metrics = metricsUtils.default;\n\nexport const NonConvertableMetrics = [metrics.mud_type.key];\n\nexport const FilterType = {\n status: 'status',\n company: 'companyId',\n rig: 'rigName',\n program: 'programName',\n basin: 'basin',\n county: 'county',\n area: 'area',\n formation: 'formation',\n stringDesign: 'stringDesign',\n radius: 'radius',\n period: 'period',\n sideTracks: 'sideTracks',\n timeRangeFrom: 'timeRangeFrom',\n timeRangeTo: 'timeRangeTo',\n};\n\nexport const FilterOptions = [\n {\n value: FilterType.company,\n label: 'Company',\n },\n {\n value: FilterType.rig,\n label: 'Rig',\n },\n {\n value: FilterType.program,\n label: 'Program/BU',\n },\n {\n value: FilterType.basin,\n label: 'Basin',\n },\n {\n value: FilterType.county,\n label: 'County',\n },\n {\n value: FilterType.area,\n label: 'Area',\n },\n {\n value: FilterType.formation,\n label: 'Target Formation',\n },\n {\n value: FilterType.stringDesign,\n label: 'String Design',\n },\n];\n\nexport const WellStatus = {\n unknown: 'unknown',\n idle: 'idle',\n active: 'active',\n paused: 'paused',\n complete: 'complete',\n};\n\nexport const StatusOptions = [\n { value: WellStatus.unknown, color: '#9E9E9E' },\n { value: WellStatus.idle, color: '#BDBDBD' },\n { value: WellStatus.active, color: '#95F126' },\n { value: WellStatus.paused, color: '#FFF350' },\n { value: WellStatus.complete, color: '#2196F3' },\n];\n\nexport const ColumnType = {\n name: 'name',\n status: 'status',\n company: 'companyName',\n rig: 'rigName',\n distance: 'distance',\n taScore: 'TA',\n lastActive: 'lastActive',\n metrics: 'metrics',\n wellSection: 'wellSection',\n};\n\nexport const TableColumns = [\n {\n type: ColumnType.name,\n label: 'Well Name',\n key: ColumnType.name,\n width: [280, 197, 197, 186],\n },\n {\n type: ColumnType.status,\n label: '',\n key: ColumnType.status,\n width: [40, 40, 40, 30],\n },\n {\n type: ColumnType.company,\n label: 'Company',\n key: ColumnType.company,\n width: [180, 140, 140, 93],\n },\n {\n type: ColumnType.rig,\n label: 'Rig',\n key: ColumnType.rig,\n width: [220, 140, 140, 93],\n },\n {\n type: ColumnType.distance,\n label: 'Distance',\n key: ColumnType.distance,\n width: [160, 160, 122, 93],\n },\n {\n type: ColumnType.taScore,\n label: 'TA',\n key: ColumnType.taScore,\n width: [90, 90, 75, 70],\n },\n {\n type: ColumnType.lastActive,\n label: 'Last Active',\n key: ColumnType.lastActive,\n width: [140, 140, 108, 98],\n },\n {\n type: ColumnType.metrics,\n label: '',\n key: '',\n width: [0, 212, 141, 141],\n },\n {\n type: ColumnType.wellSection,\n label: 'Well Section',\n key: ColumnType.wellSection,\n width: [180, 131, 131, 97],\n },\n];\n\nexport const OBJECTIVE_PERIOD_LIST = [\n { value: 'all', label: 'All' },\n { value: 'last12h', label: 'Last 12 hrs' },\n { value: 'last24h', label: 'Last 24 hrs' },\n { value: 'last7d', label: 'Last 7 days' },\n { value: 'lastMonth', label: 'Last Month' },\n { value: 'custom', label: 'Custom' },\n];\n\nexport const MAX_METRICS_COUNT = 3;\n\nexport const METRICS_LIST = sortBy(\n [\n metrics.weight_to_weight_average,\n metrics.bottom_to_slips_average,\n metrics.drilling_connection_average,\n metrics.slips_to_bottom_average,\n metrics.hole_depth,\n metrics.hole_depth_change,\n metrics.drilled_feet_rotary,\n metrics.drilled_feet_slide,\n metrics.rop_gross,\n metrics.rop,\n metrics.rop_rotary,\n metrics.rop_slide,\n metrics.drilled_feet_rotary_percentage,\n metrics.drilled_feet_slide_percentage,\n metrics.on_bottom_percentage,\n metrics.on_bottom_time,\n metrics.cost_per_ft,\n metrics.cost_per_lat_ft,\n metrics.feet_per_day,\n metrics.tripping_in_speed_cased,\n metrics.tripping_in_speed_open,\n metrics.tripping_in_speed,\n metrics.tripping_out_speed_cased,\n metrics.tripping_out_speed_open,\n metrics.tripping_out_speed,\n metrics.target_formation,\n metrics.mud_type,\n metrics.total_time,\n ...(process.env.REACT_APP_ENVIRONMENT !== 'production'\n ? [\n metrics.npt,\n metrics.circulating_time,\n metrics.spud_to_rig_release_time,\n metrics.spud_to_total_depth_time,\n ]\n : []),\n ],\n 'label'\n);\n\nexport const DEFAULT_SETTINGS = {\n radius: 0,\n filters: {},\n sortInfo: {\n key: 'name',\n direction: 1,\n },\n};\n\nexport const WellSectionColors = [\n '#6EACFF',\n '#69B919',\n '#E95DAF',\n '#A77DFF',\n '#77FFC1',\n '#018EFE',\n '#FF5D7E',\n '#B9E310',\n '#FFD111',\n '#24BB8E',\n '#C426F3',\n];\n\nexport const TOP_GRADIENT_MAP = {\n [ViewType.small]: 0,\n [ViewType.mobile]: 52,\n [ViewType.none]: 48,\n [ViewType.tablet]: 48,\n [ViewType.normal]: 48,\n};\n\nexport const DEFAULT_METRICS_KEY = 'hole_depth_change';\n\nexport const RESYNC_TASK_RESPONSE = {\n SUCCESS: 'succeeded',\n FAILURE: 'failed',\n};\n\nexport const RESYNC_STATUS = {\n INITIAL: 0,\n TRIGGERED: 1,\n RUNNING: 2,\n SUCCEEDED: 3,\n FAILED: -1,\n};\n"],"names":["SMALL_SCREEN_HEIGHT","SMALL_SCREEN_WIDTH","ViewType","none","normal","small","tablet","mobile","MAX_OFFSET_SIZE","DEFAULT_BIC_OFFSET_SIZE","DEFAULT_LOCAL_OFFSET_SIZE","ANDROID_DEVICE","IOS_DEVICE","WINDOWS_PHONE","OTHER_DEVICE","ALL_SECTION_KEY","ALL_SECTION_LABEL","EXPANDED_WELL_NAME_WIDTH","ROWS_PER_PAGE","LEAVE_TOUCH_DELAY","COMPANY_PROVIDERS_FOR_IDAS","SEARCH_CELL_DEFAULT_WIDTH","SEARCH_CELL_EXPAND_WIDTH","metrics","metricsUtils","NonConvertableMetrics","mud_type","key","FilterType","status","company","rig","program","basin","county","area","formation","stringDesign","radius","period","sideTracks","timeRangeFrom","timeRangeTo","FilterOptions","value","label","WellStatus","unknown","idle","active","paused","complete","StatusOptions","color","ColumnType","name","distance","taScore","lastActive","wellSection","TableColumns","type","width","OBJECTIVE_PERIOD_LIST","MAX_METRICS_COUNT","METRICS_LIST","sortBy","weight_to_weight_average","bottom_to_slips_average","drilling_connection_average","slips_to_bottom_average","hole_depth","hole_depth_change","drilled_feet_rotary","drilled_feet_slide","rop_gross","rop","rop_rotary","rop_slide","drilled_feet_rotary_percentage","drilled_feet_slide_percentage","on_bottom_percentage","on_bottom_time","cost_per_ft","cost_per_lat_ft","feet_per_day","tripping_in_speed_cased","tripping_in_speed_open","tripping_in_speed","tripping_out_speed_cased","tripping_out_speed_open","tripping_out_speed","target_formation","total_time","process","env","REACT_APP_ENVIRONMENT","npt","circulating_time","spud_to_rig_release_time","spud_to_total_depth_time","WellSectionColors","TOP_GRADIENT_MAP","_defineProperty","_TOP_GRADIENT_MAP","DEFAULT_METRICS_KEY","RESYNC_TASK_RESPONSE","SUCCESS","FAILURE","RESYNC_STATUS","INITIAL","TRIGGERED","RUNNING","SUCCEEDED","FAILED"],"mappings":"uOAIaA,EAAsB,IACtBC,EAAqB,IACrBC,EAAW,CACtBC,KAAM,OACNC,OAAQ,SACRC,MAAO,eACPC,OAAQ,SACRC,OAAQ,UAEGC,EAAkB,IAClBC,EAA0B,GAC1BC,EAA4B,GAE5BC,EAAiB,UACjBC,EAAa,MACbC,EAAgB,eAChBC,EAAe,QAEfC,EAAkB,MAClBC,EAAoB,MACpBC,EAA2B,IAC3BC,EAAgB,GAEhBC,EAAoB,IACpBC,EAA6B,CAAC,OAC9BC,EAA4B,KAC5BC,EAA2B,KAClCC,EAAUC,EAEHC,EAAwB,CAACF,EAAQG,SAASC,KAE1CC,EAAa,CACxBC,OAAQ,SACRC,QAAS,YACTC,IAAK,UACLC,QAAS,cACTC,MAAO,QACPC,OAAQ,SACRC,KAAM,OACNC,UAAW,YACXC,aAAc,eACdC,OAAQ,SACRC,OAAQ,SACRC,WAAY,aACZC,cAAe,gBACfC,YAAa,eAGFC,EAAgB,CAC3B,CACEC,MAAOhB,EAAWE,QAClBe,MAAO,WAET,CACED,MAAOhB,EAAWG,IAClBc,MAAO,OAET,CACED,MAAOhB,EAAWI,QAClBa,MAAO,cAET,CACED,MAAOhB,EAAWK,MAClBY,MAAO,SAET,CACED,MAAOhB,EAAWM,OAClBW,MAAO,UAET,CACED,MAAOhB,EAAWO,KAClBU,MAAO,QAET,CACED,MAAOhB,EAAWQ,UAClBS,MAAO,oBAET,CACED,MAAOhB,EAAWS,aAClBQ,MAAO,kBAIEC,EAAa,CACxBC,QAAS,UACTC,KAAM,OACNC,OAAQ,SACRC,OAAQ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,EACTC,UAAW,EACXC,QAAS,EACTC,UAAW,EACXC,QAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCompanies.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useCompanies.js"],"names":[],"mappings":"AAMA;;;;;EAgBC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import r from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/slicedToArray";import i from"@babel/runtime/regenerator";import{useState as s,useEffect as n}from"react";import{fetchCompanies as o}from"../utils/apiCalls.js";import t from"../../../permissions/usePermissions.js";import{PERMISSIONS as m}from"../../../permissions/constants/index.js";import"../../../permissions/withPermissionsHOC.js";import"@babel/runtime/helpers/defineProperty";import"../../../clients/jsonApi/index.js";import"../../../permissions/ProvidePermissions.js";import"../../../permissions/PermissionsContext.js";function p(p){var a=p.open,c=s([]),u=e(c,2),l=u[0],f=u[1],b=t([m.companySelectorView]),h=e(b,1)[0].active;return n((function(){function e(){return(e=r(i.mark((function r(){var e;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,o();case 2:e=r.sent,f(e);case 4:case"end":return r.stop()}}),r)})))).apply(this,arguments)}h&&a&&0===l.length&&function(){e.apply(this,arguments)}()}),[h,a]),{canViewCompanies:h,companies:l}}export{p as useCompanies};
|
|
2
|
+
//# sourceMappingURL=useCompanies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCompanies.js","sources":["../../../../src/components/OffsetWellPickerV4/effects/useCompanies.js"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { fetchCompanies } from '../utils/apiCalls';\n\nimport { PERMISSIONS, usePermissions } from '~/permissions';\n\nexport function useCompanies({ open }) {\n const [companies, setCompanies] = useState([]);\n const [{ active: canViewCompanies }] = usePermissions([PERMISSIONS.companySelectorView]);\n\n useEffect(() => {\n async function handleFetchCompanies() {\n const data = await fetchCompanies();\n setCompanies(data);\n }\n\n if (canViewCompanies && open && companies.length === 0) {\n handleFetchCompanies();\n }\n }, [canViewCompanies, open]);\n\n return { canViewCompanies, companies };\n}\n"],"names":["useCompanies","_ref","open","useState","_useState2","_slicedToArray","_useState","companies","setCompanies","_usePermissions","usePermissions","PERMISSIONS","companySelectorView","canViewCompanies","active","useEffect","_handleFetchCompanies","_asyncToGenerator","_regeneratorRuntime","mark","_callee","data","wrap","_context","prev","next","fetchCompanies","sent","stop","apply","this","arguments","length","handleFetchCompanies"],"mappings":"wmBAMO,SAASA,EAAuBC,GAAA,IAARC,IAAAA,KACKC,EAAAA,EAAS,IAAGC,EAAAC,EAAAC,EAAA,GAAvCC,EAASH,EAAA,GAAEI,EAAYJ,EAAA,GAC9BK,EAAuCC,EAAe,CAACC,EAAYC,sBAAlDC,EAAuER,EAAAI,EAAA,MAA/EK,OAaT,OAXAC,GAAU,WAC2B,SAAAC,IAGlC,OAHkCA,EAAnCC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAA,OAAAH,EAAAI,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAE,KAAA,EACqBC,IAAgB,KAAA,EAA7BL,EAAIE,EAAAI,KACVnB,EAAaa,GAAM,KAAA,EAAA,IAAA,MAAA,OAAAE,EAAAK,OAAA,GAAAR,EACpB,MAAAS,MAAAC,KAAAC,UAAA,CAEGlB,GAAoBX,GAA6B,IAArBK,EAAUyB,QAN5B,WACqBhB,EAAAa,MAAAC,KAAAC,UAAA,CAMjCE,EAEJ,GAAG,CAACpB,EAAkBX,IAEf,CAAEW,iBAAAA,EAAkBN,UAAAA,EAC7B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Well } from '~/types';
|
|
2
|
-
export declare function useFetchWells(
|
|
2
|
+
export declare function useFetchWells(companyIds?: number | number[] | null, addWellsUsabilityInfo?: (wells: Well[]) => Promise<Well[]> | Well[]): (boolean | Well[])[];
|
|
3
3
|
//# sourceMappingURL=useFetchWells.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFetchWells.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAY/B,wBAAgB,aAAa,CAC3B,
|
|
1
|
+
{"version":3,"file":"useFetchWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFetchWells.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAY/B,wBAAgB,aAAa,CAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,EACrC,qBAAqB,GAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAa,wBAqE9E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__spreadArray as n}from'./../../../ext-esm/tslib/tslib.es6.js';import{useState as r,useEffect as o}from"react";import{identity as i}from"lodash";import{fetchWells as s}from"../utils/apiCalls.js";function l(l,u){if(void 0===u&&(u=i),"function"!=typeof u)throw new Error("addWellsUsabilityInfo must be a function");var a=r(null),
|
|
1
|
+
import{__awaiter as t,__generator as e,__spreadArray as n}from'./../../../ext-esm/tslib/tslib.es6.js';import{useState as r,useEffect as o}from"react";import{identity as i}from"lodash";import{fetchWells as s}from"../utils/apiCalls.js";function l(l,u){if(void 0===u&&(u=i),"function"!=typeof u)throw new Error("addWellsUsabilityInfo must be a function");var a=r(null),f=a[0],c=a[1],m=r(!0),p=m[0],d=m[1],v=Array.isArray(l)?l:"number"==typeof l?[l]:null,w=JSON.stringify(v);return o((function(){var r=!1;return c(null),d(!0),function(){t(this,void 0,void 0,(function(){var o,i,l,a,f=this;return e(this,(function(m){switch(m.label){case 0:return o=sessionStorage.getItem("corva-offset-well-picker-wells"),i=o?JSON.parse(o):void 0,l=Date.now(),i&&i.companyIds===w&&l-i.timestamp<3e5?(c(i.wells),d(!1),[2]):(a=[],[4,s(v,(function(o,i){return t(f,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[2]:[4,u(o)];case 1:return t=e.sent(),a.push.apply(a,t),c((function(e){return e?n(n([],e,!0),t,!0):t})),i&&!r&&(sessionStorage.setItem("corva-offset-well-picker-wells",JSON.stringify({wells:a,timestamp:Date.now(),companyIds:w})),d(!1)),[2]}}))}))}),(function(){return r}))]);case 1:return m.sent(),[2]}}))}))}(),function(){r=!0}}),[w]),[f,p]}export{l as useFetchWells};
|
|
2
2
|
//# sourceMappingURL=useFetchWells.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFilterOptions.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilterOptions.js"],"names":[],"mappings":"AAIA;;;;
|
|
1
|
+
{"version":3,"file":"useFilterOptions.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilterOptions.js"],"names":[],"mappings":"AAIA;;;;IAkCC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/toConsumableArray";import{useMemo as
|
|
1
|
+
import r from"@babel/runtime/helpers/toConsumableArray";import{useMemo as n}from"react";import{FilterOptions as t,FilterType as o}from"../constants.js";function e(e,a){var l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n((function(){return e?(l?t:t.filter((function(r){return r.value!==o.company}))).map((function(n){var t=n.value,l=n.label;if(t===o.company)return{value:t,label:l,options:a||[]};var u=new Set;return e.forEach((function(r){var n=r[t];n&&"Null"!==n&&u.add(n)})),{value:t,label:l,options:r(u).sort().concat(["Null"])}})):[]}),[e,a,l])}export{e as useFilterOptions};
|
|
2
2
|
//# sourceMappingURL=useFilterOptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFilterOptions.js","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilterOptions.js"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { FilterOptions } from '../constants';\n\nexport function useFilterOptions(wells) {\n return useMemo(() => {\n if (!wells) return [];\n\n
|
|
1
|
+
{"version":3,"file":"useFilterOptions.js","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilterOptions.js"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { FilterOptions, FilterType } from '../constants';\n\nexport function useFilterOptions(wells, companies, canViewCompanies = true) {\n return useMemo(() => {\n if (!wells) return [];\n\n const availableFilterOptions = canViewCompanies\n ? FilterOptions\n : FilterOptions.filter(option => option.value !== FilterType.company);\n\n return availableFilterOptions.map(({ value, label }) => {\n // Special handling for company filter - show all companies\n if (value === FilterType.company) {\n return {\n value,\n label,\n options: companies || [],\n };\n }\n\n // For other filters, extract unique values from wells\n const uniqueValues = new Set();\n wells.forEach(well => {\n const wellValue = well[value];\n if (wellValue && wellValue !== 'Null') {\n uniqueValues.add(wellValue);\n }\n });\n\n return {\n value,\n label,\n options: [...uniqueValues].sort().concat(['Null']),\n };\n });\n }, [wells, companies, canViewCompanies]);\n}\n"],"names":["useFilterOptions","wells","companies","canViewCompanies","useMemo","FilterOptions","filter","option","value","FilterType","company","map","_ref","label","options","uniqueValues","Set","forEach","well","wellValue","add","_toConsumableArray","sort","concat"],"mappings":"wJAIO,SAASA,EAAiBC,EAAOC,GAAoC,IAAzBC,6DACjD,OAAOC,GAAQ,WACb,OAAKH,GAE0BE,EAC3BE,EACAA,EAAcC,QAAO,SAAAC,GAAM,OAAIA,EAAOC,QAAUC,EAAWC,YAEjCC,KAAI,SAAsBC,GAAA,IAAnBJ,IAAAA,MAAOK,IAAAA,MAE1C,GAAIL,IAAUC,EAAWC,QACvB,MAAO,CACLF,MAAAA,EACAK,MAAAA,EACAC,QAASZ,GAAa,IAK1B,IAAMa,EAAe,IAAIC,IAQzB,OAPAf,EAAMgB,SAAQ,SAAAC,GACZ,IAAMC,EAAYD,EAAKV,GACnBW,GAA2B,SAAdA,GACfJ,EAAaK,IAAID,EAErB,IAEO,CACLX,MAAAA,EACAK,MAAAA,EACAC,QAASO,EAAIN,GAAcO,OAAOC,OAAO,CAAC,SAE9C,IA9BmB,EA+BpB,GAAE,CAACtB,EAAOC,EAAWC,GACxB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function useTableColumns(metricsKeys: any): any[];
|
|
1
|
+
export function useTableColumns(metricsKeys: any, canViewCompanies?: boolean): any[];
|
|
2
2
|
//# sourceMappingURL=useTableColumns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useTableColumns.js"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"useTableColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useTableColumns.js"],"names":[],"mappings":"AAIA,qFAwBC"}
|