@corva/ui 0.32.0-2 → 0.32.0-20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLI/components/App/App.js +1 -1
- package/CLI/components/App/components/AppBar/AppBar.js +1 -1
- package/CLI/hocs/withAppDataProviderHOC.js +1 -1
- package/CLI/hocs/withCorvaMagicHOC.js +1 -1
- package/CLI/hocs/withGridLayoutHOC/withGridLayoutHOC.js +1 -1
- package/CLI/hocs/withReactRouterHOC.js +1 -1
- package/CLI/screens/OAuthCallbackScreen/index.js +1 -1
- package/cjs/devcenter/webpack/DevServerEntryPoint.js +1 -17
- package/cjs/devcenter/webpack/DevServerIsolatedAppEntryPoint.js +1 -0
- package/cjs/devcenter/webpack/public/DevCenterIsolatedAppPage.html +28 -0
- package/cjs/devcenter/webpack/webpack.config.dev.js +1 -1
- package/clients/clientStorage/index.js +1 -1
- package/clients/jsonApi/index.js +1 -1
- package/components/AddComment/Popover.js +1 -1
- package/components/AddComment/components/Content.js +1 -1
- package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
- package/components/Annotations/components/AnnotationsList/components/Annotation/index.js +1 -1
- package/components/AppVersionsSelect/AppVersionsSelect.js +1 -1
- package/components/AssetEditor/effects/index.js +1 -1
- package/components/AssetNameLabel/index.js +1 -1
- package/components/AssetNameLabel/styles.css.js +1 -1
- package/components/Attachment/index.js +1 -1
- package/components/BICOffsetPickerDialog/components/Map/index.css.js +1 -1
- package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
- package/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js +1 -1
- package/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/Breadcrumbs/index.js +1 -1
- package/components/CollapsableSidebar.js +1 -1
- package/components/Comment/index.js +1 -1
- package/components/DevCenter/AppHeader/AppHeader.js +1 -1
- package/components/DevCenter/AppHeader/AppHeaderNew.css.js +1 -0
- package/components/DevCenter/AppHeader/AppHeaderNew.js +1 -0
- package/components/DevCenter/AppHeader/PadMode.js +1 -1
- package/components/DevCenter/AppHeader/utils.js +1 -0
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -1
- package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
- package/components/DevCenter/AppsDataProvider/effects/dataResolvers.js +1 -1
- package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAnnotationsData.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.scss.js +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.module.css.js +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/constants.js +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/utils/replaceUndefinedValuesWithNull.js +1 -0
- package/components/FeedItem/components/Content.js +1 -1
- package/components/FeedItem/components/Reactions.js +1 -1
- package/components/FeedItem/feedItemTypes/CompletionNptFeedItem.js +1 -1
- package/components/FeedItem/feedItemTypes/NptFeedItem.js +1 -1
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/api.js +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/NoData.js +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/Predictions.js +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/PredictionsItem.js +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/Stages/Stages.js +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/Stages/utils.js +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/index.js +1 -0
- package/components/InfiniteList/index.js +1 -1
- package/components/Notifications/NotificationsContainer.js +1 -1
- package/components/Notifications/components/Toast.js +1 -1
- package/components/Notifications/components/styles.js +1 -1
- package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ClearFiltersButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -0
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/index.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/index.js +1 -1
- package/components/OffsetWellPickerV2/constants.js +1 -1
- package/components/OffsetWellPickerV2/effects/index.js +1 -1
- package/components/OffsetWellPickerV2/utils/apiCalls.js +1 -1
- package/components/PadModeSelect/PadModeSelect.js +1 -1
- package/components/PadOffsetsPicker/PadOffsetsPicker.js +1 -1
- package/components/ParameterCharts/components/Track.js +1 -1
- package/components/PinnableFilters/effects/index.js +1 -1
- package/components/ResizableTable/ResizableTable.js +1 -0
- package/components/ResizableTable/ResizableTableCell.js +1 -0
- package/components/ResizableTable/ResizableTableHeaderCell.js +1 -0
- package/components/SlateFormattedText/SlateFormattedText.js +1 -1
- package/components/StageDesignVActual/ComparisonBar/ComparisonBar.js +1 -0
- package/components/StageDesignVActual/ComparisonBar/utils.js +1 -0
- package/components/StageDesignVActual/ComparisonHeader.js +1 -0
- package/components/StageDesignVActual/ComparisonRow.js +1 -0
- package/components/StageDesignVActual/ComparisonTable.css.js +1 -0
- package/components/StageDesignVActual/ElementsComparison/ElementsComparison.js +1 -0
- package/components/StageDesignVActual/ElementsComparison/utils.js +1 -0
- package/components/Tooltip/MuiTooltipDcWrapper.js +1 -1
- package/components/Tooltip/Tooltip.js +1 -1
- package/components/VirtualizedTable/DraggableList.js +1 -1
- package/components/VirtualizedTable/VirtualizedTable.js +1 -1
- package/components/WellSummary/WellSummaryItemValue.js +1 -1
- package/components/WellSummary/effects/useWellSummaryData.js +1 -1
- package/components/index.js +1 -1
- package/config/initGlobalDependencies.js +1 -0
- package/index.js +1 -1
- package/package.json +4 -2
- package/permissions/PermissionsContext.js +1 -0
- package/permissions/ProvidePermissions.js +1 -0
- package/permissions/constants/abilities.js +1 -0
- package/permissions/constants/appsPermissions.js +1 -0
- package/permissions/constants/index.js +1 -0
- package/permissions/constants/settingsApps.js +1 -0
- package/permissions/index.js +1 -0
- package/permissions/usePermissions.js +1 -0
- package/permissions/useProvidePermissions.js +1 -0
- package/permissions/utils.js +1 -0
- package/permissions/withPermissionsHOC.js +1 -0
- package/styles/globalStyles.js +1 -0
- package/utils/DrillstringUtils.js +1 -1
- package/utils/FluidCheckUtils.js +1 -1
- package/utils/StageDesignVActualUtils.js +1 -1
- package/utils/casing/conversion.js +1 -1
- package/utils/casing/validation.js +1 -1
- package/utils/completion.js +1 -1
- package/utils/devcenter.js +1 -1
- package/utils/drillstring/validation.js +1 -1
- package/utils/index.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as l}from"react/jsx-runtime";import{makeStyles as n,useTheme as t,Tooltip as i,Checkbox as r}from"@material-ui/core";import{memo as o}from"react";import{shape as a,bool as c,string as s,arrayOf as
|
|
1
|
+
import{jsxs as e,jsx as l}from"react/jsx-runtime";import{makeStyles as n,useTheme as t,Tooltip as i,Checkbox as r}from"@material-ui/core";import{memo as o}from"react";import{shape as a,bool as c,string as s,arrayOf as d,func as m}from"prop-types";import{ExpandMore as p}from"@material-ui/icons";import f from"./NumberCircle.js";var h=n({sectionContainer:{display:"flex",width:"100%",justifyContent:"space-between",marginRight:"4px",alignItems:"center"},itemLabel:{display:"flex",alignItems:"center","&:hover":{color:"#DADADA",cursor:"pointer"}},disabledItemLabel:{display:"flex",alignItems:"center","&:hover":{cursor:"pointer"}},itemLabelToggle:{},sectionName:{marginLeft:"6px",marginRight:"10px"},checkbox:{width:"11px",height:"11px"},sectionTitle:{display:"flex",alignItems:"center"},expandIcon:{fontSize:"14px",marginRight:"8px"}});function u(e){return(e.wells.filter((function(e){return e.checked}))||[]).length}function g(e){var l=u(e);return l===e.wells.length?"".concat(l):"".concat(l," of ").concat(e.wells.length," Selected")}function x(e){return e.wells.filter((function(e){return e.checked})).length>0}function b(e){return e.wells.filter((function(e){return e.checked})).length!==e.wells.length}function C(n){var o=n.section,a=n.disabled,c=n.onExpandCollapse,s=n.onSelectAll,d=n.onClearAll,m=h(),C=t(),k=function(e){e.stopPropagation(),!b(o)&&d&&d(o),b(o)&&s&&s(o)};return e("div",{className:m.sectionContainer,children:[e("div",{className:a?m.disabledItemLabel:m.itemLabel,onClick:function(){return c&&c(o)},children:[l(i,{title:"No Wells",placement:"right",children:e("div",{className:m.sectionTitle,children:[a&&l(p,{className:m.expandIcon}),e("span",{className:m.sectionName,children:[" ",o.name]})]})}),u(o)>0&&l(f,{bgColor:C.palette.primary.text9,textColor:"#fff",width:20+6*(g(o).length-2),children:g(o)})]}),x(o)?l(r,{className:m.checkbox,size:"small",checked:!0,indeterminate:b(o),color:"primary",onClick:k,disabled:a}):l(r,{className:m.checkbox,checked:!1,size:"small",color:"primary",onClick:k,indeterminate:!1,disabled:a})]})}C.propTypes={section:a({expanded:c,name:s,wells:d(a({}))}).isRequired,disabled:c,onExpandCollapse:m,onSelectAll:m,onClearAll:m},C.defaultProps={disabled:!1,onSelectAll:null,onExpandCollapse:null,onClearAll:null};var k=o(C);export default k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import{showSuccessNotification as n}from"../../../../utils/notificationToasts.js";import"../../../../utils/index.js";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{makeStyles as i,Typography as l,Accordion as c,AccordionSummary as a,AccordionDetails as s,List as m}from"@material-ui/core";import{memo as p}from"react";import{string as d,arrayOf as u,shape as f,func as h}from"prop-types";import w from"classnames";import{ExpandMore as y}from"@material-ui/icons";import x from"./AssetSearch.js";import b from"./SectionItem.js";import g from"./WellListItem.js";function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?v(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var O=i((function(e){return{content:{width:"472px",marginTop:"24px"},sectionItem:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"8px",fontSize:"12px",fontWeight:"normal",color:e.palette.primary.text6,borderTop:"1px solid ".concat(e.palette.primary.text8),"&:last-child":{borderBottom:"1px solid ".concat(e.palette.primary.text8)}},disabledSectionItem:{color:e.palette.primary.text8},wellList:{width:"100%",margin:0,padding:0},searchContainer:{display:"flex",justifyContent:"space-between",marginBottom:"24px",alignItems:"center"},advancedSearch:{fontSize:"14px",fontWeight:500,color:"#03BCD4",cursor:"pointer","&:hover":{textDecoration:"underline"}}}}));function S(e){var i=e.company,p=e.wellSections,d=e.getWellName,u=e.onChangeWellSections,f=e.onExploreMode,h=O(),v=function(e,t){var n=p.find((function(t){return t.name===e.name})).wells.map((function(e){return e.id})),r=p.map((function(e){var r=e.wells.map((function(e){return n.includes(e.id)?j(j({},e),{},{checked:t}):j({},e)}));return j(j({},e),{},{wells:r})}));u(r)},S=function(e){var t=p.map((function(t){return t.name===e.name?j(j({},t),{},{expanded:!t.expanded}):t}));u(t)},C=function(e){var t=p.map((function(t){var n=t.wells.map((function(t){return t.id===e.id?j(j({},t),{},{checked:!t.checked}):t}));return j(j({},t),{},{wells:n})}));u(t)},N=function(e){v(e,!0)},I=function(e){v(e,!1)};return r("div",{className:h.content,children:[r("div",{className:h.searchContainer,children:[o(x,{company:+i,onClickAsset:function(e,r){var o=p.map((function(n){if("Search Results"===n.name){var o=t(n.wells);return n.wells.find((function(t){return t.id===e}))||o.push({id:e,checked:!0,name:r,kind:"manual"}),j(j({},n),{},{wells:o})}return j(j({},n),{},{wells:n.wells.map((function(t){return t.id===e?j(j({},t),{},{checked:!0}):t}))})}));u(o),n("Offset well successfully added!")},onExploreMode:f}),o(l,{className:h.advancedSearch,onClick:function(){f()},children:"Advanced Search"})]}),(p||[]).map((function(e){return 0===e.wells.length?o("div",{className:w(h.sectionItem,h.disabledSectionItem),children:o(b,{section:e,disabled:!0})},"empty-".concat(e.name)):o("div",{className:h.sectionItem,children:r(c,{expanded:e.expanded,onChange:function(){return S(e)},children:[o(a,{expandIcon:o(y,{}),style:{width:"100%"},children:o(b,{section:e,onExpandCollapse:S,onSelectAll:N,onClearAll:I})}),o(s,{children:o(m,{dense:!0,className:h.wellList,children:e.wells.map((function(t){return o(g,{well:t,wellName:d(e.wells,t.id),rigName:t.rigName,onToggleWell:C},"well-".concat(e.name,"-").concat(t.id))}))})})]})},"section-".concat(e.name))}))]})}S.propTypes={company:d.isRequired,wellSections:u(f({})),getWellName:h.isRequired,onChangeWellSections:h.isRequired,onExploreMode:h.isRequired},S.defaultProps={wellSections:[]};var C=p(S);export default C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import{get as r,uniq as n,includes as o,isEqual as i}from"lodash";import s from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import a from"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsxs as l,Fragment as p,jsx as m}from"react/jsx-runtime";import{makeStyles as c,Dialog as d,DialogTitle as u,Typography as f,Tooltip as j,IconButton as C,DialogContent as v,DialogActions as b,Button as g}from"@material-ui/core";import{useState as h,useRef as x,useMemo as A,useEffect as I,useCallback as S}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import D from"prop-types";import y from"classnames";import{Close as W}from"@material-ui/icons";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import P from"../LoadingIndicator/LoadingIndicator.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../ConfirmationDialog.js";import"../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../IconButton/index.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../Button/index.js";import"../MenuItem/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import{useWells as k,useFetchBicWellsData as T}from"./effects/index.js";import w from"./components/Map/index.js";import E from"./components/WellSection/index.js";import{DEFAULT_WELL_SECTIONS as O}from"./constants.js";import L from"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../KeyboardDateTimePicker.js";import"../PostInput/PostInput.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?B(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var M=c((function(e){return{paper:{width:"552px"},dialogTitles:{display:"flex",flexDirection:"column"},titleContent:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},title:{fontSize:"20px",color:e.palette.primary.text1},description:{fontSize:"16px",fontWeight:"normal",color:e.palette.primary.text6,marginTop:16},closeIconButton:{fontSize:"20px",padding:4,"&:hover $closeIcon":{color:"#fff"}},closeIcon:{color:e.palette.primary.text6},topShadow:{width:"100%",height:"16px",backgroundImage:"linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9,")"),position:"absolute",top:"155px",zIndex:2},bottomShadow:{width:"100%",height:"16px",backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9,")"),position:"absolute",bottom:"52px",zIndex:2},dialogActions:{display:"flex",justifyContent:"flex-end",paddingTop:8,paddingBottom:8},dialogActionsSmallScreen:{paddingRight:"100px"},dialogContent:{display:"flex",flexDirection:"column"},buttonContainer:{display:"flex",gap:"16px"}}}));function N(e,t){var n=e.find((function(e){return e.id===t}));return r(n,"name")||"-"}function R(e,t){var n=e.find((function(e){return e.id===t}));return r(n,"rigName")||"-"}function V(e,t){return"well"===e.value?"Best Wells":"area"===e.value?"Area Offsets":"Best ".concat(e.value,"section"===t?" Wells":' " Wells')}function H(e){return e.map((function(e){return F(F({},e),{},{wells:e.wells.sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))})}))}function U(e){var t=r(e,"bicWellIds")||[],o=r(e,"manualWellIds")||[],i=r(e,"selectedWellIds")||[];return n(t.concat(o).concat(i))}function z(e){var c=e.defaultSubjectWell,D=e.offsetSetting,B=e.currentUser,z=e.isOpen,_=e.onClose,q=e.onSave,K=e.addWellsUsabilityInfo,G=e.unusableWellAlarm,Q=h(!1),$=s(Q,2),J=$[0],X=$[1],Y=M({scrolling:J}),Z=x(null),ee=x(!0),te=h(r(c,"companyId")||r(D,"companyId")||+r(B,"company_id")),re=s(te,2),ne=re[0],oe=re[1],ie=h(r(c,"asset_id")||r(D,"subjectWellId")||null),se=s(ie,2),ae=se[0],le=se[1],pe=k(ne,z),me=T(ae,z),ce=h([]),de=s(ce,2),ue=de[0],fe=de[1],je=h(!1),Ce=s(je,2),ve=Ce[0],be=Ce[1],ge=h(D),he=s(ge,2),xe=he[0],Ae=he[1],Ie=h(!1),Se=s(Ie,2),De=Se[0],ye=Se[1],We=A((function(){if(pe){var e=U(xe);return pe.filter((function(t){return e.find((function(e){return e===r(t,"id")}))}))}return[]}),[pe,xe]);I((function(){z&&(oe(r(c,"companyId")||r(D,"companyId")||+r(B,"company_id")),le(r(c,"asset_id")||r(D,"subjectWellId")||null),Ae(D),ye(!1),ee.current=!0)}),[D,z]),I((function(){if(z&&pe&&ee.current){var e,i=r(xe,"selectedWellIds")||[],s=r(xe,"manualWellIds")||[],l=r(xe,"bicWellIds")||[],p=i.concat(s),m=p.filter((function(e){return pe.find((function(t){return t.id===e}))})).map((function(e){return{id:e,checked:!0,name:N(pe,e),rigName:R(pe,e),kind:i.includes(e)?"advanced":"manual"}}));if(me&&me.filters&&me.result){var c,d=[],u=[{name:"Wells within Area",value:"area"}].concat(t(r(me,["filters","filterTabs"]))),f=(null===(c=me.filters)||void 0===c?void 0:c.filterMode)||"holeSize",j=n(u);e=[{name:"Search Results",wells:m,expanded:De}].concat(t(j.map((function(e){var t;return{name:V(e,f),wells:(null===(t=me.result[e.value])||void 0===t?void 0:t.filter((function(e){return pe.find((function(t){return t.id===e}))})).map((function(e){var t="object"===a(e)?e.id:e;return d.push(t),{id:t,checked:!1,name:N(pe,t),rigName:R(pe,t),kind:"best"}})))||[],expanded:!1}}))))}else e=[{name:"Search Results",wells:m,expanded:De}].concat(t(O));var C=e.map((function(e){var t=e.wells.map((function(e){return o(l,e.id)||o(p,e.id)?F(F({},e),{},{checked:!0}):F({},e)}));return F(F({},e),{},{wells:t})}));fe(H(C))}}),[z,pe,me,xe]);var Pe=S((function(){return U(xe).length}),[xe]),ke=S((function(){return(r(xe,"bicWellIds")||[]).length})),Te=x(null),we=!pe;return l(p,{children:[l(d,{onBackdropClick:_,onEscapeKeyDown:_,open:z,classes:{paper:Y.paper},children:[m(u,{children:l("div",{className:Y.dialogTitles,children:[l("div",{className:Y.titleContent,children:[m(f,{className:Y.title,children:"Select Offset Wells"}),m(j,{title:"Close",children:m(C,{"data-not-migrated-muiiconbutton":!0,"aria-label":"close",className:Y.closeIconButton,onClick:_,children:m(W,{className:Y.closeIcon})})})]}),m("div",{className:Y.description,children:"Quickly add all of the Best-In-Class Wells per section selected from the Offsets Well Selection Application."})]})}),J&&m("div",{className:Y.topShadow}),m(v,{className:Y.dialogContent,ref:Z,onScroll:function(){X(!0),clearTimeout(Te.current),Te.current=setTimeout((function(){X(!1)}),1e3)},children:we?m(P,{fullscreen:!1}):l(p,{children:[m(w,{wells:We,offsetWells:We}),m(E,{company:ne,wellSections:ue,getWellName:N,onChangeWellSections:function(e){var t=H(e);fe(t),ye(t[0].expanded);var r=[],o=[],i=[];t.forEach((function(e){e.wells.forEach((function(e){e.checked&&"advanced"===e.kind&&r.push(e.id),e.checked&&"manual"===e.kind&&o.push(e.id),e.checked&&"best"===e.kind&&i.push(e.id)}))}));var s=r.concat(o).concat(i),a=F(F({},xe),{},{selectedWellIds:n(r),manualWellIds:n(o),bicWellIds:n(i),resultWellIds:n(s)});Ae(a),ee.current=!1},onExploreMode:function(){be(!0)}})]})}),m("div",{className:Y.bottomShadow}),m(b,{className:y(Y.dialogActions),children:l("div",{className:Y.buttonContainer,children:[m(g,{onClick:_,color:"primary",children:"Cancel"}),l(g,{variant:"contained",color:"primary",onClick:function(){var e=U(xe),t=pe.filter((function(t){return o(e,t.id)})),r=F(F({},xe),{},{companyId:+ne,resultWellIds:e});be(!1),q(r,t)},children:["Add (",Pe(),")"]})]})})]}),ve&&m(L,{defaultSubjectWellId:r(c,"asset_id"),companyId:+ne,offsetSetting:xe,currentUser:B,addWellsUsabilityInfo:K,unusableWellAlarm:G,isAdvancedSearch:!0,bestCount:ke(),isOpen:ve,onClose:function(){be(!1)},onSave:function(e){var t=e;c||(i(ae,r(t,"subjectWellId"))&&i(ne,r(t,"companyId"))||(t=F(F({},t),{},{bicWellIds:[],manualWellIds:[],resultWellIds:[]})),le(r(t,"subjectWellId")),oe(r(t,"companyId")));var n=r(t,"manualWellIds")||[],o=r(t,"selectedWellIds")||[];n=n.filter((function(e){return!o.includes(e)})),t=F(F({},t),{},{manualWellIds:n}),Ae(t),ee.current=!0,ye(!0),be(!1)}})]})}z.propTypes={defaultSubjectWell:D.shape({}),offsetSetting:D.shape({subjectWellId:D.number,companyId:D.number}),currentUser:D.shape({}),isOpen:D.bool.isRequired,onClose:D.func.isRequired,onSave:D.func.isRequired,addWellsUsabilityInfo:D.func,unusableWellAlarm:D.string},z.defaultProps={defaultSubjectWell:null,addWellsUsabilityInfo:null,unusableWellAlarm:"Unable to add",offsetSetting:{},currentUser:{}};export default z;
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{get as t,uniq as r,includes as n,isEqual as o}from"lodash";import i from"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import s from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import a from"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsxs as p,Fragment as l,jsx as m}from"react/jsx-runtime";import{makeStyles as c,Dialog as d,DialogTitle as u,Typography as j,Tooltip as f,IconButton as C,DialogContent as v,DialogActions as b,Button as g}from"@material-ui/core";import{useState as A,useRef as D,useMemo as h,useEffect as I,useCallback as x}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import S from"prop-types";import y from"classnames";import{Close as W}from"@material-ui/icons";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import P from"../LoadingIndicator/LoadingIndicator.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../ConfirmationDialog.js";import"../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../IconButton/index.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../Button/index.js";import"../MenuItem/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import{useWells as k,useFetchBicWellsData as w}from"./effects/index.js";import E from"./components/Map/index.js";import T from"./components/WellSection/index.js";import{DEFAULT_WELL_SECTIONS as O}from"./constants.js";import B from"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ComparisonRow.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../FeedItem/FeedItem.js";import"../KeyboardDateTimePicker.js";import"../PostInput/PostInput.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?L(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var M=c((function(e){return{paper:{width:"552px"},dialogTitles:{display:"flex",flexDirection:"column"},titleContent:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},title:{fontSize:"20px",color:e.palette.primary.text1},description:{fontSize:"16px",fontWeight:"normal",color:e.palette.primary.text6,marginTop:16},closeIconButton:{fontSize:"20px",padding:4,"&:hover $closeIcon":{color:"#fff"}},closeIcon:{color:e.palette.primary.text6},topShadow:{width:"100%",height:"16px",backgroundImage:"linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9,")"),position:"absolute",top:"155px",zIndex:2},bottomShadow:{width:"100%",height:"16px",backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9,")"),position:"absolute",bottom:"52px",zIndex:2},dialogActions:{display:"flex",justifyContent:"flex-end",paddingTop:8,paddingBottom:8},dialogActionsSmallScreen:{paddingRight:"100px"},dialogContent:{display:"flex",flexDirection:"column",overflowX:"hidden"},buttonContainer:{display:"flex",gap:"16px"}}}));function N(e,r){var n=e.find((function(e){return e.id===r}));return t(n,"name")||"-"}function V(e,r){var n=e.find((function(e){return e.id===r}));return t(n,"rigName")||"-"}function R(e,t){return"well"===e.value?"Best Wells":"area"===e.value?"Area Offsets":"Best ".concat(e.value,"section"===t?" Wells":' " Wells')}function H(e){return e.map((function(e){return F(F({},e),{},{wells:e.wells.sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))})}))}function U(e){var n=t(e,"bicWellIds")||[],o=t(e,"manualWellIds")||[],i=t(e,"selectedWellIds")||[];return r(n.concat(o).concat(i))}function z(e){var c=e.defaultSubjectWell,S=e.offsetSetting,L=e.currentUser,z=e.isOpen,_=e.onClose,q=e.onSave,G=e.addWellsUsabilityInfo,K=e.unusableWellAlarm,Q=A(!1),X=s(Q,2),$=X[0],J=X[1],Y=M({scrolling:$}),Z=D(null),ee=D(!0),te=A(t(c,"companyId")||t(S,"companyId")||+t(L,"company_id")),re=s(te,2),ne=re[0],oe=re[1],ie=A(t(c,"asset_id")||t(S,"subjectWellId")||null),se=s(ie,2),ae=se[0],pe=se[1],le=k(ne,z),me=w(ae,z),ce=A([]),de=s(ce,2),ue=de[0],je=de[1],fe=A(!1),Ce=s(fe,2),ve=Ce[0],be=Ce[1],ge=A(S),Ae=s(ge,2),De=Ae[0],he=Ae[1],Ie=A(!1),xe=s(Ie,2),Se=xe[0],ye=xe[1],We=h((function(){if(le){var e=U(De);return le.filter((function(r){return e.find((function(e){return e===t(r,"id")}))}))}return[]}),[le,De]);I((function(){z&&(oe(t(c,"companyId")||t(S,"companyId")||+t(L,"company_id")),pe(t(c,"asset_id")||t(S,"subjectWellId")||null),he(S),ye(!1),ee.current=!0)}),[S,z]),I((function(){if(z&&le&&ee.current){var e,o=t(De,"selectedWellIds")||[],s=t(De,"manualWellIds")||[],p=t(De,"bicWellIds")||[],l=o.concat(s),m=l.filter((function(e){return le.find((function(t){return t.id===e}))})).map((function(e){return{id:e,checked:!0,name:N(le,e),rigName:V(le,e),kind:o.includes(e)?"advanced":"manual"}}));if(me&&me.filters&&me.result){var c,d=[],u=[{name:"Wells within Area",value:"area"}].concat(i(t(me,["filters","filterTabs"]))),j=(null===(c=me.filters)||void 0===c?void 0:c.filterMode)||"holeSize",f=r(u);e=[{name:"Search Results",wells:m,expanded:Se}].concat(i(f.map((function(e){var t;return{name:R(e,j),wells:(null===(t=me.result[e.value])||void 0===t?void 0:t.filter((function(e){return le.find((function(t){return t.id===e}))})).map((function(e){var t="object"===a(e)?e.id:e;return d.push(t),{id:t,checked:!1,name:N(le,t),rigName:V(le,t),kind:"best"}})))||[],expanded:!1}}))))}else e=[{name:"Search Results",wells:m,expanded:Se}].concat(i(O));var C=e.map((function(e){var t=e.wells.map((function(e){return n(p,e.id)||n(l,e.id)?F(F({},e),{},{checked:!0}):F({},e)}));return F(F({},e),{},{wells:t})}));je(H(C))}}),[z,le,me,De]);var Pe=x((function(){return U(De).length}),[De]),ke=x((function(){return(t(De,"bicWellIds")||[]).length})),we=D(null),Ee=!le;return p(l,{children:[p(d,{onBackdropClick:_,onEscapeKeyDown:_,open:z,classes:{paper:Y.paper},children:[m(u,{children:p("div",{className:Y.dialogTitles,children:[p("div",{className:Y.titleContent,children:[m(j,{className:Y.title,children:"Select Offset Wells"}),m(f,{title:"Close",children:m(C,{"data-not-migrated-muiiconbutton":!0,"aria-label":"close",className:Y.closeIconButton,onClick:_,children:m(W,{className:Y.closeIcon})})})]}),m("div",{className:Y.description,children:"Quickly add all of the Best-In-Class Wells per section selected from the Offsets Well Selection Application."})]})}),$&&m("div",{className:Y.topShadow}),m(v,{className:Y.dialogContent,ref:Z,onScroll:function(){J(!0),clearTimeout(we.current),we.current=setTimeout((function(){J(!1)}),1e3)},children:Ee?m(P,{fullscreen:!1}):p(l,{children:[m(E,{wells:We,offsetWells:We}),m(T,{company:ne,wellSections:ue,getWellName:N,onChangeWellSections:function(e){var t=H(e);je(t),ye(t[0].expanded);var n=[],o=[],i=[];t.forEach((function(e){e.wells.forEach((function(e){e.checked&&"advanced"===e.kind&&n.push(e.id),e.checked&&"manual"===e.kind&&o.push(e.id),e.checked&&"best"===e.kind&&i.push(e.id)}))}));var s=n.concat(o).concat(i),a=F(F({},De),{},{selectedWellIds:r(n),manualWellIds:r(o),bicWellIds:r(i),resultWellIds:r(s)});he(a),ee.current=!1},onExploreMode:function(){be(!0)}})]})}),m("div",{className:Y.bottomShadow}),m(b,{className:y(Y.dialogActions),children:p("div",{className:Y.buttonContainer,children:[m(g,{onClick:_,color:"primary",children:"Cancel"}),p(g,{variant:"contained",color:"primary",onClick:function(){var e=U(De),t=le.filter((function(t){return n(e,t.id)})),r=F(F({},De),{},{companyId:+ne,resultWellIds:e});be(!1),q(r,t)},children:["Add (",Pe(),")"]})]})})]}),ve&&m(B,{defaultSubjectWellId:t(c,"asset_id"),companyId:+ne,offsetSetting:De,currentUser:L,addWellsUsabilityInfo:G,unusableWellAlarm:K,isAdvancedSearch:!0,bestCount:ke(),isOpen:ve,onClose:function(){be(!1)},onSave:function(e){var r=e;c||(o(ae,t(r,"subjectWellId"))&&o(ne,t(r,"companyId"))||(r=F(F({},r),{},{bicWellIds:[],manualWellIds:[],resultWellIds:[]})),pe(t(r,"subjectWellId")),oe(t(r,"companyId")));var n=t(r,"manualWellIds")||[],i=t(r,"selectedWellIds")||[];n=n.filter((function(e){return!i.includes(e)})),r=F(F({},r),{},{manualWellIds:n}),he(r),ee.current=!0,ye(!0),be(!1)}})]})}z.propTypes={defaultSubjectWell:S.shape({}),offsetSetting:S.shape({subjectWellId:S.number,companyId:S.number}),currentUser:S.shape({}),isOpen:S.bool.isRequired,onClose:S.func.isRequired,onSave:S.func.isRequired,addWellsUsabilityInfo:S.func,unusableWellAlarm:S.string},z.defaultProps={defaultSubjectWell:null,addWellsUsabilityInfo:null,unusableWellAlarm:"Unable to add",offsetSetting:{},currentUser:{}};export default z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import"
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsx as t}from"react/jsx-runtime";import{makeStyles as r,Breadcrumbs as o}from"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import i from"prop-types";import n from"classnames";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../LoadingIndicator/LoadingIndicator.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../ConfirmationDialog.js";import"../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import{UniversalLink as s}from"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../IconButton/index.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../Button/index.js";import"../MenuItem/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ComparisonRow.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../FeedItem/FeedItem.js";import"../KeyboardDateTimePicker.js";import"../PostInput/PostInput.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";var p=r((function(e){return{container:{fontSize:"0.8125rem"},pathPart:{color:e.palette.grey[400],"&:hover":{color:"white"}},lastPathPart:{color:"white"}}})),m=function(r){var i=r.pathItems,m=p();return t(o,{className:m.container,children:i.map((function(r,o,i){return t(s,{className:n(m.pathPart,e({},m.lastPathPart,o===i.length-1)),href:r.href,children:r.text},r.text)}))})};m.propTypes={pathItems:i.arrayOf(i.shape({text:i.string,href:i.string})).isRequired};export default m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../constants/completion.js";import"../constants/alerts.js";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{noop as t}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../constants/completion.js";import"../constants/alerts.js";import o from"@babel/runtime/helpers/slicedToArray";import"../constants/goals.js";import"../constants/segment.js";import"../constants/apps.js";import"../constants/drillstring.js";import"../constants/notifications.js";import"../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../utils/index.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";import{withStyles as n,Box as s,IconButton as p}from"@material-ui/core";import{useState as a}from"react";import"querystring";import"uuid/v1";import"../clients/jsonApi/index.js";import"../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import m from"prop-types";import l from"classnames";import"./Modal/index.js";import"./IconMenu/index.js";import"./StyledMenuItem/index.js";import"./LoadingIndicator/LoadingIndicator.js";import"./DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"./EmptyView/EmptyAppView/EmptyAppView.js";import"./ErrorBoundary/ErrorBoundary.js";import"./Typography.js";import"./ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"./ConfirmationDialog.js";import"./DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"./SlateFormattedText/RenderElements.js";import"./SlateFormattedText/SlateFormattedText.js";import"./DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"./DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"./DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"./DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"./DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"./EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"./DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"./DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"./DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"./DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"./Tooltip/MuiTooltipDcWrapper.js";import"./Avatar/index.js";import"./Annotations/AnnotationsContext.js";import"./DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"./DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"./IconButton/index.js";import"./Annotations/components/AnnotationsList/index.js";import"./Annotations/components/LastAnnotation/index.js";import"./PadModeSelect/PadModeSelect.js";import"./DevCenter/AppHeader/AppHeader.js";import d from"@material-ui/icons/ChevronLeftRounded";import c from"@material-ui/icons/ChevronRightRounded";import"./DevCenter/AppSideBar/AppSideBar.js";import"./DevCenter/AppContext.js";import"./DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"./DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"./DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"./DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"./DevCenter/NavigationBar/NavigationBar.js";import C from"./DevCenter/SideBar/SideBar.js";import"./DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"./DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"./DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"./DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"./TruncatedText/index.js";import"./AssetEditor/SingleAssetEditor.js";import"./AssetEditor/AssetEditorAutocomplete.js";import"./AssetEditor/index.js";import"./AppVersionsSelect/AppVersionsSelect.js";import"./DateTimePicker/index.js";import"./DatePicker/index.js";import"./ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"./ColorPicker/ColorPicker.js";import"./ParameterCharts/AddEditTrack.js";import"./ParameterCharts/ParameterCharts.js";import"./ChartActionsList/ChartActionsList.js";import"./SettingEditors/ColorEditor/index.js";import"./SettingEditors/DropdownEditor/index.js";import"./SettingEditors/RadioEditor/index.js";import"./SwitchControl/index.js";import"./RangeSlider/RangeSlider.js";import"./Login/components/Login.js";import"./Login/components/PasswordField.js";import"./Login/components/Chip.js";import"./Login/components/StepFooter.js";import"./Login/components/StepContent.js";import"./Login/components/StepHeader.js";import"./Login/components/Step.js";import"./Login/components/OrDivider.js";import"./Login/components/HiddenEmailField.js";import"./Login/components/EmailField.js";import"./Breadcrumbs/index.js";import"./VirtualizedTable/index.js";import"./EmptyView/EmptyView.js";import"./Button/index.js";import"./MenuItem/index.js";import"./ContextMenuItem/index.js";import"./FolderMenuItem/index.js";import"./EditableItem/EditableItem/index.js";import"./EditableItem/EditableItemWithBadge/index.js";import"./Checkbox/index.js";import"./FolderMenuItemWithLinks/index.js";import"./TextField/index.js";import"./Chip/index.js";import"./Counter/index.js";import"./AnchorsList/AnchorsList.js";import"./Select/index.js";import"./Tabs/Tabs.js";import"./Tabs/Tab.js";import"./ResizableTable/ResizableTable.js";import"./Drillstring/BHASchematic.js";import"./Drillstring/BHAComponentIcon.js";import"./Drillstring/BHATable/index.js";import"./Drillstring/BHAComponentDetail/index.js";import"./Casing/CasingComponentIcon.js";import"./Casing/CasingTable/index.js";import"./WellSummary/WellSummaryItemLabel.js";import"./WellSummary/WellSummaryItemTitle.js";import"./WellSummary/WellSummaryItemValue.js";import"./WellSummary/ActivitySummaryChart.js";import"./WellSummary/FracWirelineTimeChart.js";import"./BICOffsetPickerDialog/index.js";import"./OffsetWellPickerV2/OffsetWellPickerDialog.js";import"./Notifications/Notifications.js";import"./TextLink/index.js";import"./Template/TemplatePopover/index.js";import"./PinnableFilters/PinnableFilters.js";import"./HeaderLayout/HeaderLayout.js";import"./PadOffsetsPicker/PadOffsetsPicker.js";import"./PadOffsetsPicker/OffsetAssetChip.js";import"./PadOffsetsPicker/OffsetAssetsListExpander.js";import"./PadOffsetsPicker/StagesSelector.js";import"./Table/TableToolbar/TableToolbar.js";import"./PriceInput/PriceInput.js";import"./LabelsCounter/LabelsCounter.js";import"./Stepper/Step.js";import"./Stepper/StepsWrapper.js";import"./Stepper/Stepper.js";import"./Comment/CommentIcon/index.js";import"./FilesLoader/FilesLoader.js";import"./SearchInput/index.js";import"./StageDesignVActual/ComparisonHeader.js";import"./StageDesignVActual/ComparisonBar/ComparisonBar.js";import"./StageDesignVActual/ComparisonRow.js";import"./StageDesignVActual/ElementsComparison/ElementsComparison.js";import"./FeedItem/FeedItem.js";import"./KeyboardDateTimePicker.js";import"./PostInput/PostInput.js";import"./FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"./AddComment/Popover.js";import"./AddComment/Popup.js";var j=function(t){var n,m=t.classes,j=t.children,u=t.onStateChange,g=t.initialState,D=t.drawerPaperClassName,A=t.isToolbarGutterShown,v=t.openedDrawerWidth,f=t.anchor,b=a(g),h=o(b,2),x=h[0],S=h[1],P=function(){S(!x),u(!x)},T="left"===f?d:c;return r(C,{isToolbarGutterShown:A,drawerWidth:v,drawerClassName:l(m.drawer,!x&&m.drawerClosed),drawerPaperClassName:l(m.drawer,m.drawerPaper,D,!x&&m.drawerClosed),anchor:f,listClassName:m.list,onClick:function(){x||P()},children:[j,i(s,{className:l(m.openToggleContainer,(n={},e(n,m.openToggleContainerCollapsed,!x),e(n,m.openToggleContainerOpened,x),n)),children:i(p,{"aria-label":"toggle sidebar",className:m.openToggleIconButton,onClick:P,children:i(T,{className:l(m.openToggleIcon,e({},m.openToggleIconClosed,!x))})})})]})};j.propTypes={children:m.node.isRequired,onStateChange:m.func,initialState:m.bool,drawerPaperClassName:m.string,isToolbarGutterShown:m.bool,openedDrawerWidth:m.oneOfType([m.string,m.number]),anchor:m.oneOf(["left","right"]),closedWidth:m.oneOfType([m.string,m.number])},j.defaultProps={onStateChange:t,initialState:!0,closedWidth:48,drawerPaperClassName:null,isToolbarGutterShown:void 0,openedDrawerWidth:void 0,anchor:void 0};var u=n((function(e){return{drawer:{display:"flex",flexDirection:"column",height:"100%"},drawerPaper:{"&$drawerClosed":{cursor:"pointer","&:hover::before":{content:'""',position:"absolute",top:0,right:0,bottom:0,left:0,background:e.palette.background.b7}}},drawerClosed:{width:function(e){return e.closedWidth}},openToggleIcon:{fontSize:"1.25rem",color:e.palette.primary.text7},openToggleIconClosed:{transform:"rotate(180deg)"},openToggleIconButton:{padding:6},openToggleContainer:{display:"flex",position:"absolute",bottom:0,width:"100%",flex:"0 0",padding:e.spacing(2,1,1.5)},openToggleContainerCollapsed:{paddingRight:e.spacing(1),paddingLeft:e.spacing(1),justifyContent:"center"},openToggleContainerOpened:{justifyContent:function(e){return"left"===e.anchor?"flex-end":"flex-start"}},list:{display:"flex",flexDirection:"column",flexGrow:1,overflow:"hidden",paddingBottom:60}}}))(j);export default u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{noop as t,get as r}from"lodash";import n from"moment";import o from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import s from"@material-ui/core/colors/grey";import c from"../../utils/main.js";import{isNativeDetected as m}from"../../utils/mobileDetect.js";import l from"@babel/runtime/helpers/createClass";import{jsxs as p,jsx as u}from"react/jsx-runtime";import{createRef as d,PureComponent as h}from"react";import{deleteFeedItemComment as f}from"../../clients/jsonApi/index.js";import g from"prop-types";import v from"classnames";import{withStyles as y}from"@material-ui/core/styles";import b from"@babel/runtime/helpers/assertThisInitialized";import C from"@babel/runtime/helpers/inherits";import D from"@babel/runtime/helpers/possibleConstructorReturn";import M from"@babel/runtime/helpers/getPrototypeOf";import E from"@material-ui/core/Typography";import w from"../ConfirmationDialog.js";import I from"../Avatar/index.js";import O from"../UserCardPopover.js";import{formatMentionText as j}from"../UserMention/utils/index.js";import{isUserAdmin as k,isUserCorvaAdmin as x}from"../../utils/user.js";import A from"@material-ui/icons/MoreVert";import N from"@material-ui/core/IconButton";import S from"../Attachment/index.js";import _ from"../CommentInput/index.js";import R from"../CommentWrapper.js";import P from"../CommentLoader.js";import T from"@material-ui/core/Menu";import U from"@material-ui/core/MenuItem";import z from"./styles.css.js";function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=M(e);if(t){var o=M(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return D(this,r)}}var B={chatAvatarWrapper:{paddingTop:2,position:"absolute",top:6,left:-18},commentInfoContainer:{display:"inline-flex",alignItems:"center",width:"100%",paddingTop:5},userNameWrapper:{overflow:"hidden"},infoContainer:{display:"inline-block",verticalAlign:"top",width:"100%",paddingLeft:10}},q={commentWrapper:{width:"calc(100% - 10px)"},timeRoot:{color:s[700],float:"right",marginRight:5,marginLeft:10,fontSize:"10px"},textRoot:{marginTop:5,color:"#CCC",fontWeight:"normal",fontSize:"14px"},iconButtonRoot:{float:"right",height:40,width:40,padding:0,visibility:"hidden"},userName:{fontSize:"12px"}},F=function(m){C(y,h);var g=W(y);function y(t){var r,n;return o(this,y),r=g.call(this,t),e(b(r),"deleteComment",(n=a(i.mark((function e(t,r){var n;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f(t,r);case 3:n=e.sent,e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0);case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,null,[[0,6]])}))),function(e,t){return n.apply(this,arguments)})),e(b(r),"showIntoView",(function(){r.props.handleShowOnMount(),r.commentEl.current.scrollIntoView({block:"end"})})),e(b(r),"handleToggleActionsMenu",(function(e){var t=e.currentTarget;r.setState((function(e){return{actionsMenuAnchorEl:e.actionsMenuAnchorEl?null:t}}))})),e(b(r),"handleKeyDown",(function(e){27===e.keyCode&&r.setState({isEditing:!1}),document.removeEventListener("keydown",r.handleKeyDown,!1)})),e(b(r),"handleEditMenuItem",(function(){document.addEventListener("keydown",r.handleKeyDown,!1),r.setState({isEditing:!0},(function(){r.inputEl.current&&r.inputEl.current.focus()}))})),e(b(r),"getEditCommentProps",(function(){var e=r.props.comment,t=e.id,n=e.body,o=e.attachment;return{editFeedItemId:e.feed_activity_id,editCommentId:t,editComment:n,editAttachment:o}})),e(b(r),"onEditFinish",(function(){r.setState({isEditing:!1,isLoading:!1})})),e(b(r),"handleDeleteMenuItem",(function(){r.setState({openDeleteDialog:!0})})),e(b(r),"handleDelete",a(i.mark((function e(){var t,n,o;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.props.comment.id,n=r.props.comment.feed_activity_id,r.setState({isLoading:!0}),e.next=5,r.deleteComment(n,t);case 5:o=e.sent,r.setState({isLoading:!1,openDeleteDialog:!1}),o&&r.props.handleDeleteCallback(t);case 8:case"end":return e.stop()}}),e)})))),r.state={actionsMenuAnchorEl:null,isLoading:!1,isEditing:!1,openDeleteDialog:!1},r.inputEl=d(),r.commentEl=d(),r}return l(y,[{key:"componentDidMount",value:function(){this.props.showOnMount&&this.showIntoView()}},{key:"renderMenuIcon",value:function(){var e=this.isCurrentUserCommentCreator,t=this.isCurrentUserCommentCreator||k(this.props.user)||x(this.props.user);return t||e?p("div",{className:z.cCommentMenu,children:[u(N,{"data-testid":"".concat("comment","_menuButton"),"aria-label":"Actions","aria-owns":this.state.actionsMenuAnchorEl?"c-comment__actions-menu":void 0,"aria-haspopup":"true",classes:{root:this.props.classes.iconButtonRoot},onClick:this.handleToggleActionsMenu,children:u(A,{htmlColor:s[400]})}),p(T,{id:"c-comment__actions-menu",anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:this.state.actionsMenuAnchorEl,open:!!this.state.actionsMenuAnchorEl,onClick:this.handleToggleActionsMenu,children:[e&&u(U,{"data-testid":"".concat("comment","_editMenuItem"),onClick:this.handleEditMenuItem,children:"Edit"}),t&&u(U,{"data-testid":"".concat("comment","_deleteMenuItem"),onClick:this.handleDeleteMenuItem,children:"Delete"})]})]}):null}},{key:"render",value:function(){var o,i,a=this,s=this.state,m=s.isLoading,l=s.isEditing;if(m){var d=this.props.spaceAround;return u(P,{spaceAround:d})}var h=this.props,f=h.comment,g=h.classes,y=h.spaceAround,b=h.isNative,C=h.patchCommentCallback,D=h.companyId;if(l)return u(_,function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?L(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({inputRef:this.inputEl,postComment:t,exitEditMode:this.onEditFinish,setIsEditting:function(){return a.setState({isLoading:!0})},patchCommentCallback:C,companyId:D},this.getEditCommentProps()));var M=c.getUserFullName(f.user),k=b?"MM/DD HH:mm":"MM/DD/YY HH:mm",x=n(f.created_at).format(k),A=(null==f||null===(o=f.attachment)||void 0===o?void 0:o.signed_url)||(null==f||null===(i=f.attachment)||void 0===i?void 0:i.url),N=r(f,["attachment","size"]);return p("div",{"data-testid":"".concat("comment","_commentItem_").concat(f.body),className:v(z.cComment,e({},z.cCommentNative,b)),ref:this.commentEl,children:[p(R,{spaceAround:y,className:this.props.classes.commentWrapper,children:[u("div",{style:B.chatAvatarWrapper,children:b?u(I,{size:26,displayName:M,imgSrc:r(f,["user","profile_photo"]),className:this.props.classes.avatar}):u(O,{user:f.user,currentUser:this.props.currentUser,children:u(I,{size:26,displayName:M,imgSrc:r(f,["user","profile_photo"]),className:this.props.classes.avatar})})}),p("div",{style:B.infoContainer,children:[u("div",{children:p("div",{style:B.commentInfoContainer,children:[u("div",{style:B.userNameWrapper,children:u(E,{"data-testid":"".concat("comment","_userName"),variant:"subtitle2",noWrap:!0,className:g.userName,children:M})}),u("div",{style:B.timeWrapper,children:u(E,{"data-testid":"".concat("comment","_addTime"),variant:"caption",classes:{root:g.timeRoot},children:x})})]})}),p("div",{className:z.cCommentBody,children:[this.renderMenuIcon(),u(E,{"data-testid":"".concat("comment","_commentMessage"),variant:"body1",classes:{root:g.textRoot},children:j(f.body,f.mentioned_users,b,"#00bcd4",this.props.currentUser)}),A&&u(S,{attachmentUrl:A,attachmentSize:N,size:"small"})]})]})]}),this.state.openDeleteDialog&&u(w,{open:this.state.openDeleteDialog,text:"Do you really want to delete comment?",handleClose:function(){return a.setState({openDeleteDialog:!1})},handleOk:this.handleDelete,okText:"Delete"})]})}},{key:"isCurrentUserCommentCreator",get:function(){return Number(r(this.props.comment,["user","id"]))===Number(this.props.currentUser.id)}}]),y}();F.propTypes={comment:g.shape({}).isRequired,showOnMount:g.bool,spaceAround:g.bool,handleShowOnMount:g.func,handleEdit:g.func,handleDeleteCallback:g.func.isRequired,patchCommentCallback:g.func.isRequired,companyId:g.number,currentUser:g.shape(),classes:g.shape({}).isRequired,isNative:g.bool},F.defaultProps={showOnMount:!1,spaceAround:!1,handleShowOnMount:t,handleEdit:t,companyId:null,isNative:m,currentUser:{}};var H=y(q)(F);export default H;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../constants/completion.js";import"../../../constants/alerts.js";import{
|
|
1
|
+
import{get as n}from"lodash";import"../../../constants/completion.js";import"../../../constants/alerts.js";import{DEV_CENTER_CLI_APP_ID as t}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import{SEGMENTS as e}from"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import{getAppName as a}from"../../../utils/devcenter.js";import{isDevOrQAEnv as s}from"../../../utils/env.js";import"../../../utils/index.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";import r from"prop-types";import"../../Annotations/AnnotationsContext.js";import"../../Annotations/components/AnnotationsList/index.js";import p from"../../Annotations/components/LastAnnotation/index.js";import l from"./VersionBadge.js";import d from"./PadMode.js";import c from"../../AssetNameLabel/index.js";import m from"./AppHeaderNew.js";import u from"./AppHeader.css.js";function h(r){var h,f,A,g,v,L,b,j,_,w=r.app,x=r.appLastAnnotation,C=r.appSettings,N=r.badge,y=r.classes,I=r.coordinates,S=r.currentUser,D=r.fracFleet,H=r.isMaximized,M=r.onSettingChange,R=r.openAnnotationsList,F=r.rig,W=r.showLastAnnotation,q=r.updateCurrentDashboardAppLastAnnotation,z=r.well,O=r.wells,P=r.children;if(s)return i(m,{app:w,appLastAnnotation:x,appSettings:C,badge:N,classes:y,coordinates:I,currentUser:S,fracFleet:D,isMaximized:H,onSettingChange:M,openAnnotationsList:R,rig:F,showLastAnnotation:W,updateCurrentDashboardAppLastAnnotation:q,well:z,wells:O,children:P});var U=a(w),k=null==w||null===(h=w.package)||void 0===h||null===(f=h.manifest)||void 0===f||null===(A=f.application)||void 0===A?void 0:A.subtitle,T=null!==(g=null==w||null===(v=w.package)||void 0===v||null===(L=v.manifest)||void 0===L||null===(b=L.application)||void 0===b||null===(j=b.segments)||void 0===j?void 0:j[0])&&void 0!==g?g:e.DRILLING,G=T===e.DRILLING,V=(null==w?void 0:w.settings)||{},B=V.wellId,E=V.rigId,J=V.fracFleetId,K=V.padId,Q=K&&(null==D||null===(_=D.pad_frac_fleets.find((function(n){return n.pad.id===K})))||void 0===_?void 0:_.pad),X=G?null==F?void 0:F.name:null==D?void 0:D.name,Y=G?B&&(null==z?void 0:z.name):K&&(null==Q?void 0:Q.name),Z=!!(B||E||J),$=null!=D&&D.current_pad_id?"assets/types/pad/".concat(null==D?void 0:D.current_pad_id):null,nn=G?X&&"assets/".concat(null==z?void 0:z.asset_id):$,tn=K&&"assets/types/pad/".concat(K),en=w&&w.id===t;return o("div",{className:y.appHeader,children:[o("div",{className:y.appHeaderTitleWrapper,children:[o("div",{children:[o("div",{className:u.titleWrapper,children:[i("h6",{"data-testid":"".concat("DevCenter_AppHeader","_name"),className:u.title,children:U}),i(l,{app:w}),T===e.COMPLETION&&i(d,{fracFleet:D,wells:O,well:z,onSettingChange:M,appSettings:C})]}),N]}),w&&I&&i(c,{isPrimaryNameVisible:Z,primaryAssetName:X,secondaryAssetName:Y,coordinatesPixelWidth:I.pixelWidth,primaryAssetLink:!en&&nn,secondaryAssetLink:!en&&tn,isMaximized:H})]}),k&&i("h6",{"data-testid":"".concat("DevCenter_AppHeader","_subtitle"),className:u.subtitle,children:k}),W&&x&&i(p,{dashboardAppId:w.id,appId:n(w,["app","id"]),annotation:x,openAnnotationsList:R,updateCurrentDashboardAppLastAnnotation:q,currentUser:S})]})}h.propTypes={app:r.object.isRequired,badge:r.node,classes:r.shape({appHeader:r.string,appHeaderTitleWrapper:r.string}),showLastAnnotation:r.bool,currentUser:r.shape({}),appLastAnnotation:r.shape({}),updateCurrentDashboardAppLastAnnotation:r.func,openAnnotationsList:r.func,rig:r.shape({name:r.string,asset_id:r.number}),well:r.shape({name:r.string,asset_id:r.number}),fracFleet:r.shape({name:r.string,current_pad_id:r.number,pad_frac_fleets:r.arrayOf(r.shape({pad:r.shape({id:r.number.isRequired}).isRequired})).isRequired}),wells:r.arrayOf(r.shape({})),coordinates:r.shape({pixelWidth:r.number.isRequired}),isMaximized:r.bool,appSettings:r.shape({}),onSettingChange:r.func,children:r.arrayOf(r.node)},h.defaultProps={appLastAnnotation:null,appSettings:void 0,badge:null,classes:{},coordinates:void 0,currentUser:void 0,fracFleet:null,isMaximized:!1,onSettingChange:void 0,openAnnotationsList:void 0,rig:null,showLastAnnotation:!0,updateCurrentDashboardAppLastAnnotation:function(){},well:null,wells:null,children:null};export default h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from'../../../ext-esm/style-inject/dist/style-inject.es.js';e(".AppHeaderNew_appHeaderContainer__1Jw7S{display:flex}.AppHeaderNew_titleBlock__2Hcti{display:inline;padding-right:8px}.AppHeaderNew_headerComponents__3IHT4,.AppHeaderNew_titleBlock__2Hcti{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.AppHeaderNew_headerComponents__3IHT4{display:flex;justify-content:flex-end}.AppHeaderNew_padModeSelect__2TzNO{height:24px}.AppHeaderNew_padModeSelect__2TzNO>div:first-child{padding-top:0!important}.AppHeaderNew_smallPadModeSelect__3_IUP{height:24px}.AppHeaderNew_smallPadModeSelect__3_IUP>div:first-child{padding-left:0;padding-top:8px;padding-bottom:0}.AppHeaderNew_titleWrapper__1COp-{display:flex;align-items:center}.AppHeaderNew_title__3HPRS{margin:0 8px 0 1px;font-size:18px;font-weight:500;line-height:24px}.AppHeaderNew_subtitle__2SNhn,.AppHeaderNew_title__3HPRS{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.AppHeaderNew_subtitle__2SNhn{color:#888;margin:0 0 0 1px;font-size:12px;font-weight:400;line-height:16px}.AppHeaderNew_mediumSizeContent__1YMaM{margin-top:8px;justify-content:flex-start}.AppHeaderNew_mediumSizeContent__1YMaM .AppHeaderNew_headerChildren__1oNXF{padding:0}.AppHeaderNew_headerChildren__1oNXF{display:flex;padding:5px 16px 12px}.AppHeaderNew_headerChildren__1oNXF,.AppHeaderNew_headerChildren__1oNXF>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}");export default{appHeaderContainer:"AppHeaderNew_appHeaderContainer__1Jw7S",titleBlock:"AppHeaderNew_titleBlock__2Hcti",headerComponents:"AppHeaderNew_headerComponents__3IHT4",padModeSelect:"AppHeaderNew_padModeSelect__2TzNO",smallPadModeSelect:"AppHeaderNew_smallPadModeSelect__3_IUP",titleWrapper:"AppHeaderNew_titleWrapper__1COp-",title:"AppHeaderNew_title__3HPRS",subtitle:"AppHeaderNew_subtitle__2SNhn",mediumSizeContent:"AppHeaderNew_mediumSizeContent__1YMaM",headerChildren:"AppHeaderNew_headerChildren__1oNXF"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{get as e}from"lodash";import"../../../constants/completion.js";import"../../../constants/alerts.js";import n from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as t}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import{SEGMENTS as a}from"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import{getAppName as i,getAppSegment as s}from"../../../utils/devcenter.js";import{jsxs as o,Fragment as r,jsx as l}from"react/jsx-runtime";import{useRef as d,useState as p,useEffect as c}from"react";import m from"prop-types";import u from"classnames";import"../../Annotations/AnnotationsContext.js";import"../../Annotations/components/AnnotationsList/index.js";import h from"../../Annotations/components/LastAnnotation/index.js";import f from"./VersionBadge.js";import A from"./PadMode.js";import v from"../../AssetNameLabel/index.js";import g from"./AppHeaderNew.css.js";import{getAppDimension as L}from"./utils.js";var b="EXTRA_LARGE",j="SMALL";function C(m){var C,N,w,_,S=m.app,x=m.appLastAnnotation,y=m.appSettings,M=m.badge,I=m.classes,R=m.coordinates,H=m.currentUser,D=m.fracFleet,W=m.isMaximized,z=m.onSettingChange,F=m.openAnnotationsList,P=m.rig,T=m.showLastAnnotation,q=m.updateCurrentDashboardAppLastAnnotation,O=m.well,k=m.wells,U=m.children,E=null==R?void 0:R.pixelWidth,B=L(E),G=i(S),V=null==S||null===(C=S.package)||void 0===C||null===(N=C.manifest)||void 0===N||null===(w=N.application)||void 0===w?void 0:w.subtitle,X=s(S),J=X===a.DRILLING,K=(null==S?void 0:S.settings)||{},Q=K.wellId,Y=K.rigId,Z=K.fracFleetId,$=K.padId,ee=$&&(null==D||null===(_=D.pad_frac_fleets.find((function(e){return e.pad.id===$})))||void 0===_?void 0:_.pad),ne=J?null==P?void 0:P.name:null==D?void 0:D.name,te=J?Q&&(null==O?void 0:O.name):$&&(null==ee?void 0:ee.name),ae=!!(Q||Y||Z),ie=null!=D&&D.current_pad_id?"assets/types/pad/".concat(null==D?void 0:D.current_pad_id):null,se=J?ne&&"assets/".concat(null==O?void 0:O.asset_id):ie,oe=$&&"assets/types/pad/".concat($),re=S&&S.id===t,le=d(null),de=p({width:0}),pe=n(de,2),ce=pe[0],me=pe[1],ue=p(0),he=n(ue,2),fe=he[0],Ae=he[1];return c((function(){Ae(null==ce?void 0:ce.width)}),[null==ce?void 0:ce.width,E]),o(r,{children:[o("div",{className:u(g.appHeaderContainer,I.appHeader),children:[o("div",{className:g.titleBlock,children:[o("div",{className:I.appHeaderTitleWrapper,ref:le,children:[o("div",{className:g.titleWrapper,children:[l("h6",{"data-testid":"".concat("DevCenter_AppHeader","_name"),className:g.title,children:G}),l(f,{app:S})]}),M]}),V&&l("h6",{"data-testid":"".concat("DevCenter_AppHeader","_subtitle"),className:g.subtitle,children:V})]}),o("div",{className:g.headerComponents,style:{marginRight:"".concat(fe,"px")},children:[B===b&&l("div",{className:g.headerChildren,children:U}),X===a.COMPLETION&&B!==j&&l("div",{className:g.padModeSelect,children:l(A,{fracFleet:D,wells:k,well:O,onSettingChange:z,appSettings:y})})]}),S&&R&&l(v,{isPrimaryNameVisible:ae,primaryAssetName:ne,secondaryAssetName:te,coordinatesPixelWidth:R.pixelWidth,primaryAssetLink:!re&&se,secondaryAssetLink:!re&&oe,isMaximized:W,onSize:function(e){return me(e)}}),T&&x&&l(h,{dashboardAppId:S.id,appId:e(S,["app","id"]),annotation:x,openAnnotationsList:F,updateCurrentDashboardAppLastAnnotation:q,currentUser:H})]}),B===j&&l("div",{className:u(g.padModeSelect,g.smallPadModeSelect),children:l(A,{fracFleet:D,wells:k,well:O,onSettingChange:z,appSettings:y})}),B!==b&&l("div",{className:u(g.mediumSizeContent,g.headerComponents),children:l("div",{className:g.headerChildren,children:U})})]})}C.propTypes={app:m.object.isRequired,badge:m.node,classes:m.shape({appHeader:m.string,appHeaderTitleWrapper:m.string}),showLastAnnotation:m.bool,currentUser:m.shape({}),appLastAnnotation:m.shape({}),updateCurrentDashboardAppLastAnnotation:m.func,openAnnotationsList:m.func,rig:m.shape({name:m.string,asset_id:m.number}),well:m.shape({name:m.string,asset_id:m.number}),fracFleet:m.shape({name:m.string,current_pad_id:m.number,pad_frac_fleets:m.arrayOf(m.shape({pad:m.shape({id:m.number.isRequired}).isRequired})).isRequired}),wells:m.arrayOf(m.shape({})),coordinates:m.shape({pixelWidth:m.number.isRequired}),isMaximized:m.bool,appSettings:m.shape({}),onSettingChange:m.func,children:m.arrayOf(m.node)},C.defaultProps={appLastAnnotation:null,appSettings:null,badge:null,classes:{},coordinates:void 0,currentUser:void 0,fracFleet:null,isMaximized:!1,onSettingChange:void 0,openAnnotationsList:void 0,rig:null,showLastAnnotation:!0,updateCurrentDashboardAppLastAnnotation:function(){},well:null,wells:null,children:null};export default C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{noop as t,get as r,isEmpty as o}from"lodash";import{COMPLETION_APP_TYPES as p}from"../../../constants/completion.js";import{getAssetKey as n,getDefaultPadModeSetting as i}from"../../../utils/completion.js";import{jsx as s}from"react/jsx-runtime";import l from"prop-types";import a from"../../PadModeSelect/PadModeSelect.js";function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function f(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?c(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):c(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var m=function(t){var l=t.fracFleet,c=t.wells,m=t.well,u=t.onSettingChange,g=t.appSettings,y=t.completionAppType;if(m||!c&&!l)return null;var d=g.padId,O=y||p.fracMultiWellApp,b=n(l,m,d),j=r(g,["settingsByAsset",b]),h=o(j)?i(l,m,O):j;return s(a,{assets:c,completionAppType:O,padModeSetting:h,onChange:function(t){return u("settingsByAsset",f(f({},r(g,"settingsByAsset",{})),{},e({},b,t)))}})};m.propTypes={appSettings:l.shape({padId:l.number}),completionAppType:l.string,fracFleet:l.shape({}),onSettingChange:l.func,well:l.shape({}),wells:l.arrayOf(l.shape())},m.defaultProps={appSettings:{},completionAppType:void 0,fracFleet:void 0,onSettingChange:t,well:void 0,wells:void 0};export default m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="EXTRA_LARGE",A="LARGE",E="MEDIUM",L="SMALL",n=960,t=600,M=428,R=function(R){return R<=M?L:R<=t?E:R<=n?A:r};export{R as getAppDimension};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import
|
|
1
|
+
import"@babel/runtime/helpers/defineProperty";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import e from"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsxs as t,Fragment as o,jsx as r}from"react/jsx-runtime";import{makeStyles as i,Popover as n}from"@material-ui/core";import{useState as p}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import s from"prop-types";import m from"classnames";import{Settings as a,Close as l}from"@material-ui/icons";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../ConfirmationDialog.js";import"../DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Tooltip/MuiTooltipDcWrapper.js";import"../../Avatar/index.js";import"../../Annotations/AnnotationsContext.js";import"../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import d from"../../IconButton/index.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../AppHeader/AppHeader.js";import"../AppSideBar/AppSideBar.js";import"../AppContext.js";import"../AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../TruncatedText/index.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../ColorPicker/ColorPicker.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ChartActionsList/ChartActionsList.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../RangeSlider/RangeSlider.js";import"../../Login/components/Login.js";import"../../Login/components/PasswordField.js";import"../../Login/components/Chip.js";import"../../Login/components/StepFooter.js";import"../../Login/components/StepContent.js";import"../../Login/components/StepHeader.js";import"../../Login/components/Step.js";import"../../Login/components/OrDivider.js";import"../../Login/components/HiddenEmailField.js";import"../../Login/components/EmailField.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../Button/index.js";import"../../MenuItem/index.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTable/index.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../Notifications/Notifications.js";import"../../TextLink/index.js";import"../../Template/TemplatePopover/index.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Stepper/Stepper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../SearchInput/index.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../FeedItem/FeedItem.js";import"../../KeyboardDateTimePicker.js";import"../../PostInput/PostInput.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";var c=i((function(e){return{popoverPaper:{minWidth:286,width:286,overflowY:"hidden",backgroundColor:e.palette.background.b9,maxHeight:"calc(100% - 24px)","&.scrollable":{height:"100%"}},popoverHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",height:76,padding:"24px 16px 16px 16px",position:"absolute",left:0,right:0,zIndex:1,"&.scrollable":{background:"linear-gradient(to bottom, ".concat(e.palette.background.b9,", ").concat(e.palette.background.b9," 79%, rgba(65, 65, 65, 0) 100%)")}},headerTitle:{fontSize:20},popoverContentContainer:{marginTop:60,paddingTop:16,overflowX:"hidden",overflowY:"auto","&.scrollable":{height:"calc(100% - 60px)"}},popoverContent:{width:"100%"}}}));function j(i){var s=i.children,j=c(),C=p(null),u=e(C,2),g=u[0],A=u[1],b=p(!0),h=e(b,2),x=h[0],v=h[1],D=function(){A(null)},P=Boolean(g);return t(o,{children:[r(d,{size:"small",onClick:function(e){return A(e.currentTarget)},children:r(a,{})}),t(n,{open:P,anchorEl:g,onClose:D,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},marginThreshold:12,classes:{paper:m(j.popoverPaper,x&&"scrollable")},children:[t("div",{className:m(j.popoverHeader,x&&"scrollable"),children:[r("div",{className:j.headerTitle,children:"Settings"}),r(d,{tooltipProps:{title:"Close"},onClick:D,children:r(l,{})})]}),r("div",{className:m(j.popoverContentContainer,x&&"scrollable"),ref:function(e){e&&e.scrollHeight<=e.clientHeight&&v(!1)},children:r("div",{className:j.popoverContent,children:s})})]})]})}j.propTypes={children:s.node.isRequired};export default j;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import{noop as t}from"lodash";import o from"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsxs as r,Fragment as i,jsx as n}from"react/jsx-runtime";import{makeStyles as s,Drawer as p,Box as a}from"@material-ui/core";import m from"@material-ui/icons/Close";import{useState as l,useRef as d,useEffect as c}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import j from"prop-types";import u from"classnames";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../ConfirmationDialog.js";import"../DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Tooltip/MuiTooltipDcWrapper.js";import"../../Avatar/index.js";import"../../Annotations/AnnotationsContext.js";import"../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import h from"../../IconButton/index.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../AppHeader/AppHeader.js";import C from"@material-ui/icons/ChevronLeftRounded";import g from"@material-ui/icons/ChevronRightRounded";import x from"@material-ui/icons/Sort";import f from"@material-ui/icons/Check";import"../AppContext.js";import"../AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../../TruncatedText/index.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../ColorPicker/ColorPicker.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ChartActionsList/ChartActionsList.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../RangeSlider/RangeSlider.js";import"../../Login/components/Login.js";import"../../Login/components/PasswordField.js";import"../../Login/components/Chip.js";import"../../Login/components/StepFooter.js";import"../../Login/components/StepContent.js";import"../../Login/components/StepHeader.js";import"../../Login/components/Step.js";import"../../Login/components/OrDivider.js";import"../../Login/components/HiddenEmailField.js";import"../../Login/components/EmailField.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import A from"../../Button/index.js";import"../../MenuItem/index.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTable/index.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../Notifications/Notifications.js";import"../../TextLink/index.js";import"../../Template/TemplatePopover/index.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Stepper/Stepper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../KeyboardDateTimePicker.js";import"../../PostInput/PostInput.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";var b=s((function(t){var o,r;return{drawer:function(o){var r=o.openedDrawerWidth;return e({height:"100%",position:"relative",width:r,borderTop:"1px solid",borderTopColor:t.palette.background.b7,boxShadow:"4px 0px 8px rgba(0, 0, 0, 0.15)"},"&.".concat("closed"),{width:"48px"})},drawerPaper:(o={position:"relative",width:"100%",backgroundColor:t.palette.background.b5},e(o,"&.".concat("closed"),{cursor:"pointer","&:hover":{backgroundColor:t.palette.background.b7,"& > $header":{backgroundColor:t.palette.background.b7}}}),e(o,"&.MuiDrawer-paperAnchorDockedLeft",{borderRight:"none"}),e(o,"&.MuiDrawer-paperAnchorDockedRight",{borderLeft:"none"}),o),header:(r={height:48,borderBottom:"1px solid",borderBottomColor:t.palette.background.b7,display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:0,left:0,right:0,letterSpacing:"1px",textTransform:"uppercase",fontSize:"14px",fontWeight:500,lineHeight:"20px",backgroundColor:t.palette.background.b5},e(r,"&.".concat("open"),{padding:t.spacing(1.5),justifyContent:"flex-start"}),e(r,"&.".concat("withShadow"),{zIndex:1,boxShadow:"-18px 12px 12px #272727"}),r),openToggleIconOpen:{transform:"rotate(180deg)"},openToggleContainer:function(t){var o,r=t.anchor;return e(o={alignItems:"center",bottom:0,display:"flex",flex:"0 0",height:48,justifyContent:"center",padding:6,position:"absolute",width:"100%"},"&.".concat("withShadow"),{zIndex:1,boxShadow:"-18px -12px 12px #272727"}),e(o,"&.".concat("open"),{justifyContent:"left"===r?"flex-end":"flex-start",paddingRight:6}),o},contentWrapper:{marginTop:48,height:"calc(100% - 96px)",overflowY:"auto"},content:{padding:"16px 12px",display:"flex",flexDirection:"column"},selectAllButton:{textTransform:"none",fontSize:"10px",lineHeight:"14px",letterSpacing:"0.4px",marginLeft:16,"& .MuiButton-startIcon":{marginRight:4}},headerIcon:{cursor:"pointer"},headerIconText:{cursor:"pointer"}}})),S=function(t){var s,j=t.anchor,S=t.children,P=t.drawerPaperClassName,v=t.header,D=t.headerIcon,I=t.headerTitleIcon,T=t.isOpen,w=t.openedDrawerWidth,y=t.setIsOpen,k=t.size,L=t.allOptionsButtonShown,E=t.isAllOptionsSelected,O=t.onAllOptionsClick,B=l(!1),W=o(B,2),F=W[0],M=W[1],N=d(),H=b({anchor:j,openedDrawerWidth:w||{small:235,medium:354,large:473}[k]});c((function(){var e=N.current,t=e.scrollHeight,o=e.clientHeight;M(t>o)}));var R="left"===j?g:C;return r(p,{onClick:function(){T||y(!0)},className:u(H.drawer,!T&&"closed"),variant:"permanent",classes:{paper:u(H.drawerPaper,P,!T&&"closed")},anchor:j,children:[r("div",{className:u(H.header,T&&"open",F&&"withShadow"),onClick:function(){T&&y(!1)},children:[T&&r(i,{children:[I||n(x,{className:H.headerIcon}),n("div",{className:H.headerIconText,children:v}),L&&n(A,{className:H.selectAllButton,onClick:function(e){e.stopPropagation(),O(e)},startIcon:n(E?m:f,{}),children:E?"Clear All":"Select All"})]}),!T&&D]}),n("div",{className:H.contentWrapper,ref:N,children:n("div",{className:H.content,children:T&&S})}),n(a,{className:u(H.openToggleContainer,(s={},e(s,"open",T),e(s,"withShadow",F),s)),children:n(h,{"aria-label":"toggle sidebar",onClick:function(){y(!T)},children:n(R,{className:u(T&&H.openToggleIconOpen)})})})]})};S.propTypes={anchor:j.oneOf(["left","right"]),children:j.node.isRequired,drawerPaperClassName:j.string,header:j.node,headerIcon:j.node,headerTitleIcon:j.node,isOpen:j.bool,openedDrawerWidth:j.oneOfType([j.string,j.number]),setIsOpen:j.func,size:j.oneOf(["small","medium","large"]),allOptionsButtonShown:j.bool,isAllOptionsSelected:j.bool,onAllOptionsClick:j.func},S.defaultProps={anchor:"left",drawerPaperClassName:"",header:null,headerIcon:null,headerTitleIcon:null,isOpen:!1,openedDrawerWidth:0,setIsOpen:t,size:"medium",allOptionsButtonShown:!1,isAllOptionsSelected:!1,onAllOptionsClick:t};export default S;
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{noop as t}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import o from"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsxs as r,Fragment as i,jsx as n}from"react/jsx-runtime";import{makeStyles as s,Drawer as p,Box as a}from"@material-ui/core";import m from"@material-ui/icons/Close";import{useState as l,useRef as d,useEffect as c}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import j from"prop-types";import u from"classnames";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../ConfirmationDialog.js";import"../DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Tooltip/MuiTooltipDcWrapper.js";import"../../Avatar/index.js";import"../../Annotations/AnnotationsContext.js";import"../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import C from"../../IconButton/index.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../AppHeader/AppHeader.js";import g from"@material-ui/icons/ChevronLeftRounded";import h from"@material-ui/icons/ChevronRightRounded";import A from"@material-ui/icons/Sort";import x from"@material-ui/icons/Check";import"../AppContext.js";import"../AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../TruncatedText/index.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../ColorPicker/ColorPicker.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ChartActionsList/ChartActionsList.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../RangeSlider/RangeSlider.js";import"../../Login/components/Login.js";import"../../Login/components/PasswordField.js";import"../../Login/components/Chip.js";import"../../Login/components/StepFooter.js";import"../../Login/components/StepContent.js";import"../../Login/components/StepHeader.js";import"../../Login/components/Step.js";import"../../Login/components/OrDivider.js";import"../../Login/components/HiddenEmailField.js";import"../../Login/components/EmailField.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import f from"../../Button/index.js";import"../../MenuItem/index.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTable/index.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../Notifications/Notifications.js";import"../../TextLink/index.js";import"../../Template/TemplatePopover/index.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Stepper/Stepper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../SearchInput/index.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../FeedItem/FeedItem.js";import"../../KeyboardDateTimePicker.js";import"../../PostInput/PostInput.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";var b=s((function(t){var o,r;return{drawer:function(o){var r=o.openedDrawerWidth;return e({height:"100%",position:"relative",width:r,borderTop:"1px solid",borderTopColor:t.palette.background.b7,boxShadow:"4px 0px 8px rgba(0, 0, 0, 0.15)"},"&.".concat("closed"),{width:"48px"})},drawerPaper:(o={position:"relative",width:"100%",backgroundColor:t.palette.background.b5},e(o,"&.".concat("closed"),{cursor:"pointer","&:hover":{backgroundColor:t.palette.background.b7,"& > $header":{backgroundColor:t.palette.background.b7}}}),e(o,"&.MuiDrawer-paperAnchorDockedLeft",{borderRight:"none"}),e(o,"&.MuiDrawer-paperAnchorDockedRight",{borderLeft:"none"}),o),header:(r={height:48,borderBottom:"1px solid",borderBottomColor:t.palette.background.b7,display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:0,left:0,right:0,letterSpacing:"1px",textTransform:"uppercase",fontSize:"14px",fontWeight:500,lineHeight:"20px",backgroundColor:t.palette.background.b5},e(r,"&.".concat("open"),{padding:t.spacing(1.5),justifyContent:"flex-start"}),e(r,"&.".concat("withShadow"),{zIndex:1,boxShadow:"-18px 12px 12px #272727"}),r),openToggleIconOpen:{transform:"rotate(180deg)"},openToggleContainer:function(t){var o,r=t.anchor;return e(o={alignItems:"center",bottom:0,display:"flex",flex:"0 0",height:48,justifyContent:"center",padding:6,position:"absolute",width:"100%"},"&.".concat("withShadow"),{zIndex:1,boxShadow:"-18px -12px 12px #272727"}),e(o,"&.".concat("open"),{justifyContent:"left"===r?"flex-end":"flex-start",paddingRight:6}),o},contentWrapper:{marginTop:48,height:"calc(100% - 96px)",overflowY:"auto"},content:{padding:"16px 12px",display:"flex",flexDirection:"column"},selectAllButton:{textTransform:"none",fontSize:"10px",lineHeight:"14px",letterSpacing:"0.4px",marginLeft:16,"& .MuiButton-startIcon":{marginRight:4}},headerIcon:{cursor:"pointer"},headerIconText:{cursor:"pointer"}}})),S=function(t){var s,j=t.anchor,S=t.children,D=t.drawerPaperClassName,v=t.header,I=t.headerIcon,P=t.headerTitleIcon,T=t.isOpen,w=t.openedDrawerWidth,y=t.setIsOpen,k=t.size,E=t.allOptionsButtonShown,L=t.isAllOptionsSelected,B=t.onAllOptionsClick,O=l(!1),W=o(O,2),F=W[0],M=W[1],H=d(),R=b({anchor:j,openedDrawerWidth:w||{small:235,medium:354,large:473}[k]});c((function(){var e=H.current,t=e.scrollHeight,o=e.clientHeight;M(t>o)}));var V="left"===j?h:g;return r(p,{onClick:function(){T||y(!0)},className:u(R.drawer,!T&&"closed"),variant:"permanent",classes:{paper:u(R.drawerPaper,D,!T&&"closed")},anchor:j,children:[r("div",{className:u(R.header,T&&"open",F&&"withShadow"),onClick:function(){T&&y(!1)},children:[T&&r(i,{children:[P||n(A,{className:R.headerIcon}),n("div",{className:R.headerIconText,children:v}),E&&n(f,{className:R.selectAllButton,onClick:function(e){e.stopPropagation(),B(e)},startIcon:n(L?m:x,{}),children:L?"Clear All":"Select All"})]}),!T&&I]}),n("div",{className:R.contentWrapper,ref:H,children:n("div",{className:R.content,children:T&&S})}),n(a,{className:u(R.openToggleContainer,(s={},e(s,"open",T),e(s,"withShadow",F),s)),children:n(C,{"aria-label":"toggle sidebar",onClick:function(){y(!T)},children:n(V,{className:u(T&&R.openToggleIconOpen)})})})]})};S.propTypes={anchor:j.oneOf(["left","right"]),children:j.node.isRequired,drawerPaperClassName:j.string,header:j.node,headerIcon:j.node,headerTitleIcon:j.node,isOpen:j.bool,openedDrawerWidth:j.oneOfType([j.string,j.number]),setIsOpen:j.func,size:j.oneOf(["small","medium","large"]),allOptionsButtonShown:j.bool,isAllOptionsSelected:j.bool,onAllOptionsClick:j.func},S.defaultProps={anchor:"left",drawerPaperClassName:"",header:null,headerIcon:null,headerTitleIcon:null,isOpen:!1,openedDrawerWidth:0,setIsOpen:t,size:"medium",allOptionsButtonShown:!1,isAllOptionsSelected:!1,onAllOptionsClick:t};export default S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{get as t,keyBy as r,values as e,merge as n,flatten as a,uniq as u}from"lodash";import i from"@babel/runtime/helpers/toConsumableArray";import c from"@babel/runtime/helpers/slicedToArray";import{ASSET_TYPES as o}from"../../../../constants/assetTypes.js";import s from"@babel/runtime/regenerator";import p from"@babel/runtime/helpers/asyncToGenerator";import{getAppsDataByRigs as d,fetchRigs as f,getAppsDataByWells as l,fetchWells as m,fetchAssetEntitiesByAssetIds as b,getAppsDataByFFs as y,getAppsDataByPads as x,getUniqAssetIds as h,fetchFracFleets as v,fetchFracFleetWells as k,fetchPadWells as w}from"./utils.js";function F(t,r){return I.apply(this,arguments)}function I(){return(I=p(s.mark((function n(a,u){var i,c,p,y,x,h,v,k,w,F;return s.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,b([a]);case 2:if(i=n.sent,c=t(e(i),"[0][0].data")){n.next=6;break}return n.abrupt("return",{});case 6:if(c.type!==o.well.type){n.next=16;break}return n.next=9,m([c.id]);case 9:if(p=n.sent){n.next=12;break}return n.abrupt("return",{});case 12:return y=t(p,"data"),x=y&&r(y.concat(p.included),"id"),h=l(u,x,(function(r){return r[t(p,"data[0].id")]})),n.abrupt("return",h);case 16:if(c.type!==o.rig.type){n.next=24;break}if(v=f([c.id])){n.next=20;break}return n.abrupt("return",{});case 20:return k=t(v,"data"),w=k&&r(k.concat(v.included),"id"),F=d(u,w,(function(r){return r[t(v,"data[0].id")]})),n.abrupt("return",F);case 24:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function g(t){return T.apply(this,arguments)}function T(){return(T=p(s.mark((function t(e){var a,u,o,p,b,F,I,g,T,P,j,A,S,W,C,G,R,_,q,z,B,D,E,H,J;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.appsWellIds,u=e.appsRigIds,o=e.appsFracFleetIds,p=e.apps,b=e.appsPadIds,F=e.appsFracFleetToFetchWellsIds,I=h(a),g=h(u),T=h(o),P=i(new Set(F)),j=i(new Set(b)),t.next=8,Promise.all([m(I),f(g),v(T),k(P,p),w(j,p)]);case 8:if(A=t.sent,S=c(A,5),W=S[0],C=S[1],G=S[2],R=S[3],_=S[4],W||C||G||R||_){t.next=17;break}return t.abrupt("return",{});case 17:return q=(null==W?void 0:W.data)&&r(W.data.concat(W.included),"id"),z=(null==C?void 0:C.data)&&r(C.data.concat(C.included),"id"),B=r(G,"id"),D=l(a,q,(function(t,r){return t[r]})),E=d(u,z,(function(t,r){return t[r]})),H=y(o,B,R),J=x(b,_),t.abrupt("return",n(D,E,H,J));case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function P(t,r,e){return j.apply(this,arguments)}function j(){return(j=p(s.mark((function i(p,y,x){var v,k,w,F,I,g,T,P,j,A,S,W,C,G,R,_;return s.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return v=h(p),i.next=3,b(v);case 3:return k=i.sent,w=a(e(k)),F=u(w.filter((function(r){return t(r,"data.type")===o.well.type})).map((function(r){return+t(r,"data.id")})).concat(y.map((function(t){var r=c(t,2);r[0];return r[1]})))),I=u(w.filter((function(r){return t(r,"data.type")===o.rig.type})).map((function(r){return+t(r,"data.id")})).concat(x.map((function(t){var r=c(t,2);r[0];return r[1]})))),i.next=9,Promise.all([m(F),f(I)]);case 9:if(g=i.sent,T=c(g,2),P=T[0],j=T[1],P||j){i.next=15;break}return i.abrupt("return",{});case 15:return A=t(P,"data"),S=t(j,"data"),W=A&&r(A.concat(P.included),"id"),C=S&&r(S.concat(j.included),"id"),G=p.map((function(r){var e=c(r,2),n=e[0],a=e[1];return[n,A.concat(S).find((function(r){return t(r,"attributes.asset_id")===a})).id]})).concat(y,x),R=l(G,W,(function(t,r){return t[r]})),_=d(G,C,(function(t,r){return t[r]})),i.abrupt("return",n(R,_));case 23:case"end":return i.stop()}}),i)})))).apply(this,arguments)}export{F as resolveAppsDataForAssetDashboard,P as resolveAppsDataForFeedPage,g as resolveAppsDataForGeneralDashboard};
|