@corva/ui 0.55.0-14 → 0.55.0-15

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
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),i=require("react"),r=require("classnames"),a=require("@material-ui/core"),t=require("../constants.js"),n=require("./DQAlertsTooltip.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(r),u=a.makeStyles((function(e){return{alertIcon:{width:16,height:16},assetWrapper:{display:"grid",whiteSpace:"nowrap",alignItems:"center",marginTop:8,gridTemplateColumns:"127px 76px 76px",gridGap:20},assetName:{overflow:"hidden",fontSize:"12px",fontWeight:500,lineHeight:"14px",letterSpacing:"0.4px",textOverflow:"ellipsis"},container:{padding:12},headerText:{lineHeight:"19px",fontSize:"16px",fontWeight:500},subheaderText:{lineHeight:"14px",fontSize:"12px",fontWeight:400,color:e.palette.primary.text7,marginTop:4},Issue:{color:"#ffa500"},Missing:{color:e.palette.error.main},errorContainer:{display:"flex",alignItems:"center"},errorText:{marginLeft:4,fontSize:"14px",lineHeight:"20px"},errorNum:{fontSize:"16px",lineHeight:"22px",marginLeft:4}}}));exports.DQUnvalidatedContent=function(r){var l=r.assetsData,c=i.useRef(null),d=u(),p=function(i){var r=i.alert,a=i.alertsNum,l=i.alertState,u=i.isMissingData,p=t.ALERT_ICONS[l];return s.jsx(n.DQAlertsTooltip,e.__assign({alert:u?e.__assign(e.__assign({},r),{state:t.ALERT_STATES.missing}):r,anchorEl:c.current,alertIcon:s.jsx(p,{className:o.default(d[u?t.ALERT_STATES.missing:l],d.alertIcon)}),isTooltipVisible:a>0},{children:s.jsxs("div",e.__assign({className:d.errorContainer},{children:[s.jsx(p,{className:o.default(d[l],d.alertIcon)}),s.jsxs("div",{children:[s.jsxs("span",e.__assign({className:o.default(d[l],d.errorText)},{children:[l,": "]})),s.jsx("span",e.__assign({className:d.errorNum},{children:a}))]})]}))}))};return s.jsxs("div",e.__assign({className:d.container,ref:c},{children:[s.jsxs("div",{children:[s.jsx(a.Typography,e.__assign({className:d.headerText},{children:"Data Quality"})),s.jsx(a.Typography,e.__assign({className:d.subheaderText},{children:"Fusion real-time data quality rules for app data"}))]}),s.jsx("div",{children:null==l?void 0:l.map((function(i){var r=i.id,a=i.name,n=i.issuesNum,l=i.missingNum,o=i.alert,u=function(e){return{alert:o,alertsNum:e===t.ALERT_STATES.issue?n:l,alertState:e===t.ALERT_STATES.issue?t.ALERT_STATES.issue:t.ALERT_STATES.missing,isMissingData:l>0}},c=u(t.ALERT_STATES.issue),g=u(t.ALERT_STATES.missing);return s.jsxs("div",e.__assign({className:d.assetWrapper},{children:[s.jsx("div",e.__assign({className:d.assetName},{children:a})),p(c),p(g)]}),r)}))})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),a=require("react"),i=require("classnames"),t=require("@material-ui/core"),r=require("../constants.js"),l=require("./DQAlertsTooltip.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=n(i),o=t.makeStyles((function(e){return{alertIcon:{width:16,height:16},assetWrapper:{display:"table-row"},assetTable:{display:"table",marginTop:8},assetCell:{display:"table-cell",padding:"5px 0",verticalAlign:"middle"},assetName:{fontSize:"12px",lineHeight:"16px",width:89},container:{padding:12},headerText:{lineHeight:"19px",fontSize:"16px",fontWeight:500},subheaderText:{lineHeight:"14px",fontSize:"12px",fontWeight:400,color:e.palette.primary.text7,marginTop:4},Issue:{color:"#ffa500"},Missing:{color:e.palette.error.main},Resolved:{color:e.palette.success.bright},errorContainer:{display:"flex",alignItems:"center",marginLeft:8},errorText:{marginLeft:4,fontSize:"14px",lineHeight:"20px"},errorNum:{fontSize:"16px",lineHeight:"22px",marginLeft:4}}}));exports.DQUnvalidatedContent=function(i){var n=i.assetsData,c=a.useRef(null),u=o(),_=function(a){var i=a.alert,t=a.alertsNum,n=a.alertState,o=a.isMissingData,_=r.ALERT_ICONS[n];return s.jsx(l.DQAlertsTooltip,e.__assign({alert:o?e.__assign(e.__assign({},i),{state:r.ALERT_STATES.missing}):i,anchorEl:c.current,alertIcon:s.jsx(_,{className:d.default(u[o?r.ALERT_STATES.missing:n],u.alertIcon)}),isTooltipVisible:t>0},{children:s.jsxs("div",e.__assign({className:u.errorContainer},{children:[s.jsx(_,{className:d.default(u[n],u.alertIcon)}),s.jsxs("div",{children:[s.jsxs("span",e.__assign({className:d.default(u[n],u.errorText)},{children:[n,": "]})),s.jsx("span",e.__assign({className:u.errorNum},{children:t}))]})]}))}))};return s.jsxs("div",e.__assign({className:u.container,ref:c},{children:[s.jsxs("div",{children:[s.jsx(t.Typography,e.__assign({className:u.headerText,"data-testid":"Status_badge__DQ_unvalidated_content"},{children:"Data Quality"})),s.jsx(t.Typography,e.__assign({className:u.subheaderText},{children:"Fusion real-time data quality rules for app data"}))]}),s.jsx("div",e.__assign({className:u.assetTable},{children:null==n?void 0:n.map((function(a){var i=a.id,t=a.name,l=a.issuesNum,n=a.missingNum,o=a.isResolved,c=a.alert,m=function(e){return{alert:c,alertsNum:e===r.ALERT_STATES.issue?l:n,alertState:e===r.ALERT_STATES.issue?r.ALERT_STATES.issue:r.ALERT_STATES.missing,isMissingData:n>0}},g=m(r.ALERT_STATES.issue),p=m(r.ALERT_STATES.missing),x=r.ALERT_ICONS.Resolved;return s.jsxs("div",e.__assign({className:u.assetWrapper},{children:[s.jsx("div",e.__assign({className:d.default(u.assetName,u.assetCell)},{children:t})),o?s.jsx("div",e.__assign({className:u.assetCell},{children:s.jsx("div",e.__assign({className:u.errorContainer},{children:s.jsx(x,{className:d.default(u.Resolved,u.alertIcon)})}))})):s.jsxs(s.Fragment,{children:[s.jsx("div",e.__assign({className:u.assetCell},{children:l>0&&_(g)})),s.jsx("div",e.__assign({className:u.assetCell},{children:n>0&&_(p)}))]})]}),i)}))}))]}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/icons/Warning"),r=require("@material-ui/icons/Done"),s=require("@material-ui/icons/Error"),o=require("../Icons/DangerousIcon.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n,a=i(e),t=i(r),u=i(s),c={Missing:o.DangerousIcon,Issue:u.default},I={success:"success",warning:"warning",error:"error"},l=((n={})[I.success]=t.default,n[I.warning]=a.default,n[I.error]=o.DangerousIcon,n);exports.ALERT_ICONS=c,exports.ALERT_STATES={missing:"Missing",issue:"Issue"},exports.BADGE_ICONS=l,exports.BADGE_ICON_STATUSES=I,exports.MAX_MOBILE_WIDTH=959,exports.WARNING="Recommendations may be incorrect based on data quality errors";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/icons/Warning"),r=require("@material-ui/icons/Done"),s=require("@material-ui/icons/Error"),i=require("@material-ui/icons/CheckCircle"),o=require("../Icons/DangerousIcon.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a,u=n(e),t=n(r),c=n(s),l=n(i),d={Missing:o.DangerousIcon,Issue:c.default,Resolved:l.default},I={success:"success",warning:"warning",error:"error"},g=((a={})[I.success]=t.default,a[I.warning]=u.default,a[I.error]=o.DangerousIcon,a);exports.ALERT_ICONS=d,exports.ALERT_STATES={missing:"Missing",issue:"Issue"},exports.BADGE_ICONS=g,exports.BADGE_ICON_STATUSES=I,exports.MAX_MOBILE_WIDTH=959,exports.WARNING="Recommendations may be incorrect based on data quality errors";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),n=require("react"),a=require("moment"),s=require("classnames"),r=require("@material-ui/core"),o=require("../Tooltip/Tooltip.js");require("../Tooltip/ScrollableTooltip.js");var i=require("./constants.js"),c=require("./components/DQStatusIcon.js"),p=require("./components/DQUnvalidatedContent.js"),l=require("./components/DQSuccessContent.js"),u=require("./components/ReportIssueModal.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=d(a),x=d(s),m=r.makeStyles((function(e){return{statusBadgeWrapper:{backgroundColor:e.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(e){var t=e.isSuccessTypeIcon,n=e.isErrorTypeIcon;return"12px 0 2px ".concat(t||n?6:2,"px")},whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:e.palette.primary.text6,marginLeft:function(e){return e.isIconExist&&4}},warningMessage:{color:e.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:{"& .MuiTooltip-tooltip":{maxWidth:455,width:376,padding:4,fontSize:12,boxShadow:"0px 0px 4px 2px rgb(0 0 0 / 12%)",fontWeight:400,lineHeight:"16px",letterSpacing:"0.4px",backgroundColor:e.palette.background.b9}},DQIconWrapper:{display:"flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:24,width:24,borderRadius:12,"&:hover":{backgroundColor:function(e){var t=e.isErrorTypeIcon,n=e.isSuccessTypeIcon;return t?"rgba(244, 67, 54, 0.1)":n?"rgba(117, 219, 41, 0.2)":"transparent"}}}}}));exports.StatusBadge=function(a){var s,d=a.assetsData,f=void 0===d?[]:d,S=a.appWidth,h=a.iconType,I=a.className,T=a.lastTimestamp,_=a.warningData,j=n.useState(!1),y=j[0],b=j[1],v=null==_?void 0:_.message,N=h==i.BADGE_ICON_STATUSES.error,D=h==i.BADGE_ICON_STATUSES.success,C=S<i.MAX_MOBILE_WIDTH,E=m({isIconExist:!!h,isSuccessTypeIcon:D,isErrorTypeIcon:N});return N&&(s=t.jsx(p.DQUnvalidatedContent,{assetsData:f})),D&&(s=t.jsx(l.DQSuccessContent,{onClick:function(){return b(!0)}})),t.jsxs("div",e.__assign({className:x.default(E.statusBadgeWrapper,I)},{children:[t.jsxs("div",e.__assign({className:E.statusBadgeContent},{children:[h&&t.jsx(o.Tooltip,e.__assign({interactive:N||D,PopperProps:N&&{className:E.popper},placement:"top",title:s},{children:t.jsx("div",e.__assign({className:E.DQIconWrapper},{children:t.jsx(c.DQStatusIcon,{color:h,iconType:h})}))})),t.jsxs(r.Typography,e.__assign({className:x.default(E.text,E.timestamp),variant:"body1"},{children:["Last Update: ",g.default.unix(T).format("M/D/YYYY h:mm a")]})),_&&t.jsxs(t.Fragment,{children:[t.jsx(o.Tooltip,e.__assign({placement:"top",title:v?"".concat(i.WARNING,". ").concat(v):i.WARNING},{children:t.jsx("div",{children:t.jsx(c.DQStatusIcon,{className:E.badgeIconWarning,color:i.BADGE_ICON_STATUSES.warning,iconType:i.BADGE_ICON_STATUSES.warning})})})),!C&&t.jsx(r.Typography,e.__assign({className:x.default(E.text,E.warningMessage),variant:"body1"},{children:v?"".concat(i.WARNING,". ").concat(v):i.WARNING}))]})]})),D&&t.jsx(u.ReportIssueModal,{open:y,onClose:function(){return b(!1)}})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),a=require("react"),n=require("moment"),s=require("classnames"),r=require("@material-ui/core"),o=require("../Tooltip/Tooltip.js");require("../Tooltip/ScrollableTooltip.js");var i=require("./constants.js"),c=require("./components/DQStatusIcon.js"),p=require("./components/DQUnvalidatedContent.js"),l=require("./components/DQSuccessContent.js"),d=require("./components/ReportIssueModal.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=u(n),x=u(s),_=r.makeStyles((function(e){return{statusBadgeWrapper:{backgroundColor:e.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(e){var t=e.isSuccessTypeIcon,a=e.isErrorTypeIcon;return"12px 0 2px ".concat(t||a?6:2,"px")},whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:e.palette.primary.text6,marginLeft:function(e){return e.isIconExist&&4}},warningMessage:{color:e.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:{"& .MuiTooltip-tooltip":{maxWidth:455,padding:4,fontSize:12,boxShadow:"0px 0px 4px 2px rgb(0 0 0 / 12%)",fontWeight:400,lineHeight:"16px",letterSpacing:"0.4px",backgroundColor:e.palette.background.b9}},DQIconWrapper:{display:"flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:24,width:24,borderRadius:12,"&:hover":{backgroundColor:function(e){var t=e.isErrorTypeIcon,a=e.isSuccessTypeIcon;return t?"rgba(244, 67, 54, 0.1)":a?"rgba(117, 219, 41, 0.2)":"transparent"}}}}}));exports.StatusBadge=function(n){var s,u=n.assetsData,m=void 0===u?[]:u,S=n.appWidth,f=n.iconType,I=n.className,T=n.lastTimestamp,h=n.warningData,j=a.useState(!1),b=j[0],y=j[1],v=null==h?void 0:h.message,D=f==i.BADGE_ICON_STATUSES.error,N=f==i.BADGE_ICON_STATUSES.success,C=S<i.MAX_MOBILE_WIDTH,E=_({isIconExist:!!f,isSuccessTypeIcon:N,isErrorTypeIcon:D});return D&&(s=t.jsx(p.DQUnvalidatedContent,{assetsData:m})),N&&(s=t.jsx(l.DQSuccessContent,{onClick:function(){return y(!0)}})),t.jsxs("div",e.__assign({"data-testid":"Status_badge",className:x.default(E.statusBadgeWrapper,I)},{children:[t.jsxs("div",e.__assign({className:E.statusBadgeContent},{children:[f&&t.jsx(o.Tooltip,e.__assign({interactive:D||N,PopperProps:D&&{className:E.popper},placement:"top",title:s},{children:t.jsx("div",e.__assign({className:E.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(f)},{children:t.jsx(c.DQStatusIcon,{color:f,iconType:f})}))})),t.jsxs(r.Typography,e.__assign({className:x.default(E.text,E.timestamp),variant:"body1"},{children:["Last Update: ",g.default.unix(T).format("M/D/YYYY h:mm a")]})),h&&t.jsxs(t.Fragment,{children:[t.jsx(o.Tooltip,e.__assign({placement:"top",title:v?"".concat(i.WARNING,". ").concat(v):i.WARNING},{children:t.jsx("div",e.__assign({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:t.jsx(c.DQStatusIcon,{className:E.badgeIconWarning,color:i.BADGE_ICON_STATUSES.warning,iconType:i.BADGE_ICON_STATUSES.warning})}))})),!C&&t.jsx(r.Typography,e.__assign({className:x.default(E.text,E.warningMessage),variant:"body1"},{children:v?"".concat(i.WARNING,". ").concat(v):i.WARNING}))]})]})),N&&t.jsx(d.ReportIssueModal,{open:b,onClose:function(){return y(!1)}})]}))};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=StatusBadge.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusBadge.test.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/__tests__/StatusBadge.test.jsx"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"DQUnvalidatedContent.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQUnvalidatedContent.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAA6B,MAAM,oCAAoC,CAAC;AAwD1F,aAAK,yBAAyB,GAAG;IAC/B,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;CAC1B,CAAA;AAED,eAAO,MAAM,oBAAoB,mBAAoB,yBAAyB,KAAG,WAyDhF,CAAC"}
1
+ {"version":3,"file":"DQUnvalidatedContent.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQUnvalidatedContent.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAA6B,MAAM,oCAAoC,CAAC;AAyD1F,aAAK,yBAAyB,GAAG;IAC/B,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;CAC1B,CAAA;AAED,eAAO,MAAM,oBAAoB,mBAAoB,yBAAyB,KAAG,WAwEhF,CAAC"}
@@ -1 +1 @@
1
- import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useRef as t}from"react";import a from"classnames";import{makeStyles as s,Typography as n}from"@material-ui/core";import{ALERT_STATES as l,ALERT_ICONS as o}from"../constants.js";import{DQAlertsTooltip as m}from"./DQAlertsTooltip.js";var c=s((function(e){return{alertIcon:{width:16,height:16},assetWrapper:{display:"grid",whiteSpace:"nowrap",alignItems:"center",marginTop:8,gridTemplateColumns:"127px 76px 76px",gridGap:20},assetName:{overflow:"hidden",fontSize:"12px",fontWeight:500,lineHeight:"14px",letterSpacing:"0.4px",textOverflow:"ellipsis"},container:{padding:12},headerText:{lineHeight:"19px",fontSize:"16px",fontWeight:500},subheaderText:{lineHeight:"14px",fontSize:"12px",fontWeight:400,color:e.palette.primary.text7,marginTop:4},Issue:{color:"#ffa500"},Missing:{color:e.palette.error.main},errorContainer:{display:"flex",alignItems:"center"},errorText:{marginLeft:4,fontSize:"14px",lineHeight:"20px"},errorNum:{fontSize:"16px",lineHeight:"22px",marginLeft:4}}})),p=function(s){var p=s.assetsData,d=t(null),u=c(),h=function(t){var s=t.alert,n=t.alertsNum,c=t.alertState,p=t.isMissingData,h=o[c];return i(m,e({alert:p?e(e({},s),{state:l.missing}):s,anchorEl:d.current,alertIcon:i(h,{className:a(u[p?l.missing:c],u.alertIcon)}),isTooltipVisible:n>0},{children:r("div",e({className:u.errorContainer},{children:[i(h,{className:a(u[c],u.alertIcon)}),r("div",{children:[r("span",e({className:a(u[c],u.errorText)},{children:[c,": "]})),i("span",e({className:u.errorNum},{children:n}))]})]}))}))};return r("div",e({className:u.container,ref:d},{children:[r("div",{children:[i(n,e({className:u.headerText},{children:"Data Quality"})),i(n,e({className:u.subheaderText},{children:"Fusion real-time data quality rules for app data"}))]}),i("div",{children:null==p?void 0:p.map((function(t){var a=t.id,s=t.name,n=t.issuesNum,o=t.missingNum,m=t.alert,c=function(e){return{alert:m,alertsNum:e===l.issue?n:o,alertState:e===l.issue?l.issue:l.missing,isMissingData:o>0}},p=c(l.issue),d=c(l.missing);return r("div",e({className:u.assetWrapper},{children:[i("div",e({className:u.assetName},{children:s})),h(p),h(d)]}),a)}))})]}))};export{p as DQUnvalidatedContent};
1
+ import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as a,jsx as s,Fragment as i}from"react/jsx-runtime";import{useRef as r}from"react";import t from"classnames";import{makeStyles as l,Typography as n}from"@material-ui/core";import{ALERT_STATES as o,ALERT_ICONS as c}from"../constants.js";import{DQAlertsTooltip as d}from"./DQAlertsTooltip.js";var m=l((function(e){return{alertIcon:{width:16,height:16},assetWrapper:{display:"table-row"},assetTable:{display:"table",marginTop:8},assetCell:{display:"table-cell",padding:"5px 0",verticalAlign:"middle"},assetName:{fontSize:"12px",lineHeight:"16px",width:89},container:{padding:12},headerText:{lineHeight:"19px",fontSize:"16px",fontWeight:500},subheaderText:{lineHeight:"14px",fontSize:"12px",fontWeight:400,color:e.palette.primary.text7,marginTop:4},Issue:{color:"#ffa500"},Missing:{color:e.palette.error.main},Resolved:{color:e.palette.success.bright},errorContainer:{display:"flex",alignItems:"center",marginLeft:8},errorText:{marginLeft:4,fontSize:"14px",lineHeight:"20px"},errorNum:{fontSize:"16px",lineHeight:"22px",marginLeft:4}}})),p=function(l){var p=l.assetsData,u=r(null),h=m(),f=function(i){var r=i.alert,l=i.alertsNum,n=i.alertState,m=i.isMissingData,p=c[n];return s(d,e({alert:m?e(e({},r),{state:o.missing}):r,anchorEl:u.current,alertIcon:s(p,{className:t(h[m?o.missing:n],h.alertIcon)}),isTooltipVisible:l>0},{children:a("div",e({className:h.errorContainer},{children:[s(p,{className:t(h[n],h.alertIcon)}),a("div",{children:[a("span",e({className:t(h[n],h.errorText)},{children:[n,": "]})),s("span",e({className:h.errorNum},{children:l}))]})]}))}))};return a("div",e({className:h.container,ref:u},{children:[a("div",{children:[s(n,e({className:h.headerText,"data-testid":"Status_badge__DQ_unvalidated_content"},{children:"Data Quality"})),s(n,e({className:h.subheaderText},{children:"Fusion real-time data quality rules for app data"}))]}),s("div",e({className:h.assetTable},{children:null==p?void 0:p.map((function(r){var l=r.id,n=r.name,d=r.issuesNum,m=r.missingNum,p=r.isResolved,u=r.alert,g=function(e){return{alert:u,alertsNum:e===o.issue?d:m,alertState:e===o.issue?o.issue:o.missing,isMissingData:m>0}},N=g(o.issue),v=g(o.missing),x=c.Resolved;return a("div",e({className:h.assetWrapper},{children:[s("div",e({className:t(h.assetName,h.assetCell)},{children:n})),p?s("div",e({className:h.assetCell},{children:s("div",e({className:h.errorContainer},{children:s(x,{className:t(h.Resolved,h.alertIcon)})}))})):a(i,{children:[s("div",e({className:h.assetCell},{children:d>0&&f(N)})),s("div",e({className:h.assetCell},{children:m>0&&f(v)}))]})]}),l)}))}))]}))};export{p as DQUnvalidatedContent};
@@ -3,6 +3,7 @@ export declare type BadgeIconStatus = 'warning' | 'error' | 'success';
3
3
  export declare const ALERT_ICONS: {
4
4
  Missing: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
5
5
  Issue: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
6
+ Resolved: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
6
7
  };
7
8
  export declare const ALERT_STATES: {
8
9
  missing: string;
@@ -24,6 +25,7 @@ export declare type AssetData = {
24
25
  id: number;
25
26
  issuesNum: number;
26
27
  missingNum: number;
28
+ isResolved?: boolean;
27
29
  alert: Alert;
28
30
  };
29
31
  declare type BadgeIconStatuses = {
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D,eAAO,MAAM,WAAW;;;CAGvB,CAAC;AAEF,eAAO,MAAM,YAAY;;;CAGxB,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAIjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,eAAO,MAAM,OAAO,kEAAkE,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,eAAO,MAAM,YAAY;;;CAGxB,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAIjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,eAAO,MAAM,OAAO,kEAAkE,CAAC"}
@@ -1 +1 @@
1
- import r from"@material-ui/icons/Warning";import s from"@material-ui/icons/Done";import i from"@material-ui/icons/Error";import{DangerousIcon as o}from"../Icons/DangerousIcon.js";var n,e=959,a={Missing:o,Issue:i},m={missing:"Missing",issue:"Issue"},c={success:"success",warning:"warning",error:"error"},t=((n={})[c.success]=s,n[c.warning]=r,n[c.error]=o,n),u="Recommendations may be incorrect based on data quality errors";export{a as ALERT_ICONS,m as ALERT_STATES,t as BADGE_ICONS,c as BADGE_ICON_STATUSES,e as MAX_MOBILE_WIDTH,u as WARNING};
1
+ import r from"@material-ui/icons/Warning";import i from"@material-ui/icons/Done";import s from"@material-ui/icons/Error";import o from"@material-ui/icons/CheckCircle";import{DangerousIcon as e}from"../Icons/DangerousIcon.js";var n,a=959,m={Missing:e,Issue:s,Resolved:o},c={missing:"Missing",issue:"Issue"},t={success:"success",warning:"warning",error:"error"},u=((n={})[t.success]=i,n[t.warning]=r,n[t.error]=e,n),g="Recommendations may be incorrect based on data quality errors";export{m as ALERT_ICONS,c as ALERT_STATES,u as BADGE_ICONS,t as BADGE_ICON_STATUSES,a as MAX_MOBILE_WIDTH,g as WARNING};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAIL,SAAS,EACV,MAAM,aAAa,CAAC;AA0ErB,aAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,WAAW,+EAOrB,gBAAgB,KAAG,WAgErB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAIL,SAAS,EACV,MAAM,aAAa,CAAC;AA2ErB,aAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,WAAW,+EAOrB,gBAAgB,KAAG,WAgErB,CAAC"}
@@ -1 +1 @@
1
- import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import{useState as n}from"react";import a from"moment";import i from"classnames";import{makeStyles as s,Typography as c}from"@material-ui/core";import{Tooltip as p}from"../Tooltip/Tooltip.js";import"../Tooltip/ScrollableTooltip.js";import{WARNING as l,BADGE_ICON_STATUSES as m,MAX_MOBILE_WIDTH as d}from"./constants.js";import{DQStatusIcon as g}from"./components/DQStatusIcon.js";import{DQUnvalidatedContent as u}from"./components/DQUnvalidatedContent.js";import{DQSuccessContent as f}from"./components/DQSuccessContent.js";import{ReportIssueModal as x}from"./components/ReportIssueModal.js";var h=s((function(t){return{statusBadgeWrapper:{backgroundColor:t.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(t){var e=t.isSuccessTypeIcon,o=t.isErrorTypeIcon;return"12px 0 2px ".concat(e||o?6:2,"px")},whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:t.palette.primary.text6,marginLeft:function(t){return t.isIconExist&&4}},warningMessage:{color:t.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:{"& .MuiTooltip-tooltip":{maxWidth:455,width:376,padding:4,fontSize:12,boxShadow:"0px 0px 4px 2px rgb(0 0 0 / 12%)",fontWeight:400,lineHeight:"16px",letterSpacing:"0.4px",backgroundColor:t.palette.background.b9}},DQIconWrapper:{display:"flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:24,width:24,borderRadius:12,"&:hover":{backgroundColor:function(t){var e=t.isErrorTypeIcon,o=t.isSuccessTypeIcon;return e?"rgba(244, 67, 54, 0.1)":o?"rgba(117, 219, 41, 0.2)":"transparent"}}}}})),b=function(s){var b,v=s.assetsData,y=void 0===v?[]:v,I=s.appWidth,T=s.iconType,S=s.className,w=s.lastTimestamp,j=s.warningData,C=n(!1),D=C[0],W=C[1],N=null==j?void 0:j.message,k=T==m.error,E=T==m.success,M=I<d,Q=h({isIconExist:!!T,isSuccessTypeIcon:E,isErrorTypeIcon:k});return k&&(b=e(u,{assetsData:y})),E&&(b=e(f,{onClick:function(){return W(!0)}})),o("div",t({className:i(Q.statusBadgeWrapper,S)},{children:[o("div",t({className:Q.statusBadgeContent},{children:[T&&e(p,t({interactive:k||E,PopperProps:k&&{className:Q.popper},placement:"top",title:b},{children:e("div",t({className:Q.DQIconWrapper},{children:e(g,{color:T,iconType:T})}))})),o(c,t({className:i(Q.text,Q.timestamp),variant:"body1"},{children:["Last Update: ",a.unix(w).format("M/D/YYYY h:mm a")]})),j&&o(r,{children:[e(p,t({placement:"top",title:N?"".concat(l,". ").concat(N):l},{children:e("div",{children:e(g,{className:Q.badgeIconWarning,color:m.warning,iconType:m.warning})})})),!M&&e(c,t({className:i(Q.text,Q.warningMessage),variant:"body1"},{children:N?"".concat(l,". ").concat(N):l}))]})]})),E&&e(x,{open:D,onClose:function(){return W(!1)}})]}))};export{b as StatusBadge};
1
+ import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as o,Fragment as n}from"react/jsx-runtime";import{useState as a}from"react";import r from"moment";import i from"classnames";import{makeStyles as s,Typography as c}from"@material-ui/core";import{Tooltip as p}from"../Tooltip/Tooltip.js";import"../Tooltip/ScrollableTooltip.js";import{WARNING as l,BADGE_ICON_STATUSES as m,MAX_MOBILE_WIDTH as d}from"./constants.js";import{DQStatusIcon as g}from"./components/DQStatusIcon.js";import{DQUnvalidatedContent as u}from"./components/DQUnvalidatedContent.js";import{DQSuccessContent as f}from"./components/DQSuccessContent.js";import{ReportIssueModal as x}from"./components/ReportIssueModal.js";var h=s((function(t){return{statusBadgeWrapper:{backgroundColor:t.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(t){var e=t.isSuccessTypeIcon,o=t.isErrorTypeIcon;return"12px 0 2px ".concat(e||o?6:2,"px")},whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:t.palette.primary.text6,marginLeft:function(t){return t.isIconExist&&4}},warningMessage:{color:t.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:{"& .MuiTooltip-tooltip":{maxWidth:455,padding:4,fontSize:12,boxShadow:"0px 0px 4px 2px rgb(0 0 0 / 12%)",fontWeight:400,lineHeight:"16px",letterSpacing:"0.4px",backgroundColor:t.palette.background.b9}},DQIconWrapper:{display:"flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:24,width:24,borderRadius:12,"&:hover":{backgroundColor:function(t){var e=t.isErrorTypeIcon,o=t.isSuccessTypeIcon;return e?"rgba(244, 67, 54, 0.1)":o?"rgba(117, 219, 41, 0.2)":"transparent"}}}}})),b=function(s){var b,v=s.assetsData,y=void 0===v?[]:v,S=s.appWidth,I=s.iconType,T=s.className,w=s.lastTimestamp,_=s.warningData,D=a(!1),j=D[0],C=D[1],W=null==_?void 0:_.message,N=I==m.error,Q=I==m.success,k=S<d,E=h({isIconExist:!!I,isSuccessTypeIcon:Q,isErrorTypeIcon:N});return N&&(b=e(u,{assetsData:y})),Q&&(b=e(f,{onClick:function(){return C(!0)}})),o("div",t({"data-testid":"Status_badge",className:i(E.statusBadgeWrapper,T)},{children:[o("div",t({className:E.statusBadgeContent},{children:[I&&e(p,t({interactive:N||Q,PopperProps:N&&{className:E.popper},placement:"top",title:b},{children:e("div",t({className:E.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(I)},{children:e(g,{color:I,iconType:I})}))})),o(c,t({className:i(E.text,E.timestamp),variant:"body1"},{children:["Last Update: ",r.unix(w).format("M/D/YYYY h:mm a")]})),_&&o(n,{children:[e(p,t({placement:"top",title:W?"".concat(l,". ").concat(W):l},{children:e("div",t({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:e(g,{className:E.badgeIconWarning,color:m.warning,iconType:m.warning})}))})),!k&&e(c,t({className:i(E.text,E.warningMessage),variant:"body1"},{children:W?"".concat(l,". ").concat(W):l}))]})]})),Q&&e(x,{open:j,onClose:function(){return C(!1)}})]}))};export{b as StatusBadge};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.55.0-14",
3
+ "version": "0.55.0-15",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"