@corva/ui 0.46.0-1 → 0.46.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{useState as a,useEffect as i,useRef as r}from"react";import o from"prop-types";import n from"classnames";import{makeStyles as p}from"@material-ui/core";import s from"../../DevCenter/AppHeader/AppHeader.js";import{jsxs as l,jsx as d,Fragment as c}from"react/jsx-runtime";var m,u={appNotSubscribed:{title:"No Subscriptions exist for this app.",subtitle:"Contact your Corva Account rep to get acces to this app!"},assetNotSubscribed:{title:"Selected Asset is no longer subscribed to the app.",subtitle:"Сhange the asset in settings."},internalAppError:{title:"App Loading Error"},appPackageWasNotFound:{title:"App package was not found",subtitle:"Please choose another version in the app settings menu or delete and add app again on your dashboard"},fracFleetWasNotFound:{title:"Frac fleet was not found"},fracFleetHasNoPad:{title:"Frac fleet has no active pad"},padHasNoWells:{title:"This pad has no wells"}},f={empty:"empty",error:"error",noData:"noData",noSubscription:"noSubscription"},g=(t(m={},f.empty,"/static/media/e607e3aa0a4603bb7ae7f83a2148511e.svg"),t(m,f.error,"/static/media/9b185a425ea91b6c2beedfef39c06663.svg"),t(m,f.noData,"/static/media/1bfc6e5d9cbb531a554ab8d025fa23e9.svg"),t(m,f.noSubscription,"/static/media/76e3ee12638391cba164716321509ad7.svg"),m),b=p((function(e){var t=e.palette;return{wrapper:{display:"flex",flexDirection:"column",textAlign:"center",alignItems:"center",justifyContent:"center",height:"100%",padding:24,overflow:"auto"},title:{color:t.primary.text7,fontSize:32,lineHeight:"38px",marginBottom:8,"&.medium":{fontSize:24,lineHeight:"28px"},"&.small":{fontSize:24,lineHeight:"28px"},fontStyle:"italic"},subtitle:{color:t.primary.text6,fontSize:16,lineHeight:"22px",marginBottom:24,"&.medium":{fontSize:14,lineHeight:"20px"},"&.small":{fontSize:14,lineHeight:"20px"}},imageWrapper:{display:"flex",flexGrow:"1",maxWidth:390,maxHeight:300,width:"100%","&.medium":{maxidth:260,maxHeight:200}},backgroundImage:{width:"100%",backgroundImage:function(e){return"url(".concat([g[e.state]],")")},backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"},appHeader:{display:"flex",padding:"12px",flexWrap:"wrap",justifyContent:"space-between"},container:{height:"100%",flexDirection:"column",display:"flex"}}}));function h(t){var o=t.title,p=t.subtitle,m=t.state,u=t.withAppHeader,f=t.app,g=t.actions,h=b({state:m}),x=a(!1),v=e(x,2),y=v[0],H=v[1];i((function(){H(!0)}),[]);var S=r(null),A=S.current,w=(null==A?void 0:A.offsetHeight)<300,N=(null==A?void 0:A.offsetHeight)<400;return l("div",{className:h.container,children:[u&&d(s,{app:f,classes:{appHeader:h.appHeader}}),d("div",{className:h.wrapper,ref:S,children:y&&l(c,{children:[d("div",{"data-testid":"".concat("EmptyAppView","_title"),className:n(h.title,N&&"medium",w&&"small"),children:o}),g,p&&d("div",{"data-testid":"".concat("EmptyAppView","_subtitle"),className:n(h.subtitle,N&&"medium",w&&"small"),children:p}),!w&&d("div",{className:n(h.imageWrapper,N&&"medium"),children:d("div",{className:h.backgroundImage})})]})})]})}h.propTypes={actions:o.node,app:o.shape({}),state:o.string,subtitle:o.oneOfType([o.string,o.node]),title:o.string.isRequired,withAppHeader:o.bool},h.defaultProps={actions:null,app:void 0,state:f.empty,subtitle:"",withAppHeader:!1},h.APP_MESSAGES=u,h.EMPTY_STATES=f;export{u as APP_MESSAGES,f as EMPTY_STATES,h as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{useState as a,useEffect as i,useRef as r}from"react";import o from"prop-types";import n from"classnames";import{makeStyles as p}from"@material-ui/core";import s from"../../DevCenter/AppHeader/AppHeader.js";import{jsxs as l,jsx as d,Fragment as c}from"react/jsx-runtime";var m,u={appNotSubscribed:{title:"No Subscription",subtitle:"Contact Corva Account Representative to get access to the App"},assetNotSubscribed:{title:"Selected Asset is no longer subscribed to the app.",subtitle:"Сhange the asset in settings."},internalAppError:{title:"App Loading Error"},appPackageWasNotFound:{title:"App package was not found",subtitle:"Please choose another version in the app settings menu or delete and add app again on your dashboard"},fracFleetWasNotFound:{title:"Frac fleet was not found"},fracFleetHasNoPad:{title:"Frac fleet has no active pad"},padHasNoWells:{title:"This pad has no wells"}},f={empty:"empty",error:"error",noData:"noData",noSubscription:"noSubscription"},g=(t(m={},f.empty,"/static/media/e607e3aa0a4603bb7ae7f83a2148511e.svg"),t(m,f.error,"/static/media/9b185a425ea91b6c2beedfef39c06663.svg"),t(m,f.noData,"/static/media/1bfc6e5d9cbb531a554ab8d025fa23e9.svg"),t(m,f.noSubscription,"/static/media/76e3ee12638391cba164716321509ad7.svg"),m),b=p((function(e){var t=e.palette;return{wrapper:{display:"flex",flexDirection:"column",textAlign:"center",alignItems:"center",justifyContent:"center",height:"100%",padding:24,overflow:"auto"},title:{color:t.primary.text7,fontSize:32,lineHeight:"38px",marginBottom:8,"&.medium":{fontSize:24,lineHeight:"28px"},"&.small":{fontSize:24,lineHeight:"28px"},fontStyle:"italic"},subtitle:{color:t.primary.text6,fontSize:16,lineHeight:"22px",marginBottom:24,"&.medium":{fontSize:14,lineHeight:"20px"},"&.small":{fontSize:14,lineHeight:"20px"}},imageWrapper:{display:"flex",flexGrow:"1",maxWidth:390,maxHeight:300,width:"100%","&.medium":{maxidth:260,maxHeight:200}},backgroundImage:{width:"100%",backgroundImage:function(e){return"url(".concat([g[e.state]],")")},backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"},appHeader:{display:"flex",padding:"12px",flexWrap:"wrap",justifyContent:"space-between"},container:{height:"100%",flexDirection:"column",display:"flex"}}}));function h(t){var o=t.title,p=t.subtitle,m=t.state,u=t.withAppHeader,f=t.app,g=t.actions,h=b({state:m}),x=a(!1),v=e(x,2),y=v[0],H=v[1];i((function(){H(!0)}),[]);var S=r(null),A=S.current,w=(null==A?void 0:A.offsetHeight)<300,N=(null==A?void 0:A.offsetHeight)<400;return l("div",{className:h.container,children:[u&&d(s,{app:f,classes:{appHeader:h.appHeader}}),d("div",{className:h.wrapper,ref:S,children:y&&l(c,{children:[d("div",{"data-testid":"".concat("EmptyAppView","_title"),className:n(h.title,N&&"medium",w&&"small"),children:o}),g,p&&d("div",{"data-testid":"".concat("EmptyAppView","_subtitle"),className:n(h.subtitle,N&&"medium",w&&"small"),children:p}),!w&&d("div",{className:n(h.imageWrapper,N&&"medium"),children:d("div",{className:h.backgroundImage})})]})})]})}h.propTypes={actions:o.node,app:o.shape({}),state:o.string,subtitle:o.oneOfType([o.string,o.node]),title:o.string.isRequired,withAppHeader:o.bool},h.defaultProps={actions:null,app:void 0,state:f.empty,subtitle:"",withAppHeader:!1},h.APP_MESSAGES=u,h.EMPTY_STATES=f;export{u as APP_MESSAGES,f as EMPTY_STATES,h as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.46.0-1",
3
+ "version": "0.46.0-2",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"