@corva/ui 0.26.0-7 → 0.26.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CLI/hocs/effects/useProvideAuth.js +1 -1
  2. package/CLI/screens/LoginScreen/components/AuthStep.js +1 -1
  3. package/CLI/screens/LoginScreen/components/SSOButton.js +1 -1
  4. package/CLI/screens/OAuthCallbackScreen/index.js +1 -1
  5. package/cjs/devcenter/webpack/constants.js +1 -1
  6. package/cjs/devcenter/webpack/public/index.html +2 -2
  7. package/cjs/devcenter/webpack/webpack.config.dev.js +1 -1
  8. package/clients/auth0/index.js +1 -1
  9. package/components/AppVersionsSelect/AppVersionsSelect.js +1 -1
  10. package/components/AppVersionsSelect/effects/index.js +1 -1
  11. package/components/AssetEditor/AssetEditorAutocomplete.js +1 -1
  12. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  13. package/components/FilesLoader/FilesLoader.js +1 -1
  14. package/components/FilesLoader/{partials/Icons → Icons}/DocFileIcon.js +0 -0
  15. package/components/FilesLoader/{partials/Icons → Icons}/ExelFileIcon.js +0 -0
  16. package/components/FilesLoader/Icons/FileIcon.js +1 -0
  17. package/components/FilesLoader/{partials/Icons → Icons}/IconCancel.js +0 -0
  18. package/components/FilesLoader/{partials/Icons → Icons}/IconSuccess.js +0 -0
  19. package/components/FilesLoader/{partials/Icons → Icons}/IconWarning.js +0 -0
  20. package/components/FilesLoader/{partials/Icons → Icons}/PdfFileIcon.js +0 -0
  21. package/components/FilesLoader/{partials/Icons → Icons}/UnknownFileIcon.js +0 -0
  22. package/components/FilesLoader/useStyles.js +1 -0
  23. package/components/PadOffsetsPicker/PadOffsetsPicker.js +1 -1
  24. package/components/RangeSlider/utils.js +1 -1
  25. package/components/SwitchControl/index.js +1 -1
  26. package/constants/appPackages.js +1 -0
  27. package/constants/index.js +1 -1
  28. package/package.json +1 -1
  29. package/components/FilesLoader/partials/UploadingFileState/FileLoadingProgress.js +0 -1
@@ -1 +1 @@
1
- import"@babel/runtime/helpers/defineProperty";import{get as r}from"lodash";import{updateUserUnits as t}from"../../../utils/convert.js";import e from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import o from"@babel/runtime/helpers/asyncToGenerator";import{useState as s,useEffect as i}from"react";import{setAuthToken as a,removeAuthToken as u,getAuthToken as c}from"../../../clients/clientStorage/index.js";import{post as p}from"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import{getCurrentUser as l}from"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import{LOGIN_ROUTE_REG_EXP as m}from"../../constants/index.js";function f(f){var h=s(null),v=e(h,2),d=v[0],b=v[1],y=s(!0),x=e(y,2),g=x[0],j=x[1],w=s(null),k=e(w,2),_=k[0],A=k[1];function T(){return U.apply(this,arguments)}function U(){return(U=o(n.mark((function e(){var o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,j(!0),e.next=4,l();case 4:o=e.sent,b(o),t({userUnits:o.unit_system,companyUnits:r(o,"company.unit_system")}),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(0),u(),f.push("/login"),console.error(e.t0);case 14:j(!1);case 15:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}var C,G=(C=o(n.mark((function r(t,e){var o;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,A(null),j(!0),r.next=5,p("/v1/user_token",{auth:t});case 5:o=r.sent,a(o.jwt),r.next=14;break;case 9:return r.prev=9,r.t0=r.catch(0),console.error(r.t0),j(!1),r.abrupt("return",A("Wrong user name or password"));case 14:T().then(e);case 15:case"end":return r.stop()}}),r,null,[[0,9]])}))),function(r,t){return C.apply(this,arguments)});return i((function(){var r;try{r=c()}catch(r){u()}var t=m.test(f.location.pathname);return!r&&t?j(!1):r?void T():(f.push("/login"),j(!1))}),[]),{user:d,loading:g,error:_,login:G,logout:function(){u(),f.push("/login")}}}export default f;
1
+ import"@babel/runtime/helpers/defineProperty";import{get as r}from"lodash";import{updateUserUnits as t}from"../../../utils/convert.js";import e from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import o from"@babel/runtime/helpers/asyncToGenerator";import{useState as s,useRef as i,useEffect as a}from"react";import{setAuthToken as u,removeAuthToken as c,getAuthToken as p}from"../../../clients/clientStorage/index.js";import{post as l}from"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import{getCurrentUser as m}from"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import{LOGIN_ROUTE_REG_EXP as f}from"../../constants/index.js";import h from"../../../clients/auth0/index.js";function v(v){var d=s(null),b=e(d,2),x=b[0],y=b[1],j=s(!0),g=e(j,2),w=g[0],k=g[1],_=s(null),A=e(_,2),T=A[0],U=A[1],C=i();function G(){return P.apply(this,arguments)}function P(){return(P=o(n.mark((function e(){var o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,k(!0),e.next=4,m();case 4:o=e.sent,y(o),t({userUnits:o.unit_system,companyUnits:r(o,"company.unit_system")}),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(0),c(),v.push("/login"),console.error(e.t0);case 14:k(!1);case 15:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}C.current||(C.current=new h);var S,W=(S=o(n.mark((function r(t,e){var o;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,U(null),k(!0),r.next=5,l("/v1/user_token",{auth:t});case 5:o=r.sent,u(o.jwt),r.next=14;break;case 9:return r.prev=9,r.t0=r.catch(0),console.error(r.t0),k(!1),r.abrupt("return",U("Wrong user name or password"));case 14:G().then(e);case 15:case"end":return r.stop()}}),r,null,[[0,9]])}))),function(r,t){return S.apply(this,arguments)});return a((function(){var r;try{r=p()}catch(r){c()}var t=f.test(v.location.pathname);return!r&&t?k(!1):r?void G():(v.push("/login"),k(!1))}),[]),{user:x,loading:w,error:T,login:W,logout:function(){c(),v.push("/login")},auth0:C.current}}export default v;
@@ -1 +1 @@
1
- import o from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import r from"@babel/runtime/helpers/asyncToGenerator";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{styled as i,Grid as m,Button as s}from"@material-ui/core";import{memo as a,useState as p}from"react";import c from"prop-types";import"../../../../components/Login/components/Login.js";import l from"../../../../components/Login/components/PasswordField.js";import d from"../../../../components/Login/components/Chip.js";import u from"../../../../components/Login/components/StepFooter.js";import f from"../../../../components/Login/components/StepContent.js";import g from"../../../../components/Login/components/StepHeader.js";import h from"../../../../components/Login/components/Step.js";import v from"../../../../components/Login/components/OrDivider.js";import j from"../../../../components/Login/components/HiddenEmailField.js";import"../../../../components/Login/components/EmailField.js";import{useAuth as L}from"../../../context/auth.js";import{NEED_HELP_EXTERNAL_LINK as b}from"../../../constants/index.js";import y from"./SSOButton.js";var w=i(m)((function(o){var n=o.theme;return{marginTop:2*n.spacing(1),marginBottom:2*n.spacing(1),"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0}}})),S=i(s)((function(o){var n=o.theme;return{width:71,padding:n.spacing(),whiteSpace:"nowrap",backgroundColor:n.status.loginButton,"&:hover":{backgroundColor:"".concat(n.status.loginButtonHovered)}}}));function k(i){var s,a=i.email,c=i.schemas,k=i.onBack,B=i.onFinishLogin,C=L(),x=p(""),F=o(x,2),q=F[0],R=F[1],T=p(!1),H=o(T,2),I=H[0],E=H[1],O=I?C.error:null,A=(s=r(n.mark((function o(r){return n.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return r.preventDefault(),E(!0),o.next=4,C.login({email:a,password:q},B);case 4:case"end":return o.stop()}}),o)}))),function(o){return s.apply(this,arguments)}),D=c.find((function(o){return"password"===o.provider})),P=c.filter((function(o){return"password"!==o.provider}));return e(h,{children:[t(g,{children:"Sign In"}),t(f,{children:e(m,{container:!0,direction:"column",children:[t(d,{"data-not-migrated-MuiChip":!0,label:a,onClick:k}),P.map((function(o){return t(w,{item:!0,children:t(y,{title:o.title,provider:o.provider,connection:o.connection,redirectURI:"qwerty"})},o.title)})),D&&P.length>0&&t(m,{item:!0,children:t(v,{})}),D&&t(w,{item:!0,children:e("form",{id:"sign-in-form",onSubmit:A,children:[t(j,{email:a}),t(l,{value:q,onChange:function(o){R(o.target.value),E(!1)},disabled:C.loading,error:O})]})})]})}),t(u,{needHelpExternalLink:b,children:D&&t(S,{"data-testid":"".concat("AuthorizationPo","_signInButton"),form:"sign-in-form",type:"submit",variant:"contained",color:"primary",disabled:!q||C.loading||!!O,onClick:A,children:"Sign In"})})]})}k.propTypes={email:c.string.isRequired,schemas:c.arrayOf(c.shape({})).isRequired,onBack:c.func.isRequired,onFinishLogin:c.func.isRequired};var B=a(k);export default B;
1
+ import o from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import r from"@babel/runtime/helpers/asyncToGenerator";import{jsxs as t,jsx as e}from"react/jsx-runtime";import{styled as i,Grid as m,Button as a}from"@material-ui/core";import{memo as s,useState as p}from"react";import c from"prop-types";import"../../../../components/Login/components/Login.js";import l from"../../../../components/Login/components/PasswordField.js";import d from"../../../../components/Login/components/Chip.js";import u from"../../../../components/Login/components/StepFooter.js";import f from"../../../../components/Login/components/StepContent.js";import g from"../../../../components/Login/components/StepHeader.js";import h from"../../../../components/Login/components/Step.js";import v from"../../../../components/Login/components/OrDivider.js";import j from"../../../../components/Login/components/HiddenEmailField.js";import"../../../../components/Login/components/EmailField.js";import{useAuth as L}from"../../../context/auth.js";import{NEED_HELP_EXTERNAL_LINK as b}from"../../../constants/index.js";import y from"./SSOButton.js";var w=i(m)((function(o){var n=o.theme;return{marginTop:2*n.spacing(1),marginBottom:2*n.spacing(1),"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0}}})),S=i(a)((function(o){var n=o.theme;return{width:71,padding:n.spacing(),whiteSpace:"nowrap",backgroundColor:n.status.loginButton,"&:hover":{backgroundColor:"".concat(n.status.loginButtonHovered)}}}));function k(i){var a,s=i.email,c=i.schemas,k=i.onBack,B=i.onFinishLogin,C=L(),x=p(""),F=o(x,2),q=F[0],R=F[1],T=p(!1),H=o(T,2),I=H[0],E=H[1],O=I?C.error:null,A=(a=r(n.mark((function o(r){return n.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return r.preventDefault(),E(!0),o.next=4,C.login({email:s,password:q},B);case 4:case"end":return o.stop()}}),o)}))),function(o){return a.apply(this,arguments)}),D=c.find((function(o){return"password"===o.provider})),P=c.filter((function(o){return"password"!==o.provider}));return t(h,{children:[e(g,{children:"Sign In"}),e(f,{children:t(m,{container:!0,direction:"column",children:[e(d,{"data-not-migrated-MuiChip":!0,label:s,onClick:k}),P.map((function(o){return e(w,{item:!0,children:e(y,{title:o.title,provider:o.provider,connection:o.connection,redirectURI:"qwerty",auth0:C.auth0})},o.title)})),D&&P.length>0&&e(m,{item:!0,children:e(v,{})}),D&&e(w,{item:!0,children:t("form",{id:"sign-in-form",onSubmit:A,children:[e(j,{email:s}),e(l,{value:q,onChange:function(o){R(o.target.value),E(!1)},disabled:C.loading,error:O})]})})]})}),e(u,{needHelpExternalLink:b,children:D&&e(S,{"data-testid":"".concat("AuthorizationPo","_signInButton"),form:"sign-in-form",type:"submit",variant:"contained",color:"primary",disabled:!q||C.loading||!!O,onClick:A,children:"Sign In"})})]})}k.propTypes={email:c.string.isRequired,schemas:c.arrayOf(c.shape({})).isRequired,onBack:c.func.isRequired,onFinishLogin:c.func.isRequired};var B=s(k);export default B;
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/slicedToArray";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{withStyles as i,ButtonBase as o,Grid as s,Avatar as n,Typography as a,CircularProgress as l}from"@material-ui/core";import{useState as c}from"react";import d from"prop-types";import g from"../../../../clients/auth0/index.js";var m={google:"/static/media/55de612562c712e3a9d6ea86000e18c7.svg",microsoft:"/static/media/319d9b9a39d511547cf55d1336a8eca4.svg"};function p(i){var d=i.connection,p=i.title,u=i.provider,f=i.classes,h=c(!1),b=r(h,2),v=b[0],R=b[1],y=m[u];return e(o,{className:f.button,onClick:function(r){r.preventDefault(),v||(R(!0),g.loginWithConnection(d))},children:t(s,{container:!0,justify:"space-between",alignItems:"center",children:[e(s,{item:!0,children:t(s,{container:!0,justify:"flex-start",alignItems:"center",children:[e(s,{item:!0,children:y?e("img",{className:f.logo,src:y,alt:p}):e(n,{className:f.avatar,children:p&&p[0].toUpperCase()})}),e(s,{item:!0,children:e(a,{variant:"body2",children:p})})]})}),e(s,{item:!0,children:v&&e(l,{classes:{root:f.progressRoot,colorPrimary:f.progressColor},color:"primary",size:30})})]})})}p.propTypes={title:d.string.isRequired,provider:d.string.isRequired,connection:d.string.isRequired,classes:d.shape({button:d.string.isRequired,logo:d.string.isRequired,avatar:d.string.isRequired,progressRoot:d.string.isRequired,progressColor:d.string.isRequired}).isRequired};var u=i((function(r){return{button:{width:"100%",height:56,fontSize:16,fontWeight:400,color:"#fff",display:"inline-flex",padding:0,alignItems:"center",justifyContent:"flex-start",whiteSpace:"nowrap",borderRadius:4,borderWidth:1,borderStyle:"solid",borderColor:"#616161",textDecoration:"none","&:hover":{borderColor:r.status.loginButton}},logo:{height:30,width:30,margin:12},avatar:{height:30,width:30,margin:12,color:"#ffffff",backgroundColor:r.status.loginButton},progressRoot:{margin:"12px 24px"},progressColor:{color:r.status.loginButton}}}))(p);export default u;
1
+ import e from"@babel/runtime/helpers/slicedToArray";import{jsx as r,jsxs as t}from"react/jsx-runtime";import{withStyles as o,ButtonBase as i,Grid as n,Avatar as a,Typography as l,CircularProgress as s}from"@material-ui/core";import{useState as c}from"react";var d={google:"/static/media/55de612562c712e3a9d6ea86000e18c7.svg",microsoft:"/static/media/319d9b9a39d511547cf55d1336a8eca4.svg"};var m=o((function(e){return{button:{width:"100%",height:56,fontSize:16,fontWeight:400,color:"#fff",display:"inline-flex",padding:0,alignItems:"center",justifyContent:"flex-start",whiteSpace:"nowrap",borderRadius:4,borderWidth:1,borderStyle:"solid",borderColor:"#616161",textDecoration:"none","&:hover":{borderColor:e.status.loginButton}},logo:{height:30,width:30,margin:12},avatar:{height:30,width:30,margin:12,color:"#ffffff",backgroundColor:e.status.loginButton},progressRoot:{margin:"12px 24px"},progressColor:{color:e.status.loginButton}}}))((function(o){var m=o.connection,f=o.title,g=o.provider,h=o.auth0,u=o.classes,p=c(!1),b=e(p,2),v=b[0],y=b[1],C=d[g];return r(i,{className:u.button,onClick:function(e){e.preventDefault(),v||(y(!0),h.loginWithConnection(m))},children:t(n,{container:!0,justify:"space-between",alignItems:"center",children:[r(n,{item:!0,children:t(n,{container:!0,justify:"flex-start",alignItems:"center",children:[r(n,{item:!0,children:C?r("img",{className:u.logo,src:C,alt:f}):r(a,{className:u.avatar,children:f&&f[0].toUpperCase()})}),r(n,{item:!0,children:r(l,{variant:"body2",children:f})})]})}),r(n,{item:!0,children:v&&r(s,{classes:{root:u.progressRoot,colorPrimary:u.progressColor},color:"primary",size:30})})]})})}));export default m;
@@ -1 +1 @@
1
- import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import"lodash";import"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import{showErrorNotification as o}from"../../../utils/notificationToasts.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsx as t}from"react/jsx-runtime";import"@material-ui/core";import{useEffect as e}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../components/Modal/index.js";import"../../../components/IconMenu/index.js";import"../../../components/StyledMenuItem/index.js";import n from"../../../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"../../../components/TextLink/index.js";import"../../../components/Template/TemplatePopover/index.js";import"../../../components/PinnableFilters/PinnableFilters.js";import"../../../components/HeaderLayout/HeaderLayout.js";import"../../../components/PadOffsetsPicker/PadOffsetsPicker.js";import"../../../components/PadOffsetsPicker/OffsetAssetChip.js";import"../../../components/PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../components/PadOffsetsPicker/StagesSelector.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{useAuth as s}from"../../context/auth.js";import r from"../../../clients/auth0/index.js";function i(i){var p=i.router,m=s().login;return e((function(){r.handleAuthentication((function(o){return m({token:o.accessToken},(function(){return p.push("/")}))}),(function(){o("Sorry, but we couldn’t log you in. Please contact Corva support if you need assistance"),p.push("/login")}))}),[]),t(n,{fullscreen:!1})}export default i;
1
+ import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import"lodash";import"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import{showErrorNotification as o}from"../../../utils/notificationToasts.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsx as t}from"react/jsx-runtime";import"@material-ui/core";import{useEffect as e}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../components/Modal/index.js";import"../../../components/IconMenu/index.js";import"../../../components/StyledMenuItem/index.js";import n from"../../../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"../../../components/TextLink/index.js";import"../../../components/Template/TemplatePopover/index.js";import"../../../components/PinnableFilters/PinnableFilters.js";import"../../../components/HeaderLayout/HeaderLayout.js";import"../../../components/PadOffsetsPicker/PadOffsetsPicker.js";import"../../../components/PadOffsetsPicker/OffsetAssetChip.js";import"../../../components/PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../components/PadOffsetsPicker/StagesSelector.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{useAuth as s}from"../../context/auth.js";function r(r){var i=r.router,p=s(),m=p.login,c=p.auth0;return e((function(){c.handleAuthentication((function(o){return m({token:o.accessToken},(function(){return i.push("/")}))}),(function(){o("Sorry, but we couldn’t log you in. Please contact Corva support if you need assistance"),i.push("/login")}))}),[]),t(n,{fullscreen:!1})}export default r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require('../../../ext-cjs/@babel/runtime/helpers/defineProperty.js');function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function a(t){for(var a=1;a<arguments.length;a++){var i=null!=arguments[a]?arguments[a]:{};a%2?r(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var i={qa:"qa",staging:"staging",production:"production"},o={REACT_APP_AUTH0_REDIRECT_URI:"http://app.local.corva.ai:8080/login/oauth-callback",REACT_APP_AUTH0_DOMAIN:"corva.auth0.com",REACT_APP_AUTH0_CLIENT_ID:"L1B0xGD5AuXwuTDFdFA9czDTM7Vvw464"},c=(e(t={},i.qa,a(a({},o),{},{REACT_APP_API_URL:"https://api.qa.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.qa.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.qa.corva.ai/v1"})),e(t,i.staging,a(a({},o),{},{REACT_APP_API_URL:"https://api.staging.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.staging.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.staging.corva.ai/v1"})),e(t,i.production,a(a({},o),{},{REACT_APP_API_URL:"https://api.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.corva.ai/v1"})),t);exports.CORVA_API_ENVS=i,exports.CORVA_API_ENV_VARIABLES=c,exports.CORVA_GLOBAL_DEPENDENCIES={"@corva/ui":"","@material-ui/core":"4.11.2","@material-ui/icons":"4.9.1","@material-ui/lab":"4.0.0-alpha.57","@material-ui/pickers":"3.2.10",classnames:"2.2.6","corva-convert-units":"1.10.17",highcharts:"8.1.2","highcharts-react-official":"2.2.2",html2canvas:"1.0.0-alpha.12",jsona:"1.5.1",lodash:"^4.17.4","mapbox.js":"3.2.1",moment:"2.23.0","moment-timezone":"0.5.23",react:"17.0.1","react-dom":"17.0.1","react-sortable-hoc":"0.6.8","react-sizeme":"2.5.2","react-redux":"5.1.1","react-virtualized":"9.21.2",redux:"3.7.2","redux-thunk":"2.3.0",reselect:"2.5.4","prop-types":"^15.6.1",uuid:"3.4.0"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require('../../../ext-cjs/@babel/runtime/helpers/defineProperty.js');function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function a(t){for(var a=1;a<arguments.length;a++){var i=null!=arguments[a]?arguments[a]:{};a%2?r(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var i={qa:"qa",staging:"staging",production:"production"},o={REACT_APP_AUTH0_REDIRECT_URI:"/login/oauth-callback",REACT_APP_AUTH0_DOMAIN:"corva.auth0.com",REACT_APP_AUTH0_CLIENT_ID:"L1B0xGD5AuXwuTDFdFA9czDTM7Vvw464"},c=(e(t={},i.qa,a(a({},o),{},{REACT_APP_API_URL:"https://api.qa.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.qa.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.qa.corva.ai/v1"})),e(t,i.staging,a(a({},o),{},{REACT_APP_API_URL:"https://api.staging.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.staging.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.staging.corva.ai/v1"})),e(t,i.production,a(a({},o),{},{REACT_APP_API_URL:"https://api.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.corva.ai/v1"})),t);exports.CORVA_API_ENVS=i,exports.CORVA_API_ENV_VARIABLES=c,exports.CORVA_GLOBAL_DEPENDENCIES={"@corva/ui":"","@material-ui/core":"4.11.2","@material-ui/icons":"4.9.1","@material-ui/lab":"4.0.0-alpha.57","@material-ui/pickers":"3.2.10",classnames:"2.2.6","corva-convert-units":"1.10.17",highcharts:"8.1.2","highcharts-react-official":"2.2.2",html2canvas:"1.0.0-alpha.12",jsona:"1.5.1",lodash:"^4.17.4","mapbox.js":"3.2.1",moment:"2.23.0","moment-timezone":"0.5.23",react:"17.0.1","react-dom":"17.0.1","react-sortable-hoc":"0.6.8","react-sizeme":"2.5.2","react-redux":"5.1.1","react-virtualized":"9.21.2",redux:"3.7.2","redux-thunk":"2.3.0",reselect:"2.5.4","prop-types":"^15.6.1",uuid:"3.4.0"};
@@ -10,9 +10,9 @@
10
10
  <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
11
11
  <title>Corva React App</title>
12
12
  </head>
13
- <body>
13
+ <body data-corva-theme-dark>
14
14
  <noscript>You need to enable JavaScript to run this app.</noscript>
15
- <div id="root" data-corva-theme-dark></div>
15
+ <div id="root"></div>
16
16
  <!--
17
17
  This HTML file is a template.
18
18
  If you open it directly in the browser, you will see an empty page.
@@ -1 +1 @@
1
- "use strict";var e=require('../../../ext-cjs/@babel/runtime/helpers/defineProperty.js'),r=require("./constants.js"),n=require("./webpack.config.common.js"),o=require("./plugins/checkCorvaUIVersion.js");function t(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,o)}return n}function i(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(n){e(r,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var c=require("webpack-merge").merge,s=require("path"),p=require("webpack"),l=require("clean-webpack-plugin").CleanWebpackPlugin,a=require("copy-webpack-plugin"),u=require("html-webpack-plugin"),d=require("chalk");require("dotenv").config({path:s.resolve(n.APP_DIRECTORY,"./.env")});module.exports=function(e,t){var v,O=process.env.HOST||"app.local.corva.ai",m=process.env.PORT||8080;return c(n.default(e,t),{mode:"development",devtool:"inline-source-map",devServer:{contentBase:"./dist",public:"".concat(O,":").concat(m),port:m},entry:s.resolve(__dirname,"DevServerEntryPoint.js"),plugins:[new l,new a({patterns:[{from:s.resolve(__dirname,"public")},{from:s.resolve(process.cwd(),"node_modules","@corva/ui/assets"),to:"static/media",noErrorOnMissing:!0}]}),new u({filename:"index.html",inject:!0,template:s.resolve(__dirname,"public","index.html")}),new p.EnvironmentPlugin(i(i({},process.env),{},{DEV_CENTER_APP_PATH:process.cwd(),REACT_APP_ENVIRONMENT:process.env.REACT_APP_ENVIRONMENT||"development"},(v=process.env.CORVA_API_ENV||r.CORVA_API_ENVS.production,v in r.CORVA_API_ENVS?r.CORVA_API_ENV_VARIABLES[v]:(console.log(d.red("CORVA_API_ENV should be one of [".concat(Object.keys(r.CORVA_API_ENVS).join(", "),"]"))),process.exit(1))))),o],module:{rules:[{test:/\.(png|jpe?g|gif)$/i,use:[{loader:"file-loader"}]},{test:/\.svg$/,use:[{loader:"svg-url-loader",options:{limit:1e4}}]}]}})};
1
+ "use strict";var e=require('../../../ext-cjs/@babel/runtime/helpers/defineProperty.js'),r=require("./constants.js"),o=require("./webpack.config.common.js"),n=require("./plugins/checkCorvaUIVersion.js");function t(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),o.push.apply(o,n)}return o}function s(r){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?t(Object(n),!0).forEach((function(o){e(r,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}var i=require("webpack-merge").merge,c=require("path"),l=require("webpack"),p=require("clean-webpack-plugin").CleanWebpackPlugin,u=require("copy-webpack-plugin"),a=require("html-webpack-plugin"),d=require("chalk");require("dotenv").config({path:c.resolve(o.APP_DIRECTORY,"./.env")});module.exports=function(e,t){var v,O=process.env.HOST||t.host||"localhost",m=process.env.PORT||t.port||8080;return i(o.default(e,t),{mode:"development",devtool:"inline-source-map",devServer:{contentBase:"./dist",public:"".concat(O,":").concat(m),port:m},entry:c.resolve(__dirname,"DevServerEntryPoint.js"),plugins:[new p,new u({patterns:[{from:c.resolve(__dirname,"public")},{from:c.resolve(process.cwd(),"node_modules","@corva/ui/assets"),to:"static/media",noErrorOnMissing:!0}]}),new a({filename:"index.html",inject:!0,template:c.resolve(__dirname,"public","index.html")}),new l.EnvironmentPlugin(s(s({},process.env),{},{DEV_CENTER_APP_PATH:process.cwd(),REACT_APP_ENVIRONMENT:process.env.REACT_APP_ENVIRONMENT||"development"},(v=process.env.CORVA_API_ENV||r.CORVA_API_ENVS.production,v in r.CORVA_API_ENVS?r.CORVA_API_ENV_VARIABLES[v]:(console.log(d.red("CORVA_API_ENV should be one of [".concat(Object.keys(r.CORVA_API_ENVS).join(", "),"]"))),process.exit(1))))),n],module:{rules:[{test:/\.(png|jpe?g|gif)$/i,use:[{loader:"file-loader"}]},{test:/\.svg$/,use:[{loader:"svg-url-loader",options:{limit:1e4}}]}]}})};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/classCallCheck";import t from"auth0-js";var o=process.env.REACT_APP_AUTH0_DOMAIN?new function o(){var r=this;n(this,o),e(this,"handleAuthentication",(function(e,n){return r.webAuth.parseHash((function(t,o){o&&o.accessToken?e(o):t&&n(t)}))})),e(this,"loginWithConnection",(function(e){return r.webAuth.authorize({connection:e})})),this.webAuth=new t.WebAuth({domain:process.env.REACT_APP_AUTH0_DOMAIN,clientID:process.env.REACT_APP_AUTH0_CLIENT_ID,redirectUri:process.env.REACT_APP_AUTH0_REDIRECT_URI,audience:process.env.REACT_APP_AUTH0_AUDIENCE,responseType:"token",scope:"openid profile email"})}:{};export default o;
1
+ import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/classCallCheck";import t from"auth0-js";var o=function o(){var i=this;n(this,o),e(this,"handleAuthentication",(function(e,n){return i.webAuth.parseHash((function(t,o){o&&o.accessToken?e(o):t&&n(t)}))})),e(this,"loginWithConnection",(function(e){return i.webAuth.authorize({connection:e})})),this.webAuth=new t.WebAuth({domain:process.env.REACT_APP_AUTH0_DOMAIN,clientID:process.env.REACT_APP_AUTH0_CLIENT_ID,redirectUri:"".concat(window.location.origin,"/login/oauth-callback"),audience:process.env.REACT_APP_AUTH0_AUDIENCE,responseType:"token",scope:"openid profile email"})};export default o;
@@ -1 +1 @@
1
- import{maxBy as e}from"lodash";import a from"@babel/runtime/helpers/slicedToArray";import{jsx as t,jsxs as l}from"react/jsx-runtime";import{makeStyles as r,Grid as n,FormControl as o,InputLabel as i,Select as s,ListSubheader as c,MenuItem as u}from"@material-ui/core";import{useState as d,useMemo as p,useEffect as v}from"react";import{string as b,func as f,shape as m}from"prop-types";import{isUserDeveloperAdmin as h}from"../../utils/user.js";import g from"./effects/index.js";var R=r({select:{width:250,margin:"8px 0"},group:{fontStyle:"italic",fontWeight:"bold",fontSize:"12px",color:"#999"}}),S=function(r){var b=r.value,f=r.onChange,m=r.appId,S=r.currentUser,_=R(),w=g(m),V=w.isLoading,y=w.packages,C=h(S),D=d(b),x=a(D,2),A=x[0],P=x[1],B=p((function(){var e=[{label:"Stable Release - no stable version",value:"PROD",disabled:!0},{label:"Beta - no beta version",value:"BETA",disabled:!0}],a=[];return y.forEach((function(t){var l=t.attributes,r=l.version,n=l.notes,o=l.label,i=l.status;if(o){var s="PROD"===o?e[0]:e[1];s.label="".concat("PROD"===o?"Stable Release":"Beta"," v").concat(r," ").concat(n?"- ".concat(n):""),s.disabled=!1}else C&&a.push({label:"v".concat(r," ").concat(n?"- ".concat(n):""),value:r,status:i})})),{labeled:e,unlabeled:a}}),[y,C]),I=B.labeled,O=B.unlabeled;return v((function(){if(C&&!b){var a=I.find((function(e){return!e.disabled}))||e(O.filter((function(e){return"published"===e.status})),"value");P(null==a?void 0:a.value),f(null==a?void 0:a.value)}}),[I,O]),t(n,{children:l(o,{className:_.select,children:[t(i,{shrink:!(!b&&!A),htmlFor:"appVersion",children:"App Version"}),l(s,{"data-testid":"".concat("DC_versionSelect","_dropdown"),value:b||A,onChange:function(e){f(e.target.value)},autoWidth:!0,disabled:V,label:"App Version",inputProps:{name:"appVersion",id:"appVersion"},children:[C&&t(c,{className:_.group,children:"Labelled Versions (When selected always shows current Beta or Stable Release Versions)"}),I.map((function(e){var a=e.label,l=e.value,r=e.disabled;return t(u,{"data-testid":"".concat("DC_versionSelect","_option_").concat(a,"MenuItem"),value:l,disabled:r,children:a})})),C&&t(c,{className:_.group,children:"Other versions (App will always show selected version until version is deleted)"}),O.map((function(e){var a=e.label,l=e.value;return t(u,{"data-testid":"".concat("DC_versionSelect","_option_").concat(a,"MenuItem"),value:l,children:a})}))]})]})})};S.propTypes={value:b,onChange:f.isRequired,appId:b.isRequired,currentUser:m({}).isRequired},S.defaultProps={value:null};export default S;
1
+ import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import{maxBy as e}from"lodash";import t from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import{PACKAGE_STATUSES as r}from"../../constants/appPackages.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsx as o,jsxs as i}from"react/jsx-runtime";import{makeStyles as n,Grid as s,FormControl as p,InputLabel as a,Select as m,ListSubheader as l,MenuItem as d}from"@material-ui/core";import{useState as c,useMemo as u,useEffect as j}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{string as C,func as v,shape as b}from"prop-types";import"classnames";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../LoadingIndicator/LoadingIndicator.js";import"../Tooltip.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{isUserDeveloperAdmin as A}from"../../utils/user.js";import"../ConfirmationDialog.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../ErrorBoundary/InternalErrorView/InternalErrorView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import f from"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import x from"./effects/index.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/index.js";import"../EmptyView/EmptyAppView/index.js";import"../Button/index.js";import"../MenuItem/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"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.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"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.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"../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";var g=r,D=n({select:{width:250,margin:"8px 0"},menuListRoot:{maxWidth:580},group:{fontStyle:"italic",fontWeight:"bold",fontSize:"12px",color:"#999"}}),S=function(r){var n=r.value,C=r.onChange,v=r.appId,b=r.currentUser,S=D(),h=x(v,{status:[g.DRAFT,g.PUBLISHED]}),P=h.isLoading,L=h.packages,y=A(b),E=c(n),T=t(E,2),I=T[0],B=T[1],k=u((function(){var e=[{label:"Stable Release - no stable version",value:"PROD",disabled:!0},{label:"Beta - no beta version",value:"BETA",disabled:!0}],t=[];return L.filter((function(e){return e.attributes.status!==g.FAILURE})).forEach((function(r){var o=r.attributes,i=o.version,n=o.notes,s=o.label,p=o.status;if(s){var a="PROD"===s?e[0]:e[1];a.label="".concat("PROD"===s?"Stable Release":"Beta"," v").concat(i," ").concat(n?"- ".concat(n):""),a.disabled=!1}else y&&t.push({label:"v".concat(i," ").concat(n?"- ".concat(n):""),value:i,status:p})})),{labeled:e,unlabeled:t}}),[L,y]),R=k.labeled,F=k.unlabeled;return j((function(){if(y&&!n){var t=R.find((function(e){return!e.disabled}))||e(F.filter((function(e){return"published"===e.status})),"value");B(null==t?void 0:t.value),C(null==t?void 0:t.value)}}),[R,F]),o(s,{children:i(p,{className:S.select,children:[o(a,{shrink:!(!n&&!I),htmlFor:"appVersion",children:"App Version"}),i(m,{"data-testid":"".concat("DC_versionSelect","_dropdown"),value:n||I,onChange:function(e){C(e.target.value)},disabled:P,label:"App Version",inputProps:{name:"appVersion",id:"appVersion"},MenuProps:{MenuListProps:{classes:{root:S.menuListRoot}}},children:[y&&o(l,{className:S.group,children:"Labelled Versions (When selected always shows current Beta or Stable Release Versions)"}),R.map((function(e){var t=e.label,r=e.value,i=e.disabled;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,disabled:i,children:t})})),y&&o(l,{className:S.group,children:"Other versions (App will always show selected version until version is deleted)"}),F.map((function(e){var t=e.label,r=e.value;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,children:o(f,{children:t})})}))]})]})})};S.propTypes={value:C,onChange:v.isRequired,appId:C.isRequired,currentUser:b({}).isRequired},S.defaultProps={value:null};export default S;
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/regenerator";import n from"@babel/runtime/helpers/asyncToGenerator";import{useState as t,useEffect as a}from"react";import{getAppPackages as o}from"../../../clients/jsonApi/index.js";export default function(i){var s=t({isLoading:!1,packages:[],error:null}),c=r(s,2),p=c[0],u=c[1];return a((function(){var r;(r=n(e.mark((function r(){var n,t;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,o(i);case 3:n=r.sent,t=n.data,u({isLoading:!1,packages:t,error:null}),r.next=12;break;case 8:r.prev=8,r.t0=r.catch(0),console.error(r.t0),u({isLoading:!1,packages:[],error:r.t0});case 12:case"end":return r.stop()}}),r,null,[[0,8]])}))),function(){return r.apply(this,arguments)})()}),[i]),p}
1
+ import r from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/regenerator";import n from"@babel/runtime/helpers/asyncToGenerator";import{useState as t,useEffect as a}from"react";import{getAppPackages as o}from"../../../clients/jsonApi/index.js";export default function(i,s){var c=t({isLoading:!1,packages:[],error:null}),p=r(c,2),u=p[0],l=p[1];return a((function(){var r;(r=n(e.mark((function r(){var n,t;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,o(i,s);case 3:n=r.sent,t=n.data,l({isLoading:!1,packages:t,error:null}),r.next=12;break;case 8:r.prev=8,r.t0=r.catch(0),console.error(r.t0),l({isLoading:!1,packages:[],error:r.t0});case 12:case"end":return r.stop()}}),r,null,[[0,8]])}))),function(){return r.apply(this,arguments)})()}),[i]),u}
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import{debounce as t,identity as r}from"lodash";import n from"@babel/runtime/helpers/slicedToArray";import{jsxs as o,jsx as i}from"react/jsx-runtime";import{withStyles as a,List as l,FormControl as s,InputLabel as p,FormHelperText as u,Typography as c,TextField as d,InputAdornment as f,Chip as m}from"@material-ui/core";import{forwardRef as b,useState as g,useEffect as h,useMemo as y}from"react";import O from"@babel/runtime/helpers/objectWithoutProperties";import x from"prop-types";import{Search as v}from"@material-ui/icons";import T from"../TruncatedText/index.js";import{PER_PAGE as I,SCROLL_THRESHOLD as j}from"./constants.js";import{useAssetAutoCompleteSelectData as P}from"./effects/index.js";import{Autocomplete as A}from"@material-ui/lab";function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?C(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var M="DC_SingleAssetEditorAutocomplete",w={paddingLeft:"16px",height:36,listStyleType:"none",display:"flex",alignItems:"center"},L=function(e){var t=e.text;return i("li",{style:w,children:i(c,{variant:"body2",color:"textSecondary",children:void 0===t?"Loading...":t})},"loading")},D=b((function(e,t){var r=e.children,n=e.loading,a=e.hasMore,s=O(e,["children","loading","hasMore"]);return o(l,S(S({},s),{},{ref:t,role:"listbox",children:[r,(a||n)&&i(L,{})]}))})),N=function(e){var a=e["data-testid"],l=e.appKey,c=e.assetType,b=e.classes,O=e.companyId,x=e.currentValue,C=e.disabled,w=e.errorText,N=e.isMultiple,R=e.isNullable,V=e.label,E=e.onChange,K=e.parentAssetId,_=e.parentAssetType,k=g(N?[]:null),q=n(k,2),z=q[0],H=q[1],B=g(""),W=n(B,2),F=W[0],G=W[1],J=g(""),Q=n(J,2),U=Q[0],X=Q[1],Y=g(!1),Z=n(Y,2),$=Z[0],ee=Z[1],te=g(1),re=n(te,2),ne=re[0],oe=re[1],ie=g(!0),ae=n(ie,2),le=ae[0],se=ae[1];h((function(){H(N?[]:null),oe(1),ee(!1)}),[c]);var pe=P({appKey:l,assetType:c,companyId:O,currentValue:x,isMultiple:N,parentAssetId:K,parentAssetType:_,scrollPage:ne,searchText:F,setCurrentOption:H}),ue=pe.assets,ce=pe.loading;h((function(){var e=ue.length>=I*ne;se(e)}),[ue,ne]);var de=y((function(){return t((function(e){oe(1),G(e)}),200)}),[]),fe=y((function(){return t((function(){return oe((function(e){return e+1}))}),250)}),[]),me={root:b.root,inputRoot:b.inputRoot,popupIndicator:b.popupIndicator,option:b.option,noOptions:b.noOptions,listbox:b.listbox};return o(s,{disabled:C,error:!!w,className:b.formControl,children:[!R&&i(p,{shrink:!0,children:V}),i(A,S({disabled:C,blurOnSelect:!0,classes:me,clearOnBlur:!0,clearOnEscape:!0,"data-testid":a,disableClearable:!0,filterOptions:r,getOptionLabel:function(e){return null==e?void 0:e.name},getOptionSelected:function(e,t){return e&&t&&e.id===t.id},inputValue:$?U:(null==z?void 0:z.name)||"",ListboxComponent:D,ListboxProps:{onScroll:function(e){if(le&&!ce){var t=e.currentTarget;t.scrollTop+t.clientHeight>t.scrollHeight-j&&fe()}},loading:ce,hasMore:le},options:ue,onChange:function(e,t){H(t),E(N?t.map((function(e){return e.id})):null==t?void 0:t.id,t)},onClose:function(){X(""),G(""),ee(!1),oe(1)},onInputChange:function(e,t,r){"input"===r?(X(t),ee(!0),de(t)):G("")},noOptionsText:i(L,{text:ce?"Loading...":"No options"}),renderInput:function(e){return i(d,S(S({},e),{},{variant:"standard",placeholder:"Search for asset..."},!N&&{InputProps:S(S({},e.InputProps),{},{startAdornment:i(f,{children:i(v,{className:b.searchIcon})})})}))},renderOption:function(e){var t=e.id,r=e.name;return i(T,{"data-testid":"".concat(M,"_option_").concat(r,"MenuItem"),children:N&&x.includes(t)?"".concat(r," (already selected)"):r},t)},value:z,multiple:N},N&&{renderTags:function(e,t){return e.map((function(e,r){return i(m,S({label:null==e?void 0:e.name},t({index:r})),e.id)}))},getOptionDisabled:function(e){return x.includes(e.id)}})),i(u,{children:w})]})};N.defaultProps={label:"Choose An Asset",currentValue:void 0,isNullable:!1,parentAssetId:void 0,parentAssetType:void 0,companyId:void 0,errorText:"","data-testid":"".concat(M,"_autoComplete"),disabled:!1,isMultiple:!1,appKey:null},N.propTypes={label:x.string,currentValue:x.oneOfType([x.number,x.arrayOf(x.number)]),isNullable:x.bool,onChange:x.func.isRequired,classes:x.shape({}).isRequired,parentAssetId:x.number,parentAssetType:x.string,companyId:x.number,assetType:x.string.isRequired,errorText:x.string,"data-testid":x.string,disabled:x.bool,isMultiple:x.bool,appKey:x.string};var R=a((function(e){return{formControl:{},listbox:{maxHeight:350},root:{fontSize:16},inputRoot:{paddingTop:16,padding:"8px 0",paddingBottom:0,width:350,fontSize:16},popupIndicator:{display:"none"},option:{paddingLeft:"16px !important",height:36,"&[aria-disabled=true]":{color:e.palette.primary.text9,opacity:1,backgroundColor:"unset"}},noOptions:{padding:0},searchIcon:{fontSize:"20px !important"}}}))(N);export default R;
1
+ import e from"@babel/runtime/helpers/defineProperty";import{debounce as t,identity as n}from"lodash";import r from"@babel/runtime/helpers/slicedToArray";import{jsxs as o,jsx as i}from"react/jsx-runtime";import{withStyles as a,List as l,FormControl as s,InputLabel as p,FormHelperText as u,Typography as c,TextField as d,InputAdornment as f,Chip as m}from"@material-ui/core";import{forwardRef as b,useState as g,useEffect as h,useMemo as y}from"react";import O from"@babel/runtime/helpers/objectWithoutProperties";import v from"prop-types";import{Search as x}from"@material-ui/icons";import T from"../TruncatedText/index.js";import{PER_PAGE as I,SCROLL_THRESHOLD as j}from"./constants.js";import{useAssetAutoCompleteSelectData as P}from"./effects/index.js";import{Autocomplete as A}from"@material-ui/lab";function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?C(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var M="DC_SingleAssetEditorAutocomplete",w={paddingLeft:"16px",height:36,listStyleType:"none",display:"flex",alignItems:"center"},L=function(e){var t=e.text;return i("li",{style:w,children:i(c,{variant:"body2",color:"textSecondary",children:void 0===t?"Loading...":t})},"loading")},D=b((function(e,t){var n=e.children,r=e.loading,a=e.hasMore,s=O(e,["children","loading","hasMore"]);return o(l,S(S({},s),{},{ref:t,role:"listbox",children:[n,(a||r)&&i(L,{})]}))})),N=function(e){var a=e["data-testid"],l=e.appKey,c=e.assetType,b=e.classes,O=e.companyId,v=e.currentValue,C=e.disabled,w=e.errorText,N=e.isMultiple,R=e.isNullable,V=e.label,E=e.onChange,K=e.parentAssetId,_=e.parentAssetType,k=g(N?[]:null),q=r(k,2),z=q[0],H=q[1],B=g(""),W=r(B,2),F=W[0],G=W[1],J=g(""),Q=r(J,2),U=Q[0],X=Q[1],Y=g(!1),Z=r(Y,2),$=Z[0],ee=Z[1],te=g(1),ne=r(te,2),re=ne[0],oe=ne[1],ie=g(!0),ae=r(ie,2),le=ae[0],se=ae[1];h((function(){H(N?[]:null),oe(1),ee(!1)}),[c]);var pe=P({appKey:l,assetType:c,companyId:O,currentValue:v,isMultiple:N,parentAssetId:K,parentAssetType:_,scrollPage:re,searchText:F,setCurrentOption:H}),ue=pe.assets,ce=pe.loading;h((function(){var e=ue.length>=I*re;se(e)}),[ue,re]);var de=y((function(){return t((function(e){oe(1),G(e)}),200)}),[]),fe=y((function(){return t((function(){return oe((function(e){return e+1}))}),250)}),[]),me={root:b.root,inputRoot:b.inputRoot,popupIndicator:b.popupIndicator,option:b.option,noOptions:b.noOptions,listbox:b.listbox};return o(s,{disabled:C,error:!!w,className:b.formControl,children:[!R&&i(p,{shrink:!0,children:V}),i(A,S({disabled:C,blurOnSelect:!0,classes:me,clearOnBlur:!0,clearOnEscape:!0,"data-testid":a,filterOptions:n,getOptionLabel:function(e){return null==e?void 0:e.name},getOptionSelected:function(e,t){return e&&t&&e.id===t.id},inputValue:$?U:(null==z?void 0:z.name)||"",ListboxComponent:D,ListboxProps:{onScroll:function(e){if(le&&!ce){var t=e.currentTarget;t.scrollTop+t.clientHeight>t.scrollHeight-j&&fe()}},loading:ce,hasMore:le},options:ue,onChange:function(e,t){var n;H(t),E(N?t.map((function(e){return e.id})):null!==(n=null==t?void 0:t.id)&&void 0!==n?n:null,t)},onClose:function(){X(""),G(""),ee(!1),oe(1)},onInputChange:function(e,t,n){"input"===n?(X(t),ee(!0),de(t)):G("")},noOptionsText:i(L,{text:ce?"Loading...":"No options"}),renderInput:function(e){return i(d,S(S({},e),{},{variant:"standard",placeholder:"Search for asset..."},!N&&{InputProps:S(S({},e.InputProps),{},{startAdornment:i(f,{children:i(x,{className:b.searchIcon})})})}))},renderOption:function(e){var t=e.id,n=e.name;return i(T,{"data-testid":"".concat(M,"_option_").concat(n,"MenuItem"),children:N&&v.includes(t)?"".concat(n," (already selected)"):n},t)},value:z,multiple:N},N&&{renderTags:function(e,t){return e.map((function(e,n){return i(m,S({label:null==e?void 0:e.name},t({index:n})),e.id)}))},getOptionDisabled:function(e){return v.includes(e.id)}})),i(u,{children:w})]})};N.defaultProps={label:"Choose An Asset",currentValue:void 0,isNullable:!1,parentAssetId:void 0,parentAssetType:void 0,companyId:void 0,errorText:"","data-testid":"".concat(M,"_autoComplete"),disabled:!1,isMultiple:!1,appKey:null},N.propTypes={label:v.string,currentValue:v.oneOfType([v.number,v.arrayOf(v.number)]),isNullable:v.bool,onChange:v.func.isRequired,classes:v.shape({}).isRequired,parentAssetId:v.number,parentAssetType:v.string,companyId:v.number,assetType:v.string.isRequired,errorText:v.string,"data-testid":v.string,disabled:v.bool,isMultiple:v.bool,appKey:v.string};var R=a((function(e){return{formControl:{},listbox:{maxHeight:350},root:{fontSize:16},inputRoot:{paddingTop:16,padding:"8px 0",paddingBottom:0,width:350,fontSize:16},popupIndicator:{display:"none"},option:{paddingLeft:"16px !important",height:36,"&[aria-disabled=true]":{color:e.palette.primary.text9,opacity:1,backgroundColor:"unset"}},noOptions:{padding:0},searchIcon:{fontSize:"20px !important"}}}))(N);export default R;
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../constants/completion.js";import"../../../../../constants/alerts.js";import{cloneDeep as e,get as r}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as o}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENT_TO_ASSET_TYPE as n,SEGMENTS as s}from"../../../../../constants/segment.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../../../utils/index.js";import{jsxs as p,jsx as a,Fragment as m}from"react/jsx-runtime";import{withStyles as l,Dialog as c,Tabs as d,DialogTitle as u,Divider as j,DialogContent as g,Tab as f,DialogActions as A}from"@material-ui/core";import{useState as C}from"react";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{func as S,shape as b,string as x,bool as y}from"prop-types";import"classnames";import"../../../../Modal/index.js";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Tooltip.js";import"../../../../Avatar/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import{useDevCenterRouter as v}from"../../../DevCenterRouterContext/effects/useDevCenterRouter.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import h from"../../../../ConfirmationDialog.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../PadModeSelect/PadModeSelect.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppContext.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"../AppActions/AppActions.css.js";import"../../../../ErrorBoundary/InternalErrorView/InternalErrorView.js";import P from"../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../Typography.js";import E from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import D from"./RemoveAppButton.js";import"../../../../SlateFormattedText/RenderElements.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import T from"./AppDetails.js";import k from"./AppSettingsDialog.module.css.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../../TruncatedText/index.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import L from"../../../../AssetEditor/index.js";import I from"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../Login/components/Login.js";import"../../../../Login/components/PasswordField.js";import"../../../../Login/components/Chip.js";import"../../../../Login/components/StepFooter.js";import"../../../../Login/components/StepContent.js";import"../../../../Login/components/StepHeader.js";import"../../../../Login/components/Step.js";import"../../../../Login/components/OrDivider.js";import"../../../../Login/components/HiddenEmailField.js";import"../../../../Login/components/EmailField.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/index.js";import"../../../../EmptyView/EmptyAppView/index.js";import O from"../../../../Button/index.js";import"../../../../MenuItem/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"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTable/index.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"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../Notifications/Notifications.js";import"../../../../TextLink/index.js";import"../../../../Template/TemplatePopover/index.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"../../../../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";function B(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function R(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?B(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):B(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var w="DC_appSettings",F=l({paper:{minWidth:"50rem",height:"40rem"}})(c),M=l({root:{marginBottom:10}})(d),W="SETTINGS",V="APP DETAILS";function N(l){var c=l.AppSettingsComponent,d=l.app,S=l.appData,b=l.appName,x=l.currentUser,y=l.isMultiRig,B=l.isProductSubscriptionFeatureActive,N=l.layoutEnvironment,q=l.onAppRemove,H=l.onSettingsChange,U=l.segment,_=l.toggleAppSettingsDialog,G=C(W),z=i(G,2),K=z[0],Y=z[1],J=C((function(){var t;return R(R({},e(d.settings)),{},{package:d.settings.package||(null==d||null===(t=d.package)||void 0===t?void 0:t.version)})})),Q=i(J,2),X=Q[0],Z=Q[1],$=C(!0),tt=i($,2),et=tt[0],rt=tt[1],it=v(),ot=d.id===o,nt=function(e,r){return Z((function(i){return R(R({},i),{},t({},e,r))}))},st=function(t){return Z((function(e){return R(R({},e),t)}))},pt=N&&"asset"===N.type,at=!(y||pt&&U===s.COMPLETION);return p(F,{open:!0,onBackdropClick:_,children:[p(u,{children:[b," settings"]}),a(j,{}),p(g,{children:[p(M,{value:K,onChange:function(t,e){return Y(e)},indicatorColor:"primary",textColor:"primary",children:[a(f,{"data-testid":"".concat(w,"_settingsTab"),label:W,value:W}),a(f,{"data-testid":"".concat(w,"_appDetailsTab"),label:V,value:V}),a(O,{className:k.viewAppButton,onClick:function(){var t,e;return it.push((e=null==d||null===(t=d.app)||void 0===t?void 0:t.id,"/apps/".concat(e)))},children:"VIEW APP PAGE"})]}),p(P,{ErrorView:E,app:d,children:[a(h,{open:!et&&!X.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return rt(!0)}}),K===W&&p(m,{children:[at&&a(L,{appKey:B&&!ot?d.app_key:null,settings:X,onSettingsChange:st,appType:n[U],isNullable:!1,label:"Active Asset"}),c&&a(c,{app:d,appData:S,settings:X,onSettingChange:nt,onSettingsChange:st,layoutEnvironment:N,currentUser:x}),!ot&&a(I,{appId:d.app.id,value:X.package,onChange:function(t){return nt("package",t)},currentUser:x})]}),K===V&&a(T,{appDescription:r(d,"app.description"),appSummary:r(d,"app.summary")})]})]}),p(A,{children:[q&&a(D,{appName:b,onAppRemove:q}),a(O,{"data-testid":"".concat(w,"_cancel"),variation:"secondary",onClick:_,children:"Cancel"}),a(O,{"data-testid":"".concat(w,"_save"),variation:"primary",onClick:function(){X.package||ot?(H(X),_()):rt(!1)},children:"Save"})]})]})}N.propTypes={AppSettingsComponent:S,app:b({}).isRequired,appData:b({}).isRequired,appName:x.isRequired,currentUser:b({}).isRequired,isMultiRig:y.isRequired,isProductSubscriptionFeatureActive:y,layoutEnvironment:b({}).isRequired,onAppRemove:S,onSettingsChange:S.isRequired,segment:x.isRequired,toggleAppSettingsDialog:S.isRequired},N.defaultProps={AppSettingsComponent:null,isProductSubscriptionFeatureActive:!1,onAppRemove:void 0};export default N;
1
+ import t from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../constants/completion.js";import"../../../../../constants/alerts.js";import{cloneDeep as e,get as r}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as o}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENT_TO_ASSET_TYPE as n,SEGMENTS as s}from"../../../../../constants/segment.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../../../utils/index.js";import{jsxs as p,jsx as a,Fragment as m}from"react/jsx-runtime";import{withStyles as l,Dialog as c,Tabs as d,DialogTitle as u,Divider as j,DialogContent as g,Tab as f,DialogActions as A}from"@material-ui/core";import{useState as C}from"react";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{func as S,shape as b,string as x,bool as y}from"prop-types";import"classnames";import"../../../../Modal/index.js";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Tooltip.js";import"../../../../Avatar/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import{useDevCenterRouter as v}from"../../../DevCenterRouterContext/effects/useDevCenterRouter.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import h from"../../../../ConfirmationDialog.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../PadModeSelect/PadModeSelect.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppContext.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"../AppActions/AppActions.css.js";import"../../../../ErrorBoundary/InternalErrorView/InternalErrorView.js";import P from"../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../Typography.js";import E from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import D from"./RemoveAppButton.js";import"../../../../SlateFormattedText/RenderElements.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import T from"./AppDetails.js";import k from"./AppSettingsDialog.module.css.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../../TruncatedText/index.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import L from"../../../../AssetEditor/index.js";import I from"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../Login/components/Login.js";import"../../../../Login/components/PasswordField.js";import"../../../../Login/components/Chip.js";import"../../../../Login/components/StepFooter.js";import"../../../../Login/components/StepContent.js";import"../../../../Login/components/StepHeader.js";import"../../../../Login/components/Step.js";import"../../../../Login/components/OrDivider.js";import"../../../../Login/components/HiddenEmailField.js";import"../../../../Login/components/EmailField.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/index.js";import"../../../../EmptyView/EmptyAppView/index.js";import O from"../../../../Button/index.js";import"../../../../MenuItem/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"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTable/index.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"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../Notifications/Notifications.js";import"../../../../TextLink/index.js";import"../../../../Template/TemplatePopover/index.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"../../../../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";function B(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function R(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?B(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):B(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var w="DC_appSettings",F=l({paper:{minWidth:"50rem",height:"40rem"}})(c),M=l({root:{marginBottom:10}})(d),W="SETTINGS",V="APP DETAILS";function N(l){var c=l.AppSettingsComponent,d=l.app,S=l.appData,b=l.appName,x=l.currentUser,y=l.isMultiRig,B=l.isProductSubscriptionFeatureActive,N=l.layoutEnvironment,q=l.onAppRemove,H=l.onSettingsChange,U=l.segment,_=l.toggleAppSettingsDialog,G=C(W),z=i(G,2),K=z[0],Y=z[1],J=C((function(){var t;return R(R({},e(d.settings)),{},{package:d.settings.package||(null==d||null===(t=d.package)||void 0===t?void 0:t.version)})})),Q=i(J,2),X=Q[0],Z=Q[1],$=C(!0),tt=i($,2),et=tt[0],rt=tt[1],it=v(),ot=d.id===o,nt=function(e,r){return Z((function(i){return R(R({},i),{},t({},e,r))}))},st=function(t){return Z((function(e){return R(R({},e),t)}))},pt=N&&"asset"===N.type,at=!(y||pt&&U===s.COMPLETION);return p(F,{open:!0,onBackdropClick:_,children:[p(u,{children:[b," settings"]}),a(j,{}),p(g,{children:[p(M,{value:K,onChange:function(t,e){return Y(e)},indicatorColor:"primary",textColor:"primary",children:[a(f,{"data-testid":"".concat(w,"_settingsTab"),label:W,value:W}),a(f,{"data-testid":"".concat(w,"_appDetailsTab"),label:V,value:V}),a(O,{className:k.viewAppButton,onClick:function(){var t,e;return it.push((e=null==d||null===(t=d.app)||void 0===t?void 0:t.id,"/apps/".concat(e)))},children:"VIEW APP PAGE"})]}),p(P,{ErrorView:E,app:d,children:[a(h,{open:!et&&!X.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return rt(!0)}}),K===W&&p(m,{children:[at&&a(L,{appKey:B&&!ot?d.app_key:null,settings:X,onSettingsChange:st,appType:n[U],isNullable:pt,label:"Active Asset"}),c&&a(c,{app:d,appData:S,settings:X,onSettingChange:nt,onSettingsChange:st,layoutEnvironment:N,currentUser:x}),!ot&&a(I,{appId:d.app.id,value:X.package,onChange:function(t){return nt("package",t)},currentUser:x})]}),K===V&&a(T,{appDescription:r(d,"app.description"),appSummary:r(d,"app.summary")})]})]}),p(A,{children:[q&&a(D,{appName:b,onAppRemove:q}),a(O,{"data-testid":"".concat(w,"_cancel"),variation:"secondary",onClick:_,children:"Cancel"}),a(O,{"data-testid":"".concat(w,"_save"),variation:"primary",onClick:function(){X.package||ot?(H(X),_()):rt(!1)},children:"Save"})]})]})}N.propTypes={AppSettingsComponent:S,app:b({}).isRequired,appData:b({}).isRequired,appName:x.isRequired,currentUser:b({}).isRequired,isMultiRig:y.isRequired,isProductSubscriptionFeatureActive:y,layoutEnvironment:b({}).isRequired,onAppRemove:S,onSettingsChange:S.isRequired,segment:x.isRequired,toggleAppSettingsDialog:S.isRequired},N.defaultProps={AppSettingsComponent:null,isProductSubscriptionFeatureActive:!1,onAppRemove:void 0};export default N;
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import n from"@babel/runtime/helpers/slicedToArray";import{jsxs as t,jsx as i}from"react/jsx-runtime";import{makeStyles as r,Button as o,Typography as a}from"@material-ui/core";import{useRef as l,useState as c}from"react";import p from"prop-types";import{Publish as u}from"@material-ui/icons";import m from"./partials/UploadingFileState/FileLoadingProgress.js";var s=r({filesLoader:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%"},uploadingFiles:{width:"100%"},fileInput:{display:"none"},inputButton:{display:"flex",alignItems:"center"},inputButtonText:{marginLeft:"6px",fontSize:"14px"}});function f(r){var p=s(),f=r.onLoad,d=l(),g=c([]),h=n(g,2),v=h[0],x=h[1],y=function(e,n){f(e,n)};return t("div",{className:p.filesLoader,children:[i("div",{className:p.uploadingFiles,children:v.map((function(n){return i(m,{file:n,onLoad:function(e){return y(n,e)},onDelete:function(t){return i=n,(r=v.findIndex((function(e){return e.name===i.name})))>-1&&v.splice(r,1),void x(e(v));var i,r}},n.name)}))}),!v.length&&i("div",{className:p.inputButton,children:t(o,{color:"primary",variant:"contained",onClick:function(){return d.current.click()},children:[i("input",{ref:d,type:"file",accept:".csv, text/csv",className:p.fileInput,onChange:function(e){var n=Array.from(e.target.files);n.length&&x(n)}}),i(u,{}),i(a,{className:p.inputButtonText,children:"Upload File"})]})})]})}f.propTypes={onLoad:p.func.isRequired};export default f;
1
+ import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{jsxs as o,jsx as n}from"react/jsx-runtime";import{Typography as t,LinearProgress as a,Tooltip as i,IconButton as c}from"@material-ui/core";import{useState as l,useEffect as s}from"react";import d from"prop-types";import{Delete as m}from"@material-ui/icons";import p from"./Icons/IconWarning.js";import f from"./Icons/IconCancel.js";import u from"./Icons/IconSuccess.js";import{useStyles as h}from"./useStyles.js";import v from"./Icons/FileIcon.js";function y(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),o.push.apply(o,n)}return o}function b(r){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?y(Object(n),!0).forEach((function(o){e(r,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function j(e){var d=h(),y=l({}),j=r(y,2),w=j[0],O=j[1],g=l(0),N=r(g,2),P=N[0],S=N[1],z=e.name,B=e.sizeBytes,I=e.handleCancel,M=e.onDelete,C=e.loadedBytes,D=e.error;return s((function(){B&&O(B>=Math.pow(10,6)?{downloaded:0,unit:"MB",convertedSize:Math.floor(B/Math.pow(10,5))/10}:B>=Math.pow(10,3)?{downloaded:0,unit:"KB",convertedSize:Math.floor(B/Math.pow(10,2))/10}:{downloaded:0,unit:"B",convertedSize:Math.floor(10*B)/10})}),[B]),s((function(){if(C){var e=Math.round(C/B*100);O((function(r){return b(b({},r),{},{downloaded:Math.floor(r.convertedSize*e/10)/10})})),S(e)}}),[C]),o("div",{className:d.fileStateWrapper,children:[n("div",{className:d.fileIconContainer,children:n(v,{name:z})}),o("div",{className:d.fileState,children:[o("div",{className:d.fileStateProgress,children:[n("div",{className:d.fileNameWrapper,children:n(t,{className:d.fileName,children:z})}),n(a,{className:d.progressBar,variant:"determinate",value:P,classes:{colorPrimary:d.progressBackground}}),o("div",{className:d.loaderProgressContainer,children:[n(t,{className:d.fileSize,component:"span",children:"".concat(w.downloaded," of ").concat(w.convertedSize," ").concat(w.unit)}),n("div",{className:d.progressStatus,children:D?n(i,{title:"There was a server error during the upload request. Please try later.",children:o(t,{component:"div",className:d.errorContainer,children:[n(t,{component:"span",className:d.errorText,children:"Upload Error"}),n(p,{})]})}):"".concat(P," %")})]})]}),o("div",{className:d.fileActions,children:[P<100&&!D&&n(c,{size:"small",onClick:function(){I(z),S(0),O((function(e){return b(b({},e),{},{downloaded:0})}))},children:n(f,{})}),100===P&&!D&&(M?n(c,{size:"small",onClick:M,children:n(m,{className:d.deleteIcon})}):n(u,{}))]})]})]})}j.propTypes={onDelete:d.func,handleCancel:d.func,name:d.string,sizeBytes:d.number,error:d.bool,loadedBytes:d.number.isRequired},j.defaultProps={onDelete:null,name:"",sizeBytes:1,error:null,handleCancel:null};export default j;
@@ -0,0 +1 @@
1
+ import{jsx as o}from"react/jsx-runtime";import r from"prop-types";import e from"./DocFileIcon.js";import i from"./PdfFileIcon.js";import n from"./ExelFileIcon.js";import m from"./UnknownFileIcon.js";var p=function(r){var p=r.name;return p.includes(".doc")?o(e,{}):p.includes(".pdf")?o(i,{}):p.includes(".xls")?o(n,{}):o(m,{})};p.propTypes={name:r.string.isRequired};export default p;
@@ -0,0 +1 @@
1
+ import{makeStyles as e}from"@material-ui/core";var t=e((function(e){return{fileStateWrapper:{display:"flex",alignItems:"center"},fileIconContainer:{display:"flex",alignItems:"center",marginRight:"10px"},fileState:{display:"flex",flexGrow:"1",alignItems:"center"},fileStateProgress:{flexGrow:"1"},fileNameWrapper:{display:"table",tableLayout:"fixed",width:"100%"},fileName:{display:"table-cell",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontSize:"14px",lineHeight:"16px"},fileSize:{fontSize:"11px",lineHeight:"12px",color:e.palette.primary.text6},checkIcon:{color:e.palette.success.bright},deleteIcon:{color:e.palette.primary.text6,cursor:"pointer"},progressBar:{borderRadius:"2px",height:"2px",margin:"4px 0"},fileActions:{display:"flex",alignItems:"center",paddingLeft:"24px"},progressBackground:{backgroundColor:e.palette.primary.dark},loaderProgressContainer:{display:"flex",width:"100%",fontSize:"11px",fontWeight:"400",letterSpacing:"0.4px",color:e.palette.primary.text6,marginTop:"4px"},progressStatus:{flexGrow:1,display:"flex",justifyContent:"flex-end"},errorContainer:{display:"flex",cursor:"pointer"},errorText:{color:e.palette.error.main,fontSize:"11px",fontWeight:"400",letterSpacing:"0.4px",marginRight:"5px",lineHeight:"16px"}}}));export{t as useStyles};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import{isEmpty as n,get as r}from"lodash";import{jsxs as a,jsx as i}from"react/jsx-runtime";import{makeStyles as s,Fab as c,Dialog as l,DialogTitle as o,DialogContent as d,FormControl as u,InputLabel as f,Select as p,MenuItem as m,Checkbox as h,ListItemText as S,DialogActions as g,Button as E}from"@material-ui/core";import{useMemo as I,useEffect as b}from"react";import{getPads as C}from"../../clients/jsonApi/index.js";import _ from"prop-types";import{Add as D}from"@material-ui/icons";import O from"jsona";import P from"use-tiny-state-machine";function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?y(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var v=new O,w=s({fabSmallBtn:{width:24,height:24,minHeight:24,margin:"0 6px 0 1px"},fabSmallBtnIcon:{width:20,height:20},dialogPaper:{width:"75%",maxWidth:420}});var L={id:"requests",initial:"idle",context:{padsData:[],wellsData:[],lastStage:[],error:null,companyId:0},states:{idle:{on:{FETCH_PADS:{target:"pending",action:function(e){var t=e.dispatch,a=e.context;C({fields:["pad.name","pad.wells"],sort:"name",per_page:1e3,company:a.companyId}).then((function(e){return v.deserialize(e)})).then((function(e){return e.filter((function(e){return!n(r(e,"wells"))}))})).then((function(e){return t("PADS_REQUEST_SUCCESS",e)})).catch((function(e){return t("FAILURE",e)}))}}}},pending:{on:{PADS_REQUEST_SUCCESS:{target:"success",beforeStateChange:function(e,t){return(0,e.updateContext)((function(e){return W(W({},e),{},{padsData:t})}))}},FAILURE:{target:"failure",beforeStateChange:function(e,t){throw new Error(t.message)}}}},success:{on:{FETCH_WELLS:{target:"success",action:function(e,t){(0,e.dispatch)("WELLS_REQUEST_SUCCESS",t.reduce((function(e,t){return e.concat(t.wells)}),[]))}},WELLS_REQUEST_SUCCESS:{target:"success",beforeStateChange:function(e,t){return(0,e.updateContext)((function(e){return W(W({},e),{},{wellsData:t})}))}}}}}},x={id:"dialog",initial:"closed",context:{selectedPadIds:[],selectedWellIds:[]},states:{closed:{on:{OPEN_DIALOG:{target:"open",beforeStateChange:function(e,n){var r=e.updateContext,a=n.currentWellIds,i=n.padsData,s=[];return a&&a.size>0&&i.forEach((function(e){e.wells.forEach((function(t){a.includes(t.asset_id)&&!s.includes(e.id)&&s.push(e.id)}))})),r((function(e){return W(W({},e),{},{selectedPadIds:[].concat(s),selectedWellIds:t(a)})}))}}}},open:{on:{CLOSE_DIALOG:{target:"closed",beforeStateChange:function(e){return(0,e.updateContext)((function(e){return W(W({},e),{},{selectedPadIds:[],selectedWellIds:[]})}))}},SET_PAD_ID:{target:"open",beforeStateChange:function(e,t){var n=e.updateContext,r=t.selectedPadIds,a=t.currentWellIds,i=t.padsData,s=[];return a&&a.size>0&&i.forEach((function(e){e.wells.forEach((function(t){r.includes(e.id)&&a.includes(t.asset_id)&&s.push(t.asset_id)}))})),n((function(e){return W(W({},e),{},{selectedPadIds:r,selectedWellIds:[].concat(s)})}))}},SET_WELL_ID:{target:"open",beforeStateChange:function(e,t){return(0,e.updateContext)((function(e){return W(W({},e),{},{selectedWellIds:t})}))}}}}}},j=function(e){var r=e.onSave,s=e.currentOffsetSetting,C=e.assets,_=e.companyId,O=w(),y=P(L),W=y.state,v=y.dispatch,j=y.context,A=P(x),T=A.state,k=A.dispatch,R=A.context,U=I((function(){return 0===s.size&&C?C.map((function(e){return e.id})):s.map((function(e){return e.selectedWellId}))}),[s,C]),F=function(){return k("CLOSE_DIALOG")},q=R.selectedPadIds,z=R.selectedWellIds;return b((function(){j.companyId=_,v("FETCH_PADS")}),[]),b((function(){if(!n(q)){var e=j.padsData.filter((function(e){return q.includes(e.id)}));v("FETCH_WELLS",e)}}),[q]),a("div",{children:[i(c,{size:"small",color:"primary",classes:{sizeSmall:O.fabSmallBtn},onClick:function(){return k("OPEN_DIALOG",{currentWellIds:U,padsData:j.padsData})},disabled:"success"!==W,children:i(D,{className:O.fabSmallBtnIcon})}),"success"===W&&a(l,{open:"open"===T,onBackdropClick:F,classes:{paper:O.dialogPaper},children:[i(o,{children:"Offset Wells"}),a(d,{children:[a(u,{margin:"normal",fullWidth:!0,required:!0,children:[i(f,{htmlFor:"pad-select",shrink:!n(q),children:"Pad"}),i(p,{multiple:!0,inputProps:{name:"pads",id:"pad-select"},value:q,onChange:function(e){return k("SET_PAD_ID",{selectedPadIds:e.target.value,currentWellIds:U,padsData:j.padsData})},renderValue:function(e){return"".concat(e.length," selected")},children:j.padsData.map((function(e){return a(m,{value:e.id,children:[i(h,{checked:q.includes(e.id)}),i(S,{primary:e.name})]},e.id)}))})]}),a(u,{margin:"normal",disabled:n(q),fullWidth:!0,required:!0,children:[i(f,{htmlFor:"wells",shrink:!n(z),children:"Well"}),i(p,{multiple:!0,inputProps:{name:"wells",id:"well-select"},value:z,onChange:function(e){return k("SET_WELL_ID",e.target.value)},renderValue:function(e){return"".concat(e.length," selected")},children:j.wellsData.map((function(e){var t=U.includes(e.asset_id);return a(m,{value:e.asset_id,disabled:t,children:[i(h,{checked:z.includes(e.asset_id)}),i(S,{primary:e.name})]},e.id)}))})]})]}),a(g,{children:[i(E,{onClick:F,children:"Cancel"}),i(E,{variant:"contained",color:"primary",disabled:n(z),onClick:function(){var e=j.wellsData.filter((function(e){return z.includes(e.asset_id)})).map((function(e){return{selectedWellId:Number(e.asset_id),selectedWellName:e.name,selectedWellStatus:e.status,selectedStages:[],stages:{}}})),n=s.filter((function(t){return!e.find((function(e){return e.selectedWellId===t.selectedWellId}))}));n=[].concat(t(n),t(e)),F(),r(n)},children:"Save"})]})]})]})};j.propTypes={currentOffsetSetting:_.arrayOf(_.shape({})).isRequired,onSave:_.func.isRequired,companyId:_.string.isRequired,assets:_.arrayOf(_.shape({})).isRequired};export default j;
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import{isEmpty as n,get as r}from"lodash";import{jsxs as a,jsx as i}from"react/jsx-runtime";import{makeStyles as c,Fab as s,Dialog as l,DialogTitle as o,DialogContent as d,FormControl as u,InputLabel as f,Select as p,MenuItem as m,Checkbox as h,ListItemText as S,DialogActions as g,Button as E}from"@material-ui/core";import{useMemo as I,useEffect as b}from"react";import{getPads as C}from"../../clients/jsonApi/index.js";import _ from"prop-types";import{Add as D}from"@material-ui/icons";import O from"jsona";import P from"use-tiny-state-machine";function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?y(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var v=new O,w=c({fabSmallBtn:{width:24,height:24,minHeight:24,margin:"0 6px 0 1px"},fabSmallBtnIcon:{width:20,height:20},dialogPaper:{width:"75%",maxWidth:420}});var L={id:"requests",initial:"idle",context:{padsData:[],wellsData:[],lastStage:[],error:null,companyId:0},states:{idle:{on:{FETCH_PADS:{target:"pending",action:function(e){var t=e.dispatch,a=e.context;C({fields:["pad.name","pad.wells"],sort:"name",per_page:1e3,company:a.companyId}).then((function(e){return v.deserialize(e)})).then((function(e){return e.filter((function(e){return!n(r(e,"wells"))}))})).then((function(e){return t("PADS_REQUEST_SUCCESS",e)})).catch((function(e){return t("FAILURE",e)}))}}}},pending:{on:{PADS_REQUEST_SUCCESS:{target:"success",beforeStateChange:function(e,t){return(0,e.updateContext)((function(e){return W(W({},e),{},{padsData:t})}))}},FAILURE:{target:"failure",beforeStateChange:function(e,t){throw new Error(t.message)}}}},success:{on:{FETCH_WELLS:{target:"success",action:function(e,t){(0,e.dispatch)("WELLS_REQUEST_SUCCESS",t.reduce((function(e,t){return e.concat(t.wells)}),[]))}},WELLS_REQUEST_SUCCESS:{target:"success",beforeStateChange:function(e,t){return(0,e.updateContext)((function(e){return W(W({},e),{},{wellsData:t})}))}}}}}},x={id:"dialog",initial:"closed",context:{selectedPadIds:[],selectedWellIds:[]},states:{closed:{on:{OPEN_DIALOG:{target:"open",beforeStateChange:function(e,r){var a=e.updateContext,i=r.currentWellIds,c=r.padsData,s=[];return n(i)||c.forEach((function(e){e.wells.forEach((function(t){i.includes(t.asset_id)&&!s.includes(e.id)&&s.push(e.id)}))})),a((function(e){return W(W({},e),{},{selectedPadIds:[].concat(s),selectedWellIds:t(i)})}))}}}},open:{on:{CLOSE_DIALOG:{target:"closed",beforeStateChange:function(e){return(0,e.updateContext)((function(e){return W(W({},e),{},{selectedPadIds:[],selectedWellIds:[]})}))}},SET_PAD_ID:{target:"open",beforeStateChange:function(e,t){var r=e.updateContext,a=t.selectedPadIds,i=t.currentWellIds,c=t.padsData,s=[];return n(i)||c.forEach((function(e){e.wells.forEach((function(t){a.includes(e.id)&&i.includes(t.asset_id)&&s.push(t.asset_id)}))})),r((function(e){return W(W({},e),{},{selectedPadIds:a,selectedWellIds:[].concat(s)})}))}},SET_WELL_ID:{target:"open",beforeStateChange:function(e,t){return(0,e.updateContext)((function(e){return W(W({},e),{},{selectedWellIds:t})}))}}}}}},j=function(e){var r=e.onSave,c=e.currentOffsetSetting,C=e.assets,_=e.companyId,O=w(),y=P(L),W=y.state,v=y.dispatch,j=y.context,A=P(x),T=A.state,k=A.dispatch,R=A.context,U=I((function(){return n(c)&&!n(C)?C.map((function(e){return e.asset_id})):c.map((function(e){return e.selectedWellId}))}),[c,C]),F=function(){return k("CLOSE_DIALOG")},q=R.selectedPadIds,B=R.selectedWellIds;return b((function(){j.companyId=_,v("FETCH_PADS")}),[]),b((function(){if(!n(q)){var e=j.padsData.filter((function(e){return q.includes(e.id)}));v("FETCH_WELLS",e)}}),[q]),a("div",{children:[i(s,{size:"small",color:"primary",classes:{sizeSmall:O.fabSmallBtn},onClick:function(){return k("OPEN_DIALOG",{currentWellIds:U,padsData:j.padsData})},disabled:"success"!==W,children:i(D,{className:O.fabSmallBtnIcon})}),"success"===W&&a(l,{open:"open"===T,onBackdropClick:F,classes:{paper:O.dialogPaper},children:[i(o,{children:"Offset Wells"}),a(d,{children:[a(u,{margin:"normal",fullWidth:!0,required:!0,children:[i(f,{htmlFor:"pad-select",shrink:!n(q),children:"Pad"}),i(p,{multiple:!0,inputProps:{name:"pads",id:"pad-select"},value:q,onChange:function(e){return k("SET_PAD_ID",{selectedPadIds:e.target.value,currentWellIds:U,padsData:j.padsData})},renderValue:function(e){return"".concat(e.length," selected")},children:j.padsData.map((function(e){return a(m,{value:e.id,children:[i(h,{checked:q.includes(e.id)}),i(S,{primary:e.name})]},e.id)}))})]}),a(u,{margin:"normal",disabled:n(q),fullWidth:!0,required:!0,children:[i(f,{htmlFor:"wells",shrink:!n(B),children:"Well"}),i(p,{multiple:!0,inputProps:{name:"wells",id:"well-select"},value:B,onChange:function(e){return k("SET_WELL_ID",e.target.value)},renderValue:function(e){return"".concat(e.length," selected")},children:j.wellsData.map((function(e){var t=U.includes(e.asset_id);return a(m,{value:e.asset_id,disabled:t,children:[i(h,{checked:B.includes(e.asset_id)}),i(S,{primary:e.name})]},e.id)}))})]})]}),a(g,{children:[i(E,{onClick:F,children:"Cancel"}),i(E,{variant:"contained",color:"primary",disabled:n(B),onClick:function(){var e=j.wellsData.filter((function(e){return B.includes(e.asset_id)})).map((function(e){return{selectedWellId:Number(e.asset_id),selectedWellName:e.name,selectedWellStatus:e.status,selectedStages:[],stages:{}}})),n=c.filter((function(t){return!e.find((function(e){return e.selectedWellId===t.selectedWellId}))}));n=[].concat(t(n),t(e)),F(),r(n)},children:"Save"})]})]})]})};j.propTypes={currentOffsetSetting:_.arrayOf(_.shape({})).isRequired,onSave:_.func.isRequired,companyId:_.string.isRequired,assets:_.arrayOf(_.shape({})).isRequired};export default j;
@@ -1 +1 @@
1
- var o=function(o,r,t){return 100*(o-r)/(t-r)},r=function(o,r,t){return o*(t-r)/100},t=function(o,r,t,n,f){return o<n?{from:n,to:t}:o>t-f?{from:t-f,to:t}:{from:o,to:t}},n=function(o,r,t,n,f){return o>n?{from:r,to:n}:o<r+f?{from:r,to:r+f}:{from:r,to:o}};export{o as calculatePercentForValue,r as calculateValueFromPercent,t as updateFromValue,n as updateToValue};
1
+ var o=function(o,r,t){return 100*(o-r)/(t-r)},r=function(o,r,t){return r+o*(t-r)/100},t=function(o,r,t,n,f){return o<n?{from:n,to:t}:o>t-f?{from:t-f,to:t}:{from:o,to:t}},n=function(o,r,t,n,f){return o>n?{from:r,to:n}:o<r+f?{from:r,to:r+f}:{from:r,to:o}};export{o as calculatePercentForValue,r as calculateValueFromPercent,t as updateFromValue,n as updateToValue};
@@ -1 +1 @@
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
+ import e from"@babel/runtime/helpers/defineProperty";import{jsxs as a,jsx as i}from"react/jsx-runtime";import{withStyles as l,Grid as r,Typography as t,Switch as o}from"@material-ui/core";import{forwardRef as s}from"react";import c from"prop-types";import n from"classnames";import d from"./style.css.js";var b=s((function(l,s){var c,b,m=l.title,p=l.leftLabel,h=l.rightLabel,f=l.checked,g=l.onChange,u=l.disabled,L=l.classes,k=l.size,D=l.className,w=p&&h;return a("div",{className:D,children:[m&&i("div",{className:d.switchControlTitle,children:m}),a(r,{component:"label",container:!0,alignItems:"center",spacing:0,children:[p&&i(r,{item:!0,children:i(t,{variant:"body2",className:n(L.label,"small"===k&&L.labelSmall,!f&&!u&&L.activeLabel,u&&L.disabledLabel),children:p})}),i(r,{item:!0,children:i(o,{ref:s,checked:f,onChange:g,color:"primary",disabled:u,classes:{root:L.root,switchBase:n((c={},e(c,L.switchBase,w||f&&!u),e(c,L.switchBaseDisabled,u&&(w||f)),e(c,L.switchBaseDisabledNoLabels,!w&&u&&!f),c)),track:n((b={},e(b,L.track,w||f&&!u),e(b,L.trackDisabled,u&&(w||f)),e(b,L.trackDisabledNoLabels,!w&&u&&!f),b))},size:k})}),h&&i(r,{item:!0,children:i(t,{variant:"body2",className:n(L.label,"small"===k&&L.labelSmall,f&&!u&&L.activeLabel,u&&L.disabledLabel),children:h})})]})]})}));b.propTypes={title:c.string,leftLabel:c.string,rightLabel:c.string,checked:c.bool.isRequired,onChange:c.func.isRequired,disabled:c.bool,classes:c.shape({}).isRequired,size:c.string,className:c.string},b.defaultProps={title:"",leftLabel:"",rightLabel:"",disabled:!1,size:"medium",className:""};var m=l({root:{width:60,height:40,padding:13,"&.MuiSwitch-sizeSmall":{width:52,height:36,padding:13},"& .MuiSwitch-switchBase":{padding:10}},switchBase:{padding:10,color:"#03BCD4","&.MuiIconButton-root:hover":{backgroundColor:"rgba(3, 188, 212, 0.08)"}},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"}})(b);export default m;
@@ -0,0 +1 @@
1
+ var r={PUBLISHED:"published",DRAFT:"draft",FAILURE:"failure"};export{r as PACKAGE_STATUSES};
@@ -1 +1 @@
1
- import*as r from"./completion.js";export{r as completion};import*as o from"./alerts.js";export{o as alerts};export{DEV_CENTER_CLI_APP_ID}from"./devcenter.js";import*as s from"./goals.js";export{s as goals};export{ASSET_TYPES}from"./assetTypes.js";import*as t from"./segment.js";export{t as segment};import*as e from"./apps.js";export{e as apps};import*as m from"./drillstring.js";export{m as drillstring};export{COMPLETION_WELL_SUMMARY,DRILLING_WELL_SUMMARY,DRILLOUT_WELL_SUMMARY}from"./wellSummary.js";export{RIG_ACTIVITY_COLORS}from"./rigActivity.js";
1
+ import*as r from"./completion.js";export{r as completion};import*as o from"./alerts.js";export{o as alerts};export{DEV_CENTER_CLI_APP_ID}from"./devcenter.js";import*as s from"./goals.js";export{s as goals};export{ASSET_TYPES}from"./assetTypes.js";import*as t from"./segment.js";export{t as segment};import*as p from"./apps.js";export{p as apps};import*as e from"./drillstring.js";export{e as drillstring};import*as m from"./appPackages.js";export{m as appPackages};export{COMPLETION_WELL_SUMMARY,DRILLING_WELL_SUMMARY,DRILLOUT_WELL_SUMMARY}from"./wellSummary.js";export{RIG_ACTIVITY_COLORS}from"./rigActivity.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.26.0-7",
3
+ "version": "0.26.0-rc.1",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{jsxs as o,jsx as t}from"react/jsx-runtime";import{makeStyles as n,Typography as i,LinearProgress as l,Tooltip as a,IconButton as c}from"@material-ui/core";import{useState as s,useEffect as p}from"react";import d from"prop-types";import{Delete as f}from"@material-ui/icons";import m from"../Icons/IconWarning.js";import u from"../Icons/IconCancel.js";import h from"../Icons/IconSuccess.js";import g from"../Icons/DocFileIcon.js";import x from"../Icons/PdfFileIcon.js";import y from"../Icons/UnknownFileIcon.js";import b from"../Icons/ExelFileIcon.js";function w(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),o.push.apply(o,t)}return o}function v(r){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?w(Object(t),!0).forEach((function(o){e(r,o,t[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var S=n((function(e){return{fileStateWrapper:{display:"flex",alignItems:"center"},fileIconContainer:{display:"flex",alignItems:"center",marginRight:"10px"},fileState:{display:"flex",flexGrow:"1",alignItems:"center"},fileStateProgress:{flexGrow:"1"},fileNameWrapper:{display:"table",tableLayout:"fixed",width:"100%"},fileName:{display:"table-cell",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontSize:"14px",lineHeight:"16px"},fileSize:{fontSize:"11px",lineHeight:"12px",color:e.palette.primary.text6},checkIcon:{color:e.palette.success.bright},deleteIcon:{color:e.palette.primary.text6,cursor:"pointer"},progressBar:{borderRadius:"2px",height:"2px",margin:"4px 0"},fileActions:{display:"flex",alignItems:"center",paddingLeft:"24px"},progressBackground:{backgroundColor:e.palette.primary.dark},loaderProgressContainer:{display:"flex",width:"100%",fontSize:"11px",fontWeight:"400",letterSpacing:"0.4px",color:e.palette.primary.text6,marginTop:"4px"},progressStatus:{flexGrow:1,display:"flex",justifyContent:"flex-end"},errorContainer:{display:"flex",cursor:"pointer"},errorText:{color:e.palette.error.main,fontSize:"11px",fontWeight:"400",letterSpacing:"0.4px",marginRight:"5px",lineHeight:"16px"}}}));function I(e){var n=S(),d=s({}),w=r(d,2),I=w[0],j=w[1],N=s(0),O=r(N,2),P=O[0],z=O[1],C=e.name,B=e.sizeBytes,M=e.handleCancel,k=e.onDelete,D=e.loadedBytes,W=e.error;return p((function(){B&&j(B>=Math.pow(10,6)?{downloaded:0,unit:"MB",convertedSize:Math.floor(B/Math.pow(10,5))/10}:B>=Math.pow(10,3)?{downloaded:0,unit:"KB",convertedSize:Math.floor(B/Math.pow(10,2))/10}:{downloaded:0,unit:"B",convertedSize:Math.floor(10*B)/10})}),[B]),p((function(){if(D){var e=Math.round(D/B*100);j((function(r){return v(v({},r),{},{downloaded:Math.floor(r.convertedSize*e/10)/10})})),z(e)}}),[D]),o("div",{className:n.fileStateWrapper,children:[t("div",{className:n.fileIconContainer,children:C.includes(".doc")?t(g,{}):C.includes(".pdf")?t(x,{}):C.includes(".xls")?t(b,{}):t(y,{})}),o("div",{className:n.fileState,children:[o("div",{className:n.fileStateProgress,children:[t("div",{className:n.fileNameWrapper,children:t(i,{className:n.fileName,children:C})}),t(l,{className:n.progressBar,variant:"determinate",value:P,classes:{colorPrimary:n.progressBackground}}),o("div",{className:n.loaderProgressContainer,children:[t(i,{className:n.fileSize,component:"span",children:"".concat(I.downloaded," of ").concat(I.convertedSize," ").concat(I.unit)}),t("div",{className:n.progressStatus,children:W?t(a,{title:"There was a server error during the upload request. Please try later.",children:o(i,{component:"div",className:n.errorContainer,children:[t(i,{component:"span",className:n.errorText,children:"Upload Error"}),t(m,{})]})}):"".concat(P," %")})]})]}),o("div",{className:n.fileActions,children:[P<100&&!W&&t(c,{size:"small",onClick:function(){M(C),z(0),j((function(e){return v(v({},e),{},{downloaded:0})}))},children:t(u,{})}),100===P&&!W&&(k?t(c,{size:"small",onClick:k,children:t(f,{className:n.deleteIcon})}):t(h,{}))]})]})]})}I.propTypes={onDelete:d.func,handleCancel:d.func,name:d.string,sizeBytes:d.number,error:d.bool,loadedBytes:d.number.isRequired},I.defaultProps={onDelete:null,name:"",sizeBytes:1,error:null,handleCancel:null};export default I;