@corva/ui 0.61.0-10 → 0.61.0-11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  2. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  3. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js +1 -1
  4. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
  5. package/cjs-bundle/components/EmptyState/EmptyState.js +1 -1
  6. package/cjs-bundle/components/EmptyState/constants.js +1 -1
  7. package/cjs-bundle/components/EmptyState/styles.js +1 -1
  8. package/cjs-bundle/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js +1 -1
  9. package/cjs-bundle/components/ErrorBoundary/ErrorBoundary.js +1 -1
  10. package/cjs-bundle/components/OffsetWellButton/OffsetWellButton.js +1 -1
  11. package/components/DevCenter/AppHeader/AppHeaderStyles.d.ts +1 -1
  12. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts.map +1 -1
  13. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  14. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.d.ts +2 -1
  15. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.d.ts.map +1 -1
  16. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  17. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.d.ts +2 -1
  18. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.d.ts.map +1 -1
  19. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js +1 -1
  20. package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.d.ts.map +1 -1
  21. package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
  22. package/components/EmptyState/EmptyState.d.ts +35 -3
  23. package/components/EmptyState/EmptyState.d.ts.map +1 -1
  24. package/components/EmptyState/EmptyState.js +1 -1
  25. package/components/EmptyState/constants.d.ts +32 -0
  26. package/components/EmptyState/constants.d.ts.map +1 -1
  27. package/components/EmptyState/constants.js +1 -1
  28. package/components/EmptyState/styles.js +1 -1
  29. package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.d.ts +2 -5
  30. package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.d.ts.map +1 -1
  31. package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js +1 -1
  32. package/components/ErrorBoundary/ErrorBoundary.d.ts +3 -3
  33. package/components/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  34. package/components/ErrorBoundary/ErrorBoundary.js +1 -1
  35. package/components/OffsetWellButton/OffsetWellButton.d.ts +4 -1
  36. package/components/OffsetWellButton/OffsetWellButton.d.ts.map +1 -1
  37. package/components/OffsetWellButton/OffsetWellButton.js +1 -1
  38. package/package.json +5 -4
@@ -1,6 +1,6 @@
1
1
  export const PAGE_NAME: "DC_appSettings";
2
2
  export default AppSettingsDialog;
3
- declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName, currentUser, isMultiRig, isSettingsDialogHidden, layoutEnvironment, onAppRemove, onCloneDashboard, onSettingsChange, segment, toggleAppSettingsDialog, }: {
3
+ declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName, currentUser, isMultiRig, isSettingsDialogHidden, layoutEnvironment, onAppRemove, onCloneDashboard, onSettingsChange, segment, toggleAppSettingsDialog, openIntercom, }: {
4
4
  AppSettingsComponent: any;
5
5
  app: any;
6
6
  appData: any;
@@ -14,6 +14,7 @@ declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName
14
14
  onSettingsChange: any;
15
15
  segment: any;
16
16
  toggleAppSettingsDialog: any;
17
+ openIntercom: any;
17
18
  }): JSX.Element;
18
19
  declare namespace AppSettingsDialog {
19
20
  namespace propTypes {
@@ -1 +1 @@
1
- {"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js"],"names":[],"mappings":"AA8BA,yCAA0C;;AAW1C;;;;;;;;;;;;;;gBAuJC"}
1
+ {"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js"],"names":[],"mappings":"AA8BA,yCAA0C;;AAW1C;;;;;;;;;;;;;;;gBAwJC"}
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as i}from"react";import{func as o,shape as r,string as s,bool as n}from"prop-types";import{withStyles as p,Dialog as a,Tabs as m,DialogTitle as l,Divider as d,DialogContent as c,Tab as j,DialogActions as u}from"@material-ui/core";import{cloneDeep as C,get as g,noop as A}from"lodash";import b from"../../../../ErrorBoundary/ErrorBoundary.js";import S from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import{jsxs as f,jsx as h,Fragment as P}from"react/jsx-runtime";import"../AppActions/AppActions.css.js";import"../AppSettingsDialogV2/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../DevCenterAppView/DevCenterAppView.js";import"../DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../Modal/CorvaModal.js";import"uuid";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import"../../../../AppIcon/AppIcon.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"classnames";import"@material-ui/icons";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{DEV_CENTER_CLI_APP_ID as v}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENTS as D,SEGMENT_TO_ASSET_TYPE as y}from"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"../../../../../utils/env.js";import"../../../../GradientManager/configuration/constants.js";import"../../../../../utils/index.js";import"jsona";import"../../../../StatusBadge/constants.js";import"../../../../HelpCenter/HelpCenterIcon.js";import"../../../AppContext.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import x from"../../../../AssetEditor/index.js";import"../../../../AssetEditorV2/index.js";import T from"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Typography.js";import"../../../../RealTimeValuesSidebar/RealTimeSidebar.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"../../../../EmptyState/EmptyState.js";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"../../../../Chart/components/AxisDropdown.js";import"../../../../Chart/components/ChartSelect.js";import"../../../../Chart/components/buttons/DragToZoomButton.js";import"../../../../Chart/components/buttons/ZoomInButton.js";import"../../../../Chart/components/buttons/ZoomOutButton.js";import"../../../../Chart/components/buttons/PanButton.js";import"../../../../Chart/components/buttons/ResetZoomButton.js";import"../../../../Chart/components/buttons/HideAxesButton.js";import"../../../../Chart/components/buttons/ChartTypeButton.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../TruncatedText/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../AdvancedSlider/AdvancedSlider.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import I from"../../../../Button/index.js";import"../../../../ContextMenuItem/index.js";import"../../../../FolderMenuItem/index.js";import"../../../../EditableItem/EditableItem/index.js";import"../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../Checkbox/index.js";import"../../../../FolderMenuItemWithLinks/index.js";import"../../../../IconButton/index.js";import"../../../../TextField/index.js";import"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../Select/SelectFilterBy.js";import"../../../../CustomSelect/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../../GradientManager/GradientSelect.styles.js";import"../../../../GradientPicker/GradientPicker.js";import"../../../../GradientManager/GradientManager.styles.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 E from"../../../../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"../../../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../../../Notifications/Toast.js";import"../../../../Toaster/Toaster.js";import B from"../../../../ConfirmationDialog.js";import"../../../../TextLink/index.js";import"../../../../Avatar/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../Template/TemplateSharingDialog/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"../../../../Table/TableContainer/TableContainer.js";import"../../../../Table/TableCell/TableCell.js";import"../../../../Tooltip/ScrollableTooltip.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"../../../../StatusBadge/index.js";import"../../../../Attachment/index.js";import"../../../../EmojiIconButton.js";import"../../../../FileUploadIconButton.js";import"../../../../FilePreview/index.js";import"../../../../FailedFileUploading.js";import"../../../../UserMention/index.js";import"../../../../CommentsInfo/index.js";import"../../../../CommentInput/index.js";import"../../../../Comment/index.js";import"../../../../CommentLoader.js";import"../../../../AssetNameLabel/AssetStatusBadge.js";import"../../../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../../../AssetEditorV2/components/SelectItem.js";import k from"./RemoveAppButton.js";import O from"./AppDetails.js";import V from"./AppSettingsDialog.module.css.js";function L(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function F(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?L(Object(o),!0).forEach((function(i){t(e,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):L(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var R="DC_appSettings",w=p({paper:{minWidth:"50rem",height:"40rem"}})(a),M=p({root:{marginBottom:10}})(m),W="SETTINGS",H="APP DETAILS";function G(o){var r=o.AppSettingsComponent,s=o.app,n=o.appData,p=o.appName,a=o.currentUser,m=o.isMultiRig,A=o.isSettingsDialogHidden,L=o.layoutEnvironment,G=o.onAppRemove,N=o.onCloneDashboard,q=o.onSettingsChange,U=o.segment,_=o.toggleAppSettingsDialog,z=i(W),Z=e(z,2),K=Z[0],Y=Z[1],J=i((function(){var t;return F(F({},C(s.settings)),{},{package:s.settings.package||(null==s||null===(t=s.package)||void 0===t?void 0:t.version)})})),Q=e(J,2),X=Q[0],$=Q[1],tt=i(!0),et=e(tt,2),it=et[0],ot=et[1],rt=s.id===v,st=function(e,i){return $((function(o){return F(F({},o),{},t({},e,i))}))},nt=function(t){return $((function(e){return F(F({},e),t)}))},pt=L&&"asset"===L.type,at=!(m||pt&&U===D.COMPLETION);return f(w,{open:!0,onBackdropClick:_,children:[f(l,{children:[p," settings"]}),h(d,{}),f(c,{children:[f(M,{value:K,onChange:function(t,e){return Y(e)},indicatorColor:"primary",textColor:"primary",children:[h(j,{"data-testid":"".concat(R,"_settingsTab"),label:W,value:W}),h(j,{"data-testid":"".concat(R,"_appDetailsTab"),label:H,value:H}),h(I,{"data-testid":"".concat(R,"_viewAppPageTab"),className:V.viewAppButton,onClick:function(){var t,e;return window.open((e=null==s||null===(t=s.app)||void 0===t?void 0:t.id,"/app-store/app/".concat(e)),"_blank")},children:"VIEW APP PAGE"})]}),f(b,{ErrorView:S,app:s,children:[h(B,{open:!it&&!X.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return ot(!0)}}),K===W&&f(P,{children:[A&&h(E,{}),!A&&f(P,{children:[at&&h(x,{appKey:rt?null:s.app.app_key,settings:X,onSettingsChange:nt,appType:y[U],isNullable:pt,label:"Active Asset"}),r&&h(r,{app:s,appData:n,settings:X,onSettingChange:st,onSettingsChange:nt,layoutEnvironment:L,currentUser:a}),h(T,{appId:s.app.id,value:X.package,onChange:function(t){return st("package",t)}})]})]}),K===H&&h(O,{appDescription:g(s,"app.description"),appSummary:g(s,"app.summary")})]})]}),f(u,{children:[!A&&G&&h(k,{appName:p,onAppRemove:G}),h(I,{"data-testid":"".concat(R,"_cancel"),variation:"secondary",onClick:_,children:"Cancel"}),A&&h(I,{variation:"primary",onClick:function(){return N()},children:"Copy Dashboard"}),!A&&h(I,{"data-testid":"".concat(R,"_save"),variation:"primary",onClick:function(){X.package||rt?(q(X),_()):ot(!1)},children:"Save"})]})]})}G.propTypes={AppSettingsComponent:o,app:r({}).isRequired,appData:r({}).isRequired,appName:s.isRequired,currentUser:r({}).isRequired,isMultiRig:n.isRequired,isSettingsDialogHidden:n,layoutEnvironment:r({}).isRequired,onAppRemove:o,onCloneDashboard:o,onSettingsChange:o.isRequired,segment:s.isRequired,toggleAppSettingsDialog:o.isRequired},G.defaultProps={AppSettingsComponent:null,isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:A};export{R as PAGE_NAME,G as default};
1
+ import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as o}from"react";import{func as i,shape as r,string as s,bool as n}from"prop-types";import{withStyles as p,Dialog as a,Tabs as m,DialogTitle as l,Divider as d,DialogContent as c,Tab as j,DialogActions as u}from"@material-ui/core";import{cloneDeep as C,get as g,noop as A}from"lodash";import b from"../../../../ErrorBoundary/ErrorBoundary.js";import S from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import{jsxs as f,jsx as h,Fragment as P}from"react/jsx-runtime";import"../AppActions/AppActions.css.js";import"../AppSettingsDialogV2/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../DevCenterAppView/DevCenterAppView.js";import"../DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../Modal/CorvaModal.js";import"uuid";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import"../../../../AppIcon/AppIcon.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"classnames";import"@material-ui/icons";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{DEV_CENTER_CLI_APP_ID as v}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENTS as D,SEGMENT_TO_ASSET_TYPE as y}from"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"../../../../../utils/env.js";import"../../../../GradientManager/configuration/constants.js";import"../../../../../utils/index.js";import"jsona";import"../../../../StatusBadge/constants.js";import"../../../../HelpCenter/HelpCenterIcon.js";import"../../../AppContext.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import x from"../../../../AssetEditor/index.js";import"../../../../AssetEditorV2/index.js";import T from"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Typography.js";import"../../../../RealTimeValuesSidebar/RealTimeSidebar.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"../../../../EmptyState/EmptyState.js";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"../../../../Chart/components/AxisDropdown.js";import"../../../../Chart/components/ChartSelect.js";import"../../../../Chart/components/buttons/DragToZoomButton.js";import"../../../../Chart/components/buttons/ZoomInButton.js";import"../../../../Chart/components/buttons/ZoomOutButton.js";import"../../../../Chart/components/buttons/PanButton.js";import"../../../../Chart/components/buttons/ResetZoomButton.js";import"../../../../Chart/components/buttons/HideAxesButton.js";import"../../../../Chart/components/buttons/ChartTypeButton.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../TruncatedText/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../AdvancedSlider/AdvancedSlider.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import I from"../../../../Button/index.js";import"../../../../ContextMenuItem/index.js";import"../../../../FolderMenuItem/index.js";import"../../../../EditableItem/EditableItem/index.js";import"../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../Checkbox/index.js";import"../../../../FolderMenuItemWithLinks/index.js";import"../../../../IconButton/index.js";import"../../../../TextField/index.js";import"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../Select/SelectFilterBy.js";import"../../../../CustomSelect/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../../GradientManager/GradientSelect.styles.js";import"../../../../GradientPicker/GradientPicker.js";import"../../../../GradientManager/GradientManager.styles.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 E from"../../../../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"../../../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../../../Notifications/Toast.js";import"../../../../Toaster/Toaster.js";import B from"../../../../ConfirmationDialog.js";import"../../../../TextLink/index.js";import"../../../../Avatar/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../Template/TemplateSharingDialog/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"../../../../Table/TableContainer/TableContainer.js";import"../../../../Table/TableCell/TableCell.js";import"../../../../Tooltip/ScrollableTooltip.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"../../../../StatusBadge/index.js";import"../../../../Attachment/index.js";import"../../../../EmojiIconButton.js";import"../../../../FileUploadIconButton.js";import"../../../../FilePreview/index.js";import"../../../../FailedFileUploading.js";import"../../../../UserMention/index.js";import"../../../../CommentsInfo/index.js";import"../../../../CommentInput/index.js";import"../../../../Comment/index.js";import"../../../../CommentLoader.js";import"../../../../AssetNameLabel/AssetStatusBadge.js";import"../../../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../../../AssetEditorV2/components/SelectItem.js";import k from"./RemoveAppButton.js";import O from"./AppDetails.js";import V from"./AppSettingsDialog.module.css.js";function L(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function F(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?L(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var R="DC_appSettings",w=p({paper:{minWidth:"50rem",height:"40rem"}})(a),M=p({root:{marginBottom:10}})(m),W="SETTINGS",H="APP DETAILS";function G(i){var r=i.AppSettingsComponent,s=i.app,n=i.appData,p=i.appName,a=i.currentUser,m=i.isMultiRig,A=i.isSettingsDialogHidden,L=i.layoutEnvironment,G=i.onAppRemove,N=i.onCloneDashboard,q=i.onSettingsChange,U=i.segment,_=i.toggleAppSettingsDialog,z=i.openIntercom,Z=o(W),K=e(Z,2),Y=K[0],J=K[1],Q=o((function(){var t;return F(F({},C(s.settings)),{},{package:s.settings.package||(null==s||null===(t=s.package)||void 0===t?void 0:t.version)})})),X=e(Q,2),$=X[0],tt=X[1],et=o(!0),ot=e(et,2),it=ot[0],rt=ot[1],st=s.id===v,nt=function(e,o){return tt((function(i){return F(F({},i),{},t({},e,o))}))},pt=function(t){return tt((function(e){return F(F({},e),t)}))},at=L&&"asset"===L.type,mt=!(m||at&&U===D.COMPLETION);return f(w,{open:!0,onBackdropClick:_,children:[f(l,{children:[p," settings"]}),h(d,{}),f(c,{children:[f(M,{value:Y,onChange:function(t,e){return J(e)},indicatorColor:"primary",textColor:"primary",children:[h(j,{"data-testid":"".concat(R,"_settingsTab"),label:W,value:W}),h(j,{"data-testid":"".concat(R,"_appDetailsTab"),label:H,value:H}),h(I,{"data-testid":"".concat(R,"_viewAppPageTab"),className:V.viewAppButton,onClick:function(){var t,e;return window.open((e=null==s||null===(t=s.app)||void 0===t?void 0:t.id,"/app-store/app/".concat(e)),"_blank")},children:"VIEW APP PAGE"})]}),f(b,{ErrorView:S,openIntercom:z,children:[h(B,{open:!it&&!$.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return rt(!0)}}),Y===W&&f(P,{children:[A&&h(E,{}),!A&&f(P,{children:[mt&&h(x,{appKey:st?null:s.app.app_key,settings:$,onSettingsChange:pt,appType:y[U],isNullable:at,label:"Active Asset"}),r&&h(r,{app:s,appData:n,settings:$,onSettingChange:nt,onSettingsChange:pt,layoutEnvironment:L,currentUser:a}),h(T,{appId:s.app.id,value:$.package,onChange:function(t){return nt("package",t)}})]})]}),Y===H&&h(O,{appDescription:g(s,"app.description"),appSummary:g(s,"app.summary")})]})]}),f(u,{children:[!A&&G&&h(k,{appName:p,onAppRemove:G}),h(I,{"data-testid":"".concat(R,"_cancel"),variation:"secondary",onClick:_,children:"Cancel"}),A&&h(I,{variation:"primary",onClick:function(){return N()},children:"Copy Dashboard"}),!A&&h(I,{"data-testid":"".concat(R,"_save"),variation:"primary",onClick:function(){$.package||st?(q($),_()):rt(!1)},children:"Save"})]})]})}G.propTypes={AppSettingsComponent:i,app:r({}).isRequired,appData:r({}).isRequired,appName:s.isRequired,currentUser:r({}).isRequired,isMultiRig:n.isRequired,isSettingsDialogHidden:n,layoutEnvironment:r({}).isRequired,onAppRemove:i,onCloneDashboard:i,onSettingsChange:i.isRequired,segment:s.isRequired,toggleAppSettingsDialog:i.isRequired},G.defaultProps={AppSettingsComponent:null,isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:A};export{R as PAGE_NAME,G as default};
@@ -1,6 +1,6 @@
1
1
  export const PAGE_NAME: "DC_appSettings";
2
2
  export default AppSettingsDialog;
3
- declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName, currentUser, isMultiRig, isSettingsDialogHidden, layoutEnvironment, onAppRemove, onCloneDashboard, onSettingsChange, segment, toggleAppSettingsDialog, }: {
3
+ declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName, currentUser, isMultiRig, isSettingsDialogHidden, layoutEnvironment, onAppRemove, onCloneDashboard, onSettingsChange, openIntercom, segment, toggleAppSettingsDialog, }: {
4
4
  AppSettingsComponent: any;
5
5
  app: any;
6
6
  appData: any;
@@ -12,6 +12,7 @@ declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName
12
12
  onAppRemove: any;
13
13
  onCloneDashboard: any;
14
14
  onSettingsChange: any;
15
+ openIntercom: any;
15
16
  segment: any;
16
17
  toggleAppSettingsDialog: any;
17
18
  }): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js"],"names":[],"mappings":"AAyBA,yCAA0C;;AAI1C;;;;;;;;;;;;;;gBAqNC"}
1
+ {"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js"],"names":[],"mappings":"AAyBA,yCAA0C;;AAI1C;;;;;;;;;;;;;;;gBAsNC"}
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as o,useRef as i,useEffect as r}from"react";import{node as n,shape as s,string as p,bool as a,func as m}from"prop-types";import{cloneDeep as l,noop as d}from"lodash";import{Accordion as c,AccordionSummary as j,AccordionDetails as u}from"@material-ui/core";import{ArrowForward as C,ExpandMore as g}from"@material-ui/icons";import A from"../../../../ErrorBoundary/ErrorBoundary.js";import S from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import h from"../../../../Modal/Modal.js";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import{AppIcon as f}from"../../../../AppIcon/AppIcon.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"classnames";import"../../../../Icons/AnnotationIcon.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import{DEV_CENTER_CLI_APP_ID as b}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENTS as v,SEGMENT_TO_ASSET_TYPE as P}from"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"../../../../../utils/env.js";import"../../../../GradientManager/configuration/constants.js";import"../../../../../utils/index.js";import"uuid";import"jsona";import"../../../../StatusBadge/constants.js";import"../../../../HelpCenter/HelpCenterIcon.js";import"../AppActions/AppActions.css.js";import{jsx as x,jsxs as D,Fragment as y}from"react/jsx-runtime";import"../AppSettingsDialog/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../DevCenterAppView/DevCenterAppView.js";import"../DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../AppContext.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../AssetEditor/index.js";import I from"../../../../AssetEditorV2/index.js";import T from"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Typography.js";import"../../../../RealTimeValuesSidebar/RealTimeSidebar.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"../../../../EmptyState/EmptyState.js";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"../../../../Chart/components/AxisDropdown.js";import"../../../../Chart/components/ChartSelect.js";import"../../../../Chart/components/buttons/DragToZoomButton.js";import"../../../../Chart/components/buttons/ZoomInButton.js";import"../../../../Chart/components/buttons/ZoomOutButton.js";import"../../../../Chart/components/buttons/PanButton.js";import"../../../../Chart/components/buttons/ResetZoomButton.js";import"../../../../Chart/components/buttons/HideAxesButton.js";import"../../../../Chart/components/buttons/ChartTypeButton.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../TruncatedText/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../AdvancedSlider/AdvancedSlider.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import E from"../../../../Button/index.js";import"../../../../ContextMenuItem/index.js";import"../../../../FolderMenuItem/index.js";import"../../../../EditableItem/EditableItem/index.js";import"../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../Checkbox/index.js";import"../../../../FolderMenuItemWithLinks/index.js";import"../../../../IconButton/index.js";import"../../../../TextField/index.js";import"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../Select/SelectFilterBy.js";import"../../../../CustomSelect/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../../GradientManager/GradientSelect.styles.js";import"../../../../GradientPicker/GradientPicker.js";import"../../../../GradientManager/GradientManager.styles.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 B from"../../../../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"../../../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../../../Notifications/Toast.js";import"../../../../Toaster/Toaster.js";import k from"../../../../ConfirmationDialog.js";import"../../../../TextLink/index.js";import"../../../../Avatar/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../Template/TemplateSharingDialog/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"../../../../Table/TableContainer/TableContainer.js";import"../../../../Table/TableCell/TableCell.js";import"../../../../Tooltip/ScrollableTooltip.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"../../../../StatusBadge/index.js";import"../../../../Attachment/index.js";import"../../../../EmojiIconButton.js";import"../../../../FileUploadIconButton.js";import"../../../../FilePreview/index.js";import"../../../../FailedFileUploading.js";import"../../../../UserMention/index.js";import"../../../../CommentsInfo/index.js";import"../../../../CommentInput/index.js";import"../../../../Comment/index.js";import"../../../../CommentLoader.js";import"../../../../AssetNameLabel/AssetStatusBadge.js";import"../../../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../../../AssetEditorV2/components/SelectItem.js";import O from"./RemoveAppButton.js";import V from"./styles.js";function L(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function F(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?L(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var M="DC_appSettings";function R(n){var s,p=n.AppSettingsComponent,a=n.app,m=n.appData,d=n.appName,L=n.currentUser,M=n.isMultiRig,R=n.isSettingsDialogHidden,w=n.layoutEnvironment,N=n.onAppRemove,W=n.onCloneDashboard,H=n.onSettingsChange,G=n.segment,q=n.toggleAppSettingsDialog,U=o((function(){var t;return F(F({},l(a.settings)),{},{package:a.settings.package||(null==a||null===(t=a.package)||void 0===t?void 0:t.version)})})),_=e(U,2),z=_[0],Z=_[1],K=o(!1),Y=e(K,2),J=Y[0],Q=Y[1],X=o(!1),$=e(X,2),tt=$[0],et=$[1],ot=o(!0),it=e(ot,2),rt=it[0],nt=it[1],st=V({isCompletionApp:G===v.COMPLETION}),pt=i(),at=a.id===b,mt=function(e,o){return Z((function(i){return F(F({},i),{},t({},e,o))}))},lt=function(t){return Z((function(e){return F(F({},e),t)}))},dt=w&&"asset"===w.type,ct=!(M||dt&&G===v.COMPLETION);r((function(){Q(!0)}),[]),r((function(){var t;J&&et(Boolean(null===(t=pt.current)||void 0===t?void 0:t.clientHeight))}),[J]);var jt=x(p,{app:a,appData:m,settings:z,onSettingChange:mt,onSettingsChange:lt,layoutEnvironment:w,currentUser:L}),ut=D("div",{className:st.modalTitleContainer,children:[x(f,{className:st.appIcon,segment:null==a?void 0:a.segment,iconUrl:null==a||null===(s=a.icon)||void 0===s?void 0:s.url,height:48,width:48}),D("div",{children:[x("div",{children:"".concat(d," Settings")}),D("div",{className:st.appStoreButton,onClick:function(){var t,e;return window.open((e=null==a||null===(t=a.app)||void 0===t?void 0:t.id,"/app-store/app/".concat(e)),"_top")},children:["Open in Appstore ",x(C,{className:st.arrowIcon})]})]})]}),Ct=D("div",{className:st.modalActions,children:[!R&&N&&x(O,{appName:d,onAppRemove:N}),D("div",{className:st.mainActions,children:[x(E,{"data-testid":"".concat("DC_appSettings","_cancel"),variation:"secondary",onClick:q,children:"Cancel"}),R&&x(E,{variation:"primary",onClick:function(){return W()},children:"Copy Dashboard"}),!R&&x(E,{"data-testid":"".concat("DC_appSettings","_save"),className:st.saveButton,variation:"primary",onClick:function(){z.package||at?(H(z),q()):nt(!1)},children:"Save"})]})]}),gt=D(y,{children:[ct&&x(I,{appKey:at?null:a.app.app_key,settings:z,onSettingsChange:lt,appType:P[G],isNullable:dt,label:"Asset",isHiddenTitle:!0}),x(T,{className:st.appVersionSelect,appId:a.app.id,value:z.package,onChange:function(t){return mt("package",t)}})]});return D(h,{open:!0,onClose:q,title:ut,contentContainerClassName:st.modalContainer,modalTitleClassName:st.modalTitle,closeIconClassName:st.closeIcon,contentClassName:st.modalContent,actions:Ct,children:[!tt&&x("div",{className:st.hiddenAppSettings,ref:pt,children:jt}),D(A,{ErrorView:S,app:a,children:[x(k,{open:!rt&&!z.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return nt(!0)}}),R&&x(B,{}),!R&&tt&&D(y,{children:[D(c,{defaultExpanded:!0,className:st.assetAccordion,children:[x(j,{classes:{content:st.summaryContent,expandIcon:st.expandIcon},expandIcon:x(g,{}),children:"Asset"}),x(u,{classes:{root:st.accordionDetails},children:gt})]}),D(c,{className:st.accordion,defaultExpanded:!0,children:[x(j,{classes:{content:st.summaryContent,expandIcon:st.expandIcon},expandIcon:x(g,{}),children:"App Settings"}),x(u,{classes:{root:st.accordionDetails},children:jt})]})]}),!R&&!tt&&gt]})]})}R.propTypes={AppSettingsComponent:n,app:s({}).isRequired,appData:s({}).isRequired,appName:p.isRequired,currentUser:s({}).isRequired,isMultiRig:a.isRequired,isSettingsDialogHidden:a,layoutEnvironment:s({}).isRequired,onAppRemove:m,onCloneDashboard:m,onSettingsChange:m.isRequired,segment:p.isRequired,toggleAppSettingsDialog:m.isRequired},R.defaultProps={AppSettingsComponent:null,isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:d};export{M as PAGE_NAME,R as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as o,useRef as i,useEffect as r}from"react";import{node as n,shape as s,string as p,bool as a,func as m}from"prop-types";import{cloneDeep as l,noop as d}from"lodash";import{Accordion as c,AccordionSummary as j,AccordionDetails as u}from"@material-ui/core";import{ArrowForward as C,ExpandMore as g}from"@material-ui/icons";import A from"../../../../ErrorBoundary/ErrorBoundary.js";import S from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import h from"../../../../Modal/Modal.js";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import{AppIcon as f}from"../../../../AppIcon/AppIcon.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"classnames";import"../../../../Icons/AnnotationIcon.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import{DEV_CENTER_CLI_APP_ID as b}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENTS as v,SEGMENT_TO_ASSET_TYPE as P}from"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"../../../../../utils/env.js";import"../../../../GradientManager/configuration/constants.js";import"../../../../../utils/index.js";import"uuid";import"jsona";import"../../../../StatusBadge/constants.js";import"../../../../HelpCenter/HelpCenterIcon.js";import"../AppActions/AppActions.css.js";import{jsx as x,jsxs as D,Fragment as I}from"react/jsx-runtime";import"../AppSettingsDialog/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../DevCenterAppView/DevCenterAppView.js";import"../DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../AppContext.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../AssetEditor/index.js";import y from"../../../../AssetEditorV2/index.js";import T from"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Typography.js";import"../../../../RealTimeValuesSidebar/RealTimeSidebar.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"../../../../EmptyState/EmptyState.js";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"../../../../Chart/components/AxisDropdown.js";import"../../../../Chart/components/ChartSelect.js";import"../../../../Chart/components/buttons/DragToZoomButton.js";import"../../../../Chart/components/buttons/ZoomInButton.js";import"../../../../Chart/components/buttons/ZoomOutButton.js";import"../../../../Chart/components/buttons/PanButton.js";import"../../../../Chart/components/buttons/ResetZoomButton.js";import"../../../../Chart/components/buttons/HideAxesButton.js";import"../../../../Chart/components/buttons/ChartTypeButton.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../TruncatedText/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../AdvancedSlider/AdvancedSlider.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import E from"../../../../Button/index.js";import"../../../../ContextMenuItem/index.js";import"../../../../FolderMenuItem/index.js";import"../../../../EditableItem/EditableItem/index.js";import"../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../Checkbox/index.js";import"../../../../FolderMenuItemWithLinks/index.js";import"../../../../IconButton/index.js";import"../../../../TextField/index.js";import"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../Select/SelectFilterBy.js";import"../../../../CustomSelect/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../../GradientManager/GradientSelect.styles.js";import"../../../../GradientPicker/GradientPicker.js";import"../../../../GradientManager/GradientManager.styles.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 B from"../../../../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"../../../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../../../Notifications/Toast.js";import"../../../../Toaster/Toaster.js";import k from"../../../../ConfirmationDialog.js";import"../../../../TextLink/index.js";import"../../../../Avatar/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../Template/TemplateSharingDialog/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"../../../../Table/TableContainer/TableContainer.js";import"../../../../Table/TableCell/TableCell.js";import"../../../../Tooltip/ScrollableTooltip.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"../../../../StatusBadge/index.js";import"../../../../Attachment/index.js";import"../../../../EmojiIconButton.js";import"../../../../FileUploadIconButton.js";import"../../../../FilePreview/index.js";import"../../../../FailedFileUploading.js";import"../../../../UserMention/index.js";import"../../../../CommentsInfo/index.js";import"../../../../CommentInput/index.js";import"../../../../Comment/index.js";import"../../../../CommentLoader.js";import"../../../../AssetNameLabel/AssetStatusBadge.js";import"../../../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../../../AssetEditorV2/components/SelectItem.js";import O from"./RemoveAppButton.js";import V from"./styles.js";function L(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function F(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?L(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var M="DC_appSettings";function R(n){var s,p=n.AppSettingsComponent,a=n.app,m=n.appData,d=n.appName,L=n.currentUser,M=n.isMultiRig,R=n.isSettingsDialogHidden,w=n.layoutEnvironment,N=n.onAppRemove,W=n.onCloneDashboard,H=n.onSettingsChange,G=n.openIntercom,q=n.segment,U=n.toggleAppSettingsDialog,_=o((function(){var e;return F(F({},l(a.settings)),{},{package:a.settings.package||(null==a||null===(e=a.package)||void 0===e?void 0:e.version)})})),z=t(_,2),Z=z[0],K=z[1],Y=o(!1),J=t(Y,2),Q=J[0],X=J[1],$=o(!1),ee=t($,2),te=ee[0],oe=ee[1],ie=o(!0),re=t(ie,2),ne=re[0],se=re[1],pe=V({isCompletionApp:q===v.COMPLETION}),ae=i(),me=a.id===b,le=function(t,o){return K((function(i){return F(F({},i),{},e({},t,o))}))},de=function(e){return K((function(t){return F(F({},t),e)}))},ce=w&&"asset"===w.type,je=!(M||ce&&q===v.COMPLETION);r((function(){X(!0)}),[]),r((function(){var e;Q&&oe(Boolean(null===(e=ae.current)||void 0===e?void 0:e.clientHeight))}),[Q]);var ue=x(p,{app:a,appData:m,settings:Z,onSettingChange:le,onSettingsChange:de,layoutEnvironment:w,currentUser:L}),Ce=D("div",{className:pe.modalTitleContainer,children:[x(f,{className:pe.appIcon,segment:null==a?void 0:a.segment,iconUrl:null==a||null===(s=a.icon)||void 0===s?void 0:s.url,height:48,width:48}),D("div",{children:[x("div",{children:"".concat(d," Settings")}),D("div",{className:pe.appStoreButton,onClick:function(){var e,t;return window.open((t=null==a||null===(e=a.app)||void 0===e?void 0:e.id,"/app-store/app/".concat(t)),"_top")},children:["Open in Appstore ",x(C,{className:pe.arrowIcon})]})]})]}),ge=D("div",{className:pe.modalActions,children:[!R&&N&&x(O,{appName:d,onAppRemove:N}),D("div",{className:pe.mainActions,children:[x(E,{"data-testid":"".concat("DC_appSettings","_cancel"),variation:"secondary",onClick:U,children:"Cancel"}),R&&x(E,{variation:"primary",onClick:function(){return W()},children:"Copy Dashboard"}),!R&&x(E,{"data-testid":"".concat("DC_appSettings","_save"),className:pe.saveButton,variation:"primary",onClick:function(){Z.package||me?(H(Z),U()):se(!1)},children:"Save"})]})]}),Ae=D(I,{children:[je&&x(y,{appKey:me?null:a.app.app_key,settings:Z,onSettingsChange:de,appType:P[q],isNullable:ce,label:"Asset",isHiddenTitle:!0}),x(T,{className:pe.appVersionSelect,appId:a.app.id,value:Z.package,onChange:function(e){return le("package",e)}})]});return D(h,{open:!0,onClose:U,title:Ce,contentContainerClassName:pe.modalContainer,modalTitleClassName:pe.modalTitle,closeIconClassName:pe.closeIcon,contentClassName:pe.modalContent,actions:ge,children:[!te&&x("div",{className:pe.hiddenAppSettings,ref:ae,children:ue}),D(A,{ErrorView:S,openIntercom:G,children:[x(k,{open:!ne&&!Z.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return se(!0)}}),R&&x(B,{}),!R&&te&&D(I,{children:[D(c,{defaultExpanded:!0,className:pe.assetAccordion,children:[x(j,{classes:{content:pe.summaryContent,expandIcon:pe.expandIcon},expandIcon:x(g,{}),children:"Asset"}),x(u,{classes:{root:pe.accordionDetails},children:Ae})]}),D(c,{className:pe.accordion,defaultExpanded:!0,children:[x(j,{classes:{content:pe.summaryContent,expandIcon:pe.expandIcon},expandIcon:x(g,{}),children:"App Settings"}),x(u,{classes:{root:pe.accordionDetails},children:ue})]})]}),!R&&!te&&Ae]})]})}R.propTypes={AppSettingsComponent:n,app:s({}).isRequired,appData:s({}).isRequired,appName:p.isRequired,currentUser:s({}).isRequired,isMultiRig:a.isRequired,isSettingsDialogHidden:a,layoutEnvironment:s({}).isRequired,onAppRemove:m,onCloneDashboard:m,onSettingsChange:m.isRequired,segment:p.isRequired,toggleAppSettingsDialog:m.isRequired},R.defaultProps={AppSettingsComponent:null,isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:d};export{M as PAGE_NAME,R as default};
@@ -1 +1 @@
1
- {"version":3,"file":"DevCenterAppView.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.tsx"],"names":[],"mappings":";AAQA,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,MAAyC,CAAC;AAEnG,iBAAS,gBAAgB,CAAC,EACxB,YAAY,EACZ,GAAG,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,uBAAuB,GACxB;;;;;;;;;;;;;CAAA,eA4IA;kBAzJQ,gBAAgB;;;;;;;;AAkKzB,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"DevCenterAppView.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.tsx"],"names":[],"mappings":";AASA,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,MAAyC,CAAC;AAEnG,iBAAS,gBAAgB,CAAC,EACxB,YAAY,EACZ,GAAG,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,uBAAuB,GACxB;;;;;;;;;;;;;CAAA,eAgIA;kBA7IQ,gBAAgB;;;;;;;;AAsJzB,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- import{__assign as t}from'./../../../../../ext-esm/tslib/tslib.es6.js';import{jsx as e}from"react/jsx-runtime";import r from"../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import i from"../../../../LoadingIndicator/LoadingIndicator.js";import{SEGMENTS as p}from"../../../../../constants/segment.js";import o from"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import n from"../../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import{ChooseAssetButton as a}from"./components/ChooseAssetButton.js";import s from"../AppInfoMessage/AppInfoMessage.js";var l=function(t){return"".concat(t," has no active well")};function S(S){var E,u=S.AppComponent,c=S.app,A=S.appData,d=S.appProps,m=S.availability,P=S.isCLIApp,f=S.isLoading,T=S.isMultiRig,g=S.layoutEnvironment,M=S.openIntercom,b=S.segment,_=S.toggleAppSettingsDialog;if(!c.package)return e(s,t({app:c},{children:e(o,{title:o.APP_MESSAGES.appPackageWasNotFound.title,subtitle:o.APP_MESSAGES.appPackageWasNotFound.subtitle,state:o.EMPTY_STATES.error})}));if(f)return e(s,t({app:c},{children:e(i,{})}));if(!m.hasProductSubscription||!m.isAppSubscribedForAsset){var y=o.APP_MESSAGES,h=y.appNotSubscribed,v=y.appNotSubscribedForAsset,w=o.EMPTY_STATES,I=m.hasProductSubscription?v:h,F=I.title,N=I.subtitle;return e(s,t({app:c},{children:e(o,{title:F,subtitle:N,state:w.noSubscription})}))}if(!u)return e(s,t({app:c},{children:e(o,{title:o.APP_MESSAGES.appComponentWasNotFound.title,state:o.EMPTY_STATES.empty})}));if(!T){var j=P&&e(a,{toggleAppSettingsDialog:_});if(A.rig&&!A.well)return e(s,t({app:c},{children:e(o,{actions:j,title:l(A.rig.name),state:o.EMPTY_STATES.empty})}));if("general"===(null==g?void 0:g.type)&&b===p.COMPLETION&&!A.fracFleet)return e(s,t({app:c},{children:e(o,{actions:j,title:o.APP_MESSAGES.fracFleetWasNotFound.title,state:o.EMPTY_STATES.empty})}));if("general"===(null==g?void 0:g.type)&&b===p.COMPLETION&&!(null===(E=A.fracFleet)||void 0===E?void 0:E.current_pad_id)&&!c.settings.padId)return e(s,t({app:c},{children:e(o,{actions:j,title:o.APP_MESSAGES.fracFleetHasNoPad.title,state:o.EMPTY_STATES.empty})}));if("general"===(null==g?void 0:g.type)&&b===p.COMPLETION&&(!A.wells||A.wells.length<1))return e(s,t({app:c},{children:e(o,{actions:j,title:o.APP_MESSAGES.padHasNoWells.title,state:o.EMPTY_STATES.empty})}));if(!(A.rig||A.well||A.settings||A.wells))return e(s,t({app:c},{children:e(o,{actions:j,state:o.EMPTY_STATES.empty,title:o.APP_MESSAGES.noAssetData.title})}))}return e(r,t({ErrorView:function(r){return e(o,t({},r,{title:o.APP_MESSAGES.internalAppError.title,subtitle:e(n,{openIntercom:M}),state:o.EMPTY_STATES.error}))},app:c,withAppHeader:!0},{children:e(u,t({app:c},c.settings,A,d))}))}S.defaultProps={availability:{hasProductSubscription:!0,isAppSubscribedForAsset:!0}};export{S as default,l as getNoActiveWellMessage};
1
+ import{__assign as t}from'./../../../../../ext-esm/tslib/tslib.es6.js';import{jsx as e}from"react/jsx-runtime";import i from"../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import r from"../../../../LoadingIndicator/LoadingIndicator.js";import{SEGMENTS as a}from"../../../../../constants/segment.js";import o from"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import p from"../../../../EmptyState/EmptyState.js";import{ChooseAssetButton as s}from"./components/ChooseAssetButton.js";import l from"../AppInfoMessage/AppInfoMessage.js";var n=function(t){return"".concat(t," has no active well")};function u(u){var d,A=u.AppComponent,c=u.app,S=u.appData,m=u.appProps,g=u.availability,E=u.isCLIApp,f=u.isLoading,P=u.isMultiRig,b=u.layoutEnvironment,M=u.openIntercom,I=u.segment,v=u.toggleAppSettingsDialog;if(!c.package)return e(l,t({app:c},{children:e(p,{title:p.APP_MESSAGES.appPackageWasNotFound.title,subtitle:p.APP_MESSAGES.appPackageWasNotFound.subtitle,image:p.IMAGES.AppLoadingError})}));if(f)return e(l,t({app:c},{children:e(r,{})}));if(!g.hasProductSubscription||!g.isAppSubscribedForAsset){var N=p.APP_MESSAGES,h=N.appNotSubscribed,G=N.appNotSubscribedForAsset,y=p.IMAGES.NoSubscription,F=g.hasProductSubscription?G:h,w=F.title,_=F.subtitle;return e(l,t({app:c},{children:e(p,{title:w,subtitle:_,image:y})}))}if(!A)return e(l,t({app:c},{children:e(p,{title:o.APP_MESSAGES.appComponentWasNotFound.title,image:p.IMAGES.AppLoadingError})}));if(!P){var j=E&&e(s,{toggleAppSettingsDialog:v});if(S.rig&&!S.well)return e(l,t({app:c},{children:e(p,{title:n(S.rig.name),image:p.IMAGES.RigHasNoActiveWell,subtitle:j})}));if("general"===(null==b?void 0:b.type)&&I===a.COMPLETION&&!S.fracFleet)return e(l,t({app:c},{children:e(p,{title:o.APP_MESSAGES.fracFleetWasNotFound.title,image:p.IMAGES.RigHasNoActiveWell,subtitle:j})}));if("general"===(null==b?void 0:b.type)&&I===a.COMPLETION&&!(null===(d=S.fracFleet)||void 0===d?void 0:d.current_pad_id)&&!c.settings.padId)return e(l,t({app:c},{children:e(p,{image:p.IMAGES.FracFleetHasNoActivePad,subtitle:j,title:p.APP_MESSAGES.fracFleetHasNoPad.title})}));if("general"===(null==b?void 0:b.type)&&I===a.COMPLETION&&(!S.wells||S.wells.length<1))return e(l,t({app:c},{children:e(p,{image:p.IMAGES.NoWellsSelected,subtitle:j,title:p.APP_MESSAGES.padHasNoWells.title})}));if(!(S.rig||S.well||S.settings||S.wells))return e(l,t({app:c},{children:e(p,{image:p.IMAGES.AssetHasNoData,subtitle:j,title:p.APP_MESSAGES.noAssetData.title})}))}return e(i,t({app:c,openIntercom:M},{children:e(A,t({app:c},c.settings,S,m))}))}u.defaultProps={availability:{hasProductSubscription:!0,isAppSubscribedForAsset:!0}};export{u as default,n as getNoActiveWellMessage};
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import { ReactNode } from 'react';
2
2
  import * as images from './images';
3
3
  export interface EmptyStateProps {
4
- title?: string;
5
- subtitle?: string;
4
+ title?: string | ReactNode;
5
+ subtitle?: string | ReactNode;
6
6
  image?: string;
7
7
  classes?: {
8
8
  root?: string;
@@ -22,6 +22,38 @@ declare namespace EmptyState {
22
22
  classes: {};
23
23
  };
24
24
  var IMAGES: typeof images;
25
+ var APP_MESSAGES: {
26
+ appNotSubscribed: {
27
+ title: string;
28
+ subtitle: string;
29
+ };
30
+ appNotSubscribedForAsset: {
31
+ title: string;
32
+ subtitle: string;
33
+ };
34
+ internalAppError: {
35
+ title: string;
36
+ };
37
+ appPackageWasNotFound: {
38
+ title: string;
39
+ subtitle: string;
40
+ };
41
+ fracFleetWasNotFound: {
42
+ title: string;
43
+ };
44
+ fracFleetHasNoPad: {
45
+ title: string;
46
+ };
47
+ padHasNoWells: {
48
+ title: string;
49
+ };
50
+ appComponentWasNotFound: {
51
+ title: string;
52
+ };
53
+ noAssetData: {
54
+ title: string;
55
+ };
56
+ };
25
57
  }
26
58
  export default EmptyState;
27
59
  //# sourceMappingURL=EmptyState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAOnC,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,iBAAS,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAsBjG;kBAtBQ,UAAU;;;;;;;;;AAiCnB,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAC;AAEpD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAOnC,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,iBAAS,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAsBjG;kBAtBQ,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCnB,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as s}from"react/jsx-runtime";import{useState as i,useRef as r}from"react";import a from"classnames";import*as o from"./images/index.js";import{NoDataAvailable as m}from"./images/index.js";import l from"../../effects/useResizeObserver.js";import{SIZES as c}from"./constants.js";import{getSize as n}from"./utils.js";import{useStyles as d}from"./styles.js";function f(o){var m=o.title,f=o.subtitle,u=o.image,p=o.classes,b=o.dataTestId,v=i(c.LARGE),j=v[0],g=v[1],N=r();l({callback:function(e){var t=e[0].borderBoxSize[0].blockSize;g(n(t))},containerRef:N});var x=d({image:u,size:j}),h=j!==c.SMALL;return t("div",e({className:a(x.root,p.root),"data-testid":b},{children:s("div",e({className:a(x.content,p.content),ref:N},{children:[t("div",e({className:a(x.title,p.title)},{children:m})),t("div",e({className:a(x.subtitle,p.subtitle)},{children:f})),h&&t("img",{src:u,className:x.image,alt:"error"})]}))}))}f.defaultProps={title:"No Data Available",subtitle:"",image:m,classes:{}},f.IMAGES=o;export{f as default};
1
+ import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as s}from"react/jsx-runtime";import{useState as i,useRef as r}from"react";import a from"classnames";import*as o from"./images/index.js";import{NoDataAvailable as m}from"./images/index.js";import l from"../../effects/useResizeObserver.js";import{SIZES as c,APP_MESSAGES as n}from"./constants.js";import{getSize as d}from"./utils.js";import{useStyles as f}from"./styles.js";function u(o){var m=o.title,n=o.subtitle,u=o.image,p=o.classes,b=o.dataTestId,v=i(c.LARGE),j=v[0],g=v[1],S=r();l({callback:function(e){var t=e[0].borderBoxSize[0].blockSize;g(d(t))},containerRef:S});var A=f({image:u,size:j}),N=j!==c.SMALL;return t("div",e({className:a(A.root,p.root),"data-testid":b},{children:s("div",e({className:a(A.content,p.content),ref:S},{children:[t("div",e({className:a(A.title,p.title)},{children:m})),t("div",e({className:a(A.subtitle,p.subtitle)},{children:n})),N&&t("img",{src:u,className:A.image,alt:"error"})]}))}))}u.defaultProps={title:"No Data Available",subtitle:"",image:m,classes:{}},u.IMAGES=o,u.APP_MESSAGES=n;export{u as default};
@@ -3,4 +3,36 @@ export declare enum SIZES {
3
3
  MEDIUM = "medium",
4
4
  LARGE = "large"
5
5
  }
6
+ export declare const APP_MESSAGES: {
7
+ appNotSubscribed: {
8
+ title: string;
9
+ subtitle: string;
10
+ };
11
+ appNotSubscribedForAsset: {
12
+ title: string;
13
+ subtitle: string;
14
+ };
15
+ internalAppError: {
16
+ title: string;
17
+ };
18
+ appPackageWasNotFound: {
19
+ title: string;
20
+ subtitle: string;
21
+ };
22
+ fracFleetWasNotFound: {
23
+ title: string;
24
+ };
25
+ fracFleetHasNoPad: {
26
+ title: string;
27
+ };
28
+ padHasNoWells: {
29
+ title: string;
30
+ };
31
+ appComponentWasNotFound: {
32
+ title: string;
33
+ };
34
+ noAssetData: {
35
+ title: string;
36
+ };
37
+ };
6
38
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACf,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACf,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxB,CAAC"}
@@ -1 +1 @@
1
- var a;!function(a){a.SMALL="small",a.MEDIUM="medium",a.LARGE="large"}(a||(a={}));export{a as SIZES};
1
+ var t;!function(t){t.SMALL="small",t.MEDIUM="medium",t.LARGE="large"}(t||(t={}));var e={appNotSubscribed:{title:"No Subscription exists for this app.",subtitle:"Contact your Corva Account rep to get access to this app."},appNotSubscribedForAsset:{title:"No Subscription exists for this asset.",subtitle:"Contact your Corva Account rep to get access to this asset."},internalAppError:{title:"App Loading Error"},appPackageWasNotFound:{title:"App package was not found",subtitle:"Please choose another version in the app settings menu or delete and add app again on your dashboard"},fracFleetWasNotFound:{title:"Frac fleet was not found"},fracFleetHasNoPad:{title:"Frac fleet has no active pad"},padHasNoWells:{title:"This pad has no wells"},appComponentWasNotFound:{title:"App component was not found"},noAssetData:{title:"No asset data were found"}};export{e as APP_MESSAGES,t as SIZES};
@@ -1 +1 @@
1
- import{makeStyles as t,createStyles as e}from"@material-ui/core";import{SIZES as n}from"./constants.js";var i=t((function(t){var i=t.palette;return e({root:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",flexGrow:1},content:{alignItems:"center",display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",overflow:"auto",padding:24,textAlign:"center"},title:function(t){var e=t.size;return{color:i.primary.text7,fontStyle:"italic",fontSize:e===n.LARGE?32:24,lineHeight:e===n.LARGE?"38px":"28px",marginBottom:8}},subtitle:function(t){var e=t.size;return{color:i.primary.text7,fontSize:e===n.LARGE?16:14,lineHeight:e===n.LARGE?"22px":"20px",marginBottom:24}},image:function(t){var e=t.size,i=t.image;return{display:"flex",flexGrow:1,maxHeight:e===n.LARGE?300:200,width:"100%",backgroundImage:"url(".concat(i,")"),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"}}})}));export{i as useStyles};
1
+ import{makeStyles as t,createStyles as e}from"@material-ui/core";import{SIZES as n}from"./constants.js";var i=t((function(t){var i=t.palette;return e({root:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",flexGrow:1},content:{alignItems:"center",display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",overflow:"hidden",padding:24,textAlign:"center"},title:function(t){var e=t.size;return{color:i.primary.text7,fontStyle:"italic",fontSize:e===n.LARGE?32:24,lineHeight:e===n.LARGE?"38px":"28px",marginBottom:8}},subtitle:function(t){var e=t.size;return{color:i.primary.text7,fontSize:e===n.LARGE?16:14,lineHeight:e===n.LARGE?"22px":"20px",marginBottom:24}},image:function(t){var e=t.size,i=t.image;return{display:"flex",flexGrow:1,maxHeight:e===n.LARGE?300:200,width:"100%",backgroundImage:"url(".concat(i,")"),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"}}})}));export{i as useStyles};
@@ -1,18 +1,15 @@
1
1
  export default DevCenterAppErrorView;
2
- declare function DevCenterAppErrorView({ app, withAppHeader }: {
2
+ declare function DevCenterAppErrorView({ app, openIntercom }: {
3
3
  app: any;
4
- withAppHeader: any;
4
+ openIntercom: any;
5
5
  }): JSX.Element;
6
6
  declare namespace DevCenterAppErrorView {
7
7
  namespace propTypes {
8
8
  const app: PropTypes.Requireable<PropTypes.InferProps<{}>>;
9
- const withAppHeader: PropTypes.Requireable<boolean>;
10
9
  }
11
10
  namespace defaultProps {
12
11
  const app_1: any;
13
12
  export { app_1 as app };
14
- const withAppHeader_1: boolean;
15
- export { withAppHeader_1 as withAppHeader };
16
13
  }
17
14
  }
18
15
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"DevCenterAppErrorView.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js"],"names":[],"mappings":";AAcA;;;gBA0BC"}
1
+ {"version":3,"file":"DevCenterAppErrorView.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js"],"names":[],"mappings":";AAOA;;;gBAWC"}
@@ -1 +1 @@
1
- import r from"prop-types";import{styled as p}from"@material-ui/core";import{ErrorOutline as e}from"@material-ui/icons";import{get as o}from"lodash";import{Regular16 as a}from"../../Typography.js";import i from"../../DevCenter/AppHeader/AppHeader.js";import t from"./DevCenterAppErrorView.css.js";import{jsxs as n,jsx as d}from"react/jsx-runtime";var m=p(e)({color:"#bdbdbd",fontSize:48,marginBottom:8});function l(r){var p=r.app,e=r.withAppHeader,l=o(p,"package.manifest.application.website"),s=l?n("span",{children:["<",d("a",{href:l,target:"_blank",children:"App Provider"}),">"]}):"App Provider";return n("div",{className:t.container,children:[e&&d(i,{app:p}),n("div",{className:t.content,children:[d(m,{}),d(a,{display:"block",children:"Application Error"}),n(a,{display:"block",children:["Contact ",s," support to get help"]})]})]})}l.propTypes={app:r.shape({}),withAppHeader:r.bool},l.defaultProps={app:void 0,withAppHeader:!1};export{l as default};
1
+ import r from"prop-types";import p from"../../EmptyState/EmptyState.js";import e from"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import t from"../../DevCenter/AppHeader/AppHeader.js";import o from"./DevCenterAppErrorView.css.js";import{jsxs as i,jsx as m}from"react/jsx-runtime";function n(r){var n=r.app,a=r.openIntercom;return i("div",{className:o.container,children:[n&&m(t,{app:n}),m(p,{title:p.APP_MESSAGES.internalAppError.title,subtitle:m(e,{openIntercom:a}),image:p.IMAGES.AppLoadingError})]})}n.propTypes={app:r.shape({})},n.defaultProps={app:null};export{n as default};
@@ -14,13 +14,13 @@ declare class ErrorBoundary extends Component<any, any, any> {
14
14
  declare namespace ErrorBoundary {
15
15
  namespace propTypes {
16
16
  const children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
17
- const ErrorView: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>>;
17
+ const ErrorView: PropTypes.Requireable<PropTypes.ReactNodeLike>;
18
18
  }
19
19
  namespace defaultProps {
20
- export { EmptyAppView as ErrorView };
20
+ export { DevCenterAppErrorView as ErrorView };
21
21
  }
22
22
  }
23
23
  import { Component } from "react";
24
24
  import PropTypes from "prop-types";
25
- import EmptyAppView from "../EmptyView/EmptyAppView";
25
+ import DevCenterAppErrorView from "./DevCenterAppErrorView";
26
26
  //# sourceMappingURL=ErrorBoundary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorBoundary/ErrorBoundary.js"],"names":[],"mappings":";AAKA;IAIE;;MAEC;IAyBw5lB,wBAA8C;IAAA,sCAAyJ;IA7BhmmB;;MAAoC;IAMpC,oCAIC;IAED,cAIC;CACF"}
1
+ {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorBoundary/ErrorBoundary.js"],"names":[],"mappings":";AAKA;IAIE;;MAEC;IAyB+6lB,wBAA8C;IAAA,sCAAyJ;IA7BvnmB;;MAAoC;IAMpC,oCAIC;IAED,cAIC;CACF"}
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/objectWithoutProperties";import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import c from"@babel/runtime/helpers/getPrototypeOf";import p from"@babel/runtime/helpers/defineProperty";import{Component as a}from"react";import l from"prop-types";import s from"../EmptyView/EmptyAppView/EmptyAppView.js";import{jsx as u}from"react/jsx-runtime";var f=["ErrorView","children"];function m(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function h(r){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(r){return!1}}();return function(){var t,o=c(r);if(e){var n=c(this).constructor;t=Reflect.construct(o,arguments,n)}else t=o.apply(this,arguments);return i(this,t)}}var b=function(i){n(l,a);var c=h(l);function l(){var r;e(this,l);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return r=c.call.apply(c,[this].concat(n)),p(o(r),"state",{hasInternalError:!1}),r}return t(l,[{key:"componentDidCatch",value:function(r){this.setState({hasInternalError:!0}),console.error(r),window.Rollbar&&window.Rollbar.error(r)}},{key:"render",value:function(){if(!this.state.hasInternalError)return this.props.children;var e=this.props,t=e.ErrorView;e.children;var o=r(e,f);return u(t,function(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?m(Object(t),!0).forEach((function(e){p(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}({},o))}}],[{key:"getDerivedStateFromError",value:function(){return{hasInternalError:!0}}}]),l}();b.propTypes={children:l.node.isRequired,ErrorView:l.oneOfType([l.node,l.func])},b.defaultProps={ErrorView:s};export{b as default};
1
+ import r from"@babel/runtime/helpers/objectWithoutProperties";import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import c from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import{Component as l}from"react";import p from"prop-types";import s from"./DevCenterAppErrorView/DevCenterAppErrorView.js";import{jsx as u}from"react/jsx-runtime";var f=["ErrorView","children"];function m(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function h(r){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(r){return!1}}();return function(){var t,o=c(r);if(e){var n=c(this).constructor;t=Reflect.construct(o,arguments,n)}else t=o.apply(this,arguments);return i(this,t)}}var b=function(i){n(p,l);var c=h(p);function p(){var r;e(this,p);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return r=c.call.apply(c,[this].concat(n)),a(o(r),"state",{hasInternalError:!1}),r}return t(p,[{key:"componentDidCatch",value:function(r){this.setState({hasInternalError:!0}),console.error(r),window.Rollbar&&window.Rollbar.error(r)}},{key:"render",value:function(){if(!this.state.hasInternalError)return this.props.children;var e=this.props,t=e.ErrorView;e.children;var o=r(e,f);return u(t,function(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?m(Object(t),!0).forEach((function(e){a(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}({},o))}}],[{key:"getDerivedStateFromError",value:function(){return{hasInternalError:!0}}}]),p}();b.propTypes={children:p.node.isRequired,ErrorView:p.node},b.defaultProps={ErrorView:s};export{b as default};
@@ -2,7 +2,7 @@
2
2
  import PropTypes from 'prop-types';
3
3
  declare type OffsetWellButtonProps = PropTypes.InferProps<typeof offsetWellButtonPropTypes>;
4
4
  declare const OffsetWellButton: {
5
- ({ onClick, wells, disabled, expanded, onExpand, offsetWellsLimited, }: OffsetWellButtonProps): JSX.Element;
5
+ ({ onClick, wells, disabled, expanded, onExpand, offsetWellsLimited, isTooltipDisabled, }: OffsetWellButtonProps): JSX.Element;
6
6
  propTypes: {
7
7
  onClick: PropTypes.Validator<(...args: any[]) => any>;
8
8
  wells: PropTypes.Requireable<PropTypes.InferProps<{
@@ -13,6 +13,7 @@ declare const OffsetWellButton: {
13
13
  onExpand: PropTypes.Requireable<(...args: any[]) => any>;
14
14
  expanded: PropTypes.Requireable<boolean>;
15
15
  offsetWellsLimited: PropTypes.Requireable<boolean>;
16
+ isTooltipDisabled: PropTypes.Requireable<boolean>;
16
17
  };
17
18
  defaultProps: {
18
19
  onExpand: any;
@@ -20,6 +21,7 @@ declare const OffsetWellButton: {
20
21
  wells: any[];
21
22
  disabled: boolean;
22
23
  offsetWellsLimited: boolean;
24
+ isTooltipDisabled: boolean;
23
25
  };
24
26
  };
25
27
  declare const offsetWellButtonPropTypes: {
@@ -32,6 +34,7 @@ declare const offsetWellButtonPropTypes: {
32
34
  onExpand: PropTypes.Requireable<(...args: any[]) => any>;
33
35
  expanded: PropTypes.Requireable<boolean>;
34
36
  offsetWellsLimited: PropTypes.Requireable<boolean>;
37
+ isTooltipDisabled: PropTypes.Requireable<boolean>;
35
38
  };
36
39
  export default OffsetWellButton;
37
40
  //# sourceMappingURL=OffsetWellButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellButton.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellButton/OffsetWellButton.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAyDnC,aAAK,qBAAqB,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEpF,QAAA,MAAM,gBAAgB;4EAOnB,qBAAqB,GAAG,WAAW;;;;;;;;;;;;;;;;;;;CA4ErC,CAAC;AAEF,QAAA,MAAM,yBAAyB;;;;;;;;;;CAY9B,CAAC;AAYF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"OffsetWellButton.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellButton/OffsetWellButton.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAyDnC,aAAK,qBAAqB,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEpF,QAAA,MAAM,gBAAgB;+FAQnB,qBAAqB,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;CAgFrC,CAAC;AAEF,QAAA,MAAM,yBAAyB;;;;;;;;;;;CAa9B,CAAC;AAaF,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as o,jsx as t}from"react/jsx-runtime";import{useState as i}from"react";import n from"prop-types";import r from"classnames";import{makeStyles as a,Typography as l,Tooltip as s}from"@material-ui/core";import{Edit as c,Info as d,ExpandLess as p,ExpandMore as f}from"@material-ui/icons";import m from"../IconButton/index.js";var u=a((function(e){var o=e.palette;return{disabled:{opacity:.4,pointerEvents:"none"},offsetContainer:{cursor:"pointer",display:"flex",whiteSpace:"nowrap",flexWrap:"nowrap",alignItems:"center",width:"fit-content"},hoveredContainer:{backgroundColor:"rgba(3, 188, 212, 0.16)"},offsetText:{color:o.primary.text6,fontSize:12,paddingRight:4,"&:hover":{color:o.primary.contrastText}},buttons:{display:"flex",alignItems:"center"},isActive:{color:o.primary.contrastText},primaryIcon:{"&:hover":{backgroundColor:"rgba(3, 188, 212, 0.16)"}},infoIcon:{marginRight:"8px",fontSize:"20px",color:o.info.light},infoTooltip:{maxWidth:"264px"}}})),x=function(n){var a=n.onClick,x=n.wells,h=n.disabled,b=n.expanded,g=n.onExpand,v=n.offsetWellsLimited,y=i(!1),C=y[0],w=y[1],I=u(),W=x.length,T=!(!W||!g),k=o("div",e({className:r(I.offsetContainer,h&&I.disabled),onClick:a,onMouseMove:function(e){var o=e.target,t=o.parentNode;o.getAttribute("data-icon")||t.getAttribute("data-icon")?w(!1):w(!0)},onMouseLeave:function(){w(!1)}},{children:[o(l,e({className:r(I.offsetText,C&&I.isActive)},{children:["Offset Wells (",W,")"]})),t(m,e({className:r(I.primaryIcon,C&&I.hoveredContainer),color:"primary",size:"medium"},{children:t(c,{})}))]}));return o("div",e({className:I.buttons},{children:[v&&t(s,e({title:"Offset wells list wasn't populated completely due to technical limitations of the app.",classes:{tooltip:I.infoTooltip}},{children:t(d,{className:I.infoIcon})})),t(s,e({title:"Edit Offset Wells",placement:"bottom"},{children:k})),T&&t(m,e({tooltipProps:{title:b?"Collapse Offset Wells":"Expand Offset Wells"},onClick:function(e){e.stopPropagation(),g()},color:"default",size:"medium","data-icon":"expandIcon"},{children:t(b?p:f,{"data-icon":"expandIcon"})}))]}))},h={onClick:n.func.isRequired,wells:n.arrayOf(n.shape({id:n.number,title:n.string})),disabled:n.bool,onExpand:n.func,expanded:n.bool,offsetWellsLimited:n.bool};x.propTypes=h,x.defaultProps={onExpand:null,expanded:!1,wells:[],disabled:!1,offsetWellsLimited:!1};export{x as default};
1
+ import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as o,jsx as t}from"react/jsx-runtime";import{useState as i}from"react";import n from"prop-types";import l from"classnames";import{makeStyles as a,Typography as r,Tooltip as s}from"@material-ui/core";import{Edit as d,Info as p,ExpandLess as c,ExpandMore as f}from"@material-ui/icons";import m from"../IconButton/index.js";var u=a((function(e){var o=e.palette;return{disabled:{opacity:.4,pointerEvents:"none"},offsetContainer:{cursor:"pointer",display:"flex",whiteSpace:"nowrap",flexWrap:"nowrap",alignItems:"center",width:"fit-content"},hoveredContainer:{backgroundColor:"rgba(3, 188, 212, 0.16)"},offsetText:{color:o.primary.text6,fontSize:12,paddingRight:4,"&:hover":{color:o.primary.contrastText}},buttons:{display:"flex",alignItems:"center"},isActive:{color:o.primary.contrastText},primaryIcon:{"&:hover":{backgroundColor:"rgba(3, 188, 212, 0.16)"}},infoIcon:{marginRight:"8px",fontSize:"20px",color:o.info.light},infoTooltip:{maxWidth:"264px"}}})),b=function(n){var a=n.onClick,b=n.wells,x=n.disabled,h=n.expanded,g=n.onExpand,v=n.offsetWellsLimited,y=n.isTooltipDisabled,C=i(!1),T=C[0],w=C[1],I=u(),W=b.length,k=!(!W||!g),E=o("div",e({className:l(I.offsetContainer,x&&I.disabled),onClick:a,onMouseMove:function(e){var o=e.target,t=o.parentNode;o.getAttribute("data-icon")||t.getAttribute("data-icon")?w(!1):w(!0)},onMouseLeave:function(){w(!1)}},{children:[o(r,e({className:l(I.offsetText,T&&I.isActive)},{children:["Offset Wells (",W,")"]})),t(m,e({className:l(I.primaryIcon,T&&I.hoveredContainer),color:"primary",size:"medium"},{children:t(d,{})}))]}));return o("div",e({className:I.buttons},{children:[v&&t(s,e({title:"Offset wells list wasn't populated completely due to technical limitations of the app.",classes:{tooltip:I.infoTooltip}},{children:t(p,{className:I.infoIcon})})),t(s,e({title:"Edit Offset Wells",placement:"bottom"},{children:E})),k&&t(m,e({tooltipProps:!y&&{title:h?"Collapse Offset Wells":"Expand Offset Wells"},onClick:function(e){e.stopPropagation(),g()},color:"default",size:"medium","data-icon":"expandIcon"},{children:t(h?c:f,{"data-icon":"expandIcon"})}))]}))},x={onClick:n.func.isRequired,wells:n.arrayOf(n.shape({id:n.number,title:n.string})),disabled:n.bool,onExpand:n.func,expanded:n.bool,offsetWellsLimited:n.bool,isTooltipDisabled:n.bool};b.propTypes=x,b.defaultProps={onExpand:null,expanded:!1,wells:[],disabled:!1,offsetWellsLimited:!1,isTooltipDisabled:!1};export{b as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.61.0-10",
3
+ "version": "0.61.0-11",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"
@@ -89,6 +89,7 @@
89
89
  "@babel/preset-react": "^7.12.10",
90
90
  "@corva/eslint-config-browser": "^0.0.4",
91
91
  "@date-io/moment": "1.3.13",
92
+ "@krakenjs/zoid": "^10.2.1",
92
93
  "@material-ui/core": "4.11.2",
93
94
  "@material-ui/icons": "4.9.1",
94
95
  "@material-ui/lab": "4.0.0-alpha.57",
@@ -151,6 +152,7 @@
151
152
  "react-cursor-position": "3.0.3",
152
153
  "react-dom": "17.0.1",
153
154
  "react-draggable": "4.2.0",
155
+ "react-draggable-list": "3.7.0",
154
156
  "react-image-lightbox": "5.1.0",
155
157
  "react-infinite-scroller": "1.2.4",
156
158
  "react-mentions": "3.3.1",
@@ -163,6 +165,7 @@
163
165
  "react-sortable-hoc": "0.6.8",
164
166
  "react-virtualized": "9.21.2",
165
167
  "react-virtualized-auto-sizer": "1.0.2",
168
+ "resize-observer-polyfill": "^1.5.1",
166
169
  "rollup-plugin-copy": "^3.4.0",
167
170
  "sass": "^1.51.0",
168
171
  "semver": "7.2.1",
@@ -182,9 +185,7 @@
182
185
  "webpack-cli": "3.3.6",
183
186
  "webpack-dev-server": "3.11.1",
184
187
  "webpack-manifest-plugin": "2.2.0",
185
- "webpack-merge": "5.7.2",
186
- "react-draggable-list": "3.7.0",
187
- "@krakenjs/zoid": "^10.2.1"
188
+ "webpack-merge": "5.7.2"
188
189
  },
189
190
  "devDependencies": {
190
191
  "@babel/preset-typescript": "^7.18.6",