@corva/ui 0.47.0-0 → 0.47.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AddComment/Popover.js +1 -1
- package/components/AddComment/components/Content.js +1 -1
- package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
- package/components/AppVersionsSelect/AppVersionsSelect.js +1 -1
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/Breadcrumbs/index.js +1 -1
- package/components/Casing/CasingTableV2/CasingTableV2.css.js +1 -1
- package/components/Casing/CasingTableV2/CasingTableV2.js +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/components/Chart/components/ChartButton.js +1 -0
- package/components/Chart/components/ChartButtons.js +1 -0
- package/components/Chart/components/ChartWrapper.js +1 -0
- package/components/Chart/constants.js +1 -0
- package/components/Chart/effects/useKeyboardControl.js +1 -0
- package/components/Chart/effects/useZoom.js +1 -0
- package/components/Chart/utils.js +1 -0
- package/components/CollapsableSidebar.js +1 -1
- package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
- package/components/DocumentViewer/DocumentViewer.js +1 -1
- package/components/Drillstring/BHAComponentsTable/BHAComponentsTable.js +1 -1
- package/components/Drillstring/BHAComponentsTable/BhaComponentsTable.css.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/components/FeedItem/FeedItem.js +1 -1
- package/components/FeedItem/components/FeedComments.js +1 -1
- package/components/FilesLoader/FilesLoader.js +1 -1
- package/components/ImageViewer/index.js +1 -1
- package/components/Modal/Modal.js +1 -1
- package/components/OffsetWellButton/OffsetWellButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSelect.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js +1 -1
- package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
- package/components/OffsetWellPickerV4/effects/useSortedWells.js +1 -1
- package/components/PinnableFilters/components/FiltersToggler.js +1 -1
- package/components/Popover/Popover.js +1 -1
- package/components/Popper/Popper.js +1 -1
- package/components/TextLink/index.js +1 -1
- package/components/index.js +1 -1
- package/config/theme/accordionOverrides.js +1 -1
- package/effects/useDelayedDcFullscreenElemOpen.js +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/helpers/objectWithoutProperties";import{useMemo as r,useRef as i,useState as n,useEffect as s,useContext as p,useCallback as a}from"react";import m from"classnames";import{withRouter as l}from"react-router";import{noop as d}from"lodash";import c from"prop-types";import u from"../AppContext.js";import j from"../../../permissions/PermissionsContext.js";import"../../../permissions/constants/index.js";import"../../../permissions/withPermissionsHOC.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../clients/jsonApi/index.js";import"../../../permissions/ProvidePermissions.js";import{getUserUnits as C,subscribeForUserUnitsUpdates as A}from"../../../utils/index.js";import"../DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as f}from"react/jsx-runtime";import"../DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../../constants/segment.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../AppHeader/AppHeader.js";import"../AppSideBar/AppSideBar.js";import"../AppsDataProvider/AppsDataProvider.js";import b from"../DevCenterAppContainer/DevCenterAppContainer.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"./DevCenterIsolatedAppPage.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../Typography.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.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"../../../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"../../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"@material-ui/core";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"../../HelpCenter/HelpCenterIcon.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{DevCenterAppZoidComponent as g,APP_IFRAME_ATTRIBUTE as v}from"./DevCenterAppZoidComponent.js";import{ISOLATED_PAGE_APP_CONTAINER_ID as P}from"./constants.js";import x from"./DevCenterIsolatedApp.module.css.js";import{createDevCenterRouter as I,isAppMaximized as h}from"../../../utils/devcenter.js";var S=["isIsolationFeatureEnabled","onAppFullscreenTransparentMode","onIsMaximizedChange","onInnerContainerMouseEnter","onInnerContainerMouseLeave","onAppContainerClick","setInnerContainerRefFn"];function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function y(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?D(Object(r),!0).forEach((function(o){e(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function E(e){var l,d,c,D=e.isIsolationFeatureEnabled,E=e.onAppFullscreenTransparentMode,T=e.onIsMaximizedChange,M=e.onInnerContainerMouseEnter,F=e.onInnerContainerMouseLeave,B=e.onAppContainerClick,L=e.setInnerContainerRefFn,O=o(e,S),k=r((function(){return I(O.router)}),[null===(l=O.router)||void 0===l?void 0:l.location]),w=D?g:b,V=i(),W=i(),H=i(),R=h(null===(d=O.router)||void 0===d||null===(c=d.location)||void 0===c?void 0:c.query,O.app.id),z=n(C()),N=t(z,2),q=N[0],U=N[1];s((function(){var e=A((function(e){return U(e)}));return function(){return e()}}),[]);var G=p(u),_=j();function K(){E({appId:O.app.id,isModeEnabled:!1}),document.body.classList.remove(x.overflowHidden,x.compensateScroll)}s((function(){return K}),[]);var Z=a((function(e){W.current=e,L(e)}),[]);return f("div",{className:x.fixedSizeContainer,ref:H,children:f("div",{ref:Z,onMouseEnter:M,onMouseLeave:F,"data-testid":"".concat("DevCenter_AppContainer","_").concat(O.app.app.name),className:m(x.container,R&&x.containerMaximized),children:f(w,y(y({},O),{},{appContextValue:G,devCenterRouter:k,globalNotificationToastsAPI:window[Symbol.for("notificationToasts")],onAppContainerClick:B,onIsMaximizedChange:T,permissionsContextValue:_,setIsFullscreenModalMode:function(e){var t,o,r,i,n;if(D&&!R){var s=e?"add":"remove";null===(t=W.current)||void 0===t||t.classList[s](x.containerMaximizedTransparent),V.current=null===(o=W.current)||void 0===o||null===(r=o.querySelector("[".concat(v,"]")))||void 0===r||null===(i=r.contentWindow)||void 0===i?void 0:i.document;var p=null===(n=V.current)||void 0===n?void 0:n.getElementById(P);if(p)if(e){var a=H.current.getBoundingClientRect(),m=a.top,l=a.left,d=a.width,c=a.height;p.setAttribute("style","\n top: ".concat(m,"px;\n left: ").concat(l,"px;\n width: ").concat(d,"px;\n height: ").concat(c,"px;\n position: absolute;\n ")),E({appId:O.app.id,isModeEnabled:!0});var u=window.innerWidth!==document.body.clientWidth;document.body.classList.add(x.overflowHidden,u&&x.compensateScroll)}else p.setAttribute("style",""),K()}},userUnits:q}))})})}E.propTypes={app:c.shape({id:c.number,app:c.shape({name:c.string})}).isRequired,currentUser:c.shape({}).isRequired,isIsolationFeatureEnabled:c.func,onAppContainerClick:c.func,onAppFullscreenTransparentMode:c.func,onAppRemove:c.func,onInnerContainerMouseEnter:c.func,onInnerContainerMouseLeave:c.func,onIsMaximizedChange:c.func,onSettingChange:c.func,onSettingsChange:c.func,setInnerContainerRefFn:c.func,updateCurrentDashboardAppLastAnnotation:c.func},E.defaultProps={isIsolationFeatureEnabled:!1,onAppContainerClick:d,onAppFullscreenTransparentMode:d,onAppRemove:d,onInnerContainerMouseEnter:d,onInnerContainerMouseLeave:d,onIsMaximizedChange:d,onSettingChange:d,onSettingsChange:d,setInnerContainerRefFn:d,updateCurrentDashboardAppLastAnnotation:d};var T=l(E);export{T as DevCenterIsolatedApp};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/helpers/objectWithoutProperties";import{useMemo as r,useRef as n,useState as i,useEffect as s,useContext as p,useCallback as a}from"react";import m from"classnames";import{withRouter as l}from"react-router";import{noop as d}from"lodash";import c from"prop-types";import j from"../AppContext.js";import u from"../../../permissions/PermissionsContext.js";import"../../../permissions/constants/index.js";import"../../../permissions/withPermissionsHOC.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../clients/jsonApi/index.js";import"../../../permissions/ProvidePermissions.js";import{getUserUnits as C,subscribeForUserUnitsUpdates as A}from"../../../utils/index.js";import"../DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as f}from"react/jsx-runtime";import"../DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../../constants/segment.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../AppHeader/AppHeader.js";import"../AppSideBar/AppSideBar.js";import"../AppsDataProvider/AppsDataProvider.js";import b from"../DevCenterAppContainer/DevCenterAppContainer.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"./DevCenterIsolatedAppPage.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../Typography.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.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"../../Chart/components/ChartButton.js";import"../../Chart/components/ChartButtons.js";import"../../Chart/components/ChartWrapper.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"../../../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"../../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"@material-ui/core";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"../../HelpCenter/HelpCenterIcon.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{DevCenterAppZoidComponent as g,APP_IFRAME_ATTRIBUTE as v}from"./DevCenterAppZoidComponent.js";import{ISOLATED_PAGE_APP_CONTAINER_ID as h}from"./constants.js";import P from"./DevCenterIsolatedApp.module.css.js";import{createDevCenterRouter as x,isAppMaximized as I}from"../../../utils/devcenter.js";var S=["isIsolationFeatureEnabled","onAppFullscreenTransparentMode","onIsMaximizedChange","onInnerContainerMouseEnter","onInnerContainerMouseLeave","onAppContainerClick","setInnerContainerRefFn"];function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function y(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?D(Object(r),!0).forEach((function(o){e(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function E(e){var l,d,c,D=e.isIsolationFeatureEnabled,E=e.onAppFullscreenTransparentMode,T=e.onIsMaximizedChange,M=e.onInnerContainerMouseEnter,B=e.onInnerContainerMouseLeave,F=e.onAppContainerClick,L=e.setInnerContainerRefFn,O=o(e,S),k=r((function(){return x(O.router)}),[null===(l=O.router)||void 0===l?void 0:l.location]),w=D?g:b,V=n(),W=n(),H=n(),R=I(null===(d=O.router)||void 0===d||null===(c=d.location)||void 0===c?void 0:c.query,O.app.id),z=i(C()),N=t(z,2),q=N[0],U=N[1];s((function(){var e=A((function(e){return U(e)}));return function(){return e()}}),[]);var G=p(j),_=u();function K(){E({appId:O.app.id,isModeEnabled:!1}),document.body.classList.remove(P.overflowHidden,P.compensateScroll)}s((function(){return K}),[]);var Z=a((function(e){W.current=e,L(e)}),[]);return f("div",{className:P.fixedSizeContainer,ref:H,children:f("div",{ref:Z,onMouseEnter:M,onMouseLeave:B,"data-testid":"".concat("DevCenter_AppContainer","_").concat(O.app.app.name),className:m(P.container,R&&P.containerMaximized),children:f(w,y(y({},O),{},{appContextValue:G,devCenterRouter:k,globalNotificationToastsAPI:window[Symbol.for("notificationToasts")],onAppContainerClick:F,onIsMaximizedChange:T,permissionsContextValue:_,setIsFullscreenModalMode:function(e){var t,o,r,n,i;if(D&&!R){var s=e?"add":"remove";null===(t=W.current)||void 0===t||t.classList[s](P.containerMaximizedTransparent),V.current=null===(o=W.current)||void 0===o||null===(r=o.querySelector("[".concat(v,"]")))||void 0===r||null===(n=r.contentWindow)||void 0===n?void 0:n.document;var p=null===(i=V.current)||void 0===i?void 0:i.getElementById(h);if(p)if(e){var a=H.current.getBoundingClientRect(),m=a.top,l=a.left,d=a.width,c=a.height;p.setAttribute("style","\n top: ".concat(m,"px;\n left: ").concat(l,"px;\n width: ").concat(d,"px;\n height: ").concat(c,"px;\n position: absolute;\n ")),E({appId:O.app.id,isModeEnabled:!0});var j=window.innerWidth!==document.body.clientWidth;document.body.classList.add(P.overflowHidden,j&&P.compensateScroll)}else p.setAttribute("style",""),K()}},userUnits:q}))})})}E.propTypes={app:c.shape({id:c.number,app:c.shape({name:c.string})}).isRequired,currentUser:c.shape({}).isRequired,isIsolationFeatureEnabled:c.func,onAppContainerClick:c.func,onAppFullscreenTransparentMode:c.func,onAppRemove:c.func,onInnerContainerMouseEnter:c.func,onInnerContainerMouseLeave:c.func,onIsMaximizedChange:c.func,onSettingChange:c.func,onSettingsChange:c.func,setInnerContainerRefFn:c.func,updateCurrentDashboardAppLastAnnotation:c.func},E.defaultProps={isIsolationFeatureEnabled:!1,onAppContainerClick:d,onAppFullscreenTransparentMode:d,onAppRemove:d,onInnerContainerMouseEnter:d,onInnerContainerMouseLeave:d,onIsMaximizedChange:d,onSettingChange:d,onSettingsChange:d,setInnerContainerRefFn:d,updateCurrentDashboardAppLastAnnotation:d};var T=l(E);export{T as DevCenterIsolatedApp};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useEffect as o}from"react";import r from"prop-types";import{makeStyles as i}from"@material-ui/core";import s from"classnames";import"../DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as n}from"react/jsx-runtime";import"../DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../../constants/segment.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"@babel/runtime/helpers/slicedToArray";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../AppHeader/AppHeader.js";import"../AppSideBar/AppSideBar.js";import"../AppsDataProvider/AppsDataProvider.js";import p from"../DevCenterAppContainer/DevCenterAppContainer.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"./DevCenterIsolatedApp.js";import m from"../AppContext.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../Typography.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"lodash";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"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../clients/jsonApi/index.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"../../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"../../HelpCenter/HelpCenterIcon.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"../../../hocs/withMUIProvidersHOC.js";import{THEMES as l}from"../../../constants/theme.js";import{LOCAL_STORAGE_APP_THEME_KEY as c}from"../../../CLI/hocs/constants.js";import{setThemeVariables as j}from"../../../utils/themeVariables.js";import{isPDFReportView as d}from"../../../CLI/hocs/utils.js";import{PermissionsContext as C}from"../../../permissions/PermissionsContext.js";import{updateUserUnits as u}from"../../../utils/index.js";import"../../../config/initGlobalDependencies.js";import"../../../styles/globalStyles.js";import{useXProps as A}from"./effects/useXProps.js";import{ISOLATED_PAGE_APP_CONTAINER_ID as f}from"./constants.js";import{replaceUndefinedValuesWithNull as g}from"./utils/replaceUndefinedValuesWithNull.js";import"./DevCenterAppZoidComponent.js";var b=["appContextValue","permissionsContextValue","globalNotificationToastsAPI","userUnits","onSettingChange","onSettingsChange"];function P(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function S(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?P(Object(r),!0).forEach((function(o){e(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var h=a(p),D=i((function(){return{"@global":{body:{backgroundColor:"transparent",overflow:"hidden"}}}}));function x(e){var r,i=e.CLIAppComponent,p=e.CLIAppSettings,a=e.containerReportClassName;D();var P=A(),x=P.appContextValue,I=P.permissionsContextValue,v=P.globalNotificationToastsAPI,y=P.userUnits,T=P.onSettingChange,E=P.onSettingsChange,L=t(P,b),O=L.location.pathname.startsWith("/reports/")||d,B=null!==(r=localStorage.getItem(c))&&void 0!==r?r:l.DARK,V=!O&&B===l.DARK;return o((function(){j(V)}),[V]),o((function(){window[Symbol.for("notificationToasts")]=v}),[v]),o((function(){u({userUnits:y})}),[]),n(C.Provider,{value:I,children:n(m.Provider,{value:x,children:n("div",{id:f,className:s(O&&a),children:n(h,S(S({},L),{},{theme:V?l.DARK:l.LIGHT,onSettingsChange:function(e){return E(g(e))},onSettingChange:function(e,t){return T(e,g(t))},CLIAppComponent:i,CLIAppSettings:p}))})})})}x.propTypes={CLIAppComponent:r.node,CLIAppSettings:r.node,containerReportClassName:r.string},x.defaultProps={CLIAppComponent:null,CLIAppSettings:null,containerReportClassName:null};export{x as DevCenterIsolatedAppPage};
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/objectWithoutProperties";import{useEffect as o}from"react";import r from"prop-types";import{makeStyles as i}from"@material-ui/core";import s from"classnames";import"../DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as n}from"react/jsx-runtime";import"../DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../../constants/segment.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"@babel/runtime/helpers/slicedToArray";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../AppHeader/AppHeader.js";import"../AppSideBar/AppSideBar.js";import"../AppsDataProvider/AppsDataProvider.js";import p from"../DevCenterAppContainer/DevCenterAppContainer.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"./DevCenterIsolatedApp.js";import m from"../AppContext.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../Typography.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"lodash";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"../../Chart/components/ChartButton.js";import"../../Chart/components/ChartButtons.js";import"../../Chart/components/ChartWrapper.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"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../clients/jsonApi/index.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"../../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"../../HelpCenter/HelpCenterIcon.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"../../../hocs/withMUIProvidersHOC.js";import{THEMES as l}from"../../../constants/theme.js";import{LOCAL_STORAGE_APP_THEME_KEY as c}from"../../../CLI/hocs/constants.js";import{setThemeVariables as j}from"../../../utils/themeVariables.js";import{isPDFReportView as d}from"../../../CLI/hocs/utils.js";import{PermissionsContext as C}from"../../../permissions/PermissionsContext.js";import{updateUserUnits as u}from"../../../utils/index.js";import"../../../config/initGlobalDependencies.js";import"../../../styles/globalStyles.js";import{useXProps as A}from"./effects/useXProps.js";import{ISOLATED_PAGE_APP_CONTAINER_ID as f}from"./constants.js";import{replaceUndefinedValuesWithNull as g}from"./utils/replaceUndefinedValuesWithNull.js";import"./DevCenterAppZoidComponent.js";var b=["appContextValue","permissionsContextValue","globalNotificationToastsAPI","userUnits","onSettingChange","onSettingsChange"];function P(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function S(e){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?P(Object(r),!0).forEach((function(o){t(e,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h=a(p),D=i((function(){return{"@global":{body:{backgroundColor:"transparent",overflow:"hidden"}}}}));function x(t){var r,i=t.CLIAppComponent,p=t.CLIAppSettings,a=t.containerReportClassName;D();var P=A(),x=P.appContextValue,I=P.permissionsContextValue,v=P.globalNotificationToastsAPI,y=P.userUnits,T=P.onSettingChange,E=P.onSettingsChange,L=e(P,b),B=L.location.pathname.startsWith("/reports/")||d,O=null!==(r=localStorage.getItem(c))&&void 0!==r?r:l.DARK,V=!B&&O===l.DARK;return o((function(){j(V)}),[V]),o((function(){window[Symbol.for("notificationToasts")]=v}),[v]),o((function(){u({userUnits:y})}),[]),n(C.Provider,{value:I,children:n(m.Provider,{value:x,children:n("div",{id:f,className:s(B&&a),children:n(h,S(S({},L),{},{theme:V?l.DARK:l.LIGHT,onSettingsChange:function(t){return E(g(t))},onSettingChange:function(t,e){return T(t,g(e))},CLIAppComponent:i,CLIAppSettings:p}))})})})}x.propTypes={CLIAppComponent:r.node,CLIAppSettings:r.node,containerReportClassName:r.string},x.defaultProps={CLIAppComponent:null,CLIAppSettings:null,containerReportClassName:null};export{x as DevCenterIsolatedAppPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as r,createRef as o,useCallback as i,useEffect as n}from"react";import s from"prop-types";import p from"classnames";import{Modal as m,Typography as a,IconButton as l}from"@material-ui/core";import c from"@material-ui/icons/Close";import d from"@material-ui/icons/GetApp";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as j,jsxs 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 u 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/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"../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{useStyles as A}from"./styles.js";var v=function(s){var v=s.open,D=s.fileUrl,f=s.fileSize,b=s.fileName,g=s.webviewType,P=s.onClose,S=r(!0),x=t(S,2),h=x[0],I=x[1],T=r(!1),y=t(T,2),E=y[0],B=y[1],w=o(null),V=o(null),k=A(),F=i((function(){return"office"===g?"https://view.officeapps.live.com/op/embed.aspx?src=".concat(window.encodeURIComponent(D)):"https://docs.google.com/viewer?url=".concat(encodeURIComponent(D),"&embedded=true")}),[D]),L=function(){V.current&&(V.current.src=F(),V.current.contentWindow.location.reload())},W=function(){w.current&&clearInterval(w.current),I(!1)};return n((function(){I(!0),B(!1);var e=f&&f>=1048576?f/1048576*1e4:1e4;return w&&v&&(clearInterval(w.current),w.current=setInterval(L,e)),function(){clearInterval(w.current)}}),[D,v]),j(m,{open:v,onClose:P,onContextMenu:function(e){return e.stopPropagation()},children:C("div",{className:k.cDocsViewer,children:[C("div",{className:k.cDocsViewerToolbar,children:[j(a,{children:b}),C("div",{children:[j(l,{size:"small",className:k.cDocsViewerToolbarIconButton,children:j("a",{download:!0,href:D,target:"_blank",rel:"noopener noreferrer",children:j(d,{fontSize:"small"})})}),j(l,{size:"small",onClick:P,className:k.cDocsViewerToolbarIconButton,children:j(c,{fontSize:"small"})})]})]}),h&&j("div",{className:k.cDocsViewerFrame,children:j(u,{white:!1})}),E?j("div",{className:k.cDocsViewerFrame,children:j(a,{variant:"body2",className:k.cDocsViewerFrameFailed,children:"Loading failed"})}):j("iframe",{className:p(k.cDocsViewerFrame,e({},k.cDocsViewerFrameHidden,h)),title:D,src:F(),onLoad:W,onError:function(){W(),B(!0)},ref:V})]})})};v.propTypes={open:s.bool.isRequired,fileUrl:s.string.isRequired,webviewType:s.oneOf(["google","office"]),fileName:s.string,fileSize:s.number,onClose:s.func.isRequired,classes:s.shape({}).isRequired},v.defaultProps={fileName:void 0,fileSize:void 0,webviewType:"google"};export{v as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as r,createRef as o,useCallback as i,useEffect as n}from"react";import s from"prop-types";import p from"classnames";import{Modal as m,Typography as a,IconButton as l}from"@material-ui/core";import c from"@material-ui/icons/Close";import d from"@material-ui/icons/GetApp";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as j,jsxs 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 u 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"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.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/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"../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{useStyles as A}from"./styles.js";var v=function(s){var v=s.open,D=s.fileUrl,f=s.fileSize,b=s.fileName,g=s.webviewType,P=s.onClose,S=r(!0),h=t(S,2),x=h[0],I=h[1],T=r(!1),y=t(T,2),E=y[0],B=y[1],w=o(null),V=o(null),k=A(),F=i((function(){return"office"===g?"https://view.officeapps.live.com/op/embed.aspx?src=".concat(window.encodeURIComponent(D)):"https://docs.google.com/viewer?url=".concat(encodeURIComponent(D),"&embedded=true")}),[D]),L=function(){V.current&&(V.current.src=F(),V.current.contentWindow.location.reload())},W=function(){w.current&&clearInterval(w.current),I(!1)};return n((function(){I(!0),B(!1);var e=f&&f>=1048576?f/1048576*1e4:1e4;return w&&v&&(clearInterval(w.current),w.current=setInterval(L,e)),function(){clearInterval(w.current)}}),[D,v]),j(m,{open:v,onClose:P,onContextMenu:function(e){return e.stopPropagation()},children:C("div",{className:k.cDocsViewer,children:[C("div",{className:k.cDocsViewerToolbar,children:[j(a,{children:b}),C("div",{children:[j(l,{size:"small",className:k.cDocsViewerToolbarIconButton,children:j("a",{download:!0,href:D,target:"_blank",rel:"noopener noreferrer",children:j(d,{fontSize:"small"})})}),j(l,{size:"small",onClick:P,className:k.cDocsViewerToolbarIconButton,children:j(c,{fontSize:"small"})})]})]}),x&&j("div",{className:k.cDocsViewerFrame,children:j(u,{white:!1})}),E?j("div",{className:k.cDocsViewerFrame,children:j(a,{variant:"body2",className:k.cDocsViewerFrameFailed,children:"Loading failed"})}):j("iframe",{className:p(k.cDocsViewerFrame,e({},k.cDocsViewerFrameHidden,x)),title:D,src:F(),onLoad:W,onError:function(){W(),B(!0)},ref:V})]})})};v.propTypes={open:s.bool.isRequired,fileUrl:s.string.isRequired,webviewType:s.oneOf(["google","office"]),fileName:s.string,fileSize:s.number,onClose:s.func.isRequired,classes:s.shape({}).isRequired},v.defaultProps={fileName:void 0,fileSize:void 0,webviewType:"google"};export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import{useState as n,useMemo as
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import{useState as n,useRef as t,useMemo as r}from"react";import i from"classnames";import s from"prop-types";import{isEmpty as l}from"lodash";import a from"./components/Header.js";import m from"./components/Component.js";import p from"./components/SortableComponents.js";import d from"../BHACasingEmptyView/BHACasingEmptyView.js";import u from"./BhaComponentsTable.css.js";import{jsxs as c,jsx as f}from"react/jsx-runtime";function C(s){var C=s.isActualBha,v=s.viewColumnsPerRow,A=s.editColumnsPerRow,R=s.components,w=s.draftComponent,b=s.validate,h=s.onSort,P=s.onAdd,y=s.onDelete,S=s.onSave,q=s.onCancel,B=s.isMobile,j=s.onAutocompleteApplied,g=n(-1),x=o(g,2),D=x[0],H=x[1],M=n(!1),T=o(M,2),E=T[0],N=T[1],O=t(null),k=r((function(){return!(R&&!l(R)||w)}),[R,w]);return c("div",{className:u.container,children:[k?f(d,{type:"BHA",onAdd:P}):c("div",{className:i(u.drilistringContent,e({},u.contentMobile,B)),ref:O,onScroll:function(){O.current&&N(!!O.current.scrollTop)},children:[!B&&f(a,{}),c("div",{children:[w&&f(m,{isMobile:B,isActualBha:C,viewColumnsPerRow:v,editColumnsPerRow:A,component:w,isDraft:!0,validate:b,onCancel:q,onSave:S,onAutocompleteApplied:j}),f(p,{useDragHandle:!0,lockAxis:"y",lockToContainerEdges:!0,isActualBha:C,components:R,sortableIndex:D,validate:b,onSaveComponent:S,onDeleteComponent:y,onSortEnd:function(e,o){H(-1),h(e,o)},onSortStart:function(e){H(e.index)},isMobile:B,viewColumnsPerRow:v,editColumnsPerRow:A,onAutocompleteApplied:j})]})]}),f("div",{className:i(u.topGradient,e({},u.visible,E)),style:{top:B?0:50}}),f("div",{className:u.bottomGradient})]})}C.propTypes={isActualBha:s.bool.isRequired,viewColumnsPerRow:s.oneOf([1,2,3,4,6]),editColumnsPerRow:s.oneOf([1,2,3,4,6]),components:s.arrayOf(s.shape({})),draftComponent:s.arrayOf(s.shape({})),validate:s.func.isRequired,onSort:s.func.isRequired,onAdd:s.func.isRequired,onDelete:s.func.isRequired,onSave:s.func.isRequired,onCancel:s.func.isRequired,isMobile:s.bool.isRequired,onAutocompleteApplied:s.func.isRequired},C.defaultProps={viewColumnsPerRow:3,editColumnsPerRow:3,components:null,draftComponent:null};export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var e={container:"BhaComponentsTable_container__8ht4r",drilistringContent:"BhaComponentsTable_drilistringContent__sCVJ7",contentMobile:"BhaComponentsTable_contentMobile__ZOrZm",
|
|
1
|
+
import t from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var e={container:"BhaComponentsTable_container__8ht4r",drilistringContent:"BhaComponentsTable_drilistringContent__sCVJ7",contentMobile:"BhaComponentsTable_contentMobile__ZOrZm",topGradient:"BhaComponentsTable_topGradient__0cG6w",visible:"BhaComponentsTable_visible__ljWMr",bottomGradient:"BhaComponentsTable_bottomGradient__XTCMd"};t(".BhaComponentsTable_container__8ht4r{display:flex;flex-direction:column;height:100%;position:relative}.BhaComponentsTable_drilistringContent__sCVJ7{display:flex;flex:1;flex-direction:column;min-height:0;overflow-y:auto;padding-bottom:16px;padding-right:12px}.BhaComponentsTable_drilistringContent__sCVJ7::-webkit-scrollbar-track{margin-top:50px}.BhaComponentsTable_contentMobile__ZOrZm{margin-top:1px;padding:0 16px 16px}.BhaComponentsTable_contentMobile__ZOrZm::-webkit-scrollbar-track{margin-top:0}.BhaComponentsTable_topGradient__0cG6w{background:linear-gradient(0deg,rgba(39,39,39,0) 0,var(--palette-background-b-5) 100%);height:16px;left:0;opacity:0;position:absolute;right:0;top:50px}.BhaComponentsTable_visible__ljWMr{opacity:1}.BhaComponentsTable_bottomGradient__XTCMd{background:linear-gradient(180deg,rgba(39,39,39,0) 0,var(--palette-background-b-5) 100%);bottom:0;height:16px;left:0;position:absolute;right:0}");export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{memo as e}from"react";import{isEmpty as t}from"lodash";import r from"prop-types";import{Grid as o}from"@material-ui/core";import{isMobileDetected as i}from"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/defineProperty";import"../../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as n,jsx as s}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"@babel/runtime/helpers/slicedToArray";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"@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{COMPONENT_MATERIALS as p}from"../../../../../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"../../../BHASchematic.js";import"../../../BHATable/index.js";import m from"../../../BHAComponentIcon.js";import"../../../BHAComponentDetail/index.js";import"../../../BHATileIcon.js";import"../../../BHATile/BHATile.js";import"../../../BHAList/BHAList.js";import"../../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{CancelButton as a}from"../shared/CancelButton.js";import"../shared/ExpandCollapseButton.js";import"../shared/FormatedNumber.js";import{InputText as l}from"../shared/InputText.js";import"../shared/MoreButton.js";import{SaveButton as d}from"../shared/SaveButton.js";import{SelectField as c}from"../shared/SelectField.js";import"../shared/StaticField.js";import{SharedEditorElements as j}from"../shared/SharedEditorElements.js";import"../shared/ConfirmationPopup.js";import{useStyles as C}from"../sharedStyles.js";import u from"../PressureLoss/index.js";import{CONTAINER_XS as A}from"../constants.js";function v(e){var r=e.component,v=e.error,h=e.onChange,D=e.onCancel,g=e.onSave,b=e.columns,f=C({isMobile:i}),S=i?A/2:A/b,P=function(e){return v&&v[e]};return n(o,{container:!0,spacing:0,className:f.editorContainer,children:[!i&&s(o,{item:!0,className:f.editorComponentSize,children:s(m,{component:r})}),s(o,{item:!0,className:f.eidtorContentContainer,children:n(o,{container:!0,spacing:2,children:[s(j,{component:r,getError:P,onChange:h}),s(l,{type:"name",label:"Name",value:r.name,error:P("name"),xs:S,onChangeField:h}),s(l,{type:"weight",label:"T.Weight",unit:"mass",value:r.weight,error:P("weight"),disabled:!0,xs:S,onChangeField:h}),s(l,{type:"connection_type",label:"Connection Type",value:r.connection_type,error:P("connection_type"),xs:S,onChangeField:h}),s(c,{type:"material",options:p,label:"Material",value:r.material,error:P("material"),xs:S,onChangeField:h}),s(u,{isEditing:!0,data:r.pressure_loss,errors:P("pressure_loss"),onChange:function(e){h("pressure_loss",e)}})]})}),!i&&n(o,{item:!0,className:f.eidtorActionGroup,children:[s(a,{handleCancel:D}),s(d,{handleSave:g,disabled:!t(v)})]})]})}v.propTypes={component:r.shape({name:r.string,weight:r.number,connection_type:r.string,material:r.string,pressure_loss:r.arrayOf(r.shape({}))}).isRequired,error:r.shape({}),onChange:r.func.isRequired,onCancel:r.func.isRequired,onSave:r.func.isRequired,columns:r.number.isRequired},v.defaultProps={error:null};var h=e(v);export{h as default};
|
|
1
|
+
import{memo as e}from"react";import{isEmpty as t}from"lodash";import r from"prop-types";import{Grid as o}from"@material-ui/core";import{isMobileDetected as i}from"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/defineProperty";import"../../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as n,jsx as s}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"@babel/runtime/helpers/slicedToArray";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"@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{COMPONENT_MATERIALS as p}from"../../../../../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"../../../../Chart/components/ChartButton.js";import"../../../../Chart/components/ChartButtons.js";import"../../../../Chart/components/ChartWrapper.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"../../../BHASchematic.js";import"../../../BHATable/index.js";import m from"../../../BHAComponentIcon.js";import"../../../BHAComponentDetail/index.js";import"../../../BHATileIcon.js";import"../../../BHATile/BHATile.js";import"../../../BHAList/BHAList.js";import"../../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{CancelButton as a}from"../shared/CancelButton.js";import"../shared/ExpandCollapseButton.js";import"../shared/FormatedNumber.js";import{InputText as l}from"../shared/InputText.js";import"../shared/MoreButton.js";import{SaveButton as d}from"../shared/SaveButton.js";import{SelectField as c}from"../shared/SelectField.js";import"../shared/StaticField.js";import{SharedEditorElements as j}from"../shared/SharedEditorElements.js";import"../shared/ConfirmationPopup.js";import{useStyles as C}from"../sharedStyles.js";import u from"../PressureLoss/index.js";import{CONTAINER_XS as A}from"../constants.js";function h(e){var r=e.component,h=e.error,v=e.onChange,D=e.onCancel,g=e.onSave,b=e.columns,f=C({isMobile:i}),S=i?A/2:A/b,P=function(e){return h&&h[e]};return n(o,{container:!0,spacing:0,className:f.editorContainer,children:[!i&&s(o,{item:!0,className:f.editorComponentSize,children:s(m,{component:r})}),s(o,{item:!0,className:f.eidtorContentContainer,children:n(o,{container:!0,spacing:2,children:[s(j,{component:r,getError:P,onChange:v}),s(l,{type:"name",label:"Name",value:r.name,error:P("name"),xs:S,onChangeField:v}),s(l,{type:"weight",label:"T.Weight",unit:"mass",value:r.weight,error:P("weight"),disabled:!0,xs:S,onChangeField:v}),s(l,{type:"connection_type",label:"Connection Type",value:r.connection_type,error:P("connection_type"),xs:S,onChangeField:v}),s(c,{type:"material",options:p,label:"Material",value:r.material,error:P("material"),xs:S,onChangeField:v}),s(u,{isEditing:!0,data:r.pressure_loss,errors:P("pressure_loss"),onChange:function(e){v("pressure_loss",e)}})]})}),!i&&n(o,{item:!0,className:f.eidtorActionGroup,children:[s(a,{handleCancel:D}),s(d,{handleSave:g,disabled:!t(h)})]})]})}h.propTypes={component:r.shape({name:r.string,weight:r.number,connection_type:r.string,material:r.string,pressure_loss:r.arrayOf(r.shape({}))}).isRequired,error:r.shape({}),onChange:r.func.isRequired,onCancel:r.func.isRequired,onSave:r.func.isRequired,columns:r.number.isRequired},h.defaultProps={error:null};var v=e(h);export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{memo as e}from"react";import{isEmpty as t}from"lodash";import r from"prop-types";import{Grid as o}from"@material-ui/core";import{isMobileDetected as i}from"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/defineProperty";import"../../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as n,jsx as s}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"@babel/runtime/helpers/slicedToArray";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"@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{COMPONENT_FAMILIES as p,BIT_TYPES as m}from"../../../../../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"../../../BHASchematic.js";import"../../../BHATable/index.js";import a from"../../../BHAComponentIcon.js";import"../../../BHAComponentDetail/index.js";import"../../../BHATileIcon.js";import"../../../BHATile/BHATile.js";import"../../../BHAList/BHAList.js";import"../../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{CancelButton as l}from"../shared/CancelButton.js";import"../shared/ExpandCollapseButton.js";import"../shared/FormatedNumber.js";import{InputText as d}from"../shared/InputText.js";import"../shared/MoreButton.js";import{SaveButton as j}from"../shared/SaveButton.js";import{SelectField as c}from"../shared/SelectField.js";import"../shared/StaticField.js";import"../shared/SharedEditorElements.js";import"../shared/ConfirmationPopup.js";import{useStyles as C}from"../sharedStyles.js";import u from"../NozzleSize/index.js";import{CONTAINER_XS as A}from"../constants.js";function h(e){var r=e.component,h=e.error,v=e.onChange,g=e.onCancel,b=e.onSave,f=e.columns,D=C({isMobile:i}),S=i?A/2:A/f,x=i?A/2:A/6,P=function(e){return h&&h[e]};return n(o,{container:!0,spacing:0,className:D.editorContainer,children:[!i&&s(o,{item:!0,className:D.editorComponentSize,children:s(a,{component:r})}),s(o,{item:!0,className:D.eidtorContentContainer,children:n(o,{container:!0,spacing:2,children:[s(c,{type:"family",options:p.drilling,label:"Component",value:r.family,error:P("family"),xs:x,onChangeField:v,className:D.editorHeaderCell}),s(d,{type:"name",label:"Name",value:r.name,error:P("name"),xs:x,onChangeField:v,className:D.editorHeaderCell}),s(c,{type:"bit_type",options:m,label:"Bit Type",value:r.bit_type,error:P("bit_type"),xs:x,onChangeField:v,className:D.editorHeaderCell}),s(d,{type:"size",label:"Bit Size",unit:"shortLength",value:r.size,error:P("size"),xs:x,onChangeField:v,className:D.editorHeaderCell}),s(d,{type:"length",label:"Length",unit:"length",value:r.length,error:P("length"),xs:x,onChangeField:v,className:D.editorHeaderCell}),s(d,{type:"weight",label:"T.Weight",unit:"mass",value:r.weight,error:P("weight"),disabled:!0,xs:S,onChangeField:v}),s(d,{type:"tfa",label:"TFA",value:r.tfa,error:P("tfa"),xs:S,onChangeField:v}),s(u,{isEditing:!0,data:r.nozzle_sizes,errors:P("nozzle_sizes"),onChange:function(e){v("nozzle_sizes",e)}})]})}),!i&&n(o,{item:!0,className:D.eidtorActionGroup,children:[s(l,{handleCancel:g}),s(j,{handleSave:b,disabled:!t(h)})]})]})}h.propTypes={component:r.shape({family:r.string,bit_type:r.string,size:r.number,length:r.number,name:r.string,weight:r.number,tfa:r.number,nozzle_sizes:r.arrayOf(r.shape({}))}).isRequired,error:r.shape({}),onChange:r.func.isRequired,onCancel:r.func.isRequired,onSave:r.func.isRequired,columns:r.number.isRequired},h.defaultProps={error:null};var v=e(h);export{v as default};
|
|
1
|
+
import{memo as e}from"react";import{isEmpty as t}from"lodash";import r from"prop-types";import{Grid as o}from"@material-ui/core";import{isMobileDetected as i}from"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/defineProperty";import"../../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as n,jsx as s}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"@babel/runtime/helpers/slicedToArray";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"@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{COMPONENT_FAMILIES as p,BIT_TYPES as m}from"../../../../../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"../../../../Chart/components/ChartButton.js";import"../../../../Chart/components/ChartButtons.js";import"../../../../Chart/components/ChartWrapper.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"../../../BHASchematic.js";import"../../../BHATable/index.js";import a from"../../../BHAComponentIcon.js";import"../../../BHAComponentDetail/index.js";import"../../../BHATileIcon.js";import"../../../BHATile/BHATile.js";import"../../../BHAList/BHAList.js";import"../../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{CancelButton as l}from"../shared/CancelButton.js";import"../shared/ExpandCollapseButton.js";import"../shared/FormatedNumber.js";import{InputText as d}from"../shared/InputText.js";import"../shared/MoreButton.js";import{SaveButton as j}from"../shared/SaveButton.js";import{SelectField as c}from"../shared/SelectField.js";import"../shared/StaticField.js";import"../shared/SharedEditorElements.js";import"../shared/ConfirmationPopup.js";import{useStyles as C}from"../sharedStyles.js";import u from"../NozzleSize/index.js";import{CONTAINER_XS as A}from"../constants.js";function h(e){var r=e.component,h=e.error,v=e.onChange,g=e.onCancel,b=e.onSave,f=e.columns,D=C({isMobile:i}),S=i?A/2:A/f,x=i?A/2:A/6,P=function(e){return h&&h[e]};return n(o,{container:!0,spacing:0,className:D.editorContainer,children:[!i&&s(o,{item:!0,className:D.editorComponentSize,children:s(a,{component:r})}),s(o,{item:!0,className:D.eidtorContentContainer,children:n(o,{container:!0,spacing:2,children:[s(c,{type:"family",options:p.drilling,label:"Component",value:r.family,error:P("family"),xs:x,onChangeField:v,className:D.editorHeaderCell}),s(d,{type:"name",label:"Name",value:r.name,error:P("name"),xs:x,onChangeField:v,className:D.editorHeaderCell}),s(c,{type:"bit_type",options:m,label:"Bit Type",value:r.bit_type,error:P("bit_type"),xs:x,onChangeField:v,className:D.editorHeaderCell}),s(d,{type:"size",label:"Bit Size",unit:"shortLength",value:r.size,error:P("size"),xs:x,onChangeField:v,className:D.editorHeaderCell}),s(d,{type:"length",label:"Length",unit:"length",value:r.length,error:P("length"),xs:x,onChangeField:v,className:D.editorHeaderCell}),s(d,{type:"weight",label:"T.Weight",unit:"mass",value:r.weight,error:P("weight"),disabled:!0,xs:S,onChangeField:v}),s(d,{type:"tfa",label:"TFA",value:r.tfa,error:P("tfa"),xs:S,onChangeField:v}),s(u,{isEditing:!0,data:r.nozzle_sizes,errors:P("nozzle_sizes"),onChange:function(e){v("nozzle_sizes",e)}})]})}),!i&&n(o,{item:!0,className:D.eidtorActionGroup,children:[s(l,{handleCancel:g}),s(j,{handleSave:b,disabled:!t(h)})]})]})}h.propTypes={component:r.shape({family:r.string,bit_type:r.string,size:r.number,length:r.number,name:r.string,weight:r.number,tfa:r.number,nozzle_sizes:r.arrayOf(r.shape({}))}).isRequired,error:r.shape({}),onChange:r.func.isRequired,onCancel:r.func.isRequired,onSave:r.func.isRequired,columns:r.number.isRequired},h.defaultProps={error:null};var v=e(h);export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/objectWithoutProperties";import t from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import{memo as r,useState as i,useEffect as n}from"react";import s from"classnames";import{omit as p,isEmpty as m,map as a}from"lodash";import l from"prop-types";import{Grid as d,Menu as c,MenuItem as u}from"@material-ui/core";import"../../../../utils/index.js";import{COMPONENT_FAMILIES as j}from"../../../../constants/drillstring.js";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as C,jsx as f,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"../../../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/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.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"../../BHASchematic.js";import"../../BHATable/index.js";import b from"../../BHAComponentIcon.js";import"../../BHAComponentDetail/index.js";import"../../BHATileIcon.js";import"../../BHATile/BHATile.js";import"../../BHAList/BHAList.js";import"../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"./shared/CancelButton.js";import{ExpandCollapseButton as h}from"./shared/ExpandCollapseButton.js";import{FormatedNumber as g}from"./shared/FormatedNumber.js";import"./shared/InputText.js";import{MoreButton as A}from"./shared/MoreButton.js";import"./shared/SaveButton.js";import"./shared/SelectField.js";import{StaticField as D}from"./shared/StaticField.js";import"./shared/SharedEditorElements.js";import{ConfirmationPopup as x}from"./shared/ConfirmationPopup.js";import{useStyles as P}from"./sharedStyles.js";import{calculateComponent as S}from"./utils/calculation.js";import y from"./Agitator/Browser.js";import E from"./Agitator/Editor.js";import w from"./Bit/Browser.js";import B from"./Bit/Editor.js";import I from"./DrillCollar/Browser.js";import T from"./DrillCollar/Editor.js";import O from"./DrillPipe/Browser.js";import k from"./DrillPipe/Editor.js";import L from"./Jar/Browser.js";import M from"./Jar/Editor.js";import F from"./Lwd/Browser.js";import V from"./Lwd/Editor.js";import W from"./Mwd/Browser.js";import _ from"./Mwd/Editor.js";import R from"./Pdm/Browser.js";import N from"./Pdm/Editor.js";import H from"./Rss/Browser.js";import z from"./Rss/Editor.js";import q from"./Stabilizer/Browser.js";import U from"./Stabilizer/Editor.js";import Y from"./Sub/Browser.js";import G from"./Sub/Editor.js";import J from"./Ur/Browser.js";import K from"./Ur/Editor.js";import Q from"./EditComponentDialog.js";import{showErrorNotification as X}from"../../../../utils/notificationToasts.js";var Z=["is_editing"];function $(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function ee(e){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?$(Object(r),!0).forEach((function(o){t(e,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function te(e){var t;return(null===(t=j.drilling.find((function(t){return t.type===e})))||void 0===t?void 0:t.name)||"—"}function oe(r){var l,j=r.isMobile,$=r.viewColumnsPerRow,oe=r.editColumnsPerRow,re=r.component,ie=r.validate,ne=r.isDraft,se=r.onCancel,pe=r.onDelete,me=r.onSave,ae=r.onChangeEditing,le=r.onAutocompleteApplied,de=i(null),ce=o(de,2),ue=ce[0],je=ce[1],Ce=i(!1),fe=o(Ce,2),ve=fe[0],be=fe[1],he=i(!1),ge=o(he,2),Ae=ge[0],De=ge[1],xe=i(re),Pe=o(xe,2),Se=Pe[0],ye=Pe[1],Ee=i(null),we=o(Ee,2),Be=we[0],Ie=we[1],Te=i(!1),Oe=o(Te,2),ke=Oe[0],Le=Oe[1],Me=P({isMobile:j,isEditing:Se.is_editing});n((function(){ae&&ae(Se.is_editing)}),[Se.is_editing]);var Fe=function(){Ie(null),ne?se():ye(re)},Ve=function(e,t){var o=S(Se,e,t),r=ie(o,ne);ye(o),Ie(r?r.components[Se.id]:null)},We=function(e){le&&le(!0),ye((function(t){return ee(ee({},t),e)}))},_e=function(){var e=ie(Se,ne);if(e){Ie(e.components[Se.id]);var t=ee(ee({},p(e,["general","components","specificErrors"])),e.general);t&&!m(t)&&a(t,(function(e){X(e)}))}else Ie(null),be(!0)},Re=function(){be(!1),Le(!1),Se.is_editing;var t=e(Se,Z);ye(t),me(p(t,["is_expanded"]),ne)},Ne=s(Me.cell,Me.ratioWidth,t({},Me.focusedFontsize,Se.is_editing||Se.is_expanded));if(Se.is_editing&&!ke){var He=Se.family,ze={component:Se,isDraft:ne,error:Be,onChange:Ve,onUseSuggestion:We,onCancel:Fe,onSave:j?Re:_e,columns:oe};if(!j)return C("div",{className:Me.component,children:[("dp"===He||"hwdp"===He)&&f(k,ee({},ze)),"agitator"===He&&f(E,ee({},ze)),"bit"===He&&f(B,ee({},ze)),"dc"===He&&f(T,ee({},ze)),"jar"===He&&f(M,ee({},ze)),"lwd"===He&&f(V,ee({},ze)),"mwd"===He&&f(_,ee({},ze)),"pdm"===He&&f(N,ee({},ze)),"rss"===He&&f(z,ee({},ze)),"stabilizer"===He&&f(U,ee({},ze)),"sub"===He&&f(G,ee({},ze)),"ur"===He&&f(K,ee({},ze)),ve&&f(x,{title:"Save Changes?",text:"You will not be able to recover it.",okText:"Save",handleClose:function(){return be(!1)},handleOk:Re})]});Le(!0)}return C("div",{className:s(Me.component,(l={},t(l,Me.componentMobile,j),t(l,Me.componentExpandedMobile,j&&Se.is_expanded),t(l,Me.componentActive,Boolean(ue)),l)),children:[C("div",{className:s(Me.row,t({},Me.rowExpanded,j&&Se.is_expanded)),children:[f("div",{className:s(Me.cell,t({},Me.componentMobileCell,j)),children:f(b,{component:Se})}),f("div",{className:Ne,children:te(Se.family)}),!j&&C(v,{children:[f("div",{className:Ne,children:f(g,{value:"bit"===Se.family?Se.size:Se.outer_diameter})}),f("div",{className:Ne,children:f(g,{value:Se.inner_diameter})}),f("div",{className:Ne,children:f(g,{value:Se.linear_weight})}),f("div",{className:Ne,children:f(g,{value:Se.length,format:"0.0"})})]}),C("div",{className:s(Me.cell,Me.actionCell),children:[f(h,{isExpanded:Se.is_expanded,classes:Me,handleExpandCollapse:function(){ye((function(e){return e.is_expanded?ee(ee({},e),{},{is_expanded:!1}):ee(ee({},e),{},{is_expanded:!0})}))}}),f(A,{classes:Me,handleOpenActionMenu:function(e){je(e.currentTarget)}})]})]}),Se.is_expanded&&C(v,{children:[j&&C(d,{container:!0,spacing:2,style:{padding:"8px 4px 16px"},children:[f(D,{label:"bit"===Se.family?"Bit Size":"OD",unit:"shortLength",value:"bit"===Se.family?Se.size:Se.outer_diameter}),"bit"!==Se.family&&f(D,{label:"ID",unit:"shortLength",value:re.inner_diameter}),"bit"!==Se.family&&f(D,{label:"Linear Weight",unit:"massPerLength",value:re.linear_weight,format:"0.0"}),f(D,{label:"Length",unit:"length",value:re.length,format:"0.0"})]}),("dp"===Se.family||"hwdp"===Se.family)&&f(O,{component:Se,columns:$}),"agitator"===Se.family&&f(y,{component:Se,columns:$}),"bit"===Se.family&&f(w,{component:Se,columns:$}),"dc"===Se.family&&f(I,{component:Se,columns:$}),"jar"===Se.family&&f(L,{component:Se,columns:$}),"lwd"===Se.family&&f(F,{component:Se,columns:$}),"mwd"===Se.family&&f(W,{component:Se,columns:$}),"pdm"===Se.family&&f(R,{component:Se,columns:$}),"rss"===Se.family&&f(H,{component:Se,columns:$}),"stabilizer"===Se.family&&f(q,{component:Se,columns:$}),"sub"===Se.family&&f(Y,{component:Se,columns:$}),"ur"===Se.family&&f(J,{component:Se,columns:$})]}),C(c,{anchorEl:ue,keepMounted:!0,open:Boolean(ue),getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:function(){je(null)},children:[f(u,{onClick:function(){je(null),ye((function(e){return ee(ee({},e),{},{is_editing:!0})}))},className:Me.menuItem,children:"Edit"}),"bit"!==Se.family&&f(u,{onClick:function(){je(null),De(!0)},className:Me.menuItem,children:"Delete"})]}),Ae&&f(x,{title:"Delete Component?",text:"You will not be able to recover it.",okText:"Delete",handleClose:function(){return De(!1)},handleOk:function(){pe(re)}}),ke&&f(Q,{component:Se,isDraft:ne,error:Be,onChange:Ve,onUseSuggestion:We,onCancel:Fe,onSave:_e,onClose:function(){Fe(),Le(!1)}}),j&&ve&&f(x,{title:"Save Changes?",text:"You will not be able to recover it.",okText:"Save",handleClose:function(){return be(!1)},handleOk:Re})]})}oe.propTypes={isMobile:l.bool.isRequired,component:l.shape({family:l.string,size:l.number,outer_diameter:l.number,inner_diameter:l.number,linear_weight:l.number,length:l.number}).isRequired,isDraft:l.bool,validate:l.func.isRequired,onCancel:l.func,onDelete:l.func,onSave:l.func.isRequired,onChangeEditing:l.func,viewColumnsPerRow:l.number.isRequired,editColumnsPerRow:l.number.isRequired,onAutocompleteApplied:l.func},oe.defaultProps={isDraft:!1,onCancel:null,onDelete:null,onChangeEditing:void 0,onAutocompleteApplied:void 0};var re=r(oe);export{re as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/objectWithoutProperties";import t from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import{memo as r,useState as i,useEffect as n}from"react";import s from"classnames";import{omit as p,isEmpty as m,map as a}from"lodash";import l from"prop-types";import{Grid as d,Menu as c,MenuItem as u}from"@material-ui/core";import"../../../../utils/index.js";import{COMPONENT_FAMILIES as j}from"../../../../constants/drillstring.js";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as C,jsx as f,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"../../../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/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.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"../../../Chart/components/ChartButton.js";import"../../../Chart/components/ChartButtons.js";import"../../../Chart/components/ChartWrapper.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"../../BHASchematic.js";import"../../BHATable/index.js";import h from"../../BHAComponentIcon.js";import"../../BHAComponentDetail/index.js";import"../../BHATileIcon.js";import"../../BHATile/BHATile.js";import"../../BHAList/BHAList.js";import"../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"./shared/CancelButton.js";import{ExpandCollapseButton as b}from"./shared/ExpandCollapseButton.js";import{FormatedNumber as g}from"./shared/FormatedNumber.js";import"./shared/InputText.js";import{MoreButton as A}from"./shared/MoreButton.js";import"./shared/SaveButton.js";import"./shared/SelectField.js";import{StaticField as D}from"./shared/StaticField.js";import"./shared/SharedEditorElements.js";import{ConfirmationPopup as x}from"./shared/ConfirmationPopup.js";import{useStyles as P}from"./sharedStyles.js";import{calculateComponent as S}from"./utils/calculation.js";import y from"./Agitator/Browser.js";import E from"./Agitator/Editor.js";import w from"./Bit/Browser.js";import B from"./Bit/Editor.js";import I from"./DrillCollar/Browser.js";import T from"./DrillCollar/Editor.js";import O from"./DrillPipe/Browser.js";import k from"./DrillPipe/Editor.js";import L from"./Jar/Browser.js";import M from"./Jar/Editor.js";import F from"./Lwd/Browser.js";import W from"./Lwd/Editor.js";import V from"./Mwd/Browser.js";import _ from"./Mwd/Editor.js";import R from"./Pdm/Browser.js";import N from"./Pdm/Editor.js";import H from"./Rss/Browser.js";import z from"./Rss/Editor.js";import q from"./Stabilizer/Browser.js";import U from"./Stabilizer/Editor.js";import Y from"./Sub/Browser.js";import G from"./Sub/Editor.js";import J from"./Ur/Browser.js";import K from"./Ur/Editor.js";import Q from"./EditComponentDialog.js";import{showErrorNotification as X}from"../../../../utils/notificationToasts.js";var Z=["is_editing"];function $(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function ee(e){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?$(Object(r),!0).forEach((function(o){t(e,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function te(e){var t;return(null===(t=j.drilling.find((function(t){return t.type===e})))||void 0===t?void 0:t.name)||"—"}function oe(r){var l,j=r.isMobile,$=r.viewColumnsPerRow,oe=r.editColumnsPerRow,re=r.component,ie=r.validate,ne=r.isDraft,se=r.onCancel,pe=r.onDelete,me=r.onSave,ae=r.onChangeEditing,le=r.onAutocompleteApplied,de=i(null),ce=o(de,2),ue=ce[0],je=ce[1],Ce=i(!1),fe=o(Ce,2),ve=fe[0],he=fe[1],be=i(!1),ge=o(be,2),Ae=ge[0],De=ge[1],xe=i(re),Pe=o(xe,2),Se=Pe[0],ye=Pe[1],Ee=i(null),we=o(Ee,2),Be=we[0],Ie=we[1],Te=i(!1),Oe=o(Te,2),ke=Oe[0],Le=Oe[1],Me=P({isMobile:j,isEditing:Se.is_editing});n((function(){ae&&ae(Se.is_editing)}),[Se.is_editing]);var Fe=function(){Ie(null),ne?se():ye(re)},We=function(e,t){var o=S(Se,e,t),r=ie(o,ne);ye(o),Ie(r?r.components[Se.id]:null)},Ve=function(e){le&&le(!0),ye((function(t){return ee(ee({},t),e)}))},_e=function(){var e=ie(Se,ne);if(e){Ie(e.components[Se.id]);var t=ee(ee({},p(e,["general","components","specificErrors"])),e.general);t&&!m(t)&&a(t,(function(e){X(e)}))}else Ie(null),he(!0)},Re=function(){he(!1),Le(!1),Se.is_editing;var t=e(Se,Z);ye(t),me(p(t,["is_expanded"]),ne)},Ne=s(Me.cell,Me.ratioWidth,t({},Me.focusedFontsize,Se.is_editing||Se.is_expanded));if(Se.is_editing&&!ke){var He=Se.family,ze={component:Se,isDraft:ne,error:Be,onChange:We,onUseSuggestion:Ve,onCancel:Fe,onSave:j?Re:_e,columns:oe};if(!j)return C("div",{className:Me.component,children:[("dp"===He||"hwdp"===He)&&f(k,ee({},ze)),"agitator"===He&&f(E,ee({},ze)),"bit"===He&&f(B,ee({},ze)),"dc"===He&&f(T,ee({},ze)),"jar"===He&&f(M,ee({},ze)),"lwd"===He&&f(W,ee({},ze)),"mwd"===He&&f(_,ee({},ze)),"pdm"===He&&f(N,ee({},ze)),"rss"===He&&f(z,ee({},ze)),"stabilizer"===He&&f(U,ee({},ze)),"sub"===He&&f(G,ee({},ze)),"ur"===He&&f(K,ee({},ze)),ve&&f(x,{title:"Save Changes?",text:"You will not be able to recover it.",okText:"Save",handleClose:function(){return he(!1)},handleOk:Re})]});Le(!0)}return C("div",{className:s(Me.component,(l={},t(l,Me.componentMobile,j),t(l,Me.componentExpandedMobile,j&&Se.is_expanded),t(l,Me.componentActive,Boolean(ue)),l)),children:[C("div",{className:s(Me.row,t({},Me.rowExpanded,j&&Se.is_expanded)),children:[f("div",{className:s(Me.cell,t({},Me.componentMobileCell,j)),children:f(h,{component:Se})}),f("div",{className:Ne,children:te(Se.family)}),!j&&C(v,{children:[f("div",{className:Ne,children:f(g,{value:"bit"===Se.family?Se.size:Se.outer_diameter})}),f("div",{className:Ne,children:f(g,{value:Se.inner_diameter})}),f("div",{className:Ne,children:f(g,{value:Se.linear_weight})}),f("div",{className:Ne,children:f(g,{value:Se.length,format:"0.0"})})]}),C("div",{className:s(Me.cell,Me.actionCell),children:[f(b,{isExpanded:Se.is_expanded,classes:Me,handleExpandCollapse:function(){ye((function(e){return e.is_expanded?ee(ee({},e),{},{is_expanded:!1}):ee(ee({},e),{},{is_expanded:!0})}))}}),f(A,{classes:Me,handleOpenActionMenu:function(e){je(e.currentTarget)}})]})]}),Se.is_expanded&&C(v,{children:[j&&C(d,{container:!0,spacing:2,style:{padding:"8px 4px 16px"},children:[f(D,{label:"bit"===Se.family?"Bit Size":"OD",unit:"shortLength",value:"bit"===Se.family?Se.size:Se.outer_diameter}),"bit"!==Se.family&&f(D,{label:"ID",unit:"shortLength",value:re.inner_diameter}),"bit"!==Se.family&&f(D,{label:"Linear Weight",unit:"massPerLength",value:re.linear_weight,format:"0.0"}),f(D,{label:"Length",unit:"length",value:re.length,format:"0.0"})]}),("dp"===Se.family||"hwdp"===Se.family)&&f(O,{component:Se,columns:$}),"agitator"===Se.family&&f(y,{component:Se,columns:$}),"bit"===Se.family&&f(w,{component:Se,columns:$}),"dc"===Se.family&&f(I,{component:Se,columns:$}),"jar"===Se.family&&f(L,{component:Se,columns:$}),"lwd"===Se.family&&f(F,{component:Se,columns:$}),"mwd"===Se.family&&f(V,{component:Se,columns:$}),"pdm"===Se.family&&f(R,{component:Se,columns:$}),"rss"===Se.family&&f(H,{component:Se,columns:$}),"stabilizer"===Se.family&&f(q,{component:Se,columns:$}),"sub"===Se.family&&f(Y,{component:Se,columns:$}),"ur"===Se.family&&f(J,{component:Se,columns:$})]}),C(c,{anchorEl:ue,keepMounted:!0,open:Boolean(ue),getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:function(){je(null)},children:[f(u,{onClick:function(){je(null),ye((function(e){return ee(ee({},e),{},{is_editing:!0})}))},className:Me.menuItem,children:"Edit"}),"bit"!==Se.family&&f(u,{onClick:function(){je(null),De(!0)},className:Me.menuItem,children:"Delete"})]}),Ae&&f(x,{title:"Delete Component?",text:"You will not be able to recover it.",okText:"Delete",handleClose:function(){return De(!1)},handleOk:function(){pe(re)}}),ke&&f(Q,{component:Se,isDraft:ne,error:Be,onChange:We,onUseSuggestion:Ve,onCancel:Fe,onSave:_e,onClose:function(){Fe(),Le(!1)}}),j&&ve&&f(x,{title:"Save Changes?",text:"You will not be able to recover it.",okText:"Save",handleClose:function(){return he(!1)},handleOk:Re})]})}oe.propTypes={isMobile:l.bool.isRequired,component:l.shape({family:l.string,size:l.number,outer_diameter:l.number,inner_diameter:l.number,linear_weight:l.number,length:l.number}).isRequired,isDraft:l.bool,validate:l.func.isRequired,onCancel:l.func,onDelete:l.func,onSave:l.func.isRequired,onChangeEditing:l.func,viewColumnsPerRow:l.number.isRequired,editColumnsPerRow:l.number.isRequired,onAutocompleteApplied:l.func},oe.defaultProps={isDraft:!1,onCancel:null,onDelete:null,onChangeEditing:void 0,onAutocompleteApplied:void 0};var re=r(oe);export{re as default};
|