@corva/ui 0.64.0-5 → 0.64.0-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/components/EmptyState/styles.js +1 -1
- package/cjs-bundle/components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js +1 -1
- package/cjs-bundle/components/StatusBadge/utils.js +1 -1
- package/components/EmptyState/styles.d.ts.map +1 -1
- package/components/EmptyState/styles.js +1 -1
- package/components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.d.ts.map +1 -1
- package/components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js +1 -1
- package/components/StatusBadge/utils.d.ts +1 -1
- package/components/StatusBadge/utils.d.ts.map +1 -1
- package/components/StatusBadge/utils.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/core"),t=require("./constants.js"),i=e.makeStyles((function(i){var n=i.palette;return e.createStyles({root:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",flexGrow:1},content:{alignItems:"center",display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",overflow:"hidden",padding:24,textAlign:"center"},title:function(e){var i=e.size;return{color:n.primary.text7,fontStyle:"italic",fontSize:i===t.SIZES.LARGE?32:24,lineHeight:i===t.SIZES.LARGE?"38px":"28px",marginBottom:8}},subtitle:function(e){var i=e.size;return{color:n.primary.text7,fontSize:i===t.SIZES.LARGE?16:14,lineHeight:i===t.SIZES.LARGE?"22px":"20px",marginBottom:24}},image:function(e){var i=e.size,n=e.image;return{display:"flex",flexGrow:1,maxHeight:i===t.SIZES.LARGE?300:200,width:"100%",backgroundImage:"url(".concat(n,")"),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"}}})}));exports.useStyles=i;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/core"),t=require("./constants.js"),i=e.makeStyles((function(i){var n=i.palette;return e.createStyles({root:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",flexGrow:1},content:{alignItems:"center",display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",overflow:"hidden",padding:24,textAlign:"center"},title:function(e){var i=e.size;return{color:n.primary.text7,fontStyle:"italic",fontSize:i===t.SIZES.LARGE?32:24,lineHeight:i===t.SIZES.LARGE?"38px":"28px",marginBottom:8}},subtitle:function(e){var i=e.size;return{color:n.primary.text7,fontSize:i===t.SIZES.LARGE?16:14,lineHeight:i===t.SIZES.LARGE?"22px":"20px",marginBottom:24}},image:function(e){var i=e.size,n=e.image;return{display:"flex",flexGrow:1,maxHeight:i===t.SIZES.LARGE?300:200,objectFit:"contain",width:"100%",backgroundImage:"url(".concat(n,")"),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"}}})}));exports.useStyles=i;
|
package/cjs-bundle/components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("prop-types"),r=require("@material-ui/core"),t=require("react/jsx-runtime");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(e),o=r.makeStyles((function(e){return{subtitle:{color:e.palette.primary.main}}}));function u(e){var r=e.openIntercom,n=o();return t.jsxs("span",{children:["This app failed to load. Try refreshing the page or"," ",t.jsx("span",{className:n.subtitle,onClick:function(){return r()},children:"contact support"}),"."]})}u.propTypes={openIntercom:i.default.func.isRequired},module.exports=u;
|
|
1
|
+
"use strict";var e=require("prop-types"),r=require("@material-ui/core"),t=require("react/jsx-runtime");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(e),o=r.makeStyles((function(e){return{subtitle:{color:e.palette.primary.main,cursor:"pointer"}}}));function u(e){var r=e.openIntercom,n=o();return t.jsxs("span",{children:["This app failed to load. Try refreshing the page or"," ",t.jsx("span",{className:n.subtitle,onClick:function(){return r()},children:"contact support"}),"."]})}u.propTypes={openIntercom:i.default.func.isRequired},module.exports=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./constants.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require('./../../ext-esm/tslib/tslib.es6.js'),e=require("./constants.js"),s=function(t){return void 0===t&&(t=""),t.toLowerCase()===e.ALERT_STATUSES.RESOLVED};var n=function(t){var e=t.assetId,s=t.wellHubSlug;return"/assets/".concat(e,"/").concat(s,"/Data Quality")},a=function(t,s){return t.reduce((function(t,n){if(!n)return t;if([e.ALERT_STATUSES.FLAGGED,e.ALERT_STATUSES.INVESTIGATION,e.ALERT_STATUSES.ON_HOLD].includes(n.status))return t;var a=s.find((function(t){return t.id===n.assetId})).name;return t[a]||(t[a]=[]),t[a].push(n),t}),{})};exports.getDeductsFromScoreClass=function(t,e,s){return s||!e?"":e>40?t.error:e>10?t.warn:e>5?t.ok:t.good},exports.getDeductsFromScoreValue=function(t,e){return!e&&t>=0?"".concat(t,"%"):"—"},exports.getIconType=function(t,s){return t.filter((function(t){return s[t].every((function(t){return t.isResolved}))})).length===t.length?e.BADGE_ICON_STATUSES.success:t.filter((function(t){return s[t].some((function(t){return t.missingNum}))})).length?e.BADGE_ICON_STATUSES.error:t.filter((function(t){return s[t].some((function(t){return t.issuesNum}))})).length?e.BADGE_ICON_STATUSES.issue:""},exports.getLinkToDQPage=n,exports.getNewWellnessAlerts=function(r,u,i){return u.reduce((function(u,o){if(!(null==o?void 0:o.length))return u;var d=a(o,r);return Object.keys(d).forEach((function(a){var r=d[a],o=r.find((function(t){return t.status===e.ALERT_STATUSES.OPEN||t.status===e.ALERT_STATUSES.EXPIRED})),l=r.every((function(t){return s(t.status)}));u[a]||(u[a]=[]),u[a].push({alert:l?t.__assign(t.__assign({},r[0]),{emptyMessage:e.DATA_QUALITY_CHECK_PASSED}):o,isResolved:l,id:r[0].id,issuesNum:r.filter((function(t){return t.state===e.ALERT_STATES.issue&&!s(t.status)})).length,name:r[0].name,missingNum:r.filter((function(t){return t.state===e.ALERT_STATES.missing&&!s(t.status)})).length,linkToDQPage:n({assetId:r[0].assetId,wellHubSlug:i})})})),u}),{})},exports.groupAlertsByAssetName=a,exports.isResolved=s,exports.parseWellnessAlertFromJson=function(t){var e,s,n,a;return"Issue"===t.data.state&&"Manual Alert"!==t.data.name&&"User Created"!==t.data.category?null:{id:t._id,assetId:t.asset_id,name:t.data.name,category:t.data.category,lastCheckedAt:t.data.last_checked_at,message:t.data.message,status:(a=t.data.status,"under investigation"===a?"investigation":["not available","resolved"].includes(a)?"resolved":a),statusReason:t.data.status_reason,statusUpdatedAt:t.data.status_updated_at,state:(n=t.data.state,["Fatal","Critical","Issue","Manual"].includes(n)?"Issue":["Missing Data"].includes(n)?"Missing":"Unknown"),createdAt:t.timestamp,note:t.data.note,isThrottled:t.data.is_throttled,segment:t.data.segment,metrics:{holeDepth:null===(e=t.data.metrics)||void 0===e?void 0:e.hole_depth,state:null===(s=t.data.metrics)||void 0===s?void 0:s.state},deductsFromScore:t.data.deducts_from_score}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/styles.ts"],"names":[],"mappings":"AAGA,aAAK,eAAe,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/styles.ts"],"names":[],"mappings":"AAGA,aAAK,eAAe,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,eAAO,MAAM,SAAS,6HA4CrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as t,createStyles as e}from"@material-ui/core";import{SIZES as n}from"./constants.js";var i=t((function(t){var i=t.palette;return e({root:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",flexGrow:1},content:{alignItems:"center",display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",overflow:"hidden",padding:24,textAlign:"center"},title:function(t){var e=t.size;return{color:i.primary.text7,fontStyle:"italic",fontSize:e===n.LARGE?32:24,lineHeight:e===n.LARGE?"38px":"28px",marginBottom:8}},subtitle:function(t){var e=t.size;return{color:i.primary.text7,fontSize:e===n.LARGE?16:14,lineHeight:e===n.LARGE?"22px":"20px",marginBottom:24}},image:function(t){var e=t.size,i=t.image;return{display:"flex",flexGrow:1,maxHeight:e===n.LARGE?300:200,width:"100%",backgroundImage:"url(".concat(i,")"),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"}}})}));export{i as useStyles};
|
|
1
|
+
import{makeStyles as t,createStyles as e}from"@material-ui/core";import{SIZES as n}from"./constants.js";var i=t((function(t){var i=t.palette;return e({root:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",flexGrow:1},content:{alignItems:"center",display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",overflow:"hidden",padding:24,textAlign:"center"},title:function(t){var e=t.size;return{color:i.primary.text7,fontStyle:"italic",fontSize:e===n.LARGE?32:24,lineHeight:e===n.LARGE?"38px":"28px",marginBottom:8}},subtitle:function(t){var e=t.size;return{color:i.primary.text7,fontSize:e===n.LARGE?16:14,lineHeight:e===n.LARGE?"22px":"20px",marginBottom:24}},image:function(t){var e=t.size,i=t.image;return{display:"flex",flexGrow:1,maxHeight:e===n.LARGE?300:200,objectFit:"contain",width:"100%",backgroundImage:"url(".concat(i,")"),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"}}})}));export{i as useStyles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorSubtitleWithIntercomLink.d.ts","sourceRoot":"","sources":["../../../../../src/components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ErrorSubtitleWithIntercomLink.d.ts","sourceRoot":"","sources":["../../../../../src/components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js"],"names":[],"mappings":";AAQA;;gBAYC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"prop-types";import{makeStyles as e}from"@material-ui/core";import{jsxs as t,jsx as o}from"react/jsx-runtime";var n=e((function(r){return{subtitle:{color:r.palette.primary.main}}}));function i(r){var e=r.openIntercom,i=n();return t("span",{children:["This app failed to load. Try refreshing the page or"," ",o("span",{className:i.subtitle,onClick:function(){return e()},children:"contact support"}),"."]})}i.propTypes={openIntercom:r.func.isRequired};export{i as default};
|
|
1
|
+
import r from"prop-types";import{makeStyles as e}from"@material-ui/core";import{jsxs as t,jsx as o}from"react/jsx-runtime";var n=e((function(r){return{subtitle:{color:r.palette.primary.main,cursor:"pointer"}}}));function i(r){var e=r.openIntercom,i=n();return t("span",{children:["This app failed to load. Try refreshing the page or"," ",o("span",{className:i.subtitle,onClick:function(){return e()},children:"contact support"}),"."]})}i.propTypes={openIntercom:r.func.isRequired};export{i as default};
|
|
@@ -3,7 +3,7 @@ export declare const isResolved: (status: string) => boolean;
|
|
|
3
3
|
export declare const getDeductsFromScoreClass: GetDeductsFromScoreClass;
|
|
4
4
|
export declare const getDeductsFromScoreValue: GetDeductsFromScoreValue;
|
|
5
5
|
export declare const parseWellnessAlertFromJson: ParseWellnessAlertFromJson;
|
|
6
|
-
export declare const getLinkToDQPage: ({ assetId, wellHubSlug }: {
|
|
6
|
+
export declare const getLinkToDQPage: ({ assetId, wellHubSlug, }: {
|
|
7
7
|
assetId: number;
|
|
8
8
|
wellHubSlug: string;
|
|
9
9
|
}) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gCAAgC,CAAC;AAExC,eAAO,MAAM,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OACK,CAAC;AAEnD,eAAO,MAAM,wBAAwB,EAAE,wBAYtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,wBAKtC,CAAC;AA6BF,eAAO,MAAM,0BAA0B,EAAE,0BA8BxC,CAAC;AAEF,eAAO,MAAM,eAAe;aAIjB,MAAM;iBACF,MAAM;MACjB,MAA0D,CAAC;AAE/D,eAAO,MAAM,sBAAsB,uCAkB3B,CAAC;AAET,eAAO,MAAM,oBAAoB,uEAqChC,CAAC;AAEF,eAAO,MAAM,WAAW,0GAoBvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ALERT_STATUSES as
|
|
1
|
+
import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{ALERT_STATUSES as e,BADGE_ICON_STATUSES as s,DATA_QUALITY_CHECK_PASSED as n,ALERT_STATES as a}from"./constants.js";var r=function(t){return void 0===t&&(t=""),t.toLowerCase()===e.RESOLVED},u=function(t,e,s){return s||!e?"":e>40?t.error:e>10?t.warn:e>5?t.ok:t.good},i=function(t,e){return!e&&t>=0?"".concat(t,"%"):"—"};var o=function(t){var e,s,n,a;return"Issue"===t.data.state&&"Manual Alert"!==t.data.name&&"User Created"!==t.data.category?null:{id:t._id,assetId:t.asset_id,name:t.data.name,category:t.data.category,lastCheckedAt:t.data.last_checked_at,message:t.data.message,status:(a=t.data.status,"under investigation"===a?"investigation":["not available","resolved"].includes(a)?"resolved":a),statusReason:t.data.status_reason,statusUpdatedAt:t.data.status_updated_at,state:(n=t.data.state,["Fatal","Critical","Issue","Manual"].includes(n)?"Issue":["Missing Data"].includes(n)?"Missing":"Unknown"),createdAt:t.timestamp,note:t.data.note,isThrottled:t.data.is_throttled,segment:t.data.segment,metrics:{holeDepth:null===(e=t.data.metrics)||void 0===e?void 0:e.hole_depth,state:null===(s=t.data.metrics)||void 0===s?void 0:s.state},deductsFromScore:t.data.deducts_from_score}},d=function(t){var e=t.assetId,s=t.wellHubSlug;return"/assets/".concat(e,"/").concat(s,"/Data Quality")},c=function(t,s){return t.reduce((function(t,n){if(!n)return t;if([e.FLAGGED,e.INVESTIGATION,e.ON_HOLD].includes(n.status))return t;var a=s.find((function(t){return t.id===n.assetId})).name;return t[a]||(t[a]=[]),t[a].push(n),t}),{})},l=function(s,u,i){return u.reduce((function(u,o){if(!(null==o?void 0:o.length))return u;var l=c(o,s);return Object.keys(l).forEach((function(s){var o=l[s],c=o.find((function(t){return t.status===e.OPEN||t.status===e.EXPIRED})),f=o.every((function(t){return r(t.status)}));u[s]||(u[s]=[]),u[s].push({alert:f?t(t({},o[0]),{emptyMessage:n}):c,isResolved:f,id:o[0].id,issuesNum:o.filter((function(t){return t.state===a.issue&&!r(t.status)})).length,name:o[0].name,missingNum:o.filter((function(t){return t.state===a.missing&&!r(t.status)})).length,linkToDQPage:d({assetId:o[0].assetId,wellHubSlug:i})})})),u}),{})},f=function(t,e){return t.filter((function(t){return e[t].every((function(t){return t.isResolved}))})).length===t.length?s.success:t.filter((function(t){return e[t].some((function(t){return t.missingNum}))})).length?s.error:t.filter((function(t){return e[t].some((function(t){return t.issuesNum}))})).length?s.issue:""};export{u as getDeductsFromScoreClass,i as getDeductsFromScoreValue,f as getIconType,d as getLinkToDQPage,l as getNewWellnessAlerts,c as groupAlertsByAssetName,r as isResolved,o as parseWellnessAlertFromJson};
|