@corva/ui 0.25.0-0 → 0.25.0-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLI/components/App/App.js +1 -1
- package/CLI/components/App/components/AppBar/AppBar.js +1 -1
- package/CLI/flags/index.js +1 -0
- package/CLI/hocs/withCorvaMagicHOC.js +1 -1
- package/CLI/hocs/withMUIProvidersHOC.js +1 -1
- package/components/AssetEditor/index.js +1 -1
- package/components/DevCenter/AppsDataProvider/effects/dataResolvers.js +1 -1
- package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/EmptyView/index.js +1 -1
- package/components/SwitchControl/index.js +1 -1
- package/components/WellSummary/ActivitySummaryChart.js +1 -1
- package/components/WellSummary/utils.js +1 -1
- package/config/theme/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"@babel/runtime/helpers/defineProperty";import"lodash";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../constants/goals.js";import"../../../constants/apps.js";import"../../../constants/completion.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/drillstring.js";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsxs as o,jsx as t}from"react/jsx-runtime";import"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../components/Modal/index.js";import"../../../components/IconMenu/index.js";import"../../../components/StyledMenuItem/index.js";import"../../../components/LoadingIndicator/LoadingIndicator.js";import"../../../components/Tooltip.js";import"../../../components/Avatar/index.js";import"../../../components/Annotations/AnnotationsContext.js";import"../../../components/DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../../components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../../components/ConfirmationDialog.js";import"../../../components/Annotations/components/AnnotationsList/index.js";import"../../../components/Annotations/components/LastAnnotation/index.js";import"../../../components/PadModeSelect/PadModeSelect.js";import"../../../components/DevCenter/AppHeader/AppHeader.js";import"../../../components/DevCenter/AppSideBar/AppSideBar.js";import"../../../components/DevCenter/AppContext.js";import"../../../components/DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../components/ErrorBoundary/InternalErrorView/InternalErrorView.js";import"../../../components/ErrorBoundary/ErrorBoundary.js";import"../../../components/Typography.js";import"../../../components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../components/SlateFormattedText/RenderElements.js";import"../../../components/SlateFormattedText/SlateFormattedText.js";import"../../../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../components/DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../components/DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../components/DevCenter/NavigationBar/NavigationBar.js";import"../../../components/DevCenter/SideBar/SideBar.js";import"../../../components/TruncatedText/index.js";import"../../../components/AssetEditor/SingleAssetEditor.js";import"../../../components/AssetEditor/AssetEditorAutocomplete.js";import"../../../components/AssetEditor/index.js";import"../../../components/AppVersionsSelect/AppVersionsSelect.js";import"../../../components/CollapsableSidebar.js";import"../../../components/DateTimePicker/index.js";import"../../../components/DatePicker/index.js";import"../../../components/ColorPicker/ColorPicker.js";import"../../../components/ParameterCharts/AddEditTrack.js";import"../../../components/ParameterCharts/ParameterCharts.js";import"../../../components/ChartActionsList/ChartActionsList.js";import"../../../components/SettingEditors/ColorEditor/index.js";import"../../../components/SettingEditors/DropdownEditor/index.js";import"../../../components/SettingEditors/RadioEditor/index.js";import"../../../components/SwitchControl/index.js";import"../../../components/RangeSlider/RangeSlider.js";import"../../../components/Login/components/Login.js";import"../../../components/Login/components/PasswordField.js";import"../../../components/Login/components/Chip.js";import"../../../components/Login/components/StepFooter.js";import"../../../components/Login/components/StepContent.js";import"../../../components/Login/components/StepHeader.js";import"../../../components/Login/components/Step.js";import"../../../components/Login/components/OrDivider.js";import"../../../components/Login/components/HiddenEmailField.js";import"../../../components/Login/components/EmailField.js";import"../../../components/Breadcrumbs/index.js";import"../../../components/VirtualizedTable/index.js";import"../../../components/EmptyView/index.js";import"../../../components/EmptyView/EmptyAppView/index.js";import"../../../components/Button/index.js";import"../../../components/MenuItem/index.js";import"../../../components/ContextMenuItem/index.js";import"../../../components/FolderMenuItem/index.js";import"../../../components/EditableItem/EditableItem/index.js";import"../../../components/EditableItem/EditableItemWithBadge/index.js";import"../../../components/Checkbox/index.js";import"../../../components/FolderMenuItemWithLinks/index.js";import"../../../components/IconButton/index.js";import"../../../components/Chip/index.js";import"../../../components/Counter/index.js";import"../../../components/AnchorsList/AnchorsList.js";import"../../../components/Select/index.js";import"../../../components/Tabs/Tabs.js";import"../../../components/Tabs/Tab.js";import"../../../components/Drillstring/BHASchematic.js";import"../../../components/Drillstring/BHAComponentIcon.js";import"../../../components/Drillstring/BHATable/index.js";import"../../../components/Drillstring/BHAComponentDetail/index.js";import"../../../components/Casing/CasingComponentIcon.js";import"../../../components/Casing/CasingTable/index.js";import"../../../components/WellSummary/WellSummaryItemLabel.js";import"../../../components/WellSummary/WellSummaryItemTitle.js";import"../../../components/WellSummary/WellSummaryItemValue.js";import"../../../components/WellSummary/ActivitySummaryChart.js";import"../../../components/WellSummary/FracWirelineTimeChart.js";import"../../../components/BICOffsetPickerDialog/index.js";import"../../../components/OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../components/Notifications/Notifications.js";import e from"../../../components/Notifications/NotificationsContainer.js";import"../../../components/TextLink/index.js";import"../../../components/Template/TemplatePopover/index.js";import"../../../components/PinnableFilters/PinnableFilters.js";import"../../../components/HeaderLayout/HeaderLayout.js";import"../../../components/Table/TableToolbar/TableToolbar.js";import"../../../components/PriceInput/PriceInput.js";import"../../../components/LabelsCounter/LabelsCounter.js";import"../../../components/Stepper/Step.js";import"../../../components/Stepper/StepsWrapper.js";import"../../../components/Stepper/Stepper.js";import"../../../components/Comment/CommentIcon/index.js";import"../../../components/FilesLoader/FilesLoader.js";import{AuthContext as n}from"../../context/auth.js";import{LOGIN_ROUTE_REG_EXP as r}from"../../constants/index.js";import s from"./components/AppBar/AppBar.js";import i from"
|
|
1
|
+
import"@babel/runtime/helpers/defineProperty";import"lodash";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../constants/goals.js";import"../../../constants/apps.js";import"../../../constants/completion.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/drillstring.js";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsxs as o,jsx as t}from"react/jsx-runtime";import"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../components/Modal/index.js";import"../../../components/IconMenu/index.js";import"../../../components/StyledMenuItem/index.js";import"../../../components/LoadingIndicator/LoadingIndicator.js";import"../../../components/Tooltip.js";import"../../../components/Avatar/index.js";import"../../../components/Annotations/AnnotationsContext.js";import"../../../components/DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../../components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../../components/ConfirmationDialog.js";import"../../../components/Annotations/components/AnnotationsList/index.js";import"../../../components/Annotations/components/LastAnnotation/index.js";import"../../../components/PadModeSelect/PadModeSelect.js";import"../../../components/DevCenter/AppHeader/AppHeader.js";import"../../../components/DevCenter/AppSideBar/AppSideBar.js";import"../../../components/DevCenter/AppContext.js";import"../../../components/DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../components/ErrorBoundary/InternalErrorView/InternalErrorView.js";import"../../../components/ErrorBoundary/ErrorBoundary.js";import"../../../components/Typography.js";import"../../../components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../components/SlateFormattedText/RenderElements.js";import"../../../components/SlateFormattedText/SlateFormattedText.js";import"../../../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../components/DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../components/DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../components/DevCenter/NavigationBar/NavigationBar.js";import"../../../components/DevCenter/SideBar/SideBar.js";import"../../../components/TruncatedText/index.js";import"../../../components/AssetEditor/SingleAssetEditor.js";import"../../../components/AssetEditor/AssetEditorAutocomplete.js";import"../../../components/AssetEditor/index.js";import"../../../components/AppVersionsSelect/AppVersionsSelect.js";import"../../../components/CollapsableSidebar.js";import"../../../components/DateTimePicker/index.js";import"../../../components/DatePicker/index.js";import"../../../components/ColorPicker/ColorPicker.js";import"../../../components/ParameterCharts/AddEditTrack.js";import"../../../components/ParameterCharts/ParameterCharts.js";import"../../../components/ChartActionsList/ChartActionsList.js";import"../../../components/SettingEditors/ColorEditor/index.js";import"../../../components/SettingEditors/DropdownEditor/index.js";import"../../../components/SettingEditors/RadioEditor/index.js";import"../../../components/SwitchControl/index.js";import"../../../components/RangeSlider/RangeSlider.js";import"../../../components/Login/components/Login.js";import"../../../components/Login/components/PasswordField.js";import"../../../components/Login/components/Chip.js";import"../../../components/Login/components/StepFooter.js";import"../../../components/Login/components/StepContent.js";import"../../../components/Login/components/StepHeader.js";import"../../../components/Login/components/Step.js";import"../../../components/Login/components/OrDivider.js";import"../../../components/Login/components/HiddenEmailField.js";import"../../../components/Login/components/EmailField.js";import"../../../components/Breadcrumbs/index.js";import"../../../components/VirtualizedTable/index.js";import"../../../components/EmptyView/index.js";import"../../../components/EmptyView/EmptyAppView/index.js";import"../../../components/Button/index.js";import"../../../components/MenuItem/index.js";import"../../../components/ContextMenuItem/index.js";import"../../../components/FolderMenuItem/index.js";import"../../../components/EditableItem/EditableItem/index.js";import"../../../components/EditableItem/EditableItemWithBadge/index.js";import"../../../components/Checkbox/index.js";import"../../../components/FolderMenuItemWithLinks/index.js";import"../../../components/IconButton/index.js";import"../../../components/Chip/index.js";import"../../../components/Counter/index.js";import"../../../components/AnchorsList/AnchorsList.js";import"../../../components/Select/index.js";import"../../../components/Tabs/Tabs.js";import"../../../components/Tabs/Tab.js";import"../../../components/Drillstring/BHASchematic.js";import"../../../components/Drillstring/BHAComponentIcon.js";import"../../../components/Drillstring/BHATable/index.js";import"../../../components/Drillstring/BHAComponentDetail/index.js";import"../../../components/Casing/CasingComponentIcon.js";import"../../../components/Casing/CasingTable/index.js";import"../../../components/WellSummary/WellSummaryItemLabel.js";import"../../../components/WellSummary/WellSummaryItemTitle.js";import"../../../components/WellSummary/WellSummaryItemValue.js";import"../../../components/WellSummary/ActivitySummaryChart.js";import"../../../components/WellSummary/FracWirelineTimeChart.js";import"../../../components/BICOffsetPickerDialog/index.js";import"../../../components/OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../components/Notifications/Notifications.js";import e from"../../../components/Notifications/NotificationsContainer.js";import"../../../components/TextLink/index.js";import"../../../components/Template/TemplatePopover/index.js";import"../../../components/PinnableFilters/PinnableFilters.js";import"../../../components/HeaderLayout/HeaderLayout.js";import"../../../components/Table/TableToolbar/TableToolbar.js";import"../../../components/PriceInput/PriceInput.js";import"../../../components/LabelsCounter/LabelsCounter.js";import"../../../components/Stepper/Step.js";import"../../../components/Stepper/StepsWrapper.js";import"../../../components/Stepper/Stepper.js";import"../../../components/Comment/CommentIcon/index.js";import"../../../components/FilesLoader/FilesLoader.js";import{AuthContext as n}from"../../context/auth.js";import{LOGIN_ROUTE_REG_EXP as r}from"../../constants/index.js";import s from"./components/AppBar/AppBar.js";import i from"../../hocs/withMUIProvidersHOC.js";import p from"../../hocs/effects/useProvideAuth.js";import m from"./App.css.js";var c=i((function(i){var c=i.children,a=i.router,l=i.toggleTheme,j=p(a),d=!r.test(a.location.pathname)&&!j.loading;return o(n.Provider,{value:j,children:[!d&&c,d&&o("div",{className:m.app,children:[t(e,{}),t(s,{toggleTheme:l}),t("div",{className:m.appContent,children:c})]})]})}));export default c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import{jsx as r,jsxs as o}from"react/jsx-runtime";import{makeStyles as t,useTheme as i,Menu as n,MenuItem as a,AppBar as l,Toolbar as c,Tooltip as m,IconButton as s,Typography as p}from"@material-ui/core";import{useState as u}from"react";import h from"prop-types";import d from"../../../../../components/SwitchControl/index.js";import{useAuth as f}from"../../../../context/auth.js";import g from"@material-ui/icons/AccountCircle";import b from"../../../../assets/DevCenterLogo.js";import{isPDFReportsFeatureActive as v}from"../../../../flags/index.js";var T=t((function(e){return{grow:{flexGrow:1},flex:{display:"flex"},appBar:{backgroundColor:"rgb(30, 31, 31)"},iconButtonRoot:{borderRadius:"unset"},userProfileIcon:{marginLeft:4},toggleThemeRoot:{marginRight:32}}}));function x(t){var h=t.toggleTheme,x=T(),C=f(),R=C.user,k=C.logout,w=i(),B=u(null),N=e(B,2),j=N[0],y=N[1],L=Boolean(j),z=function(){return y(null)},A=R.first_name,D=R.last_name,O="".concat(A[0]).concat(D[0]).toUpperCase(),P=r(n,{anchorEl:j,id:"app-bar-menu",keepMounted:!0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},open:L,onClose:z,children:r(a,{onClick:function(){k(),z()},children:"Sign Out"})});return o("div",{children:[r(l,{position:"static",className:x.appBar,children:o(c,{children:[r(b,{}),r("div",{className:x.grow}),v()&&r(m,{title:"Switch to white theme to tune your app for PDF reports",placement:"bottom",children:r("div",{children:r(d,{className:x.toggleThemeRoot,leftLabel:"Dark Theme",rightLabel:"White Theme",onChange:h,checked:w.isLightTheme,size:"small",title:""})})}),r("div",{children:r(s,{edge:"end","aria-label":"account of current user","aria-controls":"app-bar-menu","aria-haspopup":"true",onClick:function(e){return y(e.currentTarget)},color:"inherit",className:x.iconButtonRoot,children:o("div",{className:x.flex,children:[r(p,{children:O}),r(g,{className:x.userProfileIcon})]})})})]})}),P]})}x.propTypes={toggleTheme:h.func.isRequired};export default x;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=function(){return!!localStorage.getItem("PDF_REPORTS")};export{t as isPDFReportsFeatureActive};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{initHighcharts as s}from"../../config/highcharts/highcharts.js";import{initializeSocketClient as r}from"../../clients/subscriptions.js";import"../../styles/mapbox.global.css.js";import"../../styles/generatedThemesVariables.global.css.js";import o from"./withAppDataProviderHOC.js";import i from"./withCLIAppSettingsHOC.js";import e from"./
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{initHighcharts as s}from"../../config/highcharts/highcharts.js";import{initializeSocketClient as r}from"../../clients/subscriptions.js";import"../../styles/mapbox.global.css.js";import"../../styles/generatedThemesVariables.global.css.js";import o from"./withAppDataProviderHOC.js";import i from"./withCLIAppSettingsHOC.js";import e from"./withReactRouterHOC.js";import a from"./withGridLayoutHOC/withGridLayoutHOC.js";import{withDevCenterRouterHOC as m}from"./withDevCenterRouterHOC.js";import"../../styles/index.global.css.js";import"../../styles/reactVirtualized.global.css.js";navigator.platform.indexOf("Mac")>-1||import("../../styles/customScrollbars.global.css.js"),s(),r();export default function(s){var r=s.component,p=s.settings,n=s.manifest,l=s.packageJson;return function(){var s=m(a(i(o({CLIAppComponent:r,CLIAppSettings:p,packageJson:l})))),c=e(s);return t(c,{manifest:n,dashboardProps:{}})}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import e from"moment";import t from"@babel/runtime/helpers/slicedToArray";import{jsx as o}from"react/jsx-runtime";import{MuiThemeProvider as n}from"@material-ui/core";import{darkTheme as i,lightTheme as c}from"../../config/theme/index.js";import{useState as m}from"react";import{MuiPickersUtilsProvider as p}from"@material-ui/pickers";import f from"@date-io/moment";function u(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 a(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}export default function(r){return function(u){var l=m(i),b=t(l,2),s=b[0],O=b[1];return o(n,{theme:s,children:o(p,{libInstance:e,utils:f,children:o(r,a(a({},u),{},{toggleTheme:function(){return O(s===i?c:i)}}))})})}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{get as t,capitalize as a}from"lodash";import s from"@babel/runtime/helpers/slicedToArray";import{jsxs as l,jsx as r}from"react/jsx-runtime";import{Button as i}from"@material-ui/core";import{useState as o}from"react";import n from"prop-types";import p from"./AssetEditors.css.js";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{get as t,capitalize as a}from"lodash";import s from"@babel/runtime/helpers/slicedToArray";import{jsxs as l,jsx as r}from"react/jsx-runtime";import{Button as i}from"@material-ui/core";import{useState as o}from"react";import n from"prop-types";import p from"./AssetEditors.css.js";import u from"./SingleAssetEditor.js";import c from"./AssetEditorAutocomplete.js";var d="DC_AppSettingsAssetEditor",m=function(n){var m=n.appKey,y=n.appType,f=n.defaultValue,A=n.isNullable,b=n.label,h=n.onSettingsChange,g=n.settings,T=t(y,["primaryAsset","assetType","type"]),C=t(y,["primaryAsset","assetType","id"]),v=t(y,["primaryAsset","autocompleteSelect"]),N=t(y,["secondaryAsset","assetType","type"]),V=t(y,["secondaryAsset","assetType","id"]),K=t(y,["secondaryAsset","autocompleteSelect"]),S=t(g,C),_=o(S||f),j=s(_,2),E=j[0],q=j[1],R=o(t(g,V)),k=s(R,2),x=k[0],B=k[1],D=o(!(!N||x)),I=s(D,2),P=I[0],U=I[1],W=o(!(!N||!x)),w=s(W,2),z=w[0],F=w[1],G=function(t){B(t),h(e({},V,t))},H=function(t){q(t),B(null),F(!1),U(!!N);var a=e({},C,t);V&&(a[V]=null),h(a)};return l("div",{className:p.main,children:[r("div",{className:p.title,children:"Active Asset"}),l("div",{className:p.editor,children:[v?r(c,{onChange:H,defaultValue:f,currentValue:E,isNullable:A,label:b,assetType:T,appKey:m}):r(u,{"data-testid":"".concat(d,"_primaryAutoComplete"),onChange:H,defaultValue:f,currentValue:E,isNullable:A,label:b,assetType:T,appKey:m}),P&&r(i,{"data-testid":"".concat(d,"_changeWellButton"),color:"primary",onClick:function(){F(!0),U(!1)},disabled:!S,children:"Change ".concat(a(N))}),!P&&z&&r(i,{"data-testid":"".concat(d,"_useDefaultButton"),color:"secondary",onClick:function(){B(null),F(!1),U(!!N),h(e({},V,null))},children:"Use active asset"})]}),z&&r("div",{className:p.editor,children:K?r(c,{onChange:G,defaultValue:f,currentValue:x,isNullable:A,label:"Active ".concat(a(N)),assetType:N,parentAssetId:E,parentAssetType:T,appKey:m}):r(u,{"data-testid":"".concat(d,"_secondaryAutoComplete"),onChange:G,defaultValue:f,currentValue:x,isNullable:A,label:"Active ".concat(a(N)),assetType:N,parentAssetId:E,parentAssetType:T,appKey:m})})]})};m.defaultProps={label:"Choose An Asset",isNullable:!1,defaultValue:void 0,appKey:null},m.propTypes={settings:n.shape({}).isRequired,appType:n.shape({}).isRequired,defaultValue:n.any,onSettingsChange:n.func.isRequired,label:n.string,isNullable:n.bool,appKey:n.string};export default m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{get as t,keyBy as r,values as n,merge as e,flatten as a,uniq as u}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import c from"@babel/runtime/regenerator";import o from"@babel/runtime/helpers/asyncToGenerator";import s from"@babel/runtime/helpers/toConsumableArray";import{ASSET_TYPES as p}from"../../../../constants/assetTypes.js";import{getAppsDataByRigs as d,fetchRigs as f,getAppsDataByWells as l,fetchWells as m,fetchAssetEntitiesByAssetIds as b,getAppsDataByFFs as y,getUniqAssetIds as x,fetchFracFleets as h,fetchFracFleetWells as v}from"./utils.js";function k(t,r){return w.apply(this,arguments)}function w(){return(w=o(c.mark((function e(a,u){var i,o,s,y,x,h,v,k,w,g;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b([a]);case 2:if(i=e.sent,o=t(n(i),"[0][0].data")){e.next=6;break}return e.abrupt("return",{});case 6:if(o.type!==p.well.type){e.next=16;break}return e.next=9,m([o.id]);case 9:if(s=e.sent){e.next=12;break}return e.abrupt("return",{});case 12:return y=t(s,"data"),x=y&&r(y.concat(s.included),"id"),h=l(u,x,(function(r){return r[t(s,"data[0].id")]})),e.abrupt("return",h);case 16:if(o.type!==p.rig.type){e.next=24;break}if(v=f([o.id])){e.next=20;break}return e.abrupt("return",{});case 20:return k=t(v,"data"),w=k&&r(k.concat(v.included),"id"),g=d(u,w,(function(r){return r[t(v,"data[0].id")]})),e.abrupt("return",g);case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(t,r,n,e){return T.apply(this,arguments)}function T(){return(T=o(c.mark((function t(n,a,u,o){var p,b,k,w,g,T,
|
|
1
|
+
import{get as t,keyBy as r,values as n,merge as e,flatten as a,uniq as u}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import c from"@babel/runtime/regenerator";import o from"@babel/runtime/helpers/asyncToGenerator";import s from"@babel/runtime/helpers/toConsumableArray";import{ASSET_TYPES as p}from"../../../../constants/assetTypes.js";import{getAppsDataByRigs as d,fetchRigs as f,getAppsDataByWells as l,fetchWells as m,fetchAssetEntitiesByAssetIds as b,getAppsDataByFFs as y,getUniqAssetIds as x,fetchFracFleets as h,fetchFracFleetWells as v}from"./utils.js";function k(t,r){return w.apply(this,arguments)}function w(){return(w=o(c.mark((function e(a,u){var i,o,s,y,x,h,v,k,w,g;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b([a]);case 2:if(i=e.sent,o=t(n(i),"[0][0].data")){e.next=6;break}return e.abrupt("return",{});case 6:if(o.type!==p.well.type){e.next=16;break}return e.next=9,m([o.id]);case 9:if(s=e.sent){e.next=12;break}return e.abrupt("return",{});case 12:return y=t(s,"data"),x=y&&r(y.concat(s.included),"id"),h=l(u,x,(function(r){return r[t(s,"data[0].id")]})),e.abrupt("return",h);case 16:if(o.type!==p.rig.type){e.next=24;break}if(v=f([o.id])){e.next=20;break}return e.abrupt("return",{});case 20:return k=t(v,"data"),w=k&&r(k.concat(v.included),"id"),g=d(u,w,(function(r){return r[t(v,"data[0].id")]})),e.abrupt("return",g);case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(t,r,n,e){return T.apply(this,arguments)}function T(){return(T=o(c.mark((function t(n,a,u,o){var p,b,k,w,g,T,j,A,P,C,G,S,_,q,z,B;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p=x(n),b=x(a),k=x(u),w=s(new Set(u)),t.next=6,Promise.all([m(p),f(b),h(k),v(w,o)]);case 6:if(g=t.sent,T=i(g,4),j=T[0],A=T[1],P=T[2],C=T[3],j||A||P||C){t.next=14;break}return t.abrupt("return",{});case 14:return G=(null==j?void 0:j.data)&&r(j.data.concat(j.included),"id"),S=(null==A?void 0:A.data)&&r(A.data.concat(A.included),"id"),_=r(P,"id"),q=l(n,G,(function(t,r){return t[r]})),z=d(a,S,(function(t,r){return t[r]})),B=y(u,_,C),t.abrupt("return",e(q,z,B));case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function j(t,r,n){return A.apply(this,arguments)}function A(){return(A=o(c.mark((function o(s,y,h){var v,k,w,g,T,j,A,P,C,G,S,_,q,z,B,D;return c.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return v=x(s),c.next=3,b(v);case 3:return k=c.sent,w=a(n(k)),g=u(w.filter((function(r){return t(r,"data.type")===p.well.type})).map((function(r){return+t(r,"data.id")})).concat(y.map((function(t){var r=i(t,2);r[0];return r[1]})))),T=u(w.filter((function(r){return t(r,"data.type")===p.rig.type})).map((function(r){return+t(r,"data.id")})).concat(h.map((function(t){var r=i(t,2);r[0];return r[1]})))),c.next=9,Promise.all([m(g),f(T)]);case 9:if(j=c.sent,A=i(j,2),P=A[0],C=A[1],P||C){c.next=15;break}return c.abrupt("return",{});case 15:return G=t(P,"data"),S=t(C,"data"),_=G&&r(G.concat(P.included),"id"),q=S&&r(S.concat(C.included),"id"),z=s.map((function(r){var n=i(r,2),e=n[0],a=n[1];return[e,G.concat(S).find((function(r){return t(r,"attributes.asset_id")===a})).id]})).concat(y,h),B=l(z,_,(function(t,r){return t[r]})),D=d(z,q,(function(t,r){return t[r]})),c.abrupt("return",e(B,D));case 23:case"end":return c.stop()}}),o)})))).apply(this,arguments)}export{k as resolveAppsDataForAssetDashboard,j as resolveAppsDataForFeedPage,g as resolveAppsDataForGeneralDashboard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import{get as e,uniq as t,
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import{get as e,uniq as t,keyBy as n}from"lodash";import a from"@babel/runtime/helpers/slicedToArray";import i from"@babel/runtime/regenerator";import s from"@babel/runtime/helpers/asyncToGenerator";import"../../../../constants/goals.js";import"../../../../constants/apps.js";import"../../../../constants/completion.js";import"../../../../constants/segment.js";import"../../../../constants/alerts.js";import{DEV_CENTER_CLI_APP_ID as u}from"../../../../constants/devcenter.js";import"../../../../constants/drillstring.js";import{getWells as c,getRigs as o,getResolvedAssets as l,getFracFleets as p,getFracFleetWells as f}from"../../../../clients/jsonApi/index.js";import d from"jsona";function m(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var h=new d,v=function(r,t){return+e(r,["settings",t])},w=function(r){return t(r.map((function(r){var e=a(r,2);e[0];return e[1]})).filter(Number.isFinite))};function y(r){return g.apply(this,arguments)}function g(){return(g=s(i.mark((function r(e){return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,c({ids:e,fields:["well.name","well.settings","well.company","well.asset_id","well.last_active_at","well.id","well.rig","rig.name","rig.asset_id","company.id"]});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}function _(r){return j.apply(this,arguments)}function j(){return(j=s(i.mark((function r(e){return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,o({ids:e,fields:["rig.name","rig.settings","rig.asset_id","rig.active_well","well.name","well.settings","well.company","well.asset_id","well.last_active_at","well.id","well.company.id"]});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}function x(r){return O.apply(this,arguments)}function O(){return(O=s(i.mark((function r(e){return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,l({assets:e});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}var k=function(r,t){return{well:r&&b(b({},r.attributes),{},{id:r.id,companyId:e(r,"relationships.company.data.id")}),rig:{name:e(t,"attributes.name"),id:e(t,"id"),asset_id:e(t,"attributes.asset_id")}}},P=function(r,t,n){return t?r.reduce((function(r,i){var s=a(i,2),u=s[0],c=s[1],o=n(t,c),l=t[e(o,"relationships.rig.data.id")];return r[u]=k(o,l),r}),{}):{}},D=function(r,t,n){return t?r.reduce((function(r,i){var s=a(i,2),u=s[0],c=s[1],o=n(t,c),l=t[e(o,"relationships.active_well.data.id")];return r[u]=k(l,o),r}),{}):{}},z=function(r,e,t){return e||t?r.reduce((function(r,n){var i=a(n,2),s=i[0],u=i[1],c=null==e?void 0:e[u],o=null==t?void 0:t[s];return r[s]={fracFleet:c,wells:o},r}),{}):{}};function A(r){return E.apply(this,arguments)}function E(){return(E=s(i.mark((function r(e){var t;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,p({ids:e,fields:["frac_fleet.name","frac_fleet.pads","frac_fleet.current_pad_id","frac_fleet.pad_frac_fleets"]});case 5:return t=r.sent,r.abrupt("return",h.deserialize(t));case 9:return r.prev=9,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",{});case 13:case"end":return r.stop()}}),r,null,[[2,9]])})))).apply(this,arguments)}function F(r,e){return S.apply(this,arguments)}function S(){return(S=s(i.mark((function r(t,c){var o,l,p;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=n(c,"id"),l=t.map(function(){var r=s(i.mark((function r(t){var n,s,c,l,p,d;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=a(t,2),s=n[0],c=n[1],l={fields:"all",frac_fleet_id:c},p=o[s],s===u?l.app_key=e(p,["app","app_key"]):l.app_id=e(p,["app","id"]),r.prev=4,r.next=7,f(l);case 7:return d=r.sent,r.abrupt("return",h.deserialize(d));case 11:return r.prev=11,r.t0=r.catch(4),console.error(r.t0),r.abrupt("return",[]);case 15:case"end":return r.stop()}}),r,null,[[4,11]])})));return function(e){return r.apply(this,arguments)}}()),r.next=4,Promise.all(l);case 4:return p=r.sent,r.abrupt("return",p.reduce((function(r,e,n){return r[t[n][0]]=e,r}),{}));case 6:case"end":return r.stop()}}),r)})))).apply(this,arguments)}export{x as fetchAssetEntitiesByAssetIds,F as fetchFracFleetWells,A as fetchFracFleets,_ as fetchRigs,y as fetchWells,v as getAppAssetSpecificTypeId,z as getAppsDataByFFs,D as getAppsDataByRigs,P as getAppsDataByWells,w as getUniqAssetIds};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import{pickBy as e,pick as n,noop as o}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../constants/goals.js";import"../../../constants/apps.js";import"../../../constants/completion.js";import{SEGMENTS as s}from"../../../constants/segment.js";import"../../../constants/alerts.js";import{DEV_CENTER_CLI_APP_ID as r}from"../../../constants/devcenter.js";import"../../../constants/drillstring.js";import{getAppName as p,getTimestampFromQuery as a}from"../../../utils/devcenter.js";import{isNativeDetected as m,isMobileDetected as l}from"../../../utils/mobileDetect.js";import{jsx as
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import{pickBy as e,pick as n,noop as o}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../constants/goals.js";import"../../../constants/apps.js";import"../../../constants/completion.js";import{SEGMENTS as s}from"../../../constants/segment.js";import"../../../constants/alerts.js";import{DEV_CENTER_CLI_APP_ID as r}from"../../../constants/devcenter.js";import"../../../constants/drillstring.js";import{getAppName as p,getTimestampFromQuery as a}from"../../../utils/devcenter.js";import{isNativeDetected as m,isMobileDetected as l}from"../../../utils/mobileDetect.js";import{showSuccessNotification as c}from"../../../utils/notificationToasts.js";import"../../../utils/index.js";import{jsx as u,jsxs as d,Fragment as g}from"react/jsx-runtime";import{useContext as A,useState as f}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import v from"../../../effects/useDevCenterApp.js";import"@babel/runtime/helpers/objectWithoutProperties";import j from"classnames";import{AnnotationsProvider as C}from"../../Annotations/AnnotationsContext.js";import{DevCenterRouterContext as b}from"../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import y from"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import h from"../AppContext.js";import I from"./effects/useAppSettings.js";import D from"./effects/useAnnotationsList.js";import M from"./effects/useAnnotationsData.js";import S from"./effects/useAppMaximized.js";import L from"./components/AppActions/AppActions.js";import x from"./components/AppSettingsDialog/AppSettingsDialog.js";import O from"./components/AnnotationsButton/AnnotationsButton.js";import P from"./components/NonPriorityMenus/NonPriorityMenus.js";import R from"./components/FullscreenButton/FullscreenButton.js";import"./components/AppInfoMessage/AppInfoMessage.js";import w from"./components/DevCenterAppView/DevCenterAppView.js";import z from"./DevCenterAppContainer.css.js";import N from"./components/RestoreAppSizeButton/index.js";import{getAppVersion as E}from"./utils.js";import F from"./components/PriorityMenus/PriorityMenus.js";function U(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?U(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):U(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var B=m||l;function q(t){var l,U,q,T,_,G,V,H=t.CLIAppComponent,K=t.CLIAppSettings,W=t.app,J=t.appId,Q=t.coordinates,X=t.currentDashboardAppsLastAnnotations,Y=t.currentUser,Z=t.devCenterRouter,$=t.isActionsDisabled,tt=t.isAppNotSubscribed,et=t.layoutEnvironment,nt=t.onAppRemove,ot=t.onIsMaximizedChange,it=t.onSettingChange,st=t.onSettingsChange,rt=t.setIsFullscreenModalMode,pt=void 0===rt?o:rt,at=t.updateCurrentDashboardAppLastAnnotation,mt=A(h),lt=f([]),ct=i(lt,2),ut=ct[0],dt=ct[1],gt=f([]),At=i(gt,2),ft=At[0],vt=At[1],jt=null!==(l=null==mt?void 0:mt[J||W.id])&&void 0!==l?l:{isLoading:!0},Ct=null===(U=W.package)||void 0===U||null===(q=U.manifest)||void 0===q?void 0:q.application,bt=(null==Ct||null===(T=Ct.segments)||void 0===T?void 0:T[0])||s.DRILLING,yt=!(null==Ct||null===(_=Ct.ui)||void 0===_||!_.multi_rig),ht=p(W),It=S({onIsMaximizedChange:ot,devCenterRouter:Z,appId:J}),Dt=It.isMaximized,Mt=It.setIsMaximized,St=a(null===(G=Z.location.query)||void 0===G?void 0:G.query),Lt=W.id===r&&B?k(k({},Q),{},{w:12}):Q,xt=v({CLIAppComponent:H,CLIAppSettings:K,url:null==W||null===(V=W.package)||void 0===V?void 0:V.url,appKey:W.app.app_key,version:E(W)}),Ot=xt.isLoading,Pt=xt.AppSettings,Rt=xt.AppComponent,wt=I({setIsFullscreenModalMode:pt}),zt=wt.isAppSettingsDialogOpened,Nt=wt.toggleAppSettingsDialog,Et=D(),Ft=Et.isAnnotationsListOpened,Ut=Et.toggleAnnotationsList,kt=Ot||!Y||!yt&&jt.isLoading,Bt=Z.location,qt=Bt.pathname,Tt=Bt.query,_t=M({app:W,appData:jt,currentDashboardAppsLastAnnotations:X}),Gt=_t.appLastAnnotation,Vt=_t.assetCompanyId,Ht=_t.assetIdForAnnotation,Kt=_t.isAppSupportsAnnotations,Wt=e(n(jt,["well","rig","fracFleet","wells"]),Boolean);return u(b.Provider,{value:Z,children:d("div",{className:j("dc-app-container",z.container),"data-testid":"".concat("DevCenter_AppContainer","_").concat(W.app.name),children:[u("div",{className:z.containerContent,children:u(w,{AppComponent:Rt,app:W,appData:Wt,isAppLoading:Ot,isAppNotSubscribed:tt,isLoading:kt,isMultiRig:yt,segment:bt,layoutEnvironment:et,appProps:{coordinates:Lt,currentUser:Y,devCenterRouter:Z,onSettingChange:it,onSettingsChange:st,setIsFullscreenModalMode:pt,setIsMaximized:Mt,setMainMenuItems:dt,setSecondaryMenuItems:vt,appHeaderProps:k({app:W,appLastAnnotation:Gt,appSettings:W.settings,coordinates:Lt,currentUser:Y,isMaximized:Dt,layoutEnvironment:et,onSettingChange:it,toggleAnnotationsList:Ut,updateCurrentDashboardAppLastAnnotation:at},Wt),isNative:m,layoutEnvironment:et,timestamp:St}})}),zt&&u(x,{AppSettingsComponent:Pt,app:W,appData:jt,appName:ht,currentUser:Y,isMultiRig:yt,layoutEnvironment:et,onAppRemove:nt,onSettingChange:it,onSettingsChange:st,segment:bt,timestamp:St,toggleAppSettingsDialog:Nt}),Ft&&u(C,{children:u(y,{appId:W.app.id,appSettings:W.settings,appTitle:W.name,assetCompanyId:Vt,assetId:Ht,currentUser:Y,onClose:Ut,showSuccessNotification:c})}),!$&&Dt&&u(N,{setIsMaximized:Mt}),d(L,{children:[Kt&&u(O,{toggleAnnotationsList:Ut}),B&&!Dt?u(R,{setIsMaximized:Mt}):d(g,{children:[u(F,{menuItems:ut,devCenterRouter:Z}),u(P,{appId:W.id,devCenterRouter:Z,isMaximized:Dt,menuItems:ft,pathname:qt,query:Tt,setIsMaximized:Mt,toggleAppSettingsDialog:Nt})]})]})]})})}export default q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as i,jsx as e}from"react/jsx-runtime";import{makeStyles as t,Typography as r}from"@material-ui/core";import a from"prop-types";import o from"classnames";var p=t({wrapper:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",padding:"16px",zIndex:1,"@media (max-height:350px)":{paddingTop:"56px"},"@media (max-width:500px)":{paddingTop:"128px"}},errorImage:{width:"390px",height:"300px",marginTop:"24px","@media (max-height:400px)":{width:"260px",height:"200px"},"@media (max-height:350px), (max-width: 580px) and (max-height:550px)":{display:"none"},"@media (max-width:500px)":{width:"260px",height:"200px"}},title:{fontSize:"32px",fontStyle:"italic",color:"#9E9E9E",lineHeight:"37px",fontWeight:"normal","@media (max-height:400px)":{fontSize:"24px"},"@media (max-width:500px)":{fontSize:"24px"}},description:{fontSize:"16px",color:"#9E9E9E"},arrow:{position:"absolute",top:0,right:0,zIndex:-1,"@media (max-width: 960px)":{display:"none"}}});function s(t){var a=t.title,s=t.description,d=t.showArrow,n=t.customStyles,m=p();return i("div",{className:o(m.wrapper,n.wrapper),children:[e(r,{className:o(m.title,n.title),children:a}),e(r,{className:o(m.description,n.description),children:s}),e("img",{src:"/static/media/5010eaf4520add4dcd713ce1fdbda5ea.png",className:m.errorImage,alt:"error state"}),d&&e("img",{src:"/static/media/1be6a0ee1d46b5f5c15203014864e086.svg",alt:"arrow",className:o(m.arrow,n.arrow)})]})}s.propTypes={title:a.string,description:a.string,showArrow:a.bool,customStyles:a.shape({wrapper:a.string,title:a.string,description:a.string,arrow:a.string})},s.defaultProps={title:"No Data Available",description:"",showArrow:!1,customStyles:{}};export default s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{jsxs as
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{jsxs as a,jsx as i}from"react/jsx-runtime";import{withStyles as l,Grid as t,Typography as r,Switch as s}from"@material-ui/core";import o from"prop-types";import c from"classnames";import n from"./style.css.js";var d=function(l){var o,d,b=l.title,m=l.leftLabel,p=l.rightLabel,h=l.checked,f=l.onChange,g=l.disabled,u=l.classes,L=l.size,k=l.className,w=m&&p;return a("div",{className:k,children:[b&&i("div",{className:n.switchControlTitle,children:b}),i("div",{className:n.switchControlWithLabels,children:a(t,{component:"label",container:!0,alignItems:"center",spacing:0,children:[m&&i(t,{item:!0,children:i(r,{variant:"body2",className:c(u.label,"small"===L&&u.labelSmall,!h&&!g&&u.activeLabel,g&&u.disabledLabel),children:m})}),i(t,{item:!0,children:i(s,{checked:h,onChange:f,color:"primary",disabled:g,classes:{root:u.root,switchBase:c((o={},e(o,u.switchBase,w||h&&!g),e(o,u.switchBaseDisabled,g&&(w||h)),e(o,u.switchBaseDisabledNoLabels,!w&&g&&!h),o)),track:c((d={},e(d,u.track,w||h&&!g),e(d,u.trackDisabled,g&&(w||h)),e(d,u.trackDisabledNoLabels,!w&&g&&!h),d))},size:L})}),p&&i(t,{item:!0,children:i(r,{variant:"body2",className:c(u.label,"small"===L&&u.labelSmall,h&&u.activeLabel,g&&u.disabledLabel),children:p})})]})})]})};d.propTypes={title:o.string,leftLabel:o.string,rightLabel:o.string,checked:o.bool.isRequired,onChange:o.func.isRequired,disabled:o.bool,classes:o.shape({}).isRequired,size:o.string,className:o.string},d.defaultProps={title:"",leftLabel:"",rightLabel:"",disabled:!1,size:"medium",className:""};var b=l({root:{paddingLeft:10,paddingRight:10,width:56,"&.MuiSwitch-sizeSmall":{width:48,"& .MuiSwitch-switchBase":{paddingLeft:7}}},switchBase:{color:"#03BCD4","&.Mui-checked":{paddingLeft:7}},switchBaseDisabled:{color:"#196069 !important"},track:{backgroundColor:"#196069 !important",opacity:"1 !important",border:"none"},trackDisabled:{backgroundColor:"#223D40 !important",opacity:"1 !important",border:"none"},switchBaseDisabledNoLabels:{color:"#545454 !important"},trackDisabledNoLabels:{backgroundColor:"#3D3D3D !important",opacity:"1 !important",border:"none"},label:{display:"flex",justifyContent:"center",flexDirection:"column",fontSize:"16px",lineHeight:"22px",color:"#bdbdbd",margin:"8px 0px",cursor:"pointer"},labelSmall:{fontSize:"14px",lineHeight:"20px"},disabledLabel:{cursor:"default",color:"#616161"},activeLabel:{color:"#ffffff"}})(d);export default b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import{sumBy as e,upperFirst as i}from"lodash";import
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import{sumBy as e,upperFirst as i}from"lodash";import r from"@babel/runtime/helpers/slicedToArray";import{jsxs as n,jsx as o,Fragment as a}from"react/jsx-runtime";import{makeStyles as c,Typography as l,Tooltip as s}from"@material-ui/core";import{useRef as d,useState as p,useMemo as u,useEffect as h,createRef as m}from"react";import f from"prop-types";import g from"classnames";import{Regular14 as x}from"../Typography.js";import{drawRadicalGradient as v,drawDonutSlice as b}from"./utils.js";var y=c({root:{width:"228px",height:"228px",borderRadius:"50%",padding:"6px",position:"relative",background:"url(".concat("/static/media/9bda514bfc837939d0b6f7d8dbe94d03.svg",")"),backgroundRepeat:"no-repeat"},backgroundRoot:{width:"100%",height:"100%",borderRadius:"50%",border:"2px solid #616161",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",background:"url(".concat("/static/media/49092309a3fda5ecf77311bd794ac103.svg",")")},emptyStateBackground:{background:"radial-gradient(50% 50% at 50% 50%, rgba(100, 181, 246, 0) 54.4%, rgba(100, 181, 246, 0.01) 76.49%, rgba(100, 181, 246, 0.06) 100%)"},dropShadowRoot:{width:"100%",height:"100%",borderRadius:"50%",filter:"blur(36px)",border:"2px solid #64B5F6",display:"flex",alignItems:"center",justifyContent:"center"},content:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",left:0,top:0},lastActivityRoot:{width:"90px",height:"90px",background:"#3B3B3B",boxShadow:"0px 2px 2px rgba(0, 0, 0, 0.1), inset 0px 1px 1px rgba(255, 255, 255, 0.05)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"8px 0"},activityDuration:{fontSize:"36px",lineHeight:"24px",fontWeight:300,letterSpacing:"0.4px"},durationUnit:{fontSize:"12px",lineHeight:"24px",fontWeight:500,letterSpacing:"0.4px"},activityTimeRange:{fontSize:"10px",textTransform:"uppercase",color:"#9E9E9E",lineHeight:"24px",fontWeight:500,letterSpacing:"1px"},activityName:{fontSize:"12px",lineHeight:"14px",fontWeight:500},noOperationsRoot:{width:90,height:90},noOperationsText:{marginTop:24,color:"#9E9E9E"},chart:{position:"absolute",left:2,top:2,width:"100%",height:"100%",padding:"12px"},canvas:{width:"100%",height:"100%"},activities:{position:"absolute",left:12,top:12}});function w(c){var f=c.currentActivityName,w=c.activities,N=c.showTooltip,R=y(),S=d(null),T=d([]),k=p(null),E=r(k,2),j=E[0],C=E[1],A=u((function(){return w.filter((function(t){return t.duration}))}),[w]),B=u((function(){return e(w,"duration")}),[w]),I=u((function(){return null===j?w.find((function(t){return t.name===f})):A[j]}),[w,f,A,j]),O=function(t){var e=!1;T.current.forEach((function(i,r){var n=i.current;if(n&&!e){var o=n.getContext("2d");(e=o.isPointInPath(t.offsetX,t.offsetY))&&C(r)}})),e||C(null)};return h((function(){var t=S.current,e=t.getContext("2d");t.width=200,t.height=200,t.style.width="".concat(200,"px"),t.style.height="".concat(200,"px");var i=A.length;T.current.length!==i&&(T.current=Array(i).fill().map((function(t,e){return T.current[e]||m()})));var r=0;A.forEach((function(t,i){var n=r,o=n+t.duration/B*Math.PI*2;(null===j&&t.name===f||i===j)&&v(e,100,100,100,n,o);var a=T.current[i].current;if(a){a.width=200,a.height=200,a.style.width="".concat(200,"px"),a.style.height="".concat(200,"px"),N&&(a.onmousemove=O);var c=a.getContext("2d");b(c,100,100,100,n,o,t.color||"#000000",!0)}else b(e,100,100,100,n,o,t.color||"#000000",!0);r=o}))})),n("div",{className:R.root,children:[o("div",{className:g(R.backgroundRoot,t({},R.emptyStateBackground,!w.length)),children:o("div",{className:R.dropShadowRoot})}),n("div",{className:R.content,children:[o(l,{className:R.activityTimeRange,children:"Last 24hrs"}),w.length?n(a,{children:[o("div",{className:R.lastActivityRoot,children:I&&I.duration?n(l,{className:R.activityDuration,children:[(I.duration/3600).toFixed(1),o("span",{className:R.durationUnit,children:"h"})]}):null}),o(l,{className:R.activityName,children:i((null==I?void 0:I.name)||"")})]}):o("div",{className:R.noOperationsRoot,children:o(x,{className:R.noOperationsText,children:"No operations"})})]}),o(s,{title:null!==j?"".concat(A[j].name,": ").concat((A[j].duration/3600).toFixed(3),"h"):"",placement:"bottom",children:n("div",{className:R.chart,children:[o("canvas",{ref:S,className:R.canvas}),A.map((function(t,e){return o("canvas",{ref:T.current[e],className:R.activities})}))]})})]})}w.propTypes={activities:f.arrayOf(f.shape({name:f.string,day:f.number,night:f.number})).isRequired,currentActivityName:f.string.isRequired,showTooltip:f.bool},w.defaultProps={showTooltip:!1};export default w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function o(o,a,t,l,d,r){o.beginPath(),o.moveTo(a,t),o.arc(a,t,l-8,d,r),o.closePath();var
|
|
1
|
+
function o(o,a,t,l,d,r){o.beginPath(),o.moveTo(a,t),o.arc(a,t,l-8,d,r),o.closePath();var e=o.createRadialGradient(a,t,5,a,t,l);e.addColorStop(0,"#3E4D5A00"),e.addColorStop(.3,"#3E4D5A00"),e.addColorStop(.6,"#3E4D5A4d"),e.addColorStop(.9,"#3E4D5Ab3"),o.fillStyle=e,o.fill()}function a(o,a,t,l,d,r){o.moveTo(a,t),o.arc(a,t,l,d,r)}function t(o,t,l,d,r,e,c,i){var n=e-r>.0833393628,h=n?.0416696814:0,S=n?4:0,p=100-S;(o.beginPath(),o.moveTo(t,l),o.arc(t,l,d,r+h,e-h),i&&n)&&(a(o,100+p*Math.cos(r+h),100+p*Math.sin(r+h),S,0,2*Math.PI),a(o,100+p*Math.cos(e-h),100+p*Math.sin(e-h),S,0,2*Math.PI));o.closePath();var C=o.createRadialGradient(t,l,8,t,l,d);C.addColorStop(0,"".concat(c,"00")),C.addColorStop(.9,"".concat(c,"00")),C.addColorStop(.93,c),C.addColorStop(1,c),o.fillStyle=C,o.fill(),o.beginPath(),o.moveTo(t,l),o.arc(t,l,d,r,e),o.closePath()}export{t as drawDonutSlice,o as drawRadicalGradient};
|
package/config/theme/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import{jsx as o}from"react/jsx-runtime";import{createMuiTheme as e}from"@material-ui/core";import t from"@material-ui/icons/Close";import i from"./palette.mjs.js";import{dateTimePickerThemeOverrides as p}from"./dateTimePickerThemeOverrides.js";import m from"./accordionOverrides.js";import
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import{jsx as o}from"react/jsx-runtime";import{createMuiTheme as e}from"@material-ui/core";import t from"@material-ui/icons/Close";import i from"./palette.mjs.js";import{dateTimePickerThemeOverrides as p}from"./dateTimePickerThemeOverrides.js";import m from"./accordionOverrides.js";import a from"./buttonOverrides.js";import n from"./checkboxOverrides.js";import c from"./chipOverrides.js";import s from"./fabOverrides.js";import d from"./formControlLabelOverrides.js";import l from"./formGroupOverrides.js";import u from"./radioOverrides.js";import f from"./tableOverrides.js";import g from"./textFieldOverrides.js";import b from"./tooltipOverrides.js";import{lightThemeVariables as x,darkThemeVariables as O}from"./themeVariables.mjs.js";import j from"./toggleButtonsGroupOverrides.js";function h(r,o){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);o&&(t=t.filter((function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable}))),e.push.apply(e,t)}return e}function y(o){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?h(Object(t),!0).forEach((function(e){r(o,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))}))}return o}var v=i.primary,M=v.text7,k=v.text9,w={overrides:y(y(y(y(y(y(y(y(y(y(y(y(y({MuiMenu:{paper:{root:{overscrollBehaviorY:"contain","& .MuiMenuItem-root":{backgroundColor:i.background.b9,"&$selected":{backgroundColor:i.primary.text9}}}}},MuiMenuItem:{root:{minHeight:36,color:i.primary.contrastText}},MuiTooltip:{tooltip:{backgroundColor:i.background.b9}},MuiSwitch:{switchBase:{color:M},track:{backgroundColor:k,opacity:1},colorPrimary:{"&$checked":{"& + $track":{opacity:.38}}},colorSecondary:{"&$checked":{"& + $track":{opacity:.38}}}},MuiDialogTitle:{root:{padding:"40px 40px 16px 40px","@media (max-width: 960px)":{padding:"16px"}}},MuiDialogContent:{root:{padding:"0 40px 0 40px","@media (max-width: 960px)":{padding:"0 16px"}}},MuiDialogContentText:{root:{color:i.primary.text6,lineHeight:"22.5px",marginBottom:0}},MuiDialogActions:{root:{padding:"32px 40px 40px 40px","@media (max-width: 960px)":{padding:16}},spacing:{"&>:not(:first-child)":{marginLeft:16}}},MuiListItemIcon:{root:{minWidth:48}}},m),a),n),c),p),s),d),l),u),f),g),b),j)},C={MuiMenu:{getContentAnchorEl:function(){return null}},MuiCheckbox:{color:"primary"},MuiRadio:{color:"primary"},MuiChip:{deleteIcon:o(t,{})}},P=e(y(y(y({props:C},x),w),{},{isLightTheme:!0})),D=e(y(y(y({props:C},O),{},{palette:y(y({},O.palette),{},{type:"dark"})},w),{},{isDarkTheme:!0}));export{D as darkTheme,P as lightTheme};
|