@corva/ui 0.46.0-0 → 0.46.0-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/components/AddComment/Popover.js +1 -1
  2. package/components/CommentInput/index.js +1 -1
  3. package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
  4. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  5. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
  6. package/components/EmojiIconButton.js +1 -1
  7. package/components/EmptyView/EmptyAppView/EmptyAppView.js +1 -1
  8. package/components/FeedItem/components/RigAndWell.js +1 -1
  9. package/components/FeedItem/feedItemTypes/DvDCommentFeedItem.js +1 -1
  10. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  11. package/components/OffsetWellPickerV4/OffsetWellPickerV4.module.css.js +1 -1
  12. package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  13. package/components/OffsetWellPickerV4/components/Filter/MultiSelect.js +1 -1
  14. package/components/OffsetWellPickerV4/components/Filter/PeriodSelect.js +1 -1
  15. package/components/OffsetWellPickerV4/components/Filter/RadiusInput.js +1 -1
  16. package/components/OffsetWellPickerV4/components/Filter/SingleSelect.js +1 -1
  17. package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSelect.js +1 -1
  18. package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  19. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.module.css.js +1 -1
  20. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js +1 -1
  21. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
  22. package/components/OffsetWellPickerV4/effects/useBicWells.js +1 -1
  23. package/components/OffsetWellPickerV4/effects/useSortedWells.js +1 -1
  24. package/components/PostInput/PostInput.js +1 -1
  25. package/package.json +1 -1
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/objectWithoutProperties";import{useState as o}from"react";import{func as i,node as n,shape as s,number as p}from"prop-types";import{makeStyles as m,Popover as a,Grid as l,Typography as c}from"@material-ui/core";import d from"classnames";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as j,jsx as C}from"react/jsx-runtime";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"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../LoadingIndicator/LoadingIndicator.js";import"../../constants/segment.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Modal/CorvaModal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"lodash";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";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"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/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 u from"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.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"../Tooltip/MuiTooltipDcWrapper.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"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"./Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import A from"../Icons/SendIcon.js";import g from"./components/Content.js";var D=["anchorEl","anchorOrigin","onClose","onSave","startAdornment","endAdornment","customContent","userCompanyId"];function v(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 b(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?v(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):v(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var h=m((function(e){return{paper:{width:368,padding:16},inputMain:{marginBottom:0,fontSize:"11px",color:e.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:e.palette.primary.main},actions:{height:36},sendRow:{display:"flex"},sendIcon:{"&.Mui-disabled":{cursor:"not-allowed!important"}}}}));function f(e){var i=e.anchorEl,n=e.anchorOrigin,s=e.onClose,p=e.onSave,m=e.startAdornment,v=e.endAdornment,f=e.customContent,P=e.userCompanyId,S=r(e,D),x=h(),y=o(),I=t(y,2),E=I[0],T=I[1];return j(a,b(b({open:!0,anchorEl:i,anchorOrigin:n,onClose:s,classes:{paper:x.paper}},S),{},{children:[C(g,{userCompanyId:P,startAdornment:m,endAdornment:v,customContent:f,setComment:T,onSave:function(){return p(E)},smallerView:!0,comment:E}),j(l,{container:!0,direction:"row",justify:"space-between",alignItems:"center",className:x.actions,children:[C(l,{item:!0,children:C(c,{variant:"caption",className:d(x.inputMain,x.cancelText,x.highlightedLabel),component:"div",gutterBottom:!0,onClick:s,children:"Cancel"})}),j(l,{item:!0,direction:"row",alignItems:"center",className:x.sendRow,children:[j(c,{variant:"caption",className:d(x.inputMain,x.inputHelper),component:"div",gutterBottom:!0,children:["Press ",C(c,{variant:"caption",color:"primary",className:d(x.inputMain,x.highlightedLabel),children:"Enter"})," to send"]}),C(u,{onClick:function(){return p(E)},className:x.sendIcon,disabled:!E||!E.body&&!E.attachment,children:C(A,{})})]})]})]}))}f.propTypes={onClose:i,onSave:i.isRequired,anchorEl:n.isRequired,anchorOrigin:s,startAdornment:n,endAdornment:n,customContent:n,userCompanyId:p.isRequired},f.defaultProps={anchorOrigin:{horizontal:"right",vertical:"bottom"},onClose:function(){},startAdornment:null,endAdornment:null,customContent:null};export{f as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/objectWithoutProperties";import{useState as o}from"react";import{func as i,node as n,shape as s,number as p}from"prop-types";import{makeStyles as m,Popover as a,Grid as l,Typography as c}from"@material-ui/core";import d from"classnames";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as j,jsx as C}from"react/jsx-runtime";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"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../LoadingIndicator/LoadingIndicator.js";import"../../constants/segment.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Modal/CorvaModal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"lodash";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";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"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/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 u from"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.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"../Tooltip/MuiTooltipDcWrapper.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"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"./Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import A from"../Icons/SendIcon.js";import g from"./components/Content.js";var v=["anchorEl","anchorOrigin","onClose","onSave","startAdornment","endAdornment","customContent","userCompanyId"];function D(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 b(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?D(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):D(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var h=m((function(e){return{paper:{width:368,padding:16},inputMain:{marginBottom:0,fontSize:"11px",color:e.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:e.palette.primary.main},actions:{height:36},sendRow:{display:"flex"},sendIcon:{"&.Mui-disabled":{cursor:"not-allowed!important"}}}}));function f(e){var i=e.anchorEl,n=e.anchorOrigin,s=e.onClose,p=e.onSave,m=e.startAdornment,D=e.endAdornment,f=e.customContent,P=e.userCompanyId,S=r(e,v),x=h(),y=o(),I=t(y,2),E=I[0],T=I[1];return j(a,b(b({open:!0,anchorEl:i,anchorOrigin:n,onClose:s,classes:{paper:x.paper}},S),{},{children:[C(g,{userCompanyId:P,startAdornment:m,endAdornment:D,customContent:f,setComment:T,onSave:function(){return p(E)},smallerView:!0,comment:E}),j(l,{container:!0,direction:"row",justify:"space-between",alignItems:"center",className:x.actions,children:[C(l,{item:!0,children:C(c,{"data-testid":"".concat("AddCommentPopover","_cancel"),variant:"caption",className:d(x.inputMain,x.cancelText,x.highlightedLabel),component:"div",gutterBottom:!0,onClick:s,children:"Cancel"})}),j(l,{item:!0,direction:"row",alignItems:"center",className:x.sendRow,children:[j(c,{variant:"caption",className:d(x.inputMain,x.inputHelper),component:"div",gutterBottom:!0,children:["Press ",C(c,{variant:"caption",color:"primary",className:d(x.inputMain,x.highlightedLabel),children:"Enter"})," to send"]}),C(u,{"data-testid":"".concat("AddCommentPopover","_send"),onClick:function(){return p(E)},className:x.sendIcon,disabled:!E||!E.body&&!E.attachment,children:C(A,{})})]})]})]}))}f.propTypes={onClose:i,onSave:i.isRequired,anchorEl:n.isRequired,anchorOrigin:s,startAdornment:n,endAdornment:n,customContent:n,userCompanyId:p.isRequired},f.defaultProps={anchorOrigin:{horizontal:"right",vertical:"bottom"},onClose:function(){},startAdornment:null,endAdornment:null,customContent:null};export{f as default};
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import i from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import{PureComponent as c}from"react";import p from"prop-types";import m from"lodash/noop";import{withStyles as u}from"@material-ui/core/styles";import d from"classnames";import{get as h}from"lodash";import{Paper as f,TextField as g,InputAdornment as C,Tooltip as b,Typography as v}from"@material-ui/core";import I from"@material-ui/core/colors/grey";import x from"../Avatar/index.js";import y from"../FileUploadIconButton.js";import F from"../EmojiIconButton.js";import S from"../FailedFileUploading.js";import E from"../UserMention/index.js";import U from"../FilePreview/index.js";import N from"../IconButton/index.js";import k from"../Icons/SendIcon.js";import{isSuggestionsListOpened as A}from"../UserMention/utils/index.js";import M from"../../utils/main.js";import{isNativeDetected as R}from"../../utils/mobileDetect.js";import{notifyCommentEdit as j,notifyCommentPost as B}from"../../utils/nativeMessages.js";import{patchFeedItemComment as w}from"../../clients/jsonApi/index.js";import T from"./styles.css.js";import{jsxs as L,jsx as P}from"react/jsx-runtime";function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=r(t);if(e){var i=r(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return a(this,n)}}var D={chatAvatarWrapper:{display:"flex",alignItems:"center",position:"absolute",left:0,height:32},commentTextFieldContainer:{position:"relative",margin:"0"},commentTextFieldContainerSpaceAround:{position:"relative",margin:"20px 10px"}},_=function(a){i(p,c);var r=z(p);function p(n){var i,a,c;return e(this,p),i=r.call(this,n),s(o(i),"handleSelectEmoji",(function(t){return i.setState((function(e){var n=e.comment;return{comment:"".concat(n).concat(t.native)}}))})),s(o(i),"postComment",(a=t(l.mark((function t(e){var n;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.props.postComment(e);case 3:n=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0.message);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(t){return a.apply(this,arguments)})),s(o(i),"patchComment",(c=t(l.mark((function t(e){var n,o,a,r;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.props,o=n.editFeedItemId,a=n.editCommentId,t.prev=1,t.next=4,w(o,a,e);case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0.message);case 10:return t.abrupt("return",r);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t){return c.apply(this,arguments)})),s(o(i),"clearCommentField",(function(t){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},(function(){i.focusOnRef(),t&&"function"==typeof t&&t()}))})),s(o(i),"handleKeyDown",(function(t){var e=t.key;"Escape"===e&&i.props.exitEditMode(),"Enter"===e&&(A()||(t.preventDefault(),i.handleSendComment()))})),s(o(i),"handleAttachmentLoadingError",(function(t){i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:t})})),s(o(i),"handleFileUpload",(function(t,e,n){i.setState({attachmentUrl:t,attachmentName:e,attachmentSize:n,attachmentLoadingError:null})})),s(o(i),"handleNativeFileUpload",(function(){var t=i.state.comment;i.isEditMode?(j(t),i.clearCommentField(i.props.exitEditMode)):(B(t),i.clearCommentField())})),s(o(i),"handleFileDelete",(function(){return i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null})})),s(o(i),"handleSendComment",t(l.mark((function t(){var e,n,o;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=i.state.comment?i.state.comment.trim():null)||i.state.attachmentUrl){t.next=3;break}return t.abrupt("return");case 3:if(n={comment:{body:e,attachment:{url:i.state.attachmentUrl,size:i.state.attachmentSize,file_name:i.state.attachmentName}}},!i.isEditMode){t.next=16;break}return i.props.setIsEditting(!0),t.next=8,i.patchComment(n);case 8:return o=t.sent,t.next=11,i.props.patchCommentCallback(o);case 11:i.props.setIsEditting(!1),i.clearCommentField(),i.props.exitEditMode(),t.next=24;break;case 16:return i.props.setIsPosting(!0),t.next=19,i.postComment(n);case 19:return o=t.sent,t.next=22,i.props.postCommentCallback(o);case 22:i.props.setIsPosting(!1),i.clearCommentField();case 24:case"end":return t.stop()}}),t)})))),s(o(i),"handleCancelClick",(function(){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},i.props.exitEditMode())})),i.state={comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:null,isInputFocused:!1},i}return n(p,[{key:"componentDidMount",value:function(){this.isEditMode&&this.setInitialCommentValue()}},{key:"componentDidUpdate",value:function(t){(this.isEditMode&&!t.editFeedItemId||this.props.editCommentId&&this.props.editCommentId!==t.editCommentId)&&this.setInitialCommentValue()}},{key:"isEditMode",get:function(){return!!this.props.editFeedItemId}},{key:"setInitialCommentValue",value:function(){var t=this.props.editAttachment?this.props.editAttachment.url:null;this.setState({comment:this.props.editComment,attachmentUrl:t,attachmentName:t?this.props.editAttachment.file_name||M.getFileNameWithExtensionFromPath(t):null,attachmentSize:this.props.editAttachment?this.props.editAttachment.size:null})}},{key:"focusOnRef",value:function(){this.props.inputRef&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var t,e=this,n=this.props,o=n.classes,i=n.currentUser,a="".concat(h(i,["attributes","first_name"])," ").concat(h(i,["attributes","last_name"]));return L("div",{style:this.props.spaceAround?D.commentTextFieldContainerSpaceAround:D.commentTextFieldContainer,children:[P("div",{style:D.chatAvatarWrapper,children:P(x,{displayName:a,size:32,imgSrc:this.props.currentUser&&this.props.currentUser.profile_photo})}),P(f,{className:this.props.classes.paperRoot,children:P(g,{"data-testid":"".concat("commentInput","_input"),placeholder:"Type here",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:E,inputProps:{onChange:function(t){return e.setState({comment:t})},singleLine:!0,value:this.state.comment||"",inputRef:this.props.inputRef,withLightTheme:!1,onMount:this.props.onMount,companyId:this.props.companyId,autoFocus:this.props.autoFocus,disabled:this.props.disabled,onFocus:function(){return e.setState({isInputFocused:!0})},onBlur:function(){return e.setState({isInputFocused:!1})},allowSuggestionsAboveCursor:!0},endAdornment:!this.props.isNative&&L(C,{position:"end",className:this.props.classes.inputAdornment,children:[!this.state.attachmentUrl&&P(b,{title:"Attach File",placement:"bottom",classes:{tooltip:o.iconTooltip},children:P("div",{className:d(T.cCommentInputIconContainer,T.cCommentInputIconUpload),children:P(y,{openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:this.handleFileUpload,onError:this.handleAttachmentLoadingError,fileUploadIconClassName:this.props.classes.additionalActionButton,htmlColor:I[400],inputId:"comment-attachment-".concat(this.props.editCommentId||this.props.parentId)})})}),P(b,{title:"Add Emoji",placement:"bottom",classes:{tooltip:o.iconTooltip},children:P("div",{className:T.cCommentInputIconContainer,children:P(F,{"data-testid":"".concat("commentInput","_emojiButton"),handleSelectEmoji:this.handleSelectEmoji,emojiIconClassName:this.props.classes.additionalActionButton,htmlColor:I[400],disableRipple:!0})})})]}),disableUnderline:!0,classes:{root:this.props.classes.inputRoot,input:this.props.classes.inputEl}},className:this.props.classes.input,onKeyDown:this.handleKeyDown})}),this.state.attachmentLoadingError&&P(S,{errorMessage:this.state.attachmentLoadingError,className:this.props.classes.fileUploadingError}),this.state.attachmentUrl&&P(U,{fileName:this.state.attachmentName,fileUrl:this.state.attachmentUrl,handleFileDelete:this.handleFileDelete,classes:this.props.classes}),(this.state.isInputFocused||this.state.attachmentUrl||this.state.comment||this.props.editComment||(null===(t=this.props.editAttachment)||void 0===t?void 0:t.url))&&L("div",{className:T.cCommentInputSendContainer,children:[P("div",{className:T.cCommentInputSendContainerCancel,children:P(v,{variant:"caption",className:d(this.props.classes.inputMain,this.props.classes.cancelText,this.props.classes.highlightedLabel),component:"div",gutterBottom:!0,onClick:this.handleCancelClick,children:"Cancel"})}),L("div",{className:T.cCommentInputSendContainerSend,children:[L(v,{variant:"caption",className:d(this.props.classes.inputMain,this.props.classes.inputHelper),component:"div",gutterBottom:!0,children:["Press ",P(v,{variant:"caption",color:"primary",className:d(this.props.classes.inputMain,this.props.classes.highlightedLabel),children:"Enter"})," to send"]}),P(N,{size:"large",tooltipProps:{title:"Send"},"data-testid":"".concat("commentInput","_sendButton"),onClick:this.handleSendComment,classes:{root:this.props.classes.sendButton},children:P(k,{})})]})]})]})}}]),p}();_.propTypes={inputRef:p.shape({current:p.shape({focus:p.shape({})})}),editFeedItemId:p.number,editCommentId:p.number,editComment:p.string,editAttachment:p.shape({url:p.string,size:p.number,file_name:p.string}),spaceAround:p.bool,postComment:p.func.isRequired,postCommentCallback:p.func,patchCommentCallback:p.func,exitEditMode:p.func,setIsPosting:p.func,setIsEditting:p.func,onMount:p.func,autoFocus:p.bool,disabled:p.bool,classes:p.shape({}).isRequired,currentUser:p.shape(),isNative:p.bool,companyId:p.number,parentId:p.string},_.defaultProps={inputRef:null,editFeedItemId:null,editCommentId:null,parentId:null,editComment:null,editAttachment:{},spaceAround:!1,setIsPosting:m,setIsEditting:m,onMount:m,autoFocus:void 0,disabled:!1,patchCommentCallback:m,postCommentCallback:m,exitEditMode:m,companyId:null,currentUser:{},isNative:R};var O=u((function(t){return{paperRoot:{width:"calc(100% - 48px)",marginLeft:48,display:"inline-block",height:32,border:"0","&:focus-within":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.primary.main)},boxShadow:"none",background:"#4D4D4D"},input:{paddingLeft:5,width:"100%"},inputRoot:{height:32,paddingRight:"8px",lineHeight:"29px",paddingLeft:"8px"},inputEl:{padding:"0 0 0 6px",height:"100%"},additionalActionButton:{padding:"6px"},nativeActionButton:{margin:"5px 10px",cursor:"pointer"},fileUploadingError:{marginTop:10,marginLeft:24},inputMain:{marginBottom:0,fontSize:"11px",color:t.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:t.palette.primary.main},iconTooltip:{marginTop:"3px"},sendButton:{"&:hover":{backgroundColor:"rgba(3,188,212, 0.1)"},"&.MuiButtonBase-root":{padding:7}},inputAdornment:{marginBottom:"0!important",height:"100%"}}}))(_);export{O as default};
1
+ import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import i from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import{PureComponent as c}from"react";import p from"prop-types";import m from"lodash/noop";import{withStyles as u}from"@material-ui/core/styles";import d from"classnames";import{get as h}from"lodash";import{Paper as f,TextField as g,InputAdornment as C,Tooltip as b,Typography as I}from"@material-ui/core";import v from"@material-ui/core/colors/grey";import x from"../Avatar/index.js";import y from"../FileUploadIconButton.js";import F from"../EmojiIconButton.js";import S from"../FailedFileUploading.js";import E from"../UserMention/index.js";import U from"../FilePreview/index.js";import N from"../IconButton/index.js";import k from"../Icons/SendIcon.js";import{isSuggestionsListOpened as A}from"../UserMention/utils/index.js";import M from"../../utils/main.js";import{isNativeDetected as R}from"../../utils/mobileDetect.js";import{notifyCommentEdit as j,notifyCommentPost as B}from"../../utils/nativeMessages.js";import{patchFeedItemComment as w}from"../../clients/jsonApi/index.js";import T from"./styles.css.js";import{jsxs as L,jsx as P}from"react/jsx-runtime";function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=r(t);if(e){var i=r(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return a(this,n)}}var D={chatAvatarWrapper:{display:"flex",alignItems:"center",position:"absolute",left:0,height:32},commentTextFieldContainer:{position:"relative",margin:"0"},commentTextFieldContainerSpaceAround:{position:"relative",margin:"20px 10px"}},_=function(a){i(p,c);var r=z(p);function p(n){var i,a,c;return e(this,p),i=r.call(this,n),s(o(i),"handleSelectEmoji",(function(t){return i.setState((function(e){var n=e.comment;return{comment:"".concat(n).concat(t.native)}}))})),s(o(i),"postComment",(a=t(l.mark((function t(e){var n;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.props.postComment(e);case 3:n=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0.message);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(t){return a.apply(this,arguments)})),s(o(i),"patchComment",(c=t(l.mark((function t(e){var n,o,a,r;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.props,o=n.editFeedItemId,a=n.editCommentId,t.prev=1,t.next=4,w(o,a,e);case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0.message);case 10:return t.abrupt("return",r);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t){return c.apply(this,arguments)})),s(o(i),"clearCommentField",(function(t){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},(function(){i.focusOnRef(),t&&"function"==typeof t&&t()}))})),s(o(i),"handleKeyDown",(function(t){var e=t.key;"Escape"===e&&i.props.exitEditMode(),"Enter"===e&&(A()||(t.preventDefault(),i.handleSendComment()))})),s(o(i),"handleAttachmentLoadingError",(function(t){i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:t})})),s(o(i),"handleFileUpload",(function(t,e,n){i.setState({attachmentUrl:t,attachmentName:e,attachmentSize:n,attachmentLoadingError:null})})),s(o(i),"handleNativeFileUpload",(function(){var t=i.state.comment;i.isEditMode?(j(t),i.clearCommentField(i.props.exitEditMode)):(B(t),i.clearCommentField())})),s(o(i),"handleFileDelete",(function(){return i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null})})),s(o(i),"handleSendComment",t(l.mark((function t(){var e,n,o;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=i.state.comment?i.state.comment.trim():null)||i.state.attachmentUrl){t.next=3;break}return t.abrupt("return");case 3:if(n={comment:{body:e,attachment:{url:i.state.attachmentUrl,size:i.state.attachmentSize,file_name:i.state.attachmentName}}},!i.isEditMode){t.next=16;break}return i.props.setIsEditting(!0),t.next=8,i.patchComment(n);case 8:return o=t.sent,t.next=11,i.props.patchCommentCallback(o);case 11:i.props.setIsEditting(!1),i.clearCommentField(),i.props.exitEditMode(),t.next=24;break;case 16:return i.props.setIsPosting(!0),t.next=19,i.postComment(n);case 19:return o=t.sent,t.next=22,i.props.postCommentCallback(o);case 22:i.props.setIsPosting(!1),i.clearCommentField();case 24:case"end":return t.stop()}}),t)})))),s(o(i),"handleCancelClick",(function(){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},i.props.exitEditMode())})),i.state={comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:null,isInputFocused:!1},i}return n(p,[{key:"componentDidMount",value:function(){this.isEditMode&&this.setInitialCommentValue()}},{key:"componentDidUpdate",value:function(t){(this.isEditMode&&!t.editFeedItemId||this.props.editCommentId&&this.props.editCommentId!==t.editCommentId)&&this.setInitialCommentValue()}},{key:"isEditMode",get:function(){return!!this.props.editFeedItemId}},{key:"setInitialCommentValue",value:function(){var t=this.props.editAttachment?this.props.editAttachment.url:null;this.setState({comment:this.props.editComment,attachmentUrl:t,attachmentName:t?this.props.editAttachment.file_name||M.getFileNameWithExtensionFromPath(t):null,attachmentSize:this.props.editAttachment?this.props.editAttachment.size:null})}},{key:"focusOnRef",value:function(){this.props.inputRef&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var t,e=this,n=this.props,o=n.classes,i=n.currentUser,a="".concat(h(i,["attributes","first_name"])," ").concat(h(i,["attributes","last_name"]));return L("div",{style:this.props.spaceAround?D.commentTextFieldContainerSpaceAround:D.commentTextFieldContainer,children:[P("div",{style:D.chatAvatarWrapper,children:P(x,{displayName:a,size:32,imgSrc:this.props.currentUser&&this.props.currentUser.profile_photo})}),P(f,{className:this.props.classes.paperRoot,children:P(g,{"data-testid":"".concat("commentInput","_input"),placeholder:"Type here",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:E,inputProps:{onChange:function(t){return e.setState({comment:t})},singleLine:!0,value:this.state.comment||"",inputRef:this.props.inputRef,withLightTheme:!1,onMount:this.props.onMount,companyId:this.props.companyId,autoFocus:this.props.autoFocus,disabled:this.props.disabled,onFocus:function(){return e.setState({isInputFocused:!0})},onBlur:function(){return e.setState({isInputFocused:!1})},allowSuggestionsAboveCursor:!0},endAdornment:!this.props.isNative&&L(C,{position:"end",className:this.props.classes.inputAdornment,children:[!this.state.attachmentUrl&&P(b,{title:"Attach File",placement:"bottom",classes:{tooltip:o.iconTooltip},children:P("div",{className:d(T.cCommentInputIconContainer,T.cCommentInputIconUpload),children:P(y,{openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:this.handleFileUpload,onError:this.handleAttachmentLoadingError,fileUploadIconClassName:this.props.classes.additionalActionButton,htmlColor:v[400],inputId:"comment-attachment-".concat(this.props.editCommentId||this.props.parentId)})})}),P(b,{title:"Add Emoji",placement:"bottom",classes:{tooltip:o.iconTooltip},children:P("div",{className:T.cCommentInputIconContainer,children:P(F,{"data-testid":"".concat("commentInput","_emojiButton"),handleSelectEmoji:this.handleSelectEmoji,emojiIconClassName:this.props.classes.additionalActionButton,htmlColor:v[400],disableRipple:!0})})})]}),disableUnderline:!0,classes:{root:this.props.classes.inputRoot,input:this.props.classes.inputEl}},className:this.props.classes.input,onKeyDown:this.handleKeyDown})}),this.state.attachmentLoadingError&&P(S,{errorMessage:this.state.attachmentLoadingError,className:this.props.classes.fileUploadingError}),this.state.attachmentUrl&&P(U,{fileName:this.state.attachmentName,fileUrl:this.state.attachmentUrl,handleFileDelete:this.handleFileDelete,classes:this.props.classes}),(this.state.isInputFocused||this.state.attachmentUrl||this.state.comment||this.props.editComment||(null===(t=this.props.editAttachment)||void 0===t?void 0:t.url))&&L("div",{className:T.cCommentInputSendContainer,children:[P("div",{className:T.cCommentInputSendContainerCancel,children:P(I,{"data-testid":"".concat("commentInput","_cancel"),variant:"caption",className:d(this.props.classes.inputMain,this.props.classes.cancelText,this.props.classes.highlightedLabel),component:"div",gutterBottom:!0,onClick:this.handleCancelClick,children:"Cancel"})}),L("div",{className:T.cCommentInputSendContainerSend,children:[L(I,{variant:"caption",className:d(this.props.classes.inputMain,this.props.classes.inputHelper),component:"div",gutterBottom:!0,children:["Press ",P(I,{variant:"caption",color:"primary",className:d(this.props.classes.inputMain,this.props.classes.highlightedLabel),children:"Enter"})," to send"]}),P(N,{size:"large",tooltipProps:{title:"Send"},"data-testid":"".concat("commentInput","_sendButton"),onClick:this.handleSendComment,classes:{root:this.props.classes.sendButton},children:P(k,{})})]})]})]})}}]),p}();_.propTypes={inputRef:p.shape({current:p.shape({focus:p.shape({})})}),editFeedItemId:p.number,editCommentId:p.number,editComment:p.string,editAttachment:p.shape({url:p.string,size:p.number,file_name:p.string}),spaceAround:p.bool,postComment:p.func.isRequired,postCommentCallback:p.func,patchCommentCallback:p.func,exitEditMode:p.func,setIsPosting:p.func,setIsEditting:p.func,onMount:p.func,autoFocus:p.bool,disabled:p.bool,classes:p.shape({}).isRequired,currentUser:p.shape(),isNative:p.bool,companyId:p.number,parentId:p.string},_.defaultProps={inputRef:null,editFeedItemId:null,editCommentId:null,parentId:null,editComment:null,editAttachment:{},spaceAround:!1,setIsPosting:m,setIsEditting:m,onMount:m,autoFocus:void 0,disabled:!1,patchCommentCallback:m,postCommentCallback:m,exitEditMode:m,companyId:null,currentUser:{},isNative:R};var O=u((function(t){return{paperRoot:{width:"calc(100% - 48px)",marginLeft:48,display:"inline-block",height:32,border:"0","&:focus-within":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.primary.main)},boxShadow:"none",background:"#4D4D4D"},input:{paddingLeft:5,width:"100%"},inputRoot:{height:32,paddingRight:"8px",lineHeight:"29px",paddingLeft:"8px"},inputEl:{padding:"0 0 0 6px",height:"100%"},additionalActionButton:{padding:"6px"},nativeActionButton:{margin:"5px 10px",cursor:"pointer"},fileUploadingError:{marginTop:10,marginLeft:24},inputMain:{marginBottom:0,fontSize:"11px",color:t.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:t.palette.primary.main},iconTooltip:{marginTop:"3px"},sendButton:{"&:hover":{backgroundColor:"rgba(3,188,212, 0.1)"},"&.MuiButtonBase-root":{padding:7}},inputAdornment:{marginBottom:"0!important",height:"100%"}}}))(_);export{O as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/helpers/defineProperty";import{useState as t,useRef as r,useEffect as n}from"react";import i from"prop-types";import a from"classnames";import{noop as l}from"lodash";import{makeStyles as p,Drawer as c,Box as d,Tooltip as s}from"@material-ui/core";import h from"@material-ui/icons/ChevronLeftRounded";import m from"@material-ui/icons/ChevronRightRounded";import u from"@material-ui/icons/Sort";import f from"@material-ui/icons/Check";import g from"@material-ui/icons/Close";import x from"../../IconButton/index.js";import b from"../../Button/index.js";import{jsxs as w,Fragment as T,jsx as C}from"react/jsx-runtime";var I=p((function(e){var t,r;return{drawer:function(t){var r=t.openedDrawerWidth;return o({height:"100%",position:"relative",width:r,borderTop:"1px solid",borderTopColor:e.palette.background.b7,boxShadow:"4px 0px 8px rgba(0, 0, 0, 0.15)"},"&.".concat("closed"),{width:"48px"})},drawerPaper:(t={position:"relative",width:"100%",backgroundColor:e.palette.background.b5},o(t,"&.".concat("closed"),{cursor:"pointer","&:hover":{backgroundColor:e.palette.background.b7,"& > $header":{backgroundColor:e.palette.background.b7}}}),o(t,"&.MuiDrawer-paperAnchorDockedLeft",{borderRight:"none"}),o(t,"&.MuiDrawer-paperAnchorDockedRight",{borderLeft:"none"}),t),header:(r={height:48,borderBottom:"1px solid",borderBottomColor:e.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:e.palette.background.b5},o(r,"&.".concat("open"),{padding:e.spacing(1.5),justifyContent:"flex-start"}),o(r,"&.".concat("withShadow"),{zIndex:1,boxShadow:"-18px 12px 12px #272727"}),r),openToggleIconOpen:{transform:"rotate(180deg)"},openToggleContainer:function(e){var t,r=e.anchor;return o(t={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"}),o(t,"&.".concat("open"),{justifyContent:"left"===r?"flex-end":"flex-start",paddingRight:6}),t},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-iconSizeMedium > *:first-child":{fontSize:"12px !important"},"& .MuiButton-startIcon":{marginRight:4}},headerIcon:{cursor:"pointer"},headerIconText:{cursor:"pointer",paddingLeft:7,letterSpacing:1}}})),S=function(i){var l,p=i.anchor,S=i.children,k=i.drawerPaperClassName,O=i.expandedTooltipTitle,v=i.collapsedTooltipTitle,A=i.header,y=i.headerIcon,N=i.headerTitleIcon,B=i.isOpen,D=i.openedDrawerWidth,z=i.setIsOpen,P=i.size,R=i.allOptionsButtonShown,W=i.isAllOptionsSelected,j=i.onAllOptionsClick,L=t(!1),M=e(L,2),H=M[0],q=M[1],E=r(),Y=I({anchor:p,openedDrawerWidth:D||{small:235,medium:354,large:473}[P]});n((function(){var e=E.current,o=e.scrollHeight,t=e.clientHeight;q(o>t)}));var $="left"===p?m:h;return w(c,{onClick:function(){B||z(!0)},className:a(Y.drawer,!B&&"closed"),variant:"permanent",classes:{paper:a(Y.drawerPaper,k,!B&&"closed")},anchor:p,children:[w("div",{className:a(Y.header,B&&"open",H&&"withShadow"),onClick:function(){B&&z(!1)},children:[B&&w(T,{children:[N||C(u,{className:Y.headerIcon}),C("div",{className:Y.headerIconText,children:A}),R&&C(b,{className:Y.selectAllButton,onClick:function(e){e.stopPropagation(),j(e)},startIcon:C(W?g:f,{}),children:W?"Clear All":"Select All"})]}),!B&&y]}),C("div",{className:Y.contentWrapper,ref:E,children:C("div",{className:Y.content,children:B&&S})}),C(d,{className:a(Y.openToggleContainer,(l={},o(l,"open",B),o(l,"withShadow",H),l)),children:C(s,{title:B?O:v,placement:"bottom",children:C("div",{children:C(x,{"aria-label":"toggle sidebar",onClick:function(){z(!B)},children:C($,{className:a(B&&Y.openToggleIconOpen)})})})})})]})};S.propTypes={anchor:i.oneOf(["left","right"]),children:i.node.isRequired,drawerPaperClassName:i.string,expandedTooltipTitle:i.string,collapsedTooltipTitle:i.string,header:i.node,headerIcon:i.node,headerTitleIcon:i.node,isOpen:i.bool,openedDrawerWidth:i.oneOfType([i.string,i.number]),setIsOpen:i.func,size:i.oneOf(["small","medium","large"]),allOptionsButtonShown:i.bool,isAllOptionsSelected:i.bool,onAllOptionsClick:i.func},S.defaultProps={anchor:"left",drawerPaperClassName:"",expandedTooltipTitle:"Collapse",collapsedTooltipTitle:"Expand",header:null,headerIcon:null,headerTitleIcon:null,isOpen:!1,openedDrawerWidth:0,setIsOpen:l,size:"medium",allOptionsButtonShown:!1,isAllOptionsSelected:!1,onAllOptionsClick:l};export{S as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/helpers/defineProperty";import{useState as t,useRef as r,useEffect as n}from"react";import i from"prop-types";import a from"classnames";import{noop as l}from"lodash";import{makeStyles as p,Drawer as d,Box as c,Tooltip as s}from"@material-ui/core";import h from"@material-ui/icons/ChevronLeftRounded";import m from"@material-ui/icons/ChevronRightRounded";import u from"@material-ui/icons/Sort";import f from"@material-ui/icons/Check";import g from"@material-ui/icons/Close";import x from"../../IconButton/index.js";import b from"../../Button/index.js";import{jsxs as w,Fragment as T,jsx as C}from"react/jsx-runtime";var S=p((function(e){var t,r;return{drawer:function(t){var r=t.openedDrawerWidth;return o({height:"100%",position:"relative",width:r,borderTop:"1px solid",borderTopColor:e.palette.background.b7,boxShadow:"4px 0px 8px rgba(0, 0, 0, 0.15)"},"&.".concat("closed"),{width:"48px"})},drawerPaper:(t={position:"relative",width:"100%",backgroundColor:e.palette.background.b5},o(t,"&.".concat("closed"),{cursor:"pointer","&:hover":{backgroundColor:e.palette.background.b7,"& > $header":{backgroundColor:e.palette.background.b7}}}),o(t,"&.MuiDrawer-paperAnchorDockedLeft",{borderRight:"none"}),o(t,"&.MuiDrawer-paperAnchorDockedRight",{borderLeft:"none"}),t),header:(r={height:48,borderBottom:"1px solid",borderBottomColor:e.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:e.palette.background.b5},o(r,"&.".concat("open"),{padding:e.spacing(1.5),justifyContent:"flex-start"}),o(r,"&.".concat("withShadow"),{zIndex:1,boxShadow:"-18px 12px 12px #272727"}),r),openToggleIconOpen:{transform:"rotate(180deg)"},openToggleContainer:function(e){var t,r=e.anchor;return o(t={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"}),o(t,"&.".concat("open"),{justifyContent:"left"===r?"flex-end":"flex-start",paddingRight:6}),t},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-iconSizeMedium > *:first-child":{fontSize:"12px !important"},"& .MuiButton-startIcon":{marginRight:4}},headerIcon:{cursor:"pointer"},headerIconText:{cursor:"pointer",paddingLeft:7,letterSpacing:1}}})),I=function(i){var l,p=i.anchor,I=i.children,k=i.drawerPaperClassName,O=i.expandedTooltipTitle,v=i.collapsedTooltipTitle,A=i.header,B=i.headerIcon,y=i.headerTitleIcon,N=i.isOpen,D=i.openedDrawerWidth,z=i.setIsOpen,P=i.size,R=i.allOptionsButtonShown,W=i.isAllOptionsSelected,j=i.onAllOptionsClick,L=t(!1),M=e(L,2),H=M[0],_=M[1],q=r(),E=S({anchor:p,openedDrawerWidth:D||{small:235,medium:354,large:473}[P]});n((function(){var e=q.current,o=e.scrollHeight,t=e.clientHeight;_(o>t)}));var Y="left"===p?m:h;return w(d,{"data-testid":"".concat("AppSideBar","_Drawer"),onClick:function(){N||z(!0)},className:a(E.drawer,!N&&"closed"),variant:"permanent",classes:{paper:a(E.drawerPaper,k,!N&&"closed")},anchor:p,children:[w("div",{className:a(E.header,N&&"open",H&&"withShadow"),onClick:function(){N&&z(!1)},children:[N&&w(T,{children:[y||C(u,{className:E.headerIcon}),C("div",{"data-testid":"".concat("AppSideBar","_header"),className:E.headerIconText,children:A}),R&&C(b,{className:E.selectAllButton,onClick:function(e){e.stopPropagation(),j(e)},startIcon:C(W?g:f,{}),children:W?"Clear All":"Select All"})]}),!N&&B]}),C("div",{className:E.contentWrapper,ref:q,children:C("div",{className:E.content,children:N&&I})}),C(c,{className:a(E.openToggleContainer,(l={},o(l,"open",N),o(l,"withShadow",H),l)),children:C(s,{title:N?O:v,placement:"bottom",children:C("div",{children:C(x,{"aria-label":"toggle sidebar",onClick:function(){z(!N)},children:C(Y,{"data-testid":"".concat("AppSideBar","_arrowButton"),className:a(N&&E.openToggleIconOpen)})})})})})]})};I.propTypes={anchor:i.oneOf(["left","right"]),children:i.node.isRequired,drawerPaperClassName:i.string,expandedTooltipTitle:i.string,collapsedTooltipTitle:i.string,header:i.node,headerIcon:i.node,headerTitleIcon:i.node,isOpen:i.bool,openedDrawerWidth:i.oneOfType([i.string,i.number]),setIsOpen:i.func,size:i.oneOf(["small","medium","large"]),allOptionsButtonShown:i.bool,isAllOptionsSelected:i.bool,onAllOptionsClick:i.func},I.defaultProps={anchor:"left",drawerPaperClassName:"",expandedTooltipTitle:"Collapse",collapsedTooltipTitle:"Expand",header:null,headerIcon:null,headerTitleIcon:null,isOpen:!1,openedDrawerWidth:0,setIsOpen:l,size:"medium",allOptionsButtonShown:!1,isAllOptionsSelected:!1,onAllOptionsClick:l};export{I as default};
@@ -1 +1 @@
1
- import e from"prop-types";import{MenuItem as t,ListItemIcon as i,Icon as r,ListItemText as o}from"@material-ui/core";import{Menu as s,Launch as n,Settings as p}from"@material-ui/icons";import"@babel/runtime/helpers/defineProperty";import"../AppActions/AppActions.css.js";import{jsxs as m,jsx as a}from"react/jsx-runtime";import"../AppSettingsDialog/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../../constants/segment.js";import"../../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppView/components/ChooseAssetButton/index.js";import"../DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"@babel/runtime/helpers/slicedToArray";import"react";import l from"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"classnames";import"lodash";import"../../../../Icons/AnnotationIcon.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import"../../../../../constants/goals.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"../../../../../utils/index.js";import"../../../../HelpCenter/HelpCenterIcon.js";import"../../../AppContext.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../AssetEditor/index.js";import"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../Typography.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../CopyToClipboard/CopyToClipboard.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../TruncatedText/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../Button/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 d from"../../../../IconButton/index.js";import"../../../../TextField/index.js";import"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../CustomSelect/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Drillstring/BHATileIcon.js";import"../../../../Drillstring/BHATile/BHATile.js";import"../../../../Drillstring/BHAList/BHAList.js";import"../../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../../Casing/CasingTable/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTileIcon.js";import"../../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../../Casing/CasingTile/CasingTile.js";import"../../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../WellSummary/WellSummaryItemValue.js";import"../../../../WellSummary/ActivitySummaryChart.js";import"../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../BICOffsetPickerDialog/index.js";import"../../../../OffsetWellButton/OffsetWellButton.js";import"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../OffsetWellPickerV3/index.js";import"../../../../OffsetWellChips/Chip.js";import"../../../../OffsetWellChips/ChipsContainer.js";import"../../../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../../ConfirmationDialog.js";import"../../../../TextLink/index.js";import"../../../../Avatar/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../MenuItem/index.js";import"../../../../PadModeSelect/PadModeSelect.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"../../../../Tooltip/MuiTooltipDcWrapper.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"../../../../FilesLoader/Icons/FileIcon.js";import"../../../../SearchInput/index.js";import"../../../../FeedItem/FeedItem.js";import"../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../PostInput/PostInput.js";import"../../../../KeyboardDateTimePicker.js";import"../../../../AddComment/Popover.js";import"../../../../AddComment/Popup.js";import"../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../StageDesignVActual/ComparisonRow.js";import"../../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../../EmbeddedApp/EmbeddedApp.js";import"../../../../Autocomplete/Autocomplete.js";import"../../../../DocumentViewer/DocumentViewer.js";import"../../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../../Search/Search.js";import"../../../../Search/components/Listbox.js";import"../../../../Search/components/Paper.js";import"../../../../Search/components/RecentSearches.js";import"../../../../Search/components/InputAdornmentLeft.js";import"../../../../Search/components/Groups.js";import c from"./NonPriorityMenus.css.js";var j="DevCenter_AppPriorityMenu",u=function(e){var u=e.toggleAppSettingsDialog,C=e.devCenterRouter,A=e.isMaximized,g=e.setIsMaximized,P=e.menuItems;return m(l,{"data-testid":"".concat(j,"_menu"),IconElement:a(s,{}),className:c.menuIcon,IconButtonComponent:d,classes:{iconButton:c.iconButton},menuProps:{getContentAnchorEl:null},children:[P.map((function(e){return m(t,{onClick:function(){var t;null===(t=e.onClick)||void 0===t||t.call(e),e.to&&C.push(e.to)},component:"li",to:e.to,children:[a(i,{children:a(r,{children:e.icon})}),a(o,{primary:e.title})]},e.title)})),!A&&m(t,{"data-testid":"".concat(j,"_fullScreenMenuItem"),className:c.containerDropdownActionMaximize,onClick:function(){return g(!0)},children:[a(i,{children:a(n,{})}),a(o,{primary:"Full Screen"})]}),m(t,{"data-testid":"".concat(j,"_settings"),onClick:u,children:[a(i,{children:a(p,{})}),a(o,{primary:"Settings"})]})]})};u.propTypes={toggleAppSettingsDialog:e.func.isRequired,isMaximized:e.bool.isRequired,setIsMaximized:e.func.isRequired,devCenterRouter:e.shape({push:e.func}).isRequired,menuItems:e.arrayOf(e.shape({onClick:e.func,to:e.oneOfType([e.string,e.shape({})]),icon:e.string,title:e.string}))},u.defaultProps={menuItems:[]};export{u as default};
1
+ import t from"prop-types";import{MenuItem as e,ListItemIcon as i,Icon as o,ListItemText as r}from"@material-ui/core";import{Menu as s,Launch as n,Settings as p}from"@material-ui/icons";import"@babel/runtime/helpers/defineProperty";import"../AppActions/AppActions.css.js";import{jsxs as m,jsx as a}from"react/jsx-runtime";import"../AppSettingsDialog/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../../constants/segment.js";import"../../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppView/components/ChooseAssetButton/index.js";import"../DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"@babel/runtime/helpers/slicedToArray";import"react";import l from"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"classnames";import"lodash";import"../../../../Icons/AnnotationIcon.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import"../../../../../constants/goals.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"../../../../../utils/index.js";import"../../../../HelpCenter/HelpCenterIcon.js";import"../../../AppContext.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../AssetEditor/index.js";import"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../Typography.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../CopyToClipboard/CopyToClipboard.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../TruncatedText/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../Button/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 d from"../../../../IconButton/index.js";import"../../../../TextField/index.js";import"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../CustomSelect/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Drillstring/BHATileIcon.js";import"../../../../Drillstring/BHATile/BHATile.js";import"../../../../Drillstring/BHAList/BHAList.js";import"../../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../../Casing/CasingTable/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTileIcon.js";import"../../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../../Casing/CasingTile/CasingTile.js";import"../../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../WellSummary/WellSummaryItemValue.js";import"../../../../WellSummary/ActivitySummaryChart.js";import"../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../BICOffsetPickerDialog/index.js";import"../../../../OffsetWellButton/OffsetWellButton.js";import"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../OffsetWellPickerV3/index.js";import"../../../../OffsetWellChips/Chip.js";import"../../../../OffsetWellChips/ChipsContainer.js";import"../../../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../../ConfirmationDialog.js";import"../../../../TextLink/index.js";import"../../../../Avatar/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../MenuItem/index.js";import"../../../../PadModeSelect/PadModeSelect.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"../../../../Tooltip/MuiTooltipDcWrapper.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"../../../../FilesLoader/Icons/FileIcon.js";import"../../../../SearchInput/index.js";import"../../../../FeedItem/FeedItem.js";import"../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../PostInput/PostInput.js";import"../../../../KeyboardDateTimePicker.js";import"../../../../AddComment/Popover.js";import"../../../../AddComment/Popup.js";import"../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../StageDesignVActual/ComparisonRow.js";import"../../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../../EmbeddedApp/EmbeddedApp.js";import"../../../../Autocomplete/Autocomplete.js";import"../../../../DocumentViewer/DocumentViewer.js";import"../../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../../Search/Search.js";import"../../../../Search/components/Listbox.js";import"../../../../Search/components/Paper.js";import"../../../../Search/components/RecentSearches.js";import"../../../../Search/components/InputAdornmentLeft.js";import"../../../../Search/components/Groups.js";import c from"./NonPriorityMenus.css.js";var j="DevCenter_AppPriorityMenu",u=function(t){var u=t.toggleAppSettingsDialog,C=t.devCenterRouter,A=t.isMaximized,g=t.setIsMaximized,P=t.menuItems;return m(l,{"data-testid":"".concat(j,"_menu"),IconElement:a(s,{}),className:c.menuIcon,IconButtonComponent:d,classes:{iconButton:c.iconButton},menuProps:{getContentAnchorEl:null},children:[P.map((function(t){return m(e,{"data-testid":"".concat(j,"_").concat(t.title),onClick:function(){var e;null===(e=t.onClick)||void 0===e||e.call(t),t.to&&C.push(t.to)},component:"li",to:t.to,children:[a(i,{children:a(o,{children:t.icon})}),a(r,{primary:t.title})]},t.title)})),!A&&m(e,{"data-testid":"".concat(j,"_fullScreenMenuItem"),className:c.containerDropdownActionMaximize,onClick:function(){return g(!0)},children:[a(i,{children:a(n,{})}),a(r,{primary:"Full Screen"})]}),m(e,{"data-testid":"".concat(j,"_settings"),onClick:u,children:[a(i,{children:a(p,{})}),a(r,{primary:"Settings"})]})]})};u.propTypes={toggleAppSettingsDialog:t.func.isRequired,isMaximized:t.bool.isRequired,setIsMaximized:t.func.isRequired,devCenterRouter:t.shape({push:t.func}).isRequired,menuItems:t.arrayOf(t.shape({onClick:t.func,to:t.oneOfType([t.string,t.shape({})]),icon:t.string,title:t.string}))},u.defaultProps={menuItems:[]};export{u as default};
@@ -1 +1 @@
1
- import{IconButton as o,Icon as r}from"@material-ui/core";import t from"./PriorityMenus.css.js";import{jsx as n}from"react/jsx-runtime";function e(e){var i=e.menuItems,c=e.devCenterRouter;return i.map((function(e){return n(o,{classes:{root:t.iconButton},onClick:function(){var o;null===(o=e.onClick)||void 0===o||o.call(e),e.to&&c.push(e.to)},children:n(r,{className:t.icon,children:e.icon})},e.title)}))}export{e as default};
1
+ import{IconButton as t,Icon as o}from"@material-ui/core";import r from"./PriorityMenus.css.js";import{jsx as i}from"react/jsx-runtime";function e(e){var n=e.menuItems,c=e.devCenterRouter;return n.map((function(e){return i(t,{"data-testid":"".concat("PriorityMenus","_item_").concat(e.title),classes:{root:r.iconButton},onClick:function(){var t;null===(t=e.onClick)||void 0===t||t.call(e),e.to&&c.push(e.to)},children:i(o,{className:r.icon,children:e.icon})},e.title)}))}export{e as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import l from"@babel/runtime/helpers/defineProperty";import{PureComponent as c}from"react";import{Picker as s}from"emoji-mart";import a from"prop-types";import p from"@material-ui/core/Popover";import m from"./IconButton/index.js";import u from"./Icons/EmojiIcon.js";import{jsxs as f,Fragment as h,jsx as b}from"react/jsx-runtime";function d(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=n(e);if(t){var l=n(this).constructor;r=Reflect.construct(o,arguments,l)}else r=o.apply(this,arguments);return i(this,r)}}var j=function(i){o(a,c);var n=d(a);function a(t){var o;return e(this,a),o=n.call(this,t),l(r(o),"onSelect",(function(e){var t=o.props,r=t.handleSelectEmoji,i=t.closeOnSelect;r(e),i&&o.setState({openEmojiPicker:!1})})),o.state={openEmojiPicker:!1},o}return t(a,[{key:"render",value:function(){var e=this;return f(h,{children:[b(m,{"data-testid":"generic_emojiButton",buttonRef:function(t){e.anchorEl=t},"aria-label":"Emoji",onClick:function(){return e.setState({openEmojiPicker:!0})},disableRipple:this.props.disableRipple,className:this.props.emojiIconClassName,tooltipProps:{title:"Add Emoji"},children:b(u,{})}),b(p,{open:this.state.openEmojiPicker,anchorEl:this.anchorEl,onClose:function(){return e.setState({openEmojiPicker:!1})},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:b(s,{onSelect:this.onSelect,theme:"dark"})})]})}}]),a}();j.propTypes={handleSelectEmoji:a.func.isRequired,emojiIconClassName:a.string,disableRipple:a.bool,closeOnSelect:a.bool},j.defaultProps={emojiIconClassName:void 0,disableRipple:!1,closeOnSelect:!0};export{j as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import l from"@babel/runtime/helpers/defineProperty";import{PureComponent as s}from"react";import{Picker as a}from"emoji-mart";import c from"prop-types";import p from"@material-ui/core/Popover";import m from"./IconButton/index.js";import u from"./Icons/EmojiIcon.js";import{jsxs as f,Fragment as h,jsx as d}from"react/jsx-runtime";function b(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=n(e);if(t){var l=n(this).constructor;r=Reflect.construct(o,arguments,l)}else r=o.apply(this,arguments);return i(this,r)}}var j=function(i){o(c,s);var n=b(c);function c(t){var o;return e(this,c),o=n.call(this,t),l(r(o),"onSelect",(function(e){var t=o.props,r=t.handleSelectEmoji,i=t.closeOnSelect;r(e),i&&o.setState({openEmojiPicker:!1})})),o.state={openEmojiPicker:!1},o}return t(c,[{key:"render",value:function(){var e=this;return f(h,{children:[d(m,{"data-testid":this.props["data-testid"],buttonRef:function(t){e.anchorEl=t},"aria-label":"Emoji",onClick:function(){return e.setState({openEmojiPicker:!0})},disableRipple:this.props.disableRipple,className:this.props.emojiIconClassName,tooltipProps:{title:"Add Emoji"},children:d(u,{})}),d(p,{open:this.state.openEmojiPicker,anchorEl:this.anchorEl,onClose:function(){return e.setState({openEmojiPicker:!1})},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:d(a,{onSelect:this.onSelect,theme:"dark"})})]})}}]),c}();j.propTypes={handleSelectEmoji:c.func.isRequired,emojiIconClassName:c.string,disableRipple:c.bool,closeOnSelect:c.bool,"data-testid":c.string},j.defaultProps={emojiIconClassName:void 0,disableRipple:!1,closeOnSelect:!0,"data-testid":"generic_emojiButton"};export{j as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{useState as a,useEffect as i,useRef as r}from"react";import o from"prop-types";import n from"classnames";import{makeStyles as s}from"@material-ui/core";import p from"../../DevCenter/AppHeader/AppHeader.js";import{jsxs as l,jsx as d,Fragment as c}from"react/jsx-runtime";var m,u={appNotSubscribed:{title:"No Subscriptions exist for this app.",subtitle:"Contact your Corva Account rep to get acces to this app!"},assetNotSubscribed:{title:"Selected Asset is no longer subscribed to the app.",subtitle:"Сhange the asset in settings."},internalAppError:{title:"App Loading Error"},appPackageWasNotFound:{title:"App package was not found",subtitle:"Please choose another version in the app settings menu or delete and add app again on your dashboard"},fracFleetWasNotFound:{title:"Frac fleet was not found"},fracFleetHasNoPad:{title:"Frac fleet has no active pad"},padHasNoWells:{title:"This pad has no wells"}},f={empty:"empty",error:"error",noData:"noData",noSubscription:"noSubscription"},g=(t(m={},f.empty,"/static/media/e607e3aa0a4603bb7ae7f83a2148511e.svg"),t(m,f.error,"/static/media/9b185a425ea91b6c2beedfef39c06663.svg"),t(m,f.noData,"/static/media/1bfc6e5d9cbb531a554ab8d025fa23e9.svg"),t(m,f.noSubscription,"/static/media/76e3ee12638391cba164716321509ad7.svg"),m),h=s((function(e){var t=e.palette;return{wrapper:{display:"flex",flexDirection:"column",textAlign:"center",alignItems:"center",justifyContent:"center",height:"100%",padding:24,overflow:"auto"},title:{color:t.primary.text7,fontSize:32,lineHeight:"38px",marginBottom:8,"&.medium":{fontSize:24,lineHeight:"28px"},"&.small":{fontSize:24,lineHeight:"28px"},fontStyle:"italic"},subtitle:{color:t.primary.text6,fontSize:16,lineHeight:"22px",marginBottom:24,"&.medium":{fontSize:14,lineHeight:"20px"},"&.small":{fontSize:14,lineHeight:"20px"}},imageWrapper:{display:"flex",flexGrow:"1",maxWidth:390,maxHeight:300,width:"100%","&.medium":{maxidth:260,maxHeight:200}},backgroundImage:{width:"100%",backgroundImage:function(e){return"url(".concat([g[e.state]],")")},backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"},appHeader:{display:"flex",padding:"12px",flexWrap:"wrap",justifyContent:"space-between"},container:{height:"100%",flexDirection:"column",display:"flex"}}}));function b(t){var o=t.title,s=t.subtitle,m=t.state,u=t.withAppHeader,f=t.app,g=t.actions,b=h({state:m}),x=a(!1),v=e(x,2),y=v[0],H=v[1];i((function(){H(!0)}),[]);var S=r(null),A=S.current,w=(null==A?void 0:A.offsetHeight)<300,N=(null==A?void 0:A.offsetHeight)<400;return l("div",{className:b.container,children:[u&&d(p,{app:f,classes:{appHeader:b.appHeader}}),d("div",{className:b.wrapper,ref:S,children:y&&l(c,{children:[d("div",{className:n(b.title,N&&"medium",w&&"small"),children:o}),g,s&&d("div",{className:n(b.subtitle,N&&"medium",w&&"small"),children:s}),!w&&d("div",{className:n(b.imageWrapper,N&&"medium"),children:d("div",{className:b.backgroundImage})})]})})]})}b.propTypes={actions:o.node,app:o.shape({}),state:o.string,subtitle:o.oneOfType([o.string,o.node]),title:o.string.isRequired,withAppHeader:o.bool},b.defaultProps={actions:null,app:void 0,state:f.empty,subtitle:"",withAppHeader:!1},b.APP_MESSAGES=u,b.EMPTY_STATES=f;export{u as APP_MESSAGES,f as EMPTY_STATES,b as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{useState as a,useEffect as i,useRef as r}from"react";import o from"prop-types";import n from"classnames";import{makeStyles as p}from"@material-ui/core";import s from"../../DevCenter/AppHeader/AppHeader.js";import{jsxs as l,jsx as d,Fragment as c}from"react/jsx-runtime";var m,u={appNotSubscribed:{title:"No Subscriptions exist for this app.",subtitle:"Contact your Corva Account rep to get acces to this app!"},assetNotSubscribed:{title:"Selected Asset is no longer subscribed to the app.",subtitle:"Сhange the asset in settings."},internalAppError:{title:"App Loading Error"},appPackageWasNotFound:{title:"App package was not found",subtitle:"Please choose another version in the app settings menu or delete and add app again on your dashboard"},fracFleetWasNotFound:{title:"Frac fleet was not found"},fracFleetHasNoPad:{title:"Frac fleet has no active pad"},padHasNoWells:{title:"This pad has no wells"}},f={empty:"empty",error:"error",noData:"noData",noSubscription:"noSubscription"},g=(t(m={},f.empty,"/static/media/e607e3aa0a4603bb7ae7f83a2148511e.svg"),t(m,f.error,"/static/media/9b185a425ea91b6c2beedfef39c06663.svg"),t(m,f.noData,"/static/media/1bfc6e5d9cbb531a554ab8d025fa23e9.svg"),t(m,f.noSubscription,"/static/media/76e3ee12638391cba164716321509ad7.svg"),m),b=p((function(e){var t=e.palette;return{wrapper:{display:"flex",flexDirection:"column",textAlign:"center",alignItems:"center",justifyContent:"center",height:"100%",padding:24,overflow:"auto"},title:{color:t.primary.text7,fontSize:32,lineHeight:"38px",marginBottom:8,"&.medium":{fontSize:24,lineHeight:"28px"},"&.small":{fontSize:24,lineHeight:"28px"},fontStyle:"italic"},subtitle:{color:t.primary.text6,fontSize:16,lineHeight:"22px",marginBottom:24,"&.medium":{fontSize:14,lineHeight:"20px"},"&.small":{fontSize:14,lineHeight:"20px"}},imageWrapper:{display:"flex",flexGrow:"1",maxWidth:390,maxHeight:300,width:"100%","&.medium":{maxidth:260,maxHeight:200}},backgroundImage:{width:"100%",backgroundImage:function(e){return"url(".concat([g[e.state]],")")},backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"},appHeader:{display:"flex",padding:"12px",flexWrap:"wrap",justifyContent:"space-between"},container:{height:"100%",flexDirection:"column",display:"flex"}}}));function h(t){var o=t.title,p=t.subtitle,m=t.state,u=t.withAppHeader,f=t.app,g=t.actions,h=b({state:m}),x=a(!1),v=e(x,2),y=v[0],H=v[1];i((function(){H(!0)}),[]);var S=r(null),A=S.current,w=(null==A?void 0:A.offsetHeight)<300,N=(null==A?void 0:A.offsetHeight)<400;return l("div",{className:h.container,children:[u&&d(s,{app:f,classes:{appHeader:h.appHeader}}),d("div",{className:h.wrapper,ref:S,children:y&&l(c,{children:[d("div",{"data-testid":"".concat("EmptyAppView","_title"),className:n(h.title,N&&"medium",w&&"small"),children:o}),g,p&&d("div",{"data-testid":"".concat("EmptyAppView","_subtitle"),className:n(h.subtitle,N&&"medium",w&&"small"),children:p}),!w&&d("div",{className:n(h.imageWrapper,N&&"medium"),children:d("div",{className:h.backgroundImage})})]})})]})}h.propTypes={actions:o.node,app:o.shape({}),state:o.string,subtitle:o.oneOfType([o.string,o.node]),title:o.string.isRequired,withAppHeader:o.bool},h.defaultProps={actions:null,app:void 0,state:f.empty,subtitle:"",withAppHeader:!1},h.APP_MESSAGES=u,h.EMPTY_STATES=f;export{u as APP_MESSAGES,f as EMPTY_STATES,h as default};
@@ -1 +1 @@
1
- import{Link as i}from"react-router";import{makeStyles as e,Typography as n}from"@material-ui/core";import{jsx as t,jsxs as o}from"react/jsx-runtime";var l=e((function(i){return{contentAssetInfo:{color:i.palette.primary.main,width:"100%",fontSize:12},assetLink:{cursor:"pointer",display:"block",width:"100%",padding:"4px 0 0 0",fontSize:"12px"}}})),r=function(e){var r,a,d,c,s,v,u=e.feedItem,m=l(),f=!!u.rig,p=function(i){var e,n,t;return i.rig?null===(e=i.rig)||void 0===e?void 0:e.name:null===(n=i.well)||void 0===n||null===(t=n.parent_asset)||void 0===t?void 0:t.name}(u),w=f?null===(r=u.rig)||void 0===r||null===(a=r.active_well)||void 0===a?void 0:a.name:null===(d=u.well)||void 0===d?void 0:d.name,g=f?null===(c=u.rig)||void 0===c||null===(s=c.active_well)||void 0===s?void 0:s.id:null===(v=u.well)||void 0===v?void 0:v.id;return g?t(i,{"data-testid":"".concat("FeedPo","_wellLink"),className:m.assetLink,onClick:function(i){return i.stopPropagation()},to:"/assets/".concat(g,"/"),children:o(n,{variant:"body2",className:m.contentAssetInfo,children:[p," - ",w]})}):o(n,{variant:"body2",className:m.contentAssetInfo,children:[p," - No Active Well"]})};export{r as default};
1
+ import{makeStyles as e,Typography as n}from"@material-ui/core";import{jsx as i,jsxs as t}from"react/jsx-runtime";var o=e((function(e){return{contentAssetInfo:{color:e.palette.primary.main,width:"100%",fontSize:12},assetLink:{cursor:"pointer",display:"block",width:"100%",padding:"4px 0 0 0",fontSize:"12px"}}})),l=function(e){var l,r,a,d,s,c,v=e.feedItem,u=o(),m=!!v.rig,f=function(e){var n,i,t;return e.rig?null===(n=e.rig)||void 0===n?void 0:n.name:null===(i=e.well)||void 0===i||null===(t=i.parent_asset)||void 0===t?void 0:t.name}(v),p=m?null===(l=v.rig)||void 0===l||null===(r=l.active_well)||void 0===r?void 0:r.name:null===(a=v.well)||void 0===a?void 0:a.name,g=m?null===(d=v.rig)||void 0===d||null===(s=d.active_well)||void 0===s?void 0:s.id:null===(c=v.well)||void 0===c?void 0:c.id;return g?i("a",{"data-testid":"".concat("FeedPo","_wellLink"),className:u.assetLink,onClick:function(e){return e.stopPropagation()},href:"/assets/".concat(g,"/"),target:"_blank",rel:"noreferrer",children:t(n,{variant:"body2",className:u.contentAssetInfo,children:[f," - ",p]})}):t(n,{variant:"body2",className:u.contentAssetInfo,children:[f," - No Active Well"]})};export{l as default};
@@ -1 +1 @@
1
- import{makeStyles as e,Typography as t}from"@material-ui/core";import i from"moment";import{isNativeDetected as a}from"../../../utils/mobileDetect.js";import{formatMentionText as r}from"../../UserMention/utils/index.js";import m from"../../Attachment/index.js";import{jsxs as n,jsx as o}from"react/jsx-runtime";var l=e((function(e){return{text:{color:e.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},infoField:{color:e.palette.primary.text6,"& span":{color:"#fff"}}}}));var d=function(e){var d,c=e.feedItem,s=c.context.dvd_comment,p=s.body,f=s.attachment,h=void 0===f?{}:f,u=s.data,v=u.timestamp,x=u.bitDepth,D=u.holeDepth,N=u.cost,F=c.mentioned_users,b=l();return n("div",{className:b.wrapper,children:[p&&o(t,{"data-testid":"".concat("DvDCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:r(p,F,a)}),v&&n(t,{className:b.infoField,children:["Time: ",o("span",{children:i.unix(v).format("MM.DD.YYYY, HH:mm")})]}),(D||0===D)&&n(t,{className:b.infoField,children:["Hole Depth: ",n("span",{children:[D,"’"]})]}),(x||0===x)&&n(t,{className:b.infoField,children:["Bit Depth: ",n("span",{children:[x,"’"]})]}),N&&Number.isFinite(N)&&n(t,{className:b.infoField,children:["Cost: ",n("span",{children:[(d=N,d.toString().replace(/\B(?=(\d{3})+(?!\d))/g," "))," $"]})]}),h&&h.url&&o("div",{className:b.attachment,children:o(m,{small:!0,attachmentUrl:h.url,fileName:h.name,displayName:h.name})})]})};export{d as default};
1
+ import{makeStyles as t,Typography as e}from"@material-ui/core";import a from"moment";import{isNativeDetected as i}from"../../../utils/mobileDetect.js";import{formatMentionText as r}from"../../UserMention/utils/index.js";import n from"../../Attachment/index.js";import{jsxs as o,jsx as m}from"react/jsx-runtime";var c=t((function(t){return{text:{color:t.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},infoField:{color:t.palette.primary.text6,"& span":{color:"#fff"}}}})),d="DvDCommentFeedItem";var l=function(t){var l,s=t.feedItem,p=s.context.dvd_comment,h=p.body,f=p.attachment,u=void 0===f?{}:f,D=p.data,v=D.timestamp,x=D.bitDepth,N=D.holeDepth,F=D.cost,_=s.mentioned_users,b=c();return o("div",{className:b.wrapper,children:[h&&m(e,{"data-testid":"".concat(d,"_message"),variant:"body1",gutterBottom:!0,children:r(h,_,i)}),v&&o(e,{className:b.infoField,children:["Time:"," ",m("span",{"data-testid":"".concat(d,"_time"),children:a.unix(v).format("MM.DD.YYYY, HH:mm")})]}),(N||0===N)&&o(e,{className:b.infoField,children:["Hole Depth: ",o("span",{"data-testid":"".concat(d,"_holeDepth"),children:[N,"’"]})]}),(x||0===x)&&o(e,{className:b.infoField,children:["Bit Depth: ",o("span",{"data-testid":"".concat(d,"_bitDepth"),children:[x,"’"]})]}),F&&Number.isFinite(F)&&o(e,{className:b.infoField,children:["Cost: ",o("span",{"data-testid":"".concat(d,"_cost"),children:[(l=F,l.toString().replace(/\B(?=(\d{3})+(?!\d))/g," "))," $"]})]}),u&&u.url&&m("div",{className:b.attachment,children:m(n,{small:!0,attachmentUrl:u.url,fileName:u.name,displayName:u.name})})]})};export{l as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as i,useMemo as o,useRef as n,useEffect as s,useCallback as l}from"react";import a from"prop-types";import{uniqBy as p,isEmpty as m,sortBy as c,isEqual as d}from"lodash";import{Typography as u}from"@material-ui/core";import{Replay as f,Sort as j,FilterList as C,Close as v}from"@material-ui/icons";import b from"../Modal/Modal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"classnames";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as g,jsxs as h}from"react/jsx-runtime";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"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import A from"../LoadingIndicator/LoadingIndicator.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";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"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import{Regular12 as D}from"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import S from"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import y from"../Button/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"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../Notifications/Notifications.js";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.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{Tooltip as I}from"../Tooltip/Tooltip.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"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import{useFetchWells as P}from"./effects/useFetchWells.js";import{useAdvancedWells as W}from"./effects/useAdvancedWells.js";import{useBicWells as x}from"./effects/useBicWells.js";import{useCompanyMetricKey as T}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as O}from"./effects/useFilterOptions.js";import{useFilteredWells as E}from"./effects/useFilteredWells.js";import{useSortedWells as w}from"./effects/useSortedWells.js";import{useRadiusWells as B}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as L}from"./effects/useTableColumns.js";import{Filter as k}from"./components/Filter/Filter.js";import{WellsMap as V}from"./components/Map/WellsMap.js";import F from"./components/OffsetWellsTable/OffsetWellsTable.js";import H from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as N,ColumnType as M,FilterType as R,ROWS_PER_PAGE as U}from"./constants.js";import{SEARCH_CATEGORIES as z}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function q(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?K(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):K(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var G=function(a){var K=a.open,G=a.isWDUser,_=a.defaultSubjectWell,J=a.currentUser,Q=a.offsetSettings,X=a.addWellsUsabilityInfo,Y=a.isViewOnly,Z=a.onClose,$=a.onSave,ee=a.maxOffsetSize,te=i(null),re=r(te,2),ie=re[0],oe=re[1],ne=o((function(){return ee+1}),[ee]),se=i(null==Q?void 0:Q.filterExpanded),le=r(se,2),ae=le[0],pe=le[1],me=i(null==Q?void 0:Q.mapHidden),ce=r(me,2),de=ce[0],ue=ce[1],fe=+(null==_?void 0:_.companyId)||+(null==J?void 0:J.company_id),je=null==_?void 0:_.asset_id,Ce=i((null==Q?void 0:Q.filters)||{}),ve=r(Ce,2),be=ve[0],ge=ve[1],he=i((null==Q?void 0:Q.wellSection)||N),Ae=r(he,2),De=Ae[0],Se=Ae[1],ye=n(!0),Ie=i([]),Pe=r(Ie,2),We=Pe[0],xe=Pe[1],Te=i(null),Oe=r(Te,2),Ee=Oe[0],we=Oe[1],Be=i(!0),Le=r(Be,2),ke=Le[0],Ve=Le[1],Fe=i(!1),He=r(Fe,2),Ne=He[0],Me=He[1],Re=i(!1),Ue=r(Re,2),ze=Ue[0],Ke=Ue[1],qe=i(!1),Ge=r(qe,2),_e=Ge[0],Je=Ge[1],Qe=n(),Xe=o((function(){return!de&&ae?448:de?ae?232:0:216}),[de,ae]);s((function(){ye.current=!0}),[je,null==Q?void 0:Q.selectedWellIds]),s((function(){pe(!Y&&(null==Q?void 0:Q.filterExpanded)),ue(!Y&&(null==Q?void 0:Q.mapHidden)),ge((null==Q?void 0:Q.filters)||{}),Se((null==Q?void 0:Q.wellSection)||N)}),[Q,Y]);var Ye=P(fe,X),Ze=x(G,je),$e=r(Ze,2),et=$e[0],tt=$e[1],rt=T(fe,null==Q?void 0:Q.metricsKeys),it=r(rt,2),ot=it[0],nt=it[1],st=W(fe,Ye,et,tt,je,ot),lt=O(st);s((function(){if(st&&et){var e=st.find((function(e){return e.id===je}));if(e){var r=et.filter((function(e){return e.value!==N})).map((function(e){return e.label})),i=q(q({},e),r.length>0&&t({},M.wellSection,r));we(i)}else we(null)}}),[et,st]);var at=L(ot),pt=E(st,be);s((function(){if(pt)if(ye.current){var e=st.filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)}));Ee&&(e=e.concat(Ee)),xe(p(e,"id")),ye.current=!1}else xe((function(e){var t=(pt||[]).filter((function(t){return!!e.find((function(e){var r=e.id;return t.id===r}))}));return Ee&&(t=t.concat(Ee)),p(t,"id")}))}),[st,pt,null==Q?void 0:Q.selectedWellIds]);var mt=w(Ee,pt,We,Ve,ye.current),ct=r(mt,5),dt=ct[0],ut=ct[1],ft=ct[2],jt=ct[3],Ct=ct[4];B(be[R.radius],pt,xe,ne);var vt=l((function(e,t,r){var i;i=r===z.well.name?t:t.reduce((function(e,t){var r,i=null===(r=st.find((function(e){return e.id===t})))||void 0===r?void 0:r.rigName,o=st.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(o)}),[]);var o=st.filter((function(e){var t=e.id;return i.includes(t)}));xe(e?function(e){return p(e.concat(o),"id")}:function(e){return p(e.filter((function(e){var t=e.id;return!o.find((function(e){return e.id===t}))})))})}),[st]),bt=l((function(){Ke(!0)}),[]),gt=l((function(e){nt(e)}),[]),ht=l((function(t,r){xe(r?function(r){return[].concat(e(r),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),At=l((function(e){if(e){var t=Ee?pt.concat(Ee):pt,r=p(t,"id");xe(r)}else xe(Ee?[Ee]:[])}),[pt,Ee]),Dt=function(e){if(m(tt))xe(Ee?[Ee]:[]);else{var t=st.filter((function(t){return tt[e].includes(t.id)}));xe(t)}},St=l((function(e){Se(e),Dt(e)}),[Dt]),yt=o((function(){return We.find((function(e){return e.id===je}))?We.length-1:We.length}),[We,je]),It=o((function(){if(!tt)return!1;var e=We.map((function(e){return e.id})),t=tt[De]||[];return(ne&&t.length>ne?ne:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[tt,_,We,De]),Pt=function(){var e=(st||[]).filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)}));Ee&&(e=e.concat(Ee)),xe(p(e,"id")),d(be,Q.filters)||(ye.current=!0);var t=q(q({},Q),{},{mapHidden:de,filterExpanded:ae});$(t),ge((null==Q?void 0:Q.filters)||{}),Se((null==Q?void 0:Q.wellSection)||N),Z()},Wt=o((function(){return!It||(!(m(be)||!be[R.sideTracks])||De!==N)}),[It,be,De]);s((function(){if(!ne||ne>We.length)Je(!1);else if(ne<We.length){var e=c(We,"distance");xe(e.slice(0,ne))}else ne===We.length&&Je(!0)}),[We,ne]);var xt=!st||!et||!Ct,Tt=i(!1),Ot=r(Tt,2),Et=Ot[0],wt=Ot[1],Bt=i(!1),Lt=r(Bt,2),kt=Lt[0],Vt=Lt[1],Ft=i(U),Ht=r(Ft,2),Nt=Ht[0],Mt=Ht[1],Rt=i([]),Ut=r(Rt,2),zt=Ut[0],Kt=Ut[1];s((function(){if(Ct){var e=Ct.slice(0,Nt);Kt(e)}}),[Ct,Nt,Ee]);return g(b,{open:K,onClose:Pt,title:"Select Offset Wells",contentContainerClassName:H.offsetWellDialog,contentClassName:H.contentContainer,actionsClassName:H.modalActions,actions:!Y&&h("div",{className:H.actionsWrapper,children:[!xt&&Wt?g(I,{placement:"bottom-start",title:G?"To Synced Offsets in Offset App":"To Synced Offsets in Wellhub",children:g("div",{children:g(y,{onClick:function(){ge({}),Se(N),Dt(N)},color:"primary",startIcon:g(f,{}),children:"Reset"})})}):g("div",{}),h("div",{className:H.buttonGap,children:[g(y,{onClick:Pt,color:"primary",children:"Cancel"}),h(y,{variant:"contained",color:"primary",onClick:function(){Z();var e=q(q({},Q),{},{companyId:fe,subjectWellId:je,selectedWellIds:We.map((function(e){return e.id})),filters:be,metricsKeys:ot,wellSection:De,isSynced:It,mapHidden:de,filterExpanded:ae});$(e,We)},children:["Select (",yt,")"]})]})]}),children:xt?g(A,{fullscreen:!1}):h("div",{className:H.contentWrapper,ref:Qe,children:[h("div",{className:H.countContainer,children:[g(D,{className:H.totalLabel,children:"Total:"}),g(D,{className:H.countValue,children:st.length}),g(D,{className:H.selectedLabel,children:"Selected:"}),g(D,{className:H.countValue,children:yt})]}),ne&&ne<=We.length&&g(u,{className:H.viewOnlyTitleLabel,children:"This app supports no more than (".concat(ee,") offset wells at a time.")}),Y&&g(u,{className:H.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the Offset Well Selection app."}),h("div",{className:H.controlGroup,children:[h(y,{startIcon:g(ae?j:C,{}),classes:{root:H.filterButton},onClick:function(){return pe((function(e){return!e}))},disabled:Y,children:["Filters",!m(be)&&h("div",{className:H.clearWrapper,onClick:function(e){e.stopPropagation(),ge({})},children:[g(v,{className:H.clearIcon}),g("span",{className:H.clearLabel,children:"Clear"})]})]}),g(S,{rightLabel:"Map",color:"primary",checked:!de,onChange:function(e){return ue(!e.target.checked)}})]}),h("div",{className:H.content,onScroll:function(e){e.target&&(ze&&(e.target.scrollLeft=0,Ke(!1)),e.target.scrollLeft<=5&&Et&&wt(!1),e.target.scrollLeft>5&&!Et&&wt(!0),e.target.scrollTop<12&&kt&&Vt(!1),e.target.scrollTop>=12&&!kt&&Vt(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight)>=e.target.scrollHeight&&Nt<Ct.length&&Mt((function(e){return e+U})))},children:[kt&&g("div",{className:H.topGradient}),!de&&K&&g(V,{isViewOnly:Y,mapHidden:de,companyId:fe,subjectWell:Ee,offsetWellIds:We.map((function(e){return e.id})),wells:st,radius:be[R.radius],handleChanageOffsetWell:ht,activeWellId:ie}),g(k,{isHidden:!ae,isWDUser:G,filterOptions:lt,filters:be,wellSections:et,selectedWellSection:De,subjectWell:Ee,onChangeFilters:ge,onChangeBicWells:St}),g(F,{open:K,isTableLoading:ke,companyId:fe,subjectWellId:je,sortBy:dt,setSortBy:ut,sortDirection:ft,setSortDirection:jt,columnsWithDict:at,wells:zt,metricsKeys:ot,setMetricsKeys:gt,handleChanageOffsetWell:ht,handleChangeAllOffsetWells:At,handleAddRemoveAssets:vt,isWellNameExpand:Ne,setIsWellNameExpand:Me,isHscrollMoved:Et,onHideAdvancedSearch:bt,isViewOnly:Y,isLastWell:Ct.length<=Nt,contentRef:Qe,isLimitedOffsetwells:_e,tableTop:Xe,wellSections:et,setActiveWellId:oe})]})]})})};G.propTypes={isWDUser:a.bool,defaultSubjectWell:a.shape({asset_id:a.number,companyId:a.number}),offsetSettings:a.shape({selectedWellIds:a.arrayOf(a.number),manualWellIds:a.arrayOf(a.number),filters:a.shape({}),metricsKeys:a.arrayOf(a.string),wellSection:a.string,companyId:a.number,subjectWellId:a.number,mapHidden:a.bool,filterExpanded:a.bool,hintPopupClosed:a.bool}),currentUser:a.shape({company_id:a.number}).isRequired,open:a.bool.isRequired,addWellsUsabilityInfo:a.func,isViewOnly:a.bool,onSave:a.func.isRequired,onClose:a.func.isRequired,maxOffsetSize:a.number},G.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:50};export{G as default};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as i,useMemo as o,useRef as n,useEffect as s,useCallback as l}from"react";import a from"prop-types";import{uniqBy as p,sortBy as m,isEmpty as c,isEqual as d}from"lodash";import{Typography as u}from"@material-ui/core";import{Sort as f,FilterList as j,Close as C}from"@material-ui/icons";import v from"../Modal/Modal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"classnames";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as b,jsxs as g}from"react/jsx-runtime";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"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import h from"../LoadingIndicator/LoadingIndicator.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";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"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import{Regular12 as A}from"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import D from"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import S from"../Button/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"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../Notifications/Notifications.js";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.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"../Tooltip/MuiTooltipDcWrapper.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"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import{formatTimestamp as y}from"../../utils/time.js";import{useFetchWells as W}from"./effects/useFetchWells.js";import{useAdvancedWells as I}from"./effects/useAdvancedWells.js";import{useBicWells as P}from"./effects/useBicWells.js";import{useCompanyMetricKey as x}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as T}from"./effects/useFilterOptions.js";import{useFilteredWells as O}from"./effects/useFilteredWells.js";import{useSortedWells as E}from"./effects/useSortedWells.js";import{useRadiusWells as w}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as B}from"./effects/useTableColumns.js";import{Filter as L}from"./components/Filter/Filter.js";import{WellsMap as k}from"./components/Map/WellsMap.js";import V from"./components/OffsetWellsTable/OffsetWellsTable.js";import F from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as H,ColumnType as N,FilterType as M,ROWS_PER_PAGE as R}from"./constants.js";import{SEARCH_CATEGORIES as U}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function z(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?_(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var K="OffsetWellPickerV4",q=function(a){var _,q=a.open,G=a.isWDUser,Y=a.defaultSubjectWell,J=a.currentUser,Q=a.offsetSettings,X=a.addWellsUsabilityInfo,Z=a.isViewOnly,$=a.onClose,ee=a.onSave,te=a.maxOffsetSize,re=i(null),ie=r(re,2),oe=ie[0],ne=ie[1],se=o((function(){return te+1}),[te]),le=i(null==Q?void 0:Q.filterExpanded),ae=r(le,2),pe=ae[0],me=ae[1],ce=i(null==Q?void 0:Q.mapHidden),de=r(ce,2),ue=de[0],fe=de[1],je=+(null==Y?void 0:Y.companyId)||+(null==J?void 0:J.company_id),Ce=null==Y?void 0:Y.asset_id,ve=i((null==Q?void 0:Q.filters)||{}),be=r(ve,2),ge=be[0],he=be[1],Ae=i((null==Q?void 0:Q.wellSection)||H),De=r(Ae,2),Se=De[0],ye=De[1],We=n(!0),Ie=i([]),Pe=r(Ie,2),xe=Pe[0],Te=Pe[1],Oe=i(null),Ee=r(Oe,2),we=Ee[0],Be=Ee[1],Le=i(!0),ke=r(Le,2),Ve=ke[0],Fe=ke[1],He=i(!1),Ne=r(He,2),Me=Ne[0],Re=Ne[1],Ue=i(!1),_e=r(Ue,2),ze=_e[0],Ke=_e[1],qe=i(!1),Ge=r(qe,2),Ye=Ge[0],Je=Ge[1],Qe=n(),Xe=o((function(){return!ue&&pe?448:ue?pe?232:0:216}),[ue,pe]);s((function(){We.current=!0}),[Ce,null==Q?void 0:Q.selectedWellIds]),s((function(){me(!Z&&(null==Q?void 0:Q.filterExpanded)),fe(!Z&&(null==Q?void 0:Q.mapHidden)),he((null==Q?void 0:Q.filters)||{}),ye((null==Q?void 0:Q.wellSection)||H)}),[Q,Z]);var Ze=W(je,X),$e=P(G,Ce),et=r($e,3),tt=et[0],rt=et[1],it=et[2],ot=x(je,null==Q?void 0:Q.metricsKeys),nt=r(ot,2),st=nt[0],lt=nt[1],at=I(je,Ze,tt,rt,Ce,st),pt=T(at);s((function(){if(at&&tt){var e=at.find((function(e){return e.id===Ce}));if(e){var r=tt.filter((function(e){return e.value!==H})).map((function(e){return e.label})),i=z(z({},e),r.length>0&&t({},N.wellSection,r));Be(i)}else Be(null)}}),[tt,at]);var mt=B(st),ct=O(at,ge);s((function(){if(ct)if(We.current){var e=at.filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)}));we&&(e=e.concat(we)),Te(p(e,"id")),We.current=!1}else Te((function(e){var t=(ct||[]).filter((function(t){return!!e.find((function(e){var r=e.id;return t.id===r}))}));return we&&(t=t.concat(we)),p(t,"id")}))}),[at,ct,null==Q?void 0:Q.selectedWellIds]);var dt=E(we,ct,xe,Fe,We.current),ut=r(dt,5),ft=ut[0],jt=ut[1],Ct=ut[2],vt=ut[3],bt=ut[4];w(ge[M.radius],ct,Te,se);var gt=l((function(e,t,r){var i;i=r===U.well.name?t:t.reduce((function(e,t){var r,i=null===(r=at.find((function(e){return e.id===t})))||void 0===r?void 0:r.rigName,o=at.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(o)}),[]);var o=at.filter((function(e){var t=e.id;return i.includes(t)}));Te(e?function(e){return p(e.concat(o),"id")}:function(e){return p(e.filter((function(e){var t=e.id;return!o.find((function(e){return e.id===t}))})))})}),[at]),ht=l((function(){Ke(!0)}),[]),At=l((function(e){lt(e)}),[]),Dt=l((function(t,r){Te(r?function(r){return[].concat(e(r),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),St=l((function(e){if(e){var t=we?ct.concat(we):ct,r=p(t,"id");Te(r)}else Te(we?[we]:[])}),[ct,we]),yt=function(e){if(c(rt))Te(we?[we]:[]);else{var t=at.filter((function(t){return rt[e].includes(t.id)}));Te(t)}},Wt=l((function(e){ye(e),yt(e)}),[yt]),It=o((function(){return xe.find((function(e){return e.id===Ce}))?xe.length-1:xe.length}),[xe,Ce]),Pt=o((function(){if(!rt)return!1;var e=xe.map((function(e){return e.id})),t=rt[Se]||[];return(se&&t.length>se?se:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[rt,Y,xe,Se]),xt=function(){var e=(at||[]).filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)}));we&&(e=e.concat(we)),Te(p(e,"id")),d(ge,Q.filters)||(We.current=!0);var t=z(z({},Q),{},{mapHidden:ue,filterExpanded:pe});ee(t),he((null==Q?void 0:Q.filters)||{}),ye((null==Q?void 0:Q.wellSection)||H),$()};s((function(){if(!se||se>xe.length)Je(!1);else if(se<xe.length){var e=m(xe,"distance");Te(e.slice(0,se))}else se===xe.length&&Je(!0)}),[xe,se]);var Tt=!at||!tt||!bt,Ot=i(!1),Et=r(Ot,2),wt=Et[0],Bt=Et[1],Lt=i(!1),kt=r(Lt,2),Vt=kt[0],Ft=kt[1],Ht=i(R),Nt=r(Ht,2),Mt=Nt[0],Rt=Nt[1],Ut=i([]),_t=r(Ut,2),zt=_t[0],Kt=_t[1];s((function(){if(bt){var e=bt.slice(0,Mt);Kt(e)}}),[bt,Mt,we]);return b(v,{open:q,onClose:xt,title:"Select Offset Wells",contentContainerClassName:F.offsetWellDialog,contentClassName:F.contentContainer,actionsClassName:F.modalActions,actions:!Z&&g("div",{className:F.actionsWrapper,children:[b(A,{"data-testid":"".concat(K,"_lastUpdated"),className:F.watermark,children:"Last updated by ".concat((null==it||null===(_=it.changedBy)||void 0===_?void 0:_.name)||"Unknown"," in ").concat(G?"Offset Well Selection app":"Wellhub"," at ").concat(y(null==it?void 0:it.timestamp,"hh:mm MM/DD/YYYY"))}),g("div",{className:F.buttonGap,children:[b(S,{"data-testid":"".concat(K,"_cancel"),onClick:xt,color:"primary",children:"Cancel"}),g(S,{"data-testid":"".concat(K,"_select"),variant:"contained",color:"primary",onClick:function(){$();var e=z(z({},Q),{},{companyId:je,subjectWellId:Ce,selectedWellIds:xe.map((function(e){return e.id})),filters:ge,metricsKeys:st,wellSection:Se,isSynced:Pt,mapHidden:ue,filterExpanded:pe});ee(e,xe)},children:["Select (",It,")"]})]})]}),children:Tt?b(h,{fullscreen:!1}):g("div",{className:F.contentWrapper,ref:Qe,children:[g("div",{className:F.countContainer,children:[b(A,{className:F.totalLabel,children:"Total:"}),b(A,{"data-testid":"".concat(K,"_totalWells"),className:F.countValue,children:at.length}),b(A,{className:F.selectedLabel,children:"Selected:"}),b(A,{"data-testid":"".concat(K,"_selected"),className:F.countValue,children:It})]}),se&&se<=xe.length&&b(u,{"data-testid":"".concat(K,"_no more"),className:F.viewOnlyTitleLabel,children:"This app supports no more than (".concat(te,") offset wells at a time.")}),Z&&b(u,{"data-testid":"".concat(K,"_viewOnly"),className:F.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the Offset Well Selection app."}),g("div",{className:F.controlGroup,children:[g(S,{"data-testid":"".concat(K,"_filters"),startIcon:b(pe?f:j,{}),classes:{root:F.filterButton},onClick:function(){return me((function(e){return!e}))},disabled:Z,children:["Filters",!c(ge)&&g("div",{className:F.clearWrapper,onClick:function(e){e.stopPropagation(),he({})},children:[b(C,{className:F.clearIcon}),b("span",{className:F.clearLabel,children:"Clear"})]})]}),b(D,{"data-testid":"".concat(K,"_map"),rightLabel:"Map",color:"primary",checked:!ue,onChange:function(e){return fe(!e.target.checked)}})]}),g("div",{className:F.content,onScroll:function(e){e.target&&(ze&&(e.target.scrollLeft=0,Ke(!1)),e.target.scrollLeft<=5&&wt&&Bt(!1),e.target.scrollLeft>5&&!wt&&Bt(!0),e.target.scrollTop<12&&Vt&&Ft(!1),e.target.scrollTop>=12&&!Vt&&Ft(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight)>=e.target.scrollHeight&&Mt<bt.length&&Rt((function(e){return e+R})))},children:[Vt&&b("div",{className:F.topGradient}),!ue&&q&&b(k,{isViewOnly:Z,mapHidden:ue,companyId:je,subjectWell:we,offsetWellIds:xe.map((function(e){return e.id})),wells:at,radius:ge[M.radius],handleChanageOffsetWell:Dt,activeWellId:oe}),b(L,{isHidden:!pe,isWDUser:G,filterOptions:pt,filters:ge,wellSections:tt,selectedWellSection:Se,subjectWell:we,onChangeFilters:he,onChangeBicWells:Wt}),b(V,{open:q,isTableLoading:Ve,companyId:je,subjectWellId:Ce,sortBy:ft,setSortBy:jt,sortDirection:Ct,setSortDirection:vt,columnsWithDict:mt,wells:zt,metricsKeys:st,setMetricsKeys:At,handleChanageOffsetWell:Dt,handleChangeAllOffsetWells:St,handleAddRemoveAssets:gt,isWellNameExpand:Me,setIsWellNameExpand:Re,isHscrollMoved:wt,onHideAdvancedSearch:ht,isViewOnly:Z,isLastWell:bt.length<=Mt,contentRef:Qe,isLimitedOffsetwells:Ye,tableTop:Xe,wellSections:tt,setActiveWellId:ne})]})]})})};q.propTypes={isWDUser:a.bool,defaultSubjectWell:a.shape({asset_id:a.number,companyId:a.number}),offsetSettings:a.shape({selectedWellIds:a.arrayOf(a.number),manualWellIds:a.arrayOf(a.number),filters:a.shape({}),metricsKeys:a.arrayOf(a.string),wellSection:a.string,companyId:a.number,subjectWellId:a.number,mapHidden:a.bool,filterExpanded:a.bool,hintPopupClosed:a.bool}),currentUser:a.shape({company_id:a.number}).isRequired,open:a.bool.isRequired,addWellsUsabilityInfo:a.func,isViewOnly:a.bool,onSave:a.func.isRequired,onClose:a.func.isRequired,maxOffsetSize:a.number},q.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:50};export{q as default};
@@ -1 +1 @@
1
- import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var l={offsetWellDialog:"OffsetWellPickerV4-module_offsetWellDialog__EkSjl",viewOnlyTitleLabel:"OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c",contentWrapper:"OffsetWellPickerV4-module_contentWrapper__gVGQ-",contentContainer:"OffsetWellPickerV4-module_contentContainer__Eb9sk",content:"OffsetWellPickerV4-module_content__mEQWD",modalActions:"OffsetWellPickerV4-module_modalActions__cShAH",actionsWrapper:"OffsetWellPickerV4-module_actionsWrapper__C0Ciz",buttonGap:"OffsetWellPickerV4-module_buttonGap__fjFT6",viewOnlyLabel:"OffsetWellPickerV4-module_viewOnlyLabel__GP44N",controlGroup:"OffsetWellPickerV4-module_controlGroup__Tsj99",filterButton:"OffsetWellPickerV4-module_filterButton__1VAsu",clearWrapper:"OffsetWellPickerV4-module_clearWrapper__vsIQx",clearIcon:"OffsetWellPickerV4-module_clearIcon__fHMVI",clearLabel:"OffsetWellPickerV4-module_clearLabel__kCh0J",topGradient:"OffsetWellPickerV4-module_topGradient__fAc7W",countContainer:"OffsetWellPickerV4-module_countContainer__p8V5A",totalLabel:"OffsetWellPickerV4-module_totalLabel__3n5bD",selectedLabel:"OffsetWellPickerV4-module_selectedLabel__BzClE",countValue:"OffsetWellPickerV4-module_countValue__dLG-K"};e(".OffsetWellPickerV4-module_offsetWellDialog__EkSjl{padding-bottom:40px;width:1100px}.OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c{color:var(--palette-primary-text-6);font-size:16px!important;line-height:140.6%!important;margin-bottom:16px!important;margin-left:40px!important}.OffsetWellPickerV4-module_contentWrapper__gVGQ-{display:flex;flex-direction:column;overflow:hidden auto;position:relative}.OffsetWellPickerV4-module_contentContainer__Eb9sk{display:flex;flex-direction:column;margin-top:-8px;overflow-y:hidden;padding:0;position:relative}.OffsetWellPickerV4-module_content__mEQWD{flex:1;margin:0 24px 0 40px;overflow:auto;position:relative}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-corner{background-color:transparent}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar{width:16px}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:hsla(240,2%,65%,.722);border:5px solid rgba(0,0,0,.01);border-radius:10px}.OffsetWellPickerV4-module_modalActions__cShAH{justify-content:flex-end;padding:8px 40px}.OffsetWellPickerV4-module_actionsWrapper__C0Ciz{display:flex;flex:1;justify-content:space-between}.OffsetWellPickerV4-module_buttonGap__fjFT6{display:flex;gap:16px}.OffsetWellPickerV4-module_viewOnlyLabel__GP44N{color:var(--palette-primary-text-6);padding-bottom:16px;padding-left:40px}.OffsetWellPickerV4-module_controlGroup__Tsj99{align-items:center;display:flex;height:32px;justify-content:space-between;margin-bottom:24px;margin-top:8px;padding:0 40px;width:100%}.OffsetWellPickerV4-module_filterButton__1VAsu{background-color:var(--palette-background-b-8)!important;height:32px!important}.OffsetWellPickerV4-module_filterButton__1VAsu:hover{background-color:var(--palette-background-b-7)!important}.OffsetWellPickerV4-module_clearWrapper__vsIQx{align-items:center;color:var(--palette-primary-main);display:flex;gap:4px;margin-left:8px}.OffsetWellPickerV4-module_clearWrapper__vsIQx:hover{color:var(--palette-primary-light)}.OffsetWellPickerV4-module_clearIcon__fHMVI{font-size:16px!important}.OffsetWellPickerV4-module_clearLabel__kCh0J{font-size:12px;font-weight:400;line-height:16px;text-transform:none}.OffsetWellPickerV4-module_topGradient__fAc7W{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);height:12px!important;left:0;position:sticky;top:0;width:100%;z-index:3}.OffsetWellPickerV4-module_countContainer__p8V5A{align-items:center;display:flex;height:24px;margin:0 0 16px 40px;z-index:9}.OffsetWellPickerV4-module_totalLabel__3n5bD{color:var(--palette-primary-text-6)}.OffsetWellPickerV4-module_selectedLabel__BzClE{color:var(--palette-primary-text-6);padding-left:16px}.OffsetWellPickerV4-module_countValue__dLG-K{color:var(--palette-primary-text-1);padding-left:8px}");export{l as default};
1
+ import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var l={offsetWellDialog:"OffsetWellPickerV4-module_offsetWellDialog__EkSjl",viewOnlyTitleLabel:"OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c",contentWrapper:"OffsetWellPickerV4-module_contentWrapper__gVGQ-",contentContainer:"OffsetWellPickerV4-module_contentContainer__Eb9sk",content:"OffsetWellPickerV4-module_content__mEQWD",modalActions:"OffsetWellPickerV4-module_modalActions__cShAH",actionsWrapper:"OffsetWellPickerV4-module_actionsWrapper__C0Ciz",buttonGap:"OffsetWellPickerV4-module_buttonGap__fjFT6",viewOnlyLabel:"OffsetWellPickerV4-module_viewOnlyLabel__GP44N",controlGroup:"OffsetWellPickerV4-module_controlGroup__Tsj99",filterButton:"OffsetWellPickerV4-module_filterButton__1VAsu",clearWrapper:"OffsetWellPickerV4-module_clearWrapper__vsIQx",clearIcon:"OffsetWellPickerV4-module_clearIcon__fHMVI",clearLabel:"OffsetWellPickerV4-module_clearLabel__kCh0J",topGradient:"OffsetWellPickerV4-module_topGradient__fAc7W",countContainer:"OffsetWellPickerV4-module_countContainer__p8V5A",totalLabel:"OffsetWellPickerV4-module_totalLabel__3n5bD",selectedLabel:"OffsetWellPickerV4-module_selectedLabel__BzClE",countValue:"OffsetWellPickerV4-module_countValue__dLG-K",watermark:"OffsetWellPickerV4-module_watermark__g23Ec"};e(".OffsetWellPickerV4-module_offsetWellDialog__EkSjl{padding-bottom:40px;width:1100px}.OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c{color:var(--palette-primary-text-6);font-size:16px!important;line-height:140.6%!important;margin-bottom:16px!important;margin-left:40px!important}.OffsetWellPickerV4-module_contentWrapper__gVGQ-{display:flex;flex-direction:column;overflow:hidden auto;position:relative}.OffsetWellPickerV4-module_contentContainer__Eb9sk{display:flex;flex-direction:column;margin-top:-8px;overflow-y:hidden;padding:0;position:relative}.OffsetWellPickerV4-module_content__mEQWD{flex:1;margin:0 24px 0 40px;overflow:auto;position:relative}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-corner{background-color:transparent}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar{width:16px}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:hsla(240,2%,65%,.722);border:5px solid rgba(0,0,0,.01);border-radius:10px}.OffsetWellPickerV4-module_modalActions__cShAH{justify-content:flex-end;padding:8px 40px}.OffsetWellPickerV4-module_actionsWrapper__C0Ciz{display:flex;flex:1;justify-content:space-between}.OffsetWellPickerV4-module_buttonGap__fjFT6{display:flex;gap:16px}.OffsetWellPickerV4-module_viewOnlyLabel__GP44N{color:var(--palette-primary-text-6);padding-bottom:16px;padding-left:40px}.OffsetWellPickerV4-module_controlGroup__Tsj99{align-items:center;display:flex;height:32px;justify-content:space-between;margin-bottom:24px;margin-top:8px;padding:0 40px;width:100%}.OffsetWellPickerV4-module_filterButton__1VAsu{background-color:var(--palette-background-b-8)!important;height:32px!important}.OffsetWellPickerV4-module_filterButton__1VAsu:hover{background-color:var(--palette-background-b-7)!important}.OffsetWellPickerV4-module_clearWrapper__vsIQx{align-items:center;color:var(--palette-primary-main);display:flex;gap:4px;margin-left:8px}.OffsetWellPickerV4-module_clearWrapper__vsIQx:hover{color:var(--palette-primary-light)}.OffsetWellPickerV4-module_clearIcon__fHMVI{font-size:16px!important}.OffsetWellPickerV4-module_clearLabel__kCh0J{font-size:12px;font-weight:400;line-height:16px;text-transform:none}.OffsetWellPickerV4-module_topGradient__fAc7W{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);height:12px!important;left:0;position:sticky;top:0;width:100%;z-index:3}.OffsetWellPickerV4-module_countContainer__p8V5A{align-items:center;display:flex;height:24px;margin:0 0 16px 40px;z-index:9}.OffsetWellPickerV4-module_totalLabel__3n5bD{color:var(--palette-primary-text-6)}.OffsetWellPickerV4-module_selectedLabel__BzClE{color:var(--palette-primary-text-6);padding-left:16px}.OffsetWellPickerV4-module_countValue__dLG-K{color:var(--palette-primary-text-1);padding-left:8px}.OffsetWellPickerV4-module_watermark__g23Ec{color:var(--palette-primary-text-6);line-height:36px}");export{l as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as r}from"react";import i from"prop-types";import{startCase as o,isEmpty as n,omit as s}from"lodash";import p from"moment";import m from"classnames";import{Divider as a,Grid as l,ListItemText as c,FormControlLabel as d,Switch as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as j,jsx as C,Fragment as v}from"react/jsx-runtime";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"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.js";import"../../../../constants/goals.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../utils/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";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"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import g from"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/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"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.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"../../../Tooltip/MuiTooltipDcWrapper.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"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/InputAdornmentLeft.js";import"../../../Search/components/Groups.js";import{RadiusInput as f}from"./RadiusInput.js";import{MultiSelect as A}from"./MultiSelect.js";import{WellSection as D}from"./WellSection.js";import{PeriodSelect as b}from"./PeriodSelect.js";import{StatusOptions as h,FilterType as S,OBJECTIVE_PERIOD_LIST as P}from"../../constants.js";import x from"./Filter.module.css.js";function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function y(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?I(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var T=function(i){var I=i.isHidden,T=i.isWDUser,E=i.filterOptions,k=i.wellSections,B=i.filters,O=i.selectedWellSection,F=i.subjectWell,R=i.onChangeFilters,W=i.onChangeBicWells,V=r({}),L=t(V,2),M=L[0],w=L[1],H=function(t,r){t===S.sideTracks?R(y(y({},B),{},e({},S.sideTracks,r))):R(r?y(y({},B),{},e({},t,r)):s(y({},B),[t]))},N=function(t){return function(r){var i=p(r);if(i.isValid()){var o=i.unix(),n=!1;"timeRangeFrom"===t?n=o>=B[S.timeRangeTo]:"timeRangeTo"===t&&(n=o<=B[S.timeRangeFrom]),w(n?e({},t,!0):{}),R(y(y({},B),{},e({},t,o)))}}};return j("div",{className:m(x.filterContainer,e({},x.hidden,I)),children:[C(a,{className:x.divideLine}),j(l,{container:!0,spacing:3,children:[C(l,{item:!0,xs:2,className:x.gridItem,children:C(A,{label:"Status",options:h.map((function(e){return e.value})),currentValues:B[S.status],ValueComponent:function(e){var t,r=e.value;return j("div",{className:x.statusItem,children:[C("div",{className:x.statusIcon,style:{background:null===(t=h.find((function(e){return e.value===r})))||void 0===t?void 0:t.color}}),o(r)]})},ListMenuItem:function(e){var t,r=e.value;return j("div",{className:x.statusItem,children:[C("div",{className:x.statusIcon,style:{background:null===(t=h.find((function(e){return e.value===r})))||void 0===t?void 0:t.color}}),C(c,{primary:o(r)})]})},onChange:function(e){return H(S.status,e)}})}),E.map((function(e){var t=e.value,r=e.label,i=e.options;return C(l,{item:!0,xs:2,className:x.gridItem,children:C(A,{label:r,options:i,currentValues:B[t],ListMenuItem:function(e){var t=e.value;return C(c,{primary:t})},onChange:function(e){return H(t,e)}})},t)})),C(l,{item:!0,xs:2,className:x.gridItem,children:C(f,{radius:B[S.radius],editable:!!F,onChange:function(e){return H(S.radius,e)}})}),C(l,{item:!0,xs:2,className:x.gridItem,children:C(b,{label:"Last Active",currentValue:B[S.period]||"all",options:P,className:x.companySelect,onChange:function(e){return H(S.period,e)}})}),"custom"===B[S.period]&&j(v,{children:[C(l,{item:!0,xs:2,className:m(x.gridItem),children:C("div",{className:x.filterItem,children:C(g,{variant:"inline",label:"Date From",format:"MM/DD/YY HH:mm",value:1e3*B[S.timeRangeFrom]||null,onChange:N("timeRangeFrom"),error:M.timeRangeFrom})})}),C(l,{item:!0,xs:2,className:m(x.gridItem),children:C("div",{className:x.filterItem,children:C(g,{variant:"inline",label:"Date To",format:"MM/DD/YY HH:mm",value:1e3*B[S.timeRangeTo]||null,onChange:N("timeRangeTo"),error:M.timeRangeTo})})})]}),C(l,{item:!0,xs:2,className:x.gridItem,children:C(d,{control:C(u,{size:"small",color:"primary",checked:B[S.sideTracks]||!1,onChange:function(e){return H(S.sideTracks,e.target.checked)}}),label:"Exclude Sidetracks",classes:{label:x.sidetrack}})}),T&&!n(k)&&C(l,{item:!0,xs:2,className:x.gridItem,children:C(D,{selectedValue:O,wellSections:k,onChange:W})})]})]})};T.propTypes={isHidden:i.bool.isRequired,isWDUser:i.bool.isRequired,filterOptions:i.arrayOf(i.shape({})).isRequired,wellSections:i.arrayOf(i.shape({})).isRequired,filters:i.shape({}).isRequired,selectedWellSection:i.string.isRequired,subjectWell:i.shape({}).isRequired,onChangeFilters:i.func.isRequired,onChangeBicWells:i.func.isRequired};export{T as Filter};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as r}from"react";import i from"prop-types";import{startCase as o,isEmpty as n,omit as s}from"lodash";import p from"moment";import a from"classnames";import{Divider as m,Grid as l,ListItemText as c,FormControlLabel as d,Switch as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as j,jsx as C,Fragment as v}from"react/jsx-runtime";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"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.js";import"../../../../constants/goals.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../utils/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";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"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import g from"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/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"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.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"../../../Tooltip/MuiTooltipDcWrapper.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"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/InputAdornmentLeft.js";import"../../../Search/components/Groups.js";import{RadiusInput as f}from"./RadiusInput.js";import{MultiSelect as A}from"./MultiSelect.js";import{WellSection as D}from"./WellSection.js";import{PeriodSelect as b}from"./PeriodSelect.js";import{StatusOptions as h,FilterType as S,OBJECTIVE_PERIOD_LIST as P}from"../../constants.js";import x from"./Filter.module.css.js";function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function y(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?I(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var T=function(i){var I=i.isHidden,T=i.isWDUser,E=i.filterOptions,k=i.wellSections,B=i.filters,O=i.selectedWellSection,F=i.subjectWell,R=i.onChangeFilters,W=i.onChangeBicWells,V=r({}),L=t(V,2),M=L[0],w=L[1],H=function(t,r){t===S.sideTracks?R(y(y({},B),{},e({},S.sideTracks,r))):R(r?y(y({},B),{},e({},t,r)):s(y({},B),[t]))},N=function(t){return function(r){var i=p(r);if(i.isValid()){var o=i.unix(),n=!1;"timeRangeFrom"===t?n=o>=B[S.timeRangeTo]:"timeRangeTo"===t&&(n=o<=B[S.timeRangeFrom]),w(n?e({},t,!0):{}),R(y(y({},B),{},e({},t,o)))}}};return j("div",{className:a(x.filterContainer,e({},x.hidden,I)),children:[C(m,{className:x.divideLine}),j(l,{container:!0,spacing:3,children:[C(l,{item:!0,xs:2,className:x.gridItem,children:C(A,{label:"Status",options:h.map((function(e){return e.value})),currentValues:B[S.status],ValueComponent:function(e){var t,r=e.value;return j("div",{className:x.statusItem,children:[C("div",{className:x.statusIcon,style:{background:null===(t=h.find((function(e){return e.value===r})))||void 0===t?void 0:t.color}}),o(r)]})},ListMenuItem:function(e){var t,r=e.value;return j("div",{className:x.statusItem,children:[C("div",{className:x.statusIcon,style:{background:null===(t=h.find((function(e){return e.value===r})))||void 0===t?void 0:t.color}}),C(c,{primary:o(r)})]})},onChange:function(e){return H(S.status,e)}})}),E.map((function(e){var t=e.value,r=e.label,i=e.options;return C(l,{item:!0,xs:2,className:x.gridItem,children:C(A,{label:r,options:i,currentValues:B[t],ListMenuItem:function(e){var t=e.value;return C(c,{primary:t})},onChange:function(e){return H(t,e)}})},t)})),C(l,{item:!0,xs:2,className:x.gridItem,children:C(f,{"data-testid":"".concat("Filter","_radiusInput"),radius:B[S.radius],editable:!!F,onChange:function(e){return H(S.radius,e)}})}),C(l,{item:!0,xs:2,className:x.gridItem,children:C(b,{label:"Last Active",currentValue:B[S.period]||"all",options:P,className:x.companySelect,onChange:function(e){return H(S.period,e)}})}),"custom"===B[S.period]&&j(v,{children:[C(l,{item:!0,xs:2,className:a(x.gridItem),children:C("div",{className:x.filterItem,children:C(g,{variant:"inline",label:"Date From",format:"MM/DD/YY HH:mm",value:1e3*B[S.timeRangeFrom]||null,onChange:N("timeRangeFrom"),error:M.timeRangeFrom})})}),C(l,{item:!0,xs:2,className:a(x.gridItem),children:C("div",{className:x.filterItem,children:C(g,{variant:"inline",label:"Date To",format:"MM/DD/YY HH:mm",value:1e3*B[S.timeRangeTo]||null,onChange:N("timeRangeTo"),error:M.timeRangeTo})})})]}),C(l,{item:!0,xs:2,className:x.gridItem,children:C(d,{control:C(u,{"data-testid":"".concat("Filter","_ExcludeSidetracks"),size:"small",color:"primary",checked:B[S.sideTracks]||!1,onChange:function(e){return H(S.sideTracks,e.target.checked)}}),label:"Exclude Sidetracks",classes:{label:x.sidetrack}})}),T&&!n(k)&&C(l,{item:!0,xs:2,className:x.gridItem,children:C(D,{selectedValue:O,wellSections:k,onChange:W})})]})]})};T.propTypes={isHidden:i.bool.isRequired,isWDUser:i.bool.isRequired,filterOptions:i.arrayOf(i.shape({})).isRequired,wellSections:i.arrayOf(i.shape({})).isRequired,filters:i.shape({}).isRequired,selectedWellSection:i.string.isRequired,subjectWell:i.shape({}).isRequired,onChangeFilters:i.func.isRequired,onChangeBicWells:i.func.isRequired};export{T as Filter};
@@ -1 +1 @@
1
- import e from"prop-types";import{makeStyles as t,FormControl as n,InputLabel as r,Select as l,MenuItem as i,Checkbox as u,ListItemText as a,Divider as o}from"@material-ui/core";import{jsxs as s,jsx as d}from"react/jsx-runtime";var p=t({multiMenuItem:{paddingLeft:"9px !important",paddingRight:"18px !important"}}),m=function(e){var t=e.label,m=e.currentValues,c=e.options,h=e.ListMenuItem,g=e.ValueComponent,f=e.onChange,v=p(),y=m||[];return s(n,{style:{width:"100%"},children:[d(r,{shrink:!0,children:t}),s(l,{multiple:!0,displayEmpty:!0,fullWidth:!0,value:y,renderValue:function(e){return function(e){return g&&1===e.length?d(g,{value:e[0]}):0===e.length?"All":1===e.length?e[0]:"".concat(e.length," Selected")}(e)},onChange:function(e){f(e.target.value.includes("all")?null:e.target.value)},children:[s(i,{value:"all",classes:{gutters:v.multiMenuItem},children:[d(u,{checked:!0,indeterminate:y.length>0}),d(a,{primary:"All"})]},"all"),d(o,{}),c.map((function(e){return s(i,{value:e,classes:{gutters:v.multiMenuItem},children:[d(u,{checked:-1!==y.indexOf(e)}),d(h,{value:e})]},e)}))]})]})};m.propTypes={options:e.arrayOf(e.string).isRequired,currentValues:e.arrayOf(e.string).isRequired,label:e.string.isRequired,ListMenuItem:e.node.isRequired,onChange:e.func.isRequired,ValueComponent:e.node},m.defaultProps={ValueComponent:null};export{m as MultiSelect};
1
+ import e from"prop-types";import{makeStyles as t,FormControl as n,InputLabel as a,Select as l,MenuItem as i,Checkbox as r,ListItemText as u,Divider as c}from"@material-ui/core";import{jsxs as o,jsx as d}from"react/jsx-runtime";var s=t({multiMenuItem:{paddingLeft:"9px !important",paddingRight:"18px !important"}}),p=function(e){var t=e.label,p=e.currentValues,m=e.options,h=e.ListMenuItem,g=e.ValueComponent,f=e.onChange,v=e["data-testid"],y=s(),x=p||[];return o(n,{style:{width:"100%"},children:[d(a,{shrink:!0,children:t}),o(l,{"data-testid":"".concat(v,"_select_").concat(t),multiple:!0,displayEmpty:!0,fullWidth:!0,value:x,renderValue:function(e){return function(e){return g&&1===e.length?d(g,{value:e[0]}):0===e.length?"All":1===e.length?e[0]:"".concat(e.length," Selected")}(e)},onChange:function(e){f(e.target.value.includes("all")?null:e.target.value)},children:[o(i,{value:"all",classes:{gutters:y.multiMenuItem},children:[d(r,{"data-testid":"".concat(v,"_checkbox_all"),checked:!0,indeterminate:x.length>0}),d(u,{primary:"All"})]},"all"),d(c,{}),m.map((function(e){return o(i,{value:e,classes:{gutters:y.multiMenuItem},children:[d(r,{"data-testid":"".concat(v,"_checkbox_").concat(e),checked:-1!==x.indexOf(e)}),d(h,{value:e})]},e)}))]})]})};p.propTypes={options:e.arrayOf(e.string).isRequired,currentValues:e.arrayOf(e.string).isRequired,label:e.string.isRequired,ListMenuItem:e.node.isRequired,onChange:e.func.isRequired,ValueComponent:e.node,"data-testid":e.string},p.defaultProps={ValueComponent:null,"data-testid":"MultiSelect"};export{p as MultiSelect};
@@ -1 +1 @@
1
- import e from"prop-types";import{FormControl as r,InputLabel as n,Select as a,MenuItem as l}from"@material-ui/core";import{jsxs as i,jsx as t}from"react/jsx-runtime";var u=function(e){var u=e.label,o=e.currentValue,p=e.options,s=e.onChange;return i(r,{style:{width:"100%"},children:[u&&t(n,{shrink:!0,children:u}),t(a,{value:o,onChange:function(e){s(e.target.value.includes("all")?null:e.target.value)},children:p.map((function(e){var r=e.value,n=e.label;return t(l,{value:r,children:n},r)}))})]})};u.propTypes={label:e.string,currentValue:e.string.isRequired,options:e.arrayOf(e.shape({})).isRequired,onChange:e.func.isRequired},u.defaultProps={label:""};export{u as PeriodSelect};
1
+ import e from"prop-types";import{FormControl as r,InputLabel as t,Select as a,MenuItem as n}from"@material-ui/core";import{jsxs as i,jsx as l}from"react/jsx-runtime";var o=function(e){var o=e.label,u=e.currentValue,c=e.options,s=e.onChange;return i(r,{style:{width:"100%"},children:[o&&l(t,{shrink:!0,children:o}),l(a,{"data-testid":"".concat("PeriodSelect","_select"),value:u,onChange:function(e){s(e.target.value.includes("all")?null:e.target.value)},children:c.map((function(e){var r=e.value,t=e.label;return l(n,{"data-testid":"".concat("PeriodSelect","_option_").concat(r,"MenuItem"),value:r,children:t},r)}))})]})};o.propTypes={label:e.string,currentValue:e.string.isRequired,options:e.arrayOf(e.shape({})).isRequired,onChange:e.func.isRequired},o.defaultProps={label:""};export{o as PeriodSelect};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import{useState as r,useMemo as i,useEffect as t}from"react";import o from"prop-types";import{Tooltip as n,TextField as u}from"@material-ui/core";import{debounce as a}from"lodash";import{convertValue as m}from"../../../../utils/index.js";import{getIsImperial as l}from"../../utils/unitSystem.js";import{jsx as s}from"react/jsx-runtime";var p=a((function(e){e()}),1500),c=function(o){var a=o.radius,c=o.editable,d=o.onChange,f=r(a),b=e(f,2),h=b[0],v=b[1],g=r(null),x=e(g,2),y=x[0],j=x[1],k=i((function(){return l()}),[]);t((function(){var e=k?a:m(a,"length","mi","km",3);v(Number.parseFloat(e).toFixed(2))}),[a]);return s(n,{title:c?"":"To make radius active select Subject Well.",children:s(u,{type:"number",label:"Radius (".concat(k?"miles":"km",")"),value:h||"",disabled:!c,onChange:function(e){var r=e.target.value;if(!Number.isFinite(+r)||+r<0)j("Incorrect radius");else{j(null);var i=k?+r:m(r,"length","km","mi",3);p((function(){d(+i)}))}v(r)},error:!!y,helperText:y},"ows4-radius-input")})};c.propTypes={radius:o.number.isRequired,editable:o.bool.isRequired,onChange:o.func.isRequired};export{c as RadiusInput};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useMemo as r,useEffect as i}from"react";import a from"prop-types";import{Tooltip as o,TextField as n}from"@material-ui/core";import{debounce as u}from"lodash";import{convertValue as s}from"../../../../utils/index.js";import{getIsImperial as l}from"../../utils/unitSystem.js";import{jsx as m}from"react/jsx-runtime";var d=u((function(e){e()}),1500),p=function(a){var u=a.radius,p=a.editable,c=a.onChange,f=a["data-testid"],b=t(u),h=e(b,2),v=h[0],g=h[1],x=t(null),y=e(x,2),R=y[0],j=y[1],k=r((function(){return l()}),[]);i((function(){var e=k?u:s(u,"length","mi","km",3);g(Number.parseFloat(e).toFixed(2))}),[u]);return m(o,{title:p?"":"To make radius active select Subject Well.",children:m(n,{"data-testid":"".concat(f,"_input"),type:"number",label:"Radius (".concat(k?"miles":"km",")"),value:v||"",disabled:!p,onChange:function(e){var t=e.target.value;if(!Number.isFinite(+t)||+t<0)j("Incorrect radius");else{j(null);var r=k?+t:s(t,"length","km","mi",3);d((function(){c(+r)}))}g(t)},error:!!R,helperText:R},"ows4-radius-input")})};p.propTypes={radius:a.number.isRequired,editable:a.bool.isRequired,onChange:a.func.isRequired,"data-testid":a.string},p.defaultProps={"data-testid":"RadiusInput"};export{p as RadiusInput};
@@ -1 +1 @@
1
- import e from"prop-types";import{FormControl as r,InputLabel as a,Select as n,MenuItem as l}from"@material-ui/core";import{jsxs as i,jsx as u}from"react/jsx-runtime";var s=function(e){var s=e.label,o=e.currentValue,t=e.options,c=e.className,p=e.renderValue,d=e.onChange;return i(r,{className:c,children:[s&&u(a,{shrink:!0,children:s}),u(n,{value:o,renderValue:p,onChange:d,children:t.map((function(e){var r=e.value,a=e.label;return u(l,{value:r,children:a},r)}))})]})};s.propTypes={label:e.string,currentValue:e.string.isRequired,options:e.arrayOf(e.shape({})).isRequired,className:e.string.isRequired,renderValue:e.func,onChange:e.func.isRequired},s.defaultProps={label:"",renderValue:null};export{s as SingleSelect};
1
+ import e from"prop-types";import{FormControl as r,InputLabel as a,Select as n,MenuItem as t}from"@material-ui/core";import{jsxs as l,jsx as i}from"react/jsx-runtime";var c=function(e){var c=e.label,o=e.currentValue,u=e.options,s=e.className,d=e.renderValue,p=e.onChange;return l(r,{className:s,children:[c&&i(a,{shrink:!0,children:c}),i(n,{"data-testid":"".concat("SingleSelect","_select_").concat(c),value:o,renderValue:d,onChange:p,children:u.map((function(e){var r=e.value,a=e.label;return i(t,{"data-testid":"".concat("SingleSelect","_option_").concat(r,"MenuItem"),value:r,children:a},r)}))})]})};c.propTypes={label:e.string,currentValue:e.string.isRequired,options:e.arrayOf(e.shape({})).isRequired,className:e.string.isRequired,renderValue:e.func,onChange:e.func.isRequired},c.defaultProps={label:"",renderValue:null};export{c as SingleSelect};
@@ -1 +1 @@
1
- import e from"prop-types";import{makeStyles as r,FormControl as t,Tooltip as i,Typography as n,MenuItem as o}from"@material-ui/core";import{getUnitDisplay as a}from"../../../../utils/index.js";import l from"../../../Select/index.js";import{METRICS_LIST as p}from"../../constants.js";import{jsx as c}from"react/jsx-runtime";var u=r((function(e){return{metricsForm:{width:"calc(100% - 32px)","& .MuiInputBase-root":{"&:hover $primaryText":{color:e.palette.primary.text1},"&:hover $primaryIcon":{color:e.palette.primary.text1},"&:focused $primaryIcon":{color:e.palette.primary.main}}},metricsSelect:{"&:before":{borderBottom:"none !important"},"&:after":{borderBottom:"none !important"}},primaryText:{fontWeight:500,fontSize:"12px",lineHeight:"14px",letterSpacing:"0.4px",color:e.palette.primary.text7,overflow:"hidden",textOverflow:"ellipsis"},primaryIcon:{color:e.palette.primary.text6},metricsMenuPaper:{backgroundColor:e.palette.background.b9,maxHeight:"calc(100% - 300px)",top:"150px !important"},valueLabel:{display:"-webkit-box",alignItems:"center",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflowWrap:"break-word",fontWeight:500,fontSize:"12px",lineHeight:"14px",letterSpacing:"0.4px",overflow:"hidden",whiteSpace:"normal"}}}));function m(e){var r=p.find((function(r){return r.key===e}));if(!r)return"";var t=r.unitType?" (".concat(a(r.unitType),")"):"";return r.label+t}var s=function(e){var r=e.isTooltipVisible,a=e.currentValue,s=e.onChange,f=e.setIsMenuOpen,d=u();return c(t,{className:d.metricsForm,children:c(l,{className:d.metricsSelect,classes:{select:d.primaryText,icon:d.primaryIcon},MenuProps:{paper:d.metricsMenuPaper},value:a,renderValue:function(e){return c(i,{title:r?m(e):"",children:c(n,{className:d.valueLabel,children:m(e)})})},onOpen:function(){return f(!0)},onClose:function(){return f(!1)},onChange:function(e){return s(e.target.value)},children:p.map((function(e){return c(o,{value:e.key,children:e.label},e.key)}))})})};s.propTypes={isTooltipVisible:e.bool.isRequired,currentValue:e.string.isRequired,onChange:e.func.isRequired,setIsMenuOpen:e.func.isRequired};export{s as MetricsSelect};
1
+ import e from"prop-types";import{makeStyles as t,FormControl as r,Tooltip as i,Typography as n,MenuItem as o}from"@material-ui/core";import{getUnitDisplay as a}from"../../../../utils/index.js";import c from"../../../Select/index.js";import{METRICS_LIST as l}from"../../constants.js";import{jsx as p}from"react/jsx-runtime";var s=t((function(e){return{metricsForm:{width:"calc(100% - 32px)","& .MuiInputBase-root":{"&:hover $primaryText":{color:e.palette.primary.text1},"&:hover $primaryIcon":{color:e.palette.primary.text1},"&:focused $primaryIcon":{color:e.palette.primary.main}}},metricsSelect:{"&:before":{borderBottom:"none !important"},"&:after":{borderBottom:"none !important"}},primaryText:{fontWeight:500,fontSize:"12px",lineHeight:"14px",letterSpacing:"0.4px",color:e.palette.primary.text7,overflow:"hidden",textOverflow:"ellipsis"},primaryIcon:{color:e.palette.primary.text6},metricsMenuPaper:{backgroundColor:e.palette.background.b9,maxHeight:"calc(100% - 300px)",top:"150px !important"},valueLabel:{display:"-webkit-box",alignItems:"center",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflowWrap:"break-word",fontWeight:500,fontSize:"12px",lineHeight:"14px",letterSpacing:"0.4px",overflow:"hidden",whiteSpace:"normal"}}}));function u(e){var t=l.find((function(t){return t.key===e}));if(!t)return"";var r=t.unitType?" (".concat(a(t.unitType),")"):"";return t.label+r}var m=function(e){var t=e.isTooltipVisible,a=e.currentValue,m=e.onChange,f=e.setIsMenuOpen,d=s();return p(r,{className:d.metricsForm,children:p(c,{"data-testid":"".concat("MetricsSelect","_select_").concat(a),className:d.metricsSelect,classes:{select:d.primaryText,icon:d.primaryIcon},MenuProps:{paper:d.metricsMenuPaper},value:a,renderValue:function(e){return p(i,{title:t?u(e):"",children:p(n,{className:d.valueLabel,children:u(e)})})},onOpen:function(){return f(!0)},onClose:function(){return f(!1)},onChange:function(e){return m(e.target.value)},children:l.map((function(e){return p(o,{"data-testid":"".concat("MetricsSelect","_option_").concat(e.key,"MenuItem"),value:e.key,children:e.label},e.key)}))})})};m.propTypes={isTooltipVisible:e.bool.isRequired,currentValue:e.string.isRequired,onChange:e.func.isRequired,setIsMenuOpen:e.func.isRequired};export{m as MetricsSelect};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as r}from"react";import{isEqual as i}from"lodash";import o from"prop-types";import{makeStyles as n,Menu as s,MenuItem as p,Checkbox as m}from"@material-ui/core";import a from"@material-ui/icons/Settings";import"@babel/runtime/helpers/defineProperty";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as l,Fragment as c,jsx as d}from"react/jsx-runtime";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"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"classnames";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.js";import"../../../../constants/goals.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../utils/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";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"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/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 j from"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.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"../../../Tooltip/MuiTooltipDcWrapper.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"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/InputAdornmentLeft.js";import"../../../Search/components/Groups.js";import{METRICS_LIST as C,MAX_METRICS_COUNT as u}from"../../constants.js";var A=n((function(e){return{checkBox:{color:"grey",padding:"0px",marginRight:"10px"},paper:{transform:"translate(-40px, 4px) scale(1, 1) !important",maxHeight:"calc(80% - 80px)",backgroundColor:e.palette.background.b9},titleItem:{position:"sticky",top:"0px",zIndex:9,marginBottom:"-8px",display:"flex",alignItems:"center",height:"40px",paddingLeft:"16px",background:e.palette.background.b9},titleLabel:{fontStyle:"italic",fontWeight:400,fontSize:"12px",lineHeight:"14px",letterSpacing:"0.4px",color:"#999999"},menuList:{paddingTop:"0px !important"},menuItem:{height:"54px !important"}}})),g=function(o){var n=o.metricsKeys,g=o.onChange,D=o.contentRef,v=A(),x=t([]),b=e(x,2),f=b[0],h=b[1],S=t(null),P=e(S,2),I=P[0],y=P[1];r((function(){h(n||[])}),[n]);return l(c,{children:[d(j,{size:"small",tooltipProps:{title:"Select Metrics"},onClick:function(e){y(e.currentTarget)},children:d(a,{})}),l(s,{id:"simple-menu",anchorEl:D.current,getContentAnchorEl:null,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"right"},classes:{paper:v.paper,list:v.menuList},keepMounted:!0,open:Boolean(I),onClose:function(){y(null),i(f,n)||g(f)},children:[d("div",{className:v.titleItem,children:d("span",{className:v.titleLabel,children:"Up to 3 Metrics"})}),C.map((function(e){return l(p,{className:v.menuItem,disabled:f.length===u&&!f.includes(e.key),onClick:function(){return t=e.key,void(f.includes(t)?h(f.filter((function(e){return e!==t}))):h(f.concat(t)));var t},children:[d(m,{checked:f.includes(e.key),className:v.checkBox}),e.label]},e.key)}))]})]})};g.propTypes={metricsKeys:o.arrayOf(o.string).isRequired,onChange:o.func.isRequired,contentRef:o.shape({current:o.instanceOf(Element)}).isRequired};export{g as MetricsSettingMenu};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as r}from"react";import{isEqual as i}from"lodash";import o from"prop-types";import{makeStyles as n,Menu as s,MenuItem as p,Checkbox as m}from"@material-ui/core";import a from"@material-ui/icons/Settings";import"@babel/runtime/helpers/defineProperty";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as l,Fragment as c,jsx as d}from"react/jsx-runtime";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"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"classnames";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.js";import"../../../../constants/goals.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../utils/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";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"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/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 j from"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.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"../../../Tooltip/MuiTooltipDcWrapper.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"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/InputAdornmentLeft.js";import"../../../Search/components/Groups.js";import{METRICS_LIST as C,MAX_METRICS_COUNT as u}from"../../constants.js";var A=n((function(e){return{checkBox:{color:"grey",padding:"0px",marginRight:"10px"},paper:{transform:"translate(-40px, 4px) scale(1, 1) !important",maxHeight:"calc(80% - 80px)",backgroundColor:e.palette.background.b9},titleItem:{position:"sticky",top:"0px",zIndex:9,marginBottom:"-8px",display:"flex",alignItems:"center",height:"40px",paddingLeft:"16px",background:e.palette.background.b9},titleLabel:{fontStyle:"italic",fontWeight:400,fontSize:"12px",lineHeight:"14px",letterSpacing:"0.4px",color:"#999999"},menuList:{paddingTop:"0px !important"},menuItem:{height:"54px !important"}}})),g=function(o){var n=o.metricsKeys,g=o.onChange,D=o.contentRef,v=A(),x=t([]),b=e(x,2),f=b[0],h=b[1],S=t(null),P=e(S,2),I=P[0],y=P[1];r((function(){h(n||[])}),[n]);return l(c,{children:[d(j,{"data-testid":"".concat("MetricsSettingMenu","_gear"),size:"small",tooltipProps:{title:"Select Metrics"},onClick:function(e){y(e.currentTarget)},children:d(a,{})}),l(s,{id:"simple-menu",anchorEl:D.current,getContentAnchorEl:null,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"right"},classes:{paper:v.paper,list:v.menuList},keepMounted:!0,open:Boolean(I),onClose:function(){y(null),i(f,n)||g(f)},children:[d("div",{className:v.titleItem,children:d("span",{className:v.titleLabel,children:"Up to 3 Metrics"})}),C.map((function(e){return l(p,{"data-testid":"".concat("MetricsSettingMenu","_option_").concat(e.key,"MenuItem"),className:v.menuItem,disabled:f.length===u&&!f.includes(e.key),onClick:function(){return t=e.key,void(f.includes(t)?h(f.filter((function(e){return e!==t}))):h(f.concat(t)));var t},children:[d(m,{checked:f.includes(e.key),className:v.checkBox}),e.label]},e.key)}))]})]})};g.propTypes={metricsKeys:o.arrayOf(o.string).isRequired,onChange:o.func.isRequired,contentRef:o.shape({current:o.instanceOf(Element)}).isRequired};export{g as MetricsSettingMenu};
@@ -1 +1 @@
1
- import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var o={stickyTable:"OffsetWellsTable-module_stickyTable__LZCzy",searchCell:"OffsetWellsTable-module_searchCell__3IW23",bodyTable:"OffsetWellsTable-module_bodyTable__djKsG",bodyGrid:"OffsetWellsTable-module_bodyGrid__Ss17M",loadingCell:"OffsetWellsTable-module_loadingCell__rBu7-",topShadow:"OffsetWellsTable-module_topShadow__MPc8N",viewOnlyShadow:"OffsetWellsTable-module_viewOnlyShadow__DOW-4",bottomShadow:"OffsetWellsTable-module_bottomShadow__jxM6E",wellNameFixed:"OffsetWellsTable-module_wellNameFixed__tKtuD",noShadow:"OffsetWellsTable-module_noShadow__Ssp7E"};e('.OffsetWellsTable-module_stickyTable__LZCzy{background-color:var(--palette-background-b-9);position:sticky;top:0;z-index:9}.OffsetWellsTable-module_searchCell__3IW23{background-color:var(--palette-background-b-9);border-bottom:none!important;height:40px!important;padding:0!important}.OffsetWellsTable-module_bodyTable__djKsG{position:relative}.OffsetWellsTable-module_bodyGrid__Ss17M{margin-top:12px!important;overflow:hidden!important}.OffsetWellsTable-module_bodyGrid__Ss17M::-webkit-scrollbar-corner{background:transparent}.OffsetWellsTable-module_loadingCell__rBu7-{border-bottom:none!important;color:var(--palette-primary-text-8)!important;font-size:12px!important;height:16px!important;padding:0!important;text-align:center!important}.OffsetWellsTable-module_topShadow__MPc8N{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);border-bottom:none!important;height:16px!important;padding:0!important;position:sticky;top:93px;width:100%;z-index:999}.OffsetWellsTable-module_viewOnlyShadow__DOW-4{top:49px}.OffsetWellsTable-module_bottomShadow__jxM6E{border-bottom:none!important;bottom:0;height:0!important;padding:0!important;position:sticky;width:100%;z-index:999}.OffsetWellsTable-module_bottomShadow__jxM6E:after{background-image:linear-gradient(180deg,rgba(65,65,65,0),#414141);bottom:0;content:" ";height:16px!important;position:absolute;width:100%}.OffsetWellsTable-module_wellNameFixed__tKtuD{box-shadow:4px 0 6px -3px #191919!important}.OffsetWellsTable-module_noShadow__Ssp7E{box-shadow:none!important}');export{o as default};
1
+ import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var o={stickyTable:"OffsetWellsTable-module_stickyTable__LZCzy",searchCell:"OffsetWellsTable-module_searchCell__3IW23",bodyTable:"OffsetWellsTable-module_bodyTable__djKsG",bodyGrid:"OffsetWellsTable-module_bodyGrid__Ss17M",loadingCell:"OffsetWellsTable-module_loadingCell__rBu7-",topShadow:"OffsetWellsTable-module_topShadow__MPc8N",viewOnlyShadow:"OffsetWellsTable-module_viewOnlyShadow__DOW-4",bottomShadow:"OffsetWellsTable-module_bottomShadow__jxM6E",wellNameFixed:"OffsetWellsTable-module_wellNameFixed__tKtuD",noShadow:"OffsetWellsTable-module_noShadow__Ssp7E"};e('.OffsetWellsTable-module_stickyTable__LZCzy{background-color:var(--palette-background-b-9);position:sticky;top:0;z-index:9}.OffsetWellsTable-module_searchCell__3IW23{background-color:var(--palette-background-b-9);border-bottom:none!important;height:40px!important;padding:0!important}.OffsetWellsTable-module_bodyTable__djKsG{position:relative}.OffsetWellsTable-module_bodyGrid__Ss17M{margin-top:12px!important;overflow:hidden!important}.OffsetWellsTable-module_bodyGrid__Ss17M::-webkit-scrollbar-corner{background:transparent}.OffsetWellsTable-module_loadingCell__rBu7-{border-bottom:none!important;color:var(--palette-primary-text-8)!important;font-size:12px!important;height:16px!important;padding:0!important;text-align:center!important}.OffsetWellsTable-module_topShadow__MPc8N{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);border-bottom:none!important;height:16px!important;padding:0!important;position:sticky;top:93px;width:100%;z-index:999}.OffsetWellsTable-module_viewOnlyShadow__DOW-4{top:49px}.OffsetWellsTable-module_bottomShadow__jxM6E{border-bottom:none!important;bottom:0;height:16px!important;padding:0!important;position:sticky;width:100%;z-index:999}.OffsetWellsTable-module_bottomShadow__jxM6E:after{background-image:linear-gradient(180deg,rgba(65,65,65,0),#414141);bottom:0;content:" ";height:16px!important;position:absolute;width:100%}.OffsetWellsTable-module_wellNameFixed__tKtuD{box-shadow:4px 0 6px -3px #191919!important}.OffsetWellsTable-module_noShadow__Ssp7E{box-shadow:none!important}');export{o as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{memo as i,useState as n}from"react";import l from"classnames";import s from"prop-types";import{SortDirection as a}from"react-virtualized";import{TableRow as c,TableCell as o,Checkbox as d,Tooltip as m,TableSortLabel as u}from"@material-ui/core";import{ArrowForwardIos as p}from"@material-ui/icons";import{MetricsSettingMenu as h}from"./MetricsSettingMenu.js";import{MetricsSelect as f}from"./MetricsSelect.js";import{EXPANED_WELLNAME_WIDTH as y,ColumnType as b}from"../../constants.js";import C from"./OffsetWellsTableHead.module.css.js";import{jsxs as g,jsx as v}from"react/jsx-runtime";var O=["title"];function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function w(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?S(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var N=function(e){var t=e.title,i=r(e,O);return v(m,{placement:"top-end",title:t,children:v(u,w({},i))})};function R(e,t){var r=e.find((function(e){return e.key===t}));return(null==r?void 0:r.width)||0}var q=function(r){var i=r.open,s=r.columnsWithDict,u=r.metricsKeys,O=r.sortBy,S=r.sortDirection,w=r.indeterminate,q=r.isAllWellsSelected,W=r.onChangeSort,j=r.onChangeMetricsKeys,D=r.onUpdateMetricsKey,E=r.isWellNameExpand,k=r.setIsWellNameExpand,A=r.handleChangeAllOffsetWells,P=r.wellNameStyle,x=r.isViewOnly,L=r.isImperial,M=r.contentRef,K=n(!1),I=e(K,2),T=I[0],V=I[1],z=function(e){W(e,e===O&&S===a.ASC?a.DESC:a.ASC)};return g(c,{className:C.tableRow,children:[v(o,{className:l(C.headCell,C.wellNameCell,P),style:{width:E?y:R(s,b.name)},children:g("div",{className:C.nameWrapper,children:[!x&&i&&v(d,{size:"medium",onChange:function(e){return A(e.target.checked)},checked:q,indeterminate:w}),v(N,{title:"Sort",active:O===b.name,direction:O===b.name&&S===a.DESC?"desc":"asc",classes:{root:l(C.headerLabel,t({},C.cellDataViewOnly,x))},onClick:function(){return z(b.name)},children:"Well Name"})]})}),v(o,{className:C.headCell,style:{width:R(s,b.status)},children:v(m,{title:E?"Collapse":"Expand",children:v(p,{className:l(C.wellNameExpandIcon,t({},C.wellNameCollapsed,!E)),onClick:function(){return k(!E)}})})}),v(o,{className:C.headCell,style:{width:R(s,b.rig)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===b.rig,direction:O===b.rig&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(b.rig)},children:"Rig"})})}),v(o,{className:C.headCell,style:{width:R(s,b.distance)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===b.distance,direction:O===b.distance&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(b.distance)},children:"Distance (".concat(L?"miles":"km",")")})})}),v(o,{className:C.headCell,style:{width:R(s,b.lastActive)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===b.lastActive,direction:O===b.lastActive&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(b.lastActive)},children:"Last Active"})})}),u.map((function(e){return v(o,{className:C.headCell,style:{width:R(s,e)},children:v(N,{title:T?"":"Sort",active:O===e,direction:O===e&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(e)},children:v(f,{isTooltipVisible:u.length>1,currentValue:e,onChange:function(t){return D(e,t)},setIsMenuOpen:V})})},e)})),v(o,{className:C.headCell,style:{width:R(s,b.wellSection)},children:g("div",{className:C.settingsHeader,children:[v("span",{className:C.headerLabel,children:"Well Section"}),v(h,{metricsKeys:u,onChange:j,contentRef:M})]})})]})};q.propTypes={open:s.bool.isRequired,columnsWithDict:s.arrayOf(s.shape({key:s.string,label:s.string,type:s.string,width:s.number})).isRequired,metricsKeys:s.arrayOf(s.string).isRequired,sortBy:s.string.isRequired,sortDirection:s.string.isRequired,indeterminate:s.bool.isRequired,isAllWellsSelected:s.bool.isRequired,style:s.shape({}).isRequired,onChangeSort:s.func.isRequired,onChangeMetricsKeys:s.func.isRequired,onUpdateMetricsKey:s.func.isRequired,isWellNameExpand:s.bool.isRequired,setIsWellNameExpand:s.func.isRequired,handleChangeAllOffsetWells:s.func.isRequired,wellNameStyle:s.string.isRequired,isViewOnly:s.bool.isRequired,isImperial:s.bool.isRequired,contentRef:s.shape({current:s.instanceOf(Element)}).isRequired};var W=i(q);export{W as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import i from"@babel/runtime/helpers/objectWithoutProperties";import{memo as r,useState as a}from"react";import n from"classnames";import l from"prop-types";import{SortDirection as s}from"react-virtualized";import{TableRow as c,TableCell as o,Checkbox as d,Tooltip as m,TableSortLabel as u}from"@material-ui/core";import{ArrowForwardIos as p}from"@material-ui/icons";import{MetricsSettingMenu as h}from"./MetricsSettingMenu.js";import{MetricsSelect as f}from"./MetricsSelect.js";import{EXPANED_WELLNAME_WIDTH as y,ColumnType as b}from"../../constants.js";import g from"./OffsetWellsTableHead.module.css.js";import{jsxs as C,jsx as v}from"react/jsx-runtime";var O=["title"];function S(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function w(e){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?S(Object(r),!0).forEach((function(i){t(e,i,r[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var N="OffsetWellsTableHead",R=function(e){var t=e.title,r=i(e,O);return v(m,{placement:"top-end",title:t,children:v(u,w({},r))})};function W(e,t){var i=e.find((function(e){return e.key===t}));return(null==i?void 0:i.width)||0}var q=function(i){var r=i.open,l=i.columnsWithDict,u=i.metricsKeys,O=i.sortBy,S=i.sortDirection,w=i.indeterminate,q=i.isAllWellsSelected,j=i.onChangeSort,D=i.onChangeMetricsKeys,E=i.onUpdateMetricsKey,A=i.isWellNameExpand,k=i.setIsWellNameExpand,P=i.handleChangeAllOffsetWells,x=i.wellNameStyle,L=i.isViewOnly,_=i.isImperial,M=i.contentRef,K=a(!1),I=e(K,2),T=I[0],V=I[1],H=function(e){j(e,e===O&&S===s.ASC?s.DESC:s.ASC)};return C(c,{className:g.tableRow,children:[v(o,{"data-testid":"".concat(N,"_wellName"),className:n(g.headCell,g.wellNameCell,x),style:{width:A?y:W(l,b.name)},children:C("div",{className:g.nameWrapper,children:[!L&&r&&v(d,{"data-testid":"".concat(N,"_allWellsSelector"),size:"medium",onChange:function(e){return P(e.target.checked)},checked:q,indeterminate:w}),v(R,{title:"Sort",active:O===b.name,direction:O===b.name&&S===s.DESC?"desc":"asc",classes:{root:n(g.headerLabel,t({},g.cellDataViewOnly,L))},onClick:function(){return H(b.name)},children:"Well Name"})]})}),v(o,{"data-testid":"".concat(N,"_nameExpander_").concat(A),className:g.headCell,style:{width:W(l,b.status)},children:v(m,{title:A?"Collapse":"Expand",children:v(p,{className:n(g.wellNameExpandIcon,t({},g.wellNameCollapsed,!A)),onClick:function(){return k(!A)}})})}),v(o,{"data-testid":"".concat(N,"_rig"),className:g.headCell,style:{width:W(l,b.rig)},children:v("div",{className:g.nameWrapper,children:v(R,{title:"Sort",active:O===b.rig,direction:O===b.rig&&S===s.DESC?"desc":"asc",classes:{root:g.headerLabel},onClick:function(){return H(b.rig)},children:"Rig"})})}),v(o,{"data-testid":"".concat(N,"_distance"),className:g.headCell,style:{width:W(l,b.distance)},children:v("div",{className:g.nameWrapper,children:v(R,{title:"Sort",active:O===b.distance,direction:O===b.distance&&S===s.DESC?"desc":"asc",classes:{root:g.headerLabel},onClick:function(){return H(b.distance)},children:"Distance (".concat(_?"miles":"km",")")})})}),v(o,{"data-testid":"".concat(N,"_LastActive"),className:g.headCell,style:{width:W(l,b.lastActive)},children:v("div",{className:g.nameWrapper,children:v(R,{title:"Sort",active:O===b.lastActive,direction:O===b.lastActive&&S===s.DESC?"desc":"asc",classes:{root:g.headerLabel},onClick:function(){return H(b.lastActive)},children:"Last Active"})})}),u.map((function(e){return v(o,{"data-testid":"".concat(N,"_").concat(e),className:g.headCell,style:{width:W(l,e)},children:v(R,{title:T?"":"Sort",active:O===e,direction:O===e&&S===s.DESC?"desc":"asc",classes:{root:g.headerLabel},onClick:function(){return H(e)},children:v(f,{isTooltipVisible:u.length>1,currentValue:e,onChange:function(t){return E(e,t)},setIsMenuOpen:V})})},e)})),v(o,{"data-testid":"".concat(N,"_WellSection"),className:g.headCell,style:{width:W(l,b.wellSection)},children:C("div",{className:g.settingsHeader,children:[v("span",{className:g.headerLabel,children:"Well Section"}),v(h,{metricsKeys:u,onChange:D,contentRef:M})]})})]})};q.propTypes={open:l.bool.isRequired,columnsWithDict:l.arrayOf(l.shape({key:l.string,label:l.string,type:l.string,width:l.number})).isRequired,metricsKeys:l.arrayOf(l.string).isRequired,sortBy:l.string.isRequired,sortDirection:l.string.isRequired,indeterminate:l.bool.isRequired,isAllWellsSelected:l.bool.isRequired,style:l.shape({}).isRequired,onChangeSort:l.func.isRequired,onChangeMetricsKeys:l.func.isRequired,onUpdateMetricsKey:l.func.isRequired,isWellNameExpand:l.bool.isRequired,setIsWellNameExpand:l.func.isRequired,handleChangeAllOffsetWells:l.func.isRequired,wellNameStyle:l.string.isRequired,isViewOnly:l.bool.isRequired,isImperial:l.bool.isRequired,contentRef:l.shape({current:l.instanceOf(Element)}).isRequired};var j=r(q);export{j as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as l,useRef as i,useState as r,useCallback as n,useEffect as s,useMemo as a}from"react";import o from"prop-types";import{startCase as c,get as u}from"lodash";import d from"classnames";import m from"moment";import{TableRow as f,TableCell as h,Checkbox as y,Tooltip as p,Typography as b}from"@material-ui/core";import{convertValue as v}from"../../../../utils/index.js";import{ColumnType as N,EXPANED_WELLNAME_WIDTH as w,StatusOptions as g,ROW_HEIGHT as R}from"../../constants.js";import{SubjectWellMark as W}from"./SubjectWellMark.js";import C from"./OffsetWellsTableRow.module.css.js";import q from"./ViewWellSectionsName.js";import{jsxs as T,jsx as k}from"react/jsx-runtime";function O(e,t,l){var i=t.find((function(e){return e.key===l})),r=u(e,i.key);return"undefined"===r?"loading...":Number.isFinite(r)||r?i.unitType?v(r,i.unitType,i.from,i.to):r:"—"}function j(e,t){var l=u(e,N.distance);return Number.isFinite(l)?t?l:v(l,"length","mi","km"):"—"}function x(e,t){var l=e.find((function(e){return e.key===t}));return(null==l?void 0:l.width)||0}var S=function(l){var o,u,v=l.columnsWithDict,S=l.data,D=l.subjectWellId,M=l.metricsKeys,I=l.metricsColumns,A=l.handleChanageOffsetWell,L=l.isWellNameExpand,Y=l.wellNameStyle,z=l.wellNameWidth,E=l.isViewOnly,V=l.isImperial,F=l.isLimitedOffsetwells,K=l.flyTo,P=l.tableTop,H=l.wellSections,B=l.setActiveWellId,G=D===S.id,J=t({},C.subjectWellRow,G),Q=i(),U=i(),X=r(!1),Z=e(X,2),$=Z[0],_=Z[1],ee=i(),te=!1,le=S[N.name]||"—",ie=le;if(!L&&2*z<8*le.length){var re=function(e){var t=document.createElement("span");document.body.appendChild(t),t.style.font="Roboto",t.style.fontSize="14px",t.style.letterSpacing="0.01071em",t.style.height="auto",t.style.width="auto",t.style.position="absolute",t.innerHTML=e;var l=Math.ceil(t.clientWidth);return document.body.removeChild(t),l}(le);if(re>2*z){var ne=2*z/(re/le.length);ie="".concat(le.substring(0,ne/2-2),"\n... ").concat(le.substring(le.length-ne/2+6)),te=!0}}var se=n((function(e,t){var l=t-e+16;Q.current.style.position="absolute",Q.current.style.top="".concat(e,"px"),Q.current.style.zIndex=3,Q.current.style.transition="transform ".concat(800,"ms ease"),Q.current.style.transform="translateY(".concat(l,"px)")}),[]),ae=n((function(){Q.current.style.position="unset",Q.current.style.zIndex=1,Q.current.style.transition="none",Q.current.style.transform="none"}),[]);s((function(){ae(),_(!1),U.current&&(clearTimeout(U.current),U.current=null),ee.current=K}),[K]);var oe,ce,ue=n((function(e){if(!U.current){var t=Q.current.offsetTop,l=K;e?Math.abs(l-t)>=7*R&&(l=t-7*R):l=t+7*R,_(!0),se(t,l),U.current=setTimeout((function(){return A(S,e)}),800)}}),[S,K,P]),de=a((function(){return S[N.wellSection]}),[S]);return T(f,{className:C.bodyRow,innerRef:Q,onMouseEnter:function(){B(S.id)},onMouseLeave:function(){B(null)},children:[T(h,{className:d(C.bodyCell,C.wellNameCell,Y,J),style:{width:L?w:x(v,N.name)},children:[G&&k(W,{className:C.subjectWellMark}),!G&&k(y,{size:"medium",checked:$&&ee.current===K?!S.checked:S.checked,disabled:E||F&&!S.checked,onChange:function(e){return ue(e.target.checked)}}),k(p,{title:te?le:"",children:k(b,{variant:"body2",className:d(C.wellNameCursor,(o={},t(o,C.cellDataViewOnly,G),t(o,C.wellNamePreWrap,te),o)),children:te?ie:le})})]}),k(h,{className:d(C.bodyCell,J),style:{width:x(v,N.status)},children:!G&&k(p,{title:c(S[N.status]),children:k("div",{className:C.status,style:{background:null===(u=g.find((function(e){return e.value===S[N.status]})))||void 0===u?void 0:u.color}})})}),k(h,{className:d(C.bodyCell,J),style:{width:x(v,N.rig)},children:k(b,{variant:"body2",className:C.cellData,children:S[N.rig]&&"Null"!==S[N.rig]?S[N.rig]:"—"})}),k(h,{className:d(C.bodyCell,J),style:{width:x(v,N.distance)},children:k(b,{variant:"body2",className:C.cellData,children:j(S,V)})}),k(h,{className:d(C.bodyCell,J),style:{width:x(v,N.lastActive)},children:k(b,{variant:"body2",className:C.cellData,children:S[N.lastActive]&&Number.isFinite(S[N.lastActive])?m.unix(S[N.lastActive]).format("MM/DD/YYYY"):"—"})}),M.map((function(e){return k(h,{className:d(C.bodyCell,J),style:{width:x(v,e)},children:k(b,{variant:"body2",className:C.cellData,children:O(S,I,e)})},e)})),k(h,{className:d(C.bodyCell,C.lastCell,J),style:{width:x(v,N.wellSection)},children:de&&de.length>1?k(p,{classes:{tooltip:C.customTooltip},title:k(q,{wellSectionNames:de}),children:k("div",{className:C.sectionLength,children:de.length})}):k(p,{title:de||"",children:k(b,{variant:"body2",className:C.cellData,style:{color:de&&1===de.length&&(oe=de,ce=e(oe,1)[0],H.find((function(e){return e.label===ce})).color)},children:de})})})]})};S.propTypes={columnsWithDict:o.arrayOf(o.shape({})).isRequired,data:o.shape({id:o.number,checked:o.bool,name:o.string,status:o.string}).isRequired,subjectWellId:o.number.isRequired,metricsKeys:o.arrayOf(o.string).isRequired,metricsColumns:o.arrayOf(o.shape({})).isRequired,handleChanageOffsetWell:o.func.isRequired,isWellNameExpand:o.bool.isRequired,wellNameStyle:o.string.isRequired,wellNameWidth:o.number.isRequired,isViewOnly:o.bool.isRequired,isImperial:o.bool.isRequired,isLimitedOffsetwells:o.bool.isRequired,flyTo:o.number.isRequired,tableTop:o.number.isRequired,wellSections:o.arrayOf(o.shape({})).isRequired,setActiveWellId:o.func.isRequired};var D=l(S);export{D as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as i,useRef as l,useState as r,useCallback as n,useEffect as a,useMemo as s}from"react";import c from"prop-types";import{startCase as o,get as d}from"lodash";import u from"classnames";import m from"moment";import{TableRow as f,TableCell as h,Checkbox as y,Tooltip as b,Typography as p}from"@material-ui/core";import{convertValue as v}from"../../../../utils/index.js";import{ColumnType as w,EXPANED_WELLNAME_WIDTH as N,StatusOptions as g,ROW_HEIGHT as R}from"../../constants.js";import{SubjectWellMark as W}from"./SubjectWellMark.js";import C from"./OffsetWellsTableRow.module.css.js";import q from"./ViewWellSectionsName.js";import{jsxs as T,jsx as k}from"react/jsx-runtime";var O="OffsetWellsTableRow";function x(e,t,i){var l=t.find((function(e){return e.key===i})),r=d(e,l.key);return"undefined"===r?"loading...":Number.isFinite(r)||r?l.unitType?v(r,l.unitType,l.from,l.to):r:"—"}function S(e,t){var i=d(e,w.distance);return Number.isFinite(i)?t?i:v(i,"length","mi","km"):"—"}function j(e,t){var i=e.find((function(e){return e.key===t}));return(null==i?void 0:i.width)||0}var _=function(i){var c,d,v=i.columnsWithDict,_=i.data,D=i.subjectWellId,M=i.metricsKeys,A=i.metricsColumns,I=i.handleChanageOffsetWell,L=i.isWellNameExpand,Y=i.wellNameStyle,z=i.wellNameWidth,E=i.isViewOnly,V=i.isImperial,F=i.isLimitedOffsetwells,K=i.flyTo,P=i.tableTop,H=i.wellSections,B=i.setActiveWellId,G=D===_.id,J=t({},C.subjectWellRow,G),Q=l(),U=l(),X=r(!1),Z=e(X,2),$=Z[0],ee=Z[1],te=l(),ie=!1,le=_[w.name]||"—",re=le;if(!L&&2*z<8*le.length){var ne=function(e){var t=document.createElement("span");document.body.appendChild(t),t.style.font="Roboto",t.style.fontSize="14px",t.style.letterSpacing="0.01071em",t.style.height="auto",t.style.width="auto",t.style.position="absolute",t.innerHTML=e;var i=Math.ceil(t.clientWidth);return document.body.removeChild(t),i}(le);if(ne>2*z){var ae=2*z/(ne/le.length);re="".concat(le.substring(0,ae/2-2),"\n... ").concat(le.substring(le.length-ae/2+6)),ie=!0}}var se=n((function(e,t){var i=t-e+16;Q.current.style.position="absolute",Q.current.style.top="".concat(e,"px"),Q.current.style.zIndex=3,Q.current.style.transition="transform ".concat(800,"ms ease"),Q.current.style.transform="translateY(".concat(i,"px)")}),[]),ce=n((function(){Q.current.style.position="unset",Q.current.style.zIndex=1,Q.current.style.transition="none",Q.current.style.transform="none"}),[]);a((function(){ce(),ee(!1),U.current&&(clearTimeout(U.current),U.current=null),te.current=K}),[K]);var oe,de,ue=n((function(e){if(!U.current){var t=Q.current.offsetTop,i=K;e?Math.abs(i-t)>=7*R&&(i=t-7*R):i=t+7*R,ee(!0),se(t,i),U.current=setTimeout((function(){return I(_,e)}),800)}}),[_,K,P]),me=s((function(){return _[w.wellSection]}),[_]);return T(f,{"data-testid":"".concat(O,"_row_").concat(le),className:C.bodyRow,innerRef:Q,onMouseEnter:function(){B(_.id)},onMouseLeave:function(){B(null)},children:[T(h,{"data-testid":"".concat(O,"_well"),className:u(C.bodyCell,C.wellNameCell,Y,J),style:{width:L?N:j(v,w.name)},children:[G&&k(W,{className:C.subjectWellMark}),!G&&k(y,{"data-testid":"".concat(O,"_checkbox"),size:"medium",checked:$&&te.current===K?!_.checked:_.checked,disabled:E||F&&!_.checked,onChange:function(e){return ue(e.target.checked)}}),k(b,{title:ie?le:"",children:k(p,{variant:"body2",className:u(C.wellNameCursor,(c={},t(c,C.cellDataViewOnly,G),t(c,C.wellNamePreWrap,ie),c)),children:ie?re:le})})]}),k(h,{"data-testid":"".concat(O,"_dot"),className:u(C.bodyCell,J),style:{width:j(v,w.status)},children:!G&&k(b,{title:o(_[w.status]),children:k("div",{"data-testid":"".concat(O,"_color"),className:C.status,style:{background:null===(d=g.find((function(e){return e.value===_[w.status]})))||void 0===d?void 0:d.color}})})}),k(h,{"data-testid":"".concat(O,"_rig"),className:u(C.bodyCell,J),style:{width:j(v,w.rig)},children:k(p,{variant:"body2",className:C.cellData,children:_[w.rig]&&"Null"!==_[w.rig]?_[w.rig]:"—"})}),k(h,{"data-testid":"".concat(O,"_distance"),className:u(C.bodyCell,J),style:{width:j(v,w.distance)},children:k(p,{variant:"body2",className:C.cellData,children:S(_,V)})}),k(h,{"data-testid":"".concat(O,"_lastActive"),className:u(C.bodyCell,J),style:{width:j(v,w.lastActive)},children:k(p,{variant:"body2",className:C.cellData,children:_[w.lastActive]&&Number.isFinite(_[w.lastActive])?m.unix(_[w.lastActive]).format("MM/DD/YYYY"):"—"})}),M.map((function(e){return k(h,{"data-testid":"".concat(O,"_").concat(e),className:u(C.bodyCell,J),style:{width:j(v,e)},children:k(p,{variant:"body2",className:C.cellData,children:x(_,A,e)})},e)})),k(h,{"data-testid":"".concat(O,"_wellSection"),className:u(C.bodyCell,C.lastCell,J),style:{width:j(v,w.wellSection)},children:me&&me.length>1?k(b,{classes:{tooltip:C.customTooltip},title:k(q,{wellSectionNames:me}),children:k("div",{className:C.sectionLength,children:me.length})}):k(b,{title:me||"",children:k(p,{variant:"body2",className:C.cellData,style:{color:me&&1===me.length&&(oe=me,de=e(oe,1)[0],H.find((function(e){return e.label===de})).color)},children:me})})})]})};_.propTypes={columnsWithDict:c.arrayOf(c.shape({})).isRequired,data:c.shape({id:c.number,checked:c.bool,name:c.string,status:c.string}).isRequired,subjectWellId:c.number.isRequired,metricsKeys:c.arrayOf(c.string).isRequired,metricsColumns:c.arrayOf(c.shape({})).isRequired,handleChanageOffsetWell:c.func.isRequired,isWellNameExpand:c.bool.isRequired,wellNameStyle:c.string.isRequired,wellNameWidth:c.number.isRequired,isViewOnly:c.bool.isRequired,isImperial:c.bool.isRequired,isLimitedOffsetwells:c.bool.isRequired,flyTo:c.number.isRequired,tableTop:c.number.isRequired,wellSections:c.arrayOf(c.shape({})).isRequired,setActiveWellId:c.func.isRequired};var D=i(_);export{D as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import a from"@babel/runtime/regenerator";import{useState as o,useEffect as c}from"react";import{isEmpty as l,uniq as s,get as u}from"lodash";import{fetchOffsetWellSelections as i,fetchWellhubWells as p}from"../utils/apiCalls.js";import{WellSectionColors as f,ALL_SECTION_KEY as b,ALL_SECTION_LABEL as m}from"../constants.js";function v(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var h=function(v,h){var y=o(null),d=n(y,2),j=d[0],w=d[1],x=o(null),P=n(x,2),g=P[0],k=P[1];return c((function(){var n,o,c=(n=t(a.mark((function t(){var n,o,c,u,p,v;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!h){t.next=7;break}return t.next=4,i(h);case 4:t.t0=t.sent,t.next=8;break;case 7:t.t0=[];case 8:n=t.t0,o=!l(n)&&JSON.parse(n[0].data.filters),c=!l(n)&&n[0].data.result&&JSON.parse(n[0].data.result),o&&c?(u=o.filterTabs.map((function(e,r){return{value:e.value,label:e.name,color:f[r]}})),p=[],v=u.reduce((function(e,t){var n=t.value,a=s(c[n].concat(h));return p=p.concat(a),O(O({},e),{},r({},n,a))}),{}),v=O(O({},v),{},r({},b,s(p))),w([{value:b,label:m}].concat(e(u))),k(v)):(w([{value:b,label:m}]),k(r({},b,[h]))),t.next=19;break;case 14:t.prev=14,t.t1=t.catch(0),console.error("offetwell selection fetch error: ",t.t1),w([]),k([]);case 19:case"end":return t.stop()}}),t,null,[[0,14]])}))),function(){return n.apply(this,arguments)}),y=(o=t(a.mark((function e(){var t,n,o;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p(h);case 3:t=e.sent,n=u(t[0],"data.offset_wells")||[],o=r({},b,s(n.map((function(e){return e.id})).concat(h))),w([{value:b,label:m}]),k(o),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(0),console.error("wellhub fetch error: ",e.t0),w([]),k([]);case 15:case"end":return e.stop()}}),e,null,[[0,10]])}))),function(){return o.apply(this,arguments)});h?v?c():y():(w([]),k([]))}),[v,h]),[j,g]};export{h as useBicWells};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import a from"@babel/runtime/regenerator";import{useState as o,useEffect as c}from"react";import{isEmpty as l,uniq as i,get as s}from"lodash";import{fetchOffsetWellSelections as u,fetchWellhubWells as p}from"../utils/apiCalls.js";import{WellSectionColors as f,ALL_SECTION_KEY as m,ALL_SECTION_LABEL as b}from"../constants.js";function v(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var h=function(v,h){var y=o(null),O=n(y,2),g=O[0],j=O[1],w=o(null),x=n(w,2),P=x[0],k=x[1],S=o(null),D=n(S,2),J=D[0],N=D[1];return c((function(){var n,o,c=(n=t(a.mark((function t(){var n,o,c,s,p,v,y,O,g,w,x;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!h){t.next=7;break}return t.next=4,u(h);case 4:t.t0=t.sent,t.next=8;break;case 7:t.t0=[];case 8:s=t.t0,p=!l(s)&&JSON.parse(s[0].data.filters),v=!l(s)&&s[0].data.result&&JSON.parse(s[0].data.result),y=(null==s||null===(n=s[0])||void 0===n||null===(o=n.data)||void 0===o?void 0:o.changedby)&&JSON.parse(s[0].data.changedby),O=null==s||null===(c=s[0])||void 0===c?void 0:c.timestamp,N({changedBy:y,timestamp:O}),p&&v?(g=p.filterTabs.map((function(e,r){return{value:e.value,label:e.name,color:f[r]}})),w=[],x=g.reduce((function(e,t){var n=t.value,a=i(v[n].concat(h));return w=w.concat(a),d(d({},e),{},r({},n,a))}),{}),x=d(d({},x),{},r({},m,i(w))),j([{value:m,label:b}].concat(e(g))),k(x)):(j([{value:m,label:b}]),k(r({},m,[h]))),t.next=22;break;case 17:t.prev=17,t.t1=t.catch(0),console.error("offetwell selection fetch error: ",t.t1),j([]),k([]);case 22:case"end":return t.stop()}}),t,null,[[0,17]])}))),function(){return n.apply(this,arguments)}),y=(o=t(a.mark((function e(){var t,n,o,c,l;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p(h);case 3:t=e.sent,n=s(t[0],"data.offset_wells")||[],o=r({},m,i(n.map((function(e){return e.id})).concat(h))),c=s(t[0],"data.changedby"),l=t[0].timestamp,N({changedBy:c,timestamp:l}),j([{value:m,label:b}]),k(o),e.next=18;break;case 13:e.prev=13,e.t0=e.catch(0),console.error("wellhub fetch error: ",e.t0),j([]),k([]);case 18:case"end":return e.stop()}}),e,null,[[0,13]])}))),function(){return o.apply(this,arguments)});h?v?c():y():(j([]),k([]))}),[v,h]),[g,P,J]};export{h as useBicWells};
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as n}from"react";import{orderBy as o,isEmpty as i}from"lodash";import{SortDirection as c}from"react-virtualized";import{ColumnType as u}from"../constants.js";function f(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function a(r,f,a,l,s){var m=t(u.distance),b=e(m,2),d=b[0],O=b[1],y=t(c.ASC),j=e(y,2),h=j[0],P=j[1],v=t(null),g=e(v,2),w=g[0],D=g[1];return n((function(){if(f&&!s){var e=a.map((function(r){return r.id})),t=a.filter((function(e){return e.id!==(null==r?void 0:r.id)})),n=f.filter((function(r){return!e.includes(r.id)})),c=o(n,[function(r){return r[d]}],[h.toLowerCase()]),u=(i(r)?[]:[r]).concat(t).concat(c).map((function(r){return a.find((function(e){return e.id===r.id}))?p(p({},r),{},{checked:!0}):p(p({},r),{},{checked:!1})}));D(u),l(!1)}}),[f,d,h,r,a,s]),[d,O,h,P,w]}export{a as useSortedWells};
1
+ import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as n}from"react";import{orderBy as o,isEmpty as i}from"lodash";import{SortDirection as c}from"react-virtualized";import{ColumnType as u}from"../constants.js";function f(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function a(r,f,a,s,l){var d=t(u.distance),m=e(d,2),b=m[0],O=m[1],y=t(c.ASC),j=e(y,2),h=j[0],P=j[1],v=t(null),g=e(v,2),w=g[0],D=g[1];return n((function(){if(f&&!l){var e=a.map((function(r){return r.id})),t=a.filter((function(e){return e.id!==(null==r?void 0:r.id)})),n=o(t,"distance","asc"),c=f.filter((function(r){return!e.includes(r.id)})),u=o(c,[function(r){return r[b]}],[h.toLowerCase()]),d=(i(r)?[]:[r]).concat(n).concat(u).map((function(r){return a.find((function(e){return e.id===r.id}))?p(p({},r),{},{checked:!0}):p(p({},r),{},{checked:!1})}));D(d),s(!1)}}),[f,b,h,r,a,l]),[b,O,h,P,w]}export{a as useSortedWells};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import n from"prop-types";import{useState as r,useEffect as i}from"react";import{TextField as t,InputAdornment as s}from"@material-ui/core";import l from"classnames";import{noop as a}from"lodash";import m from"../FilePreview/index.js";import p from"../FailedFileUploading.js";import u from"../UserMention/index.js";import d from"../FileUploadIconButton.js";import c from"../EmojiIconButton.js";import f from"./PostInput.css.js";import{jsxs as g,jsx as h}from"react/jsx-runtime";var v=function(n){var a=n.className,v=n.userCompanyId,w=n.onChange,y=n.onKeyDown,b=n.initialValue,C=n.filePreviewWrapperClass,P=n.smallerView,F=n.suggestionsPortalHost,j=n.allowSuggestionsAboveCursor,A=r(b.body),I=o(A,2),N=I[0],T=I[1],x=r(b.attachment),S=o(x,2),D=S[0],U=S[1],V=r(null),H=o(V,2),K=H[0],E=H[1];return i((function(){w({body:N,attachment:D})}),[N,D]),g("div",{className:l(f.input,a),children:[h(t,{className:l(f.inputTextField,e({},f.inputTextFieldSmaller,P)),placeholder:"Add Comment...",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:u,inputProps:{onChange:T,value:N,withLightTheme:!1,companyId:v,autoFocus:!0,className:f.inputInput,placeholder:"Type here...",suggestionsPortalHost:F,allowSuggestionsAboveCursor:j},endAdornment:g(s,{position:"end",className:l(f.inputAdornment,e({},f.inputAdornmentSmaller,P)),children:[!D&&h("div",{children:h(d,{openPreviewDialogOnUpload:!1,onFinish:function(e,o,n){U({url:e,name:o,size:n})},onError:E})}),h("div",{children:h(c,{handleSelectEmoji:function(e){return T((function(o){return"".concat(o).concat(e.native)}))}})})]}),disableUnderline:!0,classes:{}},onKeyDown:y}),D&&h(m,{fileName:D.name,fileUrl:D.url,handleFileDelete:function(){return U(null)},classes:{wrapper:C}}),K&&h(p,{errorMessage:K})]})};v.propTypes={userCompanyId:n.oneOfType([n.string,n.number]).isRequired,className:n.string,onKeyDown:n.func,onChange:n.func,initialValue:n.shape({body:n.string,attachment:n.shape({})}),filePreviewWrapperClass:n.string,suggestionsPortalHost:n.node,allowSuggestionsAboveCursor:n.bool,smallerView:n.bool},v.defaultProps={className:null,initialValue:{body:"",attachment:null},filePreviewWrapperClass:null,onKeyDown:a,onChange:a,smallerView:!1,suggestionsPortalHost:void 0,allowSuggestionsAboveCursor:!1};export{v as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import n from"prop-types";import{useState as r,useEffect as t}from"react";import{TextField as i,InputAdornment as s}from"@material-ui/core";import a from"classnames";import{noop as l}from"lodash";import m from"../FilePreview/index.js";import p from"../FailedFileUploading.js";import u from"../UserMention/index.js";import d from"../FileUploadIconButton.js";import c from"../EmojiIconButton.js";import f from"./PostInput.css.js";import{jsxs as g,jsx as h}from"react/jsx-runtime";var v=function(n){var l=n.className,v=n.userCompanyId,w=n.onChange,y=n.onKeyDown,P=n.initialValue,b=n.filePreviewWrapperClass,C=n.smallerView,j=n.suggestionsPortalHost,F=n.allowSuggestionsAboveCursor,I=r(P.body),A=o(I,2),N=A[0],T=A[1],x=r(P.attachment),S=o(x,2),D=S[0],U=S[1],V=r(null),H=o(V,2),K=H[0],E=H[1];return t((function(){w({body:N,attachment:D})}),[N,D]),g("div",{className:a(f.input,l),children:[h(i,{"data-testid":"".concat("PostInput","_input"),className:a(f.inputTextField,e({},f.inputTextFieldSmaller,C)),placeholder:"Add Comment...",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:u,inputProps:{onChange:T,value:N,withLightTheme:!1,companyId:v,autoFocus:!0,className:f.inputInput,placeholder:"Type here...",suggestionsPortalHost:j,allowSuggestionsAboveCursor:F},endAdornment:g(s,{position:"end",className:a(f.inputAdornment,e({},f.inputAdornmentSmaller,C)),children:[!D&&h("div",{children:h(d,{openPreviewDialogOnUpload:!1,onFinish:function(e,o,n){U({url:e,name:o,size:n})},onError:E})}),h("div",{children:h(c,{"data-testid":"".concat("PostInput","_emoji"),handleSelectEmoji:function(e){return T((function(o){return"".concat(o).concat(e.native)}))}})})]}),disableUnderline:!0,classes:{}},onKeyDown:y}),D&&h(m,{fileName:D.name,fileUrl:D.url,handleFileDelete:function(){return U(null)},classes:{wrapper:b}}),K&&h(p,{errorMessage:K})]})};v.propTypes={userCompanyId:n.oneOfType([n.string,n.number]).isRequired,className:n.string,onKeyDown:n.func,onChange:n.func,initialValue:n.shape({body:n.string,attachment:n.shape({})}),filePreviewWrapperClass:n.string,suggestionsPortalHost:n.node,allowSuggestionsAboveCursor:n.bool,smallerView:n.bool},v.defaultProps={className:null,initialValue:{body:"",attachment:null},filePreviewWrapperClass:null,onKeyDown:l,onChange:l,smallerView:!1,suggestionsPortalHost:void 0,allowSuggestionsAboveCursor:!1};export{v as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.46.0-0",
3
+ "version": "0.46.0-1",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"