@corva/ui 3.30.0-9 → 3.30.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/cjs-bundle/components/Drillstring/BHAComponentDetail/constants.js +1 -1
  2. package/cjs-bundle/components/Drillstring/BHAComponentDetail/constants.js.map +1 -1
  3. package/cjs-bundle/components/Drillstring/BHAComponentIcon.js +1 -1
  4. package/cjs-bundle/components/Drillstring/BHAComponentIcon.js.map +1 -1
  5. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  6. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  7. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js +1 -1
  8. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js.map +1 -1
  9. package/cjs-bundle/components/Drillstring/BHASchematic.js +1 -1
  10. package/cjs-bundle/components/Drillstring/BHASchematic.js.map +1 -1
  11. package/cjs-bundle/components/Drillstring/BHATileIcon.js +1 -1
  12. package/cjs-bundle/components/Drillstring/BHATileIcon.js.map +1 -1
  13. package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  14. package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js.map +1 -1
  15. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  16. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js.map +1 -1
  17. package/cjs-bundle/components/OffsetWellPickerV4/effects/useGlobalOffsetWellsSync.js +2 -0
  18. package/cjs-bundle/components/OffsetWellPickerV4/effects/useGlobalOffsetWellsSync.js.map +1 -0
  19. package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/useLoadAssets.js +1 -1
  20. package/cjs-bundle/constants/bha.js +1 -1
  21. package/cjs-bundle/constants/bha.js.map +1 -1
  22. package/cjs-bundle/constants/drillstring.js +1 -1
  23. package/cjs-bundle/constants/drillstring.js.map +1 -1
  24. package/cjs-bundle/utils/DrillstringUtils.js +1 -1
  25. package/cjs-bundle/utils/DrillstringUtils.js.map +1 -1
  26. package/cjs-bundle/utils/bha.js +1 -1
  27. package/cjs-bundle/utils/bha.js.map +1 -1
  28. package/cjs-bundle/utils/drillstring/conversion.js +1 -1
  29. package/cjs-bundle/utils/drillstring/conversion.js.map +1 -1
  30. package/cjs-bundle/utils/drillstring/schematic.js +1 -1
  31. package/cjs-bundle/utils/drillstring/schematic.js.map +1 -1
  32. package/cjs-bundle/utils/drillstring/validation.js +1 -1
  33. package/cjs-bundle/utils/drillstring/validation.js.map +1 -1
  34. package/components/Drillstring/BHAComponentDetail/constants.d.ts.map +1 -1
  35. package/components/Drillstring/BHAComponentDetail/constants.js +1 -1
  36. package/components/Drillstring/BHAComponentDetail/constants.js.map +1 -1
  37. package/components/Drillstring/BHAComponentIcon.d.ts.map +1 -1
  38. package/components/Drillstring/BHAComponentIcon.js +1 -1
  39. package/components/Drillstring/BHAComponentIcon.js.map +1 -1
  40. package/components/Drillstring/BHAComponentsTable/components/Component.d.ts.map +1 -1
  41. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  42. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  43. package/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.d.ts.map +1 -1
  44. package/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js +1 -1
  45. package/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js.map +1 -1
  46. package/components/Drillstring/BHASchematic.d.ts.map +1 -1
  47. package/components/Drillstring/BHASchematic.js +1 -1
  48. package/components/Drillstring/BHASchematic.js.map +1 -1
  49. package/components/Drillstring/BHATileIcon.d.ts.map +1 -1
  50. package/components/Drillstring/BHATileIcon.js +1 -1
  51. package/components/Drillstring/BHATileIcon.js.map +1 -1
  52. package/components/OffsetWellPickerV4/OffsetWellPickerV4.d.ts.map +1 -1
  53. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  54. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js.map +1 -1
  55. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  56. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js.map +1 -1
  57. package/components/OffsetWellPickerV4/effects/index.d.ts +1 -0
  58. package/components/OffsetWellPickerV4/effects/useGlobalOffsetWellsSync.d.ts +2 -0
  59. package/components/OffsetWellPickerV4/effects/useGlobalOffsetWellsSync.d.ts.map +1 -0
  60. package/components/OffsetWellPickerV4/effects/useGlobalOffsetWellsSync.js +2 -0
  61. package/components/OffsetWellPickerV4/effects/useGlobalOffsetWellsSync.js.map +1 -0
  62. package/componentsV2/AppHeader/V3/AppHeaderV3.stories.d.ts.map +1 -1
  63. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/useLoadAssets.d.ts.map +1 -1
  64. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/useLoadAssets.js +1 -1
  65. package/constants/bha.d.ts +1 -0
  66. package/constants/bha.d.ts.map +1 -1
  67. package/constants/bha.js +1 -1
  68. package/constants/bha.js.map +1 -1
  69. package/constants/drillstring.d.ts.map +1 -1
  70. package/constants/drillstring.js +1 -1
  71. package/constants/drillstring.js.map +1 -1
  72. package/package.json +2 -2
  73. package/utils/DrillstringUtils.d.ts.map +1 -1
  74. package/utils/DrillstringUtils.js +1 -1
  75. package/utils/DrillstringUtils.js.map +1 -1
  76. package/utils/bha.js +1 -1
  77. package/utils/bha.js.map +1 -1
  78. package/utils/drillstring/conversion.d.ts.map +1 -1
  79. package/utils/drillstring/conversion.js +1 -1
  80. package/utils/drillstring/conversion.js.map +1 -1
  81. package/utils/drillstring/schematic.js +1 -1
  82. package/utils/drillstring/schematic.js.map +1 -1
  83. package/utils/drillstring/validation.d.ts.map +1 -1
  84. package/utils/drillstring/validation.js +1 -1
  85. package/utils/drillstring/validation.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../../../../src/components/Drillstring/BHAComponentsTable/components/Component.js"],"sourcesContent":["import { memo, useEffect, useState } from 'react';\nimport classNames from 'classnames';\nimport { map, isEmpty, omit } from 'lodash';\nimport PropTypes from 'prop-types';\nimport { Grid, Menu, MenuItem } from '@material-ui/core';\n\nimport {\n FormatedNumber,\n ExpandCollapseButton,\n MoreButton,\n StaticField,\n ConfirmationPopup,\n} from './shared';\nimport { useStyles } from './sharedStyles';\nimport { calculateComponent } from './utils/calculation';\nimport { Browser as AgitatorBrowser, Editor as AgitatorEditor } from './Agitator';\nimport { Browser as BitBrowser, Editor as BitEditor } from './Bit';\nimport { Browser as DrillCollarBrowser, Editor as DrillCollarEditor } from './DrillCollar';\nimport { Browser as DrillPipeBrowser, Editor as DrillPipeEditor } from './DrillPipe';\nimport { Browser as JarBrowser, Editor as JarEditor } from './Jar';\nimport { Browser as LwdBrowser, Editor as LwdEditor } from './Lwd';\nimport { Browser as MwdBrowser, Editor as MwdEditor } from './Mwd';\nimport { Browser as PdmBrowser, Editor as PdmEditor } from './Pdm';\nimport { Browser as RssBrowser, Editor as RssEditor } from './Rss';\nimport { Browser as StabilizerBrowser, Editor as StabilizerEditor } from './Stabilizer';\nimport { Browser as SubBrowser, Editor as SubEditor } from './Sub';\nimport { Browser as UrBrowser, Editor as UrEditor } from './Ur';\nimport EditComponentDialog from './EditComponentDialog';\n\nimport { BHAComponentIcon as ComponentIcon } from '~/components';\nimport { COMPONENT_FAMILIES } from '~/constants/drillstring';\nimport { showErrorNotification } from '~/utils';\n\nfunction getComponentName(family) {\n return COMPONENT_FAMILIES.drilling.find(item => item.type === family)?.name || '—';\n}\n\nfunction Component({\n isMobile,\n viewColumnsPerRow,\n editColumnsPerRow,\n component,\n validate,\n isDraft,\n onCancel,\n onDelete,\n onSave,\n onChangeEditing,\n onAutocompleteApplied,\n isDragComponent,\n}) {\n const [actionAnchorEl, setActionAnchorEl] = useState(null);\n const [isOpenSaveConfirm, setIsOpenSaveConfirm] = useState(false);\n const [isOpenDeleteDialog, setIsOpenDeleteDialog] = useState(false);\n const [tempComponent, setTempComponent] = useState(component);\n const [error, setError] = useState(null);\n const [isOpenEditorDialog, setIsOpenEditorDialog] = useState(false);\n\n const classes = useStyles({ isMobile, isEditing: tempComponent.is_editing, isDragComponent });\n\n useEffect(() => {\n if (onChangeEditing) onChangeEditing(tempComponent.is_editing);\n }, [tempComponent.is_editing]);\n\n const handleExpandCollapse = () => {\n setTempComponent(prev => {\n return prev.is_expanded ? { ...prev, is_expanded: false } : { ...prev, is_expanded: true };\n });\n };\n\n const handleOpenActionMenu = e => {\n setActionAnchorEl(e.currentTarget);\n };\n\n const handleCloseActionMenu = () => {\n setActionAnchorEl(null);\n };\n\n const handleEdit = () => {\n setActionAnchorEl(null);\n setTempComponent(prev => ({ ...prev, is_editing: true }));\n };\n\n const handleConfirmDelete = () => {\n setActionAnchorEl(null);\n setIsOpenDeleteDialog(true);\n };\n\n const handleDelete = () => {\n onDelete(component);\n };\n\n const handleCancel = () => {\n setError(null);\n if (isDraft) {\n onCancel();\n return;\n }\n\n setTempComponent(component);\n };\n\n const handleChange = (key, value) => {\n const newComponent = calculateComponent(tempComponent, key, value);\n const result = validate(newComponent, isDraft);\n setTempComponent(newComponent);\n if (result) {\n setError(result.components[tempComponent.id]);\n } else {\n setError(null);\n }\n };\n\n const handleUseSuggestion = suggestion => {\n if (onAutocompleteApplied) {\n onAutocompleteApplied(true);\n }\n setTempComponent(prev => {\n return {\n ...prev,\n ...suggestion,\n };\n });\n };\n\n const handleConfirmSave = () => {\n const result = validate(tempComponent, isDraft);\n if (result) {\n setError(result.components[tempComponent.id]);\n\n // TODO: handle global errors notification\n const globalErros = {\n ...omit(result, ['general', 'components', 'specificErrors']),\n ...result.general,\n };\n if (globalErros && !isEmpty(globalErros)) {\n map(globalErros, msg => {\n showErrorNotification(msg);\n });\n }\n return;\n }\n\n setError(null);\n setIsOpenSaveConfirm(true);\n };\n\n const handleSave = () => {\n setIsOpenSaveConfirm(false);\n setIsOpenEditorDialog(false);\n\n const { is_editing, ...saving } = tempComponent;\n\n setTempComponent(saving);\n\n onSave(omit(saving, ['is_expanded']), isDraft);\n };\n\n const contentCellName = classNames(classes.cell, classes.ratioWidth, {\n [classes.focusedFontsize]: tempComponent.is_editing || tempComponent.is_expanded,\n });\n\n if (tempComponent.is_editing && !isOpenEditorDialog) {\n const { family } = tempComponent;\n\n const componentProps = {\n component: tempComponent,\n isDraft,\n error,\n onChange: handleChange,\n onUseSuggestion: handleUseSuggestion,\n onCancel: handleCancel,\n onSave: isMobile ? handleSave : handleConfirmSave,\n columns: editColumnsPerRow,\n };\n\n if (isMobile) {\n setIsOpenEditorDialog(true);\n } else {\n return (\n <div className={classes.component}>\n {(family === 'dp' || family === 'hwdp') && <DrillPipeEditor {...componentProps} />}\n {family === 'agitator' && <AgitatorEditor {...componentProps} />}\n {family === 'bit' && <BitEditor {...componentProps} />}\n {family === 'dc' && <DrillCollarEditor {...componentProps} />}\n {family === 'jar' && <JarEditor {...componentProps} />}\n {family === 'lwd' && <LwdEditor {...componentProps} />}\n {family === 'mwd' && <MwdEditor {...componentProps} />}\n {family === 'pdm' && <PdmEditor {...componentProps} />}\n {family === 'rss' && <RssEditor {...componentProps} />}\n {family === 'stabilizer' && <StabilizerEditor {...componentProps} />}\n {family === 'sub' && <SubEditor {...componentProps} />}\n {family === 'ur' && <UrEditor {...componentProps} />}\n\n {isOpenSaveConfirm && (\n <ConfirmationPopup\n title=\"Save Changes?\"\n text=\"You will not be able to recover it.\"\n okText=\"Save\"\n handleClose={() => setIsOpenSaveConfirm(false)}\n handleOk={handleSave}\n />\n )}\n </div>\n );\n }\n }\n\n return (\n <div\n className={classNames(classes.component, {\n [classes.componentMobile]: isMobile,\n [classes.componentExpandedMobile]: isMobile && tempComponent.is_expanded,\n [classes.componentActive]: Boolean(actionAnchorEl),\n })}\n >\n <div\n className={classNames(classes.row, {\n [classes.rowExpanded]: isMobile && tempComponent.is_expanded,\n })}\n >\n <div className={classNames(classes.cell, { [classes.componentMobileCell]: isMobile })}>\n <ComponentIcon component={tempComponent} />\n </div>\n <div className={contentCellName}>{getComponentName(tempComponent.family)}</div>\n {!isMobile && (\n <>\n <div className={contentCellName}>\n <FormatedNumber\n value={\n tempComponent.family === 'bit' ? tempComponent.size : tempComponent.outer_diameter\n }\n />\n </div>\n <div className={contentCellName}>\n <FormatedNumber value={tempComponent.inner_diameter} />\n </div>\n <div className={contentCellName}>\n <FormatedNumber value={tempComponent.linear_weight} />\n </div>\n <div className={contentCellName}>\n <FormatedNumber value={tempComponent.length} format=\"0.0\" />\n </div>\n </>\n )}\n <div className={classNames(classes.cell, classes.actionCell)}>\n <ExpandCollapseButton\n isExpanded={tempComponent.is_expanded}\n classes={classes}\n handleExpandCollapse={handleExpandCollapse}\n />\n <MoreButton classes={classes} handleOpenActionMenu={handleOpenActionMenu} />\n </div>\n </div>\n\n {tempComponent.is_expanded && (\n <>\n {isMobile && (\n <Grid container spacing={2} style={{ padding: '8px 4px 16px' }}>\n <StaticField\n label={tempComponent.family === 'bit' ? 'Bit Size' : 'OD'}\n unit=\"shortLength\"\n value={\n tempComponent.family === 'bit' ? tempComponent.size : tempComponent.outer_diameter\n }\n />\n {tempComponent.family !== 'bit' && (\n <StaticField label=\"ID\" unit=\"shortLength\" value={component.inner_diameter} />\n )}\n {tempComponent.family !== 'bit' && (\n <StaticField\n label=\"Linear Weight\"\n unit=\"massPerLength\"\n value={component.linear_weight}\n format=\"0.0\"\n />\n )}\n <StaticField label=\"Length\" unit=\"length\" value={component.length} format=\"0.0\" />\n </Grid>\n )}\n\n {(tempComponent.family === 'dp' || tempComponent.family === 'hwdp') && (\n <DrillPipeBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'agitator' && (\n <AgitatorBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'bit' && (\n <BitBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'dc' && (\n <DrillCollarBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'jar' && (\n <JarBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'lwd' && (\n <LwdBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'mwd' && (\n <MwdBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'pdm' && (\n <PdmBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'rss' && (\n <RssBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'stabilizer' && (\n <StabilizerBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'sub' && (\n <SubBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'ur' && (\n <UrBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n </>\n )}\n\n <Menu\n anchorEl={actionAnchorEl}\n keepMounted\n open={Boolean(actionAnchorEl)}\n getContentAnchorEl={null}\n anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}\n transformOrigin={{ vertical: 'top', horizontal: 'right' }}\n onClose={handleCloseActionMenu}\n >\n <MenuItem onClick={handleEdit} className={classes.menuItem}>\n Edit\n </MenuItem>\n {tempComponent.family !== 'bit' && (\n <MenuItem onClick={handleConfirmDelete} className={classes.menuItem}>\n Delete\n </MenuItem>\n )}\n </Menu>\n\n {isOpenDeleteDialog && (\n <ConfirmationPopup\n title=\"Delete Component?\"\n text=\"You will not be able to recover it.\"\n okText=\"Delete\"\n handleClose={() => setIsOpenDeleteDialog(false)}\n handleOk={handleDelete}\n />\n )}\n\n {isOpenEditorDialog && (\n <EditComponentDialog\n component={tempComponent}\n isDraft={isDraft}\n error={error}\n onChange={handleChange}\n onUseSuggestion={handleUseSuggestion}\n onCancel={handleCancel}\n onSave={handleConfirmSave}\n onClose={() => {\n handleCancel();\n setIsOpenEditorDialog(false);\n }}\n />\n )}\n\n {isMobile && isOpenSaveConfirm && (\n <ConfirmationPopup\n title=\"Save Changes?\"\n text=\"You will not be able to recover it.\"\n okText=\"Save\"\n handleClose={() => setIsOpenSaveConfirm(false)}\n handleOk={handleSave}\n />\n )}\n </div>\n );\n}\n\nComponent.propTypes = {\n isMobile: PropTypes.bool.isRequired,\n component: PropTypes.shape({\n family: PropTypes.string,\n size: PropTypes.number,\n outer_diameter: PropTypes.number,\n inner_diameter: PropTypes.number,\n linear_weight: PropTypes.number,\n length: PropTypes.number,\n }).isRequired,\n isDraft: PropTypes.bool,\n validate: PropTypes.func.isRequired,\n onCancel: PropTypes.func,\n onDelete: PropTypes.func,\n onSave: PropTypes.func.isRequired,\n onChangeEditing: PropTypes.func,\n viewColumnsPerRow: PropTypes.number.isRequired,\n editColumnsPerRow: PropTypes.number.isRequired,\n onAutocompleteApplied: PropTypes.func,\n isDragComponent: PropTypes.bool.isRequired,\n};\n\nComponent.defaultProps = {\n isDraft: false,\n onCancel: null,\n onDelete: null,\n onChangeEditing: undefined,\n onAutocompleteApplied: undefined,\n};\n\nexport default memo(Component);\n"],"names":["getComponentName","family","_COMPONENT_FAMILIES$d","COMPONENT_FAMILIES","drilling","find","item","type","name","Component","_ref","_classNames2","isMobile","viewColumnsPerRow","editColumnsPerRow","component","validate","isDraft","onCancel","onDelete","onSave","onChangeEditing","onAutocompleteApplied","isDragComponent","useState","_useState2","_slicedToArray","_useState","actionAnchorEl","setActionAnchorEl","_useState4","_useState3","isOpenSaveConfirm","setIsOpenSaveConfirm","_useState6","_useState5","isOpenDeleteDialog","setIsOpenDeleteDialog","_useState8","_useState7","tempComponent","setTempComponent","_useState10","_useState9","error","setError","_useState12","_useState11","isOpenEditorDialog","setIsOpenEditorDialog","classes","useStyles","isEditing","is_editing","useEffect","handleCancel","handleChange","key","value","newComponent","calculateComponent","result","components","id","handleUseSuggestion","suggestion","prev","handleConfirmSave","globalErros","omit","general","isEmpty","map","msg","showErrorNotification","handleSave","saving","_excluded","contentCellName","classNames","cell","ratioWidth","focusedFontsize","is_expanded","componentProps","onChange","onUseSuggestion","columns","_jsxs","className","children","_jsx","jsx","DrillPipeEditor","_objectSpread","AgitatorEditor","BitEditor","DrillCollarEditor","JarEditor","LwdEditor","MwdEditor","PdmEditor","RssEditor","StabilizerEditor","SubEditor","UrEditor","ConfirmationPopup","title","text","okText","handleClose","handleOk","componentMobile","componentExpandedMobile","componentActive","Boolean","jsxs","row","rowExpanded","componentMobileCell","ComponentIcon","_Fragment","FormatedNumber","size","outer_diameter","inner_diameter","linear_weight","length","format","actionCell","ExpandCollapseButton","isExpanded","handleExpandCollapse","MoreButton","handleOpenActionMenu","e","currentTarget","Grid","container","spacing","style","padding","StaticField","label","unit","DrillPipeBrowser","AgitatorBrowser","BitBrowser","DrillCollarBrowser","JarBrowser","LwdBrowser","MwdBrowser","PdmBrowser","RssBrowser","StabilizerBrowser","SubBrowser","UrBrowser","Menu","anchorEl","keepMounted","open","getContentAnchorEl","anchorOrigin","vertical","horizontal","transformOrigin","onClose","MenuItem","onClick","menuItem","EditComponentDialog","propTypes","PropTypes","bool","isRequired","shape","string","number","func","defaultProps","undefined","memo"],"mappings":"g41BAiCA,SAASA,EAAiBC,GAAQ,IAAAC,EAChC,OAAO,QAAAA,EAAAC,EAAAA,mBAAmBC,SAASC,MAAK,SAAAC,GAAI,OAAIA,EAAKC,OAASN,CAAM,WAA7D,IAAAC,OAAA,EAAAA,EAAgEM,OAAQ,GACjF,CAEA,SAASC,GAaNC,GAAA,IAAAC,EAZDC,IAAAA,SACAC,IAAAA,kBACAC,IAAAA,kBACAC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,SACAC,KAAAA,SACAC,KAAAA,OAC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EAAO,EAC/C8E,SAAUpC,OAKpB,CAEAlE,GAAUkK,UAAY,CACpB/J,SAAUgK,EAAAA,QAAUC,KAAKC,WACzB/J,UAAW6J,EAAS,QAACG,MAAM,CACzB9K,OAAQ2K,EAAS,QAACI,OAClBrD,KAAMiD,EAAS,QAACK,OAChBrD,eAAgBgD,EAAS,QAACK,OAC1BpD,eAAgB+C,EAAS,QAACK,OAC1BnD,cAAe8C,EAAS,QAACK,OACzBlD,OAAQ6C,EAAS,QAACK,SACjBH,WACH7J,QAAS2J,EAAS,QAACC,KACnB7J,SAAU4J,EAAAA,QAAUM,KAAKJ,WACzB5J,SAAU0J,EAAS,QAACM,KACpB/J,SAAUyJ,EAAS,QAACM,KACpB9J,OAAQwJ,EAAAA,QAAUM,KAAKJ,WACvBzJ,gBAAiBuJ,EAAS,QAACM,KAC3BrK,kBAAmB+J,EAAAA,QAAUK,OAAOH,WACpChK,kBAAmB8J,EAAAA,QAAUK,OAAOH,WACpCxJ,sBAAuBsJ,EAAS,QAACM,KACjC3J,gBAAiBqJ,EAAAA,QAAUC,KAAKC,YAGlCrK,GAAU0K,aAAe,CACvBlK,SAAS,EACTC,SAAU,KACVC,SAAU,KACVE,qBAAiB+J,EACjB9J,2BAAuB8J,GAGzB,IAAeC,GAAAA,EAAAA,KAAK5K"}
1
+ {"version":3,"file":"Component.js","sources":["../../../../../../src/components/Drillstring/BHAComponentsTable/components/Component.js"],"sourcesContent":["import { memo, useEffect, useState } from 'react';\nimport classNames from 'classnames';\nimport { map, isEmpty, omit } from 'lodash';\nimport PropTypes from 'prop-types';\nimport { Grid, Menu, MenuItem } from '@material-ui/core';\n\nimport {\n FormatedNumber,\n ExpandCollapseButton,\n MoreButton,\n StaticField,\n ConfirmationPopup,\n} from './shared';\nimport { useStyles } from './sharedStyles';\nimport { calculateComponent } from './utils/calculation';\nimport { Browser as AgitatorBrowser, Editor as AgitatorEditor } from './Agitator';\nimport { Browser as BitBrowser, Editor as BitEditor } from './Bit';\nimport { Browser as DrillCollarBrowser, Editor as DrillCollarEditor } from './DrillCollar';\nimport { Browser as DrillPipeBrowser, Editor as DrillPipeEditor } from './DrillPipe';\nimport { Browser as JarBrowser, Editor as JarEditor } from './Jar';\nimport { Browser as LwdBrowser, Editor as LwdEditor } from './Lwd';\nimport { Browser as MwdBrowser, Editor as MwdEditor } from './Mwd';\nimport { Browser as PdmBrowser, Editor as PdmEditor } from './Pdm';\nimport { Browser as RssBrowser, Editor as RssEditor } from './Rss';\nimport { Browser as StabilizerBrowser, Editor as StabilizerEditor } from './Stabilizer';\nimport { Browser as SubBrowser, Editor as SubEditor } from './Sub';\nimport { Browser as UrBrowser, Editor as UrEditor } from './Ur';\nimport EditComponentDialog from './EditComponentDialog';\n\nimport { BHAComponentIcon as ComponentIcon } from '~/components';\nimport { COMPONENT_FAMILIES } from '~/constants/drillstring';\nimport { showErrorNotification } from '~/utils';\n\nfunction getComponentName(family) {\n return COMPONENT_FAMILIES.drilling.find(item => item.type === family)?.name || '—';\n}\n\nfunction Component({\n isMobile,\n viewColumnsPerRow,\n editColumnsPerRow,\n component,\n validate,\n isDraft,\n onCancel,\n onDelete,\n onSave,\n onChangeEditing,\n onAutocompleteApplied,\n isDragComponent,\n}) {\n const [actionAnchorEl, setActionAnchorEl] = useState(null);\n const [isOpenSaveConfirm, setIsOpenSaveConfirm] = useState(false);\n const [isOpenDeleteDialog, setIsOpenDeleteDialog] = useState(false);\n const [tempComponent, setTempComponent] = useState(component);\n const [error, setError] = useState(null);\n const [isOpenEditorDialog, setIsOpenEditorDialog] = useState(false);\n\n const classes = useStyles({ isMobile, isEditing: tempComponent.is_editing, isDragComponent });\n\n useEffect(() => {\n if (onChangeEditing) onChangeEditing(tempComponent.is_editing);\n }, [tempComponent.is_editing]);\n\n const handleExpandCollapse = () => {\n setTempComponent(prev => {\n return prev.is_expanded ? { ...prev, is_expanded: false } : { ...prev, is_expanded: true };\n });\n };\n\n const handleOpenActionMenu = e => {\n setActionAnchorEl(e.currentTarget);\n };\n\n const handleCloseActionMenu = () => {\n setActionAnchorEl(null);\n };\n\n const handleEdit = () => {\n setActionAnchorEl(null);\n setTempComponent(prev => ({ ...prev, is_editing: true }));\n };\n\n const handleConfirmDelete = () => {\n setActionAnchorEl(null);\n setIsOpenDeleteDialog(true);\n };\n\n const handleDelete = () => {\n onDelete(component);\n };\n\n const handleCancel = () => {\n setError(null);\n if (isDraft) {\n onCancel();\n return;\n }\n\n setTempComponent(component);\n };\n\n const handleChange = (key, value) => {\n const newComponent = calculateComponent(tempComponent, key, value);\n const result = validate(newComponent, isDraft);\n setTempComponent(newComponent);\n if (result) {\n setError(result.components[tempComponent.id]);\n } else {\n setError(null);\n }\n };\n\n const handleUseSuggestion = suggestion => {\n if (onAutocompleteApplied) {\n onAutocompleteApplied(true);\n }\n setTempComponent(prev => {\n return {\n ...prev,\n ...suggestion,\n };\n });\n };\n\n const handleConfirmSave = () => {\n const result = validate(tempComponent, isDraft);\n if (result) {\n setError(result.components[tempComponent.id]);\n\n // TODO: handle global errors notification\n const globalErros = {\n ...omit(result, ['general', 'components', 'specificErrors']),\n ...result.general,\n };\n if (globalErros && !isEmpty(globalErros)) {\n map(globalErros, msg => {\n showErrorNotification(msg);\n });\n }\n return;\n }\n\n setError(null);\n setIsOpenSaveConfirm(true);\n };\n\n const handleSave = () => {\n setIsOpenSaveConfirm(false);\n setIsOpenEditorDialog(false);\n\n const { is_editing, ...saving } = tempComponent;\n\n setTempComponent(saving);\n\n onSave(omit(saving, ['is_expanded']), isDraft);\n };\n\n const contentCellName = classNames(classes.cell, classes.ratioWidth, {\n [classes.focusedFontsize]: tempComponent.is_editing || tempComponent.is_expanded,\n });\n\n if (tempComponent.is_editing && !isOpenEditorDialog) {\n const { family } = tempComponent;\n\n const componentProps = {\n component: tempComponent,\n isDraft,\n error,\n onChange: handleChange,\n onUseSuggestion: handleUseSuggestion,\n onCancel: handleCancel,\n onSave: isMobile ? handleSave : handleConfirmSave,\n columns: editColumnsPerRow,\n };\n\n if (isMobile) {\n setIsOpenEditorDialog(true);\n } else {\n return (\n <div className={classes.component}>\n {(family === 'dp' || family === 'hwdp') && <DrillPipeEditor {...componentProps} />}\n {family === 'agitator' && <AgitatorEditor {...componentProps} />}\n {(family === 'ags' || family === 'stabilizer') && (\n <StabilizerEditor {...componentProps} />\n )}\n {family === 'bit' && <BitEditor {...componentProps} />}\n {family === 'dc' && <DrillCollarEditor {...componentProps} />}\n {family === 'jar' && <JarEditor {...componentProps} />}\n {family === 'lwd' && <LwdEditor {...componentProps} />}\n {family === 'mwd' && <MwdEditor {...componentProps} />}\n {family === 'pdm' && <PdmEditor {...componentProps} />}\n {family === 'rss' && <RssEditor {...componentProps} />}\n {family === 'stabilizer' && <StabilizerEditor {...componentProps} />}\n {family === 'sub' && <SubEditor {...componentProps} />}\n {family === 'ur' && <UrEditor {...componentProps} />}\n\n {isOpenSaveConfirm && (\n <ConfirmationPopup\n title=\"Save Changes?\"\n text=\"You will not be able to recover it.\"\n okText=\"Save\"\n handleClose={() => setIsOpenSaveConfirm(false)}\n handleOk={handleSave}\n />\n )}\n </div>\n );\n }\n }\n\n return (\n <div\n className={classNames(classes.component, {\n [classes.componentMobile]: isMobile,\n [classes.componentExpandedMobile]: isMobile && tempComponent.is_expanded,\n [classes.componentActive]: Boolean(actionAnchorEl),\n })}\n >\n <div\n className={classNames(classes.row, {\n [classes.rowExpanded]: isMobile && tempComponent.is_expanded,\n })}\n >\n <div className={classNames(classes.cell, { [classes.componentMobileCell]: isMobile })}>\n <ComponentIcon component={tempComponent} />\n </div>\n <div className={contentCellName}>{getComponentName(tempComponent.family)}</div>\n {!isMobile && (\n <>\n <div className={contentCellName}>\n <FormatedNumber\n value={\n tempComponent.family === 'bit' ? tempComponent.size : tempComponent.outer_diameter\n }\n />\n </div>\n <div className={contentCellName}>\n <FormatedNumber value={tempComponent.inner_diameter} />\n </div>\n <div className={contentCellName}>\n <FormatedNumber value={tempComponent.linear_weight} />\n </div>\n <div className={contentCellName}>\n <FormatedNumber value={tempComponent.length} format=\"0.0\" />\n </div>\n </>\n )}\n <div className={classNames(classes.cell, classes.actionCell)}>\n <ExpandCollapseButton\n isExpanded={tempComponent.is_expanded}\n classes={classes}\n handleExpandCollapse={handleExpandCollapse}\n />\n <MoreButton classes={classes} handleOpenActionMenu={handleOpenActionMenu} />\n </div>\n </div>\n\n {tempComponent.is_expanded && (\n <>\n {isMobile && (\n <Grid container spacing={2} style={{ padding: '8px 4px 16px' }}>\n <StaticField\n label={tempComponent.family === 'bit' ? 'Bit Size' : 'OD'}\n unit=\"shortLength\"\n value={\n tempComponent.family === 'bit' ? tempComponent.size : tempComponent.outer_diameter\n }\n />\n {tempComponent.family !== 'bit' && (\n <StaticField label=\"ID\" unit=\"shortLength\" value={component.inner_diameter} />\n )}\n {tempComponent.family !== 'bit' && (\n <StaticField\n label=\"Linear Weight\"\n unit=\"massPerLength\"\n value={component.linear_weight}\n format=\"0.0\"\n />\n )}\n <StaticField label=\"Length\" unit=\"length\" value={component.length} format=\"0.0\" />\n </Grid>\n )}\n\n {(tempComponent.family === 'dp' || tempComponent.family === 'hwdp') && (\n <DrillPipeBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'agitator' && (\n <AgitatorBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {(tempComponent.family === 'ags' || tempComponent.family === 'stabilizer') && (\n <StabilizerBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'bit' && (\n <BitBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'dc' && (\n <DrillCollarBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'jar' && (\n <JarBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'lwd' && (\n <LwdBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'mwd' && (\n <MwdBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'pdm' && (\n <PdmBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'rss' && (\n <RssBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'stabilizer' && (\n <StabilizerBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'sub' && (\n <SubBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n {tempComponent.family === 'ur' && (\n <UrBrowser component={tempComponent} columns={viewColumnsPerRow} />\n )}\n </>\n )}\n\n <Menu\n anchorEl={actionAnchorEl}\n keepMounted\n open={Boolean(actionAnchorEl)}\n getContentAnchorEl={null}\n anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}\n transformOrigin={{ vertical: 'top', horizontal: 'right' }}\n onClose={handleCloseActionMenu}\n >\n <MenuItem onClick={handleEdit} className={classes.menuItem}>\n Edit\n </MenuItem>\n {tempComponent.family !== 'bit' && (\n <MenuItem onClick={handleConfirmDelete} className={classes.menuItem}>\n Delete\n </MenuItem>\n )}\n </Menu>\n\n {isOpenDeleteDialog && (\n <ConfirmationPopup\n title=\"Delete Component?\"\n text=\"You will not be able to recover it.\"\n okText=\"Delete\"\n handleClose={() => setIsOpenDeleteDialog(false)}\n handleOk={handleDelete}\n />\n )}\n\n {isOpenEditorDialog && (\n <EditComponentDialog\n component={tempComponent}\n isDraft={isDraft}\n error={error}\n onChange={handleChange}\n onUseSuggestion={handleUseSuggestion}\n onCancel={handleCancel}\n onSave={handleConfirmSave}\n onClose={() => {\n handleCancel();\n setIsOpenEditorDialog(false);\n }}\n />\n )}\n\n {isMobile && isOpenSaveConfirm && (\n <ConfirmationPopup\n title=\"Save Changes?\"\n text=\"You will not be able to recover it.\"\n okText=\"Save\"\n handleClose={() => setIsOpenSaveConfirm(false)}\n handleOk={handleSave}\n />\n )}\n </div>\n );\n}\n\nComponent.propTypes = {\n isMobile: PropTypes.bool.isRequired,\n component: PropTypes.shape({\n family: PropTypes.string,\n size: PropTypes.number,\n outer_diameter: PropTypes.number,\n inner_diameter: PropTypes.number,\n linear_weight: PropTypes.number,\n length: PropTypes.number,\n }).isRequired,\n isDraft: PropTypes.bool,\n validate: PropTypes.func.isRequired,\n onCancel: PropTypes.func,\n onDelete: PropTypes.func,\n onSave: PropTypes.func.isRequired,\n onChangeEditing: PropTypes.func,\n viewColumnsPerRow: PropTypes.number.isRequired,\n editColumnsPerRow: PropTypes.number.isRequired,\n onAutocompleteApplied: PropTypes.func,\n isDragComponent: PropTypes.bool.isRequired,\n};\n\nComponent.defaultProps = {\n isDraft: false,\n onCancel: null,\n onDelete: null,\n onChangeEditing: undefined,\n onAutocompleteApplied: undefined,\n};\n\nexport default memo(Component);\n"],"names":["getComponentName","family","_COMPONENT_FAMILIES$d","COMPONENT_FAMILIES","drilling","find","item","type","name","Component","_ref","_classNames2","isMobile","viewColumnsPerRow","editColumnsPerRow","component","validate","isDraft","onCancel","onDelete","onSave","onChangeEditing","onAutocompleteApplied","isDragComponent","useState","_useState2","_slicedToArray","_useState","actionAnchorEl","setActionAnchorEl","_useState4","_useState3","isOpenSaveConfirm","setIsOpenSaveConfirm","_useState6","_useState5","isOpenDeleteDialog","setIsOpenDeleteDialog","_useState8","_useState7","tempComponent","setTempComponent","_useState10","_useState9","error","setError","_useState12","_useState11","isOpenEditorDialog","setIsOpenEditorDialog","classes","useStyles","isEditing","is_editing","useEffect","handleCancel","handleChange","key","value","newComponent","calculateComponent","result","components","id","handleUseSuggestion","suggestion","prev","handleConfirmSave","globalErros","omit","general","isEmpty","map","msg","showErrorNotification","handleSave","saving","_excluded","contentCellName","classNames","cell","ratioWidth","focusedFontsize","is_expanded","componentProps","onChange","onUseSuggestion","columns","_jsxs","className","children","_jsx","DrillPipeEditor","AgitatorEditor","_objectSpread","jsx","StabilizerEditor","BitEditor","DrillCollarEditor","JarEditor","LwdEditor","MwdEditor","PdmEditor","RssEditor","SubEditor","UrEditor","ConfirmationPopup","title","text","okText","handleClose","handleOk","componentMobile","componentExpandedMobile","componentActive","Boolean","jsxs","row","rowExpanded","componentMobileCell","ComponentIcon","_Fragment","FormatedNumber","size","outer_diameter","inner_diameter","linear_weight","length","format","actionCell","ExpandCollapseButton","isExpanded","handleExpandCollapse","MoreButton","handleOpenActionMenu","e","currentTarget","Grid","container","spacing","style","padding","StaticField","label","unit","DrillPipeBrowser","AgitatorBrowser","StabilizerBrowser","BitBrowser","DrillCollarBrowser","JarBrowser","LwdBrowser","MwdBrowser","PdmBrowser","RssBrowser","SubBrowser","UrBrowser","Menu","anchorEl","keepMounted","open","getContentAnchorEl","anchorOrigin","vertical","horizontal","transformOrigin","onClose","MenuItem","onClick","menuItem","EditComponentDialog","propTypes","PropTypes","bool","isRequired","shape","string","number","func","defaultProps","undefined","memo"],"mappings":"g41BAiCA,SAASA,EAAiBC,GAAQ,IAAAC,EAChC,OAAO,QAAAA,EAAAC,EAAAA,mBAAmBC,SAASC,MAAK,SAAAC,GAAI,OAAIA,EAAKC,OAASN,CAAM,WAA7D,IAAAC,OAAA,EAAAA,EAAgEM,OAAQ,GACjF,CAEA,SAASC,GAaNC,GAAA,IAAAC,EAZDC,IAAAA,SACAC,IAAAA,kBACAC,IAAAA,kBACAC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,SACAC,KAAAA,SACAC,KAAAA,OACAC,KAAAA,gBACAC,KAAAA,sBACAC,KAAAA,gBAE4CC,GAAAA,EAAQA,SAAC,MAAKC,GAAAC,EAAAA,QAAAC,GAAA,GAAnDC,GAAcH,GAAA,GAAEI,GAAiBJ,GAAA,GACUD,GAAAA,EAAQA,UAAC,GAAMM,GAAAJ,EAAAA,QAAAK,GAAA,GAA1DC,GAAiBF,GAAA,GAAEG,GAAoBH,GAAA,GACMN,GAAAA,EAAQA,UAAC,GAAMU,GAAAR,EAAAA,QAAAS,GAAA,GAA5DC,GAAkBF,GAAA,GAAEG,GAAqBH,GAAA,GACNV,GAAAA,EAAQA,SAACT,GAAUu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eAAgBgD,EAAS,QAACK,OAC1BpD,eAAgB+C,EAAS,QAACK,OAC1BnD,cAAe8C,EAAS,QAACK,OACzBlD,OAAQ6C,EAAS,QAACK,SACjBH,WACH7J,QAAS2J,EAAS,QAACC,KACnB7J,SAAU4J,EAAAA,QAAUM,KAAKJ,WACzB5J,SAAU0J,EAAS,QAACM,KACpB/J,SAAUyJ,EAAS,QAACM,KACpB9J,OAAQwJ,EAAAA,QAAUM,KAAKJ,WACvBzJ,gBAAiBuJ,EAAS,QAACM,KAC3BrK,kBAAmB+J,EAAAA,QAAUK,OAAOH,WACpChK,kBAAmB8J,EAAAA,QAAUK,OAAOH,WACpCxJ,sBAAuBsJ,EAAS,QAACM,KACjC3J,gBAAiBqJ,EAAAA,QAAUC,KAAKC,YAGlCrK,GAAU0K,aAAe,CACvBlK,SAAS,EACTC,SAAU,KACVC,SAAU,KACVE,qBAAiB+J,EACjB9J,2BAAuB8J,GAGzB,IAAeC,GAAAA,EAAAA,KAAK5K"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),r=require("react"),i=require("prop-types"),t=require("@material-ui/core"),o=require("@material-ui/icons");require("./DrillPipe/Browser.js");var s=require("./DrillPipe/Editor.js");require("./Agitator/Browser.js");var n=require("./Agitator/Editor.js");require("./Bit/Browser.js");var a=require("./Bit/Editor.js");require("./DrillCollar/Browser.js");var l=require("./DrillCollar/Editor.js");require("./Jar/Browser.js");var c=require("./Jar/Editor.js");require("./Lwd/Browser.js");var u=require("./Lwd/Editor.js");require("./Mwd/Browser.js");var d=require("./Mwd/Editor.js");require("./Pdm/Browser.js");var p=require("./Pdm/Editor.js");require("./Rss/Browser.js");var j=require("./Rss/Editor.js");require("./Stabilizer/Browser.js");var g=require("./Stabilizer/Editor.js");require("./Sub/Browser.js");var f=require("./Sub/Editor.js");require("./Ur/Browser.js");var b=require("./Ur/Editor.js"),x=require("../../../../constants/drillstring.js"),m=require("react/jsx-runtime");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var q=h(e),v=h(i);function w(e,r){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),i.push.apply(i,t)}return i}function y(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?w(Object(i),!0).forEach((function(r){q.default(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):w(Object(i)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(i,r))}))}return e}var C=t.makeStyles((function(e){return{paper:{background:e.isLightTheme?e.palette.primary.text1:e.palette.background.b5},dialogTitle:{padding:"12px 0",borderBottom:"1px solid ".concat(e.palette.background.b7)},titleWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px"},title:{fontSize:"20px",fontWeight:400},closeIcon:{color:e.palette.primary.text6,"&:hover":{color:e.palette.primary.text1}},dialogContent:{padding:"0px 0px 0px 16px",flexDirection:"column",height:"100%",width:"100%",position:"relative"},dialogActions:{padding:"8px 16px",justifyContent:"space-between"},contentView:{display:"flex",height:"100%"},componentListView:{height:"100%",flex:1,overflowY:"auto",paddingRight:"16px"},bottomGradient:{position:"absolute",height:"16px",left:0,right:0,bottom:0,background:"linear-gradient(180deg, rgba(33, 33, 33, 0) 0%, ".concat(e.palette.background.b5," 100%)")}}}));function B(e){var r=e.component,i=e.isDraft,h=e.error,q=e.onChange,v=e.onUseSuggestion,w=e.onCancel,B=e.onSave,O=e.onClose,D={component:r,isDraft:i,error:h,onChange:q,onUseSuggestion:v,onCancel:w,onSave:B},E=C(),S=r.family;return m.jsxs(t.Dialog,{open:!0,onBackdropClick:O,onEscapeKeyDown:O,maxWidth:"xs",fullWidth:!0,fullScreen:!0,classes:{paper:E.paper},children:[m.jsx(t.DialogTitle,{className:E.dialogTitle,children:m.jsxs("div",{className:E.titleWrapper,children:[m.jsx(t.Typography,{className:E.title,children:function(e){if(!e)return"—";var r=x.COMPONENT_FAMILIES.drilling.find((function(r){return r.type===e}));return(null==r?void 0:r.name)||e.toUpperCase()}(S)}),m.jsx(o.Close,{onClick:O,className:E.closeIcon})]})}),m.jsx(t.DialogContent,{className:E.dialogContent,children:m.jsxs("div",{className:E.contentView,children:[m.jsxs("div",{className:E.componentListView,children:[("dp"===S||"hwdp"===S)&&m.jsx(s,y(y({},D),{},{isMobile:!0})),"stabilizer"===S&&m.jsx(g,y(y({},D),{},{isMobile:!0})),"dc"===S&&m.jsx(l,y(y({},D),{},{isMobile:!0})),"jar"===S&&m.jsx(c,y(y({},D),{},{isMobile:!0})),"sub"===S&&m.jsx(f,y(y({},D),{},{isMobile:!0})),"mwd"===S&&m.jsx(d,y(y({},D),{},{isMobile:!0})),"agitator"===S&&m.jsx(n,y(y({},D),{},{isMobile:!0})),"rss"===S&&m.jsx(j,y(y({},D),{},{isMobile:!0})),"pdm"===S&&m.jsx(p,y(y({},D),{},{isMobile:!0})),"bit"===S&&m.jsx(a,y(y({},D),{},{isMobile:!0})),"lwd"===S&&m.jsx(u,y(y({},D),{},{isMobile:!0})),"ur"===S&&m.jsx(b,y(y({},D),{},{isMobile:!0}))]}),m.jsx("div",{className:E.bottomGradient})]})}),m.jsxs(t.DialogActions,{className:E.dialogActions,children:[m.jsx(t.Button,{startIcon:m.jsx(o.ArrowBackIos,{}),onClick:O}),m.jsxs("div",{children:[m.jsx(t.Button,{color:"primary",style:{marginRight:"12px"},onClick:O,children:"Cancel"}),m.jsx(t.Button,{variant:"contained",color:"primary",onClick:B,children:"Save"})]})]})]})}B.propTypes={component:v.default.shape({family:v.default.string}).isRequired,isDraft:v.default.bool.isRequired,error:v.default.shape({}).isRequired,onChange:v.default.func.isRequired,onUseSuggestion:v.default.func.isRequired,onCancel:v.default.func.isRequired,onSave:v.default.func.isRequired,onClose:v.default.func.isRequired};var O=r.memo(B);module.exports=O;
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),r=require("react"),i=require("prop-types"),t=require("@material-ui/core"),o=require("@material-ui/icons");require("./DrillPipe/Browser.js");var s=require("./DrillPipe/Editor.js");require("./Agitator/Browser.js");var n=require("./Agitator/Editor.js");require("./Bit/Browser.js");var a=require("./Bit/Editor.js");require("./DrillCollar/Browser.js");var l=require("./DrillCollar/Editor.js");require("./Jar/Browser.js");var c=require("./Jar/Editor.js");require("./Lwd/Browser.js");var u=require("./Lwd/Editor.js");require("./Mwd/Browser.js");var d=require("./Mwd/Editor.js");require("./Pdm/Browser.js");var p=require("./Pdm/Editor.js");require("./Rss/Browser.js");var j=require("./Rss/Editor.js");require("./Stabilizer/Browser.js");var g=require("./Stabilizer/Editor.js");require("./Sub/Browser.js");var f=require("./Sub/Editor.js");require("./Ur/Browser.js");var b=require("./Ur/Editor.js"),x=require("../../../../constants/drillstring.js"),m=require("react/jsx-runtime");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var q=h(e),v=h(i);function w(e,r){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),i.push.apply(i,t)}return i}function y(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?w(Object(i),!0).forEach((function(r){q.default(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):w(Object(i)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(i,r))}))}return e}var C=t.makeStyles((function(e){return{paper:{background:e.isLightTheme?e.palette.primary.text1:e.palette.background.b5},dialogTitle:{padding:"12px 0",borderBottom:"1px solid ".concat(e.palette.background.b7)},titleWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px"},title:{fontSize:"20px",fontWeight:400},closeIcon:{color:e.palette.primary.text6,"&:hover":{color:e.palette.primary.text1}},dialogContent:{padding:"0px 0px 0px 16px",flexDirection:"column",height:"100%",width:"100%",position:"relative"},dialogActions:{padding:"8px 16px",justifyContent:"space-between"},contentView:{display:"flex",height:"100%"},componentListView:{height:"100%",flex:1,overflowY:"auto",paddingRight:"16px"},bottomGradient:{position:"absolute",height:"16px",left:0,right:0,bottom:0,background:"linear-gradient(180deg, rgba(33, 33, 33, 0) 0%, ".concat(e.palette.background.b5," 100%)")}}}));function B(e){var r=e.component,i=e.isDraft,h=e.error,q=e.onChange,v=e.onUseSuggestion,w=e.onCancel,B=e.onSave,O=e.onClose,D={component:r,isDraft:i,error:h,onChange:q,onUseSuggestion:v,onCancel:w,onSave:B},E=C(),S=r.family;return m.jsxs(t.Dialog,{open:!0,onBackdropClick:O,onEscapeKeyDown:O,maxWidth:"xs",fullWidth:!0,fullScreen:!0,classes:{paper:E.paper},children:[m.jsx(t.DialogTitle,{className:E.dialogTitle,children:m.jsxs("div",{className:E.titleWrapper,children:[m.jsx(t.Typography,{className:E.title,children:function(e){if(!e)return"—";var r=x.COMPONENT_FAMILIES.drilling.find((function(r){return r.type===e}));return(null==r?void 0:r.name)||e.toUpperCase()}(S)}),m.jsx(o.Close,{onClick:O,className:E.closeIcon})]})}),m.jsx(t.DialogContent,{className:E.dialogContent,children:m.jsxs("div",{className:E.contentView,children:[m.jsxs("div",{className:E.componentListView,children:[("dp"===S||"hwdp"===S)&&m.jsx(s,y(y({},D),{},{isMobile:!0})),"agitator"===S&&m.jsx(n,y(y({},D),{},{isMobile:!0})),("ags"===S||"stabilizer"===S)&&m.jsx(g,y(y({},D),{},{isMobile:!0})),"dc"===S&&m.jsx(l,y(y({},D),{},{isMobile:!0})),"jar"===S&&m.jsx(c,y(y({},D),{},{isMobile:!0})),"sub"===S&&m.jsx(f,y(y({},D),{},{isMobile:!0})),"mwd"===S&&m.jsx(d,y(y({},D),{},{isMobile:!0})),"rss"===S&&m.jsx(j,y(y({},D),{},{isMobile:!0})),"pdm"===S&&m.jsx(p,y(y({},D),{},{isMobile:!0})),"bit"===S&&m.jsx(a,y(y({},D),{},{isMobile:!0})),"lwd"===S&&m.jsx(u,y(y({},D),{},{isMobile:!0})),"ur"===S&&m.jsx(b,y(y({},D),{},{isMobile:!0}))]}),m.jsx("div",{className:E.bottomGradient})]})}),m.jsxs(t.DialogActions,{className:E.dialogActions,children:[m.jsx(t.Button,{startIcon:m.jsx(o.ArrowBackIos,{}),onClick:O}),m.jsxs("div",{children:[m.jsx(t.Button,{color:"primary",style:{marginRight:"12px"},onClick:O,children:"Cancel"}),m.jsx(t.Button,{variant:"contained",color:"primary",onClick:B,children:"Save"})]})]})]})}B.propTypes={component:v.default.shape({family:v.default.string}).isRequired,isDraft:v.default.bool.isRequired,error:v.default.shape({}).isRequired,onChange:v.default.func.isRequired,onUseSuggestion:v.default.func.isRequired,onCancel:v.default.func.isRequired,onSave:v.default.func.isRequired,onClose:v.default.func.isRequired};var O=r.memo(B);module.exports=O;
2
2
  //# sourceMappingURL=EditComponentDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditComponentDialog.js","sources":["../../../../../../src/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js"],"sourcesContent":["import { memo } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n Button,\n Typography,\n makeStyles,\n} from '@material-ui/core';\nimport { Close as CloseIcon, ArrowBackIos as BackIcon } from '@material-ui/icons';\n\nimport { Editor as DrillPipeEditor } from './DrillPipe';\nimport { Editor as AgitatorEditor } from './Agitator';\nimport { Editor as BitEditor } from './Bit';\nimport { Editor as DrillCollarEditor } from './DrillCollar';\nimport { Editor as JarEditor } from './Jar';\nimport { Editor as LwdEditor } from './Lwd';\nimport { Editor as MwdEditor } from './Mwd';\nimport { Editor as PdmEditor } from './Pdm';\nimport { Editor as RssEditor } from './Rss';\nimport { Editor as StabilizerEditor } from './Stabilizer';\nimport { Editor as SubEditor } from './Sub';\nimport { Editor as UrEditor } from './Ur';\n\nimport { COMPONENT_FAMILIES } from '~/constants/drillstring';\n\nconst useStyles = makeStyles(theme => ({\n paper: {\n background: theme.isLightTheme ? theme.palette.primary.text1 : theme.palette.background.b5,\n },\n dialogTitle: {\n padding: '12px 0',\n borderBottom: `1px solid ${theme.palette.background.b7}`,\n },\n titleWrapper: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: '0 16px',\n },\n title: {\n fontSize: '20px',\n fontWeight: 400,\n },\n closeIcon: {\n color: theme.palette.primary.text6,\n '&:hover': {\n color: theme.palette.primary.text1,\n },\n },\n dialogContent: {\n padding: '0px 0px 0px 16px',\n flexDirection: 'column',\n height: '100%',\n width: '100%',\n position: 'relative',\n },\n dialogActions: {\n padding: '8px 16px',\n justifyContent: 'space-between',\n },\n contentView: {\n display: 'flex',\n height: '100%',\n },\n componentListView: {\n height: '100%',\n flex: 1,\n overflowY: 'auto',\n paddingRight: '16px',\n },\n bottomGradient: {\n position: 'absolute',\n height: '16px',\n left: 0,\n right: 0,\n bottom: 0,\n background: `linear-gradient(180deg, rgba(33, 33, 33, 0) 0%, ${theme.palette.background.b5} 100%)`,\n },\n}));\n\nfunction EditComponentDialog({\n component,\n isDraft,\n error,\n onChange,\n onUseSuggestion,\n onCancel,\n onSave,\n onClose,\n}) {\n const tempComponentProps = {\n component,\n isDraft,\n error,\n onChange,\n onUseSuggestion,\n onCancel,\n onSave,\n };\n const classes = useStyles();\n const { family } = component;\n\n const getComponentName = type => {\n if (!type) return '—';\n const matchedItem = COMPONENT_FAMILIES.drilling.find(item => item.type === type);\n return matchedItem?.name || type.toUpperCase();\n };\n\n return (\n <Dialog\n open\n onBackdropClick={onClose}\n onEscapeKeyDown={onClose}\n maxWidth=\"xs\"\n fullWidth\n fullScreen\n classes={{ paper: classes.paper }}\n >\n <DialogTitle className={classes.dialogTitle}>\n <div className={classes.titleWrapper}>\n <Typography className={classes.title}>{getComponentName(family)}</Typography>\n <CloseIcon onClick={onClose} className={classes.closeIcon} />\n </div>\n </DialogTitle>\n <DialogContent className={classes.dialogContent}>\n <div className={classes.contentView}>\n <div className={classes.componentListView}>\n {(family === 'dp' || family === 'hwdp') && (\n <DrillPipeEditor {...tempComponentProps} isMobile />\n )}\n {family === 'stabilizer' && <StabilizerEditor {...tempComponentProps} isMobile />}\n {family === 'dc' && <DrillCollarEditor {...tempComponentProps} isMobile />}\n {family === 'jar' && <JarEditor {...tempComponentProps} isMobile />}\n {family === 'sub' && <SubEditor {...tempComponentProps} isMobile />}\n {family === 'mwd' && <MwdEditor {...tempComponentProps} isMobile />}\n {family === 'agitator' && <AgitatorEditor {...tempComponentProps} isMobile />}\n {family === 'rss' && <RssEditor {...tempComponentProps} isMobile />}\n {family === 'pdm' && <PdmEditor {...tempComponentProps} isMobile />}\n {family === 'bit' && <BitEditor {...tempComponentProps} isMobile />}\n {family === 'lwd' && <LwdEditor {...tempComponentProps} isMobile />}\n {family === 'ur' && <UrEditor {...tempComponentProps} isMobile />}\n </div>\n <div className={classes.bottomGradient} />\n </div>\n </DialogContent>\n <DialogActions className={classes.dialogActions}>\n <Button startIcon={<BackIcon />} onClick={onClose} />\n <div>\n <Button color=\"primary\" style={{ marginRight: '12px' }} onClick={onClose}>\n Cancel\n </Button>\n <Button variant=\"contained\" color=\"primary\" onClick={onSave}>\n Save\n </Button>\n </div>\n </DialogActions>\n </Dialog>\n );\n}\n\nEditComponentDialog.propTypes = {\n component: PropTypes.shape({ family: PropTypes.string }).isRequired,\n isDraft: PropTypes.bool.isRequired,\n error: PropTypes.shape({}).isRequired,\n onChange: PropTypes.func.isRequired,\n onUseSuggestion: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n};\n\nexport default memo(EditComponentDialog);\n"],"names":["useStyles","makeStyles","theme","paper","background","isLightTheme","palette","primary","text1","b5","dialogTitle","padding","borderBottom","b7","titleWrapper","display","alignItems","justifyContent","title","fontSize","fontWeight","closeIcon","color","text6","dialogContent","flexDirection","height","width","position","dialogActions","contentView","componentListView","flex","overflowY","paddingRight","bottomGradient","left","right","bottom","EditComponentDialog","_ref","component","isDraft","error","onChange","onUseSuggestion","onCancel","onSave","onClose","tempComponentProps","classes","family","_jsxs","Dialog","open","onBackdropClick","onEscapeKeyDown","maxWidth","fullWidth","fullScreen","children","_jsx","DialogTitle","className","jsxs","Typography","type","matchedItem","COMPONENT_FAMILIES","drilling","find","item","name","toUpperCase","getComponentName","CloseIcon","onClick","DialogContent","DrillPipeEditor","_objectSpread","isMobile","StabilizerEditor","DrillCollarEditor","JarEditor","SubEditor","MwdEditor","AgitatorEditor","RssEditor","PdmEditor","BitEditor","LwdEditor","UrEditor","jsx","DialogActions","Button","startIcon","BackIcon","ArrowBackIos","style","marginRight","variant","propTypes","PropTypes","shape","string","isRequired","bool","func","memo"],"mappings":"8qDA4BA,IAAMA,EAAYC,EAAAA,YAAW,SAAAC,GAAK,MAAK,CACrCC,MAAO,CACLC,WAAYF,EAAMG,aAAeH,EAAMI,QAAQC,QAAQC,MAAQN,EAAMI,QAAQF,WAAWK,IAE1FC,YAAa,CACXC,QAAS,SACTC,iCAA2BV,EAAMI,QAAQF,WAAWS,KAEtDC,aAAc,CACZC,QAAS,OACTC,WAAY,SACZC,eAAgB,gBAChBN,QAAS,UAEXO,MAAO,CACLC,SAAU,OACVC,WAAY,KAEdC,UAAW,CACTC,MAAOpB,EAAMI,QAAQC,QAAQgB,MAC7B,UAAW,CACTD,MAAOpB,EAAMI,QAAQC,QAAQC,QAGjCgB,cAAe,CACbb,QAAS,mBACTc,cAAe,SACfC,OAAQ,OACRC,MAAO,OACPC,SAAU,YAEZC,cAAe,CACblB,QAAS,WACTM,eAAgB,iBAElBa,YAAa,CACXf,QAAS,OACTW,OAAQ,QAEVK,kBAAmB,CACjBL,OAAQ,OACRM,KAAM,EACNC,UAAW,OACXC,aAAc,QAEhBC,eAAgB,CACdP,SAAU,WACVF,OAAQ,OACRU,KAAM,EACNC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AA,iBAOtE,CAEArB,EAAoB8D,UAAY,CAC9B5D,UAAW6D,EAAS,QAACC,MAAM,CAAEpD,OAAQmD,EAAS,QAACE,SAAUC,WACzD/D,QAAS4D,EAAAA,QAAUI,KAAKD,WACxB9D,MAAO2D,EAAS,QAACC,MAAM,CAAA,GAAIE,WAC3B7D,SAAU0D,EAAAA,QAAUK,KAAKF,WACzB5D,gBAAiByD,EAAAA,QAAUK,KAAKF,WAChC3D,SAAUwD,EAAAA,QAAUK,KAAKF,WACzB1D,OAAQuD,EAAAA,QAAUK,KAAKF,WACvBzD,QAASsD,EAAAA,QAAUK,KAAKF,YAG1B,IAAeG,EAAAA,EAAAA,KAAKrE"}
1
+ {"version":3,"file":"EditComponentDialog.js","sources":["../../../../../../src/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js"],"sourcesContent":["import { memo } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n Button,\n Typography,\n makeStyles,\n} from '@material-ui/core';\nimport { Close as CloseIcon, ArrowBackIos as BackIcon } from '@material-ui/icons';\n\nimport { Editor as DrillPipeEditor } from './DrillPipe';\nimport { Editor as AgitatorEditor } from './Agitator';\nimport { Editor as BitEditor } from './Bit';\nimport { Editor as DrillCollarEditor } from './DrillCollar';\nimport { Editor as JarEditor } from './Jar';\nimport { Editor as LwdEditor } from './Lwd';\nimport { Editor as MwdEditor } from './Mwd';\nimport { Editor as PdmEditor } from './Pdm';\nimport { Editor as RssEditor } from './Rss';\nimport { Editor as StabilizerEditor } from './Stabilizer';\nimport { Editor as SubEditor } from './Sub';\nimport { Editor as UrEditor } from './Ur';\n\nimport { COMPONENT_FAMILIES } from '~/constants/drillstring';\n\nconst useStyles = makeStyles(theme => ({\n paper: {\n background: theme.isLightTheme ? theme.palette.primary.text1 : theme.palette.background.b5,\n },\n dialogTitle: {\n padding: '12px 0',\n borderBottom: `1px solid ${theme.palette.background.b7}`,\n },\n titleWrapper: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: '0 16px',\n },\n title: {\n fontSize: '20px',\n fontWeight: 400,\n },\n closeIcon: {\n color: theme.palette.primary.text6,\n '&:hover': {\n color: theme.palette.primary.text1,\n },\n },\n dialogContent: {\n padding: '0px 0px 0px 16px',\n flexDirection: 'column',\n height: '100%',\n width: '100%',\n position: 'relative',\n },\n dialogActions: {\n padding: '8px 16px',\n justifyContent: 'space-between',\n },\n contentView: {\n display: 'flex',\n height: '100%',\n },\n componentListView: {\n height: '100%',\n flex: 1,\n overflowY: 'auto',\n paddingRight: '16px',\n },\n bottomGradient: {\n position: 'absolute',\n height: '16px',\n left: 0,\n right: 0,\n bottom: 0,\n background: `linear-gradient(180deg, rgba(33, 33, 33, 0) 0%, ${theme.palette.background.b5} 100%)`,\n },\n}));\n\nfunction EditComponentDialog({\n component,\n isDraft,\n error,\n onChange,\n onUseSuggestion,\n onCancel,\n onSave,\n onClose,\n}) {\n const tempComponentProps = {\n component,\n isDraft,\n error,\n onChange,\n onUseSuggestion,\n onCancel,\n onSave,\n };\n const classes = useStyles();\n const { family } = component;\n\n const getComponentName = type => {\n if (!type) return '—';\n const matchedItem = COMPONENT_FAMILIES.drilling.find(item => item.type === type);\n return matchedItem?.name || type.toUpperCase();\n };\n\n return (\n <Dialog\n open\n onBackdropClick={onClose}\n onEscapeKeyDown={onClose}\n maxWidth=\"xs\"\n fullWidth\n fullScreen\n classes={{ paper: classes.paper }}\n >\n <DialogTitle className={classes.dialogTitle}>\n <div className={classes.titleWrapper}>\n <Typography className={classes.title}>{getComponentName(family)}</Typography>\n <CloseIcon onClick={onClose} className={classes.closeIcon} />\n </div>\n </DialogTitle>\n <DialogContent className={classes.dialogContent}>\n <div className={classes.contentView}>\n <div className={classes.componentListView}>\n {(family === 'dp' || family === 'hwdp') && (\n <DrillPipeEditor {...tempComponentProps} isMobile />\n )}\n {family === 'agitator' && <AgitatorEditor {...tempComponentProps} isMobile />}\n {(family === 'ags' || family === 'stabilizer') && (\n <StabilizerEditor {...tempComponentProps} isMobile />\n )}\n {family === 'dc' && <DrillCollarEditor {...tempComponentProps} isMobile />}\n {family === 'jar' && <JarEditor {...tempComponentProps} isMobile />}\n {family === 'sub' && <SubEditor {...tempComponentProps} isMobile />}\n {family === 'mwd' && <MwdEditor {...tempComponentProps} isMobile />}\n {family === 'rss' && <RssEditor {...tempComponentProps} isMobile />}\n {family === 'pdm' && <PdmEditor {...tempComponentProps} isMobile />}\n {family === 'bit' && <BitEditor {...tempComponentProps} isMobile />}\n {family === 'lwd' && <LwdEditor {...tempComponentProps} isMobile />}\n {family === 'ur' && <UrEditor {...tempComponentProps} isMobile />}\n </div>\n <div className={classes.bottomGradient} />\n </div>\n </DialogContent>\n <DialogActions className={classes.dialogActions}>\n <Button startIcon={<BackIcon />} onClick={onClose} />\n <div>\n <Button color=\"primary\" style={{ marginRight: '12px' }} onClick={onClose}>\n Cancel\n </Button>\n <Button variant=\"contained\" color=\"primary\" onClick={onSave}>\n Save\n </Button>\n </div>\n </DialogActions>\n </Dialog>\n );\n}\n\nEditComponentDialog.propTypes = {\n component: PropTypes.shape({ family: PropTypes.string }).isRequired,\n isDraft: PropTypes.bool.isRequired,\n error: PropTypes.shape({}).isRequired,\n onChange: PropTypes.func.isRequired,\n onUseSuggestion: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n};\n\nexport default memo(EditComponentDialog);\n"],"names":["useStyles","makeStyles","theme","paper","background","isLightTheme","palette","primary","text1","b5","dialogTitle","padding","borderBottom","b7","titleWrapper","display","alignItems","justifyContent","title","fontSize","fontWeight","closeIcon","color","text6","dialogContent","flexDirection","height","width","position","dialogActions","contentView","componentListView","flex","overflowY","paddingRight","bottomGradient","left","right","bottom","EditComponentDialog","_ref","component","isDraft","error","onChange","onUseSuggestion","onCancel","onSave","onClose","tempComponentProps","classes","family","_jsxs","Dialog","open","onBackdropClick","onEscapeKeyDown","maxWidth","fullWidth","fullScreen","children","_jsx","DialogTitle","className","jsxs","Typography","type","matchedItem","COMPONENT_FAMILIES","drilling","find","item","name","toUpperCase","getComponentName","CloseIcon","onClick","DialogContent","DrillPipeEditor","_objectSpread","isMobile","AgitatorEditor","StabilizerEditor","DrillCollarEditor","JarEditor","SubEditor","MwdEditor","RssEditor","PdmEditor","BitEditor","LwdEditor","UrEditor","jsx","DialogActions","Button","startIcon","BackIcon","ArrowBackIos","style","marginRight","variant","propTypes","PropTypes","shape","string","isRequired","bool","func","memo"],"mappings":"8qDA4BA,IAAMA,EAAYC,EAAAA,YAAW,SAAAC,GAAK,MAAK,CACrCC,MAAO,CACLC,WAAYF,EAAMG,aAAeH,EAAMI,QAAQC,QAAQC,MAAQN,EAAMI,QAAQF,WAAWK,IAE1FC,YAAa,CACXC,QAAS,SACTC,iCAA2BV,EAAMI,QAAQF,WAAWS,KAEtDC,aAAc,CACZC,QAAS,OACTC,WAAY,SACZC,eAAgB,gBAChBN,QAAS,UAEXO,MAAO,CACLC,SAAU,OACVC,WAAY,KAEdC,UAAW,CACTC,MAAOpB,EAAMI,QAAQC,QAAQgB,MAC7B,UAAW,CACTD,MAAOpB,EAAMI,QAAQC,QAAQC,QAGjCgB,cAAe,CACbb,QAAS,mBACTc,cAAe,SACfC,OAAQ,OACRC,MAAO,OACPC,SAAU,YAEZC,cAAe,CACblB,QAAS,WACTM,eAAgB,iBAElBa,YAAa,CACXf,QAAS,OACTW,OAAQ,QAEVK,kBAAmB,CACjBL,OAAQ,OACRM,KAAM,EACNC,UAAW,OACXC,aAAc,QAEhBC,eAAgB,CACdP,SAAU,WACVF,OAAQ,OACRU,KAAM,EACNC,MAAO,EACPC,OAAQ,EACRlC,qEAA+DF,EAAMI,QAAQF,WAAWK,GAAE,WAE7F,IAED,SAAS8B,EASNC,GAAA,IARDC,IAAAA,UACAC,IAAAA,QACAC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,gBACAC,IAAAA,SACAC,IAA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S,QAACC,MAAM,CAAA,GAAIE,WAC3B7D,SAAU0D,EAAAA,QAAUK,KAAKF,WACzB5D,gBAAiByD,EAAAA,QAAUK,KAAKF,WAChC3D,SAAUwD,EAAAA,QAAUK,KAAKF,WACzB1D,OAAQuD,EAAAA,QAAUK,KAAKF,WACvBzD,QAASsD,EAAAA,QAAUK,KAAKF,YAG1B,IAAeG,EAAAA,EAAAA,KAAKrE"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("react"),i=require("prop-types"),r=require("react/jsx-runtime");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=l(e),a=l(i),c="#239FE6",n="#085EDF",u="#C208DF",o="yellow",s="#8398A5",f="#dd375e",d="#44ff44";function p(e){var i=e.schematic,l=e.containerWidth,a=e.containerHeight,p=t.useRef(),y=t.useRef();t.useEffect((function(){var e=p.current,t=e.getContext("2d"),r=y.current,l=r.clientWidth,a=r.clientHeight;e.width=l-8,e.height=a,e.style.width="".concat(l-8,"px"),e.style.height="".concat(a,"px");var g=i.filter((function(e){return["bit","stabilizer","ur"].includes(e.family)})).length,b=i.filter((function(e){return["pdm","rss"].includes(e.family)})).length,x=(l-6*g)/(i.filter((function(e){return"other"===e.family})).length+2*b),m=[],w=0;h.default(i).reverse().forEach((function(e){var t=0;switch(t=["bit","stabilizer","ur"].includes(e.family)?6:["pdm","rss"].includes(e.family)?2*x:x,e.family){case"bit":m.push({type:"rect",x:w,y:a/2-6,width:t,height:12,fillColor:"pdc"===e.bitType?c:n});break;case"ur":m.push({type:"rect",x:w,y:a/2-6,width:t,height:12,fillColor:d});break;case"pdm":e.hasStabilizer?m.push({type:"rect",x:w+(t/2-3),y:a/2-6,width:6,height:12,fillColor:o},{type:"rect",x:w,y:a/2-2,width:t,height:4,fillColor:u}):m.push({type:"rect",x:w,y:a/2-2,width:t,height:4,fillColor:u});break;case"rss":m.push({type:"rect",x:w,y:a/2-2,width:t,height:4,fillColor:f});break;case"stabilizer":m.push({type:"rect",x:w,y:a/2-6,width:t,height:12,fillColor:o});break;case"other":m.push({type:"rect",x:w,y:a/2-2,width:t,height:4,fillColor:s})}w+=t})),m.forEach((function(e){t.fillStyle=e.fillColor,t.fillRect(e.x,e.y,e.width,e.height)}))}));var g={width:l?"".concat(l,"px"):"100%",height:a?"".concat(a,"px"):"100%"};return r.jsx("div",{ref:y,style:g,children:r.jsx("canvas",{ref:p})})}p.propTypes={containerWidth:a.default.number,containerHeight:a.default.number,schematic:a.default.arrayOf(a.default.shape({})).isRequired},p.defaultProps={containerWidth:null,containerHeight:null},module.exports=p;
1
+ "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("react"),i=require("prop-types"),r=require("react/jsx-runtime");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=l(e),h=l(i),c="#239FE6",n="#085EDF",s="#C208DF",u="yellow",o="#8398A5",f="#dd375e",d="#44ff44";function p(e){var i=e.schematic,l=e.containerWidth,h=e.containerHeight,p=t.useRef(),y=t.useRef();t.useEffect((function(){var e=p.current,t=e.getContext("2d"),r=y.current,l=r.clientWidth,h=r.clientHeight;e.width=l-8,e.height=h,e.style.width="".concat(l-8,"px"),e.style.height="".concat(h,"px");var g=i.filter((function(e){return["bit","stabilizer","ags","ur"].includes(e.family)})).length,b=i.filter((function(e){return["pdm","rss"].includes(e.family)})).length,x=(l-6*g)/(i.filter((function(e){return"other"===e.family})).length+2*b),m=[],w=0;a.default(i).reverse().forEach((function(e){var t=0;switch(t=["bit","stabilizer","ags","ur"].includes(e.family)?6:["pdm","rss"].includes(e.family)?2*x:x,e.family){case"bit":m.push({type:"rect",x:w,y:h/2-6,width:t,height:12,fillColor:"pdc"===e.bitType?c:n});break;case"ur":m.push({type:"rect",x:w,y:h/2-6,width:t,height:12,fillColor:d});break;case"pdm":e.hasStabilizer?m.push({type:"rect",x:w+(t/2-3),y:h/2-6,width:6,height:12,fillColor:u},{type:"rect",x:w,y:h/2-2,width:t,height:4,fillColor:s}):m.push({type:"rect",x:w,y:h/2-2,width:t,height:4,fillColor:s});break;case"rss":m.push({type:"rect",x:w,y:h/2-2,width:t,height:4,fillColor:f});break;case"stabilizer":case"ags":m.push({type:"rect",x:w,y:h/2-6,width:t,height:12,fillColor:u});break;case"other":m.push({type:"rect",x:w,y:h/2-2,width:t,height:4,fillColor:o})}w+=t})),m.forEach((function(e){t.fillStyle=e.fillColor,t.fillRect(e.x,e.y,e.width,e.height)}))}));var g={width:l?"".concat(l,"px"):"100%",height:h?"".concat(h,"px"):"100%"};return r.jsx("div",{ref:y,style:g,children:r.jsx("canvas",{ref:p})})}p.propTypes={containerWidth:h.default.number,containerHeight:h.default.number,schematic:h.default.arrayOf(h.default.shape({})).isRequired},p.defaultProps={containerWidth:null,containerHeight:null},module.exports=p;
2
2
  //# sourceMappingURL=BHASchematic.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BHASchematic.js","sources":["../../../../src/components/Drillstring/BHASchematic.js"],"sourcesContent":["import { useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst COLORS = {\n pdcBit: '#239FE6',\n triconeBit: '#085EDF',\n pdm: '#C208DF',\n stabilizer: 'yellow',\n other: '#8398A5',\n rss: '#dd375e',\n ur: '#44ff44',\n};\n\nconst BIT_WIDTH = 6;\nconst PDM_HEIGHT = 4;\nconst HORIZONTAL_MARGIN = 8;\n\nfunction BHASchematic({ schematic, containerWidth, containerHeight }) {\n const canvasRef = useRef();\n const containerRef = useRef();\n\n useEffect(() => {\n const canvas = canvasRef.current;\n const context = canvas.getContext('2d');\n\n const { clientWidth: width, clientHeight: height } = containerRef.current;\n\n canvas.width = width - HORIZONTAL_MARGIN;\n canvas.height = height;\n canvas.style.width = `${width - HORIZONTAL_MARGIN}px`;\n canvas.style.height = `${height}px`;\n\n // NOTE: Count each comonents by family\n const bitStabCount = schematic.filter(item =>\n ['bit', 'stabilizer', 'ur'].includes(item.family)\n ).length;\n const pdmRssCount = schematic.filter(item => ['pdm', 'rss'].includes(item.family)).length;\n const nonMagCount = schematic.filter(item => item.family === 'other').length;\n\n // NOTE: Bit, Stabilizer --> width: 12px\n // Pdm, rss length ---> Non mag length * 2\n const nonMagLength = (width - BIT_WIDTH * bitStabCount) / (nonMagCount + pdmRssCount * 2);\n\n const dataToDraw = [];\n let x = 0;\n [...schematic].reverse().forEach(item => {\n let barWidth = 0;\n if (['bit', 'stabilizer', 'ur'].includes(item.family)) {\n barWidth = BIT_WIDTH;\n } else if (['pdm', 'rss'].includes(item.family)) {\n barWidth = nonMagLength * 2;\n } else {\n barWidth = nonMagLength;\n }\n\n switch (item.family) {\n case 'bit':\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - BIT_WIDTH,\n width: barWidth,\n height: BIT_WIDTH * 2,\n fillColor: item.bitType === 'pdc' ? COLORS.pdcBit : COLORS.triconeBit,\n });\n break;\n case 'ur':\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - BIT_WIDTH,\n width: barWidth,\n height: BIT_WIDTH * 2,\n fillColor: COLORS.ur,\n });\n break;\n case 'pdm':\n if (item.hasStabilizer) {\n dataToDraw.push(\n {\n type: 'rect',\n x: x + (barWidth / 2 - BIT_WIDTH / 2),\n y: height / 2 - BIT_WIDTH,\n width: BIT_WIDTH,\n height: BIT_WIDTH * 2,\n fillColor: COLORS.stabilizer,\n },\n {\n type: 'rect',\n x,\n y: height / 2 - PDM_HEIGHT / 2,\n width: barWidth,\n height: PDM_HEIGHT,\n fillColor: COLORS.pdm,\n }\n );\n } else {\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - PDM_HEIGHT / 2,\n width: barWidth,\n height: PDM_HEIGHT,\n fillColor: COLORS.pdm,\n });\n }\n break;\n case 'rss':\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - PDM_HEIGHT / 2,\n width: barWidth,\n height: PDM_HEIGHT,\n fillColor: COLORS.rss,\n });\n break;\n case 'stabilizer':\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - BIT_WIDTH,\n width: barWidth,\n height: BIT_WIDTH * 2,\n fillColor: COLORS.stabilizer,\n });\n break;\n case 'other':\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - PDM_HEIGHT / 2,\n width: barWidth,\n height: PDM_HEIGHT,\n fillColor: COLORS.other,\n });\n break;\n default:\n break;\n }\n\n x += barWidth;\n });\n\n dataToDraw.forEach(item => {\n context.fillStyle = item.fillColor;\n context.fillRect(item.x, item.y, item.width, item.height);\n });\n });\n\n const containerStyle = {\n width: containerWidth ? `${containerWidth}px` : '100%',\n height: containerHeight ? `${containerHeight}px` : '100%',\n };\n\n return (\n <div ref={containerRef} style={containerStyle}>\n <canvas ref={canvasRef} />\n </div>\n );\n}\n\nBHASchematic.propTypes = {\n containerWidth: PropTypes.number,\n containerHeight: PropTypes.number,\n schematic: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n};\n\nBHASchematic.defaultProps = {\n containerWidth: null,\n containerHeight: null,\n};\n\nexport default BHASchematic;\n"],"names":["COLORS","BHASchematic","_ref","schematic","containerWidth","containerHeight","canvasRef","useRef","containerRef","useEffect","canvas","current","context","getContext","width","clientWidth","height","clientHeight","style","concat","bitStabCount","filter","item","includes","family","length","pdmRssCount","nonMagLength","dataToDraw","x","_toConsumableArray","reverse","forEach","barWidth","push","type","y","BIT_WIDTH","fillColor","bitType","hasStabilizer","PDM_HEIGHT","fillStyle","fillRect","containerStyle","_jsx","ref","children","jsx","propTypes","PropTypes","number","arrayOf","shape","isRequired","defaultProps"],"mappings":"2OAGMA,EACI,UADJA,EAEQ,UAFRA,EAGC,UAHDA,EAIQ,SAJRA,EAKG,UALHA,EAMC,UANDA,EAOA,UAON,SAASC,EAA6DC,GAAA,IAA9CC,IAAAA,UAAWC,IAAAA,eAAgBC,IAAAA,gBAC3CC,EAAYC,EAAAA,SACZC,EAAeD,EAAAA,SAErBE,EAAAA,WAAU,WACR,IAAMC,EAASJ,EAAUK,QACnBC,EAAUF,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AKC,YAGpDrD,EAAasD,aAAe,CAC1BnD,eAAgB,KAChBC,gBAAiB"}
1
+ {"version":3,"file":"BHASchematic.js","sources":["../../../../src/components/Drillstring/BHASchematic.js"],"sourcesContent":["import { useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst COLORS = {\n pdcBit: '#239FE6',\n triconeBit: '#085EDF',\n pdm: '#C208DF',\n stabilizer: 'yellow',\n other: '#8398A5',\n rss: '#dd375e',\n ur: '#44ff44',\n};\n\nconst BIT_WIDTH = 6;\nconst PDM_HEIGHT = 4;\nconst HORIZONTAL_MARGIN = 8;\n\nfunction BHASchematic({ schematic, containerWidth, containerHeight }) {\n const canvasRef = useRef();\n const containerRef = useRef();\n\n useEffect(() => {\n const canvas = canvasRef.current;\n const context = canvas.getContext('2d');\n\n const { clientWidth: width, clientHeight: height } = containerRef.current;\n\n canvas.width = width - HORIZONTAL_MARGIN;\n canvas.height = height;\n canvas.style.width = `${width - HORIZONTAL_MARGIN}px`;\n canvas.style.height = `${height}px`;\n\n // NOTE: Count each comonents by family\n const bitStabCount = schematic.filter(item =>\n ['bit', 'stabilizer', 'ags', 'ur'].includes(item.family)\n ).length;\n const pdmRssCount = schematic.filter(item => ['pdm', 'rss'].includes(item.family)).length;\n const nonMagCount = schematic.filter(item => item.family === 'other').length;\n\n // NOTE: Bit, Stabilizer --> width: 12px\n // Pdm, rss length ---> Non mag length * 2\n const nonMagLength = (width - BIT_WIDTH * bitStabCount) / (nonMagCount + pdmRssCount * 2);\n\n const dataToDraw = [];\n let x = 0;\n [...schematic].reverse().forEach(item => {\n let barWidth = 0;\n if (['bit', 'stabilizer', 'ags', 'ur'].includes(item.family)) {\n barWidth = BIT_WIDTH;\n } else if (['pdm', 'rss'].includes(item.family)) {\n barWidth = nonMagLength * 2;\n } else {\n barWidth = nonMagLength;\n }\n\n switch (item.family) {\n case 'bit':\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - BIT_WIDTH,\n width: barWidth,\n height: BIT_WIDTH * 2,\n fillColor: item.bitType === 'pdc' ? COLORS.pdcBit : COLORS.triconeBit,\n });\n break;\n case 'ur':\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - BIT_WIDTH,\n width: barWidth,\n height: BIT_WIDTH * 2,\n fillColor: COLORS.ur,\n });\n break;\n case 'pdm':\n if (item.hasStabilizer) {\n dataToDraw.push(\n {\n type: 'rect',\n x: x + (barWidth / 2 - BIT_WIDTH / 2),\n y: height / 2 - BIT_WIDTH,\n width: BIT_WIDTH,\n height: BIT_WIDTH * 2,\n fillColor: COLORS.stabilizer,\n },\n {\n type: 'rect',\n x,\n y: height / 2 - PDM_HEIGHT / 2,\n width: barWidth,\n height: PDM_HEIGHT,\n fillColor: COLORS.pdm,\n }\n );\n } else {\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - PDM_HEIGHT / 2,\n width: barWidth,\n height: PDM_HEIGHT,\n fillColor: COLORS.pdm,\n });\n }\n break;\n case 'rss':\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - PDM_HEIGHT / 2,\n width: barWidth,\n height: PDM_HEIGHT,\n fillColor: COLORS.rss,\n });\n break;\n case 'stabilizer':\n case 'ags':\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - BIT_WIDTH,\n width: barWidth,\n height: BIT_WIDTH * 2,\n fillColor: COLORS.stabilizer,\n });\n break;\n case 'other':\n dataToDraw.push({\n type: 'rect',\n x,\n y: height / 2 - PDM_HEIGHT / 2,\n width: barWidth,\n height: PDM_HEIGHT,\n fillColor: COLORS.other,\n });\n break;\n default:\n break;\n }\n\n x += barWidth;\n });\n\n dataToDraw.forEach(item => {\n context.fillStyle = item.fillColor;\n context.fillRect(item.x, item.y, item.width, item.height);\n });\n });\n\n const containerStyle = {\n width: containerWidth ? `${containerWidth}px` : '100%',\n height: containerHeight ? `${containerHeight}px` : '100%',\n };\n\n return (\n <div ref={containerRef} style={containerStyle}>\n <canvas ref={canvasRef} />\n </div>\n );\n}\n\nBHASchematic.propTypes = {\n containerWidth: PropTypes.number,\n containerHeight: PropTypes.number,\n schematic: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n};\n\nBHASchematic.defaultProps = {\n containerWidth: null,\n containerHeight: null,\n};\n\nexport default BHASchematic;\n"],"names":["COLORS","BHASchematic","_ref","schematic","containerWidth","containerHeight","canvasRef","useRef","containerRef","useEffect","canvas","current","context","getContext","width","clientWidth","height","clientHeight","style","concat","bitStabCount","filter","item","includes","family","length","pdmRssCount","nonMagLength","dataToDraw","x","_toConsumableArray","reverse","forEach","barWidth","push","type","y","BIT_WIDTH","fillColor","bitType","hasStabilizer","PDM_HEIGHT","fillStyle","fillRect","containerStyle","_jsx","ref","children","jsx","propTypes","PropTypes","number","arrayOf","shape","isRequired","defaultProps"],"mappings":"2OAGMA,EACI,UADJA,EAEQ,UAFRA,EAGC,UAHDA,EAIQ,SAJRA,EAKG,UALHA,EAMC,UANDA,EAOA,UAON,SAASC,EAA6DC,GAAA,IAA9CC,IAAAA,UAAWC,IAAAA,eAAgBC,IAAAA,gBAC3CC,EAAYC,EAAAA,SACZC,EAAeD,EAAAA,SAErBE,EAAAA,WAAU,WACR,IAAMC,EAASJ,EAAUK,QACnBC,EAAUF,EAAOG,WAAW,MAEmBL,EAAAA,EAAaG,QAA7CG,IAAbC,YAAkCC,IAAdC,aAE5BP,EAAOI,MAAQA,EAZO,EAatBJ,EAAOM,OAASA,EAChBN,EAAOQ,MAAMJ,gBAAWA,EAdF,EAc+B,MACrDJ,EAAOQ,MAAMF,OAAM,GAAAG,OAAMH,EAAU,MAGnC,IAAMI,EAAejB,EAAUkB,QAAO,SAAAC,GAAI,MACxC,CAAC,MAAO,aAAc,MAAO,MAAMC,SAASD,EAAKE,OAAO,IACxDC,OACIC,EAAcvB,EAAUkB,QAAO,SAAAC,GAAI,MAAI,CAAC,MAAO,OAAOC,SAASD,EAAKE,OAAO,IAAEC,OAK7EE,GAAgBb,EA5BR,EA4B4BM,IAJtBjB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M,OACNN,EAAAA,EACAO,EAAGpB,EAAS,EA7GN,EA8GNF,MAAOmB,EACPjB,OAAQqB,GACRC,UAAWtC,IAEb,MACF,IAAK,QACH4B,EAAWM,KAAK,CACdC,KAAM,OACNN,EAAAA,EACAO,EAAGpB,EAAS,EAAIyB,EAChB3B,MAAOmB,EACPjB,OAxHO,EAyHPsB,UAAWtC,IAOjB6B,GAAKI,CACP,IAEAL,EAAWI,SAAQ,SAAAV,GACjBV,EAAQ8B,UAAYpB,EAAKgB,UACzB1B,EAAQ+B,SAASrB,EAAKO,EAAGP,EAAKc,EAAGd,EAAKR,MAAOQ,EAAKN,OACpD,GACF,IAEA,IAAM4B,EAAiB,CACrB9B,MAAOV,EAAoBA,GAAAA,OAAAA,QAAqB,OAChDY,OAAQX,EAAqBA,GAAAA,OAAAA,EAAsB,MAAA,QAGrD,OACEwC,EAAAA,IAAA,MAAA,CAAKC,IAAKtC,EAAcU,MAAO0B,EAAeG,SAC5CF,EAAAG,IAAA,SAAA,CAAQF,IAAKxC,KAGnB,CAEAL,EAAagD,UAAY,CACvB7C,eAAgB8C,EAAS,QAACC,OAC1B9C,gBAAiB6C,EAAS,QAACC,OAC3BhD,UAAW+C,EAAS,QAACE,QAAQF,EAAAA,QAAUG,MAAM,CAAA,IAAKC,YAGpDrD,EAAasD,aAAe,CAC1BnD,eAAgB,KAChBC,gBAAiB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("prop-types"),t=require("@material-ui/core"),i=require("react/jsx-runtime");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(e),s="/static/media/7dcfb5193fd2f60e28374f31ee0a26bf.svg",d={bit:"Bit",other:"Non Magnetic",pdm:"PDM",rss:"Rotary Steerables",stabilizer:"Stabilizer"},c=t.makeStyles({iconWrapper:{width:function(e){return e.width},height:function(e){return e.height}},tileIcon:{width:"100%",height:"100%"}});function n(e){var a,r=e.component,n=e.width,f=e.height,l=r.family,o=(r.material,c({width:n,height:f}));return a="bit"===l?"/static/media/50e73f59728296f6d5a248384d53193a.svg":"pdm"===l?"/static/media/d8f7c4b371a4666ca44cae9ec3058c26.svg":"rss"===l?"/static/media/bf34c472868f0f04afd2523062f9f363.svg":"stabilizer"===l?"/static/media/3f3100ae49e552599e0bbd9b60eb783d.svg":s,i.jsx(t.Tooltip,{title:d[l]||d.other,placement:"bottom",children:i.jsx("div",{className:o.iconWrapper,children:i.jsx("img",{src:a,className:o.tileIcon,alt:l})})})}n.propTypes={width:r.default.string.isRequired,height:r.default.number.isRequired,component:r.default.shape({family:r.default.string,material:r.default.string,bit_type:r.default.string}).isRequired},module.exports=n;
1
+ "use strict";var e=require("prop-types"),t=require("@material-ui/core"),i=require("react/jsx-runtime");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(e),s="/static/media/3f3100ae49e552599e0bbd9b60eb783d.svg",d="/static/media/7dcfb5193fd2f60e28374f31ee0a26bf.svg",c={bit:"Bit",other:"Non Magnetic",pdm:"PDM",rss:"Rotary Steerables",stabilizer:"Stabilizer",ags:"AGS"},n=t.makeStyles({iconWrapper:{width:function(e){return e.width},height:function(e){return e.height}},tileIcon:{width:"100%",height:"100%"}});function f(e){var a,r=e.component,f=e.width,l=e.height,o=r.family,u=(r.material,n({width:f,height:l}));return a="bit"===o?"/static/media/50e73f59728296f6d5a248384d53193a.svg":"pdm"===o?"/static/media/d8f7c4b371a4666ca44cae9ec3058c26.svg":"rss"===o?"/static/media/bf34c472868f0f04afd2523062f9f363.svg":"stabilizer"===o||"ags"===o?s:d,i.jsx(t.Tooltip,{title:c[o]||c.other,placement:"bottom",children:i.jsx("div",{className:u.iconWrapper,children:i.jsx("img",{src:a,className:u.tileIcon,alt:o})})})}f.propTypes={width:r.default.string.isRequired,height:r.default.number.isRequired,component:r.default.shape({family:r.default.string,material:r.default.string,bit_type:r.default.string}).isRequired},module.exports=f;
2
2
  //# sourceMappingURL=BHATileIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BHATileIcon.js","sources":["../../../../src/components/Drillstring/BHATileIcon.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport { Tooltip, makeStyles } from '@material-ui/core';\n\nimport BitIcon from './assets/small-bha/bit.svg';\nimport PdmIcon from './assets/small-bha/pdm.svg';\nimport RssIcon from './assets/small-bha/rss.svg';\nimport StabilizerIcon from './assets/small-bha/stabilizer.svg';\nimport NonMagIcon from './assets/small-bha/non-mag.svg';\n\nconst TileTooltip = {\n bit: 'Bit',\n other: 'Non Magnetic',\n pdm: 'PDM',\n rss: 'Rotary Steerables',\n stabilizer: 'Stabilizer',\n};\n\nconst useStyles = makeStyles({\n iconWrapper: {\n width: ({ width }) => width,\n height: ({ height }) => height,\n },\n tileIcon: {\n width: '100%',\n height: '100%',\n },\n});\n\nfunction BHATileIcon({ component, width, height }) {\n const { family, material } = component;\n const classes = useStyles({ width, height });\n\n let icon;\n if (family === 'bit') {\n icon = BitIcon;\n } else if (family === 'pdm') {\n icon = PdmIcon;\n } else if (family === 'rss') {\n icon = RssIcon;\n } else if (family === 'stabilizer') {\n icon = StabilizerIcon;\n } else if (family === 'other' || material === 'Non Magnetic') {\n icon = NonMagIcon;\n } else {\n icon = NonMagIcon;\n }\n\n return (\n <Tooltip title={TileTooltip[family] || TileTooltip.other} placement=\"bottom\">\n <div className={classes.iconWrapper}>\n <img src={icon} className={classes.tileIcon} alt={family} />\n </div>\n </Tooltip>\n );\n}\n\nBHATileIcon.propTypes = {\n width: PropTypes.string.isRequired,\n height: PropTypes.number.isRequired,\n component: PropTypes.shape({\n family: PropTypes.string,\n material: PropTypes.string,\n bit_type: PropTypes.string,\n }).isRequired,\n};\n\nexport default BHATileIcon;\n"],"names":["NonMagIcon","TileTooltip","bit","other","pdm","rss","stabilizer","useStyles","makeStyles","iconWrapper","width","_ref","height","_ref2","tileIcon","BHATileIcon","_ref3","icon","component","family","classes","material","_jsx","Tooltip","title","placement","children","jsx","className","src","alt","propTypes","PropTypes","string","isRequired","number","shape","bit_type"],"mappings":"0LACwDA,EAAA,qDAQlDC,EAAc,CAClBC,IAAK,MACLC,MAAO,eACPC,IAAK,MACLC,IAAK,oBACLC,WAAY,cAGRC,EAAYC,EAAAA,WAAW,CAC3BC,YAAa,CACXC,MAAO,SAAAC,GAAQ,SAALD,KAAiB,EAC3BE,OAAQ,SAAAC,GAAS,SAAND,MAAmB,GAEhCE,SAAU,CACRJ,MAAO,OACPE,OAAQ,UAIZ,SAASG,EAA0CC,GAAA,IAI7CC,EAJiBC,IAAAA,UAAWR,IAAAA,MAAOE,IAAAA,OAC/BO,EAAqBD,EAArBC,OACFC,GADuBF,EAAbG,SACAd,EAAU,CAAEG,MAAAA,EAAOE,OAAAA,KAiBnC,OAbEK,EADa,QAAXE,EAhCkD,qDAkChC,QAAXA,EAlC2C,qDAoChC,QAAXA,EApC2C,qDAsChC,eAAXA,EAtC2C,qDAyC7CnB,EAMPsB,EAAAA,IAACC,EAAAA,QAAO,CAACC,MAAOvB,EAAYkB,IAAWlB,EAAYE,MAAOsB,UAAU,SAAQC,SAC1EJ,EAAAK,IAAA,MAAA,CAAKC,UAAWR,EAAQX,YAAYiB,SAClCJ,EAAAK,IAAA,MAAA,CAAKE,IAAKZ,EAAMW,UAAWR,EAAQN,SAAUgB,IAAKX,OAI1D,CAEAJ,EAAYgB,UAAY,CACtBrB,MAAOsB,EAAAA,QAAUC,OAAOC,WACxBtB,OAAQoB,EAAAA,QAAUG,OAAOD,WACzBhB,UAAWc,EAAS,QAACI,MAAM,CACzBjB,OAAQa,EAAS,QAACC,OAClBZ,SAAUW,EAAS,QAACC,OACpBI,SAAUL,EAAS,QAACC,SACnBC"}
1
+ {"version":3,"file":"BHATileIcon.js","sources":["../../../../src/components/Drillstring/BHATileIcon.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport { Tooltip, makeStyles } from '@material-ui/core';\n\nimport BitIcon from './assets/small-bha/bit.svg';\nimport PdmIcon from './assets/small-bha/pdm.svg';\nimport RssIcon from './assets/small-bha/rss.svg';\nimport StabilizerIcon from './assets/small-bha/stabilizer.svg';\nimport NonMagIcon from './assets/small-bha/non-mag.svg';\n\nconst TileTooltip = {\n bit: 'Bit',\n other: 'Non Magnetic',\n pdm: 'PDM',\n rss: 'Rotary Steerables',\n stabilizer: 'Stabilizer',\n ags: 'AGS',\n};\n\nconst useStyles = makeStyles({\n iconWrapper: {\n width: ({ width }) => width,\n height: ({ height }) => height,\n },\n tileIcon: {\n width: '100%',\n height: '100%',\n },\n});\n\nfunction BHATileIcon({ component, width, height }) {\n const { family, material } = component;\n const classes = useStyles({ width, height });\n\n let icon;\n if (family === 'bit') {\n icon = BitIcon;\n } else if (family === 'pdm') {\n icon = PdmIcon;\n } else if (family === 'rss') {\n icon = RssIcon;\n } else if (family === 'stabilizer') {\n icon = StabilizerIcon;\n } else if (family === 'ags') {\n icon = StabilizerIcon;\n } else if (family === 'other' || material === 'Non Magnetic') {\n icon = NonMagIcon;\n } else {\n icon = NonMagIcon;\n }\n\n return (\n <Tooltip title={TileTooltip[family] || TileTooltip.other} placement=\"bottom\">\n <div className={classes.iconWrapper}>\n <img src={icon} className={classes.tileIcon} alt={family} />\n </div>\n </Tooltip>\n );\n}\n\nBHATileIcon.propTypes = {\n width: PropTypes.string.isRequired,\n height: PropTypes.number.isRequired,\n component: PropTypes.shape({\n family: PropTypes.string,\n material: PropTypes.string,\n bit_type: PropTypes.string,\n }).isRequired,\n};\n\nexport default BHATileIcon;\n"],"names":["StabilizerIcon","NonMagIcon","TileTooltip","bit","other","pdm","rss","stabilizer","ags","useStyles","makeStyles","iconWrapper","width","_ref","height","_ref2","tileIcon","BHATileIcon","_ref3","icon","component","family","classes","material","_jsx","Tooltip","title","placement","children","jsx","className","src","alt","propTypes","PropTypes","string","isRequired","number","shape","bit_type"],"mappings":"0LACwDA,EAAA,qDAAAC,EAAA,qDAQlDC,EAAc,CAClBC,IAAK,MACLC,MAAO,eACPC,IAAK,MACLC,IAAK,oBACLC,WAAY,aACZC,IAAK,OAGDC,EAAYC,EAAAA,WAAW,CAC3BC,YAAa,CACXC,MAAO,SAAAC,GAAQ,SAALD,KAAiB,EAC3BE,OAAQ,SAAAC,GAAS,SAAND,MAAmB,GAEhCE,SAAU,CACRJ,MAAO,OACPE,OAAQ,UAIZ,SAASG,EAA0CC,GAAA,IAI7CC,EAJiBC,IAAAA,UAAWR,IAAAA,MAAOE,IAAAA,OAC/BO,EAAqBD,EAArBC,OACFC,GADuBF,EAAbG,SACAd,EAAU,CAAEG,MAAAA,EAAOE,OAAAA,KAmBnC,OAfEK,EADa,QAAXE,EAjCkD,qDAmChC,QAAXA,EAnC2C,qDAqChC,QAAXA,EArC2C,qDAuChC,eAAXA,GAEW,QAAXA,EADFrB,EAIAC,EAMPuB,EAAAA,IAACC,EAAAA,QAAO,CAACC,MAAOxB,EAAYmB,IAAWnB,EAAYE,MAAOuB,UAAU,SAAQC,SAC1EJ,EAAAK,IAAA,MAAA,CAAKC,UAAWR,EAAQX,YAAYiB,SAClCJ,EAAAK,IAAA,MAAA,CAAKE,IAAKZ,EAAMW,UAAWR,EAAQN,SAAUgB,IAAKX,OAI1D,CAEAJ,EAAYgB,UAAY,CACtBrB,MAAOsB,EAAAA,QAAUC,OAAOC,WACxBtB,OAAQoB,EAAAA,QAAUG,OAAOD,WACzBhB,UAAWc,EAAS,QAACI,MAAM,CACzBjB,OAAQa,EAAS,QAACC,OAClBZ,SAAUW,EAAS,QAACC,OACpBI,SAAUL,EAAS,QAACC,SACnBC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/asyncToGenerator"),s=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),n=require("@babel/runtime/regenerator"),i=require("react"),o=require("classnames"),u=require("lodash"),l=require("@material-ui/icons"),a=require("./effects/useFetchWells.js"),c=require("./effects/useAdvancedWells.js"),d=require("./effects/useBicWells.js"),p=require("./effects/useCompanyMetricKey.js"),m=require("./effects/useFilterOptions.js"),q=require("./effects/useFilteredWells.js"),j=require("./effects/useSortedWells.js");require("./effects/useAssetsData.js");var f=require("./effects/useTableColumns.js"),C=require("./effects/useCompanyProvider.js"),A=require("./components/AppHeader/AppHeader.js"),v=require("./components/Toolbar/Toolbar.js"),S=require("./components/Filter/Filter.js"),g=require("./components/Map/WellsMap.js"),h=require("./components/OffsetWellsTable/OffsetWellsTable.js"),V=require("./constants.js"),b=require("./components/OffsetWellsTable/AdvancedSearch/constants.js"),T=require("./utils/index.js"),I=require("./OffsetWellPickerV4.module.css.js");require("../../utils/index.js"),require("../../clients/subscriptions/constants.js"),require("querystring"),require("uuid/v1"),require("../../clients/subscriptions.v1.js"),require("../../clients/jsonApi/index.js"),require("../../clients/subscriptions/subscriptions-client.factory.js"),require("../../constants/goals.js"),require("../../constants/segment.js"),require("../../constants/alerts.js"),require("../../constants/apps.js"),require("../../constants/drillstring.js"),require("../../constants/completion.js"),require("../../constants/appPackages.js"),require("../../constants/notifications.js"),require("../../constants/feed.js"),require("../../constants/bha.js"),require("../../constants/corvaCompanyId.js"),require("../GradientManager/configuration/constants.js"),require("uuid"),require("jsona"),require("../../utils/env.js"),require("../StatusBadge/constants.js"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment"),require("../../clients/api/apiCore.js"),require("../../clients/constants.js"),require("../../clients/sso/auth0.js"),require("../../clients/sso/oauth2.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../../constants/streamSourceType.js"),require("../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js");var y=require("react/jsx-runtime"),x=require("../../componentsV2/AppCommonsProvider/AppCommonsContext.js");require("@material-ui/core/Snackbar"),require("../Notifications/Toast.js"),require("../Notifications/Notifications.scss.js");var D=require("../Notifications/NotificationsContainer.js"),P=require("../../utils/mobileDetect.js"),E=require("../../styles/typography/index.js");require("../../styles/counter/counter.module.scss.js");var W=require("../Typography.js"),L=require("../Modal/Modal.js");require("../IconMenu/index.js"),require("../StyledMenuItem/index.js"),require("../AppIcon/AppIcon.js"),require("../DevCenter/AppHeader/AppHeader.js"),require("../DevCenter/AppSideBar/AppSideBar.js"),require("../DevCenter/AppsDataProvider/AppsDataProvider.js"),require("@material-ui/core"),require("../DevCenter/AppContext.js"),require("../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js"),require("../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js"),require("@babel/runtime/helpers/objectWithoutProperties"),require("react-router"),require("../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js"),require("../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js"),require("../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js"),require("../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js"),require("../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js"),require("../../componentsV2/Text/Text.js"),require("../../componentsV2/Grid/Grid.js"),require("../../componentsV2/Grid/Grid.scss.js"),require("../../componentsV2/Header/Header.scss.js"),require("../../componentsV2/Button/Button.js"),require("../../componentsV2/ButtonIcon/ButtonIcon.js"),require("../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js"),require("../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js"),require("../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js"),require("../../componentsV2/Tooltip/Tooltip.scss.js"),require("../../componentsV2/Popover/Popover.js"),require("../../componentsV2/Radio/Radio.js"),require("../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js"),require("../../componentsV2/Checkbox/Checkbox.js"),require("../../componentsV2/TextInput/TextInput.js"),require("../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js"),require("../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js"),require("../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js"),require("../../componentsV2/TextLink/TextLink.js"),require("../../componentsV2/Chip/Chip.js"),require("../../componentsV2/ChipAlert/ChipAlert.js"),require("../../componentsV2/ChipIndicator/ChipIndicator.js"),require("../../componentsV2/Avatar/Avatar.js"),require("../../componentsV2/Avatar/constants.js"),require("../../componentsV2/AvatarGroup/AvatarGroup.scss.js"),require("@material-ui/lab"),require("../../componentsV2/ToggleButtons/ToggleButtons.scss.js"),require("../../componentsV2/Paper/Paper.js"),require("../../componentsV2/ModalWindow/ModalWindow.scss.js"),require("@icon-park/react/es/all"),require("../../icons/IconParkProvider.js"),require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../componentsV2/Modal/Modal.scss.js"),require("../../componentsV2/Menu/Menu.js"),require("../../componentsV2/Counter/Counter.js"),require("../../componentsV2/BadgeBase/BadgeBase.scss.js"),require("../../componentsV2/BadgeDot/BadgeDot.scss.js"),require("../../componentsV2/LoaderLinear/LoaderLinear.scss.js"),require("../../componentsV2/LoaderLogo/LoaderLogo.constants.js"),require("../../componentsV2/LoaderLogo/LoaderLogo.scss.js"),require("../../componentsV2/Switch/Switch.js"),require("../../componentsV2/Tabs/Tabs.js"),require("../../componentsV2/EmptyState/EmptyState.scss.js"),require("../../componentsV2/FileIcon/FileIcon.js"),require("../../componentsV2/Tag/Tag.js"),require("react-dropzone"),require("../../componentsV2/FilesDropzone/FilesDropzone.scss.js"),require("../../componentsV2/FilesLoader/FilesLoader.scss.js"),require("../../componentsV2/FilesProcessor/FilesProcessor.scss.js"),require("../../componentsV2/Skeleton/Skeleton.scss.js"),require("../../utils/main.js"),require("../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js"),require("../../componentsV2/Stepper/Step/Step.scss.js"),require("../../componentsV2/Stepper/Stepper.scss.js"),require("../../componentsV2/ButtonLive/ButtonLive.js"),require("../../componentsV2/ButtonText/ButtonText.js"),require("../../componentsV2/LiveDotIndicator/LiveDotIndicator.scss.js"),require("../../componentsV2/IndicatorLive/IndicatorLive.scss.js"),require("../../componentsV2/Accordion/Accordion.scss.js"),require("../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js"),require("../../componentsV2/BadgeComment/BadgeComment.js"),require("../../componentsV2/AppContainer/AppContainer.js"),require("../../componentsV2/AppContainer/AppContainer.constants.js"),require("../../componentsV2/AppFooter/AppFooter.js"),require("../../componentsV2/AppHeader/AppHeader.constants.js"),require("../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js"),require("../../componentsV2/AppHeader/AppAssets/utils.js"),require("../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js"),require("../PadModeSelect/PadModeSelect.js"),require("../../componentsV2/AppHeader/PadMode/PadMode.scss.js"),require("../../types/shared/Completions.js"),require("../PadModeSelect/types.js"),require("lodash/flatten"),require("lodash/partition"),require("../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js"),require("../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.constants.js"),require("../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js"),require("../../componentsV2/PadModeSelect/PadModeSelect.constants.js"),require("../../componentsV2/PadModeSelect/PadModeSelect.scss.js"),require("../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js"),require("../../componentsV2/UniversalLink/UniversalLink.scss.js"),require("../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js"),require("../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js"),require("../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js"),require("../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js"),require("../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js"),require("../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js"),require("../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js"),require("../../componentsV2/AppDqPopover/AppDqPopover.scss.js"),require("../../utils/getSingleAsset.js"),require("../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js"),require("../../componentsV2/AppHeader/V3/AssetSelector/constants.js"),require("../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js"),require("../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js"),require("../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js"),require("../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js"),require("../../componentsV2/AppContainer/headerCommon.scss.js"),require("../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js"),require("../../componentsV2/AppHeader/V3/constants.scss.js"),require("@babel/runtime/helpers/typeof"),require("../../componentsV2/AppSizeProvider/AppSizeProvider.js"),require("../../componentsV2/AppSettings/AppSettings.js"),require("../../componentsV2/AppSettings/AppSettings.constants.js"),require("../../componentsV2/AppSettings/AppSettingsPinningContext.js"),require("../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.js"),require("../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js"),require("../../componentsV2/AppHeader/V3/Actions/Actions.constants.js"),require("../../componentsV2/AppHeader/V3/Actions/Actions.scss.js"),require("../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js"),require("../../componentsV2/AppHeader/AppHeader.scss.js"),require("../../componentsV2/OffsetWellsButton/OffsetWellsButton.scss.js"),require("../../componentsV2/Autocomplete/Autocomplete.scss.js"),require("../../componentsV2/Menu/MenuItem/MenuItem.scss.js"),require("../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js"),require("../../componentsV2/WellArchivedMessage/WellArchivedMessage.js"),require("../../componentsV2/DatePicker/CalendarControls/CalendarControls.scss.js"),require("../../componentsV2/DatePicker/TimePicker/TimePicker.js"),require("../../componentsV2/DatePicker/Input/Input.js"),require("../../componentsV2/DatePicker/CalendarGrid/CalendarGrid.scss.js"),require("../../componentsV2/DatePicker/DatePicker.scss.js"),require("../../componentsV2/DragHandle/DragHandle.js"),require("../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js"),require("../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js"),require("../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js"),require("../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js"),require("rollbar"),require("@rollbar/react"),require("../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js"),require("../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js"),require("../Icons/AnnotationIcon.js"),require("../Annotations/components/AnnotationsList/index.js"),require("../Annotations/components/LastAnnotation/index.js"),require("../Annotations/AnnotationsContext.js"),require("../Toaster/Toaster.js"),require("../HelpCenter/HelpCenterIcon.js"),require("../DevCenter/NavigationBar/NavigationBar.js"),require("../DevCenter/SideBar/SideBar.js"),require("../DevCenter/AppSettingsPopover/AppSettingsPopover.js"),require("../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js"),require("../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js"),require("../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js"),require("../AssetEditor/index.js"),require("../AssetEditorV2/index.js"),require("../AppVersionsSelect/AppVersionsSelect.js");var M=require("../LoadingIndicator/LoadingIndicator.js");require("../RealTimeValuesSidebar/RealTimeSidebar.js"),require("../CollapsableSidebar.js"),require("../DateTimePicker/index.js"),require("../DatePicker/index.js"),require("../ErrorBoundary/ErrorBoundary.js"),require("../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js"),require("../SlateFormattedText/SlateFormattedText.js"),require("../SlateFormattedText/RenderElements.js"),require("slate"),require("../EmptyState/EmptyState.js"),require("../ParameterCharts/ParameterCharts.js"),require("../ParameterCharts/AddEditTrack.js"),require("../ChartActionsList/ChartActionsList.js"),require("../CopyToClipboard/CopyToClipboard.js"),require("../AssetEditor/AssetEditorAutocomplete.js"),require("../AssetEditor/SingleAssetEditor.js"),require("react-color"),require("../SettingEditors/ColorEditor/style.css.js"),require("../SettingEditors/DropdownEditor/index.js"),require("../SwitchControl/index.js"),require("../ColorPicker/ColorPicker.js"),require("../Chart/components/ChartButton.js"),require("../Chart/components/ChartButtons.js"),require("../Chart/components/ChartWrapper.js"),require("../Chart/components/AxisDropdown.js"),require("../Chart/components/ChartSelect.js"),require("../Chart/components/buttons/DragToZoomButton.js"),require("../Chart/components/buttons/ZoomInButton.js"),require("../Chart/components/buttons/ZoomOutButton.js"),require("../Chart/components/buttons/PanButton.js"),require("../Chart/components/buttons/ResetZoomButton.js"),require("../Chart/components/buttons/HideAxesButton.js"),require("../Chart/components/buttons/ChartTypeButton.js"),require("../ColorPicker/PaletteChromePicker/PaletteChromePicker.js"),require("../TruncatedText/index.js"),require("../MiddleTruncatedText/MiddleTruncatedText.js"),require("../RangeSlider/constants.js"),require("../RangeSlider/Input.css.js"),require("../RangeSlider/RangeSlider.css.js"),require("../AdvancedSlider/AdvancedSlider.js"),require("../Breadcrumbs/index.js"),require("../VirtualizedTable/index.js"),require("../EmptyView/EmptyView.js"),require("../EmptyView/EmptyAppView/EmptyAppView.js");var O=require("../Button/components/Button/index.js");require("moment-timezone"),require("../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js"),require("../Button/components/LiveButton/styles.js"),require("../ContextMenuItem/index.js"),require("../FolderMenuItem/index.js"),require("../EditableItem/EditableItem/index.js"),require("../EditableItem/EditableItemWithBadge/index.js"),require("../Checkbox/index.js"),require("../FolderMenuItemWithLinks/index.js"),require("../IconButton/index.js"),require("../TextField/index.js"),require("../Chip/index.js"),require("../Counter/index.js"),require("../AnchorsList/AnchorsList.js"),require("../Select/index.js"),require("../Select/SelectFilterBy.js"),require("../CustomSelect/index.js"),require("../Tabs/Tabs.js"),require("../Tabs/Tab.js"),require("../ResizableTable/ResizableTable.js"),require("../GradientPicker/GradientPicker.js"),require("../GradientManager/GradientList.js"),require("@material-ui/icons/AddCircle"),require("../GradientManager/GradientPreview/GradientPreview.js"),require("../GradientManager/GradientSelect.styles.js"),require("../GradientManager/GradientManager.styles.js"),require("../Drillstring/BHASchematic.js"),require("../Drillstring/BHATable/index.js"),require("../Drillstring/BHAComponentIcon.js"),require("../Drillstring/BHAComponentDetail/index.js"),require("../Drillstring/BHATileIcon.js"),require("../Drillstring/BHATile/BHATile.js"),require("../Drillstring/BHAList/BHAList.js"),require("../Drillstring/BHAComponentsTable/BHAComponentsTable.js"),require("../Casing/CasingTable/index.js"),require("../Casing/CasingComponentIcon.js"),require("../Casing/CasingTileIcon.js"),require("../Casing/CasingTableV2/CasingTableV2.js"),require("../Casing/CasingTile/CasingTile.js"),require("../DisabledSettingsMessage/DisabledSettingsMessage.js"),require("../WellSummary/WellSummaryItemLabel.js"),require("../WellSummary/WellSummaryItemTitle.js"),require("../WellSummary/WellSummaryItemValue.js"),require("../WellSummary/ActivitySummaryChart.js"),require("../WellSummary/FracWirelineTimeChart.js"),require("../BICOffsetPickerDialog/index.js"),require("../OffsetWellButton/OffsetWellButton.js"),require("../OffsetWellPickerV2/OffsetWellPickerDialog.js"),require("../OffsetWellPickerV3/index.js"),require("../OffsetWellChips/Chip.js"),require("../OffsetWellChips/ChipsContainer.js"),require("../OffsetWellMap/OffsetWellMap.js"),require("../ConfirmationDialog.js"),require("../TextLink/index.js"),require("../Avatar/index.js"),require("../Template/TemplatePopover/index.js"),require("../Template/TemplateSharingDialog/index.js"),require("../MenuItem/index.js"),require("../MiddleTruncate/MiddleTruncate.js"),require("../PinnableFilters/PinnableFilters.js"),require("../HeaderLayout/HeaderLayout.js"),require("../PadOffsetsPicker/PadOffsetsPicker.js"),require("../PadOffsetsPicker/OffsetAssetChip.js"),require("../PadOffsetsPicker/OffsetAssetsListExpander.js"),require("../PadOffsetsPicker/StagesSelector.js"),require("../PadOffsetsPickerV2/PadOffsetsPickerV2.js"),require("../Table/TableToolbar/TableToolbar.js"),require("../Table/TableContainer/TableContainer.js"),require("../Table/TableCell/TableCell.js"),require("../Table/TablePagination/TablePagination.js"),require("../Table/TablePaginationActions/TablePaginationActions.js");var B=require("../Tooltip/Tooltip.js");require("../Tooltip/ScrollableTooltip.js"),require("../PriceInput/PriceInput.js"),require("../LabelsCounter/LabelsCounter.js"),require("../Stepper/Stepper.js"),require("../Stepper/Step/Step.js"),require("../Stepper/StepsWrapper.js"),require("../Comment/CommentIcon/index.js"),require("../FilesLoader/FilesLoader.js"),require("../SearchInput/index.js"),require("../FeedItem/FeedItem.js"),require("../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js"),require("../PostInput/PostInput.js"),require("../KeyboardDateTimePicker.js"),require("../AddComment/Popover.js"),require("../AddComment/Popup.js"),require("../StageDesignVActual/ComparisonBar/ComparisonBar.js"),require("../StageDesignVActual/ElementsComparison/ElementsComparison.js"),require("../StageDesignVActual/ComparisonHeader.js"),require("../StageDesignVActual/ComparisonRow.js"),require("../EmbeddedApp/DevCenterEmbeddedApp.js"),require("../EmbeddedApp/EmbeddedApp.js"),require("../Autocomplete/Autocomplete.js"),require("../DocumentViewer/DocumentViewer.js"),require("../ColorPickerPalette/ColorPickerPalette.js"),require("../Search/Search.js"),require("../Search/components/Listbox.js"),require("../Search/components/Paper.js"),require("../Search/components/RecentSearches.js"),require("../Search/components/Groups.js"),require("../Search/components/SelectAllListItem.js"),require("../StatusBadge/index.js"),require("../Attachment/index.js"),require("../EmojiIconButton.js"),require("../FileUploadIconButton.js"),require("../FilePreview/index.js"),require("../FailedFileUploading.js"),require("../UserMention/index.js"),require("../CommentsInfo/index.js"),require("../CommentInput/index.js"),require("../Comment/index.js"),require("../CommentLoader.js"),require("../AssetNameLabel/AssetStatusBadge.js"),require("../AssetEditorV2/components/PrimaryAssetSelect.js"),require("../AssetEditorV2/components/SecondaryAssetSelect.js"),require("../AssetEditorV2/components/SelectItem.js"),require("../AssetEditorV2/components/MultipleAssetsToggle.js"),require("../AssetEditorV2/components/PrimaryAssetSelectV2.js"),require("../EChartsWrapper/EChartsWrapper.js"),require("../AssetsMultipleSelector/AssetsMultipleSelector.js"),require("@material-ui/icons/Close"),require("@material-ui/icons/GetApp"),require("../GoogleDocsViewer/index.js"),require("../NewDocumentViewer/effects/useFileContent.js"),require("../NewDocumentViewer/styles.js"),require("../FilesLoaderV2/styles.js"),require("../FilesDropzone/styles.js"),require("../FilesProcessor/styles.js"),require("../Hint/styles.js"),require("@babel/runtime/helpers/taggedTemplateLiteral"),require("fparser"),require("../Formula/useFormulaStyles.js"),require("../Formula/RootXIcon.js"),require("../Formula/FormulaTextEditor.js"),require("../Formula/CloseSuggestion.js"),require("../Formula/SuggestionsMenu.js");var F=require("../../utils/notificationToasts.js");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var k=w(e),H=w(r),R=w(s),N=w(t),_=w(n),G=w(o);function U(e,r){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),s.push.apply(s,t)}return s}function z(e){for(var r=1;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?U(Object(s),!0).forEach((function(r){R.default(e,r,s[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):U(Object(s)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))}))}return e}var K="OffsetWellPickerV4";module.exports=function(e){var r,s,t,n=e.open,o=e.isWDUser,w=e.defaultSubjectWell,U=e.currentUser,Y=e.offsetSettings,Z=e.addWellsUsabilityInfo,X=e.isViewOnly,J=e.onClose,Q=e.onSave,$=e.maxOffsetSize,ee=void 0===$?V.DEFAULT_BIC_OFFSET_SIZE:$,re=e.localMaxOffsetSize,se=void 0===re?V.DEFAULT_LOCAL_OFFSET_SIZE:re,te=e.syncAutoEnabled,ne=e.isManualWellsEnabled,ie=void 0!==ne&&ne,oe=x.useAppCommons(),ue=null==oe?void 0:oe.globalOffsetWells,le=i.useState(null),ae=N.default(le,2),ce=ae[0],de=ae[1],pe=Math.min(ee+1,se+1,V.MAX_OFFSET_SIZE+1),me=Math.min(Math.max(pe,se+1),V.MAX_OFFSET_SIZE+1),qe=i.useState(null==Y?void 0:Y.filterExpanded),je=N.default(qe,2),fe=je[0],Ce=je[1],Ae=i.useState(null==Y?void 0:Y.mapHidden),ve=N.default(Ae,2),Se=ve[0],ge=ve[1],he=+(null==w?void 0:w.companyId)||+(null==U?void 0:U.company_id),Ve=null==w?void 0:w.asset_id,be=i.useState((null==Y?void 0:Y.filters)||{}),Te=N.default(be,2),Ie=Te[0],ye=Te[1],xe=i.useState((null==Y?void 0:Y.wellSection)||V.ALL_SECTION_KEY),De=N.default(xe,2),Pe=De[0],Ee=De[1],We=i.useRef(!0),Le=i.useState([]),Me=N.default(Le,2),Oe=Me[0],Be=Me[1],Fe=i.useState(null),we=N.default(Fe,2),ke=we[0],He=we[1],Re=i.useState(!0),Ne=N.default(Re,2),_e=Ne[0],Ge=Ne[1];i.useEffect((function(){if(ue&&Array.isArray(ue)){var e=z(z({},Y),{},{selectedWellIds:ue.map((function(e){return e.id}))});Q(e,ue)}}),[ue]);var Ue=i.useState(!1),ze=N.default(Ue,2),Ke=ze[0],Ye=ze[1],Ze=i.useState(!1),Xe=N.default(Ze,2),Je=Xe[0],Qe=Xe[1],$e=i.useRef(),er=i.useRef(),rr=i.useState(V.ViewType.none),sr=N.default(rr,2),tr=sr[0],nr=sr[1],ir=i.useRef(),or=i.useState(!1),ur=N.default(or,2),lr=ur[0],ar=ur[1],cr=me<=(null==Oe?void 0:Oe.length),dr=V.TOP_GRADIENT_MAP[tr],pr=i.useRef(),mr=i.useState(!0),qr=N.default(mr,2),jr=qr[0],fr=qr[1];i.useEffect((function(){var e,r,s;(n&&cr&&F.showInfoNotification("App can’t process more than (".concat(me-1,") Offset Wells.")),n)||((null==Y||null===(e=Y.selectedWellIds)||void 0===e?void 0:e.length)===(null===(r=pr.current)||void 0===r?void 0:r.length)&&(null==Y||null===(s=Y.selectedWellIds)||void 0===s?void 0:s.every((function(e){var r;return null===(r=pr.current)||void 0===r?void 0:r.includes(e)})))||(We.current=!0),pr.current=null==Y?void 0:Y.selectedWellIds)}),[cr,n,Y]),i.useEffect((function(){function e(){window.innerWidth<=V.SMALL_SCREEN_WIDTH||P.isMobileDetected||P.isNativeDetected?nr(V.ViewType.mobile):window.innerHeight<=V.SMALL_SCREEN_HEIGHT?nr(V.ViewType.small):nr(V.ViewType.normal)}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n]),i.useEffect((function(){ir.current&&tr===ir.current||(ir.current=tr,tr===V.ViewType.small||tr===V.ViewType.mobile?(ge(!0),Ce(!1)):(Ce(!X&&(null==Y?void 0:Y.filterExpanded)),ge(!X&&(null==Y?void 0:Y.mapHidden))),ye((null==Y?void 0:Y.filters)||{}),Ee((null==Y?void 0:Y.wellSection)||V.ALL_SECTION_KEY))}),[Y,X,tr]);var Cr=a.useFetchWells(he,Z),Ar=N.default(Cr,2),vr=Ar[0],Sr=Ar[1],gr=C.useCompanyProvider(he),hr=N.default(gr,1)[0],Vr=d.useBicWells(o,U,Ve,vr,ie),br=N.default(Vr,7),Tr=br[0],Ir=br[1],yr=br[2],xr=br[3],Dr=br[4],Pr=br[5],Er=br[6];i.useEffect((function(){fr(!0),Ir(null),xr(null)}),[Ve]);var Wr=p.useCompanyMetricKey(he,null==Y?void 0:Y.metricsKeys),Lr=N.default(Wr,2),Mr=Lr[0],Or=Lr[1],Br=c.useAdvancedWells(he,vr,Tr,yr,Ve,Mr,n),Fr=!Sr&&(null==Br?void 0:Br.length)===(null==vr?void 0:vr.length);i.useEffect((function(){if(Fr){var e,r=(e=H.default(_.default.mark((function e(){var r,s,t,n,i,o,u,l,a,c;return _.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=void 0===(null==Y?void 0:Y.isSynced)||(null==Y?void 0:Y.isSynced),s=!0,!r){e.next=19;break}if(n=yr[V.ALL_SECTION_KEY]||[],i=((null==Y?void 0:Y.selectedWellIds)||[]).every((function(e){return n.includes(e)})),n.length===(null==Y||null===(t=Y.selectedWellIds)||void 0===t?void 0:t.length)&&i){e.next=16;break}return e.next=8,T.getCoordinatedWells(n,Ve);case 8:o=e.sent,u=o.slice(0,pe+1).map((function(e){return e.id})),u=o.slice(0,se+1).map((function(e){return e.id})),l=z(z({},Y),{},{subjectWellId:Ve,selectedWellIds:u,offsetWellsLimited:me<=u.length}),a=o.filter((function(e){return u.includes(e.id)})),Q(l,a),e.next=17;break;case 16:s=!1;case 17:e.next=20;break;case 19:s=!1;case 20:if(s){e.next=25;break}return e.next=23,T.getCoordinatedWells((null==Y?void 0:Y.selectedWellIds)||[],Ve);case 23:c=e.sent,Q(Y,c);case 25:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)});te&&jr&&Y&&yr&&(r(),fr(!1))}}),[Y,yr,Ve,me,te]);var wr=m.useFilterOptions(Br);i.useEffect((function(){if(Br&&Tr){var e=Br.find((function(e){return e.id===Ve}));if(e){var r=Tr.filter((function(e){return e.value!==V.ALL_SECTION_KEY})).map((function(e){return e.label})),s=z(z({},e),r.length>0&&R.default({},V.ColumnType.wellSection,r));He(s)}else He(null)}}),[Tr,Br]);var kr=f.useTableColumns(Mr),Hr=q.useFilteredWells(Br,Ie);i.useEffect((function(){if(Hr&&Fr)if(We.current){var e=Br.filter((function(e){return((null==Y?void 0:Y.selectedWellIds)||[]).includes(e.id)}));ke&&(e=e.concat(ke)),Be(u.uniqBy(e,"id")),We.current=!1}else Be((function(e){var r=(Hr||[]).filter((function(r){return!!e.find((function(e){var s=e.id;return r.id===s}))}));return ke&&(r=r.concat(ke)),u.uniqBy(r,"id")}))}),[Br,Hr,null==Y?void 0:Y.selectedWellIds,Fr]);var Rr=j.useSortedWells(ke,Hr,Oe,Ge),Nr=N.default(Rr,5),_r=Nr[0],Gr=Nr[1],Ur=Nr[2],zr=Nr[3],Kr=Nr[4],Yr=i.useCallback((function(e,r,s){var t;t=s===b.SEARCH_CATEGORIES.well.name?r:r.reduce((function(e,r){var s,t=null===(s=Br.find((function(e){return e.id===r})))||void 0===s?void 0:s.rigName,n=Br.filter((function(e){return e.rigName===t})).map((function(e){return e.id}));return e.concat(n)}),[]);var n=Br.filter((function(e){var r=e.id;return t.includes(r)}));e?(n=n.slice(0,Math.min(n.length,me-Oe.length)),Be((function(e){return u.uniqBy(e.concat(n),"id")}))):Be((function(e){return u.uniq(e.filter((function(e){var r=e.id;return!n.find((function(e){return e.id===r}))})))}))}),[Br,Oe]),Zr=i.useCallback((function(){Qe(!0)}),[]),Xr=i.useCallback((function(e){Or(e)}),[]),Jr=i.useCallback((function(e,r){Be(r?function(r){return[].concat(k.default(r),[e])}:function(r){return r.filter((function(r){return r.id!==e.id}))})}),[]),Qr=i.useCallback((function(e){if(e){var r=ke?Hr.concat(ke):Hr,s=u.sortBy(u.uniqBy(r,"id"),"distance");Be(s.slice(0,me))}else Be(ke?[ke]:[])}),[Hr,ke,me]),$r=function(e){if(yr){var r=(null==Br?void 0:Br.filter((function(r){var s;return null===(s=yr[e])||void 0===s?void 0:s.includes(r.id)})))||[],s=u.sortBy(r,"distance");Be(s.slice(0,pe))}else Be(ke?[ke]:[])},es=i.useCallback((function(e){Ee(e),$r(e)}),[$r]),rs=i.useMemo((function(){return Oe.find((function(e){return e.id===Ve}))?Oe.length-1:Oe.length}),[Oe,Ve]),ss=i.useMemo((function(){if(!yr)return!1;var e=Oe.map((function(e){return e.id})),r=yr[Pe]||[];return Math.min(r.length,pe)===e.length&&e.every((function(e){return r.includes(e)}))}),[yr,Oe,Pe,pe]),ts=i.useMemo((function(){return!!hr&&V.COMPANY_PROVIDERS_FOR_IDAS.includes(hr)}),[hr]),ns=i.useMemo((function(){return ts?"IDAS generated offsets.":o?"Offset Selection App.":"WellHub."}),[ts,o]),is=function(){var e=(Br||[]).filter((function(e){return((null==Y?void 0:Y.selectedWellIds)||[]).includes(e.id)}));ke&&(e=e.concat(ke)),Be(u.uniqBy(e,"id"));var r=z(z({},Y),{},{mapHidden:Se,filterExpanded:fe});Q(r),ye((null==Y?void 0:Y.filters)||{}),Ee((null==Y?void 0:Y.wellSection)||V.ALL_SECTION_KEY),J()},os=_e||Sr,us=i.useMemo((function(){return!os&&(!ss||(!(u.isEmpty(Ie)||!Ie[V.FilterType.sideTracks])||Pe!==V.ALL_SECTION_KEY))}),[ss,Ie,Pe,os]),ls=function(){ye({}),Ee(V.ALL_SECTION_KEY),$r(V.ALL_SECTION_KEY)},as=!Br||!Tr||!Kr||tr===V.ViewType.none,cs=i.useState(!1),ds=N.default(cs,2),ps=ds[0],ms=ds[1],qs=i.useState(V.ROWS_PER_PAGE),js=N.default(qs,2),fs=js[0],Cs=js[1],As=i.useState([]),vs=N.default(As,2),Ss=vs[0],gs=vs[1];i.useEffect((function(){if(Kr){var e=Kr.slice(0,fs);gs(e)}}),[Kr,fs,ke]),i.useEffect((function(){Dr===V.RESYNC_STATUS.SUCCEEDED&&ls()}),[yr]);return y.jsxs(L,{open:n,onClose:is,title:y.jsx(A.AppHeader,{isWDUser:o,viewType:tr,totalCount:null!==(r=null==Br?void 0:Br.length)&&void 0!==r?r:0,selectedCount:rs,isViewOnly:X,maxOffsetWellNumber:me}),isMobile:tr===V.ViewType.mobile,contentContainerClassName:G.default(I.offsetWellDialog),contentClassName:G.default(I.contentContainer,(s={},R.default(s,I.smallContainer,tr===V.ViewType.small),R.default(s,I.contentContainerMobile,tr===V.ViewType.mobile),s)),actionsClassName:I.modalActions,actions:!X&&y.jsxs("div",{className:I.actionsWrapper,children:[!as&&us?y.jsx(B.Tooltip,{placement:"bottom-start",title:"Reset to Synced Offsets in ".concat(o?"Offset App":"Wellhub"),children:y.jsx("div",{children:y.jsx(O,{"data-testid":"".concat(K,"_reset"),onClick:ls,color:"primary",startIcon:tr!==V.ViewType.mobile&&y.jsx(l.Replay,{}),classes:tr===V.ViewType.mobile&&{root:I.resetButtonMobile},children:tr!==V.ViewType.mobile?"Reset":y.jsx(l.Replay,{})})})}):y.jsx("div",{className:tr===V.ViewType.mobile&&I.infoIconContainer,children:tr!==V.ViewType.mobile?y.jsxs(y.Fragment,{children:[y.jsx("span",{className:G.default(E.regular12,E.colors.t6),children:"The offset list is being automatically populated by "}),y.jsx("span",{className:G.default(E.medium12,E.colors.t6),children:ns})]}):y.jsx(B.Tooltip,{title:y.jsxs("div",{children:[y.jsx("span",{className:G.default(E.regular12,E.colors.t1),children:"The offset list is being automatically populated by "}),y.jsx("span",{className:G.default(E.medium12,E.colors.t1),children:ns})]}),enterTouchDelay:0,leaveTouchDelay:V.LEAVE_TOUCH_DELAY,children:y.jsx(l.InfoOutlined,{className:I.infoIcon})})}),y.jsxs("div",{className:I.buttonGap,children:[y.jsx(O,{"data-testid":"".concat(K,"_cancel"),onClick:is,color:"primary",children:"Cancel"}),y.jsxs(O,{"data-testid":"".concat(K,"_selectedWells"),variant:"contained",color:"primary",onClick:function(){J();var e=z(z({},Y),{},{companyId:he,subjectWellId:Ve,selectedWellIds:Oe.map((function(e){return e.id})),filters:Ie,metricsKeys:Mr,wellSection:Pe,isSynced:ss,mapHidden:Se,filterExpanded:fe,offsetWellsLimited:cr});Q(e,Oe)},children:["Select (",rs,")"]})]})]}),children:[y.jsx(D.NotificationsContainer,{}),as?y.jsx(M,{fullscreen:!1}):y.jsxs("div",{className:G.default(I.contentWrapper,R.default({},I.contentBlocked,os)),ref:$e,children:[tr===V.ViewType.mobile&&y.jsxs("div",{className:G.default(I.countContainer,R.default({},I.countContainerMobile,tr===V.ViewType.mobile)),children:[y.jsx(W.Regular14,{className:I.totalLabel,children:"Total:"}),y.jsx(W.Regular14,{"data-testid":"".concat(K,"_totalWells"),className:I.countValue,children:Br.length}),y.jsx(W.Regular14,{className:I.selectedLabel,children:"Selected:"}),y.jsx(W.Regular14,{"data-testid":"".concat(K,"_selected"),className:I.countValue,children:rs}),y.jsx(B.Tooltip,{title:"App can’t process more than (".concat(me-1,") Offset Wells."),placement:"right",children:y.jsxs(W.Regular12,{"data-testid":"".concat(K,"_maxOffsetSize"),className:I.maxOffsetSize,children:["/",me-1]})})]}),tr===V.ViewType.normal&&y.jsx(v.Toolbar,{isViewOnly:X,isXtoProvider:ts,viewType:tr,filters:Ie,setFilters:ye,isFilterExpanded:fe,setIsFilterExpanded:Ce,isMapHidden:Se,setIsMapHidden:ge,resyncStatus:Dr,setResyncStatus:Pr}),lr&&y.jsx("div",{className:I.topGradient,style:{top:dr}}),y.jsxs("div",{className:G.default(I.content,(t={},R.default(t,I.contentBlocked,os),R.default(t,I.contentMobile,tr===V.ViewType.mobile),R.default(t,I.contentiOSMobile,T.getMobileOperatingSystem()===V.IOS_DEVICE),t)),ref:er,onScroll:function(e){return function(e){e.target&&(Je&&(e.target.scrollLeft=0,Qe(!1)),e.target.scrollLeft<=5&&ps&&ms(!1),e.target.scrollLeft>5&&!ps&&ms(!0),e.target.scrollTop<=5&&lr&&ar(!1),e.target.scrollTop>5&&!lr&&ar(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight+2)>=e.target.scrollHeight&&fs<Kr.length&&Cs((function(e){return e+V.ROWS_PER_PAGE})))}(e)},children:[tr!==V.ViewType.normal&&y.jsx(v.Toolbar,{isViewOnly:X,isXtoProvider:ts,viewType:tr,filters:Ie,setFilters:ye,isFilterExpanded:fe,setIsFilterExpanded:Ce,isMapHidden:Se,setIsMapHidden:ge,resyncStatus:Dr,setResyncStatus:Pr}),!Se&&n&&y.jsx(g.WellsMap,{isViewOnly:X,mapHidden:Se,subjectWell:ke,offsetWellIds:Oe.map((function(e){return e.id})),wells:Hr,radius:Ie[V.FilterType.radius],handleChangeOffsetWell:Jr,activeWellId:ce,viewType:tr}),y.jsx(S.Filter,{isHidden:!fe,isWDUser:o,filterOptions:wr,filters:Ie,wellSections:Tr,selectedWellSection:Pe,subjectWell:ke,onChangeFilters:function(e){Ge(!0),setTimeout((function(){return ye(e)}),0)},onChangeBicWells:es}),y.jsx(h,{open:n,isTableLoading:os,companyId:he,subjectWellId:Ve,sortBy:_r,setSortBy:Gr,sortDirection:Ur,setSortDirection:zr,columnsWithDict:kr,wells:Ss,metricsKeys:Mr,setMetricsKeys:Xr,handleChangeOffsetWell:Jr,handleChangeAllOffsetWells:Qr,handleAddRemoveAssets:Yr,isWellNameExpand:Ke,setIsWellNameExpand:Ye,isHScrollMoved:ps,onHideAdvancedSearch:Zr,isViewOnly:X,isLastWell:Kr.length<=fs,contentRef:$e,offsetWellsContainerRef:er,isLimitedOffsetWells:cr,maxOffsetWellNumber:me,wellSections:Tr,setActiveWellId:de,viewType:tr,isWDUser:o,taScores:Er})]}),X&&y.jsxs("div",{className:I.viewOnlyInfoContainer,children:[y.jsx("span",{className:G.default(E.regular12,E.colors.t6),children:"The offset list is being automatically populated by "}),y.jsx("span",{className:G.default(E.medium12,E.colors.t6),children:ns})]})]})]})};
1
+ "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/slicedToArray"),n=require("@babel/runtime/regenerator"),i=require("react"),o=require("classnames"),u=require("lodash"),l=require("@material-ui/icons"),a=require("./effects/useFetchWells.js"),c=require("./effects/useAdvancedWells.js"),d=require("./effects/useBicWells.js"),p=require("./effects/useCompanyMetricKey.js"),m=require("./effects/useFilterOptions.js"),q=require("./effects/useFilteredWells.js"),j=require("./effects/useSortedWells.js");require("./effects/useAssetsData.js");var f=require("./effects/useTableColumns.js"),C=require("./effects/useCompanyProvider.js"),A=require("./effects/useGlobalOffsetWellsSync.js"),v=require("./components/AppHeader/AppHeader.js"),S=require("./components/Toolbar/Toolbar.js"),g=require("./components/Filter/Filter.js"),h=require("./components/Map/WellsMap.js"),b=require("./components/OffsetWellsTable/OffsetWellsTable.js"),V=require("./constants.js"),T=require("./components/OffsetWellsTable/AdvancedSearch/constants.js"),I=require("./utils/index.js"),y=require("./OffsetWellPickerV4.module.css.js");require("../../utils/index.js");var x=require("react/jsx-runtime");require("@material-ui/core/Snackbar"),require("../Notifications/Toast.js"),require("../Notifications/Notifications.scss.js");var D=require("../Notifications/NotificationsContainer.js"),P=require("../../utils/mobileDetect.js"),E=require("../../styles/typography/index.js");require("../../styles/counter/counter.module.scss.js");var W=require("../Typography.js"),L=require("../Modal/Modal.js");require("../IconMenu/index.js"),require("../StyledMenuItem/index.js"),require("../AppIcon/AppIcon.js"),require("../DevCenter/AppHeader/AppHeader.js"),require("../DevCenter/AppSideBar/AppSideBar.js"),require("../DevCenter/AppsDataProvider/AppsDataProvider.js"),require("@material-ui/core"),require("../DevCenter/AppContext.js"),require("../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js"),require("../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js"),require("@babel/runtime/helpers/objectWithoutProperties"),require("react-router"),require("../../constants/goals.js"),require("../../constants/segment.js"),require("../../constants/alerts.js"),require("../../constants/apps.js"),require("../../constants/drillstring.js"),require("../../constants/completion.js"),require("../../constants/appPackages.js"),require("../../constants/notifications.js"),require("../../constants/feed.js"),require("../../constants/bha.js"),require("../../constants/corvaCompanyId.js"),require("../GradientManager/configuration/constants.js"),require("../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js"),require("../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js"),require("../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js"),require("../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js"),require("../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js"),require("../../componentsV2/Text/Text.js"),require("../../componentsV2/Grid/Grid.js"),require("../../componentsV2/Grid/Grid.scss.js"),require("../../componentsV2/Header/Header.scss.js"),require("../../componentsV2/Button/Button.js"),require("../../componentsV2/ButtonIcon/ButtonIcon.js"),require("../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js"),require("../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js"),require("../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js"),require("uuid"),require("../../componentsV2/Tooltip/Tooltip.scss.js"),require("../../componentsV2/Popover/Popover.js"),require("../../componentsV2/Radio/Radio.js"),require("../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js"),require("../../componentsV2/Checkbox/Checkbox.js"),require("../../componentsV2/TextInput/TextInput.js"),require("../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js"),require("../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js"),require("../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js"),require("../../componentsV2/TextLink/TextLink.js"),require("../../componentsV2/Chip/Chip.js"),require("../../componentsV2/ChipAlert/ChipAlert.js"),require("../../componentsV2/ChipIndicator/ChipIndicator.js"),require("../../componentsV2/Avatar/Avatar.js"),require("../../componentsV2/Avatar/constants.js"),require("../../componentsV2/AvatarGroup/AvatarGroup.scss.js"),require("@material-ui/lab"),require("../../componentsV2/ToggleButtons/ToggleButtons.scss.js"),require("../../componentsV2/Paper/Paper.js"),require("../../componentsV2/ModalWindow/ModalWindow.scss.js"),require("@icon-park/react/es/all"),require("../../icons/IconParkProvider.js"),require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../componentsV2/Modal/Modal.scss.js"),require("../../componentsV2/Menu/Menu.js"),require("../../componentsV2/Counter/Counter.js"),require("../../componentsV2/BadgeBase/BadgeBase.scss.js"),require("../../componentsV2/BadgeDot/BadgeDot.scss.js"),require("../../componentsV2/LoaderLinear/LoaderLinear.scss.js"),require("../../componentsV2/LoaderLogo/LoaderLogo.constants.js"),require("../../componentsV2/LoaderLogo/LoaderLogo.scss.js"),require("../../componentsV2/Switch/Switch.js"),require("../../componentsV2/Tabs/Tabs.js"),require("../../componentsV2/EmptyState/EmptyState.scss.js"),require("../../componentsV2/FileIcon/FileIcon.js"),require("../../componentsV2/Tag/Tag.js"),require("react-dropzone"),require("../../componentsV2/FilesDropzone/FilesDropzone.scss.js"),require("../../componentsV2/FilesLoader/FilesLoader.scss.js"),require("../../componentsV2/FilesProcessor/FilesProcessor.scss.js"),require("../../componentsV2/Skeleton/Skeleton.scss.js"),require("../../utils/main.js"),require("../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js"),require("../../componentsV2/Stepper/Step/Step.scss.js"),require("../../componentsV2/Stepper/Stepper.scss.js"),require("../../componentsV2/ButtonLive/ButtonLive.js"),require("../../componentsV2/ButtonText/ButtonText.js"),require("../../componentsV2/LiveDotIndicator/LiveDotIndicator.scss.js"),require("../../componentsV2/IndicatorLive/IndicatorLive.scss.js"),require("../../componentsV2/Accordion/Accordion.scss.js"),require("../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js"),require("../../componentsV2/BadgeComment/BadgeComment.js"),require("../../componentsV2/AppContainer/AppContainer.js"),require("../../componentsV2/AppContainer/AppContainer.constants.js"),require("../../componentsV2/AppFooter/AppFooter.js"),require("../../componentsV2/AppCommonsProvider/AppCommonsContext.js"),require("../../componentsV2/AppHeader/AppHeader.constants.js"),require("../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js"),require("../../componentsV2/AppHeader/AppAssets/utils.js"),require("../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js"),require("../PadModeSelect/PadModeSelect.js"),require("../../componentsV2/AppHeader/PadMode/PadMode.scss.js"),require("../../constants/streamSourceType.js"),require("../../types/shared/Completions.js"),require("../PadModeSelect/types.js"),require("lodash/flatten"),require("lodash/partition"),require("../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js"),require("../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.constants.js"),require("../../clients/jsonApi/index.js"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment"),require("../../clients/subscriptions/constants.js"),require("../../clients/subscriptions.v1.js"),require("../../clients/subscriptions/subscriptions-client.factory.js"),require("../../clients/api/apiCore.js"),require("../../clients/constants.js"),require("../../clients/sso/auth0.js"),require("../../clients/sso/oauth2.js"),require("../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js"),require("../../componentsV2/PadModeSelect/PadModeSelect.constants.js"),require("../../componentsV2/PadModeSelect/PadModeSelect.scss.js"),require("querystring"),require("uuid/v1"),require("jsona"),require("../../utils/env.js"),require("../StatusBadge/constants.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js"),require("../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js"),require("../../componentsV2/UniversalLink/UniversalLink.scss.js"),require("../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js"),require("../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js"),require("../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js"),require("../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js"),require("../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js"),require("../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js"),require("../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js"),require("../../componentsV2/AppDqPopover/AppDqPopover.scss.js"),require("../../utils/getSingleAsset.js"),require("../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js"),require("../../componentsV2/AppHeader/V3/AssetSelector/constants.js"),require("../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js"),require("../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js"),require("../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js"),require("../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js"),require("../../componentsV2/AppContainer/headerCommon.scss.js"),require("../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js"),require("../../componentsV2/AppHeader/V3/constants.scss.js"),require("@babel/runtime/helpers/typeof"),require("../../componentsV2/AppSizeProvider/AppSizeProvider.js"),require("../../componentsV2/AppSettings/AppSettings.js"),require("../../componentsV2/AppSettings/AppSettings.constants.js"),require("../../componentsV2/AppSettings/AppSettingsPinningContext.js"),require("../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.js"),require("../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js"),require("../../componentsV2/AppHeader/V3/Actions/Actions.constants.js"),require("../../componentsV2/AppHeader/V3/Actions/Actions.scss.js"),require("../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js"),require("../../componentsV2/AppHeader/AppHeader.scss.js"),require("../../componentsV2/OffsetWellsButton/OffsetWellsButton.scss.js"),require("../../componentsV2/Autocomplete/Autocomplete.scss.js"),require("../../componentsV2/Menu/MenuItem/MenuItem.scss.js"),require("../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js"),require("../../componentsV2/WellArchivedMessage/WellArchivedMessage.js"),require("../../componentsV2/DatePicker/CalendarControls/CalendarControls.scss.js"),require("../../componentsV2/DatePicker/TimePicker/TimePicker.js"),require("../../componentsV2/DatePicker/Input/Input.js"),require("../../componentsV2/DatePicker/CalendarGrid/CalendarGrid.scss.js"),require("../../componentsV2/DatePicker/DatePicker.scss.js"),require("../../componentsV2/DragHandle/DragHandle.js"),require("../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js"),require("../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js"),require("../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js"),require("../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js"),require("rollbar"),require("@rollbar/react"),require("../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js"),require("../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js"),require("../Icons/AnnotationIcon.js"),require("../Annotations/components/AnnotationsList/index.js"),require("../Annotations/components/LastAnnotation/index.js"),require("../Annotations/AnnotationsContext.js"),require("../Toaster/Toaster.js"),require("../HelpCenter/HelpCenterIcon.js"),require("../DevCenter/NavigationBar/NavigationBar.js"),require("../DevCenter/SideBar/SideBar.js"),require("../DevCenter/AppSettingsPopover/AppSettingsPopover.js"),require("../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js"),require("../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js"),require("../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js"),require("../AssetEditor/index.js"),require("../AssetEditorV2/index.js"),require("../AppVersionsSelect/AppVersionsSelect.js");var M=require("../LoadingIndicator/LoadingIndicator.js");require("../RealTimeValuesSidebar/RealTimeSidebar.js"),require("../CollapsableSidebar.js"),require("../DateTimePicker/index.js"),require("../DatePicker/index.js"),require("../ErrorBoundary/ErrorBoundary.js"),require("../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js"),require("../SlateFormattedText/SlateFormattedText.js"),require("../SlateFormattedText/RenderElements.js"),require("slate"),require("../EmptyState/EmptyState.js"),require("../ParameterCharts/ParameterCharts.js"),require("../ParameterCharts/AddEditTrack.js"),require("../ChartActionsList/ChartActionsList.js"),require("../CopyToClipboard/CopyToClipboard.js"),require("../AssetEditor/AssetEditorAutocomplete.js"),require("../AssetEditor/SingleAssetEditor.js"),require("react-color"),require("../SettingEditors/ColorEditor/style.css.js"),require("../SettingEditors/DropdownEditor/index.js"),require("../SwitchControl/index.js"),require("../ColorPicker/ColorPicker.js"),require("../Chart/components/ChartButton.js"),require("../Chart/components/ChartButtons.js"),require("../Chart/components/ChartWrapper.js"),require("../Chart/components/AxisDropdown.js"),require("../Chart/components/ChartSelect.js"),require("../Chart/components/buttons/DragToZoomButton.js"),require("../Chart/components/buttons/ZoomInButton.js"),require("../Chart/components/buttons/ZoomOutButton.js"),require("../Chart/components/buttons/PanButton.js"),require("../Chart/components/buttons/ResetZoomButton.js"),require("../Chart/components/buttons/HideAxesButton.js"),require("../Chart/components/buttons/ChartTypeButton.js"),require("../ColorPicker/PaletteChromePicker/PaletteChromePicker.js"),require("../TruncatedText/index.js"),require("../MiddleTruncatedText/MiddleTruncatedText.js"),require("../RangeSlider/constants.js"),require("../RangeSlider/Input.css.js"),require("../RangeSlider/RangeSlider.css.js"),require("../AdvancedSlider/AdvancedSlider.js"),require("../Breadcrumbs/index.js"),require("../VirtualizedTable/index.js"),require("../EmptyView/EmptyView.js"),require("../EmptyView/EmptyAppView/EmptyAppView.js");var O=require("../Button/components/Button/index.js");require("moment-timezone"),require("../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js"),require("../Button/components/LiveButton/styles.js"),require("../ContextMenuItem/index.js"),require("../FolderMenuItem/index.js"),require("../EditableItem/EditableItem/index.js"),require("../EditableItem/EditableItemWithBadge/index.js"),require("../Checkbox/index.js"),require("../FolderMenuItemWithLinks/index.js"),require("../IconButton/index.js"),require("../TextField/index.js"),require("../Chip/index.js"),require("../Counter/index.js"),require("../AnchorsList/AnchorsList.js"),require("../Select/index.js"),require("../Select/SelectFilterBy.js"),require("../CustomSelect/index.js"),require("../Tabs/Tabs.js"),require("../Tabs/Tab.js"),require("../ResizableTable/ResizableTable.js"),require("../GradientPicker/GradientPicker.js"),require("../GradientManager/GradientList.js"),require("@material-ui/icons/AddCircle"),require("../GradientManager/GradientPreview/GradientPreview.js"),require("../GradientManager/GradientSelect.styles.js"),require("../GradientManager/GradientManager.styles.js"),require("../Drillstring/BHASchematic.js"),require("../Drillstring/BHATable/index.js"),require("../Drillstring/BHAComponentIcon.js"),require("../Drillstring/BHAComponentDetail/index.js"),require("../Drillstring/BHATileIcon.js"),require("../Drillstring/BHATile/BHATile.js"),require("../Drillstring/BHAList/BHAList.js"),require("../Drillstring/BHAComponentsTable/BHAComponentsTable.js"),require("../Casing/CasingTable/index.js"),require("../Casing/CasingComponentIcon.js"),require("../Casing/CasingTileIcon.js"),require("../Casing/CasingTableV2/CasingTableV2.js"),require("../Casing/CasingTile/CasingTile.js"),require("../DisabledSettingsMessage/DisabledSettingsMessage.js"),require("../WellSummary/WellSummaryItemLabel.js"),require("../WellSummary/WellSummaryItemTitle.js"),require("../WellSummary/WellSummaryItemValue.js"),require("../WellSummary/ActivitySummaryChart.js"),require("../WellSummary/FracWirelineTimeChart.js"),require("../BICOffsetPickerDialog/index.js"),require("../OffsetWellButton/OffsetWellButton.js"),require("../OffsetWellPickerV2/OffsetWellPickerDialog.js"),require("../OffsetWellPickerV3/index.js"),require("../OffsetWellChips/Chip.js"),require("../OffsetWellChips/ChipsContainer.js"),require("../OffsetWellMap/OffsetWellMap.js"),require("../ConfirmationDialog.js"),require("../TextLink/index.js"),require("../Avatar/index.js"),require("../Template/TemplatePopover/index.js"),require("../Template/TemplateSharingDialog/index.js"),require("../MenuItem/index.js"),require("../MiddleTruncate/MiddleTruncate.js"),require("../PinnableFilters/PinnableFilters.js"),require("../HeaderLayout/HeaderLayout.js"),require("../PadOffsetsPicker/PadOffsetsPicker.js"),require("../PadOffsetsPicker/OffsetAssetChip.js"),require("../PadOffsetsPicker/OffsetAssetsListExpander.js"),require("../PadOffsetsPicker/StagesSelector.js"),require("../PadOffsetsPickerV2/PadOffsetsPickerV2.js"),require("../Table/TableToolbar/TableToolbar.js"),require("../Table/TableContainer/TableContainer.js"),require("../Table/TableCell/TableCell.js"),require("../Table/TablePagination/TablePagination.js"),require("../Table/TablePaginationActions/TablePaginationActions.js");var B=require("../Tooltip/Tooltip.js");require("../Tooltip/ScrollableTooltip.js"),require("../PriceInput/PriceInput.js"),require("../LabelsCounter/LabelsCounter.js"),require("../Stepper/Stepper.js"),require("../Stepper/Step/Step.js"),require("../Stepper/StepsWrapper.js"),require("../Comment/CommentIcon/index.js"),require("../FilesLoader/FilesLoader.js"),require("../SearchInput/index.js"),require("../FeedItem/FeedItem.js"),require("../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js"),require("../PostInput/PostInput.js"),require("../KeyboardDateTimePicker.js"),require("../AddComment/Popover.js"),require("../AddComment/Popup.js"),require("../StageDesignVActual/ComparisonBar/ComparisonBar.js"),require("../StageDesignVActual/ElementsComparison/ElementsComparison.js"),require("../StageDesignVActual/ComparisonHeader.js"),require("../StageDesignVActual/ComparisonRow.js"),require("../EmbeddedApp/DevCenterEmbeddedApp.js"),require("../EmbeddedApp/EmbeddedApp.js"),require("../Autocomplete/Autocomplete.js"),require("../DocumentViewer/DocumentViewer.js"),require("../ColorPickerPalette/ColorPickerPalette.js"),require("../Search/Search.js"),require("../Search/components/Listbox.js"),require("../Search/components/Paper.js"),require("../Search/components/RecentSearches.js"),require("../Search/components/Groups.js"),require("../Search/components/SelectAllListItem.js"),require("../StatusBadge/index.js"),require("../Attachment/index.js"),require("../EmojiIconButton.js"),require("../FileUploadIconButton.js"),require("../FilePreview/index.js"),require("../FailedFileUploading.js"),require("../UserMention/index.js"),require("../CommentsInfo/index.js"),require("../CommentInput/index.js"),require("../Comment/index.js"),require("../CommentLoader.js"),require("../AssetNameLabel/AssetStatusBadge.js"),require("../AssetEditorV2/components/PrimaryAssetSelect.js"),require("../AssetEditorV2/components/SecondaryAssetSelect.js"),require("../AssetEditorV2/components/SelectItem.js"),require("../AssetEditorV2/components/MultipleAssetsToggle.js"),require("../AssetEditorV2/components/PrimaryAssetSelectV2.js"),require("../EChartsWrapper/EChartsWrapper.js"),require("../AssetsMultipleSelector/AssetsMultipleSelector.js"),require("@material-ui/icons/Close"),require("@material-ui/icons/GetApp"),require("../GoogleDocsViewer/index.js"),require("../NewDocumentViewer/effects/useFileContent.js"),require("../NewDocumentViewer/styles.js"),require("../FilesLoaderV2/styles.js"),require("../FilesDropzone/styles.js"),require("../FilesProcessor/styles.js"),require("../Hint/styles.js"),require("@babel/runtime/helpers/taggedTemplateLiteral"),require("fparser"),require("../Formula/useFormulaStyles.js"),require("../Formula/RootXIcon.js"),require("../Formula/FormulaTextEditor.js"),require("../Formula/CloseSuggestion.js"),require("../Formula/SuggestionsMenu.js");var F=require("../../utils/notificationToasts.js");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var k=w(e),H=w(r),R=w(s),N=w(t),_=w(n),G=w(o);function U(e,r){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),s.push.apply(s,t)}return s}function z(e){for(var r=1;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?U(Object(s),!0).forEach((function(r){H.default(e,r,s[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):U(Object(s)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))}))}return e}var K="OffsetWellPickerV4";module.exports=function(e){var r,s,t,n=e.open,o=e.isWDUser,w=e.defaultSubjectWell,U=e.currentUser,Y=e.offsetSettings,Z=e.addWellsUsabilityInfo,X=e.isViewOnly,J=e.onClose,Q=e.onSave,$=e.maxOffsetSize,ee=void 0===$?V.DEFAULT_BIC_OFFSET_SIZE:$,re=e.localMaxOffsetSize,se=void 0===re?V.DEFAULT_LOCAL_OFFSET_SIZE:re,te=e.syncAutoEnabled,ne=e.isManualWellsEnabled,ie=void 0!==ne&&ne;A.useGlobalOffsetWellsSync(Y,Q);var oe=i.useState(null),ue=N.default(oe,2),le=ue[0],ae=ue[1],ce=Math.min(ee+1,se+1,V.MAX_OFFSET_SIZE+1),de=Math.min(Math.max(ce,se+1),V.MAX_OFFSET_SIZE+1),pe=i.useState(null==Y?void 0:Y.filterExpanded),me=N.default(pe,2),qe=me[0],je=me[1],fe=i.useState(null==Y?void 0:Y.mapHidden),Ce=N.default(fe,2),Ae=Ce[0],ve=Ce[1],Se=+(null==w?void 0:w.companyId)||+(null==U?void 0:U.company_id),ge=null==w?void 0:w.asset_id,he=i.useState((null==Y?void 0:Y.filters)||{}),be=N.default(he,2),Ve=be[0],Te=be[1],Ie=i.useState((null==Y?void 0:Y.wellSection)||V.ALL_SECTION_KEY),ye=N.default(Ie,2),xe=ye[0],De=ye[1],Pe=i.useRef(!0),Ee=i.useState([]),We=N.default(Ee,2),Le=We[0],Me=We[1],Oe=i.useState(null),Be=N.default(Oe,2),Fe=Be[0],we=Be[1],ke=i.useState(!0),He=N.default(ke,2),Re=He[0],Ne=He[1],_e=i.useState(!1),Ge=N.default(_e,2),Ue=Ge[0],ze=Ge[1],Ke=i.useState(!1),Ye=N.default(Ke,2),Ze=Ye[0],Xe=Ye[1],Je=i.useRef(),Qe=i.useRef(),$e=i.useState(V.ViewType.none),er=N.default($e,2),rr=er[0],sr=er[1],tr=i.useRef(),nr=i.useState(!1),ir=N.default(nr,2),or=ir[0],ur=ir[1],lr=de<=(null==Le?void 0:Le.length),ar=V.TOP_GRADIENT_MAP[rr],cr=i.useRef(),dr=i.useState(!0),pr=N.default(dr,2),mr=pr[0],qr=pr[1];i.useEffect((function(){var e,r,s;(n&&lr&&F.showInfoNotification("App can’t process more than (".concat(de-1,") Offset Wells.")),n)||((null==Y||null===(e=Y.selectedWellIds)||void 0===e?void 0:e.length)===(null===(r=cr.current)||void 0===r?void 0:r.length)&&(null==Y||null===(s=Y.selectedWellIds)||void 0===s?void 0:s.every((function(e){var r;return null===(r=cr.current)||void 0===r?void 0:r.includes(e)})))||(Pe.current=!0),cr.current=null==Y?void 0:Y.selectedWellIds)}),[lr,n,Y]),i.useEffect((function(){function e(){window.innerWidth<=V.SMALL_SCREEN_WIDTH||P.isMobileDetected||P.isNativeDetected?sr(V.ViewType.mobile):window.innerHeight<=V.SMALL_SCREEN_HEIGHT?sr(V.ViewType.small):sr(V.ViewType.normal)}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n]),i.useEffect((function(){tr.current&&rr===tr.current||(tr.current=rr,rr===V.ViewType.small||rr===V.ViewType.mobile?(ve(!0),je(!1)):(je(!X&&(null==Y?void 0:Y.filterExpanded)),ve(!X&&(null==Y?void 0:Y.mapHidden))),Te((null==Y?void 0:Y.filters)||{}),De((null==Y?void 0:Y.wellSection)||V.ALL_SECTION_KEY))}),[Y,X,rr]);var jr=a.useFetchWells(Se,Z),fr=N.default(jr,2),Cr=fr[0],Ar=fr[1],vr=C.useCompanyProvider(Se),Sr=N.default(vr,1)[0],gr=d.useBicWells(o,U,ge,Cr,ie),hr=N.default(gr,7),br=hr[0],Vr=hr[1],Tr=hr[2],Ir=hr[3],yr=hr[4],xr=hr[5],Dr=hr[6];i.useEffect((function(){qr(!0),Vr(null),Ir(null)}),[ge]);var Pr=p.useCompanyMetricKey(Se,null==Y?void 0:Y.metricsKeys),Er=N.default(Pr,2),Wr=Er[0],Lr=Er[1],Mr=c.useAdvancedWells(Se,Cr,br,Tr,ge,Wr,n),Or=!Ar&&(null==Mr?void 0:Mr.length)===(null==Cr?void 0:Cr.length);i.useEffect((function(){if(Or){var e,r=(e=R.default(_.default.mark((function e(){var r,s,t,n,i,o,u,l,a,c;return _.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=void 0===(null==Y?void 0:Y.isSynced)||(null==Y?void 0:Y.isSynced),s=!0,!r){e.next=19;break}if(n=Tr[V.ALL_SECTION_KEY]||[],i=((null==Y?void 0:Y.selectedWellIds)||[]).every((function(e){return n.includes(e)})),n.length===(null==Y||null===(t=Y.selectedWellIds)||void 0===t?void 0:t.length)&&i){e.next=16;break}return e.next=8,I.getCoordinatedWells(n,ge);case 8:o=e.sent,u=o.slice(0,ce+1).map((function(e){return e.id})),u=o.slice(0,se+1).map((function(e){return e.id})),l=z(z({},Y),{},{subjectWellId:ge,selectedWellIds:u,offsetWellsLimited:de<=u.length}),a=o.filter((function(e){return u.includes(e.id)})),Q(l,a),e.next=17;break;case 16:s=!1;case 17:e.next=20;break;case 19:s=!1;case 20:if(s){e.next=25;break}return e.next=23,I.getCoordinatedWells((null==Y?void 0:Y.selectedWellIds)||[],ge);case 23:c=e.sent,Q(Y,c);case 25:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)});te&&mr&&Y&&Tr&&(r(),qr(!1))}}),[Y,Tr,ge,de,te]);var Br=m.useFilterOptions(Mr);i.useEffect((function(){if(Mr&&br){var e=Mr.find((function(e){return e.id===ge}));if(e){var r=br.filter((function(e){return e.value!==V.ALL_SECTION_KEY})).map((function(e){return e.label})),s=z(z({},e),r.length>0&&H.default({},V.ColumnType.wellSection,r));we(s)}else we(null)}}),[br,Mr]);var Fr=f.useTableColumns(Wr),wr=q.useFilteredWells(Mr,Ve);i.useEffect((function(){if(wr&&Or)if(Pe.current){var e=Mr.filter((function(e){return((null==Y?void 0:Y.selectedWellIds)||[]).includes(e.id)}));Fe&&(e=e.concat(Fe)),Me(u.uniqBy(e,"id")),Pe.current=!1}else Me((function(e){var r=(wr||[]).filter((function(r){return!!e.find((function(e){var s=e.id;return r.id===s}))}));return Fe&&(r=r.concat(Fe)),u.uniqBy(r,"id")}))}),[Mr,wr,null==Y?void 0:Y.selectedWellIds,Or]);var kr=j.useSortedWells(Fe,wr,Le,Ne),Hr=N.default(kr,5),Rr=Hr[0],Nr=Hr[1],_r=Hr[2],Gr=Hr[3],Ur=Hr[4],zr=i.useCallback((function(e,r,s){var t;t=s===T.SEARCH_CATEGORIES.well.name?r:r.reduce((function(e,r){var s,t=null===(s=Mr.find((function(e){return e.id===r})))||void 0===s?void 0:s.rigName,n=Mr.filter((function(e){return e.rigName===t})).map((function(e){return e.id}));return e.concat(n)}),[]);var n=Mr.filter((function(e){var r=e.id;return t.includes(r)}));e?(n=n.slice(0,Math.min(n.length,de-Le.length)),Me((function(e){return u.uniqBy(e.concat(n),"id")}))):Me((function(e){return u.uniq(e.filter((function(e){var r=e.id;return!n.find((function(e){return e.id===r}))})))}))}),[Mr,Le]),Kr=i.useCallback((function(){Xe(!0)}),[]),Yr=i.useCallback((function(e){Lr(e)}),[]),Zr=i.useCallback((function(e,r){Me(r?function(r){return[].concat(k.default(r),[e])}:function(r){return r.filter((function(r){return r.id!==e.id}))})}),[]),Xr=i.useCallback((function(e){if(e){var r=Fe?wr.concat(Fe):wr,s=u.sortBy(u.uniqBy(r,"id"),"distance");Me(s.slice(0,de))}else Me(Fe?[Fe]:[])}),[wr,Fe,de]),Jr=function(e){if(Tr){var r=(null==Mr?void 0:Mr.filter((function(r){var s;return null===(s=Tr[e])||void 0===s?void 0:s.includes(r.id)})))||[],s=u.sortBy(r,"distance");Me(s.slice(0,ce))}else Me(Fe?[Fe]:[])},Qr=i.useCallback((function(e){De(e),Jr(e)}),[Jr]),$r=i.useMemo((function(){return Le.find((function(e){return e.id===ge}))?Le.length-1:Le.length}),[Le,ge]),es=i.useMemo((function(){if(!Tr)return!1;var e=Le.map((function(e){return e.id})),r=Tr[xe]||[];return Math.min(r.length,ce)===e.length&&e.every((function(e){return r.includes(e)}))}),[Tr,Le,xe,ce]),rs=i.useMemo((function(){return!!Sr&&V.COMPANY_PROVIDERS_FOR_IDAS.includes(Sr)}),[Sr]),ss=i.useMemo((function(){return rs?"IDAS generated offsets.":o?"Offset Selection App.":"WellHub."}),[rs,o]),ts=function(){var e=(Mr||[]).filter((function(e){return((null==Y?void 0:Y.selectedWellIds)||[]).includes(e.id)}));Fe&&(e=e.concat(Fe)),Me(u.uniqBy(e,"id"));var r=z(z({},Y),{},{mapHidden:Ae,filterExpanded:qe});Q(r),Te((null==Y?void 0:Y.filters)||{}),De((null==Y?void 0:Y.wellSection)||V.ALL_SECTION_KEY),J()},ns=Re||Ar,is=i.useMemo((function(){return!ns&&(!es||(!(u.isEmpty(Ve)||!Ve[V.FilterType.sideTracks])||xe!==V.ALL_SECTION_KEY))}),[es,Ve,xe,ns]),os=function(){Te({}),De(V.ALL_SECTION_KEY),Jr(V.ALL_SECTION_KEY)},us=!Mr||!br||!Ur||rr===V.ViewType.none,ls=i.useState(!1),as=N.default(ls,2),cs=as[0],ds=as[1],ps=i.useState(V.ROWS_PER_PAGE),ms=N.default(ps,2),qs=ms[0],js=ms[1],fs=i.useState([]),Cs=N.default(fs,2),As=Cs[0],vs=Cs[1];i.useEffect((function(){if(Ur){var e=Ur.slice(0,qs);vs(e)}}),[Ur,qs,Fe]),i.useEffect((function(){yr===V.RESYNC_STATUS.SUCCEEDED&&os()}),[Tr]);return x.jsxs(L,{open:n,onClose:ts,title:x.jsx(v.AppHeader,{isWDUser:o,viewType:rr,totalCount:null!==(r=null==Mr?void 0:Mr.length)&&void 0!==r?r:0,selectedCount:$r,isViewOnly:X,maxOffsetWellNumber:de}),isMobile:rr===V.ViewType.mobile,contentContainerClassName:G.default(y.offsetWellDialog),contentClassName:G.default(y.contentContainer,(s={},H.default(s,y.smallContainer,rr===V.ViewType.small),H.default(s,y.contentContainerMobile,rr===V.ViewType.mobile),s)),actionsClassName:y.modalActions,actions:!X&&x.jsxs("div",{className:y.actionsWrapper,children:[!us&&is?x.jsx(B.Tooltip,{placement:"bottom-start",title:"Reset to Synced Offsets in ".concat(o?"Offset App":"Wellhub"),children:x.jsx("div",{children:x.jsx(O,{"data-testid":"".concat(K,"_reset"),onClick:os,color:"primary",startIcon:rr!==V.ViewType.mobile&&x.jsx(l.Replay,{}),classes:rr===V.ViewType.mobile&&{root:y.resetButtonMobile},children:rr!==V.ViewType.mobile?"Reset":x.jsx(l.Replay,{})})})}):x.jsx("div",{className:rr===V.ViewType.mobile&&y.infoIconContainer,children:rr!==V.ViewType.mobile?x.jsxs(x.Fragment,{children:[x.jsx("span",{className:G.default(E.regular12,E.colors.t6),children:"The offset list is being automatically populated by "}),x.jsx("span",{className:G.default(E.medium12,E.colors.t6),children:ss})]}):x.jsx(B.Tooltip,{title:x.jsxs("div",{children:[x.jsx("span",{className:G.default(E.regular12,E.colors.t1),children:"The offset list is being automatically populated by "}),x.jsx("span",{className:G.default(E.medium12,E.colors.t1),children:ss})]}),enterTouchDelay:0,leaveTouchDelay:V.LEAVE_TOUCH_DELAY,children:x.jsx(l.InfoOutlined,{className:y.infoIcon})})}),x.jsxs("div",{className:y.buttonGap,children:[x.jsx(O,{"data-testid":"".concat(K,"_cancel"),onClick:ts,color:"primary",children:"Cancel"}),x.jsxs(O,{"data-testid":"".concat(K,"_selectedWells"),variant:"contained",color:"primary",onClick:function(){J();var e=z(z({},Y),{},{companyId:Se,subjectWellId:ge,selectedWellIds:Le.map((function(e){return e.id})),filters:Ve,metricsKeys:Wr,wellSection:xe,isSynced:es,mapHidden:Ae,filterExpanded:qe,offsetWellsLimited:lr});Q(e,Le)},children:["Select (",$r,")"]})]})]}),children:[x.jsx(D.NotificationsContainer,{}),us?x.jsx(M,{fullscreen:!1}):x.jsxs("div",{className:G.default(y.contentWrapper,H.default({},y.contentBlocked,ns)),ref:Je,children:[rr===V.ViewType.mobile&&x.jsxs("div",{className:G.default(y.countContainer,H.default({},y.countContainerMobile,rr===V.ViewType.mobile)),children:[x.jsx(W.Regular14,{className:y.totalLabel,children:"Total:"}),x.jsx(W.Regular14,{"data-testid":"".concat(K,"_totalWells"),className:y.countValue,children:Mr.length}),x.jsx(W.Regular14,{className:y.selectedLabel,children:"Selected:"}),x.jsx(W.Regular14,{"data-testid":"".concat(K,"_selected"),className:y.countValue,children:$r}),x.jsx(B.Tooltip,{title:"App can’t process more than (".concat(de-1,") Offset Wells."),placement:"right",children:x.jsxs(W.Regular12,{"data-testid":"".concat(K,"_maxOffsetSize"),className:y.maxOffsetSize,children:["/",de-1]})})]}),rr===V.ViewType.normal&&x.jsx(S.Toolbar,{isViewOnly:X,isXtoProvider:rs,viewType:rr,filters:Ve,setFilters:Te,isFilterExpanded:qe,setIsFilterExpanded:je,isMapHidden:Ae,setIsMapHidden:ve,resyncStatus:yr,setResyncStatus:xr}),or&&x.jsx("div",{className:y.topGradient,style:{top:ar}}),x.jsxs("div",{className:G.default(y.content,(t={},H.default(t,y.contentBlocked,ns),H.default(t,y.contentMobile,rr===V.ViewType.mobile),H.default(t,y.contentiOSMobile,I.getMobileOperatingSystem()===V.IOS_DEVICE),t)),ref:Qe,onScroll:function(e){return function(e){e.target&&(Ze&&(e.target.scrollLeft=0,Xe(!1)),e.target.scrollLeft<=5&&cs&&ds(!1),e.target.scrollLeft>5&&!cs&&ds(!0),e.target.scrollTop<=5&&or&&ur(!1),e.target.scrollTop>5&&!or&&ur(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight+2)>=e.target.scrollHeight&&qs<Ur.length&&js((function(e){return e+V.ROWS_PER_PAGE})))}(e)},children:[rr!==V.ViewType.normal&&x.jsx(S.Toolbar,{isViewOnly:X,isXtoProvider:rs,viewType:rr,filters:Ve,setFilters:Te,isFilterExpanded:qe,setIsFilterExpanded:je,isMapHidden:Ae,setIsMapHidden:ve,resyncStatus:yr,setResyncStatus:xr}),!Ae&&n&&x.jsx(h.WellsMap,{isViewOnly:X,mapHidden:Ae,subjectWell:Fe,offsetWellIds:Le.map((function(e){return e.id})),wells:wr,radius:Ve[V.FilterType.radius],handleChangeOffsetWell:Zr,activeWellId:le,viewType:rr}),x.jsx(g.Filter,{isHidden:!qe,isWDUser:o,filterOptions:Br,filters:Ve,wellSections:br,selectedWellSection:xe,subjectWell:Fe,onChangeFilters:function(e){Ne(!0),setTimeout((function(){return Te(e)}),0)},onChangeBicWells:Qr}),x.jsx(b,{open:n,isTableLoading:ns,companyId:Se,subjectWellId:ge,sortBy:Rr,setSortBy:Nr,sortDirection:_r,setSortDirection:Gr,columnsWithDict:Fr,wells:As,metricsKeys:Wr,setMetricsKeys:Yr,handleChangeOffsetWell:Zr,handleChangeAllOffsetWells:Xr,handleAddRemoveAssets:zr,isWellNameExpand:Ue,setIsWellNameExpand:ze,isHScrollMoved:cs,onHideAdvancedSearch:Kr,isViewOnly:X,isLastWell:Ur.length<=qs,contentRef:Je,offsetWellsContainerRef:Qe,isLimitedOffsetWells:lr,maxOffsetWellNumber:de,wellSections:br,setActiveWellId:ae,viewType:rr,isWDUser:o,taScores:Dr})]}),X&&x.jsxs("div",{className:y.viewOnlyInfoContainer,children:[x.jsx("span",{className:G.default(E.regular12,E.colors.t6),children:"The offset list is being automatically populated by "}),x.jsx("span",{className:G.default(E.medium12,E.colors.t6),children:ss})]})]})]})};
2
2
  //# sourceMappingURL=OffsetWellPickerV4.js.map