@corva/ui 0.46.0-0 → 0.46.0-10

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 (42) hide show
  1. package/components/AddComment/Popover.js +1 -1
  2. package/components/CommentInput/index.js +1 -1
  3. package/components/DevCenter/AppHeader/AppHeader.js +1 -1
  4. package/components/DevCenter/AppHeader/AppHeaderStyles.js +1 -1
  5. package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
  6. package/components/DevCenter/AppsDataProvider/effects/dataResolvers.js +1 -1
  7. package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
  8. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  9. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
  10. package/components/EmojiIconButton.js +1 -1
  11. package/components/EmptyView/EmptyAppView/EmptyAppView.js +1 -1
  12. package/components/FeedItem/components/RigAndWell.js +1 -1
  13. package/components/FeedItem/feedItemTypes/DvDCommentFeedItem.js +1 -1
  14. package/components/OffsetWellButton/OffsetWellButton.js +1 -1
  15. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  16. package/components/OffsetWellPickerV4/OffsetWellPickerV4.module.css.js +1 -1
  17. package/components/OffsetWellPickerV4/components/AppHeader/AppHeader.js +1 -0
  18. package/components/OffsetWellPickerV4/components/AppHeader/AppHeader.module.css.js +1 -0
  19. package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  20. package/components/OffsetWellPickerV4/components/Filter/MultiSelect.js +1 -1
  21. package/components/OffsetWellPickerV4/components/Filter/PeriodSelect.js +1 -1
  22. package/components/OffsetWellPickerV4/components/Filter/RadiusInput.js +1 -1
  23. package/components/OffsetWellPickerV4/components/Filter/SingleSelect.js +1 -1
  24. package/components/OffsetWellPickerV4/components/Map/MapView.js +1 -1
  25. package/components/OffsetWellPickerV4/components/Map/MapView.module.css.js +1 -1
  26. package/components/OffsetWellPickerV4/components/Map/WellTooltip.js +1 -1
  27. package/components/OffsetWellPickerV4/components/Map/WellTooltip.module.css.js +1 -1
  28. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js +1 -1
  29. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AssetResultSection.js +1 -1
  30. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  31. package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSelect.js +1 -1
  32. package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  33. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  34. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.module.css.js +1 -1
  35. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js +1 -1
  36. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
  37. package/components/OffsetWellPickerV4/constants.js +1 -1
  38. package/components/OffsetWellPickerV4/effects/useSortedWells.js +1 -1
  39. package/components/OffsetWellPickerV4/utils/apiCalls.js +1 -1
  40. package/components/PostInput/PostInput.js +1 -1
  41. package/config/theme/tableOverrides.js +1 -1
  42. package/package.json +1 -1
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{memo as r,useRef as i,useMemo as o,useEffect as s,useCallback as n}from"react";import p from"classnames";import a from"prop-types";import{Table as l,TableHead as m,TableBody as d,TableRow as c,TableCell as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as j,jsxs as C,Fragment as f}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"../../../../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"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"../../../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{AdvancedSearch as h}from"./AdvancedSearch/AdvancedSearch.js";import v from"./OffsetWellsTableHead.js";import D from"./OffsetWellsTableRow.js";import{METRICS_LIST as b,EXPANED_WELLNAME_WIDTH as S,TableColumns as g,ROW_HEIGHT as y}from"../../constants.js";import x from"./OffsetWellsTable.module.css.js";import{getIsImperial as I}from"../../utils/unitSystem.js";var P=function(r){var a=r.open,P=r.isTableLoading,T=r.companyId,W=r.subjectWellId,E=r.sortBy,w=r.setSortBy,R=r.sortDirection,B=r.setSortDirection,L=r.columnsWithDict,O=r.wells,k=r.metricsKeys,q=r.setMetricsKeys,V=r.handleChanageOffsetWell,F=r.handleChangeAllOffsetWells,N=r.handleAddRemoveAssets,M=r.isWellNameExpand,H=r.setIsWellNameExpand,K=r.isHscrollMoved,z=r.onHideAdvancedSearch,U=r.isViewOnly,G=r.isLastWell,J=r.contentRef,Q=r.isLimitedOffsetwells,X=r.tableTop,Y=r.wellSections,Z=r.setActiveWellId,$=i(),_=i(),ee=o((function(){var e=O.filter((function(e){return e.checked}));return[e,O.length!==e.length&&e.length&&!Q,e.length===O.length||Q]}),[O,Q]),te=t(ee,3),re=te[0],ie=te[1],oe=te[2],se=o((function(){return I()}),[]),ne=o((function(){return(k||[]).reduce((function(e,t){return e.concat(b.filter((function(e){return e.key===t})))}),[])}),[k]),pe=o((function(){return M?S-58:g[0].width[k.length]-58}),[M,null==k?void 0:k.length]),ae=o((function(){return re.length*y}),[re]);s((function(){var e=$.current.querySelector(".".concat(x.wellNameFixed));K?e.classList.remove(x.noShadow):e.classList.add(x.noShadow);var t=_.current.querySelectorAll(".".concat(x.wellNameFixed));K?t.forEach((function(e){return e.classList.remove(x.noShadow)})):t.forEach((function(e){return e.classList.add(x.noShadow)}))}),[K,_.current,$.current,O]);var le=n((function(e,t){w(e),B(t)}),[]),me=n((function(e){q(e)}),[]),de=n((function(e,t){q((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return P?j(A,{fullscreen:!1}):L&&O?C(f,{children:[j("div",{className:x.stickyTable,children:C(l,{"aria-label":"ows table head",innerRef:$,children:[j(m,{children:j(v,{open:a,columnsWithDict:L,metricsKeys:k,sortBy:E,sortDirection:R,indeterminate:ie,isAllWellsSelected:oe,onChangeSort:le,onChangeMetricsKeys:me,onUpdateMetricsKey:de,isWellNameExpand:M,setIsWellNameExpand:H,handleChangeAllOffsetWells:F,wellNameStyle:x.wellNameFixed,isViewOnly:U,isImperial:se,contentRef:J})}),!U&&j(d,{children:j(c,{children:j(u,{className:x.searchCell,children:j(h,{companyId:T,wells:O,onChange:N,selectedWellIds:re.map((function(e){return e.id})),onHideAdvancedSearch:z})})})})]})}),j(l,{"aria-label":"ows table body",innerRef:_,className:x.bodyTable,children:C(d,{children:[j(c,{children:j(u,{className:p(x.topShadow,e({},x.viewOnlyShadow,U))})}),O.map((function(e){return j(D,{columnsWithDict:L,subjectWellId:W,data:e,metricsKeys:k,metricsColumns:ne,handleChanageOffsetWell:V,isWellNameExpand:M,wellNameStyle:x.wellNameFixed,wellNameWidth:pe,isViewOnly:U,isImperial:se,isLimitedOffsetwells:Q,flyTo:ae,tableTop:X,wellSections:Y,setActiveWellId:Z},e.id)})),!G&&j(c,{children:j(u,{className:x.loadingCell,children:j("span",{children:"Loading..."})})}),j(c,{children:j(u,{className:x.bottomShadow})})]})})]}):null};P.propTypes={open:a.bool.isRequired,isTableLoading:a.bool.isRequired,companyId:a.number.isRequired,subjectWellId:a.number.isRequired,sortBy:a.string.isRequired,setSortBy:a.func.isRequired,sortDirection:a.string.isRequired,setSortDirection:a.func.isRequired,columnsWithDict:a.arrayOf(a.shape({})).isRequired,wells:a.arrayOf(a.shape({})).isRequired,metricsKeys:a.arrayOf(a.string).isRequired,setMetricsKeys:a.func.isRequired,handleChanageOffsetWell:a.func.isRequired,handleChangeAllOffsetWells:a.func.isRequired,handleAddRemoveAssets:a.func.isRequired,setIsWellNameExpand:a.func.isRequired,isWellNameExpand:a.bool.isRequired,isHscrollMoved:a.bool.isRequired,onHideAdvancedSearch:a.func.isRequired,isViewOnly:a.bool.isRequired,isLastWell:a.bool.isRequired,isLimitedOffsetwells:a.bool.isRequired,contentRef:a.shape().isRequired,tableTop:a.number.isRequired,wellSections:a.arrayOf(a.shape({})).isRequired,setActiveWellId:a.func.isRequired};var T=r(P);export{T as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{memo as r,useRef as i,useMemo as o,useEffect as s,useCallback as n}from"react";import p from"classnames";import a from"prop-types";import{Table as l,TableHead as m,TableBody as d,TableRow as c,TableCell as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as j,jsxs as C,Fragment as f}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"../../../../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"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"../../../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{AdvancedSearch as h}from"./AdvancedSearch/AdvancedSearch.js";import v from"./OffsetWellsTableHead.js";import b from"./OffsetWellsTableRow.js";import{METRICS_LIST as D,EXPANED_WELLNAME_WIDTH as S,TableColumns as g,ROW_HEIGHT as y}from"../../constants.js";import x from"./OffsetWellsTable.module.css.js";import{getIsImperial as I}from"../../utils/unitSystem.js";var P=function(r){var a=r.open,P=r.isTableLoading,T=r.companyId,W=r.subjectWellId,E=r.sortBy,w=r.setSortBy,R=r.sortDirection,B=r.setSortDirection,L=r.columnsWithDict,O=r.wells,k=r.metricsKeys,q=r.setMetricsKeys,V=r.handleChanageOffsetWell,F=r.handleChangeAllOffsetWells,N=r.handleAddRemoveAssets,M=r.isWellNameExpand,H=r.setIsWellNameExpand,K=r.isHscrollMoved,z=r.onHideAdvancedSearch,U=r.isViewOnly,G=r.isLastWell,J=r.contentRef,Q=r.isLimitedOffsetwells,X=r.tableTop,Y=r.wellSections,Z=r.setActiveWellId,$=i(),_=i(),ee=o((function(){var e=O.filter((function(e){return e.checked}));return[e,O.length!==e.length&&e.length&&!Q,e.length===O.length||Q]}),[O,Q]),te=t(ee,3),re=te[0],ie=te[1],oe=te[2],se=o((function(){return I()}),[]),ne=o((function(){return(k||[]).reduce((function(e,t){return e.concat(D.filter((function(e){return e.key===t})))}),[])}),[k]),pe=o((function(){return M?S-58:g[0].width[k.length]-58}),[M,null==k?void 0:k.length]),ae=o((function(){return re.length*y}),[re]);s((function(){var e=$.current.querySelector(".".concat(x.wellNameFixed));K?e.classList.remove(x.noShadow):e.classList.add(x.noShadow);var t=_.current.querySelectorAll(".".concat(x.wellNameFixed));K?t.forEach((function(e){return e.classList.remove(x.noShadow)})):t.forEach((function(e){return e.classList.add(x.noShadow)}))}),[K,_.current,$.current,O]);var le=n((function(e,t){w(e),B(t)}),[]),me=n((function(e){q(e)}),[]),de=n((function(e,t){q((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return P?j(A,{fullscreen:!1}):L&&O?C(f,{children:[j("div",{className:x.stickyTable,children:C(l,{"aria-label":"ows table head",innerRef:$,children:[j(m,{children:j(v,{open:a,columnsWithDict:L,metricsKeys:k,sortBy:E,sortDirection:R,indeterminate:ie,isAllWellsSelected:oe,onChangeSort:le,onChangeMetricsKeys:me,onUpdateMetricsKey:de,isWellNameExpand:M,setIsWellNameExpand:H,handleChangeAllOffsetWells:F,wellNameStyle:x.wellNameFixed,isViewOnly:U,isImperial:se,contentRef:J})}),!U&&j(d,{children:j(c,{children:j(u,{className:x.searchCell,children:j(h,{companyId:T,subjectWellId:W,wells:O,onChange:N,selectedWellIds:re.map((function(e){return e.id})),onHideAdvancedSearch:z})})})})]})}),j(l,{"aria-label":"ows table body",innerRef:_,className:x.bodyTable,children:C(d,{children:[j(c,{children:j(u,{className:p(x.topShadow,e({},x.viewOnlyShadow,U))})}),O.map((function(e){return j(b,{columnsWithDict:L,subjectWellId:W,data:e,metricsKeys:k,metricsColumns:ne,handleChanageOffsetWell:V,isWellNameExpand:M,wellNameStyle:x.wellNameFixed,wellNameWidth:pe,isViewOnly:U,isImperial:se,isLimitedOffsetwells:Q,flyTo:ae,tableTop:X,wellSections:Y,setActiveWellId:Z},e.id)})),!G&&j(c,{children:j(u,{className:x.loadingCell,children:j("span",{children:"Loading..."})})}),j(c,{children:j(u,{className:x.bottomShadow})})]})})]}):null};P.propTypes={open:a.bool.isRequired,isTableLoading:a.bool.isRequired,companyId:a.number.isRequired,subjectWellId:a.number.isRequired,sortBy:a.string.isRequired,setSortBy:a.func.isRequired,sortDirection:a.string.isRequired,setSortDirection:a.func.isRequired,columnsWithDict:a.arrayOf(a.shape({})).isRequired,wells:a.arrayOf(a.shape({})).isRequired,metricsKeys:a.arrayOf(a.string).isRequired,setMetricsKeys:a.func.isRequired,handleChanageOffsetWell:a.func.isRequired,handleChangeAllOffsetWells:a.func.isRequired,handleAddRemoveAssets:a.func.isRequired,setIsWellNameExpand:a.func.isRequired,isWellNameExpand:a.bool.isRequired,isHscrollMoved:a.bool.isRequired,onHideAdvancedSearch:a.func.isRequired,isViewOnly:a.bool.isRequired,isLastWell:a.bool.isRequired,isLimitedOffsetwells:a.bool.isRequired,contentRef:a.shape().isRequired,tableTop:a.number.isRequired,wellSections:a.arrayOf(a.shape({})).isRequired,setActiveWellId:a.func.isRequired};var T=r(P);export{T as default};
@@ -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{sortBy as t}from"lodash";import"../../utils/index.js";import*as a from"../../utils/metrics/metricsConfig.js";var l="all",i="All",r=450,o=50,s=60,n=a,p={status:"status",rig:"rigName",program:"programName",basin:"basin",county:"county",area:"area",formation:"formation",stringDesign:"stringDesign",radius:"radius",period:"period",sideTracks:"sideTracks",timeRangeFrom:"timeRangeFrom",timeRangeTo:"timeRangeTo"},_=[{value:p.rig,label:"Rig"},{value:p.program,label:"Program"},{value:p.basin,label:"Basin"},{value:p.county,label:"County"},{value:p.area,label:"Area"},{value:p.formation,label:"Target Formation"},{value:p.stringDesign,label:"String Design"}],c={unknown:"unknown",idle:"idle",active:"active",paused:"paused",complete:"complete"},d=[{value:c.unknown,color:"#9E9E9E"},{value:c.idle,color:"#BDBDBD"},{value:c.active,color:"#95F126"},{value:c.paused,color:"#FFF350"},{value:c.complete,color:"#2196F3"}],u={name:"name",status:"status",rig:"rigName",distance:"distance",lastActive:"lastActive",metrics:"metrics",wellSection:"wellSection"},m=[{type:u.name,label:"Well Name",key:u.name,width:[280,197,197,186]},{type:u.status,label:"",key:u.status,width:[40,40,40,30]},{type:u.rig,label:"Rig",key:u.rig,width:[220,140,140,93]},{type:u.distance,label:"Distance",key:u.distance,width:[160,160,122,93]},{type:u.lastActive,label:"Last Active",key:u.lastActive,width:[140,140,108,98]},{type:u.metrics,label:"",key:"",width:[0,212,141,141]},{type:u.wellSection,label:"Well Section",key:u.wellSection,width:[180,131,131,97]}],g=[{value:"all",label:"All"},{value:"last12h",label:"Last 12 hrs"},{value:"last24h",label:"Last 24 hrs"},{value:"last7d",label:"Last 7 days"},{value:"lastMonth",label:"Last Month"},{value:"custom",label:"Сustom"}],v=3,b=t([n.weight_to_weight_average,n.bottom_to_slips_average,n.drilling_connection_average,n.slips_to_bottom_average,n.hole_depth,n.hole_depth_change,n.drilled_feet_rotary,n.drilled_feet_slide,n.rop_gross,n.rop,n.rop_rotary,n.rop_slide,n.drilled_feet_rotary_percentage,n.drilled_feet_slide_percentage,n.on_bottom_percentage,n.on_bottom_time,n.cost_per_ft,n.cost_per_lat_ft,n.feet_per_day,n.tripping_in_speed_cased,n.tripping_in_speed_open,n.tripping_in_speed,n.tripping_out_speed_cased,n.tripping_out_speed_open,n.tripping_out_speed].concat(e("production"!==process.env.REACT_APP_ENVIRONMENT?[n.npt,n.circulating_time,n.spud_to_rig_release_time,n.spud_to_total_depth_time]:[])),"label"),y=b.map((function(e){return e.key})),h=["#6EACFF","#69B919","#E95DAF","#A77DFF","#77FFC1","#018EFE","#FF5D7E","#B9E310","#FFD111","#24BB8E","#C426F3"];export{l as ALL_SECTION_KEY,i as ALL_SECTION_LABEL,u as ColumnType,r as EXPANED_WELLNAME_WIDTH,_ as FilterOptions,p as FilterType,v as MAX_METRICS_COUNT,y as METRICS_KEYS,b as METRICS_LIST,g as OBJECTIVE_PERIOD_LIST,o as ROWS_PER_PAGE,s as ROW_HEIGHT,d as StatusOptions,m as TableColumns,h as WellSectionColors,c as WellStatus};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import{sortBy as t}from"lodash";import"../../utils/index.js";import*as a from"../../utils/metrics/metricsConfig.js";var l=800,i={normal:"normal",small:"small screen",tablet:"tablet",mobile:"mobile"},o=50,r="all",s="All",n=450,p=50,_=60,m=a,c={status:"status",rig:"rigName",program:"programName",basin:"basin",county:"county",area:"area",formation:"formation",stringDesign:"stringDesign",radius:"radius",period:"period",sideTracks:"sideTracks",timeRangeFrom:"timeRangeFrom",timeRangeTo:"timeRangeTo"},d=[{value:c.rig,label:"Rig"},{value:c.program,label:"Program"},{value:c.basin,label:"Basin"},{value:c.county,label:"County"},{value:c.area,label:"Area"},{value:c.formation,label:"Target Formation"},{value:c.stringDesign,label:"String Design"}],u={unknown:"unknown",idle:"idle",active:"active",paused:"paused",complete:"complete"},g=[{value:u.unknown,color:"#9E9E9E"},{value:u.idle,color:"#BDBDBD"},{value:u.active,color:"#95F126"},{value:u.paused,color:"#FFF350"},{value:u.complete,color:"#2196F3"}],b={name:"name",status:"status",rig:"rigName",distance:"distance",lastActive:"lastActive",metrics:"metrics",wellSection:"wellSection"},v=[{type:b.name,label:"Well Name",key:b.name,width:[280,197,197,186]},{type:b.status,label:"",key:b.status,width:[40,40,40,30]},{type:b.rig,label:"Rig",key:b.rig,width:[220,140,140,93]},{type:b.distance,label:"Distance",key:b.distance,width:[160,160,122,93]},{type:b.lastActive,label:"Last Active",key:b.lastActive,width:[140,140,108,98]},{type:b.metrics,label:"",key:"",width:[0,212,141,141]},{type:b.wellSection,label:"Well Section",key:b.wellSection,width:[180,131,131,97]}],y=[{value:"all",label:"All"},{value:"last12h",label:"Last 12 hrs"},{value:"last24h",label:"Last 24 hrs"},{value:"last7d",label:"Last 7 days"},{value:"lastMonth",label:"Last Month"},{value:"custom",label:"Сustom"}],h=3,F=t([m.weight_to_weight_average,m.bottom_to_slips_average,m.drilling_connection_average,m.slips_to_bottom_average,m.hole_depth,m.hole_depth_change,m.drilled_feet_rotary,m.drilled_feet_slide,m.rop_gross,m.rop,m.rop_rotary,m.rop_slide,m.drilled_feet_rotary_percentage,m.drilled_feet_slide_percentage,m.on_bottom_percentage,m.on_bottom_time,m.cost_per_ft,m.cost_per_lat_ft,m.feet_per_day,m.tripping_in_speed_cased,m.tripping_in_speed_open,m.tripping_in_speed,m.tripping_out_speed_cased,m.tripping_out_speed_open,m.tripping_out_speed].concat(e("production"!==process.env.REACT_APP_ENVIRONMENT?[m.npt,m.circulating_time,m.spud_to_rig_release_time,m.spud_to_total_depth_time]:[])),"label"),w=F.map((function(e){return e.key})),f=["#6EACFF","#69B919","#E95DAF","#A77DFF","#77FFC1","#018EFE","#FF5D7E","#B9E310","#FFD111","#24BB8E","#C426F3"];export{r as ALL_SECTION_KEY,s as ALL_SECTION_LABEL,b as ColumnType,n as EXPANED_WELLNAME_WIDTH,d as FilterOptions,c as FilterType,h as MAX_METRICS_COUNT,o as MAX_OFFSET_SIZE,w as METRICS_KEYS,F as METRICS_LIST,y as OBJECTIVE_PERIOD_LIST,p as ROWS_PER_PAGE,_ as ROW_HEIGHT,l as SMALL_SCREEN_HEIGHT,g as StatusOptions,v as TableColumns,i as ViewType,f as WellSectionColors,u as WellStatus};
@@ -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 t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import a from"jsona";import{range as s,get as i,concat as u}from"lodash";import{getAppStorage as o,getAssets as c,getCompanyGoals as p,getWells as l,getRigs as f}from"../../../clients/jsonApi/index.js";import{METRICS_KEYS as b,ROWS_PER_PAGE as m}from"../constants.js";function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?d(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=new a;function h(t,e){return g.apply(this,arguments)}function g(){return(g=r(n.mark((function t(e,r){var a,s,u;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=null,t.prev=1,t.next=4,c({types:["well"],company_id:e?+e:void 0,fields:["asset.name","asset.parent_asset_id","asset.parent_asset_name","asset.status","asset.stats","asset.target_formation","asset.string_design","asset.root_asset_name","asset.basin","asset.county","asset.area","asset.visibility","asset.top_hole","asset.settings","well.settings","asset.last_active_at"],per_page:1e4,sort:"name"});case 4:a=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:if(s=a?a.data.map((function(t){return{id:Number(t.id),name:i(t,"attributes.name"),status:i(t,"attributes.status"),rigId:i(t,"attributes.parent_asset_id")||"Null",rigName:i(t,"attributes.parent_asset_name")||"Null",formation:i(t,"attributes.target_formation")||"Null",stringDesign:i(t,"attributes.string_design")||"Null",programName:i(t,"attributes.root_asset_name")||"Null",basin:i(t,"attributes.basin")||"Null",county:i(t,"attributes.county")||"Null",area:i(t,"attributes.area")||"Null",visibility:i(t,"attributes.visibility"),topHole:i(t,"attributes.top_hole"),rigReleaseDate:i(t,"attributes.stats.well_end"),totalDepth:i(t,"attributes.stats.total_depth"),is_usable:!0,apiNumber:i(t,"attributes.settings.api_number","-"),lastActive:new Date(i(t,"attributes.last_active_at")).getTime()/1e3}})).filter((function(t){return"visible"===t.visibility})):[],"function"!=typeof r){t.next=16;break}return t.next=14,r(s);case 14:return u=t.sent,t.abrupt("return",u);case 16:return t.abrupt("return",s);case 17:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function _(t){return w.apply(this,arguments)}function w(){return(w=r(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("corva","data.offset-wells.bic",e,{limit:1,sort:"{timestamp: -1}"}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t){return k.apply(this,arguments)}function k(){return(k=r(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=null,t.prev=1,t.next=4,o("corva","data.offset_wells",e,{limit:1});case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:return t.abrupt("return",r||[]);case 11:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function O(t){return N.apply(this,arguments)}function N(){return(N=r(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,p(e);case 3:r=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0);case 9:return t.abrupt("return",r&&i(r,"company_goals")||{});case 10:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}function j(t,e){return P.apply(this,arguments)}function P(){return P=r(n.mark((function t(a,i){var u,c,p;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==i.length){t.next=2;break}return t.abrupt("return",[]);case 2:return u=Math.floor(i.length/200)+1,t.next=5,Promise.all(s(u).map(function(){var t=r(n.mark((function t(e,r){var s,u,c,p;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company_id:a,"data.asset_id":{$in:i.slice(200*r,200*(r+1))},"data.key":{$in:b},"data.type":"asset"},u={_id:0,"data.key":1,"data.value":1,asset_id:"$data.asset_id"},c={aggregate:JSON.stringify([{$match:s},{$project:u}])},p=null,t.prev=4,t.next=7,o("corva","metrics",null,c);case 7:p=t.sent,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(4),console.error(t.t0);case 13:return t.abrupt("return",p||[]);case 14:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e,r){return t.apply(this,arguments)}}()));case 5:return c=t.sent,p=[],c.forEach((function(t){return p.push.apply(p,e(t))})),t.abrupt("return",p);case 9:case"end":return t.stop()}}),t)}))),P.apply(this,arguments)}function D(t,e,r){return A.apply(this,arguments)}function A(){return(A=r(n.mark((function t(e,r,a){var s,i,u;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company:a,search:e,per_page:m,page:r,fields:["well.name","well.asset_id","well.settings","well.status","well.rigName","well.visibility"],sort:"name"},t.prev=2,t.next=5,l(s);case 5:i=t.sent,t.next=12;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0),i=[];case 12:return u=y.deserialize(i),t.abrupt("return",u.map((function(t){return{redirectAssetId:t.asset_id,apiNumber:t.settings.api_number,name:t.name,asset_id:t.asset_id,status:t.status,rigName:t.rigName,visibility:t.visibility,type:"well"}})));case 14:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function $(t,e,r){return E.apply(this,arguments)}function E(){return(E=r(n.mark((function t(e,r,a){var s,u,o;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company:a,search:e,per_page:m,page:r,fields:["rig.name","rig.active_well","rig.asset_id"],sort:"name"},t.prev=2,t.next=5,f(s);case 5:u=t.sent,t.next=12;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0),u=[];case 12:return o=y.deserialize(u),t.abrupt("return",o.map((function(t){return v({redirectAssetId:i(t,["active_well","asset_id"])||null},t)})));case 14:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function I(t,e){return S.apply(this,arguments)}function S(){return S=r(n.mark((function t(r,a){var s,i,o,c,p,l=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=l.length>2&&void 0!==l[2]?l[2]:1,i=l.length>3?l[3]:void 0,"well"!==a){t.next=7;break}return t.next=5,D(r,s,i);case 5:return o=t.sent,t.abrupt("return",o);case 7:if("rig"!==a){t.next=12;break}return t.next=10,$(r,s,i);case 10:return c=t.sent,t.abrupt("return",c);case 12:return t.next=14,Promise.all([D(r,s,i),$(r,s,i)]);case 14:return p=t.sent,t.abrupt("return",u.apply(void 0,e(p)));case 16:case"end":return t.stop()}}),t)}))),S.apply(this,arguments)}export{I as fetchAllAssets,O as fetchCompanyGoals,j as fetchMetricsData,_ as fetchOffsetWellSelections,x as fetchWellhubWells,h as fetchWells};
1
+ import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import a from"jsona";import{range as s,get as i,concat as u}from"lodash";import{getAppStorage as c,getAssets as o,getCompanyGoals as p,getWells as l,getRigs as f}from"../../../clients/jsonApi/index.js";import{METRICS_KEYS as b,ROWS_PER_PAGE as m}from"../constants.js";function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?d(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=new a;function h(t,e){return g.apply(this,arguments)}function g(){return(g=r(n.mark((function t(e,r){var a,s,u;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=null,t.prev=1,t.next=4,o({types:["well"],company_id:e?+e:void 0,fields:["asset.name","asset.parent_asset_id","asset.parent_asset_name","asset.status","asset.stats","asset.target_formation","asset.string_design","asset.root_asset_name","asset.basin","asset.county","asset.area","asset.visibility","asset.top_hole","asset.settings","well.settings","asset.last_active_at"],per_page:1e4,sort:"name"});case 4:a=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:if(s=a?a.data.map((function(t){return{id:Number(t.id),name:i(t,"attributes.name"),status:i(t,"attributes.status"),rigId:i(t,"attributes.parent_asset_id")||"Null",rigName:i(t,"attributes.parent_asset_name")||"Null",formation:i(t,"attributes.target_formation")||"Null",stringDesign:i(t,"attributes.string_design")||"Null",programName:i(t,"attributes.root_asset_name")||"Null",basin:i(t,"attributes.basin")||"Null",county:i(t,"attributes.county")||"Null",area:i(t,"attributes.area")||"Null",visibility:i(t,"attributes.visibility"),topHole:i(t,"attributes.top_hole"),rigReleaseDate:i(t,"attributes.stats.well_end"),totalDepth:i(t,"attributes.stats.total_depth"),is_usable:!0,apiNumber:i(t,"attributes.settings.api_number","-"),lastActive:new Date(i(t,"attributes.last_active_at")).getTime()/1e3}})).filter((function(t){return t.visibility.includes("visible")})):[],"function"!=typeof r){t.next=16;break}return t.next=14,r(s);case 14:return u=t.sent,t.abrupt("return",u);case 16:return t.abrupt("return",s);case 17:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function _(t){return w.apply(this,arguments)}function w(){return(w=r(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",c("corva","data.offset-wells.bic",e,{limit:1,sort:"{timestamp: -1}"}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t){return k.apply(this,arguments)}function k(){return(k=r(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=null,t.prev=1,t.next=4,c("corva","data.offset_wells",e,{limit:1});case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:return t.abrupt("return",r||[]);case 11:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function O(t){return N.apply(this,arguments)}function N(){return(N=r(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,p(e);case 3:r=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0);case 9:return t.abrupt("return",r&&i(r,"company_goals")||{});case 10:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}function j(t,e){return P.apply(this,arguments)}function P(){return P=r(n.mark((function t(a,i){var u,o,p;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==i.length){t.next=2;break}return t.abrupt("return",[]);case 2:return u=Math.floor(i.length/200)+1,t.next=5,Promise.all(s(u).map(function(){var t=r(n.mark((function t(e,r){var s,u,o,p;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company_id:a,"data.asset_id":{$in:i.slice(200*r,200*(r+1))},"data.key":{$in:b},"data.type":"asset"},u={_id:0,"data.key":1,"data.value":1,asset_id:"$data.asset_id"},o={aggregate:JSON.stringify([{$match:s},{$project:u}])},p=null,t.prev=4,t.next=7,c("corva","metrics",null,o);case 7:p=t.sent,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(4),console.error(t.t0);case 13:return t.abrupt("return",p||[]);case 14:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e,r){return t.apply(this,arguments)}}()));case 5:return o=t.sent,p=[],o.forEach((function(t){return p.push.apply(p,e(t))})),t.abrupt("return",p);case 9:case"end":return t.stop()}}),t)}))),P.apply(this,arguments)}function D(t,e,r){return A.apply(this,arguments)}function A(){return(A=r(n.mark((function t(e,r,a){var s,i,u;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company:a,search:e,per_page:m,page:r,fields:["well.name","well.asset_id","well.settings","well.status","well.rigName","well.visibility"],sort:"name"},t.prev=2,t.next=5,l(s);case 5:i=t.sent,t.next=12;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0),i=[];case 12:return u=y.deserialize(i),t.abrupt("return",u.map((function(t){return{redirectAssetId:t.asset_id,apiNumber:t.settings.api_number,name:t.name,asset_id:t.asset_id,status:t.status,rigName:t.rigName,visibility:t.visibility,type:"well"}})));case 14:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function $(t,e,r){return E.apply(this,arguments)}function E(){return(E=r(n.mark((function t(e,r,a){var s,u,c;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company:a,search:e,per_page:m,page:r,fields:["rig.name","rig.active_well","rig.asset_id"],sort:"name"},t.prev=2,t.next=5,f(s);case 5:u=t.sent,t.next=12;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0),u=[];case 12:return c=y.deserialize(u),t.abrupt("return",c.map((function(t){return v({redirectAssetId:i(t,["active_well","asset_id"])||null},t)})));case 14:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function I(t,e){return S.apply(this,arguments)}function S(){return S=r(n.mark((function t(r,a){var s,i,c,o,p,l=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=l.length>2&&void 0!==l[2]?l[2]:1,i=l.length>3?l[3]:void 0,"well"!==a){t.next=7;break}return t.next=5,D(r,s,i);case 5:return c=t.sent,t.abrupt("return",c);case 7:if("rig"!==a){t.next=12;break}return t.next=10,$(r,s,i);case 10:return o=t.sent,t.abrupt("return",o);case 12:return t.next=14,Promise.all([D(r,s,i),$(r,s,i)]);case 14:return p=t.sent,t.abrupt("return",u.apply(void 0,e(p)));case 16:case"end":return t.stop()}}),t)}))),S.apply(this,arguments)}export{I as fetchAllAssets,O as fetchCompanyGoals,j as fetchMetricsData,_ as fetchOffsetWellSelections,x as fetchWellhubWells,h as fetchWells};
@@ -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};
@@ -1 +1 @@
1
- import o from"./palette.mjs.js";var e=o.primary,t=o.background,i={MuiTable:{root:{width:"100%"},stickyHeader:{"&:before":{content:"no-open-quote",position:"absolute",width:"inherit",height:"16px",background:"linear-gradient(360deg, rgba(44, 44, 44, 0) 0%, ".concat(o.background.b6," 100%)")}}},MuiTableCell:{root:{borderBottomColor:e.text9,height:56,letterSpacing:"0.4px",lineHeight:"20px",paddingLeft:8,paddingRight:8,"&.dense":{fontSize:14,lineHeight:"14px",height:28}},stickyHeader:{backgroundColor:t.b6},head:{color:e.text7,fontSize:14,lineHeight:"14px","&.MuiTableCell-sizeSmall":{fontSize:12,height:48,lineHeight:"14px"},"&.dense":{fontSize:12,lineHeight:"12px",height:28}},body:{fontSize:16},sizeSmall:{fontSize:14,height:48,lineHeight:"20px",paddingRight:16}},MuiTableRow:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"},"&.Mui-selected, .MuiTableRow-root.Mui-selected:hover":{backgroundColor:"rgba(3, 188, 212, 0.2)"}},head:{borderTop:"1px solid ".concat(e.text9)}},MuiTableSortLabel:{root:{flexDirection:"row",justifyContent:"flex-end","&:hover":{color:o.primary.contrastText,"& .MuiTableSortLabel-icon":{opacity:1,color:o.primary.contrastText},"&.MuiTableSortLabel-active":{color:o.primary.contrastText,"&.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiSvgIcon-root.MuiTableSortLabel-icon":{color:o.primary.contrastText}}},"&.MuiTableSortLabel-active":{color:o.primary.text7,"&.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiSvgIcon-root.MuiTableSortLabel-icon":{color:o.primary.text7}}},icon:{marginRight:0,color:o.primary.text7,fontSize:16}},MuiTablePagination:{toolbar:{paddingTop:10},caption:{fontSize:12},selectRoot:{marginRight:31,marginLeft:3,"& .MuiTablePagination-select":{paddingRight:31,paddingLeft:2}},input:{fontSize:12,position:"relative",top:1},selectIcon:{"&.MuiSvgIcon-root.MuiSelect-icon":{fontSize:16,top:5}},actions:{marginLeft:23,"& .MuiIconButton-root":{color:e.text6,fontSize:16,padding:7,"&:hover":{color:e.contrastText},"&.Mui-disabled":{color:e.text8}}},root:{"& .MuiSvgIcon-root":{color:"inherit",fontSize:"inherit"}}}};export{i as default};
1
+ import o from"./palette.mjs.js";var e=o.primary,t=o.background,i={MuiTableCell:{root:{borderBottomColor:e.text9,height:56,letterSpacing:"0.4px",lineHeight:"20px",paddingLeft:8,paddingRight:8,"&.dense":{fontSize:14,lineHeight:"14px",height:28}},stickyHeader:{backgroundColor:t.b6},head:{color:e.text7,fontSize:14,lineHeight:"14px","&.MuiTableCell-sizeSmall":{fontSize:12,height:48,lineHeight:"14px"},"&.dense":{fontSize:12,lineHeight:"12px",height:28}},body:{fontSize:16},sizeSmall:{fontSize:14,height:48,lineHeight:"20px",paddingRight:16}},MuiTableRow:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"},"&.Mui-selected, .MuiTableRow-root.Mui-selected:hover":{backgroundColor:"rgba(3, 188, 212, 0.2)"}},head:{borderTop:"1px solid ".concat(e.text9)}},MuiTableSortLabel:{root:{flexDirection:"row",justifyContent:"flex-end","&:hover":{color:o.primary.contrastText,"& .MuiTableSortLabel-icon":{opacity:1,color:o.primary.contrastText},"&.MuiTableSortLabel-active":{color:o.primary.contrastText,"&.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiSvgIcon-root.MuiTableSortLabel-icon":{color:o.primary.contrastText}}},"&.MuiTableSortLabel-active":{color:o.primary.text7,"&.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiSvgIcon-root.MuiTableSortLabel-icon":{color:o.primary.text7}}},icon:{marginRight:0,color:o.primary.text7,fontSize:16}},MuiTablePagination:{toolbar:{paddingTop:10},caption:{fontSize:12},selectRoot:{marginRight:31,marginLeft:3,"& .MuiTablePagination-select":{paddingRight:31,paddingLeft:2}},input:{fontSize:12,position:"relative",top:1},selectIcon:{"&.MuiSvgIcon-root.MuiSelect-icon":{fontSize:16,top:5}},actions:{marginLeft:23,"& .MuiIconButton-root":{color:e.text6,fontSize:16,padding:7,"&:hover":{color:e.contrastText},"&.Mui-disabled":{color:e.text8}}},root:{"& .MuiSvgIcon-root":{color:"inherit",fontSize:"inherit"}}}};export{i 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-10",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"